mapeditor/tiled

Do you want to work on this issue?

You can request for a bounty in order to promote it!

No access to polyline coordinates via editor #3285

novialriptide posted onGitHub

image

It is currently not possible to access the polyline coordinates via the Tiled app, I think this should be one of the things shown in the Properties tab on the left. Is there a solution to this problem?


The only way to directly access polyline coordinates at the moment is through the scripting API. To have these positions available in the UI was mentioned before (https://github.com/mapeditor/tiled/issues/1487#issuecomment-514304910), but so far no solution has been implemented.

Through scripting one could do:

> tiled.activeAsset.selectedObjects[0].polygon.map(p => "(" + p.x + ", " + p.y + ")")
$0 = (0, 0),(-82, 87),(76, 152),(109, -9)

For modifications it has to be assigned back:

let object = tiled.activeAsset.selectedObjects[0]
let polygon = object.polygon
polygon[1].x = 30
object.polygon = polygon
posted by bjorn about 3 years ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests