From c01edb144c261d9ab32933cfa908d9f9cc0baf0e Mon Sep 17 00:00:00 2001 From: Rob Date: Wed, 18 Dec 2024 15:37:25 -0500 Subject: [PATCH] Properties and Panel renaming --- .../addons/cam/properties/bas_relief_props.py | 217 ++++++++++++++++ scripts/addons/cam/tests/install_addon.py | 1 - scripts/addons/cam/ui/panels/area.py | 2 +- scripts/addons/cam/ui/panels/basrelief.py | 235 +----------------- scripts/addons/cam/ui/panels/chains.py | 2 +- scripts/addons/cam/ui/panels/cutter.py | 2 +- scripts/addons/cam/ui/panels/feedrate.py | 2 +- scripts/addons/cam/ui/panels/gcode.py | 2 +- scripts/addons/cam/ui/panels/info.py | 2 +- scripts/addons/cam/ui/panels/interface.py | 24 +- scripts/addons/cam/ui/panels/machine.py | 2 +- scripts/addons/cam/ui/panels/material.py | 2 +- scripts/addons/cam/ui/panels/movement.py | 2 +- scripts/addons/cam/ui/panels/op_properties.py | 2 +- scripts/addons/cam/ui/panels/operations.py | 2 +- scripts/addons/cam/ui/panels/optimisation.py | 2 +- scripts/addons/cam/ui/panels/pack.py | 2 +- scripts/addons/cam/ui/panels/slice.py | 2 +- scripts/addons/cam/ui/pie_menu/pie_cam.py | 6 +- scripts/addons/cam/ui/pie_menu/pie_chains.py | 4 +- .../addons/cam/ui/pie_menu/pie_operation.py | 14 +- 21 files changed, 257 insertions(+), 272 deletions(-) create mode 100644 scripts/addons/cam/properties/bas_relief_props.py diff --git a/scripts/addons/cam/properties/bas_relief_props.py b/scripts/addons/cam/properties/bas_relief_props.py new file mode 100644 index 00000000..e465a60c --- /dev/null +++ b/scripts/addons/cam/properties/bas_relief_props.py @@ -0,0 +1,217 @@ +"""bas_relief_props.py +""" + +from bpy.types import PropertyGroup +from bpy.props import ( + BoolProperty, + EnumProperty, + FloatProperty, + IntProperty, + PointerProperty, + StringProperty, +) + +from ..constants import PRECISION + + +class BasReliefSettings(PropertyGroup): + use_image_source: BoolProperty( + name="Use Image Source", + description="", + default=False, + ) + source_image_name: StringProperty( + name="Image Source", + description="image source", + ) + view_layer_name: StringProperty( + name="View Layer Source", + description="Make a bas-relief from whatever is on this view layer", + ) + bit_diameter: FloatProperty( + name="Diameter of Ball End in mm", + description="Diameter of bit which will be used for carving", + min=0.01, + max=50.0, + default=3.175, + precision=PRECISION, + ) + pass_per_radius: IntProperty( + name="Passes per Radius", + description="Amount of passes per radius\n(more passes, " "more mesh precision)", + default=2, + min=1, + max=10, + ) + widthmm: IntProperty( + name="Desired Width in mm", + default=200, + min=5, + max=4000, + ) + heightmm: IntProperty( + name="Desired Height in mm", + default=150, + min=5, + max=4000, + ) + thicknessmm: IntProperty( + name="Thickness in mm", + default=15, + min=5, + max=100, + ) + + justifyx: EnumProperty( + name="X", + items=[("1", "Left", "", 0), ("-0.5", "Centered", "", 1), ("-1", "Right", "", 2)], + default="-1", + ) + justifyy: EnumProperty( + name="Y", + items=[ + ("1", "Bottom", "", 0), + ("-0.5", "Centered", "", 2), + ("-1", "Top", "", 1), + ], + default="-1", + ) + justifyz: EnumProperty( + name="Z", + items=[ + ("-1", "Below 0", "", 0), + ("-0.5", "Centered", "", 2), + ("1", "Above 0", "", 1), + ], + default="-1", + ) + + depth_exponent: FloatProperty( + name="Depth Exponent", + description="Initial depth map is taken to this power. Higher = " "sharper relief", + min=0.5, + max=10.0, + default=1.0, + precision=PRECISION, + ) + + silhouette_threshold: FloatProperty( + name="Silhouette Threshold", + description="Silhouette threshold", + min=0.000001, + max=1.0, + default=0.003, + precision=PRECISION, + ) + recover_silhouettes: BoolProperty( + name="Recover Silhouettes", + description="", + default=True, + ) + silhouette_scale: FloatProperty( + name="Silhouette Scale", + description="Silhouette scale", + min=0.000001, + max=5.0, + default=0.3, + precision=PRECISION, + ) + silhouette_exponent: IntProperty( + name="Silhouette Square Exponent", + description="If lower, true depth distances between objects will be " + "more visibe in the relief", + default=3, + min=0, + max=5, + ) + attenuation: FloatProperty( + name="Gradient Attenuation", + description="Gradient attenuation", + min=0.000001, + max=100.0, + default=1.0, + precision=PRECISION, + ) + min_gridsize: IntProperty( + name="Minimum Grid Size", + default=16, + min=2, + max=512, + ) + smooth_iterations: IntProperty( + name="Smooth Iterations", + default=1, + min=1, + max=64, + ) + vcycle_iterations: IntProperty( + name="V-Cycle Iterations", + description="Set higher for planar constraint", + default=2, + min=1, + max=128, + ) + linbcg_iterations: IntProperty( + name="LINBCG Iterations", + description="Set lower for flatter relief, and when using " "planar constraint", + default=5, + min=1, + max=64, + ) + use_planar: BoolProperty( + name="Use Planar Constraint", + description="", + default=False, + ) + gradient_scaling_mask_use: BoolProperty( + name="Scale Gradients with Mask", + description="", + default=False, + ) + decimate_ratio: FloatProperty( + name="Decimate Ratio", + description="Simplify the mesh using the Decimate modifier. " + "The lower the value the more simplyfied", + min=0.01, + max=1.0, + default=0.1, + precision=PRECISION, + ) + + gradient_scaling_mask_name: StringProperty( + name="Scaling Mask Name", + description="Mask name", + ) + scale_down_before_use: BoolProperty( + name="Scale Down Image Before Processing", + description="", + default=False, + ) + scale_down_before: FloatProperty( + name="Image Scale", + description="Image scale", + min=0.025, + max=1.0, + default=0.5, + precision=PRECISION, + ) + detail_enhancement_use: BoolProperty( + name="Enhance Details", + description="Enhance details by frequency analysis", + default=False, + ) + # detail_enhancement_freq=FloatProperty(name="frequency limit", description="Image scale", min=0.025, max=1.0, default=.5, precision=PRECISION) + detail_enhancement_amount: FloatProperty( + name="Amount", + description="Image scale", + min=0.025, + max=1.0, + default=0.5, + precision=PRECISION, + ) + + advanced: BoolProperty( + name="Advanced Options", + description="Show advanced options", + default=True, + ) diff --git a/scripts/addons/cam/tests/install_addon.py b/scripts/addons/cam/tests/install_addon.py index fcecf01c..554dcff8 100644 --- a/scripts/addons/cam/tests/install_addon.py +++ b/scripts/addons/cam/tests/install_addon.py @@ -14,7 +14,6 @@ bpy.ops.extensions.package_install(repo_index=0, pkg_id="stl_format_legacy") bpy.ops.extensions.package_install(repo_index=0, pkg_id="simplify_curves_plus") bpy.ops.extensions.package_install(repo_index=0, pkg_id="curve_tools") bpy.ops.wm.save_userpref() -print('waaaaaaaaaaaaaaaaah') """ NUM_RETRIES = 10 diff --git a/scripts/addons/cam/ui/panels/area.py b/scripts/addons/cam/ui/panels/area.py index 28913731..a789f58c 100644 --- a/scripts/addons/cam/ui/panels/area.py +++ b/scripts/addons/cam/ui/panels/area.py @@ -18,7 +18,7 @@ class CAM_AREA_Panel(CAMButtonsPanel, Panel): bl_category = "CNC" bl_label = "[ Operation Area ]" - bl_idname = "WORLD_PT_CAM_OPERATION_AREA" + bl_idname = "FABEX_PT_CAM_OPERATION_AREA" panel_interface_level = 0 def draw(self, context): diff --git a/scripts/addons/cam/ui/panels/basrelief.py b/scripts/addons/cam/ui/panels/basrelief.py index 71c3c740..b7f7ac9c 100644 --- a/scripts/addons/cam/ui/panels/basrelief.py +++ b/scripts/addons/cam/ui/panels/basrelief.py @@ -4,227 +4,14 @@ """ import bpy -from bpy.types import PropertyGroup, Panel -from bpy.props import ( - BoolProperty, - EnumProperty, - FloatProperty, - IntProperty, - PointerProperty, - StringProperty, -) - -from ...constants import PRECISION - - -class BasReliefSettings(PropertyGroup): - use_image_source: BoolProperty( - name="Use Image Source", - description="", - default=False, - ) - source_image_name: StringProperty( - name="Image Source", - description="image source", - ) - view_layer_name: StringProperty( - name="View Layer Source", - description="Make a bas-relief from whatever is on this view layer", - ) - bit_diameter: FloatProperty( - name="Diameter of Ball End in mm", - description="Diameter of bit which will be used for carving", - min=0.01, - max=50.0, - default=3.175, - precision=PRECISION, - ) - pass_per_radius: IntProperty( - name="Passes per Radius", - description="Amount of passes per radius\n(more passes, " "more mesh precision)", - default=2, - min=1, - max=10, - ) - widthmm: IntProperty( - name="Desired Width in mm", - default=200, - min=5, - max=4000, - ) - heightmm: IntProperty( - name="Desired Height in mm", - default=150, - min=5, - max=4000, - ) - thicknessmm: IntProperty( - name="Thickness in mm", - default=15, - min=5, - max=100, - ) - - justifyx: EnumProperty( - name="X", - items=[("1", "Left", "", 0), ("-0.5", "Centered", "", 1), ("-1", "Right", "", 2)], - default="-1", - ) - justifyy: EnumProperty( - name="Y", - items=[ - ("1", "Bottom", "", 0), - ("-0.5", "Centered", "", 2), - ("-1", "Top", "", 1), - ], - default="-1", - ) - justifyz: EnumProperty( - name="Z", - items=[ - ("-1", "Below 0", "", 0), - ("-0.5", "Centered", "", 2), - ("1", "Above 0", "", 1), - ], - default="-1", - ) - - depth_exponent: FloatProperty( - name="Depth Exponent", - description="Initial depth map is taken to this power. Higher = " "sharper relief", - min=0.5, - max=10.0, - default=1.0, - precision=PRECISION, - ) - - silhouette_threshold: FloatProperty( - name="Silhouette Threshold", - description="Silhouette threshold", - min=0.000001, - max=1.0, - default=0.003, - precision=PRECISION, - ) - recover_silhouettes: BoolProperty( - name="Recover Silhouettes", - description="", - default=True, - ) - silhouette_scale: FloatProperty( - name="Silhouette Scale", - description="Silhouette scale", - min=0.000001, - max=5.0, - default=0.3, - precision=PRECISION, - ) - silhouette_exponent: IntProperty( - name="Silhouette Square Exponent", - description="If lower, true depth distances between objects will be " - "more visibe in the relief", - default=3, - min=0, - max=5, - ) - attenuation: FloatProperty( - name="Gradient Attenuation", - description="Gradient attenuation", - min=0.000001, - max=100.0, - default=1.0, - precision=PRECISION, - ) - min_gridsize: IntProperty( - name="Minimum Grid Size", - default=16, - min=2, - max=512, - ) - smooth_iterations: IntProperty( - name="Smooth Iterations", - default=1, - min=1, - max=64, - ) - vcycle_iterations: IntProperty( - name="V-Cycle Iterations", - description="Set higher for planar constraint", - default=2, - min=1, - max=128, - ) - linbcg_iterations: IntProperty( - name="LINBCG Iterations", - description="Set lower for flatter relief, and when using " "planar constraint", - default=5, - min=1, - max=64, - ) - use_planar: BoolProperty( - name="Use Planar Constraint", - description="", - default=False, - ) - gradient_scaling_mask_use: BoolProperty( - name="Scale Gradients with Mask", - description="", - default=False, - ) - decimate_ratio: FloatProperty( - name="Decimate Ratio", - description="Simplify the mesh using the Decimate modifier. " - "The lower the value the more simplyfied", - min=0.01, - max=1.0, - default=0.1, - precision=PRECISION, - ) - - gradient_scaling_mask_name: StringProperty( - name="Scaling Mask Name", - description="Mask name", - ) - scale_down_before_use: BoolProperty( - name="Scale Down Image Before Processing", - description="", - default=False, - ) - scale_down_before: FloatProperty( - name="Image Scale", - description="Image scale", - min=0.025, - max=1.0, - default=0.5, - precision=PRECISION, - ) - detail_enhancement_use: BoolProperty( - name="Enhance Details", - description="Enhance details by frequency analysis", - default=False, - ) - # detail_enhancement_freq=FloatProperty(name="frequency limit", description="Image scale", min=0.025, max=1.0, default=.5, precision=PRECISION) - detail_enhancement_amount: FloatProperty( - name="Amount", - description="Image scale", - min=0.025, - max=1.0, - default=0.5, - precision=PRECISION, - ) - - advanced: BoolProperty( - name="Advanced Options", - description="Show advanced options", - default=True, - ) +from bpy.types import Panel class BASRELIEF_Panel(Panel): """Bas Relief Panel""" bl_label = "[ Bas Relief ]" - bl_idname = "WORLD_PT_BASRELIEF" + bl_idname = "FABEX_PT_BASRELIEF" bl_options = {"DEFAULT_CLOSED"} bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" @@ -272,14 +59,10 @@ class BASRELIEF_Panel(Panel): layout.use_property_split = True layout.use_property_decorate = False - # print(dir(layout)) scene = context.scene br = scene.basreliefsettings - # if br: - # cutter preset - box = layout.box() col = box.column(align=True) col.label(text="Source") @@ -316,8 +99,6 @@ class BASRELIEF_Panel(Panel): col.prop(br, "silhouette_scale", text="Scale") if br.advanced: col.prop(br, "silhouette_exponent", text="Square Exponent") - # layout.template_curve_mapping(br,'curva') - # layout.prop(br,'attenuation') box = layout.box() col = box.column(align=True) @@ -331,25 +112,13 @@ class BASRELIEF_Panel(Panel): layout.prop(br, "min_gridsize") layout.prop(br, "decimate_ratio") layout.prop(br, "use_planar") - layout.prop(br, "gradient_scaling_mask_use") if br.advanced: if br.gradient_scaling_mask_use: layout.prop_search(br, "gradient_scaling_mask_name", bpy.data, "images") layout.prop(br, "detail_enhancement_use") if br.detail_enhancement_use: - # layout.prop(br,'detail_enhancement_freq') layout.prop(br, "detail_enhancement_amount") - # print(dir(layout)) - # layout.prop(s.view_settings.curve_mapping,"curves") - # layout.label('Frequency scaling:') - # s.view_settings.curve_mapping.clip_max_y=2 - - # layout.template_curve_mapping(s.view_settings, "curve_mapping") - - # layout.prop(br,'scale_down_before_use') - # if br.scale_down_before_use: - # layout.prop(br,'scale_down_before') box = layout.box() col = box.column() col.scale_y = 1.2 diff --git a/scripts/addons/cam/ui/panels/chains.py b/scripts/addons/cam/ui/panels/chains.py index 2765906c..8129b0ac 100644 --- a/scripts/addons/cam/ui/panels/chains.py +++ b/scripts/addons/cam/ui/panels/chains.py @@ -46,7 +46,7 @@ class CAM_CHAINS_Panel(CAMButtonsPanel, Panel): bl_context = "render" bl_label = "[ Chains ]" - bl_idname = "WORLD_PT_CAM_CHAINS" + bl_idname = "FABEX_PT_CAM_CHAINS" bl_options = {"DEFAULT_CLOSED"} panel_interface_level = 1 always_show_panel = True diff --git a/scripts/addons/cam/ui/panels/cutter.py b/scripts/addons/cam/ui/panels/cutter.py index 7e7d805c..d359eb4f 100644 --- a/scripts/addons/cam/ui/panels/cutter.py +++ b/scripts/addons/cam/ui/panels/cutter.py @@ -17,7 +17,7 @@ class CAM_CUTTER_Panel(CAMButtonsPanel, Panel): bl_category = "CNC" bl_label = "[ Cutter ]" - bl_idname = "WORLD_PT_CAM_CUTTER" + bl_idname = "FABEX_PT_CAM_CUTTER" panel_interface_level = 0 def draw(self, context): diff --git a/scripts/addons/cam/ui/panels/feedrate.py b/scripts/addons/cam/ui/panels/feedrate.py index b288251d..4ac1efe8 100644 --- a/scripts/addons/cam/ui/panels/feedrate.py +++ b/scripts/addons/cam/ui/panels/feedrate.py @@ -17,7 +17,7 @@ class CAM_FEEDRATE_Panel(CAMButtonsPanel, Panel): bl_category = "CNC" bl_label = "[ Feedrate ]" - bl_idname = "WORLD_PT_CAM_FEEDRATE" + bl_idname = "FABEX_PT_CAM_FEEDRATE" panel_interface_level = 0 def draw(self, context): diff --git a/scripts/addons/cam/ui/panels/gcode.py b/scripts/addons/cam/ui/panels/gcode.py index 3364bba2..bf4f5833 100644 --- a/scripts/addons/cam/ui/panels/gcode.py +++ b/scripts/addons/cam/ui/panels/gcode.py @@ -17,7 +17,7 @@ class CAM_GCODE_Panel(CAMButtonsPanel, Panel): bl_category = "CNC" bl_label = "[ Operation G-code ]" - bl_idname = "WORLD_PT_CAM_GCODE" + bl_idname = "FABEX_PT_CAM_GCODE" panel_interface_level = 1 def draw(self, context): diff --git a/scripts/addons/cam/ui/panels/info.py b/scripts/addons/cam/ui/panels/info.py index c0102a8d..4d32fe8e 100644 --- a/scripts/addons/cam/ui/panels/info.py +++ b/scripts/addons/cam/ui/panels/info.py @@ -21,7 +21,7 @@ class CAM_INFO_Panel(CAMButtonsPanel, Panel): bl_options = {"HIDE_HEADER"} bl_label = "Info & Warnings" - bl_idname = "WORLD_PT_CAM_INFO" + bl_idname = "FABEX_PT_CAM_INFO" panel_interface_level = 0 always_show_panel = True diff --git a/scripts/addons/cam/ui/panels/interface.py b/scripts/addons/cam/ui/panels/interface.py index 1cd7265f..86c0fb6e 100644 --- a/scripts/addons/cam/ui/panels/interface.py +++ b/scripts/addons/cam/ui/panels/interface.py @@ -119,18 +119,18 @@ def update_layout(self, context): # Unregister all permanent panels try: unregister_classes = [ - bpy.types.WORLD_PT_CAM_OPERATION_AREA, - bpy.types.WORLD_PT_CAM_CHAINS, - bpy.types.WORLD_PT_CAM_CUTTER, - bpy.types.WORLD_PT_CAM_FEEDRATE, - bpy.types.WORLD_PT_CAM_GCODE, - bpy.types.WORLD_PT_CAM_INFO, - bpy.types.WORLD_PT_CAM_MACHINE, - bpy.types.WORLD_PT_CAM_MATERIAL, - bpy.types.WORLD_PT_CAM_MOVEMENT, - bpy.types.WORLD_PT_CAM_OPERATION, - bpy.types.WORLD_PT_CAM_OPERATIONS, - bpy.types.WORLD_PT_CAM_OPTIMISATION, + bpy.types.FABEX_PT_CAM_OPERATION_AREA, + bpy.types.FABEX_PT_CAM_CHAINS, + bpy.types.FABEX_PT_CAM_CUTTER, + bpy.types.FABEX_PT_CAM_FEEDRATE, + bpy.types.FABEX_PT_CAM_GCODE, + bpy.types.FABEX_PT_CAM_INFO, + bpy.types.FABEX_PT_CAM_MACHINE, + bpy.types.FABEX_PT_CAM_MATERIAL, + bpy.types.FABEX_PT_CAM_MOVEMENT, + bpy.types.FABEX_PT_CAM_OPERATION, + bpy.types.FABEX_PT_CAM_OPERATIONS, + bpy.types.FABEX_PT_CAM_OPTIMISATION, bpy.types.VIEW3D_PT_tools_curvetools, bpy.types.VIEW3D_PT_tools_create, ] diff --git a/scripts/addons/cam/ui/panels/machine.py b/scripts/addons/cam/ui/panels/machine.py index f6128655..2937325b 100644 --- a/scripts/addons/cam/ui/panels/machine.py +++ b/scripts/addons/cam/ui/panels/machine.py @@ -17,7 +17,7 @@ class CAM_MACHINE_Panel(CAMButtonsPanel, Panel): bl_context = "render" bl_label = "[ Machine ]" - bl_idname = "WORLD_PT_CAM_MACHINE" + bl_idname = "FABEX_PT_CAM_MACHINE" panel_interface_level = 0 always_show_panel = True diff --git a/scripts/addons/cam/ui/panels/material.py b/scripts/addons/cam/ui/panels/material.py index c59f247b..3daa6447 100644 --- a/scripts/addons/cam/ui/panels/material.py +++ b/scripts/addons/cam/ui/panels/material.py @@ -14,7 +14,7 @@ class CAM_MATERIAL_Panel(CAMButtonsPanel, Panel): bl_context = "render" bl_label = "[ Material ]" - bl_idname = "WORLD_PT_CAM_MATERIAL" + bl_idname = "FABEX_PT_CAM_MATERIAL" panel_interface_level = 0 def draw(self, context): diff --git a/scripts/addons/cam/ui/panels/movement.py b/scripts/addons/cam/ui/panels/movement.py index cd6b2d3a..f71bae67 100644 --- a/scripts/addons/cam/ui/panels/movement.py +++ b/scripts/addons/cam/ui/panels/movement.py @@ -20,7 +20,7 @@ class CAM_MOVEMENT_Panel(CAMButtonsPanel, Panel): bl_category = "CNC" bl_label = "[ Movement ]" - bl_idname = "WORLD_PT_CAM_MOVEMENT" + bl_idname = "FABEX_PT_CAM_MOVEMENT" panel_interface_level = 0 def draw(self, context): diff --git a/scripts/addons/cam/ui/panels/op_properties.py b/scripts/addons/cam/ui/panels/op_properties.py index d73eb3de..b8287d20 100644 --- a/scripts/addons/cam/ui/panels/op_properties.py +++ b/scripts/addons/cam/ui/panels/op_properties.py @@ -17,7 +17,7 @@ class CAM_OPERATION_PROPERTIES_Panel(CAMButtonsPanel, Panel): bl_category = "CNC" bl_label = "[ Operation Setup ]" - bl_idname = "WORLD_PT_CAM_OPERATION" + bl_idname = "FABEX_PT_CAM_OPERATION" panel_interface_level = 0 def draw_overshoot(self, col): diff --git a/scripts/addons/cam/ui/panels/operations.py b/scripts/addons/cam/ui/panels/operations.py index 644447e6..83d61ab9 100644 --- a/scripts/addons/cam/ui/panels/operations.py +++ b/scripts/addons/cam/ui/panels/operations.py @@ -17,7 +17,7 @@ class CAM_OPERATIONS_Panel(CAMButtonsPanel, Panel): bl_context = "render" bl_label = "[ Operations ]" - bl_idname = "WORLD_PT_CAM_OPERATIONS" + bl_idname = "FABEX_PT_CAM_OPERATIONS" panel_interface_level = 0 always_show_panel = True diff --git a/scripts/addons/cam/ui/panels/optimisation.py b/scripts/addons/cam/ui/panels/optimisation.py index 05bbbae3..169b1b16 100644 --- a/scripts/addons/cam/ui/panels/optimisation.py +++ b/scripts/addons/cam/ui/panels/optimisation.py @@ -18,7 +18,7 @@ class CAM_OPTIMISATION_Panel(CAMButtonsPanel, Panel): bl_category = "CNC" bl_label = "[ Optimisation ]" - bl_idname = "WORLD_PT_CAM_OPTIMISATION" + bl_idname = "FABEX_PT_CAM_OPTIMISATION" panel_interface_level = 2 def draw(self, context): diff --git a/scripts/addons/cam/ui/panels/pack.py b/scripts/addons/cam/ui/panels/pack.py index 91699fb2..8e264b8d 100644 --- a/scripts/addons/cam/ui/panels/pack.py +++ b/scripts/addons/cam/ui/panels/pack.py @@ -17,7 +17,7 @@ class CAM_PACK_Panel(CAMButtonsPanel, Panel): bl_context = "render" bl_label = "[ Pack ]" - bl_idname = "WORLD_PT_CAM_PACK" + bl_idname = "FABEX_PT_CAM_PACK" bl_options = {"DEFAULT_CLOSED"} panel_interface_level = 2 use_property_split = True diff --git a/scripts/addons/cam/ui/panels/slice.py b/scripts/addons/cam/ui/panels/slice.py index c515fafc..27bc78fa 100644 --- a/scripts/addons/cam/ui/panels/slice.py +++ b/scripts/addons/cam/ui/panels/slice.py @@ -17,7 +17,7 @@ class CAM_SLICE_Panel(CAMButtonsPanel, Panel): bl_context = "render" bl_label = "[ Slice ]" - bl_idname = "WORLD_PT_CAM_SLICE" + bl_idname = "FABEX_PT_CAM_SLICE" bl_options = {"DEFAULT_CLOSED"} panel_interface_level = 2 use_property_split = True diff --git a/scripts/addons/cam/ui/pie_menu/pie_cam.py b/scripts/addons/cam/ui/pie_menu/pie_cam.py index c8ddfc2a..8c91e15f 100644 --- a/scripts/addons/cam/ui/pie_menu/pie_cam.py +++ b/scripts/addons/cam/ui/pie_menu/pie_cam.py @@ -27,14 +27,14 @@ class VIEW3D_MT_PIE_CAM(Menu): "wm.call_panel", text="Machine", icon="DESKTOP", - ).name = "WORLD_PT_CAM_MACHINE" + ).name = "FABEX_PT_CAM_MACHINE" # Right pie.operator( "wm.call_panel", text="Material", icon="META_CUBE", - ).name = "WORLD_PT_CAM_MATERIAL" + ).name = "FABEX_PT_CAM_MATERIAL" # Bottom if len(scene.cam_operations) < 1: @@ -73,7 +73,7 @@ class VIEW3D_MT_PIE_CAM(Menu): "wm.call_panel", text="Info & Warnings", icon="INFO", - ).name = "WORLD_PT_CAM_INFO" + ).name = "FABEX_PT_CAM_INFO" # Top Right box = pie.box() diff --git a/scripts/addons/cam/ui/pie_menu/pie_chains.py b/scripts/addons/cam/ui/pie_menu/pie_chains.py index 57a012e9..3b9e1fe4 100644 --- a/scripts/addons/cam/ui/pie_menu/pie_chains.py +++ b/scripts/addons/cam/ui/pie_menu/pie_chains.py @@ -25,11 +25,11 @@ class VIEW3D_MT_PIE_Chains(Menu): # Left pie.operator("wm.call_panel", text="Operations", icon="MOD_ENVELOPE").name = ( - "WORLD_PT_CAM_OPERATIONS" + "FABEX_PT_CAM_OPERATIONS" ) # Right - pie.operator("wm.call_panel", text="Chains", icon="LINKED").name = "WORLD_PT_CAM_CHAINS" + pie.operator("wm.call_panel", text="Chains", icon="LINKED").name = "FABEX_PT_CAM_CHAINS" # Bottom row = pie.row() diff --git a/scripts/addons/cam/ui/pie_menu/pie_operation.py b/scripts/addons/cam/ui/pie_menu/pie_operation.py index a3f1607f..436a10db 100644 --- a/scripts/addons/cam/ui/pie_menu/pie_operation.py +++ b/scripts/addons/cam/ui/pie_menu/pie_operation.py @@ -24,15 +24,15 @@ class VIEW3D_MT_PIE_Operation(Menu): # Left pie.operator("wm.call_panel", text="Area", icon="SHADING_BBOX").name = ( - "WORLD_PT_CAM_OPERATION_AREA" + "FABEX_PT_CAM_OPERATION_AREA" ) # Right pie.operator("wm.call_panel", text="Optimisation", icon="MODIFIER").name = ( - "WORLD_PT_CAM_OPTIMISATION" + "FABEX_PT_CAM_OPTIMISATION" ) # Bottom pie.operator("wm.call_panel", text="Setup", icon="PREFERENCES").name = ( - "WORLD_PT_CAM_OPERATION" + "FABEX_PT_CAM_OPERATION" ) # Top @@ -43,18 +43,18 @@ class VIEW3D_MT_PIE_Operation(Menu): # Top Left pie.operator("wm.call_panel", text="Movement", icon="ANIM_DATA").name = ( - "WORLD_PT_CAM_MOVEMENT" + "FABEX_PT_CAM_MOVEMENT" ) # Top Right - pie.operator("wm.call_panel", text="Feedrate", icon="AUTO").name = "WORLD_PT_CAM_FEEDRATE" + pie.operator("wm.call_panel", text="Feedrate", icon="AUTO").name = "FABEX_PT_CAM_FEEDRATE" # Bottom Left pie.operator("wm.call_panel", text="Cutter", icon="OUTLINER_DATA_GP_LAYER").name = ( - "WORLD_PT_CAM_CUTTER" + "FABEX_PT_CAM_CUTTER" ) # Bottom Right pie.operator("wm.call_panel", text="G-Code Options", icon="EVENT_G").name = ( - "WORLD_PT_CAM_GCODE" + "FABEX_PT_CAM_GCODE" )