Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_cursor.c
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| static bool sculpt_get_brush_geometry( | static int sculpt_get_brush_geometry(bContext *C, ViewContext *vc, | ||||
| bContext *C, ViewContext *vc, | int x, int y, int *pixel_radius, | ||||
| int x, int y, int *pixel_radius, | float location[3]) | ||||
| float location[3]) | |||||
| { | { | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| Paint *paint = BKE_paint_get_active_from_context(C); | Paint *paint = BKE_paint_get_active_from_context(C); | ||||
| float mouse[2]; | float mouse[2]; | ||||
| bool hit; | int hit; | ||||
| mouse[0] = x; | mouse[0] = x; | ||||
| mouse[1] = y; | mouse[1] = y; | ||||
| Context not available. | |||||
| * special mode of drawing will go away */ | * special mode of drawing will go away */ | ||||
| if ((mode == PAINT_SCULPT) && vc.obact->sculpt) { | if ((mode == PAINT_SCULPT) && vc.obact->sculpt) { | ||||
| float location[3]; | float location[3]; | ||||
| int pixel_radius; | int pixel_radius, hit; | ||||
| bool hit; | |||||
| /* test if brush is over the mesh */ | /* test if brush is over the mesh */ | ||||
| hit = sculpt_get_brush_geometry(C, &vc, x, y, &pixel_radius, location); | hit = sculpt_get_brush_geometry(C, &vc, x, y, &pixel_radius, location); | ||||
| Context not available. | |||||