Magic Lantern Forum

Developing Magic Lantern => General Development => Topic started by: Marsu42 on June 16, 2013, 01:03:38 AM

Title: [ANSWERED] Prop for C.FnIV "AF and metering buttons"?
Post by: Marsu42 on June 16, 2013, 01:03:38 AM
Um, what's the prop again please to change how the camera starts af (by backbutton (=1) or half shutter (=6))? Is this the same across all models? Thanks!
Title: Re: Prop for C.FnIV "AF and metering buttons"?
Post by: a1ex on June 16, 2013, 04:41:53 PM
You have portable wrappers for this.

lens_setup_af(AF_ENABLE) or lens_setup_af(AF_DISABLE).

The first one will move AF to half-shutter (so when ML takes a pic, it will autofocus). The second moves AF to back-button, so when ML takes a pic, it will not autofocus.

After that, lens_cleanup_af() will restore your original setting.

You can also pass AF flags to lens_take_picture (second argument).

A little more low-level: assign_af_button_to_halfshutter, assign_af_button_to_star_button, restore_af_button_assignment.
Title: Re: Prop for C.FnIV "AF and metering buttons"?
Post by: Marsu42 on June 16, 2013, 05:06:58 PM
Thanks, I didn't realize it'd be that elaborate - though lens_cleanup_af() is just a wrapper for restore_af_button_assignment() so you could very well do without the wrapper :->
Title: Re: Prop for C.FnIV "AF and metering buttons"?
Post by: a1ex on June 16, 2013, 06:38:16 PM
The lens* ones only change things if you have autofocus. Reason: they don't slow down bracketing if you use MF.

Here it does sound a little faster if you bracket in MF, and that's the reason.