From 07eda4ee55cdd0bef51741363fb88eafac10a17d Mon Sep 17 00:00:00 2001 From: Gyedo Jeon Date: Sat, 15 May 2010 00:13:40 +0000 Subject: [PATCH] Added flipped persp coll plane --- direct/src/wxwidgets/ViewPort.py | 8 ++++++++ direct/src/wxwidgets/WxPandaShell.py | 2 ++ 2 files changed, 10 insertions(+) diff --git a/direct/src/wxwidgets/ViewPort.py b/direct/src/wxwidgets/ViewPort.py index 94fd796b9f..03ea318bfb 100755 --- a/direct/src/wxwidgets/ViewPort.py +++ b/direct/src/wxwidgets/ViewPort.py @@ -230,6 +230,14 @@ class Viewport(wx.Panel, DirectObject): collPlane.setIntoCollideMask(BitMask32.bit(21)|oldBitmask) v.collPlane = NodePath(collPlane) v.collPlane.reparentTo(v.grid) + + collPlane2 = CollisionNode('PerspGridCol2') + collPlane2.addSolid(CollisionPlane(Plane(0, 0, -1, 0))) + oldBitmask = collPlane2.getIntoCollideMask() + collPlane2.setIntoCollideMask(BitMask32.bit(21)|oldBitmask) + v.collPlane2 = NodePath(collPlane2) + v.collPlane2.reparentTo(v.grid) + #v.grid.gridBack.findAllMatches("**/+GeomNode")[0].setName("_perspViewGridBack") LE_showInOneCam(v.grid, 'persp') return v diff --git a/direct/src/wxwidgets/WxPandaShell.py b/direct/src/wxwidgets/WxPandaShell.py index 83073c64f2..37630767c2 100755 --- a/direct/src/wxwidgets/WxPandaShell.py +++ b/direct/src/wxwidgets/WxPandaShell.py @@ -178,6 +178,8 @@ class WxPandaShell(WxAppShell): base.direct.manipulationControl.supportMultiView() base.direct.cameraControl.useMayaCamControls = 1 base.direct.cameraControl.perspCollPlane = self.perspView.collPlane + base.direct.cameraControl.perspCollPlane2 = self.perspView.collPlane2 + for widget in base.direct.manipulationControl.widgetList: widget.setBin('gui-popup', 0) widget.setDepthTest(0)