PDA

View Full Version : MEL: replacing instance with other instance


deadalvs
01-31-2011, 03:10 PM
hi !

does anyone have some code or input available which would help me with the following task:

given:
5 instances of an object, scattered somewhere in the space, with differenc translation, rotation and scale.

is there a way to replace the base mesh directly, so that all instances are replaced without having to use a loop and replacing all instances the"hard way ?

in Cinema4D, for example, I'd just retarget the instance to an other mesh or group.

any input appreciated !

ginodauri
01-31-2011, 04:18 PM
You can do this with "default" maya , no script required.

Create instancer node , then in your particle shape node there is tab regarding instancing , with all attributes that you need.

In instacer node you can select and replace object to be instanced.

deadalvs
01-31-2011, 04:52 PM
I'm not 100% sure .. I am not working with particles .. just plain instancing of standard objects, such as trees .. does that work the same ?

thanks so far !!

ginodauri
01-31-2011, 07:23 PM
For your problem you should use particles and instancing , read maya docs regarding this.

gmask
01-31-2011, 08:58 PM
For a few static objects using particle instancing is overkill..

You can use the Modify>Replace Objects tool.. although you have to select each object you want to replace at a time.. it could be scripted to do many at one time


You could also reference the object and then when you update the model in the referenced file it will update in the other scene where they have been scattered.

CGTalk Moderation
01-31-2011, 08:58 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.