Skip to content

Commit

Permalink
fixed name tag bug in local view (#538)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chalkman071 authored Feb 19, 2024
1 parent 3f85f50 commit 3675daf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions editor-blender/core/actions/state/led_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ def enter_editing_led_effect():

# Toggle local view
execute_operator("view3d.localview")
state.local_view = True

# De-select all objects
bpy.context.view_layer.objects.active = None # type: ignore
Expand Down Expand Up @@ -234,6 +235,7 @@ def exit_editing_led_effect():

# Exit local view
execute_operator("view3d.localview")
state.local_view = False

# De-select all objects
for obj in bpy.context.view_layer.objects.selected: # type: ignore
Expand Down
1 change: 1 addition & 0 deletions editor-blender/core/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ class State:
editor: Editor
editing_data: EditingData
shifting: bool
local_view: bool

selection_mode: SelectMode
selected_obj_names: List[str]
Expand Down
1 change: 1 addition & 0 deletions editor-blender/core/states/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
# current_led_status={}
edit_state=EditMode.IDLE,
editor=Editor.CONTROL_EDITOR,
local_view=False,
editing_data=EditingData(frame_id=-1, start=0, index=0),
shifting=False,
# NOTE: Guess we can't implement these
Expand Down
2 changes: 2 additions & 0 deletions editor-blender/handlers/name_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def name_tag_draw():
region_data = cast(bpy.types.RegionView3D, region.data)
else:
return
if state.local_view:
return

dancer_names = state.dancer_names
for name in dancer_names:
Expand Down

0 comments on commit 3675daf

Please sign in to comment.