Skip to content

Commit

Permalink
[c][cpp] Closes #2551, fix inherit transform timelines
Browse files Browse the repository at this point in the history
  • Loading branch information
badlogic committed Jun 13, 2024
1 parent 314636a commit ccac475
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spine-c/spine-c/src/spine/SkeletonJson.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ static spAnimation *_spSkeletonJson_readAnimation(spSkeletonJson *self, Json *ro
keyMap = timelineMap->child;
for (frame = 0;; frame++) {
float time = Json_getFloat(keyMap, "time", 0);
const char *value = Json_getString(keyMap, "value", "normal");
const char *value = Json_getString(keyMap, "inherit", "normal");
spInherit inherit = SP_INHERIT_NORMAL;
if (strcmp(value, "normal") == 0) inherit = SP_INHERIT_NORMAL;
else if (strcmp(value, "onlyTranslation") == 0)
Expand Down
2 changes: 1 addition & 1 deletion spine-cpp/spine-cpp/src/spine/SkeletonJson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ Animation *SkeletonJson::readAnimation(Json *root, SkeletonData *skeletonData) {
keyMap = timelineMap->_child;
for (frame = 0;; frame++) {
float time = Json::getFloat(keyMap, "time", 0);
const char *value = Json::getString(keyMap, "value", "normal");
const char *value = Json::getString(keyMap, "inherit", "normal");
Inherit inherit = Inherit_Normal;
if (strcmp(value, "normal") == 0) inherit = Inherit_Normal;
else if (strcmp(value, "onlyTranslation") == 0)
Expand Down

0 comments on commit ccac475

Please sign in to comment.