Skip to content

Commit

Permalink
Only recentering source empty instance after load_original proven false
Browse files Browse the repository at this point in the history
This allows for manual repositioning if needed.
  • Loading branch information
TheDuckCow committed Aug 5, 2021
1 parent aa1775c commit eede9c2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion community_render.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,6 @@ def replace_view_layer(context, scene: bpy.types.Scene) -> bpy.types.Object:
obj.empty_display_type = 'CUBE'
obj.empty_display_size = 0.1

obj.location = (0, 0, 0)
return obj


Expand Down Expand Up @@ -582,6 +581,10 @@ def process_generic_scene(context) -> None:
print(f"{len(coll.all_objects)} in {coll.name}")
raise Exception("Issue - more than one object in collection!")

# Center the actual source scene itself back to the origin.
scene_obj = coll.all_objects[0]
scene_obj.location = (0, 0, 0)

scene = get_loaded_scene(context)

# Now run any of the transformation steps. This are directly modifying the
Expand Down Expand Up @@ -671,6 +674,10 @@ def process_as_donut(context):
print(f"{len(coll.all_objects)} in {coll.name}")
raise Exception("Issue - more than one object in collection!")

# Center the actual source scene itself back to the origin.
scene_obj = coll.all_objects[0]
scene_obj.location = (0, 0, 0)

scn = get_loaded_scene(context)
clear_all_animation(scn)
hide_ineligible_for_donut(context, scn)
Expand Down

0 comments on commit eede9c2

Please sign in to comment.