Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_nla.c
| Show First 20 Lines • Show All 502 Lines • ▼ Show 20 Lines | static void rna_def_strip_fcurves(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| RNA_def_struct_ui_text(srna, "NLA-Strip F-Curves", "Collection of NLA strip F-Curves"); | RNA_def_struct_ui_text(srna, "NLA-Strip F-Curves", "Collection of NLA strip F-Curves"); | ||||
| /* Strip.fcurves.find(...) */ | /* Strip.fcurves.find(...) */ | ||||
| func = RNA_def_function(srna, "find", "rna_NlaStrip_fcurve_find"); | func = RNA_def_function(srna, "find", "rna_NlaStrip_fcurve_find"); | ||||
| RNA_def_function_ui_description(func, "Find an F-Curve. Note that this function performs a linear scan " | RNA_def_function_ui_description(func, "Find an F-Curve. Note that this function performs a linear scan " | ||||
| "of all F-Curves in the NLA strip."); | "of all F-Curves in the NLA strip."); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_string(func, "data_path", NULL, 0, "Data Path", "F-Curve data path"); | parm = RNA_def_string(func, "data_path", NULL, 0, "Data Path", "F-Curve data path"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Array index", 0, INT_MAX); | RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Array index", 0, INT_MAX); | ||||
| parm = RNA_def_pointer(func, "fcurve", "FCurve", "", "The found F-Curve, or None if it doesn't exist"); | parm = RNA_def_pointer(func, "fcurve", "FCurve", "", "The found F-Curve, or None if it doesn't exist"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| } | } | ||||
| static void rna_def_nlastrip(BlenderRNA *brna) | static void rna_def_nlastrip(BlenderRNA *brna) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 208 Lines • ▼ Show 20 Lines | static void rna_api_nlatrack_strips(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| srna = RNA_def_struct(brna, "NlaStrips", NULL); | srna = RNA_def_struct(brna, "NlaStrips", NULL); | ||||
| RNA_def_struct_sdna(srna, "NlaTrack"); | RNA_def_struct_sdna(srna, "NlaTrack"); | ||||
| RNA_def_struct_ui_text(srna, "Nla Strips", "Collection of Nla Strips"); | RNA_def_struct_ui_text(srna, "Nla Strips", "Collection of Nla Strips"); | ||||
| func = RNA_def_function(srna, "new", "rna_NlaStrip_new"); | func = RNA_def_function(srna, "new", "rna_NlaStrip_new"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Add a new Action-Clip strip to the track"); | RNA_def_function_ui_description(func, "Add a new Action-Clip strip to the track"); | ||||
| parm = RNA_def_string(func, "name", "NlaStrip", 0, "", "Name for the NLA Strips"); | parm = RNA_def_string(func, "name", "NlaStrip", 0, "", "Name for the NLA Strips"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_int(func, "start", 0, INT_MIN, INT_MAX, "Start Frame", | parm = RNA_def_int(func, "start", 0, INT_MIN, INT_MAX, "Start Frame", | ||||
| "Start frame for this strip", INT_MIN, INT_MAX); | "Start frame for this strip", INT_MIN, INT_MAX); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "action", "Action", "", "Action to assign to this strip"); | parm = RNA_def_pointer(func, "action", "Action", "", "Action to assign to this strip"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "strip", "NlaStrip", "", "New NLA Strip"); | parm = RNA_def_pointer(func, "strip", "NlaStrip", "", "New NLA Strip"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_NlaStrip_remove"); | func = RNA_def_function(srna, "remove", "rna_NlaStrip_remove"); | ||||
| RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | ||||
| RNA_def_function_ui_description(func, "Remove a NLA Strip"); | RNA_def_function_ui_description(func, "Remove a NLA Strip"); | ||||
| parm = RNA_def_pointer(func, "strip", "NlaStrip", "", "NLA Strip to remove"); | parm = RNA_def_pointer(func, "strip", "NlaStrip", "", "NLA Strip 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_nlatrack(BlenderRNA *brna) | static void rna_def_nlatrack(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| srna = RNA_def_struct(brna, "NlaTrack", NULL); | srna = RNA_def_struct(brna, "NlaTrack", NULL); | ||||
| ▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines | |||||