Closed tin2tin closed 6 years ago
I made some changes. Does it work on your side?
The script was sometimes failing to read the strip image's dimensions (strip.element[0].img_width
and strip.element[0].img_height
). I could only consistently get it to read them for the first loaded strip after clearing the sequencer. Testing in the VSE, I ran into two overlapping problems:
orig_width
and orig_height
set to 0
, and only set those values to match the original image dimensions after a render. The default 0 x 0
dimensions are the immediate cause of the divide by zero error.loaded_scale_img
. This caused subsequent image loads to point back to the same stored frame_current
each call.Viewing the image in a VSE area with view set to Image Preview seems to update those dimensions. My last commit tries to make sure the image strip is loaded in the correct spot and the playhead moves to that strip. That triggered the dimensions update for me.
I'm still assuming that a VSE preview area is open and that the image strip loads in a visible channel.
I'm often getting this error, but occasionally it works okay. I can't seem to find the pattern. Win 8. Blender 2.79b.
[EDIT: It seems to be causing that error if the play-head isn't at the first frame of the sequencer]