From 5f87476e963c42d36926502b5b8f2f2a1e31df29 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Thu, 4 Nov 2021 15:47:51 -0500 Subject: [PATCH] Added warnings to new camera control calls --- assets/src/ba_data/python/._ba_sources_hash | 2 +- assets/src/ba_data/python/_ba.py | 20 +++++++++++++ .../python/methods/python_methods_graphics.cc | 30 +++++++++++++++---- 3 files changed, 46 insertions(+), 6 deletions(-) diff --git a/assets/src/ba_data/python/._ba_sources_hash b/assets/src/ba_data/python/._ba_sources_hash index b9a0bf9c..54d0ade4 100644 --- a/assets/src/ba_data/python/._ba_sources_hash +++ b/assets/src/ba_data/python/._ba_sources_hash @@ -1 +1 @@ -320686119307869972803010339077202626108 \ No newline at end of file +207646555889684244275321000216220256792 \ No newline at end of file diff --git a/assets/src/ba_data/python/_ba.py b/assets/src/ba_data/python/_ba.py index cfb99e35..90534a55 100644 --- a/assets/src/ba_data/python/_ba.py +++ b/assets/src/ba_data/python/_ba.py @@ -2012,6 +2012,10 @@ def get_camera_position() -> tuple[float, ...]: """get_camera_position() -> tuple[float, ...] (internal) + + WARNING: these camera controls will not apply to network clients + and may behave unpredicably in other ways. Use them only for + tinkering. """ return (0.0, 0.0, 0.0) @@ -2020,6 +2024,10 @@ def get_camera_target() -> tuple[float, ...]: """get_camera_target() -> tuple[float, ...] (internal) + + WARNING: these camera controls will not apply to network clients + and may behave unpredicably in other ways. Use them only for + tinkering. """ return (0.0, 0.0, 0.0) @@ -3505,6 +3513,10 @@ def set_camera_manual(value: bool) -> None: """set_camera_manual(value: bool) -> None (internal) + + WARNING: these camera controls will not apply to network clients + and may behave unpredicably in other ways. Use them only for + tinkering. """ return None @@ -3513,6 +3525,10 @@ def set_camera_position(x: float, y: float, z: float) -> None: """set_camera_position(x: float, y: float, z: float) -> None (internal) + + WARNING: these camera controls will not apply to network clients + and may behave unpredicably in other ways. Use them only for + tinkering. """ return None @@ -3521,6 +3537,10 @@ def set_camera_target(x: float, y: float, z: float) -> None: """set_camera_target(x: float, y: float, z: float) -> None (internal) + + WARNING: these camera controls will not apply to network clients + and may behave unpredicably in other ways. Use them only for + tinkering. """ return None diff --git a/src/ballistica/python/methods/python_methods_graphics.cc b/src/ballistica/python/methods/python_methods_graphics.cc index 454fa817..b353d7a0 100644 --- a/src/ballistica/python/methods/python_methods_graphics.cc +++ b/src/ballistica/python/methods/python_methods_graphics.cc @@ -315,31 +315,51 @@ auto PythonMethodsGraphics::GetMethods() -> std::vector { METH_VARARGS | METH_KEYWORDS, "get_camera_position() -> tuple[float, ...]\n" "\n" - "(internal)"}, + "(internal)\n" + "\n" + "WARNING: these camera controls will not apply to network clients\n" + "and may behave unpredicably in other ways. Use them only for\n" + "tinkering."}, {"get_camera_target", (PyCFunction)PyGetCameraTarget, METH_VARARGS | METH_KEYWORDS, "get_camera_target() -> tuple[float, ...]\n" "\n" - "(internal)"}, + "(internal)\n" + "\n" + "WARNING: these camera controls will not apply to network clients\n" + "and may behave unpredicably in other ways. Use them only for\n" + "tinkering."}, {"set_camera_position", (PyCFunction)PySetCameraPosition, METH_VARARGS | METH_KEYWORDS, "set_camera_position(x: float, y: float, z: float) -> None\n" "\n" - "(internal)"}, + "(internal)\n" + "\n" + "WARNING: these camera controls will not apply to network clients\n" + "and may behave unpredicably in other ways. Use them only for\n" + "tinkering."}, {"set_camera_target", (PyCFunction)PySetCameraTarget, METH_VARARGS | METH_KEYWORDS, "set_camera_target(x: float, y: float, z: float) -> None\n" "\n" - "(internal)"}, + "(internal)\n" + "\n" + "WARNING: these camera controls will not apply to network clients\n" + "and may behave unpredicably in other ways. Use them only for\n" + "tinkering."}, {"set_camera_manual", (PyCFunction)PySetCameraManual, METH_VARARGS | METH_KEYWORDS, "set_camera_manual(value: bool) -> None\n" "\n" - "(internal)"}, + "(internal)\n" + "\n" + "WARNING: these camera controls will not apply to network clients\n" + "and may behave unpredicably in other ways. Use them only for\n" + "tinkering."}, {"has_gamma_control", PyHasGammaControl, METH_VARARGS, "has_gamma_control() -> bool\n"