Help with Expression

Date : Mon, 13 Mar 2006 23:31:21 +0100
To : XSI(at)Softimage.COM
From : Christian Götzinger <cg(at)pension-goetzinger.de>
Subject : Help with Expression
Hi List,

I also posted this on XSIBase but seeing as this mailing list is probably the best place to get answers to technical questions, here goes:

I'm in the process of creating several bookshelves filled with books.

I have created one book which I'm going to duplicate off many times. Basically, I've parented that one book to a null and I'm using the null to scale the book up and down. This way I can lateron randomize the sizes of all my books very easily.

Now, what I'd like to do is for XSI to align my books automatically next to each other.
Here's my basic setup:

BookP1 (Null) -> Scale X = 5 -- Scale Y = 25 -- Scale Z = 15
Child: Book1 (which is the actual book)

To test things out I have duplicated the hierarchy to create BookP2 and its child Book2

I have set this _expression_ on BookP2's local position X:
Valid _expression_ : BookP2.kine.local.posx = BookP1.kine.local.posx+BookP1.kine.local.sclx

This works very well. If I scale BookP1 up in X, the second book gets aligned automatically.

Now my question: how can I generalize this _expression_ so that it'll be valid for all books once I've mass duplicated them?

I'm not into scripting or anything, so this may seem like a piece of cake to you

Thanks,
Chris

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.