Scene not changed when use Python in Pinned workspace #100165
Labels
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#100165
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Failed: Version 3.3.0 Beta 31/07/2022
Worked: Never, PIN is a new option in 3.3 version.
Using the add-on we have developed for storyboarding, when the scene is pinned to the workspace, the scene is not correct when is changed using python.
WorkspacePinned.mp4
The python code is very simple:
Added subscriber: @antoniov
Added subscribers: @JulianEisel, @mendio
Added subscriber: @OmarEmaraDev
Changed status from 'Needs Triage' to: 'Needs User Info'
I can't seem to replicate this myself. Does the target Workspace have a different pinned scene than
03_Scene
?I am testing with this file:
pinnedWorkspace.blend
What does this mean?
Are you able to reproduce the issue on the attached file? Because I can't seem to be able to.
No, I cannot...I guess this is related to some multi thread issue and depends on the file size and complexity and CPU speed.... a really hard bug to catch.
Could you share the file where you originally reproduced the bug?
I'm doing some debug and I have seen something weird.
My python code does this:
context.window.workspace = scene.storypencil_edit_workspace
After that line, both variables would contain the same, I mean, the right variable is a workspace and is assigned to the
context.workspace
, but doing a debug I can see the left variable is not updated as you can see in the image below stopped in the next line after the assign of the value.Is this normal? the question is why the variable is not updated because the code is working when is not pinned, so that means that the
context.window.workspace
update is delayed.How can I force to update that value?
Added subscriber: @storyvalk
It seems this is normal. Changing the workspace is a change of context, so it is intentionally delayed until all code that depends on the current context is executed.
This is done by adding a
ND_WORKSPACE_SET
notifier to the window, which is handled inwm_event_do_notifiers
, which execute automatically as part of the main loop and can't be invoked manually as far as I can see.So you can't force an update to that value. Why do you need it to take effect immediately?
About that, see D15614: Py Docs: Document delayed setting of UI data.
@OmarEmaraDev I need the instant update because the add-on is switching all the time back and forth between VSE scene and strip scene to draw the storyboard.... I will investigate alternatives. Anyway, it would be great to have a
context.windows.workspace.update()
for this type of situations as we have forview_layers
. I know that force the update is not the best, but in situations like this could be the best solution.The situation is a bit different for view layers. For them the update is just delayed for performance reasons. So enforcing an immediate update is fine. For workspaces (and other UI changes) it's delayed because it could corrupt context. IIRC switching workspaces immediately will just result in crashes in many cases.
Since this is getting documented as Julian pointed out, I would say this is handled.
But is the original issue you pointed out a manifestation of the issue you just described? Or is it different?
I all agree, we could consider this a
Known Issue
Changed status from 'Needs User Info' to: 'Archived'