Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@
"4.1",
"4.2",
"4.3",
"4.4"
"4.4",
"4.5",
"5.0"
],
"description": "What blender version to launch"
},
Expand All @@ -74,7 +76,10 @@
"default": "5.4",
"options": [
"5.3",
"5.4"
"5.4",
"5.5",
"5.6",
"5.7"
],
"description": "What unreal version to launch"
},
Expand Down
2 changes: 1 addition & 1 deletion src/addons/send2ue/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
bl_info = {
"name": "Send to Unreal",
"author": "Epic Games Inc (now a community fork)",
"version": (2, 6, 7),
"version": (2, 6, 8),
"blender": (3, 6, 0),
"location": "Header > Pipeline > Send to Unreal",
"description": "Sends an asset to the first open Unreal Editor instance on your machine.",
Expand Down
1 change: 1 addition & 0 deletions src/addons/send2ue/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,5 @@ class PathModes(Enum):

class RegexPresets:
INVALID_NAME_CHARACTERS = r"[^-+\w]+"
INVALID_SOCKET_CHARACTERS = r"[^-+.\w]+"

2 changes: 1 addition & 1 deletion src/addons/send2ue/core/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def get_asset_sockets(asset_name, properties):
if mesh_object:
for child in mesh_object.children:
if child.type == 'EMPTY' and child.name.startswith(f'{PreFixToken.SOCKET.value}_'):
name = utilities.get_asset_name(child.name.replace(f'{PreFixToken.SOCKET.value}_', '').split('.',1)[0], properties)
name = utilities.get_socket_name(child.name)
relative_location = utilities.convert_blender_to_unreal_location(
child.matrix_local.translation
)
Expand Down
12 changes: 12 additions & 0 deletions src/addons/send2ue/core/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,18 @@ def get_asset_name(asset_name, properties, lod=False):

return asset_name

def get_socket_name(asset_name):
"""
Takes a given asset name and removes the prefix SOCKET_ and other non-alpha numeric characters
that unreal won't except, and allows the same socket name on multiple objects to export correctly.

:param str asset_name: The original name of the socket asset to export.
:return str: The formatted name of the socket asset to export.
"""
socket_name = re.sub(rf"{RegexPresets.INVALID_SOCKET_CHARACTERS}|\.\d+$|{PreFixToken.SOCKET.value}_", "", asset_name)

return socket_name


def get_parent_collection(scene_object, collection):
"""
Expand Down
6 changes: 3 additions & 3 deletions src/addons/send2ue/release_notes.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## Patch Changes
* Fixed addon preferences setter/getters to be compatible with Blender 5.0
* [174](https://github.com/poly-hammer/BlenderTools/issues/174)
* Lowered aggressiveness of socket names
* [173](https://github.com/poly-hammer/BlenderTools/issues/173)

## Special Thanks
@kelitraynaud
@Daerst

## Tests Passing On
* Blender `3.6`, `4.2` (installed from blender.org)
Expand Down