diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-20 17:46:48 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-20 17:50:10 +0400 |
commit | f074b67108b8f5759dbc9147d4e0bdc0cb6f3c2a (patch) | |
tree | 9b10bb02e5182323f75e8c3b5ba551e05e4e1078 | |
parent | c8d0d9b383a53aadc704c1619418dea8031c9abf (diff) |
Fix T38267: dynamic paint Use Object Material not working correct in some cases.
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/dynamicpaint.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py index 06c04f25c62..c0ce8c9fcdd 100644 --- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py +++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py @@ -107,7 +107,7 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel): elif md.ui_type == 'BRUSH': brush = md.brush_settings - engine = context.scene.render.engine + use_shading_nodes = context.scene.render.use_shading_nodes if brush is None: layout.operator("dpaint.type_toggle", text="Add Brush").type = 'BRUSH' @@ -122,11 +122,11 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel): col.prop(brush, "paint_wetness", text="Wetness") col = split.column() - if engine == 'BLENDER_RENDER': + if not use_shading_nodes: sub = col.column() sub.active = (brush.paint_source != 'PARTICLE_SYSTEM') sub.prop(brush, "use_material") - if brush.use_material and brush.paint_source != 'PARTICLE_SYSTEM' and engine == 'BLENDER_RENDER': + if brush.use_material and brush.paint_source != 'PARTICLE_SYSTEM' and not use_shading_nodes: col.prop(brush, "material", text="") col.prop(brush, "paint_alpha", text="Alpha Factor") else: diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 5941e8b5703..5938dbec3c1 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -641,7 +641,7 @@ static int surface_getBrushFlags(DynamicPaintSurface *surface, Scene *scene) static int brush_usesMaterial(DynamicPaintBrushSettings *brush, Scene *scene) { - return ((brush->flags & MOD_DPAINT_USE_MATERIAL) && (!strcmp(scene->r.engine, "BLENDER_RENDER"))); + return ((brush->flags & MOD_DPAINT_USE_MATERIAL) && (!BKE_scene_use_new_shading_nodes(scene))); } /* check whether two bounds intersect */ |