Skip to content

Commit

Permalink
Fix skin was not in Lua state
Browse files Browse the repository at this point in the history
  • Loading branch information
pinguin999 committed Jun 10, 2024
1 parent 565555c commit 07a43d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/spine_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ void SpineObject::onAnimationComplete(const std::string &key)
}
}

void SpineObject::setSkin(const std::string &skin) const
void SpineObject::setSkin(const std::string &skin)
{
this->skin = skin;
const int resault = spSkeleton_setSkinByName(skeleton->skeleton, skin.c_str());
spSkeleton_setSlotsToSetupPose(skeleton->skeleton);
if (!resault)
Expand Down
2 changes: 1 addition & 1 deletion src/spine_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class SpineObject : public std::enable_shared_from_this<SpineObject>
void playAnimation(int trackIndex, const std::string &currentAnimation, bool loop, sol::function callback);
void addAnimation(int trackIndex, const std::string &currentAnimation, bool loop, float delay, sol::function callback);
void onAnimationComplete(const std::string &key);
void setSkin(const std::string &skin) const;
void setSkin(const std::string &skin);
std::vector<std::string> getPointNames() const;
bool abs_position = false;

Expand Down

0 comments on commit 07a43d1

Please sign in to comment.