[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17527] branches/projection-paint/source/ blender/src/imagepaint.c: * smudge tool wanst working ( forgot to set the precious mouse location)
Revision: 17527 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17527 Author: campbellbarton Date: 2008-11-21 07:17:26 +0100 (Fri, 21 Nov 2008) Log Message: --- * smudge tool wanst working (forgot to set the precious mouse location) * VecWeightf and Vec2Weightf didnt have return types defined. Modified Paths: -- branches/projection-paint/source/blender/src/imagepaint.c Modified: branches/projection-paint/source/blender/src/imagepaint.c === --- branches/projection-paint/source/blender/src/imagepaint.c 2008-11-21 03:09:48 UTC (rev 17526) +++ branches/projection-paint/source/blender/src/imagepaint.c 2008-11-21 06:17:26 UTC (rev 17527) @@ -591,14 +591,14 @@ } } -static VecWeightf(float p[3], float v1[3], float v2[3], float v3[3], float w[3]) +static void VecWeightf(float p[3], float v1[3], float v2[3], float v3[3], float w[3]) { p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2]; p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2]; p[2] = v1[2]*w[0] + v2[2]*w[1] + v3[2]*w[2]; } -static Vec2Weightf(float p[3], float v1[3], float v2[3], float v3[3], float w[3]) +static void Vec2Weightf(float p[3], float v1[3], float v2[3], float v3[3], float w[3]) { p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2]; p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2]; @@ -3409,7 +3409,7 @@ * the fact that applying the color directly gives feedback, * instead, collect the colors and apply after :/ */ -#if 0 /* looks OK but not correct - also would need float buffer */ +#if 0 /* looks OK but not correct - also would need float buffer */ *projPixel->pixel.uint_pt = IMB_blend_color( *projPixel->pixel.uint_pt, *((unsigned int *)rgba_ub), (int)(alpha*256), blend); #endif @@ -3418,10 +3418,10 @@ /* TODO FLOAT */ /* Smear wont do float properly yet */ /* Note, alpha*255 makes pixels darker */ IMAPAINT_FLOAT_RGBA_TO_CHAR(rgba_smear, projPixel->pixel.f_pt); - ((ProjPixelClone *)projPixel)->clonepx.uint = IMB_blend_color( *((unsigned int *)rgba_smear), *((unsigned int *)rgba_ub), (int)(alpha*256), blend); + ((ProjPixelClone *)projPixel)->clonepx.uint = IMB_blend_color( *((unsigned int *)rgba_smear), *((unsigned int *)rgba_ub), (int)(alpha*255), blend); BLI_linklist_prepend_arena( &smearPixels_float, (void *)projPixel, smearArena ); } else { - ((ProjPixelClone *)projPixel)->clonepx.uint = IMB_blend_color( *projPixel->pixel.uint_pt, *((unsigned int *)rgba_ub), (int)(alpha*256), blend); + ((ProjPixelClone *)projPixel)->clonepx.uint = IMB_blend_color( *projPixel->pixel.uint_pt, *((unsigned int *)rgba_ub), (int)(alpha*255), blend); BLI_linklist_prepend_arena( &smearPixels, (void *)projPixel, smearArena ); } } @@ -3506,6 +3506,7 @@ handles[a].ps = ps; VECCOPY2D(handles[a].mval, pos); + VECCOPY2D(handles[a].prevmval, lastpos); /* thread spesific */ handles[a].thread_index = a; ___ 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 [17526] branches/projection-paint/source/ blender: * added option "Normal", same as the vpaint option, gives more natural looking brush strokes.
Revision: 17526 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17526 Author: campbellbarton Date: 2008-11-21 04:09:48 +0100 (Fri, 21 Nov 2008) Log Message: --- * added option "Normal", same as the vpaint option, gives more natural looking brush strokes. * faces that were ignored were also not taken into acount when checking UV seams - causng bleed not to work properly in some cases. * commented early pixel filling loop exit that fails in some cases. Modified Paths: -- branches/projection-paint/source/blender/makesdna/DNA_scene_types.h branches/projection-paint/source/blender/src/buttons_editing.c branches/projection-paint/source/blender/src/imagepaint.c Modified: branches/projection-paint/source/blender/makesdna/DNA_scene_types.h === --- branches/projection-paint/source/blender/makesdna/DNA_scene_types.h 2008-11-21 02:23:46 UTC (rev 17525) +++ branches/projection-paint/source/blender/makesdna/DNA_scene_types.h 2008-11-21 03:09:48 UTC (rev 17526) @@ -803,10 +803,11 @@ #define IMAGEPAINT_DRAW_TOOL_DRAWING 4 /* projection painting only */ -#define IMAGEPAINT_PROJECT_XRAY8 -#define IMAGEPAINT_PROJECT_BACKFACE16 +#define IMAGEPAINT_PROJECT_XRAY8 +#define IMAGEPAINT_PROJECT_BACKFACE16 #define IMAGEPAINT_PROJECT_IGNORE_SEAMS32 #define IMAGEPAINT_PROJECT_CLONE_LAYER 64 +#define IMAGEPAINT_PROJECT_FLAT128 /* toolsettings->uvcalc_flag */ #define UVCALC_FILLHOLES 1 Modified: branches/projection-paint/source/blender/src/buttons_editing.c === --- branches/projection-paint/source/blender/src/buttons_editing.c 2008-11-21 02:23:46 UTC (rev 17525) +++ branches/projection-paint/source/blender/src/buttons_editing.c 2008-11-21 03:09:48 UTC (rev 17526) @@ -6373,7 +6373,9 @@ /* Projection Painting */ uiBlockBeginAlign(block); uiDefButBitS(block, TOGN|BIT, IMAGEPAINT_PROJECT_XRAY, B_NOP, "Occlude",xco+10,yco-70,butw,19, &settings->imapaint.flag, 0, 0, 0, 0, "Only paint onto the faces directly under the brush (slower)"); - uiDefButBitS(block, TOGN|BIT, IMAGEPAINT_PROJECT_BACKFACE, B_NOP, "Backface Cull", xco+10,yco-90,butw,19, &settings->imapaint.flag, 0, 0, 0, 0, "Ignore faces pointing away from the view (faster)"); + uiDefButBitS(block, TOGN|BIT, IMAGEPAINT_PROJECT_BACKFACE, B_NOP, "Cull", xco+10,yco-90,butw/2,19, &settings->imapaint.flag, 0, 0, 0, 0, "Ignore faces pointing away from the view (faster)"); + uiDefButBitS(block, TOGN|BIT, IMAGEPAINT_PROJECT_FLAT, B_NOP, "Normal", xco+10+butw/2,yco-90,butw/2,19, &settings->imapaint.flag, 0, 0, 0, 0, "Ignore faces pointing away from the view (faster)"); + uiDefButBitS(block, TOGN|BIT, IMAGEPAINT_PROJECT_IGNORE_SEAMS, B_NOP, "Bleed", xco+10,yco-110,butw/2,19, &settings->imapaint.flag, 0, 0, 0, 0, "Extend paint beyond the faces UVs to reduce seams (in pixels, slower)"); uiDefButF(block, NUM, B_NOP, "", xco+10 + (butw/2),yco-110,butw/2,19, &settings->imapaint.seam_bleed, 2.0, 8.0, 0, 0, "Extend paint beyond the faces UVs to reduce seams (in pixels, slower)"); uiBlockEndAlign(block); Modified: branches/projection-paint/source/blender/src/imagepaint.c === --- branches/projection-paint/source/blender/src/imagepaint.c 2008-11-21 02:23:46 UTC (rev 17525) +++ branches/projection-paint/source/blender/src/imagepaint.c 2008-11-21 03:09:48 UTC (rev 17526) @@ -178,6 +178,9 @@ #define PROJ_BUCKET_INIT 1<<0 // #define PROJ_BUCKET_CLONE_INIT 1<<1 +/* vert flags */ +#define PROJ_VERT_CULL 1 + /* only for readability */ #define PROJ_BUCKET_LEFT 0 #define PROJ_BUCKET_RIGHT 1 @@ -221,6 +224,7 @@ char *faceSeamFlags;/* store info about faces, if they are initialized etc*/ float (*faceSeamUVs)[4][2]; /* expanded UVs for faces to use as seams */ LinkNode **vertFaces; /* Only needed for when seam_bleed_px is enabled, use to find UV seams */ + char *vertFlags;/* store options per vert, now only store if the vert is pointing away from the view */ #endif int buckets_x; /* The size of the bucket grid, the grid span's screen_min/screen_max so you can paint outsize the screen or with 2 brushes at once */ int buckets_y; @@ -235,6 +239,7 @@ short do_occlude; /* Use r
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17525] branches/blender2.5/blender/source /blender/makesrna: RNA
Revision: 17525 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17525 Author: blendix Date: 2008-11-21 03:23:46 +0100 (Fri, 21 Nov 2008) Log Message: --- RNA * More ID property support. What was already possible was showing ID properties as RNA properties. Now it is possible to define RNA properties and have an ID property automatically created the first time it is set (if not set it retuns the default). * Added support for defining RNA structs and properties at runtime. This is useful for python and plugins, and could also be used for operators, not sure yet what is best there, they could be done in preprocess for speed, but not sure how to do that while keeping operator registration a single function. * Added quick functions to get/set properties based on names, to be used for operators. * Added some simple support for inheritance, was already doing this but having it as a feature simplifies things. Two things were added for this: when defining a struct you can give a 'from' struct whose properties will be copied, and structs like ID, operator, modifier, can define a refine callback that will return the more specific type of the struct like ID -> Object, Mesh, .. . * Added simple windowmanager wrap with only the registered operators list, used for testing RNA for operators. Modified Paths: -- branches/blender2.5/blender/source/blender/makesrna/RNA_access.h branches/blender2.5/blender/source/blender/makesrna/RNA_define.h branches/blender2.5/blender/source/blender/makesrna/RNA_types.h branches/blender2.5/blender/source/blender/makesrna/intern/makesrna.c branches/blender2.5/blender/source/blender/makesrna/intern/rna_ID.c branches/blender2.5/blender/source/blender/makesrna/intern/rna_access.c branches/blender2.5/blender/source/blender/makesrna/intern/rna_define.c branches/blender2.5/blender/source/blender/makesrna/intern/rna_internal.h branches/blender2.5/blender/source/blender/makesrna/intern/rna_internal_types.h branches/blender2.5/blender/source/blender/makesrna/intern/rna_lamp.c branches/blender2.5/blender/source/blender/makesrna/intern/rna_main.c branches/blender2.5/blender/source/blender/makesrna/intern/rna_mesh.c branches/blender2.5/blender/source/blender/makesrna/intern/rna_object.c branches/blender2.5/blender/source/blender/makesrna/intern/rna_rna.c branches/blender2.5/blender/source/blender/makesrna/intern/rna_scene.c Added Paths: --- branches/blender2.5/blender/source/blender/makesrna/intern/rna_wm.c Modified: branches/blender2.5/blender/source/blender/makesrna/RNA_access.h === --- branches/blender2.5/blender/source/blender/makesrna/RNA_access.h 2008-11-21 01:54:00 UTC (rev 17524) +++ branches/blender2.5/blender/source/blender/makesrna/RNA_access.h 2008-11-21 02:23:46 UTC (rev 17525) @@ -30,6 +30,8 @@ struct bContext; struct Main; +extern BlenderRNA BLENDER_RNA; + /* Pointer * * Currently only an RNA pointer to Main can be obtained, this @@ -45,6 +47,8 @@ PropertyRNA *RNA_struct_name_property(PointerRNA *ptr); PropertyRNA *RNA_struct_iterator_property(PointerRNA *ptr); +PropertyRNA *RNA_struct_find_property(PointerRNA *ptr, const char *identifier); + /* Properties * * Access to struct properties. All this works with RNA pointers rather than @@ -103,7 +107,6 @@ void RNA_property_pointer_get(PropertyRNA *prop, PointerRNA *ptr, PointerRNA *r_ptr); void RNA_property_pointer_set(PropertyRNA *prop, PointerRNA *ptr, PointerRNA *ptr_value); -StructRNA *RNA_property_pointer_type(PropertyRNA *prop, PointerRNA *ptr); void RNA_property_collection_begin(PropertyRNA *prop, CollectionPropertyIterator *iter, PointerRNA *ptr); void RNA_property_collection_next(PropertyRNA *prop, CollectionPropertyIterator *iter); @@ -142,5 +145,54 @@ void RNA_generate_dependencies(PointerRNA *mainptr, void *udata, PropDependencyCallback cb); #endif +/* Quick name based property access + * + * These are just an easier way to access property values without having to + * call RNA_struct_find_property. The names have to exist as RNA properties + * for the type in the pointer, if they do not exist an error will be printed. + * + * The get and set functions work like the corresponding functions above, the + * default functions are intended to be used for runtime / id properties + * specifically. They will set the value only if the id property does not yet + * exist, and return the current value. This is useful to set inputs in an + * operator, avoiding to overwrite them if they were specified by the caller. + * + * There is no support for pointers and collections here yet, these can be + * added when ID properties support them. */ + +int RNA_boolean_get(PointerRNA *ptr, const char *name); +void RNA_boolean_set(PointerRNA *ptr, const char *name, i
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17524] branches/animsys2/source/blender/ src: AnimSys2: Two Bugfixes for IPO Editor
Revision: 17524 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17524 Author: aligorith Date: 2008-11-21 02:54:00 +0100 (Fri, 21 Nov 2008) Log Message: --- AnimSys2: Two Bugfixes for IPO Editor * Fixed the long-standing problem where a selected Beztriple's handles would not be able to be scaled when if one of the handles wasn't moved first. The cause of this was that auto-handles will keep handles clamped in place. To solve this, I've added a special hack, which will result in auto-handles being converted to aligned handles whe rotating/scaling BezTriples that have all its points selected. This should behave more in line with expected behaviour. * Setting per-segment interpolation in curve EditMode was broken. Was a misplaced check that I forgot to move. Modified Paths: -- branches/animsys2/source/blender/src/editipo.c branches/animsys2/source/blender/src/editipo_mods.c Modified: branches/animsys2/source/blender/src/editipo.c === --- branches/animsys2/source/blender/src/editipo.c 2008-11-20 22:58:27 UTC (rev 17523) +++ branches/animsys2/source/blender/src/editipo.c 2008-11-21 01:54:00 UTC (rev 17524) @@ -3918,8 +3918,8 @@ if (icu->ipo == IPO_MIXED) { bezt= icu->bezt; for (b=0; b < icu->totvert; b++, bezt++) { - if (bezt->ipo == IPO_BEZ) count += 3; - else count ++; + if (bezt->ipo == IPO_BEZ) count += 3; // err... + else count++; } } else if (icu->ipo == IPO_BEZ) @@ -3967,6 +3967,7 @@ for (b=0; b < icu->totvert; b++, prevbezt=bezt, bezt++) { TransDataCurveHandleFlags *hdata = NULL; + short h1=1, h2=1; /* only include handles if selected, and interpolaton mode uses beztriples */ if ( (!prevbezt && (bezt->ipo==IPO_BEZ)) || (prevbezt && (prevbezt->ipo==IPO_BEZ)) ) { @@ -3974,16 +3975,31 @@ hdata = initTransDataCurveHandes(td, bezt); bezt_to_transdata(td++, td2d++, bezt->vec[0], bezt->vec[1], 1, onlytime); } + else + h1= 0; } if (bezt->ipo==IPO_BEZ) { if (bezt->f3 & SELECT) { - if (hdata==NULL) { + if (hdata==NULL) hdata = initTransDataCurveHandes(td, bezt); - } bezt_to_transdata(td++, td2d++, bezt->vec[2], bezt->vec[1], 1, onlytime); } + else + h2= 0; } + /* special hack (must be done after initTransDataCurveHandes(), as that stores handle settings to restore...): +* - Check if we've got entire BezTriple selected and we're scaling/rotating that point, +*then check if we're using auto-handles. +* - If so, change them auto-handles to aligned handles so that handles get affected too +
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17523] branches/nurbs/blender/intern/ nurbana/intern/NURBS_Generate.cpp: Fix for broken shading at the 'seams' of cyclic surfaces.
Revision: 17523 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17523 Author: eman Date: 2008-11-20 23:58:27 +0100 (Thu, 20 Nov 2008) Log Message: --- Fix for broken shading at the 'seams' of cyclic surfaces. Kindly provided by Laurynas Duburas, thank you. Vertices at the seams were coincident, forming a zero area tesselation triangle. Laurynas added an extra tesselation row for cyclical surfaces preventing this. Modified Paths: -- branches/nurbs/blender/intern/nurbana/intern/NURBS_Generate.cpp Modified: branches/nurbs/blender/intern/nurbana/intern/NURBS_Generate.cpp === --- branches/nurbs/blender/intern/nurbana/intern/NURBS_Generate.cpp 2008-11-20 22:23:01 UTC (rev 17522) +++ branches/nurbs/blender/intern/nurbana/intern/NURBS_Generate.cpp 2008-11-20 22:58:27 UTC (rev 17523) @@ -81,7 +81,8 @@ nbReal endU = (obj -> KnotVector(0)[Unpts + extraPntsU]); nbReal startU = (obj -> KnotVector(0)[(OrderU-1)]); - nbReal stepU = (endU - startU)/TessU; + int extra = CyclicU ? 1 : 0; + nbReal stepU = (endU - startU)/(TessU + extra); nbReal t = startU; for(i = 0; i <= TessU; i++) { @@ -95,7 +96,8 @@ else{ endV = (obj -> KnotVector(1)[Vnpts + extraPntsV]); startV = (obj -> KnotVector(1)[(OrderV-1)]); - stepV= (endV - startV)/TessV; + extra = CyclicV ? 1 : 0; + stepV= (endV - startV)/(TessV + extra); tv = startV; } for(i = 0; i <= TessV; i++) { @@ -105,7 +107,8 @@ } else { nbReal endU = (obj -> KnotVector(0)[Unpts + extraPntsU]); nbReal startU = (obj -> KnotVector(0)[(OrderU-1)]); - nbReal stepU = (endU - startU)/TessU; + int extra = CyclicU ? 1 : 0; + nbReal stepU = (endU - startU)/(TessU + extra); nbReal t = startU; for(i = 0; i <= TessU; i++) { @@ -115,7 +118,8 @@ nbReal endV = (obj -> KnotVector(1)[Vnpts + extraPntsV]); nbReal startV = (obj -> KnotVector(1)[(OrderV-1)]); - nbReal stepV = (endV - startV)/TessV; + extra = CyclicV ? 1 : 0; + nbReal stepV = (endV - startV)/(TessV + extra); nbReal tv = startV; for(i = 0; i <= TessV; i++) { ___ 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 [17522] branches/etch-a-ton/source/blender /src: Change name templating to &S and &N (less potential bugs).
Revision: 17522 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17522 Author: theeth Date: 2008-11-20 23:23:01 +0100 (Thu, 20 Nov 2008) Log Message: --- Change name templating to &S and &N (less potential bugs). It now also accepts lower case versions (&s and &n). Modified Paths: -- branches/etch-a-ton/source/blender/src/drawview.c branches/etch-a-ton/source/blender/src/editarmature_retarget.c Modified: branches/etch-a-ton/source/blender/src/drawview.c === --- branches/etch-a-ton/source/blender/src/drawview.c 2008-11-20 21:57:21 UTC (rev 17521) +++ branches/etch-a-ton/source/blender/src/drawview.c 2008-11-20 22:23:01 UTC (rev 17522) @@ -2363,8 +2363,8 @@ uiDefButF(block, NUM, B_DIFF, "D:", 143,yco, 67,19, &G.scene->toolsettings->skgen_retarget_distance_weight, 0, 10, 1, 0, "Distance Weight"); yco -= 20; - uiDefBut(block, TEX,0,"S:", 10, yco, 90, 20, G.scene->toolsettings->skgen_side_string, 0.0, 8.0, 0, 0, "Text to replace %S with"); - uiDefBut(block, TEX,0,"N:", 100, yco, 90, 20, G.scene->toolsettings->skgen_num_string, 0.0, 8.0, 0, 0, "Text to replace %N with"); + uiDefBut(block, TEX,0,"S:", 10, yco, 90, 20, G.scene->toolsettings->skgen_side_string, 0.0, 8.0, 0, 0, "Text to replace &S with"); + uiDefBut(block, TEX,0,"N:", 100, yco, 90, 20, G.scene->toolsettings->skgen_num_string, 0.0, 8.0, 0, 0, "Text to replace &N with"); uiDefIconButBitC(block, TOG, SK_RETARGET_AUTONAME, B_DIFF, ICON_AUTO,190,yco,20,20, &G.scene->toolsettings->skgen_retarget_options, 0, 0, 0, 0, "Use Auto Naming"); /* auto renaming magic */ Modified: branches/etch-a-ton/source/blender/src/editarmature_retarget.c === --- branches/etch-a-ton/source/blender/src/editarmature_retarget.c 2008-11-20 21:57:21 UTC (rev 17521) +++ branches/etch-a-ton/source/blender/src/editarmature_retarget.c 2008-11-20 22:23:01 UTC (rev 17522) @@ -460,14 +460,14 @@ for (i = 0, j = 0; template_name[i] != '\0' && i < 31 && j < 31; i++) { - if (template_name[i] == '%') + if (template_name[i] == '&') { - if (template_name[i+1] == 'S') + if (template_name[i+1] == 'S' || template_name[i+1] == 's') { j += sprintf(name + j, side_string); i++; } - else if (template_name[i+1] == 'N') + else if (template_name[i+1] == 'N' || template_name[i+1] == 'n') { j += sprintf(name + j, num_string); i++; ___ 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 [17521] branches/etch-a-ton: merging trunk 17485:17520
Revision: 17521 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17521 Author: theeth Date: 2008-11-20 22:57:21 +0100 (Thu, 20 Nov 2008) Log Message: --- merging trunk 17485:17520 Modified Paths: -- branches/etch-a-ton/SConstruct branches/etch-a-ton/config/darwin-config.py branches/etch-a-ton/config/linux2-config.py branches/etch-a-ton/config/openbsd3-config.py branches/etch-a-ton/config/sunos5-config.py branches/etch-a-ton/config/win32-vc-config.py branches/etch-a-ton/source/blender/imbuf/IMB_imbuf.h branches/etch-a-ton/source/blender/imbuf/intern/imageprocess.c branches/etch-a-ton/source/blender/src/buttons_editing.c branches/etch-a-ton/source/blender/src/seqeffects.c branches/etch-a-ton/tools/Blender.py branches/etch-a-ton/tools/btools.py Modified: branches/etch-a-ton/SConstruct === --- branches/etch-a-ton/SConstruct 2008-11-20 21:45:22 UTC (rev 17520) +++ branches/etch-a-ton/SConstruct 2008-11-20 21:57:21 UTC (rev 17521) @@ -249,7 +249,7 @@ # remove stdc++ from LLIBS if we are building a statc linked CXXFLAGS if env['WITH_BF_STATICCXX']: if 'stdc++' in env['LLIBS']: - env['LLIBS'] = env['LLIBS'].replace('stdc++', ' ') + env['LLIBS'].remove('stdc++') else: print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform' Modified: branches/etch-a-ton/config/darwin-config.py === --- branches/etch-a-ton/config/darwin-config.py 2008-11-20 21:45:22 UTC (rev 17520) +++ branches/etch-a-ton/config/darwin-config.py 2008-11-20 21:57:21 UTC (rev 17521) @@ -216,14 +216,14 @@ PLATFORM_LINKFLAGS = '-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime' #note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4 -LLIBS = 'stdc++ SystemStubs' +LLIBS = ['stdc++', 'SystemStubs'] # some flags shuffling for different Os versions if MAC_MIN_VERS == '10.3': CFLAGS = ['-fuse-cxa-atexit']+CFLAGS CXXFLAGS = ['-fuse-cxa-atexit']+CXXFLAGS PLATFORM_LINKFLAGS = '-fuse-cxa-atexit '+PLATFORM_LINKFLAGS - LLIBS = LLIBS + ' crt3.o' + LLIBS.append('crt3.o') if USE_SDK==True: SDK_FLAGS=['-isysroot', MACOSX_SDK,'-mmacosx-version-min='+MAC_MIN_VERS] Modified: branches/etch-a-ton/config/linux2-config.py === --- branches/etch-a-ton/config/linux2-config.py 2008-11-20 21:45:22 UTC (rev 17520) +++ branches/etch-a-ton/config/linux2-config.py 2008-11-20 21:57:21 UTC (rev 17521) @@ -193,7 +193,7 @@ ##FIX_STUBS_WARNINGS = -Wno-unused -LLIBS = 'util c m dl pthread stdc++' +LLIBS = ['util', 'c', 'm', 'dl', 'pthread', 'stdc++'] ##LOPTS = --dynamic ##DYNLDFLAGS = -shared $(LDFLAGS) Modified: branches/etch-a-ton/config/openbsd3-config.py === --- branches/etch-a-ton/config/openbsd3-config.py 2008-11-20 21:45:22 UTC (rev 17520) +++ branches/etch-a-ton/config/openbsd3-config.py 2008-11-20 21:57:21 UTC (rev 17521) @@ -151,7 +151,7 @@ ##FIX_STUBS_WARNINGS = -Wno-unused -LLIBS = 'm stdc++ pthread util' +LLIBS = ['m', 'stdc++', 'pthread', 'util'] ##LOPTS = --dynamic ##DYNLDFLAGS = -shared $(LDFLAGS) Modified: branches/etch-a-ton/config/sunos5-config.py === --- branches/etch-a-ton/config/sunos5-config.py 2008-11-20 21:45:22 UTC (rev 17520) +++ branches/etch-a-ton/config/sunos5-config.py 2008-11-20 21:57:21 UTC (rev 17521) @@ -165,7 +165,7 @@ ##FIX_STUBS_WARNINGS = -Wno-unused -LLIBS = 'c m dl pthread stdc++' +LLIBS = ['c', 'm', 'dl', 'pthread', 'stdc++'] ##LOPTS = --dynamic ##DYNLDFLAGS = -shared $(LDFLAGS) Modified: branches/etch-a-ton/config/win32-vc-config.py === --- branches/etch-a-ton/config/win32-vc-config.py 2008-11-20 21:45:22 UTC (rev 17520) +++ branches/etch-a-ton/config/win32-vc-config.py 2008-11-20 21:57:21 UTC (rev 17521) @@ -181,7 +181,7 @@ CC_WARN = [] CXX_WARN = [] -LLIBS = 'ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid' +LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid'] PLATFORM_LINKFLAGS = ''' /SUBSYSTEM:CONSOLE Modified: branches/etch-a-ton/source/blender/imbuf/IMB_imbuf.h
[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17520] trunk/blender/source/blender/src/ buttons_editing.c: Crasher fix.
Revision: 17520 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17520 Author: theeth Date: 2008-11-20 22:45:22 +0100 (Thu, 20 Nov 2008) Log Message: --- Crasher fix. If vertex groups had % in them, the function making the menu string would crash (in release only). Modified Paths: -- trunk/blender/source/blender/src/buttons_editing.c Modified: trunk/blender/source/blender/src/buttons_editing.c === --- trunk/blender/source/blender/src/buttons_editing.c 2008-11-20 20:42:38 UTC (rev 17519) +++ trunk/blender/source/blender/src/buttons_editing.c 2008-11-20 21:45:22 UTC (rev 17520) @@ -5370,7 +5370,7 @@ qsort_ptr = MEM_callocN (defCount * sizeof (qsort_ptr[0]), "qsort_ptr"); for (index = 1, dg = ob->defbase.first; dg; index++, dg=dg->next) { - printed = snprintf (qsort_ptr[index - 1], sizeof (dg->name), dg->name); + printed = snprintf (qsort_ptr[index - 1], sizeof (dg->name), "%s", dg->name); snprintf (qsort_ptr[index - 1]+printed, 6+1, "%%x%d|", index); // +1 to move the \0 see above 999 max here too } ___ 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 [17519] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/app_blender: Added changes for implementing antialiasing.
Revision: 17519 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17519 Author: kjym3 Date: 2008-11-20 21:42:38 +0100 (Thu, 20 Nov 2008) Log Message: --- Added changes for implementing antialiasing. The OSA settings for the internal renderer are respected by the Freestyle renderer as well. Modified Paths: -- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.h Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp === --- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp 2008-11-20 20:41:53 UTC (rev 17518) +++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.cpp 2008-11-20 20:42:38 UTC (rev 17519) @@ -39,8 +39,13 @@ extern "C" { #include "BLI_blenlib.h" +#include "BLI_jitter.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" +#if 1 // FRS_antialiasing +#include "BKE_global.h" +#include "DNA_scene_types.h" +#endif } // glut.h must be included last to avoid a conflict with stdlib.h on vc .net 2003 and 2005 @@ -439,6 +444,23 @@ glPopAttrib(); } +#if 1 // FRS_antialiasing + +void AppGLWidget::init_jit(int osa) +{ + static float cache[32][2]; /* simple caching */ + static int lastjit= 0; + + if(lastjit != osa) { + memset(cache, 0, sizeof(cache)); + BLI_initjit(cache[0], osa); + } + lastjit= osa; + memcpy(jit, cache, sizeof(jit)); +} + +#endif + void AppGLWidget::Draw2DScene(SceneVisitor *iRenderer) { static bool first = 1; @@ -473,7 +495,29 @@ canvas->init(); first = false; } -canvas->Render(canvas->renderer()); +#if 1 // FRS_antialiasing + if (!(G.scene->r.mode & R_OSA)) { +#endif + canvas->Render(canvas->renderer()); +#if 1 // FRS_antialiasing + } else { + init_jit(G.scene->r.osa); + GLint viewport[4]; + glGetIntegerv(GL_VIEWPORT, viewport); + glClear(GL_ACCUM_BUFFER_BIT); + for (int jitter = 0; jitter < G.scene->r.osa; jitter++) { + cout << "Antialiasing " << jitter+1 << "/" << G.scene->r.osa << endl; + glClear(GL_COLOR_BUFFER_BIT); + glPushMatrix(); + glTranslatef(jit[jitter][0]*(viewport[2]+viewport[3])/viewport[2], + jit[jitter][1]*(viewport[2]+viewport[3])/viewport[3], 0.0); + canvas->Render(canvas->renderer()); + glPopMatrix(); + glAccum(GL_ACCUM, 1.0/G.scene->r.osa); + } + glAccum(GL_RETURN, 1.0); + } +#endif } glLoadIdentity(); Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.h === --- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.h 2008-11-20 20:41:53 UTC (rev 17518) +++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/app_blender/AppGLWidget.h 2008-11-20 20:42:38 UTC (rev 17519) @@ -542,7 +542,11 @@ bool _record; +#if 1 // FRS_antialiasing + float jit[32][2]; + void init_jit(int osa); +#endif }; ___ 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 [17518] branches/soc-2008-mxcurioni/source /blender/blenlib/BLI_jitter.h: Renamed arguments rad1 and rad2 in order to avoid name conflicts with symbol
Revision: 17518 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17518 Author: kjym3 Date: 2008-11-20 21:41:53 +0100 (Thu, 20 Nov 2008) Log Message: --- Renamed arguments rad1 and rad2 in order to avoid name conflicts with symbols defined in Microsoft SDKs/Windows/v6.1/include/dlgs.h. Modified Paths: -- branches/soc-2008-mxcurioni/source/blender/blenlib/BLI_jitter.h Modified: branches/soc-2008-mxcurioni/source/blender/blenlib/BLI_jitter.h === --- branches/soc-2008-mxcurioni/source/blender/blenlib/BLI_jitter.h 2008-11-20 20:41:07 UTC (rev 17517) +++ branches/soc-2008-mxcurioni/source/blender/blenlib/BLI_jitter.h 2008-11-20 20:41:53 UTC (rev 17518) @@ -33,8 +33,8 @@ #define BLI_JITTER_H extern void BLI_initjit(float *jitarr, int num); -extern voidBLI_jitterate1(float *jit1, float *jit2, int num, float rad1); -extern voidBLI_jitterate2(float *jit1, float *jit2, int num, float rad2); +extern voidBLI_jitterate1(float *jit1, float *jit2, int num, float _rad1); +extern voidBLI_jitterate2(float *jit1, float *jit2, int num, float _rad2); #endif ___ 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 [17517] branches/soc-2008-mxcurioni/intern /ghost/intern: Added changes for enabling OpenGL accumulation buffer to implement antialiasing
Revision: 17517 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17517 Author: kjym3 Date: 2008-11-20 21:41:07 +0100 (Thu, 20 Nov 2008) Log Message: --- Added changes for enabling OpenGL accumulation buffer to implement antialiasing in the Freestyle renderer. Modified Paths: -- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowCarbon.cpp branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowWin32.cpp branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowX11.cpp Modified: branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowCarbon.cpp === --- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowCarbon.cpp 2008-11-20 08:25:01 UTC (rev 17516) +++ branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowCarbon.cpp 2008-11-20 20:41:07 UTC (rev 17517) @@ -46,22 +46,34 @@ const GHOST_TInt32 GHOST_WindowCarbon::s_sizeRectSize = 16; #endif //GHOST_DRAW_CARBON_GUTTER -static const GLint sPreferredFormatWindow[8] = { +static const GLint sPreferredFormatWindow[16] = { AGL_RGBA, AGL_DOUBLEBUFFER, AGL_ACCELERATED, AGL_DEPTH_SIZE,32, AGL_AUX_BUFFERS, 1, +#if 1 // FRS_antialiasing +AGL_ACCUM_RED_SIZE, 16, +AGL_ACCUM_GREEN_SIZE, 16, +AGL_ACCUM_BLUE_SIZE,16, +AGL_ACCUM_ALPHA_SIZE, 16, +#endif AGL_NONE, }; -static const GLint sPreferredFormatFullScreen[9] = { +static const GLint sPreferredFormatFullScreen[17] = { AGL_RGBA, AGL_DOUBLEBUFFER, AGL_ACCELERATED, AGL_FULLSCREEN, AGL_DEPTH_SIZE,32, AGL_AUX_BUFFERS, 1, +#if 1 // FRS_antialiasing +AGL_ACCUM_RED_SIZE, 16, +AGL_ACCUM_GREEN_SIZE, 16, +AGL_ACCUM_BLUE_SIZE,16, +AGL_ACCUM_ALPHA_SIZE, 16, +#endif AGL_NONE, }; Modified: branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowWin32.cpp === --- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowWin32.cpp 2008-11-20 08:25:01 UTC (rev 17516) +++ branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowWin32.cpp 2008-11-20 20:41:07 UTC (rev 17517) @@ -84,7 +84,11 @@ 0, 0, 0, 0, 0, 0, /* color bits (ignored) */ 0, /* no alpha buffer */ 0, /* alpha bits (ignored) */ +#if 1 // FRS_antialiasing + 1, /* accumulation buffer */ +#else 0, /* no accumulation buffer */ +#endif 0, 0, 0, 0, /* accum bits (ignored) */ 32, /* depth buffer */ 0, /* no stencil buffer */ @@ -491,6 +495,10 @@ // For debugging only: retrieve the pixel format chosen PIXELFORMATDESCRIPTOR preferredFormat; ::DescribePixelFormat(m_hDC, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &preferredFormat); +#if 1 // FRS_antialiasing + if (preferredFormat.cAccumBits > 0) + printf("Accumulation buffer enabled\n"); +#endif // Create the context m_hGlRc = ::wglCreateContext(m_hDC); if (m_hGlRc) { @@ -829,6 +837,9 @@ !(pfd.dwFlags & PFD_DRAW_TO_WINDOW) || !(pfd.dwFlags & PFD_DOUBLEBUFFER) || /* Blender _needs_ this */ ( pfd.cDepthBits <= 8 ) || +#if 1 // FRS_antialiasing + !pfd.cAccumBits || /* for antialiasing in Freestyle */ +#endif !(pfd.iPixelType == PFD_TYPE_RGBA) ) return 0; Modified: branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowX11.cpp === --- branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowX11.cpp 2008-11-20 08:25:01 UTC (rev 17516) +++ branches/soc-2008-mxcurioni/intern/ghost/intern/GHOST_WindowX11.cpp 2008-11-20 20:41:07 UTC (rev 17517) @@ -168,6 +168,12 @@ attributes[i++] = GLX_BLUE_SIZE; attributes[i++] = 1; attributes[i++] = GLX_GREEN_SIZE; attributes[i++] = 1; attributes[i++] = GLX_DEPTH_SIZE; attributes[i++] = 1; +#if 1 // FRS_antialiasing + attributes[i++] = GLX_ACCUM_RED_SIZE; attributes[i++] = 1; + attributes[i++] = GLX_ACCUM_GREEN_SIZE; attributes[i++] = 1; + attributes[i++] = GLX_ACCUM_BLUE_SIZE; attributes[i++] = 1; + attributes[i++] = GLX_ACCUM_ALPHA_SIZE; attributes[i++] = 1; +#endif attributes[i] = None; m_visual = glXChooseVisual(m_display, DefaultScreen(m_display), attributes); ___ 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 [17516] branches/soc-2008-nicholasbishop/ source/blender/blenkernel/intern/multires.c: WIP: Fixed tangents for vertices of valence 3.
Revision: 17516 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17516 Author: nicholasbishop Date: 2008-11-20 09:25:01 +0100 (Thu, 20 Nov 2008) Log Message: --- WIP: Fixed tangents for vertices of valence 3. Still need to look at handling triangles better. Modified Paths: -- branches/soc-2008-nicholasbishop/source/blender/blenkernel/intern/multires.c Modified: branches/soc-2008-nicholasbishop/source/blender/blenkernel/intern/multires.c === --- branches/soc-2008-nicholasbishop/source/blender/blenkernel/intern/multires.c 2008-11-20 06:44:50 UTC (rev 17515) +++ branches/soc-2008-nicholasbishop/source/blender/blenkernel/intern/multires.c 2008-11-20 08:25:01 UTC (rev 17516) @@ -559,6 +559,9 @@ int subco_index, face_index; float weight; + /* Valence for each corner */ + int valence[4]; + /* Indices of neighboring faces (or -1 for no neighbor) */ int face_spill_x, face_spill_y; /* 1 = Negative variable axis */ @@ -692,6 +695,15 @@ } } +static void find_corner_valences(MultiresDisplacer *d, DerivedMesh *dm) +{ + int i; + + /* Set the vertex valence for the corners */ + for(i = 0; i < (d->face->v4 ? 4 : 3); ++i) + d->valence[i] = BLI_countlist(&MultiresDM_get_vert_edge_map(dm)[((unsigned*)(&d->face->v1))[i]]); +} + static void multires_displacer_init(MultiresDisplacer *d, DerivedMesh *dm, const int face_index, const int invert) { @@ -715,6 +727,7 @@ multires_displacer_get_spill_faces(d, dm, me->mface); find_displacer_edges(d, dm, &d->edges_primary, d->face); + find_corner_valences(d, dm); d->dm_first_base_vert_index = dm->getNumVerts(dm) - me->totvert; } @@ -939,6 +952,14 @@ norm[1] = base->no[1] / 32767.0f; norm[2] = base->no[2] / 32767.0f; + /* Special handling for vertices of valence 3 */ + if(d->valence[1] == 3 && d->x == d->sidetot - 1 && d->y == 0) + u = -1; + else if(d->valence[2] == 3 && d->x == d->sidetot - 1 && d->y == d->sidetot - 1) + u = v = -1; + else if(d->valence[3] == 3 && d->x == 0 && d->y == d->sidetot - 1) + v = -1; + /* If either u or v is -2, it's on a boundary. In this case, back up by one row/column and use the same vector as the preceeding sub-edge. */ ___ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs