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 Tools Search this Thread Display Modes
  09 September 2013
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.
  09 September 2013
Select objects and run (Jscript):

var oSelected = new ActiveXObject("XSI.Collection") ;
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


Last edited by CoolCalb : 09 September 2013 at 03:31 PM.
  09 September 2013
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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
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
Society of Digital Artists

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

All times are GMT. The time now is 12:11 PM.

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