2009-11-01 15:21:20 +00:00
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-11-01 15:21:20 +00:00
|
|
|
#
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
2009-10-31 20:16:59 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
# <pep8 compliant>
|
2009-06-16 01:22:56 +00:00
|
|
|
import bpy
|
2011-08-12 06:57:00 +00:00
|
|
|
from bpy.types import Header, Menu, Panel
|
2013-03-25 01:00:16 +00:00
|
|
|
from bl_ui.properties_paint_common import UnifiedPaintPanel, brush_texture_settings, brush_mask_texture_settings
|
2013-02-10 10:29:38 +00:00
|
|
|
from bpy.app.translations import pgettext_iface as iface_
|
2013-02-10 09:09:26 +00:00
|
|
|
|
2013-02-10 08:54:10 +00:00
|
|
|
|
2012-01-18 05:54:19 +00:00
|
|
|
class ImagePaintPanel(UnifiedPaintPanel):
|
2012-01-18 00:41:39 +00:00
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2012-07-25 13:44:07 +00:00
|
|
|
class BrushButtonsPanel:
|
2010-08-09 01:37:09 +00:00
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
sima = context.space_data
|
|
|
|
toolsettings = context.tool_settings.image_paint
|
|
|
|
return sima.show_paint and toolsettings.brush
|
|
|
|
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_MT_view(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "View"
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
sima = context.space_data
|
Add the option to show also the UVs of other selected objects in image
space / uv edit. The code was already there, and the option as a rna
bool, but no ui to set it. Matt figured that the View menu in image
space next to other uv stuff, which only shows when UVs are edited, is
the right place.
Works so that when entering editmode for an object to edit UVs, when
have also other objects selected and this option on, also the UVs of
those other objects are shown in the image view.
Liquidape asked this on IRC, and we thought the feat doesn't exist, so I
looked out of curiosity in the code as was thinking it would be easy to
add. Was surprised to find it there already :)
First time that did anything with 2.5, was sure fun enough to search
thru the code to figure out how things work. Adding this ui thing proved
to be exactly as trivial and nice as it should, and the things under the
hood seemed nice, yay!
2010-05-06 23:47:25 +00:00
|
|
|
uv = sima.uv_editor
|
2010-01-16 14:31:21 +00:00
|
|
|
toolsettings = context.tool_settings
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
show_uvedit = sima.show_uvedit
|
2013-04-12 10:19:31 +00:00
|
|
|
show_render = sima.show_render
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-12-10 10:23:53 +00:00
|
|
|
layout.operator("image.properties", icon='MENU_PANEL')
|
2010-01-19 01:32:06 +00:00
|
|
|
layout.operator("image.scopes", icon='MENU_PANEL')
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
layout.prop(sima, "use_realtime_update")
|
2009-10-31 19:31:45 +00:00
|
|
|
if show_uvedit:
|
2010-09-07 15:17:42 +00:00
|
|
|
layout.prop(toolsettings, "show_uv_local_view")
|
2012-01-17 16:31:13 +00:00
|
|
|
|
|
|
|
layout.prop(uv, "show_other_objects")
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("image.view_zoom_in")
|
|
|
|
layout.operator("image.view_zoom_out")
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2011-11-08 01:32:34 +00:00
|
|
|
ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
for a, b in ratios:
|
2013-02-10 10:29:38 +00:00
|
|
|
layout.operator("image.view_zoom_ratio", text=iface_("Zoom %d:%d") % (a, b), translate=False).ratio = a / b
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
if show_uvedit:
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("image.view_selected")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("image.view_all")
|
2009-12-04 17:54:48 +00:00
|
|
|
|
2009-12-03 16:28:50 +00:00
|
|
|
layout.separator()
|
2009-12-04 17:54:48 +00:00
|
|
|
|
2013-04-12 10:19:31 +00:00
|
|
|
if show_render:
|
|
|
|
layout.operator("image.cycle_render_slot", text="Render Slot Cycle Next")
|
|
|
|
layout.operator("image.cycle_render_slot", text="Render Slot Cycle Previous").reverse = True
|
|
|
|
layout.separator()
|
|
|
|
|
2009-12-03 16:28:50 +00:00
|
|
|
layout.operator("screen.area_dupli")
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("screen.screen_full_area")
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_MT_select(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Select"
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2012-01-14 06:30:27 +00:00
|
|
|
layout.operator("uv.select_border").pinned = False
|
2012-01-30 14:28:45 +00:00
|
|
|
layout.operator("uv.select_border", text="Border Select Pinned").pinned = True
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2012-03-18 20:10:58 +00:00
|
|
|
layout.operator("uv.select_all").action = 'TOGGLE'
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("uv.select_all", text="Inverse").action = 'INVERT'
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("uv.select_pinned")
|
|
|
|
layout.operator("uv.select_linked")
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2012-08-09 22:43:10 +00:00
|
|
|
layout.separator()
|
|
|
|
|
2013-04-21 19:04:04 +00:00
|
|
|
layout.operator("uv.select_less", text="Less")
|
|
|
|
layout.operator("uv.select_more", text="More")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
2012-08-09 22:43:10 +00:00
|
|
|
layout.operator("uv.select_split")
|
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_MT_image(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Image"
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-09-01 00:33:39 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
sima = context.space_data
|
|
|
|
ima = sima.image
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("image.new")
|
|
|
|
layout.operator("image.open")
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
show_render = sima.show_render
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
if ima:
|
|
|
|
if not show_render:
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("image.replace")
|
|
|
|
layout.operator("image.reload")
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("image.save")
|
|
|
|
layout.operator("image.save_as")
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("image.save_as", text="Save a Copy").copy = True
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
if ima.source == 'SEQUENCE':
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("image.save_sequence")
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("image.external_edit", "Edit Externally")
|
merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
2010-03-20 16:41:01 +00:00
|
|
|
|
2011-02-23 12:02:43 +00:00
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.menu("IMAGE_MT_image_invert")
|
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
if not show_render:
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2013-01-27 17:20:08 +00:00
|
|
|
if not ima.packed_file:
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("image.pack")
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
# only for dirty && specific image types, perhaps
|
|
|
|
# this could be done in operator poll too
|
2010-08-18 07:14:10 +00:00
|
|
|
if ima.is_dirty:
|
2012-01-13 06:58:15 +00:00
|
|
|
if ima.source in {'FILE', 'GENERATED'} and ima.type != 'OPEN_EXR_MULTILAYER':
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("image.pack", text="Pack As PNG").as_png = True
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2012-01-17 16:31:13 +00:00
|
|
|
layout.separator()
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_MT_image_invert(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Invert"
|
2011-02-23 12:02:43 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2011-10-23 00:53:50 +00:00
|
|
|
props = layout.operator("image.invert", text="Invert Image Colors")
|
|
|
|
props.invert_r = True
|
|
|
|
props.invert_g = True
|
|
|
|
props.invert_b = True
|
2011-02-23 12:02:43 +00:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
layout.operator("image.invert", text="Invert Red Channel").invert_r = True
|
|
|
|
layout.operator("image.invert", text="Invert Green Channel").invert_g = True
|
|
|
|
layout.operator("image.invert", text="Invert Blue Channel").invert_b = True
|
|
|
|
layout.operator("image.invert", text="Invert Alpha Channel").invert_a = True
|
2011-02-23 12:02:43 +00:00
|
|
|
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_MT_uvs_showhide(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Show/Hide Faces"
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("uv.reveal")
|
2012-01-14 06:30:27 +00:00
|
|
|
layout.operator("uv.hide", text="Hide Selected").unselected = False
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("uv.hide", text="Hide Unselected").unselected = True
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_MT_uvs_transform(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Transform"
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-12-10 10:36:32 +00:00
|
|
|
layout.operator("transform.translate")
|
|
|
|
layout.operator("transform.rotate")
|
|
|
|
layout.operator("transform.resize")
|
2009-11-28 23:37:56 +00:00
|
|
|
|
2011-07-21 21:34:08 +00:00
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.operator("transform.shear")
|
|
|
|
|
2009-11-28 23:37:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_MT_uvs_snap(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Snap"
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-28 23:37:56 +00:00
|
|
|
def draw(self, context):
|
2009-11-26 23:20:31 +00:00
|
|
|
layout = self.layout
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2009-11-26 23:20:31 +00:00
|
|
|
layout.operator_context = 'EXEC_REGION_WIN'
|
2009-11-28 23:37:56 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("uv.snap_selected", text="Selected to Pixels").target = 'PIXELS'
|
|
|
|
layout.operator("uv.snap_selected", text="Selected to Cursor").target = 'CURSOR'
|
2013-07-21 16:45:38 +00:00
|
|
|
layout.operator("uv.snap_selected", text="Selected to Cursor (Offset)").target = 'CURSOR_OFFSET'
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("uv.snap_selected", text="Selected to Adjacent Unselected").target = 'ADJACENT_UNSELECTED'
|
2009-11-26 23:20:31 +00:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("uv.snap_cursor", text="Cursor to Pixels").target = 'PIXELS'
|
|
|
|
layout.operator("uv.snap_cursor", text="Cursor to Selected").target = 'SELECTED'
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-11-28 23:37:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_MT_uvs_mirror(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Mirror"
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2009-11-16 13:59:27 +00:00
|
|
|
layout.operator_context = 'EXEC_REGION_WIN'
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("transform.mirror", text="X Axis").constraint_axis[0] = True
|
|
|
|
layout.operator("transform.mirror", text="Y Axis").constraint_axis[1] = True
|
2009-09-10 14:20:21 +00:00
|
|
|
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_MT_uvs_weldalign(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Weld/Align"
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2010-09-07 15:17:42 +00:00
|
|
|
layout.operator("uv.weld") # W, 1
|
2012-11-13 18:29:29 +00:00
|
|
|
layout.operator("uv.remove_doubles")
|
2011-02-18 06:07:41 +00:00
|
|
|
layout.operator_enum("uv.align", "axis") # W, 2/3/4
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_MT_uvs(Menu):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "UVs"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
sima = context.space_data
|
|
|
|
uv = sima.uv_editor
|
2010-01-16 14:31:21 +00:00
|
|
|
toolsettings = context.tool_settings
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
layout.prop(uv, "use_snap_to_pixels")
|
|
|
|
layout.prop(uv, "lock_bounds")
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2012-01-17 16:31:13 +00:00
|
|
|
layout.prop(toolsettings, "use_uv_sculpt")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
2010-08-17 07:49:53 +00:00
|
|
|
layout.prop(uv, "use_live_unwrap")
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("uv.unwrap")
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("uv.pin", text="Unpin").clear = True
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("uv.pin")
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.operator("uv.pack_islands")
|
|
|
|
layout.operator("uv.average_islands_scale")
|
|
|
|
layout.operator("uv.minimize_stretch")
|
|
|
|
layout.operator("uv.stitch")
|
2012-01-17 16:31:13 +00:00
|
|
|
layout.operator("uv.mark_seam")
|
|
|
|
layout.operator("uv.seams_from_islands")
|
2011-04-29 05:32:27 +00:00
|
|
|
layout.operator("mesh.faces_mirror_uv")
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.menu("IMAGE_MT_uvs_transform")
|
|
|
|
layout.menu("IMAGE_MT_uvs_mirror")
|
2009-11-26 23:20:31 +00:00
|
|
|
layout.menu("IMAGE_MT_uvs_snap")
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.menu("IMAGE_MT_uvs_weldalign")
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2010-08-18 03:24:52 +00:00
|
|
|
layout.prop_menu_enum(toolsettings, "proportional_edit")
|
|
|
|
layout.prop_menu_enum(toolsettings, "proportional_edit_falloff")
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.menu("IMAGE_MT_uvs_showhide")
|
2011-01-01 07:20:34 +00:00
|
|
|
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_MT_uvs_select_mode(Menu):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "UV Select Mode"
|
2010-10-05 15:29:06 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.operator_context = 'INVOKE_REGION_WIN'
|
|
|
|
toolsettings = context.tool_settings
|
2011-01-01 07:20:34 +00:00
|
|
|
|
2010-10-05 15:29:06 +00:00
|
|
|
# do smart things depending on whether uv_select_sync is on
|
2011-01-01 07:20:34 +00:00
|
|
|
|
2010-10-05 15:29:06 +00:00
|
|
|
if toolsettings.use_uv_select_sync:
|
2012-01-01 13:09:58 +00:00
|
|
|
props = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL')
|
|
|
|
props.value = "(True, False, False)"
|
|
|
|
props.data_path = "tool_settings.mesh_select_mode"
|
2010-10-05 15:29:06 +00:00
|
|
|
|
2012-01-01 13:09:58 +00:00
|
|
|
props = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL')
|
|
|
|
props.value = "(False, True, False)"
|
|
|
|
props.data_path = "tool_settings.mesh_select_mode"
|
2010-10-05 15:29:06 +00:00
|
|
|
|
2012-01-01 13:09:58 +00:00
|
|
|
props = layout.operator("wm.context_set_value", text="Face", icon='FACESEL')
|
|
|
|
props.value = "(False, False, True)"
|
|
|
|
props.data_path = "tool_settings.mesh_select_mode"
|
2010-10-05 15:29:06 +00:00
|
|
|
|
|
|
|
else:
|
2012-01-01 13:09:58 +00:00
|
|
|
props = layout.operator("wm.context_set_string", text="Vertex", icon='UV_VERTEXSEL')
|
|
|
|
props.value = 'VERTEX'
|
|
|
|
props.data_path = "tool_settings.uv_select_mode"
|
2010-10-05 15:29:06 +00:00
|
|
|
|
2012-01-01 13:09:58 +00:00
|
|
|
props = layout.operator("wm.context_set_string", text="Edge", icon='UV_EDGESEL')
|
|
|
|
props.value = 'EDGE'
|
|
|
|
props.data_path = "tool_settings.uv_select_mode"
|
2010-10-05 15:29:06 +00:00
|
|
|
|
2012-01-01 13:09:58 +00:00
|
|
|
props = layout.operator("wm.context_set_string", text="Face", icon='UV_FACESEL')
|
|
|
|
props.value = 'FACE'
|
|
|
|
props.data_path = "tool_settings.uv_select_mode"
|
2011-01-01 07:20:34 +00:00
|
|
|
|
2012-01-01 13:09:58 +00:00
|
|
|
props = layout.operator("wm.context_set_string", text="Island", icon='UV_ISLANDSEL')
|
|
|
|
props.value = 'ISLAND'
|
|
|
|
props.data_path = "tool_settings.uv_select_mode"
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_HT_header(Header):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sima = context.space_data
|
|
|
|
ima = sima.image
|
|
|
|
iuser = sima.image_user
|
2010-01-16 14:31:21 +00:00
|
|
|
toolsettings = context.tool_settings
|
2012-07-25 12:15:22 +00:00
|
|
|
mode = sima.mode
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-04-01 12:53:38 +00:00
|
|
|
show_render = sima.show_render
|
2009-11-14 13:35:44 +00:00
|
|
|
# show_paint = sima.show_paint
|
2009-10-31 19:31:45 +00:00
|
|
|
show_uvedit = sima.show_uvedit
|
2012-08-01 10:50:39 +00:00
|
|
|
show_maskedit = sima.show_maskedit
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.template_header()
|
|
|
|
|
|
|
|
# menus
|
|
|
|
if context.area.show_menus:
|
|
|
|
sub = row.row(align=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.menu("IMAGE_MT_view")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
if show_uvedit:
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.menu("IMAGE_MT_select")
|
2013-06-23 15:12:26 +00:00
|
|
|
if show_maskedit:
|
|
|
|
sub.menu("MASK_MT_select")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-18 07:14:10 +00:00
|
|
|
if ima and ima.is_dirty:
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.menu("IMAGE_MT_image", text="Image*")
|
2009-10-31 19:31:45 +00:00
|
|
|
else:
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.menu("IMAGE_MT_image", text="Image")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
if show_uvedit:
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.menu("IMAGE_MT_uvs")
|
2013-06-23 15:12:26 +00:00
|
|
|
if show_maskedit:
|
|
|
|
sub.menu("MASK_MT_mask")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2013-10-10 23:33:59 +00:00
|
|
|
layout.template_ID(sima, "image", new="image.new", open="image.open")
|
2010-04-01 12:53:38 +00:00
|
|
|
if not show_render:
|
2010-08-17 07:49:53 +00:00
|
|
|
layout.prop(sima, "use_image_pin", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2012-07-31 14:16:27 +00:00
|
|
|
layout.prop(sima, "mode", text="")
|
|
|
|
|
2012-08-06 12:12:45 +00:00
|
|
|
if show_maskedit:
|
|
|
|
row = layout.row()
|
|
|
|
row.template_ID(sima, "mask", new="mask.new")
|
|
|
|
|
|
|
|
if show_uvedit or show_maskedit:
|
|
|
|
layout.prop(sima, "pivot_point", text="", icon_only=True)
|
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
# uv editing
|
|
|
|
if show_uvedit:
|
|
|
|
uvedit = sima.uv_editor
|
|
|
|
|
2010-08-18 03:24:52 +00:00
|
|
|
layout.prop(toolsettings, "use_uv_select_sync", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-18 03:24:52 +00:00
|
|
|
if toolsettings.use_uv_select_sync:
|
2011-05-02 17:29:30 +00:00
|
|
|
layout.template_edit_mode_selection()
|
2009-10-31 19:31:45 +00:00
|
|
|
else:
|
2010-08-18 03:24:52 +00:00
|
|
|
layout.prop(toolsettings, "uv_select_mode", text="", expand=True)
|
2010-08-17 07:49:53 +00:00
|
|
|
layout.prop(uvedit, "sticky_select_mode", text="", icon_only=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-12-11 14:34:21 +00:00
|
|
|
row = layout.row(align=True)
|
2010-08-18 03:24:52 +00:00
|
|
|
row.prop(toolsettings, "proportional_edit", text="", icon_only=True)
|
|
|
|
if toolsettings.proportional_edit != 'DISABLED':
|
|
|
|
row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
|
2009-12-11 14:34:21 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
row = layout.row(align=True)
|
2010-08-18 03:42:26 +00:00
|
|
|
row.prop(toolsettings, "use_snap", text="")
|
2012-12-03 12:03:16 +00:00
|
|
|
row.prop(toolsettings, "snap_uv_element", text="", icon_only=True)
|
|
|
|
if toolsettings.snap_uv_element != 'INCREMENT':
|
|
|
|
row.prop(toolsettings, "snap_target", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-02-26 19:18:02 +00:00
|
|
|
mesh = context.edit_object.data
|
|
|
|
layout.prop_search(mesh.uv_textures, "active", mesh, "uv_textures", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
if ima:
|
|
|
|
# layers
|
|
|
|
layout.template_image_layers(ima, iuser)
|
|
|
|
|
|
|
|
# draw options
|
|
|
|
row = layout.row(align=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
row.prop(sima, "draw_channels", text="", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
if ima.type == 'COMPOSITE':
|
2009-12-10 10:23:53 +00:00
|
|
|
row.operator("image.record_composite", icon='REC')
|
2011-03-07 13:23:45 +00:00
|
|
|
if ima.type == 'COMPOSITE' and ima.source in {'MOVIE', 'SEQUENCE'}:
|
2009-12-10 10:23:53 +00:00
|
|
|
row.operator("image.play_composite", icon='PLAY')
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2012-08-03 20:56:04 +00:00
|
|
|
if show_uvedit or show_maskedit or mode == 'PAINT':
|
2010-08-17 07:49:53 +00:00
|
|
|
layout.prop(sima, "use_realtime_update", text="", icon_only=True, icon='LOCKED')
|
2009-06-16 01:22:56 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_PT_image_properties(Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Image"
|
2009-09-16 19:27:08 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2009-10-31 19:31:45 +00:00
|
|
|
sima = context.space_data
|
|
|
|
return (sima.image)
|
2009-09-16 19:27:08 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2009-09-16 19:27:08 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
sima = context.space_data
|
|
|
|
iuser = sima.image_user
|
2009-09-16 19:27:08 +00:00
|
|
|
|
2010-03-26 01:31:43 +00:00
|
|
|
layout.template_image(sima, "image", iuser)
|
2009-09-16 19:27:08 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_PT_game_properties(Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Game Properties"
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2009-10-31 19:31:45 +00:00
|
|
|
sima = context.space_data
|
2011-05-16 04:55:31 +00:00
|
|
|
# display even when not in game mode because these settings effect the 3d view
|
2011-05-26 09:33:51 +00:00
|
|
|
return (sima and sima.image) # and (rd.engine == 'BLENDER_GAME')
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sima = context.space_data
|
|
|
|
ima = sima.image
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2011-08-13 17:52:13 +00:00
|
|
|
col.prop(ima, "use_animation")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column(align=True)
|
2011-08-13 17:52:13 +00:00
|
|
|
sub.active = ima.use_animation
|
|
|
|
sub.prop(ima, "frame_start", text="Start")
|
|
|
|
sub.prop(ima, "frame_end", text="End")
|
|
|
|
sub.prop(ima, "fps", text="Speed")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-21 04:51:00 +00:00
|
|
|
col.prop(ima, "use_tiles")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column(align=True)
|
2010-10-02 06:34:04 +00:00
|
|
|
sub.active = ima.use_tiles or ima.use_animation
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(ima, "tiles_x", text="X")
|
|
|
|
sub.prop(ima, "tiles_y", text="Y")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="Clamp:")
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(ima, "use_clamp_x", text="X")
|
|
|
|
col.prop(ima, "use_clamp_y", text="Y")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.separator()
|
|
|
|
col.prop(ima, "mapping", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_PT_view_histogram(Panel):
|
2010-01-19 01:32:06 +00:00
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'PREVIEW'
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Histogram"
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2010-01-19 01:32:06 +00:00
|
|
|
sima = context.space_data
|
|
|
|
return (sima and sima.image)
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-01-19 01:32:06 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sima = context.space_data
|
2012-06-10 12:09:25 +00:00
|
|
|
hist = sima.scopes.histogram
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-04-06 02:05:54 +00:00
|
|
|
layout.template_histogram(sima.scopes, "histogram")
|
2012-06-10 12:09:25 +00:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(hist, "mode", icon_only=True, expand=True)
|
|
|
|
row.prop(hist, "show_line", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-04-17 19:05:53 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_PT_view_waveform(Panel):
|
2010-04-06 02:05:54 +00:00
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'PREVIEW'
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Waveform"
|
2010-04-06 02:05:54 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2010-04-06 02:05:54 +00:00
|
|
|
sima = context.space_data
|
|
|
|
return (sima and sima.image)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sima = context.space_data
|
2011-08-22 09:01:49 +00:00
|
|
|
|
2010-04-06 02:05:54 +00:00
|
|
|
layout.template_waveform(sima, "scopes")
|
2011-08-13 17:52:13 +00:00
|
|
|
row = layout.split(percentage=0.75)
|
|
|
|
row.prop(sima.scopes, "waveform_alpha")
|
|
|
|
row.prop(sima.scopes, "waveform_mode", text="", icon_only=True)
|
2010-04-17 19:05:53 +00:00
|
|
|
|
2010-04-06 02:05:54 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_PT_view_vectorscope(Panel):
|
2010-04-06 02:05:54 +00:00
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'PREVIEW'
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Vectorscope"
|
2010-04-06 02:05:54 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2010-04-06 02:05:54 +00:00
|
|
|
sima = context.space_data
|
|
|
|
return (sima and sima.image)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sima = context.space_data
|
|
|
|
layout.template_vectorscope(sima, "scopes")
|
|
|
|
layout.prop(sima.scopes, "vectorscope_alpha")
|
2010-04-04 14:52:15 +00:00
|
|
|
|
2010-04-17 19:05:53 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_PT_sample_line(Panel):
|
2010-03-23 23:36:24 +00:00
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'PREVIEW'
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Sample Line"
|
2010-03-23 23:36:24 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2010-03-23 23:36:24 +00:00
|
|
|
sima = context.space_data
|
|
|
|
return (sima and sima.image)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2011-08-22 09:01:49 +00:00
|
|
|
|
2010-03-23 23:36:24 +00:00
|
|
|
sima = context.space_data
|
2012-06-10 12:09:25 +00:00
|
|
|
hist = sima.sample_histogram
|
2011-08-22 09:01:49 +00:00
|
|
|
|
2011-08-13 17:52:13 +00:00
|
|
|
layout.operator("image.sample_line")
|
2010-03-23 23:36:24 +00:00
|
|
|
layout.template_histogram(sima, "sample_histogram")
|
2012-06-10 12:09:25 +00:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(hist, "mode", expand=True)
|
|
|
|
row.prop(hist, "show_line", text="")
|
2010-04-06 02:05:54 +00:00
|
|
|
|
2010-04-17 19:05:53 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_PT_scope_sample(Panel):
|
2010-04-06 02:05:54 +00:00
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'PREVIEW'
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Scope Samples"
|
2010-04-06 02:05:54 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2010-04-06 02:05:54 +00:00
|
|
|
sima = context.space_data
|
2010-05-03 16:00:42 +00:00
|
|
|
return sima
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-04-06 02:05:54 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2011-08-22 09:01:49 +00:00
|
|
|
|
2010-04-06 02:05:54 +00:00
|
|
|
sima = context.space_data
|
2011-08-22 09:01:49 +00:00
|
|
|
|
2011-08-13 17:52:13 +00:00
|
|
|
row = layout.row()
|
2010-04-06 02:05:54 +00:00
|
|
|
row.prop(sima.scopes, "use_full_resolution")
|
2011-08-13 17:52:13 +00:00
|
|
|
sub = row.row()
|
|
|
|
sub.active = not sima.scopes.use_full_resolution
|
|
|
|
sub.prop(sima.scopes, "accuracy")
|
2010-04-04 14:52:15 +00:00
|
|
|
|
2010-04-17 19:05:53 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_PT_view_properties(Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Display"
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2009-10-31 19:31:45 +00:00
|
|
|
sima = context.space_data
|
|
|
|
return (sima and (sima.image or sima.show_uvedit))
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sima = context.space_data
|
|
|
|
ima = sima.image
|
|
|
|
show_uvedit = sima.show_uvedit
|
2012-08-06 12:12:45 +00:00
|
|
|
show_maskedit = sima.show_maskedit
|
2009-10-31 19:31:45 +00:00
|
|
|
uvedit = sima.uv_editor
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
if ima:
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(ima, "display_aspect", text="Aspect Ratio")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Coordinates:")
|
|
|
|
col.prop(sima, "show_repeat", text="Repeat")
|
2009-10-31 19:31:45 +00:00
|
|
|
if show_uvedit:
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(uvedit, "show_normalized_coords", text="Normalized")
|
2010-01-19 01:32:06 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
elif show_uvedit:
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Coordinates:")
|
|
|
|
col.prop(uvedit, "show_normalized_coords", text="Normalized")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2012-08-06 12:12:45 +00:00
|
|
|
if show_uvedit or show_maskedit:
|
2010-03-30 05:52:05 +00:00
|
|
|
col = layout.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label("Cursor Location:")
|
2012-08-06 12:12:45 +00:00
|
|
|
col.row().prop(sima, "cursor_location", text="")
|
2011-08-22 09:01:49 +00:00
|
|
|
|
2012-08-06 12:12:45 +00:00
|
|
|
if show_uvedit:
|
2011-08-13 17:52:13 +00:00
|
|
|
col.separator()
|
2010-03-30 05:52:05 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
col.label(text="UVs:")
|
2011-08-13 17:52:13 +00:00
|
|
|
col.row().prop(uvedit, "edge_draw_type", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
2011-08-22 09:01:49 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
col = split.column()
|
2011-06-28 09:42:17 +00:00
|
|
|
col.prop(uvedit, "show_faces")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(uvedit, "show_smooth_edges", text="Smooth")
|
|
|
|
col.prop(uvedit, "show_modified_edges", text="Modified")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(uvedit, "show_stretch", text="Stretch")
|
2009-11-17 18:53:53 +00:00
|
|
|
sub = col.column()
|
2010-08-17 07:49:53 +00:00
|
|
|
sub.active = uvedit.show_stretch
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.row().prop(uvedit, "draw_stretch_type", expand=True)
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2012-01-18 05:54:19 +00:00
|
|
|
class IMAGE_PT_paint(Panel, ImagePaintPanel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Paint"
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2009-10-31 19:31:45 +00:00
|
|
|
sima = context.space_data
|
|
|
|
return sima.show_paint
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2010-01-16 14:31:21 +00:00
|
|
|
toolsettings = context.tool_settings.image_paint
|
|
|
|
brush = toolsettings.brush
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-08-13 17:52:13 +00:00
|
|
|
col = layout.column()
|
|
|
|
col.template_ID_preview(toolsettings, "brush", new="brush.add", rows=2, cols=6)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
if brush:
|
|
|
|
col = layout.column()
|
2013-04-30 10:32:02 +00:00
|
|
|
|
|
|
|
if brush.image_tool == 'DRAW' and brush.blend not in ('ERASE_ALPHA', 'ADD_ALPHA'):
|
|
|
|
col.template_color_picker(brush, "color", value_slider=True)
|
|
|
|
col.prop(brush, "color", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
row = col.row(align=True)
|
2012-01-19 18:22:55 +00:00
|
|
|
self.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
|
2012-01-18 00:41:39 +00:00
|
|
|
self.prop_unified_size(row, context, brush, "use_pressure_size")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
row = col.row(align=True)
|
2012-01-19 18:22:55 +00:00
|
|
|
self.prop_unified_strength(row, context, brush, "strength", slider=True, text="Strength")
|
2012-01-18 00:41:39 +00:00
|
|
|
self.prop_unified_strength(row, context, brush, "use_pressure_strength")
|
2012-02-04 11:10:41 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(brush, "blend", text="Blend")
|
2009-09-16 19:27:08 +00:00
|
|
|
|
2011-04-01 04:22:30 +00:00
|
|
|
if brush.image_tool == 'CLONE':
|
2010-02-02 17:41:32 +00:00
|
|
|
col.separator()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(brush, "clone_image", text="Image")
|
|
|
|
col.prop(brush, "clone_alpha", text="Alpha")
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2010-02-22 23:32:58 +00:00
|
|
|
|
2013-10-09 14:57:48 +00:00
|
|
|
class IMAGE_PT_tools_brush_overlay(BrushButtonsPanel, Panel):
|
|
|
|
bl_label = "Overlay"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2010-07-22 05:59:50 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
toolsettings = context.tool_settings.image_paint
|
|
|
|
brush = toolsettings.brush
|
2013-04-30 16:07:52 +00:00
|
|
|
tex_slot = brush.texture_slot
|
2013-10-09 14:57:48 +00:00
|
|
|
tex_slot_mask = brush.mask_texture_slot
|
2010-07-22 05:59:50 +00:00
|
|
|
|
|
|
|
col = layout.column()
|
2013-11-19 16:38:18 +00:00
|
|
|
|
2013-10-09 14:57:48 +00:00
|
|
|
col.label(text="Curve:")
|
2013-03-11 02:19:58 +00:00
|
|
|
|
2013-10-09 14:57:48 +00:00
|
|
|
row = col.row(align=True)
|
|
|
|
if brush.use_cursor_overlay:
|
|
|
|
row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
|
|
|
|
else:
|
|
|
|
row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
|
2010-07-22 05:59:50 +00:00
|
|
|
|
2013-10-09 14:57:48 +00:00
|
|
|
sub = row.row(align=True)
|
|
|
|
sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
|
|
|
|
sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
|
2013-03-30 11:40:09 +00:00
|
|
|
|
2013-10-09 14:57:48 +00:00
|
|
|
col.active = brush.brush_capabilities.has_overlay
|
|
|
|
col.label(text="Texture:")
|
2013-08-23 20:41:21 +00:00
|
|
|
row = col.row(align=True)
|
2013-04-30 16:07:52 +00:00
|
|
|
if tex_slot.map_mode != 'STENCIL':
|
|
|
|
if brush.use_primary_overlay:
|
|
|
|
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
|
|
|
|
else:
|
|
|
|
row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
|
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
sub = row.row(align=True)
|
2013-03-30 11:40:09 +00:00
|
|
|
sub.prop(brush, "texture_overlay_alpha", text="Alpha")
|
2013-04-30 16:07:52 +00:00
|
|
|
sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
|
2013-04-16 15:02:41 +00:00
|
|
|
|
2013-10-09 14:57:48 +00:00
|
|
|
col.label(text="Mask Texture:")
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
if tex_slot_mask.map_mode != 'STENCIL':
|
|
|
|
if brush.use_secondary_overlay:
|
|
|
|
row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
|
|
|
|
else:
|
|
|
|
row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
|
|
|
|
|
|
|
|
sub = row.row(align=True)
|
|
|
|
sub.prop(brush, "mask_overlay_alpha", text="Alpha")
|
|
|
|
sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
|
|
|
|
|
|
|
|
|
|
|
|
class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
|
|
|
|
bl_label = "Texture"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
toolsettings = context.tool_settings.image_paint
|
|
|
|
brush = toolsettings.brush
|
|
|
|
tex_slot = brush.texture_slot
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
|
|
|
|
|
|
|
|
brush_texture_settings(col, brush, 0)
|
|
|
|
|
2013-03-30 11:40:09 +00:00
|
|
|
|
2013-03-25 01:00:16 +00:00
|
|
|
class IMAGE_PT_tools_mask_texture(BrushButtonsPanel, Panel):
|
|
|
|
bl_label = "Texture Mask"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
brush = context.tool_settings.image_paint.brush
|
|
|
|
tex_slot_alpha = brush.mask_texture_slot
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
col.template_ID_preview(brush, "mask_texture", new="texture.new", rows=3, cols=8)
|
|
|
|
|
|
|
|
brush_mask_texture_settings(col, brush)
|
2013-04-30 06:07:42 +00:00
|
|
|
|
2013-03-25 01:00:16 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Tool"
|
2010-11-02 22:04:41 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2012-01-17 17:57:20 +00:00
|
|
|
toolsettings = context.tool_settings.image_paint
|
|
|
|
brush = toolsettings.brush
|
2010-11-02 22:04:41 +00:00
|
|
|
|
2011-08-13 17:52:13 +00:00
|
|
|
layout.prop(brush, "image_tool", text="")
|
2010-11-02 22:04:41 +00:00
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(brush, "use_paint_sculpt", text="", icon='SCULPTMODE_HLT')
|
|
|
|
row.prop(brush, "use_paint_vertex", text="", icon='VPAINT_HLT')
|
|
|
|
row.prop(brush, "use_paint_weight", text="", icon='WPAINT_HLT')
|
2011-04-01 04:22:30 +00:00
|
|
|
row.prop(brush, "use_paint_image", text="", icon='TPAINT_HLT')
|
2010-11-02 22:04:41 +00:00
|
|
|
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_PT_paint_stroke(BrushButtonsPanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Paint Stroke"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2010-01-16 14:31:21 +00:00
|
|
|
toolsettings = context.tool_settings.image_paint
|
|
|
|
brush = toolsettings.brush
|
2013-03-28 19:33:14 +00:00
|
|
|
|
2013-03-15 09:19:41 +00:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(toolsettings, "input_samples")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2013-03-30 11:40:09 +00:00
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
col.label(text="Stroke Method:")
|
2013-04-07 01:38:03 +00:00
|
|
|
|
2013-03-30 11:40:09 +00:00
|
|
|
col.prop(brush, "stroke_method", text="")
|
|
|
|
|
|
|
|
if brush.use_anchor:
|
|
|
|
col.separator()
|
|
|
|
col.prop(brush, "use_edge_to_edge", "Edge To Edge")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2013-03-30 11:40:09 +00:00
|
|
|
if brush.use_airbrush:
|
|
|
|
col.separator()
|
|
|
|
col.prop(brush, "rate", text="Rate", slider=True)
|
|
|
|
|
|
|
|
if brush.use_space:
|
|
|
|
col.separator()
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.active = brush.use_space
|
|
|
|
row.prop(brush, "spacing", text="Spacing")
|
|
|
|
row.prop(brush, "use_pressure_spacing", toggle=True, text="")
|
|
|
|
|
|
|
|
col = layout.column()
|
2013-03-15 09:19:41 +00:00
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col.prop(brush, "use_smooth_stroke")
|
|
|
|
|
2013-03-30 11:40:09 +00:00
|
|
|
sub = col.column()
|
|
|
|
sub.active = brush.use_smooth_stroke
|
|
|
|
sub.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
|
|
|
|
sub.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
|
2013-03-15 09:19:41 +00:00
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
2013-03-30 11:40:09 +00:00
|
|
|
if brush.use_relative_jitter:
|
|
|
|
row.prop(brush, "use_relative_jitter", text="", icon='LOCKED')
|
|
|
|
row.prop(brush, "jitter", slider=True)
|
|
|
|
else:
|
|
|
|
row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
|
|
|
|
row.prop(brush, "jitter_absolute")
|
|
|
|
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
|
2009-09-16 19:27:08 +00:00
|
|
|
|
2013-03-15 09:19:41 +00:00
|
|
|
col.prop(brush, "use_wrap")
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2010-02-22 23:32:58 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class IMAGE_PT_paint_curve(BrushButtonsPanel, Panel):
|
2011-09-15 13:20:18 +00:00
|
|
|
bl_label = "Paint Curve"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2010-01-16 14:31:21 +00:00
|
|
|
toolsettings = context.tool_settings.image_paint
|
|
|
|
brush = toolsettings.brush
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2012-09-11 02:18:27 +00:00
|
|
|
layout.template_curve_mapping(brush, "curve")
|
2009-09-16 19:27:08 +00:00
|
|
|
|
2010-07-22 11:21:21 +00:00
|
|
|
row = layout.row(align=True)
|
2011-11-08 01:32:34 +00:00
|
|
|
row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH'
|
|
|
|
row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND'
|
|
|
|
row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT'
|
|
|
|
row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP'
|
|
|
|
row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE'
|
|
|
|
row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX'
|
2011-04-04 10:13:04 +00:00
|
|
|
|
2012-01-17 16:31:13 +00:00
|
|
|
|
2013-05-01 15:28:56 +00:00
|
|
|
class IMAGE_PT_tools_brush_appearance(BrushButtonsPanel, Panel):
|
|
|
|
bl_label = "Appearance"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
toolsettings = context.tool_settings.image_paint
|
|
|
|
brush = toolsettings.brush
|
|
|
|
|
|
|
|
if brush is None: # unlikely but can happen
|
|
|
|
layout.label(text="Brush Unset")
|
|
|
|
return
|
|
|
|
|
|
|
|
col = layout.column()
|
2013-06-27 03:05:19 +00:00
|
|
|
col.prop(toolsettings, "show_brush")
|
2013-05-01 15:28:56 +00:00
|
|
|
|
|
|
|
col = col.column()
|
|
|
|
col.prop(brush, "cursor_color_add", text="")
|
|
|
|
col.active = toolsettings.show_brush
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(brush, "use_custom_icon")
|
|
|
|
if brush.use_custom_icon:
|
|
|
|
col.prop(brush, "icon_filepath", text="")
|
|
|
|
|
|
|
|
|
2012-01-18 06:11:56 +00:00
|
|
|
class IMAGE_UV_sculpt_curve(Panel):
|
2012-01-17 16:31:13 +00:00
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_label = "UV Sculpt Curve"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
sima = context.space_data
|
|
|
|
toolsettings = context.tool_settings.image_paint
|
|
|
|
return sima.show_uvedit and context.tool_settings.use_uv_sculpt and not (sima.show_paint and toolsettings.brush)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2012-01-17 18:32:14 +00:00
|
|
|
toolsettings = context.tool_settings
|
|
|
|
uvsculpt = toolsettings.uv_sculpt
|
|
|
|
brush = uvsculpt.brush
|
2012-01-17 16:31:13 +00:00
|
|
|
|
|
|
|
layout.template_curve_mapping(brush, "curve")
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
2012-07-04 21:41:05 +00:00
|
|
|
row.operator("brush.curve_preset", icon='SMOOTHCURVE', text="").shape = 'SMOOTH'
|
|
|
|
row.operator("brush.curve_preset", icon='SPHERECURVE', text="").shape = 'ROUND'
|
|
|
|
row.operator("brush.curve_preset", icon='ROOTCURVE', text="").shape = 'ROOT'
|
|
|
|
row.operator("brush.curve_preset", icon='SHARPCURVE', text="").shape = 'SHARP'
|
|
|
|
row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE'
|
|
|
|
row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX'
|
2012-01-17 16:31:13 +00:00
|
|
|
|
|
|
|
|
2012-01-18 05:54:19 +00:00
|
|
|
class IMAGE_UV_sculpt(Panel, ImagePaintPanel):
|
2012-01-17 16:31:13 +00:00
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_label = "UV Sculpt"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
sima = context.space_data
|
|
|
|
toolsettings = context.tool_settings.image_paint
|
|
|
|
return sima.show_uvedit and context.tool_settings.use_uv_sculpt and not (sima.show_paint and toolsettings.brush)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2012-01-17 18:32:14 +00:00
|
|
|
toolsettings = context.tool_settings
|
|
|
|
uvsculpt = toolsettings.uv_sculpt
|
|
|
|
brush = uvsculpt.brush
|
2012-01-17 16:31:13 +00:00
|
|
|
|
|
|
|
if brush:
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
2012-01-19 18:22:55 +00:00
|
|
|
self.prop_unified_size(row, context, brush, "size", slider=True, text="Radius")
|
2012-01-18 00:41:39 +00:00
|
|
|
self.prop_unified_size(row, context, brush, "use_pressure_size")
|
2012-01-17 16:31:13 +00:00
|
|
|
|
|
|
|
row = col.row(align=True)
|
2012-01-19 18:22:55 +00:00
|
|
|
self.prop_unified_strength(row, context, brush, "strength", slider=True, text="Strength")
|
2012-01-18 00:41:39 +00:00
|
|
|
self.prop_unified_strength(row, context, brush, "use_pressure_strength")
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2012-07-29 10:03:46 +00:00
|
|
|
col = layout.column()
|
2012-01-17 17:57:20 +00:00
|
|
|
col.prop(toolsettings, "uv_sculpt_lock_borders")
|
|
|
|
col.prop(toolsettings, "uv_sculpt_all_islands")
|
|
|
|
col.prop(toolsettings, "uv_sculpt_tool")
|
|
|
|
|
|
|
|
if toolsettings.uv_sculpt_tool == 'RELAX':
|
|
|
|
col.prop(toolsettings, "uv_relax_method")
|
2012-01-17 16:31:13 +00:00
|
|
|
|
|
|
|
|
2012-07-25 13:44:07 +00:00
|
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Mask (similar code in space_clip.py, keep in sync)
|
|
|
|
# note! - panel placement does _not_ fit well with image panels... need to fix
|
|
|
|
|
|
|
|
from bl_ui.properties_mask_common import (MASK_PT_mask,
|
|
|
|
MASK_PT_layers,
|
|
|
|
MASK_PT_spline,
|
|
|
|
MASK_PT_point,
|
|
|
|
MASK_PT_display,
|
|
|
|
MASK_PT_tools)
|
|
|
|
|
|
|
|
|
|
|
|
class IMAGE_PT_mask(MASK_PT_mask, Panel):
|
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'PREVIEW'
|
|
|
|
|
|
|
|
|
|
|
|
class IMAGE_PT_mask_layers(MASK_PT_layers, Panel):
|
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'PREVIEW'
|
|
|
|
|
|
|
|
|
|
|
|
class IMAGE_PT_mask_display(MASK_PT_display, Panel):
|
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'PREVIEW'
|
|
|
|
|
|
|
|
|
|
|
|
class IMAGE_PT_active_mask_spline(MASK_PT_spline, Panel):
|
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'PREVIEW'
|
|
|
|
|
|
|
|
|
|
|
|
class IMAGE_PT_active_mask_point(MASK_PT_point, Panel):
|
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'PREVIEW'
|
|
|
|
|
2012-07-29 12:07:06 +00:00
|
|
|
|
2012-07-25 13:44:07 +00:00
|
|
|
class IMAGE_PT_tools_mask(MASK_PT_tools, Panel):
|
|
|
|
bl_space_type = 'IMAGE_EDITOR'
|
|
|
|
bl_region_type = 'UI' # is 'TOOLS' in the clip editor
|
|
|
|
|
|
|
|
# --- end mask ---
|
|
|
|
|
2011-04-04 10:13:04 +00:00
|
|
|
if __name__ == "__main__": # only for live edit.
|
|
|
|
bpy.utils.register_module(__name__)
|