Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SendToUE - Exporting hair can fail due to spurious validation error when checking for enabled plugins #62

Closed
dannymcgee opened this issue Aug 2, 2024 · 3 comments · Fixed by #74
Labels
bug Something isn't working

Comments

@dannymcgee
Copy link

dannymcgee commented Aug 2, 2024

Sorry this doesn't follow the typical template of repro steps, etc. The repro is a bit niche and tedious to describe, and I've already done the work of tracking down the root cause, so hopefully this is okay.

In the UnrealRemoteCalls class (in dependencies/unreal.py), the get_enabled_plugins() method uses a flawed procedure that will never return a complete list of actually enabled plugins for a given project. Currently it reads and parses the .uproject file as JSON, and simply maps the Plugins array to its entry Names, filtering for entries where Enabled is true. This will always be an inexhaustive list for a couple of reasons:

  • It doesn't include plugins which are enabled by default (i.e., where the plugin's .uplugin manifest has EnabledByDefault set to true)
  • It doesn't include plugins which are dependencies of enabled plugins

This is problematic because get_enabled_plugins() is used by the ValidationManager, which will fail with an error if you try to export a hair system while the "Groom" plugin is not found to be enabled. I ran into this issue while using a third-party plugin that depends on the "Groom" plugin, so while the plugin is enabled in my project, Send to Unreal fails to see that it's enabled and fails with a confusing error message.

A "correct" (but very slow) implementation, even discounting default-enabled plugins, would need to find the .uplugin manifest for each enabled plugin listed in the .uproject manifest, and recursively check those manifests' Plugins arrays (while maintaining a list of already checked plugins to avoid potential infinite recursion issues). I wouldn't recommend actually trying to do that, because it would be quite slow and error-prone. Instead, I would recommend either removing the validate_required_unreal_plugins() check completely, or downgrading it to a warning so that the export is allowed to proceed from Blender (and presumably fail at a later stage, during import on the Unreal side, if the plugin is actually not enabled).

@dannymcgee dannymcgee added the bug Something isn't working label Aug 2, 2024
@JoshQuake
Copy link
Collaborator

Fascinating. Thanks for the report!

@jack-yao91
Copy link

Maybe this could be exposed as an option to turn off in the validations panel?

@JoshQuake
Copy link
Collaborator

Yep I like that idea.

@JoshQuake JoshQuake linked a pull request Aug 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants