Cycles: clean up some unnecessary changes compared to trunk.

This commit is contained in:
Brecht Van Lommel 2011-08-12 18:29:21 +00:00
parent b4343da77f
commit 84d917dc6c
14 changed files with 51 additions and 56 deletions

@ -58,4 +58,3 @@ endif()
if(WITH_IK_ITASC)
add_subdirectory(itasc)
endif()

@ -653,10 +653,6 @@ Material *give_node_material(Material *ma)
return NULL;
}
/*Image *give_mesh_face_image(Object *ob, int face)
{
}*/
/* GS reads the memory pointed at in a specific ordering. There are,
* however two definitions for it. I have jotted them down here, both,
* but I think the first one is actually used. The thing is that

@ -860,7 +860,7 @@ Lamp *copy_lamp(Lamp *la)
for(a=0; a<MAX_MTEX; a++) {
if(lan->mtex[a]) {
lan->mtex[a]= MEM_mallocN(sizeof(MTex), "copy_lamp");
lan->mtex[a]= MEM_mallocN(sizeof(MTex), "copylamptex");
memcpy(lan->mtex[a], la->mtex[a], sizeof(MTex));
id_us_plus((ID *)lan->mtex[a]->tex);
}

@ -137,7 +137,7 @@ World *copy_world(World *wrld)
if(wrld->preview)
wrldn->preview = BKE_previewimg_copy(wrld->preview);
return wrldn;
}

@ -35,6 +35,7 @@
struct ARegionType;
struct EditFace;
struct Image;
struct Main;
struct ImageUser;
struct MTFace;
struct Object;

@ -671,9 +671,9 @@ static void screen_test_scale(bScreen *sc, int winsizex, int winsizey)
/* test for collapsed areas. This could happen in some blender version... */
/* ton: removed option now, it needs Context... */
/* make each window at least HEADERY high */
/* make each window at least ED_area_headersize() high */
for(sa= sc->areabase.first; sa; sa= sa->next) {
int headery= HEADERY+1;
int headery= ED_area_headersize()+1;
if(sa->v1->vec.y+headery > sa->v2->vec.y) {
/* lower edge */

@ -195,5 +195,6 @@ void node_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "NODE_OT_read_fullsamplelayers", RKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "NODE_OT_render_changed", ZKEY, KM_PRESS, 0, 0);
transform_keymap_for_space(keyconf, keymap, SPACE_NODE);
}

@ -131,7 +131,7 @@ static int draw_mesh_face_select__setHiddenOpts(void *userData, int index)
MEdge *med = &me->medge[index];
uintptr_t flags = (intptr_t) BLI_edgehash_lookup(data->eh, med->v1, med->v2);
if(me->drawflag & ME_DRAWEDGES){
if(me->drawflag & ME_DRAWEDGES) {
if(me->drawflag & ME_HIDDENEDGES)
return 1;
else
@ -223,7 +223,7 @@ static int set_draw_settings_cached(int clearcache, int textured, MTFace *texfac
static int c_litmatnr;
static int c_badtex;
if(clearcache) {
if (clearcache) {
c_textured= c_lit= c_doublesided= -1;
c_texface= (MTFace*) -1;
c_litob= (Object*) -1;
@ -231,7 +231,7 @@ static int set_draw_settings_cached(int clearcache, int textured, MTFace *texfac
c_badtex= 0;
}
if(texface) {
if (texface) {
lit = lit && (lit==-1 || texface->mode&TF_LIGHT);
textured = textured && (texface->mode&TF_TEX);
doublesided = texface->mode&TF_TWOSIDE;
@ -239,15 +239,15 @@ static int set_draw_settings_cached(int clearcache, int textured, MTFace *texfac
textured = 0;
}
if(doublesided!=c_doublesided) {
if(doublesided) glDisable(GL_CULL_FACE);
if (doublesided!=c_doublesided) {
if (doublesided) glDisable(GL_CULL_FACE);
else glEnable(GL_CULL_FACE);
c_doublesided= doublesided;
}
if(textured!=c_textured || texface!=c_texface) {
if(textured ) {
if (textured!=c_textured || texface!=c_texface) {
if (textured ) {
c_badtex= !GPU_set_tpage(texface, !(litob->mode & OB_MODE_TEXTURE_PAINT));
} else {
GPU_set_tpage(NULL, 0);
@ -257,9 +257,9 @@ static int set_draw_settings_cached(int clearcache, int textured, MTFace *texfac
c_texface= texface;
}
if(c_badtex) lit= 0;
if(lit!=c_lit || litob!=c_litob || litmatnr!=c_litmatnr) {
if(lit) {
if (c_badtex) lit= 0;
if (lit!=c_lit || litob!=c_litob || litmatnr!=c_litmatnr) {
if (lit) {
Material *ma= give_current_material_or_def(litob, litmatnr+1);
float spec[4];
@ -353,16 +353,16 @@ static void draw_textured_end(void)
static int draw_tface__set_draw_legacy(MTFace *tface, MCol *mcol, int matnr)
{
if(tface && (tface->mode&TF_INVISIBLE)) return 0;
if (tface && (tface->mode&TF_INVISIBLE)) return 0;
if(tface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, matnr, TF_TWOSIDE)) {
if (tface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, matnr, TF_TWOSIDE)) {
glColor3ub(0xFF, 0x00, 0xFF);
return 2; /* Don't set color */
} else if(tface && tface->mode&TF_OBCOL) {
} else if (tface && tface->mode&TF_OBCOL) {
glColor3ubv(Gtexdraw.obcol);
return 2; /* Don't set color */
} else if(!mcol) {
if(tface) glColor3f(1.0, 1.0, 1.0);
} else if (!mcol) {
if (tface) glColor3f(1.0, 1.0, 1.0);
else {
Material *ma= give_current_material(Gtexdraw.ob, matnr+1);
if(ma) {
@ -381,13 +381,13 @@ static int draw_tface__set_draw_legacy(MTFace *tface, MCol *mcol, int matnr)
}
static int draw_tface__set_draw(MTFace *tface, MCol *mcol, int matnr)
{
if(tface && (tface->mode&TF_INVISIBLE)) return 0;
if (tface && (tface->mode&TF_INVISIBLE)) return 0;
if(tface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, matnr, TF_TWOSIDE)) {
if (tface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, matnr, TF_TWOSIDE)) {
return 2; /* Don't set color */
} else if(tface && tface->mode&TF_OBCOL) {
} else if (tface && tface->mode&TF_OBCOL) {
return 2; /* Don't set color */
} else if(!mcol) {
} else if (!mcol) {
return 1; /* Don't set color */
} else {
return 1; /* Set color from mcol */
@ -405,7 +405,7 @@ static void add_tface_color_layer(DerivedMesh *dm)
finalCol = MEM_mallocN(sizeof(MCol)*4*dm->getNumFaces(dm),"add_tface_color_layer");
for(i=0;i<dm->getNumFaces(dm);i++) {
if(tface && (tface->mode&TF_INVISIBLE)) {
if (tface && (tface->mode&TF_INVISIBLE)) {
if( mcol )
memcpy(&finalCol[i*4],&mcol[i*4],sizeof(MCol)*4);
else
@ -415,20 +415,20 @@ static void add_tface_color_layer(DerivedMesh *dm)
finalCol[i*4+j].r = 255;
}
}
else if(tface && mface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, mface[i].mat_nr, TF_TWOSIDE)) {
else if (tface && mface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, mface[i].mat_nr, TF_TWOSIDE)) {
for(j=0;j<4;j++) {
finalCol[i*4+j].b = 255;
finalCol[i*4+j].g = 0;
finalCol[i*4+j].r = 255;
}
} else if(tface && tface->mode&TF_OBCOL) {
} else if (tface && tface->mode&TF_OBCOL) {
for(j=0;j<4;j++) {
finalCol[i*4+j].r = FTOCHAR(Gtexdraw.obcol[0]);
finalCol[i*4+j].g = FTOCHAR(Gtexdraw.obcol[1]);
finalCol[i*4+j].b = FTOCHAR(Gtexdraw.obcol[2]);
}
} else if(!mcol) {
if(tface) {
} else if (!mcol) {
if (tface) {
for(j=0;j<4;j++) {
finalCol[i*4+j].b = 255;
finalCol[i*4+j].g = 255;
@ -474,7 +474,7 @@ static int draw_tface_mapped__set_draw(void *userData, int index)
MFace *mface = &me->mface[index];
MCol *mcol = (me->mcol)? &me->mcol[index]: NULL;
const int matnr = mface->mat_nr;
if(mface->flag & ME_HIDE) return 0;
if (mface->flag & ME_HIDE) return 0;
return draw_tface__set_draw(tface, mcol, matnr);
}
@ -486,7 +486,7 @@ static int draw_em_tf_mapped__set_draw(void *userData, int index)
MCol *mcol;
int matnr;
if(efa->h)
if (efa->h)
return 0;
tface = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
@ -500,7 +500,7 @@ static int wpaint__setSolidDrawOptions(void *userData, int index, int *drawSmoot
{
Mesh *me = (Mesh*)userData;
if( (me->mface && me->mface[index].flag & ME_HIDE) ||
if ( (me->mface && me->mface[index].flag & ME_HIDE) ||
(me->mtface && (me->mtface[index].mode & TF_INVISIBLE))
) {
return 0;
@ -539,7 +539,7 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl)
int matnr= mf->mat_nr;
int mf_smooth= mf->flag & ME_SMOOTH;
if(!(mf->flag&ME_HIDE) && !(mode&TF_INVISIBLE) && (mode&TF_BMFONT)) {
if (!(mf->flag&ME_HIDE) && !(mode&TF_INVISIBLE) && (mode&TF_BMFONT)) {
float v1[3], v2[3], v3[3], v4[3];
char string[MAX_PROPSTRING];
int characters, i, glattrib= -1, badtex= 0;
@ -556,8 +556,8 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl)
}
else {
badtex = set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, matnr, TF_TWOSIDE);
if(badtex) {
if(mcol) mcol+=4;
if (badtex) {
if (mcol) mcol+=4;
continue;
}
}
@ -565,7 +565,7 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl)
ddm->getVertCo(ddm, mf->v1, v1);
ddm->getVertCo(ddm, mf->v2, v2);
ddm->getVertCo(ddm, mf->v3, v3);
if(mf->v4) ddm->getVertCo(ddm, mf->v4, v4);
if (mf->v4) ddm->getVertCo(ddm, mf->v4, v4);
// The BM_FONT handling is in the gpu module, shared with the
// game engine, was duplicated previously
@ -576,7 +576,7 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl)
if(!BKE_image_get_ibuf(tface->tpage, NULL))
characters = 0;
if(!mf_smooth) {
if (!mf_smooth) {
float nor[3];
normal_tri_v3( nor,v1, v2, v3);
@ -587,7 +587,7 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl)
GPU_render_text(tface, tface->mode, string, characters,
(unsigned int*)mcol, v1, v2, v3, (mf->v4? v4: NULL), glattrib);
}
if(mcol) {
if (mcol) {
mcol+=4;
}
}

@ -630,7 +630,6 @@ static void view3d_recalc_used_layers(ARegion *ar, wmNotifier *wmn, Scene *scene
static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
{
bScreen *sc;
RegionView3D *rv3d= ar->regiondata;
/* context changes */
switch(wmn->category) {
@ -754,9 +753,10 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
break;
case NC_SPACE:
if(wmn->data == ND_SPACE_VIEW3D) {
if (wmn->subtype == NS_VIEW3D_GPU)
if (wmn->subtype == NS_VIEW3D_GPU) {
RegionView3D *rv3d= ar->regiondata;
rv3d->rflag |= RV3D_GPULIGHT_UPDATE;
}
ED_region_tag_redraw(ar);
}
break;

@ -1361,11 +1361,6 @@ static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerR
else
prop->update(bmain, scene, ptr);
}
else if(!(prop->flag & PROP_BUILTIN)) {
DAG_id_tag_update(ptr->id.data, OB_RECALC_ALL);
WM_main_add_notifier(NC_WINDOW, NULL);
}
if(prop->noteflag)
WM_main_add_notifier(prop->noteflag, ptr->id.data);
}

@ -111,7 +111,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
return result;
}
static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
static DerivedMesh *applyModifierEM(ModifierData *md, Object *UNUSED(ob),
struct EditMesh *UNUSED(editData),
DerivedMesh *derivedData)
{

@ -95,3 +95,5 @@ void register_node_type_sh_hue_sat(ListBase *lb)
nodeRegisterType(lb, &ntype);
}

@ -118,13 +118,13 @@ set(SRC
intern/raytrace/vbvh.h
)
IF(WITH_PYTHON)
ADD_DEFINITIONS(-DWITH_PYTHON)
LIST(APPEND INC ../python ${PYTHON_INC})
if(WITH_PYTHON)
add_definitions(-DWITH_PYTHON)
list(APPEND INC ../python ${PYTHON_INC})
endif()
IF(WITH_IMAGE_OPENEXR)
ADD_DEFINITIONS(-DWITH_OPENEXR)
if(WITH_IMAGE_OPENEXR)
add_definitions(-DWITH_OPENEXR)
endif()
if(WITH_MOD_SMOKE)

@ -231,6 +231,7 @@ else()
set(TARGETDIR ${EXECUTABLE_OUTPUT_PATH})
endif()
# -----------------------------------------------------------------------------
# Install Targets