Fix: Broken Dependency Graph Python API example
Fix blender/blender-manual#104712 Pull Request: https://projects.blender.org/blender/blender/pulls/122563
This commit is contained in:
parent
9a89bd4396
commit
a04d0b932f
@ -30,7 +30,8 @@ class OBJECT_OT_simple_exporter(bpy.types.Operator):
|
|||||||
continue
|
continue
|
||||||
print(f"Exporting mesh with {len(mesh.vertices)} vertices "
|
print(f"Exporting mesh with {len(mesh.vertices)} vertices "
|
||||||
f"at {object_instance.matrix_world}")
|
f"at {object_instance.matrix_world}")
|
||||||
object_instace.to_mesh_clear()
|
|
||||||
|
self.clear_mesh_for_object_instance(object_instance)
|
||||||
|
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
@ -47,6 +48,12 @@ class OBJECT_OT_simple_exporter(bpy.types.Operator):
|
|||||||
return object_instance.object.to_mesh()
|
return object_instance.object.to_mesh()
|
||||||
else:
|
else:
|
||||||
return object_instance.object.original.to_mesh()
|
return object_instance.object.original.to_mesh()
|
||||||
|
|
||||||
|
def clear_mesh_for_object_instance(self, object_instance):
|
||||||
|
if self.apply_modifiers:
|
||||||
|
return object_instance.object.to_mesh_clear()
|
||||||
|
else:
|
||||||
|
return object_instance.object.original.to_mesh_clear()
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user