Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_scene.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 733 Lines • ▼ Show 20 Lines | static void rna_GPencilInterpolateSettings_type_set(PointerRNA *ptr, int value) | ||||
| settings->type = (char)value; | settings->type = (char)value; | ||||
| /* init custom interpolation curve here now the first time it's used */ | /* init custom interpolation curve here now the first time it's used */ | ||||
| if ((settings->type == GP_IPO_CURVEMAP) && (settings->custom_ipo == NULL)) { | if ((settings->type == GP_IPO_CURVEMAP) && (settings->custom_ipo == NULL)) { | ||||
| settings->custom_ipo = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); | settings->custom_ipo = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); | ||||
| } | } | ||||
| } | } | ||||
| static void rna_Gpencil_mask_point_update(Main *UNUSED(bmain), | |||||
| Scene *UNUSED(scene), | |||||
| PointerRNA *ptr) | |||||
| { | |||||
| ToolSettings *ts = (ToolSettings *)ptr->data; | |||||
| ts->gpencil_selectmode_sculpt &= ~GP_SCULPT_MASK_SELECTMODE_STROKE; | |||||
| ts->gpencil_selectmode_sculpt &= ~GP_SCULPT_MASK_SELECTMODE_SEGMENT; | |||||
| } | |||||
| static void rna_Gpencil_mask_stroke_update(Main *UNUSED(bmain), | |||||
| Scene *UNUSED(scene), | |||||
| PointerRNA *ptr) | |||||
| { | |||||
| ToolSettings *ts = (ToolSettings *)ptr->data; | |||||
| ts->gpencil_selectmode_sculpt &= ~GP_SCULPT_MASK_SELECTMODE_POINT; | |||||
| ts->gpencil_selectmode_sculpt &= ~GP_SCULPT_MASK_SELECTMODE_SEGMENT; | |||||
| } | |||||
| static void rna_Gpencil_mask_segment_update(Main *UNUSED(bmain), | |||||
| Scene *UNUSED(scene), | |||||
| PointerRNA *ptr) | |||||
| { | |||||
| ToolSettings *ts = (ToolSettings *)ptr->data; | |||||
| ts->gpencil_selectmode_sculpt &= ~GP_SCULPT_MASK_SELECTMODE_POINT; | |||||
| ts->gpencil_selectmode_sculpt &= ~GP_SCULPT_MASK_SELECTMODE_STROKE; | |||||
| } | |||||
| /* Read-only Iterator of all the scene objects. */ | /* Read-only Iterator of all the scene objects. */ | ||||
| static void rna_Scene_objects_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) | static void rna_Scene_objects_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) | ||||
| { | { | ||||
| Scene *scene = (Scene *)ptr->data; | Scene *scene = (Scene *)ptr->data; | ||||
| iter->internal.custom = MEM_callocN(sizeof(BLI_Iterator), __func__); | iter->internal.custom = MEM_callocN(sizeof(BLI_Iterator), __func__); | ||||
| ((BLI_Iterator *)iter->internal.custom)->valid = true; | ((BLI_Iterator *)iter->internal.custom)->valid = true; | ||||
| ▲ Show 20 Lines • Show All 2,303 Lines • ▼ Show 20 Lines | static void rna_def_tool_settings(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "use_gpencil_stroke_endpoints", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_gpencil_stroke_endpoints", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna( | RNA_def_property_boolean_sdna( | ||||
| prop, NULL, "gpencil_v3d_align", GP_PROJECT_DEPTH_STROKE_ENDPOINTS); | prop, NULL, "gpencil_v3d_align", GP_PROJECT_DEPTH_STROKE_ENDPOINTS); | ||||
| RNA_def_property_ui_text( | RNA_def_property_ui_text( | ||||
| prop, "Only Endpoints", "Only use the first and last parts of the stroke for snapping"); | prop, "Only Endpoints", "Only use the first and last parts of the stroke for snapping"); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| /* Grease Pencil - Select mode */ | /* Grease Pencil - Select mode Edit */ | ||||
| prop = RNA_def_property(srna, "gpencil_selectmode", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "gpencil_selectmode_edit", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "gpencil_selectmode"); | RNA_def_property_enum_sdna(prop, NULL, "gpencil_selectmode_edit"); | ||||
| RNA_def_property_enum_items(prop, gpencil_selectmode_items); | RNA_def_property_enum_items(prop, gpencil_selectmode_items); | ||||
| RNA_def_property_ui_text(prop, "Select Mode", ""); | RNA_def_property_ui_text(prop, "Select Mode", ""); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| /* Grease Pencil - Select mode Sculpt */ | |||||
| prop = RNA_def_property(srna, "use_gpencil_select_mask_point", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna( | |||||
| prop, NULL, "gpencil_selectmode_sculpt", GP_SCULPT_MASK_SELECTMODE_POINT); | |||||
| RNA_def_property_ui_text(prop, "Selection Mask", "Only sculpt selected stroke points"); | |||||
| RNA_def_property_ui_icon(prop, ICON_GP_SELECT_POINTS, 0); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_Gpencil_mask_point_update"); | |||||
| prop = RNA_def_property(srna, "use_gpencil_select_mask_stroke", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna( | |||||
| prop, NULL, "gpencil_selectmode_sculpt", GP_SCULPT_MASK_SELECTMODE_STROKE); | |||||
| RNA_def_property_ui_text(prop, "Selection Mask", "Only sculpt selected stroke"); | |||||
| RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_Gpencil_mask_stroke_update"); | |||||
| prop = RNA_def_property(srna, "use_gpencil_select_mask_segment", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna( | |||||
| prop, NULL, "gpencil_selectmode_sculpt", GP_SCULPT_MASK_SELECTMODE_SEGMENT); | |||||
| RNA_def_property_ui_text( | |||||
| prop, "Selection Mask", "Only sculpt selected stroke points between other strokes"); | |||||
| RNA_def_property_ui_icon(prop, ICON_GP_SELECT_BETWEEN_STROKES, 0); | |||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_Gpencil_mask_segment_update"); | |||||
| /* Annotations - 2D Views Stroke Placement */ | /* Annotations - 2D Views Stroke Placement */ | ||||
| prop = RNA_def_property(srna, "annotation_stroke_placement_view2d", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "annotation_stroke_placement_view2d", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_v2d_align"); | RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_v2d_align"); | ||||
| RNA_def_property_enum_items(prop, annotation_stroke_placement_items); | RNA_def_property_enum_items(prop, annotation_stroke_placement_items); | ||||
| RNA_def_property_ui_text(prop, "Stroke Placement (2D View)", ""); | RNA_def_property_ui_text(prop, "Stroke Placement (2D View)", ""); | ||||
| RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL); | ||||
| /* Annotations - Sequencer Preview Stroke Placement */ | /* Annotations - Sequencer Preview Stroke Placement */ | ||||
| ▲ Show 20 Lines • Show All 4,510 Lines • Show Last 20 Lines | |||||