mcjSelectAllMyChildren: DS 1- 4 Script selects all sub-nodes of selected nodes

mCasualmCasual Posts: 4,607
edited November 2015 in Freebies

Save a second of work here save a second of work there and soon you saved 2 seconds of work.


so, you want to make the AmyWagen prop invisible, and you select the root node, turn off visibiliity and ......... the 50 sub-props are still visible !

but now with mcjselectallmychildren

select the root node, run the script

Bam, all 50 sub-props selected

turn off visibility in 1 click

Also very practical for fingers animation

Dowbload here ----------------> https://sites.google.com/site/mcasualsdazscripts4/mcjselectallmychildren


in fact the code is so simple i'll post it here
for edumational purposes
"is our children learning?"

 

var roots = Scene.getSelectedNodeList();var n = roots.length;for( var i = 0; i < n; i++ ){ selectChildren( roots[ i ] )} function selectChildren( root ){  var children = root.getNodeChildren( true ); //recurse  var n = children.length; for( var i = 0; i < n; i++ ) {  var node = children[ i ];  node.select( true ); }}

 

newtb2mode.jpg
720 x 540 - 115K
pan.jpg
866 x 641 - 415K
Post edited by Richard Haseltine on

Comments

  • JimmyC_2009JimmyC_2009 Posts: 8,891
    edited December 1969

    Thanks Casual, your scripts are always useful.

    I might even have a look at how it works :)

  • selias19selias19 Posts: 253
    edited December 1969

    Many thanks for this, Casual.
    Again one of those "Must Have" from you.
    I use your "Come Here" script all the time.

    Sigrid

  • MorganRLewisMorganRLewis Posts: 233
    edited December 1969

    One of those ideas that's brilliant in its simplicity. Thank you!

  • DorseylandDorseyland Posts: 724
    edited December 1969

    Finally, a script I can understand. Thanks, Cazh!

  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    So this will work on say Genesis and all the body parts too? If so that would be so awesome. It's such a pain to run through turning off all the fingers .. YUK!

    Thanks so much Casual!

  • mCasualmCasual Posts: 4,607
    edited December 1969

    RAMWolff said:
    So this will work on say Genesis and all the body parts too? If so that would be so awesome. It's such a pain to run through turning off all the fingers .. YUK!

    Thanks so much Casual!

    yest though in DS 4.5 you have to be careful not to select the root node when you select the body part


    ---
    here i selected the foreArm and the script selected the hand and fingers

    select.jpg
    605 x 605 - 62K
  • RAMWolffRAMWolff Posts: 10,212
    edited December 1969

    OK, that's very good. Thanks so much!

  • HellKoreaHellKorea Posts: 17
    edited December 1969

    Thanks casual..
    but daz has already this function.

    so i change some code to hide toggle from select.
    it's very convenient to me. :D

    ====================================

    var roots = Scene.getSelectedNodeList();
    var n = roots.length;
    for( var i = 0; i < n; i++ )
    {
    roots.setVisible(!roots.isVisible());
    selectChildren( roots )
    }

    function selectChildren( root )
    {
    var children = root.getNodeChildren( true ); //recurse
    var n = children.length;
    for( var i = 0; i < n; i++ )
    {
    var node = children;
    node.setVisible(!node.isVisible());
    }
    }

    2014-10-18_000958.jpg
    400 x 338 - 68K
Sign In or Register to comment.