!ELEM4(tselem->type, TSE_MODIFIER_BASE, TSE_MODIFIER,
TSE_CONSTRAINT_BASE, TSE_CONSTRAINT)) {^^^ In this case I think you can just do if (tselem->type == 0), this is how other areas of the code check an object ID isn't one of its subtypes. On Tue, May 29, 2012 at 12:59 AM, Dan Eicher <[email protected]> wrote: > Revision: 47143 > > http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47143 > Author: dna > Date: 2012-05-28 22:59:11 +0000 (Mon, 28 May 2012) > Log Message: > ----------- > 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 > > Modified Paths: > -------------- > trunk/blender/source/blender/editors/space_outliner/outliner_edit.c > > Modified: trunk/blender/source/blender/editors/space_outliner/outliner_edit.c > =================================================================== > --- trunk/blender/source/blender/editors/space_outliner/outliner_edit.c > 2012-05-28 22:10:59 UTC (rev 47142) > +++ trunk/blender/source/blender/editors/space_outliner/outliner_edit.c > 2012-05-28 22:59:11 UTC (rev 47143) > @@ -1426,7 +1426,8 @@ > /* 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 @@ > 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; > } > > > _______________________________________________ > Bf-blender-cvs mailing list > [email protected] > http://lists.blender.org/mailman/listinfo/bf-blender-cvs -- - Campbell _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
