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

Remove decoy checkbox on "Enable Water Mask" #1591

Merged
merged 3 commits into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- Fixed a crash in `UCesiumIonServer` when running in a packaged build where tilesets are only created at runtime.
- Worked around a limitation in Unreal's `FMatrix` -> `FTransform` conversion that prevented models with a small scale factor (e.g., where vertex positions are expressed in millimeters) from rendering because their scale was treated as 0.0.
- Fixed a crash when calling `SampleHeightMostDetailed` blueprint function without a valid tileset.
- Removed duplicate "Enable Water Mask" checkbox on `Cesium3DTileset` resulting from EditCondition flag.

### v2.12.0 - 2025-01-02

Expand Down
13 changes: 9 additions & 4 deletions Source/CesiumRuntime/Private/Cesium3DTileset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ ACesium3DTileset::ACesium3DTileset()
this->Root = this->RootComponent;

PlatformName = UGameplayStatics::GetPlatformName();

#if WITH_EDITOR
bIsMac = PlatformName == TEXT("Mac");
#endif
}

ACesium3DTileset::~ACesium3DTileset() { this->DestroyTileset(); }
Expand Down Expand Up @@ -2472,6 +2468,15 @@ void ACesium3DTileset::PostEditImport() {
// Recreate the tileset on Paste.
this->DestroyTileset();
}

bool ACesium3DTileset::CanEditChange(const FProperty* InProperty) const {
if (InProperty->GetFName() ==
GET_MEMBER_NAME_CHECKED(ACesium3DTileset, EnableWaterMask)) {
// Disable this option on Mac
return PlatformName != TEXT("Mac");
}
return true;
}
#endif

void ACesium3DTileset::BeginDestroy() {
Expand Down
9 changes: 2 additions & 7 deletions Source/CesiumRuntime/Public/Cesium3DTileset.h
Original file line number Diff line number Diff line change
Expand Up @@ -860,8 +860,7 @@ class CESIUMRUNTIME_API ACesium3DTileset : public AActor {
EditAnywhere,
BlueprintGetter = GetEnableWaterMask,
BlueprintSetter = SetEnableWaterMask,
Category = "Cesium|Rendering",
meta = (EditCondition = "!bIsMac"))
Category = "Cesium|Rendering")
bool EnableWaterMask = false;

/**
Expand Down Expand Up @@ -955,11 +954,6 @@ class CESIUMRUNTIME_API ACesium3DTileset : public AActor {
UPROPERTY()
FString PlatformName;

#if WITH_EDITORONLY_DATA
UPROPERTY()
bool bIsMac;
#endif

public:
UFUNCTION(BlueprintGetter, Category = "Cesium")
float GetLoadProgress() const { return LoadProgress; }
Expand Down Expand Up @@ -1155,6 +1149,7 @@ class CESIUMRUNTIME_API ACesium3DTileset : public AActor {
FPropertyChangedChainEvent& PropertyChangedChainEvent) override;
virtual void PostEditUndo() override;
virtual void PostEditImport() override;
virtual bool CanEditChange(const FProperty* InProperty) const override;
#endif

protected:
Expand Down
Loading