Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Magnum and m.css to latest #2309

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Update Magnum and m.css to latest #2309

merged 2 commits into from
Jan 29, 2024

Conversation

mosra
Copy link
Collaborator

@mosra mosra commented Jan 29, 2024

Motivation and Context

Note: Requires facebookresearch/habitat-lab#1776 in order to pass the CI. The lab PR can be merged independently, as the syntax should work even with the original code.

Another ~2 months worth of Magnum features, fixes and improvements. What's new since #2278:

  • Fixed compatibility with Emscripten 3.1.49+
  • Fixed Matrix::isOrthogonal() to catch negative dot product values. Note that this effectively tightens up certain assertions and could cause previously-incorrect but seemingly working code to assert (or raise an exception in Python). Thanks to @jturner65 for the discovery.
  • New Math::join() overload that joins a range and a point, in addition to joining two ranges. Requested by @jturner65.
  • Low-level refactoring in the Math library, resulting in better runtime perf in debug builds and most Vector operators being now constexpr
  • New Quaternion::rotation() overload for creating a rotation from one vector to another. Matches Eigen's Quaternion::setFromTwoVectors() and similar APIs in other quaternion libraries. Related to --[BE][WIP] Remove Eigen dependency聽#2301, it felt better to just put this in Magnum instead of having to maintain a utility function in Habitat.
  • Made the GlslangShaderConverter plugin work with glslang 14.0. Not directly used in Habitat, but affects various packages where it is enabled by default, such as Homebrew, where a build failure was hit by @eundersander.
  • New MAGNUM_BUILD_PYTHON_BINDINGS_RTLD_GLOBAL CMake option for Python bindings. Enabled by default for static builds, performs sys.setdlopenflags(sys.getdlopenflags()|ctypes.RTLD_GLOBAL) before loading native modules in an attempt to resolve cursed issues with deduplicating globals across shared modules that was made impossible by Python implicitly isolating each loaded module into its namespace, which was repeatedly hit by @eundersander, @0mdc and others. I'm writing very long sentences today, yes, sorry.
  • Exposed trade.MeshAttributeData and trade.SceneFieldData classes to Python, which together with meshtools.interleave() and scenetools.combine_fields() finally allows trade.MeshData and trade.SceneData to be created from scratch in pure Python. Which in turn opens possibilities for adding new attributes to existing meshes, such as annotating skinned meshes with bone influences. Or for building whole scene hierarchies from loose meshes, materials and such, and exporting those to glTF. This was also the last main blocker that prevented writing the batch renderer composite file generation pipeline (Compositor "scripts" for the batch renderer聽#1969) in pure Python.

Also updated the m.css submodule, because apparently it was untouched since December 2022(!):

  • Fixed compatibility with newer docutils
  • Fixed compatibility with dvisvgm < 3.0 and Ghostscript 10
  • Improved highlighting of ANSI-colored terminal output
  • Ability to style <video> tags the same as images
  • Detecting new builtins in Python 3.11 and omitting them from output if they're not overriden and documented by the user
  • No longer using deprecated distutils, thus fixing compatibility with Python 3.12
  • Recognizing / and * in pybind11 signatures (which is used heavily by new Magnum bindings, such as SceneFieldData constructors)

How Has This Been Tested

馃煝

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jan 29, 2024
Copy link
Contributor

@jturner65 jturner65 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. This is going to removing Eigen a lot easier. Thanks!

Copy link
Contributor

@0mdc 0mdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@mosra
Copy link
Collaborator Author

mosra commented Jan 29, 2024

Re-running the failed lab build with the lab PR merged: https://app.circleci.com/pipelines/github/facebookresearch/habitat-sim/12613/workflows/de0d49c1-7011-42bb-ac1e-18f98ff912c6/jobs/79832

I have to leave for today, feel free to merge once this build passes. (Not sure if the re-ran build shows up in the overview above, I hope it will?)

@0mdc 0mdc merged commit 9233834 into main Jan 29, 2024
10 checks passed
@0mdc 0mdc deleted the update-magnum30 branch January 29, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants