diff options
author | Omar Emara <mail@OmarEmara.dev> | 2021-11-19 16:58:37 +0300 |
---|---|---|
committer | Omar Emara <mail@OmarEmara.dev> | 2021-11-19 16:58:37 +0300 |
commit | 0852805ed771043f43752658bb763983a8aae408 (patch) | |
tree | 8d77c8a13cd783c4932c8a937176209e92ad551f /source/blender/editors | |
parent | 06691d1b21fe06c86876c78e45ca75cb1aa048ae (diff) | |
parent | a20e703d1a5cc0d3e4294825e31609d9b92da06d (diff) |
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 18 | ||||
-rw-r--r-- | source/blender/editors/space_node/drawnode.cc | 4 |
2 files changed, 15 insertions, 7 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; diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc index bb57a65eb49..cf79893a8cb 100644 --- a/source/blender/editors/space_node/drawnode.cc +++ b/source/blender/editors/space_node/drawnode.cc @@ -4313,9 +4313,7 @@ void node_draw_link_bezier(const bContext *C, } if (snode->overlay.flag & SN_OVERLAY_SHOW_OVERLAYS && - snode->overlay.flag & SN_OVERLAY_SHOW_WIRE_COLORS && - ((link->fromsock == nullptr || link->fromsock->typeinfo->type >= 0) && - (link->tosock == nullptr || link->tosock->typeinfo->type >= 0))) { + snode->overlay.flag & SN_OVERLAY_SHOW_WIRE_COLORS) { PointerRNA from_node_ptr, to_node_ptr; RNA_pointer_create((ID *)snode->edittree, &RNA_Node, link->fromnode, &from_node_ptr); RNA_pointer_create((ID *)snode->edittree, &RNA_Node, link->tonode, &to_node_ptr); |