diff --git a/src/Mod/CAM/Path/Tool/shape/doc.py b/src/Mod/CAM/Path/Tool/shape/doc.py index da1bb79421..d1c5c463df 100644 --- a/src/Mod/CAM/Path/Tool/shape/doc.py +++ b/src/Mod/CAM/Path/Tool/shape/doc.py @@ -69,6 +69,7 @@ def get_object_properties( obj: "FreeCAD.DocumentObject", props: Optional[List[str]] = None, group: Optional[str] = None, + exclude_groups: Optional[List[str]] = None, ) -> Dict[str, Tuple[Any, str]]: """ Extract properties from a FreeCAD PropertyBag, including their types. @@ -90,6 +91,8 @@ def get_object_properties( for name in props or obj.PropertiesList: if group and not obj.getGroupOfProperty(name) == group: continue + if exclude_groups and obj.getGroupOfProperty(name) in exclude_groups: + continue if hasattr(obj, name): value = getattr(obj, name) type_id = obj.getTypeIdOfProperty(name) diff --git a/src/Mod/CAM/Path/Tool/shape/models/base.py b/src/Mod/CAM/Path/Tool/shape/models/base.py index 6a2122bb33..312109318b 100644 --- a/src/Mod/CAM/Path/Tool/shape/models/base.py +++ b/src/Mod/CAM/Path/Tool/shape/models/base.py @@ -357,7 +357,7 @@ class ToolBitShape(Asset): raise ValueError("No 'Attributes' PropertyBag object found in document bytes") # loaded_raw_params will now be Dict[str, Tuple[Any, str]] - loaded_raw_params = get_object_properties(props_obj, group="Shape") + loaded_raw_params = get_object_properties(props_obj, exclude_groups=["", "Base"]) # Separate values and types, and populate _param_types loaded_params = {}