Improve anim tracker addon

This commit is contained in:
Salad Dais
2025-06-18 20:43:27 +00:00
parent 4962d8e7bf
commit 4eb97b5958
3 changed files with 4 additions and 2 deletions

View File

@@ -74,7 +74,7 @@ class AnimTrackerAddon(BaseAddon):
# We don't care about other messages, we're just interested in distinguishing cases where the viewer
# specifically requested something vs something being done by the server on its own.
return
av = region.objects.lookup_avatar(session.agent_id)
av = session.objects.lookup_avatar(session.agent_id)
if not av or not av.Object:
print("Somehow didn't know about our own av object?")
return

View File

@@ -25,6 +25,7 @@ class JointNode:
rotation: Vector3 # Euler rotation in degrees
scale: Vector3
type: str # bone or collision_volume
support: str
def __hash__(self):
return hash((self.name, self.type))
@@ -97,6 +98,7 @@ class Skeleton:
pivot=_get_vec_attr(node, "pivot", Vector3()),
rotation=_get_vec_attr(node, "rot", Vector3()),
scale=_get_vec_attr(node, "scale", Vector3(1, 1, 1)),
support=node.get('support', 'base'),
type=node.tag,
)
self.joint_dict[name] = joint

View File

@@ -670,7 +670,7 @@ class ClientWorldObjectManager:
return
obj.Animations.clear()
for block in message["AnimationList"]:
for block in message.blocks.get("AnimationList", []):
obj.Animations.append(block["AnimID"])
self._run_object_update_hooks(obj, {"Animations"}, ObjectUpdateType.ANIMATIONS, message)