import maya.cmds from AL import usdmaya cmds.file(new=True, force=True) ret = cmds.loadPlugin('AL_USDMayaPlugin') path = r'/primitive_world.usda' cmds.AL_usdmaya_ProxyShapeImport(file=path, name='world', connectToTime=True, unloaded=True) stageCache = usdmaya.StageCache.Get() stage = stageCache.GetAllStages()[0] sessionLayer = stage.GetSessionLayer() stage.SetEditTarget(sessionLayer) cmds.AL_usdmaya_TranslatePrim(forceImport=True, importPaths='/root/sphere', proxy='world') items = ['sphere.vtx[264:266]', 'sphere.vtx[284:286]', 'sphere.vtx[303:307]', 'sphere.vtx[323:327]'] cmds.move(0, 0.25, 0, items, relative=True) cmds.AL_usdmaya_TranslatePrim(teardownPaths='/root/sphere', proxy='world') # second edit cmds.AL_usdmaya_TranslatePrim(forceImport=True, importPaths='/root/sphere', proxy='world') items2 = ['sphere.vtx[121]', 'sphere.vtx[140:141]', 'sphere.vtx[160:162]', 'sphere.vtx[178:181]'] cmds.move(0.25, 0, 0, items2, relative=True) # Observe the sphere edits here in the Maya viewport, then run the next line to see them disappear cmds.AL_usdmaya_TranslatePrim(teardownPaths='/root/sphere', proxy='world')