Commits

Pierre-Yves David committed 7b8ebfb

patches pushed to svn

Comments (0)

Files changed (13)

0001-Jiba-s-version-of-laser.render.patch

-From 9351d5270cd709792684f3ddf59464878347466d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?David=20Mart=C3=ADnez=20Mart=C3=AD?= <deavid@deavidbox.(none)>
-Date: Sun, 17 Jan 2010 12:47:46 +0100
-Subject: [PATCH 1/8] Jiba's version of laser.render
-
----
- soya/laser.py |   39 +++++++++++++++++++--------------------
- 1 files changed, 19 insertions(+), 20 deletions(-)
-
-diff --git a/soya/laser.py b/soya/laser.py
-index a7f9f8e..a8e2d27 100644
---- a/soya/laser.py
-+++ b/soya/laser.py
-@@ -54,36 +54,38 @@ class Laser(PythonCoordSyst):
- 		
- 		self.points = []
- 
--		#list containing a couple of (point, direc)
-+		#list containing points
- 		to_draw = []
- 		
- 		pos   = self.position()
- 		direc = Vector(self, 0.0, 0.0, -1.0)
--		if not self.collide:
--			pos   = pos + (direc * 32000.0)
--			to_draw.append((pos, None))
--		else:
--			nb_reflect = 0
-+		if self.collide:
-+			i = 0
- 			raypicker = self.get_root()
--			while direc is not None and (nb_reflect <= self.max_reflect):
--				nb_reflect = nb_reflect + 1
-+			while direc is not None and (i <= self.max_reflect):
-+				i = i + 1
-+
- 				impact = raypicker.raypick(pos, direc, -1.0)
- 				if not impact:
--					direc = None
- 					pos   = pos + (direc * 32000.0)
-+					direc = None
- 				else:
- 					pos = impact[0]
- 					
--					if not self.reflect:
--						direc = None
--					else:
-+					if self.reflect:
- 						normal = impact[1] % self
- 						normal.normalize() # changing coordsys can alterate normal size
- 						normal.set_length(-2.0 * direc.dot_product(normal))
- 						direc = normal + direc
--				
--				to_draw.append((pos, direc))
-+						
-+					else:
-+						direc = None
-+						
-+				to_draw.append(pos)
- 				self.points.append(pos)
-+		else:
-+			pos   = pos + (direc * 32000.0)
-+			to_draw.append(pos)
- 
- 		#rendering part
- 		DEFAULT_MATERIAL.activate()
-@@ -91,16 +93,13 @@ class Laser(PythonCoordSyst):
- 		glDisable(GL_LIGHTING)
- 		
- 		glColor4f(*self.color)
--		glBegin(GL_LINES)
-+		glBegin(GL_LINE_STRIP)
- 		glVertex3f(0.0, 0.0, 0.0)
--		for pos, direct in to_draw:
-+		for pos in to_draw:
- 			glVertex3f(*self.transform_point(pos.x, pos.y, pos.z, pos.parent))
--			if direc: glVertex3f(*self.transform_point(pos.x, pos.y, pos.z, pos.parent))
--			
- 			
- 		glEnd()
- 		
- 		glEnable(GL_LIGHTING)
- 		glEnable(GL_TEXTURE_2D)
--		
--
-+	
--- 
-1.6.5.6
-

0002-Tutorial-ode-collision-7-convert-number-of-particles.patch

-From cc54386920b1667dfc3ea9b325467e40a251e3ca Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?David=20Mart=C3=ADnez=20Mart=C3=AD?= <deavid@deavidbox.(none)>
-Date: Sun, 17 Jan 2010 18:13:31 +0100
-Subject: [PATCH 2/8] Tutorial ode collision 7: convert number of particles to int
-
-Removes the following warnings:
-ode-collision-7-hit_func-3-contacts.py:204: DeprecationWarning: integer argument expected, got float
-  s = soya.Smoke(self.parent,nb_particles=12*nl)
-ode-collision-7-hit_func-3-contacts.py:211: DeprecationWarning: integer argument expected, got float
-  s = soya.Smoke(self.parent,nb_particles=12*nl)
----
- .../ode-collision-7-hit_func-3-contacts.py         |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/soya/tutorial/ode-collision-7-hit_func-3-contacts.py b/soya/tutorial/ode-collision-7-hit_func-3-contacts.py
-index cd8a154..a331772 100644
---- a/soya/tutorial/ode-collision-7-hit_func-3-contacts.py
-+++ b/soya/tutorial/ode-collision-7-hit_func-3-contacts.py
-@@ -198,7 +198,7 @@ class LaserCamera(soya.Camera):
- 				target.add_force(self.laser_vector*self.laser_power,impact)
- 				
- 				l = sqrt(self.laser_power/1000.)
--				nl = sqrt(l)
-+				nl = int(sqrt(l))
- 				#create particle
- 				# first corresponding to the dust of the planet
- 				s = soya.Smoke(self.parent,nb_particles=12*nl)
--- 
-1.6.5.6
-

0003-tutorial-pudding-meter-update-the-import-of-meter-li.patch

-From c0895ec6f3d420c167afbf7f2139c261426e4179 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?David=20Mart=C3=ADnez=20Mart=C3=AD?= <deavid@deavidbox.(none)>
-Date: Sun, 17 Jan 2010 18:16:20 +0100
-Subject: [PATCH 3/8] tutorial pudding-meter: update the import of meter library
-
----
- soya/tutorial/pudding-meter-1.py |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/soya/tutorial/pudding-meter-1.py b/soya/tutorial/pudding-meter-1.py
-index 3b67264..7d94de0 100644
---- a/soya/tutorial/pudding-meter-1.py
-+++ b/soya/tutorial/pudding-meter-1.py
-@@ -7,7 +7,7 @@ import sys, os
- import soya
- import soya.pudding as pudding
- 
--import pudding.ext.meter
-+import soya.pudding.ext.meter
- 
- soya.init()
- soya.path.append(os.path.join(os.path.dirname(sys.argv[0]), "data"))
-@@ -33,7 +33,7 @@ camera.z = 3.
- 
- soya.set_root_widget(pudding.core.RootWidget())
- 
--meter = pudding.ext.meter.Meter(soya.root_widget, min=0, max=100,
-+meter = soya.pudding.ext.meter.Meter(soya.root_widget, min=0, max=100,
- 																left=10, top=10, width=100, height=20)
- meter.border_color = (1, 1, 1, 1)
- 
--- 
-1.6.5.6
-

0004-Tutorial-particle-1-remove-the-deprecation-warning.patch

-From fc93ce84bf276c107622f2b6b69935c31e22a829 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?David=20Mart=C3=ADnez=20Mart=C3=AD?= <deavid@deavidbox.(none)>
-Date: Sun, 17 Jan 2010 18:20:03 +0100
-Subject: [PATCH 4/8] Tutorial particle-1: remove the deprecation warning.
-
----
- soya/tutorial/particle-1.py |   11 +++++------
- 1 files changed, 5 insertions(+), 6 deletions(-)
-
-diff --git a/soya/tutorial/particle-1.py b/soya/tutorial/particle-1.py
-index e00e8d9..b2a21d3 100644
---- a/soya/tutorial/particle-1.py
-+++ b/soya/tutorial/particle-1.py
-@@ -26,7 +26,6 @@ import sys, os, os.path, soya
- from random import random
- from math import sqrt
- from soya import sdlconst
--from soya import particle
- 
- soya.init()
- soya.path.append(os.path.join(os.path.dirname(sys.argv[0]), "data"))
-@@ -50,23 +49,23 @@ scene = soya.World()
- 
- # here we use the built in FireWork system. auto_generate_particle is 
- # on by default so this will continue forever
--#fountain = particle.FlagFirework(scene, nb_particles=4, nb_sub_particles=10)
-+#fountain = soya.FlagFirework(scene, nb_particles=4, nb_sub_particles=10)
- 
- # this is slightly more dull
- # you will notice that this doesnt automatically set auto_generate_particle
--smoke=particle.Smoke(scene)
-+smoke=soya.Smoke(scene)
- 
- # here we use the same smoke particle system but set auto_generate_particle
- # so that it continues
--#smoke=particle.Smoke(scene)
-+#smoke=soya.Smoke(scene)
- #smoke.auto_generate_particle=1
- 
- # its also possible to create your own particle systems
- # i dont think you can beat looking at the source file model/particle.pyx
- # for understanding how to do this 
--class MyParticleSystem(particle.Smoke):
-+class MyParticleSystem(soya.Smoke):
- 	def __init__(self,parent):
--		particle.Particles.__init__(self,parent,nb_max_particles=50)
-+		soya.Particles.__init__(self,parent,nb_max_particles=50)
- 		self.set_colors((1.0, 1.0, 1.0, 1.0), (1.0, 0.0, 0.0,0.5),(1.0,1.0,0.,0.5),(0.5,0.5,0.5,0.5),(0.,0.,0.,0.5))
- 		self.set_sizes ((0.19, 0.19), (0.35, 0.35))
- 		self.auto_generate_particle=1
--- 
-1.6.5.6
-

0005-Tutorial-particles-1-Change-the-default-example-to-b.patch

-From e0dde94b84167cacf8053f949b60553aaa394759 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?David=20Mart=C3=ADnez=20Mart=C3=AD?= <deavid@deavidbox.(none)>
-Date: Sun, 17 Jan 2010 18:26:22 +0100
-Subject: [PATCH 5/8] Tutorial particles-1: Change the default example to be autogenerating particles by default.
-
-When someone sees this tutorial, seems to be acting
-odd, because he sees two or three particles, and then
-nothing more.
-
-I prefer to set auto_generate_particle=1 as default.
----
- soya/tutorial/particle-1.py |    6 +++---
- 1 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/soya/tutorial/particle-1.py b/soya/tutorial/particle-1.py
-index b2a21d3..dd42923 100644
---- a/soya/tutorial/particle-1.py
-+++ b/soya/tutorial/particle-1.py
-@@ -53,12 +53,12 @@ scene = soya.World()
- 
- # this is slightly more dull
- # you will notice that this doesnt automatically set auto_generate_particle
--smoke=soya.Smoke(scene)
-+#smoke=soya.Smoke(scene)
- 
- # here we use the same smoke particle system but set auto_generate_particle
- # so that it continues
--#smoke=soya.Smoke(scene)
--#smoke.auto_generate_particle=1
-+smoke=soya.Smoke(scene)
-+smoke.auto_generate_particle=1
- 
- # its also possible to create your own particle systems
- # i dont think you can beat looking at the source file model/particle.pyx
--- 
-1.6.5.6
-

0006-Correct-the-import-for-elementtree-used-in-svgelemen.patch

-From 363458ebd26be7beb85aaf09c997c0b885bd4e44 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?David=20Mart=C3=ADnez=20Mart=C3=AD?= <deavid@deavidbox.(none)>
-Date: Sun, 17 Jan 2010 18:37:27 +0100
-Subject: [PATCH 6/8] Correct the import for elementtree (used in svgelements)
-
-ElementTree is called xml.etree in some systems.
----
- soya/pudding/ext/svgelements.py |    4 +++-
- 1 files changed, 3 insertions(+), 1 deletions(-)
-
-diff --git a/soya/pudding/ext/svgelements.py b/soya/pudding/ext/svgelements.py
---- a/soya/pudding/ext/svgelements.py
-+++ b/soya/pudding/ext/svgelements.py
-@@ -20,7 +20,10 @@
- from soya.opengl import *
- 
- try:
--	from elementtree import ElementTree
-+	try:
-+		from elementtree import ElementTree
-+	except ImportError:
-+		from xml.etree import ElementTree
- except ImportError:
- 	raise "You need elementtree from http://effbot.org/zone/element-index.htm"
- 

0007-Tutorial-ode-mass-delete-exit-0-call-to-allow-the-pr.patch

-From c00cee5470d80ca87955166ea5bbd0ef91d0c02a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?David=20Mart=C3=ADnez=20Mart=C3=AD?= <deavid@deavidbox.(none)>
-Date: Sun, 17 Jan 2010 18:42:13 +0100
-Subject: [PATCH 7/8] Tutorial ode-mass: delete exit(0) call to allow the program run.
-
----
- soya/tutorial/ode-mass.py |    1 -
- 1 files changed, 0 insertions(+), 1 deletions(-)
-
-diff --git a/soya/tutorial/ode-mass.py b/soya/tutorial/ode-mass.py
-index 5f9bde6..f171673 100644
---- a/soya/tutorial/ode-mass.py
-+++ b/soya/tutorial/ode-mass.py
-@@ -61,7 +61,6 @@ assert b.mass == m
- m.mass+=3
- assert b.mass < m
- 
--sys.exit(0)
- # load a model
- head_model = soya.Model.get("caterpillar_head")
- # instanciate two Body
--- 
-1.6.5.6
-

0008-Change-ode-join-tutorial-to-show-a-double-pendulum-e.patch

-From e1d663d3190ef8a30a37a01c6b2ab1c6bd05d686 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?David=20Mart=C3=ADnez=20Mart=C3=AD?= <deavid@deavidbox.(none)>
-Date: Sun, 17 Jan 2010 19:41:06 +0100
-Subject: [PATCH 8/8] Change ode-join tutorial to show a double-pendulum example of joints
-
----
- soya/tutorial/ode-join.py |   31 ++++++++++++++++++++-----------
- 1 files changed, 20 insertions(+), 11 deletions(-)
-
-diff --git a/soya/tutorial/ode-join.py b/soya/tutorial/ode-join.py
-index 43f2f17..f55ca3e 100644
---- a/soya/tutorial/ode-join.py
-+++ b/soya/tutorial/ode-join.py
-@@ -27,30 +27,39 @@ sword.ode = True
- sword.x = 1.0
- sword.z = -5
- 
--blade = soya.BoxedMass(0.00005,50,5,1)
--pommeau = soya.SphericalMass(50,0.5)
--pommeau.translate((25,0,0))
-+sword2 = soya.Body(scene,sword_model)
-+sword2.ode = True
-+sword2.x = 1.0
-+sword2.z = -3
-+
-+blade = soya.BoxedMass(0.05,50,5,1)
-+pommeau = soya.SphericalMass(10,0.5)
-+pommeau.translate((2,0,0))
- sword.mass = blade+pommeau
- 
--joint = soya.BallJoint(sword)
-+blade2 = soya.BoxedMass(0.015,50,5,1)
-+blade2.translate((1,0,0))
-+sword2.mass = blade2
-+
-+joint1 = soya.HingeJoint(sword2)
-+joint2 = soya.HingeJoint(sword,sword2)
- 
- 
- 
- def v (x,y,z):
- 	return soya.Vector(sword,x,y,z)
--sword.add_force(v(10,200,0),v(25,0.001,0.002))
--sword.add_force(v(0,60,0),v(0,25,0.5))
--sword.add_force(v(0,0,-2303*5),v(-25,0.0001,0.0001))
-+sword2.add_force(v(-10,50,0),v(2,0.01,0.02))
-+sword.add_force(v(10,50,0),v(2,0.01,0.02))
- 
--scene.turn_x = 34
--scene.turn_y = 23
--scene.turn_z = 12
- 
- light = soya.Light(scene)
- light.set_xyz(0, 0, 15)
- 
- camera = soya.Camera(scene)
--camera.set_xyz(1,1,15)
-+camera.set_xyz(10,1,2)
-+camera.look_at(sword)
-+camera.rotate_y(50)
-+camera.rotate_x(10)
- 
- 
- scene.set_xyz(0.5,0.5,-5)
--- 
-1.6.5.6
-

init_moreverbose_sdl_opengl.diff

-From: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
-
-Add some message to soya init
-
-the "Waiting for OpenGL initialization" message is intended to help people
-diagnostics a slow startup
-
-The "* Soya * Using XXX Surface." is intended  to help people diagnostics SDL
-issues.
-
-diff -r 7decdb3bdc22 soya/init.pyx
---- a/soya/init.pyx	Sun Jan 17 18:49:05 2010 +0100
-+++ b/soya/init.pyx	Sun Jan 17 20:07:30 2010 +0100
-@@ -241,10 +241,12 @@
- 	#cdef unsigned int flags
- 	cdef int flags
- 	cdef SDL_VideoInfo* info
-+	cdef void* tmp
- 	renderer.screen_width  = width
- 	renderer.screen_height = height
- 	# Information about the current video settings
--	info = <SDL_VideoInfo*> SDL_GetVideoInfo() # cast for constness adjustment
-+	tmp = SDL_GetVideoInfo()
-+	info = <SDL_VideoInfo*> tmp  # cast for constness adjustment
- 	if info == NULL:
- 		s = "Video query failed : %s" % SDL_GetError()
- 		sys.stderr.write(s + '\n')
-@@ -260,9 +262,16 @@
- 		renderer.engine_option = renderer.engine_option |  FULLSCREEN
- 		flags = flags | SDL_FULLSCREEN
- 	
--	if resizable == 1:    flags = flags | SDL_RESIZABLE
--	if info.hw_available: flags = flags | SDL_HWSURFACE
--	else:                 flags = flags | SDL_SWSURFACE
-+	if resizable == 1:
-+		flags = flags | SDL_RESIZABLE
-+	if info.hw_available:
-+		if not quiet:
-+			sys.stdout.write("* Soya * Using Hardware Surface.\n")
-+		flags = flags | SDL_HWSURFACE
-+	else:
-+		if not quiet:
-+			sys.stdout.write("* Soya * Using Software Surface.\n")
-+		flags = flags | SDL_SWSURFACE
- # Useless (see http://www.devolution.com/pipermail/sdl/2004-September/064784.html)
- #	if info.blit_hw :     flags = flags | SDL_HWACCEL
- 	stencil = 16
-@@ -292,11 +301,17 @@
- 	# Wait until OpenGL is REALLY ready
- 	cdef int i
- 	from time import sleep
-+	if not quiet:
-+		sys.stdout.write("* Soya * OpenGL initialization ")
- 	for i from 0 <= i < 10:
- 		if glGetString(GL_RENDERER) != NULL: break
-+		if not quiet:
-+			sys.stdout.write(".")
- 		sleep(0.1)
- 	else:
--		sys.stderr.write("* Soya * ERROR : OpenGL is not ready... Soya will crash soon i guess :-(\n")
-+		sys.stderr.write("\n* Soya * ERROR : OpenGL is not ready... Soya will crash soon i guess :-(\n")
-+	if not quiet:
-+		sys.stdout.write(" [OK]\n")
- 	
- 		
- 	glViewport(0, 0, renderer.screen_width, renderer.screen_height)
-setup_framework_define.diff
-unittest_explicit_argument_name.diff
-init_moreverbose_sdl_opengl.diff
-0001-Jiba-s-version-of-laser.render.patch
-0002-Tutorial-ode-collision-7-convert-number-of-particles.patch
-0003-tutorial-pudding-meter-update-the-import-of-meter-li.patch
-0004-Tutorial-particle-1-remove-the-deprecation-warning.patch
-0005-Tutorial-particles-1-Change-the-default-example-to-b.patch
-0006-Correct-the-import-for-elementtree-used-in-svgelemen.patch
-0007-Tutorial-ode-mass-delete-exit-0-call-to-allow-the-pr.patch
-0008-Change-ode-join-tutorial-to-show-a-double-pendulum-e.patch
-unittest_event_lgc_common_deps.diff

setup_framework_define.diff

-From: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
-
-Remove -DHAS_FRAMEWORK stuff from COMPILE_ARGS in setup.py
-
-This is already handled by DEFINES dictionnary.
-
-
-diff -r d68399314b69 -r 5255043f6e70 soya/setup.py
---- a/soya/setup.py	Sun Jan 17 00:29:08 2010 +0000
-+++ b/soya/setup.py	Sun Jan 17 18:36:31 2010 +0100
-@@ -195,7 +195,6 @@
- 		LIBS.remove(lib)
- 	for framework in FRAMEWORKS:
- 		DEFINES.append(('HAS_FRAMEWORK_%s'%framework.upper(),1))
--		COMPILE_ARGS.append('-DHAS_FRAMEWORK_%s ' % framework.upper())
- 		LINK_ARGS += ('-framework', framework)
- 
- # Taken from Twisted ; thanks to Christopher Armstrong :

unittest_event_lgc_common_deps.diff

-From: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
-
-[test] Remove dependency to logilab-common in unittest_event
-
-EventsTC was using the assertIn methode only defined in
-Logilab.common.testlib.TestCase.
-
-
-diff -r 3f822ea0598e -r 2f0d098adb03 soya/test/unittest_events.py
---- a/soya/test/unittest_events.py	Sun Jan 17 19:52:12 2010 +0100
-+++ b/soya/test/unittest_events.py	Sun Jan 17 20:01:42 2010 +0100
-@@ -62,12 +62,11 @@
- 
- class EventsTC(SoyaTestCase):
- 
--
- 	def test_queue_event(self):
- 		self.main_loop.queue_event(DOWN_LEFT)
- 		self.run_soya_rounds()
--		self.assertIn(DOWN_LEFT, self.main_loop.raw_events)
--		self.assertIn(DOWN_LEFT, self.main_loop.events)
-+		self.assertTrue(DOWN_LEFT in self.main_loop.raw_events)
-+		self.assertTrue(DOWN_LEFT in self.main_loop.events)
- 
- 	def test_no_coalesced(self):
- 		input_ev = [DOWN_LEFT, MOUSE_MOTION_1, DOWN_A]

unittest_explicit_argument_name.diff

-From: Pierre-Yves David <pierre-yves.david@ens-lyon.org>
-
-[cosmetic][test] pass the "swap_buffer" argument by name to improve test clarity
-
-
-diff -r afb4704245cf -r 7decdb3bdc22 soya/test/unittest_render.py
---- a/soya/test/unittest_render.py	Sun Jan 17 18:42:48 2010 +0100
-+++ b/soya/test/unittest_render.py	Sun Jan 17 18:49:05 2010 +0100
-@@ -53,7 +53,7 @@
- 
- 		# Screenshot in back buffer
- 		soya.set_root_widget(self.red_camera)
--		soya.render(False)
-+		soya.render(swap_buffer=False)
- 		screenshot = soya.screenshot(use_back_buffer=True)
- 		self.assertEquals(screenshot.getpixel((0,0)),(255, 0, 0))
- 
-@@ -65,7 +65,7 @@
- 
- 		# Screenshot in back buffer
- 		soya.set_root_widget(self.red_camera)
--		soya.render(False)
-+		soya.render(swap_buffer=False)
- 
- 		# Front buffer didn't changed
- 		screenshot = soya.screenshot()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.