Skip to content

Fixed selection outline reverting to T-pose when clearing skinned mesh materials#672

Merged
adriengivry merged 2 commits intoOverload-Technologies:mainfrom
Gopmyc:671
Apr 9, 2026
Merged

Fixed selection outline reverting to T-pose when clearing skinned mesh materials#672
adriengivry merged 2 commits intoOverload-Technologies:mainfrom
Gopmyc:671

Conversation

@Gopmyc
Copy link
Copy Markdown
Contributor

@Gopmyc Gopmyc commented Apr 8, 2026

Description

This PR fixes a bug where the Scene View selection outline for skinned meshes reverts to the T-pose after clearing a material slot in CMaterialRenderer.

Root cause:

  • Outline skinning was enabled only when the original material existed and supported skinning.
  • Clearing a material sets that slot to nullptr, which disabled skinning for outline rendering.

Fix:

  • In OutlineRenderFeature, skinning is now decided from the resolved target material (regular material with OUTLINE_PASS or fallback outline material), not only the original material pointer.
  • Added mesh->HasSkinningData() checks to keep skinning activation consistent and safe in both stencil and outline paths.

Related Issue(s)

Fixes #671

Review Guidance

  1. Select an actor with an animated skinned mesh.
  2. Verify the selection outline follows the animated pose.
  3. Clear one material slot from the actor's Material Renderer.
  4. Verify the outline still follows animation and no longer reverts to T-pose.

Screenshots/GIFs

1

Checklist

  • My code follows the project's code style guidelines
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes don't generate new warnings or errors

Copy link
Copy Markdown
Member

@adriengivry adriengivry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good, I haven't tested it, but I'm guessing if a material uses a shader that doesn't support skinning, this will cause the outline to still use skinning, which shouldn't be the case. The original material needs to be considered.

Can you confirm that this bug occurs?

To repro the potential bug:

  1. Duplicate the standard shader
  2. Remove skinning feature from the duplicated shader
  3. Create a material using the non-skinned standard shader
  4. Create an Actor with a model renderer, material renderer, and skinned mesh renderer.
  5. Apply the new material to the material renderer
  6. Set an animation
  7. Notice that while the model isn't skinned, the outline is

@Gopmyc
Copy link
Copy Markdown
Contributor Author

Gopmyc commented Apr 8, 2026

Looks mostly good, I haven't tested it, but I'm guessing if a material uses a shader that doesn't support skinning, this will cause the outline to still use skinning, which shouldn't be the case. The original material needs to be considered.

Can you confirm that this bug occurs?

To repro the potential bug:

  1. Duplicate the standard shader
  2. Remove skinning feature from the duplicated shader
  3. Create a material using the non-skinned standard shader
  4. Create an Actor with a model renderer, material renderer, and skinned mesh renderer.
  5. Apply the new material to the material renderer
  6. Set an animation
  7. Notice that while the model isn't skinned, the outline is

Good catch, confirmed and fixed !

Copy link
Copy Markdown
Member

@adriengivry adriengivry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@adriengivry adriengivry merged commit 1430327 into Overload-Technologies:main Apr 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Selection outline reverts to T-Pose when clearing material on Skinned Mesh Renderer

2 participants