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

Rename Material component to AlbedoFactor #6841

Merged
merged 13 commits into from
Jul 10, 2024
Merged
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ To get an auto-generated PR description you can put "copilot:summary" or "copilo
* Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/{{pr.number}}?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [ ] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
* [ ] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!
* [ ] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide

- [PR Build Summary](https://build.rerun.io/pr/{{pr.number}})
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## [Unreleased](https://github.com/rerun-io/rerun/compare/latest...HEAD)

# ⚠️ Breaking changes
* `mesh_material: Material` has been renamed to `albedo_factor: AlbedoFactor` [#6841](https://github.com/rerun-io/rerun/pull/6841)


## [0.17.0](https://github.com/rerun-io/rerun/compare/0.16.1...0.17.0) - More Blueprint features and better notebooks - 2024-07-08

Expand Down
2 changes: 1 addition & 1 deletion crates/store/re_types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ features = ["all"]


[features]
default = []
default = ["ecolor"]

## All features except `testing`.
all = ["ecolor", "egui_plot", "glam", "image", "mint", "serde"]
Expand Down
4 changes: 2 additions & 2 deletions crates/store/re_types/definitions/rerun/archetypes/mesh3d.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ table Mesh3D (
/// An optional uv texture coordinate for each vertex.
vertex_texcoords: [rerun.components.Texcoord2D] ("attr.rerun.component_optional", nullable, order: 3200);

/// Optional material properties for the mesh as a whole.
mesh_material: rerun.components.Material ("attr.rerun.component_optional", nullable, order: 3300);
/// A color multiplier applied to the whole mesh.
albedo_factor: rerun.components.AlbedoFactor ("attr.rerun.component_optional", nullable, order: 3300);

/// Optional albedo texture.
///
Expand Down
2 changes: 1 addition & 1 deletion crates/store/re_types/definitions/rerun/components.fbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include "./components/aggregation_policy.fbs";
include "./components/albedo_factor.fbs";
include "./components/annotation_context.fbs";
include "./components/axis_length.fbs";
include "./components/blob.fbs";
Expand All @@ -20,7 +21,6 @@ include "./components/line_strip3d.fbs";
include "./components/magnification_filter.fbs";
include "./components/marker_shape.fbs";
include "./components/marker_size.fbs";
include "./components/material.fbs";
include "./components/media_type.fbs";
include "./components/name.fbs";
include "./components/opacity.fbs";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
include "arrow/attributes.fbs";
include "python/attributes.fbs";
include "rust/attributes.fbs";

include "rerun/datatypes.fbs";
include "rerun/attributes.fbs";

namespace rerun.components;

// ---

/// A color multiplier, usually applied to a whole entity, e.g. a mesh.
table AlbedoFactor (
"attr.docs.unreleased",
"attr.rust.derive": "Copy, PartialEq, Eq, PartialOrd, Ord, Hash, bytemuck::Pod, bytemuck::Zeroable",
"attr.rust.repr": "transparent"
) {
albedo_factor: rerun.datatypes.Rgba32 (order: 100);
}

18 changes: 0 additions & 18 deletions crates/store/re_types/definitions/rerun/components/material.fbs

This file was deleted.

1 change: 0 additions & 1 deletion crates/store/re_types/definitions/rerun/datatypes.fbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ include "./datatypes/keypoint_id.fbs";
include "./datatypes/keypoint_pair.fbs";
include "./datatypes/mat3x3.fbs";
include "./datatypes/mat4x4.fbs";
include "./datatypes/material.fbs";
include "./datatypes/quaternion.fbs";
include "./datatypes/range1d.fbs";
include "./datatypes/range2d.fbs";
Expand Down
18 changes: 0 additions & 18 deletions crates/store/re_types/definitions/rerun/datatypes/material.fbs

This file was deleted.

33 changes: 17 additions & 16 deletions crates/store/re_types/src/archetypes/mesh3d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/store/re_types/src/components/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions crates/store/re_types/src/components/albedo_factor_ext.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use crate::datatypes::Rgba32;

use super::AlbedoFactor;

impl Default for AlbedoFactor {
#[inline]
fn default() -> Self {
Self(Rgba32::WHITE)
}
}
11 changes: 0 additions & 11 deletions crates/store/re_types/src/components/material_ext.rs

This file was deleted.

Loading
Loading