One thing that threw me for a while was that the python documentation was very
unclear about how the MDGModifier.createNode() function wanted the string-type
arg to be formatted. Specifically, did it want the api version of the node
type, or the standard version of the node type?
The answer was suggested in your answer as being the 'standard' node type name.
Each node will return a different node type name with:
* maya.cmds.nodeType('node', api=True/False)
The MDGModifier class wants the names formatted in the "False" node type name
style.
On Thursday, July 10, 2008 11:43:31 AM UTC-7, Matthew Chapman wrote:
> The only way I can find to do it in python is not very elegant at all. I
> personally would just instance both MDGModifier and MDagModifier instead. It
> is a lot cleaner that way.
>
> import maya.OpenMaya as om
> dagMod = om.MDagModifier()
>
> animCurveNode = super(om.MDagModifier, dagMod).createNode("animCurveUU")
> dagMod.doIt()
>
> of
>
> import maya.OpenMaya as om
>
> dgMod = om.MDGModifier()
> animCurveNode = dgMod.createNode("animCurveUU")
> dgMod.doIt()
>
>
>
>
>
> On Thu, Jul 10, 2008 at 10:33 AM, Seth Gibson <[email protected]> wrote:
>
> Greets all, this actually might be more of a general python question, but
> i've only ever run into this sort of thing while doing Maya work so i thought
> i'd ask here. I was looking through Complete Maya Programming yesterday and
> i came across these calls:
>
>
>
> MDagModifier dagMod;
> ...
> ...
> MObject shadowNode = dagMod.MDGModifier::createNode( GroundShadowNode::id );
>
> What is the equivalent of this in Python? Thanks for any info.
--
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/1590c75f-e8c7-4911-b10f-70ca1b0fe432%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.