[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17471] branches/projection-paint: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17443 :HEAD

Campbell Barton ideasman42 at gmail.com
Sat Nov 15 17:55:37 CET 2008


Revision: 17471
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17471
Author:   campbellbarton
Date:     2008-11-15 17:55:37 +0100 (Sat, 15 Nov 2008)

Log Message:
-----------
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17443:HEAD

Modified Paths:
--------------
    branches/projection-paint/SConstruct
    branches/projection-paint/config/linuxcross-config.py
    branches/projection-paint/source/blender/blenlib/SConscript
    branches/projection-paint/source/blender/blenlib/intern/threads.c
    branches/projection-paint/source/blender/include/BIF_editarmature.h
    branches/projection-paint/source/blender/include/transform.h
    branches/projection-paint/source/blender/makesdna/intern/SConscript
    branches/projection-paint/source/blender/src/SConscript
    branches/projection-paint/source/blender/src/editarmature.c
    branches/projection-paint/source/blender/src/gpencil.c
    branches/projection-paint/source/blender/src/transform_conversions.c
    branches/projection-paint/source/blender/src/transform_generics.c
    branches/projection-paint/source/blender/src/transform_orientations.c
    branches/projection-paint/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
    branches/projection-paint/source/gameengine/Rasterizer/RAS_2DFilterManager.h
    branches/projection-paint/tools/crossmingw.py

Modified: branches/projection-paint/SConstruct
===================================================================
--- branches/projection-paint/SConstruct	2008-11-15 16:20:37 UTC (rev 17470)
+++ branches/projection-paint/SConstruct	2008-11-15 16:55:37 UTC (rev 17471)
@@ -472,6 +472,13 @@
 		td, tf = os.path.split(targetdir)
 		iconinstall.append(env.Install(dir=td, source=srcfile))
 
+# dlls for linuxcross
+# TODO - add more libs, for now this lets blenderlite run
+if env['OURPLATFORM']=='linuxcross':
+	dir=env['BF_INSTALLDIR']
+	source = ['../lib/windows/pthreads/lib/pthreadGC2.dll']
+	scriptinstall.append(env.Install(dir=dir, source=source))
+
 #-- plugins
 pluglist = []
 plugtargetlist = []

Modified: branches/projection-paint/config/linuxcross-config.py
===================================================================
--- branches/projection-paint/config/linuxcross-config.py	2008-11-15 16:20:37 UTC (rev 17470)
+++ branches/projection-paint/config/linuxcross-config.py	2008-11-15 16:55:37 UTC (rev 17471)
@@ -1,4 +1,4 @@
-LCGDIR = '../lib/windows'
+LCGDIR = '#../lib/windows'
 LIBDIR = '${LCGDIR}'
 
 WITH_BF_VERSE = False
@@ -101,6 +101,9 @@
 BF_SOLID_INC = '${BF_SOLID}'
 BF_SOLID_LIB = 'extern_solid'
 
+BF_WINTAB = LIBDIR + '/wintab'
+BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
+
 # enable freetype2 support for text objects
 BF_FREETYPE = LIBDIR + '/gcc/freetype'
 BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'

Modified: branches/projection-paint/source/blender/blenlib/SConscript
===================================================================
--- branches/projection-paint/source/blender/blenlib/SConscript	2008-11-15 16:20:37 UTC (rev 17470)
+++ branches/projection-paint/source/blender/blenlib/SConscript	2008-11-15 16:55:37 UTC (rev 17471)
@@ -23,7 +23,7 @@
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
 
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross'):
     incs += ' ' + env['BF_PTHREADS_INC']
 
 env.BlenderLib ( 'bf_blenlib', sources, Split(incs), Split(defs), libtype=['core', 'intern', 'player'], priority = [85,150,195], compileflags =cflags )

Modified: branches/projection-paint/source/blender/blenlib/intern/threads.c
===================================================================
--- branches/projection-paint/source/blender/blenlib/intern/threads.c	2008-11-15 16:20:37 UTC (rev 17470)
+++ branches/projection-paint/source/blender/blenlib/intern/threads.c	2008-11-15 16:55:37 UTC (rev 17471)
@@ -42,7 +42,7 @@
 
 /* for checking system threads - BLI_system_thread_count */
 #ifdef WIN32
-#include "Windows.h"
+#include "windows.h"
 #elif defined(__APPLE__)
 #include <sys/types.h>
 #include <sys/sysctl.h>

Modified: branches/projection-paint/source/blender/include/BIF_editarmature.h
===================================================================
--- branches/projection-paint/source/blender/include/BIF_editarmature.h	2008-11-15 16:20:37 UTC (rev 17470)
+++ branches/projection-paint/source/blender/include/BIF_editarmature.h	2008-11-15 16:55:37 UTC (rev 17471)
@@ -68,6 +68,8 @@
 
 } EditBone;
 
+float	rollBoneToVector(EditBone *bone, float new_up_axis[3]);
+
 void	make_boneList(struct ListBase *list, struct ListBase *bones, EditBone *parent);
 void	editbones_to_armature (struct ListBase *list, struct Object *ob);
 

Modified: branches/projection-paint/source/blender/include/transform.h
===================================================================
--- branches/projection-paint/source/blender/include/transform.h	2008-11-15 16:20:37 UTC (rev 17470)
+++ branches/projection-paint/source/blender/include/transform.h	2008-11-15 16:55:37 UTC (rev 17471)
@@ -160,7 +160,7 @@
 	TransDataExtension *ext;	/* for objects, poses. 1 single malloc per TransInfo! */
 	TransDataIpokey *tdi;		/* for objects, ipo keys. per transdata a malloc */
 	TransDataCurveHandleFlags *hdata; /* for curves, stores handle flags for modification/cancel */
-	void *tdmir;		 /* mirrored element pointer, in editmode mesh to EditVert */
+	void  *extra;		 /* extra data (mirrored element pointer, in editmode mesh to EditVert) (editbone for roll fixing) (...) */
     short  flag;         /* Various flags */
 	short  protectflag;	 /* If set, copy of Object or PoseChannel protection */
 /*#ifdef WITH_VERSE*/

Modified: branches/projection-paint/source/blender/makesdna/intern/SConscript
===================================================================
--- branches/projection-paint/source/blender/makesdna/intern/SConscript	2008-11-15 16:20:37 UTC (rev 17470)
+++ branches/projection-paint/source/blender/makesdna/intern/SConscript	2008-11-15 16:55:37 UTC (rev 17471)
@@ -18,10 +18,16 @@
 								 '../../makesdna'])
 
 if env['OURPLATFORM'] == 'linuxcross':
-	makesdna_tool.Replace(CC='gcc')
-	makesdna_tool.Replace(AR='ar')
-	makesdna_tool.Replace(LINK='gcc')
+	USE_WINE = True # when cross compiling on linux 64bit this is useful
+else:
+	USE_WINE = False
 
+if not USE_WINE:
+	if env['OURPLATFORM'] == 'linuxcross':
+		makesdna_tool.Replace(CC='gcc')
+		makesdna_tool.Replace(AR='ar')
+		makesdna_tool.Replace(LINK='gcc')
+
 if sys.platform != 'cygwin':
 	makesdna_tool.Append (CCFLAGS = cflags)
 makesdna_tool.Append (CPPDEFINES = defines)
@@ -43,7 +49,10 @@
 dna.Depends ('dna.c', makesdna)
 dna.Depends ('dna.c', header_files)
 if env['OURPLATFORM'] != 'linuxcross':
-	dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET")
+	if USE_WINE:
+		dna.Command ('dna.c', '', 'wine ' + root_build_dir+os.sep+"makesdna $TARGET")
+	else:
+		dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna $TARGET")
 else:
 	dna.Command ('dna.c', '', root_build_dir+os.sep+"makesdna.exe $TARGET")
 obj = 'intern/dna.c'

Modified: branches/projection-paint/source/blender/src/SConscript
===================================================================
--- branches/projection-paint/source/blender/src/SConscript	2008-11-15 16:20:37 UTC (rev 17470)
+++ branches/projection-paint/source/blender/src/SConscript	2008-11-15 16:55:37 UTC (rev 17471)
@@ -75,7 +75,7 @@
 if env['WITH_BF_OGG']:
     defs.append('WITH_OGG')
 
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross'):
     incs += ' ' + env['BF_PTHREADS_INC']
 
 if env['WITH_BF_VERSE']:

Modified: branches/projection-paint/source/blender/src/editarmature.c
===================================================================
--- branches/projection-paint/source/blender/src/editarmature.c	2008-11-15 16:20:37 UTC (rev 17470)
+++ branches/projection-paint/source/blender/src/editarmature.c	2008-11-15 16:55:37 UTC (rev 17471)
@@ -1817,6 +1817,31 @@
 	}
 }
 
+/* adjust bone roll to align Z axis with vector
+ * vec is in local space and is normalized
+ */
+float rollBoneToVector(EditBone *bone, float new_up_axis[3])
+{
+	float mat[3][3], nor[3], up_axis[3], vec[3];
+	float roll;
+
+	VecSubf(nor, bone->tail, bone->head);
+	
+	vec_roll_to_mat3(nor, 0, mat);
+	VECCOPY(up_axis, mat[2]);
+	
+	roll = NormalizedVecAngle2(new_up_axis, up_axis);
+	
+	Crossf(vec, up_axis, new_up_axis);
+	
+	if (Inpf(vec, nor) < 0)
+	{
+		roll = -roll;
+	}
+	
+	return roll;
+}
+
 /* Sets the roll value of selected bones, depending on the mode
  * 	mode == 0: their z-axes point upwards 
  * 	mode == 1: their z-axes point towards 3d-cursor

Modified: branches/projection-paint/source/blender/src/gpencil.c
===================================================================
--- branches/projection-paint/source/blender/src/gpencil.c	2008-11-15 16:20:37 UTC (rev 17470)
+++ branches/projection-paint/source/blender/src/gpencil.c	2008-11-15 16:55:37 UTC (rev 17471)
@@ -267,6 +267,7 @@
 		
 	/* make a copy of the source frame */
 	dst= MEM_dupallocN(src);
+	dst->prev= dst->next= NULL;
 	
 	/* copy strokes */
 	dst->strokes.first = dst->strokes.last= NULL;
@@ -294,13 +295,18 @@
 		
 	/* make a copy of source layer */
 	dst= MEM_dupallocN(src);
+	dst->prev= dst->next= NULL;
 	
 	/* copy frames */
 	dst->frames.first= dst->frames.last= NULL;
 	for (gpf= src->frames.first; gpf; gpf= gpf->next) {
-		/* make a copy of source stroke */
+		/* make a copy of source frame */
 		gpfd= gpencil_frame_duplicate(gpf);
 		BLI_addtail(&dst->frames, gpfd);
+		
+		/* if source frame was the current layer's 'active' frame, reassign that too */
+		if (gpf == dst->actframe)
+			dst->actframe= gpfd;
 	}
 	
 	/* return new layer */

Modified: branches/projection-paint/source/blender/src/transform_conversions.c
===================================================================
--- branches/projection-paint/source/blender/src/transform_conversions.c	2008-11-15 16:20:37 UTC (rev 17470)
+++ branches/projection-paint/source/blender/src/transform_conversions.c	2008-11-15 16:55:37 UTC (rev 17471)
@@ -1133,6 +1133,14 @@
 					Mat3CpyMat3(td->smtx, smtx);
 					Mat3CpyMat3(td->mtx, mtx);
 
+					VecSubf(delta, ebo->tail, ebo->head);	
+					vec_roll_to_mat3(delta, ebo->roll, td->axismtx);
+
+					if ((ebo->flag & BONE_ROOTSEL) == 0)
+					{
+						td->extra = ebo;
+					}
+
 					td->ext = NULL;
 					td->tdi = NULL;
 					td->val = NULL;
@@ -1150,6 +1158,11 @@
 					Mat3CpyMat3(td->smtx, smtx);
 					Mat3CpyMat3(td->mtx, mtx);
 
+					VecSubf(delta, ebo->tail, ebo->head);	
+					vec_roll_to_mat3(delta, ebo->roll, td->axismtx);
+
+					td->extra = ebo; /* to fix roll */
+
 					td->ext = NULL;
 					td->tdi = NULL;
 					td->val = NULL;
@@ -1863,7 +1876,7 @@
 	td->ext = NULL;
 	td->tdi = NULL;
 	td->val = NULL;
-	td->tdmir = NULL;
+	td->extra = NULL;
 	if (BIF_GetTransInfo()->mode == TFM_BWEIGHT) {
 		td->val = &(eve->bweight);
 		td->ival = eve->bweight;
@@ -2216,7 +2229,7 @@
 				/* Mirror? */
 				if( (mirror>0 && tob->iloc[0]>0.0f) || (mirror<0 && tob->iloc[0]<0.0f)) {
 					EditVert *vmir= editmesh_get_x_mirror_vert(G.obedit, tob->iloc);	/* initializes octree on first call */
-					if(vmir != eve) tob->tdmir = vmir;
+					if(vmir != eve) tob->extra = vmir;
 				}
 				tob++;
 			}

Modified: branches/projection-paint/source/blender/src/transform_generics.c
===================================================================
--- branches/projection-paint/source/blender/src/transform_generics.c	2008-11-15 16:20:37 UTC (rev 17470)
+++ branches/projection-paint/source/blender/src/transform_generics.c	2008-11-15 16:55:37 UTC (rev 17471)
@@ -254,7 +254,7 @@
 		if (td->flag & TD_SKIP)
 			continue;
 		

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list