[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30063] branches/soc-2008-mxcurioni: Merged changes in the trunk up to revision 30060.
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Wed Jul 7 01:39:10 CEST 2010
Revision: 30063
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30063
Author: kjym3
Date: 2010-07-07 01:39:10 +0200 (Wed, 07 Jul 2010)
Log Message:
-----------
Merged changes in the trunk up to revision 30060.
Revision Links:
--------------
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30060
Modified Paths:
--------------
branches/soc-2008-mxcurioni/intern/ghost/GHOST_Path-api.h
branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCarbon.cpp
branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.mm
branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemWin32.cpp
branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowCocoa.mm
branches/soc-2008-mxcurioni/release/scripts/modules/blend_render_info.py
branches/soc-2008-mxcurioni/release/scripts/op/wm.py
branches/soc-2008-mxcurioni/release/scripts/ui/properties_data_curve.py
branches/soc-2008-mxcurioni/release/scripts/ui/properties_object_constraint.py
branches/soc-2008-mxcurioni/release/scripts/ui/properties_physics_softbody.py
branches/soc-2008-mxcurioni/release/scripts/ui/space_info.py
branches/soc-2008-mxcurioni/release/scripts/ui/space_logic.py
branches/soc-2008-mxcurioni/release/scripts/ui/space_time.py
branches/soc-2008-mxcurioni/release/scripts/ui/space_userpref.py
branches/soc-2008-mxcurioni/release/scripts/ui/space_view3d.py
branches/soc-2008-mxcurioni/release/scripts/ui/space_view3d_toolbar.py
branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_mball.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/BKE_sequencer.h
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/mball.c
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/sequencer.c
branches/soc-2008-mxcurioni/source/blender/blenlib/BLI_path_util.h
branches/soc-2008-mxcurioni/source/blender/blenlib/intern/path_util.c
branches/soc-2008-mxcurioni/source/blender/editors/interface/interface_handlers.c
branches/soc-2008-mxcurioni/source/blender/editors/mesh/editmesh_tools.c
branches/soc-2008-mxcurioni/source/blender/editors/mesh/mesh_intern.h
branches/soc-2008-mxcurioni/source/blender/editors/mesh/mesh_ops.c
branches/soc-2008-mxcurioni/source/blender/editors/mesh/meshtools.c
branches/soc-2008-mxcurioni/source/blender/editors/screen/screen_context.c
branches/soc-2008-mxcurioni/source/blender/editors/space_outliner/outliner.c
branches/soc-2008-mxcurioni/source/blender/editors/space_view3d/drawobject.c
branches/soc-2008-mxcurioni/source/blender/editors/space_view3d/view3d_edit.c
branches/soc-2008-mxcurioni/source/blender/makesrna/intern/rna_sequencer.c
branches/soc-2008-mxcurioni/source/blender/makesrna/rna_cleanup/rna_cleaner.py
branches/soc-2008-mxcurioni/source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c
branches/soc-2008-mxcurioni/tools/btools.py
Added Paths:
-----------
branches/soc-2008-mxcurioni/release/windows/installer/
branches/soc-2008-mxcurioni/release/windows/installer/00.checked.bmp
branches/soc-2008-mxcurioni/release/windows/installer/00.header.bmp
branches/soc-2008-mxcurioni/release/windows/installer/00.installer.ico
branches/soc-2008-mxcurioni/release/windows/installer/00.sconsblender.nsi
Removed Paths:
-------------
branches/soc-2008-mxcurioni/release/windows/installer/00.checked.bmp
branches/soc-2008-mxcurioni/release/windows/installer/00.header.bmp
branches/soc-2008-mxcurioni/release/windows/installer/00.installer.ico
branches/soc-2008-mxcurioni/release/windows/installer/00.sconsblender.nsi
Modified: branches/soc-2008-mxcurioni/intern/ghost/GHOST_Path-api.h
===================================================================
--- branches/soc-2008-mxcurioni/intern/ghost/GHOST_Path-api.h 2010-07-06 23:28:23 UTC (rev 30062)
+++ branches/soc-2008-mxcurioni/intern/ghost/GHOST_Path-api.h 2010-07-06 23:39:10 UTC (rev 30063)
@@ -45,8 +45,7 @@
/**
* Determine the base dir in which user configuration is stored, not including versioning.
- * If needed, it will create the base directory.
- * @return Unsigned char string pointing to user dir (eg ~/.blender/).
+ * @return Unsigned char string pointing to user dir (eg ~).
*/
extern const GHOST_TUns8* GHOST_getUserDir();
Modified: branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCarbon.cpp
===================================================================
--- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCarbon.cpp 2010-07-06 23:28:23 UTC (rev 30062)
+++ branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCarbon.cpp 2010-07-06 23:39:10 UTC (rev 30063)
@@ -1238,5 +1238,15 @@
const GHOST_TUns8* GHOST_SystemCarbon::getBinaryDir() const
{
- return NULL;
+ CFURLRef bundleURL;
+ CFStringRef pathStr;
+ static char path[256];
+ CFBundleRef mainBundle = CFBundleGetMainBundle();
+
+ bundleURL = CFBundleCopyBundleURL(mainBundle);
+ pathStr = CFURLCopyFileSystemPath(bundleURL, kCFURLPOSIXPathStyle);
+ CFStringGetCString(pathStr, path, 255, kCFStringEncodingASCII);
+ CFRelease(pathStr);
+ CFRelease(bundleURL);
+ return (GHOST_TUns8*)path;
}
Modified: branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.mm
===================================================================
--- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.mm 2010-07-06 23:28:23 UTC (rev 30062)
+++ branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemCocoa.mm 2010-07-06 23:39:10 UTC (rev 30063)
@@ -1783,85 +1783,61 @@
#pragma mark Base directories retrieval
-// TODO: this should only return base path, remove the appending of Blender or .blender
const GHOST_TUns8* GHOST_SystemCocoa::getSystemDir() const
{
static GHOST_TUns8 tempPath[512] = "";
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- NSFileManager *fileManager;
NSString *basePath;
NSArray *paths;
paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSLocalDomainMask, YES);
if ([paths count] > 0)
- basePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"Blender"];
- else { //Fall back to standard unix path in case of issue
- basePath = @"/usr/share/blender";
+ basePath = [paths objectAtIndex:0];
+ else {
+ [pool drain];
+ return NULL;
}
- /* Ensure path exists, creates it if needed */
- fileManager = [NSFileManager defaultManager];
- if (![fileManager fileExistsAtPath:basePath isDirectory:NULL]) {
- [fileManager createDirectoryAtPath:basePath attributes:nil];
- }
-
strcpy((char*)tempPath, [basePath cStringUsingEncoding:NSASCIIStringEncoding]);
[pool drain];
return tempPath;
}
-// TODO: this should only return base path, remove the appending of Blenbder or .blender
const GHOST_TUns8* GHOST_SystemCocoa::getUserDir() const
{
static GHOST_TUns8 tempPath[512] = "";
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- NSFileManager *fileManager;
NSString *basePath;
NSArray *paths;
paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
if ([paths count] > 0)
- basePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"Blender"];
- else { //Fall back to HOME in case of issue
- basePath = [NSHomeDirectory() stringByAppendingPathComponent:@".blender"];
+ basePath = [paths objectAtIndex:0];
+ else {
+ [pool drain];
+ return NULL;
}
-
- /* Ensure path exists, creates it if needed */
- fileManager = [NSFileManager defaultManager];
- if (![fileManager fileExistsAtPath:basePath isDirectory:NULL]) {
- [fileManager createDirectoryAtPath:basePath attributes:nil];
- }
-
+
strcpy((char*)tempPath, [basePath cStringUsingEncoding:NSASCIIStringEncoding]);
[pool drain];
return tempPath;
}
-// TODO: this is same as getUserDir for now
const GHOST_TUns8* GHOST_SystemCocoa::getBinaryDir() const
{
static GHOST_TUns8 tempPath[512] = "";
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
- NSFileManager *fileManager;
NSString *basePath;
- NSArray *paths;
-
- paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
-
- if ([paths count] > 0)
- basePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"Blender"];
- else { //Fall back to HOME in case of issue
- basePath = [NSHomeDirectory() stringByAppendingPathComponent:@".blender"];
- }
- /* Ensure path exists, creates it if needed */
- fileManager = [NSFileManager defaultManager];
- if (![fileManager fileExistsAtPath:basePath isDirectory:NULL]) {
- [fileManager createDirectoryAtPath:basePath attributes:nil];
+ basePath = [[NSBundle mainBundle] bundlePath];
+
+ if (basePath == nil) {
+ [pool drain];
+ return NULL;
}
strcpy((char*)tempPath, [basePath cStringUsingEncoding:NSASCIIStringEncoding]);
Modified: branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
--- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemWin32.cpp 2010-07-06 23:28:23 UTC (rev 30062)
+++ branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_SystemWin32.cpp 2010-07-06 23:39:10 UTC (rev 30063)
@@ -37,6 +37,14 @@
#include "GHOST_SystemWin32.h"
#include "GHOST_EventDragnDrop.h"
+#define WIN32_LEAN_AND_MEAN
+#ifdef _WIN32_IE
+#undef _WIN32_IE
+#endif
+#define _WIN32_IE 0x0501
+#include <windows.h>
+#include <shlobj.h>
+
// win64 doesn't define GWL_USERDATA
#ifdef WIN32
#ifndef GWL_USERDATA
@@ -88,8 +96,6 @@
#include "GHOST_WindowWin32.h"
#include "GHOST_NDOFManager.h"
-#include <shlobj.h>
-
// Key code values not found in winuser.h
#ifndef VK_MINUS
#define VK_MINUS 0xBD
@@ -1129,4 +1135,4 @@
}
return NULL;
-}
\ No newline at end of file
+}
Modified: branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowCocoa.mm
===================================================================
--- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowCocoa.mm 2010-07-06 23:28:23 UTC (rev 30062)
+++ branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowCocoa.mm 2010-07-06 23:39:10 UTC (rev 30063)
@@ -732,7 +732,7 @@
#ifdef MAC_OS_X_VERSION_10_6
//10.6 provides Cocoa functions to autoshow menu bar, and to change a window style
//Hide menu & dock if needed
- if ([[m_window screen] isEqual:[NSScreen mainScreen]])
+ if ([[m_window screen] isEqual:[[NSScreen screens] objectAtIndex:0]])
{
[NSApp setPresentationOptions:(NSApplicationPresentationHideDock | NSApplicationPresentationAutoHideMenuBar)];
}
@@ -743,7 +743,7 @@
#else
//With 10.5, we need to create a new window to change its style to borderless
//Hide menu & dock if needed
- if ([[m_window screen] isEqual:[NSScreen mainScreen]])
+ if ([[m_window screen] isEqual:[[NSScreen screens] objectAtIndex:0]])
{
//Cocoa function in 10.5 does not allow to set the menu bar in auto-show mode [NSMenu setMenuBarVisible:NO];
//One of the very few 64bit compatible Carbon function
Modified: branches/soc-2008-mxcurioni/release/scripts/modules/blend_render_info.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/modules/blend_render_info.py 2010-07-06 23:28:23 UTC (rev 30062)
+++ branches/soc-2008-mxcurioni/release/scripts/modules/blend_render_info.py 2010-07-06 23:39:10 UTC (rev 30063)
@@ -31,50 +31,51 @@
# int SDNAnr, nr;
# } BHead;
+
def read_blend_rend_chunk(path):
import struct
- file = open(path, 'rb')
-
- head = file.read(7)
+ blendfile = open(path, 'rb')
+ head = blendfile.read(7)
+
if head[0:2] == b'\x1f\x8b': # gzip magic
import gzip
- file.close()
- file = gzip.open(path, 'rb')
- head = file.read(7)
+ blendfile.close()
+ blendfile = gzip.open(path, 'rb')
+ head = blendfile.read(7)
if head != b'BLENDER':
print("not a blend file:", path)
- file.close()
+ blendfile.close()
return []
- is_64_bit = (file.read(1) == b'-')
+ is_64_bit = (blendfile.read(1) == b'-')
# true for PPC, false for X86
- is_big_endian = (file.read(1) == b'V')
+ is_big_endian = (blendfile.read(1) == b'V')
# Now read the bhead chunk!!!
- file.read(3) # skip the version
+ blendfile.read(3) # skip the version
scenes = []
-
+
sizeof_bhead = 24 if is_64_bit else 20
- while file.read(4) == b'REND':
+ while blendfile.read(4) == b'REND':
sizeof_bhead_left = sizeof_bhead - 4
-
- rend_length = struct.unpack('>i' if is_big_endian else '<i', file.read(4))[0]
+
+ struct.unpack('>i' if is_big_endian else '<i', blendfile.read(4))[0]
sizeof_bhead_left -= 4
# We dont care about the rest of the bhead struct
- file.read(sizeof_bhead_left)
-
+ blendfile.read(sizeof_bhead_left)
+
# Now we want the scene name, start and end frame. this is 32bites long
- start_frame, end_frame = struct.unpack('>2i' if is_big_endian else '<2i', file.read(8))
+ start_frame, end_frame = struct.unpack('>2i' if is_big_endian else '<2i', blendfile.read(8))
- scene_name = file.read(24)
+ scene_name = blendfile.read(24)
scene_name = scene_name[:scene_name.index(b'\0')]
Modified: branches/soc-2008-mxcurioni/release/scripts/op/wm.py
===================================================================
--- branches/soc-2008-mxcurioni/release/scripts/op/wm.py 2010-07-06 23:28:23 UTC (rev 30062)
+++ branches/soc-2008-mxcurioni/release/scripts/op/wm.py 2010-07-06 23:39:10 UTC (rev 30063)
@@ -435,7 +435,7 @@
bl_idname = "wm.path_open"
bl_label = ""
- filepath = StringProperty(name="File Path", maxlen= 1024)
+ filepath = StringProperty(name="File Path", maxlen=1024)
def execute(self, context):
import sys
@@ -444,13 +444,13 @@
filepath = bpy.utils.expandpath(self.properties.filepath)
filepath = os.path.normpath(filepath)
-
+
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list