forked from bartvdbraak/blender
fix for missing NULL check in init_render_texture() (possibly own fault), also remove some redundant code.
This commit is contained in:
parent
123a25c52b
commit
f5d3e361ce
@ -152,7 +152,7 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm)
|
|||||||
|
|
||||||
BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
|
BM_ITER_MESH (efa, &iter, bm, BM_FACES_OF_MESH) {
|
||||||
/* don't consider two-edged faces */
|
/* don't consider two-edged faces */
|
||||||
if (efa->len < 3) {
|
if (UNLIKELY(efa->len < 3)) {
|
||||||
/* do nothing */
|
/* do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -380,7 +380,7 @@ BMFace *BM_face_create_ngon_vcloud(BMesh *bm, BMVert **vert_arr, int totv, int n
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub_v3_v3v3(far_vec, far, cent);
|
sub_v3_v3v3(far_vec, far, cent);
|
||||||
far_dist = len_v3(far_vec); /* real dist */
|
// far_dist = len_v3(far_vec); /* real dist */ /* UNUSED */
|
||||||
|
|
||||||
/* --- */
|
/* --- */
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ static void init_render_texture(Render *re, Tex *tex)
|
|||||||
{
|
{
|
||||||
/* imap test */
|
/* imap test */
|
||||||
if (tex->ima && ELEM(tex->ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
|
if (tex->ima && ELEM(tex->ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
|
||||||
BKE_image_user_frame_calc(&tex->iuser, re->r.cfra, re?re->flag & R_SEC_FIELD:0);
|
BKE_image_user_frame_calc(&tex->iuser, re ? re->r.cfra : 0, re ? re->flag & R_SEC_FIELD:0);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (tex->type==TEX_ENVMAP) {
|
else if (tex->type==TEX_ENVMAP) {
|
||||||
@ -2760,12 +2760,10 @@ void do_volume_tex(ShadeInput *shi, const float *xyz, int mapto_flag, float col_
|
|||||||
/* stencil maps on the texture control slider, not texture intensity value */
|
/* stencil maps on the texture control slider, not texture intensity value */
|
||||||
|
|
||||||
/* convert RGB to intensity if intensity info isn't provided */
|
/* convert RGB to intensity if intensity info isn't provided */
|
||||||
if (!(rgbnor & TEX_INT)) {
|
|
||||||
if (rgbnor & TEX_RGB) {
|
if (rgbnor & TEX_RGB) {
|
||||||
if (texres.talpha) texres.tin = texres.ta;
|
if (texres.talpha) texres.tin = texres.ta;
|
||||||
else texres.tin = rgb_to_grayscale(&texres.tr);
|
else texres.tin = rgb_to_grayscale(&texres.tr);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if ((mapto_flag & MAP_EMISSION) && (mtex->mapto & MAP_EMISSION)) {
|
if ((mapto_flag & MAP_EMISSION) && (mtex->mapto & MAP_EMISSION)) {
|
||||||
float emitfac= mtex->emitfac*stencilTin;
|
float emitfac= mtex->emitfac*stencilTin;
|
||||||
|
Loading…
Reference in New Issue
Block a user