Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/brush.c
| Show First 20 Lines • Show All 1,063 Lines • ▼ Show 20 Lines | void BKE_brush_sculpt_reset(Brush *br) | ||||
| } | } | ||||
| } | } | ||||
| /** | /** | ||||
| * Library Operations | * Library Operations | ||||
| */ | */ | ||||
| void BKE_brush_curve_preset(Brush *b, eCurveMappingPreset preset) | void BKE_brush_curve_preset(Brush *b, eCurveMappingPreset preset) | ||||
| { | { | ||||
| CurveMap *cm = NULL; | CurveMapping *cumap = NULL; | ||||
| CurveMap *cuma = NULL; | |||||
| if (!b->curve) { | if (!b->curve) { | ||||
| b->curve = BKE_curvemapping_add(1, 0, 0, 1, 1); | b->curve = BKE_curvemapping_add(1, 0, 0, 1, 1); | ||||
| } | } | ||||
| cumap = b->curve; | |||||
| cm = b->curve->cm; | cumap->flag &= ~CUMA_EXTEND_EXTRAPOLATE; | ||||
| cm->flag &= ~CUMA_EXTEND_EXTRAPOLATE; | cumap->preset = preset; | ||||
| b->curve->preset = preset; | cuma = b->curve->cm; | ||||
| BKE_curvemap_reset(cm, &b->curve->clipr, b->curve->preset, CURVEMAP_SLOPE_NEGATIVE); | BKE_curvemap_reset(cuma, &cumap->clipr, cumap->preset, CURVEMAP_SLOPE_NEGATIVE); | ||||
| BKE_curvemapping_changed(b->curve, false); | BKE_curvemapping_changed(cumap, false); | ||||
| } | } | ||||
| /* Generic texture sampler for 3D painting systems. point has to be either in | /* Generic texture sampler for 3D painting systems. point has to be either in | ||||
| * region space mouse coordinates, or 3d world coordinates for 3D mapping. | * region space mouse coordinates, or 3d world coordinates for 3D mapping. | ||||
| * | * | ||||
| * rgba outputs straight alpha. */ | * rgba outputs straight alpha. */ | ||||
| float BKE_brush_sample_tex_3d(const Scene *scene, | float BKE_brush_sample_tex_3d(const Scene *scene, | ||||
| const Brush *br, | const Brush *br, | ||||
| ▲ Show 20 Lines • Show All 597 Lines • Show Last 20 Lines | |||||