branches/2-44-stable

Merge from trunk:

revision 11005:11006
    Setting object layers didnt break once the base of an object was found.
    DAG update and countall ran even when the object wasnt in the scene.
    Link: http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11006

revision 11041:11042
    Small Makefile fix for verse.                    
    Link: http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11042

revision 10728:10729
    Disable SSS better for preview rendering, so it does not slow down other
    preview renders at all.
    NOTE: i know that this is not a "fix" but i think that this is need
    for the stable branch (functional fixes).             
    Link: http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10729

revision 10848:10849
    Fix error in the version patch for the SSS scene flag.
    Link: http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10849
This commit is contained in:
Diego Borghetti 2007-06-26 15:24:02 +00:00
parent 3f0ea9b148
commit 0860be659c
7 changed files with 29 additions and 9 deletions

View File

@ -34,6 +34,7 @@ DIR = $(OCGDIR)/$(SOURCEDIR)
DIRS = dist
include nan_subdirs.mk
include nan_compile.mk
include nan_link.mk
DISTDIR = dist
@ -53,5 +54,5 @@ install: all debug
ifeq ($(OS),darwin)
ranlib $(NAN_VERSE)/lib/libverse.a
endif
$(CC) $(LDFLAGS) -o $(DIR)/verse$(EXT) $(DIR)/libverse.a $(LIBS) $(SLIBS) $(LLIBS) $(DADD) $(LOPTS)
$(CCC) $(LDFLAGS) -o $(DIR)/verse$(EXT) $(DIR)/libverse.a $(LIBS) $(SLIBS) $(LLIBS) $(DADD) $(LOPTS)
@$(CP) $(DIR)/verse$(EXT) $(OCGDIR)/bin

View File

@ -44,7 +44,7 @@ struct ListBase;
struct MemFile;
#define BLENDER_VERSION 244
#define BLENDER_SUBVERSION 0
#define BLENDER_SUBVERSION 1
#define BLENDER_MINVERSION 240
#define BLENDER_MINSUBVERSION 0

View File

@ -6462,6 +6462,14 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
customdata_version_243(me);
}
}
if(main->versionfile <= 244) {
Scene *sce;
if(main->versionfile != 244 || main->subversionfile < 1) {
for(sce= main->scene.first; sce; sce= sce->id.next)
sce->r.mode |= R_SSS;
}
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */

View File

@ -486,6 +486,7 @@ typedef struct Scene {
/* threads obsolete... is there for old files */
#define R_THREADS 0x80000
#define R_SPEED 0x100000
#define R_SSS 0x200000
/* filtertype */
#define R_FILTER_BOX 0

View File

@ -1236,7 +1236,9 @@ static int Object_setSelect( BPy_Object * self, PyObject * value )
}
base = base->next;
}
countall( );
if(base) { /* was the object selected? */
countall( );
}
return 0;
}
@ -4264,13 +4266,16 @@ static int Object_setLayers( BPy_Object * self, PyObject *value )
local = base->lay;
base->lay = local | layers;
self->object->lay = base->lay;
break;
}
base = base->next;
}
/* these to calls here are overkill! (ton) */
countall();
DAG_scene_sort( G.scene );
if(base) { /* The object was found? */
countall();
DAG_scene_sort( G.scene );
}
return 0;
}
@ -4300,11 +4305,14 @@ static int Object_setLayersMask( BPy_Object *self, PyObject *value )
local = base->lay;
base->lay = local | layers;
self->object->lay = base->lay;
break;
}
base = base->next;
}
countall();
DAG_scene_sort( G.scene );
if(base) { /* The object was found? */
countall();
DAG_scene_sort( G.scene );
}
return 0;
}

View File

@ -3483,7 +3483,7 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view)
project_renderdata(re, projectverto, re->r.mode & R_PANORAMA, 0);
/* SSS */
if(!re->test_break())
if((re->r.mode & R_SSS) && !re->test_break())
if (re->r.renderer==R_INTERN)
make_sss_tree(re);
}

View File

@ -283,6 +283,8 @@ static Scene *preview_prepare_scene(RenderInfo *ri, int id_type, ID *id, int pr_
/* turn on raytracing if needed */
if(mat->mode_l & (MA_RAYTRANSP|MA_RAYMIRROR))
sce->r.mode |= R_RAYTRACE;
if(mat->sss_flag & MA_DIFF_SSS)
sce->r.mode |= R_SSS;
/* turn off fake shadows if needed */
/* this only works in a specific case where the preview.blend contains
@ -314,7 +316,7 @@ static Scene *preview_prepare_scene(RenderInfo *ri, int id_type, ID *id, int pr_
}
}
else {
sce->r.mode &= ~(R_OSA|R_RAYTRACE);
sce->r.mode &= ~(R_OSA|R_RAYTRACE|R_SSS);
}
for(base= sce->base.first; base; base= base->next) {