Browse Source

filter: Accept floating-point values for FilterManager mul= parameter

Fixes #1231
Closes #1232
rdb 3 years ago
parent
commit
b736b3e4db
2 changed files with 3 additions and 2 deletions
  1. 2 2
      direct/src/filter/FilterManager.py
  2. 1 0
      doc/ReleaseNotes

+ 2 - 2
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
 

+ 1 - 0
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