Sorry I did a bit mistake. I would like to store (like in json) the data used for creating nConstraint. What I actually need is the component ids per mesh. I got NId from nComponent that seems useless for me. Is there any way to get component list from nComponent?
2018. január 15., hétfő 11:05:34 UTC-8 időpontban Marcus Ottosson a következőt írta: > > Something I typically do when trying to figure out how to populate some > undocumented data member is to look at how Maya Ascii does it. > > For example.. > > - nconstraint.ma > <https://gist.github.com/mottosso/6939efce5459c51130653d265220c82f> > > ... > createNode dynamicConstraint -n "dynamicConstraintShape1" -p > "dynamicConstraint1"; > ... > connectAttr "dynamicConstraintShape1.evs" "nucleus1.is[0]"; > connectAttr "dynamicConstraintShape1.evc" "nucleus1.ic[0]"; > connectAttr "nComponent1.ocp" "dynamicConstraintShape1.cid[0]"; > connectAttr "nComponent2.ocp" "dynamicConstraintShape1.cid[1]"; > connectAttr ":time1.o" "dynamicConstraintShape1.cti"; > > This is everything related to the constraint itself, and.. > > ... > createNode nComponent -n "nComponent1"; > rename -uid "5CA944EE-46C7-5933-6EF2-70B733AACB38"; > setAttr ".ct" 2; > setAttr ".el" 2; > ... > connectAttr "nComponent1.ocp" "dynamicConstraintShape1.cid[0]"; > ... > connectAttr "nClothShape1.nuid" "nComponent1.obid"; > ...// End of temp.ma > > These are everything related to the nComponent. From here you might be > able to figure out how to replicate this with API calls. > > -- 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/6805b889-9ad2-4a68-9510-cf0794b75f1a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
