Skip to content

Commit

Permalink
Skip handling visibility and color properties with guidata
Browse files Browse the repository at this point in the history
  • Loading branch information
arjxn-py committed Sep 16, 2024
1 parent fd6a4a1 commit f2a7321
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions jupytercad_freecad/freecad/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,8 @@ def _guidata_to_options(guidata):
options[obj_name] = data
continue

if "ShapeColor" in data:
obj_options["color"] = list(data["ShapeColor"]["value"])

if "Visibility" in data:
obj_options["visibility"] = data["Visibility"]["value"]
# Handle other necessary properties if any
# Otherwise, remove the visibility and color logic

options[obj_name] = obj_options

Expand All @@ -58,15 +55,8 @@ def _options_to_guidata(options):
options[obj_name] = data
continue

if "color" in data:
obj_data["ShapeColor"] = dict(
type="App::PropertyColor", value=tuple(data["color"])
)

if "visibility" in data:
obj_data["Visibility"] = dict(
type="App::PropertyBool", value=data["visibility"]
)
# Skip handling visibility and color properties here
# Or handle only essential properties

gui_data[obj_name] = obj_data

Expand Down

0 comments on commit f2a7321

Please sign in to comment.