Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_action.c
| Show First 20 Lines • Show All 580 Lines • ▼ Show 20 Lines | static void rna_def_action_groups(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| RNA_def_property_srna(cprop, "ActionGroups"); | RNA_def_property_srna(cprop, "ActionGroups"); | ||||
| srna = RNA_def_struct(brna, "ActionGroups", NULL); | srna = RNA_def_struct(brna, "ActionGroups", NULL); | ||||
| RNA_def_struct_sdna(srna, "bAction"); | RNA_def_struct_sdna(srna, "bAction"); | ||||
| RNA_def_struct_ui_text(srna, "Action Groups", "Collection of action groups"); | RNA_def_struct_ui_text(srna, "Action Groups", "Collection of action groups"); | ||||
| func = RNA_def_function(srna, "new", "rna_Action_groups_new"); | func = RNA_def_function(srna, "new", "rna_Action_groups_new"); | ||||
| RNA_def_function_ui_description(func, "Create a new action group and add it to the action"); | RNA_def_function_ui_description(func, "Create a new action group and add it to the action"); | ||||
| parm = RNA_def_string(func, "name", "Group", 0, "", "New name for the action group"); | parm = RNA_def_string(func, "name", "Group", 0, "", "New name for the action group"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "action_group", "ActionGroup", "", "Newly created action group"); | parm = RNA_def_pointer(func, "action_group", "ActionGroup", "", "Newly created action group"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Action_groups_remove"); | func = RNA_def_function(srna, "remove", "rna_Action_groups_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove action group"); | RNA_def_function_ui_description(func, "Remove action group"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "action_group", "ActionGroup", "", "Action group to remove"); | parm = RNA_def_pointer(func, "action_group", "ActionGroup", "", "Action group 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_action_fcurves(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_action_fcurves(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| FunctionRNA *func; | FunctionRNA *func; | ||||
| PropertyRNA *parm; | PropertyRNA *parm; | ||||
| RNA_def_property_srna(cprop, "ActionFCurves"); | RNA_def_property_srna(cprop, "ActionFCurves"); | ||||
| srna = RNA_def_struct(brna, "ActionFCurves", NULL); | srna = RNA_def_struct(brna, "ActionFCurves", NULL); | ||||
| RNA_def_struct_sdna(srna, "bAction"); | RNA_def_struct_sdna(srna, "bAction"); | ||||
| RNA_def_struct_ui_text(srna, "Action F-Curves", "Collection of action F-Curves"); | RNA_def_struct_ui_text(srna, "Action F-Curves", "Collection of action F-Curves"); | ||||
| /* Action.fcurves.new(...) */ | /* Action.fcurves.new(...) */ | ||||
| func = RNA_def_function(srna, "new", "rna_Action_fcurve_new"); | func = RNA_def_function(srna, "new", "rna_Action_fcurve_new"); | ||||
| RNA_def_function_ui_description(func, "Add an F-Curve to the action"); | RNA_def_function_ui_description(func, "Add an F-Curve to the action"); | ||||
| 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 to use"); | parm = RNA_def_string(func, "data_path", NULL, 0, "Data Path", "F-Curve data path to use"); | ||||
| 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); | ||||
| RNA_def_string(func, "action_group", NULL, 0, "Action Group", "Acton group to add this F-Curve into"); | RNA_def_string(func, "action_group", NULL, 0, "Action Group", "Acton group to add this F-Curve into"); | ||||
| parm = RNA_def_pointer(func, "fcurve", "FCurve", "", "Newly created F-Curve"); | parm = RNA_def_pointer(func, "fcurve", "FCurve", "", "Newly created F-Curve"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| /* Action.fcurves.find(...) */ | /* Action.fcurves.find(...) */ | ||||
| func = RNA_def_function(srna, "find", "rna_Action_fcurve_find"); | func = RNA_def_function(srna, "find", "rna_Action_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 action."); | "of all F-Curves in the action."); | ||||
| 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); | ||||
| /* Action.fcurves.remove(...) */ | /* Action.fcurves.remove(...) */ | ||||
| func = RNA_def_function(srna, "remove", "rna_Action_fcurve_remove"); | func = RNA_def_function(srna, "remove", "rna_Action_fcurve_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove action group"); | RNA_def_function_ui_description(func, "Remove action group"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "fcurve", "FCurve", "", "F-Curve to remove"); | parm = RNA_def_pointer(func, "fcurve", "FCurve", "", "F-Curve 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_action_pose_markers(BlenderRNA *brna, PropertyRNA *cprop) | static void rna_def_action_pose_markers(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, "ActionPoseMarkers"); | RNA_def_property_srna(cprop, "ActionPoseMarkers"); | ||||
| srna = RNA_def_struct(brna, "ActionPoseMarkers", NULL); | srna = RNA_def_struct(brna, "ActionPoseMarkers", NULL); | ||||
| RNA_def_struct_sdna(srna, "bAction"); | RNA_def_struct_sdna(srna, "bAction"); | ||||
| RNA_def_struct_ui_text(srna, "Action Pose Markers", "Collection of timeline markers"); | RNA_def_struct_ui_text(srna, "Action Pose Markers", "Collection of timeline markers"); | ||||
| func = RNA_def_function(srna, "new", "rna_Action_pose_markers_new"); | func = RNA_def_function(srna, "new", "rna_Action_pose_markers_new"); | ||||
| RNA_def_function_ui_description(func, "Add a pose marker to the action"); | RNA_def_function_ui_description(func, "Add a pose marker to the action"); | ||||
| parm = RNA_def_string(func, "name", "Marker", 0, NULL, "New name for the marker (not unique)"); | parm = RNA_def_string(func, "name", "Marker", 0, NULL, "New name for the marker (not unique)"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Newly created marker"); | parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Newly created marker"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_Action_pose_markers_remove"); | func = RNA_def_function(srna, "remove", "rna_Action_pose_markers_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a timeline marker"); | RNA_def_function_ui_description(func, "Remove a timeline marker"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS); | RNA_def_function_flag(func, FUNC_USE_REPORTS); | ||||
| parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline marker to remove"); | parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline marker 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); | ||||
| 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, "TimelineMarker"); | RNA_def_property_struct_type(prop, "TimelineMarker"); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE | PROP_LIB_EXCEPTION); | RNA_def_property_flag(prop, PROP_EDITABLE | PROP_LIB_EXCEPTION); | ||||
| RNA_def_property_pointer_funcs(prop, "rna_Action_active_pose_marker_get", | RNA_def_property_pointer_funcs(prop, "rna_Action_active_pose_marker_get", | ||||
| "rna_Action_active_pose_marker_set", NULL, NULL); | "rna_Action_active_pose_marker_set", NULL, NULL); | ||||
| RNA_def_property_ui_text(prop, "Active Pose Marker", "Active pose marker for this action"); | RNA_def_property_ui_text(prop, "Active Pose Marker", "Active pose marker for this action"); | ||||
| ▲ Show 20 Lines • Show All 69 Lines • Show Last 20 Lines | |||||