Message 1 of 1
Create / Delete UVSet with Custom Node
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have tried several times to create custom node to create UVSet, but I failed.
my code is like below,
def deform(self, dataBlock, geomIter, matrix, multiIndex): hInput = dataBlock.inputArrayValue(self.input) hInputGeom = hInput.inputValue() fnMesh = OpenMaya.MFnMesh(hInputGeom.asMesh()) fnMesh.createUVSetWithName("myUVMap") ## GOT ERROR HERE
...
But I just got
# File "S:\Maya_2018_DI\build\Release\runTime\Python\Lib\site-packages\maya\OpenMaya.py", line 9968, in createUVSetWithName # RuntimeError: (kFailure): Object does not exist //
Of course I can use the createUVSet node, but it cannot change uvSetName dynamically.