PDA

View Full Version : Make obj same size?


iceman32
11-02-2009, 09:53 PM
Hello all

I have a script that, after I push a button, generates a box with a specific name (BoxDummy) and that box also has a specific width, heigth and length size, that the script also generates.

After that I need to get a FumeFX grid the same size as the box is (width, heigth and length).

The FumeFX grid is created before the box is generated, and the name of the FumeFX grid is the default FumeFX01.

Can that be done? If so, how? :)

Regards Stefan

denisT
11-02-2009, 10:03 PM
i have no idea what FumeFX grid is but if it has "width, length, and height" propertices and you want to make them the same as the BoxDummy's:

$FumeFX01.width = $BoxDummy.width ... etc.

iceman32
11-03-2009, 08:30 AM
Thanks man, i will try that out :)

Also, if I want to move my current object, in this case my FumeFX Grid, to the BoxDummy location (XYZ), what code shall I use then?

Sometimes the code is more simple than I think, even this but I canīt get it to work as I want... :(

Stefan

SyncViewS
11-03-2009, 10:33 AM
You can set the FumeFX grid transform equal to box transform matrix.

-- to match position, rotation and scale
$FumeFX01.transform = $BoxDummy.transform

-- to match position only
$FumeFX01.position = $BoxDummy.position

-- to match rotation only
$FumeFX01.rotation = $BoxDummy.rotation

-- to match scale only
$FumeFX01.scale = $BoxDummy.scale
- Enrico

CGTalk Moderation
11-03-2009, 10:33 AM
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.