Pherakki / BlenderToolsForGFS

A Blender plugin for importing and exporting GFS files.
GNU General Public License v3.0
22 stars 3 forks source link

External OBJECT model loading #158

Open ShrineFox opened 2 months ago

ShrineFox commented 2 months ago

Provide details on the proposal. .GFS models in the BASE.CPK\MODEL\FIELD_TEX folder, used for map geometry, have bones that serve as spawn points for object models (from the FIELD_TEX\OBJECT folder). For example, in F003_002_0.GFS (Leblanc) there is a bone named m003_019(・エ・カ繧オ繝シ繝峨い繧、) that has the following property strings: fldLayoutOfModel_major = 3 and fldLayoutOfModel_minor = 19. In-game, this would cause M003_019.GMD to be loaded from the OBJECT folder, copying the translations of the bone.
I propose a feature that will allow you to import the object GMDs automatically when you import the map GFS, and copy the transforms of the bone. Since these models are only representational, maybe they can be put in a separate collection and bone constraints can be used to pair them with the bones. That way you can export the map without accidentally also exporting the object models. This will also enable users to reposition objects by transforming the bones.

Is your feature request related to a problem? Please describe. Currently, the only way to preview object models reliably would be to import them one at a time onto the scene and manually transfer the positional data from the bone to the object. Being able to view and manipulate them directly in Blender would solve a lot of inefficiency when it comes to editing maps.

Additional context Below is a screenshot of the bone selected in the Blender scene and the relevant property strings visible. image