Blender V4.3
workspace_listen.cc File Reference
#include "BKE_context.hh"
#include "ED_screen.hh"
#include "ED_viewer_path.hh"
#include "WM_api.hh"

Go to the source code of this file.

Functions

static void validate_viewer_paths (bContext &C, WorkSpace &workspace)
 
void ED_workspace_do_listen (bContext *C, const wmNotifier *)
 

Function Documentation

◆ ED_workspace_do_listen()

void ED_workspace_do_listen ( bContext * C,
const wmNotifier * note )

Definition at line 40 of file workspace_listen.cc.

References CTX_wm_workspace(), and validate_viewer_paths().

Referenced by wm_event_do_notifiers().

◆ validate_viewer_paths()

static void validate_viewer_paths ( bContext & C,
WorkSpace & workspace )
static

Checks if the viewer path stored in the workspace is still active and resets it if not. The viewer path stored in the workspace is the ground truth for other editors, so it should be updated before other editors look at it.

Definition at line 17 of file workspace_listen.cc.

References BKE_viewer_path_clear(), BLI_listbase_is_empty(), NC_VIEWER_PATH, ViewerPath::path, WorkSpace::viewer_path, and WM_event_add_notifier().

Referenced by ED_workspace_do_listen().