[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22448] branches/soc-2009-yukishiro: merge till 22447

Jingyuan Huang jingyuan.huang at gmail.com
Fri Aug 14 05:42:59 CEST 2009


Revision: 22448
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22448
Author:   yukishiro
Date:     2009-08-14 05:42:57 +0200 (Fri, 14 Aug 2009)

Log Message:
-----------
merge till 22447

Modified Paths:
--------------
    branches/soc-2009-yukishiro/config/darwin-config.py
    branches/soc-2009-yukishiro/intern/smoke/extern/smoke_API.h
    branches/soc-2009-yukishiro/intern/smoke/intern/FLUID_3D.cpp
    branches/soc-2009-yukishiro/intern/smoke/intern/FLUID_3D.h
    branches/soc-2009-yukishiro/intern/smoke/intern/FLUID_3D_STATIC.cpp
    branches/soc-2009-yukishiro/intern/smoke/intern/smoke_API.cpp
    branches/soc-2009-yukishiro/projectfiles_vc9/blender/blenkernel/BKE_blenkernel.vcproj
    branches/soc-2009-yukishiro/projectfiles_vc9/blender/editors/ED_editors.vcproj
    branches/soc-2009-yukishiro/projectfiles_vc9/gameengine/converter/KX_converter.vcproj
    branches/soc-2009-yukishiro/projectfiles_vc9/gameengine/ketsji/KX_ketsji.vcproj
    branches/soc-2009-yukishiro/release/ui/buttons_data_mesh.py
    branches/soc-2009-yukishiro/release/ui/buttons_data_modifier.py
    branches/soc-2009-yukishiro/release/ui/buttons_game.py
    branches/soc-2009-yukishiro/release/ui/buttons_material.py
    branches/soc-2009-yukishiro/release/ui/buttons_object.py
    branches/soc-2009-yukishiro/release/ui/buttons_object_constraint.py
    branches/soc-2009-yukishiro/release/ui/buttons_physics_smoke.py
    branches/soc-2009-yukishiro/release/ui/buttons_scene.py
    branches/soc-2009-yukishiro/release/ui/buttons_texture.py
    branches/soc-2009-yukishiro/release/ui/buttons_world.py
    branches/soc-2009-yukishiro/release/ui/space_info.py
    branches/soc-2009-yukishiro/source/Makefile
    branches/soc-2009-yukishiro/source/blender/blenkernel/BKE_pointcache.h
    branches/soc-2009-yukishiro/source/blender/blenkernel/BKE_unit.h
    branches/soc-2009-yukishiro/source/blender/blenkernel/intern/brush.c
    branches/soc-2009-yukishiro/source/blender/blenkernel/intern/multires.c
    branches/soc-2009-yukishiro/source/blender/blenkernel/intern/scene.c
    branches/soc-2009-yukishiro/source/blender/blenkernel/intern/smoke.c
    branches/soc-2009-yukishiro/source/blender/blenkernel/intern/unit.c
    branches/soc-2009-yukishiro/source/blender/blenloader/intern/readfile.c
    branches/soc-2009-yukishiro/source/blender/editors/animation/anim_channels_edit.c
    branches/soc-2009-yukishiro/source/blender/editors/interface/interface.c
    branches/soc-2009-yukishiro/source/blender/editors/object/object_modifier.c
    branches/soc-2009-yukishiro/source/blender/editors/sculpt_paint/sculpt.c
    branches/soc-2009-yukishiro/source/blender/editors/space_outliner/outliner.c
    branches/soc-2009-yukishiro/source/blender/editors/space_time/space_time.c
    branches/soc-2009-yukishiro/source/blender/editors/space_time/time_header.c
    branches/soc-2009-yukishiro/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2009-yukishiro/source/blender/editors/space_view3d/view3d_draw.c
    branches/soc-2009-yukishiro/source/blender/editors/transform/transform.c
    branches/soc-2009-yukishiro/source/blender/makesdna/DNA_brush_types.h
    branches/soc-2009-yukishiro/source/blender/makesdna/DNA_scene_types.h
    branches/soc-2009-yukishiro/source/blender/makesdna/DNA_smoke_types.h
    branches/soc-2009-yukishiro/source/blender/makesdna/DNA_texture_types.h
    branches/soc-2009-yukishiro/source/blender/makesdna/DNA_userdef_types.h
    branches/soc-2009-yukishiro/source/blender/makesrna/RNA_access.h
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_brush.c
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_constraint.c
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_smoke.c
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_space.c
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_texture.c
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_userdef.c
    branches/soc-2009-yukishiro/source/blender/render/intern/source/pipeline.c
    branches/soc-2009-yukishiro/source/nan_definitions.mk

Added Paths:
-----------
    branches/soc-2009-yukishiro/release/ui/space_time.py

Modified: branches/soc-2009-yukishiro/config/darwin-config.py
===================================================================
--- branches/soc-2009-yukishiro/config/darwin-config.py	2009-08-14 01:48:05 UTC (rev 22447)
+++ branches/soc-2009-yukishiro/config/darwin-config.py	2009-08-14 03:42:57 UTC (rev 22448)
@@ -63,7 +63,7 @@
 	# BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
 	BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}'
 	BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}'
-	# BF_PYTHON_LINKFLAGS = '-u _PyMac_Error -framework System'
+	# BF_PYTHON_LINKFLAGS = ['-u', '_PyMac_Error', '-framework', 'System']
 else:
 	# python 2.5 etc. uses built-in framework
 
@@ -79,9 +79,9 @@
 	BF_PYTHON_BINARY = '${BF_PYTHON}${BF_PYTHON_VERSION}/bin/python${BF_PYTHON_VERSION}'
 	BF_PYTHON_LIB = ''
 	BF_PYTHON_LIBPATH = '${BF_PYTHON}${BF_PYTHON_VERSION}/lib/python${BF_PYTHON_VERSION}/config'
-	BF_PYTHON_LINKFLAGS = '-u _PyMac_Error -framework System -framework Python'
+	BF_PYTHON_LINKFLAGS = ['-u','_PyMac_Error','-framework','System','-framework','Python']
 	if MAC_CUR_VER=='10.3' or  MAC_CUR_VER=='10.4':
-		BF_PYTHON_LINKFLAGS ='-u __dummy '+BF_PYTHON_LINKFLAGS
+		BF_PYTHON_LINKFLAGS = ['-u', '__dummy']+BF_PYTHON_LINKFLAGS
 	
 BF_QUIET = '1'
 WITH_BF_OPENMP = '0'
@@ -205,7 +205,7 @@
 WITH_BF_STATICOPENGL = True
 BF_OPENGL_LIB = 'GL GLU'
 BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries'
-BF_OPENGL_LINKFLAGS = '-framework OpenGL'
+BF_OPENGL_LINKFLAGS = ['-framework', 'OpenGL']
 
 # LAPACK
 BF_LAPACK = LIBDIR + "/lapack"
@@ -218,7 +218,7 @@
 CPPFLAGS = ['-fpascal-strings']
 CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fpascal-strings']
 CXXFLAGS = [ '-pipe','-fPIC','-funsigned-char', '-fpascal-strings']
-PLATFORM_LINKFLAGS = '-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime'
+PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Carbon','-framework','AGL','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','QuickTime']
 
 #note to build succesfully on 10.3.9 SDK you need to patch  10.3.9 by adding the SystemStubs.a lib from 10.4
 LLIBS = ['stdc++', 'SystemStubs', 'lapack', 'blas']
@@ -227,12 +227,12 @@
 if MAC_MIN_VERS == '10.3':
 	CFLAGS = ['-fuse-cxa-atexit']+CFLAGS
 	CXXFLAGS = ['-fuse-cxa-atexit']+CXXFLAGS
-	PLATFORM_LINKFLAGS = '-fuse-cxa-atexit '+PLATFORM_LINKFLAGS
+	PLATFORM_LINKFLAGS = ['-fuse-cxa-atexit']+PLATFORM_LINKFLAGS
 	LLIBS.append('crt3.o')
 	
 if USE_SDK==True:
 	SDK_FLAGS=['-isysroot', MACOSX_SDK,'-mmacosx-version-min='+MAC_MIN_VERS]	
-	PLATFORM_LINKFLAGS = '-mmacosx-version-min='+MAC_MIN_VERS+ ' -Wl,-syslibroot,' + MACOSX_SDK+" "+PLATFORM_LINKFLAGS
+	PLATFORM_LINKFLAGS = ['-mmacosx-version-min='+MAC_MIN_VERS, '-Wl,-syslibroot,' + MACOSX_SDK]+PLATFORM_LINKFLAGS
 	CCFLAGS=SDK_FLAGS+CCFLAGS
 	CXXFLAGS=SDK_FLAGS+CXXFLAGS
 	

Modified: branches/soc-2009-yukishiro/intern/smoke/extern/smoke_API.h
===================================================================
--- branches/soc-2009-yukishiro/intern/smoke/extern/smoke_API.h	2009-08-14 01:48:05 UTC (rev 22447)
+++ branches/soc-2009-yukishiro/intern/smoke/extern/smoke_API.h	2009-08-14 03:42:57 UTC (rev 22448)
@@ -36,7 +36,7 @@
 void smoke_free(struct FLUID_3D *fluid);
 
 void smoke_initBlenderRNA(struct FLUID_3D *fluid, float *alpha, float *beta);
-void smoke_step(struct FLUID_3D *fluid);
+void smoke_step(struct FLUID_3D *fluid, size_t framenr);
 
 float *smoke_get_density(struct FLUID_3D *fluid);
 float *smoke_get_heat(struct FLUID_3D *fluid);
@@ -49,6 +49,8 @@
 size_t smoke_get_index(int x, int max_x, int y, int max_y, int z);
 size_t smoke_get_index2d(int x, int max_x, int y);
 
+void smoke_dissolve(struct FLUID_3D *fluid, int speed, int log);
+
 // wavelet turbulence functions
 struct WTURBULENCE *smoke_turbulence_init(int *res, int amplify, int noisetype);
 void smoke_turbulence_free(struct WTURBULENCE *wt);
@@ -59,6 +61,8 @@
 void smoke_turbulence_set_noise(struct WTURBULENCE *wt, int type);
 void smoke_initWaveletBlenderRNA(struct WTURBULENCE *wt, float *strength);
 
+void smoke_dissolve_wavelet(struct WTURBULENCE *wt, int speed, int log);
+
 #ifdef __cplusplus
 }
 #endif

Modified: branches/soc-2009-yukishiro/intern/smoke/intern/FLUID_3D.cpp
===================================================================
--- branches/soc-2009-yukishiro/intern/smoke/intern/FLUID_3D.cpp	2009-08-14 01:48:05 UTC (rev 22447)
+++ branches/soc-2009-yukishiro/intern/smoke/intern/FLUID_3D.cpp	2009-08-14 03:42:57 UTC (rev 22448)
@@ -101,6 +101,8 @@
 	_h			  = new float[_totalCells];
 	_Precond	  = new float[_totalCells];
 
+	// DG TODO: check if alloc went fine
+
 	for (int x = 0; x < _totalCells; x++)
 	{
 		_density[x]      = 0.0f;
@@ -219,7 +221,10 @@
 {
 	// wipe forces
 	for (int i = 0; i < _totalCells; i++)
+	{
 		_xForce[i] = _yForce[i] = _zForce[i] = 0.0f;
+		_obstacles[i] &= ~2;
+	}
 
 	wipeBoundaries();
 
@@ -683,16 +688,17 @@
 
 	const float dt0 = _dt / _dx;
 	// use force arrays as temp arrays
-  for (int x = 0; x < _totalCells; x++)
-    _xForce[x] = _yForce[x] = 0.0;
+	for (int x = 0; x < _totalCells; x++)
+		_xForce[x] = _yForce[x] = 0.0;
+
 	float* t1 = _xForce;
 	float* t2 = _yForce;
 
-	advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _densityOld, _density, t1,t2, res, NULL);
-	advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _heatOld, _heat, t1,t2, res, NULL);
-	advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _xVelocityOld, _xVelocity, t1,t2, res, NULL);
-	advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _yVelocityOld, _yVelocity, t1,t2, res, NULL);
-	advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _zVelocityOld, _zVelocity, t1,t2, res, NULL);
+	advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _densityOld, _density, t1,t2, res, _obstacles);
+	advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _heatOld, _heat, t1,t2, res, _obstacles);
+	advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _xVelocityOld, _xVelocity, t1,t2, res, _obstacles);
+	advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _yVelocityOld, _yVelocity, t1,t2, res, _obstacles);
+	advectFieldMacCormack(dt0, _xVelocityOld, _yVelocityOld, _zVelocityOld, _zVelocityOld, _zVelocity, t1,t2, res, _obstacles);
 
 	if(DOMAIN_BC_LEFT == 0) copyBorderX(_xVelocity, res);
 	else setZeroX(_xVelocity, res);

Modified: branches/soc-2009-yukishiro/intern/smoke/intern/FLUID_3D.h
===================================================================
--- branches/soc-2009-yukishiro/intern/smoke/intern/FLUID_3D.h	2009-08-14 01:48:05 UTC (rev 22447)
+++ branches/soc-2009-yukishiro/intern/smoke/intern/FLUID_3D.h	2009-08-14 03:42:57 UTC (rev 22448)
@@ -161,13 +161,13 @@
 		static void advectFieldSemiLagrange(const float dt, const float* velx, const float* vely,  const float* velz,
 				float* oldField, float* newField, Vec3Int res);
 		static void advectFieldMacCormack(const float dt, const float* xVelocity, const float* yVelocity, const float* zVelocity, 
-				float* oldField, float* newField, float* temp1, float* temp2, Vec3Int res, const float* obstacles);
+				float* oldField, float* newField, float* temp1, float* temp2, Vec3Int res, const unsigned char* obstacles);
 
 		// maccormack helper functions
 		static void clampExtrema(const float dt, const float* xVelocity, const float* yVelocity,  const float* zVelocity,
 				float* oldField, float* newField, Vec3Int res);
 		static void clampOutsideRays(const float dt, const float* xVelocity, const float* yVelocity,  const float* zVelocity,
-				float* oldField, float* newField, Vec3Int res, const float* obstacles, const float *oldAdvection);
+				float* oldField, float* newField, Vec3Int res, const unsigned char* obstacles, const float *oldAdvection);
 
 		// output helper functions
 		// static void writeImageSliceXY(const float *field, Vec3Int res, int slice, string prefix, int picCnt, float scale=1.);

Modified: branches/soc-2009-yukishiro/intern/smoke/intern/FLUID_3D_STATIC.cpp
===================================================================
--- branches/soc-2009-yukishiro/intern/smoke/intern/FLUID_3D_STATIC.cpp	2009-08-14 01:48:05 UTC (rev 22447)
+++ branches/soc-2009-yukishiro/intern/smoke/intern/FLUID_3D_STATIC.cpp	2009-08-14 03:42:57 UTC (rev 22448)
@@ -338,7 +338,7 @@
 // comments are the pseudocode from selle's paper
 //////////////////////////////////////////////////////////////////////
 void FLUID_3D::advectFieldMacCormack(const float dt, const float* xVelocity, const float* yVelocity, const float* zVelocity,
-		float* oldField, float* newField, float* temp1, float* temp2, Vec3Int res, const float* obstacles)
+		float* oldField, float* newField, float* temp1, float* temp2, Vec3Int res, const unsigned char* obstacles)
 {
 	float* phiHatN  = temp1;
 	float* phiHatN1 = temp2;
@@ -459,7 +459,7 @@
 // incorrect
 //////////////////////////////////////////////////////////////////////
 void FLUID_3D::clampOutsideRays(const float dt, const float* velx, const float* vely, const float* velz,
-		float* oldField, float* newField, Vec3Int res, const float* obstacles, const float *oldAdvection)
+		float* oldField, float* newField, Vec3Int res, const unsigned char* obstacles, const float *oldAdvection)
 {
 	const int sx= res[0];
 	const int sy= res[1];

Modified: branches/soc-2009-yukishiro/intern/smoke/intern/smoke_API.cpp
===================================================================
--- branches/soc-2009-yukishiro/intern/smoke/intern/smoke_API.cpp	2009-08-14 01:48:05 UTC (rev 22447)
+++ branches/soc-2009-yukishiro/intern/smoke/intern/smoke_API.cpp	2009-08-14 03:42:57 UTC (rev 22448)
@@ -63,8 +63,19 @@
 	 wt = NULL;
 }
 
-extern "C" void smoke_step(FLUID_3D *fluid)
+extern "C" size_t smoke_get_index(int x, int max_x, int y, int max_y, int z /*, int max_z */)
 {
+	// // const int index = x + y * smd->res[0] + z * smd->res[0]*smd->res[1];
+	return x + y * max_x + z * max_x*max_y;
+}
+

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list