forked from bartvdbraak/blender
Merge branch 'blender-v2.83-release'
Conflicts: source/blender/makesdna/DNA_userdef_types.h source/blender/makesrna/intern/rna_userdef.c
This commit is contained in:
commit
795a874d0b
@ -2157,7 +2157,7 @@ class USERPREF_PT_experimental_system(ExperimentalPanel, Panel):
|
|||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self._draw_items(
|
self._draw_items(
|
||||||
context, (
|
context, (
|
||||||
({"property": "use_undo_speedup"}, "T60695"),
|
({"property": "use_undo_legacy"}, "T60695"),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -495,7 +495,7 @@ static void OVERLAY_draw_scene(void *vedata)
|
|||||||
OVERLAY_motion_path_draw(vedata);
|
OVERLAY_motion_path_draw(vedata);
|
||||||
OVERLAY_extra_centers_draw(vedata);
|
OVERLAY_extra_centers_draw(vedata);
|
||||||
|
|
||||||
if (DRW_state_is_select()) {
|
if (DRW_state_is_select() || DRW_state_is_depth()) {
|
||||||
/* Edit modes have their own selection code. */
|
/* Edit modes have their own selection code. */
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
|
|||||||
}
|
}
|
||||||
wpd->clip_state = clip_state;
|
wpd->clip_state = clip_state;
|
||||||
|
|
||||||
wpd->cull_state = CULL_BACKFACE_ENABLED(wpd) ? DRW_STATE_CULL_BACK : 0;
|
wpd->cull_state = CULL_BACKFACE_ENABLED(v3d) ? DRW_STATE_CULL_BACK : 0;
|
||||||
wpd->vldata = vldata;
|
wpd->vldata = vldata;
|
||||||
wpd->world_ubo = vldata->world_ubo;
|
wpd->world_ubo = vldata->world_ubo;
|
||||||
|
|
||||||
|
@ -187,6 +187,10 @@ void workbench_antialiasing_engine_init(WORKBENCH_Data *vedata)
|
|||||||
wpd->view_updated = false;
|
wpd->view_updated = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wpd->taa_sample_len > 0 && wpd->valid_history == false) {
|
||||||
|
wpd->taa_sample = 0;
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
float persmat[4][4];
|
float persmat[4][4];
|
||||||
DRW_view_persmat_get(NULL, persmat, false);
|
DRW_view_persmat_get(NULL, persmat, false);
|
||||||
@ -420,6 +424,7 @@ void workbench_antialiasing_draw_pass(WORKBENCH_Data *vedata)
|
|||||||
/* AA disabled. */
|
/* AA disabled. */
|
||||||
/* Just set sample to 1 to avoid rendering indefinitely. */
|
/* Just set sample to 1 to avoid rendering indefinitely. */
|
||||||
wpd->taa_sample = 1;
|
wpd->taa_sample = 1;
|
||||||
|
wpd->valid_history = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -432,6 +437,7 @@ void workbench_antialiasing_draw_pass(WORKBENCH_Data *vedata)
|
|||||||
const bool last_sample = wpd->taa_sample + 1 == wpd->taa_sample_len;
|
const bool last_sample = wpd->taa_sample + 1 == wpd->taa_sample_len;
|
||||||
const bool taa_finished = wpd->taa_sample >= wpd->taa_sample_len;
|
const bool taa_finished = wpd->taa_sample >= wpd->taa_sample_len;
|
||||||
if (wpd->taa_sample == 0) {
|
if (wpd->taa_sample == 0) {
|
||||||
|
wpd->valid_history = true;
|
||||||
/* In playback mode, we are sure the next redraw will not use the same viewmatrix.
|
/* In playback mode, we are sure the next redraw will not use the same viewmatrix.
|
||||||
* In this case no need to save the depth buffer. */
|
* In this case no need to save the depth buffer. */
|
||||||
eGPUFrameBufferBits bits = GPU_COLOR_BIT | (!wpd->is_playback ? GPU_DEPTH_BIT : 0);
|
eGPUFrameBufferBits bits = GPU_COLOR_BIT | (!wpd->is_playback ? GPU_DEPTH_BIT : 0);
|
||||||
|
@ -267,6 +267,8 @@ typedef struct WORKBENCH_PrivateData {
|
|||||||
float taa_sample_inv;
|
float taa_sample_inv;
|
||||||
/** If the view has been updated and TAA needs to be reset. */
|
/** If the view has been updated and TAA needs to be reset. */
|
||||||
bool view_updated;
|
bool view_updated;
|
||||||
|
/** True if the history buffer contains relevant data and false if it could contain garbage. */
|
||||||
|
bool valid_history;
|
||||||
/** View */
|
/** View */
|
||||||
struct DRWView *view;
|
struct DRWView *view;
|
||||||
/** Last projection matrix to see if view is still valid. */
|
/** Last projection matrix to see if view is still valid. */
|
||||||
|
@ -147,7 +147,7 @@ static void memfile_undosys_step_decode(struct bContext *C,
|
|||||||
|
|
||||||
bool use_old_bmain_data = true;
|
bool use_old_bmain_data = true;
|
||||||
|
|
||||||
if (!U.experimental.use_undo_speedup) {
|
if (USER_EXPERIMENTAL_TEST(&U, use_undo_legacy)) {
|
||||||
use_old_bmain_data = false;
|
use_old_bmain_data = false;
|
||||||
}
|
}
|
||||||
else if (undo_direction > 0) {
|
else if (undo_direction > 0) {
|
||||||
|
@ -618,7 +618,7 @@ typedef struct UserDef_FileSpaceData {
|
|||||||
} UserDef_FileSpaceData;
|
} UserDef_FileSpaceData;
|
||||||
|
|
||||||
typedef struct UserDef_Experimental {
|
typedef struct UserDef_Experimental {
|
||||||
char use_undo_speedup;
|
char use_undo_legacy;
|
||||||
/** `makesdna` does not allow empty structs. */
|
/** `makesdna` does not allow empty structs. */
|
||||||
char _pad0[7];
|
char _pad0[7];
|
||||||
} UserDef_Experimental;
|
} UserDef_Experimental;
|
||||||
|
@ -6057,12 +6057,12 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
|
|||||||
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
|
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
|
||||||
RNA_def_struct_ui_text(srna, "Experimental", "Experimental features");
|
RNA_def_struct_ui_text(srna, "Experimental", "Experimental features");
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "use_undo_speedup", PROP_BOOLEAN, PROP_NONE);
|
prop = RNA_def_property(srna, "use_undo_legacy", PROP_BOOLEAN, PROP_NONE);
|
||||||
RNA_def_property_boolean_sdna(prop, NULL, "use_undo_speedup", 1);
|
RNA_def_property_boolean_sdna(prop, NULL, "use_undo_legacy", 1);
|
||||||
RNA_def_property_ui_text(
|
RNA_def_property_ui_text(
|
||||||
prop,
|
prop,
|
||||||
"Undo Speedup",
|
"Undo Legacy",
|
||||||
"Use new undo speedup (WARNING: can lead to crashes and serious .blend file corruption)");
|
"Use legacy undo (slower than the new default one, but may be more stable in some cases)");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop)
|
static void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop)
|
||||||
|
Loading…
Reference in New Issue
Block a user