Author Topic: Shutter property question  (Read 724 times)

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1740
Shutter property question
« on: February 11, 2018, 03:08:43 PM »
@a1ex

Hope you can throw some light on this need.

I wish to track the number of images taken and use this to deconflict conflicts in a Lua script.

I tried using the property handler, but get strange results. Here is the test code:

Code: [Select]
count = 0

function property.SHUTTER:handler(value)
count = count + 1
end

function dis(arg)
display.print(tostring(count), 200, 140, FONT.LARGE,COLOR.BLACK,COLOR.WHITE)
end

event.shoot_task = dis

Count doesn't correlate with shutter actions and doesn't seem to work if the shutter is triggered through Canon, rather, than say ML advanced bracketing.

Also, when it does trigger, I get strange counts, ie if three brackets taken, I get a count of 4 most of the time.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12236
  • Maintenance mode
Re: Shutter property question
« Reply #1 on: February 11, 2018, 03:33:00 PM »
The SHUTTER property refers to shutter speed, not to number of pictures taken.

You may be looking for dryos.shooting_card.file_number (a number between 1 and 9999 iirc, don't remember if 0 is also allowed).

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1740
Re: Shutter property question
« Reply #2 on: February 11, 2018, 03:54:42 PM »
@a1ex

You're a star  :D

That's the one I need  :)

Cheers

Garry

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1740
Re: Shutter property question
« Reply #3 on: February 12, 2018, 01:37:54 PM »
@a1ex

Another one of those 'strange response' questions.

Here is the simple script:

Code: [Select]
function property.LENS:handler(value)
beep()
end

When I have my 12-24 Sigma lens on I get the beep when I change focal length, as expected.

When I put on my Canon 70-200 F/4L I get nothing.

ML is reporting focal length ok, ie on the screen.

Any thoughts?

Cheers

Garry

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12236
  • Maintenance mode
Re: Shutter property question
« Reply #4 on: February 12, 2018, 01:41:35 PM »
Focal length is changed in PROP_LV_LENS.

PROP_LENS has raw_aperture_min/max (among many others), so I assume the first lens might have variable aperture (that changes while you zoom in) and the second might have constant aperture.

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1740
Re: Shutter property question
« Reply #5 on: February 12, 2018, 01:48:00 PM »
@a1ex

Yes that makes sense.

My script needs to dynamically change its algorithms as FL changes.

I know I could 'just' watch using, say, an event like shoot_task, but if there is another way that would be good to know.

Cheers

Garry