Skip to content

Commit 72e3671

Browse files
jessey-gitJesse Yurkovich
authored and
Jesse Yurkovich
committed
Fix: Update Cell Fracture for removal of old style context override
Update Cell Fracture for removal of old style context override. Pull Request: https://projects.blender.org/blender/blender-addons/pulls/104756
1 parent 00c06e4 commit 72e3671

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

object_fracture_cell/__init__.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,9 @@ def main_object(context, collection, obj, level, **kw):
7676

7777
# must apply after boolean.
7878
if use_recenter:
79-
bpy.ops.object.origin_set(
80-
{"selected_editable_objects": objects},
81-
type='ORIGIN_GEOMETRY',
82-
center='MEDIAN',
83-
)
79+
context_override = {"selected_editable_objects": objects}
80+
with bpy.context.temp_override(**context_override):
81+
bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY', center='MEDIAN')
8482

8583
# ----------
8684
# Recursion

0 commit comments

Comments
 (0)