[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30025] branches/render25: Render Branch: https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29994:HEAD
Campbell Barton
ideasman42 at gmail.com
Tue Jul 6 12:33:42 CEST 2010
Revision: 30025
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30025
Author: campbellbarton
Date: 2010-07-06 12:33:42 +0200 (Tue, 06 Jul 2010)
Log Message:
-----------
Render Branch: https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29994:HEAD
Modified Paths:
--------------
branches/render25/intern/ghost/GHOST_Path-api.h
branches/render25/intern/ghost/intern/GHOST_SystemCarbon.cpp
branches/render25/intern/ghost/intern/GHOST_SystemCocoa.mm
branches/render25/release/scripts/modules/blend_render_info.py
branches/render25/release/scripts/op/wm.py
branches/render25/release/scripts/ui/properties_data_curve.py
branches/render25/release/scripts/ui/properties_object_constraint.py
branches/render25/release/scripts/ui/properties_physics_softbody.py
branches/render25/release/scripts/ui/space_info.py
branches/render25/release/scripts/ui/space_logic.py
branches/render25/release/scripts/ui/space_time.py
branches/render25/release/scripts/ui/space_userpref.py
branches/render25/release/scripts/ui/space_view3d.py
branches/render25/release/scripts/ui/space_view3d_toolbar.py
branches/render25/source/blender/blenkernel/intern/sequencer.c
branches/render25/source/blender/blenlib/intern/path_util.c
branches/render25/source/blender/makesrna/intern/rna_sequencer.c
branches/render25/source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c
branches/render25/tools/btools.py
Added Paths:
-----------
branches/render25/release/windows/installer/
branches/render25/release/windows/installer/00.checked.bmp
branches/render25/release/windows/installer/00.header.bmp
branches/render25/release/windows/installer/00.installer.ico
branches/render25/release/windows/installer/00.sconsblender.nsi
Removed Paths:
-------------
branches/render25/release/windows/installer/00.checked.bmp
branches/render25/release/windows/installer/00.header.bmp
branches/render25/release/windows/installer/00.installer.ico
branches/render25/release/windows/installer/00.sconsblender.nsi
Modified: branches/render25/intern/ghost/GHOST_Path-api.h
===================================================================
--- branches/render25/intern/ghost/GHOST_Path-api.h 2010-07-06 10:21:28 UTC (rev 30024)
+++ branches/render25/intern/ghost/GHOST_Path-api.h 2010-07-06 10:33:42 UTC (rev 30025)
@@ -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/render25/intern/ghost/intern/GHOST_SystemCarbon.cpp
===================================================================
--- branches/render25/intern/ghost/intern/GHOST_SystemCarbon.cpp 2010-07-06 10:21:28 UTC (rev 30024)
+++ branches/render25/intern/ghost/intern/GHOST_SystemCarbon.cpp 2010-07-06 10:33:42 UTC (rev 30025)
@@ -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/render25/intern/ghost/intern/GHOST_SystemCocoa.mm
===================================================================
--- branches/render25/intern/ghost/intern/GHOST_SystemCocoa.mm 2010-07-06 10:21:28 UTC (rev 30024)
+++ branches/render25/intern/ghost/intern/GHOST_SystemCocoa.mm 2010-07-06 10:33:42 UTC (rev 30025)
@@ -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/render25/release/scripts/modules/blend_render_info.py
===================================================================
--- branches/render25/release/scripts/modules/blend_render_info.py 2010-07-06 10:21:28 UTC (rev 30024)
+++ branches/render25/release/scripts/modules/blend_render_info.py 2010-07-06 10:33:42 UTC (rev 30025)
@@ -32,50 +32,51 @@
} 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/render25/release/scripts/op/wm.py
===================================================================
--- branches/render25/release/scripts/op/wm.py 2010-07-06 10:21:28 UTC (rev 30024)
+++ branches/render25/release/scripts/op/wm.py 2010-07-06 10:33:42 UTC (rev 30025)
@@ -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)
-
+
if not os.path.exists(filepath):
self.report({'ERROR'}, "File '%s' not found" % filepath)
return {'CANCELLED'}
-
+
if sys.platform == 'win32':
- subprocess.Popen(['start', filepath], shell= True)
+ subprocess.Popen(['start', filepath], shell=True)
elif sys.platform == 'darwin':
subprocess.Popen(['open', filepath])
else:
@@ -463,7 +463,6 @@
return {'FINISHED'}
-
class WM_OT_doc_view(bpy.types.Operator):
'''Load online reference docs'''
bl_idname = "wm.doc_view"
Modified: branches/render25/release/scripts/ui/properties_data_curve.py
===================================================================
--- branches/render25/release/scripts/ui/properties_data_curve.py 2010-07-06 10:21:28 UTC (rev 30024)
+++ branches/render25/release/scripts/ui/properties_data_curve.py 2010-07-06 10:33:42 UTC (rev 30025)
@@ -367,21 +367,21 @@
text = context.curve
wide_ui = context.region.width > narrowui
-
+
split = layout.split()
col = split.column()
col.operator("font.textbox_add", icon='ZOOMIN')
if wide_ui:
col = split.column()
-
+
for i, box in enumerate(text.textboxes):
-
+
boxy = layout.box()
-
+
row = boxy.row()
-
+
split = row.split()
-
+
col = split.column(align=True)
col.label(text="Dimensions:")
@@ -390,14 +390,14 @@
if wide_ui:
col = split.column(align=True)
-
+
col.label(text="Offset:")
col.prop(box, "x", text="X")
col.prop(box, "y", text="Y")
-
- row.operator("font.textbox_remove", text='', icon='X', emboss=False).index = i
-
+ row.operator("font.textbox_remove", text='', icon='X', emboss=False).index = i
+
+
classes = [
DATA_PT_context_curve,
DATA_PT_shape_curve,
Modified: branches/render25/release/scripts/ui/properties_object_constraint.py
===================================================================
--- branches/render25/release/scripts/ui/properties_object_constraint.py 2010-07-06 10:21:28 UTC (rev 30024)
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list