Re: run commands from custom PPG regardless of model name

Date : Thu, 02 Nov 2006 11:28:16 -0500
To : XSI(at)Softimage.COM
From : Kris Rivel <kris(at)krisrivel.com>
Subject : Re: run commands from custom PPG regardless of model name
Sweet!  Thanks again!

Kris

guillaume laforge wrote:
Better like this ...

var oModels = Model1.Findchildren("", siModelType,"",false);
if(oModels.count>0)
{
   var Model2 = oModels.item(0);
   InspectObj( Model2+".Your Custom PSet Name" );
}

On 11/2/06, guillaume laforge < guillaume.laforge.3d(at)gmail.com> wrote:
> I want inspect a ppg that lies under Model2 by a button in Model1's PPG.

If your are sure you want the first model under Model1 you could try something like this :

var oModels = Model1.Findchildren("", siModelType,"",false);
if(oModels.count>0)
var Model2 = oModels.item(0);
InspectObj( Model2+".Your Custom PSet Name" );

Cheers

Guillaume



On 11/2/06, Kris Rivel <kris(at)krisrivel.com > wrote:
Ok, one more....how would I inspect a ppg that lies under a model within another model which is being inspected by a ppg under the parent model.  Make sense?  So in other words:

>Model1
    >PPG1
    >Model2
       >PPG2

I want inspect a ppg that lies under Model2 by a button in Model1's PPG.

Kris



Kris Rivel wrote:
Awesome, thanks guys!

Kris

guillaume laforge wrote:
Hi Kris,

For a self installing pluggin I use something like this :
  
var oCustomProperty = PPG.Inspected.Item(0);
var oModel = oCustomProperty.owners.item(0);

Then your command or function with oModel here.

Cheers


--
Guillaume Laforge
freelance TD | cg Artist
my blog ! http://vol2blog.blogspot.com/

On 11/1/06, Kris Rivel < kris(at)krisrivel.com> wrote:
What is the proper syntax in Jscript to run commands within a custom PPG
under a model so that they still function if the model name changes?  I
guess I'm looking for something like "ActiveSceneRoot" but for the
active model or whatever model the PPG is under.

Kris

---
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.