I'm trying to use pymel's virtualClasses <https://github.com/LumaPictures/pymel/blob/master/examples/customClasses.py> to make my own Transform node (basically just some extra attrs and functionality, formatted in a nice way in AE template). I'm hitting a few snags but I'm not sure if that is just how they are expected to work.
Cannot createNode of given type pm.createNode(MyTransform) # Result: nt.Transform(u'transform1') # <- wrong type, I want a MyTransform ls -type / exactType also returns nodes the 'inherited' type pm.ls(type=MyTransform) # Result: [nt.Transform(u'front'), # <- dont want these nt.Transform(u'persp'), # <- dont want these nt.Transform(u'side'), # <- dont want these nt.Transform(u'top'), # <- dont want these nt.MyTransform(u'transform1')] # <- Only want this :) nodeType doesn't returns original type my_node.nodeType() # Result: u'transform' # <- want MyTransform I also wanted to customize the AE for my virtual type. But AETemplateCustomContent callback doesn't respect the difference between the virtual type and inherited type. Rather the AE modifications are added to *both *MyTransform *and *Transform nodes. I'm guessing all these points are related, and I'm just over expecting what virtual classes can do. I wanted to use them rather than define my own custom node plugin because: 1. A custom node doesn't survive the round trip from alembic 2. Python api 2.0 doesn't seem to support subclassing MPxTransform -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/ceeacdc7-6529-4174-8957-30a1deb3d0a6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
