Realized you probably what the layout position from mesh point coordinates too. I made an old post about it but search isn’t cooperating.
You’d start with the position from the json, then using the original sprite’s position and size you convert to a layout position. The third action is if the original sprite had any rotation.
Sprite2: set position to JSON.Get("w.mesh.points.0.0.x"), JSON.Get("w.mesh.points.0.0.y")
Sprite2: set position to (self.x-0.5)*sprite.width+sprite.x, (self.y-0.5)*sprite.height+sprite.y
Sprite2: set position to (self.x-sprite.x)*cos(sprite.angle)-(self.y-sprite.y)*sin(sprite.angle)+sprite.x, (self.x-sprite.x)*sin(sprite.angle)+(self.y-sprite.y)*cos(sprite.angle)+sprite.y
Anyways hope that helps.
Edit:
Forgot to talk about the 0.5 part in the formulas. That would be the origin position of the sprite. 0.5,0.5 for center, and 0,0 for top left.
Edit2:
For zelevation too it would be:
Sprite2: set zelevation to JSON.Get("w.mesh.points.0.0.z")+sprite.zelevation