[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31145] branches/soc-2010-nexyon: svn merge -r 31060:31144 https://svn.blender.org/svnroot/bf-blender/trunk/ blender

Joerg Mueller nexyon at gmail.com
Sat Aug 7 17:45:07 CEST 2010


Revision: 31145
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31145
Author:   nexyon
Date:     2010-08-07 17:45:07 +0200 (Sat, 07 Aug 2010)

Log Message:
-----------
svn merge -r 31060:31144 https://svn.blender.org/svnroot/bf-blender/trunk/blender

Modified Paths:
--------------
    branches/soc-2010-nexyon/build_files/make/nan_definitions.mk
    branches/soc-2010-nexyon/release/scripts/io/export_3ds.py
    branches/soc-2010-nexyon/release/scripts/io/export_fbx.py
    branches/soc-2010-nexyon/release/scripts/io/export_mdd.py
    branches/soc-2010-nexyon/release/scripts/io/export_obj.py
    branches/soc-2010-nexyon/release/scripts/io/export_ply.py
    branches/soc-2010-nexyon/release/scripts/io/export_x3d.py
    branches/soc-2010-nexyon/release/scripts/io/import_shape_mdd.py
    branches/soc-2010-nexyon/release/scripts/io/netrender/client.py
    branches/soc-2010-nexyon/release/scripts/io/netrender/operators.py
    branches/soc-2010-nexyon/release/scripts/io/netrender/repath.py
    branches/soc-2010-nexyon/release/scripts/io/netrender/ui.py
    branches/soc-2010-nexyon/release/scripts/modules/bpy/__init__.py
    branches/soc-2010-nexyon/release/scripts/modules/bpy/utils.py
    branches/soc-2010-nexyon/release/scripts/modules/bpy_types.py
    branches/soc-2010-nexyon/release/scripts/modules/rigify/__init__.py
    branches/soc-2010-nexyon/release/scripts/op/fcurve_euler_filter.py
    branches/soc-2010-nexyon/release/scripts/op/image.py
    branches/soc-2010-nexyon/release/scripts/op/mesh.py
    branches/soc-2010-nexyon/release/scripts/op/object.py
    branches/soc-2010-nexyon/release/scripts/op/object_align.py
    branches/soc-2010-nexyon/release/scripts/op/screen_play_rendered_anim.py
    branches/soc-2010-nexyon/release/scripts/op/sequencer.py
    branches/soc-2010-nexyon/release/scripts/op/uv.py
    branches/soc-2010-nexyon/release/scripts/op/uvcalc_follow_active.py
    branches/soc-2010-nexyon/release/scripts/op/uvcalc_smart_project.py
    branches/soc-2010-nexyon/release/scripts/op/wm.py
    branches/soc-2010-nexyon/release/scripts/templates/operator.py
    branches/soc-2010-nexyon/release/scripts/templates/operator_simple.py
    branches/soc-2010-nexyon/release/scripts/templates/operator_uv.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_animviz.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_data_armature.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_data_armature_rigify.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_data_bone.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_data_camera.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_data_curve.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_data_empty.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_data_lamp.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_data_lattice.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_data_mesh.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_data_metaball.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_data_modifier.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_game.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_material.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_object.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_object_constraint.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_particle.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_physics_cloth.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_physics_common.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_physics_field.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_physics_fluid.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_physics_smoke.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_physics_softbody.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_render.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_scene.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_texture.py
    branches/soc-2010-nexyon/release/scripts/ui/properties_world.py
    branches/soc-2010-nexyon/release/scripts/ui/space_console.py
    branches/soc-2010-nexyon/release/scripts/ui/space_image.py
    branches/soc-2010-nexyon/release/scripts/ui/space_logic.py
    branches/soc-2010-nexyon/release/scripts/ui/space_sequencer.py
    branches/soc-2010-nexyon/release/scripts/ui/space_text.py
    branches/soc-2010-nexyon/release/scripts/ui/space_userpref.py
    branches/soc-2010-nexyon/release/scripts/ui/space_userpref_keymap.py
    branches/soc-2010-nexyon/release/scripts/ui/space_view3d.py
    branches/soc-2010-nexyon/release/scripts/ui/space_view3d_toolbar.py
    branches/soc-2010-nexyon/source/blender/blenkernel/BKE_curve.h
    branches/soc-2010-nexyon/source/blender/blenkernel/BKE_node.h
    branches/soc-2010-nexyon/source/blender/blenkernel/intern/curve.c
    branches/soc-2010-nexyon/source/blender/blenkernel/intern/displist.c
    branches/soc-2010-nexyon/source/blender/blenkernel/intern/lattice.c
    branches/soc-2010-nexyon/source/blender/blenkernel/intern/node.c
    branches/soc-2010-nexyon/source/blender/blenkernel/intern/object.c
    branches/soc-2010-nexyon/source/blender/blenkernel/intern/scene.c
    branches/soc-2010-nexyon/source/blender/editors/include/ED_view3d.h
    branches/soc-2010-nexyon/source/blender/editors/interface/resources.c
    branches/soc-2010-nexyon/source/blender/editors/physics/physics_fluid.c
    branches/soc-2010-nexyon/source/blender/editors/screen/area.c
    branches/soc-2010-nexyon/source/blender/editors/space_image/space_image.c
    branches/soc-2010-nexyon/source/blender/editors/space_text/text_draw.c
    branches/soc-2010-nexyon/source/blender/editors/space_text/text_ops.c
    branches/soc-2010-nexyon/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2010-nexyon/source/blender/editors/space_view3d/view3d_draw.c
    branches/soc-2010-nexyon/source/blender/editors/space_view3d/view3d_edit.c
    branches/soc-2010-nexyon/source/blender/editors/space_view3d/view3d_view.c
    branches/soc-2010-nexyon/source/blender/makesdna/DNA_curve_types.h
    branches/soc-2010-nexyon/source/blender/makesdna/DNA_userdef_types.h
    branches/soc-2010-nexyon/source/blender/makesrna/intern/rna_action.c
    branches/soc-2010-nexyon/source/blender/makesrna/intern/rna_context.c
    branches/soc-2010-nexyon/source/blender/makesrna/intern/rna_curve.c
    branches/soc-2010-nexyon/source/blender/makesrna/intern/rna_modifier.c
    branches/soc-2010-nexyon/source/blender/makesrna/intern/rna_ui.c
    branches/soc-2010-nexyon/source/blender/makesrna/intern/rna_userdef.c
    branches/soc-2010-nexyon/source/blender/makesrna/intern/rna_wm_api.c
    branches/soc-2010-nexyon/source/blender/modifiers/intern/MOD_screw.c
    branches/soc-2010-nexyon/source/blender/python/doc/sphinx_doc_gen.py
    branches/soc-2010-nexyon/source/blender/python/intern/bpy_rna.c
    branches/soc-2010-nexyon/source/blender/render/intern/source/convertblender.c
    branches/soc-2010-nexyon/source/blender/render/intern/source/texture.c
    branches/soc-2010-nexyon/source/blender/windowmanager/intern/wm_draw.c
    branches/soc-2010-nexyon/source/gameengine/Ketsji/KX_PythonInit.cpp

Added Paths:
-----------
    branches/soc-2010-nexyon/release/scripts/modules/bpy/path.py

Modified: branches/soc-2010-nexyon/build_files/make/nan_definitions.mk
===================================================================
--- branches/soc-2010-nexyon/build_files/make/nan_definitions.mk	2010-08-07 15:34:35 UTC (rev 31144)
+++ branches/soc-2010-nexyon/build_files/make/nan_definitions.mk	2010-08-07 15:45:07 UTC (rev 31145)
@@ -161,7 +161,11 @@
   export WITH_TIFF ?= true
 
   #enable raytracing optimization (currently only for i386 and x86_64)
-  export WITH_BF_RAYOPTIMIZATION ?= true
+  ifeq ($(CPU),powerpc)
+    export WITH_BF_RAYOPTIMIZATION ?= false
+  else
+    export WITH_BF_RAYOPTIMIZATION ?= true
+  endif
 
   export WITH_LCMS ?= false
   export WITH_CINEON ?= true

Modified: branches/soc-2010-nexyon/release/scripts/io/export_3ds.py
===================================================================
--- branches/soc-2010-nexyon/release/scripts/io/export_3ds.py	2010-08-07 15:34:35 UTC (rev 31144)
+++ branches/soc-2010-nexyon/release/scripts/io/export_3ds.py	2010-08-07 15:45:07 UTC (rev 31145)
@@ -922,7 +922,7 @@
 """
 
 # import BPyMessages
-def save_3ds(filename, context):
+def write(filename, context):
     '''Save the Blender scene to a 3ds file.'''
     # Time the export
 
@@ -1107,12 +1107,7 @@
     #primary.dump()
 
 
-# if __name__=='__main__':
-#     if struct:
-#         Blender.Window.FileSelector(save_3ds, "Export 3DS", Blender.sys.makename(ext='.3ds'))
-#     else:
-#         Blender.Draw.PupMenu("Error%t|This script requires a full python installation")
-# # save_3ds('/test_b.3ds')
+# # write('/test_b.3ds')
 from bpy.props import *
 class Export3DS(bpy.types.Operator):
     '''Export to 3DS file format (.3ds)'''
@@ -1127,7 +1122,10 @@
     check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'})
 
     def execute(self, context):
-        save_3ds(self.properties.filepath, context)
+        filepath = self.properties.filepath
+        filepath = bpy.path.ensure_ext(filepath, ".3ds")
+
+        write(filepath, context)
         return {'FINISHED'}
 
     def invoke(self, context, event):
@@ -1135,7 +1133,8 @@
         wm.add_fileselect(self)
         return {'RUNNING_MODAL'}
 
-    def poll(self, context): # Poll isnt working yet
+    @staticmethod
+    def poll(context): # Poll isnt working yet
         return context.active_object != None
 
 # Add to a menu

Modified: branches/soc-2010-nexyon/release/scripts/io/export_fbx.py
===================================================================
--- branches/soc-2010-nexyon/release/scripts/io/export_fbx.py	2010-08-07 15:34:35 UTC (rev 31144)
+++ branches/soc-2010-nexyon/release/scripts/io/export_fbx.py	2010-08-07 15:45:07 UTC (rev 31145)
@@ -75,7 +75,7 @@
 
     image_paths = set()
     for tex in textures:
-        image_paths.add(bpy.utils.expandpath(tex.filepath))
+        image_paths.add(bpy.path.abspath(tex.filepath))
 
     # Now copy images
     copyCount = 0
@@ -176,7 +176,7 @@
         name = 'unnamed' # blank string, ASKING FOR TROUBLE!
     else:
 
-        name = bpy.utils.clean_name(name) # use our own
+        name = bpy.path.clean_name(name) # use our own
 
     while name in iter(dct.values()):	name = increment_string(name)
 
@@ -200,14 +200,14 @@
 # 	FORCE_CWD - dont use the basepath, just add a ./ to the filename.
 # 		use when we know the file will be in the basepath.
 # 	'''
-# 	fname = bpy.utils.expandpath(fname_orig)
+# 	fname = bpy.path.abspath(fname_orig)
 # # 	fname = Blender.sys.expandpath(fname_orig)
 # 	fname_strip = os.path.basename(fname)
 # # 	fname_strip = strip_path(fname)
 # 	if FORCE_CWD:
 # 		fname_rel = '.' + os.sep + fname_strip
 # 	else:
-# 		fname_rel = bpy.utils.relpath(fname, basepath)
+# 		fname_rel = bpy.path.relpath(fname, basepath)
 # # 		fname_rel = Blender.sys.relpath(fname, basepath)
 # 	if fname_rel.startswith('//'): fname_rel = '.' + os.sep + fname_rel[2:]
 # 	return fname, fname_strip, fname_rel
@@ -354,8 +354,8 @@
 
         new_fbxpath = fbxpath # own dir option modifies, we need to keep an original
         for data in data_seq: # scene or group
-            newname = BATCH_FILE_PREFIX + bpy.utils.clean_name(data.name)
-# 			newname = BATCH_FILE_PREFIX + BPySys.bpy.utils.clean_name(data.name)
+            newname = BATCH_FILE_PREFIX + bpy.path.clean_name(data.name)
+# 			newname = BATCH_FILE_PREFIX + BPySys.bpy.path.clean_name(data.name)
 
 
             if BATCH_OWN_DIR:
@@ -1250,7 +1250,7 @@
         file.write('\n\t}')
 
     def copy_image(image):
-        fn = bpy.utils.expandpath(image.filepath)
+        fn = bpy.path.abspath(image.filepath)
         fn_strip = os.path.basename(fn)
 
         if EXP_IMAGE_COPY:
@@ -3361,20 +3361,24 @@
     BATCH_FILE_PREFIX = StringProperty(name="Prefix", description="Prefix each file with this name", maxlen=1024, default="")
 
 
-    def poll(self, context):
+    @staticmethod
+    def poll(context):
         return context.active_object
 
     def execute(self, context):
         if not self.properties.filepath:
             raise Exception("filepath not set")
 
+        filepath = self.properties.filepath
+        filepath = bpy.path.ensure_ext(filepath, ".fbx")
+
         GLOBAL_MATRIX = mtx4_identity
         GLOBAL_MATRIX[0][0] = GLOBAL_MATRIX[1][1] = GLOBAL_MATRIX[2][2] = self.properties.TX_SCALE
         if self.properties.TX_XROT90: GLOBAL_MATRIX = mtx4_x90n * GLOBAL_MATRIX
         if self.properties.TX_YROT90: GLOBAL_MATRIX = mtx4_y90n * GLOBAL_MATRIX
         if self.properties.TX_ZROT90: GLOBAL_MATRIX = mtx4_z90n * GLOBAL_MATRIX
 
-        write(self.properties.filepath,
+        write(filepath,
               None, # XXX
               context,
               self.properties.EXP_OBS_SELECTED,
@@ -3394,7 +3398,8 @@
               self.properties.BATCH_ENABLE,
               self.properties.BATCH_GROUP,
               self.properties.BATCH_FILE_PREFIX,
-              self.properties.BATCH_OWN_DIR)
+              self.properties.BATCH_OWN_DIR,
+              )
 
         return {'FINISHED'}
 
@@ -3412,7 +3417,7 @@
 
 # NOTES (all line numbers correspond to original export_fbx.py (under release/scripts)
 # - Draw.PupMenu alternative in 2.5?, temporarily replaced PupMenu with print
-# - get rid of bpy.utils.clean_name somehow
+# - get rid of bpy.path.clean_name somehow
 # + fixed: isinstance(inst, bpy.types.*) doesn't work on RNA objects: line 565
 # + get rid of BPyObject_getObjectArmature, move it in RNA?
 # - BATCH_ENABLE and BATCH_GROUP options: line 327
@@ -3427,7 +3432,7 @@
 # - bpy.data.remove_scene: line 366
 # - bpy.sys.time move to bpy.sys.util?
 # - new scene creation, activation: lines 327-342, 368
-# - uses bpy.utils.expandpath, *.relpath - replace at least relpath
+# - uses bpy.path.abspath, *.relpath - replace at least relpath
 
 # SMALL or COSMETICAL
 # - find a way to get blender version, and put it in bpy.util?, old was Blender.Get('version')

Modified: branches/soc-2010-nexyon/release/scripts/io/export_mdd.py
===================================================================
--- branches/soc-2010-nexyon/release/scripts/io/export_mdd.py	2010-08-07 15:34:35 UTC (rev 31144)
+++ branches/soc-2010-nexyon/release/scripts/io/export_mdd.py	2010-08-07 15:45:07 UTC (rev 31145)
@@ -165,15 +165,23 @@
     frame_start = IntProperty(name="Start Frame", description="Start frame for baking", min=minframe, max=maxframe, default=1)
     frame_end = IntProperty(name="End Frame", description="End frame for baking", min=minframe, max=maxframe, default=250)
 
-    def poll(self, context):
+    @staticmethod
+    def poll(context):
         ob = context.active_object
         return (ob and ob.type == 'MESH')
 
     def execute(self, context):
-        if not self.properties.filepath:
-            raise Exception("filename not set")
-        write(self.properties.filepath, context.scene, context.active_object,
-            self.properties.frame_start, self.properties.frame_end, self.properties.fps)
+        filepath = self.properties.filepath
+        filepath = bpy.path.ensure_ext(filepath, ".mdd")
+        
+        write(filepath,
+              context.scene,
+              context.active_object,
+              self.properties.frame_start,
+              self.properties.frame_end,
+              self.properties.fps,
+              )
+
         return {'FINISHED'}
 
     def invoke(self, context, event):

Modified: branches/soc-2010-nexyon/release/scripts/io/export_obj.py
===================================================================
--- branches/soc-2010-nexyon/release/scripts/io/export_obj.py	2010-08-07 15:34:35 UTC (rev 31144)
+++ branches/soc-2010-nexyon/release/scripts/io/export_obj.py	2010-08-07 15:45:07 UTC (rev 31145)
@@ -66,7 +66,7 @@
     dest_dir = os.path.dirname(filepath)
 
     def copy_image(image):
-        fn = bpy.utils.expandpath(image.filepath)
+        fn = bpy.path.abspath(image.filepath)
         fn_strip = os.path.basename(fn)
         if copy_images:
             rel = fn_strip
@@ -182,7 +182,7 @@
     copyCount = 0
 
 # 	for bImage in uniqueImages.values():
-# 		image_path = bpy.utils.expandpath(bImage.filepath)
+# 		image_path = bpy.path.abspath(bImage.filepath)
 # 		if bpy.sys.exists(image_path):
 # 			# Make a name for the target path.
 # 			dest_image_path = dest_dir + image_path.split('\\')[-1].split('/')[-1]
@@ -790,7 +790,7 @@
     print("OBJ Export time: %.2f" % (time.clock() - time1))
 #	print "OBJ Export time: %.2f" % (sys.time() - time1)
 
-def do_export(filepath, context,
+def write(filepath, context,
               EXPORT_APPLY_MODIFIERS = True, # not used
               EXPORT_ROTX90 = True, # wrong
               EXPORT_TRI = False, # ok
@@ -837,7 +837,7 @@
         orig_frame = scn.frame_current
 
         if EXPORT_ALL_SCENES: # Add scene name into the context_name
-            context_name[1] = '_%s' % bpy.utils.clean_name(scn.name) # WARNING, its possible that this could cause a collision. we could fix if were feeling parranoied.
+            context_name[1] = '_%s' % bpy.path.clean_name(scn.name) # WARNING, its possible that this could cause a collision. we could fix if were feeling parranoied.
 
         # Export an animation?
         if EXPORT_ANIMATION:
@@ -927,27 +927,27 @@
     def execute(self, context):
 
         filepath = self.properties.filepath
-        if not filepath.lower().endswith(".obj"):
-            filepath += ".obj"

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list