[Closed] addmodifier loses focus
Is there anyway to stop addmodifier losing focus of your stack/subobject selection?
I have a script where I’m working in an editable poly and sometimes need to add a modifer to another object in the scene, but doing so always dumps me out of my subobject selection on the editable poly, and if I have stuff in the stack it puts me at the top of the stack.
At the moment I store the subobject level as a variable and restore it afterwards, just wondering if there was another way.
edit:
I noticed this in the help files:
A limitation of the addModifier() function is that it cannot generally apply modifiers to sub-object selections, and so it disables any current sub-object levels.
So it seems to lazily disable current sub-object level on the selected object even if thats not the object you are applying the modifier to…