I’m trying to make some additional contrls in post script
Can I get return of mgear.rigbits.createCTL?
Or do I have to use cmds.ls(sl=True)?
Thank you
I’m trying to make some additional contrls in post script
Can I get return of mgear.rigbits.createCTL?
Or do I have to use cmds.ls(sl=True)?
Thank you
It looks like there is no return value in that function. So you are right, you would have to do something like query your selection. (You can also do that before you run the function.)
Alternatively, I would use rigbits.addNPO()
which does return the newly created transform.
I would leave the icons blank for the moment. And later, once everything is built, use rigbits.replaceShape()
to copy a controlBuffer shape to the transform. That way you can store custom control icon changes, and they’ll get pulled from the controlBuffer group.
(Or both. Create a default shape, like you are doing. But then query if a controlBuffer exists. And if yes, replace it.)
I tried to use rigbits.addNPO and replace shape, but it can’t create NPO under extisting node. In this case I want to create a new control under some cntrols or nodes.
Thank you so much for replay
You can create the node first, and then parent it.
Sorry, I can’t follow you
Now, I use primitive.addTransform to make transform node under the existing node
Then use rigbits.createCTL(type=’’, child=True)
Finally, use cmds.ls(sl=True)
I have to chatch CTL node for rename and replaceShape
Thank you
Does primitive.addTransform()
return the new node?
yourNewNode = rigbits.addNPO()
does. So you can catch it as a variable there. And parent it, name it, add a shape, etc.
From mgear document
rigbits.addNPO only make as parent, right?
I want to make node under specific node…