diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-02 19:45:22 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-02 19:45:22 +0300 |
commit | 7d384bcdbb401393388ffb7f64ce3eea6a3fc86a (patch) | |
tree | 8a0a2b992aa75ac29a8840ae71fc299788753003 /source/blender/editors/object/object_constraint.c | |
parent | 0fb5a39baf46440a1dfbef939bb46bbb2b610036 (diff) |
Static Override: Lock 'edition' of constraints & modifiers from overridden data.
Means that you cannot move or delete constraints/modifiers coming from
the overriden linked datablock. Local inserted ones can be fully edited.
Diffstat (limited to 'source/blender/editors/object/object_constraint.c')
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index 95778b73e55..6a0dedd1d43 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -598,6 +598,11 @@ static int edit_constraint_poll_generic(bContext *C, StructRNA *rna_type) return 0; } + if (ID_IS_STATIC_OVERRIDE(ob)) { + CTX_wm_operator_poll_msg_set(C, "Cannot edit constraints comming from static override"); + return (((bConstraint *)ptr.data)->flag & CONSTRAINT_STATICOVERRIDE_LOCAL) != 0; + } + return 1; } |