Merge branch 'master' into blender2.8
authorPhilipp Oeser <info@graphics-engineer.com>
Mon, 11 Jun 2018 07:34:04 +0000 (09:34 +0200)
committerPhilipp Oeser <info@graphics-engineer.com>
Mon, 11 Jun 2018 07:34:04 +0000 (09:34 +0200)
source/blender/editors/sculpt_paint/paint_image_proj.c

index 32355d41ada4fcd637dbfb089f7e9e7d2e0dcd0a..aa38df71ded5b9653251ce3ff6db5eea10944942 100644 (file)
@@ -86,6 +86,7 @@
 
 #include "UI_interface.h"
 
+#include "ED_object.h"
 #include "ED_mesh.h"
 #include "ED_node.h"
 #include "ED_paint.h"
@@ -5661,7 +5662,7 @@ static Image *proj_paint_image_create(wmOperator *op, Main *bmain)
 
 static bool proj_paint_add_slot(bContext *C, wmOperator *op)
 {
-       Object *ob = CTX_data_active_object(C);
+       Object *ob = ED_object_active_context(C);
        Scene *scene = CTX_data_scene(C);
        Material *ma;
        Image *ima = NULL;
@@ -5726,7 +5727,7 @@ static int texture_paint_add_texture_paint_slot_invoke(bContext *C, wmOperator *
 {
        char imagename[MAX_ID_NAME - 2];
        Main *bmain = CTX_data_main(C);
-       Object *ob = CTX_data_active_object(C);
+       Object *ob = ED_object_active_context(C);
        Material *ma = give_current_material(ob, ob->actcol);
        int type = RNA_enum_get(op->ptr, "type");