{"action":"created","issue":{"url":"https://api.github.com/repos/Botmasher/blender-vse-customizations/issues/3","repository_url":"https://api.github.com/repos/Botmasher/blender-vse-customizations","labels_url":"https://api.github.com/repos/Botmasher/blender-vse-customizations/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/Botmasher/blender-vse-customizations/issues/3/comments","events_url":"https://api.github.com/repos/Botmasher/blender-vse-customizations/issues/3/events","html_url":"https://github.com/Botmasher/blender-vse-customizations/issues/3","id":358632430,"node_id":"MDU6SXNzdWUzNTg2MzI0MzA=","number":3,"title":"Pretty_img \"can't divide by zero\"-error when play-head isn't at first frame","user":{"login":"tin2tin","id":1322593,"node_id":"MDQ6VXNlcjEzMjI1OTM=","avatar_url":"https://avatars0.githubusercontent.com/u/1322593?v=4","gravatar_id":"","url":"https://api.github.com/users/tin2tin","html_url":"https://github.com/tin2tin","followers_url":"https://api.github.com/users/tin2tin/followers","following_url":"https://api.github.com/users/tin2tin/following{/other_user}","gists_url":"https://api.github.com/users/tin2tin/gists{/gist_id}","starred_url":"https://api.github.com/users/tin2tin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tin2tin/subscriptions","organizations_url":"https://api.github.com/users/tin2tin/orgs","repos_url":"https://api.github.com/users/tin2tin/repos","events_url":"https://api.github.com/users/tin2tin/events{/privacy}","received_events_url":"https://api.github.com/users/tin2tin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-10T13:50:54Z","updated_at":"2018-09-10T20:54:41Z","closed_at":"2018-09-10T20:27:36Z","author_association":"CONTRIBUTOR","body":"I'm often getting this error, but occasionally it works okay. I can't seem to find the pattern.\r\n![image](https://user-images.githubusercontent.com/1322593/45301346-110df900-b511-11e8-97a4-9ac6570ecea6.png)\r\nWin 8. Blender 2.79b.\r\n\r\n[EDIT: It seems to be causing that error if the play-head isn't at the first frame of the sequencer]"},"comment":{"url":"https://api.github.com/repos/Botmasher/blender-vse-customizations/issues/comments/420057536","html_url":"https://github.com/Botmasher/blender-vse-customizations/issues/3#issuecomment-420057536","issue_url":"https://api.github.com/repos/Botmasher/blender-vse-customizations/issues/3","id":420057536,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMDA1NzUzNg==","user":{"login":"Botmasher","id":10274089,"node_id":"MDQ6VXNlcjEwMjc0MDg5","avatar_url":"https://avatars1.githubusercontent.com/u/10274089?v=4","gravatar_id":"","url":"https://api.github.com/users/Botmasher","html_url":"https://github.com/Botmasher","followers_url":"https://api.github.com/users/Botmasher/followers","following_url":"https://api.github.com/users/Botmasher/following{/other_user}","gists_url":"https://api.github.com/users/Botmasher/gists{/gist_id}","starred_url":"https://api.github.com/users/Botmasher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Botmasher/subscriptions","organizations_url":"https://api.github.com/users/Botmasher/orgs","repos_url":"https://api.github.com/users/Botmasher/repos","events_url":"https://api.github.com/users/Botmasher/events{/privacy}","received_events_url":"https://api.github.com/users/Botmasher/received_events","type":"User","site_admin":false},"created_at":"2018-09-10T20:54:41Z","updated_at":"2018-09-10T20:54:41Z","author_association":"OWNER","body":"I made some changes. Does it work on your side?\r\n\r\nThe 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:\r\n1. Images load with an `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.\r\n2. The start frame for each loaded image was stored as a default arg in `loaded_scale_img`. This caused subsequent image loads to point back to the same stored `frame_current` each call.\r\n\r\nViewing 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.\r\n\r\nI'm still assuming that a VSE preview area is open and that the image strip loads in a visible channel."}}
{"actor":{"display_login":"Botmasher"}}