Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r--source/blender/windowmanager/intern/wm_files.c12
-rw-r--r--source/blender/windowmanager/intern/wm_files_link.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c5
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c6
-rw-r--r--source/blender/windowmanager/intern/wm_window.c2
5 files changed, 18 insertions, 9 deletions
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 95c7afcbf15..f2050befac1 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -375,6 +375,9 @@ static void wm_init_userdef(Main *bmain)
/* update tempdir from user preferences */
BKE_tempdir_init(U.tempdir);
+
+ /* Update tablet API preference. */
+ WM_init_tablet_api();
}
/* return codes */
@@ -1433,6 +1436,9 @@ static bool wm_file_write(bContext *C, const char *filepath, int fileflags, Repo
ibuf_thumb = IMB_thumb_create(filepath, THB_LARGE, THB_SOURCE_BLEND, ibuf_thumb);
}
+ /* Without this there is no feedback the file was saved. */
+ BKE_reportf(reports, RPT_INFO, "Saved \"%s\"", BLI_path_basename(filepath));
+
/* Success. */
ok = true;
}
@@ -2298,7 +2304,7 @@ static bool wm_open_mainfile_check(bContext *UNUSED(C), wmOperator *op)
RNA_string_get(op->ptr, "filepath", path);
/* get the dir */
- lslash = (char *)BLI_last_slash(path);
+ lslash = (char *)BLI_path_slash_rfind(path);
if (lslash) {
*(lslash + 1) = '\0';
}
@@ -2536,7 +2542,7 @@ void WM_OT_recover_auto_save(wmOperatorType *ot)
static void wm_filepath_default(char *filepath)
{
if (G.save_over == false) {
- BLI_ensure_filename(filepath, FILE_MAX, "untitled.blend");
+ BLI_path_filename_ensure(filepath, FILE_MAX, "untitled.blend");
}
}
@@ -2715,8 +2721,6 @@ static int wm_save_mainfile_invoke(bContext *C, wmOperator *op, const wmEvent *U
RNA_string_get(op->ptr, "filepath", path);
ret = wm_save_as_mainfile_exec(C, op);
- /* Without this there is no feedback the file was saved. */
- BKE_reportf(op->reports, RPT_INFO, "Saved \"%s\"", BLI_path_basename(path));
}
else {
WM_event_add_fileselect(C, op);
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index 5acc8a5fbc6..da4e4160724 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -104,7 +104,7 @@ static int wm_link_append_invoke(bContext *C, wmOperator *op, const wmEvent *UNU
else if (G.relbase_valid) {
char path[FILE_MAX];
BLI_strncpy(path, BKE_main_blendfile_path_from_global(), sizeof(path));
- BLI_parent_dir(path);
+ BLI_path_parent_dir(path);
RNA_string_set(op->ptr, "filepath", path);
}
}
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 6d25874da45..a7578291a21 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -103,6 +103,7 @@
#include "wm.h"
#include "wm_draw.h"
+#include "wm_event_system.h"
#include "wm_event_types.h"
#include "wm_files.h"
#include "wm_window.h"
@@ -3244,8 +3245,12 @@ static void redraw_timer_step(bContext *C,
}
}
else { /* eRTUndo */
+ /* Undo and redo, including depsgraph update since that can be a
+ * significant part of the cost. */
ED_undo_pop(C);
+ wm_event_do_refresh_wm_and_depsgraph(C);
ED_undo_redo(C);
+ wm_event_do_refresh_wm_and_depsgraph(C);
}
}
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index 8a872010ecc..84f099b0dbc 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -429,7 +429,8 @@ static void build_pict_list_ex(
} fp_decoded;
BLI_strncpy(filepath, first, sizeof(filepath));
- fp_framenr = BLI_stringdec(filepath, fp_decoded.head, fp_decoded.tail, &fp_decoded.digits);
+ fp_framenr = BLI_path_sequence_decode(
+ filepath, fp_decoded.head, fp_decoded.tail, &fp_decoded.digits);
pupdate_time();
ptottime = 1.0;
@@ -522,7 +523,8 @@ static void build_pict_list_ex(
/* create a new filepath each time */
fp_framenr += fstep;
- BLI_stringenc(filepath, fp_decoded.head, fp_decoded.tail, fp_decoded.digits, fp_framenr);
+ BLI_path_sequence_encode(
+ filepath, fp_decoded.head, fp_decoded.tail, fp_decoded.digits, fp_framenr);
while ((hasevent = GHOST_ProcessEvents(g_WS.ghost_system, 0))) {
GHOST_DispatchEvents(g_WS.ghost_system);
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index a83432e0248..1e25d73a86d 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -1679,8 +1679,6 @@ void wm_ghost_init(bContext *C)
}
GHOST_UseWindowFocus(wm_init_state.window_focus);
-
- WM_init_tablet_api();
}
}