From e8fc76747a1821c70802eaf375acc6769a48d301 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 13 May 2019 13:52:19 +0200 Subject: [PATCH 1/6] showbase: rename attachInputDevice gui=True arg to watch=True It describes more accurately what it does, which is attach the MouseWatcher to it. Though it was intended to help with GUI navigation, it can also be used for eg. polling button states. --- direct/src/showbase/ShowBase.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 5523d91a98..0dd8a05b3b 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -1679,16 +1679,18 @@ class ShowBase(DirectObject.DirectObject): return self.mouseWatcherNode.getModifierButtons().isDown( KeyboardButton.meta()) - def attachInputDevice(self, device, prefix=None, gui=False): + def attachInputDevice(self, device, prefix=None, watch=False): """ This function attaches an input device to the data graph, which will cause the device to be polled and generate events. If a prefix is given and not None, it is used to prefix events generated by this device, separated by a hyphen. - The gui argument can be set to True (as of Panda3D 1.10.3) to set up + The watch argument can be set to True (as of Panda3D 1.10.3) to set up the default MouseWatcher to receive inputs from this device, allowing - it to control user interfaces. + it to be polled via mouseWatcherNode and control user interfaces. + Setting this to True will also make it generate unprefixed events, + regardless of the specified prefix. If you call this, you should consider calling detachInputDevice when you are done with the device or when it is disconnected. @@ -1700,7 +1702,7 @@ class ShowBase(DirectObject.DirectObject): idn = self.dataRoot.attachNewNode(InputDeviceNode(device, device.name)) # Setup the button thrower to generate events for the device. - if prefix is not None or not gui: + if prefix is not None or not watch: bt = idn.attachNewNode(ButtonThrower(device.name)) if prefix is not None: bt.node().setPrefix(prefix + '-') @@ -1709,7 +1711,7 @@ class ShowBase(DirectObject.DirectObject): assert self.notify.debug("Attached input device {0} with prefix {1}".format(device, prefix)) self.__inputDeviceNodes[device] = idn - if gui: + if watch: idn.node().addChild(self.mouseWatcherNode) def detachInputDevice(self, device): From f183d901cbeadcd1cf021c4edd66fe8d7e68535e Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 13 May 2019 13:31:36 +0200 Subject: [PATCH 2/6] bullet: sync rigid body transform when node is reparented Reparenting a node will change its net transform, so it should cause a transform sync. Fixes #629 --- panda/src/bullet/bulletRigidBodyNode.cxx | 14 ++++++++++++++ panda/src/bullet/bulletRigidBodyNode.h | 1 + 2 files changed, 15 insertions(+) diff --git a/panda/src/bullet/bulletRigidBodyNode.cxx b/panda/src/bullet/bulletRigidBodyNode.cxx index b97f768d1b..acd7e96e79 100644 --- a/panda/src/bullet/bulletRigidBodyNode.cxx +++ b/panda/src/bullet/bulletRigidBodyNode.cxx @@ -359,6 +359,20 @@ do_transform_changed() { } } +/** + * + */ +void BulletRigidBodyNode:: +parents_changed() { + + if (_motion.sync_disabled()) return; + + if (get_num_parents() > 0) { + LightMutexHolder holder(BulletWorld::get_global_lock()); + do_transform_changed(); + } +} + /** * */ diff --git a/panda/src/bullet/bulletRigidBodyNode.h b/panda/src/bullet/bulletRigidBodyNode.h index d0e11da6cf..246dec3e6c 100644 --- a/panda/src/bullet/bulletRigidBodyNode.h +++ b/panda/src/bullet/bulletRigidBodyNode.h @@ -112,6 +112,7 @@ public: void do_sync_b2p(); protected: + virtual void parents_changed(); virtual void transform_changed(); private: From 291f3825f423ad01d347b85e7928f4f3fba05b7c Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 13 May 2019 13:33:12 +0200 Subject: [PATCH 3/6] ffmpeg: fix rare "bad src image pointers" after seek Fixes #391 --- panda/src/ffmpeg/ffmpegVideoCursor.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/panda/src/ffmpeg/ffmpegVideoCursor.cxx b/panda/src/ffmpeg/ffmpegVideoCursor.cxx index fa5789b6c4..23314561e9 100644 --- a/panda/src/ffmpeg/ffmpegVideoCursor.cxx +++ b/panda/src/ffmpeg/ffmpegVideoCursor.cxx @@ -755,7 +755,9 @@ do_poll() { PT(FfmpegBuffer) frame = do_alloc_frame(); nassertr(frame != nullptr, false); _lock.release(); - advance_to_frame(seek_frame); + if (seek_frame != _begin_frame) { + advance_to_frame(seek_frame); + } if (_frame_ready) { export_frame(frame); _lock.acquire(); From 7b77888e5ab091ffe814bb28bf7cea6b1eef40d7 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 13 May 2019 14:24:23 +0200 Subject: [PATCH 4/6] FilterManager: allow specifying custom fbprops in renderQuadInto Corollary to ea0210640cebe63db93333d13ead2e33ddaff188 (see #599) --- direct/src/filter/FilterManager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/direct/src/filter/FilterManager.py b/direct/src/filter/FilterManager.py index 5696ac9460..c20cbed139 100644 --- a/direct/src/filter/FilterManager.py +++ b/direct/src/filter/FilterManager.py @@ -239,7 +239,7 @@ class FilterManager(DirectObject): return quad - def renderQuadInto(self, name="filter-stage", mul=1, div=1, align=1, depthtex=None, colortex=None, auxtex0=None, auxtex1=None): + def renderQuadInto(self, name="filter-stage", mul=1, div=1, align=1, depthtex=None, colortex=None, auxtex0=None, auxtex1=None, fbprops=None): """ Creates an offscreen buffer for an intermediate computation. Installs a quad into the buffer. Returns @@ -253,7 +253,10 @@ class FilterManager(DirectObject): depthbits = bool(depthtex != None) - buffer = self.createBuffer(name, winx, winy, texgroup, depthbits) + if fbprops is not None: + buffer = self.createBuffer(name, winx, winy, texgroup, depthbits, fbprops=fbprops) + else: + buffer = self.createBuffer(name, winx, winy, texgroup, depthbits) if (buffer == None): return None From 65491fdc0ff2b3836289f1f2e17d0e8d2eb0ca0c Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 13 May 2019 14:25:40 +0200 Subject: [PATCH 5/6] doc: add release notes for 1.10.3 --- doc/ReleaseNotes | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/doc/ReleaseNotes b/doc/ReleaseNotes index 41d69d7f99..37156c7dab 100644 --- a/doc/ReleaseNotes +++ b/doc/ReleaseNotes @@ -1,3 +1,40 @@ +------------------------ RELEASE 1.10.3 ----------------------- + +This is another bugfix release that addresses a variety of issues +in 1.10.2 and further improves the stability. + +* Fix crash when unplugging certain devices on macOS +* Fix crash on macOS when using RIME input +* Fix logging issues/crashes in apps deployed with Python 2.7 +* Fix issues when starting in fullscreen on Linux/X11 +* Fix mapping of several gamepads including Trust GXT 24 +* Fix Linux crash when no input devices are present +* Unbreak support for matrix arrays in vertex data in OpenGL +* Allow creating multisample FBO in OpenGL with non-MS host window +* Support playing and looping compressed Ogg and WAV audio files +* Fix generation of CollisionBox for transformed geometry in .egg +* Fix Bullet rigid body transform not updating after reparenting +* Fix sporadic color scales with lighting and custom GLSL shader +* Prevent faulty shaders from shutting down GSG on some drivers +* Allow None as either argument to OdeJoint.attach() +* Fix BufferViewer when main window is not opened right away +* Properly detect extension of pz/gz compressed video/audio files +* Fix for invalid behavior of SparseArray methods to clear bits +* FilterManager now allows overriding framebuffer properties +* Fix detection of core-only OpenGL profile on some drivers +* Add gl-forward-compatible config var for OpenGL context creation +* Add paste-emit-keystrokes variable to disable Ctrl+V on Windows +* Fix in-place |= operator on Panda types (such as SparseArray) +* Fix rare FFmpeg "bad src image pointers" errors after seek +* Fix uses of types.InstanceType in some obscure direct functions +* Fix capsule-into-sphere collision test in degenerate case +* KeyboardButton.ascii_key now also accepts a str character +* Fix errors in various Tkinter DIRECT widgets +* Expose save_egg_file/save_egg_data functions in Python API +* Fix assertion error in BoundingBox.set_min_max +* Fix typo in CollisionTraverser.respect_prev_transform property +* Properly install Python bindings when building FreeBSD installer + ------------------------ RELEASE 1.10.2 ----------------------- This release fixes several more bugs, including a few regressions From adaf9ee4aa908cef4d2e99895132b716f3f21b2a Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 13 May 2019 14:31:19 +0200 Subject: [PATCH 6/6] readme: update links to point to 1.10.3 --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7002275d13..b18bcd65b7 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Installing Panda3D ================== The latest Panda3D SDK can be downloaded from -[this page](https://www.panda3d.org/download/sdk-1-10-2/). +[this page](https://www.panda3d.org/download/sdk-1-10-3/). If you are familiar with installing Python packages, you can use the following comand: @@ -64,8 +64,8 @@ depending on whether you are on a 32-bit or 64-bit system, or you can [click here](https://github.com/rdb/panda3d-thirdparty) for instructions on building them from source. -https://www.panda3d.org/download/panda3d-1.10.2/panda3d-1.10.2-tools-win64.zip -https://www.panda3d.org/download/panda3d-1.10.2/panda3d-1.10.2-tools-win32.zip +https://www.panda3d.org/download/panda3d-1.10.3/panda3d-1.10.3-tools-win64.zip +https://www.panda3d.org/download/panda3d-1.10.3/panda3d-1.10.3-tools-win32.zip After acquiring these dependencies, you may simply build Panda3D from the command prompt using the following command. (Change `14.1` to `14` if you are @@ -135,7 +135,7 @@ macOS ----- On macOS, you will need to download a set of precompiled thirdparty packages in order to -compile Panda3D, which can be acquired from [here](https://www.panda3d.org/download/panda3d-1.10.2/panda3d-1.10.2-tools-mac.tar.gz). +compile Panda3D, which can be acquired from [here](https://www.panda3d.org/download/panda3d-1.10.3/panda3d-1.10.3-tools-mac.tar.gz). After placing the thirdparty directory inside the panda3d source directory, you may build Panda3D using a command like the following: