[Closed] Add modifier without the modifier being selected?
Is there a way I can add a modifer on a selected object without the modifier being selected?
Also is there a way to shut it off at creation?
I’m trying to add a turboSmooth on an editable poly.
Right now I add it and then I move back to the baseobject and the modifier off.
tObject=$
addModifier tObject (meshsmooth iterations:0 name:“PolySpeed_MeshSmooth”
tObject.modifiers[#PolySpeed_MeshSmooth].enabled=off
modPanel.setCurrentObject tObject.baseObject
showEndResult =true
This method above is very bad because:
- the modify panel will flicker alot since i have to move up and down in the modify panel and this is a cpu intense operation.
- i would like to have it off, since when it’s on at start it has to calculate the modifier one time this takes time, and often i want to calculate the meshsmooth later instead.
/Andreas
I’m not sure if this is even possible, but I can’t test it myself right now:
with redraw off
(
tObject=$
addModifier tObject (meshsmooth iterations:0 name:“PolySpeed_MeshSmooth” enabled:false)
– tObject.modifiers[#PolySpeed_MeshSmooth].enabled=off
modPanel.setCurrentObject tObject.baseObject
showEndResult =true
)
- Martijn
hiya, no it doesn’t seem to work
it doesn’t work with the enabled:false either, which is a shame.
There are some new features to put the modify panel in suspended mode in max7 but i haven’t gotten them to work yet
Mmmm, irritating and very problematic
/Andreas
suspendEditing()
–do some stuff here…
resumeEditing()
For example:
Compare
(
max modify mode
b = Box()
select b
sleep 1
suspendEditing()
for i = 1 to 100 do
addModifier b (Bend())
resumeEditing()
)
and
(
max modify mode
b = Box()
select b
sleep 1
for i = 1 to 100 do
addModifier b (Bend())
)
Very cool Bobo. I have experimented with it alot and found some problems.
It works great for your example, howeer I seldom need to add 100 modifiers, most of the time I only add 1 modifier, and with the suspendEdit you still have to update at least twice. In reality it’s often more.
On my objects i have to do 4 updates since the suspendEditing() jumps out of subobject mode.
So the 4 updates are now:
- shut down editing
… do stuff that is invisible - turn on editing, now it jumps to the top modifier, very irritating.
- jump back to base object
- jump to subobjectLevel.
Is there any way to skip any of the 4 steps above. Perhaps it’s possible to jump to the baseobject sublevel at once. I haven’t found a way for this. Or even better if it didn’t jump to the top object when a modifier is added. this would be VERY handy if it didn’t happen.
Any tips are always welcome
/Andreas