[Closed] change subobjectLevel from 4 to 1
Hi,
I have a bunch of object which their subobjectLevel is set to 4 and I would like to set them back to editable poly.
I have try this before and fail and I am failing again. there is something I don’t get in how to access the subobject level in a for loop I make it work only if I hard code
Could someone explain me what I am doing wrong.
allObjects =select $Rib_*
sel= selection as array
print sel
listed = sort(for i in sel collect i.name)
print listed
for OBJ in listed do(
–print OBJ
max modify mode
modPanel.setCurrentObject OBJ
subobjectLevel =0
)
Thanks
Florence
You can access the base by using the $.baseObject method.
This will bypass any modifiers, and go to the bottom of the stack, without using mod panel commands.
Although, do you mean you want to set the SO level on multiple objects at once? You can only set it when the mod panel is open/and per object I think.
So something like,
if classof $.baseObject == Editable_Poly do subObjectLevel = 1
If all your models are Editable Poly with no modifiers and you don’t mind re-converting them to Poly then this should be the fastest way
to set all the subobjectlevel to 0:
convertToPoly selection
If you want to iterate over the objects, then you can do itas follow (slower):
(
max modify mode
for j in selection as array do
(
select j
subobjectlevel = 0
)
)