diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-14 10:46:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-14 10:46:07 +0400 |
commit | 11a7a406fb799843bc016e515d81a1c93d6d152e (patch) | |
tree | bd7363bad7fafca8fa417c4148d4c7e104ed9eda /release | |
parent | f4745763514a51bf841fc2c344d62242bdc297da (diff) |
DPAINT_OT_output_toggle operator was using an index option for what was really a toggle between 2 values, changed its index option to an enum.
if a value other than 1/0 was given it would use an uninitialized pointer too (compiler warning, review should pick up this stuff).
also renamed some RNA attrs:
output_name --> output_name_a
output_name2 --> output_name_b
do_output1 --> use_output_a
do_output2 --> use_output_b
do_smudge --> use_smudge
max_velocity --> velocity_max
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py index a934e103c35..70dd7c04382 100644 --- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py +++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py @@ -213,33 +213,33 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel): # paintmap output row = layout.row() - row.prop_search(surface, "output_name", ob.data, "vertex_colors", text="Paintmap layer: ") + row.prop_search(surface, "output_name_a", ob.data, "vertex_colors", text="Paintmap layer: ") if surface.output_exists(object=ob, index=0): ic = 'ZOOMOUT' else: ic = 'ZOOMIN' - row.operator("dpaint.output_toggle", icon=ic, text="").index = 0 + row.operator("dpaint.output_toggle", icon=ic, text="").output = 'A' # wetmap output row = layout.row() - row.prop_search(surface, "output_name2", ob.data, "vertex_colors", text="Wetmap layer: ") + row.prop_search(surface, "output_name_b", ob.data, "vertex_colors", text="Wetmap layer: ") if surface.output_exists(object=ob, index=1): ic = 'ZOOMOUT' else: ic = 'ZOOMIN' - row.operator("dpaint.output_toggle", icon=ic, text="").index = 1 + row.operator("dpaint.output_toggle", icon=ic, text="").output = 'B' elif surface_type == 'WEIGHT': row = layout.row() - row.prop_search(surface, "output_name", ob, "vertex_groups", text="Vertex Group: ") + row.prop_search(surface, "output_name_a", ob, "vertex_groups", text="Vertex Group: ") if surface.output_exists(object=ob, index=0): ic = 'ZOOMOUT' else: ic = 'ZOOMIN' - row.operator("dpaint.output_toggle", icon=ic, text="").index = 0 + row.operator("dpaint.output_toggle", icon=ic, text="").output = 'A' # image format outputs if surface.surface_format == 'IMAGE': @@ -254,19 +254,19 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel): if surface_type == 'PAINT': split = layout.split(percentage=0.4) - split.prop(surface, "do_output1", text="Paintmaps:") + split.prop(surface, "use_output_a", text="Paintmaps:") sub = split.row() - sub.active = surface.do_output1 - sub.prop(surface, "output_name", text="") + sub.active = surface.use_output_a + sub.prop(surface, "output_name_a", text="") split = layout.split(percentage=0.4) - split.prop(surface, "do_output2", text="Wetmaps:") + split.prop(surface, "do_output_b", text="Wetmaps:") sub = split.row() - sub.active = surface.do_output2 - sub.prop(surface, "output_name2", text="") + sub.active = surface.do_output_b + sub.prop(surface, "output_name_b", text="") else: col = layout.column() - col.prop(surface, "output_name", text="Filename: ") + col.prop(surface, "output_name_a", text="Filename: ") if surface_type == 'DISPLACE': col.prop(surface, "displace_type", text="Displace Type") col.prop(surface, "depth_clamp") @@ -454,14 +454,14 @@ class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel): col = layout.column() col.active = (brush.velocity_alpha or brush.velocity_color or brush.velocity_depth) - col.prop(brush, "max_velocity") + col.prop(brush, "velocity_max") col.template_color_ramp(brush, "velocity_ramp", expand=True) layout.separator() row = layout.row() - row.prop(brush, "do_smudge") + row.prop(brush, "use_smudge") sub = row.row() - sub.active = brush.do_smudge + sub.active = brush.use_smudge sub.prop(brush, "smudge_strength") |