From b1daa2b2ff495250ec15fdb58682351f6d35f413 Mon Sep 17 00:00:00 2001 From: Justin Butler Date: Fri, 1 Apr 2005 00:32:36 +0000 Subject: [PATCH] Added optional skip flags to be able to ignore certain types of geometry for select detection. --- direct/src/directtools/DirectManipulation.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/direct/src/directtools/DirectManipulation.py b/direct/src/directtools/DirectManipulation.py index ab5938c92c..1a76d55018 100644 --- a/direct/src/directtools/DirectManipulation.py +++ b/direct/src/directtools/DirectManipulation.py @@ -35,6 +35,7 @@ class DirectManipulationControl(PandaObject): ['shift-f', self.objectHandles.growToFit], ['i', self.plantSelectedNodePath], ] + self.optionalSkipFlags = 0 def manipulationStart(self, modifiers): # Start out in select mode @@ -86,8 +87,9 @@ class DirectManipulationControl(PandaObject): # depending on flag..... if self.mode == 'select': # Check for object under mouse - # Don't intersect with hidden or backfacing objects - skipFlags = SKIP_HIDDEN | SKIP_BACKFACE + # Don't intersect with hidden or backfacing objects, as well as any + # optionally specified things + skipFlags = SKIP_HIDDEN | SKIP_BACKFACE | self.optionalSkipFlags # Skip camera (and its children), unless control key is pressed skipFlags |= SKIP_CAMERA * (1 - base.getControl()) entry = direct.iRay.pickGeom(skipFlags = skipFlags)