Storypencil addon "Edit" and "Back to VSE" buttons problem with time #104901

Open
opened 2023-09-20 10:34:28 +02:00 by JigenMal · 5 comments

System Information
Operating system: Windows-10-10.0.22621-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 536.99

Blender Version
Broken: version: 3.6.1, branch: blender-v3.6-release, commit date: 2023-07-17 12:50, hash: 8bda729ef4dc
Worked: (newest version of Blender that worked as expected)

Short description of error
Storypencil addon "Edit" and "Back to VSE" buttons and red/green markers don't work correctly when a strip has a Time Speed Factor different than 1

Exact steps for others to reproduce the error

  • Open 2D animation default scene
  • Use "setup storyboard session" to setup a new edit scene with a strip
  • pull forward the start of the strip and backward the end of the strip
  • select the strip, position the timeline cursor in some point in the middle and press "Edit" button
  • you find youself in the selected scene, with correct green and red markerd and in the corresponding frame position
  • go back to VSE with the button in the dope sheet
  • now in the strip properties, under "Time" section, change "Speed factor" from 1 to 0.25 (or other smaller number)
  • the strip is now more long, because of slow motion.
  • position the cursor approximately in the same place as before, in the middle of the strip
  • press "edit" and now the green and red markers are moved in a wrong position and the cursor isn't in the corresponding frame
**System Information** Operating system: Windows-10-10.0.22621-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 4090/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 536.99 **Blender Version** Broken: version: 3.6.1, branch: blender-v3.6-release, commit date: 2023-07-17 12:50, hash: `8bda729ef4dc` Worked: (newest version of Blender that worked as expected) **Short description of error** Storypencil addon "Edit" and "Back to VSE" buttons and red/green markers don't work correctly when a strip has a Time Speed Factor different than 1 **Exact steps for others to reproduce the error** - Open 2D animation default scene - Use "setup storyboard session" to setup a new edit scene with a strip - pull forward the start of the strip and backward the end of the strip - select the strip, position the timeline cursor in some point in the middle and press "Edit" button - you find youself in the selected scene, with correct green and red markerd and in the corresponding frame position - go back to VSE with the button in the dope sheet - now in the strip properties, under "Time" section, change "Speed factor" from 1 to 0.25 (or other smaller number) - the strip is now more long, because of slow motion. - position the cursor approximately in the same place as before, in the middle of the strip - press "edit" and now the green and red markers are moved in a wrong position and the cursor isn't in the corresponding frame
JigenMal added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2023-09-20 10:34:28 +02:00
Member

Thanks for the report. I can confirm.
cc @antoniov

Thanks for the report. I can confirm. cc @antoniov
Pratik Borhade added
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-09-27 07:55:44 +02:00
Author

If it can be useful, for now I've created a workaround with a custom made addon that adds a new "Edit" button that finds IN and OUT markers with this code:

shot_in = strip.frame_offset_start * strip.speed_factor
shot_out = shot_in + round(strip.frame_final_duration*strip.speed_factor) - 1

instead of the original code found in "dopesheet_overlay.py" line 53:
shot_in = strip.scene.frame_start + strip.frame_offset_start
shot_out = shot_in + strip.frame_final_duration - 1

and I find the timeline cursor frame in the edited scene with this code:
vse_frame = scene.frame_current
vse_frame_position = vse_frame - selected_strip.frame_final_start
vse_frame_ratio = vse_frame_position / (selected_strip.frame_final_duration)
edit_frame = shot_in + round(vse_frame_ratio*(shot_out-shot_in)) + 1
if edit_frame < selected_strip.scene.frame_start:
edit_frame = selected_strip.scene.frame_start
selected_strip.scene.frame_current = int(edit_frame)

instead of the original code in "synchro.py" line 788:
active_frame = cfra_prv - strip.frame_start + 1
if active_frame < strip.scene.frame_start:
active_frame = strip.scene.frame_start
context.window.scene.frame_current = int(active_frame)

I hope it can be useful to correct the addon code.

If it can be useful, for now I've created a workaround with a custom made addon that adds a new "Edit" button that finds IN and OUT markers with this code: shot_in = strip.frame_offset_start * strip.speed_factor shot_out = shot_in + round(strip.frame_final_duration*strip.speed_factor) - 1 instead of the original code found in "dopesheet_overlay.py" line 53: shot_in = strip.scene.frame_start + strip.frame_offset_start shot_out = shot_in + strip.frame_final_duration - 1 and I find the timeline cursor frame in the edited scene with this code: vse_frame = scene.frame_current vse_frame_position = vse_frame - selected_strip.frame_final_start vse_frame_ratio = vse_frame_position / (selected_strip.frame_final_duration) edit_frame = shot_in + round(vse_frame_ratio*(shot_out-shot_in)) + 1 if edit_frame < selected_strip.scene.frame_start: edit_frame = selected_strip.scene.frame_start selected_strip.scene.frame_current = int(edit_frame) instead of the original code in "synchro.py" line 788: active_frame = cfra_prv - strip.frame_start + 1 if active_frame < strip.scene.frame_start: active_frame = strip.scene.frame_start context.window.scene.frame_current = int(active_frame) I hope it can be useful to correct the addon code.

Thanks for looking at this issue. Could you create a PR so artists can test your changes?

Thanks for looking at this issue. Could you create a PR so artists can test your changes?
Author

Sorry @antoniov, I don't know what you mean by "create a PR", could you explain me?

Sorry @antoniov, I don't know what you mean by "create a PR", could you explain me?

A PR is "Pull Request". Basically, it's a way to include the changes in a file tat can be tested and later merged to the main code.

You need to configure GIt to do that. You can find more info here:

https://wiki.blender.org/wiki/Process/Contributing_Code
https://wiki.blender.org/wiki/Tools/Pull_Requests

For add-ons is more simple, but the rules are the same.

If you don't know how to do it, then paste a zip with the add-on with your modifications and I can create the PR.

A PR is "Pull Request". Basically, it's a way to include the changes in a file tat can be tested and later merged to the main code. You need to configure GIt to do that. You can find more info here: https://wiki.blender.org/wiki/Process/Contributing_Code https://wiki.blender.org/wiki/Tools/Pull_Requests For add-ons is more simple, but the rules are the same. If you don't know how to do it, then paste a zip with the add-on with your modifications and I can create the PR.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#104901
No description provided.