[visionegg] Model3DS "on" parameter
- From: Tony Arkles <tony@xxxxxxxxx>
- To: visionegg@xxxxxxxxxxxxx
- Date: Tue, 16 Aug 2005 09:37:21 -0600
Now that VE is using subversion, I can start submitting actual patches
:D Sweet.
This one adds the "on" parameter functionality to the Model3DS stimuli.
It is against the svn checkout I made this morning.
I tried running conform.py to ensure that I didn't break anything, and
had a startling surprise:
ERROR: test_gratings_singrating2d_mask (__main__.VETestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Tony\visionegg\test\conform.py", line 424, in
test_gratings_singratin
g2d_mask
mask = VisionEgg.Textures.Mask2D()
File "C:\Python24\Lib\site-packages\VisionEgg\Textures.py", line 1213,
in __in
it__
gl.glActiveTextureARB(gl.GL_TEXTURE1_ARB) # Need PyOpenGL >= 2.0
GLerror: [Errno (1282,)] Dynamic function loading not
implemented/supported on t
his platform
I don't think that this is the result of this patch though. I have
tested it with the application that I'm working on and it seems to work
correctly.
Index: src/Lib3DS.py
===================================================================
--- src/Lib3DS.py (revision 1340)
+++ src/Lib3DS.py (working copy)
@@ -63,6 +63,8 @@
Default: (0.0, 0.0, 0.0)
scale -- (Sequence3 of Real)
Default: (1.0, 1.0, 1.0)
+ on -- (Boolean)
+ Default: True
Constant Parameters
===================
@@ -89,6 +91,7 @@
ve_types.Real),
'orient_axis':((0.0, 1.0, 0.0),
ve_types.Sequence3(ve_types.Real)),
+ 'on':(True, ve_types.Boolean),
}
constant_parameters_and_defaults = {'filename':(None,
ve_types.String),
@@ -199,6 +202,8 @@
def draw(self):
# call the C function that does the work
p = self.parameters
+ if p.on == False:
+ return
VisionEgg._lib3ds.draw(self._lib3ds_file,
self.tex_dict,
p.scale[0],
Index: setup.py
===================================================================
--- setup.py (revision 1340)
+++ setup.py (working copy)
@@ -75,7 +75,7 @@
ext_modules = [] # filled in later
# Fill out ext_modules
-skip_c_compilation = 0
+skip_c_compilation = 1
if not skip_c_compilation:
if sys.platform == 'darwin':
gl_extra_link_args = ['-framework','OpenGL']
- Follow-Ups:
- [visionegg] Re: Model3DS "on" parameter
- From: Tony Arkles
- [visionegg] Re: Model3DS "on" parameter
- From: Andrew Straw
Other related posts:
- » [visionegg] Model3DS "on" parameter
- » [visionegg] Re: Model3DS "on" parameter
- » [visionegg] Re: Model3DS "on" parameter
- [visionegg] Re: Model3DS "on" parameter
- From: Tony Arkles
- [visionegg] Re: Model3DS "on" parameter
- From: Andrew Straw