Maya's issue with assigning material on plugin shape
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
At first, I thought the issue was with our plugin's code, but later it became clear that the same problem exists in Maya's apiMeshShape sample code.
When a material is applied to a shape, everything seems fine, except when you select the 'Select Objects with Material' option from the material object. At that moment, the 'Shader * not found' warning appears, and the shape is not selected.
The only thing I managed to do was overriding the renderGroupComponentType() belonging to MPxSurfaceMesh to return kMeshPolygonComponent or kSurfaceFaceComponent instead of 0. This stops the 'Shader * not found' message from appearing, but now the 'select' message shows up in the script editor output window, and nothing gets selected, i.e., 'select -r '.