sheb
11-03-2005, 10:29 AM
HELLO!
Sorry heres a really small question. Sometimes we get weird things happening to meshes, like scary flickering in the modify panel while collapsing. The only way of getting rid of that seems to be to export the bad meshes and import them again. So I wrote a quick little script to automate it:
fn fixmesh objs =
(
objs = makeobjarray objs
if objs == undefined do return false
for obj in objs do (
local modHolder = (copy obj)
modholder.name = "modholder"
local name = obj.name
for m in obj.modifiers do m.enabled = false
ExportFile "C:\\temp.obj" #noprompt selectedOnly:true
Delete obj
ImportFile "C:\\temp.obj" #noprompt
local o = getnodebyname ("obj"+name)
o.name = name
select o
for m in modholder.modifiers do modPanel.addModToSelection (copy m)
delete modholder
)
)
fixmesh $
The strange thing is that the modifier idea doesnt work, does anybody know why? I tried all kinds of ways of adding them. The result is always the modifer but it doesnt do anything anymore :/. When i copy over the modifier by hand it obvisously works :banghead:
Any ideas?
Thanks already!
sebbbb
Sorry heres a really small question. Sometimes we get weird things happening to meshes, like scary flickering in the modify panel while collapsing. The only way of getting rid of that seems to be to export the bad meshes and import them again. So I wrote a quick little script to automate it:
fn fixmesh objs =
(
objs = makeobjarray objs
if objs == undefined do return false
for obj in objs do (
local modHolder = (copy obj)
modholder.name = "modholder"
local name = obj.name
for m in obj.modifiers do m.enabled = false
ExportFile "C:\\temp.obj" #noprompt selectedOnly:true
Delete obj
ImportFile "C:\\temp.obj" #noprompt
local o = getnodebyname ("obj"+name)
o.name = name
select o
for m in modholder.modifiers do modPanel.addModToSelection (copy m)
delete modholder
)
)
fixmesh $
The strange thing is that the modifier idea doesnt work, does anybody know why? I tried all kinds of ways of adding them. The result is always the modifer but it doesnt do anything anymore :/. When i copy over the modifier by hand it obvisously works :banghead:
Any ideas?
Thanks already!
sebbbb
