Hey there,
Every time i run below code its prompting “Base usd file have been changed, please fetch changes.”
Sample Code:
def _save_es_codes(self, usd_file: str, mid_point: UtmPoint):
context = omni.usd.get_context()
context.open_stage(usd_file)
stage = context.get_stage()
scenario = stage.GetPrimAtPath('/Scenario')
if scenario is not None and scenario.IsValid():
epsg_code_prim = scenario.CreateAttribute("sim:EPSGCode", Sdf.ValueTypeNames.Int)
epsg_code_prim.Set(mid_point.epsg_code)
midpoint_x_prim = scenario.CreateAttribute("sim:midpoint_x", Sdf.ValueTypeNames.Double)
midpoint_x_prim.Set(mid_point.x)
midpoint_y_prim = scenario.CreateAttribute("sim:midpoint_y", Sdf.ValueTypeNames.Double)
midpoint_y_prim.Set(mid_point.y)
stage.Save()
stage.GetRootLayer().Export(usd_file)
Is there way to fetch USD files automatically in the background without prompting message??
Thanks,