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:
authorDan Eicher <dan@eu.phorio.us>2012-05-29 02:59:11 +0400
committerDan Eicher <dan@eu.phorio.us>2012-05-29 02:59:11 +0400
commit53082c410d33f59c39143c3baa680b9634b7609a (patch)
tree8e77a5e24fb9b613052e4f34fa055488b878de9a /source/blender/editors
parentdfc19a1ff7968e547c33ef3304849f69ddf76f4f (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.c5
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;
}