2009-11-01 15:21:20 +00:00
|
|
|
# ##### BEGIN GPL LICENSE BLOCK #####
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License
|
|
|
|
# as published by the Free Software Foundation; either version 2
|
|
|
|
# of the License, or (at your option) any later version.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
2009-11-03 07:23:02 +00:00
|
|
|
#
|
2009-11-01 15:21:20 +00:00
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software Foundation,
|
2010-02-12 13:34:04 +00:00
|
|
|
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2009-11-01 15:21:20 +00:00
|
|
|
#
|
|
|
|
# ##### END GPL LICENSE BLOCK #####
|
2009-10-31 20:16:59 +00:00
|
|
|
|
2009-10-31 23:35:56 +00:00
|
|
|
# <pep8 compliant>
|
2009-05-08 18:17:57 +00:00
|
|
|
import bpy
|
2011-08-12 06:57:00 +00:00
|
|
|
from bpy.types import Panel
|
2013-02-10 10:29:38 +00:00
|
|
|
from bpy.app.translations import pgettext_iface as iface_
|
2013-02-10 09:09:26 +00:00
|
|
|
|
2011-09-20 18:29:19 +00:00
|
|
|
|
2015-01-29 15:35:06 +11:00
|
|
|
class ModifierButtonsPanel:
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
bl_context = "modifier"
|
2012-03-10 20:08:25 +00:00
|
|
|
bl_options = {'HIDE_HEADER'}
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-07-31 21:06:08 +10:00
|
|
|
|
2011-08-12 06:57:00 +00:00
|
|
|
class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
|
2009-10-31 19:31:45 +00:00
|
|
|
bl_label = "Modifiers"
|
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
ob = context.object
|
|
|
|
return ob and ob.type != 'GPENCIL'
|
|
|
|
|
2009-10-31 19:31:45 +00:00
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
ob = context.object
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-01-30 08:45:31 +00:00
|
|
|
layout.operator_menu_enum("object.modifier_add", "type")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
for md in ob.modifiers:
|
2010-08-06 15:17:44 +00:00
|
|
|
box = layout.template_modifier(md)
|
2009-10-31 19:31:45 +00:00
|
|
|
if box:
|
|
|
|
# match enum type to our functions, avoids a lookup table.
|
2010-08-06 15:17:44 +00:00
|
|
|
getattr(self, md.type)(box, ob, md)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
# the mt.type enum is (ab)used for a lookup on function names
|
|
|
|
# ...to avoid lengthy if statements
|
|
|
|
# so each type must have a function here.
|
2012-02-20 23:24:57 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def ARMATURE(self, layout, ob, md):
|
2009-11-20 18:01:39 +00:00
|
|
|
split = layout.split()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-20 18:01:39 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Object:")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "object", text="")
|
2010-11-19 03:09:51 +00:00
|
|
|
col.prop(md, "use_deform_preserve_volume")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Bind To:")
|
|
|
|
col.prop(md, "use_vertex_groups", text="Vertex Groups")
|
|
|
|
col.prop(md, "use_bone_envelopes", text="Bone Envelopes")
|
2011-02-26 16:27:58 +00:00
|
|
|
|
2011-02-26 16:04:14 +00:00
|
|
|
layout.separator()
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2013-12-14 10:14:24 +01:00
|
|
|
split = layout.split()
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2013-12-14 10:14:24 +01:00
|
|
|
row = split.row(align=True)
|
2011-02-26 16:04:14 +00:00
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
2013-12-14 10:14:24 +01:00
|
|
|
sub = row.row(align=True)
|
2010-12-31 11:51:00 +00:00
|
|
|
sub.active = bool(md.vertex_group)
|
2013-12-14 10:14:24 +01:00
|
|
|
sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2011-01-01 07:20:34 +00:00
|
|
|
|
2013-12-14 10:14:24 +01:00
|
|
|
split.prop(md, "use_multi_modifier")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def ARRAY(self, layout, _ob, md):
|
2010-08-06 15:17:44 +00:00
|
|
|
layout.prop(md, "fit_type")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
if md.fit_type == 'FIXED_COUNT':
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(md, "count")
|
2009-10-31 19:31:45 +00:00
|
|
|
elif md.fit_type == 'FIT_LENGTH':
|
2010-08-21 04:51:00 +00:00
|
|
|
layout.prop(md, "fit_length")
|
2009-10-31 19:31:45 +00:00
|
|
|
elif md.fit_type == 'FIT_CURVE':
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(md, "curve")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(md, "use_constant_offset")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column()
|
2010-08-20 06:09:58 +00:00
|
|
|
sub.active = md.use_constant_offset
|
|
|
|
sub.prop(md, "constant_offset_displace", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(md, "use_merge_vertices", text="Merge")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column()
|
2010-08-20 06:09:58 +00:00
|
|
|
sub.active = md.use_merge_vertices
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.prop(md, "use_merge_vertices_cap", text="First Last")
|
|
|
|
sub.prop(md, "merge_threshold", text="Distance")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(md, "use_relative_offset")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column()
|
2010-08-20 06:09:58 +00:00
|
|
|
sub.active = md.use_relative_offset
|
|
|
|
sub.prop(md, "relative_offset_displace", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(md, "use_object_offset")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column()
|
2010-08-20 06:09:58 +00:00
|
|
|
sub.active = md.use_object_offset
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(md, "offset_object", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2017-12-07 04:33:52 +11:00
|
|
|
row = layout.row()
|
|
|
|
split = row.split()
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="UVs:")
|
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.prop(md, "offset_u")
|
|
|
|
sub.prop(md, "offset_v")
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-02-26 16:04:14 +00:00
|
|
|
layout.prop(md, "start_cap")
|
|
|
|
layout.prop(md, "end_cap")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def BEVEL(self, layout, ob, md):
|
2019-11-20 16:12:32 -05:00
|
|
|
offset_type = md.offset_type
|
|
|
|
if offset_type == 'PERCENT':
|
|
|
|
layout.prop(md, "width_pct")
|
2019-01-07 07:29:54 -05:00
|
|
|
else:
|
2019-11-20 16:12:32 -05:00
|
|
|
offset_text = "Width"
|
|
|
|
if offset_type == 'DEPTH':
|
|
|
|
offset_text = "Depth"
|
|
|
|
elif offset_type == 'OFFSET':
|
|
|
|
offset_text = "Offset"
|
|
|
|
layout.prop(md, "width", text=offset_text)
|
|
|
|
layout.row().prop(md, "offset_type", expand=True)
|
2013-06-08 16:06:39 +00:00
|
|
|
|
2019-11-20 16:12:32 -05:00
|
|
|
split = layout.split()
|
2013-06-08 16:06:39 +00:00
|
|
|
col = split.column()
|
|
|
|
col.prop(md, "use_only_vertices")
|
|
|
|
col.prop(md, "use_clamp_overlap")
|
2015-07-05 09:53:17 -04:00
|
|
|
col.prop(md, "loop_slide")
|
2019-11-20 16:12:32 -05:00
|
|
|
col = split.column()
|
2018-06-04 15:13:54 +05:30
|
|
|
col.prop(md, "mark_seam")
|
|
|
|
col.prop(md, "mark_sharp")
|
2019-01-03 13:39:52 -05:00
|
|
|
col.prop(md, "harden_normals")
|
2011-12-13 09:57:19 +00:00
|
|
|
|
2019-11-20 16:12:32 -05:00
|
|
|
layout.row().prop(md, "segments")
|
|
|
|
layout.row().prop(md, "profile")
|
|
|
|
layout.row().prop(md, "material")
|
|
|
|
|
|
|
|
layout.label(text="Miter Type:")
|
|
|
|
layout.row().prop(md, "miter_outer", text="Outer")
|
|
|
|
layout.row().prop(md, "miter_inner", text="Inner")
|
|
|
|
if md.miter_inner in {'MITER_PATCH', 'MITER_ARC'}:
|
|
|
|
layout.row().prop(md, "spread")
|
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.label(text="Limit Method:")
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.row().prop(md, "limit_method", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
if md.limit_method == 'ANGLE':
|
2010-08-21 04:51:00 +00:00
|
|
|
layout.prop(md, "angle_limit")
|
2013-02-21 17:29:35 +00:00
|
|
|
elif md.limit_method == 'VGROUP':
|
2020-02-18 18:06:13 +01:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2019-11-20 16:12:32 -05:00
|
|
|
layout.label(text="Face Strength Mode:")
|
2019-01-03 13:39:52 -05:00
|
|
|
layout.row().prop(md, "face_strength_mode", expand=True)
|
2018-06-23 01:46:42 +05:30
|
|
|
|
2019-11-20 16:12:32 -05:00
|
|
|
layout.label(text="Intersection Type:")
|
|
|
|
layout.row().prop(md, "vmesh_method", expand=True)
|
|
|
|
layout.row().prop(md, "use_custom_profile")
|
|
|
|
row = layout.row()
|
|
|
|
row.enabled = md.use_custom_profile
|
|
|
|
if md.use_custom_profile:
|
|
|
|
layout.template_curveprofile(md, "custom_profile")
|
2019-01-18 12:54:10 -05:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def BOOLEAN(self, layout, _ob, md):
|
2009-10-31 19:31:45 +00:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Operation:")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "operation", text="")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Object:")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "object", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-02-07 14:44:59 +01:00
|
|
|
layout.prop(md, "double_threshold")
|
2015-12-11 20:24:39 +11:00
|
|
|
|
2018-02-07 14:44:59 +01:00
|
|
|
if bpy.app.debug:
|
|
|
|
layout.prop(md, "debug_options")
|
2017-09-19 18:29:52 +10:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def BUILD(self, layout, _ob, md):
|
2009-10-31 19:31:45 +00:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2010-04-22 17:35:00 +00:00
|
|
|
col.prop(md, "frame_start")
|
2010-08-21 04:51:00 +00:00
|
|
|
col.prop(md, "frame_duration")
|
2014-01-17 00:13:36 +13:00
|
|
|
col.prop(md, "use_reverse")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2010-08-21 04:51:00 +00:00
|
|
|
col.prop(md, "use_random_order")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column()
|
2010-08-21 04:51:00 +00:00
|
|
|
sub.active = md.use_random_order
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(md, "seed")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def MESH_CACHE(self, layout, _ob, md):
|
2013-01-21 15:41:00 +00:00
|
|
|
layout.prop(md, "cache_format")
|
|
|
|
layout.prop(md, "filepath")
|
|
|
|
|
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
|
|
|
if md.cache_format == 'ABC':
|
|
|
|
layout.prop(md, "sub_object")
|
|
|
|
|
2013-01-21 15:41:00 +00:00
|
|
|
layout.label(text="Evaluation:")
|
2013-01-21 16:43:04 +00:00
|
|
|
layout.prop(md, "factor", slider=True)
|
2013-01-24 04:02:30 +00:00
|
|
|
layout.prop(md, "deform_mode")
|
2013-01-21 15:41:00 +00:00
|
|
|
layout.prop(md, "interpolation")
|
|
|
|
|
|
|
|
layout.label(text="Time Mapping:")
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(md, "time_mode", expand=True)
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(md, "play_mode", expand=True)
|
|
|
|
if md.play_mode == 'SCENE':
|
|
|
|
layout.prop(md, "frame_start")
|
|
|
|
layout.prop(md, "frame_scale")
|
|
|
|
else:
|
|
|
|
time_mode = md.time_mode
|
|
|
|
if time_mode == 'FRAME':
|
|
|
|
layout.prop(md, "eval_frame")
|
|
|
|
elif time_mode == 'TIME':
|
|
|
|
layout.prop(md, "eval_time")
|
|
|
|
elif time_mode == 'FACTOR':
|
|
|
|
layout.prop(md, "eval_factor")
|
|
|
|
|
|
|
|
layout.label(text="Axis Mapping:")
|
2018-08-28 12:38:54 +10:00
|
|
|
split = layout.split(factor=0.5, align=True)
|
2013-01-21 15:41:00 +00:00
|
|
|
split.alert = (md.forward_axis[-1] == md.up_axis[-1])
|
2018-08-28 12:34:51 +10:00
|
|
|
split.label(text="Forward/Up Axis:")
|
2013-01-21 15:41:00 +00:00
|
|
|
split.prop(md, "forward_axis", text="")
|
|
|
|
split.prop(md, "up_axis", text="")
|
2018-08-28 12:38:54 +10:00
|
|
|
split = layout.split(factor=0.5)
|
2013-01-21 15:41:00 +00:00
|
|
|
split.label(text="Flip Axis:")
|
|
|
|
row = split.row()
|
|
|
|
row.prop(md, "flip_axis")
|
|
|
|
|
Basic Alembic support
All in all, this patch adds an Alembic importer, an Alembic exporter,
and a new CacheFile data block which, for now, wraps around an Alembic
archive. This data block is made available through a new modifier ("Mesh
Sequence Cache") as well as a new constraint ("Transform Cache") to
somewhat properly support respectively geometric and transformation data
streaming from alembic caches.
A more in-depth documentation is to be found on the wiki, as well as a
guide to compile alembic: https://wiki.blender.org/index.php/
User:Kevindietrich/AlembicBasicIo.
Many thanks to everyone involved in this little project, and huge shout
out to "cgstrive" for the thorough testings with Maya, 3ds Max, Houdini
and Realflow as well as @fjuhec, @jensverwiebe and @jasperge for the
custom builds and compile fixes.
Reviewers: sergey, campbellbarton, mont29
Reviewed By: sergey, campbellbarton, mont29
Differential Revision: https://developer.blender.org/D2060
2016-08-06 06:20:37 +02:00
|
|
|
def MESH_SEQUENCE_CACHE(self, layout, ob, md):
|
|
|
|
layout.label(text="Cache File Properties:")
|
|
|
|
box = layout.box()
|
|
|
|
box.template_cache_file(md, "cache_file")
|
|
|
|
|
|
|
|
cache_file = md.cache_file
|
|
|
|
|
|
|
|
layout.label(text="Modifier Properties:")
|
|
|
|
box = layout.box()
|
|
|
|
|
|
|
|
if cache_file is not None:
|
|
|
|
box.prop_search(md, "object_path", cache_file, "object_paths")
|
|
|
|
|
|
|
|
if ob.type == 'MESH':
|
|
|
|
box.row().prop(md, "read_data")
|
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def CAST(self, layout, ob, md):
|
2018-08-28 12:38:54 +10:00
|
|
|
split = layout.split(factor=0.25)
|
2009-11-20 18:01:39 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
split.label(text="Cast Type:")
|
2010-08-06 15:17:44 +00:00
|
|
|
split.prop(md, "cast_type", text="")
|
2009-11-20 18:01:39 +00:00
|
|
|
|
2018-08-28 12:38:54 +10:00
|
|
|
split = layout.split(factor=0.25)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-16 16:07:22 +00:00
|
|
|
col = split.column()
|
2010-08-21 04:51:00 +00:00
|
|
|
col.prop(md, "use_x")
|
|
|
|
col.prop(md, "use_y")
|
|
|
|
col.prop(md, "use_z")
|
2009-11-20 18:01:39 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "factor")
|
|
|
|
col.prop(md, "radius")
|
|
|
|
col.prop(md, "size")
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(md, "use_radius_as_size")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-20 18:01:39 +00:00
|
|
|
split = layout.split()
|
2009-11-21 00:05:43 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Vertex Group:")
|
2020-01-27 14:03:24 +01:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Control Object:")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "object", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
if md.object:
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "use_transform")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def CLOTH(self, layout, _ob, _md):
|
2014-02-21 12:46:17 +01:00
|
|
|
layout.label(text="Settings are inside the Physics tab")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def COLLISION(self, layout, _ob, _md):
|
2014-02-21 12:46:17 +01:00
|
|
|
layout.label(text="Settings are inside the Physics tab")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def CURVE(self, layout, ob, md):
|
2009-11-20 18:01:39 +00:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Object:")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "object", text="")
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Vertex Group:")
|
2020-02-06 11:46:41 +01:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.label(text="Deformation Axis:")
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.row().prop(md, "deform_axis", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def DECIMATE(self, layout, ob, md):
|
2013-12-14 10:14:24 +01:00
|
|
|
decimate_type = md.decimate_type
|
|
|
|
|
2012-10-22 15:39:06 +00:00
|
|
|
row = layout.row()
|
2012-10-23 04:26:39 +00:00
|
|
|
row.prop(md, "decimate_type", expand=True)
|
|
|
|
|
2012-10-23 05:20:02 +00:00
|
|
|
if decimate_type == 'COLLAPSE':
|
2015-06-04 19:49:59 +10:00
|
|
|
has_vgroup = bool(md.vertex_group)
|
2012-10-23 04:26:39 +00:00
|
|
|
layout.prop(md, "ratio")
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2013-12-14 10:14:24 +01:00
|
|
|
split = layout.split()
|
2015-06-04 19:49:59 +10:00
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
row = col.row(align=True)
|
2012-10-23 04:26:39 +00:00
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
2013-12-14 10:14:24 +01:00
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2015-06-04 19:49:59 +10:00
|
|
|
layout_info = col
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
row = col.row()
|
|
|
|
row.active = has_vgroup
|
|
|
|
row.prop(md, "vertex_group_factor")
|
|
|
|
|
|
|
|
col.prop(md, "use_collapse_triangulate")
|
2018-08-28 12:38:54 +10:00
|
|
|
row = col.split(factor=0.75)
|
2015-11-18 07:50:07 +11:00
|
|
|
row.prop(md, "use_symmetry")
|
|
|
|
row.prop(md, "symmetry_axis", text="")
|
2015-06-04 19:49:59 +10:00
|
|
|
|
2012-10-23 05:20:02 +00:00
|
|
|
elif decimate_type == 'UNSUBDIV':
|
2012-10-23 04:26:39 +00:00
|
|
|
layout.prop(md, "iterations")
|
2015-06-04 19:49:59 +10:00
|
|
|
layout_info = layout
|
2012-10-23 05:20:02 +00:00
|
|
|
else: # decimate_type == 'DISSOLVE':
|
|
|
|
layout.prop(md, "angle_limit")
|
2012-10-23 06:13:56 +00:00
|
|
|
layout.prop(md, "use_dissolve_boundaries")
|
2018-08-28 12:34:51 +10:00
|
|
|
layout.label(text="Delimit:")
|
2013-06-03 05:07:16 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.prop(md, "delimit")
|
2015-06-04 19:49:59 +10:00
|
|
|
layout_info = layout
|
2012-10-23 04:26:39 +00:00
|
|
|
|
2018-06-01 18:44:06 +02:00
|
|
|
layout_info.label(
|
|
|
|
text=iface_("Face Count: {:,}".format(md.face_count)),
|
|
|
|
translate=False,
|
|
|
|
)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def DISPLACE(self, layout, ob, md):
|
2012-08-14 17:36:41 +00:00
|
|
|
has_texture = (md.texture is not None)
|
2012-09-26 21:19:51 +00:00
|
|
|
|
2014-05-06 15:01:24 +02:00
|
|
|
col = layout.column(align=True)
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Texture:")
|
2011-02-16 10:23:27 +00:00
|
|
|
col.template_ID(md, "texture", new="texture.new")
|
2009-11-20 18:01:39 +00:00
|
|
|
|
2014-05-06 15:01:24 +02:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column(align=True)
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Direction:")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "direction", text="")
|
2016-10-23 14:04:27 +02:00
|
|
|
if md.direction in {'X', 'Y', 'Z', 'RGB_TO_XYZ'}:
|
|
|
|
col.label(text="Space:")
|
|
|
|
col.prop(md, "space", text="")
|
2014-05-06 15:01:24 +02:00
|
|
|
col.label(text="Vertex Group:")
|
2020-02-03 11:55:29 +01:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2014-05-06 15:01:24 +02:00
|
|
|
|
|
|
|
col = split.column(align=True)
|
|
|
|
col.active = has_texture
|
|
|
|
col.label(text="Texture Coordinates:")
|
|
|
|
col.prop(md, "texture_coords", text="")
|
2010-08-20 06:09:58 +00:00
|
|
|
if md.texture_coords == 'OBJECT':
|
2014-05-06 15:01:24 +02:00
|
|
|
col.label(text="Object:")
|
|
|
|
col.prop(md, "texture_coords_object", text="")
|
2010-08-20 06:09:58 +00:00
|
|
|
elif md.texture_coords == 'UV' and ob.type == 'MESH':
|
2014-05-06 15:01:24 +02:00
|
|
|
col.label(text="UV Map:")
|
2017-05-25 15:11:00 +10:00
|
|
|
col.prop_search(md, "uv_layer", ob.data, "uv_layers", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-02-26 16:04:14 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.prop(md, "mid_level")
|
|
|
|
row.prop(md, "strength")
|
2009-11-20 18:01:39 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def DYNAMIC_PAINT(self, layout, _ob, _md):
|
2014-02-21 12:46:17 +01:00
|
|
|
layout.label(text="Settings are inside the Physics tab")
|
2011-05-24 07:08:58 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def EDGE_SPLIT(self, layout, _ob, md):
|
2009-10-31 19:31:45 +00:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(md, "use_edge_angle", text="Edge Angle")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column()
|
|
|
|
sub.active = md.use_edge_angle
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(md, "split_angle")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
split.prop(md, "use_edge_sharp", text="Sharp Edges")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def EXPLODE(self, layout, ob, md):
|
2009-11-16 16:07:22 +00:00
|
|
|
split = layout.split()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2017-09-02 15:42:29 +10:00
|
|
|
col.label(text="Vertex Group:")
|
2020-02-18 17:03:20 +01:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2009-11-20 20:40:29 +00:00
|
|
|
sub = col.column()
|
2009-11-23 09:28:42 +00:00
|
|
|
sub.active = bool(md.vertex_group)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(md, "protect")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Particle UV")
|
2017-05-25 15:11:00 +10:00
|
|
|
col.prop_search(md, "particle_uv", ob.data, "uv_layers", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-02-23 19:29:59 +00:00
|
|
|
col.prop(md, "use_edge_cut")
|
2010-08-17 17:03:52 +00:00
|
|
|
col.prop(md, "show_unborn")
|
|
|
|
col.prop(md, "show_alive")
|
|
|
|
col.prop(md, "show_dead")
|
2010-08-21 04:51:00 +00:00
|
|
|
col.prop(md, "use_size")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("object.explode_refresh", text="Refresh")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def FLUID_SIMULATION(self, layout, _ob, _md):
|
2014-02-21 12:46:17 +01:00
|
|
|
layout.label(text="Settings are inside the Physics tab")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def HOOK(self, layout, ob, md):
|
2015-02-04 07:04:21 +11:00
|
|
|
use_falloff = (md.falloff_type != 'NONE')
|
2009-11-20 18:01:39 +00:00
|
|
|
split = layout.split()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-20 18:01:39 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Object:")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "object", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
if md.object and md.object.type == 'ARMATURE':
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Bone:")
|
2010-08-23 05:47:45 +00:00
|
|
|
col.prop_search(md, "subtarget", md.object.data, "bones", text="")
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Vertex Group:")
|
2020-02-12 10:34:35 +01:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2015-02-04 07:04:21 +11:00
|
|
|
row = layout.row(align=True)
|
|
|
|
if use_falloff:
|
|
|
|
row.prop(md, "falloff_radius")
|
|
|
|
row.prop(md, "strength", slider=True)
|
|
|
|
layout.prop(md, "falloff_type")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2015-02-04 07:04:21 +11:00
|
|
|
col = layout.column()
|
|
|
|
if use_falloff:
|
|
|
|
if md.falloff_type == 'CURVE':
|
|
|
|
col.template_curve_mapping(md, "falloff_curve")
|
|
|
|
|
|
|
|
split = layout.split()
|
2010-08-06 15:17:44 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2015-02-04 07:04:21 +11:00
|
|
|
col.prop(md, "use_falloff_uniform")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-04-05 18:20:27 +02:00
|
|
|
if ob.mode == 'EDIT':
|
2015-02-04 07:04:21 +11:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.operator("object.hook_reset", text="Reset")
|
|
|
|
row.operator("object.hook_recenter", text="Recenter")
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
2011-09-21 15:18:38 +00:00
|
|
|
row.operator("object.hook_select", text="Select")
|
|
|
|
row.operator("object.hook_assign", text="Assign")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2013-11-24 07:00:49 +11:00
|
|
|
def LAPLACIANDEFORM(self, layout, ob, md):
|
|
|
|
is_bind = md.is_bind
|
|
|
|
|
|
|
|
layout.prop(md, "iterations")
|
|
|
|
|
2020-02-26 17:33:17 -05:00
|
|
|
row = layout.row(align=True)
|
2013-11-24 07:00:49 +11:00
|
|
|
row.enabled = not is_bind
|
2020-02-26 17:33:17 -05:00
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups")
|
2020-02-18 16:54:00 +01:00
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2013-11-24 07:00:49 +11:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.enabled = bool(md.vertex_group)
|
|
|
|
row.operator("object.laplaciandeform_bind", text="Unbind" if is_bind else "Bind")
|
|
|
|
|
2012-10-24 10:39:11 +00:00
|
|
|
def LAPLACIANSMOOTH(self, layout, ob, md):
|
|
|
|
layout.prop(md, "iterations")
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2018-08-28 12:38:54 +10:00
|
|
|
split = layout.split(factor=0.25)
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2012-10-24 11:13:43 +00:00
|
|
|
col = split.column()
|
|
|
|
col.label(text="Axis:")
|
|
|
|
col.prop(md, "use_x")
|
|
|
|
col.prop(md, "use_y")
|
|
|
|
col.prop(md, "use_z")
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2012-10-24 11:13:43 +00:00
|
|
|
col = split.column()
|
|
|
|
col.label(text="Lambda:")
|
|
|
|
col.prop(md, "lambda_factor", text="Factor")
|
|
|
|
col.prop(md, "lambda_border", text="Border")
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2012-10-24 11:13:43 +00:00
|
|
|
col.separator()
|
2012-10-24 11:44:32 +00:00
|
|
|
col.prop(md, "use_volume_preserve")
|
2013-01-16 19:38:50 +00:00
|
|
|
col.prop(md, "use_normalized")
|
2013-01-15 23:15:32 +00:00
|
|
|
|
2012-10-24 10:39:11 +00:00
|
|
|
layout.label(text="Vertex Group:")
|
2020-02-18 16:28:02 +01:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2012-10-24 11:44:32 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def LATTICE(self, layout, ob, md):
|
2009-11-20 18:01:39 +00:00
|
|
|
split = layout.split()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-20 18:01:39 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Object:")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "object", text="")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Vertex Group:")
|
2020-02-06 11:18:41 +01:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2012-04-08 08:09:37 +00:00
|
|
|
|
2012-03-25 22:14:21 +00:00
|
|
|
layout.separator()
|
2012-03-26 00:42:21 +00:00
|
|
|
layout.prop(md, "strength", slider=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def MASK(self, layout, ob, md):
|
2009-11-20 18:01:39 +00:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Mode:")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "mode", text="")
|
2013-12-14 10:14:24 +01:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2009-10-31 19:31:45 +00:00
|
|
|
if md.mode == 'ARMATURE':
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Armature:")
|
2015-02-08 16:25:07 +11:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(md, "armature", text="")
|
|
|
|
sub = row.row(align=True)
|
|
|
|
sub.active = (md.armature is not None)
|
|
|
|
sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2009-10-31 19:31:45 +00:00
|
|
|
elif md.mode == 'VERTEX_GROUP':
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Vertex Group:")
|
2013-12-14 10:14:24 +01:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
sub = row.row(align=True)
|
|
|
|
sub.active = bool(md.vertex_group)
|
|
|
|
sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2018-10-29 13:01:48 +11:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(md, "threshold")
|
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def MESH_DEFORM(self, layout, ob, md):
|
2009-11-20 18:01:39 +00:00
|
|
|
split = layout.split()
|
2011-02-26 16:27:58 +00:00
|
|
|
|
2009-11-20 18:01:39 +00:00
|
|
|
col = split.column()
|
2016-04-20 19:51:59 +01:00
|
|
|
col.enabled = not md.is_bound
|
2013-12-14 10:14:24 +01:00
|
|
|
col.label(text="Object:")
|
|
|
|
col.prop(md, "object", text="")
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Vertex Group:")
|
2013-12-14 10:14:24 +01:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
sub = row.row(align=True)
|
2009-11-23 09:28:42 +00:00
|
|
|
sub.active = bool(md.vertex_group)
|
2013-12-14 10:14:24 +01:00
|
|
|
sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2016-04-20 19:51:59 +01:00
|
|
|
row = layout.row()
|
|
|
|
row.enabled = not md.is_bound
|
|
|
|
row.prop(md, "precision")
|
|
|
|
row.prop(md, "use_dynamic_bind")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2016-04-20 19:51:59 +01:00
|
|
|
layout.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
if md.is_bound:
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("object.meshdeform_bind", text="Unbind")
|
2009-10-31 19:31:45 +00:00
|
|
|
else:
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.operator("object.meshdeform_bind", text="Bind")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def MIRROR(self, layout, _ob, md):
|
2018-11-21 10:27:19 +11:00
|
|
|
axis_text = "XYZ"
|
2018-11-21 10:01:04 +11:00
|
|
|
split = layout.split(factor=0.33)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Axis:")
|
2018-11-21 10:27:19 +11:00
|
|
|
for i, text in enumerate(axis_text):
|
|
|
|
col.prop(md, "use_axis", text=text, index=i)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2018-11-21 10:01:04 +11:00
|
|
|
col.label(text="Bisect:")
|
2018-11-21 10:27:19 +11:00
|
|
|
for i, text in enumerate(axis_text):
|
|
|
|
colsub = col.column()
|
|
|
|
colsub.prop(md, "use_bisect_axis", text=text, index=i)
|
|
|
|
colsub.active = md.use_axis[i]
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2018-11-21 10:01:04 +11:00
|
|
|
col.label(text="Flip:")
|
2018-11-21 10:27:19 +11:00
|
|
|
for i, text in enumerate(axis_text):
|
|
|
|
colsub = col.column()
|
|
|
|
colsub.prop(md, "use_bisect_flip_axis", text=text, index=i)
|
|
|
|
colsub.active = md.use_axis[i] and md.use_bisect_axis[i]
|
2018-11-21 10:01:04 +11:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.label(text="Mirror Object:")
|
|
|
|
col.prop(md, "mirror_object", text="")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.label(text="Options:")
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(md, "use_mirror_vertex_groups", text="Vertex Groups")
|
|
|
|
row.prop(md, "use_clip", text="Clipping")
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(md, "use_mirror_merge", text="Merge")
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
if md.use_mirror_merge is True:
|
|
|
|
col.prop(md, "merge_threshold")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
col = layout.column()
|
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Textures:")
|
2018-11-21 10:01:04 +11:00
|
|
|
row = layout.row()
|
|
|
|
row.prop(md, "use_mirror_u", text="Flip U")
|
|
|
|
row.prop(md, "use_mirror_v", text="Flip V")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2017-03-30 12:39:51 +11:00
|
|
|
col = layout.column(align=True)
|
|
|
|
|
|
|
|
if md.use_mirror_u:
|
|
|
|
col.prop(md, "mirror_offset_u")
|
|
|
|
|
|
|
|
if md.use_mirror_v:
|
|
|
|
col.prop(md, "mirror_offset_v")
|
|
|
|
|
2017-09-25 14:11:27 +10:00
|
|
|
col = layout.column(align=True)
|
|
|
|
col.prop(md, "offset_u")
|
|
|
|
col.prop(md, "offset_v")
|
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def MULTIRES(self, layout, ob, md):
|
2020-03-20 09:50:00 +01:00
|
|
|
# Changing some of the properties can not be done once there is an
|
|
|
|
# actual displacement stored for this multires modifier. This check
|
|
|
|
# will disallow those properties from change.
|
|
|
|
# This is a bit stupid check but should be sufficient for the usual
|
|
|
|
# multires usage. It might become less strict and only disallow
|
|
|
|
# modifications if there is CD_MDISPS layer, or if there is actual
|
|
|
|
# non-zero displacement but such checks will be too slow to be done
|
|
|
|
# on every redraw.
|
|
|
|
have_displacement = (md.total_levels != 0)
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.enabled = not have_displacement
|
|
|
|
row.prop(md, "subdivision_type", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-25 14:10:45 +00:00
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(md, "levels", text="Preview")
|
2019-11-13 16:58:32 +01:00
|
|
|
# TODO(sergey): Expose it again after T58473 is solved.
|
|
|
|
# col.prop(md, "sculpt_levels", text="Sculpt")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(md, "render_levels", text="Render")
|
2020-03-20 09:50:00 +01:00
|
|
|
|
|
|
|
row = col.row()
|
|
|
|
row.enabled = not have_displacement
|
|
|
|
row.prop(md, "quality")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2009-11-25 17:51:16 +00:00
|
|
|
|
2018-04-05 18:20:27 +02:00
|
|
|
col.enabled = ob.mode != 'EDIT'
|
2011-09-21 15:18:38 +00:00
|
|
|
col.operator("object.multires_subdivide", text="Subdivide")
|
|
|
|
col.operator("object.multires_higher_levels_delete", text="Delete Higher")
|
|
|
|
col.operator("object.multires_reshape", text="Reshape")
|
|
|
|
col.operator("object.multires_base_apply", text="Apply Base")
|
2018-08-14 11:45:26 +02:00
|
|
|
col.prop(md, "uv_smooth", text="")
|
2010-08-17 17:03:52 +00:00
|
|
|
col.prop(md, "show_only_control_edges")
|
2019-04-05 14:13:05 +02:00
|
|
|
col.prop(md, "use_creases")
|
2009-12-10 14:26:06 +00:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
col = layout.column()
|
2009-11-25 14:27:50 +00:00
|
|
|
row = col.row()
|
2010-08-19 12:51:31 +00:00
|
|
|
if md.is_external:
|
2011-09-21 15:18:38 +00:00
|
|
|
row.operator("object.multires_external_pack", text="Pack External")
|
2009-12-10 14:26:06 +00:00
|
|
|
row.label()
|
|
|
|
row = col.row()
|
2010-06-02 17:58:28 +00:00
|
|
|
row.prop(md, "filepath", text="")
|
2009-12-10 14:26:06 +00:00
|
|
|
else:
|
2011-09-21 15:18:38 +00:00
|
|
|
row.operator("object.multires_external_save", text="Save External...")
|
2009-12-10 14:26:06 +00:00
|
|
|
row.label()
|
2009-11-16 16:07:22 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def OCEAN(self, layout, _ob, md):
|
2013-03-23 06:55:59 +00:00
|
|
|
if not bpy.app.build_options.mod_oceansim:
|
2018-08-28 12:34:51 +10:00
|
|
|
layout.label(text="Built without OceanSim modifier")
|
2011-11-13 12:17:27 +00:00
|
|
|
return
|
|
|
|
|
2011-11-13 12:45:47 +00:00
|
|
|
layout.prop(md, "geometry_mode")
|
2011-11-13 14:38:00 +00:00
|
|
|
|
2011-11-13 12:17:27 +00:00
|
|
|
if md.geometry_mode == 'GENERATE':
|
2011-11-13 12:45:47 +00:00
|
|
|
row = layout.row()
|
2011-11-13 12:17:27 +00:00
|
|
|
row.prop(md, "repeat_x")
|
|
|
|
row.prop(md, "repeat_y")
|
|
|
|
|
2011-11-13 12:45:47 +00:00
|
|
|
layout.separator()
|
2011-11-13 14:38:00 +00:00
|
|
|
|
2012-04-25 18:12:41 +00:00
|
|
|
split = layout.split()
|
2012-05-01 13:32:55 +00:00
|
|
|
|
2012-04-25 18:12:41 +00:00
|
|
|
col = split.column()
|
|
|
|
col.prop(md, "time")
|
2013-01-02 16:03:58 +00:00
|
|
|
col.prop(md, "depth")
|
|
|
|
col.prop(md, "random_seed")
|
2012-05-01 13:32:55 +00:00
|
|
|
|
2012-04-25 18:12:41 +00:00
|
|
|
col = split.column()
|
2013-01-02 16:03:58 +00:00
|
|
|
col.prop(md, "resolution")
|
|
|
|
col.prop(md, "size")
|
2012-04-25 18:12:41 +00:00
|
|
|
col.prop(md, "spatial_size")
|
2011-11-13 12:45:47 +00:00
|
|
|
|
2020-03-12 13:35:22 +11:00
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
layout.prop(md, "spectrum")
|
|
|
|
|
|
|
|
if md.spectrum in {'TEXEL_MARSEN_ARSLOE', 'JONSWAP'}:
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(md, "sharpen_peak_jonswap")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(md, "fetch_jonswap")
|
|
|
|
|
2018-08-28 12:34:51 +10:00
|
|
|
layout.label(text="Waves:")
|
2011-11-13 14:38:00 +00:00
|
|
|
|
2011-11-13 12:45:47 +00:00
|
|
|
split = layout.split()
|
2011-11-13 14:38:00 +00:00
|
|
|
|
2011-11-13 12:45:47 +00:00
|
|
|
col = split.column()
|
2011-11-13 12:17:27 +00:00
|
|
|
col.prop(md, "choppiness")
|
|
|
|
col.prop(md, "wave_scale", text="Scale")
|
2011-11-14 07:18:32 +00:00
|
|
|
col.prop(md, "wave_scale_min")
|
2011-11-13 12:17:27 +00:00
|
|
|
col.prop(md, "wind_velocity")
|
2011-11-13 14:38:00 +00:00
|
|
|
|
2011-11-13 12:17:27 +00:00
|
|
|
col = split.column()
|
2011-11-13 12:45:47 +00:00
|
|
|
col.prop(md, "wave_alignment", text="Alignment")
|
|
|
|
sub = col.column()
|
2014-01-18 09:13:51 +11:00
|
|
|
sub.active = (md.wave_alignment > 0.0)
|
2011-11-13 12:45:47 +00:00
|
|
|
sub.prop(md, "wave_direction", text="Direction")
|
2011-11-14 07:18:32 +00:00
|
|
|
sub.prop(md, "damping")
|
2011-11-13 12:45:47 +00:00
|
|
|
|
|
|
|
layout.separator()
|
2011-11-13 14:38:00 +00:00
|
|
|
|
2011-11-14 07:18:32 +00:00
|
|
|
layout.prop(md, "use_normals")
|
2011-11-24 19:36:12 +00:00
|
|
|
|
2011-11-20 14:36:23 +00:00
|
|
|
split = layout.split()
|
2011-11-24 19:36:12 +00:00
|
|
|
|
2011-11-20 14:36:23 +00:00
|
|
|
col = split.column()
|
|
|
|
col.prop(md, "use_foam")
|
|
|
|
sub = col.row()
|
2011-11-14 07:18:32 +00:00
|
|
|
sub.active = md.use_foam
|
2011-11-13 12:45:47 +00:00
|
|
|
sub.prop(md, "foam_coverage", text="Coverage")
|
2011-11-24 19:36:12 +00:00
|
|
|
|
2011-11-20 14:36:23 +00:00
|
|
|
col = split.column()
|
|
|
|
col.active = md.use_foam
|
2018-08-28 12:34:51 +10:00
|
|
|
col.label(text="Foam Data Layer Name:")
|
2011-11-20 14:16:41 +00:00
|
|
|
col.prop(md, "foam_layer_name", text="")
|
2011-11-13 14:38:00 +00:00
|
|
|
|
2011-11-13 12:45:47 +00:00
|
|
|
layout.separator()
|
|
|
|
|
2011-11-13 12:17:27 +00:00
|
|
|
if md.is_cached:
|
2019-01-31 19:49:47 +01:00
|
|
|
layout.operator("object.ocean_bake", text="Delete Bake").free = True
|
2011-11-13 12:17:27 +00:00
|
|
|
else:
|
2013-01-02 16:03:58 +00:00
|
|
|
layout.operator("object.ocean_bake").free = False
|
2011-11-13 14:38:00 +00:00
|
|
|
|
2011-11-13 12:45:47 +00:00
|
|
|
split = layout.split()
|
|
|
|
split.enabled = not md.is_cached
|
2011-11-13 14:38:00 +00:00
|
|
|
|
2011-11-13 12:45:47 +00:00
|
|
|
col = split.column(align=True)
|
2011-11-14 07:18:32 +00:00
|
|
|
col.prop(md, "frame_start", text="Start")
|
|
|
|
col.prop(md, "frame_end", text="End")
|
2011-11-13 14:38:00 +00:00
|
|
|
|
2011-11-13 12:45:47 +00:00
|
|
|
col = split.column(align=True)
|
|
|
|
col.label(text="Cache path:")
|
|
|
|
col.prop(md, "filepath", text="")
|
2011-11-13 14:38:00 +00:00
|
|
|
|
2013-01-02 16:03:58 +00:00
|
|
|
split = layout.split()
|
|
|
|
split.enabled = not md.is_cached
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.active = md.use_foam
|
|
|
|
col.prop(md, "bake_foam_fade")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def PARTICLE_INSTANCE(self, layout, ob, md):
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(md, "object")
|
2018-04-18 12:14:28 +02:00
|
|
|
if md.object:
|
|
|
|
layout.prop_search(md, "particle_system", md.object, "particle_systems", text="Particle System")
|
|
|
|
else:
|
|
|
|
layout.prop(md, "particle_system_index", text="Particle System")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2009-11-16 16:07:22 +00:00
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Create From:")
|
2018-04-18 12:14:28 +02:00
|
|
|
layout.prop(md, "space", text="")
|
2010-08-21 04:51:00 +00:00
|
|
|
col.prop(md, "use_normal")
|
|
|
|
col.prop(md, "use_children")
|
|
|
|
col.prop(md, "use_size")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Show Particles When:")
|
2010-08-17 17:03:52 +00:00
|
|
|
col.prop(md, "show_alive")
|
|
|
|
col.prop(md, "show_unborn")
|
|
|
|
col.prop(md, "show_dead")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2018-04-18 12:14:28 +02:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(md, "particle_amount", text="Amount")
|
|
|
|
row.prop(md, "particle_offset", text="Offset")
|
|
|
|
|
2018-08-11 15:35:22 +02:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(md, "axis", expand=True)
|
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.prop(md, "use_path", text="Create Along Paths")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2018-08-11 15:35:22 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.active = md.use_path
|
2010-08-20 06:09:58 +00:00
|
|
|
col.prop(md, "use_preserve_shape")
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2018-08-11 15:35:22 +02:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(md, "position", slider=True)
|
|
|
|
row.prop(md, "random_position", text="Random", slider=True)
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(md, "rotation", slider=True)
|
|
|
|
row.prop(md, "random_rotation", text="Random", slider=True)
|
|
|
|
|
|
|
|
layout.separator()
|
2018-04-18 12:14:28 +02:00
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.prop_search(md, "index_layer_name", ob.data, "vertex_colors", text="Index Layer")
|
|
|
|
col.prop_search(md, "value_layer_name", ob.data, "vertex_colors", text="Value Layer")
|
2009-11-16 16:07:22 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def PARTICLE_SYSTEM(self, layout, _ob, _md):
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.label(text="Settings can be found inside the Particle context")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def SCREW(self, layout, _ob, md):
|
2010-03-22 00:22:52 +00:00
|
|
|
split = layout.split()
|
2010-04-04 14:52:15 +00:00
|
|
|
|
2010-03-22 00:22:52 +00:00
|
|
|
col = split.column()
|
|
|
|
col.prop(md, "axis")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(md, "object", text="AxisOb")
|
2010-03-22 00:22:52 +00:00
|
|
|
col.prop(md, "angle")
|
|
|
|
col.prop(md, "steps")
|
|
|
|
col.prop(md, "render_steps")
|
2012-05-18 10:37:49 +00:00
|
|
|
col.prop(md, "use_smooth_shade")
|
2017-09-07 00:10:13 +10:00
|
|
|
col.prop(md, "use_merge_vertices")
|
|
|
|
sub = col.column()
|
|
|
|
sub.active = md.use_merge_vertices
|
|
|
|
sub.prop(md, "merge_threshold")
|
2010-04-04 14:52:15 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2010-03-22 00:22:52 +00:00
|
|
|
row = col.row()
|
2012-10-08 08:28:05 +00:00
|
|
|
row.active = (md.object is None or md.use_object_screw_offset is False)
|
2010-03-22 00:22:52 +00:00
|
|
|
row.prop(md, "screw_offset")
|
|
|
|
row = col.row()
|
|
|
|
row.active = (md.object is not None)
|
|
|
|
row.prop(md, "use_object_screw_offset")
|
|
|
|
col.prop(md, "use_normal_calculate")
|
|
|
|
col.prop(md, "use_normal_flip")
|
|
|
|
col.prop(md, "iterations")
|
2013-11-26 21:22:56 +11:00
|
|
|
col.prop(md, "use_stretch_u")
|
|
|
|
col.prop(md, "use_stretch_v")
|
2010-03-22 00:22:52 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def SHRINKWRAP(self, layout, ob, md):
|
2009-11-16 16:07:22 +00:00
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Target:")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "target", text="")
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Vertex Group:")
|
2016-03-07 11:24:03 +11:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2009-11-20 20:40:29 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "offset")
|
2009-11-20 20:40:29 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Mode:")
|
2010-08-21 04:51:00 +00:00
|
|
|
col.prop(md, "wrap_method", text="")
|
2009-11-20 20:40:29 +00:00
|
|
|
|
Shrinkwrap: new mode that projects along the target normal.
The Nearest Surface Point shrink method, while fast, is neither
smooth nor continuous: as the source point moves, the projected
point can both stop and jump. This causes distortions in the
deformation of the shrinkwrap modifier, and the motion of an
animated object with a shrinkwrap constraint.
This patch implements a new mode, which, instead of using the simple
nearest point search, iteratively solves an equation for each triangle
to find a point which has its interpolated normal point to or from the
original vertex. Non-manifold boundary edges are treated as infinitely
thin cylinders that cast normals in all perpendicular directions.
Since this is useful for the constraint, and having multiple
objects with constraints targeting the same guide mesh is a quite
reasonable use case, rather than calculating the mesh boundary edge
data over and over again, it is precomputed and cached in the mesh.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D3836
2018-11-06 21:04:53 +03:00
|
|
|
if md.wrap_method in {'PROJECT', 'NEAREST_SURFACEPOINT', 'TARGET_PROJECT'}:
|
2018-07-07 18:39:45 +03:00
|
|
|
col.prop(md, "wrap_mode", text="")
|
|
|
|
|
2010-08-21 07:15:11 +00:00
|
|
|
if md.wrap_method == 'PROJECT':
|
2013-09-27 09:51:02 +00:00
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
|
|
|
col.prop(md, "subsurf_levels")
|
|
|
|
col = split.column()
|
|
|
|
|
2012-11-09 04:20:17 +00:00
|
|
|
col.prop(md, "project_limit", text="Limit")
|
2018-08-28 12:38:54 +10:00
|
|
|
split = layout.split(factor=0.25)
|
2011-06-21 17:17:51 +00:00
|
|
|
|
2011-06-10 20:41:22 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Axis:")
|
2010-08-21 04:51:00 +00:00
|
|
|
col.prop(md, "use_project_x")
|
|
|
|
col.prop(md, "use_project_y")
|
|
|
|
col.prop(md, "use_project_z")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-16 16:07:22 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Direction:")
|
2010-08-21 04:51:00 +00:00
|
|
|
col.prop(md, "use_negative_direction")
|
|
|
|
col.prop(md, "use_positive_direction")
|
2009-11-20 20:40:29 +00:00
|
|
|
|
2018-07-08 13:47:26 +03:00
|
|
|
subcol = col.column()
|
|
|
|
subcol.active = md.use_negative_direction and md.cull_face != 'OFF'
|
|
|
|
subcol.prop(md, "use_invert_cull")
|
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Cull Faces:")
|
2011-02-19 09:53:38 +00:00
|
|
|
col.prop(md, "cull_face", expand=True)
|
2009-11-20 20:40:29 +00:00
|
|
|
|
2012-11-09 04:20:17 +00:00
|
|
|
layout.prop(md, "auxiliary_target")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def SIMPLE_DEFORM(self, layout, ob, md):
|
2009-11-20 18:01:39 +00:00
|
|
|
|
2012-01-14 18:07:09 +00:00
|
|
|
layout.row().prop(md, "deform_method", expand=True)
|
|
|
|
|
|
|
|
split = layout.split()
|
2009-11-20 18:01:39 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Vertex Group:")
|
2016-03-07 11:28:21 +11:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2016-02-17 01:55:40 +11:00
|
|
|
col.label(text="Axis, Origin:")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "origin", text="")
|
2013-07-23 19:31:49 +00:00
|
|
|
|
2018-01-09 14:59:45 +11:00
|
|
|
col.prop(md, "deform_axis")
|
|
|
|
|
2013-07-23 19:31:49 +00:00
|
|
|
if md.deform_method in {'TAPER', 'STRETCH', 'TWIST'}:
|
2018-01-09 14:59:45 +11:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.label(text="Lock:")
|
|
|
|
deform_axis = md.deform_axis
|
|
|
|
if deform_axis != 'X':
|
|
|
|
row.prop(md, "lock_x")
|
|
|
|
if deform_axis != 'Y':
|
|
|
|
row.prop(md, "lock_y")
|
|
|
|
if deform_axis != 'Z':
|
|
|
|
row.prop(md, "lock_z")
|
2009-11-20 18:01:39 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Deform:")
|
2013-03-05 14:42:06 +00:00
|
|
|
if md.deform_method in {'TAPER', 'STRETCH'}:
|
|
|
|
col.prop(md, "factor")
|
|
|
|
else:
|
|
|
|
col.prop(md, "angle")
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "limits", slider=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-12-16 15:42:07 +01:00
|
|
|
def FLUID(self, layout, _ob, _md):
|
2014-02-21 12:46:17 +01:00
|
|
|
layout.label(text="Settings are inside the Physics tab")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def SMOOTH(self, layout, ob, md):
|
2018-08-28 12:38:54 +10:00
|
|
|
split = layout.split(factor=0.25)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Axis:")
|
2010-08-21 04:51:00 +00:00
|
|
|
col.prop(md, "use_x")
|
|
|
|
col.prop(md, "use_y")
|
|
|
|
col.prop(md, "use_z")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "factor")
|
2010-08-21 04:51:00 +00:00
|
|
|
col.prop(md, "iterations")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Vertex Group:")
|
2020-02-06 11:52:24 +01:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def SOFT_BODY(self, layout, _ob, _md):
|
2014-02-21 12:46:17 +01:00
|
|
|
layout.label(text="Settings are inside the Physics tab")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def SOLIDIFY(self, layout, ob, md):
|
2019-11-03 14:24:24 +11:00
|
|
|
|
|
|
|
layout.row().prop(md, "solidify_mode")
|
|
|
|
|
|
|
|
solidify_mode = md.solidify_mode
|
|
|
|
|
|
|
|
if solidify_mode == 'NON_MANIFOLD':
|
|
|
|
layout.prop(md, "nonmanifold_thickness_mode")
|
|
|
|
layout.prop(md, "nonmanifold_boundary_mode")
|
|
|
|
|
2009-12-21 01:02:08 +00:00
|
|
|
split = layout.split()
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2009-12-21 01:02:08 +00:00
|
|
|
col = split.column()
|
2010-03-31 07:28:23 +00:00
|
|
|
col.prop(md, "thickness")
|
2013-03-13 17:31:26 +00:00
|
|
|
col.prop(md, "thickness_clamp")
|
2019-11-03 14:24:24 +11:00
|
|
|
row = col.row()
|
|
|
|
row.active = md.thickness_clamp > 0.0
|
|
|
|
row.prop(md, "use_thickness_angle_clamp")
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2013-12-14 10:14:24 +01:00
|
|
|
col.separator()
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2013-12-14 10:14:24 +01:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
sub = row.row(align=True)
|
|
|
|
sub.active = bool(md.vertex_group)
|
|
|
|
sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2013-12-14 10:14:24 +01:00
|
|
|
sub = col.row()
|
|
|
|
sub.active = bool(md.vertex_group)
|
2014-02-13 08:51:33 +11:00
|
|
|
sub.prop(md, "thickness_vertex_group", text="Factor")
|
2010-03-31 07:28:23 +00:00
|
|
|
|
2019-11-03 14:24:24 +11:00
|
|
|
if solidify_mode == 'EXTRUDE':
|
|
|
|
col.label(text="Crease:")
|
|
|
|
col.prop(md, "edge_crease_inner", text="Inner")
|
|
|
|
col.prop(md, "edge_crease_outer", text="Outer")
|
|
|
|
col.prop(md, "edge_crease_rim", text="Rim")
|
2010-01-31 14:46:28 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2010-03-31 07:28:23 +00:00
|
|
|
|
|
|
|
col.prop(md, "offset")
|
2019-11-03 14:24:24 +11:00
|
|
|
|
2013-03-13 17:31:26 +00:00
|
|
|
col.prop(md, "use_flip_normals")
|
2010-03-31 07:28:23 +00:00
|
|
|
|
2019-11-03 14:24:24 +11:00
|
|
|
if solidify_mode == 'EXTRUDE':
|
|
|
|
col.prop(md, "use_even_offset")
|
|
|
|
col.prop(md, "use_quality_normals")
|
|
|
|
|
2010-06-13 13:56:13 +00:00
|
|
|
col.prop(md, "use_rim")
|
2014-08-15 17:26:39 +10:00
|
|
|
col_rim = col.column()
|
|
|
|
col_rim.active = md.use_rim
|
2014-08-15 19:32:45 +10:00
|
|
|
col_rim.prop(md, "use_rim_only")
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2013-12-14 10:14:24 +01:00
|
|
|
col.separator()
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2013-12-14 10:14:24 +01:00
|
|
|
col.label(text="Material Index Offset:")
|
2014-02-13 08:51:33 +11:00
|
|
|
|
2011-04-24 20:59:19 +00:00
|
|
|
sub = col.column()
|
2018-08-28 12:38:54 +10:00
|
|
|
row = sub.split(factor=0.4, align=True)
|
2011-04-24 20:59:19 +00:00
|
|
|
row.prop(md, "material_offset", text="")
|
2013-08-23 20:41:21 +00:00
|
|
|
row = row.row(align=True)
|
2011-04-24 20:59:19 +00:00
|
|
|
row.active = md.use_rim
|
2011-09-21 15:18:38 +00:00
|
|
|
row.prop(md, "material_offset_rim", text="Rim")
|
2010-06-13 13:56:13 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def SUBSURF(self, layout, ob, md):
|
2018-02-07 15:47:54 +11:00
|
|
|
from bpy import context
|
2010-08-06 15:17:44 +00:00
|
|
|
layout.row().prop(md, "subdivision_type", expand=True)
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-16 16:07:22 +00:00
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
2016-07-16 19:56:45 -04:00
|
|
|
|
2018-02-07 15:47:54 +11:00
|
|
|
scene = context.scene
|
2018-04-17 13:35:05 +02:00
|
|
|
engine = context.engine
|
2017-09-02 15:42:29 +10:00
|
|
|
show_adaptive_options = (
|
|
|
|
engine == 'CYCLES' and md == ob.modifiers[-1] and
|
|
|
|
scene.cycles.feature_set == 'EXPERIMENTAL'
|
|
|
|
)
|
2016-08-24 11:26:19 -04:00
|
|
|
if show_adaptive_options:
|
2016-07-16 19:56:45 -04:00
|
|
|
col.label(text="Render:")
|
|
|
|
col.prop(ob.cycles, "use_adaptive_subdivision", text="Adaptive")
|
|
|
|
if ob.cycles.use_adaptive_subdivision:
|
|
|
|
col.prop(ob.cycles, "dicing_rate")
|
|
|
|
else:
|
|
|
|
col.prop(md, "render_levels", text="Levels")
|
2019-05-19 17:19:30 +02:00
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col.label(text="Viewport:")
|
|
|
|
col.prop(md, "levels", text="Levels")
|
2016-07-16 19:56:45 -04:00
|
|
|
else:
|
|
|
|
col.label(text="Subdivisions:")
|
2019-05-19 17:19:30 +02:00
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.prop(md, "render_levels", text="Render")
|
|
|
|
sub.prop(md, "levels", text="Viewport")
|
|
|
|
|
2018-11-26 15:39:08 +01:00
|
|
|
col.prop(md, "quality")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Options:")
|
2016-08-24 11:26:19 -04:00
|
|
|
|
|
|
|
sub = col.column()
|
|
|
|
sub.active = (not show_adaptive_options) or (not ob.cycles.use_adaptive_subdivision)
|
2018-08-02 13:36:22 +02:00
|
|
|
sub.prop(md, "uv_smooth", text="")
|
2016-08-24 11:26:19 -04:00
|
|
|
|
2010-08-17 17:03:52 +00:00
|
|
|
col.prop(md, "show_only_control_edges")
|
2019-04-05 14:13:05 +02:00
|
|
|
col.prop(md, "use_creases")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2016-08-24 11:26:19 -04:00
|
|
|
if show_adaptive_options and ob.cycles.use_adaptive_subdivision:
|
|
|
|
col = layout.column(align=True)
|
|
|
|
col.scale_y = 0.6
|
|
|
|
col.separator()
|
2018-08-28 12:34:51 +10:00
|
|
|
col.label(text="Final Dicing Rate:")
|
2016-08-24 11:26:19 -04:00
|
|
|
col.separator()
|
|
|
|
|
|
|
|
render = max(scene.cycles.dicing_rate * ob.cycles.dicing_rate, 0.1)
|
|
|
|
preview = max(scene.cycles.preview_dicing_rate * ob.cycles.dicing_rate, 0.1)
|
2018-09-02 20:05:45 +10:00
|
|
|
col.label(text=f"Render {render:.2f} px, Preview {preview:.2f} px")
|
2016-08-24 11:26:19 -04:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def SURFACE(self, layout, _ob, _md):
|
2014-02-21 12:46:17 +01:00
|
|
|
layout.label(text="Settings are inside the Physics tab")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def SURFACE_DEFORM(self, layout, _ob, md):
|
2017-02-27 12:39:14 -03:00
|
|
|
col = layout.column()
|
|
|
|
col.active = not md.is_bound
|
|
|
|
|
|
|
|
col.prop(md, "target")
|
|
|
|
col.prop(md, "falloff")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
2017-03-01 17:56:10 -03:00
|
|
|
col = layout.column()
|
|
|
|
|
2017-02-27 12:39:14 -03:00
|
|
|
if md.is_bound:
|
2017-03-01 17:56:10 -03:00
|
|
|
col.operator("object.surfacedeform_bind", text="Unbind")
|
2017-02-27 12:39:14 -03:00
|
|
|
else:
|
2017-04-20 17:48:37 +02:00
|
|
|
col.active = md.target is not None
|
2017-03-01 17:56:10 -03:00
|
|
|
col.operator("object.surfacedeform_bind", text="Bind")
|
2017-02-27 12:39:14 -03:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def UV_PROJECT(self, layout, ob, md):
|
2011-09-08 11:12:25 +00:00
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!
* Point density, voxel data, ocean, environment map textures were removed,
as these only worked within BI rendering. Note that the ocean modifier
and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
with BI. If we ever wanted to support this again probably it should go
through the baking API.
* GPU shader export through the Python API was removed. This only worked
for the old BI GLSL shaders, which no longer exists. Doing something
similar for Eevee would be significantly more complicated because it
uses a lot of multiplass rendering and logic outside the shader, it's
probably impractical.
* Collada material import / export code is mostly gone, as it only worked
for BI materials. We need to add Cycles / Eevee material support at some
point.
* The mesh noise operator was removed since it only worked with BI
material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
for BI material texture slots. Could be added back with node support.
* Not all legacy viewport features are supported in the new viewport, but
their code was removed. If we need to bring anything back we can look at
older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
used anywhere now. We may eventually use this to replace the texture
nodes with Cycles / Eevee shader nodes.
* The Cycles Bake panel now includes settings for baking multires normal
and displacement maps. The underlying code needs to be merged properly,
and we plan to add back support for multires AO baking and add support
to Cycles baking for features like vertex color, displacement, and other
missing baking features.
* This commit removes DNA and the Python API for BI material, lamp, world
and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
are reusing some old BI properties but the names are not really correct
anymore.
* Texture slots for materials, lamps and world were removed. They remain
for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
other renderers use this to find all panels to show, minus a few panels
that they have their own replacement for.
2018-04-19 17:34:44 +02:00
|
|
|
col.prop_search(md, "uv_layer", ob.data, "uv_layers")
|
|
|
|
col.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(md, "projector_count", text="Projectors")
|
2011-09-08 11:12:25 +00:00
|
|
|
for proj in md.projectors:
|
|
|
|
col.prop(proj, "object", text="")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-09-08 11:12:25 +00:00
|
|
|
col = split.column()
|
|
|
|
sub = col.column(align=True)
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.prop(md, "aspect_x", text="Aspect X")
|
|
|
|
sub.prop(md, "aspect_y", text="Aspect Y")
|
* Multiply for panorama cameras
* Some cases of struct name being set where it shouldnt have been.
* Spelling: wich --> which
* Copy and initialize uv modifier scale, remove unneeded enum.
* Ability to pin any object into the context.
* Update uv window while transforming (useful when used with UVProject modifier)
* Patch by Wahooney, so new template's are internal text and dont get saved over
by mistake.
* Fix for https://bugzilla.redhat.com/show_bug.cgi?id=572186
Bug 572186 - [abrt] crash in blender-2.49b-5.fc12: Process
/usr/bin/blender.bin was killed by signal 6 (SIGABRT). Original fix submitted
by Jochen Schmitt.
* [#21816] bpy.data.add_image has stopped working on Windows. moved to
bpy.data.images.load(), missed this call.
(commits 27726,27825,27828,27831,27832,27833,27834,27836,27837,27838,27839,27858 by Campbell from render25 branch)
2010-03-30 12:15:16 +00:00
|
|
|
|
2011-09-08 11:12:25 +00:00
|
|
|
sub = col.column(align=True)
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.prop(md, "scale_x", text="Scale X")
|
|
|
|
sub.prop(md, "scale_y", text="Scale Y")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2011-05-01 15:16:59 +00:00
|
|
|
def WARP(self, layout, ob, md):
|
|
|
|
use_falloff = (md.falloff_type != 'NONE')
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="From:")
|
2011-05-01 15:16:59 +00:00
|
|
|
col.prop(md, "object_from", text="")
|
|
|
|
|
|
|
|
col.prop(md, "use_volume_preserve")
|
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="To:")
|
2011-05-01 15:16:59 +00:00
|
|
|
col.prop(md, "object_to", text="")
|
2020-02-03 12:01:13 +01:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2011-05-01 15:16:59 +00:00
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(md, "strength")
|
|
|
|
if use_falloff:
|
|
|
|
row.prop(md, "falloff_radius")
|
|
|
|
|
|
|
|
col.prop(md, "falloff_type")
|
|
|
|
if use_falloff:
|
|
|
|
if md.falloff_type == 'CURVE':
|
|
|
|
col.template_curve_mapping(md, "falloff_curve")
|
|
|
|
|
|
|
|
# 2 new columns
|
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Texture:")
|
2011-10-20 14:58:53 +00:00
|
|
|
col.template_ID(md, "texture", new="texture.new")
|
2011-05-01 15:16:59 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Texture Coordinates:")
|
2011-05-01 15:16:59 +00:00
|
|
|
col.prop(md, "texture_coords", text="")
|
|
|
|
|
|
|
|
if md.texture_coords == 'OBJECT':
|
2011-09-21 15:18:38 +00:00
|
|
|
layout.prop(md, "texture_coords_object", text="Object")
|
2011-05-01 15:16:59 +00:00
|
|
|
elif md.texture_coords == 'UV' and ob.type == 'MESH':
|
2017-05-25 15:11:00 +10:00
|
|
|
layout.prop_search(md, "uv_layer", ob.data, "uv_layers")
|
2011-05-01 15:16:59 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
def WAVE(self, layout, ob, md):
|
2009-10-31 19:31:45 +00:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Motion:")
|
2010-08-21 04:51:00 +00:00
|
|
|
col.prop(md, "use_x")
|
|
|
|
col.prop(md, "use_y")
|
|
|
|
col.prop(md, "use_cyclic")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2010-08-21 04:51:00 +00:00
|
|
|
col.prop(md, "use_normal")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column()
|
2010-08-21 07:15:11 +00:00
|
|
|
sub.active = md.use_normal
|
2010-08-20 06:09:58 +00:00
|
|
|
sub.prop(md, "use_normal_x", text="X")
|
|
|
|
sub.prop(md, "use_normal_y", text="Y")
|
|
|
|
sub.prop(md, "use_normal_z", text="Z")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Time:")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column(align=True)
|
2011-09-21 15:18:38 +00:00
|
|
|
sub.prop(md, "time_offset", text="Offset")
|
|
|
|
sub.prop(md, "lifetime", text="Life")
|
|
|
|
col.prop(md, "damping_time", text="Damping")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Position:")
|
2009-10-31 19:31:45 +00:00
|
|
|
sub = col.column(align=True)
|
2009-11-23 00:27:30 +00:00
|
|
|
sub.prop(md, "start_position_x", text="X")
|
|
|
|
sub.prop(md, "start_position_y", text="Y")
|
2011-09-21 15:18:38 +00:00
|
|
|
col.prop(md, "falloff_radius", text="Falloff")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.prop(md, "start_position_object")
|
2020-03-03 18:41:50 +01:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2018-08-28 12:38:54 +10:00
|
|
|
split = layout.split(factor=0.33)
|
2011-02-16 10:23:27 +00:00
|
|
|
col = split.column()
|
2011-09-21 15:18:38 +00:00
|
|
|
col.label(text="Texture")
|
2011-02-16 10:23:27 +00:00
|
|
|
col = split.column()
|
|
|
|
col.template_ID(md, "texture", new="texture.new")
|
2010-08-20 06:09:58 +00:00
|
|
|
layout.prop(md, "texture_coords")
|
2014-11-13 08:56:39 +01:00
|
|
|
if md.texture_coords == 'UV' and ob.type == 'MESH':
|
2017-05-25 15:11:00 +10:00
|
|
|
layout.prop_search(md, "uv_layer", ob.data, "uv_layers")
|
2010-08-20 06:09:58 +00:00
|
|
|
elif md.texture_coords == 'OBJECT':
|
2010-08-18 08:26:18 +00:00
|
|
|
layout.prop(md, "texture_coords_object")
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-23 00:27:30 +00:00
|
|
|
layout.separator()
|
2009-10-31 19:31:45 +00:00
|
|
|
|
2009-11-16 16:07:22 +00:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "speed", slider=True)
|
|
|
|
col.prop(md, "height", slider=True)
|
2009-11-21 00:05:43 +00:00
|
|
|
|
2010-08-06 15:17:44 +00:00
|
|
|
col = split.column()
|
2009-11-23 00:27:30 +00:00
|
|
|
col.prop(md, "width", slider=True)
|
|
|
|
col.prop(md, "narrowness", slider=True)
|
2011-04-04 10:13:04 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def REMESH(self, layout, _ob, md):
|
2016-12-05 23:33:21 +01:00
|
|
|
if not bpy.app.build_options.mod_remesh:
|
2018-08-28 12:34:51 +10:00
|
|
|
layout.label(text="Built without Remesh modifier")
|
2016-12-05 23:33:21 +01:00
|
|
|
return
|
|
|
|
|
2011-12-30 21:11:40 +00:00
|
|
|
layout.prop(md, "mode")
|
2012-02-04 11:10:41 +00:00
|
|
|
|
2011-12-30 21:11:40 +00:00
|
|
|
row = layout.row()
|
2012-01-19 17:30:29 +00:00
|
|
|
row.prop(md, "octree_depth")
|
|
|
|
row.prop(md, "scale")
|
|
|
|
|
2012-02-04 11:10:41 +00:00
|
|
|
if md.mode == 'SHARP':
|
2012-01-19 17:30:29 +00:00
|
|
|
layout.prop(md, "sharpness")
|
2011-12-30 21:11:40 +00:00
|
|
|
|
2012-05-18 10:37:49 +00:00
|
|
|
layout.prop(md, "use_smooth_shade")
|
2013-04-23 07:06:29 +00:00
|
|
|
layout.prop(md, "use_remove_disconnected")
|
2011-12-30 21:11:40 +00:00
|
|
|
row = layout.row()
|
2013-04-23 07:06:29 +00:00
|
|
|
row.active = md.use_remove_disconnected
|
2011-12-30 21:11:40 +00:00
|
|
|
row.prop(md, "threshold")
|
|
|
|
|
2011-07-25 15:27:01 +00:00
|
|
|
@staticmethod
|
2011-09-07 23:36:32 +00:00
|
|
|
def vertex_weight_mask(layout, ob, md):
|
2011-07-25 15:27:01 +00:00
|
|
|
layout.label(text="Influence/Mask Options:")
|
|
|
|
|
2018-08-28 12:38:54 +10:00
|
|
|
split = layout.split(factor=0.4)
|
2011-09-08 07:36:59 +00:00
|
|
|
split.label(text="Global Influence:")
|
|
|
|
split.prop(md, "mask_constant", text="")
|
2011-07-25 15:27:01 +00:00
|
|
|
|
|
|
|
if not md.mask_texture:
|
2018-08-28 12:38:54 +10:00
|
|
|
split = layout.split(factor=0.4)
|
2011-09-08 07:36:59 +00:00
|
|
|
split.label(text="Vertex Group Mask:")
|
2020-02-12 12:38:43 +01:00
|
|
|
row = split.row(align=True)
|
|
|
|
row.prop_search(md, "mask_vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_mask_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2011-07-25 15:27:01 +00:00
|
|
|
|
|
|
|
if not md.mask_vertex_group:
|
2018-08-28 12:38:54 +10:00
|
|
|
split = layout.split(factor=0.4)
|
2011-09-08 07:36:59 +00:00
|
|
|
split.label(text="Texture Mask:")
|
|
|
|
split.template_ID(md, "mask_texture", new="texture.new")
|
2011-07-25 15:27:01 +00:00
|
|
|
if md.mask_texture:
|
|
|
|
split = layout.split()
|
2011-09-11 15:36:11 +00:00
|
|
|
|
2011-07-25 15:27:01 +00:00
|
|
|
col = split.column()
|
|
|
|
col.label(text="Texture Coordinates:")
|
|
|
|
col.prop(md, "mask_tex_mapping", text="")
|
2011-09-11 15:36:11 +00:00
|
|
|
|
2011-07-25 15:27:01 +00:00
|
|
|
col = split.column()
|
|
|
|
col.label(text="Use Channel:")
|
|
|
|
col.prop(md, "mask_tex_use_channel", text="")
|
|
|
|
|
|
|
|
if md.mask_tex_mapping == 'OBJECT':
|
2011-09-05 03:26:49 +00:00
|
|
|
layout.prop(md, "mask_tex_map_object", text="Object")
|
2011-07-25 15:27:01 +00:00
|
|
|
elif md.mask_tex_mapping == 'UV' and ob.type == 'MESH':
|
2017-05-25 15:11:00 +10:00
|
|
|
layout.prop_search(md, "mask_tex_uv_layer", ob.data, "uv_layers")
|
2011-07-25 15:27:01 +00:00
|
|
|
|
2011-09-07 07:46:26 +00:00
|
|
|
def VERTEX_WEIGHT_EDIT(self, layout, ob, md):
|
2011-09-08 11:08:22 +00:00
|
|
|
split = layout.split()
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2011-09-08 11:08:22 +00:00
|
|
|
col = split.column()
|
|
|
|
col.label(text="Vertex Group:")
|
|
|
|
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
2011-07-25 15:27:01 +00:00
|
|
|
|
2011-09-08 11:08:22 +00:00
|
|
|
col.label(text="Default Weight:")
|
|
|
|
col.prop(md, "default_weight", text="")
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2013-06-08 16:06:39 +00:00
|
|
|
col = split.column()
|
|
|
|
col.prop(md, "use_add")
|
|
|
|
sub = col.column()
|
|
|
|
sub.active = md.use_add
|
|
|
|
sub.prop(md, "add_threshold")
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2013-06-08 16:06:39 +00:00
|
|
|
col = col.column()
|
|
|
|
col.prop(md, "use_remove")
|
|
|
|
sub = col.column()
|
|
|
|
sub.active = md.use_remove
|
|
|
|
sub.prop(md, "remove_threshold")
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2013-06-08 16:06:39 +00:00
|
|
|
layout.separator()
|
2011-07-25 15:27:01 +00:00
|
|
|
|
2020-03-24 17:48:46 +01:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(md, "falloff_type")
|
|
|
|
row.prop(md, "invert_falloff", text="", icon='ARROW_LEFTRIGHT')
|
2011-09-08 11:08:22 +00:00
|
|
|
if md.falloff_type == 'CURVE':
|
2013-06-08 16:06:39 +00:00
|
|
|
layout.template_curve_mapping(md, "map_curve")
|
2011-07-25 15:27:01 +00:00
|
|
|
|
2011-09-08 11:08:22 +00:00
|
|
|
# Common mask options
|
|
|
|
layout.separator()
|
|
|
|
self.vertex_weight_mask(layout, ob, md)
|
2011-07-25 15:27:01 +00:00
|
|
|
|
2011-09-07 07:46:26 +00:00
|
|
|
def VERTEX_WEIGHT_MIX(self, layout, ob, md):
|
2011-09-08 11:08:22 +00:00
|
|
|
split = layout.split()
|
2011-09-11 15:36:11 +00:00
|
|
|
|
2011-09-08 11:08:22 +00:00
|
|
|
col = split.column()
|
|
|
|
col.label(text="Vertex Group A:")
|
|
|
|
col.prop_search(md, "vertex_group_a", ob, "vertex_groups", text="")
|
|
|
|
col.label(text="Default Weight A:")
|
|
|
|
col.prop(md, "default_weight_a", text="")
|
2011-07-25 15:27:01 +00:00
|
|
|
|
2011-09-08 11:08:22 +00:00
|
|
|
col.label(text="Mix Mode:")
|
|
|
|
col.prop(md, "mix_mode", text="")
|
2011-07-25 15:27:01 +00:00
|
|
|
|
2011-09-08 11:08:22 +00:00
|
|
|
col = split.column()
|
|
|
|
col.label(text="Vertex Group B:")
|
|
|
|
col.prop_search(md, "vertex_group_b", ob, "vertex_groups", text="")
|
|
|
|
col.label(text="Default Weight B:")
|
|
|
|
col.prop(md, "default_weight_b", text="")
|
2011-07-25 15:27:01 +00:00
|
|
|
|
2011-09-08 11:08:22 +00:00
|
|
|
col.label(text="Mix Set:")
|
|
|
|
col.prop(md, "mix_set", text="")
|
2011-07-25 15:27:01 +00:00
|
|
|
|
2011-09-08 11:08:22 +00:00
|
|
|
# Common mask options
|
|
|
|
layout.separator()
|
|
|
|
self.vertex_weight_mask(layout, ob, md)
|
2011-07-25 15:27:01 +00:00
|
|
|
|
2011-09-07 07:46:26 +00:00
|
|
|
def VERTEX_WEIGHT_PROXIMITY(self, layout, ob, md):
|
2011-09-08 11:08:22 +00:00
|
|
|
split = layout.split()
|
2011-09-11 15:36:11 +00:00
|
|
|
|
2011-09-08 11:08:22 +00:00
|
|
|
col = split.column()
|
|
|
|
col.label(text="Vertex Group:")
|
|
|
|
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
2011-07-25 15:27:01 +00:00
|
|
|
|
2011-09-08 11:08:22 +00:00
|
|
|
col = split.column()
|
|
|
|
col.label(text="Target Object:")
|
|
|
|
col.prop(md, "target", text="")
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2013-06-08 16:06:39 +00:00
|
|
|
split = layout.split()
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2013-06-08 16:06:39 +00:00
|
|
|
col = split.column()
|
|
|
|
col.label(text="Distance:")
|
|
|
|
col.prop(md, "proximity_mode", text="")
|
2011-09-08 11:08:22 +00:00
|
|
|
if md.proximity_mode == 'GEOMETRY':
|
2013-06-08 16:06:39 +00:00
|
|
|
col.row().prop(md, "proximity_geometry")
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2013-06-08 16:06:39 +00:00
|
|
|
col = split.column()
|
|
|
|
col.label()
|
|
|
|
col.prop(md, "min_dist")
|
|
|
|
col.prop(md, "max_dist")
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2013-06-08 16:06:39 +00:00
|
|
|
layout.separator()
|
2011-09-08 11:08:22 +00:00
|
|
|
layout.prop(md, "falloff_type")
|
2011-09-05 16:16:00 +00:00
|
|
|
|
2011-09-08 11:08:22 +00:00
|
|
|
# Common mask options
|
|
|
|
layout.separator()
|
|
|
|
self.vertex_weight_mask(layout, ob, md)
|
2011-07-25 15:27:01 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def SKIN(self, layout, _ob, md):
|
2015-05-03 15:09:48 +02:00
|
|
|
row = layout.row()
|
|
|
|
row.operator("object.skin_armature_create", text="Create Armature")
|
|
|
|
row.operator("mesh.customdata_skin_add")
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2012-05-22 15:29:01 +00:00
|
|
|
layout.separator()
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2015-05-03 15:09:48 +02:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(md, "branch_smoothing")
|
|
|
|
row.prop(md, "use_smooth_shade")
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2012-05-22 15:29:01 +00:00
|
|
|
split = layout.split()
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2012-05-22 15:29:01 +00:00
|
|
|
col = split.column()
|
2013-06-08 16:53:14 +00:00
|
|
|
col.label(text="Selected Vertices:")
|
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.operator("object.skin_loose_mark_clear", text="Mark Loose").action = 'MARK'
|
|
|
|
sub.operator("object.skin_loose_mark_clear", text="Clear Loose").action = 'CLEAR'
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2013-06-08 16:53:14 +00:00
|
|
|
sub = col.column()
|
|
|
|
sub.operator("object.skin_root_mark", text="Mark Root")
|
|
|
|
sub.operator("object.skin_radii_equalize", text="Equalize Radii")
|
2013-06-27 03:05:19 +00:00
|
|
|
|
2013-06-08 16:53:14 +00:00
|
|
|
col = split.column()
|
|
|
|
col.label(text="Symmetry Axes:")
|
2012-05-22 15:29:01 +00:00
|
|
|
col.prop(md, "use_x_symmetry")
|
|
|
|
col.prop(md, "use_y_symmetry")
|
|
|
|
col.prop(md, "use_z_symmetry")
|
2012-06-19 22:17:19 +00:00
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def TRIANGULATE(self, layout, _ob, md):
|
2013-10-29 02:42:51 +00:00
|
|
|
row = layout.row()
|
|
|
|
|
|
|
|
col = row.column()
|
|
|
|
col.label(text="Quad Method:")
|
|
|
|
col.prop(md, "quad_method", text="")
|
2019-02-28 18:03:48 +01:00
|
|
|
col.prop(md, "keep_custom_normals")
|
2013-10-29 02:42:51 +00:00
|
|
|
col = row.column()
|
|
|
|
col.label(text="Ngon Method:")
|
|
|
|
col.prop(md, "ngon_method", text="")
|
2019-03-22 17:55:51 +01:00
|
|
|
col.label(text="Minimum Vertices:")
|
|
|
|
col.prop(md, "min_vertices", text="")
|
2012-11-19 20:40:08 +00:00
|
|
|
|
2012-12-14 04:07:30 +00:00
|
|
|
def UV_WARP(self, layout, ob, md):
|
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
2013-01-15 23:15:32 +00:00
|
|
|
col.prop(md, "center")
|
2012-12-14 04:07:30 +00:00
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="UV Axis:")
|
2013-01-15 23:15:32 +00:00
|
|
|
col.prop(md, "axis_u", text="")
|
|
|
|
col.prop(md, "axis_v", text="")
|
2012-12-14 04:07:30 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="From:")
|
|
|
|
col.prop(md, "object_from", text="")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="To:")
|
|
|
|
col.prop(md, "object_to", text="")
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
|
|
|
obj = md.object_from
|
|
|
|
if obj and obj.type == 'ARMATURE':
|
|
|
|
col.label(text="Bone:")
|
|
|
|
col.prop_search(md, "bone_from", obj.data, "bones", text="")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
obj = md.object_to
|
|
|
|
if obj and obj.type == 'ARMATURE':
|
|
|
|
col.label(text="Bone:")
|
|
|
|
col.prop_search(md, "bone_to", obj.data, "bones", text="")
|
|
|
|
|
|
|
|
split = layout.split()
|
2020-02-15 01:49:50 +01:00
|
|
|
col = split.column()
|
|
|
|
col.label(text="Offset:")
|
|
|
|
col.prop(md, "offset", text="")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="Scale:")
|
|
|
|
col.prop(md, "scale", text="")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="Rotate:")
|
|
|
|
col.prop(md, "rotation", text="")
|
|
|
|
|
|
|
|
split = layout.split()
|
2012-12-14 04:07:30 +00:00
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="Vertex Group:")
|
2020-02-18 18:12:06 +01:00
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2012-12-14 04:07:30 +00:00
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="UV Map:")
|
2017-05-25 15:11:00 +10:00
|
|
|
col.prop_search(md, "uv_layer", ob.data, "uv_layers", text="")
|
2012-12-14 04:07:30 +00:00
|
|
|
|
2013-12-22 07:08:35 +11:00
|
|
|
def WIREFRAME(self, layout, ob, md):
|
|
|
|
has_vgroup = bool(md.vertex_group)
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(md, "thickness", text="Thickness")
|
|
|
|
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
sub = row.row(align=True)
|
|
|
|
sub.active = has_vgroup
|
|
|
|
sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.active = has_vgroup
|
|
|
|
row.prop(md, "thickness_vertex_group", text="Factor")
|
|
|
|
|
|
|
|
col.prop(md, "use_crease", text="Crease Edges")
|
2017-02-14 23:44:21 -05:00
|
|
|
row = col.row()
|
|
|
|
row.active = md.use_crease
|
|
|
|
row.prop(md, "crease_weight", text="Crease Weight")
|
2013-12-22 07:08:35 +11:00
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
|
|
|
|
col.prop(md, "offset")
|
|
|
|
col.prop(md, "use_even_offset", text="Even Thickness")
|
|
|
|
col.prop(md, "use_relative_offset", text="Relative Thickness")
|
|
|
|
col.prop(md, "use_boundary", text="Boundary")
|
|
|
|
col.prop(md, "use_replace", text="Replace Original")
|
|
|
|
|
|
|
|
col.prop(md, "material_offset", text="Material Offset")
|
|
|
|
|
2019-12-11 22:31:20 -03:00
|
|
|
def WELD(self, layout, ob, md):
|
|
|
|
layout.prop(md, "merge_threshold", text="Distance")
|
|
|
|
layout.prop(md, "max_interactions")
|
2020-02-12 11:04:20 +01:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2019-12-11 22:31:20 -03:00
|
|
|
|
2015-01-09 21:19:12 +01:00
|
|
|
def DATA_TRANSFER(self, layout, ob, md):
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(md, "object")
|
|
|
|
sub = row.row(align=True)
|
|
|
|
sub.active = bool(md.object)
|
|
|
|
sub.prop(md, "use_object_transform", text="", icon='GROUP')
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
2018-08-28 12:38:54 +10:00
|
|
|
split = layout.split(factor=0.333)
|
2015-01-09 21:19:12 +01:00
|
|
|
split.prop(md, "use_vert_data")
|
|
|
|
use_vert = md.use_vert_data
|
|
|
|
row = split.row()
|
|
|
|
row.active = use_vert
|
|
|
|
row.prop(md, "vert_mapping", text="")
|
|
|
|
if use_vert:
|
|
|
|
col = layout.column(align=True)
|
2018-08-28 12:38:54 +10:00
|
|
|
split = col.split(factor=0.333, align=True)
|
2015-01-09 21:19:12 +01:00
|
|
|
sub = split.column(align=True)
|
2015-10-19 23:22:12 +02:00
|
|
|
sub.prop(md, "data_types_verts")
|
|
|
|
sub = split.column(align=True)
|
|
|
|
row = sub.row(align=True)
|
2015-01-09 21:19:12 +01:00
|
|
|
row.prop(md, "layers_vgroup_select_src", text="")
|
2015-10-19 23:22:12 +02:00
|
|
|
row.label(icon='RIGHTARROW')
|
2015-01-09 21:19:12 +01:00
|
|
|
row.prop(md, "layers_vgroup_select_dst", text="")
|
2015-10-19 23:22:12 +02:00
|
|
|
row = sub.row(align=True)
|
2018-08-28 12:34:51 +10:00
|
|
|
row.label(text="", icon='NONE')
|
2015-01-09 21:19:12 +01:00
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
2018-08-28 12:38:54 +10:00
|
|
|
split = layout.split(factor=0.333)
|
2015-01-09 21:19:12 +01:00
|
|
|
split.prop(md, "use_edge_data")
|
|
|
|
use_edge = md.use_edge_data
|
|
|
|
row = split.row()
|
|
|
|
row.active = use_edge
|
|
|
|
row.prop(md, "edge_mapping", text="")
|
|
|
|
if use_edge:
|
|
|
|
col = layout.column(align=True)
|
2018-08-28 12:38:54 +10:00
|
|
|
split = col.split(factor=0.333, align=True)
|
2015-01-09 21:19:12 +01:00
|
|
|
sub = split.column(align=True)
|
|
|
|
sub.prop(md, "data_types_edges")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
2018-08-28 12:38:54 +10:00
|
|
|
split = layout.split(factor=0.333)
|
2015-01-09 21:19:12 +01:00
|
|
|
split.prop(md, "use_loop_data")
|
|
|
|
use_loop = md.use_loop_data
|
|
|
|
row = split.row()
|
|
|
|
row.active = use_loop
|
|
|
|
row.prop(md, "loop_mapping", text="")
|
|
|
|
if use_loop:
|
|
|
|
col = layout.column(align=True)
|
2018-08-28 12:38:54 +10:00
|
|
|
split = col.split(factor=0.333, align=True)
|
2015-01-09 21:19:12 +01:00
|
|
|
sub = split.column(align=True)
|
|
|
|
sub.prop(md, "data_types_loops")
|
|
|
|
sub = split.column(align=True)
|
2015-10-19 23:22:12 +02:00
|
|
|
row = sub.row(align=True)
|
2018-08-28 12:34:51 +10:00
|
|
|
row.label(text="", icon='NONE')
|
2015-10-19 23:22:12 +02:00
|
|
|
row = sub.row(align=True)
|
2015-01-09 21:19:12 +01:00
|
|
|
row.prop(md, "layers_vcol_select_src", text="")
|
|
|
|
row.label(icon='RIGHTARROW')
|
|
|
|
row.prop(md, "layers_vcol_select_dst", text="")
|
2015-10-19 23:22:12 +02:00
|
|
|
row = sub.row(align=True)
|
2015-01-09 21:19:12 +01:00
|
|
|
row.prop(md, "layers_uv_select_src", text="")
|
|
|
|
row.label(icon='RIGHTARROW')
|
|
|
|
row.prop(md, "layers_uv_select_dst", text="")
|
|
|
|
col.prop(md, "islands_precision")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
2018-08-28 12:38:54 +10:00
|
|
|
split = layout.split(factor=0.333)
|
2015-01-09 21:19:12 +01:00
|
|
|
split.prop(md, "use_poly_data")
|
|
|
|
use_poly = md.use_poly_data
|
|
|
|
row = split.row()
|
|
|
|
row.active = use_poly
|
|
|
|
row.prop(md, "poly_mapping", text="")
|
|
|
|
if use_poly:
|
|
|
|
col = layout.column(align=True)
|
2018-08-28 12:38:54 +10:00
|
|
|
split = col.split(factor=0.333, align=True)
|
2015-01-09 21:19:12 +01:00
|
|
|
sub = split.column(align=True)
|
|
|
|
sub.prop(md, "data_types_polys")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
|
|
|
row = col.row(align=True)
|
|
|
|
sub = row.row(align=True)
|
|
|
|
sub.active = md.use_max_distance
|
|
|
|
sub.prop(md, "max_distance")
|
|
|
|
row.prop(md, "use_max_distance", text="", icon='STYLUS_PRESSURE')
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(md, "ray_radius")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
|
|
|
col.prop(md, "mix_mode")
|
|
|
|
col.prop(md, "mix_factor")
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
row = col.row()
|
|
|
|
row.active = bool(md.object)
|
|
|
|
row.operator("object.datalayout_transfer", text="Generate Data Layers")
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
sub = row.row(align=True)
|
|
|
|
sub.active = bool(md.vertex_group)
|
|
|
|
sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
|
|
|
|
2015-02-05 14:49:44 +01:00
|
|
|
def NORMAL_EDIT(self, layout, ob, md):
|
|
|
|
has_vgroup = bool(md.vertex_group)
|
2018-06-14 11:41:12 +02:00
|
|
|
do_polynors_fix = not md.no_polynors_fix
|
2015-02-05 14:49:44 +01:00
|
|
|
needs_object_offset = (((md.mode == 'RADIAL') and not md.target) or
|
|
|
|
((md.mode == 'DIRECTIONAL') and md.use_direction_parallel))
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(md, "mode", expand=True)
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(md, "target", text="")
|
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.active = needs_object_offset
|
|
|
|
sub.prop(md, "offset")
|
|
|
|
row = col.row(align=True)
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
row = col.row()
|
|
|
|
row.active = (md.mode == 'DIRECTIONAL')
|
|
|
|
row.prop(md, "use_direction_parallel")
|
|
|
|
|
|
|
|
subcol = col.column(align=True)
|
2018-08-28 12:34:51 +10:00
|
|
|
subcol.label(text="Mix Mode:")
|
2015-02-05 14:49:44 +01:00
|
|
|
subcol.prop(md, "mix_mode", text="")
|
|
|
|
subcol.prop(md, "mix_factor")
|
|
|
|
row = subcol.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
sub = row.row(align=True)
|
|
|
|
sub.active = has_vgroup
|
2015-03-30 10:42:40 +11:00
|
|
|
sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
2018-06-14 11:41:12 +02:00
|
|
|
row = subcol.row(align=True)
|
|
|
|
row.prop(md, "mix_limit")
|
|
|
|
row.prop(md, "no_polynors_fix", text="", icon='UNLOCKED' if do_polynors_fix else 'LOCKED')
|
2015-02-05 14:49:44 +01:00
|
|
|
|
2015-03-29 04:44:05 +11:00
|
|
|
def CORRECTIVE_SMOOTH(self, layout, ob, md):
|
|
|
|
is_bind = md.is_bind
|
|
|
|
|
2015-04-01 09:29:56 +11:00
|
|
|
layout.prop(md, "factor", text="Factor")
|
2015-03-29 04:44:05 +11:00
|
|
|
layout.prop(md, "iterations")
|
2020-03-10 12:47:43 +01:00
|
|
|
layout.prop(md, "scale")
|
2015-03-29 04:44:05 +11:00
|
|
|
row = layout.row()
|
|
|
|
row.prop(md, "smooth_type")
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="Vertex Group:")
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(md, "use_only_smooth")
|
|
|
|
col.prop(md, "use_pin_boundary")
|
|
|
|
|
|
|
|
layout.prop(md, "rest_source")
|
|
|
|
if md.rest_source == 'BIND':
|
|
|
|
layout.operator("object.correctivesmooth_bind", text="Unbind" if is_bind else "Bind")
|
|
|
|
|
2018-05-25 22:24:24 +05:30
|
|
|
def WEIGHTED_NORMAL(self, layout, ob, md):
|
2018-08-28 12:34:51 +10:00
|
|
|
layout.label(text="Weighting Mode:")
|
2018-05-25 22:24:24 +05:30
|
|
|
split = layout.split(align=True)
|
|
|
|
col = split.column(align=True)
|
|
|
|
col.prop(md, "mode", text="")
|
|
|
|
col.prop(md, "weight", text="Weight")
|
|
|
|
col.prop(md, "keep_sharp")
|
|
|
|
|
|
|
|
col = split.column(align=True)
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.active = bool(md.vertex_group)
|
|
|
|
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
|
|
|
col.prop(md, "thresh", text="Threshold")
|
|
|
|
col.prop(md, "face_influence")
|
|
|
|
|
2013-12-22 07:08:35 +11:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
|
|
|
|
bl_label = "Modifiers"
|
|
|
|
|
2018-10-25 19:15:32 +02:00
|
|
|
def check_conflicts(self, layout, ob):
|
|
|
|
for md in ob.grease_pencil_modifiers:
|
|
|
|
if md.type == 'GP_TIME':
|
|
|
|
row = layout.row()
|
|
|
|
row.label(text="Build and Time Offset modifier not compatible", icon='ERROR')
|
|
|
|
break
|
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
@classmethod
|
|
|
|
def poll(cls, context):
|
|
|
|
ob = context.object
|
|
|
|
return ob and ob.type == 'GPENCIL'
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
ob = context.object
|
|
|
|
|
|
|
|
layout.operator_menu_enum("object.gpencil_modifier_add", "type")
|
|
|
|
|
|
|
|
for md in ob.grease_pencil_modifiers:
|
|
|
|
box = layout.template_greasepencil_modifier(md)
|
|
|
|
if box:
|
|
|
|
# match enum type to our functions, avoids a lookup table.
|
|
|
|
getattr(self, md.type)(box, ob, md)
|
|
|
|
|
|
|
|
# the mt.type enum is (ab)used for a lookup on function names
|
|
|
|
# ...to avoid lengthy if statements
|
|
|
|
# so each type must have a function here.
|
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
def gpencil_masking(self, layout, ob, md, use_vertex, use_curve=False):
|
2018-07-31 10:22:19 +02:00
|
|
|
gpd = ob.data
|
2020-03-09 16:27:24 +01:00
|
|
|
layout.separator()
|
|
|
|
layout.label(text="Influence Filters:")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
split = layout.split(factor=0.25)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
col1 = split.column()
|
2019-08-21 08:30:45 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
col1.label(text="Layer:")
|
|
|
|
col1.label(text="Material:")
|
|
|
|
if use_vertex:
|
|
|
|
col1.label(text="Vertex Group:")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
col2 = split.column()
|
2019-08-21 08:30:45 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
split = col2.split(factor=0.6)
|
|
|
|
row = split.row(align=True)
|
2018-10-24 16:46:14 +02:00
|
|
|
row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
|
|
|
|
row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
|
2020-03-09 16:27:24 +01:00
|
|
|
|
|
|
|
row = split.row(align=True)
|
2018-10-24 16:46:14 +02:00
|
|
|
row.prop(md, "layer_pass", text="Pass")
|
|
|
|
row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
split = col2.split(factor=0.6)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
row = split.row(align=True)
|
2019-08-21 08:30:45 +02:00
|
|
|
row.prop_search(md, "material", gpd, "materials", text="", icon='SHADING_TEXTURE')
|
|
|
|
row.prop(md, "invert_materials", text="", icon='ARROW_LEFTRIGHT')
|
2020-03-09 16:27:24 +01:00
|
|
|
|
|
|
|
row = split.row(align=True)
|
2018-07-31 10:22:19 +02:00
|
|
|
row.prop(md, "pass_index", text="Pass")
|
2018-10-24 16:46:14 +02:00
|
|
|
row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
if use_vertex:
|
|
|
|
row = col2.row(align=True)
|
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
|
2019-08-21 08:30:45 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
if use_curve:
|
|
|
|
col = layout.column()
|
|
|
|
col.separator()
|
|
|
|
col.prop(md, "use_custom_curve")
|
|
|
|
if md.use_custom_curve:
|
|
|
|
col.template_curve_mapping(md, "curve")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
def GP_NOISE(self, layout, ob, md):
|
2018-07-31 10:22:19 +02:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
row = col.row(align=True)
|
2020-03-09 16:27:24 +01:00
|
|
|
row.prop(md, "factor", text="Position")
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(md, "factor_strength", text="Strength")
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(md, "factor_thickness", text="Thickness")
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(md, "factor_uvs", text="UV")
|
2018-10-24 16:46:14 +02:00
|
|
|
|
|
|
|
col.separator()
|
2018-07-31 10:22:19 +02:00
|
|
|
row = col.row(align=True)
|
2020-03-09 16:27:24 +01:00
|
|
|
row.prop(md, "random", text="", icon='TIME', toggle=True)
|
2019-09-10 06:11:52 +10:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
subrow = row.row(align=True)
|
|
|
|
subrow.enabled = md.random
|
|
|
|
subrow.prop(md, "step")
|
|
|
|
subrow.prop(md, "seed")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2019-08-21 08:30:45 +02:00
|
|
|
col.separator()
|
2020-03-09 16:27:24 +01:00
|
|
|
col.prop(md, "noise_scale")
|
2019-08-21 08:30:45 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
self.gpencil_masking(layout, ob, md, True, True)
|
|
|
|
|
|
|
|
def GP_SMOOTH(self, layout, ob, md):
|
|
|
|
col = layout.column()
|
|
|
|
col.prop(md, "factor")
|
|
|
|
col.prop(md, "step", text="Repeat")
|
|
|
|
|
|
|
|
col.label(text="Affect:")
|
2018-07-31 10:22:19 +02:00
|
|
|
row = col.row(align=True)
|
2020-03-09 16:27:24 +01:00
|
|
|
row.prop(md, "use_edit_position", text="Position", toggle=True)
|
|
|
|
row.prop(md, "use_edit_strength", text="Strength", toggle=True)
|
|
|
|
row.prop(md, "use_edit_thickness", text="Thickness", toggle=True)
|
|
|
|
row.prop(md, "use_edit_uv", text="UV", toggle=True)
|
|
|
|
|
|
|
|
self.gpencil_masking(layout, ob, md, True, True)
|
|
|
|
|
|
|
|
def GP_SUBDIV(self, layout, ob, md):
|
|
|
|
layout.row().prop(md, "subdivision_type", expand=True)
|
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(md, "level", text="Subdivisions")
|
|
|
|
|
|
|
|
self.gpencil_masking(layout, ob, md, False)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
def GP_SIMPLIFY(self, layout, ob, md):
|
|
|
|
gpd = ob.data
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.prop(md, "mode")
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2018-08-28 12:34:51 +10:00
|
|
|
col.label(text="Settings:")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2019-08-08 16:12:13 +02:00
|
|
|
if md.mode == 'FIXED':
|
|
|
|
col.prop(md, "step")
|
|
|
|
elif md.mode == 'ADAPTIVE':
|
|
|
|
col.prop(md, "factor")
|
|
|
|
elif md.mode == 'SAMPLE':
|
|
|
|
col.prop(md, "length")
|
2019-08-08 17:16:06 +02:00
|
|
|
elif md.mode == 'MERGE':
|
2019-08-10 17:16:12 +02:00
|
|
|
col.prop(md, "distance")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
self.gpencil_masking(layout, ob, md, False)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
def GP_THICK(self, layout, ob, md):
|
2019-08-21 08:30:45 +02:00
|
|
|
col = layout.column()
|
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
col.prop(md, "normalize_thickness")
|
2018-10-24 16:46:14 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
if md.normalize_thickness:
|
|
|
|
col.prop(md, "thickness")
|
|
|
|
else:
|
|
|
|
col.prop(md, "thickness_factor")
|
2019-08-21 08:30:45 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
self.gpencil_masking(layout, ob, md, True, True)
|
2018-10-24 16:46:14 +02:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
def GP_TINT(self, layout, ob, md):
|
2020-03-13 10:28:30 +01:00
|
|
|
layout.row().prop(md, "tint_type", expand=True)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2020-03-13 10:28:30 +01:00
|
|
|
if md.tint_type == 'UNIFORM':
|
|
|
|
col = layout.column()
|
|
|
|
col.prop(md, "color")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2020-03-13 10:28:30 +01:00
|
|
|
col.separator()
|
|
|
|
col.prop(md, "factor")
|
2018-10-24 16:46:14 +02:00
|
|
|
|
2020-03-13 10:28:30 +01:00
|
|
|
if md.tint_type == 'GRADIENT':
|
|
|
|
col = layout.column()
|
|
|
|
col.label(text="Colors:")
|
|
|
|
col.template_color_ramp(md, "colors")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
col.label(text="Object:")
|
|
|
|
col.prop(md, "object", text="")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
row = col.row(align=True)
|
|
|
|
row.prop(md, "radius")
|
|
|
|
row.prop(md, "factor")
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
col.prop(md, "vertex_mode")
|
|
|
|
|
|
|
|
self.gpencil_masking(layout, ob, md, True, True)
|
2018-08-21 17:18:42 +10:00
|
|
|
|
2018-10-22 18:25:13 +02:00
|
|
|
def GP_TIME(self, layout, ob, md):
|
|
|
|
gpd = ob.data
|
|
|
|
|
|
|
|
row = layout.row()
|
2018-10-24 10:31:48 +02:00
|
|
|
row.prop(md, "mode", text="Mode")
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
if md.mode == 'FIX':
|
|
|
|
txt = "Frame"
|
|
|
|
else:
|
|
|
|
txt = "Frame Offset"
|
|
|
|
row.prop(md, "offset", text=txt)
|
|
|
|
|
2018-10-23 16:44:31 +02:00
|
|
|
row = layout.row()
|
2018-10-24 10:31:48 +02:00
|
|
|
row.enabled = md.mode != 'FIX'
|
2018-10-23 16:44:31 +02:00
|
|
|
row.prop(md, "frame_scale")
|
2018-10-22 18:25:13 +02:00
|
|
|
|
2018-11-03 17:11:38 +01:00
|
|
|
row = layout.row()
|
|
|
|
row.separator()
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.enabled = md.mode != 'FIX'
|
|
|
|
row.prop(md, "use_custom_frame_range")
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.enabled = md.mode != 'FIX' and md.use_custom_frame_range is True
|
|
|
|
row.prop(md, "frame_start")
|
|
|
|
row.prop(md, "frame_end")
|
|
|
|
|
2018-10-24 16:46:14 +02:00
|
|
|
row = layout.row()
|
|
|
|
row.enabled = md.mode != 'FIX'
|
|
|
|
row.prop(md, "use_keep_loop")
|
|
|
|
|
2018-10-22 18:25:13 +02:00
|
|
|
row = layout.row()
|
|
|
|
row.label(text="Layer:")
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
|
|
|
|
row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
|
|
|
|
|
2018-10-24 11:02:52 +02:00
|
|
|
row = layout.row(align=True)
|
2018-10-24 16:46:14 +02:00
|
|
|
row.prop(md, "layer_pass", text="Pass")
|
|
|
|
row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
|
2018-10-22 18:25:13 +02:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
def GP_COLOR(self, layout, ob, md):
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2018-08-28 12:34:51 +10:00
|
|
|
col.label(text="Color:")
|
2019-06-26 20:58:18 +02:00
|
|
|
col.prop(md, "hue", text="H", slider=True)
|
|
|
|
col.prop(md, "saturation", text="S", slider=True)
|
|
|
|
col.prop(md, "value", text="V", slider=True)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2018-10-24 16:46:14 +02:00
|
|
|
row = layout.row()
|
|
|
|
row.prop(md, "modify_color")
|
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
self.gpencil_masking(layout, ob, md, False, True)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
def GP_OPACITY(self, layout, ob, md):
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2020-03-09 16:27:24 +01:00
|
|
|
col.prop(md, "modify_color")
|
2019-08-21 08:30:45 +02:00
|
|
|
|
2020-03-20 15:37:56 +01:00
|
|
|
if md.modify_color == 'HARDENESS':
|
|
|
|
col.prop(md, "hardeness")
|
|
|
|
show = False
|
|
|
|
else:
|
|
|
|
col.prop(md, "normalize_opacity")
|
|
|
|
if md.normalize_opacity is True:
|
|
|
|
text="Strength"
|
|
|
|
else:
|
|
|
|
text="Opacity Factor"
|
|
|
|
|
|
|
|
col.prop(md, "factor", text=text)
|
|
|
|
show = True
|
|
|
|
self.gpencil_masking(layout, ob, md, show, show)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2018-10-28 18:08:24 +01:00
|
|
|
def GP_ARRAY(self, layout, ob, md):
|
2018-07-31 10:22:19 +02:00
|
|
|
col = layout.column()
|
|
|
|
col.prop(md, "count")
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
2020-03-09 16:27:24 +01:00
|
|
|
col.prop(md, "use_constant_offset", text="Constant Offset")
|
|
|
|
subcol = col.column()
|
|
|
|
subcol.enabled = md.use_constant_offset
|
|
|
|
subcol.prop(md, "constant_offset", text="")
|
|
|
|
|
|
|
|
col.prop(md, "use_object_offset")
|
|
|
|
subcol = col.column()
|
|
|
|
subcol.enabled = md.use_object_offset
|
|
|
|
subcol.prop(md, "offset_object", text="")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
col = split.column()
|
2020-03-09 16:27:24 +01:00
|
|
|
col.prop(md, "use_relative_offset", text="Relative Offset")
|
|
|
|
subcol = col.column()
|
|
|
|
subcol.enabled = md.use_relative_offset
|
|
|
|
subcol.prop(md, "relative_offset", text="")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
col = split.column()
|
2020-03-09 16:27:24 +01:00
|
|
|
col.label(text="Random Offset:")
|
|
|
|
col.prop(md, "random_offset", text="")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
col = split.column()
|
2020-03-09 16:27:24 +01:00
|
|
|
col.label(text="Random Rotation:")
|
|
|
|
col.prop(md, "random_rotation", text="")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
col = split.column()
|
|
|
|
col.label(text="Random Scale:")
|
|
|
|
col.prop(md, "random_scale", text="")
|
2018-10-24 16:46:14 +02:00
|
|
|
|
2019-08-21 08:30:45 +02:00
|
|
|
col = layout.column()
|
2020-03-09 16:27:24 +01:00
|
|
|
col.prop(md, "seed")
|
2019-08-21 08:30:45 +02:00
|
|
|
col.separator()
|
2020-03-09 16:27:24 +01:00
|
|
|
col.prop(md, "replace_material", text="Material Override")
|
2019-08-21 08:30:45 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
self.gpencil_masking(layout, ob, md, False)
|
2018-09-29 16:42:33 +02:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
def GP_BUILD(self, layout, ob, md):
|
|
|
|
gpd = ob.data
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2018-10-25 19:15:32 +02:00
|
|
|
self.check_conflicts(col, ob)
|
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
col.prop(md, "mode")
|
|
|
|
if md.mode == 'CONCURRENT':
|
|
|
|
col.prop(md, "concurrent_time_alignment")
|
|
|
|
|
2018-10-24 16:46:14 +02:00
|
|
|
col.separator()
|
2018-07-31 10:22:19 +02:00
|
|
|
col.prop(md, "transition")
|
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.prop(md, "start_delay")
|
|
|
|
sub.prop(md, "length")
|
|
|
|
|
2018-10-24 16:46:14 +02:00
|
|
|
col = layout.column(align=True)
|
2018-07-31 10:22:19 +02:00
|
|
|
col.prop(md, "use_restrict_frame_range")
|
|
|
|
sub = col.column(align=True)
|
|
|
|
sub.active = md.use_restrict_frame_range
|
|
|
|
sub.prop(md, "frame_start", text="Start")
|
|
|
|
sub.prop(md, "frame_end", text="End")
|
|
|
|
|
2020-03-12 10:39:41 +01:00
|
|
|
layout.label(text="Influence Filters:")
|
|
|
|
|
|
|
|
split = layout.split(factor=0.25)
|
|
|
|
|
|
|
|
col1 = split.column()
|
|
|
|
|
|
|
|
col1.label(text="Layer:")
|
|
|
|
|
|
|
|
col2 = split.column()
|
|
|
|
|
|
|
|
split = col2.split(factor=0.6)
|
|
|
|
row = split.row(align=True)
|
2018-07-31 10:22:19 +02:00
|
|
|
row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
|
2018-09-03 14:15:18 +10:00
|
|
|
row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
|
2020-03-12 10:39:41 +01:00
|
|
|
|
|
|
|
row = split.row(align=True)
|
2018-10-24 16:46:14 +02:00
|
|
|
row.prop(md, "layer_pass", text="Pass")
|
|
|
|
row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
def GP_LATTICE(self, layout, ob, md):
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="Object:")
|
|
|
|
col.prop(md, "object", text="")
|
|
|
|
|
2018-10-24 16:46:14 +02:00
|
|
|
layout.prop(md, "strength", slider=True)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
self.gpencil_masking(layout, ob, md, True)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
def GP_MIRROR(self, layout, ob, md):
|
|
|
|
row = layout.row(align=True)
|
|
|
|
row.prop(md, "x_axis")
|
|
|
|
row.prop(md, "y_axis")
|
|
|
|
row.prop(md, "z_axis")
|
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
layout.label(text="Mirror Object:")
|
2018-10-24 16:46:14 +02:00
|
|
|
layout.prop(md, "object", text="")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
self.gpencil_masking(layout, ob, md, False)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
def GP_HOOK(self, layout, ob, md):
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="Object:")
|
|
|
|
col.prop(md, "object", text="")
|
|
|
|
if md.object and md.object.type == 'ARMATURE':
|
|
|
|
col.label(text="Bone:")
|
|
|
|
col.prop_search(md, "subtarget", md.object.data, "bones", text="")
|
|
|
|
|
|
|
|
use_falloff = (md.falloff_type != 'NONE')
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
if use_falloff:
|
|
|
|
row.prop(md, "falloff_radius")
|
|
|
|
row.prop(md, "strength", slider=True)
|
|
|
|
layout.prop(md, "falloff_type")
|
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
if use_falloff:
|
|
|
|
if md.falloff_type == 'CURVE':
|
|
|
|
col.template_curve_mapping(md, "falloff_curve")
|
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.prop(md, "use_falloff_uniform")
|
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
self.gpencil_masking(layout, ob, md, True)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2018-10-24 16:46:14 +02:00
|
|
|
def GP_OFFSET(self, layout, ob, md):
|
2020-03-09 16:27:24 +01:00
|
|
|
split = layout.split()
|
2018-10-24 16:46:14 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
split.column().prop(md, "location")
|
|
|
|
split.column().prop(md, "rotation")
|
|
|
|
split.column().prop(md, "scale")
|
2019-08-21 08:30:45 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
self.gpencil_masking(layout, ob, md, True)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2018-08-30 12:22:55 +02:00
|
|
|
def GP_ARMATURE(self, layout, ob, md):
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="Object:")
|
|
|
|
col.prop(md, "object", text="")
|
2018-09-14 08:57:46 +02:00
|
|
|
# col.prop(md, "use_deform_preserve_volume")
|
2018-08-30 12:22:55 +02:00
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.label(text="Bind To:")
|
|
|
|
col.prop(md, "use_vertex_groups", text="Vertex Groups")
|
|
|
|
col.prop(md, "use_bone_envelopes", text="Bone Envelopes")
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
2018-10-24 17:10:51 +02:00
|
|
|
row = layout.row(align=True)
|
|
|
|
row.label(text="Vertex Group:")
|
|
|
|
row = layout.row(align=True)
|
2018-08-30 12:22:55 +02:00
|
|
|
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
|
|
|
|
sub = row.row(align=True)
|
|
|
|
sub.active = bool(md.vertex_group)
|
|
|
|
sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
|
|
|
|
|
2019-11-14 19:18:23 +01:00
|
|
|
def GP_MULTIPLY(self, layout, ob, md):
|
|
|
|
col = layout.column()
|
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
col.prop(md, "duplicates")
|
2019-11-14 19:18:23 +01:00
|
|
|
subcol = col.column()
|
2020-03-09 16:27:24 +01:00
|
|
|
subcol.enabled = md.duplicates > 0
|
2019-11-14 19:18:23 +01:00
|
|
|
subcol.prop(md, "distance")
|
|
|
|
subcol.prop(md, "offset", slider=True)
|
2019-12-11 22:31:20 -03:00
|
|
|
|
2019-11-14 19:18:23 +01:00
|
|
|
subcol.separator()
|
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
subcol.prop(md, "use_fade")
|
|
|
|
if md.use_fade:
|
2019-11-14 19:18:23 +01:00
|
|
|
subcol.prop(md, "fading_center")
|
|
|
|
subcol.prop(md, "fading_thickness", slider=True)
|
|
|
|
subcol.prop(md, "fading_opacity", slider=True)
|
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
self.gpencil_masking(layout, ob, md, False)
|
2019-11-14 19:18:23 +01:00
|
|
|
|
2019-12-16 14:29:03 +11:00
|
|
|
|
2017-03-18 20:03:24 +11:00
|
|
|
classes = (
|
|
|
|
DATA_PT_modifiers,
|
2018-07-31 10:22:19 +02:00
|
|
|
DATA_PT_gpencil_modifiers,
|
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
|
2020-03-09 16:27:24 +01:00
|
|
|
|
2017-03-18 20:03:24 +11:00
|
|
|
for cls in classes:
|
|
|
|
register_class(cls)
|