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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python/viewer] Fix MacOS support. #822

Merged
merged 1 commit into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def discard(self, owner: "InterfaceQuantity[ValueT]") -> None:
self.owners = tuple(self._weakrefs)

def reset(self,
*, ignore_auto_refresh: bool = False,
ignore_auto_refresh: bool = False,
reset_state_machine: bool = False) -> None:
"""Clear value stored in cache if any.

Expand Down Expand Up @@ -628,6 +628,7 @@ def reset(self,
ignore_other_instances=True)

# Reset shared cache
# pylint: disable=unexpected-keyword-arg
self.cache.reset(
ignore_auto_refresh=not self.env.is_simulation_running,
reset_state_machine=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -648,9 +648,12 @@ def _open_offscreen_window(self,
# Set offscreen buffer frame properties.
# Note that accumulator bits and back buffers is not supported by
# resizeable buffers.
# Beware MSAA is very picky on MacOS regarding the image format, with
# only a few variant being supported.
# See https://github.com/panda3d/panda3d/issues/1121
# https://github.com/panda3d/panda3d/issues/756
fbprops = FrameBufferProperties()
fbprops.set_rgba_bits(8, 8, 8, 0)
fbprops.set_rgba_bits(8, 8, 8, 8)
fbprops.set_float_color(False)
fbprops.set_depth_bits(16)
fbprops.set_float_depth(True)
Expand Down
2 changes: 1 addition & 1 deletion python/jiminy_py/src/jiminy_py/viewer/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1248,7 +1248,7 @@ def connect_backend(backend: Optional[str] = None) -> None:
for pid in psutil.pids():
try:
proc_info = Process(pid)
for conn in proc_info.connections("tcp4"):
for conn in proc_info.net_connections("tcp4"):
if conn.status != 'LISTEN' or \
conn.laddr.ip != '127.0.0.1':
continue
Expand Down
Loading