Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_curve.c
| Show First 20 Lines • Show All 1,251 Lines • ▼ Show 20 Lines | static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS); | ||||
| 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); | ||||
| #if 0 | #if 0 | ||||
| func = RNA_def_function(srna, "remove", "rna_Curve_spline_remove"); | func = RNA_def_function(srna, "remove", "rna_Curve_spline_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a spline from a curve"); | RNA_def_function_ui_description(func, "Remove a spline from a curve"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove"); | parm = RNA_def_pointer(func, "spline", "Spline", "", "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); | ||||
| #endif | #endif | ||||
| } | } | ||||
| static void rna_def_curve_spline_bezpoints(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_curve_spline_bezpoints(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| /*PropertyRNA *prop; */ | /*PropertyRNA *prop; */ | ||||
| Show All 10 Lines | static void rna_def_curve_spline_bezpoints(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS); | ||||
| 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); | ||||
| #if 0 | #if 0 | ||||
| func = RNA_def_function(srna, "remove", "rna_Curve_spline_remove"); | func = RNA_def_function(srna, "remove", "rna_Curve_spline_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a spline from a curve"); | RNA_def_function_ui_description(func, "Remove a spline from a curve"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove"); | parm = RNA_def_pointer(func, "spline", "Spline", "", "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); | ||||
| #endif | #endif | ||||
| } | } | ||||
| /* curve.splines */ | /* curve.splines */ | ||||
| static void rna_def_curve_splines(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_curve_splines(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| RNA_def_property_srna(cprop, "CurveSplines"); | RNA_def_property_srna(cprop, "CurveSplines"); | ||||
| srna = RNA_def_struct(brna, "CurveSplines", NULL); | srna = RNA_def_struct(brna, "CurveSplines", NULL); | ||||
| RNA_def_struct_sdna(srna, "Curve"); | RNA_def_struct_sdna(srna, "Curve"); | ||||
| RNA_def_struct_ui_text(srna, "Curve Splines", "Collection of curve splines"); | RNA_def_struct_ui_text(srna, "Curve Splines", "Collection of curve splines"); | ||||
| func = RNA_def_function(srna, "new", "rna_Curve_spline_new"); | func = RNA_def_function(srna, "new", "rna_Curve_spline_new"); | ||||
| RNA_def_function_ui_description(func, "Add a new spline to the curve"); | RNA_def_function_ui_description(func, "Add a new spline to the curve"); | ||||
| parm = RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline"); | parm = RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline"); | parm = RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Curve_spline_remove"); | func = RNA_def_function(srna, "remove", "rna_Curve_spline_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a spline from a curve"); | RNA_def_function_ui_description(func, "Remove a spline from a curve"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove"); | parm = RNA_def_pointer(func, "spline", "Spline", "", "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); | ||||
| func = RNA_def_function(srna, "clear", "rna_Curve_spline_clear"); | func = RNA_def_function(srna, "clear", "rna_Curve_spline_clear"); | ||||
| RNA_def_function_ui_description(func, "Remove all splines from a curve"); | RNA_def_function_ui_description(func, "Remove all splines from a curve"); | ||||
| 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, "Spline"); | RNA_def_property_struct_type(prop, "Spline"); | ||||
| RNA_def_property_pointer_funcs(prop, "rna_Curve_active_spline_get", "rna_Curve_active_spline_set", NULL, NULL); | RNA_def_property_pointer_funcs(prop, "rna_Curve_active_spline_get", "rna_Curve_active_spline_set", NULL, NULL); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | RNA_def_property_flag(prop, PROP_EDITABLE); | ||||
| ▲ Show 20 Lines • Show All 449 Lines • Show Last 20 Lines | |||||