Skip to content

Commit

Permalink
Added legacy fbx importer validation
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-yao91 committed Feb 25, 2025
1 parent e0e5d49 commit e02a591
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/addons/send2ue/core/validations.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,16 @@ def validate_required_unreal_project_settings(self):
)
)
return False

if self.properties.validate_project_settings:
if not UnrealRemoteCalls.is_using_legacy_fbx_importer():
utilities.report_error(
"The Legacy FBX Importer must be used instead of Scene Interchange. Please run this command in the "
"Unreal Editor: Interchange.FeatureFlags.Import.FBX False. Otherwise, persist this in the project's "
"DefaultEngine.ini file."
)
return False

return True

# TODO: temporary validation before lods support for groom is added
Expand Down
5 changes: 5 additions & 0 deletions src/addons/send2ue/dependencies/unreal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1101,6 +1101,11 @@ def get_project_settings_value(config_name, section_name, setting_name):
parser.read(config_path)

return parser.get(section_name, setting_name, fallback=None)

@staticmethod
def is_using_legacy_fbx_importer():
value = unreal.SystemLibrary.get_console_variable_string_value(r'Interchange.FeatureFlags.Import.FBX')
return value.lower() in ['false', '0']

@staticmethod
def has_socket(asset_path, socket_name):
Expand Down

0 comments on commit e02a591

Please sign in to comment.