Skip to content

Commit

Permalink
Remove projectDefaultIonAccessToken and projectDefaultIonAccessToken …
Browse files Browse the repository at this point in the history
…from CesiumDataPrim
  • Loading branch information
lilleyse committed Feb 13, 2024
1 parent f3ed1be commit de2e3be
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 169 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### v0.18.0 - 2024-03-01

* **Breaking change:** removed deprecated properties `projectDefaultIonAccessToken` and `projectDefaultIonAccessToken` from `CesiumDataPrim`. `CesiumIonServerPrim` should be used instead.
* Added support for globe anchors on non-georeferenced tilesets.
* Fixed zooming to tileset extents when tileset prims have non identity transformation.
* Fixed crash when updating tilesets shader inputs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@ class ICesiumOmniverseCppTestsInterface:
def run_all_tests(self) -> None: ...
def set_up_tests(self, arg0: int) -> None: ...

def acquire_cesium_omniverse_tests_interface(
plugin_name: str = ..., library_path: str = ...
) -> ICesiumOmniverseCppTestsInterface: ...
def acquire_cesium_omniverse_tests_interface(plugin_name: str = ..., library_path: str = ...) -> ICesiumOmniverseCppTestsInterface: ...
def release_cesium_omniverse_tests_interface(arg0: ICesiumOmniverseCppTestsInterface) -> None: ...
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ICesiumOmniverseInterface:
def credits_start_next_frame(self) -> None: ...
def get_asset_token_troubleshooting_details(self, *args, **kwargs) -> Any: ...
def get_asset_troubleshooting_details(self, *args, **kwargs) -> Any: ...
def get_credits(self) -> List[Tuple[str, bool]]: ...
def get_credits(self) -> List[Tuple[str,bool]]: ...
def get_default_token_troubleshooting_details(self, *args, **kwargs) -> Any: ...
def get_render_statistics(self, *args, **kwargs) -> Any: ...
def get_server_path(self) -> str: ...
Expand Down Expand Up @@ -174,7 +174,5 @@ class Viewport:
width: float
def __init__(self) -> None: ...

def acquire_cesium_omniverse_interface(
plugin_name: str = ..., library_path: str = ...
) -> ICesiumOmniverseInterface: ...
def acquire_cesium_omniverse_interface(plugin_name: str = ..., library_path: str = ...) -> ICesiumOmniverseInterface: ...
def release_cesium_omniverse_interface(arg0: ICesiumOmniverseInterface) -> None: ...
7 changes: 0 additions & 7 deletions exts/cesium.omniverse/cesium/omniverse/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,10 +498,3 @@ def _setup_ion_server_prims(self):

data_prim: CesiumData = CesiumData.Get(stage, CESIUM_DATA_PRIM_PATH)
data_prim.GetSelectedIonServerRel().AddTarget(path)

# For backwards compatibility. Add access token from CesiumData prim.
defaultAccessToken = data_prim.GetProjectDefaultIonAccessTokenAttr().Get()
defaultAccessTokenId = data_prim.GetProjectDefaultIonAccessTokenIdAttr().Get()

prim.GetProjectDefaultIonAccessTokenAttr().Set(defaultAccessToken)
prim.GetProjectDefaultIonAccessTokenIdAttr().Set(defaultAccessTokenId)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ from typing import Any, ClassVar
import Boost.Python
import pxr.Usd
import pxr.UsdGeom

__MFB_FULL_PACKAGE_NAME: str

class Data(pxr.Usd.Typed):
Expand Down Expand Up @@ -31,10 +30,6 @@ class Data(pxr.Usd.Typed):
@classmethod
def CreateDebugTexturePoolInitialCapacityAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def CreateProjectDefaultIonAccessTokenAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def CreateProjectDefaultIonAccessTokenIdAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def CreateSelectedIonServerRel(cls, *args, **kwargs) -> Any: ...
@classmethod
def Define(cls, *args, **kwargs) -> Any: ...
Expand All @@ -61,10 +56,6 @@ class Data(pxr.Usd.Typed):
@classmethod
def GetDebugTexturePoolInitialCapacityAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def GetProjectDefaultIonAccessTokenAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def GetProjectDefaultIonAccessTokenIdAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def GetSchemaAttributeNames(cls, *args, **kwargs) -> Any: ...
@classmethod
def GetSelectedIonServerRel(cls, *args, **kwargs) -> Any: ...
Expand Down Expand Up @@ -471,8 +462,6 @@ class Tokens(Boost.Python.instance):
@property
def cesiumGeoreferenceOriginLongitude(self) -> Any: ...
@property
def cesiumHeight(self) -> Any: ...
@property
def cesiumInvertSelection(self) -> Any: ...
@property
def cesiumIonAccessToken(self) -> Any: ...
Expand Down Expand Up @@ -525,9 +514,11 @@ class Tokens(Boost.Python.instance):
@property
def cesiumSuspendUpdate(self) -> Any: ...
@property
def cesiumUrl(self) -> Any: ...
def cesiumTileHeight(self) -> Any: ...
@property
def cesiumWidth(self) -> Any: ...
def cesiumTileWidth(self) -> Any: ...
@property
def cesiumUrl(self) -> Any: ...
@property
def clip(self) -> Any: ...
@property
Expand All @@ -544,24 +535,22 @@ class WebMapServiceRasterOverlay(RasterOverlay):
@classmethod
def CreateBaseUrlAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def CreateHeightAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def CreateLayersAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def CreateMaximumLevelAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def CreateMinimumLevelAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def CreateWidthAttr(cls, *args, **kwargs) -> Any: ...
def CreateTileHeightAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def CreateTileWidthAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def Define(cls, *args, **kwargs) -> Any: ...
@classmethod
def Get(cls, *args, **kwargs) -> Any: ...
@classmethod
def GetBaseUrlAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def GetHeightAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def GetLayersAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def GetMaximumLevelAttr(cls, *args, **kwargs) -> Any: ...
Expand All @@ -570,7 +559,9 @@ class WebMapServiceRasterOverlay(RasterOverlay):
@classmethod
def GetSchemaAttributeNames(cls, *args, **kwargs) -> Any: ...
@classmethod
def GetWidthAttr(cls, *args, **kwargs) -> Any: ...
def GetTileHeightAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def GetTileWidthAttr(cls, *args, **kwargs) -> Any: ...
@classmethod
def _GetStaticTfType(cls, *args, **kwargs) -> Any: ...
@classmethod
Expand Down
16 changes: 0 additions & 16 deletions exts/cesium.usd.plugins/schemas/cesium_schemas.usda
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,6 @@ class CesiumDataPrim "CesiumDataPrim" (
doc = "The current ion Server prim used in the Cesium for Omniverse UI."
)

string cesium:projectDefaultIonAccessToken = "" (
customData = {
string apiName = "projectDefaultIonAccessToken"
}
displayName = "Project default ion Access Token"
doc = "DEPRECATED: A string representing the token for accessing Cesium ion assets. Moved to CesiumIonServerPrim. Will be removed in a future version."
)

string cesium:projectDefaultIonAccessTokenId = "" (
customData = {
string apiName = "projectDefaultIonAccessTokenId"
}
displayName = "Project default ion Access Token ID"
doc = "DEPRECATED: A string representing the token ID for accessing Cesium ion assets. Moved to CesiumIonServerPrim. Will be removed in a future version."
)

bool cesium:debug:disableMaterials = false (
customData = {
string apiName = "debugDisableMaterials"
Expand Down
10 changes: 1 addition & 9 deletions src/plugins/CesiumUsdSchemas/generatedSchema.usda.in
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ class CesiumDataPrim "CesiumDataPrim" (
displayName = "Texture Pool Initial Capacity"
doc = "Debug option that controls the initial capacity of the texture pool."
)
string cesium:projectDefaultIonAccessToken = "" (
displayName = "Project default ion Access Token"
doc = "DEPRECATED: A string representing the token for accessing Cesium ion assets. Moved to CesiumIonServerPrim. Will be removed in a future version."
)
string cesium:projectDefaultIonAccessTokenId = "" (
displayName = "Project default ion Access Token ID"
doc = "DEPRECATED: A string representing the token ID for accessing Cesium ion assets. Moved to CesiumIonServerPrim. Will be removed in a future version."
)
rel cesium:selectedIonServer (
displayName = "Selected ion Server context"
doc = "The current ion Server prim used in the Cesium for Omniverse UI."
Expand Down Expand Up @@ -343,7 +335,7 @@ class "CesiumRasterOverlayPrim" (
}

class CesiumIonRasterOverlayPrim "CesiumIonRasterOverlayPrim" (
doc = "Adds a prim for representing an Ion raster overlay."
doc = "Adds a prim for representing an ion raster overlay."
)
{
float cesium:alpha = 1 (
Expand Down
36 changes: 0 additions & 36 deletions src/plugins/CesiumUsdSchemas/src/CesiumUsdSchemas/data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,40 +80,6 @@ CesiumData::_GetTfType() const
return _GetStaticTfType();
}

UsdAttribute
CesiumData::GetProjectDefaultIonAccessTokenAttr() const
{
return GetPrim().GetAttribute(CesiumTokens->cesiumProjectDefaultIonAccessToken);
}

UsdAttribute
CesiumData::CreateProjectDefaultIonAccessTokenAttr(VtValue const &defaultValue, bool writeSparsely) const
{
return UsdSchemaBase::_CreateAttr(CesiumTokens->cesiumProjectDefaultIonAccessToken,
SdfValueTypeNames->String,
/* custom = */ false,
SdfVariabilityVarying,
defaultValue,
writeSparsely);
}

UsdAttribute
CesiumData::GetProjectDefaultIonAccessTokenIdAttr() const
{
return GetPrim().GetAttribute(CesiumTokens->cesiumProjectDefaultIonAccessTokenId);
}

UsdAttribute
CesiumData::CreateProjectDefaultIonAccessTokenIdAttr(VtValue const &defaultValue, bool writeSparsely) const
{
return UsdSchemaBase::_CreateAttr(CesiumTokens->cesiumProjectDefaultIonAccessTokenId,
SdfValueTypeNames->String,
/* custom = */ false,
SdfVariabilityVarying,
defaultValue,
writeSparsely);
}

UsdAttribute
CesiumData::GetDebugDisableMaterialsAttr() const
{
Expand Down Expand Up @@ -314,8 +280,6 @@ const TfTokenVector&
CesiumData::GetSchemaAttributeNames(bool includeInherited)
{
static TfTokenVector localNames = {
CesiumTokens->cesiumProjectDefaultIonAccessToken,
CesiumTokens->cesiumProjectDefaultIonAccessTokenId,
CesiumTokens->cesiumDebugDisableMaterials,
CesiumTokens->cesiumDebugDisableTextures,
CesiumTokens->cesiumDebugDisableGeometryPool,
Expand Down
44 changes: 0 additions & 44 deletions src/plugins/CesiumUsdSchemas/src/CesiumUsdSchemas/data.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,50 +125,6 @@ class CesiumData : public UsdTyped
CESIUMUSDSCHEMAS_API
const TfType &_GetTfType() const override;

public:
// --------------------------------------------------------------------- //
// PROJECTDEFAULTIONACCESSTOKEN
// --------------------------------------------------------------------- //
/// DEPRECATED: A string representing the token for accessing Cesium ion assets. Moved to CesiumIonServerPrim. Will be removed in a future version.
///
/// | ||
/// | -- | -- |
/// | Declaration | `string cesium:projectDefaultIonAccessToken = ""` |
/// | C++ Type | std::string |
/// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->String |
CESIUMUSDSCHEMAS_API
UsdAttribute GetProjectDefaultIonAccessTokenAttr() const;

/// See GetProjectDefaultIonAccessTokenAttr(), and also
/// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
/// If specified, author \p defaultValue as the attribute's default,
/// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
/// the default for \p writeSparsely is \c false.
CESIUMUSDSCHEMAS_API
UsdAttribute CreateProjectDefaultIonAccessTokenAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;

public:
// --------------------------------------------------------------------- //
// PROJECTDEFAULTIONACCESSTOKENID
// --------------------------------------------------------------------- //
/// DEPRECATED: A string representing the token ID for accessing Cesium ion assets. Moved to CesiumIonServerPrim. Will be removed in a future version.
///
/// | ||
/// | -- | -- |
/// | Declaration | `string cesium:projectDefaultIonAccessTokenId = ""` |
/// | C++ Type | std::string |
/// | \ref Usd_Datatypes "Usd Type" | SdfValueTypeNames->String |
CESIUMUSDSCHEMAS_API
UsdAttribute GetProjectDefaultIonAccessTokenIdAttr() const;

/// See GetProjectDefaultIonAccessTokenIdAttr(), and also
/// \ref Usd_Create_Or_Get_Property for when to use Get vs Create.
/// If specified, author \p defaultValue as the attribute's default,
/// sparsely (when it makes sense to do so) if \p writeSparsely is \c true -
/// the default for \p writeSparsely is \c false.
CESIUMUSDSCHEMAS_API
UsdAttribute CreateProjectDefaultIonAccessTokenIdAttr(VtValue const &defaultValue = VtValue(), bool writeSparsely=false) const;

public:
// --------------------------------------------------------------------- //
// DEBUGDISABLEMATERIALS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SdfAssetPath;

/// \class CesiumIonRasterOverlay
///
/// Adds a prim for representing an Ion raster overlay.
/// Adds a prim for representing an ion raster overlay.
///
class CesiumIonRasterOverlay : public CesiumRasterOverlay
{
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/CesiumUsdSchemas/src/CesiumUsdSchemas/tokens.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,11 @@ struct CesiumTokensType {
const TfToken cesiumPreloadSiblings;
/// \brief "cesium:projectDefaultIonAccessToken"
///
/// CesiumIonServer, CesiumData
/// CesiumIonServer
const TfToken cesiumProjectDefaultIonAccessToken;
/// \brief "cesium:projectDefaultIonAccessTokenId"
///
/// CesiumIonServer, CesiumData
/// CesiumIonServer
const TfToken cesiumProjectDefaultIonAccessTokenId;
/// \brief "cesium:rasterOverlayBinding"
///
Expand Down
28 changes: 0 additions & 28 deletions src/plugins/CesiumUsdSchemas/src/CesiumUsdSchemas/wrapData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@ namespace {
WRAP_CUSTOM;


static UsdAttribute
_CreateProjectDefaultIonAccessTokenAttr(CesiumData &self,
object defaultVal, bool writeSparsely) {
return self.CreateProjectDefaultIonAccessTokenAttr(
UsdPythonToSdfType(defaultVal, SdfValueTypeNames->String), writeSparsely);
}

static UsdAttribute
_CreateProjectDefaultIonAccessTokenIdAttr(CesiumData &self,
object defaultVal, bool writeSparsely) {
return self.CreateProjectDefaultIonAccessTokenIdAttr(
UsdPythonToSdfType(defaultVal, SdfValueTypeNames->String), writeSparsely);
}

static UsdAttribute
_CreateDebugDisableMaterialsAttr(CesiumData &self,
object defaultVal, bool writeSparsely) {
Expand Down Expand Up @@ -152,20 +138,6 @@ void wrapCesiumData()
.def(!self)


.def("GetProjectDefaultIonAccessTokenAttr",
&This::GetProjectDefaultIonAccessTokenAttr)
.def("CreateProjectDefaultIonAccessTokenAttr",
&_CreateProjectDefaultIonAccessTokenAttr,
(arg("defaultValue")=object(),
arg("writeSparsely")=false))

.def("GetProjectDefaultIonAccessTokenIdAttr",
&This::GetProjectDefaultIonAccessTokenIdAttr)
.def("CreateProjectDefaultIonAccessTokenIdAttr",
&_CreateProjectDefaultIonAccessTokenIdAttr,
(arg("defaultValue")=object(),
arg("writeSparsely")=false))

.def("GetDebugDisableMaterialsAttr",
&This::GetDebugDisableMaterialsAttr)
.def("CreateDebugDisableMaterialsAttr",
Expand Down

0 comments on commit de2e3be

Please sign in to comment.