[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38563] branches/soc-2011-salad: Merging r38517 through r38562 trunk into soc-2011-salad
Sergey Sharybin
g.ulairi at gmail.com
Thu Jul 21 17:08:57 CEST 2011
Revision: 38563
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38563
Author: nazgul
Date: 2011-07-21 15:08:57 +0000 (Thu, 21 Jul 2011)
Log Message:
-----------
Merging r38517 through r38562 trunk into soc-2011-salad
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38517
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38562
Modified Paths:
--------------
branches/soc-2011-salad/GNUmakefile
branches/soc-2011-salad/build_files/scons/tools/Blender.py
branches/soc-2011-salad/release/scripts/modules/bpy/path.py
branches/soc-2011-salad/release/scripts/modules/bpy/utils.py
branches/soc-2011-salad/release/scripts/modules/bpy_extras/image_utils.py
branches/soc-2011-salad/release/scripts/startup/bl_operators/image.py
branches/soc-2011-salad/source/blender/blenkernel/intern/image.c
branches/soc-2011-salad/source/blender/blenlib/intern/path_util.c
branches/soc-2011-salad/source/blender/editors/object/object_bake.c
branches/soc-2011-salad/source/blender/editors/space_image/image_buttons.c
branches/soc-2011-salad/source/blender/editors/space_image/image_ops.c
branches/soc-2011-salad/source/blender/editors/space_view3d/drawobject.c
branches/soc-2011-salad/source/blender/editors/space_view3d/view3d_draw.c
branches/soc-2011-salad/source/blender/editors/space_view3d/view3d_intern.h
branches/soc-2011-salad/source/blender/makesdna/DNA_image_types.h
branches/soc-2011-salad/source/blender/makesrna/intern/rna_image.c
branches/soc-2011-salad/source/blender/makesrna/intern/rna_object.c
branches/soc-2011-salad/source/blender/python/mathutils/mathutils_Matrix.c
Property Changed:
----------------
branches/soc-2011-salad/
Property changes on: branches/soc-2011-salad
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38546
/trunk/blender:36834-38516
+ /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38208
/branches/soc-2011-tomato:36831-38546
/trunk/blender:36834-38562
Modified: branches/soc-2011-salad/GNUmakefile
===================================================================
--- branches/soc-2011-salad/GNUmakefile 2011-07-21 15:04:41 UTC (rev 38562)
+++ branches/soc-2011-salad/GNUmakefile 2011-07-21 15:08:57 UTC (rev 38563)
@@ -73,7 +73,7 @@
@echo
@echo Building Blender ...
- make -C $(BUILD_DIR) -s -j $(NPROCS) install
+ $(MAKE) -C $(BUILD_DIR) -s -j $(NPROCS) install
@echo
@echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
@echo blender installed, run from: "$(BUILD_DIR)/bin/blender"
@@ -112,6 +112,6 @@
python3 source/tests/check_deprecated.py
clean:
- make -C $(BUILD_DIR) clean
+ $(MAKE) -C $(BUILD_DIR) clean
.PHONY: all
Modified: branches/soc-2011-salad/build_files/scons/tools/Blender.py
===================================================================
--- branches/soc-2011-salad/build_files/scons/tools/Blender.py 2011-07-21 15:04:41 UTC (rev 38562)
+++ branches/soc-2011-salad/build_files/scons/tools/Blender.py 2011-07-21 15:08:57 UTC (rev 38563)
@@ -324,11 +324,7 @@
defs.append('WITH_PYTHON')
if env['BF_DEBUG']:
defs.append('_DEBUG')
-
- if env['BF_BUILDINFO']:
- defs.append('BUILD_DATE')
- defs.append('NAN_BUILDINFO')
-
+
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs.append(env['BF_PTHREADS_INC'])
Modified: branches/soc-2011-salad/release/scripts/modules/bpy/path.py
===================================================================
--- branches/soc-2011-salad/release/scripts/modules/bpy/path.py 2011-07-21 15:04:41 UTC (rev 38562)
+++ branches/soc-2011-salad/release/scripts/modules/bpy/path.py 2011-07-21 15:08:57 UTC (rev 38563)
@@ -117,7 +117,7 @@
"""
Returns the path stripped of directort and extension, ensured to be utf8 compatible.
"""
- return _os.path.splitext(_os.path.basename(name))[0].encode("utf8", "replace").decode("utf8")
+ return _os.path.splitext(basename(name))[0].encode("utf8", "replace").decode("utf8")
def resolve_ncase(path):
@@ -231,3 +231,12 @@
modules.append(("%s.%s" % (filename, mod_name), mod_path))
return modules
+
+
+def basename(path):
+ """
+ Equivalent to os.path.basename, but skips a "//" suffix.
+
+ Use for Windows compatibility.
+ """
+ return _os.path.basename(path[2:] if path.startswith("//") else path)
Modified: branches/soc-2011-salad/release/scripts/modules/bpy/utils.py
===================================================================
--- branches/soc-2011-salad/release/scripts/modules/bpy/utils.py 2011-07-21 15:04:41 UTC (rev 38562)
+++ branches/soc-2011-salad/release/scripts/modules/bpy/utils.py 2011-07-21 15:08:57 UTC (rev 38563)
@@ -298,11 +298,18 @@
def preset_paths(subdir):
"""
Returns a list of paths for a specific preset.
+
+ :arg subdir: preset subdirectory (must not be an absolute path).
+ :type subdir: string
+ :return: script paths.
+ :rtype: list
"""
dirs = []
for path in script_paths("presets", all=True):
directory = _os.path.join(path, subdir)
- if _os.path.isdir(directory):
+ if not directory.startswith(path):
+ raise Exception("invalid subdir given %r" % subdir)
+ elif _os.path.isdir(directory):
dirs.append(directory)
return dirs
Modified: branches/soc-2011-salad/release/scripts/modules/bpy_extras/image_utils.py
===================================================================
--- branches/soc-2011-salad/release/scripts/modules/bpy_extras/image_utils.py 2011-07-21 15:04:41 UTC (rev 38562)
+++ branches/soc-2011-salad/release/scripts/modules/bpy_extras/image_utils.py 2011-07-21 15:08:57 UTC (rev 38563)
@@ -86,7 +86,9 @@
variants = [imagepath]
if dirname:
- variants += [os.path.join(dirname, imagepath), os.path.join(dirname, os.path.basename(imagepath))]
+ variants += [os.path.join(dirname, imagepath),
+ os.path.join(dirname, bpy.path.basename(imagepath)),
+ ]
for filepath_test in variants:
if ncase_cmp:
@@ -99,7 +101,7 @@
return _image_load(nfilepath)
if place_holder:
- image = bpy.data.images.new(os.path.basename(imagepath), 128, 128)
+ image = bpy.data.images.new(bpy.path.basename(imagepath), 128, 128)
# allow the path to be resolved later
image.filepath = imagepath
return image
Modified: branches/soc-2011-salad/release/scripts/startup/bl_operators/image.py
===================================================================
--- branches/soc-2011-salad/release/scripts/startup/bl_operators/image.py 2011-07-21 15:04:41 UTC (rev 38562)
+++ branches/soc-2011-salad/release/scripts/startup/bl_operators/image.py 2011-07-21 15:08:57 UTC (rev 38563)
@@ -163,7 +163,7 @@
filepath_final = filepath + ("%.3d.%s" % (i, EXT))
i += 1
- image_new.name = os.path.basename(filepath_final)
+ image_new.name = bpy.path.basename(filepath_final)
ProjectEdit._proj_hack[0] = image_new.name
image_new.filepath_raw = filepath_final # TODO, filepath raw is crummy
Modified: branches/soc-2011-salad/source/blender/blenkernel/intern/image.c
===================================================================
--- branches/soc-2011-salad/source/blender/blenkernel/intern/image.c 2011-07-21 15:04:41 UTC (rev 38562)
+++ branches/soc-2011-salad/source/blender/blenkernel/intern/image.c 2011-07-21 15:08:57 UTC (rev 38563)
@@ -432,6 +432,7 @@
ima->gen_x= width;
ima->gen_y= height;
ima->gen_type= uvtestgrid;
+ ima->gen_flag |= (floatbuf ? IMA_GEN_FLOAT : 0);
ibuf= add_ibuf_size(width, height, name, depth, floatbuf, uvtestgrid, color);
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
@@ -2172,7 +2173,7 @@
/* UV testgrid or black or solid etc */
if(ima->gen_x==0) ima->gen_x= 1024;
if(ima->gen_y==0) ima->gen_y= 1024;
- ibuf= add_ibuf_size(ima->gen_x, ima->gen_y, ima->name, 24, 0, ima->gen_type, color);
+ ibuf= add_ibuf_size(ima->gen_x, ima->gen_y, ima->name, 24, (ima->gen_flag & IMA_GEN_FLOAT) != 0, ima->gen_type, color);
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
ima->ok= IMA_OK_LOADED;
}
Modified: branches/soc-2011-salad/source/blender/blenlib/intern/path_util.c
===================================================================
--- branches/soc-2011-salad/source/blender/blenlib/intern/path_util.c 2011-07-21 15:04:41 UTC (rev 38562)
+++ branches/soc-2011-salad/source/blender/blenlib/intern/path_util.c 2011-07-21 15:08:57 UTC (rev 38563)
@@ -1680,7 +1680,7 @@
if(GetModuleFileName(0, fullname, maxlen)) {
if(!BLI_exists(fullname)) {
printf("path can't be found: \"%.*s\"\n", maxlen, fullname);
- MessageBox(NULL, "path constains invalid characters or is too long (see console)", "Error", MB_OK);
+ MessageBox(NULL, "path contains invalid characters or is too long (see console)", "Error", MB_OK);
}
return;
}
Modified: branches/soc-2011-salad/source/blender/editors/object/object_bake.c
===================================================================
--- branches/soc-2011-salad/source/blender/editors/object/object_bake.c 2011-07-21 15:04:41 UTC (rev 38562)
+++ branches/soc-2011-salad/source/blender/editors/object/object_bake.c 2011-07-21 15:08:57 UTC (rev 38563)
@@ -866,6 +866,10 @@
RE_bake_ibuf_filter(ibuf, (char *)ibuf->userdata, bkr->bake_filter);
ibuf->userflags|= IB_BITMAPDIRTY;
+
+ if(ibuf->rect_float)
+ ibuf->userflags|= IB_RECT_INVALID;
+
if(ibuf->mipmap[0]) {
ibuf->userflags|= IB_MIPMAP_INVALID;
imb_freemipmapImBuf(ibuf);
Modified: branches/soc-2011-salad/source/blender/editors/space_image/image_buttons.c
===================================================================
--- branches/soc-2011-salad/source/blender/editors/space_image/image_buttons.c 2011-07-21 15:04:41 UTC (rev 38562)
+++ branches/soc-2011-salad/source/blender/editors/space_image/image_buttons.c 2011-07-21 15:08:57 UTC (rev 38563)
@@ -804,6 +804,7 @@
col= uiLayoutColumn(split, 1);
uiItemR(col, &imaptr, "generated_width", 0, "X", ICON_NONE);
uiItemR(col, &imaptr, "generated_height", 0, "Y", ICON_NONE);
+ uiItemR(col, &imaptr, "use_generated_float", 0, NULL, ICON_NONE);
uiItemR(split, &imaptr, "generated_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
}
Modified: branches/soc-2011-salad/source/blender/editors/space_image/image_ops.c
===================================================================
--- branches/soc-2011-salad/source/blender/editors/space_image/image_ops.c 2011-07-21 15:04:41 UTC (rev 38562)
+++ branches/soc-2011-salad/source/blender/editors/space_image/image_ops.c 2011-07-21 15:08:57 UTC (rev 38563)
@@ -500,7 +500,7 @@
Scene *scene;
Object *obedit;
Image *ima;
- float size, min[2], max[2], d[2];
+ float size, min[2], max[2], d[2], aspx, aspy;
int width, height;
/* retrieve state */
@@ -511,7 +511,11 @@
ima= ED_space_image(sima);
ED_space_image_size(sima, &width, &height);
+ ED_image_aspect(ima, &aspx, &aspy);
+ width= width*aspx;
+ height= height*aspy;
+
/* get bounds */
if(!ED_uvedit_minmax(scene, ima, obedit, min, max))
return OPERATOR_CANCELLED;
Modified: branches/soc-2011-salad/source/blender/editors/space_view3d/drawobject.c
===================================================================
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list