[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34203] branches/soc-2008-mxcurioni: Merged changes in the trunk up to revision 34201.
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Sun Jan 9 18:56:29 CET 2011
Revision: 34203
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=34203
Author: kjym3
Date: 2011-01-09 17:56:26 +0000 (Sun, 09 Jan 2011)
Log Message:
-----------
Merged changes in the trunk up to revision 34201.
Revision Links:
--------------
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=34201
Modified Paths:
--------------
branches/soc-2008-mxcurioni/CMakeLists.txt
branches/soc-2008-mxcurioni/intern/audaspace/Python/AUD_PyAPI.cpp
branches/soc-2008-mxcurioni/release/scripts/op/io_anim_bvh/export_bvh.py
branches/soc-2008-mxcurioni/release/scripts/op/io_scene_3ds/import_3ds.py
branches/soc-2008-mxcurioni/release/scripts/op/io_scene_fbx/export_fbx.py
branches/soc-2008-mxcurioni/release/scripts/op/io_shape_mdd/export_mdd.py
branches/soc-2008-mxcurioni/release/scripts/op/uvcalc_smart_project.py
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/depsgraph.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/key.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/object.c
branches/soc-2008-mxcurioni/source/blender/blenlib/BLI_utildefines.h
branches/soc-2008-mxcurioni/source/blender/editors/interface/interface_icons.c
branches/soc-2008-mxcurioni/source/blender/editors/interface/resources.c
branches/soc-2008-mxcurioni/source/blender/editors/space_view3d/drawobject.c
branches/soc-2008-mxcurioni/source/blender/editors/transform/transform_manipulator.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_access.c
branches/soc-2008-mxcurioni/source/blender/python/generic/IDProp.c
branches/soc-2008-mxcurioni/source/blender/python/generic/bgl.c
branches/soc-2008-mxcurioni/source/blender/python/generic/mathutils_matrix.c
branches/soc-2008-mxcurioni/source/blender/python/generic/mathutils_matrix.h
branches/soc-2008-mxcurioni/source/blender/python/generic/mathutils_quat.c
branches/soc-2008-mxcurioni/source/blender/python/generic/mathutils_vector.c
branches/soc-2008-mxcurioni/source/blender/python/intern/bpy_interface.c
branches/soc-2008-mxcurioni/source/blender/python/intern/bpy_props.c
branches/soc-2008-mxcurioni/source/blender/python/intern/bpy_rna.c
branches/soc-2008-mxcurioni/source/blender/python/intern/bpy_rna_array.c
branches/soc-2008-mxcurioni/source/blender/windowmanager/intern/wm_files.c
branches/soc-2008-mxcurioni/source/gameengine/VideoTexture/FilterBlueScreen.cpp
branches/soc-2008-mxcurioni/source/gameengine/VideoTexture/FilterColor.cpp
branches/soc-2008-mxcurioni/source/gameengine/VideoTexture/ImageRender.cpp
branches/soc-2008-mxcurioni/source/gameengine/VideoTexture/ImageViewport.cpp
branches/soc-2008-mxcurioni/source/gameengine/VideoTexture/VideoBase.cpp
Property Changed:
----------------
branches/soc-2008-mxcurioni/
branches/soc-2008-mxcurioni/release/scripts/modules/bpy/ops.py
branches/soc-2008-mxcurioni/release/scripts/modules/bpy/utils.py
branches/soc-2008-mxcurioni/release/scripts/op/io_anim_bvh/import_bvh.py
branches/soc-2008-mxcurioni/release/scripts/op/io_scene_obj/import_obj.py
branches/soc-2008-mxcurioni/release/scripts/op/uvcalc_smart_project.py
branches/soc-2008-mxcurioni/release/scripts/presets/sss/chicken.py
branches/soc-2008-mxcurioni/release/scripts/presets/sss/cream.py
branches/soc-2008-mxcurioni/release/scripts/presets/sss/ketchup.py
branches/soc-2008-mxcurioni/release/scripts/presets/sss/marble.py
branches/soc-2008-mxcurioni/release/scripts/presets/sss/potato.py
branches/soc-2008-mxcurioni/release/scripts/presets/sss/skim_milk.py
branches/soc-2008-mxcurioni/release/scripts/presets/sss/skin1.py
branches/soc-2008-mxcurioni/release/scripts/presets/sss/skin2.py
branches/soc-2008-mxcurioni/release/scripts/ui/properties_data_armature.py
branches/soc-2008-mxcurioni/release/scripts/ui/properties_data_bone.py
branches/soc-2008-mxcurioni/release/scripts/ui/properties_data_mesh.py
branches/soc-2008-mxcurioni/release/scripts/ui/properties_data_metaball.py
branches/soc-2008-mxcurioni/release/scripts/ui/properties_data_modifier.py
branches/soc-2008-mxcurioni/release/scripts/ui/properties_texture.py
branches/soc-2008-mxcurioni/release/scripts/ui/properties_world.py
branches/soc-2008-mxcurioni/source/blender/editors/object/object_add.c
branches/soc-2008-mxcurioni/source/blender/editors/object/object_constraint.c
branches/soc-2008-mxcurioni/source/blender/editors/object/object_relations.c
branches/soc-2008-mxcurioni/source/blender/editors/object/object_select.c
branches/soc-2008-mxcurioni/source/blender/editors/physics/particle_edit.c
branches/soc-2008-mxcurioni/source/blender/editors/physics/physics_pointcache.c
branches/soc-2008-mxcurioni/source/blender/editors/render/render_preview.c
branches/soc-2008-mxcurioni/source/blender/editors/render/render_shading.c
branches/soc-2008-mxcurioni/source/blender/editors/sculpt_paint/paint_image.c
branches/soc-2008-mxcurioni/source/blender/editors/sculpt_paint/sculpt.c
branches/soc-2008-mxcurioni/source/blender/editors/space_image/image_buttons.c
branches/soc-2008-mxcurioni/source/blender/editors/space_info/info_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/space_node/node_edit.c
branches/soc-2008-mxcurioni/source/blender/editors/space_text/text_ops.c
Property changes on: branches/soc-2008-mxcurioni
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk/blender:34011-34193
+ /trunk/blender:34011-34201
Modified: branches/soc-2008-mxcurioni/CMakeLists.txt
===================================================================
--- branches/soc-2008-mxcurioni/CMakeLists.txt 2011-01-09 17:49:38 UTC (rev 34202)
+++ branches/soc-2008-mxcurioni/CMakeLists.txt 2011-01-09 17:56:26 UTC (rev 34203)
@@ -129,7 +129,7 @@
option(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking" OFF)
mark_as_advanced(WITH_CXX_GUARDEDALLOC)
-option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BKE_assert()" OFF)
+option(WITH_ASSERT_ABORT "Call abort() when raising an assertion through BLI_assert()" OFF)
mark_as_advanced(WITH_ASSERT_ABORT)
if(APPLE)
Modified: branches/soc-2008-mxcurioni/intern/audaspace/Python/AUD_PyAPI.cpp
===================================================================
--- branches/soc-2008-mxcurioni/intern/audaspace/Python/AUD_PyAPI.cpp 2011-01-09 17:49:38 UTC (rev 34202)
+++ branches/soc-2008-mxcurioni/intern/audaspace/Python/AUD_PyAPI.cpp 2011-01-09 17:56:26 UTC (rev 34203)
@@ -851,7 +851,7 @@
return NULL;
}
- if(!PySequence_Length(py_b) || (py_a != NULL && !PySequence_Length(py_a)))
+ if(!PySequence_Size(py_b) || (py_a != NULL && !PySequence_Size(py_a)))
{
PyErr_SetString(PyExc_ValueError, "The sequence has to contain at least one value!");
return NULL;
@@ -862,7 +862,7 @@
float value;
int result;
- for(int i = 0; i < PySequence_Length(py_b); i++)
+ for(int i = 0; i < PySequence_Size(py_b); i++)
{
py_value = PySequence_GetItem(py_b, i);
result = PyArg_Parse(py_value, "f:filter", &value);
@@ -876,7 +876,7 @@
if(py_a)
{
- for(int i = 0; i < PySequence_Length(py_a); i++)
+ for(int i = 0; i < PySequence_Size(py_a); i++)
{
py_value = PySequence_GetItem(py_a, i);
result = PyArg_Parse(py_value, "f:filter", &value);
Property changes on: branches/soc-2008-mxcurioni/release/scripts/modules/bpy/ops.py
___________________________________________________________________
Deleted: svn:mergeinfo
- /trunk/blender/release/scripts/modules/bpy/ops.py:34011-34193
Property changes on: branches/soc-2008-mxcurioni/release/scripts/modules/bpy/utils.py
___________________________________________________________________
Deleted: svn:mergeinfo
- /trunk/blender/release/scripts/modules/bpy/utils.py:34011-34193
Modified: branches/soc-2008-mxcurioni/release/scripts/op/io_anim_bvh/export_bvh.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/op/io_anim_bvh/export_bvh.py 2011-01-09 17:49:38 UTC (rev 34202)
+++ branches/soc-2008-mxcurioni/release/scripts/op/io_anim_bvh/export_bvh.py 2011-01-09 17:56:26 UTC (rev 34203)
@@ -76,7 +76,10 @@
file.write("%s{\n" % indent_str)
file.write("%s\tOFFSET %.6f %.6f %.6f\n" % (indent_str, loc.x * global_scale, loc.y * global_scale, loc.z * global_scale))
- file.write("%s\tCHANNELS 6 Xposition Yposition Zposition Xrotation Yrotation Zrotation\n" % indent_str)
+ if bone.use_connect and bone.parent:
+ file.write("%s\tCHANNELS 3 Xrotation Yrotation Zrotation\n" % indent_str)
+ else:
+ file.write("%s\tCHANNELS 6 Xposition Yposition Zposition Xrotation Yrotation Zrotation\n" % indent_str)
if my_children:
# store the location for the children
@@ -133,6 +136,7 @@
"rest_arm_imat", # rest_arm_mat inverted
"rest_local_imat", # rest_local_mat inverted
"prev_euler", # last used euler to preserve euler compability in between keyframes
+ "connected", # is the bone connected to the parent bone?
)
def __init__(self, bone_name):
@@ -153,6 +157,7 @@
self.parent = None
self.prev_euler = Euler((0.0, 0.0, 0.0))
+ self.connected = (self.rest_bone.use_connect and self.rest_bone.parent)
def update_posedata(self):
self.pose_mat = self.pose_bone.matrix
@@ -206,7 +211,9 @@
# keep eulers compatible, no jumping on interpolation.
rot = mat_final.rotation_part().invert().to_euler('XYZ', dbone.prev_euler)
- file.write("%.6f %.6f %.6f " % (loc * global_scale)[:])
+ if not dbone.connected:
+ file.write("%.6f %.6f %.6f " % (loc * global_scale)[:])
+
file.write("%.6f %.6f %.6f " % (-degrees(rot[0]), -degrees(rot[1]), -degrees(rot[2])))
dbone.prev_euler = rot
Property changes on: branches/soc-2008-mxcurioni/release/scripts/op/io_anim_bvh/import_bvh.py
___________________________________________________________________
Deleted: svn:mergeinfo
- /trunk/blender/release/scripts/op/io_anim_bvh/import_bvh.py:34011-34193
Modified: branches/soc-2008-mxcurioni/release/scripts/op/io_scene_3ds/import_3ds.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/op/io_scene_3ds/import_3ds.py 2011-01-09 17:49:38 UTC (rev 34202)
+++ branches/soc-2008-mxcurioni/release/scripts/op/io_scene_3ds/import_3ds.py 2011-01-09 17:56:26 UTC (rev 34203)
@@ -612,11 +612,11 @@
data = list( struct.unpack('<ffffffffffff', temp_data) )
new_chunk.bytes_read += STRUCT_SIZE_4x3MAT
- contextMatrix_rot = mathutils.Matrix(\
- data[:3] + [0],\
- data[3:6] + [0],\
- data[6:9] + [0],\
- data[9:] + [1])
+ contextMatrix_rot = mathutils.Matrix((data[:3] + [0], \
+ data[3:6] + [0], \
+ data[6:9] + [0], \
+ data[9:] + [1], \
+ ))
elif (new_chunk.ID == MAT_MAP_FILEPATH):
texture_name, read_str_len = read_string(file)
Modified: branches/soc-2008-mxcurioni/release/scripts/op/io_scene_fbx/export_fbx.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/op/io_scene_fbx/export_fbx.py 2011-01-09 17:49:38 UTC (rev 34202)
+++ branches/soc-2008-mxcurioni/release/scripts/op/io_scene_fbx/export_fbx.py 2011-01-09 17:56:26 UTC (rev 34203)
@@ -28,16 +28,17 @@
import os
import time
-import math # math.pi
-import shutil # for file copying
+import math # math.pi
+import shutil # for file copying
import bpy
from mathutils import Vector, Euler, Matrix
+
# XXX not used anymore, images are copied one at a time
def copy_images(dest_dir, textures):
import shutil
-
+
if not dest_dir.endswith(os.sep):
dest_dir += os.sep
@@ -51,16 +52,17 @@
if Blender.sys.exists(image_path):
# Make a name for the target path.
dest_image_path = dest_dir + image_path.split('\\')[-1].split('/')[-1]
- if not Blender.sys.exists(dest_image_path): # Image isnt already there
+ if not Blender.sys.exists(dest_image_path): # Image isnt already there
print("\tCopying %r > %r" % (image_path, dest_image_path))
try:
shutil.copy(image_path, dest_image_path)
- copyCount+=1
+ copyCount += 1
except:
print("\t\tWarning, file failed to copy, skipping.")
print('\tCopied %d images' % copyCount)
+
# I guess FBX uses degrees instead of radians (Arystan).
# Call this function just before writing to FBX.
# 180 / math.pi == 57.295779513
@@ -81,30 +83,31 @@
sane_name_mapping_ob['Scene'] = 'Scene_'
sane_name_mapping_ob['blend_root'] = 'blend_root_'
+
def increment_string(t):
name = t
num = ''
while name and name[-1].isdigit():
num = name[-1] + num
name = name[:-1]
- if num: return '%s%d' % (name, int(num)+1)
- else: return name + '_0'
+ if num:
+ return '%s%d' % (name, int(num) + 1)
+ else:
+ return name + '_0'
-
# todo - Disallow the name 'Scene' and 'blend_root' - it will bugger things up.
def sane_name(data, dct):
#if not data: return None
- if type(data)==tuple: # materials are paired up with images
+ if type(data) == tuple: # materials are paired up with images
data, other = data
use_other = True
else:
other = None
use_other = False
- if data: name = data.name
- else: name = None
+ name = data.name if data else None
orig_name = name
if other:
@@ -119,26 +122,41 @@
#except: pass
if not name:
- name = 'unnamed' # blank string, ASKING FOR TROUBLE!
+ name = 'unnamed' # blank string, ASKING FOR TROUBLE!
else:
- name = bpy.path.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)
+ while name in iter(dct.values()):
+ name = increment_string(name)
- if use_other: # even if other is None - orig_name_other will be a string or None
+ if use_other: # even if other is None - orig_name_other will be a string or None
dct[orig_name, orig_name_other] = name
else:
dct[orig_name] = name
return name
-def sane_obname(data): return sane_name(data, sane_name_mapping_ob)
-def sane_matname(data): return sane_name(data, sane_name_mapping_mat)
-def sane_texname(data): return sane_name(data, sane_name_mapping_tex)
-def sane_takename(data): return sane_name(data, sane_name_mapping_take)
-def sane_groupname(data): return sane_name(data, sane_name_mapping_group)
+def sane_obname(data):
+ return sane_name(data, sane_name_mapping_ob)
+
+
+def sane_matname(data):
+ return sane_name(data, sane_name_mapping_mat)
+
+
+def sane_texname(data):
+ return sane_name(data, sane_name_mapping_tex)
+
+
+def sane_takename(data):
+ return sane_name(data, sane_name_mapping_take)
+
+
+def sane_groupname(data):
+ return sane_name(data, sane_name_mapping_group)
+
# def derived_paths(fname_orig, basepath, FORCE_CWD=False):
# '''
# fname_orig - blender path, can be relative
@@ -160,8 +178,9 @@
def mat4x4str(mat):
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list