diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/curve/editfont.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_intern.h | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 31 | ||||
-rw-r--r-- | source/blender/editors/object/object_ops.c | 4 | ||||
-rw-r--r-- | source/blender/editors/render/render_shading.c | 4 | ||||
-rw-r--r-- | source/blender/editors/screen/screendump.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sound/sound_ops.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_buttons/buttons_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 9 | ||||
-rw-r--r-- | source/blender/editors/space_info/info_ops.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_add.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 20 |
16 files changed, 53 insertions, 52 deletions
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c index 37e695cf823..767c2c82594 100644 --- a/source/blender/editors/curve/editfont.c +++ b/source/blender/editors/curve/editfont.c @@ -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 *********************/ diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h index f82b4e0324f..c6164fef8a8 100644 --- a/source/blender/editors/object/object_intern.h +++ b/source/blender/editors/object/object_intern.h @@ -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); diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 697373ea923..c5c7d49d0a4 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -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; diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c index 274e8ff2d73..09fcd9432de 100644 --- a/source/blender/editors/object/object_ops.c +++ b/source/blender/editors/object/object_ops.c @@ -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); diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index b6d819801c5..2a12b16be7c 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -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) diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c index 394f8b4fbcd..141a7c1c050 100644 --- a/source/blender/editors/screen/screendump.c +++ b/source/blender/editors/screen/screendump.c @@ -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", ""); } diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c index 8f195b819ea..b4109692a4c 100644 --- a/source/blender/editors/sound/sound_ops.c +++ b/source/blender/editors/sound/sound_ops.c @@ -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"); } /* ******************************************************* */ diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c index 9261e28cd6a..ef7b3ce6d2a 100644 --- a/source/blender/editors/space_buttons/buttons_ops.c +++ b/source/blender/editors/space_buttons/buttons_ops.c @@ -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); } diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 9322bae13c9..c59b4783708 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -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); diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index fb9548001dc..3eeeb865ae4 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -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"); } diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c index 64d2c6138c7..86d7d6bf014 100644 --- a/source/blender/editors/space_info/info_ops.c +++ b/source/blender/editors/space_info/info_ops.c @@ -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 +} diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index befb37a2432..2fae8274951 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -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."); } diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index f36461ab7e0..7bd00e6081f 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -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); diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 8382e963523..d3c197506b9 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -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 *********************/ diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 2b159daf6a1..6668cbf5dd8 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -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); diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 4ab110cc275..c43f362ceaa 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -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 |