UuuNyaa / blender_mmd_tools

MMD Tools is a blender addon for importing/exporting Models and Motions of MikuMikuDance.
GNU General Public License v3.0
1.91k stars 91 forks source link

MMD model type conversion #142

Open rgxa opened 2 months ago

rgxa commented 2 months ago

When converting an MMD model using the Convert Model button under the Model Production panel, it would probably usually be desirable if the user did not manually have to add the MMD model root object to the collection the rest of the objects are in. However, currently the operator does not search for the collection the model being converted is a part of, and instead simply adds it to the root collection of the active scene.

I've never done this before, but as a simple solution I'd propose searching bpy.data.collections(or the active scene's root collection and its children recursively) for a collection that contains the active object, and adding the new MMD model to the collection.

I'm going to write it myself and push a solution, but I'd appreciate feedback on it, critical or not. I will keep it as simple as possible since it is my first time. In case the feature is not desired, I'll add an option for it in the conversion operator.

UuuNyaa commented 2 months ago

@rgxa Thank you for the feature suggestion 😀

Blender's general operators add new objects to the currently selected collection. So adding new objects to a collection that contains the target object to be converted can confuse users.

Any way, it is better to make a decision based on user comfort after developing the feature.