Rigging

Rigging101 » Rigging128

Select top node of newly referenced file? (2 posts)

About This Topic

Tags

No tags yet.

  1. kwilli30

    offline
    Member
    Posted 8 years ago
    #

    Trying to apply animation to a newly referenced file via MEL. It's part of a loop that's referencing a lot of the same character, then applying various animations to them.

    Looking for a way of selecting the top node of a newly referenced file.

    So far, I'm having to give each file a unique name space and keep track of it all with an int.

    something like:


    t

    Seems sloppy, having to hard code the name of the topnode...but should be ok.

    Will use tokenize for some other stuff...but just thought there had to be some simpler way of doing it.

  2. kwilli30

    offline
    Member
    Posted 8 years ago
    #

    Code:

    int $counter = 0;

    for ($sel in $sels)
    {
    file -r -namespace ($namespace + $counter) $charPath;
    string $topNode = (($namespace + $counter) + ":" + "char_topNode");
    kwApplyAnim $topNode;
    }

Reply

You must log in to post.

Rigging101 » Rigging128
1,099 posts in 307 topics over 110 months by 188 of 8,226 members. Latest: fashionpvp, d2q4p5z2j, gasheldonl