[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12061] branches/cloth/blender: Marge with trunk: svn merge -r 12050:12057 https://svn.blender.org/svnroot /bf-blender/trunk/blender
Daniel Genrich
daniel.genrich at gmx.net
Mon Sep 17 13:10:24 CEST 2007
Revision: 12061
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12061
Author: genscher
Date: 2007-09-17 13:10:23 +0200 (Mon, 17 Sep 2007)
Log Message:
-----------
Marge with trunk: svn merge -r 12050:12057 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Modified Paths:
--------------
branches/cloth/blender/intern/elbeem/SConscript
branches/cloth/blender/intern/elbeem/intern/attributes.cpp
branches/cloth/blender/intern/elbeem/intern/paraloop.h
branches/cloth/blender/intern/elbeem/intern/paraloopend.h
branches/cloth/blender/intern/elbeem/intern/paraloopstart.h
branches/cloth/blender/intern/elbeem/intern/particletracer.cpp
branches/cloth/blender/source/blender/imbuf/intern/thumbs.c
branches/cloth/blender/source/blender/python/BPY_interface.c
branches/cloth/blender/source/blender/python/api2_2x/Mesh.c
branches/cloth/blender/source/blender/python/api2_2x/Noise.c
branches/cloth/blender/source/blender/python/api2_2x/Pose.c
branches/cloth/blender/source/blender/python/api2_2x/bpy_data.c
branches/cloth/blender/source/blender/render/intern/source/rayshade.c
branches/cloth/blender/source/blender/render/intern/source/texture.c
branches/cloth/blender/source/blender/src/buttons_scene.c
branches/cloth/blender/source/blender/src/buttons_shading.c
branches/cloth/blender/source/blender/src/editmesh_mods.c
branches/cloth/blender/source/blender/src/editnla.c
branches/cloth/blender/source/blender/src/editscreen.c
branches/cloth/blender/source/blender/src/filelist.c
branches/cloth/blender/source/blender/src/transform.c
branches/cloth/blender/source/blender/src/transform_generics.c
Modified: branches/cloth/blender/intern/elbeem/SConscript
===================================================================
--- branches/cloth/blender/intern/elbeem/SConscript 2007-09-17 11:07:28 UTC (rev 12060)
+++ branches/cloth/blender/intern/elbeem/SConscript 2007-09-17 11:10:23 UTC (rev 12061)
@@ -5,7 +5,7 @@
sources = env.Glob('intern/*.cpp')
-defs = 'NOGUI ELBEEM_BLENDER=1'
+defs = 'PARALLEL NOGUI ELBEEM_BLENDER=1'
if env['OURPLATFORM']=='win32-vc':
defs += ' USE_MSVC6FIXES'
incs = env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC'] + ' ' +env['BF_SDL_INC']
Modified: branches/cloth/blender/intern/elbeem/intern/attributes.cpp
===================================================================
--- branches/cloth/blender/intern/elbeem/intern/attributes.cpp 2007-09-17 11:07:28 UTC (rev 12060)
+++ branches/cloth/blender/intern/elbeem/intern/attributes.cpp 2007-09-17 11:10:23 UTC (rev 12061)
@@ -103,6 +103,7 @@
// set that a parameter can be given, and will be ignored...
bool AttributeList::ignoreParameter(string name, string source) {
+ name=source=(""); // remove warning
return false;
}
Modified: branches/cloth/blender/intern/elbeem/intern/paraloop.h
===================================================================
--- branches/cloth/blender/intern/elbeem/intern/paraloop.h 2007-09-17 11:07:28 UTC (rev 12060)
+++ branches/cloth/blender/intern/elbeem/intern/paraloop.h 2007-09-17 11:10:23 UTC (rev 12061)
@@ -32,7 +32,6 @@
{ \
jend = mLevel[mMaxRefine].lSizey-gridLoopBound; \
} \
- if(jstart<1) jstart = 1; \
LbmFloat *ccel = NULL, *tcel = NULL; \
CellFlagType *pFlagSrc=NULL, *pFlagDst=NULL; \
if(mLevel[mMaxRefine].setCurr==1) { \
@@ -43,8 +42,8 @@
temp = id; /* dummy remove warning */ \
} \
+// if(jstart<1) jstart = 1;
-
#define unused_GRID_REGION_END() \
} /* main_region */ \
// end unusedGRID_REGION_END
Modified: branches/cloth/blender/intern/elbeem/intern/paraloopend.h
===================================================================
--- branches/cloth/blender/intern/elbeem/intern/paraloopend.h 2007-09-17 11:07:28 UTC (rev 12060)
+++ branches/cloth/blender/intern/elbeem/intern/paraloopend.h 2007-09-17 11:10:23 UTC (rev 12061)
@@ -3,9 +3,8 @@
int i=0;
ADVANCE_POINTERS(2*gridLoopBound);
} /* j */
- /* COMPRESSGRIDS!=1 */
#pragma omp barrier
-
+ /* COMPRESSGRIDS!=1 */
/* int i=0; */
/* ADVANCE_POINTERS(mLevel[lev].lSizex*2); */
} /* all cell loop k,j,i */
Modified: branches/cloth/blender/intern/elbeem/intern/paraloopstart.h
===================================================================
--- branches/cloth/blender/intern/elbeem/intern/paraloopstart.h 2007-09-17 11:07:28 UTC (rev 12060)
+++ branches/cloth/blender/intern/elbeem/intern/paraloopstart.h 2007-09-17 11:10:23 UTC (rev 12061)
@@ -1,3 +1,3 @@
-#pragma omp parallel section num_threads(MAX_THREADS) \
-reduction(+: calcCurrentMass, calcCurrentVolume, calcCellsFilled, calcCellsEmptied, calcNumUsedCells)
+#pragma omp parallel num_threads(MAX_THREADS) \
+reduction(+: calcCurrentMass, calcCurrentVolume, calcCellsFilled, calcCellsEmptied, calcNumUsedCells)
Modified: branches/cloth/blender/intern/elbeem/intern/particletracer.cpp
===================================================================
--- branches/cloth/blender/intern/elbeem/intern/particletracer.cpp 2007-09-17 11:07:28 UTC (rev 12060)
+++ branches/cloth/blender/intern/elbeem/intern/particletracer.cpp 2007-09-17 11:10:23 UTC (rev 12061)
@@ -325,6 +325,7 @@
// suppress warnings...
vertices = NULL; triangles = NULL;
normals = NULL; objectId = 0;
+ time = 0.0;
#else // ELBEEM_PLUGIN
int pcnt = 0;
// currently not used in blender
Modified: branches/cloth/blender/source/blender/imbuf/intern/thumbs.c
===================================================================
--- branches/cloth/blender/source/blender/imbuf/intern/thumbs.c 2007-09-17 11:07:28 UTC (rev 12060)
+++ branches/cloth/blender/source/blender/imbuf/intern/thumbs.c 2007-09-17 11:10:23 UTC (rev 12061)
@@ -48,6 +48,7 @@
#include <shlobj.h> /* for SHGetSpecialFolderPath, has to be done before BLI_winstuff because 'near' is disabled through BLI_windstuff */
#include "BLI_winstuff.h"
#include <process.h> /* getpid */
+#include <direct.h> /* chdir */
#else
#include <unistd.h>
#endif
@@ -64,8 +65,6 @@
static int get_thumb_dir( char* dir , ThumbSize size)
{
- char* home;
-
#ifdef WIN32
/* yes, applications shouldn't store data there, but so does GIMP :)*/
SHGetSpecialFolderPath(0, dir, CSIDL_PROFILE, 0);
@@ -120,7 +119,7 @@
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x20,0x20,0x20,0x3F,0x20
};
-static const char hex[16] = "0123456789abcdef";
+static const char hex[17] = "0123456789abcdef";
/* Note: This escape function works on file: URIs, but if you want to
* escape something else, please read RFC-2396 */
@@ -180,7 +179,7 @@
return 0;
}
/* on windows, using always uppercase drive/volume letter in uri */
- vol[0] = toupper(dir[0]);
+ vol[0] = (unsigned char)toupper(dir[0]);
vol[1] = ':';
vol[2] = '\0';
strcat(orig_uri, vol);
Modified: branches/cloth/blender/source/blender/python/BPY_interface.c
===================================================================
--- branches/cloth/blender/source/blender/python/BPY_interface.c 2007-09-17 11:07:28 UTC (rev 12060)
+++ branches/cloth/blender/source/blender/python/BPY_interface.c 2007-09-17 11:10:23 UTC (rev 12061)
@@ -273,25 +273,32 @@
void syspath_append( char *dirname )
{
- PyObject *mod_sys, *dict, *path, *dir;
-
+ PyObject *mod_sys= NULL, *dict= NULL, *path= NULL, *dir= NULL;
+ short ok=1;
PyErr_Clear( );
dir = Py_BuildValue( "s", dirname );
mod_sys = PyImport_ImportModule( "sys" ); /* new ref */
- dict = PyModule_GetDict( mod_sys ); /* borrowed ref */
- path = PyDict_GetItemString( dict, "path" ); /* borrowed ref */
+
+ if (mod_sys) {
+ dict = PyModule_GetDict( mod_sys ); /* borrowed ref */
+ path = PyDict_GetItemString( dict, "path" ); /* borrowed ref */
+ if ( !PyList_Check( path ) ) {
+ ok = 0;
+ }
+ } else {
+ /* cant get the sys module */
+ ok = 0;
+ }
- if( !PyList_Check( path ) )
- return;
+ if (ok && PyList_Append( path, dir ) != 0)
+ ok = 0; /* append failed */
- PyList_Append( path, dir );
+ if( (ok==0) || PyErr_Occurred( ) )
+ Py_FatalError( "could import or build sys.path, can't continue" );
- if( PyErr_Occurred( ) )
- Py_FatalError( "could not build sys.path" );
-
- Py_DECREF( mod_sys );
+ Py_XDECREF( mod_sys );
}
void init_syspath( int first_time )
Modified: branches/cloth/blender/source/blender/python/api2_2x/Mesh.c
===================================================================
--- branches/cloth/blender/source/blender/python/api2_2x/Mesh.c 2007-09-17 11:07:28 UTC (rev 12060)
+++ branches/cloth/blender/source/blender/python/api2_2x/Mesh.c 2007-09-17 11:10:23 UTC (rev 12061)
@@ -1345,8 +1345,8 @@
static PyObject *Mesh_setProperty_internal(CustomData *data, int eindex, PyObject *args)
{
CustomDataLayer *layer;
- int i,index, type = -1;
- float f;
+ int i = 0, index, type = -1;
+ float f = 0.0f;
char *s=NULL, *name=NULL;
MFloatProperty *pf;
MIntProperty *pi;
Modified: branches/cloth/blender/source/blender/python/api2_2x/Noise.c
===================================================================
--- branches/cloth/blender/source/blender/python/api2_2x/Noise.c 2007-09-17 11:07:28 UTC (rev 12060)
+++ branches/cloth/blender/source/blender/python/api2_2x/Noise.c 2007-09-17 11:10:23 UTC (rev 12061)
@@ -199,7 +199,7 @@
static PyObject *Noise_randuvec( PyObject * self )
{
- float v[3];
+ float v[3] = {0.0f, 0.0f, 0.0f};
randuvec( v );
return Py_BuildValue( "[fff]", v[0], v[1], v[2] );
}
Modified: branches/cloth/blender/source/blender/python/api2_2x/Pose.c
===================================================================
--- branches/cloth/blender/source/blender/python/api2_2x/Pose.c 2007-09-17 11:07:28 UTC (rev 12060)
+++ branches/cloth/blender/source/blender/python/api2_2x/Pose.c 2007-09-17 11:10:23 UTC (rev 12061)
@@ -693,9 +693,12 @@
}
//get loc
- if (matsize == 4){
+ if (matsize == 4) {
VECCOPY(loc, matrix->matrix[3]);
}
+ else {
+ loc[0]= loc[1]= loc[2]= 0.0f;
+ }
//copy new attributes
VECCOPY(self->posechannel->size, size);
Modified: branches/cloth/blender/source/blender/python/api2_2x/bpy_data.c
===================================================================
--- branches/cloth/blender/source/blender/python/api2_2x/bpy_data.c 2007-09-17 11:07:28 UTC (rev 12060)
+++ branches/cloth/blender/source/blender/python/api2_2x/bpy_data.c 2007-09-17 11:10:23 UTC (rev 12061)
@@ -407,7 +407,7 @@
static char *kwlist[] = {"name", "filename", NULL};
if(PyArg_ParseTupleAndKeywords(args, kwd, "|ss", kwlist, &name, &filename) && filename ) {
- PyObject *ret;
+ PyObject *ret= NULL;
if (strlen(filename) > FILE_MAXDIR + FILE_MAXFILE - 1)
return ( EXPP_ReturnPyObjError( PyExc_IOError,
Modified: branches/cloth/blender/source/blender/render/intern/source/rayshade.c
===================================================================
--- branches/cloth/blender/source/blender/render/intern/source/rayshade.c 2007-09-17 11:07:28 UTC (rev 12060)
+++ branches/cloth/blender/source/blender/render/intern/source/rayshade.c 2007-09-17 11:10:23 UTC (rev 12061)
@@ -850,21 +850,6 @@
return 0;
}
-static int adaptive_sample_contrast(int samples, float *prevcol, float *curcol, float thresh)
-{
- /* if the last sample's contribution to the total colour was below a small threshold
- * (i.e. the samples taken are very similar), then taking more samples that are probably
- * going to be the same is wasting effort */
- if ( (fabs( prevcol[0]/(float)(samples-1) - curcol[0]/(float)(samples) ) < thresh) &&
- (fabs( prevcol[1]/(float)(samples-1) - curcol[1]/(float)(samples) ) < thresh) &&
- (fabs( prevcol[2]/(float)(samples-1) - curcol[2]/(float)(samples) ) < thresh) )
- {
- return 1;
- }
- else
- return 0;
-}
-
static int adaptive_sample_contrast_val(int samples, float prev, float val, float thresh)
{
/* if the last sample's contribution to the total value was below a small threshold
Modified: branches/cloth/blender/source/blender/render/intern/source/texture.c
===================================================================
--- branches/cloth/blender/source/blender/render/intern/source/texture.c 2007-09-17 11:07:28 UTC (rev 12060)
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list