Revision: 38562
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38562
Author:   nazgul
Date:     2011-07-21 15:04:41 +0000 (Thu, 21 Jul 2011)
Log Message:
-----------
Merging r38516 through r38561 from trunk into soc-2011-tomato

Revision Links:
--------------
    
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38516
    
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38561

Modified Paths:
--------------
    branches/soc-2011-tomato/GNUmakefile
    branches/soc-2011-tomato/build_files/scons/tools/Blender.py
    branches/soc-2011-tomato/release/scripts/modules/bpy/path.py
    branches/soc-2011-tomato/release/scripts/modules/bpy/utils.py
    branches/soc-2011-tomato/release/scripts/modules/bpy_extras/image_utils.py
    branches/soc-2011-tomato/release/scripts/startup/bl_operators/image.py
    branches/soc-2011-tomato/source/blender/blenkernel/intern/image.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/path_util.c
    branches/soc-2011-tomato/source/blender/editors/object/object_bake.c
    branches/soc-2011-tomato/source/blender/editors/space_image/image_buttons.c
    branches/soc-2011-tomato/source/blender/editors/space_image/image_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_draw.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_intern.h
    branches/soc-2011-tomato/source/blender/makesdna/DNA_image_types.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_image.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_object.c
    branches/soc-2011-tomato/source/blender/python/mathutils/mathutils_Matrix.c

Property Changed:
----------------
    branches/soc-2011-tomato/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:36831-38515
   + /trunk/blender:36831-38561

Modified: branches/soc-2011-tomato/GNUmakefile
===================================================================
--- branches/soc-2011-tomato/GNUmakefile        2011-07-21 14:59:56 UTC (rev 
38561)
+++ branches/soc-2011-tomato/GNUmakefile        2011-07-21 15:04:41 UTC (rev 
38562)
@@ -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-tomato/build_files/scons/tools/Blender.py
===================================================================
--- branches/soc-2011-tomato/build_files/scons/tools/Blender.py 2011-07-21 
14:59:56 UTC (rev 38561)
+++ branches/soc-2011-tomato/build_files/scons/tools/Blender.py 2011-07-21 
15:04:41 UTC (rev 38562)
@@ -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-tomato/release/scripts/modules/bpy/path.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/bpy/path.py        
2011-07-21 14:59:56 UTC (rev 38561)
+++ branches/soc-2011-tomato/release/scripts/modules/bpy/path.py        
2011-07-21 15:04:41 UTC (rev 38562)
@@ -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-tomato/release/scripts/modules/bpy/utils.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/bpy/utils.py       
2011-07-21 14:59:56 UTC (rev 38561)
+++ branches/soc-2011-tomato/release/scripts/modules/bpy/utils.py       
2011-07-21 15:04:41 UTC (rev 38562)
@@ -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-tomato/release/scripts/modules/bpy_extras/image_utils.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/modules/bpy_extras/image_utils.py  
2011-07-21 14:59:56 UTC (rev 38561)
+++ branches/soc-2011-tomato/release/scripts/modules/bpy_extras/image_utils.py  
2011-07-21 15:04:41 UTC (rev 38562)
@@ -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-tomato/release/scripts/startup/bl_operators/image.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_operators/image.py      
2011-07-21 14:59:56 UTC (rev 38561)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_operators/image.py      
2011-07-21 15:04:41 UTC (rev 38562)
@@ -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-tomato/source/blender/blenkernel/intern/image.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/image.c   
2011-07-21 14:59:56 UTC (rev 38561)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/image.c   
2011-07-21 15:04:41 UTC (rev 38562)
@@ -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-tomato/source/blender/blenlib/intern/path_util.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenlib/intern/path_util.c  
2011-07-21 14:59:56 UTC (rev 38561)
+++ branches/soc-2011-tomato/source/blender/blenlib/intern/path_util.c  
2011-07-21 15:04:41 UTC (rev 38562)
@@ -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-tomato/source/blender/editors/object/object_bake.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/object/object_bake.c        
2011-07-21 14:59:56 UTC (rev 38561)
+++ branches/soc-2011-tomato/source/blender/editors/object/object_bake.c        
2011-07-21 15:04:41 UTC (rev 38562)
@@ -860,6 +860,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-tomato/source/blender/editors/space_image/image_buttons.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_image/image_buttons.c 
2011-07-21 14:59:56 UTC (rev 38561)
+++ branches/soc-2011-tomato/source/blender/editors/space_image/image_buttons.c 
2011-07-21 15:04:41 UTC (rev 38562)
@@ -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-tomato/source/blender/editors/space_image/image_ops.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_image/image_ops.c     
2011-07-21 14:59:56 UTC (rev 38561)
+++ branches/soc-2011-tomato/source/blender/editors/space_image/image_ops.c     
2011-07-21 15:04:41 UTC (rev 38562)
@@ -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-tomato/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- branches/soc-2011-tomato/source/blender/editors/space_view3d/drawobject.c   
2011-07-21 14:59:56 UTC (rev 38561)
+++ branches/soc-2011-tomato/source/blender/editors/space_view3d/drawobject.c   
2011-07-21 15:04:41 UTC (rev 38562)
@@ -1548,6 +1548,11 @@
                glLoadName(base->selcol);
 }
 
+#ifdef VIEW3D_CAMERA_BORDER_HACK
+float view3d_camera_border_hack_col[4];
+short view3d_camera_border_hack_test= FALSE;
+#endif
+
 /* flag similar to draw_object() */
 static void drawcamera(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base 
*base, int flag)
 {
@@ -1562,7 +1567,15 @@
        const float scax= 1.0f / len_v3(ob->obmat[0]);
        const float scay= 1.0f / len_v3(ob->obmat[1]);

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to