diff options
author | Ton Roosendaal <ton@blender.org> | 2006-08-09 14:00:27 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-08-09 14:00:27 +0400 |
commit | c56f04cb5f306af8ec4fe1a6f0fc309eb3fbcba9 (patch) | |
tree | 30f6c6d88982e0f697e32efb719860799d17e822 /source | |
parent | 6c48d7bda2963d71185ae34c7fb5aa2cb66b8f22 (diff) |
Fixes I did before leaving to siggraph, couldn't commit it due to freeze:
- buffer overflow was possible with providing a file path argument longer
than 256 characters.
- buttons "VCol Light" and "VCol Paint" were not mutual exclusive
- quicktime error menu (unable to create) had a enter in end
- deleting points in CurveMapping button (like Curves node in compositor)
did not give proper recalc event
- edges render menu had a tooltip still mentioning the unified render
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/readblenentry.c | 2 | ||||
-rw-r--r-- | source/blender/include/butspace.h | 2 | ||||
-rw-r--r-- | source/blender/quicktime/apple/quicktime_export.c | 2 | ||||
-rw-r--r-- | source/blender/src/butspace.c | 2 | ||||
-rw-r--r-- | source/blender/src/buttons_scene.c | 6 | ||||
-rw-r--r-- | source/blender/src/buttons_shading.c | 19 |
6 files changed, 25 insertions, 8 deletions
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c index a16bd5a3972..4e3c674c2f5 100644 --- a/source/blender/blenloader/intern/readblenentry.c +++ b/source/blender/blenloader/intern/readblenentry.c @@ -263,7 +263,7 @@ BlendFileData *BLO_read_from_file(char *file, BlendReadError *error_r) bfd= blo_read_file_internal(fd, error_r); if (bfd) { bfd->type= BLENFILETYPE_BLEND; - strcpy(bfd->main->name, file); + strncpy(bfd->main->name, file, sizeof(bfd->main->name)-1); } blo_freefiledata(fd); } diff --git a/source/blender/include/butspace.h b/source/blender/include/butspace.h index 366c7dfd658..9938274dd5a 100644 --- a/source/blender/include/butspace.h +++ b/source/blender/include/butspace.h @@ -203,6 +203,8 @@ void curvemap_buttons(struct uiBlock *block, struct CurveMapping *cumap, char la #define B_MAT_LAYERBROWSE 1220 #define B_MAT_USENODES 1221 +#define B_MAT_VCOL_PAINT 1222 +#define B_MAT_VCOL_LIGHT 1223 /* *********************** */ #define B_TEXBUTS 1400 diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c index 5f5a88cdde6..b231968f43c 100644 --- a/source/blender/quicktime/apple/quicktime_export.c +++ b/source/blender/quicktime/apple/quicktime_export.c @@ -501,7 +501,7 @@ void start_qt(struct RenderData *rd, int rectx, int recty) { if(err != noErr) { G.afbreek = 1; - error("Unable to create Quicktime movie: %s\n", name); + error("Unable to create Quicktime movie: %s", name); } else { printf("Created QuickTime movie: %s\n", name); diff --git a/source/blender/src/butspace.c b/source/blender/src/butspace.c index cabb916c9a1..061b505240b 100644 --- a/source/blender/src/butspace.c +++ b/source/blender/src/butspace.c @@ -484,7 +484,7 @@ void curvemap_buttons(uiBlock *block, CurveMapping *cumap, char labeltype, short bt= uiDefIconBlockBut(block, curvemap_clipping_func, cumap, event, icon, xco, yco, dx, 18, "Clipping Options"); xco= (short)(rect->xmin+8.0f*dx); - bt= uiDefIconBut(block, BUT, redraw, ICON_X, xco, yco, dx, 18, NULL, 0.0, 0.0, 0.0, 0.0, "Delete points"); + bt= uiDefIconBut(block, BUT, event, ICON_X, xco, yco, dx, 18, NULL, 0.0, 0.0, 0.0, 0.0, "Delete points"); uiButSetFunc(bt, curvemap_buttons_delete, cumap, NULL); uiBlockSetEmboss(block, UI_EMBOSS); diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index 9d9783f96b5..2ba2cd4e6fa 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -829,11 +829,11 @@ static uiBlock *edge_render_menu(void *arg_unused) uiBlockBeginAlign(block); uiDefButF(block, NUMSLI, 0, "R ", 45, 50, 175,19, &G.scene->r.edgeR, 0.0, 1.0, B_EDGECOLSLI, 0, - "For unified renderer: Colour for edges in toon shading mode."); + "Colour for edges in toon shading mode."); uiDefButF(block, NUMSLI, 0, "G ", 45, 30, 175,19, &G.scene->r.edgeG, 0.0, 1.0, B_EDGECOLSLI, 0, - "For unified renderer: Colour for edges in toon shading mode."); + "Colour for edges in toon shading mode."); uiDefButF(block, NUMSLI, 0, "B ", 45, 10, 175,19, &G.scene->r.edgeB, 0.0, 1.0, B_EDGECOLSLI, 0, - "For unified renderer: Colour for edges in toon shading mode."); + "Colour for edges in toon shading mode."); uiBlockSetDirection(block, UI_TOP); diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index a81d690cc91..6fdeb915e2a 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -2586,6 +2586,21 @@ void do_matbuts(unsigned short event) allqueue(REDRAWIPO, 0); } break; + case B_MAT_VCOL_PAINT: + if(ma) { + ma->mode &= ~MA_VERTEXCOL; + BIF_preview_changed(ID_MA); + allqueue(REDRAWBUTSSHADING, 0); + } + break; + case B_MAT_VCOL_LIGHT: + if(ma) { + ma->mode &= ~MA_VERTEXCOLP; + BIF_preview_changed(ID_MA); + allqueue(REDRAWBUTSSHADING, 0); + } + break; + } } @@ -3105,8 +3120,8 @@ static void material_panel_material(Material *ma) if(!(ma->mode & MA_HALO)) { uiBlockBeginAlign(block); uiBlockSetCol(block, TH_BUT_SETTING1); - uiDefButBitI(block, TOG, MA_VERTEXCOL, B_REDR, "VCol Light", 8,166,74,20, &(ma->mode), 0, 0, 0, 0, "Adds vertex colours as extra light"); - uiDefButBitI(block, TOG, MA_VERTEXCOLP, B_REDR, "VCol Paint", 82,166,74,20, &(ma->mode), 0, 0, 0, 0, "Replaces material's colours with vertex colours"); + uiDefButBitI(block, TOG, MA_VERTEXCOL, B_MAT_VCOL_LIGHT, "VCol Light", 8,166,74,20, &(ma->mode), 0, 0, 0, 0, "Adds vertex colours as extra light"); + uiDefButBitI(block, TOG, MA_VERTEXCOLP, B_MAT_VCOL_PAINT, "VCol Paint", 82,166,74,20, &(ma->mode), 0, 0, 0, 0, "Replaces material's colours with vertex colours"); uiDefButBitI(block, TOG, MA_FACETEXTURE, B_REDR, "TexFace", 156,166,74,20, &(ma->mode), 0, 0, 0, 0, "Sets UV-Editor assigned texture as color and texture info for faces"); uiDefButBitI(block, TOG, MA_SHLESS, B_MATPRV, "Shadeless", 230,166,73,20, &(ma->mode), 0, 0, 0, 0, "Makes material insensitive to light or shadow"); uiDefButBitI(block, TOG, MA_NOMIST, B_NOP, "No Mist", 8,146,146,20, &(ma->mode), 0, 0, 0, 0, "Sets the material to ignore mist values"); |