diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 103a9f23de1..5c0843b1873 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3198,7 +3198,6 @@ static void lib_link_group(FileData *fd, Main *main) } if(add_us) group->id.us++; rem_from_group(group, NULL); /* removes NULL entries */ - } group= group->id.next; } diff --git a/source/blender/include/BIF_editgroup.h b/source/blender/include/BIF_editgroup.h index e86bd962a6c..63399be30d8 100644 --- a/source/blender/include/BIF_editgroup.h +++ b/source/blender/include/BIF_editgroup.h @@ -31,6 +31,7 @@ */ struct Group; +struct Base; void add_selected_to_group(struct Group *group); void rem_selected_from_group(void); diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h index 9991148ad3d..8e150b10a82 100644 --- a/source/blender/makesdna/DNA_material_types.h +++ b/source/blender/makesdna/DNA_material_types.h @@ -85,7 +85,7 @@ typedef struct Material { short flarec, starc, linec, ringc; float hasize, flaresize, subsize, flareboost; float strand_sta, strand_end, strand_ease; - float pad1; + float sbias; /* shadow bias */ /* for buttons and render*/ char rgbsel, texact, pr_type, pad; diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 88075e718de..50243c26887 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -326,7 +326,6 @@ extern Object workob; #define BA_HAS_RECALC_DATA 8 #define BA_DO_IPO 32 -#define OB_GONNA_MOVE 32 #define BA_FROMSET 128 #define OB_DO_IMAT 256 diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index 1a2f942fd2a..739b4a4757f 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -1658,6 +1658,12 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr) else phongcorr= 0.0; } + else if(ma->sbias!=0.0f) { + if(inp>ma->sbias) + phongcorr= (inp-ma->sbias)/(inp*(1.0-ma->sbias)); + else + phongcorr= 0.0; + } else phongcorr= 1.0; /* diffuse shaders */ diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c index c942232bebb..9ff3c104d0a 100644 --- a/source/blender/render/intern/source/shadbuf.c +++ b/source/blender/render/intern/source/shadbuf.c @@ -443,7 +443,7 @@ float testshadowbuf(struct ShadBuf *shb, float *rco, float *dxco, float *dyco, f int xs,ys, zs, bias; short a,num; - /* if(inp <= 0.0) return 1.0; */ + if(inp <= 0.0) return 0.0; /* rotate renderco en osaco */ siz= 0.5*(float)shb->size; diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index 27504e1d2e0..f12707d7ac4 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -3168,9 +3168,10 @@ static void material_panel_shading(Material *ma) uiDefButF(block, NUMSLI, B_MATPRV, "rms:", 90, 100,150,19, &(ma->rms), 0.0, 0.4, 0, 0, "Sets the standard deviation of surface slope"); /* default shading variables */ uiBlockBeginAlign(block); - uiDefButF(block, NUMSLI, B_DIFF, "Translucency ", 9,30,301,19, &(ma->translucency), 0.0, 1.0, 100, 2, "Amount of diffuse shading of the back side"); + uiDefButF(block, NUMSLI, B_DIFF, "Tralu ", 9,30,150,19, &(ma->translucency), 0.0, 1.0, 100, 2, "Translucency, amount of diffuse shading of the back side"); + uiDefButF(block, NUMSLI, B_DIFF, "SBias ", 159,30,151,19, &(ma->sbias), 0.0, 0.25, 10, 2, "Shadow bias, to prevent terminator problems on shadow boundary"); uiDefButF(block, NUMSLI, B_MATPRV, "Amb ", 9,10,150,19, &(ma->amb), 0.0, 1.0, 0, 0, "Sets the amount of global ambient color the material receives"); - uiDefButF(block, NUMSLI, B_MATPRV, "Emit ", 160,10,150,19, &(ma->emit), 0.0, 1.0, 0, 0, "Sets the amount of light the material emits"); + uiDefButF(block, NUMSLI, B_MATPRV, "Emit ", 159,10,151,19, &(ma->emit), 0.0, 1.0, 0, 0, "Sets the amount of light the material emits"); uiBlockEndAlign(block); uiBlockSetCol(block, TH_BUT_SETTING1); diff --git a/source/blender/src/editscreen.c b/source/blender/src/editscreen.c index b95fc9f11bd..d703e1a53c8 100644 --- a/source/blender/src/editscreen.c +++ b/source/blender/src/editscreen.c @@ -401,6 +401,7 @@ void scrarea_do_headdraw(ScrArea *area) case SPACE_NLA: nla_buttons(); break; case SPACE_TIME: time_buttons(area); break; } + uiClearButLock(); //glScissor(area->winrct.xmin, area->winrct.xmax, area->winx, area->winy); area->head_swap= WIN_BACK_OK; diff --git a/source/blender/src/editview.c b/source/blender/src/editview.c index 458be9a0897..73fff83f98d 100644 --- a/source/blender/src/editview.c +++ b/source/blender/src/editview.c @@ -1026,8 +1026,6 @@ static unsigned int samplerect(unsigned int *buf, int size, unsigned int dontdo) } #endif -#define SELECTSIZE 51 - void set_active_base(Base *base) { Base *tbase; @@ -1035,6 +1033,7 @@ void set_active_base(Base *base) BASACT= base; if(base) { + /* signals to buttons */ redraw_test_buttons(base->object); @@ -1060,13 +1059,11 @@ void set_active_object(Object *ob) { Base *base; - base= FIRSTBASE; - while(base) { + for(base= FIRSTBASE; base; base= base->next) { if(base->object==ob) { set_active_base(base); return; } - base= base->next; } }