Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into andreas/video-timesta…
Browse files Browse the repository at this point in the history
…mp-util
  • Loading branch information
Wumpf committed Sep 17, 2024
2 parents 22db154 + bfb67a6 commit fe99752
Show file tree
Hide file tree
Showing 122 changed files with 1,321 additions and 436 deletions.
52 changes: 31 additions & 21 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1777,7 +1777,7 @@ checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30"
[[package]]
name = "ecolor"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=6b7f4312373a301a4cdf7d99a0d546acd34bcd66#6b7f4312373a301a4cdf7d99a0d546acd34bcd66"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
dependencies = [
"bytemuck",
"emath",
Expand All @@ -1787,7 +1787,7 @@ dependencies = [
[[package]]
name = "eframe"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=6b7f4312373a301a4cdf7d99a0d546acd34bcd66#6b7f4312373a301a4cdf7d99a0d546acd34bcd66"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
dependencies = [
"ahash",
"bytemuck",
Expand Down Expand Up @@ -1824,7 +1824,7 @@ dependencies = [
[[package]]
name = "egui"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=6b7f4312373a301a4cdf7d99a0d546acd34bcd66#6b7f4312373a301a4cdf7d99a0d546acd34bcd66"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
dependencies = [
"accesskit",
"ahash",
Expand All @@ -1841,7 +1841,7 @@ dependencies = [
[[package]]
name = "egui-wgpu"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=6b7f4312373a301a4cdf7d99a0d546acd34bcd66#6b7f4312373a301a4cdf7d99a0d546acd34bcd66"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
dependencies = [
"ahash",
"bytemuck",
Expand All @@ -1860,7 +1860,7 @@ dependencies = [
[[package]]
name = "egui-winit"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=6b7f4312373a301a4cdf7d99a0d546acd34bcd66#6b7f4312373a301a4cdf7d99a0d546acd34bcd66"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
dependencies = [
"accesskit_winit",
"ahash",
Expand All @@ -1879,30 +1879,28 @@ dependencies = [
[[package]]
name = "egui_commonmark"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe88871b75bd43c52a2b44ce5b53160506e7976e239112c56728496d019cc60d"
source = "git+https://github.com/rerun-io/egui_commonmark?rev=7a9dc755bfa351a3796274cb8ca87129b051c084#7a9dc755bfa351a3796274cb8ca87129b051c084"
dependencies = [
"egui",
"egui_commonmark_backend",
"egui_extras",
"pulldown-cmark 0.11.0",
"pulldown-cmark 0.12.1",
]

[[package]]
name = "egui_commonmark_backend"
version = "0.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "148edd9546feba319b16d5a5e551cda46095031ec1e6665e5871eef9ee692967"
source = "git+https://github.com/rerun-io/egui_commonmark?rev=7a9dc755bfa351a3796274cb8ca87129b051c084#7a9dc755bfa351a3796274cb8ca87129b051c084"
dependencies = [
"egui",
"egui_extras",
"pulldown-cmark 0.11.0",
"pulldown-cmark 0.12.1",
]

[[package]]
name = "egui_extras"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=6b7f4312373a301a4cdf7d99a0d546acd34bcd66#6b7f4312373a301a4cdf7d99a0d546acd34bcd66"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
dependencies = [
"ahash",
"egui",
Expand All @@ -1918,13 +1916,13 @@ dependencies = [
[[package]]
name = "egui_glow"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=6b7f4312373a301a4cdf7d99a0d546acd34bcd66#6b7f4312373a301a4cdf7d99a0d546acd34bcd66"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
dependencies = [
"ahash",
"bytemuck",
"egui",
"egui-winit",
"glow",
"glow 0.14.0",
"log",
"memoffset 0.9.0",
"puffin",
Expand All @@ -1947,7 +1945,7 @@ dependencies = [
[[package]]
name = "egui_table"
version = "0.28.1"
source = "git+https://github.com/rerun-io/egui_table.git?rev=0f594701d528c4a9553521cb941de1886549dc70#0f594701d528c4a9553521cb941de1886549dc70"
source = "git+https://github.com/rerun-io/egui_table.git?rev=c76473b244f03a7c67fbbbff9def6fc86c1ca4ea#c76473b244f03a7c67fbbbff9def6fc86c1ca4ea"
dependencies = [
"egui",
"serde",
Expand Down Expand Up @@ -1991,7 +1989,7 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]]
name = "emath"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=6b7f4312373a301a4cdf7d99a0d546acd34bcd66#6b7f4312373a301a4cdf7d99a0d546acd34bcd66"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
dependencies = [
"bytemuck",
"serde",
Expand Down Expand Up @@ -2092,7 +2090,7 @@ dependencies = [
[[package]]
name = "epaint"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=6b7f4312373a301a4cdf7d99a0d546acd34bcd66#6b7f4312373a301a4cdf7d99a0d546acd34bcd66"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"
dependencies = [
"ab_glyph",
"ahash",
Expand All @@ -2111,7 +2109,7 @@ dependencies = [
[[package]]
name = "epaint_default_fonts"
version = "0.28.1"
source = "git+https://github.com/emilk/egui.git?rev=6b7f4312373a301a4cdf7d99a0d546acd34bcd66#6b7f4312373a301a4cdf7d99a0d546acd34bcd66"
source = "git+https://github.com/emilk/egui.git?rev=66076101e12eee01dec374285521b0bed4ecc40a#66076101e12eee01dec374285521b0bed4ecc40a"

[[package]]
name = "equivalent"
Expand Down Expand Up @@ -2550,6 +2548,18 @@ dependencies = [
"web-sys",
]

[[package]]
name = "glow"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f865cbd94bd355b89611211e49508da98a1fce0ad755c1e8448fb96711b24528"
dependencies = [
"js-sys",
"slotmap",
"wasm-bindgen",
"web-sys",
]

[[package]]
name = "gltf"
version = "1.4.1"
Expand Down Expand Up @@ -4515,9 +4525,9 @@ dependencies = [

[[package]]
name = "pulldown-cmark"
version = "0.11.0"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8746739f11d39ce5ad5c2520a9b75285310dbfe78c541ccf832d38615765aec0"
checksum = "666f0f59e259aea2d72e6012290c09877a780935cc3c18b1ceded41f3890d59c"
dependencies = [
"bitflags 2.6.0",
"memchr",
Expand Down Expand Up @@ -7984,7 +7994,7 @@ dependencies = [
"block",
"cfg_aliases 0.1.1",
"core-graphics-types",
"glow",
"glow 0.13.1",
"glutin_wgl_sys",
"gpu-alloc",
"gpu-allocator",
Expand Down
14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -514,12 +514,12 @@ missing_errors_doc = "allow"
# As a last resport, patch with a commit to our own repository.
# ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk.

ecolor = { git = "https://github.com/emilk/egui.git", rev = "6b7f4312373a301a4cdf7d99a0d546acd34bcd66" } # egui master 2024-09-06
eframe = { git = "https://github.com/emilk/egui.git", rev = "6b7f4312373a301a4cdf7d99a0d546acd34bcd66" } # egui master 2024-09-06
egui = { git = "https://github.com/emilk/egui.git", rev = "6b7f4312373a301a4cdf7d99a0d546acd34bcd66" } # egui master 2024-09-06
egui_extras = { git = "https://github.com/emilk/egui.git", rev = "6b7f4312373a301a4cdf7d99a0d546acd34bcd66" } # egui master 2024-09-06
egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "6b7f4312373a301a4cdf7d99a0d546acd34bcd66" } # egui master 2024-09-06
emath = { git = "https://github.com/emilk/egui.git", rev = "6b7f4312373a301a4cdf7d99a0d546acd34bcd66" } # egui master 2024-09-06
ecolor = { git = "https://github.com/emilk/egui.git", rev = "66076101e12eee01dec374285521b0bed4ecc40a" } # egui master 2024-09-06
eframe = { git = "https://github.com/emilk/egui.git", rev = "66076101e12eee01dec374285521b0bed4ecc40a" } # egui master 2024-09-06
egui = { git = "https://github.com/emilk/egui.git", rev = "66076101e12eee01dec374285521b0bed4ecc40a" } # egui master 2024-09-06
egui_extras = { git = "https://github.com/emilk/egui.git", rev = "66076101e12eee01dec374285521b0bed4ecc40a" } # egui master 2024-09-06
egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "66076101e12eee01dec374285521b0bed4ecc40a" } # egui master 2024-09-06
emath = { git = "https://github.com/emilk/egui.git", rev = "66076101e12eee01dec374285521b0bed4ecc40a" } # egui master 2024-09-06

# Useful while developing:
# ecolor = { path = "../../egui/crates/ecolor" }
Expand All @@ -535,7 +535,7 @@ emath = { git = "https://github.com/emilk/egui.git", rev = "6b7f4312373a301a4cdf
egui_tiles = { git = "https://github.com/rerun-io/egui_tiles", rev = "b2f5e232524deed983bcad01c05f27d0e8b89d98" } # https://github.com/rerun-io/egui_tiles/pull/78 2024-08-28
# egui_tiles = { path = "../egui_tiles" }

# egui_commonmark = { git = "https://github.com/rerun-io/egui_commonmark", rev = "63d5c8933445b9ea9088c4a50b71f4ede1f3c247" } # https://github.com/lampsitter/egui_commonmark/pull/51
egui_commonmark = { git = "https://github.com/rerun-io/egui_commonmark", rev = "7a9dc755bfa351a3796274cb8ca87129b051c084" } # https://github.com/lampsitter/egui_commonmark/pull/65

# commit on `rerun-io/mp4` `main` branch
# https://github.com/rerun-io/mp4/commit/ef529032547d7f97161e95c58bd76856cb116349
Expand Down
8 changes: 7 additions & 1 deletion crates/build/re_types_builder/src/codegen/cpp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,13 @@ fn to_arrow_method(
(
true,
quote! {
return Loggable<#forwarded_type>::to_arrow(&instances->#field_name, num_instances);
if (num_instances == 0) {
return Loggable<#forwarded_type>::to_arrow(nullptr, 0);
} else if (instances == nullptr) {
return rerun::Error(ErrorCode::UnexpectedNullArgument, "Passed array instances is null when num_elements > 0.");
} else {
return Loggable<#forwarded_type>::to_arrow(&instances->#field_name, num_instances);
}
},
)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace rerun.archetypes;
/// \example archetypes/video_manual_frames title="Demonstrates manual use of video frame references" image="https://static.rerun.io/video_manual_frames/320a44e1e06b8b3a3161ecbbeae3e04d1ccb9589/1200w.png"
// TODO(#7420): update screenshot for manual frames example
table AssetVideo (
"attr.docs.unreleased",
"attr.rerun.experimental"
) {
// --- Required ---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace rerun.archetypes;
/// \example archetypes/video_manual_frames title="Demonstrates manual use of video frame references" image="https://static.rerun.io/video_manual_frames/320a44e1e06b8b3a3161ecbbeae3e04d1ccb9589/1200w.png"
// TODO(#7420): update screenshot for manual frames example
table VideoFrameReference (
"attr.docs.unreleased",
"attr.rerun.experimental"
){
// --- Required ---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ namespace rerun.components;

/// A path to an entity, usually to reference some data that is part of the target entity.
table EntityPath (
"attr.docs.unreleased",
"attr.arrow.transparent",
"attr.python.aliases": "str",
"attr.python.array_aliases": "str, Sequence[str]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ namespace rerun.components;

/// Timestamp inside a [archetypes.AssetVideo].
struct VideoTimestamp (
"attr.docs.unreleased",
"attr.rust.derive": "Copy, PartialEq, Eq, Default",
"attr.rust.repr": "transparent",
"attr.rerun.experimental"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
namespace rerun.datatypes;

/// Specifies how to interpret the `video_time` field of a [datatypes.VideoTimestamp].
enum VideoTimeMode: ubyte{
enum VideoTimeMode: ubyte (
"attr.docs.unreleased"
) {
/// Invalid value. Won't show up in generated types.
Invalid = 0,

Expand All @@ -13,6 +15,7 @@ enum VideoTimeMode: ubyte{

/// Timestamp inside a [archetypes.AssetVideo].
struct VideoTimestamp (
"attr.docs.unreleased",
"attr.rust.derive": "Copy, PartialEq, Eq",
"attr.rerun.experimental"
) {
Expand Down
5 changes: 5 additions & 0 deletions crates/store/re_types/src/components/media_type_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,11 @@ impl MediaType {
}
}
}

/// Returns `true` if this is an image media type.
pub fn is_image(&self) -> bool {
self.as_str().starts_with("image/")
}
}

impl std::fmt::Display for MediaType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ fn edit_view_enum_impl<EnumT: re_types_core::reflection::Enum>(
});

combobox_response.response = combobox_response.response.on_hover_ui(|ui| {
ui.markdown_ui(
ui.id().with(prev_selected_value),
prev_selected_value.docstring_md(),
);
ui.markdown_ui(prev_selected_value.docstring_md());
});

response_with_changes_of_inner(combobox_response)
Expand All @@ -59,6 +56,6 @@ fn variant_ui<EnumT: re_types_core::reflection::Enum>(
) -> egui::Response {
ui.selectable_value(current_value, variant, variant.to_string())
.on_hover_ui(|ui| {
ui.markdown_ui(ui.id().with(variant), variant.docstring_md());
ui.markdown_ui(variant.docstring_md());
})
}
4 changes: 2 additions & 2 deletions crates/viewer/re_data_ui/src/component_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ impl DataUi for ComponentName {
.map(|info| info.docstring_md)
{
if ui_layout.is_selection_panel() {
ui.markdown_ui(egui::Id::new((self, "full")), markdown);
ui.markdown_ui(markdown);
} else if let Some(first_line) = markdown.lines().next() {
ui.markdown_ui(egui::Id::new((self, "first_line")), first_line);
ui.markdown_ui(first_line);
}
}

Expand Down
6 changes: 1 addition & 5 deletions crates/viewer/re_space_view/src/view_property_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ fn view_property_ui_impl(
ui,
field.component_name,
reflection.display_name,
name,
field,
&blueprint_path,
component_results.component_row_id(&field.component_name),
Expand All @@ -90,7 +89,6 @@ fn view_property_ui_impl(
ui,
field.component_name,
display_name,
name,
field,
&blueprint_path,
component_results.component_row_id(&field.component_name),
Expand Down Expand Up @@ -119,7 +117,6 @@ fn view_property_component_ui(
ui: &mut egui::Ui,
component_name: ComponentName,
root_item_display_name: &str,
archetype_name: ArchetypeName,
field: &ArchetypeFieldReflection,
blueprint_path: &re_log_types::EntityPath,
row_id: Option<RowId>,
Expand Down Expand Up @@ -173,8 +170,7 @@ fn view_property_component_ui(
};

list_item_response.on_hover_ui(|ui| {
let id = egui::Id::new((archetype_name, field.display_name));
ui.markdown_ui(id, field.docstring_md);
ui.markdown_ui(field.docstring_md);
});
}

Expand Down
2 changes: 1 addition & 1 deletion crates/viewer/re_space_view_dataframe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ re_viewport_blueprint.workspace = true

anyhow.workspace = true
egui_extras.workspace = true
egui_table = { git = "https://github.com/rerun-io/egui_table.git", rev = "0f594701d528c4a9553521cb941de1886549dc70" } # main as of 2024-09-09
egui_table = { git = "https://github.com/rerun-io/egui_table.git", rev = "c76473b244f03a7c67fbbbff9def6fc86c1ca4ea" } # main as of 2024-09-13
egui.workspace = true
itertools.workspace = true
thiserror.workspace = true
5 changes: 4 additions & 1 deletion crates/viewer/re_space_view_dataframe/src/dataframe_ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ impl DataframeTableDelegate<'_> {
}

impl<'a> egui_table::TableDelegate for DataframeTableDelegate<'a> {
fn default_row_height(&self) -> f32 {
re_ui::DesignTokens::table_line_height()
}

fn prepare(&mut self, info: &egui_table::PrefetchInfo) {
re_tracing::profile_function!();

Expand Down Expand Up @@ -337,7 +341,6 @@ fn dataframe_ui_impl(ctx: &ViewerContext<'_>, ui: &mut egui::Ui, query_handle: &
egui_table::HeaderRow::new(re_ui::DesignTokens::table_header_height()),
])
.num_rows(num_rows)
.row_height(re_ui::DesignTokens::table_line_height())
.show(ui, &mut table_delegate);
});
}
Expand Down
5 changes: 1 addition & 4 deletions crates/viewer/re_space_view_spatial/src/view_3d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,7 @@ impl SpaceViewClass for SpatialSpaceView3D {
"Scene up is unspecified".to_owned()
};
ui.label(up_description).on_hover_ui(|ui| {
ui.markdown_ui(
egui::Id::new("view_coordinates_tooltip"),
"Set with `rerun.ViewCoordinates`.",
);
ui.markdown_ui("Set with `rerun.ViewCoordinates`.");
});

if let Some(eye) = &state.state_3d.view_eye {
Expand Down
Loading

0 comments on commit fe99752

Please sign in to comment.