Notifications
Clear all

[Closed] Displace Mesh WSM properties

 mef

Hi there.
I’m having, what I’m assuming to be a simple problem that I hope someone has the answer to.
I’ve applied a Displace Mesh WSM to my object. The problem is that I would like the “Custom Settings” check box to come in already checked. I tried getting the properties for the modifier, but it returns “false” in the output window.
So I try to set it to true by first using:

selObj.modifiers[#Displace_Mesh_Binding] = true

and then using:

selObj.modifiers[#Displace_Mesh_Binding]: true

Both return errors.
Then I go into the help and it says “There are no additional properties for Displace_Mesh.”
So again, the question is, how do I get the “Custom Settings” check box to come in already checked?

Thanks.

Marc

4 Replies

I would say, Save out a file with the modifier applied and setup as needed, use maxscript to temporaily xref/merge it in the object with the modifier, store the modifier as a vatiable, delete the xref/merge object, then assign the variable to an object using addmodifier. For Example:

obj_list = getmaxfileobjectnames "somefile.max" [i]--get list of objects in file to be merged[/i]
   mergeMaxFile "somefile.max" obj_list #select [i]--merge object in scene and select it[/i]
   disp_mod = $.modifiers[#Displace_Mesh_Binding] [i]--store an instance of the modifier[/i]
   delete $ [i]--delete the merged object[/i]
   addmodifiers otherObj disp_mod [i]--add the modifier to another object[/i]

I hope that makes sense and gives you an idea of how to approach it.

-Eric

 mef

Thanks PiXeL_MoNKeY. It makes sense but, My God!, all that just to have a button checked.
This tool I’m making is supposed to be something quick, small and self contained. I’ve got everything else covered except that. Is there another way or is this the only option?

mef

You could distribute it as a .mzp and include the Max file in it. Then you could also control where the file is placed, so you know where to load it from. If you disable redraw during the execution of the code you may be able to hide what is really going on from the end user. I am affraid this is probably the only way since there is no Maxscript access provided with the plugin.

-Eric

 mef

Thanks again.

Marc