Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

### ? - ?

##### Additions :tada:

- Replaced the "Auto Fill" button on `UCesiumFeaturesMetadataComponent` with "Add Properties". This allows metadata properties and feature ID sets to be selectively added to the component, rather than adding them all in bulk.

##### Fixes :wrench:

- Fixed a bug that prevented `UCesiumPrimitiveFeaturesBlueprintLibrary::GetPrimitiveFeatures` from retrieving the features of instanced meshes.
Expand Down
24 changes: 22 additions & 2 deletions Source/CesiumEditor/Private/CesiumEditor.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright 2020-2024 CesiumGS, Inc. and Contributors
// Copyright 2020-2025 CesiumGS, Inc. and Contributors

#include "CesiumEditor.h"
#include "Cesium3DTilesSelection/Tileset.h"
#include "Cesium3DTileset.h"
#include "Cesium3DTilesetCustomization.h"
#include "CesiumCartographicPolygon.h"
#include "CesiumCommands.h"
#include "CesiumFeaturesMetadataViewer.h"
#include "CesiumGeoreferenceCustomization.h"
#include "CesiumGlobeAnchorCustomization.h"
#include "CesiumIonPanel.h"
Expand All @@ -29,6 +29,10 @@
#include "Styling/SlateStyle.h"
#include "Styling/SlateStyleRegistry.h"

THIRD_PARTY_INCLUDES_START
#include <Cesium3DTilesSelection/Tileset.h>
THIRD_PARTY_INCLUDES_END

constexpr int MaximumOverlaysWithDefaultMaterial = 3;

IMPLEMENT_MODULE(FCesiumEditorModule, CesiumEditor)
Expand Down Expand Up @@ -364,6 +368,11 @@ void FCesiumEditorModule::StartupModule() {
OnCesiumRasterOverlayIonTroubleshooting.AddRaw(
this,
&FCesiumEditorModule::OnRasterOverlayIonTroubleshooting);

this->_featuresMetadataAddPropertiesSubscription =
OnCesiumFeaturesMetadataAddProperties.AddRaw(
this,
&FCesiumEditorModule::OnFeaturesMetadataAddProperties);
}

void FCesiumEditorModule::ShutdownModule() {
Expand All @@ -386,6 +395,12 @@ void FCesiumEditorModule::ShutdownModule() {
this->_rasterOverlayIonTroubleshootingSubscription);
this->_rasterOverlayIonTroubleshootingSubscription.Reset();
}
if (this->_featuresMetadataAddPropertiesSubscription.IsValid()) {
OnCesiumFeaturesMetadataAddProperties.Remove(
this->_featuresMetadataAddPropertiesSubscription);
this->_featuresMetadataAddPropertiesSubscription.Reset();
}

FGlobalTabmanager::Get()->UnregisterNomadTabSpawner(TEXT("Cesium"));
FCesiumCommands::Unregister();
IModuleInterface::ShutdownModule();
Expand Down Expand Up @@ -477,6 +492,11 @@ void FCesiumEditorModule::OnRasterOverlayIonTroubleshooting(
CesiumIonTokenTroubleshooting::Open(pOverlay, false);
}

void FCesiumEditorModule::OnFeaturesMetadataAddProperties(
ACesium3DTileset* pTileset) {
CesiumFeaturesMetadataViewer::Open(pTileset);
}

TSharedPtr<FSlateStyleSet> FCesiumEditorModule::GetStyle() { return StyleSet; }

const FName& FCesiumEditorModule::GetStyleSetName() {
Expand Down
4 changes: 3 additions & 1 deletion Source/CesiumEditor/Private/CesiumEditor.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2020-2024 CesiumGS, Inc. and Contributors
// Copyright 2020-2025 CesiumGS, Inc. and Contributors

#pragma once

Expand Down Expand Up @@ -110,12 +110,14 @@ class FCesiumEditorModule : public IModuleInterface {
const FCesiumRasterOverlayLoadFailureDetails& details);
void OnTilesetIonTroubleshooting(ACesium3DTileset* pTileset);
void OnRasterOverlayIonTroubleshooting(UCesiumRasterOverlay* pOverlay);
void OnFeaturesMetadataAddProperties(ACesium3DTileset* pTileset);

CesiumIonServerManager _serverManager;
FDelegateHandle _tilesetLoadFailureSubscription;
FDelegateHandle _rasterOverlayLoadFailureSubscription;
FDelegateHandle _tilesetIonTroubleshootingSubscription;
FDelegateHandle _rasterOverlayIonTroubleshootingSubscription;
FDelegateHandle _featuresMetadataAddPropertiesSubscription;

CesiumEditorSubLevelMutex _subLevelMutex;
CesiumEditorReparentHandler _reparentHandler;
Expand Down
Loading