[Bf-committers] Tablet Pressure API
Matt Ebb
matt at mke3.net
Thu Aug 3 15:30:53 CEST 2006
Some notes on the tablet pressure stuff:
Currently, the way to access it (copied from the sculpt tree) is:
------
#include "GHOST_Types.h"
...
const GHOST_TabletData *td;
/* when you're looping */
while(get_mbut() & mousebutton) {
/* retrieve the current tablet data, which is updated within GHOST
when events happen */
td = get_tablet_data();
------
Then you've got:
typedef struct GHOST_TabletData {
char Active; /* the active tool, 0=None, 1=Stylus, 2=Eraser */
float Pressure; /* range from 0.0 to 1.0 */
float Xtilt; /* range from -1.0 to 1.0 */
float Ytilt; /* range from -1.0 to 1.0 */
} GHOST_TabletData;
One thing I'm not so sure about, but wasn't sure if I should change
here, is the separation of GHOST and Blender. How strict should this
be? The way it is right now, including GHOST headers and accessing
GHOST structs from within Blender seems like it could be a little
sketchy, if only philosophically.
Would it be better to make another 'local' struct in Window or
something that mimics the GHOST one? Or will Jean-Luc just take care
of this all himself anyway when he does the refactor? *cue
suspenseful music* Feedback is welcome...
cheers,
Matt
------------------------------------------
Matt Ebb • matt at mke3.net • http://mke3.net
More information about the Bf-committers
mailing list