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
This commit is contained in:
Sybren A. Stüvel 2020-01-06 11:47:23 +01:00
parent a6d01365e3
commit 7f3e121926
4 changed files with 2 additions and 39 deletions

View File

@ -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)")

View File

@ -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,

View File

@ -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) \

View File

@ -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)