Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
PingHsunTsai committed Jun 25, 2024
1 parent d66d351 commit d43c9ea
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 22 deletions.
19 changes: 0 additions & 19 deletions src/compas_viewer/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

if TYPE_CHECKING:
from compas_viewer import Viewer
from compas_viewer.scene.sceneobject import ViewerSceneObject


class Command:
Expand Down Expand Up @@ -478,21 +477,3 @@ def obj_settings(viewer: "Viewer"):


obj_settings_cmd = Command(title="Object Settings", callback=obj_settings)

# =============================================================================
# =============================================================================
# =============================================================================
# Object
# =============================================================================
# =============================================================================
# =============================================================================


def get_obj_attr(viewer: "Viewer", obj: "ViewerSceneObject", attr: Literal["name", "show"]):
if hasattr(obj, attr):
return getattr(obj, attr)
else:
raise AttributeError(f"Attribute '{attr}' not found in object '{obj}'")


get_obj_attr_cmd = Command(title="", callback=get_obj_attr)
2 changes: 0 additions & 2 deletions src/compas_viewer/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from compas_viewer.commands import change_view_cmd
from compas_viewer.commands import clear_scene_cmd
from compas_viewer.commands import deselect_all_cmd
from compas_viewer.commands import get_obj_attr_cmd
from compas_viewer.commands import load_scene_cmd
from compas_viewer.commands import obj_settings_cmd
from compas_viewer.commands import pan_view_cmd
Expand Down Expand Up @@ -381,7 +380,6 @@ class Config(ConfigBase):
change_view_cmd,
clear_scene_cmd,
deselect_all_cmd,
get_obj_attr_cmd,
load_scene_cmd,
pan_view_cmd,
rotate_view_cmd,
Expand Down
1 change: 0 additions & 1 deletion src/compas_viewer/ui/sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def add_items(self) -> None:

for item in self.items:
itemtype = item.get("type", None)
action = item.get("action", None)

if itemtype == "Sceneform":
columns = item.get("columns", None)
Expand Down

0 comments on commit d43c9ea

Please sign in to comment.