Browse Source

Merge branch 'release/1.10.x'

rdb 3 years ago
parent
commit
40f54a766c

+ 1 - 1
README.md

@@ -24,7 +24,7 @@ Installing Panda3D
 ==================
 ==================
 
 
 The latest Panda3D SDK can be downloaded from
 The latest Panda3D SDK can be downloaded from
-[this page](https://www.panda3d.org/download/sdk-1-10-10/).
+[this page](https://www.panda3d.org/download/sdk-1-10-11/).
 If you are familiar with installing Python packages, you can use
 If you are familiar with installing Python packages, you can use
 the following command:
 the following command:
 
 

+ 2 - 2
direct/src/filter/FilterManager.py

@@ -123,8 +123,8 @@ class FilterManager(DirectObject):
             winy = winy // div
             winy = winy // div
 
 
         if mul != 1:
         if mul != 1:
-            winx = winx * mul
-            winy = winy * mul
+            winx = int(round(winx * mul))
+            winy = int(round(winy * mul))
 
 
         return winx,winy
         return winx,winy
 
 

+ 60 - 0
doc/ReleaseNotes

@@ -1,3 +1,63 @@
+-----------------------  RELEASE 1.10.11  -----------------------
+
+Maintenance release containing assorted bug fixes and minor improvements.
+
+Rendering
+* Fix erratic shadow bug with multiple lights from gltf/blend2bam (#1153)
+* Fix erratic behavior of HW skinning shaders on non-animated models (#1207)
+* Fix errors with compressed luminance textures in DirectX 9 (#1198)
+* Implement screenshotting multisample backbuffer in DirectX 9 (#1225)
+
+Texture Loading
+* Don't load texture from disk when loading .bam if preloading is off (#1208)
+* Fix TextureReloadRequest not working properly when mipmapping is disabled
+* Add TexturePool.get_texture() method for querying textures in pool
+* Fix crash when opening a .txo, .dds or .ktx file fails
+* Improve error message when calling tex.write() with unknown extension
+
+Input
+* Generate horizontal scroll wheel events on Windows
+* Generate events for mouse buttons 4 and 5 on X11
+* Generate events for lmeta, rmeta and menu keys on Windows
+* Add raw event (raw-<) for key between shift and Z on ISO keyboards
+* Gracefully handle invalid raw input device data on Windows
+* Correctly handle negative axis input from Windows raw input devices (#1218)
+* FrSky RC controller is now registered as flight stick (#1218)
+
+Deployment
+* Support building with tkinter on all supported platforms (#780)
+* Fix issue with zipimport module not being packaged
+* Fix grayscale icons becoming blue when scaled automatically
+* Automatically include cacert.pem when depending on certifi
+* Suppress assorted spurious missing module warnings
+* Targeting linux_x86_64 / linux_i686 also allows use of manylinux wheels
+
+Build
+* Add support for Maya 2022 (#1213)
+* Support building with Visual Studio 2022
+* Support building with macOS 11.3 SDK (and work around clang crash)
+* Support building with Windows 11 SDK
+* Build Ubuntu .deb files with bindings for multiple Python 3 versions
+* Support compilation with Assimp 5.x (#1212)
+* Support building on manylinux_2_24
+
+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)
+* Fix assertion in PythonLoaderFileType with debug Python build
+* Add missing property interface to PlaneNode
+* Fix prepare_scene() not properly invoking the Shader Generator
+* Add name property to AICharacter class (#1205)
+* Add bullet-split-impulse configuration variable (#1201)
+* Fix slider thumb entering dragging state on keyboard button press (#1188)
+* Allow OnscreenImage to be created before ShowBase is created (#1209)
+* Fix manager, t, play_rate, duration properties of Sequence/Parallel (#1202)
+* Expose ButtonEvent API to Python (UNSTABLE API, will be changed soon)
+
 -----------------------  RELEASE 1.10.10  -----------------------
 -----------------------  RELEASE 1.10.10  -----------------------
 
 
 This release fixes assorted, mostly very minor bugs.
 This release fixes assorted, mostly very minor bugs.

+ 18 - 0
panda/src/gobj/texture.cxx

@@ -3680,6 +3680,12 @@ do_read_txo_file(CData *cdata, const Filename &fullpath) {
   }
   }
 
 
   istream *in = file->open_read_file(true);
   istream *in = file->open_read_file(true);
+  if (in == nullptr) {
+    gobj_cat.error()
+      << "Failed to open " << filename << " for reading.\n";
+    return false;
+  }
+
   bool success = do_read_txo(cdata, *in, fullpath);
   bool success = do_read_txo(cdata, *in, fullpath);
   vfs->close_read_file(in);
   vfs->close_read_file(in);
 
 
@@ -3735,6 +3741,12 @@ do_read_dds_file(CData *cdata, const Filename &fullpath, bool header_only) {
   }
   }
 
 
   istream *in = file->open_read_file(true);
   istream *in = file->open_read_file(true);
+  if (in == nullptr) {
+    gobj_cat.error()
+      << "Failed to open " << filename << " for reading.\n";
+    return false;
+  }
+
   bool success = do_read_dds(cdata, *in, fullpath, header_only);
   bool success = do_read_dds(cdata, *in, fullpath, header_only);
   vfs->close_read_file(in);
   vfs->close_read_file(in);
 
 
@@ -4415,6 +4427,12 @@ do_read_ktx_file(CData *cdata, const Filename &fullpath, bool header_only) {
   }
   }
 
 
   istream *in = file->open_read_file(true);
   istream *in = file->open_read_file(true);
+  if (in == nullptr) {
+    gobj_cat.error()
+      << "Failed to open " << filename << " for reading.\n";
+    return false;
+  }
+
   bool success = do_read_ktx(cdata, *in, fullpath, header_only);
   bool success = do_read_ktx(cdata, *in, fullpath, header_only);
   vfs->close_read_file(in);
   vfs->close_read_file(in);
 
 

+ 2 - 2
panda/src/gobj/texturePeeker.cxx

@@ -436,7 +436,7 @@ lookup_bilinear(LColor &color, PN_stdfloat u, PN_stdfloat v) const {
  * rectangle defined by the specified coordinate range.
  * rectangle defined by the specified coordinate range.
  *
  *
  * The texel color is linearly filtered over the entire region.  u, v, and w
  * The texel color is linearly filtered over the entire region.  u, v, and w
- * will wrap around regardless of the texture's wrap mode.
+ * must be in the range [0, 1].
  */
  */
 void TexturePeeker::
 void TexturePeeker::
 filter_rect(LColor &color,
 filter_rect(LColor &color,
@@ -464,7 +464,7 @@ filter_rect(LColor &color,
  * rectangle defined by the specified coordinate range.
  * rectangle defined by the specified coordinate range.
  *
  *
  * The texel color is linearly filtered over the entire region.  u, v, and w
  * The texel color is linearly filtered over the entire region.  u, v, and w
- * will wrap around regardless of the texture's wrap mode.
+ * must be in the range [0, 1].
  */
  */
 void TexturePeeker::
 void TexturePeeker::
 filter_rect(LColor &color,
 filter_rect(LColor &color,

+ 4 - 0
panda/src/pgraph/pythonLoaderFileType.cxx

@@ -158,8 +158,12 @@ init(PyObject *loader) {
     }
     }
     Py_DECREF(supports_compressed);
     Py_DECREF(supports_compressed);
   }
   }
+  else {
+    PyErr_Clear();
+  }
 
 
   _load_func = PyObject_GetAttrString(loader, "load_file");
   _load_func = PyObject_GetAttrString(loader, "load_file");
+  PyErr_Clear();
   _save_func = PyObject_GetAttrString(loader, "save_file");
   _save_func = PyObject_GetAttrString(loader, "save_file");
   PyErr_Clear();
   PyErr_Clear();
 
 

+ 35 - 14
pandatool/src/mayaprogs/mayapath.cxx

@@ -58,15 +58,6 @@ using std::string;
 #define QUOTESTR(x) #x
 #define QUOTESTR(x) #x
 #define TOSTRING(x) QUOTESTR(x)
 #define TOSTRING(x) QUOTESTR(x)
 
 
-#if defined(_WIN32)
-// Note: Filename::dso_filename changes .so to .dll automatically.
-static const Filename openmaya_filename = "bin/OpenMaya.so";
-#elif defined(IS_OSX)
-static const Filename openmaya_filename = "MacOS/libOpenMaya.dylib";
-#else
-static const Filename openmaya_filename = "lib/libOpenMaya.so";
-#endif  // _WIN32
-
 // Searches for python26.zip or whatever version it is.
 // Searches for python26.zip or whatever version it is.
 static Filename
 static Filename
 find_pyzip(const Filename &maya_location) {
 find_pyzip(const Filename &maya_location) {
@@ -122,6 +113,25 @@ get_version_number(const char *ver) {
   return 0;
   return 0;
 }
 }
 
 
+static Filename
+get_openmaya_filename(const Filename &maya_location) {
+#ifdef _WIN32
+  // Note: Filename::dso_filename changes .so to .dll automatically.
+  // Maya 2022 has two versions of OpenMaya.dll, one for Python 3 and
+  // one for Python 2, in bin3 and bin2 folders.
+  Filename bin3 = Filename(maya_location, "bin3");
+  Filename bin3_openmaya = Filename::dso_filename(maya_location / "bin3/OpenMaya.so");
+  if (bin3_openmaya.is_regular_file()) {
+    return bin3_openmaya;
+  }
+  return Filename::dso_filename(maya_location / "bin/OpenMaya.so");
+#elif defined(IS_OSX)
+  return Filename::dso_filename(maya_location / "MacOS/libOpenMaya.dylib");
+#else
+  return Filename::dso_filename(maya_location / "lib/libOpenMaya.so");
+#endif  // _WIN32
+}
+
 #if defined(_WIN32)
 #if defined(_WIN32)
 static void
 static void
 get_maya_location(const char *ver, string &loc) {
 get_maya_location(const char *ver, string &loc) {
@@ -265,8 +275,8 @@ main(int argc, char *argv[]) {
     } else if (maya_location != standard_maya_location) {
     } else if (maya_location != standard_maya_location) {
       // If it *is* set, we verify that OpenMaya.dll matches the standard
       // If it *is* set, we verify that OpenMaya.dll matches the standard
       // version.
       // version.
-      Filename openmaya_given = Filename::dso_filename(Filename(maya_location, openmaya_filename));
-      Filename openmaya_standard = Filename::dso_filename(Filename(standard_maya_location, openmaya_filename));
+      Filename openmaya_given = get_openmaya_filename(maya_location);
+      Filename openmaya_standard = get_openmaya_filename(standard_maya_location);
 
 
       if (openmaya_given != openmaya_standard) {
       if (openmaya_given != openmaya_standard) {
 #ifdef HAVE_OPENSSL
 #ifdef HAVE_OPENSSL
@@ -335,9 +345,9 @@ main(int argc, char *argv[]) {
   }
   }
 
 
   // Look for OpenMaya.dll as a sanity check.
   // Look for OpenMaya.dll as a sanity check.
-  Filename openmaya = Filename::dso_filename(Filename(maya_location, openmaya_filename));
+  Filename openmaya = get_openmaya_filename(maya_location);
   if (!openmaya.is_regular_file()) {
   if (!openmaya.is_regular_file()) {
-    cerr << "Could not find $MAYA_LOCATION/" << Filename::dso_filename(openmaya_filename).to_os_specific() << "!\n";
+    cerr << "Could not find OpenMaya library in $MAYA_LOCATION!\n";
     exit(1);
     exit(1);
   }
   }
 
 
@@ -395,7 +405,18 @@ main(int argc, char *argv[]) {
     if (path == nullptr) {
     if (path == nullptr) {
       path = "";
       path = "";
     }
     }
-    string putenv_str = "PATH=" + bin.to_os_specific() + sep + path;
+    string putenv_str = "PATH=";
+
+    // On Windows, there may also be a bin3 or bin2 directory, we should
+    // add either one to the PATH.
+#ifdef _WIN32
+    Filename bin3 = Filename(maya_location, "bin3");
+    if (bin3.is_directory()) {
+      putenv_str += bin3.to_os_specific() + sep;
+    }
+#endif
+    putenv_str += bin.to_os_specific() + sep + path;
+
     char *putenv_cstr = strdup(putenv_str.c_str());
     char *putenv_cstr = strdup(putenv_str.c_str());
     putenv(putenv_cstr);
     putenv(putenv_cstr);
   }
   }