miarmy
2018-09-19 21:29:15 UTC
hi! first, i write this code:
MSelectionList selectionList;
MGlobal::getActiveSelectionList(selectionList);
//first selection :
MDagPath dag_path;
MItSelectionList kDagNodeSelectionList(selectionList, MFn::kDagNode);
kDagNodeSelectionList.getDagPath(dag_path);
MObject obj;
//get shape :
dag_path.extendToShape();
obj = dag_path.node();
MFnDependencyNode meshObj(obj);
in transform node with one shape or mesh node, this code is true and
it Give us the only mesh, But if the transform node had more shape node,
How to find individual shapes?
MSelectionList selectionList;
MGlobal::getActiveSelectionList(selectionList);
//first selection :
MDagPath dag_path;
MItSelectionList kDagNodeSelectionList(selectionList, MFn::kDagNode);
kDagNodeSelectionList.getDagPath(dag_path);
MObject obj;
//get shape :
dag_path.extendToShape();
obj = dag_path.node();
MFnDependencyNode meshObj(obj);
in transform node with one shape or mesh node, this code is true and
it Give us the only mesh, But if the transform node had more shape node,
How to find individual shapes?
--
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_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/30a38c5b-1526-48cb-860b-0f46d7708747%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/30a38c5b-1526-48cb-860b-0f46d7708747%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.