diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-30 19:45:25 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-30 19:45:25 +0300 |
commit | 128c8167afa003984b7446ad53915c79f872fdbf (patch) | |
tree | 383ddb7b187c35fb19669bb945c7430ac84d1dda /source/blender/blenkernel/BKE_context.h | |
parent | b50ef7af146957c5c936f116ed5012db9e128c48 (diff) |
2.5: Fix for windows editmode tab crashes. This was due to
use of function pointers in the context callbacks. Apparently
MSVC decides that some of these functions are the same and
makes them into a single function with the same address. I
couldn't figure out if this was a compiler bug or according
to the C spec. Regardless, that means this method can't be
used, so now it uses separate CTX_DATA_DEFINES.
Diffstat (limited to 'source/blender/blenkernel/BKE_context.h')
-rw-r--r-- | source/blender/blenkernel/BKE_context.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index 160736d4a94..c489aba3326 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -59,13 +59,35 @@ struct wmWindowManager; struct bContext; typedef struct bContext bContext; -typedef void bContextDataMember; - struct bContextDataResult; typedef struct bContextDataResult bContextDataResult; +enum { + CTX_DATA_MAIN, + CTX_DATA_SCENE, + CTX_DATA_TOOL_SETTINGS, + + CTX_DATA_SELECTED_OBJECTS, + CTX_DATA_SELECTED_BASES, + CTX_DATA_SELECTED_EDITABLE_OBJECTS, + CTX_DATA_SELECTED_EDITABLE_BASES, + CTX_DATA_VISIBLE_OBJECTS, + CTX_DATA_VISIBLE_BASES, + + CTX_DATA_ACTIVE_OBJECT, + CTX_DATA_ACTIVE_BASE, + CTX_DATA_EDIT_OBJECT, + + CTX_DATA_EDIT_IMAGE, + CTX_DATA_EDIT_IMAGE_BUFFER, + + CTX_DATA_SELECTED_NODES +}; + +typedef int bContextDataMember; + typedef int (*bContextDataCallback)(const bContext *C, - const bContextDataMember *member, bContextDataResult *result); + bContextDataMember member, bContextDataResult *result); /* Context */ |