2.5:
authorNicholas Bishop <nicholasbishop@gmail.com>
Tue, 18 Aug 2009 21:14:36 +0000 (21:14 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Tue, 18 Aug 2009 21:14:36 +0000 (21:14 +0000)
* Fixed CMake includes for blenkernel
* Fixed an RNA property read that was causing failures in a couple paint modes

source/blender/blenkernel/CMakeLists.txt
source/blender/editors/physics/editparticle.c
source/blender/editors/sculpt_paint/paint_image.c

index 516845b5b76ffa48a0bb7e0f6cbd07b890e4e672..8d1df98c5b417fe4e4d3ddb42cae9e36c5685eb1 100644 (file)
@@ -32,7 +32,7 @@ SET(INC
   ../imbuf ../avi ../../../intern/elbeem/extern ../../../intern/opennl/extern
   ../../../intern/iksolver/extern ../blenloader
   ../nodes ../../../extern/glew/include ../gpu ../makesrna ../../../intern/smoke/extern
-  ../../../intern/bsp/extern
+  ../../../intern/bsp/extern ../blenfont
   ../../../intern/audaspace/intern
   ${ZLIB_INC}
 )
index 0317a500196a5cb25d7eb61e4fa56ced9d0e9459..b92632b45afcf8d9bd0e8b9a1d0e699f76bd4138 100644 (file)
@@ -3068,11 +3068,13 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
        ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys);
        ParticleBrushData *brush= &pset->brush[pset->brushtype];
        ARegion *ar= CTX_wm_region(C);
-       float vec1[3], vec2[3];
+       float vec1[3], vec2[3], mousef[2];
        short mval[2], mvalo[2];
        int flip, mouse[2], dx, dy, removed= 0, selected= 0;
 
-       RNA_int_get_array(itemptr, "mouse", mouse);
+       RNA_float_get_array(itemptr, "mouse", mousef);
+       mouse[0] = mousef[0];
+       mouse[1] = mousef[1];
        flip= RNA_boolean_get(itemptr, "flip");
 
        if(bedit->first) {
@@ -3283,7 +3285,7 @@ static void brush_edit_apply_event(bContext *C, wmOperator *op, wmEvent *event)
 {
        ARegion *ar= CTX_wm_region(C);
        PointerRNA itemptr;
-       int mouse[2];
+       float mouse[2];
 
        mouse[0]= event->x - ar->winrct.xmin;
        mouse[1]= event->y - ar->winrct.ymin;
@@ -3291,7 +3293,7 @@ static void brush_edit_apply_event(bContext *C, wmOperator *op, wmEvent *event)
        /* fill in stroke */
        RNA_collection_add(op->ptr, "stroke", &itemptr);
 
-       RNA_int_set_array(&itemptr, "mouse", mouse);
+       RNA_float_set_array(&itemptr, "mouse", mouse);
        RNA_boolean_set(&itemptr, "flip", event->shift != 0); // XXX hardcoded
 
        /* apply */
index 975bfd8dbe70df1b57241a0252bd8939c6a6624d..465aa281e252df35a0705ba0850d6f5177cf77f3 100644 (file)
@@ -4612,11 +4612,13 @@ static int texture_paint_init(bContext *C, wmOperator *op)
 static void paint_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
 {
        PaintOperation *pop= op->customdata;
-       float time;
+       float time, mousef[2];
        float pressure;
        int mouse[2], redraw;
 
-       RNA_int_get_array(itemptr, "mouse", mouse);
+       RNA_float_get_array(itemptr, "mouse", mousef);
+       mouse[0] = mousef[0];
+       mouse[1] = mousef[1];
        time= RNA_float_get(itemptr, "time");
        pressure= RNA_float_get(itemptr, "pressure");
 
@@ -4696,7 +4698,7 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
        PaintOperation *pop= op->customdata;
        wmTabletData *wmtab;
        PointerRNA itemptr;
-       float pressure;
+       float pressure, mousef[2];
        double time;
        int tablet, mouse[2];
 
@@ -4737,7 +4739,9 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
        /* fill in stroke */
        RNA_collection_add(op->ptr, "stroke", &itemptr);
 
-       RNA_int_set_array(&itemptr, "mouse", mouse);
+       mousef[0] = mouse[0];
+       mousef[1] = mouse[1];
+       RNA_float_set_array(&itemptr, "mouse", mousef);
        RNA_float_set(&itemptr, "time", (float)(time - pop->starttime));
        RNA_float_set(&itemptr, "pressure", pressure);