Skip to content

Conversation

j9liu
Copy link
Contributor

@j9liu j9liu commented Jun 11, 2025

Description

This PR is in support for #1685. This generalizes access of voxel property attributes regardless of accessor structure (because that's all handled by AccessorView under the hood). It also enable would enable non-uint8/float variables to be passed to the data textures.

Summary:

  • Adds FCesiumPropertyAttribute and FCesiumPropertyAttributeProperty
  • Adds BlueprintLibrary functions to retrieve values from those properties
  • Adds arrays of FCesiumPropertyAttribute to FCesiumPrimitiveMetadata. See this comment for justification on this approach.
  • Deprecates FCesiumPrimitiveMetadataBlueprintLibrary::GetPropertyAttributeIndices. This wasn't doing anything helpful to begin with 😓
  • Introduces various style fixes in the other metadata files.
  • Adds GetInteger64 for FCesiumPropertyTextureProperty. Although int64's aren't directly supported, this enables uint32 properties to be losslessly retrieved.

Issue number or link

Partially addresses #1689, but not fully.

Author checklist

  • I have submitted a Contributor License Agreement (only needed once).
  • I have done a full self-review of my code.
  • I have updated CHANGES.md with a short summary of my change (for user-facing changes).
  • I have added or updated unit tests to ensure consistent code coverage as necessary.
  • I have updated the documentation as necessary.

Testing plan

This is difficult because there's no good way to implement property attribute picking (how would you pick a single vertex from a model?), and I didn't want to increase the scope of this to property attribute styling. I hope the unit tests can inspire enough confidence :')

@@ -26,7 +26,7 @@ void FCesiumPropertyTablePropertySpec::Define() {
UCesiumPropertyTablePropertyBlueprintLibrary::
GetPropertyTablePropertyStatus(property),
ECesiumPropertyTablePropertyStatus::ErrorInvalidProperty);
TestEqual<int64>(
TestEqual<int64_t>(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This diff is large, but I basically swept for int64 -> int64_t, since I remember int64 having a dubious definition on some platforms.

Additionally, I switched out static_cast<int64_t>() for int64_t() in accordance with the cesium-native style guide:

Use constructor notation for very safe integer conversions (where the range is checked) rather than static_cast.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cross-link to the related bug we had awhile back:
#1468 (comment)

@j9liu j9liu marked this pull request as ready for review June 11, 2025 19:49
@j9liu j9liu added this to the August 2025 Release milestone Jun 30, 2025
@j9liu j9liu changed the base branch from main to farewell-5.3 July 3, 2025 14:23
Base automatically changed from farewell-5.3 to main July 3, 2025 14:54
Copy link
Member

@kring kring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I just have one small comment.

@j9liu
Copy link
Contributor Author

j9liu commented Jul 30, 2025

Thanks @kring for the review! This is ready for another look.

@kring
Copy link
Member

kring commented Jul 30, 2025

Thanks @j9liu!

@kring kring merged commit cb62131 into main Jul 30, 2025
41 of 43 checks passed
@kring kring deleted the property-attributes branch July 30, 2025 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants