[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37237] branches/soc-2011-onion/source/ blender/editors/sculpt_paint: changed some operators to not register on the operator panel

2011-06-06 Thread Jason Wilkins
Revision: 37237
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37237
Author:   jwilkins
Date: 2011-06-06 06:06:01 + (Mon, 06 Jun 2011)
Log Message:
---
changed some operators to not register on the operator panel

** for some, they have no properties to actually show
** for the ones that do (paint/sculpt tool select operators), selecting a new 
tool from the operator panel causes Blender to crash due to bad 
ob-paint-sculpt-hidden_areas pointer.

Modified Paths:
--
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_ops.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c

Modified: 
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_ops.c
===
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_ops.c 
2011-06-06 03:53:38 UTC (rev 37236)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_ops.c 
2011-06-06 06:06:01 UTC (rev 37237)
@@ -84,7 +84,9 @@
ot-exec= brush_add_exec;

/* flags */
-   ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //XXX: doesn't seem to be any reason to register ~jwilkins
+   ot-flag= OPTYPE_UNDO;
 }
 
 
@@ -139,7 +141,9 @@
ot-exec= brush_scale_size_exec;

/* flags */
-   ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //XXX: doesn't seem to be any reason to register ~jwilkins
+   ot-flag= OPTYPE_UNDO;
 
RNA_def_float(ot-srna, scalar, 1, 0, 2, Scalar, Factor to scale 
brush size by, 0, 2);
 }
@@ -166,7 +170,9 @@
ot-poll= vertex_paint_mode_poll;

/* flags */
-   ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //XXX: doesn't seem to be any reason to register ~jwilkins
+   ot-flag= OPTYPE_UNDO;
 }
 
 static int brush_reset_exec(bContext *C, wmOperator *UNUSED(op))
@@ -195,7 +201,9 @@
ot-exec= brush_reset_exec;

/* flags */
-   ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //XXX: doesn't seem to be any reason to register ~jwilkins
+   ot-flag= OPTYPE_UNDO;
 }
 
 /* generic functions for setting the active brush based on the tool */
@@ -258,7 +266,10 @@
ot-exec= brush_sculpt_tool_set_exec;
 
/* flags */
-   ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //XXX: doesn't seem to be any reason to register ~jwilkins
+   //XXX: currently undo causes a crash
+   ot-flag= 0;
 
/* props */
ot-prop= RNA_def_enum(ot-srna, tool, brush_sculpt_tool_items, 0, 
Tool, );
@@ -283,7 +294,10 @@
ot-exec= brush_vertex_tool_set_exec;
 
/* flags */
-   ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //XXX: doesn't seem to be any reason to register ~jwilkins
+   //XXX: currently undo causes a crash
+   ot-flag= 0;
 
/* props */
ot-prop= RNA_def_enum(ot-srna, tool, brush_vertex_tool_items, 0, 
Tool, );
@@ -308,7 +322,10 @@
ot-exec= brush_weight_tool_set_exec;
 
/* flags */
-   ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //XXX: doesn't seem to be any reason to register ~jwilkins
+   //XXX: currently undo causes a crash
+   ot-flag= 0;
 
/* props */
ot-prop= RNA_def_enum(ot-srna, tool, brush_vertex_tool_items, 0, 
Tool, );
@@ -333,7 +350,10 @@
ot-exec= brush_image_tool_set_exec;
 
/* flags */
-   ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+   //XXX: doesn't seem to be any reason to register ~jwilkins
+   //XXX: currently undo causes a crash
+   ot-flag= 0;
 
/* props */
ot-prop= RNA_def_enum(ot-srna, tool, brush_image_tool_items, 0, 
Tool, );

Modified: branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
===
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
2011-06-06 03:53:38 UTC (rev 37236)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
2011-06-06 06:06:01 UTC (rev 37237)
@@ -4430,6 +4430,7 @@
if(ss-hidden_areas.first) {
/* Free all hidden areas */
BLI_freelistN(ss-hidden_areas);
+
sculpt_area_hide_update(C);
 
/* Avoid cracks in multires */

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37239] trunk/blender/source/blender: fix [#27572] Mirror Shapekey and Mirror vertex Group not working for Lattice.

2011-06-06 Thread Campbell Barton
Revision: 37239
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37239
Author:   campbellbarton
Date: 2011-06-06 06:40:09 + (Mon, 06 Jun 2011)
Log Message:
---
fix [#27572] Mirror Shapekey and Mirror vertex Group not working for Lattice.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/BKE_deform.h
trunk/blender/source/blender/blenkernel/intern/deform.c
trunk/blender/source/blender/editors/include/ED_mesh.h
trunk/blender/source/blender/editors/object/object_shapekey.c
trunk/blender/source/blender/editors/object/object_vgroup.c
trunk/blender/source/blender/makesdna/DNA_lattice_types.h

Modified: trunk/blender/source/blender/blenkernel/BKE_deform.h
===
--- trunk/blender/source/blender/blenkernel/BKE_deform.h2011-06-06 
06:31:42 UTC (rev 37238)
+++ trunk/blender/source/blender/blenkernel/BKE_deform.h2011-06-06 
06:40:09 UTC (rev 37239)
@@ -59,9 +59,9 @@
 
 void defvert_copy(struct MDeformVert *dvert_r, const struct MDeformVert 
*dvert);
 void defvert_sync(struct MDeformVert *dvert_r, const struct MDeformVert 
*dvert, int use_verify);
-void defvert_sync_mapped(struct MDeformVert *dvert_r, const struct MDeformVert 
*dvert, int *flip_map, int use_verify);
+void defvert_sync_mapped(struct MDeformVert *dvert_r, const struct MDeformVert 
*dvert, const int *flip_map, int use_verify);
 void defvert_remap (struct MDeformVert *dvert, int *map);
-void defvert_flip(struct MDeformVert *dvert, int *flip_map);
+void defvert_flip(struct MDeformVert *dvert, const int *flip_map);
 void defvert_normalize(struct MDeformVert *dvert);
 
 /* utility function, note that 32 chars is the maximum string length since its 
only

Modified: trunk/blender/source/blender/blenkernel/intern/deform.c
===
--- trunk/blender/source/blender/blenkernel/intern/deform.c 2011-06-06 
06:31:42 UTC (rev 37238)
+++ trunk/blender/source/blender/blenkernel/intern/deform.c 2011-06-06 
06:40:09 UTC (rev 37239)
@@ -121,7 +121,7 @@
 }
 
 /* be sure all flip_map values are valid */
-void defvert_sync_mapped (MDeformVert *dvert_r, const MDeformVert *dvert, int 
*flip_map, int use_verify)
+void defvert_sync_mapped (MDeformVert *dvert_r, const MDeformVert *dvert, 
const int *flip_map, int use_verify)
 {
if(dvert-totweight  dvert_r-totweight) {
int i;
@@ -170,7 +170,7 @@
}
 }
 
-void defvert_flip (MDeformVert *dvert, int *flip_map)
+void defvert_flip (MDeformVert *dvert, const int *flip_map)
 {
MDeformWeight *dw;
int i;

Modified: trunk/blender/source/blender/editors/include/ED_mesh.h
===
--- trunk/blender/source/blender/editors/include/ED_mesh.h  2011-06-06 
06:31:42 UTC (rev 37238)
+++ trunk/blender/source/blender/editors/include/ED_mesh.h  2011-06-06 
06:40:09 UTC (rev 37239)
@@ -209,7 +209,7 @@
 void   ED_vgroup_data_create(struct ID *id);
 intED_vgroup_give_array(struct ID 
*id, struct MDeformVert **dvert_arr, int *dvert_tot);
 intED_vgroup_copy_array(struct 
Object *ob, struct Object *ob_from);
-void   ED_vgroup_mirror(struct Object *ob, int 
mirror_weights, int flip_vgroups);
+void   ED_vgroup_mirror(struct Object *ob, 
const short mirror_weights, const short flip_vgroups);
 
 int
ED_vgroup_object_is_edit_mode(struct Object *ob);
 

Modified: trunk/blender/source/blender/editors/object/object_shapekey.c
===
--- trunk/blender/source/blender/editors/object/object_shapekey.c   
2011-06-06 06:31:42 UTC (rev 37238)
+++ trunk/blender/source/blender/editors/object/object_shapekey.c   
2011-06-06 06:40:09 UTC (rev 37239)
@@ -203,9 +203,9 @@
fp1= ((float *)kb-data) + i1*3;
fp2= ((float *)kb-data) + i2*3;
 
-   VECCOPY(tvec,   fp1);
-   VECCOPY(fp1,fp2);
-   VECCOPY(fp2,tvec);
+   copy_v3_v3(tvec,fp1);
+   copy_v3_v3(fp1, fp2);
+   copy_v3_v3(fp2, tvec);
 
/* flip x axis */
fp1[0] = -fp1[0];
@@ -217,8 +217,47 @@
 
mesh_octree_table(ob, NULL, NULL, 'e');
}
-   /* todo, other types? */
+

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37240] trunk/blender/source/blender/ blenkernel/intern/object.c: object-mode lattice bounds were not taken into account when calculating min /max.

2011-06-06 Thread Campbell Barton
Revision: 37240
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37240
Author:   campbellbarton
Date: 2011-06-06 07:29:57 + (Mon, 06 Jun 2011)
Log Message:
---
object-mode lattice bounds were not taken into account when calculating min/max.
effected view-selected, center-origin  local view.

Modified Paths:
--
trunk/blender/source/blender/blenkernel/intern/object.c

Modified: trunk/blender/source/blender/blenkernel/intern/object.c
===
--- trunk/blender/source/blender/blenkernel/intern/object.c 2011-06-06 
06:40:09 UTC (rev 37239)
+++ trunk/blender/source/blender/blenkernel/intern/object.c 2011-06-06 
07:29:57 UTC (rev 37240)
@@ -2387,26 +2387,44 @@
 void minmax_object(Object *ob, float *min, float *max)
 {
BoundBox bb;
-   Mesh *me;
-   Curve *cu;
float vec[3];
int a;
+   short change= FALSE;

switch(ob-type) {
-   
case OB_CURVE:
case OB_FONT:
case OB_SURF:
-   cu= ob-data;
-   
-   if(cu-bb==NULL) tex_space_curve(cu);
-   bb= *(cu-bb);
-   
-   for(a=0; a8; a++) {
-   mul_m4_v3(ob-obmat, bb.vec[a]);
-   DO_MINMAX(bb.vec[a], min, max);
+   {
+   Curve *cu= ob-data;
+
+   if(cu-bb==NULL) tex_space_curve(cu);
+   bb= *(cu-bb);
+
+   for(a=0; a8; a++) {
+   mul_m4_v3(ob-obmat, bb.vec[a]);
+   DO_MINMAX(bb.vec[a], min, max);
+   }
+   change= TRUE;
}
break;
+   case OB_LATTICE:
+   {
+   Lattice *lt= ob-data;
+   BPoint *bp= lt-def;
+   int u, v, w;
+
+   for(w=0; wlt-pntsw; w++) {
+   for(v=0; vlt-pntsv; v++) {
+   for(u=0; ult-pntsu; u++, bp++) {
+   mul_v3_m4v3(vec, ob-obmat, 
bp-vec);
+   DO_MINMAX(vec, min, max);
+   }
+   }
+   }
+   change= TRUE;
+   }
+   break;
case OB_ARMATURE:
if(ob-pose) {
bPoseChannel *pchan;
@@ -2416,25 +2434,27 @@
mul_v3_m4v3(vec, ob-obmat, pchan-pose_tail);
DO_MINMAX(vec, min, max);
}
-   break;
+   change= TRUE;
}
-   /* no break, get_mesh will give NULL and it passes on to 
default */
+   break;
case OB_MESH:
-   me= get_mesh(ob);
-   
-   if(me) {
-   bb = *mesh_get_bb(ob);
-   
-   for(a=0; a8; a++) {
-   mul_m4_v3(ob-obmat, bb.vec[a]);
-   DO_MINMAX(bb.vec[a], min, max);
+   {
+   Mesh *me= get_mesh(ob);
+
+   if(me) {
+   bb = *mesh_get_bb(ob);
+
+   for(a=0; a8; a++) {
+   mul_m4_v3(ob-obmat, bb.vec[a]);
+   DO_MINMAX(bb.vec[a], min, max);
+   }
+   change= TRUE;
}
}
-   if(min[0]  max[0] ) break;
-   
-   /* else here no break!!!, mesh can be zero sized */
-   
-   default:
+   break;
+   }
+
+   if(change == FALSE) {
DO_MINMAX(ob-obmat[3], min, max);
 
copy_v3_v3(vec, ob-obmat[3]);
@@ -2444,7 +2464,6 @@
copy_v3_v3(vec, ob-obmat[3]);
sub_v3_v3(vec, ob-size);
DO_MINMAX(vec, min, max);
-   break;
}
 }
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37241] trunk/blender/build_files/scons/ config/win32-vc-config.py: fix from nico_ga on IRC, building on MSVC with jack but not ffmpeg.

2011-06-06 Thread Campbell Barton
Revision: 37241
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37241
Author:   campbellbarton
Date: 2011-06-06 08:40:47 + (Mon, 06 Jun 2011)
Log Message:
---
fix from nico_ga on IRC, building on MSVC with jack but not ffmpeg.

Modified Paths:
--
trunk/blender/build_files/scons/config/win32-vc-config.py

Modified: trunk/blender/build_files/scons/config/win32-vc-config.py
===
--- trunk/blender/build_files/scons/config/win32-vc-config.py   2011-06-06 
07:29:57 UTC (rev 37240)
+++ trunk/blender/build_files/scons/config/win32-vc-config.py   2011-06-06 
08:40:47 UTC (rev 37241)
@@ -35,7 +35,7 @@
 
 WITH_BF_JACK = False
 BF_JACK = LIBDIR + '/jack'
-BF_JACK_INC = '${BF_JACK}/include'
+BF_JACK_INC = '${BF_JACK}/include ${BF_FFMPEG}/include/msvc'
 BF_JACK_LIB = 'libjack'
 BF_JACK_LIBPATH = '${BF_JACK}/lib'
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37242] trunk/blender/source/blender/ editors/sculpt_paint/paint_image.c: fix/workaround [#27559] Color picker fails with a very small brush

2011-06-06 Thread Campbell Barton
Revision: 37242
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37242
Author:   campbellbarton
Date: 2011-06-06 08:43:17 + (Mon, 06 Jun 2011)
Log Message:
---
fix/workaround [#27559] Color picker fails with a very small brush
fade out small brushes so the brush wont interfere with the color directly 
under the cursor.

Modified Paths:
--
trunk/blender/source/blender/editors/sculpt_paint/paint_image.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
===
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 
2011-06-06 08:40:47 UTC (rev 37241)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 
2011-06-06 08:43:17 UTC (rev 37242)
@@ -5012,31 +5012,45 @@
 
 static void brush_drawcursor(bContext *C, int x, int y, void 
*UNUSED(customdata))
 {
+#define PX_SIZE_FADE_MAX 12.0f
+#define PX_SIZE_FADE_MIN 4.0f
+
Brush *brush= image_paint_brush(C);
Paint *paint= paint_get_active(CTX_data_scene(C));
 
-   if(paint  brush) {
+   if(paint  brush  paint-flags  PAINT_SHOW_BRUSH) {
float zoomx, zoomy;
+   const float size= (float)brush_size(brush);
+   const short use_zoom= get_imapaint_zoom(C, zoomx, zoomy);
+   const float pixel_size= MAX2(size * zoomx, size * zoomy);
+   float alpha= 0.5f;
 
-   if(!(paint-flags  PAINT_SHOW_BRUSH))
+   /* fade out the brush (cheap trick to work around brush 
interfearing with sampling [#])*/
+   if(pixel_size  PX_SIZE_FADE_MIN) {
return;
+   }
+   else if (pixel_size  PX_SIZE_FADE_MAX) {
+   alpha *= (pixel_size - PX_SIZE_FADE_MIN) / 
(PX_SIZE_FADE_MAX - PX_SIZE_FADE_MIN);
+   }
 
glPushMatrix();
 
glTranslatef((float)x, (float)y, 0.0f);
 
-   if(get_imapaint_zoom(C, zoomx, zoomy))
+   if(use_zoom)
glScalef(zoomx, zoomy, 1.0f);
 
-   glColor4f(brush-add_col[0], brush-add_col[1], 
brush-add_col[2], 0.5f);
+   glColor4f(brush-add_col[0], brush-add_col[1], 
brush-add_col[2], 0.5);
glEnable( GL_LINE_SMOOTH );
glEnable(GL_BLEND);
-   glutil_draw_lined_arc(0, (float)(M_PI*2.0), 
(float)brush_size(brush), 40);
+   glutil_draw_lined_arc(0, (float)(M_PI*2.0), size, 40);
glDisable(GL_BLEND);
glDisable( GL_LINE_SMOOTH );
 
glPopMatrix();
}
+#undef PX_SIZE_FADE_MAX
+#undef PX_SIZE_FADE_MIN
 }
 
 static void toggle_paint_cursor(bContext *C, int enable)

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37244] trunk/blender/source/blender/ editors/interface: use the same stippled drawing for colorband background as alpha color swatches , with low DPI

2011-06-06 Thread Campbell Barton
Revision: 37244
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37244
Author:   campbellbarton
Date: 2011-06-06 09:12:03 + (Mon, 06 Jun 2011)
Log Message:
---
use the same stippled drawing for colorband background as alpha color swatches, 
with low DPI would look squashed, also use the same colors for both.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface_draw.c
trunk/blender/source/blender/editors/interface/interface_intern.h
trunk/blender/source/blender/editors/interface/interface_widgets.c

Modified: trunk/blender/source/blender/editors/interface/interface_draw.c
===
--- trunk/blender/source/blender/editors/interface/interface_draw.c 
2011-06-06 08:45:17 UTC (rev 37243)
+++ trunk/blender/source/blender/editors/interface/interface_draw.c 
2011-06-06 09:12:03 UTC (rev 37244)
@@ -1120,7 +1120,7 @@
ColorBand *coba;
CBData *cbd;
float x1, y1, sizex, sizey;
-   float dx, v3[2], v1[2], v2[2], v1a[2], v2a[2];
+   float v3[2], v1[2], v2[2], v1a[2], v2a[2];
int a;
float pos, colf[4]= {0,0,0,0}; /* initialize incase the colorband isnt 
valid */

@@ -1131,18 +1131,17 @@
y1= rect-ymin;
sizex= rect-xmax-x1;
sizey= rect-ymax-y1;
-   
+
/* first background, to show tranparency */
-   dx= sizex/12.0f;
-   v1[0]= x1;
-   for(a=0; a12; a++) {
-   if(a  1) glColor3f(0.3, 0.3, 0.3); else glColor3f(0.8, 0.8, 
0.8);
-   glRectf(v1[0], y1, v1[0]+dx, y1+0.5f*sizey);
-   if(a  1) glColor3f(0.8, 0.8, 0.8); else glColor3f(0.3, 0.3, 
0.3);
-   glRectf(v1[0], y1+0.5f*sizey, v1[0]+dx, y1+sizey);
-   v1[0]+= dx;
-   }
-   
+
+   glColor4ub(UI_TRANSP_DARK, UI_TRANSP_DARK, UI_TRANSP_DARK, 255);
+   glRectf(x1, y1, x1+sizex, y1+sizey);
+   glEnable(GL_POLYGON_STIPPLE);
+   glColor4ub(UI_TRANSP_LIGHT, UI_TRANSP_LIGHT, UI_TRANSP_LIGHT, 255);
+   glPolygonStipple(checker_stipple_sml);
+   glRectf(x1, y1, x1+sizex, y1+sizey);
+   glDisable(GL_POLYGON_STIPPLE);
+
glShadeModel(GL_FLAT);
glEnable(GL_BLEND);


Modified: trunk/blender/source/blender/editors/interface/interface_intern.h
===
--- trunk/blender/source/blender/editors/interface/interface_intern.h   
2011-06-06 08:45:17 UTC (rev 37243)
+++ trunk/blender/source/blender/editors/interface/interface_intern.h   
2011-06-06 09:12:03 UTC (rev 37244)
@@ -486,6 +486,11 @@
 void ui_draw_menu_item(struct uiFontStyle *fstyle, rcti *rect, const char 
*name, int iconid, int state);
 void ui_draw_preview_item(struct uiFontStyle *fstyle, rcti *rect, const char 
*name, int iconid, int state);
 
+extern unsigned char checker_stipple_sml[];
+/* used for transp checkers */
+#define UI_TRANSP_DARK 100
+#define UI_TRANSP_LIGHT 160
+
 /* interface_style.c */
 void uiStyleInit(void);
 

Modified: trunk/blender/source/blender/editors/interface/interface_widgets.c
===
--- trunk/blender/source/blender/editors/interface/interface_widgets.c  
2011-06-06 08:45:17 UTC (rev 37243)
+++ trunk/blender/source/blender/editors/interface/interface_widgets.c  
2011-06-06 09:12:03 UTC (rev 37244)
@@ -159,6 +159,18 @@
 static int check_tria_face[4][3]= {
 {3, 2, 4}, {3, 4, 5}, {1, 0, 3}, {0, 2, 3}};
 
+GLubyte checker_stipple_sml[32*32/8] =
+{
+   255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, \
+   255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, \
+   0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, \
+   0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, \
+   255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, \
+   255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, \
+   0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, \
+   0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, \
+};
+
 /* * */
 
 void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float 
y3)
@@ -614,22 +626,10 @@
if(wtb-inner) {
if(wcol-shaded==0) {
if (wcol-alpha_check) {
-   GLubyte checker_stipple_sml[32*32/8] =
-   {
-   
255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, \
-   
255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, \
-   
0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, \
-   
0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255, \
-   
255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0, \
-   

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37245] trunk/blender/source/blender/ editors/sculpt_paint/paint_image.c: fix for 2D paint being off by 1 pixel on x/y axis, most obvious when zoomed

2011-06-06 Thread Campbell Barton
Revision: 37245
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37245
Author:   campbellbarton
Date: 2011-06-06 10:08:27 + (Mon, 06 Jun 2011)
Log Message:
---
fix for 2D paint being off by 1 pixel on x/y axis, most obvious when zoomed in.

Modified Paths:
--
trunk/blender/source/blender/editors/sculpt_paint/paint_image.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
===
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 
2011-06-06 09:12:03 UTC (rev 37244)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 
2011-06-06 10:08:27 UTC (rev 37245)
@@ -4255,8 +4255,8 @@
 
 static void imapaint_convert_brushco(ImBuf *ibufb, float *pos, int *ipos)
 {
-   ipos[0]= (int)(pos[0] - ibufb-x/2);
-   ipos[1]= (int)(pos[1] - ibufb-y/2);
+   ipos[0]= (int)floorf((pos[0] - ibufb-x/2) + 1.0f);
+   ipos[1]= (int)floorf((pos[1] - ibufb-y/2) + 1.0f);
 }
 
 /* dosnt run for projection painting
@@ -4863,13 +4863,8 @@
PointerRNA itemptr;
float pressure, mousef[2];
double time;
-   int tablet, mouse[2];
+   int tablet;
 
-   // XXX +1 matches brush location better but
-   // still not exact, find out why and fix ..
-   mouse[0]= event-mval[0] + 1;
-   mouse[1]= event-mval[1] + 1;
-
time= PIL_check_seconds_timer();
 
tablet= 0;
@@ -4888,8 +4883,8 @@
pressure= pop-prev_pressure ? pop-prev_pressure : 1.0f;
 
if(pop-first) {
-   pop-prevmouse[0]= mouse[0];
-   pop-prevmouse[1]= mouse[1];
+   pop-prevmouse[0]= event-mval[0];
+   pop-prevmouse[1]= event-mval[1];
pop-starttime= time;
 
/* special exception here for too high pressure values on first 
touch in
@@ -4908,8 +4903,8 @@
/* fill in stroke */
RNA_collection_add(op-ptr, stroke, itemptr);
 
-   mousef[0] = (float)(mouse[0]);
-   mousef[1] = (float)(mouse[1]);
+   mousef[0] = (float)(event-mval[0]);
+   mousef[1] = (float)(event-mval[1]);
RNA_float_set_array(itemptr, mouse, mousef);
RNA_float_set(itemptr, time, (float)(time - pop-starttime));
RNA_float_set(itemptr, pressure, pressure);

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37246] trunk/blender/source/blender: Added cancel callbacks to modal operators which allocates memory

2011-06-06 Thread Sergey Sharybin
Revision: 37246
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37246
Author:   nazgul
Date: 2011-06-06 11:04:54 + (Mon, 06 Jun 2011)
Log Message:
---
Added cancel callbacks to modal operators which allocates memory
in invoke callback. This prevents unfreed memory blocks when quiting
Bledner with modal operator running.

Modified Paths:
--
trunk/blender/source/blender/editors/animation/anim_channels_edit.c
trunk/blender/source/blender/editors/animation/anim_markers.c
trunk/blender/source/blender/editors/animation/anim_ops.c
trunk/blender/source/blender/editors/interface/view2d_ops.c
trunk/blender/source/blender/editors/mesh/editmesh_loop.c
trunk/blender/source/blender/editors/screen/screen_ops.c
trunk/blender/source/blender/editors/sculpt_paint/paint_intern.h
trunk/blender/source/blender/editors/sculpt_paint/paint_stroke.c
trunk/blender/source/blender/editors/sculpt_paint/paint_vertex.c
trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
trunk/blender/source/blender/editors/space_action/action_select.c
trunk/blender/source/blender/editors/space_file/file_ops.c
trunk/blender/source/blender/editors/space_graph/graph_select.c
trunk/blender/source/blender/editors/space_image/image_ops.c
trunk/blender/source/blender/editors/space_info/info_report.c
trunk/blender/source/blender/editors/space_logic/logic_buttons.c
trunk/blender/source/blender/editors/space_nla/nla_select.c
trunk/blender/source/blender/editors/space_node/node_edit.c
trunk/blender/source/blender/editors/space_node/node_select.c
trunk/blender/source/blender/editors/space_sequencer/sequencer_edit.c
trunk/blender/source/blender/editors/space_sequencer/sequencer_select.c
trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
trunk/blender/source/blender/editors/space_view3d/view3d_select.c
trunk/blender/source/blender/editors/uvedit/uvedit_ops.c
trunk/blender/source/blender/windowmanager/WM_api.h
trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/editors/animation/anim_channels_edit.c
===
--- trunk/blender/source/blender/editors/animation/anim_channels_edit.c 
2011-06-06 10:08:27 UTC (rev 37245)
+++ trunk/blender/source/blender/editors/animation/anim_channels_edit.c 
2011-06-06 11:04:54 UTC (rev 37246)
@@ -1881,6 +1881,7 @@
ot-invoke= WM_border_select_invoke;
ot-exec= animchannels_borderselect_exec;
ot-modal= WM_border_select_modal;
+   ot-cancel= WM_border_select_cancel;

ot-poll= animedit_poll_channels_nla_tweakmode_off;


Modified: trunk/blender/source/blender/editors/animation/anim_markers.c
===
--- trunk/blender/source/blender/editors/animation/anim_markers.c   
2011-06-06 10:08:27 UTC (rev 37245)
+++ trunk/blender/source/blender/editors/animation/anim_markers.c   
2011-06-06 11:04:54 UTC (rev 37246)
@@ -717,7 +717,7 @@
 }
 
 /* only for modal */
-static void ed_marker_move_cancel(bContext *C, wmOperator *op)
+static int ed_marker_move_cancel(bContext *C, wmOperator *op)
 {
RNA_int_set(op-ptr, frames, 0);
ed_marker_move_apply(op);
@@ -725,6 +725,8 @@

WM_event_add_notifier(C, NC_SCENE|ND_MARKERS, NULL);
WM_event_add_notifier(C, NC_ANIMATION|ND_MARKERS, NULL);
+
+   return OPERATOR_CANCELLED;
 }
 
 
@@ -886,6 +888,7 @@
ot-invoke= ed_marker_move_invoke_wrapper;
ot-modal= ed_marker_move_modal;
ot-poll= ed_markers_poll_selected_markers;
+   ot-cancel= ed_marker_move_cancel;

/* flags */
ot-flag= 
OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
@@ -980,6 +983,7 @@
ot-invoke= ed_marker_duplicate_invoke_wrapper;
ot-modal= ed_marker_move_modal;
ot-poll= ed_markers_poll_selected_markers;
+   ot-cancel= ed_marker_move_cancel;

/* flags */
ot-flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1185,6 +1189,7 @@
ot-exec= ed_marker_border_select_exec;
ot-invoke= ed_marker_select_border_invoke_wrapper;
ot-modal= WM_border_select_modal;
+   ot-cancel= WM_border_select_cancel;

ot-poll= ed_markers_poll_markers_exist;


Modified: trunk/blender/source/blender/editors/animation/anim_ops.c
===
--- trunk/blender/source/blender/editors/animation/anim_ops.c   2011-06-06 
10:08:27 UTC (rev 37245)
+++ trunk/blender/source/blender/editors/animation/anim_ops.c   2011-06-06 
11:04:54 UTC (rev 37246)
@@ -224,6 +224,7 @@
ot-invoke= WM_border_select_invoke;
ot-exec= previewrange_define_exec;
ot-modal= WM_border_select_modal;
+   ot-cancel= WM_border_select_cancel;
   

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37247] trunk/blender: bug [#27582] Screen Editing Split and Join area don't work.

2011-06-06 Thread Campbell Barton
Revision: 37247
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37247
Author:   campbellbarton
Date: 2011-06-06 11:56:54 + (Mon, 06 Jun 2011)
Log Message:
---
bug [#27582] Screen Editing  Split and Join area don't work.
added 'INTERNAL' operator flag so operators which are only meant to be called 
by other operators or internal use are not displayed to the user.

Currently only use this flag for the operator search toolbox, is ignored in 
debug mode.

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_operators/wm.py
trunk/blender/source/blender/editors/screen/screen_ops.c
trunk/blender/source/blender/editors/util/undo.c
trunk/blender/source/blender/makesrna/intern/rna_wm.c
trunk/blender/source/blender/windowmanager/WM_types.h
trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/release/scripts/startup/bl_operators/wm.py
===
--- trunk/blender/release/scripts/startup/bl_operators/wm.py2011-06-06 
11:04:54 UTC (rev 37246)
+++ trunk/blender/release/scripts/startup/bl_operators/wm.py2011-06-06 
11:56:54 UTC (rev 37247)
@@ -106,7 +106,7 @@
 '''Set a context value.'''
 bl_idname = wm.context_set_boolean
 bl_label = Context Set Boolean
-bl_options = {'UNDO'}
+bl_options = {'UNDO', 'INTERNAL'}
 
 data_path = rna_path_prop
 value = BoolProperty(name=Value,
@@ -119,7 +119,7 @@
 '''Set a context value.'''
 bl_idname = wm.context_set_int
 bl_label = Context Set
-bl_options = {'UNDO'}
+bl_options = {'UNDO', 'INTERNAL'}
 
 data_path = rna_path_prop
 value = IntProperty(name=Value, description=Assign value, default=0)
@@ -132,7 +132,7 @@
 '''Scale an int context value.'''
 bl_idname = wm.context_scale_int
 bl_label = Context Set
-bl_options = {'UNDO'}
+bl_options = {'UNDO', 'INTERNAL'}
 
 data_path = rna_path_prop
 value = FloatProperty(name=Value, description=Assign value, 
default=1.0)
@@ -168,7 +168,7 @@
 '''Set a context value.'''
 bl_idname = wm.context_set_float
 bl_label = Context Set Float
-bl_options = {'UNDO'}
+bl_options = {'UNDO', 'INTERNAL'}
 
 data_path = rna_path_prop
 value = FloatProperty(name=Value,
@@ -182,7 +182,7 @@
 '''Set a context value.'''
 bl_idname = wm.context_set_string
 bl_label = Context Set String
-bl_options = {'UNDO'}
+bl_options = {'UNDO', 'INTERNAL'}
 
 data_path = rna_path_prop
 value = StringProperty(name=Value,
@@ -195,7 +195,7 @@
 '''Set a context value.'''
 bl_idname = wm.context_set_enum
 bl_label = Context Set Enum
-bl_options = {'UNDO'}
+bl_options = {'UNDO', 'INTERNAL'}
 
 data_path = rna_path_prop
 value = StringProperty(name=Value,
@@ -209,7 +209,7 @@
 '''Set a context value.'''
 bl_idname = wm.context_set_value
 bl_label = Context Set Value
-bl_options = {'UNDO'}
+bl_options = {'UNDO', 'INTERNAL'}
 
 data_path = rna_path_prop
 value = StringProperty(name=Value,
@@ -227,7 +227,7 @@
 '''Toggle a context value.'''
 bl_idname = wm.context_toggle
 bl_label = Context Toggle
-bl_options = {'UNDO'}
+bl_options = {'UNDO', 'INTERNAL'}
 
 data_path = rna_path_prop
 
@@ -246,7 +246,7 @@
 '''Toggle a context value.'''
 bl_idname = wm.context_toggle_enum
 bl_label = Context Toggle Values
-bl_options = {'UNDO'}
+bl_options = {'UNDO', 'INTERNAL'}
 
 data_path = rna_path_prop
 value_1 = StringProperty(name=Value, \
@@ -273,7 +273,7 @@
 '''vertex keys, groups' etc.'''
 bl_idname = wm.context_cycle_int
 bl_label = Context Int Cycle
-bl_options = {'UNDO'}
+bl_options = {'UNDO', 'INTERNAL'}
 
 data_path = rna_path_prop
 reverse = rna_reverse_prop
@@ -307,7 +307,7 @@
 '''Toggle a context value.'''
 bl_idname = wm.context_cycle_enum
 bl_label = Context Enum Cycle
-bl_options = {'UNDO'}
+bl_options = {'UNDO', 'INTERNAL'}
 
 data_path = rna_path_prop
 reverse = rna_reverse_prop
@@ -360,7 +360,7 @@
 Useful for cycling the active mesh edit mode.'''
 bl_idname = wm.context_cycle_array
 bl_label = Context Array Cycle
-bl_options = {'UNDO'}
+bl_options = {'UNDO', 'INTERNAL'}
 
 data_path = rna_path_prop
 reverse = rna_reverse_prop
@@ -406,7 +406,7 @@
 class WM_OT_context_menu_enum(bpy.types.Operator):
 bl_idname = wm.context_menu_enum
 bl_label = Context Enum Menu
-bl_options = {'UNDO'}
+bl_options = {'UNDO', 'INTERNAL'}
 data_path = rna_path_prop
 
 def execute(self, context):
@@ -420,7 +420,7 @@
 '''Toggle a context value.'''
 bl_idname = wm.context_set_id
 bl_label = Set Library ID
-bl_options = {'UNDO'}
+bl_options = {'UNDO', 'INTERNAL'}
 
 data_path = rna_path_prop
 value = StringProperty(name=Value,
@@ -462,6 +462,7 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37248] trunk/blender/release/scripts/ startup/bl_ui/space_text.py: 2.5 Text Editor:

2011-06-06 Thread Thomas Dinges
Revision: 37248
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37248
Author:   dingto
Date: 2011-06-06 12:52:26 + (Mon, 06 Jun 2011)
Log Message:
---
2.5 Text Editor:
* Added back Red Alert for Resolve External conflicts warning. 

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_ui/space_text.py

Modified: trunk/blender/release/scripts/startup/bl_ui/space_text.py
===
--- trunk/blender/release/scripts/startup/bl_ui/space_text.py   2011-06-06 
11:56:54 UTC (rev 37247)
+++ trunk/blender/release/scripts/startup/bl_ui/space_text.py   2011-06-06 
12:52:26 UTC (rev 37248)
@@ -42,7 +42,7 @@
 
 if text and text.is_modified:
 row = layout.row()
-# row.color(redalert)
+row.alert = True
 row.operator(text.resolve_conflict, text=, icon='HELP')
 
 layout.template_ID(st, text, new=text.new, unlink=text.unlink)

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37249] trunk/blender/source/blender/ makesrna/intern/rna_wm.c: Keymaps: fix keymap items created in python being added with the python

2011-06-06 Thread Brecht Van Lommel
Revision: 37249
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37249
Author:   blendix
Date: 2011-06-06 13:35:43 + (Mon, 06 Jun 2011)
Log Message:
---
Keymaps: fix keymap items created in python being added with the python
operator names instead of the internal names. This wasn't really noticeable,
expect that it broke automatically looking up shortcuts for display in menus.

Modified Paths:
--
trunk/blender/source/blender/makesrna/intern/rna_wm.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_wm.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_wm.c   2011-06-06 
12:52:26 UTC (rev 37248)
+++ trunk/blender/source/blender/makesrna/intern/rna_wm.c   2011-06-06 
13:35:43 UTC (rev 37249)
@@ -1048,6 +1048,7 @@
 static wmKeyMapItem *rna_KeyMap_item_new(wmKeyMap *km, ReportList *reports, 
const char *idname, int type, int value, int any, int shift, int ctrl, int alt, 
int oskey, int keymodifier)
 {
 // wmWindowManager *wm = CTX_wm_manager(C);
+   char idname_bl[OP_MAX_TYPENAME];
int modifier= 0;
 
/* only on non-modal maps */
@@ -1056,6 +1057,8 @@
return NULL;
}
 
+   WM_operator_bl_idname(idname_bl, idname);
+
if(shift) modifier |= KM_SHIFT;
if(ctrl) modifier |= KM_CTRL;
if(alt) modifier |= KM_ALT;
@@ -1063,7 +1066,7 @@
 
if(any) modifier = KM_ANY;
 
-   return WM_keymap_add_item(km, idname, type, value, modifier, 
keymodifier);
+   return WM_keymap_add_item(km, idname_bl, type, value, modifier, 
keymodifier);
 }
 
 static wmKeyMapItem *rna_KeyMap_item_new_modal(wmKeyMap *km, bContext *C, 
ReportList *reports, const char *propvalue_str, int type, int value, int any, 
int shift, int ctrl, int alt, int oskey, int keymodifier)

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37250] branches/soc-2011-onion: merged 30096, 30196, 30694

2011-06-06 Thread Jason Wilkins
Revision: 37250
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37250
Author:   jwilkins
Date: 2011-06-06 14:27:26 + (Mon, 06 Jun 2011)
Log Message:
---
merged 30096, 30196, 30694

** jwilkins:
** multiple patches here because first revision did not compile on windows 
without the additional fixes
** found bug in this build that causes wrap overlay to be drawn incorrectly 
when masks are enabled, has certainly been a problem since masks were added
** I do not really like the GPU draw flags introduced in these patches, it is 
something that is just begging to be more general, since its simplicity was so 
easily strained by the wrap overlay
** however, I'll withhold fixing the wrap overlay / mask bug until I see how 
the GPUDrawFlag feature evolves

Revision: 30096
Author: nicholasbishop
Date: 5:55:57 PM, Wednesday, July 07, 2010
Message:
Some more changes for improving non-sculpt paint modes:

?\226?\128?\162 Add face customdata to the pbvh
?\226?\128?\162 Return more data from BLI_pbvh_node_get_faces
?\226?\128?\162 Add some drawing flags for the pbvh/VBO drawing code
?\226?\128?\162 Some initial support for drawing mesh colors (not used yet)
?\226?\128?\162 Abstracted sculpt's get_location a bit so it can be used for 
other types of paint strokes
?\226?\128?\162 Moved and renamed unproject_brush_radius so other paint modes 
can use it
?\226?\128?\162 There should be no visible changes from this commit

Revision: 30196
Author: nicholasbishop
Date: 9:30:18 PM, Saturday, July 10, 2010
Message:
Changed glew include from  to 

Modified : /branches/soc-2010-nicolasbishop/source/blender/blenlib/intern/pbvh.c

Revision: 30694
Author: nicholasbishop
Date: 1:32:57 PM, Saturday, July 24, 2010
Message:
== PBVH ==

* Moved glShadeModel from pbvh.c to gpu_buffers.c, also fixes bad include of 
glew

Modified Paths:
--
branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c
branches/soc-2011-onion/source/blender/blenkernel/intern/subsurf_ccg.c
branches/soc-2011-onion/source/blender/blenlib/BLI_pbvh.h
branches/soc-2011-onion/source/blender/blenlib/intern/pbvh.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_intern.h
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_mask.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_stroke.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
branches/soc-2011-onion/source/blender/editors/space_view3d/drawobject.c
branches/soc-2011-onion/source/blender/gpu/GPU_buffers.h
branches/soc-2011-onion/source/blender/gpu/intern/gpu_buffers.c

Property Changed:

branches/soc-2011-onion/
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_mask.c


Property changes on: branches/soc-2011-onion
___
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-29913,30093
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-29913,30093,30096,30196,30694
/trunk/blender:36833-37206

Modified: 
branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c
===
--- branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c
2011-06-06 13:35:43 UTC (rev 37249)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c
2011-06-06 14:27:26 UTC (rev 37250)
@@ -242,7 +242,8 @@
cddm-pbvh = BLI_pbvh_new();
cddm-pbvh_draw = can_pbvh_draw(ob, dm);
BLI_pbvh_build_mesh(cddm-pbvh, me-mface, me-mvert,
-   me-vdata, me-totface, me-totvert,
+   me-vdata, me-fdata, me-totface,
+   me-totvert,
ss ? ss-hidden_areas : NULL);
 
if(ss-modifiers_active  ob-derivedDeform) {
@@ -486,15 +487,16 @@
 
if(cddm-pbvh  cddm-pbvh_draw) {
if(dm-numFaceData) {
+   GPUDrawFlags drawflags = 0;
float (*face_nors)[3] = 
CustomData_get_layer(dm-faceData, CD_NORMAL);
 
/* should be per face */
if(!setMaterial(mface-mat_nr+1, NULL))
return;
+   if(mface-flag  ME_SMOOTH)
+   drawflags |= GPU_DRAW_SMOOTH;
 
-   glShadeModel((mface-flag  ME_SMOOTH)? GL_SMOOTH: 
GL_FLAT);
-   BLI_pbvh_draw(cddm-pbvh, partial_redraw_planes, 
face_nors, (mface-flag  ME_SMOOTH));
-   glShadeModel(GL_FLAT);
+   BLI_pbvh_draw(cddm-pbvh, partial_redraw_planes, 
face_nors, drawflags);
  

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37251] branches/soc-2011-onion: Revision: 30162

2011-06-06 Thread Jason Wilkins
Revision: 37251
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37251
Author:   jwilkins
Date: 2011-06-06 15:47:22 + (Mon, 06 Jun 2011)
Log Message:
---
Revision: 30162
Author: nicholasbishop
Date: 4:27:29 PM, Friday, July 09, 2010
Message:
Begin updating vpaint to use the PBVH
* Added a new flag (plus RNA/UI) to switch between old vpaint and new vpaint
* For new vpaint, draw using the PBVH. Lighting is enabled for new vpaint.
* Note that the full model is still being redrawn, partial redraw isn't enabled 
yet.
* For new vpaint, use the PBVH to determine which faces to paint on. Only mix 
brush works right now.

** jwilkins:
** this revision crashed if you tried to vpaint with multires modifier, i put a 
bandaid on it since its easy to do
** reminder, VBO still needs to be enabled for colors to show

Modified Paths:
--

branches/soc-2011-onion/release/scripts/startup/bl_ui/space_view3d_toolbar.py
branches/soc-2011-onion/source/blender/blenkernel/BKE_paint.h
branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_intern.h
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_stroke.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_vertex.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt_undo.c
branches/soc-2011-onion/source/blender/gpu/intern/gpu_buffers.c
branches/soc-2011-onion/source/blender/makesdna/DNA_scene_types.h
branches/soc-2011-onion/source/blender/makesrna/intern/rna_sculpt_paint.c

Property Changed:

branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-29913,30093,30096,30196,30694
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-29913,30093,30096,30162,30196,30694
/trunk/blender:36833-37206

Modified: 
branches/soc-2011-onion/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===
--- 
branches/soc-2011-onion/release/scripts/startup/bl_ui/space_view3d_toolbar.py   
2011-06-06 14:27:26 UTC (rev 37250)
+++ 
branches/soc-2011-onion/release/scripts/startup/bl_ui/space_view3d_toolbar.py   
2011-06-06 15:47:22 UTC (rev 37251)
@@ -1151,6 +1151,7 @@
 col.prop(vpaint, use_all_faces)
 col.prop(vpaint, use_normal)
 col.prop(vpaint, use_spray)
+col.prop(vpaint, backbuf)
 
 col.label(text=Unified Settings:)
 col.prop(tool_settings, sculpt_paint_use_unified_size, text=Size)

Modified: branches/soc-2011-onion/source/blender/blenkernel/BKE_paint.h
===
--- branches/soc-2011-onion/source/blender/blenkernel/BKE_paint.h   
2011-06-06 14:27:26 UTC (rev 37250)
+++ branches/soc-2011-onion/source/blender/blenkernel/BKE_paint.h   
2011-06-06 15:47:22 UTC (rev 37251)
@@ -75,7 +75,6 @@
struct ListBase *fmap;
 
/* Painting on deformed mesh */
-   int modifiers_active; /* object is deformed with some modifiers */
float (*orig_cos)[3]; /* coords of undeformed mesh */
float (*deform_cos)[3]; /* coords of deformed mesh but without stroke 
displacement */
float (*deform_imats)[3][3]; /* crazyspace deformation matricies */
@@ -100,6 +99,9 @@
/* PBVH acceleration structure */
struct PBVH *pbvh;
 
+   /* Painting on deformed mesh */
+   int modifiers_active; /* object is deformed with some modifiers */
+
/* Partial redraw */
int partial_redraw;
 } PaintSession;

Modified: 
branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c
===
--- branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c
2011-06-06 14:27:26 UTC (rev 37250)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c
2011-06-06 15:47:22 UTC (rev 37251)
@@ -194,24 +194,31 @@
CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
Mesh *me= ob-data;
int deformed= 0;
+   int has_kb;
 
+   if (!(ob-paint))
+   return 0;
+
+   if(ob-paint-modifiers_active)
+   return 0;
+
/* active modifiers means extra deformation, which can't be handled 
correct
   on bith of PBVH and sculpt layer levels, so use PBVH only for 
internal brush
   stuff and show final DerivedMesh so user would see actual object 
shape */
-   deformed|= ob-paint-sculpt-modifiers_active;
+   deformed|= ob-paint-modifiers_active;
 
-   

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37252] trunk/blender/GNUmakefile: avoid cd'ing with the makefile stub

2011-06-06 Thread Campbell Barton
Revision: 37252
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37252
Author:   campbellbarton
Date: 2011-06-06 16:00:32 + (Mon, 06 Jun 2011)
Log Message:
---
avoid cd'ing with the makefile stub

Modified Paths:
--
trunk/blender/GNUmakefile

Modified: trunk/blender/GNUmakefile
===
--- trunk/blender/GNUmakefile   2011-06-06 15:47:22 UTC (rev 37251)
+++ trunk/blender/GNUmakefile   2011-06-06 16:00:32 UTC (rev 37252)
@@ -64,21 +64,19 @@
 
 # Build Blender
 all:
-   @echo 
+   @echo
@echo Configuring Blender ...
 
if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
-   mkdir -p $(BUILD_DIR) ; \
-   cd $(BUILD_DIR) ; \
-   cmake $(BLENDER_DIR) -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE) ; \
+   cmake -H$(BLENDER_DIR) -B$(BUILD_DIR) 
-DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE) ; \
fi
 
-   @echo 
+   @echo
@echo Building Blender ...
-   cd $(BUILD_DIR) ; make -s -j $(NPROCS) install
-   @echo 
+   make -C $(BUILD_DIR) -s -j $(NPROCS) install
+   @echo
@echo run blender from $(BUILD_DIR)/bin/blender
-   @echo 
+   @echo
 
 debug: all
# pass
@@ -91,7 +89,7 @@
cd build_files/package_spec/pacman ; MAKEFLAGS=-j$(NPROCS) makepkg 
--asroot
 
 package_archive:
-   cd $(BUILD_DIR) ; make -s package_archive
+   make -C $(BUILD_DIR) -s package_archive
@echo archive in $(BUILD_DIR)/release
 
 # forward build targets
@@ -109,6 +107,6 @@
@echo written: test_cmake_consistency.log
 
 clean:
-   cd $(BUILD_DIR) ; make clean
+   make -C $(BUILD_DIR) clean
 
 .PHONY: all

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37253] branches/soc-2011-onion: Revision: 30173

2011-06-06 Thread Jason Wilkins
Revision: 37253
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37253
Author:   jwilkins
Date: 2011-06-06 16:11:14 + (Mon, 06 Jun 2011)
Log Message:
---
Revision: 30173
Author: nicholasbishop
Date: 11:48:38 PM, Friday, July 09, 2010
Message:
* VPaint brush strength works again
* Finally fixed the mesh-turns-orange problem with glColorMaterial


**jwilkins:
**mesh doesn't turn orange, but it turns dark grey and smooth shaded.
**that seems even stranger to me

Modified Paths:
--
branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_vertex.c
branches/soc-2011-onion/source/blender/editors/space_view3d/drawobject.c
branches/soc-2011-onion/source/blender/gpu/intern/gpu_buffers.c

Property Changed:

branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-29913,30093,30096,30162,30196,30694
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-29913,30093,30096,30162,30173,30196,30694
/trunk/blender:36833-37206

Modified: 
branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c
===
--- branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c
2011-06-06 16:00:32 UTC (rev 37252)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c
2011-06-06 16:11:14 UTC (rev 37253)
@@ -494,11 +494,7 @@
if(mface-flag  ME_SMOOTH)
drawflags |= GPU_DRAW_SMOOTH;
 
-   glEnable(GL_LIGHTING);
-
BLI_pbvh_draw(cddm-pbvh, partial_redraw_planes, 
face_nors, drawflags);
-
-   glDisable(GL_LIGHTING);
}
 
return 1;

Modified: 
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_vertex.c
===
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_vertex.c  
2011-06-06 16:00:32 UTC (rev 37252)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_vertex.c  
2011-06-06 16:11:14 UTC (rev 37253)
@@ -1948,8 +1948,9 @@
if(dist_squared  radius_squared) {
dist = sqrtf(dist_squared);
 
-   str = brush_curve_strength(brush, dist,
-  radius);
+   str = brush-alpha *
+   brush_curve_strength(brush, 
dist,
+radius);
 
vpaint_blend(vp, col, orig_col,
 vpd-paintcol,
@@ -1993,6 +1994,10 @@
if(nodes)
MEM_freeN(nodes);
 
+   /* was disabled because it is slow, but necessary for blur */
+   if(brush-vertexpaint_tool == VP_BLUR)
+   do_shared_vertexcol(ob-data);
+
ED_region_tag_redraw(vc-ar);
 }
 

Modified: 
branches/soc-2011-onion/source/blender/editors/space_view3d/drawobject.c
===
--- branches/soc-2011-onion/source/blender/editors/space_view3d/drawobject.c
2011-06-06 16:00:32 UTC (rev 37252)
+++ branches/soc-2011-onion/source/blender/editors/space_view3d/drawobject.c
2011-06-06 16:11:14 UTC (rev 37253)
@@ -2746,8 +2746,17 @@
GPU_disable_material();
}
else if(ob-mode  
(OB_MODE_VERTEX_PAINT|OB_MODE_TEXTURE_PAINT)) {
-   if(me-mcol)
+   if(me-mcol) {
+   VPaint *vp = 
scene-toolsettings-vpaint;
+   /* XXX - temporary - set up nicer 
drawing for new vpaint */
+   if(!(vp-flag  VP_BACKBUF)) {
+   MFace *mface = 
get_mesh(ob)-mface;
+   
GPU_enable_material(mface-mat_nr+1, NULL);
+   glEnable(GL_LIGHTING);
+   }
dm-drawMappedFaces(dm, 
wpaint__setSolidDrawOptions, NULL, 1, GPU_enable_material);
+   glDisable(GL_LIGHTING);
+   }
else {
glColor3f(1.0f, 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37254] branches/soc-2011-onion/: mergeinfo

2011-06-06 Thread Jason Wilkins
Revision: 37254
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37254
Author:   jwilkins
Date: 2011-06-06 16:13:51 + (Mon, 06 Jun 2011)
Log Message:
---
mergeinfo

Property Changed:

branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-29913,30093,30096,30162,30173,30196,30694
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30174,30196,30694
/trunk/blender:36833-37206

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37255] branches/soc-2011-onion/source/ blender/blenkernel/intern/subsurf_ccg.c: GPU_buffers. h got renamed to gpu_buffers.h, changed it back

2011-06-06 Thread Jason Wilkins
Revision: 37255
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37255
Author:   jwilkins
Date: 2011-06-06 16:54:53 + (Mon, 06 Jun 2011)
Log Message:
---
GPU_buffers.h got renamed to gpu_buffers.h, changed it back

Modified Paths:
--
branches/soc-2011-onion/source/blender/blenkernel/intern/subsurf_ccg.c

Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/subsurf_ccg.c
===
--- branches/soc-2011-onion/source/blender/blenkernel/intern/subsurf_ccg.c  
2011-06-06 16:13:51 UTC (rev 37254)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/subsurf_ccg.c  
2011-06-06 16:54:53 UTC (rev 37255)
@@ -66,7 +66,7 @@
 #include BIF_gl.h
 #include BIF_glutil.h
 
-#include gpu_buffers.h
+#include GPU_buffers.h
 #include GPU_draw.h
 #include GPU_extensions.h
 #include GPU_material.h

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37256] branches/soc-2011-onion: Revision: 30195

2011-06-06 Thread Jason Wilkins
Revision: 37256
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37256
Author:   jwilkins
Date: 2011-06-06 17:10:38 + (Mon, 06 Jun 2011)
Log Message:
---
Revision: 30195
Author: nicholasbishop
Date: 8:11:21 PM, Saturday, July 10, 2010
Message:
== New VPaint ==

* Make disabling All Faces option work. This is a little different from old 
vpaint, but basically it just fills in whatever face is under the brush. Unlike 
old vpaint, all corners are filled the same way.
* Display of this feature isn't too good right now. It may look like the colors 
are being assigned to the wrong face, or not at all. This is just due to the 
way VBOs are being filled though; switching temporarily to old vpaint shows the 
colors are on the correct face.


** jwilkins:
** I'm thinking that disabling 'All Faces' should change the appearance of the 
paint cursor.

Modified Paths:
--
branches/soc-2011-onion/source/blender/blenlib/BLI_pbvh.h
branches/soc-2011-onion/source/blender/blenlib/intern/pbvh.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_vertex.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c

Property Changed:

branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30174,30196,30694
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30174,30195-30196,30694
/trunk/blender:36833-37206

Modified: branches/soc-2011-onion/source/blender/blenlib/BLI_pbvh.h
===
--- branches/soc-2011-onion/source/blender/blenlib/BLI_pbvh.h   2011-06-06 
16:54:53 UTC (rev 37255)
+++ branches/soc-2011-onion/source/blender/blenlib/BLI_pbvh.h   2011-06-06 
17:10:38 UTC (rev 37256)
@@ -108,7 +108,8 @@
 void BLI_pbvh_raycast(PBVH *bvh, BLI_pbvh_HitOccludedCallback cb, void *data,
  float ray_start[3], float ray_normal[3], int 
original);
 int BLI_pbvh_node_raycast(PBVH *bvh, PBVHNode *node, float (*origco)[3],
-   float ray_start[3], float ray_normal[3], float *dist);
+   float ray_start[3], float ray_normal[3], float *dist,
+   int *hit_index, int *grid_hit_index);
 
 /* Drawing */
 

Modified: branches/soc-2011-onion/source/blender/blenlib/intern/pbvh.c
===
--- branches/soc-2011-onion/source/blender/blenlib/intern/pbvh.c
2011-06-06 16:54:53 UTC (rev 37255)
+++ branches/soc-2011-onion/source/blender/blenlib/intern/pbvh.c
2011-06-06 17:10:38 UTC (rev 37256)
@@ -1513,10 +1513,14 @@
 }
 
 int BLI_pbvh_node_raycast(PBVH *bvh, PBVHNode *node, float (*origco)[3],
-   float ray_start[3], float ray_normal[3], float *dist)
+ float ray_start[3], float ray_normal[3], float *dist,
+ int *hit_index, int *grid_hit_index)
 {
int hit= 0;
 
+   if(hit_index) *hit_index = -1;
+   if(grid_hit_index) *grid_hit_index = -1;
+
if(bvh-faces) {
MVert *vert = bvh-verts;
int *faces= node-prim_indices;
@@ -1526,10 +1530,11 @@
 
for(i = 0; i  totface; ++i) {
MFace *f = bvh-faces + faces[i];
+   int lhit = 0;
 
if(origco) {
/* intersect with backuped original coordinates 
*/
-   hit |= ray_face_intersection(ray_start, 
ray_normal,
+   lhit = ray_face_intersection(ray_start, 
ray_normal,
 
origco[face_verts[i*4+0]],
 
origco[face_verts[i*4+1]],
 
origco[face_verts[i*4+2]],
@@ -1538,13 +1543,18 @@
}
else {
/* intersect with current coordinates */
-   hit |= ray_face_intersection(ray_start, 
ray_normal,
+   lhit = ray_face_intersection(ray_start, 
ray_normal,
 vert[f-v1].co,
 vert[f-v2].co,
 vert[f-v3].co,
 f-v4 ? vert[f-v4].co 
: NULL,
 dist);
}
+
+   if(lhit  hit_index)
+   *hit_index = i;
+
+   hit |= lhit;
}
}
else {

Modified: 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37257] branches/soc-2011-onion/: mergeinfo

2011-06-06 Thread Jason Wilkins
Revision: 37257
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37257
Author:   jwilkins
Date: 2011-06-06 17:12:58 + (Mon, 06 Jun 2011)
Log Message:
---
mergeinfo

Property Changed:

branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30174,30195-30196,30694
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30512,30694
/trunk/blender:36833-37206

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37258] branches/soc-2011-avocado/blender: Removed BKE_demo.h and demo. c from blenkernel and added the codes of the file in autoseam_tools. h and aut

2011-06-06 Thread shuvro sarker
Revision: 37258
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37258
Author:   shuvro
Date: 2011-06-06 17:23:24 + (Mon, 06 Jun 2011)
Log Message:
---
Removed BKE_demo.h and demo.c from blenkernel and added the codes of the file 
in autoseam_tools.h and autoseam_tools.cand some other minor changes

Modified Paths:
--
branches/soc-2011-avocado/blender/CMakeLists.txt
branches/soc-2011-avocado/blender/extern/Eigen3/Eigen/Sparse
branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.cpp
branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.h
branches/soc-2011-avocado/blender/source/blender/blenkernel/CMakeLists.txt
branches/soc-2011-avocado/blender/source/blender/editors/mesh/CMakeLists.txt
branches/soc-2011-avocado/blender/source/blender/editors/mesh/bmesh_tools.c

Added Paths:
---

branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c

branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.h

Removed Paths:
-
branches/soc-2011-avocado/blender/source/blender/blenkernel/BKE_demo.h
branches/soc-2011-avocado/blender/source/blender/blenkernel/intern/demo.c

Modified: branches/soc-2011-avocado/blender/CMakeLists.txt
===
--- branches/soc-2011-avocado/blender/CMakeLists.txt2011-06-06 17:12:58 UTC 
(rev 37257)
+++ branches/soc-2011-avocado/blender/CMakeLists.txt2011-06-06 17:23:24 UTC 
(rev 37258)
@@ -1112,7 +1112,7 @@
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_WRITE_STRINGS 
-Wwrite-strings)
# disable because it gives warnings for printf()  friends.
# ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_DOUBLE_PROMOTION 
-Wdouble-promotion -Wno-error=double-promotion)
-   ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS 
C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
+   #ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS 
C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
 
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ALL -Wall)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF 
-Wno-invalid-offsetof)

Modified: branches/soc-2011-avocado/blender/extern/Eigen3/Eigen/Sparse
===
--- branches/soc-2011-avocado/blender/extern/Eigen3/Eigen/Sparse
2011-06-06 17:12:58 UTC (rev 37257)
+++ branches/soc-2011-avocado/blender/extern/Eigen3/Eigen/Sparse
2011-06-06 17:23:24 UTC (rev 37258)
@@ -15,9 +15,9 @@
 #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
 #endif
 
-#ifndef EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
+/*#ifndef EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET
 #error The sparse module API is not stable yet. To use it anyway, please 
define the EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET preprocessor token.
-#endif
+#endif*/
 
 namespace Eigen {
 

Modified: branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.cpp
===
--- branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.cpp
2011-06-06 17:12:58 UTC (rev 37257)
+++ branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.cpp
2011-06-06 17:23:24 UTC (rev 37258)
@@ -1,5 +1,3 @@
-#define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET 
-
 #include Eigen/Core
 #include Eigen/Dense
 #include Eigen/Eigenvalues 
@@ -8,9 +6,9 @@
 #include DummyClass.h
 
 using Eigen::MatrixXd;
-using Eigen::SparseMatrix;
 
 
+
 DummyClass::DummyClass()
 {
m_A   1.0f, 2.0f, 0.0f,
@@ -74,9 +72,10 @@
 
 void DummyClass::calculate_eigen(float **dual_matrix, int num_row, int num_col)
 {
-int r_index,c_index;
+int i,l,r_index,c_index;
 dualMatrix.resize(num_row, num_col);
 
+
 /* we can print the matrix here to have a look */
 
 /* the argument dual_matrix will not be provided as 2d array later, the 
data 
@@ -90,7 +89,7 @@
 }
 }
 
-for(int l = 0; l  num_row; l++ ){
+for( l = 0; l  num_row; l++ ){
 dualMatrix(l,l) = - row_sum(dualMatrix, num_row, l);
 }
 
@@ -100,7 +99,7 @@
 
/* Now display the values. */
 
-for(int i = 0; i  num_col; i++ )
+for(i = 0; i  num_col; i++ )
 {
 std::cout  Columni  : value   es.eigenvalues()[i]  
std::endl;
 std::cout  Columni  : vector   
es.eigenvectors().col(i)  std::endl;

Modified: branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.h
===
--- branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.h  
2011-06-06 17:12:58 UTC (rev 37257)
+++ branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.h  
2011-06-06 17:23:24 UTC (rev 37258)
@@ -2,10 +2,8 @@
 #define DUMMY_CLASS_H_INCLUDED
 
 #include Eigen/Core

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37259] branches/soc-2011-onion/source/ blender: Revision: 30560

2011-06-06 Thread Jason Wilkins
Revision: 37259
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37259
Author:   jwilkins
Date: 2011-06-06 17:48:29 + (Mon, 06 Jun 2011)
Log Message:
---
Revision: 30560
Author: nicholasbishop
Date: 7:47:19 PM, Tuesday, July 20, 2010
Message:
== VPaint ==

Work-in-progress, vpaint + multires. This commit just adds gpu drawing and 
vpaint editing of the multires colors through the PBVH. The colors aren't 
stored or subdivided yet though, so as soon as you switch levels or otherwise 
rebuild the PBVH the painted colors will disappear.

Modified Paths:
--
branches/soc-2011-onion/source/blender/blenkernel/BKE_dmgrid.h
branches/soc-2011-onion/source/blender/blenkernel/intern/DerivedMesh.c
branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c
branches/soc-2011-onion/source/blender/blenkernel/intern/subsurf_ccg.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_vertex.c
branches/soc-2011-onion/source/blender/gpu/intern/gpu_buffers.c

Modified: branches/soc-2011-onion/source/blender/blenkernel/BKE_dmgrid.h
===
--- branches/soc-2011-onion/source/blender/blenkernel/BKE_dmgrid.h  
2011-06-06 17:23:24 UTC (rev 37258)
+++ branches/soc-2011-onion/source/blender/blenkernel/BKE_dmgrid.h  
2011-06-06 17:48:29 UTC (rev 37259)
@@ -9,26 +9,31 @@
 */
 typedef struct GridKey {
int co;
+   int color;
int mask;
int no;
 } GridKey;
 
-#define GRIDELEM_KEY_INIT(_gridkey, _totco, _totmask, _totno)  \
-   ((_gridkey)-co = _totco, (_gridkey)-mask = _totmask, (_gridkey)-no = 
_totno)
+#define GRIDELEM_KEY_INIT(_gridkey, _totco, _totcolor, _totmask, _totno) \
+   ((_gridkey)-co = _totco, (_gridkey)-color = _totcolor, 
(_gridkey)-mask = _totmask, (_gridkey)-no = _totno)
 
-#define GRIDELEM_SIZE(_key) ((3*(_key)-co + (_key)-mask + 3*(_key)-no) * 
sizeof(float))
-#define GRIDELEM_MASK_OFFSET(_key) ((_key)-mask ? 3*(_key)-co*sizeof(float) 
: -1)
-#define GRIDELEM_NO_OFFSET(_key) ((_key)-no ? (3*(_key)-co + (_key)-mask) * 
sizeof(float) : -1)
-#define GRIDELEM_INTERP_COUNT(_key) (3*(_key)-co + (_key)-mask)
+#define GRIDELEM_SIZE(_key) ((3*(_key)-co + 3*(_key)-color + (_key)-mask + 
3*(_key)-no) * sizeof(float))
+#define GRIDELEM_INTERP_COUNT(_key) (3*(_key)-co + 3*(_key)-color + 
(_key)-mask)
 
+#define GRIDELEM_COLOR_OFFSET(_key) (3*(_key)-co*sizeof(float))
+#define GRIDELEM_MASK_OFFSET(_key) (GRIDELEM_COLOR_OFFSET(_key) + 
3*(_key)-color*sizeof(float))
+#define GRIDELEM_NO_OFFSET(_key) (GRIDELEM_MASK_OFFSET(_key) + 
(_key)-mask*sizeof(float))
+
 #define GRIDELEM_AT(_grid, _elem, _key) ((struct DMGridData*)(((char*)(_grid)) 
+ (_elem) * GRIDELEM_SIZE(_key)))
 #define GRIDELEM_INC(_grid, _inc, _key) ((_grid) = GRIDELEM_AT(_grid, _inc, 
_key))
 
 #define GRIDELEM_CO(_grid, _key) ((float*)(_grid))
+#define GRIDELEM_COLOR(_grid, _key) ((float*)((char*)(_grid) + 
GRIDELEM_COLOR_OFFSET(_key)))
 #define GRIDELEM_NO(_grid, _key) ((float*)((char*)(_grid) + 
GRIDELEM_NO_OFFSET(_key)))
 #define GRIDELEM_MASK(_grid, _key) ((float*)((char*)(_grid) + 
GRIDELEM_MASK_OFFSET(_key)))
 
 #define GRIDELEM_CO_AT(_grid, _elem, _key) GRIDELEM_CO(GRIDELEM_AT(_grid, 
_elem, _key), _key)
+#define GRIDELEM_COLOR_AT(_grid, _elem, _key) 
GRIDELEM_COLOR(GRIDELEM_AT(_grid, _elem, _key), _key)
 #define GRIDELEM_NO_AT(_grid, _elem, _key) GRIDELEM_NO(GRIDELEM_AT(_grid, 
_elem, _key), _key)
 #define GRIDELEM_MASK_AT(_grid, _elem, _key) GRIDELEM_MASK(GRIDELEM_AT(_grid, 
_elem, _key), _key)
 

Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/DerivedMesh.c
===
--- branches/soc-2011-onion/source/blender/blenkernel/intern/DerivedMesh.c  
2011-06-06 17:23:24 UTC (rev 37258)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/DerivedMesh.c  
2011-06-06 17:48:29 UTC (rev 37259)
@@ -2254,9 +2254,12 @@
 {
Object *obact = scene-basact?scene-basact-object:NULL;
int editing = paint_facesel_test(ob);
-   /* weight paint and face select need original indices because of 
selection buffer drawing */
-   int needMapping = (ob==obact)  (editing || (ob-mode  
(OB_MODE_WEIGHT_PAINT|OB_MODE_VERTEX_PAINT)));
+   /* weight paint and face select need original indicies because of 
selection buffer drawing */
+   int needMapping = (ob==obact)  (editing || (ob-mode  
OB_MODE_WEIGHT_PAINT));
 
+   if((ob-mode  OB_MODE_VERTEX_PAINT)  
(scene-toolsettings-vpaint-flag  VP_BACKBUF))
+   needMapping |= 1;
+
clear_mesh_caches(ob);
 
mesh_calc_modifiers(scene, ob, NULL, ob-derivedDeform,

Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c
===
--- branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c 
2011-06-06 17:23:24 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37260] trunk/blender/source/blender: Support for update callbacks in python defined RNA properties as discussed last meeting .

2011-06-06 Thread Campbell Barton
Revision: 37260
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37260
Author:   campbellbarton
Date: 2011-06-06 17:50:20 + (Mon, 06 Jun 2011)
Log Message:
---
Support for update callbacks in python defined RNA properties as discussed last 
meeting.
This means script authors can perform actions using these callbacks rather then 
on drawing which puts blender in a readonly state.

Simple example:

import bpy
def up_func(self, context):
print(test)

bpy.types.Scene.testprop = bpy.props.FloatProperty(update=up_func)
bpy.context.scene.testprop = 11

# prints - test

Modified Paths:
--
trunk/blender/source/blender/makesrna/RNA_access.h
trunk/blender/source/blender/makesrna/RNA_define.h
trunk/blender/source/blender/makesrna/RNA_types.h
trunk/blender/source/blender/makesrna/intern/rna_access.c
trunk/blender/source/blender/makesrna/intern/rna_define.c
trunk/blender/source/blender/makesrna/intern/rna_internal_types.h
trunk/blender/source/blender/python/intern/bpy_props.c

Modified: trunk/blender/source/blender/makesrna/RNA_access.h
===
--- trunk/blender/source/blender/makesrna/RNA_access.h  2011-06-06 17:48:29 UTC 
(rev 37259)
+++ trunk/blender/source/blender/makesrna/RNA_access.h  2011-06-06 17:50:20 UTC 
(rev 37260)
@@ -650,6 +650,7 @@
 PropertySubType RNA_property_subtype(PropertyRNA *prop);
 PropertyUnit RNA_property_unit(PropertyRNA *prop);
 int RNA_property_flag(PropertyRNA *prop);
+void *RNA_property_py_data_get(PropertyRNA *prop);
 
 int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop);
 int RNA_property_array_check(PointerRNA *ptr, PropertyRNA *prop);

Modified: trunk/blender/source/blender/makesrna/RNA_define.h
===
--- trunk/blender/source/blender/makesrna/RNA_define.h  2011-06-06 17:48:29 UTC 
(rev 37259)
+++ trunk/blender/source/blender/makesrna/RNA_define.h  2011-06-06 17:50:20 UTC 
(rev 37260)
@@ -163,6 +163,8 @@
 void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable);
 void RNA_def_property_editable_array_func(PropertyRNA *prop, const char 
*editable);
 
+void RNA_def_property_update_runtime(PropertyRNA *prop, void *func);
+
 void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char 
*getlength);
 void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const 
char *set);
 void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char 
*set, const char *range);
@@ -172,6 +174,7 @@
 void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const 
char *set, const char *typef, const char *poll);
 void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, 
const char *next, const char *end, const char *get, const char *length, const 
char *lookupint, const char *lookupstring);
 void RNA_def_property_srna(PropertyRNA *prop, const char *type);
+void RNA_def_py_data(PropertyRNA *prop, void *py_data);
 
 /* Function */
 

Modified: trunk/blender/source/blender/makesrna/RNA_types.h
===
--- trunk/blender/source/blender/makesrna/RNA_types.h   2011-06-06 17:48:29 UTC 
(rev 37259)
+++ trunk/blender/source/blender/makesrna/RNA_types.h   2011-06-06 17:50:20 UTC 
(rev 37260)
@@ -190,6 +190,7 @@
 
/* need context for update function */
PROP_CONTEXT_UPDATE = 122,
+   PROP_CONTEXT_PROPERTY_UPDATE = (122)|(127),
 
/* Use for arrays or for any data that should not have a referene kept
 * most common case is functions that return arrays where the array */

Modified: trunk/blender/source/blender/makesrna/intern/rna_access.c
===
--- trunk/blender/source/blender/makesrna/intern/rna_access.c   2011-06-06 
17:48:29 UTC (rev 37259)
+++ trunk/blender/source/blender/makesrna/intern/rna_access.c   2011-06-06 
17:50:20 UTC (rev 37260)
@@ -755,6 +755,11 @@
return rna_ensure_property(prop)-flag;
 }
 
+void *RNA_property_py_data_get(PropertyRNA *prop)
+{
+   return prop-py_data;
+}
+
 int RNA_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
 {
return rna_ensure_property_array_length(ptr, prop);
@@ -1344,7 +1349,14 @@
/* ideally no context would be needed for update, but 
there's some
   parts of the code that need it still, so we have 
this exception */
if(prop-flag  PROP_CONTEXT_UPDATE) {
-   if(C) ((ContextUpdateFunc)prop-update)(C, ptr);
+   if(C) {
+   if(prop-flag  
PROP_CONTEXT_PROPERTY_UPDATE) {
+   
((ContextPropUpdateFunc)prop-update)(C, ptr, prop);
+   }
+ 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37261] branches/soc-2011-onion/: mergeinfo

2011-06-06 Thread Jason Wilkins
Revision: 37261
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37261
Author:   jwilkins
Date: 2011-06-06 17:52:57 + (Mon, 06 Jun 2011)
Log Message:
---
mergeinfo

Property Changed:

branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30512,30694
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30564,30694
/trunk/blender:36833-37206

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37262] trunk/blender/source/blender/ editors/space_outliner/outliner.c: 2.5 todo:

2011-06-06 Thread Ton Roosendaal
Revision: 37262
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37262
Author:   ton
Date: 2011-06-06 18:04:57 + (Mon, 06 Jun 2011)
Log Message:
---
2.5 todo:

User setting DPI now works for outliner too.
(todo: color picker, brush menu, nodes, fileselect path buttons, view2d 
sliders, ...)

Modified Paths:
--
trunk/blender/source/blender/editors/space_outliner/outliner.c

Modified: trunk/blender/source/blender/editors/space_outliner/outliner.c
===
--- trunk/blender/source/blender/editors/space_outliner/outliner.c  
2011-06-06 17:52:57 UTC (rev 37261)
+++ trunk/blender/source/blender/editors/space_outliner/outliner.c  
2011-06-06 18:04:57 UTC (rev 37262)
@@ -106,21 +106,17 @@
 #include outliner_intern.h
 
 
-
-#define OL_H   19
-#define OL_X   18
-
 #define OL_Y_OFFSET2
 
-#define OL_TOG_RESTRICT_VIEWX  54
-#define OL_TOG_RESTRICT_SELECTX36
-#define OL_TOG_RESTRICT_RENDERX18
+#define OL_TOG_RESTRICT_VIEWX  (UI_UNIT_X*3)
+#define OL_TOG_RESTRICT_SELECTX(UI_UNIT_X*2)
+#define OL_TOG_RESTRICT_RENDERXUI_UNIT_X
 
 #define OL_TOGW OL_TOG_RESTRICT_VIEWX
 
-#define OL_RNA_COLX300
-#define OL_RNA_COL_SIZEX   150
-#define OL_RNA_COL_SPACEX  50
+#define OL_RNA_COLX(UI_UNIT_X*15)
+#define OL_RNA_COL_SIZEX   (UI_UNIT_X*7.5)
+#define OL_RNA_COL_SPACEX  (UI_UNIT_X*2.5)
 
 #define TS_CHUNK   128
 
@@ -260,7 +256,7 @@
TreeStoreElem *tselem= TREESTORE(te);
if((tselem-flag  TSE_CLOSED)==0) 
outliner_height(soops, te-subtree, h);
-   (*h) += OL_H;
+   (*h) += UI_UNIT_Y;
te= te-next;
}
 }
@@ -297,7 +293,7 @@
*w = startx+100;
 
if((tselem-flag  TSE_CLOSED)==0)
-   outliner_rna_width(soops, te-subtree, w, startx+OL_X);
+   outliner_rna_width(soops, te-subtree, w, 
startx+UI_UNIT_X);
te= te-next;
}
 }
@@ -2485,13 +2481,13 @@
 static int do_outliner_item_activate(bContext *C, Scene *scene, ARegion *ar, 
SpaceOops *soops, TreeElement *te, int extend, const float mval[2])
 {

-   if(mval[1]te-ys  mval[1]te-ys+OL_H) {
+   if(mval[1]te-ys  mval[1]te-ys+UI_UNIT_Y) {
TreeStoreElem *tselem= TREESTORE(te);
int openclose= 0;
 
/* open close icon */
if((te-flag  TE_ICONROW)==0) {
// hidden icon, no open/close
-   if( mval[0]te-xs  mval[0]te-xs+OL_X) 
+   if( mval[0]te-xs  mval[0]te-xs+UI_UNIT_X) 
openclose= 1;
}
 
@@ -2510,7 +2506,7 @@
return 1;
}
/* name and first icon */
-   else if(mval[0]te-xs+OL_X  mval[0]te-xend) {
+   else if(mval[0]te-xs+UI_UNIT_X  mval[0]te-xend) {

/* always makes active object */
if(tselem-type!=TSE_SEQUENCE  
tselem-type!=TSE_SEQ_STRIP  tselem-type!=TSE_SEQUENCE_DUP)
@@ -2597,7 +2593,7 @@
int row;

/* get row number - 100 here is just a dummy value since we 
don't need the column */
-   UI_view2d_listview_view_to_cell(ar-v2d, 1000, OL_H, 0.0f, 
OL_Y_OFFSET, 
+   UI_view2d_listview_view_to_cell(ar-v2d, 1000, UI_UNIT_Y, 
0.0f, OL_Y_OFFSET, 
fmval[0], fmval[1], NULL, row);

/* select relevant row */
@@ -2631,7 +2627,7 @@
 static int do_outliner_item_openclose(bContext *C, SpaceOops *soops, 
TreeElement *te, int all, const float mval[2])
 {

-   if(mval[1]te-ys  mval[1]te-ys+OL_H) {
+   if(mval[1]te-ys  mval[1]te-ys+UI_UNIT_Y) {
TreeStoreElem *tselem= TREESTORE(te);
 
/* all below close/open? */
@@ -2696,11 +2692,11 @@
 static int do_outliner_item_rename(bContext *C, ARegion *ar, SpaceOops *soops, 
TreeElement *te, const float mval[2])
 {

-   if(mval[1]te-ys  mval[1]te-ys+OL_H) {
+   if(mval[1]te-ys  mval[1]te-ys+UI_UNIT_Y) {
TreeStoreElem *tselem= TREESTORE(te);

/* name and first icon */
-   if(mval[0]te-xs+OL_X  mval[0]te-xend) {
+   if(mval[0]te-xs+UI_UNIT_X  mval[0]te-xend) {

/* can't rename rna datablocks entries */
if(ELEM3(tselem-type, TSE_RNA_STRUCT, 
TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM))
@@ -2861,12 +2857,12 @@
/* store coord and continue, we need coordinates for elements outside 
view too */
te-xs= (float)startx;
te-ys= (float)(*starty);
- 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37263] branches/soc-2011-onion: Revision: 30670

2011-06-06 Thread Jason Wilkins
Revision: 37263
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37263
Author:   jwilkins
Date: 2011-06-06 18:15:48 + (Mon, 06 Jun 2011)
Log Message:
---
Revision: 30670
Author: nicholasbishop
Date: 2:08:05 PM, Friday, July 23, 2010
Message:
== Multires ==

Small bug fixes

* When dropping down to multires level zero in sculpt mode, update PBVH from 
the CDDM
* When checking for modifiers in sculpt, ignore multires on level zero

Modified Paths:
--
branches/soc-2011-onion/source/blender/blenkernel/intern/DerivedMesh.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
branches/soc-2011-onion/source/blender/modifiers/intern/MOD_multires.c

Property Changed:

branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30564,30694
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30564,30670,30694
/trunk/blender:36833-37206

Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/DerivedMesh.c
===
--- branches/soc-2011-onion/source/blender/blenkernel/intern/DerivedMesh.c  
2011-06-06 18:04:57 UTC (rev 37262)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/DerivedMesh.c  
2011-06-06 18:15:48 UTC (rev 37263)
@@ -2271,6 +2271,10 @@
ob-derivedFinal-needsFree = 0;
ob-derivedDeform-needsFree = 0;
ob-lastDataMask = dataMask;
+
+   /* update the pbvh for paint */
+   if((ob-mode  (OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT))  ob-paint)
+   ob-paint-pbvh= ob-derivedFinal-getPBVH(ob, 
ob-derivedFinal);
 }
 
 static void editmesh_build_data(Scene *scene, Object *obedit, EditMesh *em, 
CustomDataMask dataMask)

Modified: branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
===
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
2011-06-06 18:04:57 UTC (rev 37262)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
2011-06-06 18:15:48 UTC (rev 37263)
@@ -172,6 +172,14 @@
if (md-type==eModifierType_ShapeKey)
continue;
 
+   /*exception for multires on level zero, it's
+ not caught by the earlier multires check */
+   if (md-type == eModifierType_Multires 
+   ((MultiresModifierData*)md)-sculptlvl == 0)
+   {
+   continue;
+   }
+
if (mti-type==eModifierTypeType_OnlyDeform)
return 1;


Modified: branches/soc-2011-onion/source/blender/modifiers/intern/MOD_multires.c
===
--- branches/soc-2011-onion/source/blender/modifiers/intern/MOD_multires.c  
2011-06-06 18:04:57 UTC (rev 37262)
+++ branches/soc-2011-onion/source/blender/modifiers/intern/MOD_multires.c  
2011-06-06 18:15:48 UTC (rev 37263)
@@ -73,7 +73,6 @@
 static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh 
*dm,
   int useRenderParams, int 
isFinalCalc)
 {
-   int update_pbvh= (ob-mode  OB_MODE_SCULPT)  ob-paint;
MultiresModifierData *mmd = (MultiresModifierData*)md;
DerivedMesh *result;
Mesh *me= (Mesh*)ob-data;
@@ -95,11 +94,6 @@
result-release(result);
result= cddm;
}
-   else if(update_pbvh) {
-   /* would be created on the fly too, just nicer this
-  way on first stroke after e.g. switching levels */
-   ob-paint-pbvh= result-getPBVH(ob, result);
-   }
 
return result;
 }

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37264] branches/soc-2011-onion/: mergeinfo

2011-06-06 Thread Jason Wilkins
Revision: 37264
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37264
Author:   jwilkins
Date: 2011-06-06 18:30:20 + (Mon, 06 Jun 2011)
Log Message:
---
mergeinfo

Property Changed:

branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30564,30670,30694
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-305676
/trunk/blender:36833-37206

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37265] branches/soc-2011-onion/: mergeinfo

2011-06-06 Thread Jason Wilkins
Revision: 37265
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37265
Author:   jwilkins
Date: 2011-06-06 19:03:17 + (Mon, 06 Jun 2011)
Log Message:
---
mergeinfo

Property Changed:

branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-305676
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30676
/trunk/blender:36833-37206

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37266] trunk/blender/source/blender/ editors/object/object_bake.c: Fix for new baker and float images.

2011-06-06 Thread Sergey Sharybin
Revision: 37266
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37266
Author:   nazgul
Date: 2011-06-06 19:06:44 + (Mon, 06 Jun 2011)
Log Message:
---
Fix for new baker and float images. Also removed code used for debugging.

Modified Paths:
--
trunk/blender/source/blender/editors/object/object_bake.c

Modified: trunk/blender/source/blender/editors/object/object_bake.c
===
--- trunk/blender/source/blender/editors/object/object_bake.c   2011-06-06 
19:03:17 UTC (rev 37265)
+++ trunk/blender/source/blender/editors/object/object_bake.c   2011-06-06 
19:06:44 UTC (rev 37266)
@@ -651,6 +651,8 @@
}
}
}
+
+   ibuf-userflags= IB_RECT_INVALID;
 }
 
 static void free_heights_data(void *bake_data)
@@ -685,10 +687,6 @@
 
lores_dm-getFace(lores_dm, face_index, mface);
 
-   if(x==0  y==0) {
-   zero_v3(p0);
-   }
-
st0= mtface[face_index].uv[0];
st1= mtface[face_index].uv[1];
st2= mtface[face_index].uv[2];
@@ -731,6 +729,8 @@
if(ibuf-rect_float) {
float *rrgbf= ibuf-rect_float + pixel*4;
rrgbf[3]= 1.0f;
+
+   ibuf-userflags= IB_RECT_INVALID;
} else {
char *rrgb= (char*)ibuf-rect + pixel*4;
rrgb[3]= 255;
@@ -782,6 +782,8 @@
rrgbf[1]= vec[1];
rrgbf[2]= vec[2];
rrgbf[3]= 1.0f;
+
+   ibuf-userflags= IB_RECT_INVALID;
} else {
char *rrgb= (char*)ibuf-rect + pixel*4;
rrgb[0]= FTOCHAR(vec[0]);

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37267] trunk/blender/source/blender/ editors/object/object_bake.c: One more debug line was deleted from multires bakers.

2011-06-06 Thread Sergey Sharybin
Revision: 37267
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37267
Author:   nazgul
Date: 2011-06-06 19:33:38 + (Mon, 06 Jun 2011)
Log Message:
---
One more debug line was deleted from multires bakers.
Now it would work really fast.

Modified Paths:
--
trunk/blender/source/blender/editors/object/object_bake.c

Modified: trunk/blender/source/blender/editors/object/object_bake.c
===
--- trunk/blender/source/blender/editors/object/object_bake.c   2011-06-06 
19:06:44 UTC (rev 37266)
+++ trunk/blender/source/blender/editors/object/object_bake.c   2011-06-06 
19:33:38 UTC (rev 37267)
@@ -507,12 +507,11 @@
MFace mface;
DMGridData **grid_data;
float crn_x, crn_y;
-   int grid_size, num_grids, S, face_side;
+   int grid_size, S, face_side;
int *grid_offset, g_index;
 
lodm-getFace(lodm, face_index, mface);
 
-   num_grids= hidm-getNumGrids(hidm);
grid_size= hidm-getGridSize(hidm);
grid_data= hidm-getGridData(hidm);
grid_offset= hidm-getGridOffset(hidm);

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37268] branches/soc-2011-onion: Revision: 30692

2011-06-06 Thread Jason Wilkins
Revision: 37268
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37268
Author:   jwilkins
Date: 2011-06-06 19:36:37 + (Mon, 06 Jun 2011)
Log Message:
---
Revision: 30692
Author: nicholasbishop
Date: 12:18:42 PM, Saturday, July 24, 2010
Message:
== VPaint ==

Added partial redraw to vpaint.

Updated the PBVH docs in the wiki to include some info about partial redraw:
http://wiki.blender.org/index.php/Dev:2.5/Source/Modeling/PBVH#Partial_Redraw

* Moved some sculpt-pbvh functions to paint_util for general use
** sculpt_get_redraw_rect - paint_get_redraw_rect
** sculpt_get_redraw_planes - paint_get_redraw_planes
** Some of the code from sculpt_flush_update is now paint_tag_partial_redraw
* Added some debugging code to show the area being redraw during partial redraw
** Draws a box around the area being updated
** Set rt to 444 to see it


** jwilkins:
** made sure that code from trunk, which makes sure shrinking redraw regions 
update correctly, was merged in with these changes

Modified Paths:
--
branches/soc-2011-onion/source/blender/blenkernel/BKE_paint.h
branches/soc-2011-onion/source/blender/blenlib/intern/pbvh.c
branches/soc-2011-onion/source/blender/editors/include/ED_sculpt.h
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_intern.h
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_utils.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_vertex.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
branches/soc-2011-onion/source/blender/editors/space_view3d/drawobject.c
branches/soc-2011-onion/source/blender/editors/space_view3d/view3d_draw.c

Property Changed:

branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30676
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30676,30692
/trunk/blender:36833-37206

Modified: branches/soc-2011-onion/source/blender/blenkernel/BKE_paint.h
===
--- branches/soc-2011-onion/source/blender/blenkernel/BKE_paint.h   
2011-06-06 19:33:38 UTC (rev 37267)
+++ branches/soc-2011-onion/source/blender/blenkernel/BKE_paint.h   
2011-06-06 19:36:37 UTC (rev 37268)
@@ -32,6 +32,8 @@
  *  \ingroup bke
  */
 
+#include DNA_vec_types.h
+
 struct Brush;
 struct MFace;
 struct MultireModifierData;
@@ -104,6 +106,9 @@
 
/* Partial redraw */
int partial_redraw;
+
+   /* previous redraw rect */
+   rcti previous_r;
 } PaintSession;
 
 void create_paintsession(struct Object *ob);

Modified: branches/soc-2011-onion/source/blender/blenlib/intern/pbvh.c
===
--- branches/soc-2011-onion/source/blender/blenlib/intern/pbvh.c
2011-06-06 19:33:38 UTC (rev 37267)
+++ branches/soc-2011-onion/source/blender/blenlib/intern/pbvh.c
2011-06-06 19:36:37 UTC (rev 37268)
@@ -1253,6 +1253,8 @@
if(nodes) MEM_freeN(nodes);
 }
 
+/* get the object-space bounding box containing all the nodes that
+   have been marked with PBVH_UpdateRedraw */
 void BLI_pbvh_redraw_BB(PBVH *bvh, float bb_min[3], float bb_max[3])
 {
PBVHIter iter;

Modified: branches/soc-2011-onion/source/blender/editors/include/ED_sculpt.h
===
--- branches/soc-2011-onion/source/blender/editors/include/ED_sculpt.h  
2011-06-06 19:33:38 UTC (rev 37267)
+++ branches/soc-2011-onion/source/blender/editors/include/ED_sculpt.h  
2011-06-06 19:36:37 UTC (rev 37268)
@@ -41,8 +41,6 @@
 
 /* sculpt.c */
 void ED_operatortypes_sculpt(void);
-void sculpt_get_redraw_planes(float planes[4][4], struct ARegion *ar,
-  struct RegionView3D *rv3d, struct Object 
*ob);
 void ED_sculpt_force_update(struct bContext *C);
 
 void ED_paint_modifiers_changed(struct Object *ob);
@@ -59,6 +57,11 @@
 void ED_undo_paint_free(void);
 int ED_undo_paint_valid(int type, const char *name);
 
+/* paint_util.c */
+void paint_get_redraw_planes(float planes[4][4], struct ARegion *ar,
+struct RegionView3D *rv3d, struct Object *ob);
+
+
 void ED_draw_paint_overlay(const struct bContext *C, struct ARegion *ar);
 void ED_draw_on_surface_cursor(float modelview[16], float projection[16], 
float col[3], float alpha, float size[3], int viewport[4], float location[3], 
float inner_radius, float outer_radius, int brush_size);
 void ED_draw_fixed_overlay_on_surface(float modelview[16], float 
projection[16], float size[3], int viewport[4], float location[3], float 
outer_radius, struct Sculpt *sd, struct Brush *brush, struct ViewContext *vc, 
float 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37269] trunk/blender/release/scripts/ startup/bl_ui/properties_data_mesh.py: UI: rename mesh Settings panel to Texture Space, since it only contains

2011-06-06 Thread Brecht Van Lommel
Revision: 37269
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37269
Author:   blendix
Date: 2011-06-06 19:44:28 + (Mon, 06 Jun 2011)
Log Message:
---
UI: rename mesh Settings panel to Texture Space, since it only contains
settings related to that. Also close by default.

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py
===
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py 
2011-06-06 19:36:37 UTC (rev 37268)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_mesh.py 
2011-06-06 19:44:28 UTC (rev 37269)
@@ -99,8 +99,9 @@
 split.prop(mesh, show_double_sided)
 
 
-class DATA_PT_settings(MeshButtonsPanel, bpy.types.Panel):
-bl_label = Settings
+class DATA_PT_texture_space(MeshButtonsPanel, bpy.types.Panel):
+bl_label = Texture Space
+bl_options = {'DEFAULT_CLOSED'}
 COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
 def draw(self, context):
@@ -109,11 +110,13 @@
 mesh = context.mesh
 
 layout.prop(mesh, texture_mesh)
+
+layout.separator()
+
 layout.prop(mesh, use_auto_texspace)
-
 row = layout.row()
-row.column().prop(mesh, texspace_location)
-row.column().prop(mesh, texspace_size)
+row.column().prop(mesh, texspace_location, text=Location)
+row.column().prop(mesh, texspace_size, text=Size)
 
 class DATA_PT_vertex_groups(MeshButtonsPanel, bpy.types.Panel):
 bl_label = Vertex Groups

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37270] branches/soc-2011-avocado/blender: An operator is added to compute the eigenvalues of the dual graph of a selected mesh in edit mode .

2011-06-06 Thread shuvro sarker
Revision: 37270
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37270
Author:   shuvro
Date: 2011-06-06 19:50:35 + (Mon, 06 Jun 2011)
Log Message:
---
An operator is added to compute the eigenvalues of the dual graph of a selected 
mesh in edit mode. The operator is also added in the User Interface.

Modified Paths:
--

branches/soc-2011-avocado/blender/release/scripts/startup/bl_ui/space_view3d.py

branches/soc-2011-avocado/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py

branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c
branches/soc-2011-avocado/blender/source/blender/editors/mesh/bmesh_tools.c
branches/soc-2011-avocado/blender/source/blender/editors/mesh/mesh_intern.h
branches/soc-2011-avocado/blender/source/blender/editors/mesh/mesh_ops.c

Modified: 
branches/soc-2011-avocado/blender/release/scripts/startup/bl_ui/space_view3d.py
===
--- 
branches/soc-2011-avocado/blender/release/scripts/startup/bl_ui/space_view3d.py 
2011-06-06 19:44:28 UTC (rev 37269)
+++ 
branches/soc-2011-avocado/blender/release/scripts/startup/bl_ui/space_view3d.py 
2011-06-06 19:50:35 UTC (rev 37270)
@@ -1591,6 +1591,9 @@
 layout.operator(mesh.mark_seam, text=Clear Seam).clear = True
 
 layout.separator()
+
+layout.operator(mesh.gen_seam)
+layout.separator()
 
 layout.operator(mesh.mark_sharp)
 layout.operator(mesh.mark_sharp, text=Clear Sharp).clear = True

Modified: 
branches/soc-2011-avocado/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===
--- 
branches/soc-2011-avocado/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
 2011-06-06 19:44:28 UTC (rev 37269)
+++ 
branches/soc-2011-avocado/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
 2011-06-06 19:50:35 UTC (rev 37270)
@@ -151,6 +151,7 @@
 col.operator(wm.call_menu, text=Unwrap).name = VIEW3D_MT_uv_map
 col.operator(mesh.mark_seam)
 col.operator(mesh.mark_seam, text=Clear Seam).clear = True
+col.operator(mesh.gen_seam)
 
 col = layout.column(align=True)
 col.label(text=Shading:)

Modified: 
branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c
===
--- 
branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c  
2011-06-06 19:44:28 UTC (rev 37269)
+++ 
branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c  
2011-06-06 19:50:35 UTC (rev 37270)
@@ -10,8 +10,121 @@
 #include autoseam_C_API.h
 #include stdio.h
 #include stdlib.h
+#include WM_types.h
 
+#include RNA_types.h
+#include RNA_define.h
+#include RNA_access.h
 
+#include DNA_object_types.h
+
+#include BKE_material.h
+#include BKE_context.h
+#include BKE_customdata.h
+#include BKE_DerivedMesh.h
+#include BKE_cdderivedmesh.h
+#include BKE_depsgraph.h
+#include BKE_global.h
+//#include BKE_library.h
+#include BKE_mesh.h
+#include BKE_object.h
+#include BKE_bmesh.h
+#include BKE_report.h
+#include BKE_tessmesh.h
+//#include BKE_texture.h
+#include BKE_main.h
+
+#include ED_screen.h
+
+
+static int compute_dual_graph(BMesh *bm)
+{
+BMEdge *eed;
+BMIter iter, iter2;
+BMLoop *l;
+//int count = 0;
+
+
+//float dummy_dual_graph[10][10];
+int i,face_index[2];
+
+//float dummy_dual_graph[10][10];
+int k,m;
+
+float **dummy_dual_graph = (float **) malloc(10* sizeof(float *));
+
+for(k = 0; k  10; k++ ){
+dummy_dual_graph[k] = (float *) malloc(10 * sizeof(float));
+}
+
+for(k = 0; k  10; k++){
+for(m = 0; m  10; m++){
+dummy_dual_graph[k][m] = 0.0f;
+}
+}
+
+
+for(eed = BMIter_New(iter, bm, BM_EDGES_OF_MESH, bm ); eed; eed= 
BMIter_Step(iter)) 
+{
+/* if not boundary edge */
+if(!BM_Boundary_Edge(eed)){
+
+printf(index : %d\n, eed-head.index);
+i = 0;
+
+BM_ITER(l, iter2, bm, BM_LOOPS_OF_EDGE, eed) {
+
+face_index[i++] = l-f-head.index;
+}
+printf(%d %d, face_index[0], face_index[1]);
+dummy_dual_graph[face_index[0]][face_index[1]] = 1;
+}
+else
+{
+printf(visiting boundary edge.\n);
+}
+}
+
+calculate_eigen(dummy_dual_graph, 10);
+
+free(dummy_dual_graph);
+return 0;
+}
+
+
+static int editbmesh_gen_seam(bContext *C, wmOperator *op)
+{
+Object *obedit= CTX_data_edit_object(C);
+   //Mesh *me= ((Mesh *)obedit-data);
+   BMEditMesh *em= ((Mesh *)obedit-data)-edit_btmesh;
+   BMesh *bm = em-bm;
+   //BMEdge *eed;
+   

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37271] branches/soc-2011-avocado/blender: Fix compile on Windows:

2011-06-06 Thread Andrea Weikert
Revision: 37271
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37271
Author:   elubie
Date: 2011-06-06 20:04:20 + (Mon, 06 Jun 2011)
Log Message:
---
Fix compile on Windows:
DummyClass.c: fixed missing include
BLI_smallhash.h: fixed warning about signed/unsigned - ABS was called on 
unsigned, has no effect (needs to be fixed in bmesh branch as well)
autoseam_tools.c: Variable declaration not at beginning of a block.

Modified Paths:
--
branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.cpp
branches/soc-2011-avocado/blender/source/blender/blenlib/BLI_smallhash.h

branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c

Modified: branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.cpp
===
--- branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.cpp
2011-06-06 19:50:35 UTC (rev 37270)
+++ branches/soc-2011-avocado/blender/intern/autoseam/DummyClass.cpp
2011-06-06 20:04:20 UTC (rev 37271)
@@ -2,6 +2,7 @@
 #include Eigen/Dense
 #include Eigen/Eigenvalues 
 
+#include iostream
 
 #include DummyClass.h
 

Modified: 
branches/soc-2011-avocado/blender/source/blender/blenlib/BLI_smallhash.h
===
--- branches/soc-2011-avocado/blender/source/blender/blenlib/BLI_smallhash.h
2011-06-06 19:50:35 UTC (rev 37270)
+++ branches/soc-2011-avocado/blender/source/blender/blenlib/BLI_smallhash.h
2011-06-06 20:04:20 UTC (rev 37271)
@@ -100,7 +100,7 @@
 {
int h, hoff=1;
 
-   key = ABS(key);
+   /* key = ABS(key); */
 
if (hash-size  hash-used*3) {
int newsize = hashsizes[++hash-curhash];
@@ -156,7 +156,7 @@
 {
int h, hoff=1;
 
-   key = ABS(key);
+   /* key = ABS(key); */
h = key;

while (hash-table[h % hash-size].key != key 
@@ -176,7 +176,7 @@
 {
int h, hoff=1;
 
-   key = ABS(key);
+   /* key = ABS(key); */
h = key;

if (!hash-table)
@@ -196,9 +196,11 @@
 
 BM_INLINE int BLI_smallhash_haskey(SmallHash *hash, uintptr_t key)
 {
-   int h = ABS(key), hoff=1;
-   key = ABS(key);
-   
+   int hoff=1;
+   int h;
+   /* key = ABS(key); */
+   h = key;
+
if (!hash-table)
return 0;


Modified: 
branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c
===
--- 
branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c  
2011-06-06 19:50:35 UTC (rev 37270)
+++ 
branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c  
2011-06-06 20:04:20 UTC (rev 37271)
@@ -139,7 +139,8 @@
 void calculate_eigen(float **dual_graph, int dimension)
 {
 int i,j,k;
-
+AUTOSEAM_DummyClassHandle handle = autoseam_create_dummyclass();
+
 float **array = (float **) malloc(dimension* sizeof(float *));
 
 for(k = 0; k  dimension; k++ ){
@@ -154,7 +155,7 @@
 }
 printf(\n);
 }
-AUTOSEAM_DummyClassHandle handle = autoseam_create_dummyclass();
+
 autoseam_calculate_eigen(handle, array, dimension);
 }
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37272] trunk/blender/release/scripts/ startup/bl_ui/properties_render.py: UI: fix render properties panel order, it didn't match order in startup.ble

2011-06-06 Thread Brecht Van Lommel
Revision: 37272
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37272
Author:   blendix
Date: 2011-06-06 20:04:58 + (Mon, 06 Jun 2011)
Log Message:
---
UI: fix render properties panel order, it didn't match order in startup.blend,
so was different when opening a new property editor.

Modified Paths:
--
trunk/blender/release/scripts/startup/bl_ui/properties_render.py

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_render.py
===
--- trunk/blender/release/scripts/startup/bl_ui/properties_render.py
2011-06-06 20:04:20 UTC (rev 37271)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_render.py
2011-06-06 20:04:58 UTC (rev 37272)
@@ -172,8 +172,130 @@
 row.prop(rl, exclude_refraction, text=)
 
 
+class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
+bl_label = Dimensions
+COMPAT_ENGINES = {'BLENDER_RENDER'}
+
+def draw(self, context):
+layout = self.layout
+
+scene = context.scene
+rd = scene.render
+
+row = layout.row(align=True)
+row.menu(RENDER_MT_presets, 
text=bpy.types.RENDER_MT_presets.bl_label)
+row.operator(render.preset_add, text=, icon=ZOOMIN)
+row.operator(render.preset_add, text=, 
icon=ZOOMOUT).remove_active = True
+
+split = layout.split()
+
+col = split.column()
+sub = col.column(align=True)
+sub.label(text=Resolution:)
+sub.prop(rd, resolution_x, text=X)
+sub.prop(rd, resolution_y, text=Y)
+sub.prop(rd, resolution_percentage, text=)
+
+sub.label(text=Aspect Ratio:)
+sub.prop(rd, pixel_aspect_x, text=X)
+sub.prop(rd, pixel_aspect_y, text=Y)
+
+row = col.row()
+row.prop(rd, use_border, text=Border)
+sub = row.row()
+sub.active = rd.use_border
+sub.prop(rd, use_crop_to_border, text=Crop)
+
+col = split.column()
+sub = col.column(align=True)
+sub.label(text=Frame Range:)
+sub.prop(scene, frame_start, text=Start)
+sub.prop(scene, frame_end, text=End)
+sub.prop(scene, frame_step, text=Step)
+
+sub.label(text=Frame Rate:)
+if rd.fps_base == 1:
+fps_rate = round(rd.fps / rd.fps_base)
+else:
+fps_rate = round(rd.fps / rd.fps_base, 2)
+
+# TODO: Change the following to iterate over existing presets
+custom_framerate = (fps_rate not in {23.98, 24, 25, 29.97, 30, 50, 
59.94, 60})
+
+if custom_framerate == True:
+fps_label_text = Custom ( + str(fps_rate) +  fps)
+else:
+fps_label_text = str(fps_rate) +  fps
+
+sub.menu(RENDER_MT_framerate_presets, text=fps_label_text)
+
+if custom_framerate or (bpy.types.RENDER_MT_framerate_presets.bl_label 
== Custom):
+sub.prop(rd, fps)
+sub.prop(rd, fps_base, text=/)
+subrow = sub.row(align=True)
+subrow.label(text=Time Remapping:)
+subrow = sub.row(align=True)
+subrow.prop(rd, frame_map_old, text=Old)
+subrow.prop(rd, frame_map_new, text=New)
+
+
+class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel):
+bl_label = Anti-Aliasing
+COMPAT_ENGINES = {'BLENDER_RENDER'}
+
+def draw_header(self, context):
+rd = context.scene.render
+
+self.layout.prop(rd, use_antialiasing, text=)
+
+def draw(self, context):
+layout = self.layout
+
+rd = context.scene.render
+layout.active = rd.use_antialiasing
+
+split = layout.split()
+
+col = split.column()
+col.row().prop(rd, antialiasing_samples, expand=True)
+sub = col.row()
+sub.enabled = not rd.use_border
+sub.prop(rd, use_full_sample)
+
+col = split.column()
+col.prop(rd, pixel_filter_type, text=)
+col.prop(rd, filter_size, text=Size)
+
+
+class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel):
+bl_label = Sampled Motion Blur
+bl_options = {'DEFAULT_CLOSED'}
+COMPAT_ENGINES = {'BLENDER_RENDER'}
+
+@classmethod
+def poll(cls, context):
+rd = context.scene.render
+return not rd.use_full_sample and (rd.engine in cls.COMPAT_ENGINES)
+
+def draw_header(self, context):
+rd = context.scene.render
+
+self.layout.prop(rd, use_motion_blur, text=)
+
+def draw(self, context):
+layout = self.layout
+
+rd = context.scene.render
+layout.active = rd.use_motion_blur
+
+row = layout.row()
+row.prop(rd, motion_blur_samples)
+row.prop(rd, motion_blur_shutter)
+
+
 class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel):
 bl_label = Shading
+bl_options = {'DEFAULT_CLOSED'}
 COMPAT_ENGINES = {'BLENDER_RENDER'}
 
 def draw(self, context):
@@ -276,6 +398,51 @@
 sub.prop(rd, 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37273] branches/cycles/source/blender/ editors: Cycles: UI tweak some quick code to auto hide scrollbars.

2011-06-06 Thread Brecht Van Lommel
Revision: 37273
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37273
Author:   blendix
Date: 2011-06-06 20:07:08 + (Mon, 06 Jun 2011)
Log Message:
---
Cycles: UI tweak some quick code to auto hide scrollbars. Not happy with this
yet because it runs python draw functions twice when scrollers are showing.

Modified Paths:
--
branches/cycles/source/blender/editors/include/UI_interface.h
branches/cycles/source/blender/editors/interface/interface_panel.c
branches/cycles/source/blender/editors/interface/interface_style.c
branches/cycles/source/blender/editors/interface/view2d.c
branches/cycles/source/blender/editors/screen/area.c

Modified: branches/cycles/source/blender/editors/include/UI_interface.h
===
--- branches/cycles/source/blender/editors/include/UI_interface.h   
2011-06-06 20:04:58 UTC (rev 37272)
+++ branches/cycles/source/blender/editors/include/UI_interface.h   
2011-06-06 20:07:08 UTC (rev 37273)
@@ -583,6 +583,7 @@
 
 void uiBeginPanels(const struct bContext *C, struct ARegion *ar);
 void uiEndPanels(const struct bContext *C, struct ARegion *ar);
+void uiDrawPanels(const struct bContext *C, struct ARegion *ar);
 
 struct Panel *uiBeginPanel(struct ScrArea *sa, struct ARegion *ar, uiBlock 
*block, struct PanelType *pt, int *open);
 void uiEndPanel(uiBlock *block, int width, int height);

Modified: branches/cycles/source/blender/editors/interface/interface_panel.c
===
--- branches/cycles/source/blender/editors/interface/interface_panel.c  
2011-06-06 20:04:58 UTC (rev 37272)
+++ branches/cycles/source/blender/editors/interface/interface_panel.c  
2011-06-06 20:07:08 UTC (rev 37273)
@@ -846,7 +846,12 @@

if(firstpa)
firstpa-runtime_flag |= PNL_FIRST;
+}
 
+void uiDrawPanels(const bContext *C, ARegion *ar)
+{
+   uiBlock *block;
+
UI_ThemeClearColor(TH_BACK);

/* draw panels, selected on top */

Modified: branches/cycles/source/blender/editors/interface/interface_style.c
===
--- branches/cycles/source/blender/editors/interface/interface_style.c  
2011-06-06 20:04:58 UTC (rev 37272)
+++ branches/cycles/source/blender/editors/interface/interface_style.c  
2011-06-06 20:07:08 UTC (rev 37273)
@@ -122,7 +122,7 @@
style-buttonspacex= 8;
style-buttonspacey= 2;
style-panelspace= 8;
-   style-panelouter= 4;
+   style-panelouter= 3;

return style;
 }

Modified: branches/cycles/source/blender/editors/interface/view2d.c
===
--- branches/cycles/source/blender/editors/interface/view2d.c   2011-06-06 
20:04:58 UTC (rev 37272)
+++ branches/cycles/source/blender/editors/interface/view2d.c   2011-06-06 
20:07:08 UTC (rev 37273)
@@ -278,10 +278,9 @@
v2d-align= 
(V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_POS_Y);
v2d-keeptot= V2D_KEEPTOT_BOUNDS;

-   /*v2d-scroll |= 
(V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
+   v2d-scroll |= 
(V2D_SCROLL_RIGHT|V2D_SCROLL_BOTTOM);
v2d-scroll |= V2D_SCROLL_HORIZONTAL_HIDE;
-   v2d-scroll = ~V2D_SCROLL_VERTICAL_HIDE;*/
-   v2d-scroll= 0;
+   v2d-scroll = ~V2D_SCROLL_VERTICAL_HIDE;
 
v2d-tot.xmin= 0.0f;
v2d-tot.xmax= winx;
@@ -291,7 +290,7 @@

v2d-cur.xmin= 0.0f;
/* bad workaround for keeping zoom level with 
scrollers */
-   v2d-cur.xmax= (winx/* - 
V2D_SCROLL_WIDTH*/)*panelzoom;
+   v2d-cur.xmax= (winx - 
V2D_SCROLL_WIDTH)*panelzoom;

v2d-cur.ymax= 0.0f;
v2d-cur.ymin= (-winy)*panelzoom;

Modified: branches/cycles/source/blender/editors/screen/area.c
===
--- branches/cycles/source/blender/editors/screen/area.c2011-06-06 
20:04:58 UTC (rev 37272)
+++ branches/cycles/source/blender/editors/screen/area.c2011-06-06 
20:07:08 UTC (rev 37273)
@@ -1145,38 +1145,22 @@
 
 / standard UI regions /
 
-void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char 
*context, int contextnr)
+static void region_panels_layout(const bContext *C, ARegion *ar, int vertical, 
const char *context, int w, int em, int *r_x, int *r_y)
 {
ScrArea *sa= 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37274] branches/merwin-spacenav/: clean branch for spacenav/ndof/3D mouse integration

2011-06-06 Thread Mike Erwin
Revision: 37274
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37274
Author:   merwin
Date: 2011-06-06 20:53:58 + (Mon, 06 Jun 2011)
Log Message:
---
clean branch for spacenav/ndof/3D mouse integration

Added Paths:
---
branches/merwin-spacenav/

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37275] branches/soc-2011-avocado: Merge from branches/bmesh r36841 bis r37274

2011-06-06 Thread Andrea Weikert
Revision: 37275
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37275
Author:   elubie
Date: 2011-06-06 22:09:40 + (Mon, 06 Jun 2011)
Log Message:
---
Merge from branches/bmesh r36841 bis r37274
* synch to bmesh branch

Revision Links:
--

http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36841

http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37274

Modified Paths:
--
branches/soc-2011-avocado/blender/CMakeLists.txt

branches/soc-2011-avocado/blender/build_files/cmake/cmake_netbeans_project.py

branches/soc-2011-avocado/blender/build_files/cmake/cmake_qtcreator_project.py
branches/soc-2011-avocado/blender/build_files/cmake/macros.cmake
branches/soc-2011-avocado/blender/build_files/cmake/project_info.py
branches/soc-2011-avocado/blender/build_files/scons/tools/Blender.py
branches/soc-2011-avocado/blender/build_files/scons/tools/btools.py

branches/soc-2011-avocado/blender/doc/python_api/examples/bpy.types.BlendDataLibraries.load.py
branches/soc-2011-avocado/blender/doc/python_api/sphinx_doc_gen.py
branches/soc-2011-avocado/blender/extern/binreloc/CMakeLists.txt
branches/soc-2011-avocado/blender/extern/bullet2/CMakeLists.txt

branches/soc-2011-avocado/blender/extern/bullet2/src/BulletCollision/BroadphaseCollision/btAxisSweep3.h

branches/soc-2011-avocado/blender/extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp
branches/soc-2011-avocado/blender/extern/eltopo/CMakeLists.txt
branches/soc-2011-avocado/blender/extern/glew/CMakeLists.txt
branches/soc-2011-avocado/blender/extern/libopenjpeg/CMakeLists.txt
branches/soc-2011-avocado/blender/extern/libredcode/CMakeLists.txt
branches/soc-2011-avocado/blender/extern/lzma/CMakeLists.txt
branches/soc-2011-avocado/blender/extern/lzo/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/audaspace/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/audaspace/SConscript

branches/soc-2011-avocado/blender/intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp
branches/soc-2011-avocado/blender/intern/boolop/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/bsp/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/bsp/SConscript
branches/soc-2011-avocado/blender/intern/container/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/container/CTR_TaggedIndex.h
branches/soc-2011-avocado/blender/intern/decimation/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/decimation/SConscript
branches/soc-2011-avocado/blender/intern/elbeem/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/ghost/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/ghost/intern/GHOST_SystemX11.cpp
branches/soc-2011-avocado/blender/intern/ghost/intern/GHOST_WindowCocoa.mm
branches/soc-2011-avocado/blender/intern/ghost/intern/GHOST_WindowX11.cpp
branches/soc-2011-avocado/blender/intern/ghost/intern/GHOST_WindowX11.h
branches/soc-2011-avocado/blender/intern/guardedalloc/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/iksolver/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/itasc/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/memutil/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/mikktspace/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/moto/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/opennl/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/smoke/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/string/CMakeLists.txt
branches/soc-2011-avocado/blender/intern/tools/ui_snapshot.py

branches/soc-2011-avocado/blender/release/scripts/modules/bpy_extras/image_utils.py

branches/soc-2011-avocado/blender/release/scripts/modules/bpy_extras/io_utils.py

branches/soc-2011-avocado/blender/release/scripts/modules/bpy_extras/mesh_utils.py

branches/soc-2011-avocado/blender/release/scripts/modules/bpy_extras/object_utils.py

branches/soc-2011-avocado/blender/release/scripts/modules/bpy_extras/view3d_utils.py
branches/soc-2011-avocado/blender/release/scripts/modules/bpy_types.py

branches/soc-2011-avocado/blender/release/scripts/startup/bl_operators/mesh.py

branches/soc-2011-avocado/blender/release/scripts/startup/bl_operators/uvcalc_follow_active.py
branches/soc-2011-avocado/blender/release/scripts/startup/bl_operators/wm.py
branches/soc-2011-avocado/blender/release/scripts/startup/bl_ui/__init__.py

branches/soc-2011-avocado/blender/release/scripts/startup/bl_ui/properties_data_empty.py

branches/soc-2011-avocado/blender/release/scripts/startup/bl_ui/properties_object_constraint.py

branches/soc-2011-avocado/blender/release/scripts/startup/bl_ui/properties_particle.py


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37276] trunk/blender/source/blender: fix for float projection painting, now updating correctly.

2011-06-06 Thread Ryakiotakis Antonis
Revision: 37276
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37276
Author:   psy-fi
Date: 2011-06-06 22:10:05 + (Mon, 06 Jun 2011)
Log Message:
---
fix for float projection painting, now updating correctly. 

This fix also allows for partial update of the image, speeding up painting. 
The different code path implemented will be used to upload high resolution 
images to OpenGL when onion branch is merged.
Due to conversion of float textures to/from sRGB, corrections made to brush 
color sampling to take account of the image profile. This is not 100% correct 
yet as texture images used for projection painting strokes are not converted 
to/from sRGB yet(This has been decided due to loss of precision for 8-bit 
formats). It will have to do for now, though.

last-minute update, exr image loading is broken, will fix asap

Modified Paths:
--
trunk/blender/source/blender/blenkernel/BKE_brush.h
trunk/blender/source/blender/blenkernel/intern/brush.c
trunk/blender/source/blender/blenlib/BLI_math_vector.h
trunk/blender/source/blender/blenlib/BLI_utildefines.h
trunk/blender/source/blender/blenlib/intern/math_vector_inline.c
trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
trunk/blender/source/blender/gpu/intern/gpu_draw.c
trunk/blender/source/blender/imbuf/IMB_imbuf.h
trunk/blender/source/blender/imbuf/intern/divers.c

Modified: trunk/blender/source/blender/blenkernel/BKE_brush.h
===
--- trunk/blender/source/blender/blenkernel/BKE_brush.h 2011-06-06 22:09:40 UTC 
(rev 37275)
+++ trunk/blender/source/blender/blenkernel/BKE_brush.h 2011-06-06 22:10:05 UTC 
(rev 37276)
@@ -71,7 +71,7 @@
 /* sampling */
 void brush_sample_tex(struct Brush *brush, float *xy, float *rgba, const int 
thread);
 void brush_imbuf_new(struct Brush *brush, short flt, short texfalloff, int 
size,
-   struct ImBuf **imbuf);
+   struct ImBuf **imbuf, int use_color_correction);
 
 /* painting */
 struct BrushPainter;
@@ -82,7 +82,7 @@
 void brush_painter_require_imbuf(BrushPainter *painter, short flt,
short texonly, int size);
 int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos,
-   double time, float pressure, void *user);
+   double time, float pressure, void *user, int use_color_correction);
 void brush_painter_break_stroke(BrushPainter *painter);
 void brush_painter_free(BrushPainter *painter);
 

Modified: trunk/blender/source/blender/blenkernel/intern/brush.c
===
--- trunk/blender/source/blender/blenkernel/intern/brush.c  2011-06-06 
22:09:40 UTC (rev 37275)
+++ trunk/blender/source/blender/blenkernel/intern/brush.c  2011-06-06 
22:10:05 UTC (rev 37276)
@@ -521,7 +521,7 @@
 }
 
 
-void brush_imbuf_new(Brush *brush, short flt, short texfall, int bufsize, 
ImBuf **outbuf)
+void brush_imbuf_new(Brush *brush, short flt, short texfall, int bufsize, 
ImBuf **outbuf, int use_color_correction)
 {
ImBuf *ibuf;
float xy[2], dist, rgba[4], *dstf;
@@ -529,7 +529,8 @@
const int radius= brush_size(brush);
char *dst, crgb[3];
const float alpha= brush_alpha(brush);
-
+   float brush_rgb[3];
+
imbflag= (flt)? IB_rectfloat: IB_rect;
xoff = -bufsize/2.0f + 0.5f;
yoff = -bufsize/2.0f + 0.5f;
@@ -541,6 +542,11 @@
ibuf= IMB_allocImBuf(bufsize, bufsize, 32, imbflag);
 
if (flt) {
+   copy_v3_v3(brush_rgb, brush-rgb);
+   if(use_color_correction){
+   srgb_to_linearrgb_v3_v3(brush_rgb, brush_rgb);
+   }
+
for (y=0; y  ibuf-y; y++) {
dstf = ibuf-rect_float + y*rowbytes;
 
@@ -551,7 +557,7 @@
if (texfall == 0) {
dist = sqrt(xy[0]*xy[0] + xy[1]*xy[1]);
 
-   VECCOPY(dstf, brush-rgb);
+   VECCOPY(dstf, brush_rgb);
dstf[3]= 
alpha*brush_curve_strength_clamp(brush, dist, radius);
}
else if (texfall == 1) {
@@ -561,10 +567,7 @@
dist = sqrt(xy[0]*xy[0] + xy[1]*xy[1]);
 
brush_sample_tex(brush, xy, rgba, 0);
-
-   dstf[0] = rgba[0]*brush-rgb[0];
-   dstf[1] = rgba[1]*brush-rgb[1];
-   dstf[2] = rgba[2]*brush-rgb[2];
+   mul_v3_v3v3(dstf, rgba, brush_rgb);
dstf[3] = 
rgba[3]*alpha*brush_curve_strength_clamp(brush, dist, radius);
}
}
@@ 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37277] branches/soc-2011-onion: Revision: 30693

2011-06-06 Thread Jason Wilkins
Revision: 37277
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37277
Author:   jwilkins
Date: 2011-06-06 22:25:28 + (Mon, 06 Jun 2011)
Log Message:
---
Revision: 30693
Author: nicholasbishop
Date: 1:05:33 PM, Saturday, July 24, 2010
Message:
== Multires ==

Some refactoring to support vpaint

* For multires_mark_as_modified, make sure the DM is a CCGDM first
* Make the gridkey a parameter to various functions, rather than using the same 
one everywhere.
** Most important, when doing a multires update, enforces use of the same 
gridkey as the DM its updating from.

Modified Paths:
--
branches/soc-2011-onion/source/blender/blenkernel/BKE_multires.h
branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c
branches/soc-2011-onion/source/blender/modifiers/intern/MOD_multires.c

Property Changed:

branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30676,30692
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30676,30692-30693
/trunk/blender:36833-37206

Modified: branches/soc-2011-onion/source/blender/blenkernel/BKE_multires.h
===
--- branches/soc-2011-onion/source/blender/blenkernel/BKE_multires.h
2011-06-06 22:10:05 UTC (rev 37276)
+++ branches/soc-2011-onion/source/blender/blenkernel/BKE_multires.h
2011-06-06 22:25:28 UTC (rev 37277)
@@ -35,6 +35,7 @@
  */
 
 struct DerivedMesh;
+struct GridKey;
 struct Mesh;
 struct MFace;
 struct Multires;
@@ -50,10 +51,11 @@
 void multires_force_render_update(struct Object *ob);
 void multires_force_external_reload(struct Object *ob);
 
+/* note: gridkey can be NULL, will provide a context-sensitive default */
 void multiresModifier_set_levels_from_disps(struct MultiresModifierData *mmd, 
struct Object *ob);
 
 struct DerivedMesh *multires_dm_create_from_derived(struct 
MultiresModifierData*,
-   int local_mmd, struct DerivedMesh*, struct Object *, int, int);
+   int local_mmd, struct DerivedMesh*, struct Object *, struct GridKey *, 
int, int);
 
 struct MultiresModifierData *find_multires_modifier_before(struct Scene *scene,
struct ModifierData *lastmd);

Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c
===
--- branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c 
2011-06-06 22:10:05 UTC (rev 37276)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c 
2011-06-06 22:25:28 UTC (rev 37277)
@@ -162,8 +162,10 @@
 
 void multires_mark_as_modified(Object *ob)
 {
-   if(ob  ob-derivedFinal)
-   multires_dm_mark_as_modified(ob-derivedFinal);
+   DerivedMesh *dm = ob-derivedFinal;
+
+   if(ob  dm  dm-type == DM_TYPE_CCGDM)
+   multires_dm_mark_as_modified(dm);
 }
 
 void multires_force_update(Object *ob)
@@ -491,7 +493,9 @@
multires_set_tot_level(ob, mmd, lvl);
 }
 
-static DerivedMesh *multires_dm_create_local(Object *ob, DerivedMesh *dm, int 
lvl, int totlvl, int simple)
+static DerivedMesh *multires_dm_create_local(Object *ob, DerivedMesh *dm,
+GridKey *gridkey, int lvl,
+int totlvl, int simple)
 {
MultiresModifierData mmd= {{NULL}};
 
@@ -501,13 +505,15 @@
mmd.totlvl = totlvl;
mmd.simple = simple;
 
-   return multires_dm_create_from_derived(mmd, 1, dm, ob, 0, 0);
+   return multires_dm_create_from_derived(mmd, 1, dm, ob, gridkey, 0, 0);
 }
 
-static DerivedMesh *subsurf_dm_create_local(Object *ob, DerivedMesh *dm, int 
lvl, int simple, int optimal)
+static DerivedMesh *subsurf_dm_create_local(Object *ob, DerivedMesh *dm,
+   GridKey *gridkey, int lvl,
+   int simple, int optimal)
 {
SubsurfModifierData smd= {{NULL}};
-   GridKey gridkey;
+   GridKey default_gridkey;
int color_totlayer;
int pmask_totlayer;
 
@@ -518,14 +524,17 @@
if(optimal)
smd.flags |= eSubsurfModifierFlag_ControlEdges;
 
+   if(!gridkey) {
/* TODO: enable/disable element types */
color_totlayer = CustomData_number_of_layers(get_mesh(ob)-fdata,
 CD_MCOL);
pmask_totlayer = CustomData_number_of_layers(get_mesh(ob)-vdata,
 CD_PAINTMASK);
-   GRIDELEM_KEY_INIT(gridkey, 1, color_totlayer, pmask_totlayer, 1);
+   GRIDELEM_KEY_INIT(default_gridkey, 1, color_totlayer, 
pmask_totlayer, 1);
+   

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37278] branches/soc-2011-avocado/blender/ intern/autoseam/CMakeLists.txt: compile fix: new parameter added to blender_add_lib

2011-06-06 Thread Andrea Weikert
Revision: 37278
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37278
Author:   elubie
Date: 2011-06-06 22:27:35 + (Mon, 06 Jun 2011)
Log Message:
---
compile fix: new parameter added to blender_add_lib

Modified Paths:
--
branches/soc-2011-avocado/blender/intern/autoseam/CMakeLists.txt

Modified: branches/soc-2011-avocado/blender/intern/autoseam/CMakeLists.txt
===
--- branches/soc-2011-avocado/blender/intern/autoseam/CMakeLists.txt
2011-06-06 22:25:28 UTC (rev 37277)
+++ branches/soc-2011-avocado/blender/intern/autoseam/CMakeLists.txt
2011-06-06 22:27:35 UTC (rev 37278)
@@ -35,4 +35,4 @@
autoseam_C_API.h
 )
 
-blender_add_lib(bf_intern_autoseam ${SRC} ${INC})
+blender_add_lib(bf_intern_autoseam ${SRC} ${INC} ${INC_SYS})

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37279] branches/soc-2011-onion/source/ blender/blenkernel/intern/multires.c: whitespace

2011-06-06 Thread Jason Wilkins
Revision: 37279
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37279
Author:   jwilkins
Date: 2011-06-06 22:31:49 + (Mon, 06 Jun 2011)
Log Message:
---
whitespace

Modified Paths:
--
branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c

Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c
===
--- branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c 
2011-06-06 22:27:35 UTC (rev 37278)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c 
2011-06-06 22:31:49 UTC (rev 37279)
@@ -525,10 +525,10 @@
smd.flags |= eSubsurfModifierFlag_ControlEdges;
 
if(!gridkey) {
-   /* TODO: enable/disable element types */
-   color_totlayer = CustomData_number_of_layers(get_mesh(ob)-fdata,
+   /* TODO: enable/disable element types */
+   color_totlayer = 
CustomData_number_of_layers(get_mesh(ob)-fdata,
 CD_MCOL);
-   pmask_totlayer = CustomData_number_of_layers(get_mesh(ob)-vdata,
+   pmask_totlayer = 
CustomData_number_of_layers(get_mesh(ob)-vdata,
 CD_PAINTMASK);
GRIDELEM_KEY_INIT(default_gridkey, 1, color_totlayer, 
pmask_totlayer, 1);
gridkey = default_gridkey;

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37280] trunk/blender/source/blender/ editors/sculpt_paint/paint_image.c: A line of code -can- wreck your day.

2011-06-06 Thread Ryakiotakis Antonis
Revision: 37280
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37280
Author:   psy-fi
Date: 2011-06-06 23:19:25 + (Mon, 06 Jun 2011)
Log Message:
---
A line of code -can- wreck your day. Should work now, :)

Modified Paths:
--
trunk/blender/source/blender/editors/sculpt_paint/paint_image.c

Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c
===
--- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 
2011-06-06 22:31:49 UTC (rev 37279)
+++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 
2011-06-06 23:19:25 UTC (rev 37280)
@@ -3706,7 +3706,7 @@
}
else {
if(use_color_correction){
-   srgb_to_linearrgb_v3_v3(rgba, rgba);
+   srgb_to_linearrgb_v3_v3(rgba, ps-brush-rgb);
}
else {
VECCOPY(rgba, ps-brush-rgb);

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37281] branches/soc-2011-onion: Revision: 30696

2011-06-06 Thread Jason Wilkins
Revision: 37281
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37281
Author:   jwilkins
Date: 2011-06-06 23:28:08 + (Mon, 06 Jun 2011)
Log Message:
---
Revision: 30696
Author: nicholasbishop
Date: 3:33:35 PM, Saturday, July 24, 2010
Message:
== Multires/VPaint ==

Enable multires painting.

* Added operator/RNA/UI to toggle multires for vertex colors. (UI is not great 
right now, just a button in mesh data properties.)
* Added layer names to GridKey. These are used (in combination with CD type) to 
identify the source layer from CustomData.
* Changed default mcol to white with alpha=0
* Renamed CD_FACEGRID to CD_GRIDS, removed CD_DISP
* Added a new CustomDataMultires type (CD_GRIDS), which stores layered data 
like CustomData. However, it only stores float types, and is very simplified.
* Reworked PaintMask to use the new CD multires stuff, also used for vertex 
colors.
* Started changing vpaint to internally use floats.
* Layering support for multires vpaint. Layer alpha is used to combine the 
output.

TODO:
* Doesn't handle layer renaming yet (so if you rename your mcol layer, it'll 
disassociate from the multires data)
* Layers for non-multires vpaint
* Default mcol layer in the startup blend has full alpha, so for testing layers 
you have to delete the default mcol layer and add new ones.
* Multires level in vpaint is controlled by the Preview level

Modified Paths:
--

branches/soc-2011-onion/release/scripts/startup/bl_ui/properties_data_mesh.py
branches/soc-2011-onion/source/blender/blenkernel/BKE_customdata.h
branches/soc-2011-onion/source/blender/blenkernel/BKE_dmgrid.h
branches/soc-2011-onion/source/blender/blenkernel/intern/CCGSubSurf.c
branches/soc-2011-onion/source/blender/blenkernel/intern/customdata.c
branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c
branches/soc-2011-onion/source/blender/blenkernel/intern/subsurf_ccg.c
branches/soc-2011-onion/source/blender/blenlib/BLI_pbvh.h
branches/soc-2011-onion/source/blender/blenlib/intern/pbvh.c
branches/soc-2011-onion/source/blender/blenloader/intern/readfile.c
branches/soc-2011-onion/source/blender/blenloader/intern/writefile.c
branches/soc-2011-onion/source/blender/editors/mesh/mesh_data.c
branches/soc-2011-onion/source/blender/editors/mesh/mesh_intern.h
branches/soc-2011-onion/source/blender/editors/mesh/mesh_ops.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_mask.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_vertex.c
branches/soc-2011-onion/source/blender/gpu/intern/gpu_buffers.c
branches/soc-2011-onion/source/blender/makesdna/DNA_customdata_types.h
branches/soc-2011-onion/source/blender/makesrna/intern/rna_mesh.c

Property Changed:

branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30676,30692-30693
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30676,30692-30693,30696
/trunk/blender:36833-37206

Modified: 
branches/soc-2011-onion/release/scripts/startup/bl_ui/properties_data_mesh.py
===
--- 
branches/soc-2011-onion/release/scripts/startup/bl_ui/properties_data_mesh.py   
2011-06-06 23:19:25 UTC (rev 37280)
+++ 
branches/soc-2011-onion/release/scripts/startup/bl_ui/properties_data_mesh.py   
2011-06-06 23:28:08 UTC (rev 37281)
@@ -350,7 +350,12 @@
 if lay:
 layout.prop(lay, name)
 
+if lay.multiresolution:
+layout.operator(mesh.vertex_color_multiresolution_toggle, 
text=Remove Multires)
+else:
+layout.operator(mesh.vertex_color_multiresolution_toggle, 
text=Add Multires)
 
+
 class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, 
bpy.types.Panel):
 COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 _context_path = object.data

Modified: branches/soc-2011-onion/source/blender/blenkernel/BKE_customdata.h
===
--- branches/soc-2011-onion/source/blender/blenkernel/BKE_customdata.h  
2011-06-06 23:19:25 UTC (rev 37280)
+++ branches/soc-2011-onion/source/blender/blenkernel/BKE_customdata.h  
2011-06-06 23:28:08 UTC (rev 37281)
@@ -43,6 +43,7 @@
 struct ID;
 struct CustomData;
 struct CustomDataLayer;
+struct CustomDataMultires;
 typedef unsigned int CustomDataMask;
 
 extern const CustomDataMask CD_MASK_BAREMESH;
@@ -243,6 +244,8 @@
 int CustomData_get_clone_layer(const struct CustomData *data, int type);
 int CustomData_get_stencil_layer(const struct CustomData *data, int type);
 
+char *CustomData_get_layer_name_at_offset(const struct 

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37282] branches/soc-2011-pepper/source/ gameengine/Ketsji/BL_Action.cpp: BGE Animations: Removing some redundant pose copies from BL_Action.

2011-06-06 Thread Mitchell Stokes
Revision: 37282
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37282
Author:   moguri
Date: 2011-06-06 23:35:24 + (Mon, 06 Jun 2011)
Log Message:
---
BGE Animations: Removing some redundant pose copies from BL_Action.

Modified Paths:
--
branches/soc-2011-pepper/source/gameengine/Ketsji/BL_Action.cpp

Modified: branches/soc-2011-pepper/source/gameengine/Ketsji/BL_Action.cpp
===
--- branches/soc-2011-pepper/source/gameengine/Ketsji/BL_Action.cpp 
2011-06-06 23:28:08 UTC (rev 37281)
+++ branches/soc-2011-pepper/source/gameengine/Ketsji/BL_Action.cpp 
2011-06-06 23:35:24 UTC (rev 37282)
@@ -187,14 +187,9 @@
 
if (m_obj-GetGameObjectType() == SCA_IObject::OBJ_ARMATURE)
{
-   bPose* prev_pose = NULL;
BL_ArmatureObject *obj = (BL_ArmatureObject*)m_obj;
obj-GetPose(m_pose);
 
-   // Save the old pose if we need to do some layer blending
-   if (m_blendmode != ACT_BLEND_NONE)
-   obj-GetMRDPose(prev_pose);
-
// Extract the pose from the action
{
struct PointerRNA id_ptr;
@@ -208,17 +203,6 @@
arm-pose = temp;
}
 
-   // Handle blending between layers
-   switch(m_blendmode)
-   {
-   case ACT_BLEND_MIX:
-   game_blend_poses(m_pose, prev_pose, 0.5f);
-   break;
-   case ACT_BLEND_NONE:
-   default:
-   break;
-   }
-
// Handle blending between actions
if (m_blendin  m_blendframem_blendin)
{
@@ -239,21 +223,10 @@
if (m_blendframem_blendin)
m_blendframe = m_blendin;
}
-   else
-   {
-   if (m_blendpose)
-   {
-   game_free_pose(m_blendpose);
-   m_blendpose = NULL;
-   }
-   }
 
obj-SetPose(m_pose);
 
obj-SetActiveAction(NULL, 0, curtime);
-
-   if (prev_pose)
-   game_free_pose(prev_pose);
}
else
{

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37283] branches/soc-2011-onion: Revision: 30699

2011-06-06 Thread Jason Wilkins
Revision: 37283
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37283
Author:   jwilkins
Date: 2011-06-07 00:05:48 + (Tue, 07 Jun 2011)
Log Message:
---
Revision: 30699
Author: nicholasbishop
Date: 3:49:10 PM, Saturday, July 24, 2010
Message:
== Multires ==

* Renamed Sculpt Level to Edit Level (works now for vpaint too)

Modified Paths:
--

branches/soc-2011-onion/release/scripts/startup/bl_ui/properties_data_modifier.py
branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c
branches/soc-2011-onion/source/blender/makesrna/intern/rna_modifier.c

Property Changed:

branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30676,30692-30693,30696
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30676,30692-30693,30696,30699
/trunk/blender:36833-37206

Modified: 
branches/soc-2011-onion/release/scripts/startup/bl_ui/properties_data_modifier.py
===
--- 
branches/soc-2011-onion/release/scripts/startup/bl_ui/properties_data_modifier.py
   2011-06-06 23:35:24 UTC (rev 37282)
+++ 
branches/soc-2011-onion/release/scripts/startup/bl_ui/properties_data_modifier.py
   2011-06-07 00:05:48 UTC (rev 37283)
@@ -384,7 +384,7 @@
 split = layout.split()
 col = split.column()
 col.prop(md, levels, text=Preview)
-col.prop(md, sculpt_levels, text=Sculpt)
+col.prop(md, edit_levels, text=Edit)
 col.prop(md, render_levels, text=Render)
 
 col = split.column()

Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c
===
--- branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c 
2011-06-06 23:35:24 UTC (rev 37282)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/multires.c 
2011-06-07 00:05:48 UTC (rev 37283)
@@ -137,7 +137,7 @@
 {
if(render)
return (mmd-modifier.scene)? 
get_render_subsurf_level(mmd-modifier.scene-r, mmd-renderlvl): 
mmd-renderlvl;
-   else if(ob-mode == OB_MODE_SCULPT)
+   else if(ob-mode  (OB_MODE_SCULPT|OB_MODE_VERTEX_PAINT))
return mmd-sculptlvl;
else
return (mmd-modifier.scene)? 
get_render_subsurf_level(mmd-modifier.scene-r, mmd-lvl): mmd-lvl;

Modified: branches/soc-2011-onion/source/blender/makesrna/intern/rna_modifier.c
===
--- branches/soc-2011-onion/source/blender/makesrna/intern/rna_modifier.c   
2011-06-06 23:35:24 UTC (rev 37282)
+++ branches/soc-2011-onion/source/blender/makesrna/intern/rna_modifier.c   
2011-06-07 00:05:48 UTC (rev 37283)
@@ -746,9 +746,9 @@
RNA_def_property_int_funcs(prop, NULL, NULL, 
rna_MultiresModifier_level_range);
RNA_def_property_update(prop, 0, rna_Modifier_update);
 
-   prop= RNA_def_property(srna, sculpt_levels, PROP_INT, PROP_UNSIGNED);
+   prop= RNA_def_property(srna, edit_levels, PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, sculptlvl);
-   RNA_def_property_ui_text(prop, Sculpt Levels, Number of subdivisions 
to use in sculpt mode);
+   RNA_def_property_ui_text(prop, Edit Levels, Number of subdivisions 
to use in sculpt and paint modes);
RNA_def_property_int_funcs(prop, NULL, NULL, 
rna_MultiresModifier_level_range);
RNA_def_property_update(prop, 0, rna_Modifier_update);
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37284] branches/soc-2011-onion/source/ blender/blenloader/intern/readfile.c: Revision: 30742

2011-06-06 Thread Jason Wilkins
Revision: 37284
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37284
Author:   jwilkins
Date: 2011-06-07 01:49:31 + (Tue, 07 Jun 2011)
Log Message:
---
Revision: 30742
Author: nicholasbishop
Date: 12:44:34 AM, Monday, July 26, 2010
Message:
== Sculpt/Paint ==

* Fixed a crash on loading files with a paint mode active
* Fixed a type warning

**jwilkins: this doesn't have the type warning fix

Modified Paths:
--
branches/soc-2011-onion/source/blender/blenloader/intern/readfile.c

Modified: branches/soc-2011-onion/source/blender/blenloader/intern/readfile.c
===
--- branches/soc-2011-onion/source/blender/blenloader/intern/readfile.c 
2011-06-07 00:05:48 UTC (rev 37283)
+++ branches/soc-2011-onion/source/blender/blenloader/intern/readfile.c 
2011-06-07 01:49:31 UTC (rev 37284)
@@ -4365,7 +4365,8 @@
CLAMP(ob-rotmode, ROT_MODE_MIN, ROT_MODE_MAX);
 
if(ob-paint) {
-   create_paintsession(ob);
+   ob-paint = MEM_callocN(sizeof(PaintSession), PaintSession);
+   if(ob-mode  OB_MODE_SCULPT)
ob-paint-sculpt= MEM_callocN(sizeof(SculptSession), reload 
sculpt session); /*XXX: why not do this in create_paintsession? ~jwilkins*/
}
 }

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37285] trunk/blender/source/blender/ editors/interface/interface.c: Move UI float precission calculation into its own function.

2011-06-06 Thread Campbell Barton
Revision: 37285
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37285
Author:   campbellbarton
Date: 2011-06-07 02:39:40 + (Tue, 07 Jun 2011)
Log Message:
---
Move UI float precission calculation into its own function.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface.c

Modified: trunk/blender/source/blender/editors/interface/interface.c
===
--- trunk/blender/source/blender/editors/interface/interface.c  2011-06-07 
01:49:31 UTC (rev 37284)
+++ trunk/blender/source/blender/editors/interface/interface.c  2011-06-07 
02:39:40 UTC (rev 37285)
@@ -449,6 +449,14 @@
 
 /* link line drawing is not part of buttons or theme.. so we stick with it 
here */
 
+static int ui_but_float_precision(uiBut *but, double UNUSED(value))
+{
+   int prec= (int)but-a2;
+   if(prec==0) prec= (but-hardmax  10.001f) ? 3 : 2;
+   else CLAMP(prec, 1, 7);
+   return prec;
+}
+
 static void ui_draw_linkline(uiLinkLine *line)
 {
rcti rect;
@@ -1530,10 +1538,7 @@
ui_get_but_string_unit(but, str, maxlen, value, 
0);
}
else {
-   int prec= (int)but-a2;
-   if(prec==0) prec= 3;
-   else CLAMP(prec, 1, 7);
-
+   const int prec= ui_but_float_precision(but, 
value);
BLI_snprintf(str, maxlen, %.*f, prec, value);
}
}
@@ -2009,10 +2014,7 @@
BLI_snprintf(but-drawstr, 
sizeof(but-drawstr), %s%s, but-str, new_str);
}
else {
-   int prec= (int)but-a2;
-   if(prec==0) prec= (but-hardmax  10.001f) ? 3 
: 2;
-   else CLAMP(prec, 1, 7);
-
+   const int prec= ui_but_float_precision(but, 
value);
BLI_snprintf(but-drawstr, 
sizeof(but-drawstr), %s%.*f, but-str, prec, value);
}
}
@@ -2030,11 +2032,9 @@
 
case LABEL:
if(ui_is_but_float(but)) {
-   int prec= (int)but-a2;
+   int prec;
value= ui_get_but_val(but);
-   if(prec==0) prec= 3;
-   else CLAMP(prec, 1, 7);
-
+   prec= ui_but_float_precision(but, value);
BLI_snprintf(but-drawstr, sizeof(but-drawstr), 
%s%.*f, but-str, prec, value);
}
else {

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37286] trunk/blender/source/blender/ editors/interface/interface.c: smarter precision calculation, so 0. 000001 isn't displayed as 0.00.

2011-06-06 Thread Campbell Barton
Revision: 37286
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37286
Author:   campbellbarton
Date: 2011-06-07 04:06:10 + (Tue, 07 Jun 2011)
Log Message:
---
smarter precision calculation, so 0.01 isn't displayed as 0.00.
there is a minor problem with this commit:
 0.1 -- 0.1 # good
 0.15 -- 0.15 # good
 0.199 -- 0.2 # ok
 0.2 -- 0.20 # wrong, has trailing 0

Tried to fix this but the case is hard to check for without more calculations 
which Id like to avoid. 

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface.c

Modified: trunk/blender/source/blender/editors/interface/interface.c
===
--- trunk/blender/source/blender/editors/interface/interface.c  2011-06-07 
02:39:40 UTC (rev 37285)
+++ trunk/blender/source/blender/editors/interface/interface.c  2011-06-07 
04:06:10 UTC (rev 37286)
@@ -449,11 +449,36 @@
 
 /* link line drawing is not part of buttons or theme.. so we stick with it 
here */
 
-static int ui_but_float_precision(uiBut *but, double UNUSED(value))
+static int ui_but_float_precision(uiBut *but, double value)
 {
-   int prec= (int)but-a2;
-   if(prec==0) prec= (but-hardmax  10.001f) ? 3 : 2;
-   else CLAMP(prec, 1, 7);
+   int prec;
+
+   /* first check if prec is 0 and fallback to a simple default */
+   if((prec= (int)but-a2) == 0) {
+   prec= (but-hardmax  10.001f) ? 3 : 2;
+   }
+
+   /* check on the number of decimal places neede to display
+* the number, this is so 0.1 is not displayed as 0.00,
+* _but_, this is only for small values si 10.0001 will not get
+* the same treatment */
+   if(value != 0.0  (value= ABS(value))  0.1) {
+   double prec_d= -(log10(value));
+   double prec_d_floor = floor(prec_d + FLT_EPSILON);
+   int test_prec= (int)prec_d_floor;
+
+   /* this check is so 0.00016 from isnt rounded to 0.0001 _but_ 
it is not working ideally because 0.0002 becomes 0.00020 */
+   if(prec_d - prec_d_floor  FLT_EPSILON) {
+   test_prec += 2;
+   }
+
+   if(test_prec  prec  test_prec = 7) {
+   prec= test_prec;
+   }
+   }
+
+   CLAMP(prec, 1, 7);
+
return prec;
 }
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37287] branches/soc-2011-avocado/blender/ source/blender/editors/mesh/autoseam_tools.c: Some memory management issues are fixed.

2011-06-06 Thread shuvro sarker
Revision: 37287
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37287
Author:   shuvro
Date: 2011-06-07 04:14:15 + (Tue, 07 Jun 2011)
Log Message:
---
Some memory management issues are fixed.

Modified Paths:
--

branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c

Modified: 
branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c
===
--- 
branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c  
2011-06-07 04:06:10 UTC (rev 37286)
+++ 
branches/soc-2011-avocado/blender/source/blender/editors/mesh/autoseam_tools.c  
2011-06-07 04:14:15 UTC (rev 37287)
@@ -35,26 +35,23 @@
 #include BKE_main.h
 
 #include ED_screen.h
+#include MEM_guardedalloc.h
 
 
+
 static int compute_dual_graph(BMesh *bm)
 {
 BMEdge *eed;
 BMIter iter, iter2;
 BMLoop *l;
-//int count = 0;
 
+int i,k,m,face_index[2];
+float **dummy_dual_graph;
 
-//float dummy_dual_graph[10][10];
-int i,face_index[2];
+dummy_dual_graph = (float **)MEM_callocN(sizeof(float*)*10, dual_graph);
 
-//float dummy_dual_graph[10][10];
-int k,m;
-
-float **dummy_dual_graph = (float **) malloc(10* sizeof(float *));
-
 for(k = 0; k  10; k++ ){
-dummy_dual_graph[k] = (float *) malloc(10 * sizeof(float));
+dummy_dual_graph[k] = (float *)MEM_callocN(sizeof(float)*10, 
dual_row);
 }
 
 for(k = 0; k  10; k++){
@@ -87,7 +84,8 @@
 
 calculate_eigen(dummy_dual_graph, 10);
 
-free(dummy_dual_graph);
+//free(dummy_dual_graph);
+MEM_freeN(dummy_dual_graph);
 return 0;
 }
 
@@ -138,25 +136,25 @@
 
 void calculate_eigen(float **dual_graph, int dimension)
 {
-int i,j,k;
+//int i,j,k;
 AUTOSEAM_DummyClassHandle handle = autoseam_create_dummyclass();
 
-float **array = (float **) malloc(dimension* sizeof(float *));
+//float **array = (float **) malloc(dimension* sizeof(float *));
+//
+//for(k = 0; k  dimension; k++ ){
+//array[k] = (float *) malloc(dimension * sizeof(float));
+//}
+//
+//
+//for(i = 0; i  dimension; i++){
+//for(j = 0; j dimension; j++){
+//array[i][j] = dual_graph[i][j];
+//printf(%.2f ,array[i][j]);
+//}
+//printf(\n);
+//}
 
-for(k = 0; k  dimension; k++ ){
-array[k] = (float *) malloc(dimension * sizeof(float));
-}
-
-
-for(i = 0; i  dimension; i++){
-for(j = 0; j dimension; j++){
-array[i][j] = dual_graph[i][j];
-printf(%.2f ,array[i][j]);
-}
-printf(\n);
-}
-
-autoseam_calculate_eigen(handle, array, dimension);
+autoseam_calculate_eigen(handle, dual_graph, dimension);
 }
 
 

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs


[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37288] branches/soc-2011-onion: == Pivot Last ==

2011-06-06 Thread Jason Wilkins
Revision: 37288
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37288
Author:   jwilkins
Date: 2011-06-07 05:07:59 + (Tue, 07 Jun 2011)
Log Message:
---
== Pivot Last == 
Added userpref to allow the end of the last paint or sculpt stroke to be used 
as the center of viewport rotation.

Enable this feature in the user preferences window on the interface tab.

Issues:
* Should probably not update the last stroke under certain conditions like 
using the grab brush_alpha
* Should probably disable when not in a sculpt or paint mode

The first issue will be addressed once I come up with a better way to organize 
what I mean by 'certain conditions'.  Currently there are dozens of 'certain 
conditions' scattered thru out the sculpt/paint code and it is getting 
unmanagable.

The second issue just requires more research.

Modified Paths:
--
branches/soc-2011-onion/release/scripts/startup/bl_ui/space_userpref.py
branches/soc-2011-onion/source/blender/blenkernel/BKE_paint.h
branches/soc-2011-onion/source/blender/editors/include/ED_sculpt.h
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_utils.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c
branches/soc-2011-onion/source/blender/editors/space_view3d/view3d_edit.c
branches/soc-2011-onion/source/blender/makesdna/DNA_userdef_types.h
branches/soc-2011-onion/source/blender/makesrna/intern/rna_userdef.c

Property Changed:

branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30676,30692-30693,30696,30699
/trunk/blender:36833-37206
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30676,30692-30693,30696,30699,30742
/trunk/blender:36833-37206

Modified: 
branches/soc-2011-onion/release/scripts/startup/bl_ui/space_userpref.py
===
--- branches/soc-2011-onion/release/scripts/startup/bl_ui/space_userpref.py 
2011-06-07 04:14:15 UTC (rev 37287)
+++ branches/soc-2011-onion/release/scripts/startup/bl_ui/space_userpref.py 
2011-06-07 05:07:59 UTC (rev 37288)
@@ -198,6 +198,7 @@
 col.prop(view, use_mouse_auto_depth)
 col.prop(view, use_zoom_to_mouse)
 col.prop(view, use_rotate_around_active)
+col.prop(view, use_rotate_around_last_stroke)
 col.prop(view, use_global_pivot)
 col.prop(view, use_camera_lock_parent)
 

Modified: branches/soc-2011-onion/source/blender/blenkernel/BKE_paint.h
===
--- branches/soc-2011-onion/source/blender/blenkernel/BKE_paint.h   
2011-06-07 04:14:15 UTC (rev 37287)
+++ branches/soc-2011-onion/source/blender/blenkernel/BKE_paint.h   
2011-06-07 05:07:59 UTC (rev 37288)
@@ -109,6 +109,10 @@
 
/* previous redraw rect */
rcti previous_r;
+
+   /* last paint/sculpt stroke location */
+   int last_stroke_valid;
+   float last_stroke[3];
 } PaintSession;
 
 void create_paintsession(struct Object *ob);

Modified: branches/soc-2011-onion/source/blender/editors/include/ED_sculpt.h
===
--- branches/soc-2011-onion/source/blender/editors/include/ED_sculpt.h  
2011-06-07 04:14:15 UTC (rev 37287)
+++ branches/soc-2011-onion/source/blender/editors/include/ED_sculpt.h  
2011-06-07 05:07:59 UTC (rev 37288)
@@ -66,4 +66,6 @@
 void ED_draw_on_surface_cursor(float modelview[16], float projection[16], 
float col[3], float alpha, float size[3], int viewport[4], float location[3], 
float inner_radius, float outer_radius, int brush_size);
 void ED_draw_fixed_overlay_on_surface(float modelview[16], float 
projection[16], float size[3], int viewport[4], float location[3], float 
outer_radius, struct Sculpt *sd, struct Brush *brush, struct ViewContext *vc, 
float t, float b, float l, float r, float angle);
 
+float *ED_paint_get_last_stroke(struct Object *ob);
+
 #endif

Modified: 
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_utils.c
===
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_utils.c   
2011-06-07 04:14:15 UTC (rev 37287)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_utils.c   
2011-06-07 05:07:59 UTC (rev 37288)
@@ -574,3 +574,8 @@
if(pbvh)
BLI_pbvh_update(pbvh, PBVH_UpdateRedraw, NULL);
 }
+
+float *ED_paint_get_last_stroke(struct Object *ob)
+{
+   return (ob  ob-paint  ob-paint-last_stroke_valid) ? 
ob-paint-last_stroke : NULL;
+}

Modified: branches/soc-2011-onion/source/blender/editors/sculpt_paint/sculpt.c

[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37289] trunk/blender/source/blender/ editors/interface/interface.c: fix for glitch in previous commit with 0. 00002 displaying as 0.000020, this uses

2011-06-06 Thread Campbell Barton
Revision: 37289
  
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=37289
Author:   campbellbarton
Date: 2011-06-07 05:26:10 + (Tue, 07 Jun 2011)
Log Message:
---
fix for glitch in previous commit with 0.2 displaying as 0.20, this 
uses 2 calls to double_round which I'd rather avoid but at least it now works 
right for users.

Modified Paths:
--
trunk/blender/source/blender/editors/interface/interface.c

Modified: trunk/blender/source/blender/editors/interface/interface.c
===
--- trunk/blender/source/blender/editors/interface/interface.c  2011-06-07 
05:07:59 UTC (rev 37288)
+++ trunk/blender/source/blender/editors/interface/interface.c  2011-06-07 
05:26:10 UTC (rev 37289)
@@ -467,9 +467,15 @@
double prec_d_floor = floor(prec_d + FLT_EPSILON);
int test_prec= (int)prec_d_floor;
 
-   /* this check is so 0.00016 from isnt rounded to 0.0001 _but_ 
it is not working ideally because 0.0002 becomes 0.00020 */
-   if(prec_d - prec_d_floor  FLT_EPSILON) {
-   test_prec += 2;
+   /* this check is so 0.00016 from isnt rounded to 0.0001 */
+   if(prec_d - prec_d_floor  FLT_EPSILON) { /* not ending with a 
.0~001 */
+   /* check if a second decimal place is needed 0.00015 
for eg. */
+   if(double_round(value, test_prec + 1) - 
double_round(value, test_prec + 2) != 0.0) {
+   test_prec += 2;
+   }
+   else {
+   test_prec += 1;
+   }
}
 
if(test_prec  prec  test_prec = 7) {

___
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs