diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 5 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 7 | ||||
-rw-r--r-- | source/blender/windowmanager/wm_event_types.h | 6 |
4 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index ac4b86b4036..9f1ef7396c0 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -331,7 +331,7 @@ static PointerRNA rna_Object_shape_key_add(Object *ob, bContext *C, ReportList * int rna_Object_is_visible(Object *ob, Scene *sce) { - return !(ob->restrictflag & OB_RESTRICT_VIEW) && ob->lay & sce->lay; + return !(ob->restrictflag & OB_RESTRICT_VIEW) && (ob->lay & sce->lay); } /* diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index b4500a77f84..fd328a1545b 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -241,6 +241,11 @@ EnumPropertyItem event_type_items[] = { {PAGEDOWNKEY, "PAGE_DOWN", 0, "Page Down", ""}, {ENDKEY, "END", 0, "End", ""}, {0, "", 0, NULL, NULL}, + {MEDIAPLAY, "MEDIA_PLAY", 0, "Media Play/Pause", ""}, + {MEDIASTOP, "MEDIA_STOP", 0, "Media Stop", ""}, + {MEDIAFIRST, "MEDIA_FIRST", 0, "Media First", ""}, + {MEDIALAST, "MEDIA_LAST", 0, "Media Last", ""}, + {0, "", 0, NULL, NULL}, {WINDEACTIVATE, "WINDOW_DEACTIVATE", 0, "Window Deactivate", ""}, {TIMER, "TIMER", 0, "Timer", ""}, {TIMER0, "TIMER0", 0, "Timer 0", ""}, diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index af78e7113f7..39a6e5b27b5 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2196,7 +2196,12 @@ static int convert_key(GHOST_TKey key) case GHOST_kKeyNumpadSlash: return PADSLASHKEY; case GHOST_kKeyGrLess: return GRLESSKEY; - + + case GHOST_kKeyMediaPlay: return MEDIAPLAY; + case GHOST_kKeyMediaStop: return MEDIASTOP; + case GHOST_kKeyMediaFirst: return MEDIAFIRST; + case GHOST_kKeyMediaLast: return MEDIALAST; + default: return UNKNOWNKEY; /* GHOST_kKeyUnknown */ } diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h index 5d7eb625f78..c3573f86c6d 100644 --- a/source/blender/windowmanager/wm_event_types.h +++ b/source/blender/windowmanager/wm_event_types.h @@ -207,6 +207,12 @@ #define OSKEY 172 #define GRLESSKEY 173 +// XXX: are these codes ok? +#define MEDIAPLAY 174 +#define MEDIASTOP 175 +#define MEDIAFIRST 176 +#define MEDIALAST 177 + /* for event checks */ /* only used for KM_TEXTINPUT, so assume that we want all user-inputtable ascii codes included */ #define ISTEXTINPUT(event) (event >=' ' && event <=255) |