I'm not sure I recommend this, but maybe it can help out... Particle instancing is simpler and doesn't cause these nodes and edits to come into existence.
Assuming your object is at 0 0 0 when reffed in, You can create a single particle at 0 0 0 Select your referenced in object, select you particle and choose Particles > Instancer(replacement) This creates a instancer node (and a single instance for each particle - in this case 1). The instancer node needs the particle and the transform input from your reffed object. The instancer can be transformed like a normal transform node, plus there are some other attributes available. You can do this as many times as you'd like with the same particle object. On Sat, Jul 3, 2010 at 2:17 AM, Judah Baron <[email protected]> wrote: > This question is slightly off topic, but still related. > When a shape from a referenced file is instanced a bunch of groupid nodes > are created relating to the shading network, and it is possible to assign > new materials to this instance. I am wondering if there is a way to prevent > the creation of these groupid nodes and all of the related edits. We have a > usage case wherein we know that we will never need or want to modify the > materials of one of these "library" shapes. We have some cleanup code that > removes all of these edits, but I would much rather find a more elegant > solution. > thanks, > -Judah > > On Fri, Jul 2, 2010 at 11:00 PM, John Creson <[email protected]> wrote: >> >> If you pass in the full name to the shape node from the instance you >> are wishing to find the shading group of, you will get the correct >> shader returned. >> >> import maya.cmds as cmds >> >> shapeNode = 'pSphere2|pSphereShape1' >> shadingGroup = cmds.listConnections(shapeNode + '.instObjGroups')[0] >> print shadingGroup >> >> >> >> On Fri, Jul 2, 2010 at 3:56 PM, Ling <[email protected]> wrote: >> > Hi guys: >> > >> > Normally when dealing with a non-instanced shape node, it's easy to >> > get its shading group assighnment like: >> > >> > shadingGroup = cmds.listConnections(shapeNode + '.instObjGroups[0]') >> > [0] >> > >> > >> > >> > but when it comes to instanced the shapde nodes, one shape node >> > might have several shader assignments. >> > >> > if I do a list connection to the instanced shape node, all the >> > shading groups assigned to it will be listed, and don't know which one >> > is assigned to a particular transform node's children shape node. >> > >> > so how can I query which shader is assign to a given transform node? >> > >> > >> > many thanks >> > >> > >> > -ling >> > >> > -- >> > http://groups.google.com/group/python_inside_maya >> >> -- >> http://groups.google.com/group/python_inside_maya > > -- > http://groups.google.com/group/python_inside_maya -- http://groups.google.com/group/python_inside_maya
