Editing many models' motion properties
I'm trying to import a lot of very large custom models, each of which have hundreds of sub-models. When I spawn a model by dragging it into the editor or by spawning it at runtime with a script, all of the sub-models are static by default (motion set to None). I need all the sub-models to be non-static (motion set to Animated) so that the rest of my scripts can finish setting them up and later animate them during gameplay. Is there any good way to accomplish this right now?
Things I've tried:
- Dragging the models into the world and editing them with the Hierarchy and Properties windows has two problems. First, when I spawn a model by dragging it into the world, about 20% of the submodels are randomly offset from the their correct positions. This is nondeterministic, different submodels are affected every time. Fixing each submodel is not practical when there would be a total of thousands of errors. Second, while I can multiselect all the submodels and set their Motion properties all to Animated at once, this action doesn't reliably affect all the submodels, but a fraction of them are unaffected. I again can't edit all the submodels one at a time since there are thousands of them.
- Spawning the models at runtime with a script makes them static by default. I can't find any APIs to spawn a model as Animated or to change its motion at runtime. Does any API to do this exist?