Add and delete modifier
Hi,
I'm trying to make my first script. The script is very simple, some buttons to do repetitive operations, no complicated things.
I have some problem with addModifier and deleteModifier methods.
This is my code's piece:
on btn5_Delete pressed do
(
deleteModifier btn_pickObj.object ProOptimizer
messagebox "Modifier Deleted" title: "High Poly"
)
when I press my button I receive this error:
Unable to convert:ProOptimizer to type:Modifier
I have read the maxscript help guide where deletemodifier and addmodifier method are explained:
deleteModifier -- mapped
I tried to use index instead of modifier and it works!! but I want specify only my ProOptimizer modifier.
Where is the error? I'm going crazy.
I'm a maxscript's newbie so thank for patience:-)
Attachment | Size |
---|---|
maxscriptproblem.jpg | 234.81 KB |
Comments
...
First of all on this forum you can find many tool that can use as reference.
I wrote one of this http://www.scriptspot.com/3ds-max/scripts/delete-modifiers
But if you looking more efficient methods see this thread:
http://forums.cgsociety.org/showthread.php?f=98&t=1138877&highlight=dele...
bga
Thanks a lot barigazy! I
Thanks a lot barigazy! I solved partially the problem, with addModifier there is no problem, all is ok! but with deleteModifier I have still errors!!
Thanks for patience
.
Raed this: Delete modifier by name
Tools and Scripts for Autodesk 3dsMax
...
Post you code here and I will try to solve your problem.
bga
Thanks again! The script is
Thanks again!
The script is very simple:
-pick geometry
-apply and analyze the object with proOptimizer
-and delete the modifier
all buttons are based on pickbutton object so if there isn't any object it return some errors.I'll fixed later this problems.
For now I want solve the delete problem
this is my code
.
Branko will solve your problem, but did you read my pverious post?
Tools and Scripts for Autodesk 3dsMax
...
Hey friend. :) How are you?
I already post link for the tool. Anyway I will post solution later.
bga
...
I don't have time to test this
bga
Thank's, all work!! I'm
Thank's, all work!! I'm analyzing your script since 3 days and some things are clear and others unclear.
What really I don't understand and what I'm doing wrong with deleteModifier method??
and why your script works with deleteModifier?
Sorry I'm a pain in the ass but this driving me crazy!!