Set Georeference Coordinates via Python

I am making an extension that asks the user for a location and uses google maps api to get the coordinates of that location and set the georeference origin coordinates to those coordinates. I am able to get a reference to my georeference that is in the stage, however I cannot find a method in the source code that allows me to change the latitude and longitude attributes. I found the method, “CreateGeoreferenceOriginLongitudeAttr()” but the parameters aren’t very clear and the body of the method seems to be compiled so I have no idea what it is doing. Would anyone happen to know the best way of accomplishing this?

Hi @dawalka99 - does this work?

from cesium.usd.plugins.CesiumUsdSchemas import (
    Georeference as CesiumGeoreference,
)

cesium_georeference = CesiumGeoreference.Get(stage, prim_path)
cesium_georeference.GetGeoreferenceOriginLongitudeAttr().Set(longitude)
cesium_georeference.GetGeoreferenceOriginLatitudeAttr().Set(latitude)
cesium_georeference.GetGeoreferenceOriginHeightAttr().Set(height)

Alternatively, this should work too:

prim.GetAttribute("cesium:georeferenceOrigin:longitude").Set(longitude)
prim.GetAttribute("cesium:georeferenceOrigin:latitude").Set(latitude)
prim.GetAttribute("cesium:georeferenceOrigin:height").Set(height)