Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_brush.c
| Show All 10 Lines | |||||
| #include "DNA_material_types.h" | #include "DNA_material_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "DNA_texture_types.h" | #include "DNA_texture_types.h" | ||||
| #include "DNA_workspace_types.h" | #include "DNA_workspace_types.h" | ||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLT_translation.h" | |||||
| #include "RNA_define.h" | #include "RNA_define.h" | ||||
| #include "RNA_enum_types.h" | #include "RNA_enum_types.h" | ||||
| #include "rna_internal.h" | #include "rna_internal.h" | ||||
| #include "IMB_imbuf.h" | #include "IMB_imbuf.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| ▲ Show 20 Lines • Show All 1,292 Lines • ▼ Show 20 Lines | static void rna_def_gpencil_options(BlenderRNA *brna) | ||||
| 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); | ||||
| /* Jitter factor for new strokes */ | /* Jitter factor for new strokes */ | ||||
| prop = RNA_def_property(srna, "pen_jitter", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "pen_jitter", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_float_sdna(prop, NULL, "draw_jitter"); | RNA_def_property_float_sdna(prop, NULL, "draw_jitter"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_ui_text(prop, "Jitter", "Jitter factor for new strokes"); | RNA_def_property_ui_text(prop, "Jitter", "Jitter factor for new strokes"); | ||||
| RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_BRUSH); | |||||
| 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); | ||||
| /* Randomness factor for pressure */ | /* Randomness factor for pressure */ | ||||
| prop = RNA_def_property(srna, "random_pressure", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "random_pressure", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_float_sdna(prop, NULL, "draw_random_press"); | RNA_def_property_float_sdna(prop, NULL, "draw_random_press"); | ||||
| 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( | ||||
| ▲ Show 20 Lines • Show All 1,266 Lines • ▼ Show 20 Lines | static void rna_def_brush(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Unprojected Radius", "Radius of brush in Blender units"); | RNA_def_property_ui_text(prop, "Unprojected Radius", "Radius of brush in Blender units"); | ||||
| RNA_def_property_update(prop, 0, "rna_Brush_size_update"); | RNA_def_property_update(prop, 0, "rna_Brush_size_update"); | ||||
| prop = RNA_def_property(srna, "jitter", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "jitter", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "jitter"); | RNA_def_property_float_sdna(prop, NULL, "jitter"); | ||||
| RNA_def_property_range(prop, 0.0f, 1000.0f); | RNA_def_property_range(prop, 0.0f, 1000.0f); | ||||
| RNA_def_property_ui_range(prop, 0.0f, 2.0f, 0.1, 4); | RNA_def_property_ui_range(prop, 0.0f, 2.0f, 0.1, 4); | ||||
| RNA_def_property_ui_text(prop, "Jitter", "Jitter the position of the brush while painting"); | RNA_def_property_ui_text(prop, "Jitter", "Jitter the position of the brush while painting"); | ||||
| RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_BRUSH); | |||||
| RNA_def_property_update(prop, 0, "rna_Brush_update"); | RNA_def_property_update(prop, 0, "rna_Brush_update"); | ||||
| prop = RNA_def_property(srna, "jitter_absolute", PROP_INT, PROP_PIXEL); | prop = RNA_def_property(srna, "jitter_absolute", PROP_INT, PROP_PIXEL); | ||||
| RNA_def_property_int_sdna(prop, NULL, "jitter_absolute"); | RNA_def_property_int_sdna(prop, NULL, "jitter_absolute"); | ||||
| RNA_def_property_range(prop, 0, 1000000); | RNA_def_property_range(prop, 0, 1000000); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Jitter", "Jitter the position of the brush in pixels while painting"); | prop, "Jitter", "Jitter the position of the brush in pixels while painting"); | ||||
| RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_BRUSH); | |||||
| RNA_def_property_update(prop, 0, "rna_Brush_update"); | RNA_def_property_update(prop, 0, "rna_Brush_update"); | ||||
| prop = RNA_def_property(srna, "spacing", PROP_INT, PROP_PERCENTAGE); | prop = RNA_def_property(srna, "spacing", PROP_INT, PROP_PERCENTAGE); | ||||
| RNA_def_property_int_sdna(prop, NULL, "spacing"); | RNA_def_property_int_sdna(prop, NULL, "spacing"); | ||||
| RNA_def_property_range(prop, 1, 1000); | RNA_def_property_range(prop, 1, 1000); | ||||
| RNA_def_property_ui_range(prop, 1, 500, 5, -1); | RNA_def_property_ui_range(prop, 1, 500, 5, -1); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Spacing", "Spacing between brush daubs as a percentage of brush diameter"); | prop, "Spacing", "Spacing between brush daubs as a percentage of brush diameter"); | ||||
| ▲ Show 20 Lines • Show All 1,110 Lines • Show Last 20 Lines | |||||