Author Topic: Lua Properties: additional property request  (Read 728 times)

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1736
Lua Properties: additional property request
« on: November 28, 2017, 11:21:23 PM »
Using Lua property one can 'detect' changes in the shutter, aperture and ISO.

Could we also add a property to detect changes to focus distance and focal length?

Cheers

Garry

dmilligan

  • Developer
  • Hero Member
  • *****
  • Posts: 3217
  • 60Da / 1100D / EOSM
Re: Lua Properties: additional property request
« Reply #1 on: November 29, 2017, 02:27:30 AM »
You mean the Canon prop handlers? We can’t add new Canon properties, Lua simply exposes a way for scrips to register callbacks for existing Canon properties. If there’s already a Canon property that fires when the focus distance or focal length changes, you can use those (I believe there are but there may be limitations). If not, a method for doing that will have to be developed in the ML core (possibly requiring some reverse engineering, see the thread about MPU/lens communication) and exposed to Lua (probably as an event).

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1736
Re: Lua Properties: additional property request
« Reply #2 on: November 29, 2017, 07:44:31 AM »
@dmilligan

Understood and not a priority.

I have already solved it by explicitly tracking and checking aperture, focus distance and focal length.

My use is in my focus bar script, as unless the above 'properties' change, there is no point updating the focus bar, i.e. wasted Lua cpu action.

Until I did the above, my script constantly was updating, i.e. every time my shoot_task event ran.

I just thought the property approach would be 'better'.

Thanks for the education.

Cheers

Garry