View Full Version : plugin mesh Grief

08 August 2007, 06:01 PM
Hi Guys,

I am trying to create a pluggin the instance of which can appear as a mesh in your scene. So when you click on the mesh I have special pluggin options. The main option I want is to be able to switch the mesh to one of a number of different objects (for examples switching between types of bushes). So if one clicks on the mesh there is a drop down list, you can select a different bush, and the mesh changes to that bush.

I thought to do this by using the mesh variable in the simpleobject plug in, and then merge in objects, grab the mesh and apply it to the mesh variable of simpleobject plugin instance, thus changing the mesh.

However in the help it says not to create scene nodes through the simple object pluggin, there is also the problem of having a create tool, which I dont want since the plug in instance is generated from a script, and not by the user. (Also I would like to be able to add modifiers, which it also warns against..)

A work around would be to have a helper plugin that merges in an object moves it to the helpers location (transform) and then acts as a parent, so if you move the helper plugin instance then the mesh moves with it, you can then simply change the mesh with new merging options on the helper plugin. The trouble with this is that there are 2 objects, which can be confusing for the user, since the helper plugin and the mesh will be separate objects with their own options. With the simpleobject plugin the whole thing is wrapped up nicely in one mesh that can then be switched..... although there are all the other associated problems listed above.

Bottom line is can I use something like the mesh variable, but in a form where I can switch things as described above. If there are any completely different alternatives, then please fill me in. I am all ears and this is turning into a real hassle!!

Thanks for your time everyone :)


08 August 2007, 03:27 PM
I assume your wanting to do this with the SDK, and not MaxScript?

It seems to me to be a lot of work for just having a smart object that changes it's goemetry.

A simple way to acheive the same effect is to have an editable mesh object, and on the stack different EditMesh modifiers. Each one holding the geometry you want. Then just enable/disable via MaxScript the modifier you want active.

To implement this as a SDK plug-in. Have a look at the primative geometry plug-ins that come as a free sample with the SDK. "gsphere" is the one that comes to mind.

08 August 2007, 06:45 PM
You are absolutely right, that is much easier way of tackling things! I was really heading down the wrong path that time. Ive done a few tests, and they have gone very smoothly.

I hate to think how many hours I could have wasted if I had pressed on with my initial idea!

Thank again :)


CGTalk Moderation
08 August 2007, 06:45 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.