Help with Lua event.post_shoot

Started by garry23, February 27, 2016, 08:25:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

garry23

Has anyone used the Lua post_shoot event handler?

I've tried both post and pre and can't seem to get them to pick up on an image capture. My fear is I'm using them wrong, but I don't trigger a runtime error.

Here's the relevant code:


event.post_shoot = function(arg)
if keymenu.submenu["Turn On/Off"].value == "On" then
b1 = lens.dof_far -- in mm
fp = lens.focal_distance -- in cm
c1 = b1 - (b1 - fp*10)*factor
started = true
return true
end
end


The above code runs OK inside an event.keypress handler.

dmilligan

They were never implemented in the ML core, only defined. They don't work at all.

You can use property.GUI_STATE:handler() to detect QR mode, which is pretty close.

garry23

David

Thanks  :)

I thought I was going mad :'(

As I get more understanding of Lua, I'm obviously pushing myself into areas where ML-Lua is not fully fit yet.

Thanks for your prompt feedback as usual - especially at the weekend as I sit down to watch the Six Nations  ;)

BTW have you any idea when the lens movement release will be pushed out. My next iteration is to write the bracketing script to run automatically, ie one button push.

Cheers

Garry