zortech
05-06-2007, 09:42 PM
Hi,
i'm currently working on a slight script to convert the current selection of objects into instances/references/copies of a previously selecet object. (I know that am not the first who's doing this) Now my problem is...earlier instanced geometry is also effected by beeing replaced with new geometry... is there a way to avoid this?
Edit: I'd try to make the selected objects unique first...if that works quickly. I've found the "i.MakeObjectsUnique" command by searching the forums. But it results in
-- Unknown property: "MakeObjectsUnique"
on pbtn_source picked obj do
(
pbtn_source.text = obj.name
obj_source = obj
)
a simple pickbutton to get the "source" or "master" object for further instancing...there's another button to call "replaceObj"
function replaceObj i_mode =
(
for i in selection do
(
if i_mode == 1 do
(
instanceReplace i obj_source
i.wirecolor = obj_source.wirecolor
)
if i_mode == 2 do
(
referenceReplace i obj_source
i.wirecolor = obj_source.wirecolor
)
)
clearSelection()
pbtn_source.text = "Select"
)
I've just started to work with MaxScript so please be patient. ^^
i'm currently working on a slight script to convert the current selection of objects into instances/references/copies of a previously selecet object. (I know that am not the first who's doing this) Now my problem is...earlier instanced geometry is also effected by beeing replaced with new geometry... is there a way to avoid this?
Edit: I'd try to make the selected objects unique first...if that works quickly. I've found the "i.MakeObjectsUnique" command by searching the forums. But it results in
-- Unknown property: "MakeObjectsUnique"
on pbtn_source picked obj do
(
pbtn_source.text = obj.name
obj_source = obj
)
a simple pickbutton to get the "source" or "master" object for further instancing...there's another button to call "replaceObj"
function replaceObj i_mode =
(
for i in selection do
(
if i_mode == 1 do
(
instanceReplace i obj_source
i.wirecolor = obj_source.wirecolor
)
if i_mode == 2 do
(
referenceReplace i obj_source
i.wirecolor = obj_source.wirecolor
)
)
clearSelection()
pbtn_source.text = "Select"
)
I've just started to work with MaxScript so please be patient. ^^
