From 6e730a2e95a1de8de40829e21e21d20e6b7eefb5 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 6 Jan 2019 09:22:56 +0100 Subject: [PATCH] Audio3DManager: accept tuple in setSoundVelocity/setListenerVelocity --- direct/src/showbase/Audio3DManager.py | 8 ++++++-- doc/ReleaseNotes | 4 ++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/direct/src/showbase/Audio3DManager.py b/direct/src/showbase/Audio3DManager.py index 4a67c9bc27..ff130cad22 100644 --- a/direct/src/showbase/Audio3DManager.py +++ b/direct/src/showbase/Audio3DManager.py @@ -122,9 +122,11 @@ class Audio3DManager: This is relative to the sound root (probably render). Default: VBase3(0, 0, 0) """ + if isinstance(velocity, tuple) and len(velocity) == 3: + velocity = VBase3(*velocity) if not isinstance(velocity, VBase3): raise TypeError("Invalid argument 1, expected ") - self.vel_dict[sound]=velocity + self.vel_dict[sound] = velocity def setSoundVelocityAuto(self, sound): """ @@ -155,9 +157,11 @@ class Audio3DManager: This is relative to the sound root (probably render). Default: VBase3(0, 0, 0) """ + if isinstance(velocity, tuple) and len(velocity) == 3: + velocity = VBase3(*velocity) if not isinstance(velocity, VBase3): raise TypeError("Invalid argument 0, expected ") - self.listener_vel=velocity + self.listener_vel = velocity def setListenerVelocityAuto(self): """ diff --git a/doc/ReleaseNotes b/doc/ReleaseNotes index 062f129ebd..cb10ca5dae 100644 --- a/doc/ReleaseNotes +++ b/doc/ReleaseNotes @@ -1,3 +1,7 @@ +------------------------ RELEASE 1.10.1 ----------------------- + +* Audio3DManager accepts tuple in setSoundVelocity/setListenerVelocity + ------------------------ RELEASE 1.10.0 ----------------------- This is a major release with significant changes. Please review the