Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_image_proj.c
| Show First 20 Lines • Show All 4,408 Lines • ▼ Show 20 Lines | static int texture_paint_camera_project_exec(bContext *C, wmOperator *op) | ||||
| orig_brush_size = BKE_brush_size_get(scene, ps.brush); | orig_brush_size = BKE_brush_size_get(scene, ps.brush); | ||||
| BKE_brush_size_set(scene, ps.brush, 32); /* cover the whole image */ | BKE_brush_size_set(scene, ps.brush, 32); /* cover the whole image */ | ||||
| ps.tool = PAINT_TOOL_DRAW; /* so pixels are initialized with minimal info */ | ps.tool = PAINT_TOOL_DRAW; /* so pixels are initialized with minimal info */ | ||||
| scene->toolsettings->imapaint.flag |= IMAGEPAINT_DRAWING; | scene->toolsettings->imapaint.flag |= IMAGEPAINT_DRAWING; | ||||
| ED_undo_paint_push_begin(UNDO_PAINT_IMAGE, op->type->name, | ED_undo_paint_push_begin(UNDO_PAINT_IMAGE, op->type->name, | ||||
| ED_image_undo_restore, ED_image_undo_free); | ED_image_undo_restore, ED_image_undo_free, NULL); | ||||
| /* allocate and initialize spatial data structures */ | /* allocate and initialize spatial data structures */ | ||||
| project_paint_begin(&ps); | project_paint_begin(&ps); | ||||
| if (ps.dm == NULL) { | if (ps.dm == NULL) { | ||||
| BKE_brush_size_set(scene, ps.brush, orig_brush_size); | BKE_brush_size_set(scene, ps.brush, orig_brush_size); | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 123 Lines • Show Last 20 Lines | |||||