Text archives Help
- From:
- To:
- Subject: [Manta] r2308 - trunk/SwigInterface
- Date: Wed, 23 Jul 2008 15:39:12 -0600 (MDT)
Author: abe
Date: Wed Jul 23 15:39:11 2008
New Revision: 2308
Modified:
trunk/SwigInterface/manta.i
trunk/SwigInterface/wxManta.py
Log:
Added Ambient occlusion material to swig/python
M SwigInterface/manta.i
Removed 'A' key to add remove animation callback, instead added space
key to start and stop renderer time.
M SwigInterface/wxManta.py
Modified: trunk/SwigInterface/manta.i
==============================================================================
--- trunk/SwigInterface/manta.i (original)
+++ trunk/SwigInterface/manta.i Wed Jul 23 15:39:11 2008
@@ -236,6 +236,7 @@
#include <Model/Materials/ThinDielectric.h>
#include <Model/Materials/Flat.h>
#include <Model/Materials/Transparent.h>
+#include <Model/Materials/AmbientOcclusion.h>
#include <Model/Primitives/PrimitiveCommon.h>
#include <Model/Primitives/Cylinder.h>
#include <Model/Primitives/Cube.h>
@@ -259,6 +260,7 @@
%include <Model/Materials/ThinDielectric.h>
%include <Model/Materials/Flat.h>
%include <Model/Materials/Transparent.h>
+%include <Model/Materials/AmbientOcclusion.h>
%include <Model/Primitives/PrimitiveCommon.h>
%include <Model/Primitives/Cylinder.h>
%include <Model/Primitives/Cube.h>
Modified: trunk/SwigInterface/wxManta.py
==============================================================================
--- trunk/SwigInterface/wxManta.py (original)
+++ trunk/SwigInterface/wxManta.py Wed Jul 23 15:39:11 2008
@@ -620,14 +620,11 @@
self.OnTKey(event)
elif key == 'V':
self.OnAutoView(None)
- elif key == 'A':
- if (self.animationCallbackHandle == None):
- self.animationCallbackHandle =
self.engine.registerSerialAnimationCallback(manta_new(createMantaAnimationCallback(self.animationCallback,
())))
- print self.animationCallbackHandle
- else:
- print "Unregistering animation callback"
-
self.engine.unregisterCallback(self.animationCallbackHandle)
- self.animationCallbackHandle = None
+ elif key == ' ':
+ # Start or stop animation time.
+ self.engine.addTransaction("toggle animation time",
+
manta_new(createMantaTransaction(self.ToggleAnimationTime,())))
+
else:
print "Unknown key '%s'" % key
else:
@@ -641,9 +638,11 @@
###########################################################################
## animationCallback
###########################################################################
- def animationCallback(self, proc, numProcs, return_parameters):
- print "proc = %s, numProcs = %s, changed = %s" % (proc, numProcs,
return_parameters["changed"])
- return_parameters["changed"] = True
+ def ToggleAnimationTime(self):
+ if (self.engine.timeIsStopped()):
+ self.engine.startTime();
+ else:
+ self.engine.stopTime();
###########################################################################
## OnShowDialog
- [Manta] r2308 - trunk/SwigInterface, abe, 07/23/2008
Archive powered by MHonArc 2.6.16.