Cleanup: remove moar G.main usages.
[blender.git] / source / blender / editors / object / object_constraint.c
index bb9d9d74bb44106b9a7e3236009f055b07ecc93b..1fc47905db0d1b106f926d2808dd9850ef8cef0e 100644 (file)
@@ -960,6 +960,7 @@ void CONSTRAINT_OT_childof_clear_inverse(wmOperatorType *ot)
 
 static int followpath_path_animate_exec(bContext *C, wmOperator *op)
 {
+       Main *bmain = CTX_data_main(C);
        Object *ob = ED_object_active_context(C);
        bConstraint *con = edit_constraint_property_get(op, ob, CONSTRAINT_TYPE_FOLLOWPATH);
        bFollowPathConstraint *data = (con) ? (bFollowPathConstraint *)con->data : NULL;
@@ -984,7 +985,7 @@ static int followpath_path_animate_exec(bContext *C, wmOperator *op)
                    (list_find_fcurve(&cu->adt->action->curves, "eval_time", 0) == NULL))
                {
                        /* create F-Curve for path animation */
-                       act = verify_adt_action(&cu->id, 1);
+                       act = verify_adt_action(bmain, &cu->id, 1);
                        fcu = verify_fcurve(act, NULL, NULL, "eval_time", 0, 1);
 
                        /* standard vertical range - 1:1 = 100 frames */
@@ -1009,7 +1010,7 @@ static int followpath_path_animate_exec(bContext *C, wmOperator *op)
                path = RNA_path_from_ID_to_property(&ptr, prop);
 
                /* create F-Curve for constraint */
-               act = verify_adt_action(&ob->id, 1);
+               act = verify_adt_action(bmain, &ob->id, 1);
                fcu = verify_fcurve(act, NULL, NULL, path, 0, 1);
 
                /* standard vertical range - 0.0 to 1.0 */