diff options
author | Dan Eicher <dan@eu.phorio.us> | 2012-05-29 02:59:11 +0400 |
---|---|---|
committer | Dan Eicher <dan@eu.phorio.us> | 2012-05-29 02:59:11 +0400 |
commit | 53082c410d33f59c39143c3baa680b9634b7609a (patch) | |
tree | 8e77a5e24fb9b613052e4f34fa055488b878de9a /source/blender/editors | |
parent | dfc19a1ff7968e547c33ef3304849f69ddf76f4f (diff) |
Outliner drag/drop parent fix -- added checks for modifiers and contraints to the poll functions
Parenting was just broken, poll would return true but nothing would happen if you dropped on modifiers or constraints
Parent clear now works the same as dropping on a non-ID_OB types but left the actual modifier/contraint instances open to allow for future expansion
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_edit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 04e9cbf24c2..0232006829f 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -1426,7 +1426,8 @@ TreeElement *outliner_dropzone_parent(bContext *C, wmEvent *event, TreeElement * /* name and first icon */ if ((fmval[0] > te->xs + UI_UNIT_X) && (fmval[0] < te->xend)) { /* always makes active object */ - if (te->idcode == ID_OB) { + if (te->idcode == ID_OB && + !ELEM4(tselem->type, TSE_MODIFIER_BASE, TSE_MODIFIER, TSE_CONSTRAINT_BASE, TSE_CONSTRAINT)) { return te; } else { @@ -1635,7 +1636,7 @@ int outliner_dropzone_parent_clear(bContext *C, wmEvent *event, TreeElement *te, if ((fmval[0] < (te->xs + UI_UNIT_X)) || (fmval[0] > te->xend)) { return 1; } - else if (te->idcode != ID_OB) { + else if (te->idcode != ID_OB || ELEM(tselem->type, TSE_MODIFIER_BASE, TSE_CONSTRAINT_BASE)) { return 1; } |