smoother install font & depsgraph update
when we set a text, we don't want our manual depsgraph update, because this would trigger another setting of the text, which would trigger the manual depsgraph update, which would trigger another setting of the text, which would trigger the manual depsgraph update, which will eventually be too much. So, we ignore the depsgraph update n-times, where "n = n-letters + 1". worst side effect: might not update the text automatically in edge cases.
This commit is contained in:
parent
b24d0dbca4
commit
f6b1649c71
2 changed files with 57 additions and 49 deletions
|
@ -860,6 +860,8 @@ def set_text_on_curve(text_properties, recursive=True):
|
|||
mom[f"{utils.prefix()}_translation"] = text_properties.translation
|
||||
bpy.context.view_layer.objects.active = mom
|
||||
bpy.ops.object.parent_set(type='OBJECT')
|
||||
bpy.context.scene.abc3d_data["lock_depsgraph_update_ntimes"] = len(bpy.context.selected_objects)
|
||||
mom["lock_depsgraph_update_ntimes"] = len(bpy.context.selected_objects)
|
||||
|
||||
# endtime = time.perf_counter_ns()
|
||||
# elapsedtime = endtime - starttime
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue