diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_constraint.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 83f3042d8ee..a8dc0454cef 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -160,14 +160,15 @@ static char *rna_Constraint_path(PointerRNA *ptr) static void rna_Constraint_update(bContext *C, PointerRNA *ptr) { + Scene *scene= CTX_data_scene(C); Object *ob= ptr->id.data; if(ob->pose) update_pose_constraint_flags(ob->pose); object_test_constraints(ob); - if(ob->type==OB_ARMATURE) DAG_id_flush_update(&ob->id, OB_RECALC_DATA|OB_RECALC_OB); - else DAG_id_flush_update(&ob->id, OB_RECALC_OB); + if(ob->type==OB_ARMATURE) DAG_object_flush_update(scene, ob, OB_RECALC_DATA|OB_RECALC_OB); + else DAG_object_flush_update(scene, ob, OB_RECALC_OB); } static void rna_Constraint_dependency_update(bContext *C, PointerRNA *ptr) @@ -871,15 +872,9 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna) RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update"); prop= RNA_def_property(srna, "offset", PROP_INT, PROP_TIME); - RNA_def_property_range(prop, MINAFRAME, MAXFRAME); + RNA_def_property_range(prop, -300000.0, 300000.f); RNA_def_property_ui_text(prop, "Offset", "Offset from the position corresponding to the time frame."); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); - - prop= RNA_def_property(srna, "offset_percentage", PROP_FLOAT, PROP_PERCENTAGE); - RNA_def_property_float_sdna(prop, NULL, "offset"); // XXX we might be better with another var or some hackery? - RNA_def_property_range(prop, 0.0f, 1.0f); - RNA_def_property_ui_text(prop, "Offset Percentage", "Percentage value defining target position along length of bone."); - RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); prop= RNA_def_property(srna, "forward", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "trackflag"); @@ -894,15 +889,9 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna) RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); prop= RNA_def_property(srna, "curve_follow", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "followflag", FOLLOWPATH_FOLLOW); + RNA_def_property_boolean_sdna(prop, NULL, "followflag", 1); RNA_def_property_ui_text(prop, "Follow Curve", "Object will follow the heading and banking of the curve."); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); - - // TODO: do we need to do some special trickery to get offset sane for this? - prop= RNA_def_property(srna, "fixed_position", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "followflag", FOLLOWPATH_STATIC); - RNA_def_property_ui_text(prop, "Fixed Position", "Object will stay locked to a single point somewhere along the length of the curve regardless of time."); - RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update"); } static void rna_def_constraint_stretch_to(BlenderRNA *brna) |