Do not add add/remove textures in texpaint if renderer is not blender
internal.
This commit is contained in:
parent
fa6080bf33
commit
a77b46fbe6
Notes:
blender-bot
2023-02-14 10:54:29 +01:00
Referenced by issue #41631, Join bmesh operator connects to unrelated vert
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue