Skip to content

Commit

Permalink
updated pre_import
Browse files Browse the repository at this point in the history
checks object name exists
  • Loading branch information
JoshQuake committed Jul 24, 2024
1 parent 57447a6 commit 1d81017
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,14 @@ def pre_import(self, asset_data, properties):
})
elif asset_type and asset_type == UnrealTypes.GROOM:
object_name = asset_data.get('_object_name')
scene_object = bpy.data.objects.get(object_name)
import_path = self.get_full_import_path(properties, UnrealTypes.GROOM, scene_object)
self.update_asset_data({
'asset_folder': import_path,
'asset_path': f'{import_path}{object_name}'
})
if object_name:
scene_object = bpy.data.objects.get(object_name)
asset_name = utilities.get_asset_name(object_name, properties)
import_path = self.get_full_import_path(properties, UnrealTypes.GROOM, scene_object)
self.update_asset_data({
'asset_folder': import_path,
'asset_path': f'{import_path}{asset_name}'
})
elif asset_type:
object_name = asset_data.get('_mesh_object_name')
if object_name:
Expand Down

0 comments on commit 1d81017

Please sign in to comment.