niacdoial / blemd

BMD importer for blender (BDL format also partially supported)
GNU General Public License v3.0
32 stars 13 forks source link

Support submeshes #47

Open edbefee3-3888-462a-9411-741b7e9eb54e opened 2 years ago

edbefee3-3888-462a-9411-741b7e9eb54e commented 2 years ago

title should be self explanatory.

niacdoial commented 2 years ago

…Sorry, it's not. What do you mean by submeshes ? Do you mean that some bmd/bdl files contain more geometry than what is successfully imported ?

edbefee3-3888-462a-9411-741b7e9eb54e commented 2 years ago

basically, have different parts be separate objects. usually, for BMD/BDL files it seems to be split by material, so that shouldn't be too hard to implement

niacdoial commented 2 years ago

possibly, but there isn't any meaningful information to add (the names for the textures, the materials and the bones are present in the bmd file itself, and there aren't any other names) plus, this would create a lot of overhead when mixing this separation with everything needed to make animations work. wouldn't the p shortcut within blender's mesh edit mode contain exactly what you want anyway ? (split mesh/by material) if you still want to split the mesh into BMD's "batch" structure, I could edit the "DEBUG vertex groups" option to help you select individual batches (but not individual packets/primitives) and split them apart.

edbefee3-3888-462a-9411-741b7e9eb54e commented 2 years ago

bpy.ops.mesh.separate(type='MATERIAL')

niacdoial commented 2 years ago

the problem with doing that is that it wouldn't add anything for the user (I'm not going to make this the default behavior, so the user would still have to tick a checkbox when importing, which is about the same effort as two/three clicks/keyboard shortcuts afterwards).

And, on my side, it would just make more options when importing, and I would still need to make sure that options don't break each other, so more time I can't spend making actual improvements.

edbefee3-3888-462a-9411-741b7e9eb54e commented 2 years ago

it helps with things that have meshes that are on top of (or overlapping) another mesh

niacdoial commented 2 years ago

no? You just need to go into edit mode, select everything at once, (shortcut: a), and then ask blender to neatly split this into a bunch of objects (shortcut: p, then select "split per material"). No help needed.

edbefee3-3888-462a-9411-741b7e9eb54e commented 2 years ago

51

edbefee3-3888-462a-9411-741b7e9eb54e commented 2 years ago

should i make a PR with it? btw i couldn't get it as an option because it would either not register it (if i didn't add it to ALL_PARAMS), or give me an error (if i did)

niacdoial commented 2 years ago

can I close this?