PDA

View Full Version : Scripting (Parenting)


goosh
04-18-2003, 12:12 AM
Hi all

I want to do what I would consider a simple task and XSI is driving me crazy.

What I want to do is (in VB scripting I guess) parent one object to another.
Now these objects belong to a Model, (and I don't know the name of the model (because this will be aplied to a lot of different files and the Model name changes from file to file))

I wish I could do:
ParentObj "*.chest", "*.Cube"

but it doesn't let me..

In the end I got it working with:
SelectObj "*.chest"
Set oReturn = GetValue("SelectionList")
For Each r In oReturn
Set theChest = r
Next

SelectObj "*.Cube"
Set oReturn2 = GetValue("SelectionList")
For Each r2 In oReturn2
Set theCube = r2
Next

ParentObj theChest, theCube

But it seems crazy to do all that for such a simple thing.

What would be the right way to go about doing this?

I also would like to assign to a variable my selection. Like:
theChest = SelectObj "*.chest"
but ofcourse I can't do that... :( :( :(
What would the right format to do this be?

Help!!

Thanks

Goosh

CGTalk Moderation
01-14-2006, 10:00 PM
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.