From 79ef35889f850aa7173800bcf67918c14f3b1291 Mon Sep 17 00:00:00 2001 From: Miika Hamalainen Date: Mon, 5 Sep 2011 16:04:15 +0000 Subject: Dynamic Paint: * Added "Initial Color" setting for surfaces. You can for example set color from UV mapped texture or from vertex colors. * Added clamping option for "wave" brushes. * Merged smudge and drip adjacency search code. This fixes some issues with drip effect and makes code easier to maintain. * Some adjustments to the bounding box generation code. * OpenMP is now completely disabled if no compile flag is set. * Wetness values are now properly clamped on vertex surfaces. No more black dots on >1.0 wetness. * Textured brushes now use same function calls as internal renderer, instead of modified duplicates. * Moved operator code to editors/physics/. * Re-enabled some particle brush optimizations. * Fixed sometimes incorrect volume brush influence. * Fixed possible crash when using a brush that uses "Voxel Data" texture simultaneously with material preview or render. * Fixed texture mapping issues for "Object Center" brush. * Fixed possible crash/corruption when duplicating brush object that uses color ramps. * Other tweaking and code cleanup. --- .../bl_ui/properties_physics_dynamicpaint.py | 40 ++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) (limited to 'release/scripts') diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py index 7d02765297d..88cfc2afbda 100644 --- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py +++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py @@ -117,8 +117,11 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, bpy.types.Panel): elif (brush.brush_settings_context == "WAVE"): layout.prop(brush, "wave_type") if (brush.wave_type != "REFLECT"): - split = layout.split(percentage=0.6) - split.prop(brush, "wave_factor") + split = layout.split(percentage=0.5) + col = split.column() + col.prop(brush, "wave_factor") + col = split.column() + col.prop(brush, "wave_clamp") elif (brush.brush_settings_context == "VELOCITY"): col = layout.row().column() col.label(text="Velocity Settings:") @@ -199,6 +202,39 @@ class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, bpy.types.Panel): layout.label(text="Brush Group:") layout.prop(surface, "brush_group", text="") +class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, bpy.types.Panel): + bl_label = "Dynamic Paint: Initial Color" + bl_options = {'DEFAULT_CLOSED'} + + @classmethod + def poll(cls, context): + md = context.dynamic_paint + if (not (md and (md.ui_type == "CANVAS") and (md.canvas_settings))): + return 0 + surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active + return (surface and surface.surface_type=="PAINT") + + def draw(self, context): + layout = self.layout + + canvas = context.dynamic_paint.canvas_settings + surface = canvas.canvas_surfaces.active + ob = context.object + + layout.prop(surface, "init_color_type", expand=False) + layout.separator() + + # dissolve + if (surface.init_color_type == "COLOR"): + layout.prop(surface, "init_color") + + if (surface.init_color_type == "TEXTURE"): + layout.prop(surface, "init_texture") + layout.prop_search(surface, "init_layername", ob.data, "uv_textures", text="UV Layer:") + + if (surface.init_color_type == "VERTEXCOLOR"): + layout.prop_search(surface, "init_layername", ob.data, "vertex_colors", text="Color Layer: ") + class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, bpy.types.Panel): bl_label = "Dynamic Paint: Output" -- cgit v1.2.3