[Bf-blender-cvs] [4212b6528af] master: Image Editor: Enable New Drawing

Jeroen Bakker noreply at git.blender.org
Fri Sep 11 09:13:37 CEST 2020


Commit: 4212b6528afb07d9b2962566ae9c4251282d387f
Author: Jeroen Bakker
Date:   Fri Sep 11 08:35:05 2020 +0200
Branches: master
https://developer.blender.org/rB4212b6528afb07d9b2962566ae9c4251282d387f

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.

===================================================================

M	release/scripts/startup/bl_ui/space_userpref.py
M	source/blender/editors/space_image/space_image.c
M	source/blender/makesdna/DNA_userdef_types.h
M	source/blender/makesrna/intern/rna_userdef.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 423135abcea..faea806c6cb 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -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"),
             ),
         )
 
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 032196b33bd..f1becd5f027 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -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);
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 9b31b9d9eee..b63f4529559 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -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];
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 417b2dac40e..1ecd0a581b6 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -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);



More information about the Bf-blender-cvs mailing list