duplicate symmetry

31 views
Skip to first unread message

kevco...@gmail.com

unread,
Jan 2, 2015, 4:50:47 PM1/2/15
to python_in...@googlegroups.com
Hey Guys,

I'm working on some rigging tools for our transition from XSI to Maya. Right now, I'm just trying to get a decent duplicate symmetry tool, but I'm hitting some problems.

I'm still figuring out exactly how I want to script it. But with what I currently have, I'm having an issue with the rig updating after the duplicating.

Basically, I have a group of controllers with a nurbsCurve CV's constrained to each controller. Those nulls and curve are grouped under a buffer transform. So I select the buffer transform and run my code. Everything duplicates fine, the groups with it's children, the curve, and the utility nodes that I'm using to constrain the CV's to the controls. If I graph the newly duplicated curve in the node editor, all the connections are correct. However, If I translate a control, the nurbsCurve doesn't move with the control. I finally tried breaking one of the connections and then remaking it. Now the curve moves correctly with the controls. What's making this happen, or how can I prevent this from happening?

Thanks
Kev

Nicolas Combecave

unread,
Jan 3, 2015, 5:22:56 AM1/3/15
to python_in...@googlegroups.com
Could you try the following command after the duplication and see if it triggers the correct dirtying of the connections?

getAttr -silent "yourNurbsCurveShape.local";



--
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 python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/2e10093d-9616-43f2-b7f1-d9ad9ab1536f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marcus Ottosson

unread,
Jan 3, 2015, 5:43:13 AM1/3/15
to python_in...@googlegroups.com

The issue might be caused by the graph not re-evaluating connections made to components when you duplicate. You can try to force a re-evaluation by doing what Nicolas suggests, getting the attribute. If that works, you should also find that the duplicate works when you reload the scene.

There is also a dedicated command to force re-evaluation called dgdirty.



For more options, visit https://groups.google.com/d/optout.



--
Marcus Ottosson
konstr...@gmail.com

kevco...@gmail.com

unread,
Jan 3, 2015, 11:17:33 AM1/3/15
to python_in...@googlegroups.com, kevco...@gmail.com
ah okay, thanks guys. I'll give this a shot. I get a similiar issue with some code that constrains nulls/locators to a curve via motionPaths, the locators are created starting from the origin and only after I move the curve do they snap into place on the curve.

is it common having to force dg re-evaluation after running some code?

Marcus Ottosson

unread,
Jan 3, 2015, 11:46:24 AM1/3/15
to python_in...@googlegroups.com, kevin cortez

is it common having to force dg re-evaluation after running some code?

I’d have to go with “Well” followed by “It depends”.

To be honest, I rarely find myself duplicating complex networks of nodes very often, but instead tend to script them to begin with as it allows for a little more flexibility. But, when you have to deal with attributes and dirty states of things that doesn’t necessarily update when you would expect them to, then yes, taking control of the dg evaluation could become a fairly common thing to do. It does mean things that may already have processed to process once more and thus cost precious cycles, so I would avoid doing it on a per-frame basis - like in real-time rigging situations - but otherwise, and in your case, it should be all dandy.​

Reply all
Reply to author
Forward
0 new messages