[Script] Checking for reference models

Date : Thu, 22 Jun 2006 09:40:36 -0400
To : <XSI(at)Softimage.COM>
From : "Robert Moodie" <robertm(at)hybride.com>
Subject : [Script] Checking for reference models
Thanks for the props, Bernard.

To be honest I haven't found a better way yet - NestedObjects now exposes more but I still use this.
(It's not that slow ;-)



----- Original Message ----- From: "Bernard Lebel" <3dbernard(at)gmail.com>
To: <XSI(at)Softimage.COM>
Sent: Wednesday, June 21, 2006 9:49 PM
Subject: Re: Why prefix reference models?



Thanks to Robert Moodie for this long time ago trick, that I still use
once in a while:


// Get selected model var oModel = selection(0);

// Check if it is a ref model
if( getvalue( oModel + ".referenced_model" ) == true )
{
logmessage( "referenced" );
}
else
{
logmessage( "not referenced" );
}


Not the fastest code, but it works reliably.


Cheers Bernard



On 6/21/06, Scott Lange <slange(at)omation.com> wrote:


I have seen A friend at work have trouble deciphering if a model is
referenced or not in jscript. I would guess this might be a quick fix for
such a problem.

Scott Lange
www.barnyardmovie.com
www.steelronin.com
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi




--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.