Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_stroke.c
| Context not available. | |||||
| #include <float.h> | #include <float.h> | ||||
| #include <math.h> | #include <math.h> | ||||
| // #define DEBUG_TIME | |||||
| #ifdef DEBUG_TIME | |||||
| # include "PIL_time_utildefines.h" | |||||
| #endif | |||||
| typedef struct PaintSample { | typedef struct PaintSample { | ||||
| float mouse[2]; | float mouse[2]; | ||||
| float pressure; | float pressure; | ||||
| Context not available. | |||||
| static bool paint_stroke_curve_end(bContext *C, wmOperator *op, PaintStroke *stroke) | static bool paint_stroke_curve_end(bContext *C, wmOperator *op, PaintStroke *stroke) | ||||
| { | { | ||||
| Brush *br = stroke->brush; | Brush *br = stroke->brush; | ||||
| if (br->flag & BRUSH_CURVE) { | if (br->flag & BRUSH_CURVE) { | ||||
| const Scene *scene = CTX_data_scene(C); | const Scene *scene = CTX_data_scene(C); | ||||
| const float spacing = paint_space_stroke_spacing(scene, stroke, 1.0f, 1.0f); | const float spacing = paint_space_stroke_spacing(scene, stroke, 1.0f, 1.0f); | ||||
| Context not available. | |||||
| if (!pc) | if (!pc) | ||||
| return true; | return true; | ||||
| #ifdef DEBUG_TIME | |||||
| TIMEIT_START(stroke); | |||||
| #endif | |||||
| pcp = pc->points; | pcp = pc->points; | ||||
| stroke->ups->overlap_factor = paint_stroke_integrate_overlap(br, 1.0); | stroke->ups->overlap_factor = paint_stroke_integrate_overlap(br, 1.0); | ||||
| Context not available. | |||||
| } | } | ||||
| stroke_done(C, op); | stroke_done(C, op); | ||||
| #ifdef DEBUG_TIME | |||||
| TIMEIT_END(stroke); | |||||
| #endif | |||||
| return true; | return true; | ||||
| } | } | ||||
| Context not available. | |||||