[Bf-blender-cvs] [a77b46f] master: Do not add add/remove textures in texpaint if renderer is not blender internal.
Antony Riakiotakis
noreply at git.blender.org
Wed Aug 27 18:16:58 CEST 2014
Commit: a77b46fbe6c04dc9369a83dda465da4d511cd10d
Author: Antony Riakiotakis
Date: Wed Aug 27 18:16:50 2014 +0200
Branches: master
https://developer.blender.org/rBa77b46fbe6c04dc9369a83dda465da4d511cd10d
Do not add add/remove textures in texpaint if renderer is not blender
internal.
===================================================================
M source/blender/editors/sculpt_paint/paint_image_proj.c
===================================================================
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 14e1ec5..11501d1 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4826,7 +4826,7 @@ bool proj_paint_add_slot(bContext *C, Material *ma, wmOperator *op)
{
Object *ob = CTX_data_active_object(C);
Scene *scene = CTX_data_scene(C);
- bool use_nodes = BKE_scene_use_new_shading_nodes(scene);
+ bool is_blender_internal = BKE_scene_uses_blender_internal(scene);
if (!ob)
return false;
@@ -4836,7 +4836,7 @@ bool proj_paint_add_slot(bContext *C, Material *ma, wmOperator *op)
if (ma) {
- if (use_nodes || ma->use_nodes) {
+ if (!is_blender_internal || ma->use_nodes) {
/* not supported for now */
}
else {
@@ -4970,12 +4970,12 @@ static int texture_paint_delete_texture_paint_slot_exec(bContext *C, wmOperator
Object *ob = CTX_data_active_object(C);
Scene *scene = CTX_data_scene(C);
Material *ma;
- bool use_nodes = BKE_scene_use_new_shading_nodes(scene);
+ bool is_blender_internal = BKE_scene_uses_blender_internal(scene);
TexPaintSlot *slot;
int i;
/* not supported for node-based engines */
- if (!ob || use_nodes)
+ if (!ob || !is_blender_internal)
return OPERATOR_CANCELLED;
ma = give_current_material(ob, ob->actcol);
More information about the Bf-blender-cvs
mailing list