Improve anim tracker addon
This commit is contained in:
@@ -74,7 +74,7 @@ class AnimTrackerAddon(BaseAddon):
|
|||||||
# We don't care about other messages, we're just interested in distinguishing cases where the viewer
|
# 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.
|
# specifically requested something vs something being done by the server on its own.
|
||||||
return
|
return
|
||||||
av = region.objects.lookup_avatar(session.agent_id)
|
av = session.objects.lookup_avatar(session.agent_id)
|
||||||
if not av or not av.Object:
|
if not av or not av.Object:
|
||||||
print("Somehow didn't know about our own av object?")
|
print("Somehow didn't know about our own av object?")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ class JointNode:
|
|||||||
rotation: Vector3 # Euler rotation in degrees
|
rotation: Vector3 # Euler rotation in degrees
|
||||||
scale: Vector3
|
scale: Vector3
|
||||||
type: str # bone or collision_volume
|
type: str # bone or collision_volume
|
||||||
|
support: str
|
||||||
|
|
||||||
def __hash__(self):
|
def __hash__(self):
|
||||||
return hash((self.name, self.type))
|
return hash((self.name, self.type))
|
||||||
@@ -97,6 +98,7 @@ class Skeleton:
|
|||||||
pivot=_get_vec_attr(node, "pivot", Vector3()),
|
pivot=_get_vec_attr(node, "pivot", Vector3()),
|
||||||
rotation=_get_vec_attr(node, "rot", Vector3()),
|
rotation=_get_vec_attr(node, "rot", Vector3()),
|
||||||
scale=_get_vec_attr(node, "scale", Vector3(1, 1, 1)),
|
scale=_get_vec_attr(node, "scale", Vector3(1, 1, 1)),
|
||||||
|
support=node.get('support', 'base'),
|
||||||
type=node.tag,
|
type=node.tag,
|
||||||
)
|
)
|
||||||
self.joint_dict[name] = joint
|
self.joint_dict[name] = joint
|
||||||
|
|||||||
@@ -670,7 +670,7 @@ class ClientWorldObjectManager:
|
|||||||
return
|
return
|
||||||
|
|
||||||
obj.Animations.clear()
|
obj.Animations.clear()
|
||||||
for block in message["AnimationList"]:
|
for block in message.blocks.get("AnimationList", []):
|
||||||
obj.Animations.append(block["AnimID"])
|
obj.Animations.append(block["AnimID"])
|
||||||
self._run_object_update_hooks(obj, {"Animations"}, ObjectUpdateType.ANIMATIONS, message)
|
self._run_object_update_hooks(obj, {"Animations"}, ObjectUpdateType.ANIMATIONS, message)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user