space928 / Blender-O3D-IO-Public

A plugin supporting blender 2.79.x-3.x.x for importing and exporting OMSI .sco, .cfg, and .o3d files
GNU General Public License v3.0
36 stars 5 forks source link

Adding an option to choose to split objects on import #70

Open Westu7 opened 11 months ago

Westu7 commented 11 months ago

Is your feature request related to a problem? Please describe.

In the current version, objects in the place marked as shade flat after import are split into separate instances.

Describe the solution you'd like

Have an option added during import in what form the refractions should appear on the object. Whether they should be separated into separate instances or become a single solid object with shade flat markings on the edges.

space928 commented 10 months ago

I've had a think about this while I was working on fixing normal importing/exporting. This should be feasible, but it would basically amount to running the bpy.ops.mesh.remove_doubles() command (Merge vertices by distance) as the information for which faces are connected to which other faces simply doesn't exist in the o3d if they don't have smooth shading. I'll have to look into seeing how this can be done efficiently (calling bpy.ops.mesh.remove_doubles() in python has some inefficiencies and implementing the algorithm entirely in python could be slow)