Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_brush.c
| Show First 20 Lines • Show All 1,290 Lines • ▼ Show 20 Lines | static void rna_def_gpencil_options(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "curve_jitter", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "curve_jitter", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "curve_jitter"); | RNA_def_property_pointer_sdna(prop, NULL, "curve_jitter"); | ||||
| RNA_def_property_struct_type(prop, "CurveMapping"); | RNA_def_property_struct_type(prop, "CurveMapping"); | ||||
| RNA_def_property_ui_text(prop, "Curve Jitter", "Curve used for the jitter effect"); | RNA_def_property_ui_text(prop, "Curve Jitter", "Curve used for the jitter effect"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| prop = RNA_def_property(srna, "curve_random_pressure", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "curve_rand_pressure"); | |||||
| RNA_def_property_struct_type(prop, "CurveMapping"); | |||||
| RNA_def_property_ui_text(prop, "Random Curve", "Curve used for modulating effect"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "curve_random_strength", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "curve_rand_strength"); | |||||
| RNA_def_property_struct_type(prop, "CurveMapping"); | |||||
| RNA_def_property_ui_text(prop, "Random Curve", "Curve used for modulating effect"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "curve_random_uv", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "curve_rand_uv"); | |||||
| RNA_def_property_struct_type(prop, "CurveMapping"); | |||||
| RNA_def_property_ui_text(prop, "Random Curve", "Curve used for modulating effect"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "curve_random_hue", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "curve_rand_hue"); | |||||
| RNA_def_property_struct_type(prop, "CurveMapping"); | |||||
| RNA_def_property_ui_text(prop, "Random Curve", "Curve used for modulating effect"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "curve_random_saturation", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "curve_rand_saturation"); | |||||
| RNA_def_property_struct_type(prop, "CurveMapping"); | |||||
| RNA_def_property_ui_text(prop, "Random Curve", "Curve used for modulating effect"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "curve_random_value", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_pointer_sdna(prop, NULL, "curve_rand_value"); | |||||
| RNA_def_property_struct_type(prop, "CurveMapping"); | |||||
| RNA_def_property_ui_text(prop, "Random Curve", "Curve used for modulating effect"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| /* fill threshold for transparence */ | /* fill threshold for transparence */ | ||||
| prop = RNA_def_property(srna, "fill_threshold", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "fill_threshold", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_float_sdna(prop, NULL, "fill_threshold"); | RNA_def_property_float_sdna(prop, NULL, "fill_threshold"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Threshold", "Threshold to consider color transparent for filling"); | prop, "Threshold", "Threshold to consider color transparent for filling"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| ▲ Show 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | static void rna_def_gpencil_options(BlenderRNA *brna) | ||||
| /* Vertex Color mix factor. */ | /* Vertex Color mix factor. */ | ||||
| prop = RNA_def_property(srna, "vertex_color_factor", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "vertex_color_factor", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_float_sdna(prop, NULL, "vertex_factor"); | RNA_def_property_float_sdna(prop, NULL, "vertex_factor"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Vertex Color Factor", "Factor used to mix vertex color to get final color"); | prop, "Vertex Color Factor", "Factor used to mix vertex color to get final color"); | ||||
| /* Hue randomness. */ | |||||
| prop = RNA_def_property(srna, "random_hue_factor", PROP_FLOAT, PROP_FACTOR); | |||||
| RNA_def_property_float_sdna(prop, NULL, "random_hue"); | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_float_default(prop, 0.0f); | |||||
| RNA_def_property_ui_text(prop, "Hue", "Random factor to modify original hue"); | |||||
| RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); | |||||
| /* Saturation randomness. */ | |||||
| prop = RNA_def_property(srna, "random_saturation_factor", PROP_FLOAT, PROP_FACTOR); | |||||
| RNA_def_property_float_sdna(prop, NULL, "random_saturation"); | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_float_default(prop, 0.0f); | |||||
| RNA_def_property_ui_text(prop, "Saturation", "Random factor to modify original saturation"); | |||||
| RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); | |||||
| /* Value randomness. */ | |||||
| prop = RNA_def_property(srna, "random_value_factor", PROP_FLOAT, PROP_FACTOR); | |||||
| RNA_def_property_float_sdna(prop, NULL, "random_value"); | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_float_default(prop, 0.0f); | |||||
| RNA_def_property_ui_text(prop, "Value", "Random factor to modify original value"); | |||||
| RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); | |||||
| /* Flags */ | /* Flags */ | ||||
| prop = RNA_def_property(srna, "use_pressure", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pressure", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_PRESSURE); | RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_PRESSURE); | ||||
| RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | ||||
| RNA_def_property_ui_text(prop, "Use Pressure", "Use tablet pressure"); | RNA_def_property_ui_text(prop, "Use Pressure", "Use tablet pressure"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| prop = RNA_def_property(srna, "use_strength_pressure", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_strength_pressure", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_STENGTH_PRESSURE); | RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_STENGTH_PRESSURE); | ||||
| RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Use Pressure Strength", "Use tablet pressure for color strength"); | prop, "Use Pressure Strength", "Use tablet pressure for color strength"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| prop = RNA_def_property(srna, "use_jitter_pressure", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_jitter_pressure", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_JITTER_PRESSURE); | RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_JITTER_PRESSURE); | ||||
| RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | ||||
| RNA_def_property_ui_text(prop, "Use Pressure Jitter", "Use tablet pressure for jitter"); | RNA_def_property_ui_text(prop, "Use Pressure Jitter", "Use tablet pressure for jitter"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| prop = RNA_def_property(srna, "use_stroke_random_hue", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", GP_BRUSH_USE_HUE_AT_STROKE); | |||||
| RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0); | |||||
| RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "use_stroke_random_sat", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", GP_BRUSH_USE_SAT_AT_STROKE); | |||||
| RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0); | |||||
| RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "use_stroke_random_val", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", GP_BRUSH_USE_VAL_AT_STROKE); | |||||
| RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0); | |||||
| RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "use_stroke_random_radius", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", GP_BRUSH_USE_PRESS_AT_STROKE); | |||||
| RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0); | |||||
| RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "use_stroke_random_strength", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", GP_BRUSH_USE_STRENGTH_AT_STROKE); | |||||
| RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0); | |||||
| RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "use_stroke_random_uv", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", GP_BRUSH_USE_UV_AT_STROKE); | |||||
| RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0); | |||||
| RNA_def_property_ui_text(prop, "Stroke Random", "Use randomness at stroke level"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "use_random_press_hue", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", GP_BRUSH_USE_HUE_RAND_PRESS); | |||||
| RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | |||||
| RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "use_random_press_sat", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", GP_BRUSH_USE_SAT_RAND_PRESS); | |||||
| RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | |||||
| RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "use_random_press_val", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", GP_BRUSH_USE_VAL_RAND_PRESS); | |||||
| RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | |||||
| RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "use_random_press_radius", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", GP_BRUSH_USE_PRESSURE_RAND_PRESS); | |||||
| RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | |||||
| RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "use_random_press_strength", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", GP_BRUSH_USE_STRENGTH_RAND_PRESS); | |||||
| RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | |||||
| RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "use_random_press_uv", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", GP_BRUSH_USE_UV_RAND_PRESS); | |||||
| RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | |||||
| RNA_def_property_ui_text(prop, "Use Pressure", "Use pressure to modulate randomness"); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | |||||
| prop = RNA_def_property(srna, "use_settings_stabilizer", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_settings_stabilizer", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_STABILIZE_MOUSE); | RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_STABILIZE_MOUSE); | ||||
| RNA_def_property_boolean_default(prop, true); | RNA_def_property_boolean_default(prop, true); | ||||
| RNA_def_property_ui_text(prop, | RNA_def_property_ui_text(prop, | ||||
| "Use Stabilizer", | "Use Stabilizer", | ||||
| "Draw lines with a delay to allow smooth strokes. Press Shift key to " | "Draw lines with a delay to allow smooth strokes. Press Shift key to " | ||||
| "override while drawing"); | "override while drawing"); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| ▲ Show 20 Lines • Show All 1,422 Lines • Show Last 20 Lines | |||||