Forum

Author Topic: How convert Marker.projection to Marker.position or Marker.reference.location  (Read 1422 times)

koriel-angelswing

  • Newbie
  • *
  • Posts: 22
    • View Profile
I am trying to mimicking the GUI's feature, with which if I add the marker on the image, on the left sidebar, I can see the reference location (e.g., Northing Easting Z).

How can I implement this with Python API?

I want to convert image's local x, y coordinate to chunk position or reference location.

koriel-angelswing

  • Newbie
  • *
  • Posts: 22
    • View Profile
Replying to myself

This can be done by

Code: [Select]
position = camera.unproject(Vector((x, y)))
chunk.addMarker(position)
location = chunk.markers[-1].reference.location
« Last Edit: July 15, 2020, 08:43:05 AM by koriel-angelswing »