[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28992] branches/soc-2008-mxcurioni: Merged changes in the trunk up to revision 28984.

Tamito Kajiyama rd6t-kjym at asahi-net.or.jp
Wed May 26 02:55:35 CEST 2010


Revision: 28992
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28992
Author:   kjym3
Date:     2010-05-26 02:55:35 +0200 (Wed, 26 May 2010)

Log Message:
-----------
Merged changes in the trunk up to revision 28984.

Revision Links:
--------------
    http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28984

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/SConstruct
    branches/soc-2008-mxcurioni/config/linuxcross-config.py
    branches/soc-2008-mxcurioni/config/win32-mingw-config.py
    branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.mm
    branches/soc-2008-mxcurioni/projectfiles_vc9/blender/imbuf/BL_imbuf.vcproj
    branches/soc-2008-mxcurioni/release/scripts/io/export_fbx.py
    branches/soc-2008-mxcurioni/release/scripts/modules/bpy_types.py
    branches/soc-2008-mxcurioni/release/scripts/op/add_mesh_torus.py
    branches/soc-2008-mxcurioni/release/scripts/op/uv.py
    branches/soc-2008-mxcurioni/release/scripts/op/uvcalc_follow_active.py
    branches/soc-2008-mxcurioni/release/scripts/templates/operator_modal_view3d.py
    branches/soc-2008-mxcurioni/release/scripts/ui/properties_object.py
    branches/soc-2008-mxcurioni/release/scripts/ui/space_info.py
    branches/soc-2008-mxcurioni/release/scripts/ui/space_view3d.py
    branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_utildefines.h
    branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/anim.c
    branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/blender.c
    branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/cloth.c
    branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/collision.c
    branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/depsgraph.c
    branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/image.c
    branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/implicit.c
    branches/soc-2008-mxcurioni/source/blender/blenlib/BLI_args.h
    branches/soc-2008-mxcurioni/source/blender/blenlib/intern/BLI_args.c
    branches/soc-2008-mxcurioni/source/blender/blenlib/intern/bpath.c
    branches/soc-2008-mxcurioni/source/blender/blenloader/BLO_writefile.h
    branches/soc-2008-mxcurioni/source/blender/blenloader/intern/readfile.c
    branches/soc-2008-mxcurioni/source/blender/blenloader/intern/writefile.c
    branches/soc-2008-mxcurioni/source/blender/editors/armature/poselib.c
    branches/soc-2008-mxcurioni/source/blender/editors/curve/curve_intern.h
    branches/soc-2008-mxcurioni/source/blender/editors/curve/curve_ops.c
    branches/soc-2008-mxcurioni/source/blender/editors/curve/editcurve.c
    branches/soc-2008-mxcurioni/source/blender/editors/interface/interface_regions.c
    branches/soc-2008-mxcurioni/source/blender/editors/object/object_add.c
    branches/soc-2008-mxcurioni/source/blender/editors/object/object_edit.c
    branches/soc-2008-mxcurioni/source/blender/editors/object/object_intern.h
    branches/soc-2008-mxcurioni/source/blender/editors/object/object_ops.c
    branches/soc-2008-mxcurioni/source/blender/editors/render/render_internal.c
    branches/soc-2008-mxcurioni/source/blender/editors/render/render_opengl.c
    branches/soc-2008-mxcurioni/source/blender/editors/space_file/filelist.c
    branches/soc-2008-mxcurioni/source/blender/editors/space_graph/graph_select.c
    branches/soc-2008-mxcurioni/source/blender/editors/space_text/space_text.c
    branches/soc-2008-mxcurioni/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2008-mxcurioni/source/blender/editors/space_view3d/space_view3d.c
    branches/soc-2008-mxcurioni/source/blender/imbuf/IMB_thumbs.h
    branches/soc-2008-mxcurioni/source/blender/imbuf/intern/anim.c
    branches/soc-2008-mxcurioni/source/blender/imbuf/intern/thumbs.c
    branches/soc-2008-mxcurioni/source/blender/imbuf/intern/tiff.c
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_internal.h
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_main_api.c
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_object.c
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_object_api.c
    branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_sensor.c
    branches/soc-2008-mxcurioni/source/blender/render/intern/source/pipeline.c
    branches/soc-2008-mxcurioni/source/blender/render/intern/source/texture.c
    branches/soc-2008-mxcurioni/source/blender/windowmanager/intern/wm_files.c
    branches/soc-2008-mxcurioni/source/creator/creator.c
    branches/soc-2008-mxcurioni/source/gameengine/Converter/BL_BlenderDataConversion.cpp
    branches/soc-2008-mxcurioni/source/gameengine/Converter/BL_ModifierDeformer.cpp
    branches/soc-2008-mxcurioni/source/gameengine/Converter/BL_ModifierDeformer.h
    branches/soc-2008-mxcurioni/source/gameengine/Ketsji/KX_Scene.cpp
    branches/soc-2008-mxcurioni/source/nan_definitions.mk
    branches/soc-2008-mxcurioni/source/nan_link.mk
    branches/soc-2008-mxcurioni/tools/btools.py
    branches/soc-2008-mxcurioni/tools/crossmingw.py

Added Paths:
-----------
    branches/soc-2008-mxcurioni/release/scripts/modules/add_object_utils.py
    branches/soc-2008-mxcurioni/source/blender/imbuf/intern/thumbs_blend.c

Modified: branches/soc-2008-mxcurioni/SConstruct
===================================================================
--- branches/soc-2008-mxcurioni/SConstruct	2010-05-25 22:45:53 UTC (rev 28991)
+++ branches/soc-2008-mxcurioni/SConstruct	2010-05-26 00:55:35 UTC (rev 28992)
@@ -182,7 +182,7 @@
 else:
 	print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
 
-opts = btools.read_opts(optfiles, B.arguments)
+opts = btools.read_opts(env, optfiles, B.arguments)
 opts.Update(env)
 
 if not env['BF_FANCY']:
@@ -572,7 +572,9 @@
 		dllsources += ['${BF_PNG_LIBPATH}/libpng.dll',
 				'${BF_ZLIB_LIBPATH}/zlib.dll']
 
-	dllsources += ['${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll']
+	# Used when linking to libtiff was dynamic
+	# keep it here until compilation on all platform would be ok
+	# dllsources += ['${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll']
 
 	if env['OURPLATFORM'] != 'linuxcross':
 		# pthreads library is already added

Modified: branches/soc-2008-mxcurioni/config/linuxcross-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/linuxcross-config.py	2010-05-25 22:45:53 UTC (rev 28991)
+++ branches/soc-2008-mxcurioni/config/linuxcross-config.py	2010-05-26 00:55:35 UTC (rev 28992)
@@ -75,9 +75,9 @@
 BF_PNG_LIBPATH = '${BF_PNG}/lib'
 
 WITH_BF_TIFF = True
-BF_TIFF = LIBDIR + '/tiff'
+BF_TIFF = LIBDIR + '/gcc/tiff'
 BF_TIFF_INC = '${BF_TIFF}/include'
-BF_TIFF_LIB = 'libtiff'
+BF_TIFF_LIB = 'tiff'
 BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
 
 WITH_BF_ZLIB = True
@@ -174,9 +174,6 @@
 WITH_BF_RAYOPTIMIZATION = False
 BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
 
-CC = 'i586-mingw32msvc-gcc'
-CXX = 'i586-mingw32msvc-g++'
-
 CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
 
 CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS']

Modified: branches/soc-2008-mxcurioni/config/win32-mingw-config.py
===================================================================
--- branches/soc-2008-mxcurioni/config/win32-mingw-config.py	2010-05-25 22:45:53 UTC (rev 28991)
+++ branches/soc-2008-mxcurioni/config/win32-mingw-config.py	2010-05-26 00:55:35 UTC (rev 28992)
@@ -74,9 +74,9 @@
 BF_PNG_LIBPATH = '${BF_PNG}/lib'
 
 WITH_BF_TIFF = True
-BF_TIFF = LIBDIR + '/tiff'
+BF_TIFF = LIBDIR + '/gcc/tiff'
 BF_TIFF_INC = '${BF_TIFF}/include'
-BF_TIFF_LIB = 'libtiff'
+BF_TIFF_LIB = 'tiff'
 BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
 
 WITH_BF_ZLIB = True

Modified: branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.mm
===================================================================
--- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.mm	2010-05-25 22:45:53 UTC (rev 28991)
+++ branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.mm	2010-05-26 00:55:35 UTC (rev 28992)
@@ -1106,7 +1106,7 @@
 					{
 						droppedStr = [droppedArray objectAtIndex:i];
 						
-						pastedTextSize = [droppedStr lengthOfBytesUsingEncoding:NSISOLatin1StringEncoding];
+						pastedTextSize = [droppedStr lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
 						temp_buff = (GHOST_TUns8*) malloc(pastedTextSize+1); 
 					
 						if (!temp_buff) {
@@ -1114,7 +1114,7 @@
 							break;
 						}
 					
-						strncpy((char*)temp_buff, [droppedStr cStringUsingEncoding:NSISOLatin1StringEncoding], pastedTextSize);
+						strncpy((char*)temp_buff, [droppedStr cStringUsingEncoding:NSUTF8StringEncoding], pastedTextSize);
 						temp_buff[pastedTextSize] = '\0';
 						
 						strArray->strings[i] = temp_buff;
@@ -1125,7 +1125,7 @@
 					
 				case GHOST_kDragnDropTypeString:
 					droppedStr = (NSString*)data;
-					pastedTextSize = [droppedStr lengthOfBytesUsingEncoding:NSISOLatin1StringEncoding];
+					pastedTextSize = [droppedStr lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
 					
 					temp_buff = (GHOST_TUns8*) malloc(pastedTextSize+1); 
 					
@@ -1133,7 +1133,7 @@
 						return GHOST_kFailure;
 					}
 					
-					strncpy((char*)temp_buff, [droppedStr cStringUsingEncoding:NSISOLatin1StringEncoding], pastedTextSize);
+					strncpy((char*)temp_buff, [droppedStr cStringUsingEncoding:NSUTF8StringEncoding], pastedTextSize);
 					
 					temp_buff[pastedTextSize] = '\0';
 					

Modified: branches/soc-2008-mxcurioni/projectfiles_vc9/blender/imbuf/BL_imbuf.vcproj
===================================================================
--- branches/soc-2008-mxcurioni/projectfiles_vc9/blender/imbuf/BL_imbuf.vcproj	2010-05-25 22:45:53 UTC (rev 28991)
+++ branches/soc-2008-mxcurioni/projectfiles_vc9/blender/imbuf/BL_imbuf.vcproj	2010-05-26 00:55:35 UTC (rev 28992)
@@ -494,10 +494,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\..\..\source\blender\imbuf\intern\dynlibtiff.c"
-				>
-			</File>
-			<File
 				RelativePath="..\..\..\source\blender\imbuf\intern\filetype.c"
 				>
 			</File>
@@ -748,10 +744,6 @@
 			Filter="h;hpp;hxx;hm;inl"
 			>
 			<File
-				RelativePath="..\..\..\source\blender\imbuf\intern\dynlibtiff.h"
-				>
-			</File>
-			<File
 				RelativePath="..\..\..\source\blender\imbuf\intern\IMB_allocimbuf.h"
 				>
 			</File>

Modified: branches/soc-2008-mxcurioni/release/scripts/io/export_fbx.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/io/export_fbx.py	2010-05-25 22:45:53 UTC (rev 28991)
+++ branches/soc-2008-mxcurioni/release/scripts/io/export_fbx.py	2010-05-26 00:55:35 UTC (rev 28992)
@@ -1504,17 +1504,14 @@
         file.write('\n\t\tPolygonVertexIndex: ')
         i=-1
         for f in me.faces:
-            fi = [v for v in f.verts]
-            # fi = [v_index for j, v_index in enumerate(f.verts) if v_index != 0 or j != 3]
-# 			fi = [v.index for v in f]
+            fi = f.verts[:]
 
-            # flip the last index, odd but it looks like
-            # this is how fbx tells one face from another
-            fi[-1] = -(fi[-1]+1)
+            # last index XORd w. -1 indicates end of face
+            fi[-1] = fi[-1] ^ -1
             fi = tuple(fi)
+
             if i==-1:
                 if len(fi) == 3:	file.write('%i,%i,%i' % fi )
-# 				if len(f) == 3:		file.write('%i,%i,%i' % fi )
                 else:				file.write('%i,%i,%i,%i' % fi )
                 i=0
             else:
@@ -1522,10 +1519,26 @@
                     file.write('\n\t\t')
                     i=0
                 if len(fi) == 3:	file.write(',%i,%i,%i' % fi )
-# 				if len(f) == 3:		file.write(',%i,%i,%i' % fi )
                 else:				file.write(',%i,%i,%i,%i' % fi )
             i+=1
 
+        # write loose edges as faces.
+        for ed in me.edges:
+            if ed.loose:
+                ed_val = ed.verts[:]
+                ed_val = ed_val[0], ed_val[-1] ^ -1
+
+                if i==-1:
+                    file.write('%i,%i' % ed_val)
+                    i=0
+                else:
+                    if i==13:
+                        file.write('\n\t\t')
+                        i=0
+                    file.write(',%i,%i' % ed_val)
+            i+=1
+
+
         file.write('\n\t\tEdges: ')
         i=-1
         for ed in me.edges:
@@ -2960,8 +2973,7 @@
     # --------------------------- Footer
     if world:
         m = world.mist
-        has_mist = m.enabled
-# 		has_mist = world.mode & 1
+        has_mist = m.use_mist
         mist_intense = m.intensity
         mist_start = m.start
         mist_end = m.depth

Copied: branches/soc-2008-mxcurioni/release/scripts/modules/add_object_utils.py (from rev 28984, trunk/blender/release/scripts/modules/add_object_utils.py)
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/modules/add_object_utils.py	                        (rev 0)
+++ branches/soc-2008-mxcurioni/release/scripts/modules/add_object_utils.py	2010-05-26 00:55:35 UTC (rev 28992)
@@ -0,0 +1,74 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+# <pep8 compliant>
+
+import bpy
+import mathutils
+
+def _align_matrix(context):
+    # TODO, local view cursor!
+    location = mathutils.TranslationMatrix(context.scene.cursor_location)
+
+    if context.user_preferences.edit.object_align == 'VIEW' and context.space_data.type == 'VIEW_3D':
+        rotation = context.space_data.region_3d.view_matrix.rotation_part().invert().resize4x4()
+    else:
+        rotation = mathutils.Matrix()
+
+    align_matrix = location * rotation
+
+    return align_matrix
+
+
+def add_object_data(obdata, context):
+
+    scene = context.scene
+
+    # ugh, could be made nicer
+    for ob in scene.objects:
+        ob.selected = False
+
+    obj_new = bpy.data.objects.new(obdata.name, obdata)
+
+    base = scene.objects.link(obj_new)
+    base.selected = True
+
+    if context.space_data and context.space_data.type == 'VIEW_3D':
+        base.layers_from_view(context.space_data)
+
+
+    obj_new.matrix = _align_matrix(context)
+
+    obj_act = scene.objects.active
+
+    if obj_act and obj_act.mode == 'EDIT' and obj_act.type == obj_new.type:
+        bpy.ops.object.mode_set(mode='OBJECT')
+
+        obj_act.selected = True
+        scene.update() # apply location
+        #scene.objects.active = obj_new
+
+        bpy.ops.object.join() # join into the active.
+
+        bpy.ops.object.mode_set(mode='EDIT')
+    else:
+        scene.objects.active = obj_new
+        if context.user_preferences.edit.enter_edit_mode:
+            bpy.ops.object.mode_set(mode='EDIT')
+
+    return base

Modified: branches/soc-2008-mxcurioni/release/scripts/modules/bpy_types.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/modules/bpy_types.py	2010-05-25 22:45:53 UTC (rev 28991)

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list