Image Editor: Enable New Drawing

This patch reverses use draw manager for image editor the
experimental feature. Now the new drawing is enabled by default.
Inside the experimental tab in the user preferences there is now an
option to revert back to the old drawing method.

Using this option we can easilly check if all drawing features have been
migrated over. The plan is to remove the legacy drawing before BCon 3.
This commit is contained in:
Jeroen Bakker 2020-09-11 08:35:05 +02:00
parent d6525e8d13
commit 4212b6528a
Notes: blender-bot 2023-04-17 16:55:17 +02:00
Referenced by commit 2b9eb5eee5, Fix T83361: UV Editor does not draw pinned selected UVs as pinned
Referenced by commit 7db42b8f2a, Fix T82460: Color Management Curves do not update when Image/UV Editor
Referenced by issue #95338, Render Image for composited scene shows inconsistent results
Referenced by issue #83361, UV Editor does not draw pinned selected UVs as pinned
Referenced by issue #83187, Linked meshes: Unselected UVs stay orange instead of gray, cannot deselect all UVs
Referenced by issue #83187, Linked meshes: Unselected UVs stay orange instead of gray, cannot deselect all UVs
Referenced by issue #82591, Performance regression when rendering at very high resolution
Referenced by issue #82460, Color Management Use Curves do not update when UV Editor is presented
Referenced by issue #80800, UVs are not drawn correctly after joining objects
Referenced by issue #106987, Regression: Turning off "Update Automatically" in Image Editor breaks painting in that editor
4 changed files with 7 additions and 7 deletions

View File

@ -2176,7 +2176,6 @@ class USERPREF_PT_experimental_prototypes(ExperimentalPanel, Panel):
self._draw_items(
context, (
({"property": "use_new_hair_type"}, "T68981"),
({"property": "use_drw_image_editor"}, "T67530"),
),
)
@ -2195,6 +2194,7 @@ class USERPREF_PT_experimental_debugging(ExperimentalPanel, Panel):
context, (
({"property": "use_undo_legacy"}, "T60695"),
({"property": "use_cycles_debug"}, None),
({"property": "use_image_editor_legacy_drawing"}, "T67530"),
),
)

View File

@ -666,7 +666,7 @@ static void image_main_region_draw(const bContext *C, ARegion *region)
}
/* we draw image in pixelspace */
if (U.experimental.use_drw_image_editor) {
if (!U.experimental.use_image_editor_legacy_drawing) {
DRW_draw_view(C);
draw_image_main_helpers(C, region);
@ -750,7 +750,7 @@ static void image_main_region_draw(const bContext *C, ARegion *region)
C);
}
if ((show_uvedit || mask || show_curve) && !U.experimental.use_drw_image_editor) {
if ((show_uvedit || mask || show_curve) && U.experimental.use_image_editor_legacy_drawing) {
UI_view2d_view_ortho(v2d);
ED_image_draw_cursor(region, sima->cursor);
UI_view2d_view_restore(C);

View File

@ -620,7 +620,7 @@ typedef struct UserDef_Experimental {
char use_new_hair_type;
char use_cycles_debug;
char use_sculpt_vertex_colors;
char use_drw_image_editor;
char use_image_editor_legacy_drawing;
char use_tools_missing_icons;
/** `makesdna` does not allow empty structs. */
char _pad[1];

View File

@ -6123,10 +6123,10 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "use_sculpt_vertex_colors", 1);
RNA_def_property_ui_text(prop, "Sculpt Vertex Colors", "Use the new Vertex Painting system");
prop = RNA_def_property(srna, "use_drw_image_editor", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_drw_image_editor", 1);
prop = RNA_def_property(srna, "use_image_editor_legacy_drawing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_image_editor_legacy_drawing", 1);
RNA_def_property_ui_text(
prop, "Image Editor Draw Engine", "Use draw manager for rendering the uv/image editor");
prop, "Legacy Image Editor Drawing", "Use legacy UV/Image editor drawing");
prop = RNA_def_property(srna, "use_tools_missing_icons", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_tools_missing_icons", 1);