Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
julienduroure committed Aug 21, 2024
1 parent dfae932 commit 04e1af7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,14 @@ def __gather_mesh(vnode, blender_object, export_settings):
depsgraph = bpy.context.evaluated_depsgraph_get()
blender_mesh_owner = blender_object.evaluated_get(depsgraph)
blender_mesh = blender_mesh_owner.to_mesh(preserve_all_data_layers=True, depsgraph=depsgraph)
# Seems now (from 4.2) the custom properties are copied when evaluate a mesh that will not be changed
# so no need to copy them in that case
# But we need to remove some properties that are not needed
# Seems now (from 4.2) the custom properties are Statically Typed
# so no need to copy them in that case, because overwriting them will crash
if len(blender_mesh.keys()) == 0:
# Copy custom properties
for prop in [p for p in blender_object.data.keys() if p not in BLACK_LIST]:
blender_mesh[prop] = blender_object.data[prop]
else:
# But we need to remove some properties that are not needed
for prop in [p for p in blender_object.data.keys() if p in BLACK_LIST]:
del blender_mesh[prop]

Expand Down

0 comments on commit 04e1af7

Please sign in to comment.