Im looking for a script where i can sellect all objects in my scene by material and then join them into a single object. any one scripting these tasks?
, so most likely it wont work in max9.
To be more accurate the method "appendIfUnique" is apparently not available until version 2009, so with the code like it is right now you wont have much luck.
Have you searched for other scripts that do the same but written for older version requirements?
I cant help right away with the maxscript without knowing what to do and what to aim for at that spot - it would eat time to figure out.
Understandable renderhjs, I didnt expect someone to write the script for me. im already using your textools, so thank you for that! I just hoped someone was already doing this mesh selection by material and could point me out.
Thanks for your time, and explanation, now I know why it doesnt work which helps me keep a smile during my now tedius task of attaching objects manually by material.
This shouldn't be that hard. Standard in max, open the mat editor, right click on the material that's shared by the objects you want to attach and choose 'select by material'. Save to a selection set if needed and attach as one object.
Niel Blevins / SoulBurn scripts has a quick script to attach selected.
got you a quick fix (I had to fix a very similar situation myself today because I use max9 atm. and I needed a workaround for appendIfUnique for my texTools),
so replace
appendIfUnique mtl i.material
with
local exists = false;
for m in mtl do(
if (m == i.material)then(
exists = true;
exit;--exit the loop
)
)
if (exists == false)then(
append mtl i.material;
)
it does the same with a little bit more code, but perhaps you solved matters already on your own
Replies
http://scriptspot.com/3ds-max/selectobjectsbymaterial
http://scriptspot.com/3ds-max/attach-mesh-by-material
http://scriptspot.com/3ds-max/attach-mesh-by-material
says: , so most likely it wont work in max9.
To be more accurate the method "appendIfUnique" is apparently not available until version 2009, so with the code like it is right now you wont have much luck.
Have you searched for other scripts that do the same but written for older version requirements?
I cant help right away with the maxscript without knowing what to do and what to aim for at that spot - it would eat time to figure out.
Thanks for your time, and explanation, now I know why it doesnt work which helps me keep a smile during my now tedius task of attaching objects manually by material.
Niel Blevins / SoulBurn scripts has a quick script to attach selected.
Good luck.
-Tyler
:poly121:
thank you sir!
so replace with it does the same with a little bit more code, but perhaps you solved matters already on your own