diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-02-13 21:49:26 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-02-19 19:22:01 +0400 |
commit | eb7485389b8ae29c0f56c942e800722fe25ebebe (patch) | |
tree | 0c4f71c85a75647f1a7d1ca084a1cd4295f88288 /release/scripts/startup/bl_ui/space_clip.py | |
parent | 6b1a4fc66ef4e3197601318ce4c36db2c8359b98 (diff) |
Use tabs for image editor.
For initial discussion see T38371
This commit organized panels for image editor to new tab categories dependent
on the image editor mode:
View Mode:
Tools - contains UV tools (currently only transform and UV Sculpting)
Scopes - contains scopes
Grease Pencil - contains Grease Pencil operators
Paint Mode:
Tools - contains brush options
Scopes - as above
Grease Pencil - as above
Mask Mode
Mask - contains mask tools
Scopes - as above
Grease Pencil - as above
Grease Pencil panel/tab now includes operators, not view options which have been
moved to the UI region on the right.
To make this work better, image editor toolbar now is of type TOOLS instead
of PREVIEW as was the case previously. A nice version patch makes sure all
works predictably, but opening newer files with older blender executables
could backfire.
This commit does not address which UV Tools will be included in the
Tools tab for the view mode, but does include some basic tools (transform)
and provides a class to inherit from to avoid conflicts with UV Sculpting.
Reviewers: brecht, dingto, sergey
Differential Revision: https://developer.blender.org/D315
Diffstat (limited to 'release/scripts/startup/bl_ui/space_clip.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_clip.py | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 00c2f7ae9e5..9114a31923f 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -21,7 +21,7 @@ import bpy from bpy.types import Panel, Header, Menu, UIList from bpy.app.translations import pgettext_iface as iface_ - +from bl_ui.properties_grease_pencil_common import GreasePencilPanel class CLIP_UL_tracking_objects(UIList): def draw_item(self, context, layout, data, item, icon, @@ -1043,28 +1043,11 @@ class CLIP_PT_tools_mask(MASK_PT_tools, Panel): # --- end mask --- -class CLIP_PT_tools_grease_pencil(Panel): +class CLIP_PT_tools_grease_pencil(GreasePencilPanel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'TOOLS' - bl_label = "Grease Pencil" bl_category = "Grease Pencil" - def draw(self, context): - layout = self.layout - - col = layout.column(align=True) - - row = col.row(align=True) - row.operator("gpencil.draw", text="Draw").mode = 'DRAW' - row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT' - - row = col.row(align=True) - row.operator("gpencil.draw", text="Poly").mode = 'DRAW_POLY' - row.operator("gpencil.draw", text="Erase").mode = 'ERASER' - - row = col.row(align=True) - row.prop(context.tool_settings, "use_grease_pencil_sessions") - class CLIP_PT_footage(CLIP_PT_clip_view_panel, Panel): bl_space_type = 'CLIP_EDITOR' |