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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-07-11 16:50:43 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-07-11 16:50:43 +0300
commit06312c6d2db8a6d959bed153f76a28f9faf866f8 (patch)
tree0c0e419621bf295ca18133d84eb6d35897584d7d
parent3fe0c32fae20be4146bfa20fe64f56f5716a132b (diff)
parent7ad21c3876c2453f11fd509a0157639d615567fc (diff)
Merge branch 'master' into blender-v2.80-releasev2.80-rc1
-rw-r--r--intern/cycles/device/device_cpu.cpp12
-rw-r--r--intern/cycles/kernel/bvh/bvh.h2
-rw-r--r--release/scripts/startup/bl_operators/wm.py5
-rw-r--r--source/blender/blenkernel/BKE_text.h4
-rw-r--r--source/blender/blenkernel/BKE_undo_system.h3
-rw-r--r--source/blender/blenkernel/intern/armature.c3
-rw-r--r--source/blender/blenkernel/intern/mesh.c1
-rw-r--r--source/blender/blenkernel/intern/text.c22
-rw-r--r--source/blender/blenkernel/intern/undo_system.c67
-rw-r--r--source/blender/editors/armature/editarmature_undo.c3
-rw-r--r--source/blender/editors/curve/editcurve_undo.c6
-rw-r--r--source/blender/editors/curve/editfont_undo.c3
-rw-r--r--source/blender/editors/lattice/editlattice_undo.c3
-rw-r--r--source/blender/editors/mesh/editmesh_undo.c3
-rw-r--r--source/blender/editors/metaball/editmball_undo.c3
-rw-r--r--source/blender/editors/physics/particle_edit_undo.c3
-rw-r--r--source/blender/editors/sculpt_paint/paint_curve_undo.c3
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_undo.c6
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c6
-rw-r--r--source/blender/editors/space_text/text_ops.c10
-rw-r--r--source/blender/editors/space_text/text_undo.c15
-rw-r--r--source/blender/editors/undo/memfile_undo.c6
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c3
-rw-r--r--source/blender/makesrna/intern/rna_space.c11
-rw-r--r--source/blender/python/intern/bpy_interface.c2
-rw-r--r--source/blender/windowmanager/intern/wm_files.c7
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
27 files changed, 131 insertions, 83 deletions
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index dc9adcb1537..b2d923dfdf0 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -980,14 +980,11 @@ class CPUDevice : public Device {
void thread_shader(DeviceTask &task)
{
- KernelGlobals kg = kernel_globals;
+ KernelGlobals *kg = new KernelGlobals(thread_kernel_globals_init());
-#ifdef WITH_OSL
- OSLShader::thread_init(&kg, &kernel_globals, &osl_globals);
-#endif
for (int sample = 0; sample < task.num_samples; sample++) {
for (int x = task.shader_x; x < task.shader_x + task.shader_w; x++)
- shader_kernel()(&kg,
+ shader_kernel()(kg,
(uint4 *)task.shader_input,
(float4 *)task.shader_output,
task.shader_eval_type,
@@ -1002,9 +999,8 @@ class CPUDevice : public Device {
task.update_progress(NULL);
}
-#ifdef WITH_OSL
- OSLShader::thread_free(&kg);
-#endif
+ thread_kernel_globals_free(kg);
+ delete kg;
}
int get_split_task_count(DeviceTask &task)
diff --git a/intern/cycles/kernel/bvh/bvh.h b/intern/cycles/kernel/bvh/bvh.h
index 7503bad37b0..be0f05285e8 100644
--- a/intern/cycles/kernel/bvh/bvh.h
+++ b/intern/cycles/kernel/bvh/bvh.h
@@ -174,7 +174,7 @@ ccl_device_inline bool scene_intersect_valid(const Ray *ray)
* From production scenes so far it seems it's enough to test first element
* only.
*/
- return isfinite(ray->P.x);
+ return isfinite_safe(ray->P.x) && isfinite_safe(ray->D.x);
}
/* Note: ray is passed by value to work around a possible CUDA compiler bug. */
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index f2b885d0064..5cc4b773b54 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1022,8 +1022,9 @@ class WM_OT_doc_view(Operator):
bl_label = "View Documentation"
doc_id: doc_id
- if bpy.app.version_cycle == "release":
- _prefix = ("https://docs.blender.org/api/current")
+ if bpy.app.version_cycle in {"release", "rc"}:
+ _prefix = ("https://docs.blender.org/api/%d.%d%s" %
+ (bpy.app.version[0], bpy.app.version[1], bpy.app.version_char))
else:
_prefix = ("https://docs.blender.org/api/master")
diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h
index d26b9a86635..c78faa9dd18 100644
--- a/source/blender/blenkernel/BKE_text.h
+++ b/source/blender/blenkernel/BKE_text.h
@@ -54,7 +54,7 @@ void BKE_text_write(struct Text *text, struct TextUndoBuf *utxt, const char *str
int BKE_text_file_modified_check(struct Text *text);
void BKE_text_file_modified_ignore(struct Text *text);
-char *txt_to_buf(struct Text *text);
+char *txt_to_buf(struct Text *text, int *r_buf_strlen);
void txt_clean_text(struct Text *text);
void txt_order_cursors(struct Text *text, const bool reverse);
int txt_find_string(struct Text *text, const char *findstr, int wrap, int match_case);
@@ -83,7 +83,7 @@ void txt_delete_selected(struct Text *text, struct TextUndoBuf *utxt);
void txt_sel_all(struct Text *text);
void txt_sel_clear(struct Text *text);
void txt_sel_line(struct Text *text);
-char *txt_sel_to_buf(struct Text *text);
+char *txt_sel_to_buf(struct Text *text, int *r_buf_strlen);
void txt_insert_buf(struct Text *text, struct TextUndoBuf *utxt, const char *in_buffer);
void txt_undo_add_op(struct Text *text, struct TextUndoBuf *utxt, int op);
void txt_do_undo(struct Text *text, struct TextUndoBuf *utxt);
diff --git a/source/blender/blenkernel/BKE_undo_system.h b/source/blender/blenkernel/BKE_undo_system.h
index b5e153fca95..50c29c456d1 100644
--- a/source/blender/blenkernel/BKE_undo_system.h
+++ b/source/blender/blenkernel/BKE_undo_system.h
@@ -106,7 +106,8 @@ typedef struct UndoType {
void (*step_encode_init)(struct bContext *C, UndoStep *us);
bool (*step_encode)(struct bContext *C, struct Main *bmain, UndoStep *us);
- void (*step_decode)(struct bContext *C, struct Main *bmain, UndoStep *us, int dir);
+ void (*step_decode)(
+ struct bContext *C, struct Main *bmain, UndoStep *us, int dir, bool is_final);
/**
* \note When freeing all steps,
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 6d855df8af7..65de951b190 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -1372,7 +1372,8 @@ static void armature_vert_task(void *__restrict userdata,
BLI_assert(i < data->mesh->totvert);
if (data->mesh->dvert != NULL) {
dvert = data->mesh->dvert + i;
- } else {
+ }
+ else {
dvert = NULL;
}
}
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 04164de91ca..f5e93dcf9b7 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -665,6 +665,7 @@ static Mesh *mesh_new_nomain_from_template_ex(const Mesh *me_src,
me_dst->cd_flag = me_src->cd_flag;
me_dst->editflag = me_src->editflag;
+ me_dst->texflag = me_src->texflag;
CustomData_copy(&me_src->vdata, &me_dst->vdata, mask.vmask, CD_CALLOC, verts_len);
CustomData_copy(&me_src->edata, &me_dst->edata, mask.emask, CD_CALLOC, edges_len);
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index 7d5862c1fb6..1d6de646255 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -1289,7 +1289,7 @@ static void txt_delete_sel(Text *text, TextUndoBuf *utxt)
txt_order_cursors(text, false);
if (!undoing) {
- buf = txt_sel_to_buf(text);
+ buf = txt_sel_to_buf(text, NULL);
txt_undo_add_blockop(text, utxt, UNDO_DBLOCK, buf);
MEM_freeN(buf);
}
@@ -1353,13 +1353,17 @@ void txt_sel_line(Text *text)
/* Cut and paste functions */
/***************************/
-char *txt_to_buf(Text *text)
+char *txt_to_buf(Text *text, int *r_buf_strlen)
{
int length;
TextLine *tmp, *linef, *linel;
int charf, charl;
char *buf;
+ if (r_buf_strlen) {
+ *r_buf_strlen = 0;
+ }
+
if (!text->curl) {
return NULL;
}
@@ -1419,6 +1423,10 @@ char *txt_to_buf(Text *text)
buf[length] = 0;
}
+ if (r_buf_strlen) {
+ *r_buf_strlen = length;
+ }
+
return buf;
}
@@ -1475,13 +1483,17 @@ int txt_find_string(Text *text, const char *findstr, int wrap, int match_case)
}
}
-char *txt_sel_to_buf(Text *text)
+char *txt_sel_to_buf(Text *text, int *r_buf_strlen)
{
char *buf;
int length = 0;
TextLine *tmp, *linef, *linel;
int charf, charl;
+ if (r_buf_strlen) {
+ *r_buf_strlen = 0;
+ }
+
if (!text->curl) {
return NULL;
}
@@ -1556,6 +1568,10 @@ char *txt_sel_to_buf(Text *text)
buf[length] = 0;
}
+ if (r_buf_strlen) {
+ *r_buf_strlen = length;
+ }
+
return buf;
}
diff --git a/source/blender/blenkernel/intern/undo_system.c b/source/blender/blenkernel/intern/undo_system.c
index 76b37b940ec..d312dc0190b 100644
--- a/source/blender/blenkernel/intern/undo_system.c
+++ b/source/blender/blenkernel/intern/undo_system.c
@@ -173,7 +173,8 @@ static bool undosys_step_encode(bContext *C, Main *bmain, UndoStack *ustack, Und
return ok;
}
-static void undosys_step_decode(bContext *C, Main *bmain, UndoStack *ustack, UndoStep *us, int dir)
+static void undosys_step_decode(
+ bContext *C, Main *bmain, UndoStack *ustack, UndoStep *us, int dir, bool is_final)
{
CLOG_INFO(&LOG, 2, "addr=%p, name='%s', type='%s'", us, us->name, us->type->name);
@@ -188,7 +189,7 @@ static void undosys_step_decode(bContext *C, Main *bmain, UndoStack *ustack, Und
else {
/* Load the previous memfile state so any ID's referenced in this
* undo step will be correctly resolved, see: T56163. */
- undosys_step_decode(C, bmain, ustack, us_iter, dir);
+ undosys_step_decode(C, bmain, ustack, us_iter, dir, false);
/* May have been freed on memfile read. */
bmain = G.main;
}
@@ -203,7 +204,7 @@ static void undosys_step_decode(bContext *C, Main *bmain, UndoStack *ustack, Und
}
UNDO_NESTED_CHECK_BEGIN;
- us->type->step_decode(C, bmain, us, dir);
+ us->type->step_decode(C, bmain, us, dir, is_final);
UNDO_NESTED_CHECK_END;
#ifdef WITH_GLOBAL_UNDO_CORRECT_ORDER
@@ -678,22 +679,36 @@ bool BKE_undosys_step_undo_with_data_ex(UndoStack *ustack,
* - skip successive steps that store the same data, eg: memfile steps.
* - or steps that include another steps data, eg: a memfile step includes text undo data.
*/
- undosys_step_decode(C, G_MAIN, ustack, us_iter, -1);
+ undosys_step_decode(C, G_MAIN, ustack, us_iter, -1, false);
+
us_iter = us_iter->prev;
}
}
- undosys_step_decode(C, G_MAIN, ustack, us, -1);
-
- ustack->step_active = us_prev;
- undosys_stack_validate(ustack, true);
+ UndoStep *us_active = us_prev;
if (use_skip) {
- if (ustack->step_active && ustack->step_active->skip) {
- CLOG_INFO(
- &LOG, 2, "undo continue with skip %p '%s', type='%s'", us, us->name, us->type->name);
- BKE_undosys_step_undo_with_data(ustack, C, ustack->step_active);
+ while (us_active->skip && us_active->prev) {
+ us_active = us_active->prev;
}
}
+
+ {
+ UndoStep *us_iter = us_prev;
+ do {
+ const bool is_final = (us_iter == us_active);
+ if (is_final == false) {
+ CLOG_INFO(&LOG,
+ 2,
+ "undo continue with skip %p '%s', type='%s'",
+ us_iter,
+ us_iter->name,
+ us_iter->type->name);
+ }
+ undosys_step_decode(C, G_MAIN, ustack, us_iter, -1, is_final);
+ ustack->step_active = us_iter;
+ } while ((us_active != us_iter) && (us_iter = us_iter->prev));
+ }
+
return true;
}
return false;
@@ -732,20 +747,34 @@ bool BKE_undosys_step_redo_with_data_ex(UndoStack *ustack,
if (ustack->step_active && ustack->step_active->next) {
UndoStep *us_iter = ustack->step_active->next;
while (us_iter != us) {
- undosys_step_decode(C, G_MAIN, ustack, us_iter, 1);
+ undosys_step_decode(C, G_MAIN, ustack, us_iter, 1, false);
us_iter = us_iter->next;
}
}
- undosys_step_decode(C, G_MAIN, ustack, us, 1);
- ustack->step_active = us_next;
+ UndoStep *us_active = us_next;
if (use_skip) {
- if (ustack->step_active && ustack->step_active->skip) {
- CLOG_INFO(
- &LOG, 2, "redo continue with skip %p '%s', type='%s'", us, us->name, us->type->name);
- BKE_undosys_step_redo_with_data(ustack, C, ustack->step_active);
+ while (us_active->skip && us_active->prev) {
+ us_active = us_active->next;
}
}
+
+ {
+ UndoStep *us_iter = us_next;
+ do {
+ const bool is_final = (us_iter == us_active);
+ if (is_final == false) {
+ CLOG_INFO(&LOG,
+ 2,
+ "redo continue with skip %p '%s', type='%s'",
+ us_iter,
+ us_iter->name,
+ us_iter->type->name);
+ }
+ undosys_step_decode(C, G_MAIN, ustack, us_iter, 1, is_final);
+ ustack->step_active = us_iter;
+ } while ((us_active != us_iter) && (us_iter = us_iter->next));
+ }
return true;
}
return false;
diff --git a/source/blender/editors/armature/editarmature_undo.c b/source/blender/editors/armature/editarmature_undo.c
index 3a2440af2da..4a82a8fccee 100644
--- a/source/blender/editors/armature/editarmature_undo.c
+++ b/source/blender/editors/armature/editarmature_undo.c
@@ -174,7 +174,8 @@ static bool armature_undosys_step_encode(struct bContext *C,
static void armature_undosys_step_decode(struct bContext *C,
struct Main *UNUSED(bmain),
UndoStep *us_p,
- int UNUSED(dir))
+ int UNUSED(dir),
+ bool UNUSED(is_final))
{
ArmatureUndoStep *us = (ArmatureUndoStep *)us_p;
diff --git a/source/blender/editors/curve/editcurve_undo.c b/source/blender/editors/curve/editcurve_undo.c
index d0c2afcb1d2..835abd1a630 100644
--- a/source/blender/editors/curve/editcurve_undo.c
+++ b/source/blender/editors/curve/editcurve_undo.c
@@ -238,10 +238,8 @@ static bool curve_undosys_step_encode(struct bContext *C,
return true;
}
-static void curve_undosys_step_decode(struct bContext *C,
- struct Main *bmain,
- UndoStep *us_p,
- int UNUSED(dir))
+static void curve_undosys_step_decode(
+ struct bContext *C, struct Main *bmain, UndoStep *us_p, int UNUSED(dir), bool UNUSED(is_final))
{
CurveUndoStep *us = (CurveUndoStep *)us_p;
diff --git a/source/blender/editors/curve/editfont_undo.c b/source/blender/editors/curve/editfont_undo.c
index 82c19db7a4a..8f8c23a7772 100644
--- a/source/blender/editors/curve/editfont_undo.c
+++ b/source/blender/editors/curve/editfont_undo.c
@@ -356,7 +356,8 @@ static bool font_undosys_step_encode(struct bContext *C,
static void font_undosys_step_decode(struct bContext *C,
struct Main *UNUSED(bmain),
UndoStep *us_p,
- int UNUSED(dir))
+ int UNUSED(dir),
+ bool UNUSED(is_final))
{
/* TODO(campbell): undo_system: use low-level API to set mode. */
ED_object_mode_set(C, OB_MODE_EDIT);
diff --git a/source/blender/editors/lattice/editlattice_undo.c b/source/blender/editors/lattice/editlattice_undo.c
index 166201adc15..5164970198e 100644
--- a/source/blender/editors/lattice/editlattice_undo.c
+++ b/source/blender/editors/lattice/editlattice_undo.c
@@ -176,7 +176,8 @@ static bool lattice_undosys_step_encode(struct bContext *C,
static void lattice_undosys_step_decode(struct bContext *C,
struct Main *UNUSED(bmain),
UndoStep *us_p,
- int UNUSED(dir))
+ int UNUSED(dir),
+ bool UNUSED(is_final))
{
LatticeUndoStep *us = (LatticeUndoStep *)us_p;
diff --git a/source/blender/editors/mesh/editmesh_undo.c b/source/blender/editors/mesh/editmesh_undo.c
index 28b14b0060d..e823fb46140 100644
--- a/source/blender/editors/mesh/editmesh_undo.c
+++ b/source/blender/editors/mesh/editmesh_undo.c
@@ -741,7 +741,8 @@ static bool mesh_undosys_step_encode(struct bContext *C,
static void mesh_undosys_step_decode(struct bContext *C,
struct Main *UNUSED(bmain),
UndoStep *us_p,
- int UNUSED(dir))
+ int UNUSED(dir),
+ bool UNUSED(is_final))
{
MeshUndoStep *us = (MeshUndoStep *)us_p;
diff --git a/source/blender/editors/metaball/editmball_undo.c b/source/blender/editors/metaball/editmball_undo.c
index d255fac26ad..9a95560ccdd 100644
--- a/source/blender/editors/metaball/editmball_undo.c
+++ b/source/blender/editors/metaball/editmball_undo.c
@@ -185,7 +185,8 @@ static bool mball_undosys_step_encode(struct bContext *C,
static void mball_undosys_step_decode(struct bContext *C,
struct Main *UNUSED(bmain),
UndoStep *us_p,
- int UNUSED(dir))
+ int UNUSED(dir),
+ bool UNUSED(is_final))
{
MBallUndoStep *us = (MBallUndoStep *)us_p;
diff --git a/source/blender/editors/physics/particle_edit_undo.c b/source/blender/editors/physics/particle_edit_undo.c
index be625eb939f..40d90676487 100644
--- a/source/blender/editors/physics/particle_edit_undo.c
+++ b/source/blender/editors/physics/particle_edit_undo.c
@@ -252,7 +252,8 @@ static bool particle_undosys_step_encode(struct bContext *C,
static void particle_undosys_step_decode(struct bContext *C,
struct Main *UNUSED(bmain),
UndoStep *us_p,
- int UNUSED(dir))
+ int UNUSED(dir),
+ bool UNUSED(is_final))
{
/* TODO(campbell): undo_system: use low-level API to set mode. */
ED_object_mode_set(C, OB_MODE_PARTICLE_EDIT);
diff --git a/source/blender/editors/sculpt_paint/paint_curve_undo.c b/source/blender/editors/sculpt_paint/paint_curve_undo.c
index c03cb69df88..7e283274383 100644
--- a/source/blender/editors/sculpt_paint/paint_curve_undo.c
+++ b/source/blender/editors/sculpt_paint/paint_curve_undo.c
@@ -122,7 +122,8 @@ static bool paintcurve_undosys_step_encode(struct bContext *C,
static void paintcurve_undosys_step_decode(struct bContext *UNUSED(C),
struct Main *UNUSED(bmain),
UndoStep *us_p,
- int UNUSED(dir))
+ int UNUSED(dir),
+ bool UNUSED(is_final))
{
PaintCurveUndoStep *us = (PaintCurveUndoStep *)us_p;
undocurve_to_paintcurve(&us->data, us->pc);
diff --git a/source/blender/editors/sculpt_paint/paint_image_undo.c b/source/blender/editors/sculpt_paint/paint_image_undo.c
index bb73d424152..e7f100ebacb 100644
--- a/source/blender/editors/sculpt_paint/paint_image_undo.c
+++ b/source/blender/editors/sculpt_paint/paint_image_undo.c
@@ -540,10 +540,8 @@ static void image_undosys_step_decode_redo(ImageUndoStep *us)
}
}
-static void image_undosys_step_decode(struct bContext *C,
- struct Main *bmain,
- UndoStep *us_p,
- int dir)
+static void image_undosys_step_decode(
+ struct bContext *C, struct Main *bmain, UndoStep *us_p, int dir, bool UNUSED(is_final))
{
ImageUndoStep *us = (ImageUndoStep *)us_p;
#if 0
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index a20fe375ec7..81bb9c35817 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -1109,10 +1109,8 @@ static void sculpt_undosys_step_decode_redo(struct bContext *C, SculptUndoStep *
}
}
-static void sculpt_undosys_step_decode(struct bContext *C,
- struct Main *bmain,
- UndoStep *us_p,
- int dir)
+static void sculpt_undosys_step_decode(
+ struct bContext *C, struct Main *bmain, UndoStep *us_p, int dir, bool UNUSED(is_final))
{
/* Ensure sculpt mode. */
{
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 63d4f3e3119..33bacb0a95f 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -932,7 +932,7 @@ static void txt_copy_clipboard(Text *text)
return;
}
- buf = txt_sel_to_buf(text);
+ buf = txt_sel_to_buf(text, NULL);
if (buf) {
WM_clipboard_text_set(buf, 0);
@@ -2994,7 +2994,7 @@ static void text_cursor_set_exit(bContext *C, wmOperator *op)
char *buffer;
if (txt_has_sel(text)) {
- buffer = txt_sel_to_buf(text);
+ buffer = txt_sel_to_buf(text, NULL);
WM_clipboard_text_set(buffer, 1);
MEM_freeN(buffer);
}
@@ -3308,7 +3308,7 @@ static int text_find_and_replace(bContext *C, wmOperator *op, short mode)
/* Replace current */
if (mode != TEXT_FIND && txt_has_sel(text)) {
- tmp = txt_sel_to_buf(text);
+ tmp = txt_sel_to_buf(text, NULL);
if (flags & ST_MATCH_CASE) {
found = STREQ(st->findstr, tmp);
@@ -3406,7 +3406,7 @@ static int text_find_set_selected_exec(bContext *C, wmOperator *op)
Text *text = CTX_data_edit_text(C);
char *tmp;
- tmp = txt_sel_to_buf(text);
+ tmp = txt_sel_to_buf(text, NULL);
BLI_strncpy(st->findstr, tmp, ST_MAX_FIND_STR);
MEM_freeN(tmp);
@@ -3437,7 +3437,7 @@ static int text_replace_set_selected_exec(bContext *C, wmOperator *UNUSED(op))
Text *text = CTX_data_edit_text(C);
char *tmp;
- tmp = txt_sel_to_buf(text);
+ tmp = txt_sel_to_buf(text, NULL);
BLI_strncpy(st->replacestr, tmp, ST_MAX_FIND_STR);
MEM_freeN(tmp);
diff --git a/source/blender/editors/space_text/text_undo.c b/source/blender/editors/space_text/text_undo.c
index 7710c5637a2..66cbaa8bb5b 100644
--- a/source/blender/editors/space_text/text_undo.c
+++ b/source/blender/editors/space_text/text_undo.c
@@ -130,7 +130,7 @@ static void text_undosys_step_decode_redo_impl(Text *text, TextUndoStep *us)
us->step.is_applied = true;
}
-static void text_undosys_step_decode_undo(TextUndoStep *us)
+static void text_undosys_step_decode_undo(TextUndoStep *us, bool is_final)
{
TextUndoStep *us_iter = us;
while (us_iter->step.next && (us_iter->step.next->type == us_iter->step.type)) {
@@ -140,13 +140,16 @@ static void text_undosys_step_decode_undo(TextUndoStep *us)
us_iter = (TextUndoStep *)us_iter->step.next;
}
Text *text_prev = NULL;
- while (us_iter != us) {
+ while ((us_iter != us) || (is_final && us_iter == us)) {
Text *text = us_iter->text_ref.ptr;
text_undosys_step_decode_undo_impl(text, us_iter);
if (text_prev != text) {
text_update_edited(text);
text_prev = text;
}
+ if (is_final) {
+ break;
+ }
us_iter = (TextUndoStep *)us_iter->step.prev;
}
}
@@ -175,15 +178,13 @@ static void text_undosys_step_decode_redo(TextUndoStep *us)
}
}
-static void text_undosys_step_decode(struct bContext *C,
- struct Main *UNUSED(bmain),
- UndoStep *us_p,
- int dir)
+static void text_undosys_step_decode(
+ struct bContext *C, struct Main *UNUSED(bmain), UndoStep *us_p, int dir, bool is_final)
{
TextUndoStep *us = (TextUndoStep *)us_p;
if (dir < 0) {
- text_undosys_step_decode_undo(us);
+ text_undosys_step_decode_undo(us, is_final);
}
else {
text_undosys_step_decode_redo(us);
diff --git a/source/blender/editors/undo/memfile_undo.c b/source/blender/editors/undo/memfile_undo.c
index 0f495d64b29..f3e2ee92558 100644
--- a/source/blender/editors/undo/memfile_undo.c
+++ b/source/blender/editors/undo/memfile_undo.c
@@ -83,10 +83,8 @@ static bool memfile_undosys_step_encode(struct bContext *UNUSED(C),
return true;
}
-static void memfile_undosys_step_decode(struct bContext *C,
- struct Main *bmain,
- UndoStep *us_p,
- int UNUSED(dir))
+static void memfile_undosys_step_decode(
+ struct bContext *C, struct Main *bmain, UndoStep *us_p, int UNUSED(dir), bool UNUSED(is_final))
{
ED_editors_exit(bmain, false);
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index f8b35d08ef0..03173bcb3da 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -3095,8 +3095,7 @@ static void rna_def_mesh(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_paint_mask_vertex", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_PAINT_VERT_SEL);
- RNA_def_property_ui_text(
- prop, "Vertex Selection", "Vertex selection masking for painting");
+ RNA_def_property_ui_text(prop, "Vertex Selection", "Vertex selection masking for painting");
RNA_def_property_ui_icon(prop, ICON_VERTEXSEL, 0);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_Mesh_update_vertmask");
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 1c76753fb1b..2ba5e2ae68c 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1067,11 +1067,7 @@ static const EnumPropertyItem *rna_View3DShading_color_type_itemf(bContext *UNUS
int totitem = 0;
- if (shading->type == OB_SOLID) {
- r_free = false;
- return rna_enum_shading_color_type_items;
- }
- else if (shading->type == OB_WIRE) {
+ if (shading->type == OB_WIRE) {
EnumPropertyItem *item = NULL;
RNA_enum_items_add_value(
&item, &totitem, rna_enum_shading_color_type_items, V3D_SHADING_SINGLE_COLOR);
@@ -1084,8 +1080,9 @@ static const EnumPropertyItem *rna_View3DShading_color_type_itemf(bContext *UNUS
return item;
}
else {
- *r_free = false;
- return NULL;
+ /* Solid mode, or lookdev mode for workbench engine. */
+ r_free = false;
+ return rna_enum_shading_color_type_items;
}
}
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index b34a41b5af6..71bc01d6b98 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -457,7 +457,7 @@ static bool python_script_exec(
fn_dummy_py = PyC_UnicodeFromByte(fn_dummy);
- buf = txt_to_buf(text);
+ buf = txt_to_buf(text, NULL);
text->compiled = Py_CompileStringObject(buf, fn_dummy_py, Py_file_input, NULL, -1);
MEM_freeN(buf);
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 49b13da6b21..ef957fa03c5 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -2949,7 +2949,12 @@ static void wm_block_file_close_save(bContext *C, void *arg_block, void *arg_dat
UI_popup_block_close(C, win, arg_block);
if (save_images_when_file_is_closed) {
- if (!ED_image_should_save_modified(C)) {
+ if (ED_image_should_save_modified(C)) {
+ ReportList *reports = CTX_wm_reports(C);
+ ED_image_save_all_modified(C, reports);
+ WM_report_banner_show();
+ }
+ else {
execute_callback = false;
}
}
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 54eef4540c1..29e6c670c00 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1559,6 +1559,8 @@ static void wm_block_splash_add_labels(uiBlock *block, int x, int y)
wm_block_splash_add_label(block, branch_buf, x, &y);
}
}
+#else
+ UNUSED_VARS(show_build_info);
#endif /* WITH_BUILDINFO */
}