Also, you may want to check for a cycle.

On Tue, Sep 10, 2013 at 1:48 PM, Justin Israel <[email protected]>wrote:

> What does your actual loop look like that is causing the problem? I don't
> see a recursive call here.
> Are you trying to trace a specific path along the way or to build a big
> tree data structure?
> Also you might want to set the source/destination flags in listConnections
> to control the direction you want to follow.
> On Sep 11, 2013 7:59 AM, "Daz" <[email protected]> wrote:
>
>> Heya
>>
>> I'm struggling with loop to get some nodes from nodes from nodes etc etc
>> etc etc....
>>
>> Can some1 have a look an hint me what to do ? :)
>>
>> import maya.cmds as cmds
>>
>> sel = cmds.ls(sl=1,mat=1)
>> for mats in sel:
>>                 nodes = cmds.listConnections(mats)
>>                 for connections in nodes:
>>                         print connections
>>
>> I tried this method
>> http://www.tutorialspoint.com/python/python_while_loop.htm
>> But I ended up with maya getting stuck on printing connections :)
>>
>> How can I do it?
>>
>> --
>> 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 post to this group, send email to [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>  --
> 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 post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Where we have strong emotions, we're liable to fool ourselves - Carl Sagan

-- 
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 post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to