Forum

Author Topic: Difference between "reference.enabled" & "reference.location_enabled" for camera  (Read 4195 times)

ankit108

  • Newbie
  • *
  • Posts: 17
    • View Profile
Hello All,
In the latest Python API documentation of Agisoft Metashape,
for Metashape.Camera instance, and Class Reference of it, there are two separate parameters, named "enabled" and "location_enabled".
The description in the documentation for both are same.

So, I tested it on a sample project.

Code: [Select]
camera = Metashape.app.document.chunk.cameras[0]

print(camera.reference.enabled)  #Prints True
print(camera.reference.location_enabled)  #Prints True

camera.reference.enabled = False
print(camera.reference.enabled)  #Prints False
print(camera.reference.location_enabled)  #Prints False

camera.reference.location_enabled = True
print(camera.reference.enabled)  #Prints True
print(camera.reference.location_enabled)  #Prints True

Both of it do the same thing, i.e. tick or untick the particular camera in the Reference Pane if the reference data of the same are available.

Can anyone help me in understanding the difference??

Rafes

  • Newbie
  • *
  • Posts: 8
    • View Profile
Thank you for testing! The docs should be updated to avoid confusion when debugging on the user side.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15067
    • View Profile
Hello!

camera.reference.location_enabled has been added together with camera.reference.rotation_enabled method, when the possibility to check on camera orientation angles separately from the location coordinates has been implemented. But camera.reference.enabled has not been removed from API to avoid old scripts compatibility issues.
Best regards,
Alexey Pasumansky,
Agisoft LLC