[Closed] command panel refreshing
I am creating wine racking from splines , looping them and aplying a extrude mod to all.
but with very small racks Im getting pretty long flashing command panel ,
Is their a way to turn this off?
example 36″ x 62 ” rack has 240 pieces , im seeing i guess 480 command panel flashes:eek:
look for “Modify Panel can be slow change to Create Panel when possible” and “Command Panels” in maxscript help
You can also use suspendEditing() and resumeEditing() to disable/enable all command panels without switching from the current one.
If your script bombs in the middle, though, you’ll be stuck with disabled panels until you manually enable again.
Heres an example.
utility makepost "post maker"
(
button doit "post" width:150 height:25
on doit pressed do
(
for i = 1 to 60 do
for p = 1 to 2 do
(
myspline20 = splineshape()
addnewspline myspline20
addknot myspline20 1 #corner #curve [0,0,0]
addknot myspline20 1 #corner #curve [0,1.375,0]
addknot myspline20 1 #corner #curve [0.68,1.375,0]
addknot myspline20 1 #corner #curve [0.68,0,0]
myspline20.steps = 0
close myspline20 1
updateshape myspline20
select myspline20
addmod extrude ; $.modifiers[#extrude].amount = 54
$.name = "post_D"
selection.position.x = i * 4
selection.position.y = p * 10
)
)
)
My models frequitly have way more than 200 objects
Operate on the object stored in the variable, NOT on the current selection, unless a specific operation requires the object to be selected and visible in the Modify Panel.
In your case, you should be able to run the loops without ever selecting a single spline (which causes the flash because each time you select something, the command panel has to show it). As mentioned before, use max create mode in the beginning of the script to switch away from the modify panel, or disable it altogether.
AH ha I think I almost got it, thanks everyone.
One more thing I seem to have 14 post in the start position of the loop.:shrug:
for a = 1 to 15-1 do
(
myspline1 = splineshape()
--draw spline and closing--
addnewspline myspline1
addknot myspline1 1 #corner #curve [0,0,0]
addknot myspline1 1 #corner #curve [0,1.375,0]
addknot myspline1 1 #corner #curve [.68,1.375,0]
addknot myspline1 1 #corner #curve [.68,0,0]
--closing spline--
myspline1.steps = 0
close myspline1 1
updateshape myspline1
--name myspline--
myspline1.name = "post"
--adding mod extrude--
addModifier myspline1 (extrude amount:160)
--moving and coping--
myspline1_copy = copy myspline1
myspline1_copy.pos = [a * 5, 0, 0]
)
i got it, i set up my command abit early in the script.
(
myspline1 = splineshape()
--draw spline--
addnewspline myspline1
addknot myspline1 1 #corner #curve [0,0,0]
addknot myspline1 1 #corner #curve [0,1.375,0]
addknot myspline1 1 #corner #curve [.68,1.375,0]
addknot myspline1 1 #corner #curve [.68,0,0]
--closing spline--
myspline1.steps = 0
close myspline1 1
updateshape myspline1
--name spline--
myspline1.name = "post"
--adding mod extrude--
addModifier myspline1 (extrude amount:160 segs:1)
--setup command--
for a = 1 to 15-1 do
(
--moving and coping--
myspline1_copy = copy myspline1
myspline1_copy.pos = [a * 20, 0, 0]
)
)
This makes making mass amount of objects very quick.