Cleanup: Add comments for Brush.curve_preset and corresponding enum

Pull Request: https://projects.blender.org/blender/blender/pulls/146200
This commit is contained in:
Sean Kim
2025-10-16 00:33:12 +02:00
committed by Sean Kim
parent eae3eabf53
commit ff44764fff
2 changed files with 15 additions and 0 deletions

View File

@@ -173,16 +173,26 @@ typedef enum eGP_BrushMode {
GP_BRUSH_MODE_VERTEXCOLOR = 2,
} eGP_BrushMode;
/* Brush.curve_preset */
typedef enum eBrushCurvePreset {
BRUSH_CURVE_CUSTOM = 0,
/** Corresponds to CURVE_PRESET_SMOOTH */
BRUSH_CURVE_SMOOTH = 1,
/** Corresponds to CURVE_PRESET_ROUND */
BRUSH_CURVE_SPHERE = 2,
/** Corresponds to CURVE_PRESET_ROOT */
BRUSH_CURVE_ROOT = 3,
/** Corresponds to CURVE_PRESET_SHARP */
BRUSH_CURVE_SHARP = 4,
/** Corresponds to CURVE_PRESET_LINE */
BRUSH_CURVE_LIN = 5,
/** No corresponding CurveMapping.preset */
BRUSH_CURVE_POW4 = 6,
/** No corresponding CurveMapping.preset */
BRUSH_CURVE_INVSQUARE = 7,
/** Corresponds to CURVE_PRESET_MAX */
BRUSH_CURVE_CONSTANT = 8,
/** No corresponding CurveMapping.preset */
BRUSH_CURVE_SMOOTHER = 9,
} eBrushCurvePreset;

View File

@@ -330,6 +330,11 @@ typedef struct Brush {
float texture_sample_bias;
/**
* This preset is used to specify an exact function used for the distance falloff instead
* of doing a Bezier spline evaluation via CurveMapping for performance reasons.
* \see #eBrushCurvePreset and #eCurveMappingPreset
*/
int curve_distance_falloff_preset;
/* Maximum distance to search fake neighbors from a vertex. */