- added a flag argument to WM_operator_properties_filesel() currently only used for...
authorCampbell Barton <ideasman42@gmail.com>
Wed, 9 Jun 2010 14:04:34 +0000 (14:04 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 9 Jun 2010 14:04:34 +0000 (14:04 +0000)
- added relative option to saving external multires data
- renamed multires external functiosn to have save / pack as suffix.
- added TODO's for file select operators that should support relative paths but dont.

- also disable openmp on linux cross compile, mingw currently isnt linking -lgomp

18 files changed:
config/linuxcross-config.py
release/scripts/ui/properties_data_modifier.py
source/blender/editors/curve/editfont.c
source/blender/editors/object/object_intern.h
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_ops.c
source/blender/editors/render/render_shading.c
source/blender/editors/screen/screendump.c
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_buttons/buttons_ops.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_info/info_ops.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_text/text_ops.c
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/intern/wm_operators.c

index 3cedf6c..8533c8a 100644 (file)
@@ -153,7 +153,7 @@ BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
 BF_OPENGL_LIB = 'opengl32 glu32'
 BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a']
 
-WITH_BF_OPENMP = True
+WITH_BF_OPENMP = False
 BF_OPENMP = LIBDIR + '/gcc/gomp'
 BF_OPENMP_INC = '${BF_OPENMP}/include'
 BF_OPENMP_LIBPATH = '${BF_OPENMP}/lib'
index cd80d3e..8e85b7d 100644 (file)
@@ -452,12 +452,12 @@ class DATA_PT_modifiers(DataButtonsPanel):
         col = layout.column()
         row = col.row()
         if md.external:
-            row.operator("object.multires_pack_external", text="Pack External")
+            row.operator("object.multires_external_pack", text="Pack External")
             row.label()
             row = col.row()
             row.prop(md, "filepath", text="")
         else:
-            row.operator("object.multires_save_external", text="Save External...")
+            row.operator("object.multires_external_save", text="Save External...")
             row.label()
 
     def PARTICLE_INSTANCE(self, layout, ob, md, wide_ui):
index 37e695c..767c2c8 100644 (file)
@@ -417,7 +417,7 @@ void FONT_OT_file_paste(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE, FILE_SPECIAL, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE, FILE_SPECIAL, FILE_OPENFILE, 0);
 }
 
 /******************* paste buffer operator ********************/
@@ -1639,7 +1639,7 @@ void FONT_OT_open(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE|FTFONTFILE, FILE_SPECIAL, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|FTFONTFILE, FILE_SPECIAL, FILE_OPENFILE, 0);
 }
 
 /******************* delete operator *********************/
index f82b4e0..c6164fe 100644 (file)
@@ -157,8 +157,8 @@ void OBJECT_OT_modifier_copy(struct wmOperatorType *ot);
 void OBJECT_OT_multires_subdivide(struct wmOperatorType *ot);
 void OBJECT_OT_multires_reshape(struct wmOperatorType *ot);
 void OBJECT_OT_multires_higher_levels_delete(struct wmOperatorType *ot);
-void OBJECT_OT_multires_save_external(struct wmOperatorType *ot);
-void OBJECT_OT_multires_pack_external(struct wmOperatorType *ot);
+void OBJECT_OT_multires_external_save(struct wmOperatorType *ot);
+void OBJECT_OT_multires_external_pack(struct wmOperatorType *ot);
 void OBJECT_OT_meshdeform_bind(struct wmOperatorType *ot);
 void OBJECT_OT_explode_refresh(struct wmOperatorType *ot);
 
index 697373e..c5c7d49 100644 (file)
@@ -1009,11 +1009,12 @@ void OBJECT_OT_multires_reshape(wmOperatorType *ot)
 
 /****************** multires save external operator *********************/
 
-static int multires_save_external_exec(bContext *C, wmOperator *op)
+static int multires_external_save_exec(bContext *C, wmOperator *op)
 {
        Object *ob = ED_object_active_context(C);
        Mesh *me= (ob)? ob->data: op->customdata;
        char path[FILE_MAX];
+       int relative= RNA_boolean_get(op->ptr, "relative_path");
 
        if(!me)
                return OPERATOR_CANCELLED;
@@ -1023,7 +1024,8 @@ static int multires_save_external_exec(bContext *C, wmOperator *op)
        
        RNA_string_get(op->ptr, "path", path);
 
-       /* BLI_path_rel(path, G.sce); */ /* TODO, relative path operator option */
+       if(relative)
+               BLI_path_rel(path, G.sce);
 
        CustomData_external_add(&me->fdata, &me->id, CD_MDISPS, me->totface, path);
        CustomData_external_write(&me->fdata, &me->id, CD_MASK_MESH, me->totface, 0);
@@ -1031,7 +1033,7 @@ static int multires_save_external_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-static int multires_save_external_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int multires_external_save_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
        Object *ob = ED_object_active_context(C);
        MultiresModifierData *mmd;
@@ -1049,8 +1051,11 @@ static int multires_save_external_invoke(bContext *C, wmOperator *op, wmEvent *e
        if(CustomData_external_test(&me->fdata, CD_MDISPS))
                return OPERATOR_CANCELLED;
 
+       if(!RNA_property_is_set(op->ptr, "relative_path"))
+               RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
+
        if(RNA_property_is_set(op->ptr, "path"))
-               return multires_save_external_exec(C, op);
+               return multires_external_save_exec(C, op);
        
        op->customdata= me;
 
@@ -1062,27 +1067,27 @@ static int multires_save_external_invoke(bContext *C, wmOperator *op, wmEvent *e
        return OPERATOR_RUNNING_MODAL;
 }
 
-void OBJECT_OT_multires_save_external(wmOperatorType *ot)
+void OBJECT_OT_multires_external_save(wmOperatorType *ot)
 {
        ot->name= "Multires Save External";
        ot->description= "Save displacements to an external file";
-       ot->idname= "OBJECT_OT_multires_save_external";
+       ot->idname= "OBJECT_OT_multires_external_save";
 
        // XXX modifier no longer in context after file browser .. ot->poll= multires_poll;
-       ot->exec= multires_save_external_exec;
-       ot->invoke= multires_save_external_invoke;
+       ot->exec= multires_external_save_exec;
+       ot->invoke= multires_external_save_invoke;
        ot->poll= multires_poll;
        
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
-       WM_operator_properties_filesel(ot, FOLDERFILE|BTXFILE, FILE_SPECIAL, FILE_SAVE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|BTXFILE, FILE_SPECIAL, FILE_SAVE, FILE_RELPATH);
        edit_modifier_properties(ot);
 }
 
 /****************** multires pack operator *********************/
 
-static int multires_pack_external_exec(bContext *C, wmOperator *op)
+static int multires_external_pack_exec(bContext *C, wmOperator *op)
 {
        Object *ob = ED_object_active_context(C);
        Mesh *me= ob->data;
@@ -1096,14 +1101,14 @@ static int multires_pack_external_exec(bContext *C, wmOperator *op)
        return OPERATOR_FINISHED;
 }
 
-void OBJECT_OT_multires_pack_external(wmOperatorType *ot)
+void OBJECT_OT_multires_external_pack(wmOperatorType *ot)
 {
        ot->name= "Multires Pack External";
        ot->description= "Pack displacements from an external file";
-       ot->idname= "OBJECT_OT_multires_pack_external";
+       ot->idname= "OBJECT_OT_multires_external_pack";
 
        ot->poll= multires_poll;
-       ot->exec= multires_pack_external_exec;
+       ot->exec= multires_external_pack_exec;
        
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
index 274e8ff..09fcd94 100644 (file)
@@ -138,8 +138,8 @@ void ED_operatortypes_object(void)
        WM_operatortype_append(OBJECT_OT_multires_subdivide);
        WM_operatortype_append(OBJECT_OT_multires_reshape);
        WM_operatortype_append(OBJECT_OT_multires_higher_levels_delete);
-       WM_operatortype_append(OBJECT_OT_multires_save_external);
-       WM_operatortype_append(OBJECT_OT_multires_pack_external);
+       WM_operatortype_append(OBJECT_OT_multires_external_save);
+       WM_operatortype_append(OBJECT_OT_multires_external_pack);
        WM_operatortype_append(OBJECT_OT_meshdeform_bind);
        WM_operatortype_append(OBJECT_OT_explode_refresh);
        
index b6d8198..2a12b16 100644 (file)
@@ -913,9 +913,7 @@ void TEXTURE_OT_envmap_save(wmOperatorType *ot)
        
        /* properties */
        //RNA_def_enum(ot->srna, "file_type", image_file_type_items, R_PNG, "File Type", "File type to save image as.");
-       WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_SAVE);
-       
-       RNA_def_boolean(ot->srna, "relative_path", 0, "Relative Path", "Save image with relative path to current .blend file");
+       WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_SAVE, FILE_RELPATH);
 }
 
 static int envmap_clear_exec(bContext *C, wmOperator *op)
index 394f8b4..141a7c1 100644 (file)
@@ -171,7 +171,7 @@ void SCREEN_OT_screenshot(wmOperatorType *ot)
        
        ot->flag= 0;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_SAVE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_SAVE, 0);
        RNA_def_boolean(ot->srna, "full", 1, "Full Screen", "");
 }
 
index 8f195b8..b410969 100644 (file)
@@ -150,9 +150,8 @@ void SOUND_OT_open(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, FILE_RELPATH);
        RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory.");
-       RNA_def_boolean(ot->srna, "relative_path", FALSE, "Relative Path", "Load image with relative path to current .blend file");
 }
 
 /* ******************************************************* */
index 9261e28..ef7b3ce 100644 (file)
@@ -147,6 +147,6 @@ void BUTTONS_OT_file_browse(wmOperatorType *ot)
        ot->cancel= file_browse_cancel;
 
        /* properties */
-       WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, 0);
 }
 
index 9322bae..c59b478 100644 (file)
@@ -1117,7 +1117,7 @@ void GRAPH_OT_sound_bake (wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, 0);
        RNA_def_float(ot->srna, "low", 0.0f, 0.0, 100000.0, "Lowest frequency", "", 0.1, 1000.00);
        RNA_def_float(ot->srna, "high", 100000.0, 0.0, 100000.0, "Highest frequency", "", 0.1, 1000.00);
        RNA_def_float(ot->srna, "attack", 0.005, 0.0, 2.0, "Attack time", "", 0.01, 0.1);
index fb95480..3eeeb86 100644 (file)
@@ -754,9 +754,7 @@ void IMAGE_OT_open(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE);
-
-       RNA_def_boolean(ot->srna, "relative_path", 0, "Relative Path", "Load image with relative path to current .blend file");
+       WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, FILE_RELPATH);
 }
 
 /******************** replace image operator ********************/
@@ -809,7 +807,7 @@ void IMAGE_OT_replace(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, 0); //XXX TODO, relative_path
 }
 
 /******************** save image as operator ********************/
@@ -997,9 +995,8 @@ void IMAGE_OT_save_as(wmOperatorType *ot)
 
        /* properties */
        RNA_def_enum(ot->srna, "file_type", image_file_type_items, R_PNG, "File Type", "File type to save image as.");
-       WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_SAVE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_SAVE, FILE_RELPATH);
 
-       RNA_def_boolean(ot->srna, "relative_path", 0, "Relative Path", "Save image with relative path to current .blend file");
        RNA_def_boolean(ot->srna, "copy", 0, "Copy", "Create a new image file without modifying the current image in blender");
 }
 
index 64d2c61..86d7d6b 100644 (file)
@@ -299,7 +299,7 @@ void FILE_OT_find_missing_files(wmOperatorType *ot)
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
        /* properties */
-       WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, 0);
 }
 
 /********************* report box operator *********************/
@@ -397,4 +397,4 @@ void INFO_OT_reports_display_update(wmOperatorType *ot)
        ot->flag= 0;
        
        /* properties */
-}
\ No newline at end of file
+}
index befb37a..2fae827 100644 (file)
@@ -2304,7 +2304,7 @@ void NODE_OT_add_file(wmOperatorType *ot)
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE, 0);  //XXX TODO, relative_path
        RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Datablock name to assign.");
 }
 
index f36461a..7bd00e6 100644 (file)
@@ -336,7 +336,7 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot)
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, 0); //XXX TODO, relative_path
        sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME|SEQPROP_FILES);
        RNA_def_boolean(ot->srna, "sound", TRUE, "Sound", "Load sound with the movie");
 }
@@ -378,7 +378,7 @@ void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot)
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE, FILE_SPECIAL, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE, FILE_SPECIAL, FILE_OPENFILE, 0);  //XXX TODO, relative_path
        sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME|SEQPROP_FILES);
        RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory.");
 }
@@ -469,7 +469,7 @@ void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot)
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE, 0);  //XXX TODO, relative_path
        sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME|SEQPROP_ENDFRAME|SEQPROP_FILES);
 }
 
@@ -617,7 +617,7 @@ void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot)
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
-       WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, 0);  //XXX TODO, relative_path
        sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME|SEQPROP_ENDFRAME);
        RNA_def_enum(ot->srna, "type", sequencer_prop_effect_types, SEQ_CROSS, "Type", "Sequencer effect type");
        RNA_def_float_vector(ot->srna, "color", 3, NULL, 0.0f, 1.0f, "Color", "Initialize the strip with this color (only used when type='COLOR')", 0.0f, 1.0f);
index 8382e96..d3c1975 100644 (file)
@@ -295,7 +295,7 @@ void TEXT_OT_open(wmOperatorType *ot)
        ot->flag= OPTYPE_UNDO;
        
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE, FILE_SPECIAL, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE, FILE_SPECIAL, FILE_OPENFILE, 0);  //XXX TODO, relative_path
        RNA_def_boolean(ot->srna, "internal", 0, "Make internal", "Make text file internal after loading");
 }
 
@@ -542,7 +542,7 @@ void TEXT_OT_save_as(wmOperatorType *ot)
        ot->poll= text_edit_poll;
 
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE, FILE_SPECIAL, FILE_SAVE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|TEXTFILE|PYSCRIPTFILE, FILE_SPECIAL, FILE_SAVE, 0);  //XXX TODO, relative_path
 }
 
 /******************* run script operator *********************/
index 2b159da..6668cbf 100644 (file)
@@ -223,7 +223,7 @@ void                WM_operator_properties_sanitize(struct PointerRNA *ptr, int val); /* make
 void           WM_operator_properties_create(struct PointerRNA *ptr, const char *opstring);
 void           WM_operator_properties_create_ptr(struct PointerRNA *ptr, struct wmOperatorType *ot);
 void           WM_operator_properties_free(struct PointerRNA *ptr);
-void           WM_operator_properties_filesel(struct wmOperatorType *ot, int filter, short type, short action);
+void           WM_operator_properties_filesel(struct wmOperatorType *ot, int filter, short type, short action, short flag);
 void           WM_operator_properties_gesture_border(struct wmOperatorType *ot, int extend);
 void           WM_operator_properties_gesture_straightline(struct wmOperatorType *ot, int cursor);
 void           WM_operator_properties_select_all(struct wmOperatorType *ot);
index 4ab110c..c43f362 100644 (file)
@@ -784,7 +784,7 @@ int WM_operator_filesel(bContext *C, wmOperator *op, wmEvent *event)
 }
 
 /* default properties for fileselect */
-void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, short action)
+void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, short action, short flag)
 {
        PropertyRNA *prop;
 
@@ -822,6 +822,9 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type,
                "File Browser Mode", "The setting for the file browser mode to load a .blend file, a library or a special file",
                FILE_LOADLIB, FILE_SPECIAL);
        RNA_def_property_flag(prop, PROP_HIDDEN);
+
+       if(flag & FILE_RELPATH)
+               RNA_def_boolean(ot->srna, "relative_path", 0, "Relative Path", "Select the file relative to the blend file");
 }
 
 void WM_operator_properties_select_all(wmOperatorType *ot) {
@@ -1472,7 +1475,7 @@ static void WM_OT_open_mainfile(wmOperatorType *ot)
        ot->exec= wm_open_mainfile_exec;
        ot->poll= WM_operator_winactive;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_OPENFILE, 0);
 
        RNA_def_boolean(ot->srna, "load_ui", 1, "Load UI", "Load user interface setup in the .blend file");
        RNA_def_boolean(ot->srna, "use_scripts", 1, "Trusted Source", "Allow blend file execute scripts automatically, default available from system preferences");
@@ -1643,13 +1646,12 @@ static void WM_OT_link_append(wmOperatorType *ot)
        
        ot->flag |= OPTYPE_UNDO;
 
-       WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_LOADLIB, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_LOADLIB, FILE_OPENFILE, FILE_RELPATH);
        
        RNA_def_boolean(ot->srna, "link", 1, "Link", "Link the objects or datablocks rather than appending");
        RNA_def_boolean(ot->srna, "autoselect", 1, "Select", "Select the linked objects");
        RNA_def_boolean(ot->srna, "active_layer", 1, "Active Layer", "Put the linked objects on the active layer");
        RNA_def_boolean(ot->srna, "instance_groups", 1, "Instance Groups", "Create instances for each group as a DupliGroup");
-       RNA_def_boolean(ot->srna, "relative_path", 1, "Relative Paths", "Store the library path as a relative path to current .blend file");
 
        RNA_def_collection_runtime(ot->srna, "files", &RNA_OperatorFileListElement, "Files", "");
 }      
@@ -1728,7 +1730,7 @@ static void WM_OT_recover_auto_save(wmOperatorType *ot)
        ot->invoke= wm_recover_auto_save_invoke;
        ot->poll= WM_operator_winactive;
 
-       WM_operator_properties_filesel(ot, BLENDERFILE, FILE_BLENDER, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, BLENDERFILE, FILE_BLENDER, FILE_OPENFILE, 0);
 }
 
 /* *************** save file as **************** */
@@ -1811,7 +1813,7 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot)
        ot->exec= wm_save_as_mainfile_exec;
        ot->poll= WM_operator_winactive;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_SAVE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_SAVE, 0);
        RNA_def_boolean(ot->srna, "compress", 0, "Compress", "Write compressed .blend file");
        RNA_def_boolean(ot->srna, "relative_remap", 0, "Remap Relative", "Remap relative paths when saving in a different directory");
 }
@@ -1860,7 +1862,7 @@ static void WM_OT_save_mainfile(wmOperatorType *ot)
        ot->exec= wm_save_as_mainfile_exec;
        ot->poll= NULL;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_SAVE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_SAVE, 0);
        RNA_def_boolean(ot->srna, "compress", 0, "Compress", "Write compressed .blend file");
        RNA_def_boolean(ot->srna, "relative_remap", 0, "Remap Relative", "Remap relative paths when saving in a different directory");
 }
@@ -1909,7 +1911,7 @@ static void WM_OT_collada_export(wmOperatorType *ot)
        ot->exec= wm_collada_export_exec;
        ot->poll= WM_operator_winactive;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE|COLLADAFILE, FILE_BLENDER, FILE_SAVE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|COLLADAFILE, FILE_BLENDER, FILE_SAVE, 0);
 }
 
 /* function used for WM_OT_save_mainfile too */
@@ -1937,7 +1939,7 @@ static void WM_OT_collada_import(wmOperatorType *ot)
        ot->exec= wm_collada_import_exec;
        ot->poll= WM_operator_winactive;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE|COLLADAFILE, FILE_BLENDER, FILE_OPENFILE);
+       WM_operator_properties_filesel(ot, FOLDERFILE|COLLADAFILE, FILE_BLENDER, FILE_OPENFILE, 0);
 }
 
 #endif