From dee940e0361a1d3920ba15b6952be94f93936a2d Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Wed, 17 May 2023 10:10:08 +0200 Subject: [PATCH] Draw order for python api (#2138) * draw order for images and points * python api for draw order on lines & rects. improved api demo * py formatting & linting --- .../re_log_types/src/component_types/mod.rs | 5 ++- examples/python/api_demo/main.py | 39 +++++++++++++++++++ examples/rust/api_demo/src/main.rs | 35 +++++++++++------ .../rerun_sdk/rerun/components/__init__.py | 3 +- .../rerun_sdk/rerun/components/draw_order.py | 21 ++++++++++ rerun_py/rerun_sdk/rerun/log/image.py | 20 +++++++++- rerun_py/rerun_sdk/rerun/log/lines.py | 17 ++++++++ rerun_py/rerun_sdk/rerun/log/points.py | 17 ++++++++ rerun_py/rerun_sdk/rerun/log/rects.py | 17 ++++++++ rerun_py/rerun_sdk/rerun/log/tensor.py | 5 +++ rerun_py/src/python_bridge.rs | 8 ++-- 11 files changed, 168 insertions(+), 19 deletions(-) create mode 100644 rerun_py/rerun_sdk/rerun/components/draw_order.py diff --git a/crates/re_log_types/src/component_types/mod.rs b/crates/re_log_types/src/component_types/mod.rs index d6187b4b7e9c..2eae0fc191a7 100644 --- a/crates/re_log_types/src/component_types/mod.rs +++ b/crates/re_log_types/src/component_types/mod.rs @@ -73,12 +73,13 @@ pub use vec::{Vec2D, Vec3D, Vec4D}; lazy_static! { //TODO(john): use a run-time type registry - static ref FIELDS: [Field; 26] = [ + static ref FIELDS: [Field; 27] = [ ::field(), ::field(), ::field(), ::field(), ::field(), + ::field(), ::field(), ::field(),