Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/brush.c
| Show First 20 Lines • Show All 1,524 Lines • ▼ Show 20 Lines | void BKE_brush_curve_preset(Brush *b, eCurveMappingPreset preset) | ||||
| cumap->flag &= ~CUMA_EXTEND_EXTRAPOLATE; | cumap->flag &= ~CUMA_EXTEND_EXTRAPOLATE; | ||||
| cumap->preset = preset; | cumap->preset = preset; | ||||
| cuma = b->curve->cm; | cuma = b->curve->cm; | ||||
| BKE_curvemap_reset(cuma, &cumap->clipr, cumap->preset, CURVEMAP_SLOPE_NEGATIVE); | BKE_curvemap_reset(cuma, &cumap->clipr, cumap->preset, CURVEMAP_SLOPE_NEGATIVE); | ||||
| BKE_curvemapping_changed(cumap, false); | BKE_curvemapping_changed(cumap, false); | ||||
| } | } | ||||
| float BKE_brush_filter_sample_tex_3d(const MTex *mtex, | |||||
| const float point[3], | |||||
| float rgba[4], | |||||
| const int thread, | |||||
| struct ImagePool *pool) | |||||
| { | |||||
| float intensity = 1.0; | |||||
| if (!mtex->tex) { | |||||
| intensity = 1; | |||||
| } | |||||
| externtex( | |||||
| mtex, point, &intensity, rgba, rgba + 1, rgba + 2, rgba + 3, thread, pool, false, false); | |||||
| return intensity; | |||||
| } | |||||
| /* 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, | ||||
| const float point[3], | const float point[3], | ||||
| float rgba[4], | float rgba[4], | ||||
| ▲ Show 20 Lines • Show All 590 Lines • Show Last 20 Lines | |||||