Notifications
Clear all

[Closed] PickObject in a Scripted Plug-in mouse Tool Clause

One stupid (?) question…
To avoid making all a ‘SimpleObject’ plugin in the SDK way (descriptor, UI, beginedit, …) I have thought about the possibility of:

  • mantain the plugin as mxs
  • rewrite just the ‘on buildmesh’ event, where all the hardwork of updating the mesh is done.

So I have tryed to send the baseObject we are creating to the C# method, get its mesh and update it. I haven’t get it to work, as I think the mesh I get is not the one I should (sadly, a mesh has no handleByAnim)

Then, that’s what I’ve done and it seems to work, but I would like to know your opinion about possible objections/inconveniences:

  • When loading definition of the plugin in mxs (or on loading of a new scene), create an empty EditableMesh (through SDK) and keep its ‘handleByAnim”.
  • In the ‘on buildmesh’ event, call the C# method that creates the modifyed mesh on this fixed EditableMesh.
  • As result, copy this new mesh to the ‘mesh’ of our plugin object (just before the end of the event).
  • free the fixed mesh

By now, I haven’t found any incovenience, saving, loading, creating copies, references or instances and works really fast.
What do you think about?

this is what i do and i’m sure this is the most productive (and protected) way of development

2 Replies
(@aaandres)
Joined: 1 year ago

Posts: 0

But do you get the real mesh or do you do a similar trick?

(@denist)
Joined: 1 year ago

Posts: 0

i work with real mesh. because i use c++ sdk

… and not mesh only. i do the same for spline shapes, controllers, modifiers, etc. finally it’s very close to how MCG resulting code looks like

Maxscript code updated.
http://www.proin3d.org/pathscripts/DOWNLOAD/HSigning/H_Signing_V100.ms

EDIT: sorry, there was an error in the previous version. Updated to new version.

Page 2 / 2