Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Emara <mail@OmarEmara.dev>2021-11-19 16:58:37 +0300
committerOmar Emara <mail@OmarEmara.dev>2021-11-19 16:58:37 +0300
commit0852805ed771043f43752658bb763983a8aae408 (patch)
tree8d77c8a13cd783c4932c8a937176209e92ad551f /source/blender/editors/object
parent06691d1b21fe06c86876c78e45ca75cb1aa048ae (diff)
parenta20e703d1a5cc0d3e4294825e31609d9b92da06d (diff)
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_constraint.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 8702b18a46f..47c2998ed3d 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -1449,7 +1449,9 @@ void ED_object_constraint_link(Main *bmain, Object *ob_dst, ListBase *dst, ListB
void ED_object_constraint_copy_for_object(Main *bmain, Object *ob_dst, bConstraint *con)
{
- BKE_constraint_copy_for_object(ob_dst, con);
+ bConstraint *copy_con = BKE_constraint_copy_for_object(ob_dst, con);
+ copy_con->flag |= CONSTRAINT_OVERRIDE_LIBRARY_LOCAL;
+
ED_object_constraint_dependency_tag_update(bmain, ob_dst, con);
WM_main_add_notifier(NC_OBJECT | ND_CONSTRAINT | NA_ADDED, ob_dst);
}
@@ -1459,7 +1461,9 @@ void ED_object_constraint_copy_for_pose(Main *bmain,
bPoseChannel *pchan,
bConstraint *con)
{
- BKE_constraint_copy_for_pose(ob_dst, pchan, con);
+ bConstraint *copy_con = BKE_constraint_copy_for_pose(ob_dst, pchan, con);
+ copy_con->flag |= CONSTRAINT_OVERRIDE_LIBRARY_LOCAL;
+
ED_object_constraint_dependency_tag_update(bmain, ob_dst, con);
WM_main_add_notifier(NC_OBJECT | ND_CONSTRAINT | NA_ADDED, ob_dst);
}
@@ -1654,6 +1658,8 @@ static int constraint_copy_exec(bContext *C, wmOperator *op)
/* Couldn't remove due to some invalid data. */
return OPERATOR_CANCELLED;
}
+ copy_con->flag |= CONSTRAINT_OVERRIDE_LIBRARY_LOCAL;
+
/* Move constraint to correct position. */
const int new_index = BLI_findindex(constraints, con) + 1;
const int current_index = BLI_findindex(constraints, copy_con);
@@ -1731,7 +1737,9 @@ static int constraint_copy_to_selected_exec(bContext *C, wmOperator *op)
continue;
}
- BKE_constraint_copy_for_pose(ob, chan, con);
+ bConstraint *copy_con = BKE_constraint_copy_for_pose(ob, chan, con);
+ copy_con->flag |= CONSTRAINT_OVERRIDE_LIBRARY_LOCAL;
+
/* Update flags (need to add here, not just copy). */
chan->constflag |= pchan->constflag;
@@ -1753,7 +1761,9 @@ static int constraint_copy_to_selected_exec(bContext *C, wmOperator *op)
continue;
}
- BKE_constraint_copy_for_object(ob, con);
+ bConstraint *copy_con = BKE_constraint_copy_for_object(ob, con);
+ copy_con->flag |= CONSTRAINT_OVERRIDE_LIBRARY_LOCAL;
+
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY | ID_RECALC_TRANSFORM);
}
CTX_DATA_END;