Revision: 42587
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42587
Author:   campbellbarton
Date:     2011-12-12 21:01:39 +0000 (Mon, 12 Dec 2011)
Log Message:
-----------
svn merge ^/trunk/blender -r42564:42586

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

Modified Paths:
--------------
    branches/bmesh/blender/release/scripts/modules/bpy/path.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/anim.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/clip.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/image.py
    branches/bmesh/blender/release/scripts/startup/bl_operators/wm.py
    branches/bmesh/blender/source/blender/blenlib/BLI_fileops.h
    branches/bmesh/blender/source/blender/blenlib/intern/storage.c
    branches/bmesh/blender/source/blender/editors/animation/keyingsets.c
    branches/bmesh/blender/source/blender/editors/interface/interface_handlers.c
    branches/bmesh/blender/source/blender/editors/interface/interface_ops.c
    branches/bmesh/blender/source/blender/editors/interface/interface_regions.c
    branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c
    branches/bmesh/blender/source/blender/editors/object/object_hook.c
    branches/bmesh/blender/source/blender/editors/sculpt_paint/paint_vertex.c
    branches/bmesh/blender/source/blender/editors/space_clip/clip_toolbar.c
    branches/bmesh/blender/source/blender/editors/space_file/file_ops.c
    branches/bmesh/blender/source/blender/editors/space_view3d/view3d_toolbar.c
    branches/bmesh/blender/source/blender/editors/util/undo.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_access.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_actuator.c
    branches/bmesh/blender/source/blender/windowmanager/WM_api.h
    branches/bmesh/blender/source/blender/windowmanager/intern/wm_event_system.c
    branches/bmesh/blender/source/blender/windowmanager/intern/wm_operators.c

Property Changed:
----------------
    branches/bmesh/blender/
    branches/bmesh/blender/release/


Property changes on: branches/bmesh/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber:37517
/branches/soc-2011-tomato:42376,42378-42379,42397,42400
/trunk/blender:39992-42564
   + /branches/soc-2011-cucumber:37517
/branches/soc-2011-tomato:42376,42378-42379,42397,42400
/trunk/blender:39992-42586


Property changes on: branches/bmesh/blender/release
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender/release:31524-42516,42522-42548,42551-42564
   + /trunk/blender/release:31524-42516,42522-42548,42551-42585

Modified: branches/bmesh/blender/release/scripts/modules/bpy/path.py
===================================================================
--- branches/bmesh/blender/release/scripts/modules/bpy/path.py  2011-12-12 
20:57:10 UTC (rev 42586)
+++ branches/bmesh/blender/release/scripts/modules/bpy/path.py  2011-12-12 
21:01:39 UTC (rev 42587)
@@ -54,7 +54,7 @@
     """
     if path.startswith("//"):
         if library:
-            start = abspath(_os.path.dirname(library.filepath))
+            start = _os.path.dirname(abspath(library.filepath))
         return _os.path.join(_os.path.dirname(_bpy.data.filepath)
                              if start is None else start,
                              path[2:],

Modified: branches/bmesh/blender/release/scripts/startup/bl_operators/anim.py
===================================================================
--- branches/bmesh/blender/release/scripts/startup/bl_operators/anim.py 
2011-12-12 20:57:10 UTC (rev 42586)
+++ branches/bmesh/blender/release/scripts/startup/bl_operators/anim.py 
2011-12-12 21:01:39 UTC (rev 42587)
@@ -38,7 +38,7 @@
     bl_label = "Export Keying Set..."
 
     filepath = StringProperty(
-            name="File Path",
+            subtype='FILE_PATH',
             )
     filter_folder = BoolProperty(
             name="Filter folders",

Modified: branches/bmesh/blender/release/scripts/startup/bl_operators/clip.py
===================================================================
--- branches/bmesh/blender/release/scripts/startup/bl_operators/clip.py 
2011-12-12 20:57:10 UTC (rev 42586)
+++ branches/bmesh/blender/release/scripts/startup/bl_operators/clip.py 
2011-12-12 21:01:39 UTC (rev 42587)
@@ -413,7 +413,12 @@
 
     @staticmethod
     def _setupCamera(context):
+        sc = context.space_data
+        clip = sc.clip
+        tracking = clip.tracking
+
         camob = CLIP_OT_setup_tracking_scene._findOrCreateCamera(context)
+        cam = camob.data
 
         # Remove all constraints to be sure motion is fine
         camob.constraints.clear()
@@ -423,6 +428,9 @@
         con.use_active_clip = True
         con.influence = 1.0
 
+        cam.sensor_width = tracking.camera.sensor_width
+        cam.lens = tracking.camera.focal_length
+
     @staticmethod
     def _setupViewport(context):
         sc = context.space_data

Modified: branches/bmesh/blender/release/scripts/startup/bl_operators/image.py
===================================================================
--- branches/bmesh/blender/release/scripts/startup/bl_operators/image.py        
2011-12-12 20:57:10 UTC (rev 42586)
+++ branches/bmesh/blender/release/scripts/startup/bl_operators/image.py        
2011-12-12 21:01:39 UTC (rev 42587)
@@ -30,9 +30,7 @@
     bl_options = {'REGISTER'}
 
     filepath = StringProperty(
-            name="File Path",
-            description="Path to an image file",
-            maxlen=1024,
+            subtype='FILE_PATH',
             )
 
     def _editor_guess(self, context):

Modified: branches/bmesh/blender/release/scripts/startup/bl_operators/wm.py
===================================================================
--- branches/bmesh/blender/release/scripts/startup/bl_operators/wm.py   
2011-12-12 20:57:10 UTC (rev 42586)
+++ branches/bmesh/blender/release/scripts/startup/bl_operators/wm.py   
2011-12-12 21:01:39 UTC (rev 42587)
@@ -748,8 +748,6 @@
     bl_label = ""
 
     filepath = StringProperty(
-            name="File Path",
-            maxlen=1024,
             subtype='FILE_PATH',
             )
 
@@ -1085,8 +1083,7 @@
     bl_label = "Activate Keyconfig"
 
     filepath = StringProperty(
-            name="File Path",
-            maxlen=1024,
+            subtype='FILE_PATH',
             )
 
     def execute(self, context):
@@ -1116,8 +1113,7 @@
     bl_label = "Activate Application Configuration"
 
     filepath = StringProperty(
-            name="File Path",
-            maxlen=1024,
+            subtype='FILE_PATH',
             )
 
     def execute(self, context):
@@ -1203,8 +1199,7 @@
     bl_label = "Import Key Configuration..."
 
     filepath = StringProperty(
-            name="File Path",
-            description="Filepath to write file to",
+            subtype='FILE_PATH',
             default="keymap.py",
             )
     filter_folder = BoolProperty(
@@ -1270,8 +1265,7 @@
     bl_label = "Export Key Configuration..."
 
     filepath = StringProperty(
-            name="File Path",
-            description="Filepath to write file to",
+            subtype='FILE_PATH',
             default="keymap.py",
             )
     filter_folder = BoolProperty(
@@ -1513,8 +1507,7 @@
             )
 
     filepath = StringProperty(
-            name="File Path",
-            description="File path to write file to",
+            subtype='FILE_PATH',
             )
     filter_folder = BoolProperty(
             name="Filter folders",

Modified: branches/bmesh/blender/source/blender/blenlib/BLI_fileops.h
===================================================================
--- branches/bmesh/blender/source/blender/blenlib/BLI_fileops.h 2011-12-12 
20:57:10 UTC (rev 42586)
+++ branches/bmesh/blender/source/blender/blenlib/BLI_fileops.h 2011-12-12 
21:01:39 UTC (rev 42587)
@@ -56,6 +56,7 @@
 struct direntry;
 
 int    BLI_is_dir(const char *path);
+int    BLI_is_file(const char *path);
 void   BLI_dir_create_recursive(const char *dir);
 double BLI_dir_free_space(const char *dir);
 char  *BLI_current_working_dir(char *dir, const int maxlen);

Modified: branches/bmesh/blender/source/blender/blenlib/intern/storage.c
===================================================================
--- branches/bmesh/blender/source/blender/blenlib/intern/storage.c      
2011-12-12 20:57:10 UTC (rev 42586)
+++ branches/bmesh/blender/source/blender/blenlib/intern/storage.c      
2011-12-12 21:01:39 UTC (rev 42587)
@@ -471,6 +471,12 @@
        return S_ISDIR(BLI_exists(file));
 }
 
+int BLI_is_file(const char *path)
+{
+       int mode= BLI_exists(path);
+       return (mode && !S_ISDIR(mode));
+}
+
 LinkNode *BLI_file_read_as_lines(const char *name)
 {
        FILE *fp= fopen(name, "r");

Modified: branches/bmesh/blender/source/blender/editors/animation/keyingsets.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/animation/keyingsets.c        
2011-12-12 20:57:10 UTC (rev 42586)
+++ branches/bmesh/blender/source/blender/editors/animation/keyingsets.c        
2011-12-12 21:01:39 UTC (rev 42587)
@@ -798,7 +798,7 @@
        for (ks= builtin_keyingsets.first; ks; ks=ks->next, i--) {
                /* only show KeyingSet if context is suitable */
                if (ANIM_keyingset_context_ok_poll(C, ks))
-                       uiItemEnumO_value(layout, ks->name, ICON_NONE, op_name, 
"type", i);
+                       uiItemIntO(layout, ks->name, ICON_NONE, op_name, 
"type", i);
        }
        
        uiPupMenuEnd(C, pup);

Modified: 
branches/bmesh/blender/source/blender/editors/interface/interface_handlers.c
===================================================================
--- 
branches/bmesh/blender/source/blender/editors/interface/interface_handlers.c    
    2011-12-12 20:57:10 UTC (rev 42586)
+++ 
branches/bmesh/blender/source/blender/editors/interface/interface_handlers.c    
    2011-12-12 21:01:39 UTC (rev 42587)
@@ -5492,6 +5492,11 @@
        ARegion *ar_ctx= CTX_wm_region(C);
        uiBlock *block;
 
+       /* background mode */
+       if (ar_ctx == NULL) {
+               return NULL;
+       }
+
        /* scan active regions ui */
        for(block=ar_ctx->uiblocks.first; block; block=block->next) {
                if (block->ui_operator) {

Modified: 
branches/bmesh/blender/source/blender/editors/interface/interface_ops.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/interface/interface_ops.c     
2011-12-12 20:57:10 UTC (rev 42586)
+++ branches/bmesh/blender/source/blender/editors/interface/interface_ops.c     
2011-12-12 21:01:39 UTC (rev 42587)
@@ -458,11 +458,16 @@
         *      - otherwise, up to info (which is what users normally see)
         */
        str = BKE_reports_string(reports, (G.f & G_DEBUG)? RPT_DEBUG : 
RPT_INFO);
-       
-       write_text(txt, str);
-       MEM_freeN(str);
-       
-       return OPERATOR_FINISHED;
+
+       if (str) {
+               write_text(txt, str);
+               MEM_freeN(str);
+
+               return OPERATOR_FINISHED;
+       }
+       else {
+               return OPERATOR_CANCELLED;
+       }
 }
 
 static void UI_OT_reports_to_textblock(wmOperatorType *ot)

Modified: 
branches/bmesh/blender/source/blender/editors/interface/interface_regions.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/interface/interface_regions.c 
2011-12-12 20:57:10 UTC (rev 42586)
+++ branches/bmesh/blender/source/blender/editors/interface/interface_regions.c 
2011-12-12 21:01:39 UTC (rev 42587)
@@ -2481,22 +2481,14 @@
        va_end(ap);
 }
 
+/* note, only call this is the file exists,
+ * the case where the file does not exist so can be saved without a
+ * popup must be checked for already, since saving from here
+ * will free the operator which will break invoke().
+ * The operator state for this is implicitly OPERATOR_RUNNING_MODAL */
 void uiPupMenuSaveOver(bContext *C, wmOperator *op, const char *filename)
 {
-       size_t len= strlen(filename);
-
-       if(len==0)
-               return;
-
-       if(filename[len-1]=='/' || filename[len-1]=='\\') {
-               uiPupMenuError(C, "Cannot overwrite a directory");
-               WM_operator_free(op);
-               return;
-       }
-       if(BLI_exists(filename)==0)
-               operator_cb(C, op, 1);
-       else
-               confirm_operator(C, op, "Save Over", filename);
+       confirm_operator(C, op, "Save Over", filename);
 }
 
 void uiPupMenuNotice(bContext *C, const char *str, ...)

Modified: branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c    
2011-12-12 20:57:10 UTC (rev 42586)

@@ 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