Hey, We're having the same mechanism here. But that means you need to educate all your users to use that override function instead of the default Maya createNode
--- [image: Nicolas Chaverou - Golaem Crowd Product Manager - Golaem SA] +33 (0)2 99 27 21 44 http://www.golaem.com On Thu, Mar 30, 2017 at 2:03 PM, Marcus Ottosson <[email protected]> wrote: > Here’s my 2 cents. I’d be explicit about it. > > from maya import cmds > def myCreateNode(node): > nodes = { > "joint": { > "tx": 1.0, > "ty": 10.0, > "ry": 5.0 > }, > "mesh": { > "overrideEnabled": 1, > "overrideColor": 6, > } > } > > overrides = nodes.get(node, {}) > node = cmds.createNode(node) > > for attribute, value in overrides.items(): > cmds.setAttr(node + "." + attribute, value) > > return node > > myCreateNode("joint") > myCreateNode("mesh") > > > > > -- > 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/CAFRtmOCA_FC-6iK3EVhYCXTYw8CTKttfrjJNm92izu > CVroOfXA%40mail.gmail.com > <https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCA_FC-6iK3EVhYCXTYw8CTKttfrjJNm92izuCVroOfXA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFS5DCZfcu3cVnCV307K70Di44aDwg8NhjG%3Dsc5WQHj0ERTh7Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
