Skip to content

Commit

Permalink
added validate_unreal_plugins property (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshQuake authored Aug 8, 2024
1 parent 0fad31f commit 2ba85df
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/addons/send2ue/core/validations.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def validate_required_unreal_plugins(self):
"""
Checks whether the required unreal plugins are enabled.
"""
if self.properties.import_grooms and self.hair_objects:
if self.properties.validate_unreal_plugins and self.properties.import_grooms and self.hair_objects:
# A dictionary of plugins where the key is the plugin name and value is the plugin label.
groom_plugins = {
'HairStrands': 'Groom',
Expand Down
5 changes: 5 additions & 0 deletions src/addons/send2ue/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,11 @@ class Send2UeSceneProperties(property_class):
default=True,
description="This checks that a mesh with an armature modifier has vertex groups"
)
validate_unreal_plugins: bpy.props.BoolProperty(
name="Check Unreal has required plugins",
default=True,
description="Disable only if you know Groom plugin is enabled but still get an error"
)

return Send2UeSceneProperties

Expand Down
3 changes: 2 additions & 1 deletion src/addons/send2ue/resources/setting_templates/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,5 +316,6 @@
"validate_project_settings": true,
"validate_scene_scale": true,
"validate_textures": false,
"validate_time_units": "off"
"validate_time_units": "off",
"validate_unreal_plugins": true
}
1 change: 1 addition & 0 deletions src/addons/send2ue/ui/dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ def draw_validations_tab(self, layout):
self.draw_property(properties, layout, 'validate_project_settings')
self.draw_property(properties, layout, 'validate_object_names')
self.draw_property(properties, layout, 'validate_meshes_for_vertex_groups')
self.draw_property(properties, layout, 'validate_unreal_plugins')

def draw_extensions(self, layout):
"""
Expand Down

0 comments on commit 2ba85df

Please sign in to comment.