#* stupid indenting mistake on cut and paste
#this should be the last part;

for src,dest in connectList:

     try:

         src.connect(dest,f=True)

     except:

         print("NOPE: %s -> %s " % (src,dest))



On Tue, Jun 18, 2013 at 10:44 AM, Geordie Martinez <
geordiemarti...@gmail.com> wrote:

> using pymel you can get all the outputs using .outputs() with the arg
> "type" you can narrow it to
>
> import pymel.core as pm
>
> con = pm.PyNode("CON_NAME")
>
>
> # paired groups of what the con connects to
>
> connectList = con.outputs(plugs=True, connections=True)
>
>
> # disconnect them
>
> [src.disconnect() for src,dest in connectList]
>
>
> # MOVER YOUR CON TO WHEREEVER or do your thing.
>
>
> # TRY AND RECONNECT
>
> for src,dest in connectList:
>
> try:
>
> src.connect(dest,f=True)
>
> except:
>
> print("NOPE: %s -> %s " % (src,dest))
>
>
>
>
>
>
>
> On Tue, Jun 18, 2013 at 2:21 AM, Narann <fevrier.dor...@yahoo.fr> wrote:
>
>> Yes but I was wondering if there already was a command to do this. :(
>>
>> This is what I've actually done:
>> - Get every children nodes
>> - for each child Get connections and traverse the graph blocking some
>> unwanted node types.
>> - Store everything.
>>
>> But it's a ugly code. :(
>>
>> Le lundi 17 juin 2013 19:56:36 UTC+2, Ravi Jagannadhan a écrit :
>> > Can't you just traverse the connections from that node?
>> >
>> >
>> >
>> >
>> > On Mon, Jun 17, 2013 at 2:17 AM, Narann <fevrier...@yahoo.fr> wrote:
>> >
>> >
>> > Hi all! :)
>> >
>> >
>> >
>> > I desperate with this and I'm sure some of you have already encounter
>> this:
>> >
>> >
>> >
>> > I have a complex character rigg and I know a specific controller has
>> been moved. From this node, I want to get every nodes that will be affected
>> by this move. :(
>> >
>> >
>> >
>> > When you select this node, some Maya shapes became "mallow". Actually,
>> I want to get all this shapes.
>> >
>> >
>> >
>> > Any advise is welcome!
>> >
>> >
>> >
>> > Regards,
>> >
>> >
>> >
>> > Dorian
>> >
>> >
>> >
>> > --
>> >
>> > 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 python_inside_maya+unsubscr...@googlegroups.com.
>> >
>> > To post to this group, send email to python_in...@googlegroups.com.
>> >
>> > 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 python_inside_maya+unsubscr...@googlegroups.com.
>> To post to this group, send email to python_inside_maya@googlegroups.com.
>> 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 python_inside_maya+unsubscr...@googlegroups.com.
To post to this group, send email to python_inside_maya@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to