From b736b3e4db4e7fe44010aeb2b2569229728fe75c Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 7 Jan 2022 10:14:30 +0100 Subject: [PATCH] filter: Accept floating-point values for FilterManager mul= parameter Fixes #1231 Closes #1232 --- direct/src/filter/FilterManager.py | 4 ++-- doc/ReleaseNotes | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/direct/src/filter/FilterManager.py b/direct/src/filter/FilterManager.py index 784a2cc2b3..ad0f72cca8 100644 --- a/direct/src/filter/FilterManager.py +++ b/direct/src/filter/FilterManager.py @@ -122,8 +122,8 @@ class FilterManager(DirectObject): winy = winy // div if mul != 1: - winx = winx * mul - winy = winy * mul + winx = int(round(winx * mul)) + winy = int(round(winy * mul)) return winx,winy diff --git a/doc/ReleaseNotes b/doc/ReleaseNotes index a0436156e2..1ddd2fd9c6 100644 --- a/doc/ReleaseNotes +++ b/doc/ReleaseNotes @@ -45,6 +45,7 @@ Miscellaneous * Fix nodes with same tag key but different value getting flattened together * taskMgr.step() now restores previous SIGINT handler afterwards (#1180) * Add base.clock as alias for globalClock +* FilterManager mul parameter now accepts floating-point values (#1231) * Assorted minor API documentation improvements * Fix memory leak getting Bullet persistent manifolds from Python (#1193) * Add missing property interface to PlaneNode