diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-09-16 19:55:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-09-16 19:55:00 +0400 |
commit | 7c5695c8011d128d7a40b28bf2146fdaab063dbe (patch) | |
tree | d86b54ce75709c642c1e2ae76a897b9fee3068df /source | |
parent | b5b0a62c9715130ac371356cd2511371e14b9d40 (diff) |
- bpy.data.sounds was a collection of ID's rather then Sounds
- last commit, missed include for rna_object_api.c & bad args to find_basis_mball
- use enum for GHOST tablet type None/Stylus/Eraser, had duplicate definition for these in C. Only tested X11, may need to cast to an int for other OS's.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_main.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 3 | ||||
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/wm_event_types.h | 2 |
6 files changed, 9 insertions, 12 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 152695c9162..1041418b059 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2116,7 +2116,7 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton wmTabletData *wmtab= event->customdata; /* de-sensitise based on tablet pressure */ - if (ELEM(wmtab->Active, DEV_STYLUS, DEV_ERASER)) + if (wmtab->Active != EVT_TABLET_NONE) fac *= wmtab->Pressure; } diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 344135acaff..910a15890cb 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -259,9 +259,9 @@ void RNA_def_main(BlenderRNA *brna) {"worlds", "World", "rna_Main_world_begin", "Worlds", "World datablocks.", NULL, NULL}, {"groups", "Group", "rna_Main_group_begin", "Groups", "Group datablocks.", NULL, NULL}, {"keys", "Key", "rna_Main_key_begin", "Keys", "Key datablocks.", NULL, NULL}, - {"scripts", "ID", "rna_Main_script_begin", "Scripts", "Script datablocks.", NULL, NULL}, + {"scripts", "ID", "rna_Main_script_begin", "Scripts", "Script datablocks (DEPRECATED).", NULL, NULL}, {"texts", "Text", "rna_Main_text_begin", "Texts", "Text datablocks.", NULL, NULL}, - {"sounds", "ID", "rna_Main_sound_begin", "Sounds", "Sound datablocks.", NULL, NULL}, + {"sounds", "Sound", "rna_Main_sound_begin", "Sounds", "Sound datablocks.", NULL, NULL}, {"armatures", "Armature", "rna_Main_armature_begin", "Armatures", "Armature datablocks.", NULL, NULL}, {"actions", "Action", "rna_Main_action_begin", "Actions", "Action datablocks.", NULL, NULL}, {"particles", "ParticleSettings", "rna_Main_particle_begin", "Particles", "Particle datablocks.", NULL, NULL}, diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index cfbd363e358..e51dcbe3c57 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -40,6 +40,7 @@ #include "BKE_DerivedMesh.h" #include "BKE_displist.h" #include "BKE_object.h" +#include "BKE_mball.h" #include "BKE_main.h" #include "DNA_mesh_types.h" @@ -101,7 +102,7 @@ static Mesh *rna_Object_create_render_mesh(Object *ob, bContext *C, Scene *scene } case OB_MBALL: /* metaballs don't have modifiers, so just convert to mesh */ - ob = find_basis_mball( ob ); + ob = find_basis_mball(scene, ob); /* todo, re-generatre for render-res */ // metaball_polygonize(scene, ob) me = add_mesh("Mesh"); diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index 806f5409b0a..c24cf783063 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -276,12 +276,8 @@ typedef struct wmGesture { } wmGesture; /* ************** custom wmEvent data ************** */ - -#define DEV_STYLUS 1 -#define DEV_ERASER 2 - typedef struct wmTabletData { - int Active; /* 0=None, 1=Stylus, 2=Eraser */ + int Active; /* 0=EVT_TABLET_NONE, 1=EVT_TABLET_STYLUS, 2=EVT_TABLET_ERASER */ float Pressure; /* range 0.0 (not touching) to 1.0 (full pressure) */ float Xtilt; /* range 0.0 (upright) to 1.0 (tilted fully against the tablet surface) */ float Ytilt; /* as above */ diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 306b99dcfcc..9d5bd13ea25 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1498,10 +1498,10 @@ static void update_tablet_data(wmWindow *win, wmEvent *event) const GHOST_TabletData *td= GHOST_GetTabletData(win->ghostwin); /* if there's tablet data from an active tablet device then add it */ - if ((td != NULL) && td->Active) { + if ((td != NULL) && td->Active != GHOST_kTabletModeNone) { struct wmTabletData *wmtab= MEM_mallocN(sizeof(wmTabletData), "customdata tablet"); - wmtab->Active = td->Active; + wmtab->Active = (int)td->Active; wmtab->Pressure = td->Pressure; wmtab->Xtilt = td->Xtilt; wmtab->Ytilt = td->Ytilt; diff --git a/source/blender/windowmanager/wm_event_types.h b/source/blender/windowmanager/wm_event_types.h index 3da621bda85..b331e036b9e 100644 --- a/source/blender/windowmanager/wm_event_types.h +++ b/source/blender/windowmanager/wm_event_types.h @@ -40,7 +40,7 @@ #define EVT_DATA_GESTURE 2 #define EVT_DATA_TIMER 3 -/* tablet active */ +/* tablet active, matches GHOST_TTabletMode */ #define EVT_TABLET_NONE 0 #define EVT_TABLET_STYLUS 1 #define EVT_TABLET_ERASER 2 |