Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-18 10:35:10 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-18 10:40:52 +0300
commit987d1df57159afd57f33d7e58681be2fcdebda16 (patch)
treef782562c40bc1bf3fe23a455779f7e30d4cd8559 /source/blender/makesdna/DNA_screen_types.h
parent8faa59441371311a435b80487fe81eb60ea2e4fe (diff)
Tool System: store the active tool in ScrArea
Without this we need to have the context to get the (space_type, mode) args for an active tool lookup. For event handling & poll its more convenient to have direct access.
Diffstat (limited to 'source/blender/makesdna/DNA_screen_types.h')
-rw-r--r--source/blender/makesdna/DNA_screen_types.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index 395fcddb861..1f14bb58e78 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -248,6 +248,12 @@ enum GlobalAreaFlag {
GLOBAL_AREA_IS_HIDDEN = (1 << 0),
};
+typedef struct ScrArea_Runtime {
+ struct bToolRef *tool;
+ char is_tool_set;
+ char _pad0[7];
+} ScrArea_Runtime;
+
typedef struct ScrArea {
struct ScrArea *next, *prev;
@@ -288,6 +294,8 @@ typedef struct ScrArea {
ListBase handlers; /* wmEventHandler */
ListBase actionzones; /* AZone */
+
+ ScrArea_Runtime runtime;
} ScrArea;
typedef struct ARegion {