[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [15366] branches/soc-2008-unclezeiv: svn merge -r 15303:15365 https://svn.blender.org/svnroot/bf-blender/trunk/ blender

Davide Vercelli davide.vercelli at gmail.com
Fri Jun 27 03:23:38 CEST 2008


Revision: 15366
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15366
Author:   unclezeiv
Date:     2008-06-27 03:23:26 +0200 (Fri, 27 Jun 2008)

Log Message:
-----------
svn merge -r 15303:15365 https://svn.blender.org/svnroot/bf-blender/trunk/blender

Modified Paths:
--------------
    branches/soc-2008-unclezeiv/extern/libredcode/debayer.c
    branches/soc-2008-unclezeiv/projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj
    branches/soc-2008-unclezeiv/projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj
    branches/soc-2008-unclezeiv/release/scripts/DirectX8Exporter.py
    branches/soc-2008-unclezeiv/release/scripts/bpymodules/BPyArmature.py
    branches/soc-2008-unclezeiv/source/blender/blenkernel/BKE_ipo.h
    branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/action.c
    branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/image.c
    branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/modifier.c
    branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/particle_system.c
    branches/soc-2008-unclezeiv/source/blender/blenkernel/intern/sca.c
    branches/soc-2008-unclezeiv/source/blender/blenlib/BLI_arithb.h
    branches/soc-2008-unclezeiv/source/blender/blenlib/intern/arithb.c
    branches/soc-2008-unclezeiv/source/blender/blenloader/intern/readfile.c
    branches/soc-2008-unclezeiv/source/blender/blenloader/intern/writefile.c
    branches/soc-2008-unclezeiv/source/blender/imbuf/IMB_imbuf_types.h
    branches/soc-2008-unclezeiv/source/blender/imbuf/intern/anim.c
    branches/soc-2008-unclezeiv/source/blender/include/BIF_butspace.h
    branches/soc-2008-unclezeiv/source/blender/include/BIF_interface.h
    branches/soc-2008-unclezeiv/source/blender/include/BIF_oops.h
    branches/soc-2008-unclezeiv/source/blender/include/butspace.h
    branches/soc-2008-unclezeiv/source/blender/include/transform.h
    branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_actuator_types.h
    branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_controller_types.h
    branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_object_types.h
    branches/soc-2008-unclezeiv/source/blender/makesdna/DNA_sensor_types.h
    branches/soc-2008-unclezeiv/source/blender/nodes/intern/CMP_nodes/CMP_math.c
    branches/soc-2008-unclezeiv/source/blender/python/api2_2x/CurNurb.c
    branches/soc-2008-unclezeiv/source/blender/python/api2_2x/Mathutils.c
    branches/soc-2008-unclezeiv/source/blender/python/api2_2x/doc/Curve.py
    branches/soc-2008-unclezeiv/source/blender/render/intern/source/pipeline.c
    branches/soc-2008-unclezeiv/source/blender/src/buttons_editing.c
    branches/soc-2008-unclezeiv/source/blender/src/buttons_logic.c
    branches/soc-2008-unclezeiv/source/blender/src/buttons_scene.c
    branches/soc-2008-unclezeiv/source/blender/src/editmesh_mods.c
    branches/soc-2008-unclezeiv/source/blender/src/editobject.c
    branches/soc-2008-unclezeiv/source/blender/src/editseq.c
    branches/soc-2008-unclezeiv/source/blender/src/editsima.c
    branches/soc-2008-unclezeiv/source/blender/src/interface.c
    branches/soc-2008-unclezeiv/source/blender/src/oops.c
    branches/soc-2008-unclezeiv/source/blender/src/sequence.c
    branches/soc-2008-unclezeiv/source/blender/src/space.c
    branches/soc-2008-unclezeiv/source/blender/src/transform.c
    branches/soc-2008-unclezeiv/source/blender/src/transform_constraints.c
    branches/soc-2008-unclezeiv/source/blender/src/transform_snap.c
    branches/soc-2008-unclezeiv/source/creator/creator.c
    branches/soc-2008-unclezeiv/source/gameengine/Converter/BL_ActionActuator.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Converter/BL_ActionActuator.h
    branches/soc-2008-unclezeiv/source/gameengine/Converter/BL_BlenderDataConversion.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Converter/BL_ShapeDeformer.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Converter/BL_ShapeDeformer.h
    branches/soc-2008-unclezeiv/source/gameengine/Converter/BL_SkinDeformer.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Converter/BL_SkinDeformer.h
    branches/soc-2008-unclezeiv/source/gameengine/Converter/KX_ConvertActuators.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Converter/KX_ConvertControllers.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Converter/KX_ConvertSensors.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Expressions/Value.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Expressions/Value.h
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_AlwaysSensor.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_AlwaysSensor.h
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_IActuator.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_IActuator.h
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_IController.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_IController.h
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_IObject.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_IObject.h
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_ISensor.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_ISensor.h
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_JoystickSensor.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_JoystickSensor.h
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_KeyboardSensor.h
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_LogicManager.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_MouseSensor.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_MouseSensor.h
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_PropertySensor.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_PropertySensor.h
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_RandomSensor.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_RandomSensor.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_BulletPhysicsController.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_GameObject.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_GameObject.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_IPhysicsController.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_MouseFocusSensor.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_ObjectActuator.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_ObjectActuator.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_RadarSensor.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_RaySensor.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_RaySensor.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_Scene.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_SumoPhysicsController.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_TouchSensor.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_TouchSensor.h
    branches/soc-2008-unclezeiv/source/gameengine/PyDoc/KX_GameObject.py

Added Paths:
-----------
    branches/soc-2008-unclezeiv/release/scripts/animation_bake_constraints.py
    branches/soc-2008-unclezeiv/release/scripts/c3d_import.py
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_NANDController.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_NANDController.h
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_NORController.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_NORController.h
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_XNORController.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_XNORController.h
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_XORController.cpp
    branches/soc-2008-unclezeiv/source/gameengine/GameLogic/SCA_XORController.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_SCA_DynamicActuator.h
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_StateActuator.cpp
    branches/soc-2008-unclezeiv/source/gameengine/Ketsji/KX_StateActuator.h

Modified: branches/soc-2008-unclezeiv/extern/libredcode/debayer.c
===================================================================
--- branches/soc-2008-unclezeiv/extern/libredcode/debayer.c	2008-06-27 01:05:31 UTC (rev 15365)
+++ branches/soc-2008-unclezeiv/extern/libredcode/debayer.c	2008-06-27 01:23:26 UTC (rev 15366)
@@ -9,8 +9,6 @@
 	int x,y;
 	int pix_max = 4096;
 	int mask = pix_max - 1;
-	float Kb = 0.0722;
-	float Kr = 0.2126;
 	float *o;
 
 	for (y = 0; y < height; y++) {
@@ -25,9 +23,9 @@
 			float y2  = (planes[3][i] & mask);
 			float y2p = (planes[3][i_p] & mask);
 
-			float b_ = cb * (1.0 - Kb)/(pix_max/2);
-			float r_ = cr * (1.0 - Kr)/(pix_max/2);
-			float g_ = (- Kr * r_ - Kb * b_)/(1.0 - Kr - Kb);
+			float b_ = cb /(pix_max/2);
+			float r_ = cr /(pix_max/2);
+			float g_ = 0.0;
 		
 			float y_[4] = {y1 / pix_max, 
 				       (y2 + y2p)/2 / pix_max, 
@@ -68,8 +66,6 @@
 	int x,y;
 	int pix_max = 4096;
 	int mask = pix_max - 1;
-	float Kb = 0.0722;
-	float Kr = 0.2126;
 
 	for (y = 0; y < height; y++) {
 		float *o = out + width * (height - y - 1);
@@ -80,9 +76,9 @@
 			float cr  = (planes[2][i] & mask)  - pix_max/2;
 			float y2  = (planes[3][i] & mask);
 
-			float b_ = cb * (1.0 - Kb)/(pix_max/2);
-			float r_ = cr * (1.0 - Kr)/(pix_max/2);
-			float g_ = (- Kr * r_ - Kb * b_)/(1.0 - Kr - Kb);
+			float b_ = cb /(pix_max/2);
+			float r_ = cr /(pix_max/2);
+			float g_ = 0.0;
 			
 			float y = (y1 + y2)/2 / pix_max;
 
@@ -101,8 +97,6 @@
 	int x,y;
 	int pix_max = 4096;
 	int mask = pix_max - 1;
-	float Kb = 0.0722;
-	float Kr = 0.2126;
 
 	for (y = 0; y < height; y += 2) {
 		float *o = out + (width/2) * (height/2 - y/2 - 1);
@@ -113,9 +107,9 @@
 			float cr  = (planes[2][i] & mask)  - pix_max/2;
 			float y2  = planes[3][i] & mask;
 
-			float b_ = cb * (1.0 - Kb)/(pix_max/2);
-			float r_ = cr * (1.0 - Kr)/(pix_max/2);
-			float g_ = (- Kr * r_ - Kb * b_)/(1.0 - Kr - Kb);
+			float b_ = cb /(pix_max/2);
+			float r_ = cr /(pix_max/2);
+			float g_ = 0.0;
 			
 			float y = (y1 + y2)/2 / pix_max;
 			

Modified: branches/soc-2008-unclezeiv/projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj
===================================================================
--- branches/soc-2008-unclezeiv/projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj	2008-06-27 01:05:31 UTC (rev 15365)
+++ branches/soc-2008-unclezeiv/projectfiles_vc7/gameengine/gamelogic/SCA_GameLogic.vcproj	2008-06-27 01:23:26 UTC (rev 15366)
@@ -396,6 +396,12 @@
 				RelativePath="..\..\..\source\gameengine\GameLogic\SCA_MouseSensor.cpp">
 			</File>
 			<File
+				RelativePath="..\..\..\source\gameengine\GameLogic\SCA_NANDController.cpp">
+			</File>
+			<File
+				RelativePath="..\..\..\source\gameengine\GameLogic\SCA_NORController.cpp">
+			</File>
+			<File
 				RelativePath="..\..\..\source\gameengine\GameLogic\SCA_ORController.cpp">
 			</File>
 			<File
@@ -425,6 +431,12 @@
 			<File
 				RelativePath="..\..\..\source\gameengine\GameLogic\SCA_TimeEventManager.cpp">
 			</File>
+			<File
+				RelativePath="..\..\..\source\gameengine\GameLogic\SCA_XNORController.cpp">
+			</File>
+			<File
+				RelativePath="..\..\..\source\gameengine\GameLogic\SCA_XORController.cpp">
+			</File>
 		</Filter>
 		<Filter
 			Name="Header Files"
@@ -499,6 +511,12 @@
 				RelativePath="..\..\..\source\gameengine\GameLogic\SCA_MouseSensor.h">
 			</File>
 			<File
+				RelativePath="..\..\..\source\gameengine\GameLogic\SCA_NANDController.h">
+			</File>
+			<File
+				RelativePath="..\..\..\source\gameengine\GameLogic\SCA_NORController.h">
+			</File>
+			<File
 				RelativePath="..\..\..\source\gameengine\GameLogic\SCA_ORController.h">
 			</File>
 			<File
@@ -528,6 +546,12 @@
 			<File
 				RelativePath="..\..\..\source\gameengine\GameLogic\SCA_TimeEventManager.h">
 			</File>
+			<File
+				RelativePath="..\..\..\source\gameengine\GameLogic\SCA_XNORController.h">
+			</File>
+			<File
+				RelativePath="..\..\..\source\gameengine\GameLogic\SCA_XORController.h">
+			</File>
 		</Filter>
 	</Files>
 	<Globals>

Modified: branches/soc-2008-unclezeiv/projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj
===================================================================
--- branches/soc-2008-unclezeiv/projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj	2008-06-27 01:05:31 UTC (rev 15365)
+++ branches/soc-2008-unclezeiv/projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj	2008-06-27 01:23:26 UTC (rev 15366)
@@ -463,6 +463,9 @@
 					RelativePath="..\..\..\source\gameengine\Ketsji\KX_SCA_AddObjectActuator.cpp">
 				</File>
 				<File
+					RelativePath="..\..\..\source\gameengine\Ketsji\KX_SCA_DynamicActuator.cpp">
+				</File>
+				<File
 					RelativePath="..\..\..\source\gameengine\Ketsji\KX_SCA_EndObjectActuator.cpp">
 				</File>
 				<File
@@ -475,6 +478,9 @@
 					RelativePath="..\..\..\source\gameengine\Ketsji\KX_SoundActuator.cpp">
 				</File>
 				<File
+					RelativePath="..\..\..\source\gameengine\Ketsji\KX_StateActuator.cpp">
+				</File>
+				<File
 					RelativePath="..\..\..\source\gameengine\Ketsji\KX_TrackToActuator.cpp">
 				</File>
 				<File
@@ -684,6 +690,9 @@
 					RelativePath="..\..\..\source\gameengine\Ketsji\KX_SCA_AddObjectActuator.h">
 				</File>
 				<File
+					RelativePath="..\..\..\source\gameengine\Ketsji\KX_SCA_DynamicActuator.h">
+				</File>
+				<File
 					RelativePath="..\..\..\source\gameengine\Ketsji\KX_SCA_EndObjectActuator.h">
 				</File>
 				<File
@@ -696,6 +705,9 @@
 					RelativePath="..\..\..\source\gameengine\Ketsji\KX_SoundActuator.h">
 				</File>
 				<File
+					RelativePath="..\..\..\source\gameengine\Ketsji\KX_StateActuator.h">
+				</File>
+				<File
 					RelativePath="..\..\..\source\gameengine\Ketsji\KX_TrackToActuator.h">
 				</File>
 				<File

Modified: branches/soc-2008-unclezeiv/release/scripts/DirectX8Exporter.py
===================================================================
--- branches/soc-2008-unclezeiv/release/scripts/DirectX8Exporter.py	2008-06-27 01:05:31 UTC (rev 15365)
+++ branches/soc-2008-unclezeiv/release/scripts/DirectX8Exporter.py	2008-06-27 01:23:26 UTC (rev 15366)
@@ -6,9 +6,9 @@
 # Group: 'Export'
 # Tooltip: 'Export to DirectX text file format format for XNA Animation Component Library.'
 """
-__author__ = "minahito (original:Arben (Ben) Omari)"
-__url__ = ("blender", "blenderartists.org", "Adjuster's site http://sunday-lab.blogspot.com/, Author's site http://www.omariben.too.it")
-__version__ = "3.0"
+__author__ = "vertex color exporting feature is added by mnemoto (original:minahito (original:Arben (Ben) Omari))"
+__url__ = ("blender", "elysiun", "Adjuster's site http://sunday-lab.blogspot.com/, Author's site http://www.omariben.too.it","Adjuster's site http://ex.homeunix.net/")
+__version__ = "3.1"
 
 __bpydoc__ = """\
 This script exports a Blender mesh with armature to DirectX 8's text file
@@ -444,6 +444,7 @@
 		self.writeMeshMaterialList(obj, mesh, tex)
 		self.writeMeshNormals(obj, mesh)
 		self.writeMeshTextureCoords(obj, mesh)
+		self.writeMeshVertexColors(obj, mesh)
 		self.file.write("  }  // End of the Mesh %s \n" % (obj.name))
 		
 					
@@ -464,6 +465,7 @@
 				self.writeMeshMaterialList(obj, mesh, tex)
 				self.writeMeshNormals(obj, mesh)
 				self.writeMeshTextureCoords(obj, mesh)
+				self.writeMeshVertexColors(obj, mesh)
 				self.file.write(" }\n")
 				self.file.write("}\n")
 				ind = objs.index(obj)
@@ -1047,6 +1049,32 @@
 						self.file.write(",\n")
 
 			self.file.write("}  //End of MeshTextureCoords\n")
+
+	#***********************************************
+	#MESH VORTEX COLORS
+	#***********************************************
+	def writeMeshVertexColors(self, name, mesh):
+		if mesh.hasVertexColours():
+			self.file.write("MeshVertexColors {\n")
+			#VERTICES NUMBER
+			numvert = reduce( lambda i,f: len(f)+i, mesh.faces, 0)
+			self.file.write("%d;\n" % (numvert))
+			#VERTEX COLORS
+			
+			vcounter =0
+			for f in mesh.faces:
+				col = f.col
+				for i,c in enumerate(col):
+					# Note vcol alpha has no meaning
+					self.file.write("%d;%f;%f;%f;%f;" % (vcounter,c.r/255.0, c.g/255.0, c.b/255.0, 1.0)) # c.a/255.0))
+					vcounter+=1
+					if vcounter == numvert :
+						self.file.write(";\n")
+					else :
+						self.file.write(",\n")
+
+			self.file.write("}  //End of MeshVertexColors\n")
+
 #***********************************************#***********************************************#***********************************************
 	#***********************************************
 	#FRAMES

Copied: branches/soc-2008-unclezeiv/release/scripts/animation_bake_constraints.py (from rev 15365, trunk/blender/release/scripts/animation_bake_constraints.py)
===================================================================
--- branches/soc-2008-unclezeiv/release/scripts/animation_bake_constraints.py	                        (rev 0)
+++ branches/soc-2008-unclezeiv/release/scripts/animation_bake_constraints.py	2008-06-27 01:23:26 UTC (rev 15366)
@@ -0,0 +1,800 @@
+#!BPY
+
+"""
+Name: 'Bake Constraints'
+Blender: 246
+Group: 'Animation'
+Tooltip: 'Bake a Constrained object/rig to IPOs'
+Fillename: 'Bake_Constraint.py'
+"""
+
+__author__ = "Roger Wickes (rogerwickes(at)yahoo.com)"
+__script__ = "Bake Constraints"
+__version__ = "0.6"
+__url__ = ["Communicate problems and errors, http://www.blenderartists.com/forum/private.php?do=newpm to PapaSmurf"]
+__email__= ["Roger Wickes, rogerwickes at yahoo.com", "scripts"]
+__bpydoc__ = """\
+
+bake_constraints
+
+This script bakes the real-world LocRot of an object (the net effect of any constraints - 
+(Copy, Limit, Track, Follow, - that affect Location, Rotation)
+(usually one constrained to match another's location and/or Tracked to another)
+and creates a clone with a set of Ipo Curves named Ipo<objname>
+These curves control a non-constrained object and thus make it mimic the constrained object
+Actions can be then be edited without the need for the drivers/constraining objects
+
+Developed for use with MoCap data, where a bone is constrained to point at an empty
+moving through space and time. This records the actual locrot of the armature
+so that the motion can be edited, reoriented, scaled, and used as NLA Actions
+
+see also wiki Scripts/Manual/ Sandbox/Animation/Bake_Constraints (tbd)
+
+Usage:<br>
+ - Select the reference Object(s) you want to bake <br>
+ - Set the frame range to bake in the Anim Panel <br>

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list