Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_image.c
| Show First 20 Lines • Show All 759 Lines • ▼ Show 20 Lines | static PaintOperation *texture_paint_init(bContext *C, wmOperator *op, const float mouse[2]) | ||||
| int mode = RNA_enum_get(op->ptr, "mode"); | int mode = RNA_enum_get(op->ptr, "mode"); | ||||
| view3d_set_viewcontext(C, &pop->vc); | view3d_set_viewcontext(C, &pop->vc); | ||||
| copy_v2_v2(pop->prevmouse, mouse); | copy_v2_v2(pop->prevmouse, mouse); | ||||
| copy_v2_v2(pop->startmouse, mouse); | copy_v2_v2(pop->startmouse, mouse); | ||||
| /* initialize from context */ | /* initialize from context */ | ||||
| if (CTX_wm_region_view3d(C)) { | if (CTX_wm_region_view3d(C)) { | ||||
| SceneLayer *sl = CTX_data_scene_layer(C); | ViewLayer *sl = CTX_data_view_layer(C); | ||||
| Object *ob = OBACT(sl); | Object *ob = OBACT(sl); | ||||
| bool uvs, mat, tex, stencil; | bool uvs, mat, tex, stencil; | ||||
| if (!BKE_paint_proj_mesh_data_check(scene, ob, &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); | BKE_paint_data_warning(op->reports, uvs, mat, tex, stencil); | ||||
| MEM_freeN(pop); | MEM_freeN(pop); | ||||
| WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, NULL); | WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, NULL); | ||||
| return NULL; | return NULL; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 798 Lines • Show Last 20 Lines | |||||