Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_mask.c
| Show First 20 Lines • Show All 772 Lines • ▼ Show 20 Lines | static void rna_def_mask_splines(BlenderRNA *brna) | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| /* Remove the spline */ | /* Remove the spline */ | ||||
| func = RNA_def_function(srna, "remove", "rna_MaskLayer_spline_remove"); | func = RNA_def_function(srna, "remove", "rna_MaskLayer_spline_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID); | RNA_def_function_flag(func, FUNC_USE_SELF_ID); | ||||
| RNA_def_function_ui_description(func, "Remove a spline from a layer"); | RNA_def_function_ui_description(func, "Remove a spline from a layer"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "spline", "MaskSpline", "", "The spline to remove"); | parm = RNA_def_pointer(func, "spline", "MaskSpline", "", "The spline to remove"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); | RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | ||||
| /* active spline */ | /* active spline */ | ||||
| prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_struct_type(prop, "MaskSpline"); | RNA_def_property_struct_type(prop, "MaskSpline"); | ||||
| RNA_def_property_pointer_funcs(prop, "rna_MaskLayer_active_spline_get", "rna_MaskLayer_active_spline_set", NULL, NULL); | RNA_def_property_pointer_funcs(prop, "rna_MaskLayer_active_spline_get", "rna_MaskLayer_active_spline_set", NULL, NULL); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); | RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); | ||||
| RNA_def_property_ui_text(prop, "Active Spline", "Active spline of masking layer"); | RNA_def_property_ui_text(prop, "Active Spline", "Active spline of masking layer"); | ||||
| Show All 22 Lines | static void rna_def_maskSplinePoints(BlenderRNA *brna) | ||||
| RNA_def_int(func, "count", 1, 0, INT_MAX, "Number", "Number of points to add to the spline", 0, INT_MAX); | RNA_def_int(func, "count", 1, 0, INT_MAX, "Number", "Number of points to add to the spline", 0, INT_MAX); | ||||
| /* Remove the point */ | /* Remove the point */ | ||||
| func = RNA_def_function(srna, "remove", "rna_MaskSpline_point_remove"); | func = RNA_def_function(srna, "remove", "rna_MaskSpline_point_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID); | RNA_def_function_flag(func, FUNC_USE_SELF_ID); | ||||
| RNA_def_function_ui_description(func, "Remove a point from a spline"); | RNA_def_function_ui_description(func, "Remove a point from a spline"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "point", "MaskSplinePoint", "", "The point to remove"); | parm = RNA_def_pointer(func, "point", "MaskSplinePoint", "", "The point to remove"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); | RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | ||||
| } | } | ||||
| static void rna_def_maskSpline(BlenderRNA *brna) | static void rna_def_maskSpline(BlenderRNA *brna) | ||||
| { | { | ||||
| static EnumPropertyItem spline_interpolation_items[] = { | static EnumPropertyItem spline_interpolation_items[] = { | ||||
| {MASK_SPLINE_INTERP_LINEAR, "LINEAR", 0, "Linear", ""}, | {MASK_SPLINE_INTERP_LINEAR, "LINEAR", 0, "Linear", ""}, | ||||
| {MASK_SPLINE_INTERP_EASE, "EASE", 0, "Ease", ""}, | {MASK_SPLINE_INTERP_EASE, "EASE", 0, "Ease", ""}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| ▲ Show 20 Lines • Show All 178 Lines • ▼ Show 20 Lines | static void rna_def_masklayers(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| RNA_def_string(func, "name", NULL, 0, "Name", "Name of new layer"); | RNA_def_string(func, "name", NULL, 0, "Name", "Name of new layer"); | ||||
| parm = RNA_def_pointer(func, "layer", "MaskLayer", "", "New mask layer"); | parm = RNA_def_pointer(func, "layer", "MaskLayer", "", "New mask layer"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Mask_layers_remove"); | func = RNA_def_function(srna, "remove", "rna_Mask_layers_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove layer from this mask"); | RNA_def_function_ui_description(func, "Remove layer from this mask"); | ||||
| parm = RNA_def_pointer(func, "layer", "MaskLayer", "", "Shape to be removed"); | parm = RNA_def_pointer(func, "layer", "MaskLayer", "", "Shape to be removed"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); | ||||
| RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); | RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0); | ||||
| /* clear all layers */ | /* clear all layers */ | ||||
| func = RNA_def_function(srna, "clear", "rna_Mask_layers_clear"); | func = RNA_def_function(srna, "clear", "rna_Mask_layers_clear"); | ||||
| RNA_def_function_ui_description(func, "Remove all mask layers"); | RNA_def_function_ui_description(func, "Remove all mask layers"); | ||||
| /* active layer */ | /* active layer */ | ||||
| prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_struct_type(prop, "MaskLayer"); | RNA_def_property_struct_type(prop, "MaskLayer"); | ||||
| ▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines | |||||