rollout unnamedRollout "Untitled" 160 height:194
(
label lbl1 "删除不用修改器" pos:[32,17] 104 height:24
dropdownList ddl1 "DropDownList" pos:[34,59] 82 height:41 items:#("", "优化", "UVW贴图", "涡轮平滑")
button btn1 "删除修改器" pos:[33,129] 91 height:23
on ddl1 selected sel do
(
global modi_var
if ddl1.selected=="优化" do modi_var=optimize
if ddl1.selected=="UVW贴图" do modi_var=uvwmap
if ddl1.selected=="涡轮平滑" do modi_var=turbosmooth
)
on btn1 pressed do
(
objsel=#()
objnum = objects.count
--选择场景中有修改器的对象
for i=1 to objnum do
(
if objects[i].modifiers.count != 0 do append objsel objects[i]
)
select objsel
--------------------------------------------------------------------------------
--选择场景中有turbosmooth修改器的turbosmooth
modsel = #()
for u=1 to objsel.count do
(
for o=1 to objsel[u].modifiers.count do
(
if classof objsel[u].modifiers[o] == modi_var and finditem modsel objsel[u]==0 do append modsel objsel[u]
)
select modsel
)
--删除场景中有turbosmooth修改器的对象的turbosmooth
for j=1 to modsel.count do
(
for t=1 to (modsel[j].modifiers.count) do
(
if classof modsel[j].modifiers[t] == modi_var then deletemodifier modsel[j] t
if classof modsel[j].modifiers[1] == modi_var then deletemodifier modsel[j] 1
)
)
rollout unnamedRollout "Untitled" 162 height:300
(
)
--------------------------------------------------------------------------------
--选择场景中有uvwmap修改器的对象
modsel = #()
for u=1 to objsel.count do
(
for o=1 to objsel[u].modifiers.count do
(
if classof objsel[u].modifiers[o] == modi_var and finditem modsel objsel[u]==0 do append modsel objsel[u]
)
select modsel
)
--删除场景中有uvwmap对象的uvwmap
for j=1 to modsel.count do
(
for t=1 to (modsel[j].modifiers.count) do
(
if classof modsel[j].modifiers[t] == modi_var then deletemodifier modsel[j] t
if classof modsel[j].modifiers[1] == modi_var then deletemodifier modsel[j] 1
)
)
--------------------------------------------------------------------------------
--选择场景中有optimize修改器的对象
modsel = #()
for u=1 to objsel.count do
(
for o=1 to objsel[u].modifiers.count do
(
if classof objsel[u].modifiers[o] == modi_var and finditem modsel objsel[u]==0 do append modsel objsel[u]
)
select modsel
)
--删除场景中有optimize对象的optimize
for j=1 to modsel.count do
(
for t=1 to (modsel[j].modifiers.count) do
(
if classof modsel[j].modifiers[t] == modi_var then deletemodifier modsel[j] t
if classof modsel[j].modifiers[1] == modi_var then deletemodifier modsel[j] 1
)
)
)
)
createdialog unnamedRollout