From b8c12b4ab4eb135199723b18344f6f61d7d3638a Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Wed, 23 Oct 2024 15:18:25 +0200 Subject: [PATCH] doc fixes --- .../store/re_types/definitions/rerun/archetypes/asset3d.fbs | 5 ++++- crates/store/re_types/src/archetypes/asset3d.rs | 6 ++++++ crates/viewer/re_viewer/src/reflection/mod.rs | 4 ++-- rerun_cpp/src/rerun/archetypes/asset3d.hpp | 6 ++++++ rerun_py/rerun_sdk/rerun/archetypes/asset3d.py | 3 +++ 5 files changed, 21 insertions(+), 3 deletions(-) diff --git a/crates/store/re_types/definitions/rerun/archetypes/asset3d.fbs b/crates/store/re_types/definitions/rerun/archetypes/asset3d.fbs index 484df2efe8613..0b9b59c1b023e 100644 --- a/crates/store/re_types/definitions/rerun/archetypes/asset3d.fbs +++ b/crates/store/re_types/definitions/rerun/archetypes/asset3d.fbs @@ -40,5 +40,8 @@ table Asset3D ( vertex_colors: [rerun.components.Color] ("attr.rerun.component_optional", nullable, order: 3100); /// A color multiplier applied to the whole asset. - albedo_factor: rerun.components.AlbedoFactor ("attr.rerun.component_optional", nullable, order: 3200); + /// + /// For mesh who already have `albedo_factor` in materials, + /// it will be overwritten by actual `albedo_factor` of [archetypes.Asset3D] (if specified). + albedo_factor: rerun.components.AlbedoFactor ("attr.rerun.component_optional", nullable, order: 3100); } diff --git a/crates/store/re_types/src/archetypes/asset3d.rs b/crates/store/re_types/src/archetypes/asset3d.rs index 963bf5f19cb4b..9cd1601ce8946 100644 --- a/crates/store/re_types/src/archetypes/asset3d.rs +++ b/crates/store/re_types/src/archetypes/asset3d.rs @@ -75,6 +75,9 @@ pub struct Asset3D { pub vertex_colors: Option>, /// A color multiplier applied to the whole asset. + /// + /// For mesh who already have `albedo_factor` in materials, + /// it will be overwritten by actual `albedo_factor` of [`archetypes::Asset3D`][crate::archetypes::Asset3D] (if specified). pub albedo_factor: Option, } @@ -300,6 +303,9 @@ impl Asset3D { } /// A color multiplier applied to the whole asset. + /// + /// For mesh who already have `albedo_factor` in materials, + /// it will be overwritten by actual `albedo_factor` of [`archetypes::Asset3D`][crate::archetypes::Asset3D] (if specified). #[inline] pub fn with_albedo_factor( mut self, diff --git a/crates/viewer/re_viewer/src/reflection/mod.rs b/crates/viewer/re_viewer/src/reflection/mod.rs index 49a39dd00758d..3f52cb5f37fd8 100644 --- a/crates/viewer/re_viewer/src/reflection/mod.rs +++ b/crates/viewer/re_viewer/src/reflection/mod.rs @@ -807,8 +807,8 @@ fn generate_archetype_reflection() -> ArchetypeReflectionMap { false, }, ArchetypeFieldReflection { component_name : "rerun.components.AlbedoFactor".into(), display_name : "Albedo factor", docstring_md : - "A color multiplier applied to the whole asset.", is_required : - false, }, + "A color multiplier applied to the whole asset.\n\nFor mesh who already have `albedo_factor` in materials,\nit will be overwritten by actual `albedo_factor` of [`archetypes.Asset3D`](https://rerun.io/docs/reference/types/archetypes/asset3d) (if specified).", + is_required : false, }, ], }, ), diff --git a/rerun_cpp/src/rerun/archetypes/asset3d.hpp b/rerun_cpp/src/rerun/archetypes/asset3d.hpp index f715ca69002b6..df2c86f08e6bf 100644 --- a/rerun_cpp/src/rerun/archetypes/asset3d.hpp +++ b/rerun_cpp/src/rerun/archetypes/asset3d.hpp @@ -72,6 +72,9 @@ namespace rerun::archetypes { std::optional> vertex_colors; /// A color multiplier applied to the whole asset. + /// + /// For mesh who already have `albedo_factor` in materials, + /// it will be overwritten by actual `albedo_factor` of `archetypes::Asset3D` (if specified). std::optional albedo_factor; public: @@ -135,6 +138,9 @@ namespace rerun::archetypes { } /// A color multiplier applied to the whole asset. + /// + /// For mesh who already have `albedo_factor` in materials, + /// it will be overwritten by actual `albedo_factor` of `archetypes::Asset3D` (if specified). Asset3D with_albedo_factor(rerun::components::AlbedoFactor _albedo_factor) && { albedo_factor = std::move(_albedo_factor); // See: https://github.com/rerun-io/rerun/issues/4027 diff --git a/rerun_py/rerun_sdk/rerun/archetypes/asset3d.py b/rerun_py/rerun_sdk/rerun/archetypes/asset3d.py index 2d99e06c3e4d3..fc7113bb9cf95 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/asset3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/asset3d.py @@ -115,6 +115,9 @@ def _clear(cls) -> Asset3D: ) # A color multiplier applied to the whole asset. # + # For mesh who already have `albedo_factor` in materials, + # it will be overwritten by actual `albedo_factor` of [`archetypes.Asset3D`][rerun.archetypes.Asset3D] (if specified). + # # (Docstring intentionally commented out to hide this field from the docs) __str__ = Archetype.__str__