Fix T103949: FBX Exporter: Most loose edges export as one connected polygon
FBX exporter with the Loose Edges option enabled would add only half of the required polygon loop start indices, causing about half of the exported loose edges to be exported as one large polygon. This patch doubles the number of loop start indices added for loose edges so that each loose edge gets its own polygon. --- One 2-sided polygon is added per loose edge. Two loops are added for each 2-sided polygon, so each subsequent loop start index added will be 2 greater than the previous, hence the 'step' of 2 in the `range`. But the 'step' of 2 effectively halves the number of values output by the `range`, so the difference between the 'start' and 'end' of the `range` (the number of loose edges or `len(t_le)`) has to be doubled to accommodate, which is what this patch does. Reviewed By: mont29 Maniphest Tasks: T103946 Differential Revision: https://developer.blender.org/D17054
This commit is contained in:
parent
bb45dff65a
commit
a8ffea50ed
Notes:
blender-bot
2023-02-14 18:10:34 +01:00
Referenced by issue #103949, FBX Importer/Exporter: Edge creases missing when re-importing some exported meshes Referenced by issue #103946, FBX Exporter: Most loose edges export as one connected polygon
|
@ -902,7 +902,7 @@ def fbx_data_mesh_elements(root, me_obj, scene_data, done_meshes):
|
|||
if scene_data.settings.use_mesh_edges:
|
||||
t_le = tuple(e.vertices for e in me.edges if e.is_loose)
|
||||
t_pvi.extend(chain(*t_le))
|
||||
t_ls.extend(range(loop_nbr, loop_nbr + len(t_le), 2))
|
||||
t_ls.extend(range(loop_nbr, loop_nbr + len(t_le) * 2, 2))
|
||||
del t_le
|
||||
|
||||
# Edges...
|
||||
|
|
Loading…
Reference in New Issue