diff options
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image.c | 3 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_image_proj.c | 3 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 9850b2c93f0..7ea1cac045c 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -765,7 +765,8 @@ static PaintOperation *texture_paint_init(bContext *C, wmOperator *op, const flo /* initialize from context */ if (CTX_wm_region_view3d(C)) { - Object *ob = OBACT; + SceneLayer *sl = CTX_data_scene_layer(C); + Object *ob = OBACT_NEW; bool uvs, mat, tex, stencil; if (!BKE_paint_proj_mesh_data_check(scene, ob, &uvs, &mat, &tex, &stencil)) { BKE_paint_data_warning(op->reports, uvs, mat, tex, stencil); diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index f5d115442c6..4fe7f89d9bc 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -5305,11 +5305,12 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op) { Image *image = BLI_findlink(&CTX_data_main(C)->image, RNA_enum_get(op->ptr, "image")); Scene *scene = CTX_data_scene(C); + SceneLayer *sl = CTX_data_scene_layer(C); ProjPaintState ps = {NULL}; int orig_brush_size; IDProperty *idgroup; IDProperty *view_data = NULL; - Object *ob = OBACT; + Object *ob = OBACT_NEW; bool uvs, mat, tex; if (ob == NULL || ob->type != OB_MESH) { diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 62161d83c59..756536f3db2 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -442,7 +442,8 @@ void paint_sample_color(bContext *C, ARegion *ar, int x, int y, bool texpaint_pr if (CTX_wm_view3d(C) && texpaint_proj) { /* first try getting a colour directly from the mesh faces if possible */ - Object *ob = OBACT; + SceneLayer *sl = CTX_data_scene_layer(C); + Object *ob = OBACT_NEW; bool sample_success = false; ImagePaintSettings *imapaint = &scene->toolsettings->imapaint; bool use_material = (imapaint->mode == IMAGEPAINT_MODE_MATERIAL); |