subobject level = performance killer?
hi all,
need some help with a current script i am writing:
all the time when it comes to subobjectlevel operations i have problems with huge performance issues. i know my scripting skills are less professional but maybe someone can point me into the right direction.
here the part of my script that makes the problems:
for c in chamferObjs do ( addModifier c (Edit_Poly name:"EditPoly_customChamfer") clearSelection() select c subobjectLevel = 2 objEdges = $.modifiers["EditPoly_customChamfer"].GetNumEdges() $.modifiers["EditPoly_customChamfer"].Select #Edge #{1..objEdges} $.modifiers["EditPoly_customChamfer"].SetOperation #ChamferEdge $.modifiers["EditPoly_customChamfer"].chamferEdgeAmount = chamAmount $.modifiers["EditPoly_customChamfer"].edgeChamferSegments = chamSegs $.modifiers["EditPoly_customChamfer"].chamferEdgeOpen = chamOpen $.modifiers["EditPoly_customChamfer"].Commit () subobjectLevel = 0 ) -- end for
i think the problem occurs as soon as i get into object selection mode that causes max to show what is going on and refreshing max/scene takes much longer. but without selecting each object i can not get my modifications done.
attached you find the whole script if it might help to understand what the script is used to do.
thanks in advance
-le1se
Attachment | Size |
---|---|
ms_masschamfer02.ms | 3.51 KB |
Comments
try to NOT be in the modifer
try to NOT be in the modifer tab, "activate" the "max create mode"
you might have to use a diffrent method of setting the vals and evaluating them but it will be faster.
Raphael Steves
Hi! Check maxscript reference
Hi!
Check maxscript reference for "Refreshing the viewports" .
And try this:
for c in chamferObjs do with redraw off (
Also use this code to see the time
...
on btnChamfer pressed do
(
s = timestamp()
fnChamferObjs()
end = timestamp()
format "time: %\n" ((end - s)/1000.0)
) --end on
on btnChamferUndo pressed do
(
fnChamferObjsUndo()
) --end on
) -- end rollout
-- clearListener()
createdialog massChamfer
Tools and Scripts for Autodesk 3dsMax