@a1ex
As usual, I hope you can help.
I'm writing a new script and trying to use lens.focus.
I'm in LV but I get a console error saying lens.focus needs to run in LV.
Here is the area of the script that throws the error:
function set_focus(x)
lv.resume()
local current_x = lens.focus_distance
if x == current_x then return x end
if x > current_x then
while lens.focus_distance < x do lens.focus(1,2,true) end
while lens.focus_distance > x do lens.focus(-1,2,true) end
else
while lens.focus_distance > x do lens.focus(-1,2,true) end
while lens.focus_distance < x do lens.focus(1,2,true) end
end
return lens.focus.focus_distance -- final focus distance, ie may not be extactly x ;-)
end
I simply can't work out what's happening.
Am I missing something?
BTW I'm on a 5D3 with the latest Lua fix.
Cheers
Garry