Moving GPencil frames in time with python causes viewport issues #83590

Closed
opened 2020-12-09 14:17:56 +01:00 by Tom Viguier · 7 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 418.96

Blender Version
Broken: version: 2.91.0, branch: master, commit date: 2020-11-25 08:34, hash: 0f45cab862
Worked: (newest version of Blender that worked as expected)

Short description of error
While changing Grease Pencil frames 'frame_number' attribute, the viewport doesn't update well, when switching their order (needs manual action to complete that refresh/sort)

My guess is that the frames indices have to be recalculated because displaying frames- [x] before frames- [x] is confusing Blender. See here : previous bug report

Exact steps for others to reproduce the error

Open the attached .blend file,
GP_Dopesheet_bug.blend

First take a look at the two frames at time 1 an 10 (happy and angry monkey)
select the monkey and run the short script,

it gets the frames at time 1 and 10 (called frame_1 and frame_10)
and switch the frames order :

  frame_1.frame_number = 10
  frame_10.frame_number = 1

at first, it seems like nothing changed, (frame_1 displayed from time 1 to 9, frame_10 from 10)

manually click on a frame symbol in the grease pencil dopesheet,
now it looks like frame_10 is displayed all along the timeline

manually move a frame symbol along the timeline (you can even replace it at time 1 )
now everything is as expected, (frame_10 displayed from time 1 to 9, frame_1 from 10)

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 970/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 418.96 **Blender Version** Broken: version: 2.91.0, branch: master, commit date: 2020-11-25 08:34, hash: `0f45cab862` Worked: (newest version of Blender that worked as expected) **Short description of error** While changing Grease Pencil frames 'frame_number' attribute, the viewport doesn't update well, when switching their order (needs manual action to complete that refresh/sort) My guess is that the frames indices have to be recalculated because displaying frames- [x] before frames- [x] is confusing Blender. See here : [previous bug report ](https://developer.blender.org/rBba26adee0c5caa6d4f3ffbda9c7038e807e3f9d2) **Exact steps for others to reproduce the error** Open the attached .blend file, [GP_Dopesheet_bug.blend](https://archive.blender.org/developer/F9497137/GP_Dopesheet_bug.blend) First take a look at the two frames at time 1 an 10 (happy and angry monkey) select the monkey and run the short script, it gets the frames at time 1 and 10 (called frame_1 and frame_10) and switch the frames order : ``` frame_1.frame_number = 10 frame_10.frame_number = 1 ``` at first, it seems like nothing changed, (frame_1 displayed from time 1 to 9, frame_10 from 10) manually click on a frame symbol in the grease pencil dopesheet, now it looks like frame_10 is displayed all along the timeline manually move a frame symbol along the timeline (you can even replace it at time 1 ) now everything is as expected, (frame_10 displayed from time 1 to 9, frame_1 from 10)
Author

Added subscriber: @Tomreggae

Added subscriber: @Tomreggae
Author

This comment was removed by @Tomreggae

*This comment was removed by @Tomreggae*
Antonio Vazquez self-assigned this 2020-12-09 15:27:09 +01:00

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

The frame number is not designed to be used in this way. The correct way to do this is to replace the strokes or replace the entire frame, but not just change the frame number. There are many things that happen under the hood and they cannot be changed as easily as it seems.

The frame number is not designed to be used in this way. The correct way to do this is to replace the strokes or replace the entire frame, but not just change the frame number. There are many things that happen under the hood and they cannot be changed as easily as it seems.

Changed status from 'Confirmed' to: 'Archived'

Changed status from 'Confirmed' to: 'Archived'

Thanks for the report, but the issue reported here is a request for modified/improved behavior and not a bug in current behavior. Closing as this bug tracker is only for bugs and errors.

For user requests and feedback, please use other channels: https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests

For more information on why this isn't considered a bug, visit: https://wiki.blender.org/wiki/Reference/Not_a_bug

Thanks for the report, but the issue reported here is a request for modified/improved behavior and not a bug in current behavior. Closing as this bug tracker is only for bugs and errors. For user requests and feedback, please use other channels: https://wiki.blender.org/wiki/Communication/Contact#User_Feedback_and_Requests For more information on why this isn't considered a bug, visit: https://wiki.blender.org/wiki/Reference/Not_a_bug
Author

Thanks for your quick answer !
I 'll find another way !

Thanks for your quick answer ! I 'll find another way !
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 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#83590
No description provided.