Notifications
Clear all

[Closed] Scripted Modifier method problem

I am presently writing a scripted modifier plugin that I want to use a number Edit Poly / Editable Poly functions. It’s setup to replace the UI and of course, the original modifier is accessible via the delegate property.

I have 2 problems that seem to be caused by this being nested:

[ul]
[li]Edit_poly functions are so UI intensive that they slow down my script[/li][/ul]
[ul]
[li]Some functions simply don’t work … because their UI has been replaced[/li][/ul]Last night, exasperated, I gave in and installed the SDK for the first time, thinking to follow Bobo’s advice from some obscure thread on here; and to create a C++ modifier plugin shell which exposes the properties I will need to modify so that Maxscript can handle them properly.

I am however at best a reasonable scripter and certainly not familiar with C++ so this will be a major endeavour.

To get around my problem all I need to be able to do is operate on a stand in or snapshot of my mesh / poly. Is there any method to do this with maxscript?

5 Replies
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

it depends on what you want to do…

I feel like what I want to achieve is pretty basic … as it can be achieved in an EPoly modifier via maxscript:

[ul]
[li]Material IDs[/li][/ul]
[ul]
[li]Vert positions[/li][/ul]

It seems like the primary reason I’m blocked out of at least material ID’s is that replacing the UI disables sub object selections.

Optional extras for later:

[ul]
[li]UV coordinates[/li][/ul]
[ul]
[li]Vert colours[/li][/ul]

Ideally I want to be able to modify these via a mesh or editable_poly interface for the sake of speed, since I want to do some of these things when updating UI. From previous experience, setting a buttonop, selecting sub objects and committing is not performance friendly.

does it have to be only one modifier? maybe it will be easier to make three scripted modifiers extending an appropriate one for every task?

It would be ideal if they could be on the one modifier.

Basically think of the task this way:

Face array is controlled by 4 separate spinners (Left, right, up, down).
Each time the spinners are changed, the material ID’s of the face array are changed.

If I had a group of modifiers doing this I would have to delete and recreate a modifier on top of the stack, which would be quite bad for performance.

Any ideas?

I’m going to keep on poking tonight to try and figure out how to make these changes without using the SDK.

I just wish it was as easy as substituting the object data for a snapshot of some kind.