Lost an old script for adding nulls to selected meshes and enveloping to them.

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 09 September 2013   #1
Lost an old script for adding nulls to selected meshes and enveloping to them.

Howdy guys.

So a long time ago, I had a very short script for adding nulls to every selected mesh in the scene, then it would weight the mesh to those nulls at 100%.

Unfortunately I can't find that script anymore, and the place where I got it from originally is long gone (XSIBase.com)

I was hoping that body knew of a script that did that same thing. I don't mean to sound lazy, if this request is bigger than I remember, or if nobody is able to help me, then I'll relearn XSI scripting. but I (maybe mistakenly) feel like this is something that someone could whip of very quickly, opposed to all the time it'd take me to learn and do it myself.

Any help is appreciated.
 
Old 09 September 2013   #2
Select objects and run (Jscript):


var oSelected = new ActiveXObject("XSI.Collection") ;
oSelected.AddItems(Selection);
for (var i=0;i<oSelected.Count;i++)
{
 var oNull = GetPrim("Null", oSelected(i).name+"_Null", null, null);
 MatchTransform(oNull, oSelected(i), siTrn, null);
 ApplyFlexEnv(oSelected(i)+";"+oNull, null, 2);
}


it matches the null's translation to the object's center, so make sure the object's center is where you want it to be..
__________________
Oz Adi

www.ozadi.com


Last edited by CoolCalb : 09 September 2013 at 03:31 PM.
 
Old 09 September 2013   #3
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 02:57 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.