diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 138 |
1 files changed, 136 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index dc0cde953f4..07ad8cbb37d 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -824,6 +824,8 @@ static void rna_def_constraint_headtail_common(StructRNA *srna) { PropertyRNA *prop; + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "head_tail", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, "bConstraint", "headtail"); RNA_def_property_ui_text(prop, "Head/Tail", "Target along length of bone: Head=0, Tail=1"); @@ -835,12 +837,16 @@ static void rna_def_constraint_headtail_common(StructRNA *srna) "Follow B-Bone", "Follow shape of B-Bone segments when calculating Head/Tail position"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_dependency_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_target_common(StructRNA *srna) { PropertyRNA *prop; + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "tar"); RNA_def_property_ui_text(prop, "Target", "Target object"); @@ -852,6 +858,8 @@ static void rna_def_constraint_target_common(StructRNA *srna) RNA_def_property_string_sdna(prop, NULL, "subtarget"); RNA_def_property_ui_text(prop, "Sub-Target", "Armature bone, mesh or lattice vertex group, ..."); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_dependency_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constrainttarget(BlenderRNA *brna) @@ -864,6 +872,8 @@ static void rna_def_constrainttarget(BlenderRNA *brna) RNA_def_struct_path_func(srna, "rna_ConstraintTarget_path"); RNA_def_struct_sdna(srna, "bConstraintTarget"); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "tar"); RNA_def_property_ui_text(prop, "Target", "Target object"); @@ -879,6 +889,8 @@ static void rna_def_constrainttarget(BlenderRNA *brna) prop, NC_OBJECT | ND_CONSTRAINT, "rna_ConstraintTarget_dependency_update"); /* space, flag and type still to do */ + + RNA_define_lib_overridable(false); } static void rna_def_constrainttarget_bone(BlenderRNA *brna) @@ -892,6 +904,8 @@ static void rna_def_constrainttarget_bone(BlenderRNA *brna) RNA_def_struct_path_func(srna, "rna_ConstraintTarget_path"); RNA_def_struct_sdna(srna, "bConstraintTarget"); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "tar"); RNA_def_property_ui_text(prop, "Target", "Target armature"); @@ -913,6 +927,8 @@ static void rna_def_constrainttarget_bone(BlenderRNA *brna) RNA_def_property_range(prop, 0.0f, 1.0f); RNA_def_property_ui_text(prop, "Blend Weight", "Blending weight of this bone"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_ConstraintTarget_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_childof(BlenderRNA *brna) @@ -928,6 +944,8 @@ static void rna_def_constraint_childof(BlenderRNA *brna) rna_def_constraint_target_common(srna); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "use_location_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", CHILDOF_LOCX); RNA_def_property_ui_text(prop, "Location X", "Use X Location of Parent"); @@ -985,6 +1003,8 @@ static void rna_def_constraint_childof(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Inverse Matrix", "Transformation matrix to apply before"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_python(BlenderRNA *brna) @@ -996,6 +1016,8 @@ static void rna_def_constraint_python(BlenderRNA *brna) RNA_def_struct_ui_text(srna, "Python Constraint", "Use Python script for constraint evaluation"); RNA_def_struct_sdna_from(srna, "bPythonConstraint", "data"); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "targets", NULL); RNA_def_property_struct_type(prop, "ConstraintTarget"); @@ -1021,6 +1043,8 @@ static void rna_def_constraint_python(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", PYCON_SCRIPTERROR); RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Script Error", "The linked Python script has thrown an error"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_armature_deform_targets(BlenderRNA *brna, PropertyRNA *cprop) @@ -1065,6 +1089,8 @@ static void rna_def_constraint_armature_deform(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bArmatureConstraint", "data"); RNA_def_struct_ui_icon(srna, ICON_CON_ARMATURE); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "targets", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "targets", NULL); RNA_def_property_struct_type(prop, "ConstraintTargetBone"); @@ -1095,6 +1121,8 @@ static void rna_def_constraint_armature_deform(BlenderRNA *brna) "Use the current bone location for envelopes and choosing B-Bone " "segments instead of rest position"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_kinematic(BlenderRNA *brna) @@ -1121,6 +1149,8 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna) rna_def_constraint_target_common(srna); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "iterations", PROP_INT, PROP_NONE); RNA_def_property_range(prop, 0, 10000); RNA_def_property_ui_text(prop, "Iterations", "Maximum number of solving iterations"); @@ -1240,6 +1270,8 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna) RNA_def_property_range(prop, 0.0, 100.f); RNA_def_property_ui_text(prop, "Distance", "Radius of limiting sphere"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_track_to(BlenderRNA *brna) @@ -1266,6 +1298,8 @@ static void rna_def_constraint_track_to(BlenderRNA *brna) RNA_def_struct_ui_icon(srna, ICON_CON_TRACKTO); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "reserved1"); RNA_def_property_enum_items(prop, track_axis_items); @@ -1283,6 +1317,8 @@ static void rna_def_constraint_track_to(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Target Z", "Target's Z axis, not World Z axis, will constraint the Up direction"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_locate_like(BlenderRNA *brna) @@ -1300,6 +1336,8 @@ static void rna_def_constraint_locate_like(BlenderRNA *brna) rna_def_constraint_target_common(srna); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_X); RNA_def_property_ui_text(prop, "Copy X", "Copy the target's X location"); @@ -1334,6 +1372,8 @@ static void rna_def_constraint_locate_like(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", LOCLIKE_OFFSET); RNA_def_property_ui_text(prop, "Offset", "Add original location into copied location"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_rotate_like(BlenderRNA *brna) @@ -1370,6 +1410,8 @@ static void rna_def_constraint_rotate_like(BlenderRNA *brna) rna_def_constraint_target_common(srna); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", ROTLIKE_X); RNA_def_property_ui_text(prop, "Copy X", "Copy the target's X rotation"); @@ -1420,6 +1462,8 @@ static void rna_def_constraint_rotate_like(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Offset", "DEPRECATED: Add original rotation into copied rotation"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_size_like(BlenderRNA *brna) @@ -1434,6 +1478,8 @@ static void rna_def_constraint_size_like(BlenderRNA *brna) rna_def_constraint_target_common(srna); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "use_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SIZELIKE_X); RNA_def_property_ui_text(prop, "Copy X", "Copy the target's X scale"); @@ -1476,6 +1522,8 @@ static void rna_def_constraint_size_like(BlenderRNA *brna) "Additive", "Use addition instead of multiplication to combine scale (2.7 compatibility)"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_same_volume(BlenderRNA *brna) @@ -1518,6 +1566,8 @@ static void rna_def_constraint_same_volume(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bSameVolumeConstraint", "data"); RNA_def_struct_ui_icon(srna, ICON_CON_SAMEVOL); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "free_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "free_axis"); RNA_def_property_enum_items(prop, axis_items); @@ -1535,6 +1585,8 @@ static void rna_def_constraint_same_volume(BlenderRNA *brna) RNA_def_property_range(prop, 0.001f, 100.0f); RNA_def_property_ui_text(prop, "Volume", "Volume of the bone at rest"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_transform_like(BlenderRNA *brna) @@ -1575,12 +1627,16 @@ static void rna_def_constraint_transform_like(BlenderRNA *brna) rna_def_constraint_target_common(srna); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "mix_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mix_mode"); RNA_def_property_enum_items(prop, mix_mode_items); RNA_def_property_ui_text( prop, "Mix Mode", "Specify how the copied and existing transformations are combined"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_minmax(BlenderRNA *brna) @@ -1606,6 +1662,8 @@ static void rna_def_constraint_minmax(BlenderRNA *brna) rna_def_constraint_target_common(srna); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "floor_location", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "minmaxflag"); RNA_def_property_enum_items(prop, minmax_items); @@ -1622,6 +1680,8 @@ static void rna_def_constraint_minmax(BlenderRNA *brna) RNA_def_property_ui_range(prop, -100.0f, 100.0f, 1, -1); RNA_def_property_ui_text(prop, "Offset", "Offset of floor from object origin"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_action(BlenderRNA *brna) @@ -1673,6 +1733,8 @@ static void rna_def_constraint_action(BlenderRNA *brna) rna_def_constraint_target_common(srna); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "mix_mode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "mix_mode"); RNA_def_property_enum_items(prop, mix_mode_items); @@ -1733,6 +1795,8 @@ static void rna_def_constraint_action(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Minimum", "Minimum value for target channel range"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); RNA_def_property_float_funcs(prop, NULL, NULL, "rna_ActionConstraint_minmax_range"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_locked_track(BlenderRNA *brna) @@ -1760,6 +1824,8 @@ static void rna_def_constraint_locked_track(BlenderRNA *brna) rna_def_constraint_target_common(srna); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "trackflag"); RNA_def_property_enum_items(prop, track_axis_items); @@ -1771,6 +1837,8 @@ static void rna_def_constraint_locked_track(BlenderRNA *brna) RNA_def_property_enum_items(prop, lock_items); RNA_def_property_ui_text(prop, "Locked Axis", "Axis that points upward"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_follow_path(BlenderRNA *brna) @@ -1800,6 +1868,8 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bFollowPathConstraint", "data"); RNA_def_struct_ui_icon(srna, ICON_CON_FOLLOWPATH); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "tar"); RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Curve_object_poll"); @@ -1852,6 +1922,8 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "followflag", FOLLOWPATH_RADIUS); RNA_def_property_ui_text(prop, "Curve Radius", "Object is scaled by the curve radius"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_stretch_to(BlenderRNA *brna) @@ -1888,6 +1960,8 @@ static void rna_def_constraint_stretch_to(BlenderRNA *brna) rna_def_constraint_target_common(srna); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "volume", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "volmode"); RNA_def_property_enum_items(prop, volume_items); @@ -1941,6 +2015,8 @@ static void rna_def_constraint_stretch_to(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Volume Variation Smoothness", "Strength of volume stretching clamping"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_clamp_to(BlenderRNA *brna) @@ -1964,6 +2040,8 @@ static void rna_def_constraint_clamp_to(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bClampToConstraint", "data"); RNA_def_struct_ui_icon(srna, ICON_CON_CLAMPTO); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "tar"); RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Curve_object_poll"); @@ -1983,6 +2061,8 @@ static void rna_def_constraint_clamp_to(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Cyclic", "Treat curve as cyclic curve (no clamping to curve bounding box)"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_transform(BlenderRNA *brna) @@ -2033,6 +2113,8 @@ static void rna_def_constraint_transform(BlenderRNA *brna) rna_def_constraint_target_common(srna); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "map_from", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "from"); RNA_def_property_enum_items(prop, transform_items); @@ -2323,6 +2405,8 @@ static void rna_def_constraint_transform(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Scale Mix Mode", "Specify how to combine the new scale with original"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_location_limit(BlenderRNA *brna) @@ -2336,6 +2420,8 @@ static void rna_def_constraint_location_limit(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bLocLimitConstraint", "data"); RNA_def_struct_ui_icon(srna, ICON_CON_LOCLIMIT); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "use_min_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_XMIN); RNA_def_property_ui_text(prop, "Minimum X", "Use the minimum X value"); @@ -2407,6 +2493,8 @@ static void rna_def_constraint_location_limit(BlenderRNA *brna) RNA_def_property_ui_text( prop, "For Transform", "Transforms are affected by this constraint as well"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_rotation_limit(BlenderRNA *brna) @@ -2420,6 +2508,8 @@ static void rna_def_constraint_rotation_limit(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bRotLimitConstraint", "data"); RNA_def_struct_ui_icon(srna, ICON_CON_ROTLIMIT); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "use_limit_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_XROT); RNA_def_property_ui_text(prop, "Limit X", "Use the minimum X value"); @@ -2476,6 +2566,8 @@ static void rna_def_constraint_rotation_limit(BlenderRNA *brna) RNA_def_property_ui_text( prop, "For Transform", "Transforms are affected by this constraint as well"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_size_limit(BlenderRNA *brna) @@ -2489,6 +2581,8 @@ static void rna_def_constraint_size_limit(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bSizeLimitConstraint", "data"); RNA_def_struct_ui_icon(srna, ICON_CON_SIZELIMIT); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "use_min_x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", LIMIT_XMIN); RNA_def_property_ui_text(prop, "Minimum X", "Use the minimum X value"); @@ -2560,6 +2654,8 @@ static void rna_def_constraint_size_limit(BlenderRNA *brna) RNA_def_property_ui_text( prop, "For Transform", "Transforms are affected by this constraint as well"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_distance_limit(BlenderRNA *brna) @@ -2578,6 +2674,8 @@ static void rna_def_constraint_distance_limit(BlenderRNA *brna) rna_def_constraint_target_common(srna); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE); RNA_def_property_float_sdna(prop, NULL, "dist"); RNA_def_property_ui_range(prop, 0.0f, 100.0f, 10, 3); @@ -2596,6 +2694,8 @@ static void rna_def_constraint_distance_limit(BlenderRNA *brna) RNA_def_property_ui_text( prop, "For Transform", "Transforms are affected by this constraint as well"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_shrinkwrap(BlenderRNA *brna) @@ -2649,6 +2749,8 @@ static void rna_def_constraint_shrinkwrap(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bShrinkwrapConstraint", "data"); RNA_def_struct_ui_icon(srna, ICON_CON_SHRINKWRAP); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "target"); /* TODO, mesh type */ RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Mesh_object_poll"); @@ -2734,6 +2836,8 @@ static void rna_def_constraint_shrinkwrap(BlenderRNA *brna) RNA_def_property_enum_items(prop, track_axis_items); RNA_def_property_ui_text(prop, "Track Axis", "Axis that is aligned to the normal"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_damped_track(BlenderRNA *brna) @@ -2752,11 +2856,15 @@ static void rna_def_constraint_damped_track(BlenderRNA *brna) rna_def_constraint_target_common(srna); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "track_axis", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "trackflag"); RNA_def_property_enum_items(prop, track_axis_items); RNA_def_property_ui_text(prop, "Track Axis", "Axis that points to the target object"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_spline_ik(BlenderRNA *brna) @@ -2804,6 +2912,8 @@ static void rna_def_constraint_spline_ik(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bSplineIKConstraint", "data"); RNA_def_struct_ui_icon(srna, ICON_CON_SPLINEIK); + RNA_define_lib_overridable(true); + /* target chain */ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "tar"); @@ -2922,6 +3032,8 @@ static void rna_def_constraint_spline_ik(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Volume Variation Smoothness", "Strength of volume stretching clamping"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_pivot(BlenderRNA *brna) @@ -2973,6 +3085,8 @@ static void rna_def_constraint_pivot(BlenderRNA *brna) RNA_def_struct_ui_icon(srna, ICON_CON_PIVOT); + RNA_define_lib_overridable(true); + /* target-defined pivot */ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "tar"); @@ -3011,6 +3125,8 @@ static void rna_def_constraint_pivot(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Enabled Rotation Range", "Rotation range on which pivoting should occur"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_follow_track(BlenderRNA *brna) @@ -3031,6 +3147,8 @@ static void rna_def_constraint_follow_track(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bFollowTrackConstraint", "data"); RNA_def_struct_ui_icon(srna, ICON_CON_FOLLOWTRACK); + RNA_define_lib_overridable(true); + /* movie clip */ prop = RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "clip"); @@ -3106,6 +3224,8 @@ static void rna_def_constraint_follow_track(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", FOLLOWTRACK_USE_UNDISTORTION); RNA_def_property_ui_text(prop, "Undistort", "Parent to undistorted position of 2D track"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_camera_solver(BlenderRNA *brna) @@ -3119,6 +3239,8 @@ static void rna_def_constraint_camera_solver(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bCameraSolverConstraint", "data"); RNA_def_struct_ui_icon(srna, ICON_CON_CAMERASOLVER); + RNA_define_lib_overridable(true); + /* movie clip */ prop = RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "clip"); @@ -3132,6 +3254,8 @@ static void rna_def_constraint_camera_solver(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "flag", CAMERASOLVER_ACTIVECLIP); RNA_def_property_ui_text(prop, "Active Clip", "Use active clip defined in scene"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_object_solver(BlenderRNA *brna) @@ -3145,6 +3269,8 @@ static void rna_def_constraint_object_solver(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bObjectSolverConstraint", "data"); RNA_def_struct_ui_icon(srna, ICON_CON_OBJECTSOLVER); + RNA_define_lib_overridable(true); + /* movie clip */ prop = RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "clip"); @@ -3184,6 +3310,8 @@ static void rna_def_constraint_object_solver(BlenderRNA *brna) "rna_Constraint_objectSolver_camera_set", NULL, "rna_Constraint_cameraObject_poll"); + + RNA_define_lib_overridable(false); } static void rna_def_constraint_transform_cache(BlenderRNA *brna) @@ -3197,6 +3325,8 @@ static void rna_def_constraint_transform_cache(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bTransformCacheConstraint", "data"); RNA_def_struct_ui_icon(srna, ICON_CON_TRANSFORM_CACHE); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "cache_file", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "cache_file"); RNA_def_property_struct_type(prop, "CacheFile"); @@ -3211,6 +3341,8 @@ static void rna_def_constraint_transform_cache(BlenderRNA *brna) "Object Path", "Path to the object in the Alembic archive used to lookup the transform matrix"); RNA_def_property_update(prop, 0, "rna_Constraint_update"); + + RNA_define_lib_overridable(false); } /* base struct for constraints */ @@ -3241,6 +3373,8 @@ void RNA_def_constraint(BlenderRNA *brna) RNA_def_property_enum_items(prop, rna_enum_constraint_type_items); RNA_def_property_ui_text(prop, "Type", ""); + RNA_define_lib_overridable(true); + prop = RNA_def_property(srna, "owner_space", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "ownspace"); RNA_def_property_enum_items(prop, owner_space_pchan_items); @@ -3258,7 +3392,6 @@ void RNA_def_constraint(BlenderRNA *brna) /* flags */ prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_OFF); - RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); RNA_def_property_ui_text(prop, "Disable", "Enable/Disable Constraint"); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_update"); RNA_def_property_ui_icon(prop, ICON_HIDE_OFF, -1); @@ -3266,7 +3399,6 @@ void RNA_def_constraint(BlenderRNA *brna) prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE); RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE); RNA_def_property_boolean_sdna(prop, NULL, "flag", CONSTRAINT_EXPAND); - RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); RNA_def_property_ui_text(prop, "Expanded", "Constraint's panel is expanded in UI"); RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1); @@ -3315,6 +3447,8 @@ void RNA_def_constraint(BlenderRNA *brna) "Rot error", "Amount of residual error in radians for constraints that work on orientation"); + RNA_define_lib_overridable(false); + /* pointers */ rna_def_constrainttarget(brna); rna_def_constrainttarget_bone(brna); |