The rotation connection runs from a 'choice' node to the cube's
transform. E.g. from rigidBody_rz.output to pCube1.rz. So you have to
reverse the order of your arguments and replace the rigidBody node
with the appropriate choice node.

To find the choice node, trace the connection back from the cube's
rotation plug.

If you get confused, use Windows -> Hypergraph: Connections to look at
the network that the 'rigidBody' command builds. Hovering the mouse
over a connection will tell you the attributes on both ends.


On Mon, Mar 16, 2009 at 03:41, bendingiscool
<[email protected]> wrote:
>
> soory that was an old bit of code, forgot to switch for the relevant
> attributes, what I need is to disconnect the rotation's fromthe rigid
> body's inputs. I am having trouble with the syntax of the rigidBody's
> output.
>
> On Mar 16, 4:11 am, Dean Edmonds <[email protected]> wrote:
>> On Sun, Mar 15, 2009 at 11:33, bendingiscool
>>
>> <[email protected]> wrote:
>>
>> > cube = mc.polyCube()
>> > rigidBody = mc.rigidBody(mass=1, bounciness=0, damping=20, impulse=
>> > [0,0,0])
>> > mc.setAttr(rigidBody + '.allowDisconnection', 1)
>>
>> > #### problem here:
>> > mc.disconnectAttr('%s.sz' % cube,'%s.impulseZ' % rb)
>> > ####
>>
>> When I do those first 3 commands there is nothing connected to either
>> the cube's 'sz' attr nor the rigid body's 'impulseZ' attr.
>>
>> --
>> -deane
>
> >
>



-- 
-deane

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to