8.7 KiB
8.7 KiB
Module Packaging Specification
Overview
This document specifies the implementation details for packaging the Maya Image Plane Node plugin as a Maya module for easy installation and distribution.
Requirements
- Create a proper Maya module structure
- Ensure the plugin loads correctly when placed in Maya's module path
- Support multiple versions of Maya (specifically targeting Maya 2023)
- Include all necessary dependencies (FFmpeg binaries if not system-installed)
- Provide version information for the plugin
- Support both debug and release builds
- Allow easy uninstallation and upgrading
Implementation Details
Maya Module Structure
A Maya module consists of:
- A module definition file (.mod)
- The plugin binary (.mll for Windows)
- Optional: scripts, icons, help files, etc.
Module Definition File
Create MayaImagePlaneNode.mod with contents:
+ MayaImagePlaneNode 1.0 ${MAYA_IMAGE_PLANE_NODE_PATH}
PLUG-INS:
Where:
MayaImagePlaneNodeis the module name1.0is the version${MAYA_IMAGE_PLANE_NODE_PATH}is the environment variable pointing to the module rootPLUG-INS:specifies where to find plugin files
Directory Structure
MayaImagePlaneNode/
├── MayaImagePlaneNode.mod
├── bin/
│ └── MayaImagePlaneNode.mll
├── lib/
│ ├── avcodec-58.dll
│ ├── avformat-58.dll
│ ├── avutil-56.dll
│ └── swscale-5.dll
├── scripts/
│ └── (optional MEL/Python scripts)
├── icons/
│ └── (optional node icons)
└── doc/
└── (optional documentation)
Build System Integration
Modify CMake to:
- Install plugin to appropriate bin directory
- Copy FFmpeg DLLs to bin directory (if bundling)
- Generate module file during build
- Provide option to create package for distribution
Versioning
- Use semantic versioning (major.minor.patch)
- Version information accessible via plugin attributes
- Update module file version when plugin version changes
Dependencies Handling
Option 1: System FFmpeg
- Rely on FFmpeg being installed in system PATH
- Simpler deployment but requires user to install FFmpeg separately
Option 2: Bundled FFmpeg
- Include FFmpeg DLLs with the plugin
- Larger distribution but guaranteed to work
- Must comply with FFmpeg licensing (LGPL/GPL)
Option 3: Hybrid
- Use system FFmpeg if available, fallback to bundled
- Best of both approaches
Installation Process
- User extracts module to a directory
- Sets MAYA_IMAGE_PLANE_NODE_PATH environment variable to module root
OR places module in standard Maya module locations:
<user>/Documents/maya/<version>/modules/<Maya installation>/modules/
- Maya automatically detects and loads the module on startup
- Plugin becomes available in Maya's Plugin Manager
Uninstallation
- Remove module directory
- Remove environment variable (if set)
- Restart Maya
Build Configurations
- Debug build: MayaImagePlaneNode_debug.mll
- Release build: MayaImagePlaneNode.mll
- Consider using different module files or paths for debug vs release
Maya API Version Compatibility
- Compiled against Maya 2023 API
- May work with other versions but not guaranteed
- Consider using version-specific module files if needed
Loading Verification
- Plugin should register successfully with Maya's plugin system
- Node type should be available in Node Editor
- Attributes should be accessible and editable
- Viewport display should work when node is created
Dependencies
- Maya 2023 development kit
- FFmpeg libraries (matching Maya's compiler version)
- CMake 3.14+
- Visual Studio 2017 (matching Maya 2023's compiler)
Implementation Plan
CMake Modifications
- Add install() commands for plugin and dependencies
- Generate module file using configure_file()
- Optionally create package() target for CPack
- Set up version numbers
Module File Template
Create MayaImagePlaneNode.mod.in:
+ MayaImagePlaneNode @PROJECT_VERSION@ @CMAKE_INSTALL_PREFIX@
PLUG-INS:
Environment Variables
- MAYA_IMAGE_PLANE_NODE_PATH: Points to module root
- Alternatively, rely on standard Maya module discovery
Testing
- Verify module loads in clean Maya installation
- Test with both debug and release builds
- Test FFmpeg dependency resolution
- Verify plugin appears in Plugin Manager
- Test node creation and attribute editing
Dependencies
- CMake
- Maya 2023 SDK
Overview
This document specifies the implementation details for packaging the Maya Image Plane Node plugin as a Maya module for easy installation and distribution.
Requirements
- Create a proper Maya module structure
- Ensure the plugin loads correctly when placed in Maya's module path
- Support multiple versions of Maya (specifically targeting Maya 2023)
- Include all necessary dependencies (FFmpeg binaries if not system-installed)
- Provide version information for the plugin
- Support both debug and release builds
- Allow easy uninstallation and upgrading
Implementation Details
Maya Module Structure
A Maya module consists of:
- A module definition file (.mod)
- The plugin binary (.mll for Windows)
- Optional: scripts, icons, help files, etc.
Module Definition File
Create MayaImagePlaneNode.mod with contents:
+ MayaImagePlaneNode 1.0 ${MAYA_IMAGE_PLANE_NODE_PATH}
PLUG-INS:
Where:
MayaImagePlaneNodeis the module name1.0is the version${MAYA_IMAGE_PLANE_NODE_PATH}is the environment variable pointing to the module rootPLUG-INS:specifies where to find plugin files
Directory Structure
MayaImagePlaneNode/
├── MayaImagePlaneNode.mod
├── bin/
│ └── MayaImagePlaneNode.mll
├── lib/
│ ├── avcodec-58.dll
│ ├── avformat-58.dll
│ ├── avutil-56.dll
│ └── swscale-5.dll
├── scripts/
│ └── (optional MEL/Python scripts)
├── icons/
│ └── (optional node icons)
└── doc/
└── (optional documentation)
Build System Integration
Modify CMake to:
- Install plugin to appropriate bin directory
- Copy FFmpeg DLLs to bin directory (if bundling)
- Generate module file during build
- Provide option to create package for distribution
Versioning
- Use semantic versioning (major.minor.patch)
- Version information accessible via plugin attributes
- Update module file version when plugin version changes
Dependencies Handling
Option 1: System FFmpeg
- Rely on FFmpeg being installed in system PATH
- Simpler deployment but requires user to install FFmpeg separately
Option 2: Bundled FFmpeg
- Include FFmpeg DLLs with the plugin
- Larger distribution but guaranteed to work
- Must comply with FFmpeg licensing (LGPL/GPL)
Option 3: Hybrid
- Use system FFmpeg if available, fallback to bundled
- Best of both approaches
Installation Process
- User extracts module to a directory
- Sets MAYA_IMAGE_PLANE_NODE_PATH environment variable to module root
OR places module in standard Maya module locations:
<user>/Documents/maya/<version>/modules/<Maya installation>/modules/
- Maya automatically detects and loads the module on startup
- Plugin becomes available in Maya's Plugin Manager
Uninstallation
- Remove module directory
- Remove environment variable (if set)
- Restart Maya
Build Configurations
- Debug build: MayaImagePlaneNode_debug.mll
- Release build: MayaImagePlaneNode.mll
- Consider using different module files or paths for debug vs release
Maya API Version Compatibility
- Compiled against Maya 2023 API
- May work with other versions but not guaranteed
- Consider using version-specific module files if needed
Loading Verification
- Plugin should register successfully with Maya's plugin system
- Node type should be available in Node Editor
- Attributes should be accessible and editable
- Viewport display should work when node is created
Dependencies
- Maya 2023 development kit
- FFmpeg libraries (matching Maya's compiler version)
- CMake 3.14+
- Visual Studio 2017 (matching Maya 2023's compiler)
Implementation Plan
CMake Modifications
- Add install() commands for plugin and dependencies
- Generate module file using configure_file()
- Optionally create package() target for CPack
- Set up version numbers
Module File Template
Create MayaImagePlaneNode.mod.in:
+ MayaImagePlaneNode @PROJECT_VERSION@ @CMAKE_INSTALL_PREFIX@
PLUG-INS:
Environment Variables
- MAYA_IMAGE_PLANE_NODE_PATH: Points to module root
- Alternatively, rely on standard Maya module discovery
Testing
- Verify module loads in clean Maya installation
- Test with both debug and release builds
- Test FFmpeg dependency resolution
- Verify plugin appears in Plugin Manager
- Test node creation and attribute editing
Dependencies
- CMake
- Maya 2023 SDK