Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_pose.c
| Show First 20 Lines • Show All 762 Lines • ▼ Show 20 Lines | static void rna_def_pose_channel_constraints(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| /* Constraint collection */ | /* Constraint collection */ | ||||
| func = RNA_def_function(srna, "new", "rna_PoseChannel_constraints_new"); | func = RNA_def_function(srna, "new", "rna_PoseChannel_constraints_new"); | ||||
| RNA_def_function_ui_description(func, "Add a constraint to this object"); | RNA_def_function_ui_description(func, "Add a constraint to this object"); | ||||
| /* return type */ | /* return type */ | ||||
| parm = RNA_def_pointer(func, "constraint", "Constraint", "", "New constraint"); | parm = RNA_def_pointer(func, "constraint", "Constraint", "", "New constraint"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| /* constraint to add */ | /* constraint to add */ | ||||
| parm = RNA_def_enum(func, "type", rna_enum_constraint_type_items, 1, "", "Constraint type to add"); | parm = RNA_def_enum(func, "type", rna_enum_constraint_type_items, 1, "", "Constraint type to add"); | ||||
| RNA_def_property_flag(parm, PROP_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| func = RNA_def_function(srna, "remove", "rna_PoseChannel_constraints_remove"); | func = RNA_def_function(srna, "remove", "rna_PoseChannel_constraints_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a constraint from this object"); | RNA_def_function_ui_description(func, "Remove a constraint from this object"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID); /* ID needed for refresh */ | RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID); /* ID needed for refresh */ | ||||
| /* constraint to remove */ | /* constraint to remove */ | ||||
| parm = RNA_def_pointer(func, "constraint", "Constraint", "", "Removed constraint"); | parm = RNA_def_pointer(func, "constraint", "Constraint", "", "Removed constraint"); | ||||
| 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_pose_channel(BlenderRNA *brna) | static void rna_def_pose_channel(BlenderRNA *brna) | ||||
| { | { | ||||
| static float default_quat[4] = {1, 0, 0, 0}; /* default quaternion values */ | static float default_quat[4] = {1, 0, 0, 0}; /* default quaternion values */ | ||||
| static float default_axisAngle[4] = {0, 0, 1, 0}; /* default axis-angle rotation values */ | static float default_axisAngle[4] = {0, 0, 1, 0}; /* default axis-angle rotation values */ | ||||
| static float default_scale[3] = {1, 1, 1}; /* default scale values */ | static float default_scale[3] = {1, 1, 1}; /* default scale values */ | ||||
| ▲ Show 20 Lines • Show All 566 Lines • ▼ Show 20 Lines | static void rna_def_bone_groups(BlenderRNA *brna, PropertyRNA *cprop) | ||||
| parm = RNA_def_pointer(func, "group", "BoneGroup", "", "New bone group"); | parm = RNA_def_pointer(func, "group", "BoneGroup", "", "New bone group"); | ||||
| RNA_def_function_return(func, parm); | RNA_def_function_return(func, parm); | ||||
| func = RNA_def_function(srna, "remove", "rna_bone_group_remove"); | func = RNA_def_function(srna, "remove", "rna_bone_group_remove"); | ||||
| RNA_def_function_ui_description(func, "Remove a bone group from this object"); | RNA_def_function_ui_description(func, "Remove a bone group from this object"); | ||||
| RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID); /* ID needed for refresh */ | RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID); /* ID needed for refresh */ | ||||
| /* bone group to remove */ | /* bone group to remove */ | ||||
| parm = RNA_def_pointer(func, "group", "BoneGroup", "", "Removed bone group"); | parm = RNA_def_pointer(func, "group", "BoneGroup", "", "Removed bone group"); | ||||
| 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, "BoneGroup"); | RNA_def_property_struct_type(prop, "BoneGroup"); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | RNA_def_property_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_pointer_funcs(prop, "rna_Pose_active_bone_group_get", | RNA_def_property_pointer_funcs(prop, "rna_Pose_active_bone_group_get", | ||||
| "rna_Pose_active_bone_group_set", NULL, NULL); | "rna_Pose_active_bone_group_set", NULL, NULL); | ||||
| RNA_def_property_ui_text(prop, "Active Bone Group", "Active bone group for this pose"); | RNA_def_property_ui_text(prop, "Active Bone Group", "Active bone group for this pose"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update"); | ||||
| ▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines | |||||