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>
|
2014-07-21 12:02:05 +02:00
|
|
|
from bpy.types import Menu, Panel, UIList
|
2017-10-21 12:41:42 +11:00
|
|
|
from .properties_grease_pencil_common import (
|
2018-07-31 21:06:08 +10:00
|
|
|
GreasePencilStrokeEditPanel,
|
|
|
|
GreasePencilStrokeSculptPanel,
|
2018-09-21 20:15:25 +02:00
|
|
|
GreasePencilSculptOptionsPanel,
|
2018-07-31 21:06:08 +10:00
|
|
|
GreasePencilAppearancePanel,
|
|
|
|
)
|
2017-10-21 12:41:42 +11:00
|
|
|
from .properties_paint_common import (
|
2018-07-31 21:06:08 +10:00
|
|
|
UnifiedPaintPanel,
|
|
|
|
brush_mask_texture_settings,
|
2019-01-02 14:36:56 +11:00
|
|
|
brush_texpaint_common,
|
2019-03-19 18:17:50 +01:00
|
|
|
brush_texpaint_common_color,
|
|
|
|
brush_texpaint_common_gradient,
|
|
|
|
brush_texpaint_common_clone,
|
|
|
|
brush_texpaint_common_options,
|
2019-01-02 14:36:56 +11:00
|
|
|
brush_texture_settings,
|
2018-07-31 21:06:08 +10:00
|
|
|
)
|
2019-03-13 12:41:22 +11:00
|
|
|
from bl_ui.utils import PresetPanel
|
2009-07-02 11:24:27 +00:00
|
|
|
|
2011-06-24 03:30:50 +00:00
|
|
|
|
2015-01-29 15:35:06 +11:00
|
|
|
class View3DPanel:
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_space_type = 'VIEW_3D'
|
|
|
|
bl_region_type = 'UI'
|
2009-08-15 19:40:09 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
Grease Pencil Todos: "Sketching Sessions"
Due to popular request and usability considerations, this commit
reintroduces functionality similar to 2.4's "Draw Mode" for Grease
Pencil.
In the toolbar under the Draw/Line/Eraser buttons, you can find the
"Use Sketching Sessions" toggle, which enables this feature. This is a
per-scene setting, and defaults to off, so that the current 2.5
behaviour is still the default (i.e. the Grease Pencil operator will
only do a single stroke at a time).
With this option enabled, drawing with Grease Pencil will enter a
semi-modal state where you can draw multiple strokes without needing
to keep holding the DKEY throughout (though you'll still need to do so
to start the strokes, unless you use some toolbar buttons), while
still being able to manipulate the viewport. Header help-text prints
show the appropriate keybindings (i.e. press ESCKEY or ENTER to end
the sketching session).
Notes:
- To aid maintainability of the 3D-View toolbar code, I've taken the
liberty to factor out the groups of widgets which commonly occur in
most of the toolbars into separate functions (namely "Repeat" and
"Grease Pencil"). Perhaps it might make it slightly harder to newbies
to the toolbar code to grasp, though the physics panels are far worse
;)
- I've reshuffled some code in the Grease Pencil code to separate out
the various states of operation again more clearly, though some more
work is still needed there (TODO)
- There can now be only one Grease Pencil operator running at a time
- Redoing Grease Pencil operations where sketching sessions was
enabled still needs work. Namely, a way of delimiting the set of
points recorded into strokes is still needed (TODO)
- Ultimately, it should be possible to switch tools midway through a
session. Currently sessions are limited to only being able to be used
with a single drawing mode (TODO)
- After ending a drawing session, the titlebar contols may not work on
Windows without manually making the main window lose focus and then
regain (i.e. click on some other window in toolbar, then come back).
This may be related to (bug #25480)
2011-01-04 03:14:01 +00:00
|
|
|
# **************** standard tool clusters ******************
|
|
|
|
|
2017-09-28 01:38:17 +10:00
|
|
|
# Used by vertex & weight paint
|
|
|
|
def draw_vpaint_symmetry(layout, vpaint):
|
|
|
|
|
2018-06-10 15:55:19 +02:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.alignment = 'RIGHT'
|
|
|
|
col.label(text="Mirror")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
row = col.row(align=True)
|
2017-09-28 01:38:17 +10:00
|
|
|
row.prop(vpaint, "use_symmetry_x", text="X", toggle=True)
|
|
|
|
row.prop(vpaint, "use_symmetry_y", text="Y", toggle=True)
|
|
|
|
row.prop(vpaint, "use_symmetry_z", text="Z", toggle=True)
|
|
|
|
|
|
|
|
col = layout.column()
|
2018-06-10 15:55:19 +02:00
|
|
|
col.use_property_split = True
|
2018-10-25 15:27:31 +02:00
|
|
|
col.use_property_decorate = False
|
2017-09-28 01:38:17 +10:00
|
|
|
col.prop(vpaint, "radial_symmetry", text="Radial")
|
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
# Most of these panels should not be visible in GP edit modes
|
2018-07-31 21:06:08 +10:00
|
|
|
|
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
def is_not_gpencil_edit_mode(context):
|
2018-07-31 21:06:08 +10:00
|
|
|
is_gpmode = (
|
|
|
|
context.active_object and
|
2018-12-14 16:45:57 +01:00
|
|
|
context.active_object.mode in {'EDIT_GPENCIL', 'PAINT_GPENCIL', 'SCULPT_GPENCIL', 'WEIGHT_GPENCIL'}
|
2018-07-31 21:06:08 +10:00
|
|
|
)
|
2018-07-31 10:22:19 +02:00
|
|
|
return not is_gpmode
|
|
|
|
|
2013-12-22 17:13:29 -06:00
|
|
|
|
|
|
|
# ********** default tools for editmode_mesh ****************
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel):
|
2019-05-16 22:13:28 +10:00
|
|
|
bl_category = "Tool"
|
2018-06-05 16:35:20 +02:00
|
|
|
bl_context = ".mesh_edit" # dot on purpose (access from topbar)
|
2019-03-20 14:09:55 +01:00
|
|
|
bl_label = "Options"
|
2011-11-08 01:32:34 +00:00
|
|
|
|
2011-11-05 10:34:29 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
return context.active_object
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2018-08-30 09:05:48 +10:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
2009-11-04 16:26:08 +00:00
|
|
|
ob = context.active_object
|
2009-10-19 13:24:18 +00:00
|
|
|
|
2011-11-05 10:34:29 +00:00
|
|
|
tool_settings = context.tool_settings
|
|
|
|
mesh = ob.data
|
2011-11-05 10:19:36 +00:00
|
|
|
|
2011-11-05 10:34:29 +00:00
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(mesh, "use_mirror_x")
|
2011-03-10 05:52:16 +00:00
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
row = col.row(align=True)
|
2011-11-05 10:34:29 +00:00
|
|
|
row.active = ob.data.use_mirror_x
|
|
|
|
row.prop(mesh, "use_mirror_topology")
|
2011-03-10 05:52:16 +00:00
|
|
|
|
2019-02-11 17:49:35 +11:00
|
|
|
layout.prop(tool_settings, "use_edge_path_live_unwrap")
|
2019-05-21 15:04:21 +10:00
|
|
|
layout.prop(tool_settings, "use_mesh_automerge", toggle=False)
|
2018-06-12 21:16:50 +02:00
|
|
|
|
2018-10-31 17:23:43 +01:00
|
|
|
layout.prop(tool_settings, "double_threshold")
|
2009-07-02 11:24:27 +00:00
|
|
|
|
|
|
|
# ********** default tools for editmode_curve ****************
|
|
|
|
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2016-04-15 18:10:05 +10:00
|
|
|
class VIEW3D_PT_tools_curveedit_options_stroke(View3DPanel, Panel):
|
2019-05-16 22:13:28 +10:00
|
|
|
bl_category = "Tool"
|
2018-06-05 16:35:20 +02:00
|
|
|
bl_context = ".curve_edit" # dot on purpose (access from topbar)
|
2016-04-15 18:10:05 +10:00
|
|
|
bl_label = "Curve Stroke"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
tool_settings = context.tool_settings
|
|
|
|
cps = tool_settings.curve_paint_settings
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
col.prop(cps, "curve_type")
|
|
|
|
|
|
|
|
if cps.curve_type == 'BEZIER':
|
2018-08-28 12:34:51 +10:00
|
|
|
col.label(text="Bezier Options:")
|
2016-04-15 18:10:05 +10:00
|
|
|
col.prop(cps, "error_threshold")
|
2016-07-25 14:14:31 +10:00
|
|
|
col.prop(cps, "fit_method")
|
2016-04-15 18:10:05 +10:00
|
|
|
col.prop(cps, "use_corners_detect")
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.active = cps.use_corners_detect
|
|
|
|
col.prop(cps, "corner_angle")
|
|
|
|
|
2018-08-28 12:34:51 +10:00
|
|
|
col.label(text="Pressure Radius:")
|
2016-04-15 18:10:05 +10:00
|
|
|
row = layout.row(align=True)
|
|
|
|
rowsub = row.row(align=True)
|
|
|
|
rowsub.prop(cps, "radius_min", text="Min")
|
|
|
|
rowsub.prop(cps, "radius_max", text="Max")
|
|
|
|
|
|
|
|
row.prop(cps, "use_pressure_radius", text="", icon_only=True)
|
|
|
|
|
|
|
|
col = layout.column()
|
2018-08-28 12:34:51 +10:00
|
|
|
col.label(text="Taper Radius:")
|
2016-04-15 18:10:05 +10:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(cps, "radius_taper_start", text="Start")
|
|
|
|
row.prop(cps, "radius_taper_end", text="End")
|
|
|
|
|
|
|
|
col = layout.column()
|
2018-08-28 12:34:51 +10:00
|
|
|
col.label(text="Projection Depth:")
|
2016-04-15 18:10:05 +10:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(cps, "depth_mode", expand=True)
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
if cps.depth_mode == 'SURFACE':
|
2016-05-04 15:45:55 +10:00
|
|
|
col.prop(cps, "surface_offset")
|
|
|
|
col.prop(cps, "use_offset_absolute")
|
2016-04-15 18:10:05 +10:00
|
|
|
col.prop(cps, "use_stroke_endpoints")
|
|
|
|
if cps.use_stroke_endpoints:
|
|
|
|
colsub = layout.column(align=True)
|
|
|
|
colsub.prop(cps, "surface_plane", expand=True)
|
|
|
|
|
2016-08-01 11:54:02 +10:00
|
|
|
|
2009-07-02 11:24:27 +00:00
|
|
|
# ********** default tools for editmode_armature ****************
|
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class VIEW3D_PT_tools_armatureedit_options(View3DPanel, Panel):
|
2019-05-16 22:13:28 +10:00
|
|
|
bl_category = "Tool"
|
2018-04-25 08:16:21 +02:00
|
|
|
bl_context = ".armature_edit" # dot on purpose (access from topbar)
|
2019-05-16 22:13:28 +10:00
|
|
|
bl_label = "Options"
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
arm = context.active_object.data
|
2009-10-27 12:46:20 +00:00
|
|
|
|
2011-04-01 21:37:40 +00:00
|
|
|
self.layout.prop(arm, "use_mirror_x")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
2014-04-17 14:50:06 +02:00
|
|
|
|
2011-10-17 06:58:07 +00:00
|
|
|
# ********** default tools for pose-mode ****************
|
2009-07-02 11:24:27 +00:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class VIEW3D_PT_tools_posemode_options(View3DPanel, Panel):
|
2019-05-16 22:13:28 +10:00
|
|
|
bl_category = "Tool"
|
2018-06-05 16:35:20 +02:00
|
|
|
bl_context = ".posemode" # dot on purpose (access from topbar)
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Pose Options"
|
|
|
|
|
|
|
|
def draw(self, context):
|
2019-05-09 11:19:38 +02:00
|
|
|
pose = context.active_object.pose
|
2019-05-06 09:47:45 +02:00
|
|
|
layout = self.layout
|
2009-10-19 13:24:18 +00:00
|
|
|
|
2019-05-09 11:19:38 +02:00
|
|
|
layout.prop(pose, "use_auto_ik")
|
|
|
|
layout.prop(pose, "use_mirror_x")
|
2019-05-06 09:47:45 +02:00
|
|
|
col = layout.column()
|
2019-05-09 11:19:38 +02:00
|
|
|
col.active = pose.use_mirror_x
|
|
|
|
col.prop(pose, "use_mirror_relative")
|
2009-07-02 11:24:27 +00:00
|
|
|
|
2009-07-24 11:14:59 +00:00
|
|
|
# ********** default tools for paint modes ****************
|
2009-07-02 11:24:27 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2012-01-18 05:54:19 +00:00
|
|
|
class View3DPaintPanel(UnifiedPaintPanel):
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_space_type = 'VIEW_3D'
|
|
|
|
bl_region_type = 'UI'
|
|
|
|
bl_category = "Tool"
|
2009-07-20 16:39:16 +00:00
|
|
|
|
2019-03-20 10:44:13 +11:00
|
|
|
|
2019-03-18 21:30:56 +01:00
|
|
|
class VIEW3D_PT_tools_particlemode(Panel, View3DPaintPanel):
|
2018-04-30 16:59:16 +02:00
|
|
|
bl_context = ".paint_common" # dot on purpose (access from topbar)
|
2019-03-18 21:30:56 +01:00
|
|
|
bl_label = "Particle tools"
|
|
|
|
bl_options = {'HIDE_HEADER'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2019-03-18 21:30:56 +01:00
|
|
|
settings = cls.paint_settings(context)
|
|
|
|
return (settings and settings.brush and context.particle_edit_object)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2011-07-11 05:50:49 +00:00
|
|
|
settings = self.paint_settings(context)
|
2009-10-31 19:31:45 +00:00
|
|
|
brush = settings.brush
|
2019-03-18 21:30:56 +01:00
|
|
|
tool = settings.tool
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-03-18 21:30:56 +01:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False # No animation.
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-03-20 10:44:13 +11:00
|
|
|
if tool is not None:
|
2019-03-18 21:30:56 +01:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(brush, "size", slider=True)
|
|
|
|
if tool == 'ADD':
|
|
|
|
col.prop(brush, "count")
|
2011-10-12 00:47:50 +00:00
|
|
|
|
2018-08-02 22:10:38 +10:00
|
|
|
col = layout.column()
|
2019-03-18 21:30:56 +01:00
|
|
|
col.prop(settings, "use_default_interpolate")
|
|
|
|
col.prop(brush, "steps", slider=True)
|
|
|
|
col.prop(settings, "default_key_count", slider=True)
|
|
|
|
else:
|
|
|
|
col.prop(brush, "strength", slider=True)
|
|
|
|
|
|
|
|
if tool == 'LENGTH':
|
|
|
|
layout.row().prop(brush, "length_mode", expand=True)
|
|
|
|
elif tool == 'PUFF':
|
|
|
|
layout.row().prop(brush, "puff_mode", expand=True)
|
|
|
|
layout.prop(brush, "use_puff_volume")
|
|
|
|
elif tool == 'COMB':
|
|
|
|
layout.prop(settings, "use_emitter_deflect", text="Deflect Emitter")
|
2018-08-29 15:45:51 +10:00
|
|
|
col = layout.column()
|
2019-03-18 21:30:56 +01:00
|
|
|
col.active = settings.use_emitter_deflect
|
|
|
|
col.prop(settings, "emitter_distance", text="Distance")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
|
2019-03-18 21:30:56 +01:00
|
|
|
# TODO, move to space_view3d.py
|
|
|
|
class VIEW3D_PT_tools_brush(Panel, View3DPaintPanel):
|
|
|
|
bl_context = ".paint_common" # dot on purpose (access from topbar)
|
|
|
|
bl_label = "Brush"
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-03-18 21:30:56 +01:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
settings = cls.paint_settings(context)
|
|
|
|
return (settings and
|
|
|
|
settings.brush and
|
|
|
|
(context.sculpt_object or
|
|
|
|
context.vertex_paint_object or
|
|
|
|
context.weight_paint_object or
|
|
|
|
context.image_paint_object))
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2019-03-19 18:17:50 +01:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False # No animation.
|
|
|
|
|
2019-03-18 21:30:56 +01:00
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
|
|
|
|
2019-03-19 18:17:50 +01:00
|
|
|
if not self.is_popover:
|
|
|
|
col = layout.split().column()
|
|
|
|
col.template_ID_preview(settings, "brush", new="brush.add", rows=3, cols=8)
|
2019-03-18 21:30:56 +01:00
|
|
|
|
|
|
|
# Sculpt Mode #
|
|
|
|
if context.sculpt_object and brush:
|
2019-01-02 14:36:56 +11:00
|
|
|
from .properties_paint_common import (
|
|
|
|
brush_basic_sculpt_settings,
|
|
|
|
)
|
|
|
|
|
2012-03-15 09:11:16 +00:00
|
|
|
capabilities = brush.sculpt_capabilities
|
2010-07-14 14:11:03 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
col = layout.column()
|
2010-07-14 14:11:03 +00:00
|
|
|
|
2019-01-02 14:36:56 +11:00
|
|
|
if not self.is_popover:
|
|
|
|
brush_basic_sculpt_settings(col, context, brush)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-01-23 18:38:40 +01:00
|
|
|
# topology_rake_factor
|
2019-03-20 10:44:13 +11:00
|
|
|
if (
|
|
|
|
capabilities.has_topology_rake and
|
|
|
|
context.sculpt_object.use_dynamic_topology_sculpting
|
2019-01-24 09:27:14 +11:00
|
|
|
):
|
2019-01-23 18:38:40 +01:00
|
|
|
row = col.row()
|
|
|
|
row.prop(brush, "topology_rake_factor", slider=True)
|
|
|
|
|
2012-03-15 09:11:16 +00:00
|
|
|
# auto_smooth_factor and use_inverse_smooth_pressure
|
|
|
|
if capabilities.has_auto_smooth:
|
2010-07-14 14:11:03 +00:00
|
|
|
row = col.row(align=True)
|
2010-08-18 03:56:14 +00:00
|
|
|
row.prop(brush, "auto_smooth_factor", slider=True)
|
2010-07-14 14:11:03 +00:00
|
|
|
row.prop(brush, "use_inverse_smooth_pressure", toggle=True, text="")
|
|
|
|
|
2012-03-15 09:11:16 +00:00
|
|
|
# normal_weight
|
|
|
|
if capabilities.has_normal_weight:
|
2010-07-14 14:11:03 +00:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(brush, "normal_weight", slider=True)
|
|
|
|
|
2012-03-15 09:11:16 +00:00
|
|
|
# crease_pinch_factor
|
|
|
|
if capabilities.has_pinch_factor:
|
2010-07-14 14:11:03 +00:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(brush, "crease_pinch_factor", slider=True, text="Pinch")
|
|
|
|
|
2016-01-21 21:05:49 +11:00
|
|
|
# rake_factor
|
|
|
|
if capabilities.has_rake_factor:
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(brush, "rake_factor", slider=True)
|
|
|
|
|
2012-05-10 20:35:32 +00:00
|
|
|
if brush.sculpt_tool == 'MASK':
|
2019-03-19 18:17:50 +01:00
|
|
|
col.prop(brush, "mask_tool")
|
2012-05-10 20:35:32 +00:00
|
|
|
|
2012-03-15 09:11:16 +00:00
|
|
|
# plane_offset, use_offset_pressure, use_plane_trim, plane_trim
|
|
|
|
if capabilities.has_plane_offset:
|
2010-07-14 14:11:03 +00:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(brush, "plane_offset", slider=True)
|
|
|
|
row.prop(brush, "use_offset_pressure", text="")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
2010-09-07 15:17:42 +00:00
|
|
|
row = col.row()
|
2019-03-19 18:17:50 +01:00
|
|
|
row.prop(brush, "use_plane_trim", text="Plane Trim")
|
2010-09-07 15:17:42 +00:00
|
|
|
row = col.row()
|
|
|
|
row.active = brush.use_plane_trim
|
2010-07-14 14:11:03 +00:00
|
|
|
row.prop(brush, "plane_trim", slider=True, text="Distance")
|
|
|
|
|
2012-03-15 09:11:16 +00:00
|
|
|
# height
|
|
|
|
if capabilities.has_height:
|
2011-02-25 16:54:09 +00:00
|
|
|
row = col.row()
|
|
|
|
row.prop(brush, "height", slider=True, text="Height")
|
|
|
|
|
2012-03-15 09:11:16 +00:00
|
|
|
# use_persistent, set_persistent_base
|
|
|
|
if capabilities.has_persistence:
|
2010-07-14 14:11:03 +00:00
|
|
|
ob = context.sculpt_object
|
|
|
|
do_persistent = True
|
|
|
|
|
|
|
|
# not supported yet for this case
|
|
|
|
for md in ob.modifiers:
|
|
|
|
if md.type == 'MULTIRES':
|
|
|
|
do_persistent = False
|
2013-04-20 13:23:53 +00:00
|
|
|
break
|
2010-07-14 14:11:03 +00:00
|
|
|
|
|
|
|
if do_persistent:
|
|
|
|
col.prop(brush, "use_persistent")
|
|
|
|
col.operator("sculpt.set_persistent_base")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
# Texture Paint Mode #
|
|
|
|
|
2011-04-01 04:22:30 +00:00
|
|
|
elif context.image_paint_object and brush:
|
2014-07-21 19:24:03 +02:00
|
|
|
brush_texpaint_common(self, context, layout, brush, settings, True)
|
2010-04-04 14:52:15 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
# Weight Paint Mode #
|
|
|
|
elif context.weight_paint_object and brush:
|
2019-01-02 14:36:56 +11:00
|
|
|
from .properties_paint_common import (
|
|
|
|
brush_basic_wpaint_settings,
|
|
|
|
)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = layout.column()
|
2010-07-22 18:56:46 +00:00
|
|
|
|
2019-01-02 14:36:56 +11:00
|
|
|
if not self.is_popover:
|
|
|
|
brush_basic_wpaint_settings(col, context, brush)
|
2012-06-20 09:34:26 +00:00
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
# Vertex Paint Mode #
|
|
|
|
elif context.vertex_paint_object and brush:
|
2019-01-02 14:36:56 +11:00
|
|
|
from .properties_paint_common import (
|
|
|
|
brush_basic_vpaint_settings,
|
|
|
|
)
|
|
|
|
|
|
|
|
if not self.is_popover:
|
|
|
|
brush_basic_vpaint_settings(col, context, brush)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2012-06-20 09:34:26 +00:00
|
|
|
|
2019-03-19 18:17:50 +01:00
|
|
|
class VIEW3D_PT_tools_brush_color(Panel, View3DPaintPanel):
|
|
|
|
bl_context = ".paint_common" # dot on purpose (access from topbar)
|
|
|
|
bl_parent_id = "VIEW3D_PT_tools_brush"
|
|
|
|
bl_label = "Color Picker"
|
|
|
|
|
|
|
|
@classmethod
|
2019-04-19 07:36:07 +02:00
|
|
|
def poll(cls, context):
|
|
|
|
settings = cls.paint_settings(context)
|
2019-03-19 18:17:50 +01:00
|
|
|
brush = settings.brush
|
2019-03-19 19:31:36 +01:00
|
|
|
if context.image_paint_object:
|
|
|
|
capabilities = brush.image_paint_capabilities
|
2019-03-19 19:42:17 +01:00
|
|
|
return capabilities.has_color
|
2019-03-19 19:31:36 +01:00
|
|
|
|
|
|
|
elif context.vertex_paint_object:
|
|
|
|
capabilities = brush.vertex_paint_capabilities
|
2019-03-19 19:42:17 +01:00
|
|
|
return capabilities.has_color
|
2019-03-19 18:17:50 +01:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
|
|
|
|
2019-04-19 08:10:39 +02:00
|
|
|
layout.active = not brush.use_gradient
|
2019-03-19 18:17:50 +01:00
|
|
|
|
|
|
|
brush_texpaint_common_color(self, context, layout, brush, settings, True)
|
|
|
|
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_brush_swatches(Panel, View3DPaintPanel):
|
|
|
|
bl_context = ".paint_common" # dot on purpose (access from topbar)
|
|
|
|
bl_parent_id = "VIEW3D_PT_tools_brush"
|
|
|
|
bl_label = "Color Palette"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
2019-04-19 07:36:07 +02:00
|
|
|
def poll(cls, context):
|
|
|
|
settings = cls.paint_settings(context)
|
2019-03-19 18:17:50 +01:00
|
|
|
brush = settings.brush
|
2019-03-19 19:31:36 +01:00
|
|
|
if context.image_paint_object:
|
|
|
|
capabilities = brush.image_paint_capabilities
|
2019-03-19 19:42:17 +01:00
|
|
|
return capabilities.has_color
|
2019-03-19 19:31:36 +01:00
|
|
|
|
|
|
|
elif context.vertex_paint_object:
|
|
|
|
capabilities = brush.vertex_paint_capabilities
|
2019-03-19 19:42:17 +01:00
|
|
|
return capabilities.has_color
|
2019-03-19 18:17:50 +01:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
settings = self.paint_settings(context)
|
|
|
|
|
|
|
|
layout.template_ID(settings, "palette", new="palette.new")
|
|
|
|
if settings.palette:
|
|
|
|
layout.template_palette(settings, "palette", color=True)
|
|
|
|
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_brush_gradient(Panel, View3DPaintPanel):
|
|
|
|
bl_context = ".paint_common" # dot on purpose (access from topbar)
|
|
|
|
bl_parent_id = "VIEW3D_PT_tools_brush"
|
|
|
|
bl_label = "Gradient"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
2019-04-19 07:36:07 +02:00
|
|
|
def poll(cls, context):
|
|
|
|
settings = cls.paint_settings(context)
|
2019-03-19 18:17:50 +01:00
|
|
|
brush = settings.brush
|
|
|
|
capabilities = brush.image_paint_capabilities
|
|
|
|
|
|
|
|
return capabilities.has_color and context.image_paint_object
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
|
|
|
self.layout.prop(brush, "use_gradient", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = False
|
|
|
|
layout.use_property_decorate = False # No animation.
|
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
|
|
|
|
|
|
|
layout.active = brush.use_gradient
|
|
|
|
|
|
|
|
brush_texpaint_common_gradient(self, context, layout, brush, settings, True)
|
|
|
|
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_brush_clone(Panel, View3DPaintPanel):
|
|
|
|
bl_context = ".paint_common" # dot on purpose (access from topbar)
|
|
|
|
bl_parent_id = "VIEW3D_PT_tools_brush"
|
|
|
|
bl_label = "Clone from Paint Slot"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
2019-04-19 07:36:07 +02:00
|
|
|
def poll(cls, context):
|
2019-04-19 07:49:49 +02:00
|
|
|
settings = cls.paint_settings(context)
|
2019-03-19 18:17:50 +01:00
|
|
|
brush = settings.brush
|
|
|
|
|
|
|
|
return brush.image_tool == 'CLONE'
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
settings = self.paint_settings(context)
|
|
|
|
self.layout.prop(settings, "use_clone_layer", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
|
|
|
|
|
|
|
layout.active = settings.use_clone_layer
|
|
|
|
|
|
|
|
brush_texpaint_common_clone(self, context, layout, brush, settings, True)
|
|
|
|
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_brush_options(Panel, View3DPaintPanel):
|
|
|
|
bl_context = ".paint_common" # dot on purpose (access from topbar)
|
|
|
|
bl_parent_id = "VIEW3D_PT_tools_brush"
|
|
|
|
bl_label = "Options"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
tool_settings = context.tool_settings
|
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
|
|
|
capabilities = brush.sculpt_capabilities
|
|
|
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False # No animation.
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
if context.image_paint_object and brush:
|
|
|
|
brush_texpaint_common_options(self, context, layout, brush, settings, True)
|
|
|
|
|
|
|
|
elif context.sculpt_object and brush:
|
|
|
|
if capabilities.has_accumulate:
|
2019-03-20 14:56:32 +01:00
|
|
|
col.prop(brush, "use_accumulate")
|
2019-03-19 18:17:50 +01:00
|
|
|
|
|
|
|
UnifiedPaintPanel.prop_unified_size(col, context, brush, "use_locked_size")
|
|
|
|
|
|
|
|
if capabilities.has_sculpt_plane:
|
|
|
|
col.prop(brush, "sculpt_plane")
|
|
|
|
col.prop(brush, "use_original_normal")
|
|
|
|
|
2017-10-06 18:57:37 +11:00
|
|
|
col.prop(brush, "use_frontface", text="Front Faces Only")
|
2019-03-19 18:17:50 +01:00
|
|
|
col.prop(brush, "use_projected")
|
|
|
|
|
|
|
|
elif context.weight_paint_object and brush:
|
|
|
|
|
|
|
|
if brush.weight_tool != 'SMEAR':
|
|
|
|
col.prop(brush, "use_accumulate")
|
2017-10-06 20:11:17 +11:00
|
|
|
|
2019-03-19 18:17:50 +01:00
|
|
|
col.prop(brush, "use_frontface", text="Front Faces Only")
|
2017-10-06 18:57:37 +11:00
|
|
|
col.prop(brush, "use_projected")
|
2019-03-19 18:17:50 +01:00
|
|
|
col.prop(tool_settings, "use_auto_normalize", text="Auto Normalize")
|
|
|
|
col.prop(tool_settings, "use_multipaint", text="Multi-Paint")
|
2017-10-06 00:18:11 +11:00
|
|
|
|
2019-03-19 18:17:50 +01:00
|
|
|
elif context.vertex_paint_object and brush:
|
|
|
|
|
|
|
|
if brush.vertex_tool != 'SMEAR':
|
|
|
|
col.prop(brush, "use_accumulate")
|
|
|
|
|
|
|
|
col.prop(brush, "use_alpha")
|
|
|
|
col.prop(brush, "use_frontface", text="Front Faces Only")
|
|
|
|
col.prop(brush, "use_projected")
|
2014-07-21 12:02:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
class TEXTURE_UL_texpaintslots(UIList):
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index):
|
2018-09-11 18:15:55 +10:00
|
|
|
# mat = data
|
2014-07-21 12:02:05 +02:00
|
|
|
|
|
|
|
if self.layout_type in {'DEFAULT', 'COMPACT'}:
|
2014-07-24 11:05:37 +02:00
|
|
|
layout.prop(item, "name", text="", emboss=False, icon_value=icon)
|
2015-04-14 10:29:11 +10:00
|
|
|
elif self.layout_type == 'GRID':
|
2014-07-21 12:02:05 +02:00
|
|
|
layout.alignment = 'CENTER'
|
|
|
|
layout.label(text="")
|
|
|
|
|
2015-01-29 15:35:06 +11:00
|
|
|
|
2014-09-21 00:29:50 +02:00
|
|
|
class VIEW3D_MT_tools_projectpaint_uvlayer(Menu):
|
|
|
|
bl_label = "Clone Layer"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2017-05-25 15:11:00 +10:00
|
|
|
for i, uv_layer in enumerate(context.active_object.data.uv_layers):
|
|
|
|
props = layout.operator("wm.context_set_int", text=uv_layer.name, translate=False)
|
|
|
|
props.data_path = "active_object.data.uv_layers.active_index"
|
2014-09-21 00:29:50 +02:00
|
|
|
props.value = i
|
|
|
|
|
2014-07-21 12:02:05 +02:00
|
|
|
|
|
|
|
class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-06-05 16:35:20 +02:00
|
|
|
bl_context = ".imagepaint" # dot on purpose (access from topbar)
|
2018-10-05 17:40:24 +02:00
|
|
|
bl_label = "Texture Slots"
|
2014-07-21 12:02:05 +02:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
brush = context.tool_settings.image_paint.brush
|
|
|
|
ob = context.active_object
|
|
|
|
return (brush is not None and ob is not None)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-10-05 17:40:24 +02:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
2014-07-21 12:02:05 +02:00
|
|
|
|
|
|
|
settings = context.tool_settings.image_paint
|
|
|
|
|
|
|
|
ob = context.active_object
|
|
|
|
|
2018-10-05 17:40:24 +02:00
|
|
|
layout.prop(settings, "mode", text="Mode")
|
|
|
|
layout.separator()
|
2014-07-21 12:02:05 +02:00
|
|
|
|
2014-08-28 16:40:38 +02:00
|
|
|
if settings.mode == 'MATERIAL':
|
|
|
|
if len(ob.material_slots) > 1:
|
2018-10-05 17:40:24 +02:00
|
|
|
layout.template_list("MATERIAL_UL_matslots", "layers",
|
|
|
|
ob, "material_slots",
|
|
|
|
ob, "active_material_index", rows=2)
|
2014-08-28 16:40:38 +02:00
|
|
|
mat = ob.active_material
|
2018-10-16 08:50:35 +11:00
|
|
|
if mat and mat.texture_paint_images:
|
2018-10-05 17:40:24 +02:00
|
|
|
row = layout.row()
|
|
|
|
row.template_list("TEXTURE_UL_texpaintslots", "",
|
2014-08-28 16:40:38 +02:00
|
|
|
mat, "texture_paint_images",
|
|
|
|
mat, "paint_active_slot", rows=2)
|
2014-07-21 12:02:05 +02:00
|
|
|
|
2015-01-28 14:42:47 +01:00
|
|
|
if mat.texture_paint_slots:
|
|
|
|
slot = mat.texture_paint_slots[mat.paint_active_slot]
|
2015-01-28 15:24:21 +01:00
|
|
|
else:
|
|
|
|
slot = None
|
2015-01-28 14:42:47 +01:00
|
|
|
|
2018-10-05 17:40:24 +02:00
|
|
|
have_image = slot is not None
|
|
|
|
else:
|
|
|
|
row = layout.row()
|
|
|
|
|
|
|
|
box = row.box()
|
|
|
|
box.label(text="No Textures")
|
|
|
|
have_image = False
|
|
|
|
|
|
|
|
sub = row.column(align=True)
|
2018-10-01 10:45:50 +02:00
|
|
|
sub.operator_menu_enum("paint.add_texture_paint_slot", "type", icon='ADD', text="")
|
2014-08-28 16:40:38 +02:00
|
|
|
|
|
|
|
elif settings.mode == 'IMAGE':
|
2014-09-21 00:29:50 +02:00
|
|
|
mesh = ob.data
|
2017-05-25 15:11:00 +10:00
|
|
|
uv_text = mesh.uv_layers.active.name if mesh.uv_layers.active else ""
|
2018-10-05 17:40:24 +02:00
|
|
|
layout.template_ID(settings, "canvas", new="image.new", open="image.open")
|
|
|
|
if settings.missing_uvs:
|
2018-10-01 10:45:50 +02:00
|
|
|
layout.operator("paint.add_simple_uvs", icon='ADD', text="Add UVs")
|
2018-09-20 19:53:16 +02:00
|
|
|
else:
|
2018-10-05 17:40:24 +02:00
|
|
|
layout.menu("VIEW3D_MT_tools_projectpaint_uvlayer", text=uv_text, translate=False)
|
|
|
|
have_image = settings.canvas is not None
|
2018-09-20 19:53:16 +02:00
|
|
|
|
2018-12-23 16:26:21 +01:00
|
|
|
layout.prop(settings, "interpolation", text="")
|
|
|
|
|
2018-10-05 17:40:24 +02:00
|
|
|
if settings.missing_uvs:
|
|
|
|
layout.separator()
|
|
|
|
split = layout.split()
|
|
|
|
split.label(text="UV Map Needed", icon='INFO')
|
2018-10-01 10:45:50 +02:00
|
|
|
split.operator("paint.add_simple_uvs", icon='ADD', text="Add Simple UVs")
|
2018-10-05 17:40:24 +02:00
|
|
|
elif have_image:
|
|
|
|
layout.separator()
|
2019-05-16 16:01:11 +02:00
|
|
|
layout.operator("image.save_all_modified", text="Save All Images", icon='FILE_TICK')
|
2013-11-20 03:38:18 +11:00
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2018-09-21 07:31:29 +10:00
|
|
|
|
|
|
|
|
2014-07-24 12:41:39 +02:00
|
|
|
class VIEW3D_PT_stencil_projectpaint(View3DPanel, Panel):
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-06-05 16:35:20 +02:00
|
|
|
bl_context = ".imagepaint" # dot on purpose (access from topbar)
|
2014-09-21 01:00:38 +02:00
|
|
|
bl_label = "Mask"
|
2018-10-05 17:40:24 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2014-07-24 12:41:39 +02:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
brush = context.tool_settings.image_paint.brush
|
|
|
|
ob = context.active_object
|
|
|
|
return (brush is not None and ob is not None)
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
ipaint = context.tool_settings.image_paint
|
|
|
|
self.layout.prop(ipaint, "use_stencil_layer", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-06-10 16:29:55 +02:00
|
|
|
layout.use_property_split = True
|
2018-10-25 15:27:31 +02:00
|
|
|
layout.use_property_decorate = False
|
2014-07-24 12:41:39 +02:00
|
|
|
|
2018-12-17 17:20:24 +11:00
|
|
|
tool_settings = context.tool_settings
|
|
|
|
ipaint = tool_settings.image_paint
|
2014-07-24 12:41:39 +02:00
|
|
|
ob = context.active_object
|
|
|
|
mesh = ob.data
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.active = ipaint.use_stencil_layer
|
|
|
|
|
2017-07-13 19:28:20 +10:00
|
|
|
stencil_text = mesh.uv_layer_stencil.name if mesh.uv_layer_stencil else ""
|
2018-08-28 12:38:54 +10:00
|
|
|
split = col.split(factor=0.5)
|
2018-06-10 16:29:55 +02:00
|
|
|
colsub = split.column()
|
|
|
|
colsub.alignment = 'RIGHT'
|
2018-08-28 12:34:51 +10:00
|
|
|
colsub.label(text="UV Layer")
|
2018-06-10 16:29:55 +02:00
|
|
|
split.column().menu("VIEW3D_MT_tools_projectpaint_stencil", text=stencil_text, translate=False)
|
2014-07-24 12:41:39 +02:00
|
|
|
|
2017-07-21 16:46:35 -04:00
|
|
|
# todo this should be combinded into a single row
|
2018-08-28 12:38:54 +10:00
|
|
|
split = col.split(factor=0.5)
|
2018-06-10 16:29:55 +02:00
|
|
|
colsub = split.column()
|
|
|
|
colsub.alignment = 'RIGHT'
|
2018-08-28 12:34:51 +10:00
|
|
|
colsub.label(text="Stencil Image")
|
2018-06-10 16:29:55 +02:00
|
|
|
colsub = split.column()
|
2018-07-03 12:18:06 +02:00
|
|
|
colsub.template_ID(ipaint, "stencil_image", new="image.new", open="image.open")
|
2014-10-06 15:12:06 +02:00
|
|
|
|
2014-07-24 12:41:39 +02:00
|
|
|
row = col.row(align=True)
|
2018-06-10 16:29:55 +02:00
|
|
|
row.prop(ipaint, "stencil_color", text="Display Color")
|
2014-07-24 12:41:39 +02:00
|
|
|
row.prop(ipaint, "invert_stencil", text="", icon='IMAGE_ALPHA')
|
|
|
|
|
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2019-03-15 11:34:43 +11:00
|
|
|
class VIEW3D_PT_tools_brush_display(Panel, View3DPaintPanel):
|
2018-04-30 16:59:16 +02:00
|
|
|
bl_context = ".paint_common" # dot on purpose (access from topbar)
|
2019-03-15 11:34:43 +11:00
|
|
|
bl_label = "Display"
|
2018-10-01 15:39:03 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2013-04-22 20:46:18 +00:00
|
|
|
|
2013-10-12 11:18:38 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
settings = cls.paint_settings(context)
|
|
|
|
return (settings and
|
|
|
|
settings.brush and
|
|
|
|
(context.sculpt_object or
|
|
|
|
context.vertex_paint_object or
|
|
|
|
context.weight_paint_object or
|
|
|
|
context.image_paint_object))
|
2013-11-20 03:38:18 +11:00
|
|
|
|
2013-10-09 14:57:48 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-10-31 17:23:43 +01:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
2013-10-09 14:57:48 +00:00
|
|
|
|
2013-10-09 15:07:48 +00:00
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
2013-10-09 14:57:48 +00:00
|
|
|
tex_slot = brush.texture_slot
|
|
|
|
tex_slot_mask = brush.mask_texture_slot
|
|
|
|
|
|
|
|
col = layout.column()
|
2013-11-20 03:38:18 +11:00
|
|
|
|
2013-10-09 14:57:48 +00:00
|
|
|
row = col.row(align=True)
|
2018-10-31 17:23:43 +01:00
|
|
|
|
2013-10-09 14:57:48 +00:00
|
|
|
sub = row.row(align=True)
|
2018-10-31 17:23:43 +01:00
|
|
|
sub.prop(brush, "cursor_overlay_alpha", text="Curve Alpha")
|
2013-10-09 14:57:48 +00:00
|
|
|
sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
|
2019-01-30 09:03:37 +11:00
|
|
|
row.prop(
|
|
|
|
brush, "use_cursor_overlay", text="", toggle=True,
|
|
|
|
icon='HIDE_OFF' if brush.use_cursor_overlay else 'HIDE_ON',
|
|
|
|
)
|
2013-10-09 14:57:48 +00:00
|
|
|
|
|
|
|
col.active = brush.brush_capabilities.has_overlay
|
2013-11-20 03:38:18 +11:00
|
|
|
|
2013-10-09 15:21:49 +00:00
|
|
|
if context.image_paint_object or context.sculpt_object or context.vertex_paint_object:
|
|
|
|
row = col.row(align=True)
|
2013-10-09 14:57:48 +00:00
|
|
|
|
2013-10-09 15:21:49 +00:00
|
|
|
sub = row.row(align=True)
|
2018-10-31 17:23:43 +01:00
|
|
|
sub.prop(brush, "texture_overlay_alpha", text="Texture Alpha")
|
2013-10-09 15:21:49 +00:00
|
|
|
sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
|
2018-10-31 17:23:43 +01:00
|
|
|
if tex_slot.map_mode != 'STENCIL':
|
2019-01-30 09:03:37 +11:00
|
|
|
row.prop(
|
|
|
|
brush, "use_primary_overlay", text="", toggle=True,
|
|
|
|
icon='HIDE_OFF' if brush.use_primary_overlay else 'HIDE_ON',
|
|
|
|
)
|
2013-10-09 14:57:48 +00:00
|
|
|
|
|
|
|
if context.image_paint_object:
|
|
|
|
row = col.row(align=True)
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
sub = row.row(align=True)
|
2018-10-31 17:23:43 +01:00
|
|
|
sub.prop(brush, "mask_overlay_alpha", text="Mask Texture Alpha")
|
2013-10-09 14:57:48 +00:00
|
|
|
sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
|
2018-10-31 17:23:43 +01:00
|
|
|
if tex_slot_mask.map_mode != 'STENCIL':
|
2019-01-30 09:03:37 +11:00
|
|
|
row.prop(
|
|
|
|
brush, "use_secondary_overlay", text="", toggle=True,
|
|
|
|
icon='HIDE_OFF' if brush.use_secondary_overlay else 'HIDE_ON',
|
|
|
|
)
|
2013-04-22 20:46:18 +00:00
|
|
|
|
2010-01-03 08:37:18 +00:00
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2012-01-18 05:54:19 +00:00
|
|
|
class VIEW3D_PT_tools_brush_texture(Panel, View3DPaintPanel):
|
2018-04-30 16:59:16 +02:00
|
|
|
bl_context = ".paint_common" # dot on purpose (access from topbar)
|
2010-01-03 08:37:18 +00:00
|
|
|
bl_label = "Texture"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2010-01-03 08:37:18 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
settings = cls.paint_settings(context)
|
2012-10-08 08:28:05 +00:00
|
|
|
return (settings and settings.brush and
|
2013-03-14 03:42:17 +00:00
|
|
|
(context.sculpt_object or context.image_paint_object or context.vertex_paint_object))
|
2010-01-03 08:37:18 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2011-07-11 05:50:49 +00:00
|
|
|
settings = self.paint_settings(context)
|
2010-01-03 08:37:18 +00:00
|
|
|
brush = settings.brush
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-01-03 08:37:18 +00:00
|
|
|
col = layout.column()
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-07-14 14:11:03 +00:00
|
|
|
col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2013-01-16 12:57:35 +00:00
|
|
|
brush_texture_settings(col, brush, context.sculpt_object)
|
2011-10-31 01:50:04 +00:00
|
|
|
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2014-10-10 12:33:02 +02:00
|
|
|
class VIEW3D_PT_tools_mask_texture(Panel, View3DPaintPanel):
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-06-05 16:35:20 +02:00
|
|
|
bl_context = ".imagepaint" # dot on purpose (access from topbar)
|
2013-03-25 01:00:16 +00:00
|
|
|
bl_label = "Texture Mask"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2014-10-06 15:12:06 +02:00
|
|
|
settings = cls.paint_settings(context)
|
2014-10-10 12:33:02 +02:00
|
|
|
return (settings and settings.brush and context.image_paint_object)
|
2013-03-25 01:00:16 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
brush = context.tool_settings.image_paint.brush
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
col.template_ID_preview(brush, "mask_texture", new="texture.new", rows=3, cols=8)
|
|
|
|
|
|
|
|
brush_mask_texture_settings(col, brush)
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2013-03-25 01:00:16 +00:00
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2012-01-18 05:54:19 +00:00
|
|
|
class VIEW3D_PT_tools_brush_stroke(Panel, View3DPaintPanel):
|
2018-04-30 16:59:16 +02:00
|
|
|
bl_context = ".paint_common" # dot on purpose (access from topbar)
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Stroke"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
settings = cls.paint_settings(context)
|
2012-10-08 08:28:05 +00:00
|
|
|
return (settings and
|
|
|
|
settings.brush and
|
|
|
|
(context.sculpt_object or
|
|
|
|
context.vertex_paint_object or
|
|
|
|
context.weight_paint_object or
|
|
|
|
context.image_paint_object))
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2011-07-11 05:50:49 +00:00
|
|
|
settings = self.paint_settings(context)
|
2009-10-31 19:31:45 +00:00
|
|
|
brush = settings.brush
|
2018-06-10 15:55:19 +02:00
|
|
|
layout.use_property_split = True
|
2018-10-25 15:27:31 +02:00
|
|
|
layout.use_property_decorate = False
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-07-14 14:11:03 +00:00
|
|
|
col = layout.column()
|
|
|
|
|
2018-06-10 15:55:19 +02:00
|
|
|
col.prop(brush, "stroke_method")
|
2010-07-14 14:11:03 +00:00
|
|
|
|
2013-03-30 11:40:09 +00:00
|
|
|
if brush.use_anchor:
|
2018-08-28 13:41:47 +10:00
|
|
|
col.prop(brush, "use_edge_to_edge", text="Edge To Edge")
|
2010-07-14 14:11:03 +00:00
|
|
|
|
2013-03-30 11:40:09 +00:00
|
|
|
if brush.use_airbrush:
|
|
|
|
col.prop(brush, "rate", text="Rate", slider=True)
|
2010-07-14 14:11:03 +00:00
|
|
|
|
2013-03-30 11:40:09 +00:00
|
|
|
if brush.use_space:
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(brush, "spacing", text="Spacing")
|
|
|
|
row.prop(brush, "use_pressure_spacing", toggle=True, text="")
|
2010-07-14 14:11:03 +00:00
|
|
|
|
2014-07-21 12:02:05 +02:00
|
|
|
if brush.use_line or brush.use_curve:
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(brush, "spacing", text="Spacing")
|
|
|
|
|
|
|
|
if brush.use_curve:
|
|
|
|
col.template_ID(brush, "paint_curve", new="paintcurve.new")
|
|
|
|
col.operator("paintcurve.draw")
|
|
|
|
|
2013-03-30 11:40:09 +00:00
|
|
|
if context.sculpt_object:
|
2019-03-22 11:27:56 +01:00
|
|
|
|
|
|
|
if brush.sculpt_capabilities.has_space_attenuation:
|
|
|
|
col.prop(brush, "use_space_attenuation")
|
|
|
|
|
2012-03-15 09:11:16 +00:00
|
|
|
if brush.sculpt_capabilities.has_jitter:
|
2010-07-14 14:11:03 +00:00
|
|
|
|
2018-10-25 15:27:31 +02:00
|
|
|
row = col.row(align=True)
|
2013-03-30 11:40:09 +00:00
|
|
|
if brush.use_relative_jitter:
|
2018-10-25 15:27:31 +02:00
|
|
|
row.prop(brush, "jitter", slider=True)
|
2013-03-11 01:46:22 +00:00
|
|
|
else:
|
2018-10-25 15:27:31 +02:00
|
|
|
row.prop(brush, "jitter_absolute")
|
|
|
|
row.prop(brush, "use_relative_jitter", icon_only=True)
|
2010-08-18 03:56:14 +00:00
|
|
|
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
|
2013-09-12 19:51:31 +00:00
|
|
|
|
2013-03-31 16:17:18 +00:00
|
|
|
else:
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2013-03-10 00:58:09 +00:00
|
|
|
row = col.row(align=True)
|
2013-03-30 11:40:09 +00:00
|
|
|
if brush.use_relative_jitter:
|
|
|
|
row.prop(brush, "jitter", slider=True)
|
|
|
|
else:
|
|
|
|
row.prop(brush, "jitter_absolute")
|
2018-10-31 17:23:43 +01:00
|
|
|
row.prop(brush, "use_relative_jitter", icon_only=True)
|
2013-03-30 11:40:09 +00:00
|
|
|
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
|
2010-07-14 14:11:03 +00:00
|
|
|
|
2019-03-19 18:39:08 +01:00
|
|
|
col.prop(settings, "input_samples")
|
2013-03-31 16:17:18 +00:00
|
|
|
|
2013-09-05 13:15:29 +00:00
|
|
|
|
2018-10-31 17:23:43 +01:00
|
|
|
class VIEW3D_PT_tools_brush_stroke_smooth_stroke(Panel, View3DPaintPanel):
|
|
|
|
bl_context = ".paint_common" # dot on purpose (access from topbar)
|
|
|
|
bl_label = "Smooth Stroke"
|
|
|
|
bl_parent_id = "VIEW3D_PT_tools_brush_stroke"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
settings = cls.paint_settings(context)
|
|
|
|
brush = settings.brush
|
|
|
|
if brush.brush_capabilities.has_smooth_stroke:
|
|
|
|
return True
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
|
|
|
|
|
|
|
self.layout.prop(brush, "use_smooth_stroke", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.active = brush.use_smooth_stroke
|
|
|
|
col.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
|
|
|
|
col.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2013-04-07 01:38:03 +00:00
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2019-03-19 18:17:50 +01:00
|
|
|
class VIEW3D_PT_tools_brush_falloff(Panel, View3DPaintPanel):
|
2018-04-30 16:59:16 +02:00
|
|
|
bl_context = ".paint_common" # dot on purpose (access from topbar)
|
2019-03-19 18:17:50 +01:00
|
|
|
bl_label = "Falloff"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
settings = cls.paint_settings(context)
|
2009-10-31 19:31:45 +00:00
|
|
|
return (settings and settings.brush and settings.brush.curve)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2010-08-09 08:18:49 +00:00
|
|
|
settings = self.paint_settings(context)
|
2009-10-31 19:31:45 +00:00
|
|
|
brush = settings.brush
|
|
|
|
|
2010-01-04 17:28:37 +00:00
|
|
|
layout.template_curve_mapping(brush, "curve", brush=True)
|
2010-03-14 23:26:17 +00:00
|
|
|
|
2014-07-21 12:02:05 +02:00
|
|
|
col = layout.column(align=True)
|
|
|
|
row = col.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'
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2010-08-09 08:18:49 +00:00
|
|
|
|
2019-03-19 18:17:50 +01:00
|
|
|
class VIEW3D_PT_tools_brush_falloff_frontface(View3DPaintPanel, Panel):
|
|
|
|
bl_context = ".imagepaint" # dot on purpose (access from topbar)
|
|
|
|
bl_label = "Frontface Falloff"
|
|
|
|
bl_parent_id = "VIEW3D_PT_tools_brush_falloff"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
return (context.weight_paint_object or context.vertex_paint_object)
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
|
|
|
|
|
|
|
self.layout.prop(brush, "use_frontface_falloff", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
|
|
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
layout.active = brush.use_frontface_falloff
|
|
|
|
layout.prop(brush, "falloff_angle", text="Angle")
|
|
|
|
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_brush_falloff_normal(View3DPaintPanel, Panel):
|
|
|
|
bl_context = ".imagepaint" # dot on purpose (access from topbar)
|
|
|
|
bl_label = "Normal Falloff"
|
|
|
|
bl_parent_id = "VIEW3D_PT_tools_brush_falloff"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
return context.image_paint_object
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
tool_settings = context.tool_settings
|
|
|
|
ipaint = tool_settings.image_paint
|
|
|
|
|
|
|
|
self.layout.prop(ipaint, "use_normal_falloff", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
tool_settings = context.tool_settings
|
|
|
|
ipaint = tool_settings.image_paint
|
|
|
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
layout.active = ipaint.use_normal_falloff
|
|
|
|
layout.prop(ipaint, "normal_angle", text="Angle")
|
|
|
|
|
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2014-03-24 23:17:01 +02:00
|
|
|
class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel):
|
2018-04-30 16:59:16 +02:00
|
|
|
bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
|
2014-03-24 23:17:01 +02:00
|
|
|
bl_label = "Dyntopo"
|
2012-12-30 18:31:17 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2018-07-13 17:58:22 +02:00
|
|
|
bl_ui_units_x = 12
|
2012-12-30 18:31:17 +00:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
return (context.sculpt_object and context.tool_settings.sculpt)
|
|
|
|
|
2016-07-01 21:40:59 +10:00
|
|
|
def draw_header(self, context):
|
2018-06-09 17:36:28 +02:00
|
|
|
is_popover = self.is_popover
|
2016-07-01 21:40:59 +10:00
|
|
|
layout = self.layout
|
|
|
|
layout.operator(
|
2018-06-05 16:32:11 +02:00
|
|
|
"sculpt.dynamic_topology_toggle",
|
|
|
|
icon='CHECKBOX_HLT' if context.sculpt_object.use_dynamic_topology_sculpting else 'CHECKBOX_DEHLT',
|
|
|
|
text="",
|
2018-06-09 17:36:28 +02:00
|
|
|
emboss=is_popover,
|
2018-06-05 16:32:11 +02:00
|
|
|
)
|
2016-07-01 21:40:59 +10:00
|
|
|
|
2012-12-30 18:31:17 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-06-10 15:55:19 +02:00
|
|
|
layout.use_property_split = True
|
2018-07-13 17:58:22 +02:00
|
|
|
layout.use_property_decorate = False
|
2012-12-30 18:31:17 +00:00
|
|
|
|
2018-12-17 17:20:24 +11:00
|
|
|
tool_settings = context.tool_settings
|
|
|
|
sculpt = tool_settings.sculpt
|
2013-11-19 21:55:46 +01:00
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
2012-12-30 18:31:17 +00:00
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.active = context.sculpt_object.use_dynamic_topology_sculpting
|
2018-06-10 15:55:19 +02:00
|
|
|
|
|
|
|
sub = col.column()
|
2014-06-12 22:00:26 +10:00
|
|
|
sub.active = (brush and brush.sculpt_tool != 'MASK')
|
2018-07-02 18:35:50 +02:00
|
|
|
if sculpt.detail_type_method in {'CONSTANT', 'MANUAL'}:
|
2014-03-23 00:01:46 +02:00
|
|
|
row = sub.row(align=True)
|
2016-11-12 16:14:09 +01:00
|
|
|
row.prop(sculpt, "constant_detail_resolution")
|
2014-08-14 16:26:16 +02:00
|
|
|
row.operator("sculpt.sample_detail_size", text="", icon='EYEDROPPER')
|
2015-05-06 22:51:49 +02:00
|
|
|
elif (sculpt.detail_type_method == 'BRUSH'):
|
|
|
|
sub.prop(sculpt, "detail_percent")
|
2014-03-22 17:47:18 +02:00
|
|
|
else:
|
2014-03-31 20:01:28 +03:00
|
|
|
sub.prop(sculpt, "detail_size")
|
2018-06-10 15:55:19 +02:00
|
|
|
sub.prop(sculpt, "detail_refine_method", text="Refine Method")
|
|
|
|
sub.prop(sculpt, "detail_type_method", text="Detailing")
|
|
|
|
|
2012-12-30 18:31:17 +00:00
|
|
|
col.prop(sculpt, "use_smooth_shading")
|
2018-06-10 15:55:19 +02:00
|
|
|
|
2018-10-31 17:23:43 +01:00
|
|
|
|
|
|
|
class VIEW3D_PT_sculpt_dyntopo_remesh(Panel, View3DPaintPanel):
|
|
|
|
bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
|
|
|
|
bl_label = "Remesh"
|
|
|
|
bl_parent_id = "VIEW3D_PT_sculpt_dyntopo"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
bl_ui_units_x = 12
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
2018-12-17 17:26:47 +11:00
|
|
|
tool_settings = context.tool_settings
|
|
|
|
sculpt = tool_settings.sculpt
|
2018-10-31 17:23:43 +01:00
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.active = context.sculpt_object.use_dynamic_topology_sculpting
|
2018-06-10 15:55:19 +02:00
|
|
|
|
2012-12-30 18:31:17 +00:00
|
|
|
col.prop(sculpt, "symmetrize_direction")
|
2018-10-31 17:23:43 +01:00
|
|
|
|
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
|
|
|
|
|
|
|
|
col = flow.column()
|
2012-12-30 18:31:17 +00:00
|
|
|
col.operator("sculpt.symmetrize")
|
2018-10-31 17:23:43 +01:00
|
|
|
col = flow.column()
|
2018-06-10 15:55:19 +02:00
|
|
|
col.operator("sculpt.optimize")
|
2018-07-02 18:35:50 +02:00
|
|
|
if sculpt.detail_type_method in {'CONSTANT', 'MANUAL'}:
|
2018-10-31 17:23:43 +01:00
|
|
|
col = flow.column()
|
2018-06-10 15:55:19 +02:00
|
|
|
col.operator("sculpt.detail_flood_fill")
|
2012-12-30 18:31:17 +00:00
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2018-12-20 13:01:40 +11:00
|
|
|
|
|
|
|
|
2012-01-18 05:54:19 +00:00
|
|
|
class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
|
2018-04-30 16:59:16 +02:00
|
|
|
bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Options"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2009-12-23 15:51:39 +00:00
|
|
|
return (context.sculpt_object and context.tool_settings.sculpt)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-10-31 17:23:43 +01:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
2018-12-17 17:26:47 +11:00
|
|
|
tool_settings = context.tool_settings
|
|
|
|
sculpt = tool_settings.sculpt
|
2018-10-31 17:23:43 +01:00
|
|
|
|
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
|
|
|
|
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(sculpt, "use_threaded", text="Threaded Sculpt")
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(sculpt, "show_low_resolution")
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(sculpt, "use_deform_only")
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(sculpt, "show_diffuse_color")
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(sculpt, "show_mask")
|
|
|
|
|
|
|
|
|
|
|
|
class VIEW3D_PT_sculpt_options_unified(Panel, View3DPaintPanel):
|
|
|
|
bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
|
|
|
|
bl_parent_id = "VIEW3D_PT_sculpt_options"
|
|
|
|
bl_label = "Unified Brush"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
return (context.sculpt_object and context.tool_settings.sculpt)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
self.unified_paint_settings(layout, context)
|
|
|
|
|
2018-12-20 13:01:40 +11:00
|
|
|
|
2018-10-31 17:23:43 +01:00
|
|
|
class VIEW3D_PT_sculpt_options_gravity(Panel, View3DPaintPanel):
|
|
|
|
bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
|
|
|
|
bl_parent_id = "VIEW3D_PT_sculpt_options"
|
|
|
|
bl_label = "Gravity"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
return (context.sculpt_object and context.tool_settings.sculpt)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
2014-04-01 08:30:24 +11:00
|
|
|
|
2018-12-17 17:20:24 +11:00
|
|
|
tool_settings = context.tool_settings
|
|
|
|
sculpt = tool_settings.sculpt
|
2013-12-12 19:01:11 +02:00
|
|
|
capabilities = sculpt.brush.sculpt_capabilities
|
|
|
|
|
2018-10-31 17:23:43 +01:00
|
|
|
col = layout.column()
|
2013-12-12 19:01:11 +02:00
|
|
|
col.active = capabilities.has_gravity
|
|
|
|
col.prop(sculpt, "gravity", slider=True, text="Factor")
|
|
|
|
col.prop(sculpt, "gravity_object")
|
2011-05-04 13:15:42 +00:00
|
|
|
|
2010-09-07 15:17:42 +00:00
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2012-01-18 05:54:19 +00:00
|
|
|
class VIEW3D_PT_sculpt_symmetry(Panel, View3DPaintPanel):
|
2018-04-30 16:59:16 +02:00
|
|
|
bl_context = ".sculpt_mode" # dot on purpose (access from topbar)
|
2019-03-20 14:09:55 +01:00
|
|
|
bl_label = "Symmetry"
|
2010-08-26 01:05:37 +00:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2010-07-14 14:11:03 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2010-07-14 14:11:03 +00:00
|
|
|
return (context.sculpt_object and context.tool_settings.sculpt)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
sculpt = context.tool_settings.sculpt
|
|
|
|
|
2018-06-10 15:55:19 +02:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.alignment = 'RIGHT'
|
|
|
|
col.label(text="Mirror")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
2013-08-23 20:41:21 +00:00
|
|
|
row = col.row(align=True)
|
2011-10-31 00:03:18 +00:00
|
|
|
row.prop(sculpt, "use_symmetry_x", text="X", toggle=True)
|
|
|
|
row.prop(sculpt, "use_symmetry_y", text="Y", toggle=True)
|
|
|
|
row.prop(sculpt, "use_symmetry_z", text="Z", toggle=True)
|
2011-10-31 01:50:04 +00:00
|
|
|
|
2018-06-10 15:55:19 +02:00
|
|
|
split = layout.split()
|
2010-07-14 14:11:03 +00:00
|
|
|
|
2018-06-10 15:55:19 +02:00
|
|
|
col = split.column()
|
|
|
|
col.alignment = 'RIGHT'
|
|
|
|
col.label(text="Lock")
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2018-06-10 15:55:19 +02:00
|
|
|
col = split.column()
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
2014-02-12 17:04:39 +02:00
|
|
|
row.prop(sculpt, "lock_x", text="X", toggle=True)
|
|
|
|
row.prop(sculpt, "lock_y", text="Y", toggle=True)
|
|
|
|
row.prop(sculpt, "lock_z", text="Z", toggle=True)
|
2010-09-07 15:17:42 +00:00
|
|
|
|
2018-06-10 15:55:19 +02:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.alignment = 'RIGHT'
|
|
|
|
col.label(text="Tiling")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
2015-07-23 22:52:03 +02:00
|
|
|
row.prop(sculpt, "tile_x", text="X", toggle=True)
|
|
|
|
row.prop(sculpt, "tile_y", text="Y", toggle=True)
|
|
|
|
row.prop(sculpt, "tile_z", text="Z", toggle=True)
|
|
|
|
|
2018-06-10 15:55:19 +02:00
|
|
|
layout.use_property_split = True
|
2018-10-25 15:27:31 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-06-10 15:55:19 +02:00
|
|
|
|
|
|
|
layout.prop(sculpt, "use_symmetry_feather", text="Feather")
|
|
|
|
layout.column().prop(sculpt, "radial_symmetry", text="Radial")
|
2015-07-23 22:52:03 +02:00
|
|
|
layout.column().prop(sculpt, "tile_offset", text="Tile Offset")
|
|
|
|
|
2015-09-01 03:51:50 +10:00
|
|
|
|
2019-03-19 19:03:51 +01:00
|
|
|
class VIEW3D_PT_tools_brush_display_show_brush(Panel, View3DPaintPanel):
|
2018-10-31 17:23:43 +01:00
|
|
|
bl_context = ".paint_common" # dot on purpose (access from topbar)
|
|
|
|
bl_label = "Show Brush"
|
2019-03-19 19:03:51 +01:00
|
|
|
bl_parent_id = "VIEW3D_PT_tools_brush_display"
|
2018-10-31 17:23:43 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
settings = self.paint_settings(context)
|
|
|
|
|
|
|
|
self.layout.prop(settings, "show_brush", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.active = settings.show_brush
|
2010-07-21 11:58:23 +00:00
|
|
|
|
2010-07-22 18:56:46 +00:00
|
|
|
if context.sculpt_object and context.tool_settings.sculpt:
|
2012-03-15 09:11:16 +00:00
|
|
|
if brush.sculpt_capabilities.has_secondary_color:
|
2018-10-31 17:23:43 +01:00
|
|
|
col.prop(brush, "cursor_color_add", text="Add")
|
|
|
|
col.prop(brush, "cursor_color_subtract", text="Subtract")
|
2010-07-14 14:11:03 +00:00
|
|
|
else:
|
2018-10-31 17:23:43 +01:00
|
|
|
col.prop(brush, "cursor_color_add", text="Color")
|
2010-07-22 18:56:46 +00:00
|
|
|
else:
|
2018-10-31 17:23:43 +01:00
|
|
|
col.prop(brush, "cursor_color_add", text="Color")
|
2013-05-01 15:28:56 +00:00
|
|
|
|
2010-07-14 14:11:03 +00:00
|
|
|
|
2019-03-19 19:03:51 +01:00
|
|
|
class VIEW3D_PT_tools_brush_display_custom_icon(Panel, View3DPaintPanel):
|
2018-10-31 17:23:43 +01:00
|
|
|
bl_context = ".paint_common" # dot on purpose (access from topbar)
|
|
|
|
bl_label = "Custom Icon"
|
2019-03-19 19:03:51 +01:00
|
|
|
bl_parent_id = "VIEW3D_PT_tools_brush_display"
|
2018-10-31 17:23:43 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
|
|
|
|
|
|
|
self.layout.prop(brush, "use_custom_icon", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
settings = self.paint_settings(context)
|
|
|
|
brush = settings.brush
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.active = brush.use_custom_icon
|
|
|
|
col.prop(brush, "icon_filepath", text="")
|
2009-07-24 21:01:41 +00:00
|
|
|
|
2011-10-17 06:58:07 +00:00
|
|
|
# ********** default tools for weight-paint ****************
|
2009-07-02 11:24:27 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2017-09-28 01:38:17 +10:00
|
|
|
class VIEW3D_PT_tools_weightpaint_symmetry(Panel, View3DPaintPanel):
|
2018-04-30 16:06:51 +02:00
|
|
|
bl_context = ".weightpaint"
|
2017-09-28 01:38:17 +10:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
bl_label = "Symmetry"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-12-17 17:20:24 +11:00
|
|
|
tool_settings = context.tool_settings
|
|
|
|
wpaint = tool_settings.weight_paint
|
2017-09-28 01:38:17 +10:00
|
|
|
draw_vpaint_symmetry(layout, wpaint)
|
|
|
|
|
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2012-01-18 05:54:19 +00:00
|
|
|
class VIEW3D_PT_tools_weightpaint_options(Panel, View3DPaintPanel):
|
2018-04-30 16:06:51 +02:00
|
|
|
bl_context = ".weightpaint"
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Options"
|
2019-03-19 18:17:50 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2019-03-20 14:09:55 +01:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
2010-07-22 18:56:46 +00:00
|
|
|
tool_settings = context.tool_settings
|
|
|
|
wpaint = tool_settings.weight_paint
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = layout.column()
|
2017-10-06 20:11:17 +11:00
|
|
|
col.prop(wpaint, "use_group_restrict")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-01-10 10:20:44 +00:00
|
|
|
obj = context.weight_paint_object
|
|
|
|
if obj.type == 'MESH':
|
2010-02-17 19:50:42 +00:00
|
|
|
mesh = obj.data
|
|
|
|
col.prop(mesh, "use_mirror_x")
|
2013-06-28 17:13:09 +00:00
|
|
|
row = col.row()
|
|
|
|
row.active = mesh.use_mirror_x
|
|
|
|
row.prop(mesh, "use_mirror_topology")
|
2009-07-24 11:14:59 +00:00
|
|
|
|
2019-03-20 14:09:55 +01:00
|
|
|
|
|
|
|
class VIEW3D_PT_tools_weightpaint_options_unified(Panel, View3DPaintPanel):
|
|
|
|
bl_context = ".weightpaint"
|
|
|
|
bl_label = "Unified Brush"
|
|
|
|
bl_parent_id = "VIEW3D_PT_tools_weightpaint_options"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
self.unified_paint_settings(layout, context)
|
2010-07-22 18:56:46 +00:00
|
|
|
|
2011-10-17 06:58:07 +00:00
|
|
|
# ********** default tools for vertex-paint ****************
|
2009-07-02 11:24:27 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2019-03-20 14:09:55 +01:00
|
|
|
class VIEW3D_PT_tools_vertexpaint_options(Panel, View3DPaintPanel):
|
2018-04-30 15:21:04 +02:00
|
|
|
bl_context = ".vertexpaint" # dot on purpose (access from topbar)
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Options"
|
2019-03-19 18:17:50 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2019-03-20 14:09:55 +01:00
|
|
|
layout.label(text="Unified Brush")
|
2017-10-02 21:07:25 +11:00
|
|
|
|
2019-03-20 14:09:55 +01:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
|
|
self.unified_paint_settings(layout, context)
|
2010-07-22 18:56:46 +00:00
|
|
|
|
2017-09-28 01:38:17 +10:00
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2017-09-28 01:38:17 +10:00
|
|
|
class VIEW3D_PT_tools_vertexpaint_symmetry(Panel, View3DPaintPanel):
|
2018-04-30 15:21:04 +02:00
|
|
|
bl_context = ".vertexpaint" # dot on purpose (access from topbar)
|
2017-09-28 01:38:17 +10:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
bl_label = "Symmetry"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-12-17 17:20:24 +11:00
|
|
|
tool_settings = context.tool_settings
|
|
|
|
vpaint = tool_settings.vertex_paint
|
2017-09-28 01:38:17 +10:00
|
|
|
draw_vpaint_symmetry(layout, vpaint)
|
|
|
|
|
|
|
|
|
2011-10-17 06:58:07 +00:00
|
|
|
# ********** default tools for texture-paint ****************
|
2009-07-02 11:24:27 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2019-03-20 14:09:55 +01:00
|
|
|
class VIEW3D_PT_tools_imagepaint_options_external(Panel, View3DPaintPanel):
|
2018-06-05 16:35:20 +02:00
|
|
|
bl_context = ".imagepaint" # dot on purpose (access from topbar)
|
2014-06-03 12:05:47 +10:00
|
|
|
bl_label = "External"
|
2019-03-20 14:09:55 +01:00
|
|
|
bl_parent_id = "VIEW3D_PT_tools_imagepaint_options"
|
2014-06-03 12:05:47 +10:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2018-10-31 17:23:43 +01:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
2014-06-03 12:05:47 +10:00
|
|
|
|
2018-12-17 17:20:24 +11:00
|
|
|
tool_settings = context.tool_settings
|
|
|
|
ipaint = tool_settings.image_paint
|
2014-06-03 12:05:47 +10:00
|
|
|
|
2018-10-31 17:23:43 +01:00
|
|
|
layout.prop(ipaint, "screen_grab_size", text="Screen Grab Size")
|
2014-06-03 12:05:47 +10:00
|
|
|
|
2018-10-31 17:23:43 +01:00
|
|
|
layout.separator()
|
2014-06-03 12:05:47 +10:00
|
|
|
|
2018-10-31 17:23:43 +01:00
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
|
|
|
|
col = flow.column()
|
|
|
|
col.operator("image.project_edit", text="Quick Edit")
|
|
|
|
col = flow.column()
|
|
|
|
col.operator("image.project_apply", text="Apply")
|
|
|
|
col = flow.column()
|
2014-06-03 12:05:47 +10:00
|
|
|
col.operator("paint.project_image", text="Apply Camera Image")
|
|
|
|
|
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2015-04-28 23:34:40 +10:00
|
|
|
class VIEW3D_PT_tools_imagepaint_symmetry(Panel, View3DPaintPanel):
|
2018-06-05 16:35:20 +02:00
|
|
|
bl_context = ".imagepaint" # dot on purpose (access from topbar)
|
2015-04-28 23:34:40 +10:00
|
|
|
bl_label = "Symmetry"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2018-12-17 17:20:24 +11:00
|
|
|
tool_settings = context.tool_settings
|
|
|
|
ipaint = tool_settings.image_paint
|
2015-04-28 23:34:40 +10:00
|
|
|
|
2018-06-10 15:55:19 +02:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.alignment = 'RIGHT'
|
|
|
|
col.label(text="Mirror")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
2015-04-28 23:34:40 +10:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(ipaint, "use_symmetry_x", text="X", toggle=True)
|
|
|
|
row.prop(ipaint, "use_symmetry_y", text="Y", toggle=True)
|
|
|
|
row.prop(ipaint, "use_symmetry_z", text="Z", toggle=True)
|
|
|
|
|
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2019-03-20 14:09:55 +01:00
|
|
|
class VIEW3D_PT_tools_imagepaint_options(View3DPaintPanel, Panel):
|
2018-06-05 16:35:20 +02:00
|
|
|
bl_context = ".imagepaint" # dot on purpose (access from topbar)
|
2019-03-20 14:09:55 +01:00
|
|
|
bl_label = "Options"
|
2018-10-01 15:39:03 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2010-08-04 12:18:07 +00:00
|
|
|
brush = context.tool_settings.image_paint.brush
|
2012-11-06 09:19:51 +00:00
|
|
|
return (brush is not None)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2018-10-31 17:23:43 +01:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
2018-12-17 17:20:24 +11:00
|
|
|
tool_settings = context.tool_settings
|
|
|
|
ipaint = tool_settings.image_paint
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-11-02 16:19:57 +00:00
|
|
|
layout.prop(ipaint, "seam_bleed")
|
2019-03-12 11:07:43 +01:00
|
|
|
layout.prop(ipaint, "dither", slider=True)
|
2018-10-31 17:23:43 +01:00
|
|
|
|
|
|
|
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
|
|
|
|
|
|
|
|
col = flow.column()
|
|
|
|
col.prop(ipaint, "use_occlude")
|
|
|
|
|
|
|
|
col = flow.column()
|
2019-03-12 11:07:43 +01:00
|
|
|
col.prop(ipaint, "use_backface_culling", text="Backface Culling")
|
|
|
|
|
|
|
|
|
2019-03-20 14:09:55 +01:00
|
|
|
class VIEW3D_PT_tools_imagepaint_options_unified(Panel, View3DPaintPanel):
|
2018-10-31 17:23:43 +01:00
|
|
|
bl_context = ".imagepaint" # dot on purpose (access from topbar)
|
2019-03-20 14:09:55 +01:00
|
|
|
bl_parent_id = "VIEW3D_PT_tools_imagepaint_options"
|
2018-10-31 17:23:43 +01:00
|
|
|
bl_label = "Unified Brush"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
2014-07-21 12:02:05 +02:00
|
|
|
self.unified_paint_settings(layout, context)
|
2011-11-04 15:21:34 +00:00
|
|
|
|
2018-12-20 13:01:40 +11:00
|
|
|
|
2019-03-20 14:09:55 +01:00
|
|
|
class VIEW3D_PT_tools_imagepaint_options_cavity(View3DPaintPanel, Panel):
|
2018-10-31 17:23:43 +01:00
|
|
|
bl_context = ".imagepaint" # dot on purpose (access from topbar)
|
|
|
|
bl_label = "Cavity Mask"
|
2019-03-20 14:09:55 +01:00
|
|
|
bl_parent_id = "VIEW3D_PT_tools_imagepaint_options"
|
2018-10-31 17:23:43 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
2018-12-17 17:26:47 +11:00
|
|
|
tool_settings = context.tool_settings
|
|
|
|
ipaint = tool_settings.image_paint
|
2018-10-31 17:23:43 +01:00
|
|
|
|
|
|
|
self.layout.prop(ipaint, "use_cavity", text="")
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2018-12-17 17:26:47 +11:00
|
|
|
tool_settings = context.tool_settings
|
|
|
|
ipaint = tool_settings.image_paint
|
2018-10-31 17:23:43 +01:00
|
|
|
|
|
|
|
layout.active = ipaint.use_cavity
|
|
|
|
|
2019-05-06 13:03:23 +02:00
|
|
|
layout.template_curve_mapping(ipaint, "cavity_curve", brush=True,
|
|
|
|
use_negative_slope=True)
|
2018-10-31 17:23:43 +01:00
|
|
|
|
2009-12-22 10:48:13 +00:00
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2012-01-18 05:54:19 +00:00
|
|
|
class VIEW3D_PT_imagepaint_options(View3DPaintPanel):
|
2010-07-22 18:56:46 +00:00
|
|
|
bl_label = "Options"
|
|
|
|
|
2010-08-09 01:37:09 +00:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2011-04-01 04:22:30 +00:00
|
|
|
return (context.image_paint_object and context.tool_settings.image_paint)
|
2010-07-22 18:56:46 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2011-04-04 22:42:43 +00:00
|
|
|
|
2010-07-22 18:56:46 +00:00
|
|
|
col = layout.column()
|
2012-01-12 17:22:32 +00:00
|
|
|
self.unified_paint_settings(col, context)
|
2010-09-07 15:17:42 +00:00
|
|
|
|
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class VIEW3D_MT_tools_projectpaint_stencil(Menu):
|
2010-02-14 11:21:21 +00:00
|
|
|
bl_label = "Mask Layer"
|
2009-12-22 10:48:13 +00:00
|
|
|
|
2010-02-14 11:21:21 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
2017-05-25 15:11:00 +10:00
|
|
|
for i, uv_layer in enumerate(context.active_object.data.uv_layers):
|
|
|
|
props = layout.operator("wm.context_set_int", text=uv_layer.name, translate=False)
|
2017-07-13 19:28:20 +10:00
|
|
|
props.data_path = "active_object.data.uv_layer_stencil_index"
|
2012-01-01 13:09:58 +00:00
|
|
|
props.value = i
|
2009-12-22 10:48:13 +00:00
|
|
|
|
2009-07-25 22:31:02 +00:00
|
|
|
|
2018-06-10 15:40:02 +02:00
|
|
|
# TODO, move to space_view3d.py
|
2019-03-18 21:30:56 +01:00
|
|
|
class VIEW3D_PT_tools_particlemode_options(View3DPanel, Panel):
|
2013-03-10 17:42:08 +00:00
|
|
|
"""Default tools for particle mode"""
|
2019-05-16 22:13:28 +10:00
|
|
|
bl_category = "Tool"
|
2018-05-07 15:01:37 +02:00
|
|
|
bl_context = ".particlemode"
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Options"
|
2019-03-18 21:30:56 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
2019-03-18 21:30:56 +01:00
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False # No animation.
|
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
pe = context.tool_settings.particle_edit
|
|
|
|
ob = pe.object
|
|
|
|
|
2019-03-18 21:30:56 +01:00
|
|
|
layout.prop(pe, "type", text="Editing Type")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-06 12:27:28 +00:00
|
|
|
ptcache = None
|
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
if pe.type == 'PARTICLES':
|
|
|
|
if ob.particle_systems:
|
|
|
|
if len(ob.particle_systems) > 1:
|
2013-02-18 13:30:40 +00:00
|
|
|
layout.template_list("UI_UL_list", "particle_systems", ob, "particle_systems",
|
This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).
It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!
This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!
To make all this work, other changes were also necessary:
* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.
* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.
* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.
* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
Note: not sure whether we should add that one to all UILayout's prop funcs?
Note: will update addons using template list asap.
2012-12-28 09:20:16 +00:00
|
|
|
ob.particle_systems, "active_index", rows=2, maxrows=3)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-24 04:02:50 +00:00
|
|
|
ptcache = ob.particle_systems.active.point_cache
|
2009-10-31 19:31:45 +00:00
|
|
|
else:
|
|
|
|
for md in ob.modifiers:
|
2009-10-31 23:35:56 +00:00
|
|
|
if md.type == pe.type:
|
2009-10-31 19:31:45 +00:00
|
|
|
ptcache = md.point_cache
|
|
|
|
|
2010-08-18 08:26:18 +00:00
|
|
|
if ptcache and len(ptcache.point_caches) > 1:
|
2013-02-18 13:30:40 +00:00
|
|
|
layout.template_list("UI_UL_list", "particles_point_caches", ptcache, "point_caches",
|
|
|
|
ptcache.point_caches, "active_index", rows=2, maxrows=3)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-18 08:26:18 +00:00
|
|
|
if not pe.is_editable:
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.label(text="Point cache must be baked")
|
2010-12-21 20:25:37 +00:00
|
|
|
layout.label(text="in memory to enable editing!")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2010-08-18 08:26:18 +00:00
|
|
|
col.active = pe.is_editable
|
2010-01-05 15:23:09 +00:00
|
|
|
col.prop(ob.data, "use_mirror_x")
|
2019-03-18 21:30:56 +01:00
|
|
|
col.separator()
|
|
|
|
col.prop(pe, "use_preserve_length", text="Preserve Strand Lengths")
|
|
|
|
col.prop(pe, "use_preserve_root", text="Preserve Root Positions")
|
|
|
|
if not pe.is_hair:
|
|
|
|
col.prop(pe, "use_auto_velocity", text="Auto-Velocity")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-03-20 10:26:53 +11:00
|
|
|
|
2019-03-18 21:30:56 +01:00
|
|
|
class VIEW3D_PT_tools_particlemode_options_shapecut(View3DPanel, Panel):
|
|
|
|
"""Default tools for particle mode"""
|
2019-05-16 22:13:28 +10:00
|
|
|
bl_category = "Tool"
|
2019-03-18 21:30:56 +01:00
|
|
|
bl_parent_id = "VIEW3D_PT_tools_particlemode_options"
|
|
|
|
bl_label = "Cut Particles to Shape"
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
2014-10-22 16:36:23 +02:00
|
|
|
|
2019-03-18 21:30:56 +01:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False # No animation.
|
|
|
|
|
|
|
|
pe = context.tool_settings.particle_edit
|
|
|
|
|
|
|
|
layout.prop(pe, "shape_object")
|
|
|
|
layout.operator("particle.shape_cut", text="Cut")
|
|
|
|
|
2019-03-20 10:26:53 +11:00
|
|
|
|
2019-03-18 21:30:56 +01:00
|
|
|
class VIEW3D_PT_tools_particlemode_options_display(View3DPanel, Panel):
|
|
|
|
"""Default tools for particle mode"""
|
2019-05-16 22:13:28 +10:00
|
|
|
bl_category = "Tool"
|
2019-03-18 21:30:56 +01:00
|
|
|
bl_parent_id = "VIEW3D_PT_tools_particlemode_options"
|
|
|
|
bl_label = "Viewport Display"
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False # No animation.
|
|
|
|
|
|
|
|
pe = context.tool_settings.particle_edit
|
|
|
|
|
|
|
|
col = layout.column()
|
2010-08-18 08:26:18 +00:00
|
|
|
col.active = pe.is_editable
|
2018-09-03 18:58:41 +02:00
|
|
|
col.prop(pe, "display_step", text="Path Steps")
|
2010-08-18 08:26:18 +00:00
|
|
|
if pe.is_hair:
|
2010-08-17 17:03:52 +00:00
|
|
|
col.prop(pe, "show_particles", text="Children")
|
2010-03-22 19:38:40 +00:00
|
|
|
else:
|
|
|
|
if pe.type == 'PARTICLES':
|
2010-08-17 17:03:52 +00:00
|
|
|
col.prop(pe, "show_particles", text="Particles")
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(pe, "use_fade_time")
|
2013-08-23 20:41:21 +00:00
|
|
|
sub = col.row(align=True)
|
2010-08-20 06:09:58 +00:00
|
|
|
sub.active = pe.use_fade_time
|
2010-03-22 19:38:40 +00:00
|
|
|
sub.prop(pe, "fade_frames", slider=True)
|
2011-04-04 10:13:04 +00:00
|
|
|
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
# ********** grease pencil object tool panels ****************
|
|
|
|
|
|
|
|
# Grease Pencil drawing brushes
|
2018-12-20 13:01:40 +11:00
|
|
|
|
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
class VIEW3D_PT_tools_grease_pencil_brush(View3DPanel, Panel):
|
|
|
|
bl_context = ".greasepencil_paint"
|
|
|
|
bl_label = "Brush"
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
is_3d_view = context.space_data.type == 'VIEW_3D'
|
|
|
|
if is_3d_view:
|
|
|
|
if context.gpencil_data is None:
|
|
|
|
return False
|
|
|
|
|
|
|
|
gpd = context.gpencil_data
|
|
|
|
return bool(gpd.is_stroke_paint_mode)
|
|
|
|
else:
|
|
|
|
return True
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
2018-12-17 17:17:43 +11:00
|
|
|
tool_settings = context.scene.tool_settings
|
|
|
|
gpencil_paint = tool_settings.gpencil_paint
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
col = row.column()
|
2018-12-17 17:17:43 +11:00
|
|
|
col.template_ID_preview(gpencil_paint, "brush", new="brush.add_gpencil", rows=3, cols=8)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
col = row.column()
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = gpencil_paint.brush
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.operator("gpencil.brush_presets_create", icon='HELP', text="")
|
|
|
|
|
|
|
|
if brush is not None:
|
2018-12-15 09:54:31 +01:00
|
|
|
gp_settings = brush.gpencil_settings
|
|
|
|
|
2019-02-03 13:27:25 +01:00
|
|
|
if brush.gpencil_tool in {'DRAW', 'FILL'}:
|
2019-03-25 17:02:42 +01:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row_mat = row.row()
|
|
|
|
if gp_settings.use_material_pin:
|
|
|
|
row_mat.template_ID(gp_settings, "material", live_icon=True)
|
|
|
|
else:
|
|
|
|
row_mat.template_ID(context.active_object, "active_material", live_icon=True)
|
|
|
|
row_mat.enabled = False # will otherwise allow to change material in active slot
|
|
|
|
|
|
|
|
row.prop(gp_settings, "use_material_pin", text="")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2019-01-02 14:36:56 +11:00
|
|
|
if not self.is_popover:
|
|
|
|
from .properties_paint_common import (
|
|
|
|
brush_basic_gpencil_paint_settings,
|
|
|
|
)
|
|
|
|
brush_basic_gpencil_paint_settings(layout, context, brush, compact=True)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Grease Pencil drawing brushes options
|
|
|
|
class VIEW3D_PT_tools_grease_pencil_brush_option(View3DPanel, Panel):
|
|
|
|
bl_context = ".greasepencil_paint"
|
|
|
|
bl_label = "Options"
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
2018-09-12 15:18:05 +02:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = context.tool_settings.gpencil_paint.brush
|
2019-01-07 16:22:20 +01:00
|
|
|
return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL'}
|
2018-09-12 15:18:05 +02:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw_header_preset(self, _context):
|
2018-07-31 10:22:19 +02:00
|
|
|
VIEW3D_PT_gpencil_brush_presets.draw_panel_header(self.layout)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = context.tool_settings.gpencil_paint.brush
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
if brush is not None:
|
2019-04-15 10:32:06 +02:00
|
|
|
gp_settings = brush.gpencil_settings
|
2018-07-31 10:22:19 +02:00
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(gp_settings, "input_samples")
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col.prop(gp_settings, "active_smooth_factor")
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col.prop(gp_settings, "angle", slider=True)
|
|
|
|
col.prop(gp_settings, "angle_factor", text="Factor", slider=True)
|
2019-04-15 10:32:06 +02:00
|
|
|
|
|
|
|
ob = context.object
|
|
|
|
if ob:
|
|
|
|
ma = ob.active_material
|
2019-04-18 16:57:41 +02:00
|
|
|
elif brush.gpencil_settings.material:
|
2019-04-15 10:32:06 +02:00
|
|
|
ma = brush.gpencil_settings.material
|
2019-04-18 16:57:41 +02:00
|
|
|
else:
|
|
|
|
ma = None
|
2019-04-15 10:32:06 +02:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
col.separator()
|
2019-04-15 10:32:06 +02:00
|
|
|
subcol = col.column(align=True)
|
2019-04-23 17:25:37 +02:00
|
|
|
if ma and ma.grease_pencil.mode == 'LINE':
|
2019-04-15 10:32:06 +02:00
|
|
|
subcol.enabled = False
|
|
|
|
subcol.prop(gp_settings, "gradient_factor", slider=True)
|
|
|
|
subcol.prop(gp_settings, "gradient_shape")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_grease_pencil_brush_stabilizer(View3DPanel, Panel):
|
|
|
|
bl_context = ".greasepencil_paint"
|
|
|
|
bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_option'
|
2019-03-16 12:54:08 +01:00
|
|
|
bl_label = "Stabilize"
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = context.tool_settings.gpencil_paint.brush
|
2018-11-02 09:10:23 +11:00
|
|
|
return brush is not None and brush.gpencil_tool == 'DRAW'
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
def draw_header(self, context):
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = context.tool_settings.gpencil_paint.brush
|
2018-07-31 10:22:19 +02:00
|
|
|
gp_settings = brush.gpencil_settings
|
2018-10-31 09:27:40 +11:00
|
|
|
self.layout.prop(gp_settings, "use_settings_stabilizer", text="")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = context.tool_settings.gpencil_paint.brush
|
2018-07-31 10:22:19 +02:00
|
|
|
gp_settings = brush.gpencil_settings
|
2018-10-31 09:27:40 +11:00
|
|
|
layout.active = gp_settings.use_settings_stabilizer
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
layout.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
|
|
|
|
layout.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
|
|
|
|
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_grease_pencil_brush_settings(View3DPanel, Panel):
|
|
|
|
bl_context = ".greasepencil_paint"
|
|
|
|
bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_option'
|
2019-03-16 12:54:08 +01:00
|
|
|
bl_label = "Post-Processing"
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = context.tool_settings.gpencil_paint.brush
|
2018-11-02 09:10:23 +11:00
|
|
|
return brush is not None and brush.gpencil_tool != 'ERASE'
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
def draw_header(self, context):
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = context.tool_settings.gpencil_paint.brush
|
2018-07-31 10:22:19 +02:00
|
|
|
gp_settings = brush.gpencil_settings
|
2018-10-31 09:27:40 +11:00
|
|
|
self.layout.prop(gp_settings, "use_settings_postprocess", text="")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = context.tool_settings.gpencil_paint.brush
|
2018-07-31 10:22:19 +02:00
|
|
|
gp_settings = brush.gpencil_settings
|
2018-10-31 09:27:40 +11:00
|
|
|
layout.active = gp_settings.use_settings_postprocess
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2018-08-02 00:52:45 +02:00
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(gp_settings, "pen_smooth_factor")
|
2018-09-12 10:16:52 +02:00
|
|
|
col.prop(gp_settings, "pen_smooth_steps")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2018-08-02 00:52:45 +02:00
|
|
|
col = layout.column(align=True)
|
2018-09-12 10:16:52 +02:00
|
|
|
col.prop(gp_settings, "pen_thick_smooth_factor")
|
|
|
|
col.prop(gp_settings, "pen_thick_smooth_steps", text="Iterations")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2018-08-02 00:52:45 +02:00
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(gp_settings, "pen_subdivision_steps")
|
|
|
|
col.prop(gp_settings, "random_subdiv", text="Randomness", slider=True)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2019-02-26 16:04:27 +00:00
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(gp_settings, "trim")
|
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
class VIEW3D_PT_tools_grease_pencil_brush_random(View3DPanel, Panel):
|
|
|
|
bl_context = ".greasepencil_paint"
|
|
|
|
bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_brush_option'
|
2019-03-16 12:54:08 +01:00
|
|
|
bl_label = "Randomize"
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = context.tool_settings.gpencil_paint.brush
|
2018-11-02 09:10:23 +11:00
|
|
|
return brush is not None and brush.gpencil_tool != 'ERASE'
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
def draw_header(self, context):
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = context.tool_settings.gpencil_paint.brush
|
2018-07-31 10:22:19 +02:00
|
|
|
gp_settings = brush.gpencil_settings
|
2018-10-31 09:27:40 +11:00
|
|
|
self.layout.prop(gp_settings, "use_settings_random", text="")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = context.tool_settings.gpencil_paint.brush
|
2018-07-31 10:22:19 +02:00
|
|
|
gp_settings = brush.gpencil_settings
|
2018-10-31 09:27:40 +11:00
|
|
|
layout.active = gp_settings.use_settings_random
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
layout.prop(gp_settings, "random_pressure", text="Pressure", slider=True)
|
|
|
|
layout.prop(gp_settings, "random_strength", text="Strength", slider=True)
|
|
|
|
layout.prop(gp_settings, "uv_random", text="UV", slider=True)
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(gp_settings, "pen_jitter", slider=True)
|
|
|
|
row.prop(gp_settings, "use_jitter_pressure", text="", icon='STYLUS_PRESSURE')
|
|
|
|
|
|
|
|
|
|
|
|
# Grease Pencil drawingcurves
|
|
|
|
class VIEW3D_PT_tools_grease_pencil_brushcurves(View3DPanel, Panel):
|
|
|
|
bl_context = ".greasepencil_paint"
|
|
|
|
bl_label = "Curves"
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
2018-09-12 15:18:05 +02:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = context.tool_settings.gpencil_paint.brush
|
2019-01-07 16:22:20 +01:00
|
|
|
return brush is not None and brush.gpencil_tool not in {'ERASE', 'FILL'}
|
2018-09-12 15:18:05 +02:00
|
|
|
|
2018-11-09 18:03:34 +01:00
|
|
|
def draw(self, context):
|
2019-03-17 21:13:25 +11:00
|
|
|
pass
|
2018-11-09 18:03:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_grease_pencil_brushcurves_sensitivity(View3DPanel, Panel):
|
|
|
|
bl_context = ".greasepencil_paint"
|
|
|
|
bl_label = "Sensitivity"
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-12-20 13:01:40 +11:00
|
|
|
bl_parent_id = "VIEW3D_PT_tools_grease_pencil_brushcurves"
|
2018-11-09 18:03:34 +01:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = context.tool_settings.gpencil_paint.brush
|
2018-07-31 10:22:19 +02:00
|
|
|
gp_settings = brush.gpencil_settings
|
|
|
|
|
2019-05-06 13:03:23 +02:00
|
|
|
layout.template_curve_mapping(gp_settings, "curve_sensitivity", brush=True,
|
|
|
|
use_negative_slope=True)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2018-11-09 18:03:34 +01:00
|
|
|
|
|
|
|
class VIEW3D_PT_tools_grease_pencil_brushcurves_strength(View3DPanel, Panel):
|
|
|
|
bl_context = ".greasepencil_paint"
|
|
|
|
bl_label = "Strength"
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-12-20 13:01:40 +11:00
|
|
|
bl_parent_id = "VIEW3D_PT_tools_grease_pencil_brushcurves"
|
2018-11-09 18:03:34 +01:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = context.tool_settings.gpencil_paint.brush
|
2018-11-09 18:03:34 +01:00
|
|
|
gp_settings = brush.gpencil_settings
|
|
|
|
|
2019-05-06 13:03:23 +02:00
|
|
|
layout.template_curve_mapping(gp_settings, "curve_strength", brush=True,
|
|
|
|
use_negative_slope=True)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2018-11-09 18:03:34 +01:00
|
|
|
|
|
|
|
class VIEW3D_PT_tools_grease_pencil_brushcurves_jitter(View3DPanel, Panel):
|
|
|
|
bl_context = ".greasepencil_paint"
|
|
|
|
bl_label = "Jitter"
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-12-20 13:01:40 +11:00
|
|
|
bl_parent_id = "VIEW3D_PT_tools_grease_pencil_brushcurves"
|
2018-11-09 18:03:34 +01:00
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
2018-12-17 17:17:43 +11:00
|
|
|
brush = context.tool_settings.gpencil_paint.brush
|
2018-11-09 18:03:34 +01:00
|
|
|
gp_settings = brush.gpencil_settings
|
|
|
|
|
2019-05-06 13:03:23 +02:00
|
|
|
layout.template_curve_mapping(gp_settings, "curve_jitter", brush=True,
|
|
|
|
use_negative_slope=True)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch)
This merge-commit brings in a number of new features and workflow/UI improvements for
working with Grease Pencil. While these were originally targetted at improving
the workflow for creating 3D storyboards in Blender using the Grease Pencil,
many of these changes should also prove useful in other workflows too.
The main highlights here are:
1) It is now possible to edit Grease Pencil strokes
- Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions
to enter "Stroke Edit Mode". In this mode, many common editing tools will
operate on Grease Pencil stroke points instead.
- Tools implemented include Select, Select All/Border/Circle/Linked/More/Less,
Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete.
- Proportional Editing works when using the transform tools
2) Grease Pencil stroke settings can now be animated
NOTE: Currently drivers don't work, but if time allows, this may still be
added before the release.
3) Strokes can be drawn with "filled" interiors, using a separate set of
colour/opacity settings to the ones used for the lines themselves.
This makes use of OpenGL filled polys, which has the limitation of only
being able to fill convex shapes. Some artifacts may be visible on concave
shapes (e.g. pacman's mouth will be overdrawn)
4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing
has been added which draws strokes as a series of screen-aligned discs.
While this was originally a partial experimental technique at getting better
quality 3D lines, the effects possible using this technique were interesting
enough to warrant making this a dedicated feature. Best results when partial
opacity and large stroke widths are used.
5) Improved Onion Skinning Support
- Different colours can be selected for the before/after ghosts. To do so,
enable the "colour wheel" toggle beside the Onion Skinning toggle, and set
the colours accordingly.
- Different numbers of ghosts can be shown before/after the current frame
6) Grease Pencil datablocks are now attached to the scene by default instead of
the active object.
- For a long time, the object-attachment has proved to be quite problematic
for users to keep track of. Now that this is done at scene level, it is
easier for most users to use.
- An exception for old files (and for any addons which may benefit from object
attachment instead), is that if the active object has a Grease Pencil datablock,
that will be used instead.
- It is not currently possible to choose object-attachment from the UI, but
it is simple to do this from the console instead, by doing:
context.active_object.grease_pencil = bpy.data.grease_pencil["blah"]
7) Various UI Cleanups
- The layers UI has been cleaned up to use a list instead of the nested-panels
design. Apart from saving space, this is also much nicer to look at now.
- The UI code is now all defined in Python. To support this, it has been necessary
to add some new context properties to make it easier to access these settings.
e.g. "gpencil_data" for the datablock
"active_gpencil_layer" and "active_gpencil_frame" for active data,
"editable_gpencil_strokes" for the strokes that can be edited
- The "stroke placement/alignment" settings (previously "Drawing Settings" at the
bottom of the Grease Pencil panel in the Properties Region) is now located in
the toolbar. These were more toolsettings than properties for how GPencil got drawn.
- "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a
suggestion for an earlier discussion on developer.blender.org
- By default, the painting operator will wait for a mouse button to be pressed
before it starts creating the stroke. This is to make it easier to include
this operator in various toolbars/menus/etc. To get it immediately starting
(as when you hold down DKEy to draw), set "wait_for_input" to False.
- GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor
- Toolbar panels have been added to all the other editors which support these.
8) Pie menus for quick-access to tools
A set of experimental pie menus has been included for quick access to many
tools and settings. It is not necessary to use these to get things done,
but they have been designed to help make certain common tasks easier.
- Ctrl-D = The main pie menu. Reveals tools in a context sensitive and
spatially stable manner.
- D Q = "Quick Settings" pie. This allows quick access to the active
layer's settings. Notably, colours, thickness, and turning
onion skinning on/off.
2014-12-01 01:52:06 +13:00
|
|
|
# Grease Pencil stroke editing tools
|
|
|
|
class VIEW3D_PT_tools_grease_pencil_edit(GreasePencilStrokeEditPanel, Panel):
|
2014-02-24 20:53:37 +01:00
|
|
|
bl_space_type = 'VIEW_3D'
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2014-01-29 09:53:20 -06:00
|
|
|
|
|
|
|
|
2017-01-18 19:00:17 +13:00
|
|
|
# Grease Pencil stroke interpolation tools
|
2018-07-31 10:22:19 +02:00
|
|
|
class VIEW3D_PT_tools_grease_pencil_interpolate(Panel):
|
2017-01-18 19:00:17 +13:00
|
|
|
bl_space_type = 'VIEW_3D'
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_region_type = 'HEADER'
|
|
|
|
bl_label = "Interpolate"
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
if context.gpencil_data is None:
|
|
|
|
return False
|
|
|
|
|
|
|
|
gpd = context.gpencil_data
|
|
|
|
return bool(context.editable_gpencil_strokes) and bool(gpd.use_stroke_edit_mode)
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
settings = context.tool_settings.gpencil_interpolate
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2018-08-28 12:34:51 +10:00
|
|
|
col.label(text="Interpolate Strokes")
|
2018-07-31 10:22:19 +02:00
|
|
|
col.operator("gpencil.interpolate", text="Interpolate")
|
|
|
|
col.operator("gpencil.interpolate_sequence", text="Sequence")
|
|
|
|
col.operator("gpencil.interpolate_reverse", text="Remove Breakdowns")
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.label(text="Options:")
|
|
|
|
col.prop(settings, "interpolate_all_layers")
|
|
|
|
col.prop(settings, "interpolate_selected_only")
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.label(text="Sequence Options:")
|
|
|
|
col.prop(settings, "type")
|
|
|
|
if settings.type == 'CUSTOM':
|
|
|
|
# TODO: Options for loading/saving curve presets?
|
2019-05-06 13:03:23 +02:00
|
|
|
col.template_curve_mapping(settings, "interpolation_curve", brush=True,
|
|
|
|
use_negative_slope=True)
|
2018-07-31 10:22:19 +02:00
|
|
|
elif settings.type != 'LINEAR':
|
|
|
|
col.prop(settings, "easing")
|
|
|
|
|
|
|
|
if settings.type == 'BACK':
|
|
|
|
layout.prop(settings, "back")
|
2019-03-13 12:53:40 +11:00
|
|
|
elif settings.type == 'ELASTIC':
|
2018-07-31 10:22:19 +02:00
|
|
|
sub = layout.column(align=True)
|
|
|
|
sub.prop(settings, "amplitude")
|
|
|
|
sub.prop(settings, "period")
|
2017-01-18 19:00:17 +13:00
|
|
|
|
|
|
|
|
2015-12-13 21:03:13 +13:00
|
|
|
# Grease Pencil stroke sculpting tools
|
2018-07-31 10:22:19 +02:00
|
|
|
class VIEW3D_PT_tools_grease_pencil_sculpt(GreasePencilStrokeSculptPanel, View3DPanel, Panel):
|
|
|
|
bl_context = ".greasepencil_sculpt"
|
|
|
|
bl_category = "Tools"
|
2018-09-21 20:15:25 +02:00
|
|
|
bl_label = "Brush"
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2015-12-13 21:03:13 +13:00
|
|
|
|
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
# Grease Pencil weight painting tools
|
|
|
|
class VIEW3D_PT_tools_grease_pencil_weight_paint(View3DPanel, Panel):
|
|
|
|
bl_context = ".greasepencil_weight"
|
|
|
|
bl_category = "Tools"
|
2018-09-25 15:38:56 +02:00
|
|
|
bl_label = "Brush"
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2016-08-03 23:31:48 +02:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
layout.use_property_split = True
|
|
|
|
layout.use_property_decorate = False
|
2018-06-05 16:32:11 +02:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
settings = context.tool_settings.gpencil_sculpt
|
|
|
|
brush = settings.brush
|
2018-06-05 16:32:11 +02:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
layout.template_icon_view(settings, "weight_tool", show_labels=True)
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
2019-01-02 14:36:56 +11:00
|
|
|
if not self.is_popover:
|
|
|
|
from .properties_paint_common import (
|
|
|
|
brush_basic_gpencil_weight_settings,
|
|
|
|
)
|
|
|
|
brush_basic_gpencil_weight_settings(col, context, brush)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
# Grease Pencil Brush Appeareance (one for each mode)
|
|
|
|
class VIEW3D_PT_tools_grease_pencil_paint_appearance(GreasePencilAppearancePanel, View3DPanel, Panel):
|
|
|
|
bl_context = ".greasepencil_paint"
|
2019-03-19 19:32:57 +01:00
|
|
|
bl_label = "Display"
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
class VIEW3D_PT_tools_grease_pencil_sculpt_appearance(GreasePencilAppearancePanel, View3DPanel, Panel):
|
|
|
|
bl_context = ".greasepencil_sculpt"
|
2019-03-19 19:32:57 +01:00
|
|
|
bl_label = "Display"
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
2018-09-21 20:15:25 +02:00
|
|
|
class VIEW3D_PT_tools_grease_pencil_sculpt_options(GreasePencilSculptOptionsPanel, View3DPanel, Panel):
|
|
|
|
bl_context = ".greasepencil_sculpt"
|
|
|
|
bl_label = "Sculpt Strokes"
|
|
|
|
bl_parent_id = 'VIEW3D_PT_tools_grease_pencil_sculpt'
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-09-21 20:15:25 +02:00
|
|
|
|
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
class VIEW3D_PT_tools_grease_pencil_weight_appearance(GreasePencilAppearancePanel, View3DPanel, Panel):
|
|
|
|
bl_context = ".greasepencil_weight"
|
2019-03-19 19:32:57 +01:00
|
|
|
bl_label = "Display"
|
2019-05-10 13:43:07 +10:00
|
|
|
bl_category = "Tool"
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
2019-03-13 12:41:22 +11:00
|
|
|
class VIEW3D_PT_gpencil_brush_presets(PresetPanel, Panel):
|
2018-07-31 10:22:19 +02:00
|
|
|
"""Brush settings"""
|
|
|
|
bl_label = "Brush Presets"
|
|
|
|
preset_subdir = "gpencil_brush"
|
|
|
|
preset_operator = "script.execute_preset"
|
|
|
|
preset_add_operator = "scene.gpencil_brush_preset_add"
|
2016-08-03 23:31:48 +02:00
|
|
|
|
|
|
|
|
2017-03-18 20:03:24 +11:00
|
|
|
classes = (
|
2017-03-20 02:34:32 +11:00
|
|
|
VIEW3D_PT_tools_meshedit_options,
|
|
|
|
VIEW3D_PT_tools_curveedit_options_stroke,
|
|
|
|
VIEW3D_PT_tools_armatureedit_options,
|
|
|
|
VIEW3D_PT_tools_posemode_options,
|
2018-10-05 17:40:24 +02:00
|
|
|
VIEW3D_PT_slots_projectpaint,
|
2017-03-18 20:03:24 +11:00
|
|
|
VIEW3D_PT_tools_brush,
|
2019-03-19 18:17:50 +01:00
|
|
|
VIEW3D_PT_tools_brush_color,
|
|
|
|
VIEW3D_PT_tools_brush_swatches,
|
|
|
|
VIEW3D_PT_tools_brush_gradient,
|
|
|
|
VIEW3D_PT_tools_brush_clone,
|
|
|
|
VIEW3D_PT_tools_brush_options,
|
2017-03-20 02:34:32 +11:00
|
|
|
TEXTURE_UL_texpaintslots,
|
|
|
|
VIEW3D_MT_tools_projectpaint_uvlayer,
|
|
|
|
VIEW3D_PT_stencil_projectpaint,
|
2017-03-18 20:03:24 +11:00
|
|
|
VIEW3D_PT_tools_brush_texture,
|
2017-03-20 02:34:32 +11:00
|
|
|
VIEW3D_PT_tools_mask_texture,
|
|
|
|
VIEW3D_PT_tools_brush_stroke,
|
2018-10-31 17:23:43 +01:00
|
|
|
VIEW3D_PT_tools_brush_stroke_smooth_stroke,
|
2019-03-19 18:17:50 +01:00
|
|
|
VIEW3D_PT_tools_brush_falloff,
|
|
|
|
VIEW3D_PT_tools_brush_falloff_frontface,
|
|
|
|
VIEW3D_PT_tools_brush_falloff_normal,
|
|
|
|
VIEW3D_PT_tools_brush_display,
|
2019-03-19 19:03:51 +01:00
|
|
|
VIEW3D_PT_tools_brush_display_show_brush,
|
|
|
|
VIEW3D_PT_tools_brush_display_custom_icon,
|
2017-03-20 02:34:32 +11:00
|
|
|
VIEW3D_PT_sculpt_dyntopo,
|
2018-10-31 17:23:43 +01:00
|
|
|
VIEW3D_PT_sculpt_dyntopo_remesh,
|
2019-03-20 14:09:55 +01:00
|
|
|
VIEW3D_PT_sculpt_symmetry,
|
2017-03-20 02:34:32 +11:00
|
|
|
VIEW3D_PT_sculpt_options,
|
2018-10-31 17:23:43 +01:00
|
|
|
VIEW3D_PT_sculpt_options_unified,
|
|
|
|
VIEW3D_PT_sculpt_options_gravity,
|
2017-09-28 01:38:17 +10:00
|
|
|
VIEW3D_PT_tools_weightpaint_symmetry,
|
2017-03-20 02:34:32 +11:00
|
|
|
VIEW3D_PT_tools_weightpaint_options,
|
2019-03-20 14:09:55 +01:00
|
|
|
VIEW3D_PT_tools_weightpaint_options_unified,
|
2017-09-28 01:38:17 +10:00
|
|
|
VIEW3D_PT_tools_vertexpaint_symmetry,
|
2019-03-20 14:09:55 +01:00
|
|
|
VIEW3D_PT_tools_vertexpaint_options,
|
2017-03-20 02:34:32 +11:00
|
|
|
VIEW3D_PT_tools_imagepaint_symmetry,
|
2019-03-20 14:09:55 +01:00
|
|
|
VIEW3D_PT_tools_imagepaint_options,
|
|
|
|
VIEW3D_PT_tools_imagepaint_options_cavity,
|
|
|
|
VIEW3D_PT_tools_imagepaint_options_unified,
|
|
|
|
VIEW3D_PT_tools_imagepaint_options_external,
|
2017-03-20 02:34:32 +11:00
|
|
|
VIEW3D_MT_tools_projectpaint_stencil,
|
|
|
|
VIEW3D_PT_tools_particlemode,
|
2019-03-18 21:30:56 +01:00
|
|
|
VIEW3D_PT_tools_particlemode_options,
|
|
|
|
VIEW3D_PT_tools_particlemode_options_shapecut,
|
|
|
|
VIEW3D_PT_tools_particlemode_options_display,
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
VIEW3D_PT_gpencil_brush_presets,
|
2017-03-20 02:34:32 +11:00
|
|
|
VIEW3D_PT_tools_grease_pencil_brush,
|
2018-07-31 10:22:19 +02:00
|
|
|
VIEW3D_PT_tools_grease_pencil_brush_option,
|
|
|
|
VIEW3D_PT_tools_grease_pencil_brush_settings,
|
|
|
|
VIEW3D_PT_tools_grease_pencil_brush_stabilizer,
|
|
|
|
VIEW3D_PT_tools_grease_pencil_brush_random,
|
2017-03-20 02:34:32 +11:00
|
|
|
VIEW3D_PT_tools_grease_pencil_brushcurves,
|
2018-11-09 18:03:34 +01:00
|
|
|
VIEW3D_PT_tools_grease_pencil_brushcurves_sensitivity,
|
|
|
|
VIEW3D_PT_tools_grease_pencil_brushcurves_strength,
|
|
|
|
VIEW3D_PT_tools_grease_pencil_brushcurves_jitter,
|
2018-07-31 10:22:19 +02:00
|
|
|
VIEW3D_PT_tools_grease_pencil_sculpt,
|
|
|
|
VIEW3D_PT_tools_grease_pencil_weight_paint,
|
|
|
|
VIEW3D_PT_tools_grease_pencil_paint_appearance,
|
2018-09-21 20:15:25 +02:00
|
|
|
VIEW3D_PT_tools_grease_pencil_sculpt_options,
|
2018-07-31 10:22:19 +02:00
|
|
|
VIEW3D_PT_tools_grease_pencil_sculpt_appearance,
|
|
|
|
VIEW3D_PT_tools_grease_pencil_weight_appearance,
|
|
|
|
VIEW3D_PT_tools_grease_pencil_interpolate,
|
2017-03-18 20:03:24 +11:00
|
|
|
)
|
|
|
|
|
2011-04-04 10:13:04 +00:00
|
|
|
if __name__ == "__main__": # only for live edit.
|
2017-03-18 20:03:24 +11:00
|
|
|
from bpy.utils import register_class
|
|
|
|
for cls in classes:
|
|
|
|
register_class(cls)
|