diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-19 23:43:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-19 23:46:06 +0300 |
commit | 1ce9a142b6abda92e20886d54b79c9de74099f5a (patch) | |
tree | 9577adbf6f54376df86ee1406833edecab99dd0a /release/scripts/startup/bl_ui/space_view3d.py | |
parent | 2bc27d3dc5e9d0954358c0376c21c79c73864350 (diff) |
UI: expose gizmo orientation as a single enum
Avoids awkward logic from the popover,
by faking an extra item in the enum.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index ce2fa8a51e4..7922cdb90ec 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -5270,40 +5270,6 @@ class VIEW3D_PT_transform_orientations(Panel): row.operator("transform.delete_orientation", text="", icon='X', emboss=False) -# XXX, each panel needs to access a different orientation index. -# look into a way to pass this from the UI that draws it. -def VIEW3D_PT_transform_orientations_gizmo_factory(index): - class VIEW3D_PT_transform_orientations_other_n(Panel): - bl_space_type = 'VIEW_3D' - bl_region_type = 'HEADER' - bl_label = "Transform Orientations" - bl_ui_units_x = 8 - bl_idname = "VIEW3D_PT_transform_orientations_gizmo_" + str(index) - - def draw(self, context): - layout = self.layout - - layout.label(text="Transform Orientations") - - scene = context.scene - orient_slot = scene.transform_orientation_slots[index] - - layout.prop(orient_slot, "use_global", text="Scene Orientation", icon='OBJECT_ORIGIN') - use_global = orient_slot.use_global - - col = layout.column() - col.active = not use_global - col.column().prop(orient_slot, "type", expand=True) - - # Only 'VIEW3D_PT_transform_orientations' can edit - - return VIEW3D_PT_transform_orientations_other_n - -VIEW3D_PT_transform_orientations_gizmo_1 = VIEW3D_PT_transform_orientations_gizmo_factory(1) -VIEW3D_PT_transform_orientations_gizmo_2 = VIEW3D_PT_transform_orientations_gizmo_factory(2) -VIEW3D_PT_transform_orientations_gizmo_3 = VIEW3D_PT_transform_orientations_gizmo_factory(3) - - class VIEW3D_PT_gpencil_origin(Panel): bl_space_type = 'VIEW_3D' bl_region_type = 'HEADER' @@ -5816,9 +5782,6 @@ classes = ( VIEW3D_PT_gpencil_origin, VIEW3D_PT_gpencil_lock, VIEW3D_PT_transform_orientations, - VIEW3D_PT_transform_orientations_gizmo_1, - VIEW3D_PT_transform_orientations_gizmo_2, - VIEW3D_PT_transform_orientations_gizmo_3, VIEW3D_PT_overlay_gpencil_options, VIEW3D_PT_context_properties, TOPBAR_PT_gpencil_materials, |