[Bf-blender-cvs] [7f3e121926f] master: USD Exporter: removed from experimental features

Sybren A. Stüvel noreply at git.blender.org
Mon Jan 6 12:41:28 CET 2020


Commit: 7f3e121926fdd985d37ce8371647d79e09e37917
Author: Sybren A. Stüvel
Date:   Mon Jan 6 11:47:23 2020 +0100
Branches: master
https://developer.blender.org/rB7f3e121926fdd985d37ce8371647d79e09e37917

USD Exporter: removed from experimental features

There were two reasons the USD Exporter was listed as experimental:

- Originally there was no deduplication of mesh normals & UV coordinates
 (resolved in rBf5e00f735106b5ec635806a4c795a2bc46ae8369), and
- the way materials were exported was incompatible with instancing with
  USD 19.07. This seems to be resolved with the current version of USD
  (19.11).

Blender (more specifically, `makesdna`) doesn't seem to like empty DNA
structs, so I couldn't remove all properties from
`UserDef_Experimental`. Instead I have just kept `char _pad0[8]`.

Reviewed by: campbellbarton

Differential Revision: https://developer.blender.org/D6519

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

M	release/scripts/startup/bl_ui/space_topbar.py
M	release/scripts/startup/bl_ui/space_userpref.py
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_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 7dbf49d01e3..fd46bd53cd2 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -471,7 +471,7 @@ class TOPBAR_MT_file_export(Menu):
                                  text="Collada (Default) (.dae)")
         if bpy.app.build_options.alembic:
             self.layout.operator("wm.alembic_export", text="Alembic (.abc)")
-        if bpy.app.build_options.usd and context.preferences.experimental.use_usd_exporter:
+        if bpy.app.build_options.usd:
             self.layout.operator(
                 "wm.usd_export", text="Universal Scene Description (.usd, .usdc, .usda)")
 
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index b497d688339..4f35bcc29df 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -2118,30 +2118,6 @@ class USERPREF_PT_experimental_virtual_reality(ExperimentalPanel, Panel):
 """
 
 
-class USERPREF_PT_experimental_usd(ExperimentalPanel, Panel):
-    bl_label = "Universal Scene Description"
-
-    @classmethod
-    def poll(cls, context):
-        # Only show the panel if Blender was actually built with USD support.
-        return getattr(bpy.app.build_options, "usd", False)
-
-    def draw(self, context):
-        prefs = context.preferences
-        experimental = prefs.experimental
-
-        layout = self.layout
-        layout.use_property_split = True
-        layout.use_property_decorate = False
-
-        split = layout.split(factor=0.66)
-        col = split.split()
-        col.prop(experimental, "use_usd_exporter", text="USD Exporter")
-        col = split.split()
-        url = "https://devtalk.blender.org/t/universal-scene-description-usd-exporter-feedback/10920"
-        col.operator("wm.url_open", text='Give Feedback', icon='URL').url = url
-
-
 # -----------------------------------------------------------------------------
 # Class Registration
 
@@ -2226,8 +2202,6 @@ classes = (
     USERPREF_PT_studiolight_matcaps,
     USERPREF_PT_studiolight_world,
 
-    USERPREF_PT_experimental_usd,
-
     # Popovers.
     USERPREF_PT_ndof_settings,
 
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index c1a1292325d..f0a852a7a1a 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -601,9 +601,7 @@ typedef struct UserDef_FileSpaceData {
 } UserDef_FileSpaceData;
 
 typedef struct UserDef_Experimental {
-  char use_usd_exporter;
-
-  char _pad0[7];
+  char _pad0[8]; /* makesdna does not allow empty structs. */
 } UserDef_Experimental;
 
 #define USER_EXPERIMENTAL_TEST(userdef, member) \
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index c5f835ee8b9..56f19d313fd 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -580,8 +580,6 @@ static void rna_userdef_autosave_update(Main *bmain, Scene *scene, PointerRNA *p
       return USER_EXPERIMENTAL_TEST(userdef, member); \
     }
 
-RNA_USERDEF_EXPERIMENTAL_BOOLEAN_GET(use_usd_exporter)
-
 static bAddon *rna_userdef_addon_new(void)
 {
   ListBase *addons_list = &U.addons;
@@ -5849,19 +5847,12 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
 static void rna_def_userdef_experimental(BlenderRNA *brna)
 {
   StructRNA *srna;
-  PropertyRNA *prop;
 
   srna = RNA_def_struct(brna, "PreferencesExperimental", NULL);
   RNA_def_struct_sdna(srna, "UserDef_Experimental");
   RNA_def_struct_nested(brna, srna, "Preferences");
   RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
   RNA_def_struct_ui_text(srna, "Experimental", "Experimental features");
-
-  prop = RNA_def_property(srna, "use_usd_exporter", PROP_BOOLEAN, PROP_NONE);
-  RNA_def_property_boolean_sdna(prop, NULL, "use_usd_exporter", 1);
-  RNA_def_property_boolean_funcs(prop, "rna_userdef_experimental_use_usd_exporter_get", NULL);
-  RNA_def_property_ui_text(prop, "USD Exporter", "Enable exporting to the USD format");
-  RNA_def_property_update(prop, 0, "rna_userdef_update");
 }
 
 static void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop)



More information about the Bf-blender-cvs mailing list