I want to write a function, which will be called after changing the workspace.

I thought, that i can find workspace change event in bpy.app.handlers, but it looks like where is no such handler here… What can I do?

enter image description here

  • $\begingroup$ Related blender.stackexchange.com/questions/19668/… where depsgraph update is akin to old scene update. $\endgroup$
    – batFINGER
    Apr 2 '19 at 16:41
  • $\begingroup$ @batFINGER unfortunately, changing workspace doesn't cause depsgraph update event... $\endgroup$
    – Crantisz
    Apr 3 '19 at 7:49
  • $\begingroup$ Correct, the idea is it runs frequently enough to flag it. Similarly for A property with a getter fired on a UI draw or a modal timer. The property getter would be ideal way to fire when saved value has changed. blender.stackexchange.com/questions/126458/… $\endgroup$
    – batFINGER
    Apr 3 '19 at 10:34
  • $\begingroup$ Out of interest... What do you have in mind here?, are you going to keep a history of visited workspaces? Could go whole hog on this question and fudge an on context change event comparing current, since context changes accordingly without which member being flagged, the context is what it is., against a repr value copy of all (or selected props to watch)... $\endgroup$
    – batFINGER
    Apr 3 '19 at 10:59
  • $\begingroup$ Of course, I can make a timer to check this every 0.1sec, but I think there is more performance method $\endgroup$
    – Crantisz
    Apr 3 '19 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.