Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BLENDER] #535 fixed name tag bug in local view #538

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading