2009-05-08 18:17:57 +00:00
|
|
|
|
|
|
|
import bpy
|
|
|
|
|
|
|
|
class DataButtonsPanel(bpy.types.Panel):
|
|
|
|
__space_type__ = "BUTTONS_WINDOW"
|
|
|
|
__region_type__ = "WINDOW"
|
2009-05-19 15:38:36 +00:00
|
|
|
__context__ = "modifier"
|
2009-06-13 21:22:21 +00:00
|
|
|
|
2009-05-08 18:17:57 +00:00
|
|
|
class DATA_PT_modifiers(DataButtonsPanel):
|
|
|
|
__idname__ = "DATA_PT_modifiers"
|
|
|
|
__label__ = "Modifiers"
|
|
|
|
|
|
|
|
def draw(self, context):
|
2009-06-03 00:17:35 +00:00
|
|
|
ob = context.object
|
2009-05-08 18:17:57 +00:00
|
|
|
layout = self.layout
|
|
|
|
|
2009-05-21 15:34:09 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.item_menu_enumO("OBJECT_OT_modifier_add", "type")
|
|
|
|
row.itemL();
|
2009-05-08 18:17:57 +00:00
|
|
|
|
|
|
|
for md in ob.modifiers:
|
2009-05-27 00:03:49 +00:00
|
|
|
box = layout.template_modifier(md)
|
2009-05-08 18:17:57 +00:00
|
|
|
|
2009-05-27 00:03:49 +00:00
|
|
|
if box:
|
2009-05-21 15:34:09 +00:00
|
|
|
if md.type == 'ARMATURE':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.armature(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'ARRAY':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.array(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'BEVEL':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.bevel(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'BOOLEAN':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.boolean(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'BUILD':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.build(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'CAST':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.cast(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'CLOTH':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.cloth(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'COLLISION':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.collision(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'CURVE':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.curve(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'DECIMATE':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.decimate(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'DISPLACE':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.displace(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'EDGE_SPLIT':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.edgesplit(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'EXPLODE':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.explode(box, ob, md)
|
2009-05-22 07:41:36 +00:00
|
|
|
if md.type == 'FLUID_SIMULATION':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.fluid(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'HOOK':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.hook(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'LATTICE':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.lattice(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'MASK':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.mask(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'MESH_DEFORM':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.mesh_deform(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'MIRROR':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.mirror(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'MULTIRES':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.multires(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'PARTICLE_INSTANCE':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.particleinstance(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'PARTICLE_SYSTEM':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.particlesystem(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'SHRINKWRAP':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.shrinkwrap(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'SIMPLE_DEFORM':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.simpledeform(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'SMOOTH':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.smooth(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'SOFTBODY':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.softbody(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'SUBSURF':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.subsurf(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'UV_PROJECT':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.uvproject(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
if md.type == 'WAVE':
|
2009-06-27 01:15:31 +00:00
|
|
|
self.wave(box, ob, md)
|
2009-05-21 21:23:36 +00:00
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def armature(self, layout, ob, md):
|
2009-05-08 18:17:57 +00:00
|
|
|
layout.itemR(md, "object")
|
UI: Layout Engine
* Buttons are now created first, and after that the layout is computed.
This means the layout engine now works at button level, and makes it
easier to write templates. Otherwise you had to store all info and
create the buttons later.
* Added interface_templates.c as a separate file to put templates in.
These can contain regular buttons, and can be put in a Free layout,
which means you can specify manual coordinates, but still get nested
correct inside other layouts.
* API was changed to allow better nesting. Previously items were added
in the last added layout specifier, i.e. one level up in the layout
hierarchy. This doesn't work well in always, so now when creating things
like rows or columns it always returns a layout which you have to add
the items in. All py scripts were updated to follow this.
* Computing the layout now goes in two passes, first estimating the
required width/height of all nested layouts, and then in the second
pass using the results of that to decide on the actual locations.
* Enum and array buttons now follow the direction of the layout, i.e.
they are vertical or horizontal depending if they are in a column or row.
* Color properties now get a color picker, and only get the additional
RGB sliders with Expand=True.
* File/directory string properties now get a button next to them for
opening the file browse, though this is not implemented yet.
* Layout items can now be aligned, set align=True when creating a column,
row, etc.
* Buttons now get a minimum width of one icon (avoids squashing icon
buttons).
* Moved some more space variables into Style.
2009-05-15 11:19:59 +00:00
|
|
|
row = layout.row()
|
2009-06-27 01:15:31 +00:00
|
|
|
row.item_pointerR(md, "vertex_group", ob, "vertex_groups")
|
UI: Layout Engine
* Buttons are now created first, and after that the layout is computed.
This means the layout engine now works at button level, and makes it
easier to write templates. Otherwise you had to store all info and
create the buttons later.
* Added interface_templates.c as a separate file to put templates in.
These can contain regular buttons, and can be put in a Free layout,
which means you can specify manual coordinates, but still get nested
correct inside other layouts.
* API was changed to allow better nesting. Previously items were added
in the last added layout specifier, i.e. one level up in the layout
hierarchy. This doesn't work well in always, so now when creating things
like rows or columns it always returns a layout which you have to add
the items in. All py scripts were updated to follow this.
* Computing the layout now goes in two passes, first estimating the
required width/height of all nested layouts, and then in the second
pass using the results of that to decide on the actual locations.
* Enum and array buttons now follow the direction of the layout, i.e.
they are vertical or horizontal depending if they are in a column or row.
* Color properties now get a color picker, and only get the additional
RGB sliders with Expand=True.
* File/directory string properties now get a button next to them for
opening the file browse, though this is not implemented yet.
* Layout items can now be aligned, set align=True when creating a column,
row, etc.
* Buttons now get a minimum width of one icon (avoids squashing icon
buttons).
* Moved some more space variables into Style.
2009-05-15 11:19:59 +00:00
|
|
|
row.itemR(md, "invert")
|
|
|
|
flow = layout.column_flow()
|
2009-05-23 11:19:18 +00:00
|
|
|
flow.itemR(md, "use_vertex_groups", text="Vertex Groups")
|
|
|
|
flow.itemR(md, "use_bone_envelopes", text="Bone Envelopes")
|
UI: Layout Engine
* Buttons are now created first, and after that the layout is computed.
This means the layout engine now works at button level, and makes it
easier to write templates. Otherwise you had to store all info and
create the buttons later.
* Added interface_templates.c as a separate file to put templates in.
These can contain regular buttons, and can be put in a Free layout,
which means you can specify manual coordinates, but still get nested
correct inside other layouts.
* API was changed to allow better nesting. Previously items were added
in the last added layout specifier, i.e. one level up in the layout
hierarchy. This doesn't work well in always, so now when creating things
like rows or columns it always returns a layout which you have to add
the items in. All py scripts were updated to follow this.
* Computing the layout now goes in two passes, first estimating the
required width/height of all nested layouts, and then in the second
pass using the results of that to decide on the actual locations.
* Enum and array buttons now follow the direction of the layout, i.e.
they are vertical or horizontal depending if they are in a column or row.
* Color properties now get a color picker, and only get the additional
RGB sliders with Expand=True.
* File/directory string properties now get a button next to them for
opening the file browse, though this is not implemented yet.
* Layout items can now be aligned, set align=True when creating a column,
row, etc.
* Buttons now get a minimum width of one icon (avoids squashing icon
buttons).
* Moved some more space variables into Style.
2009-05-15 11:19:59 +00:00
|
|
|
flow.itemR(md, "quaternion")
|
|
|
|
flow.itemR(md, "multi_modifier")
|
2009-05-08 18:17:57 +00:00
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def array(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "fit_type")
|
|
|
|
if md.fit_type == 'FIXED_COUNT':
|
|
|
|
layout.itemR(md, "count")
|
|
|
|
if md.fit_type == 'FIT_LENGTH':
|
|
|
|
layout.itemR(md, "length")
|
|
|
|
if md.fit_type == 'FIT_CURVE':
|
2009-05-27 00:03:49 +00:00
|
|
|
layout.itemR(md, "curve")
|
2009-06-03 00:17:35 +00:00
|
|
|
|
|
|
|
layout.itemS()
|
2009-05-21 21:23:36 +00:00
|
|
|
|
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
2009-05-29 12:42:06 +00:00
|
|
|
col = col.column()
|
|
|
|
col.itemR(md, "constant_offset")
|
|
|
|
colsub = col.column()
|
|
|
|
colsub.active = md.constant_offset
|
2009-06-03 00:17:35 +00:00
|
|
|
colsub.itemR(md, "constant_offset_displacement", text="")
|
|
|
|
|
|
|
|
col.itemS()
|
|
|
|
|
2009-05-21 21:23:36 +00:00
|
|
|
sub = col.row().itemR(md, "merge_adjacent_vertices", text="Merge")
|
2009-05-29 12:42:06 +00:00
|
|
|
colsub = col.column()
|
|
|
|
colsub.active = md.merge_adjacent_vertices
|
|
|
|
colsub.itemR(md, "merge_end_vertices", text="First Last")
|
|
|
|
colsub.itemR(md, "merge_distance", text="Distance")
|
2009-05-21 21:23:36 +00:00
|
|
|
|
|
|
|
col = split.column()
|
2009-05-29 12:42:06 +00:00
|
|
|
col = col.column()
|
|
|
|
col.itemR(md, "relative_offset")
|
|
|
|
colsub = col.column()
|
|
|
|
colsub.active = md.relative_offset
|
2009-06-03 00:17:35 +00:00
|
|
|
colsub.itemR(md, "relative_offset_displacement", text="")
|
|
|
|
|
|
|
|
col.itemS()
|
|
|
|
|
2009-05-29 12:42:06 +00:00
|
|
|
col = col.column()
|
|
|
|
col.itemR(md, "add_offset_object")
|
|
|
|
colsub = col.column()
|
|
|
|
colsub.active = md.add_offset_object
|
2009-06-03 00:17:35 +00:00
|
|
|
colsub.itemR(md, "offset_object", text="")
|
|
|
|
|
|
|
|
layout.itemS()
|
2009-05-21 21:23:36 +00:00
|
|
|
|
|
|
|
col = layout.column()
|
|
|
|
col.itemR(md, "start_cap")
|
|
|
|
col.itemR(md, "end_cap")
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def bevel(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
row = layout.row()
|
|
|
|
row.itemR(md, "width")
|
|
|
|
row.itemR(md, "only_vertices")
|
|
|
|
|
|
|
|
layout.itemL(text="Limit Method:")
|
|
|
|
row = layout.row()
|
|
|
|
row.itemR(md, "limit_method", expand=True)
|
|
|
|
if md.limit_method == 'ANGLE':
|
|
|
|
row = layout.row()
|
|
|
|
row.itemR(md, "angle")
|
|
|
|
if md.limit_method == 'WEIGHT':
|
|
|
|
row = layout.row()
|
|
|
|
row.itemR(md, "edge_weight_method", expand=True)
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def boolean(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "operation")
|
|
|
|
layout.itemR(md, "object")
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def build(self, layout, ob, md):
|
2009-05-29 12:42:06 +00:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.itemR(md, "start")
|
|
|
|
col.itemR(md, "length")
|
2009-05-27 00:03:49 +00:00
|
|
|
|
2009-05-29 12:42:06 +00:00
|
|
|
col = split.column()
|
|
|
|
col.itemR(md, "randomize")
|
|
|
|
colsub = col.column()
|
|
|
|
colsub.active = md.randomize
|
|
|
|
colsub.itemR(md, "seed")
|
|
|
|
|
|
|
|
|
2009-05-21 21:23:36 +00:00
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def cast(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "cast_type")
|
2009-05-23 11:19:18 +00:00
|
|
|
col = layout.column_flow()
|
|
|
|
col.itemR(md, "x")
|
|
|
|
col.itemR(md, "y")
|
|
|
|
col.itemR(md, "z")
|
|
|
|
col.itemR(md, "factor")
|
|
|
|
col.itemR(md, "radius")
|
|
|
|
col.itemR(md, "size")
|
2009-06-27 01:15:31 +00:00
|
|
|
layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
|
2009-05-21 21:23:36 +00:00
|
|
|
#Missing: "OB" and "From Radius"
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def cloth(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemL(text="See Cloth panel.")
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def collision(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemL(text="See Collision panel.")
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def curve(self, layout, ob, md):
|
2009-05-27 00:03:49 +00:00
|
|
|
layout.itemR(md, "object")
|
2009-06-27 01:15:31 +00:00
|
|
|
layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "deform_axis")
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def decimate(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "ratio")
|
|
|
|
layout.itemR(md, "face_count")
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def displace(self, layout, ob, md):
|
|
|
|
layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "texture")
|
|
|
|
layout.itemR(md, "midlevel")
|
|
|
|
layout.itemR(md, "strength")
|
2009-06-19 09:21:08 +00:00
|
|
|
layout.itemR(md, "direction")
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "texture_coordinates")
|
|
|
|
if md.texture_coordinates == 'OBJECT':
|
|
|
|
layout.itemR(md, "texture_coordinate_object", text="Object")
|
2009-06-27 01:15:31 +00:00
|
|
|
if md.texture_coordinates == 'UV' and ob.type == 'MESH':
|
|
|
|
layout.item_pointerR(md, "uv_layer", ob.data, "uv_layers")
|
2009-05-21 21:23:36 +00:00
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def edgesplit(self, layout, ob, md):
|
2009-05-29 12:42:06 +00:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
col = split.column()
|
|
|
|
col.itemR(md, "use_edge_angle", text="Edge Angle")
|
|
|
|
colsub = col.column()
|
|
|
|
colsub.active = md.use_edge_angle
|
|
|
|
colsub.itemR(md, "split_angle")
|
|
|
|
col = split.column()
|
|
|
|
col.itemR(md, "use_sharp", text="Sharp Edges")
|
2009-05-21 21:23:36 +00:00
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def explode(self, layout, ob, md):
|
|
|
|
layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "protect")
|
|
|
|
layout.itemR(md, "split_edges")
|
|
|
|
layout.itemR(md, "unborn")
|
|
|
|
layout.itemR(md, "alive")
|
|
|
|
layout.itemR(md, "dead")
|
|
|
|
# Missing: "Refresh" and "Clear Vertex Group" ?
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def fluid(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemL(text="See Fluidsim panel.")
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def hook(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "falloff")
|
|
|
|
layout.itemR(md, "force", slider=True)
|
|
|
|
layout.itemR(md, "object")
|
2009-06-27 01:15:31 +00:00
|
|
|
layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
|
2009-05-21 21:23:36 +00:00
|
|
|
# Missing: "Reset" and "Recenter"
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def lattice(self, layout, ob, md):
|
2009-05-27 00:03:49 +00:00
|
|
|
layout.itemR(md, "object")
|
2009-06-27 01:15:31 +00:00
|
|
|
layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
|
2009-05-21 21:23:36 +00:00
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def mask(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "mode")
|
|
|
|
if md.mode == 'ARMATURE':
|
|
|
|
layout.itemR(md, "armature")
|
|
|
|
if md.mode == 'VERTEX_GROUP':
|
2009-06-27 01:15:31 +00:00
|
|
|
layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "inverse")
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def mesh_deform(self, layout, ob, md):
|
2009-05-27 00:03:49 +00:00
|
|
|
layout.itemR(md, "object")
|
2009-06-27 01:15:31 +00:00
|
|
|
layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "invert")
|
2009-06-03 00:17:35 +00:00
|
|
|
|
|
|
|
layout.itemS()
|
|
|
|
layout.itemO("OBJECT_OT_modifier_mdef_bind", text="Bind")
|
|
|
|
row = layout.row()
|
|
|
|
row.itemR(md, "precision")
|
|
|
|
row.itemR(md, "dynamic")
|
2009-05-21 21:23:36 +00:00
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def mirror(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "merge_limit")
|
2009-05-23 11:19:18 +00:00
|
|
|
split = layout.split()
|
2009-05-21 21:23:36 +00:00
|
|
|
|
2009-05-23 11:19:18 +00:00
|
|
|
sub = split.column()
|
|
|
|
sub.itemR(md, "x")
|
|
|
|
sub.itemR(md, "y")
|
|
|
|
sub.itemR(md, "z")
|
|
|
|
sub = split.column()
|
2009-05-29 12:42:06 +00:00
|
|
|
sub.itemL(text="Textures:")
|
2009-05-23 11:19:18 +00:00
|
|
|
sub.itemR(md, "mirror_u")
|
|
|
|
sub.itemR(md, "mirror_v")
|
|
|
|
sub = split.column()
|
|
|
|
sub.itemR(md, "clip", text="Do Clipping")
|
|
|
|
sub.itemR(md, "mirror_vertex_groups", text="Vertex Group")
|
2009-05-21 21:23:36 +00:00
|
|
|
|
|
|
|
layout.itemR(md, "mirror_object")
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def multires(self, layout, ob, md):
|
2009-05-23 07:12:55 +00:00
|
|
|
layout.itemR(md, "subdivision_type")
|
|
|
|
layout.itemO("OBJECT_OT_multires_subdivide", text="Subdivide")
|
|
|
|
layout.itemR(md, "level")
|
2009-05-21 21:23:36 +00:00
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def particleinstance(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "object")
|
|
|
|
layout.itemR(md, "particle_system_number")
|
|
|
|
|
|
|
|
col = layout.column_flow()
|
|
|
|
col.itemR(md, "normal")
|
|
|
|
col.itemR(md, "children")
|
|
|
|
col.itemR(md, "path")
|
|
|
|
col.itemR(md, "unborn")
|
|
|
|
col.itemR(md, "alive")
|
|
|
|
col.itemR(md, "dead")
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def particlesystem(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemL(text="See Particle panel.")
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def shrinkwrap(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "target")
|
2009-06-27 01:15:31 +00:00
|
|
|
layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "offset")
|
|
|
|
layout.itemR(md, "subsurf_levels")
|
|
|
|
layout.itemR(md, "mode")
|
|
|
|
if md.mode == 'PROJECT':
|
|
|
|
layout.itemR(md, "subsurf_levels")
|
|
|
|
layout.itemR(md, "auxiliary_target")
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
row.itemR(md, "x")
|
|
|
|
row.itemR(md, "y")
|
|
|
|
row.itemR(md, "z")
|
|
|
|
|
|
|
|
col = layout.column_flow()
|
|
|
|
col.itemR(md, "negative")
|
|
|
|
col.itemR(md, "positive")
|
|
|
|
col.itemR(md, "cull_front_faces")
|
|
|
|
col.itemR(md, "cull_back_faces")
|
|
|
|
if md.mode == 'NEAREST_SURFACEPOINT':
|
|
|
|
layout.itemR(md, "keep_above_surface")
|
|
|
|
# To-Do: Validate if structs
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def simpledeform(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "mode")
|
2009-06-27 01:15:31 +00:00
|
|
|
layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "origin")
|
|
|
|
layout.itemR(md, "relative")
|
|
|
|
layout.itemR(md, "factor")
|
|
|
|
layout.itemR(md, "limits")
|
|
|
|
if md.mode in ('TAPER', 'STRETCH'):
|
|
|
|
layout.itemR(md, "lock_x_axis")
|
|
|
|
layout.itemR(md, "lock_y_axis")
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def smooth(self, layout, ob, md):
|
2009-05-23 11:19:18 +00:00
|
|
|
split = layout.split()
|
|
|
|
sub = split.column()
|
2009-05-29 12:42:06 +00:00
|
|
|
sub.itemR(md, "x")
|
|
|
|
sub.itemR(md, "y")
|
|
|
|
sub.itemR(md, "z")
|
2009-05-23 11:19:18 +00:00
|
|
|
sub = split.column()
|
|
|
|
sub.itemR(md, "factor")
|
|
|
|
sub.itemR(md, "repeat")
|
2009-05-21 21:23:36 +00:00
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
layout.template_pointer(md, "vertex_group", ob, "vertex_groups")
|
2009-05-21 21:23:36 +00:00
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def softbody(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemL(text="See Softbody panel.")
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def subsurf(self, layout, ob, md):
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "subdivision_type")
|
2009-05-23 11:19:18 +00:00
|
|
|
col = layout.column_flow()
|
2009-05-29 12:42:06 +00:00
|
|
|
col.itemR(md, "levels", text="Preview")
|
|
|
|
col.itemR(md, "render_levels", text="Render")
|
|
|
|
col.itemR(md, "optimal_draw", text="Optimal Display")
|
2009-05-23 11:19:18 +00:00
|
|
|
col.itemR(md, "subsurf_uv")
|
2009-05-21 21:23:36 +00:00
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
def uvproject(self, layout, ob, md):
|
|
|
|
if ob.type == 'MESH':
|
|
|
|
layout.item_pointerR(md, "uv_layer", ob.data, "uv_layers")
|
|
|
|
layout.itemR(md, "projectors")
|
|
|
|
layout.itemR(md, "image")
|
|
|
|
layout.itemR(md, "horizontal_aspect_ratio")
|
|
|
|
layout.itemR(md, "vertical_aspect_ratio")
|
|
|
|
layout.itemR(md, "override_image")
|
|
|
|
#"Projectors" don't work.
|
|
|
|
|
|
|
|
def wave(self, layout, ob, md):
|
2009-05-23 11:19:18 +00:00
|
|
|
split = layout.split()
|
|
|
|
|
|
|
|
sub = split.column()
|
|
|
|
sub.itemL(text="Motion:")
|
|
|
|
sub.itemR(md, "x")
|
|
|
|
sub.itemR(md, "y")
|
|
|
|
sub.itemR(md, "cyclic")
|
|
|
|
|
2009-05-29 12:42:06 +00:00
|
|
|
sub = split.column()
|
|
|
|
sub.itemR(md, "normals")
|
|
|
|
row = sub.row(align=True)
|
|
|
|
row.active = md.normals
|
|
|
|
row.itemR(md, "x_normal", text="X", toggle=True)
|
|
|
|
row.itemR(md, "y_normal", text="Y", toggle=True)
|
|
|
|
row.itemR(md, "z_normal", text="Z", toggle=True)
|
2009-05-21 21:23:36 +00:00
|
|
|
|
|
|
|
col = layout.column_flow()
|
|
|
|
col.itemR(md, "time_offset")
|
|
|
|
col.itemR(md, "lifetime")
|
|
|
|
col.itemR(md, "damping_time")
|
|
|
|
col.itemR(md, "falloff_radius")
|
|
|
|
col.itemR(md, "start_position_x")
|
|
|
|
col.itemR(md, "start_position_y")
|
|
|
|
|
|
|
|
layout.itemR(md, "start_position_object")
|
2009-06-27 01:15:31 +00:00
|
|
|
layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
|
2009-05-21 21:23:36 +00:00
|
|
|
layout.itemR(md, "texture")
|
|
|
|
layout.itemR(md, "texture_coordinates")
|
2009-06-27 01:15:31 +00:00
|
|
|
if md.texture_coordinates == 'MAP_UV' and ob.type == 'MESH':
|
|
|
|
layout.item_pointerR(md, "uv_layer", ob.data, "uv_layers")
|
2009-05-23 11:19:18 +00:00
|
|
|
if md.texture_coordinates == 'OBJECT':
|
|
|
|
layout.itemR(md, "texture_coordinates_object")
|
2009-05-21 21:23:36 +00:00
|
|
|
|
|
|
|
col = layout.column_flow()
|
|
|
|
col.itemR(md, "speed", slider=True)
|
|
|
|
col.itemR(md, "height", slider=True)
|
|
|
|
col.itemR(md, "width", slider=True)
|
|
|
|
col.itemR(md, "narrowness", slider=True)
|
|
|
|
|
2009-06-27 01:15:31 +00:00
|
|
|
bpy.types.register(DATA_PT_modifiers)
|