### Author Topic: Focus Bar Function for photographers and videographers  (Read 1784 times)

#### garry23

• Contributor
• Hero Member
• Posts: 1989
##### Focus Bar Function for photographers and videographers
« on: May 19, 2017, 09:26:03 AM »
If you have been following my scripting, you will know I've been trying to get a focus bar running; which looks like this (based on specific setting):

Thanks to help/hints from @A1ex and @dmilligan I have now got a (near) standalone focus_bar function, ie you can use it in your scripts.

The demo script, showing how to use the focus_bar function, is here: https://gist.github.com/pigeonhill/2c0ebbf59f0b57f272a808aed9562b71

Note: this version is 'nearly' standalone, ie you need to use one global variable and have one additional function.

A few things to note:
- I decided to keep the visualization of the focus field to a linear representation. I personally get more out of it this way.
- In addition to 'seeing' the focus field, and the fp and dofs, you can decide if you wish to see the near and far distance info shown below the bar
- For landscape photography, once the far dof is greater than 'infinity' the focus_bar distance reporting switches to total blur units (optical and diffraction in quadrature) at infinity for the far; and the dof distance based on the total infinity blur for the near dof
- Blur reporting at infinity is green if above the sensor limit (2xsensor pixels) and red below
- The multiplier allows you to see the focus field beyond the far dof
- A multiplier of -1 switches the focus_bar into dof mode. Note in all modes the focus_bar functions during Canon zoom. Hint: this mode may help portrait photographers or videographers looking to 'ensure' the focus field is 'right', ie use Canon zoom and focus on the eyes (say) and check the focus field
- A multiplier of 0 switches the focus_bar into fp mode, ie see the focus field from zero to the fp
- I think it 'best' to have ML diffraction aware on (diffraction impacted green dots showing dofs) and switch diffraction off in the focus_bar. This way you can see the impact of diffraction in the focus field. The focus field is black at unity blur (optical or with diffraction if selected)
- Unity blur is that set in ML

As usual I welcome feedback.

Cheers

Garry

#### garry23

• Contributor
• Hero Member
• Posts: 1989
##### Re: Focus Bar Function for photographers and videographers
« Reply #1 on: May 19, 2017, 04:29:13 PM »
I decided to bring the UI into line with the overall ML UI.

Here is what it now looks like

The focus bar script now acts as a great background running script. All you need to do is to configure the menu defaults you wish, ie script runs default = on or off.