0

I have a "container" node in Maya - from maya import cmds; cmds.createNode('container'), which I want to be able to transform (move & rotate) in my scene. I'm aware that the "dagContainer" node supports this, so I would like to know how I can customize my container to behave this way.

To put it generally, how can transform attributes be added to a non-transform node in Maya?

Viktor Petrov
  • 444
  • 4
  • 13
  • So you created your own node type is that correct? I think you have two possibilities, the first one is to derive your own node from MPxTransform, or derive it from a shape node like MPxLocator, MPxSurfaceShape. If you then create a new instance a transform node is automatically added by maya. – haggi krey Aug 07 '19 at 09:36
  • @haggikrey thanks for commenting! Do you know of any way to derive from a container type node and get a transform added to that as well? I know it's possible because Maya supports a DAG container with transform, but I would like to know how to do it myself. – Viktor Petrov Aug 07 '19 at 10:37
  • It seems that there is no proxy for containers. So my suggestions will not work. Is there any reason why you dont want to use the dagContainer? – haggi krey Aug 07 '19 at 14:38
  • @haggikrey yeah, deleting dagContainers hard crashes my Maya 2018 when blackBox is on and they've been duplicated multiple times, even if all that's inside the container is a basic cube. But I also wanted to know if/how adding transofrms to non-transform nodes could be done out of interest. – Viktor Petrov Aug 08 '19 at 08:08

0 Answers0