Skip to content

Allow setting an animation source by asset path - #836

Closed
Gopmyc wants to merge 1 commit into
Overload-Technologies:mainfrom
Gopmyc:834
Closed

Allow setting an animation source by asset path#836
Gopmyc wants to merge 1 commit into
Overload-Technologies:mainfrom
Gopmyc:834

Conversation

@Gopmyc

@Gopmyc Gopmyc commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a const std::string& overload of CSkinnedMeshRenderer::SetAnimationSourceModel that
resolves the path through ModelManager, and binds it alongside the existing Model* form.
Scripts can now assign an animation source, which was previously impossible: Lua has no way to
obtain a Model*.

Resolution lives in the component, next to the existing setter, so the binding stays a plain
sol::overload of two sol::resolve entries, the same shape already used for SetAnimation.
An empty path clears the source; an unresolvable one is logged and leaves the current source
untouched.

Related Issue(s)

Fixes #835

Review Guidance

Behaviour of the existing Model* overload is unchanged; no current call site passes a literal
nullptr, so the added overload introduces no ambiguity. CMaterialRenderer already resolves its
assets through ServiceLocator, so the component-side dependency on ModelManager is not new.

Screenshots/GIFs

N/A

AI Usage Disclosure

N/A

Checklist

  • My code follows the project's code style guidelines
  • When applicable, I have commented my code, particularly in hard-to-understand areas
  • When applicable, I have updated the documentation accordingly
  • My changes don't generate new warnings or errors
  • I have reviewed and take responsibility for all code in this PR (including any AI-assisted contributions)

@adriengivry

Copy link
Copy Markdown
Member

See #835 (comment)

Happy to discuss if needed

@adriengivry adriengivry closed this Sep 2, 2026
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.

Lua cannot set a 'SkinnedMeshRenderer' animation source

2 participants