Feature/emotionfx sockets - #20176
Open
Grimwarrior wants to merge 9 commits into
Open
Grimwarrior wants to merge 9 commits into
Grimwarrior wants to merge 9 commits into
Conversation
A socket is a named, joint-relative frame (local position and rotation, with local +Y as its forward direction) stored on the actor in a new SocketSetup, so every instance of a character shares the same sockets. Sockets are authored into the source asset's manifest through a new SocketSetupRule, the same route simulated objects and physics setups take, exported into the .actor as a new chunk, and read back on import. The chunk is skipped for actors without sockets, so existing actor files export unchanged. The joint is stored by name and resolved to a skeleton index when the actor is loaded. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Grimwarrior <143121582+Grimwarrior@users.noreply.github.com>
Add GetNumSockets, GetSocketName, GetSocketIndexByName, GetSocketTransform and GetSocketForward, plus by-name variants, and reflect them to behavior context so Lua and Script Canvas can read a socket's transform and forward direction, for example to spawn a projectile along it. For the transform and forward calls, LocalSpace is the authored offset from the socket's joint, and ModelSpace and WorldSpace are the joint's transform in that space times the offset. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Grimwarrior <143121582+Grimwarrior@users.noreply.github.com>
Add AddSocket, RemoveSocket and AdjustSocket to the command system so socket edits go through the command history. Adding makes a unique name when the requested one is empty or taken and checks the parent joint exists, removing remembers the socket's position so undo restores it in place, and adjusting can change any combination of name, joint, position and rotation and restores the previous values on undo. CommandSocketHelpers builds the command strings for callers. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Grimwarrior <143121582+Grimwarrior@users.noreply.github.com>
Add an ActorRenderFlags::Sockets flag and a Sockets entry in the viewport's Render Options menu, so the socket visuals can be hidden. The flag is on by default for fresh settings and counts as requiring updated transforms. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Grimwarrior <143121582+Grimwarrior@users.noreply.github.com>
Add a Sockets dock window to EMotionStudio for the selected actor: a socket list with add and remove, and fields for the name, parent joint, position and rotation, all applied through the socket commands so every edit is undoable. Sockets are drawn in the viewport as a wireframe arrow along their forward direction with the name beside it. Selecting a socket shows move and rotate gizmos on it, with a Move and Rotate cluster to switch between them. Dragging previews the new value and commits one command on release, so undo restores the pre-drag value. Nothing is selected by default and clicking an empty part of the list deselects, so the gizmos only show for a selected socket. Sockets are added the same way as colliders and ragdolls: a Socket submenu in the skeleton outliner's right-click menu (add, and remove when the joint has sockets) and an Add Socket row in the Inspector's Add Property popup. Both add one socket per selected joint as a single undo step and open the Sockets window if it is closed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Grimwarrior <143121582+Grimwarrior@users.noreply.github.com>
Grimwarrior
force-pushed
the
feature/emotionfx-sockets
branch
from
October 4, 2026 13:41
d72d8cb to
a8f99c1
Compare
GetSocketBindTransform reads the socket from the bind pose so server and clients agree; GetSocketTransformFromEntity composes the animated model-space socket with the entity's current world transform for use in network input processing, which runs before the animation update. Signed-off-by: Grimwarrior <143121582+Grimwarrior@users.noreply.github.com>
Socket queries move to ActorSocketQueries, shared by the runtime and editor actor components, so level entities answer them outside game mode. ActorComponentRequestBus is reflected with the Common scope so editor Python can call it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Grimwarrior <143121582+Grimwarrior@users.noreply.github.com>
Command vectors need a decimal point in every component, so the "0,0,0" and "0,0,0,1" defaults failed to parse and AddSocket without -position or -rotation stored uninitialized values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Grimwarrior <143121582+Grimwarrior@users.noreply.github.com>
Gems that also build against engines without actor sockets can compile their socket calls conditionally. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Grimwarrior <143121582+Grimwarrior@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds Unreal-style sockets to EMotionFX: named, joint-relative frames with a position and a forward direction (local +Y). They can be authored in the Animation Editor and read at runtime, for example to spawn a projectile along a socket's forward direction without computing an aim.
SocketSetuponActor. It is saved to the source asset's manifest through a newSocketSetupRule(the same route as simulated objects), exported into the.actoras a new chunk, and read back on import. The chunk is skipped when an actor has no sockets, so existing actor files export unchanged.ActorComponentRequestBusgetsGetNumSockets,GetSocketName,GetSocketIndexByName,GetSocketTransformandGetSocketForward, plus by-name variants, reflected to behavior context for Lua and Script Canvas.AddSocket,RemoveSocketandAdjustSocket.Notes
LocalSpaceis the authored offset from the joint, not relative to the joint's parent.fix/viewport-ui-cluster-checked-highlight, so the Move/Rotate cluster's active-button highlight depends on that fix.How was this PR tested?
Built and tried in the Animation Editor: adding, selecting and deselecting sockets, and the move and rotate gizmos.
.assetinfoand.actorround trip