[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28852] branches/render25: Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/ blender -r28801:28850 ...note: dont merge my previous commit

Campbell Barton ideasman42 at gmail.com
Wed May 19 10:38:07 CEST 2010


Revision: 28852
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28852
Author:   campbellbarton
Date:     2010-05-19 10:38:07 +0200 (Wed, 19 May 2010)

Log Message:
-----------
Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender  -r28801:28850  ...note: dont merge my previous commit

Modified Paths:
--------------
    branches/render25/release/scripts/modules/bpy_types.py
    branches/render25/release/scripts/ui/properties_data_modifier.py
    branches/render25/release/scripts/ui/properties_physics_common.py
    branches/render25/release/scripts/ui/properties_render.py
    branches/render25/release/scripts/ui/properties_texture.py
    branches/render25/source/blender/blenkernel/BKE_utildefines.h
    branches/render25/source/blender/blenkernel/intern/packedFile.c
    branches/render25/source/blender/blenkernel/intern/pointcache.c
    branches/render25/source/blender/blenloader/intern/readfile.c
    branches/render25/source/blender/editors/physics/physics_pointcache.c
    branches/render25/source/blender/editors/space_image/image_ops.c
    branches/render25/source/blender/editors/space_view3d/view3d_view.c
    branches/render25/source/blender/imbuf/intern/jp2.c
    branches/render25/source/blender/imbuf/intern/openexr/openexr_api.cpp
    branches/render25/source/blender/imbuf/intern/tiff.c
    branches/render25/source/blender/makesrna/intern/rna_modifier.c
    branches/render25/source/blender/makesrna/intern/rna_space.c
    branches/render25/source/blender/python/doc/sphinx_doc_gen.py
    branches/render25/source/blender/python/intern/bpy_app.c
    branches/render25/source/blender/python/intern/bpy_driver.c
    branches/render25/source/gameengine/PyDoc/bge.render.rst
    branches/render25/source/gameengine/PyDoc/bge.types.rst

Removed Paths:
-------------
    branches/render25/source/gameengine/PyDoc/GameLogic.py
    branches/render25/source/gameengine/PyDoc/bge.keys.rst

Modified: branches/render25/release/scripts/modules/bpy_types.py
===================================================================
--- branches/render25/release/scripts/modules/bpy_types.py	2010-05-19 08:26:33 UTC (rev 28851)
+++ branches/render25/release/scripts/modules/bpy_types.py	2010-05-19 08:38:07 UTC (rev 28852)
@@ -410,6 +410,19 @@
         return ord_ind(verts[0], verts[1]), ord_ind(verts[1], verts[2]), ord_ind(verts[2], verts[3]), ord_ind(verts[3], verts[0])
 
 
+class Text(bpy_types.ID):
+    __slots__ = ()
+
+    def as_string(self):
+        """Return the text as a string."""
+        return "\n".join(line.line for line in self.lines)
+
+    def from_string(self, string):
+        """Replace text with this string."""
+        self.clear()
+        self.write(string)
+
+
 import collections
 
 

Modified: branches/render25/release/scripts/ui/properties_data_modifier.py
===================================================================
--- branches/render25/release/scripts/ui/properties_data_modifier.py	2010-05-19 08:26:33 UTC (rev 28851)
+++ branches/render25/release/scripts/ui/properties_data_modifier.py	2010-05-19 08:38:07 UTC (rev 28852)
@@ -229,7 +229,7 @@
 
     def DECIMATE(self, layout, ob, md, wide_ui):
         layout.prop(md, "ratio")
-        layout.prop(md, "face_count")
+        layout.label(text="Face Count: %s" % str(md.face_count))
 
     def DISPLACE(self, layout, ob, md, wide_ui):
         split = layout.split()

Modified: branches/render25/release/scripts/ui/properties_physics_common.py
===================================================================
--- branches/render25/release/scripts/ui/properties_physics_common.py	2010-05-19 08:26:33 UTC (rev 28851)
+++ branches/render25/release/scripts/ui/properties_physics_common.py	2010-05-19 08:38:07 UTC (rev 28852)
@@ -29,7 +29,7 @@
     layout = self.layout
 
     wide_ui = context.region.width > narrowui
-    layout.set_context_pointer("PointCache", cache)
+    layout.set_context_pointer("point_cache", cache)
 
     row = layout.row()
     row.template_list(cache, "point_cache_list", cache, "active_point_cache_index", rows=2)

Modified: branches/render25/release/scripts/ui/properties_render.py
===================================================================
--- branches/render25/release/scripts/ui/properties_render.py	2010-05-19 08:26:33 UTC (rev 28851)
+++ branches/render25/release/scripts/ui/properties_render.py	2010-05-19 08:38:07 UTC (rev 28852)
@@ -317,7 +317,16 @@
         if rd.file_format in ('AVI_JPEG', 'JPEG'):
             split = layout.split()
             split.prop(rd, "file_quality", slider=True)
+        
+        elif rd.file_format == 'MULTILAYER':
+            split = layout.split()
 
+            col = split.column()
+            col.label(text="Codec:")
+            col.prop(rd, "exr_codec", text="")
+            if wide_ui:
+                col = split.column()
+
         elif rd.file_format == 'OPEN_EXR':
             split = layout.split()
 

Modified: branches/render25/release/scripts/ui/properties_texture.py
===================================================================
--- branches/render25/release/scripts/ui/properties_texture.py	2010-05-19 08:26:33 UTC (rev 28851)
+++ branches/render25/release/scripts/ui/properties_texture.py	2010-05-19 08:38:07 UTC (rev 28852)
@@ -378,7 +378,8 @@
                 factor_but(col, tex.map_sss_scale, "map_sss_scale", "sss_scale_factor", "SSS Scale")
 
                 col.label(text="Geometry:")
-                factor_but(col, tex.map_normal, "map_normal", "normal_factor", "Normal")
+                # XXX replace 'or' when displacement is fixed to not rely on normal influence value.
+                factor_but(col, (tex.map_normal or tex.map_displacement), "map_normal", "normal_factor", "Normal")
                 factor_but(col, tex.map_warp, "map_warp", "warp_factor", "Warp")
                 factor_but(col, tex.map_displacement, "map_displacement", "displacement_factor", "Displace")
 

Modified: branches/render25/source/blender/blenkernel/BKE_utildefines.h
===================================================================
--- branches/render25/source/blender/blenkernel/BKE_utildefines.h	2010-05-19 08:26:33 UTC (rev 28851)
+++ branches/render25/source/blender/blenkernel/BKE_utildefines.h	2010-05-19 08:38:07 UTC (rev 28852)
@@ -105,6 +105,7 @@
 #define AVG2(x, y)		( 0.5 * ((x) + (y)) )
 
 #define FTOCHAR(val) ((val)<=0.0f)? 0 : (((val)>(1.0f-0.5f/255.0f))? 255 : (char)((255.0f*(val))+0.5f))
+#define FTOUSHORT(val) ((val >= 1.0f-0.5f/65535)? 65535: (val <= 0.0f)? 0: (unsigned short)(val*65535.0f + 0.5f))
 
 #define VECCOPY(v1,v2)          {*(v1)= *(v2); *(v1+1)= *(v2+1); *(v1+2)= *(v2+2);}
 #define VECCOPY2D(v1,v2)          {*(v1)= *(v2); *(v1+1)= *(v2+1);}

Modified: branches/render25/source/blender/blenkernel/intern/packedFile.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/packedFile.c	2010-05-19 08:26:33 UTC (rev 28851)
+++ branches/render25/source/blender/blenkernel/intern/packedFile.c	2010-05-19 08:38:07 UTC (rev 28852)
@@ -186,7 +186,7 @@
 
 	file= open(name, O_BINARY|O_RDONLY);
 	if (file <= 0) {
-		BKE_reportf(reports, RPT_ERROR, "Can't open file: \"%s\"", name);
+		BKE_reportf(reports, RPT_ERROR, "Unable to pack file, source path not found: \"%s\"", name);
 	} else {
 		filelen = BLI_filesize(file);
 
@@ -216,15 +216,15 @@
 	bSound *sound;
 
 	for(ima=bmain->image.first; ima; ima=ima->id.next)
-		if(ima->packedfile == NULL)
+		if(ima->packedfile == NULL && ima->id.lib==NULL && ELEM3(ima->type, IMA_SRC_FILE, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE))
 			ima->packedfile = newPackedFile(reports, ima->name);
 
 	for(vf=bmain->vfont.first; vf; vf=vf->id.next)
-		if(vf->packedfile == NULL)
+		if(vf->packedfile == NULL && vf->id.lib==NULL)
 			vf->packedfile = newPackedFile(reports, vf->name);
 
 	for(sound=bmain->sound.first; sound; sound=sound->id.next)
-		if(sound->packedfile == NULL)
+		if(sound->packedfile == NULL && vf->id.lib==NULL)
 			sound->packedfile = newPackedFile(reports, sound->name);
 }
 

Modified: branches/render25/source/blender/blenkernel/intern/pointcache.c
===================================================================
--- branches/render25/source/blender/blenkernel/intern/pointcache.c	2010-05-19 08:26:33 UTC (rev 28851)
+++ branches/render25/source/blender/blenkernel/intern/pointcache.c	2010-05-19 08:38:07 UTC (rev 28852)
@@ -2383,8 +2383,12 @@
 static void *ptcache_make_cache_thread(void *ptr) {
 	ptcache_make_cache_data *data = (ptcache_make_cache_data*)ptr;
 
-	for(; (*data->cfra_ptr <= data->endframe) && !data->break_operation; *data->cfra_ptr+=data->step)
+	for(; (*data->cfra_ptr <= data->endframe) && !data->break_operation; *data->cfra_ptr+=data->step) {
 		scene_update_for_newframe(data->scene, data->scene->lay);
+		if(G.background) {
+			printf("bake: frame %d :: %d\n", (int)*data->cfra_ptr, data->endframe);
+		}
+	}
 
 	data->thread_ended = TRUE;
 	return NULL;
@@ -2506,36 +2510,40 @@
 	thread_data.thread_ended = FALSE;
 	old_progress = -1;
 	
-	BLI_init_threads(&threads, ptcache_make_cache_thread, 1);
-	BLI_insert_thread(&threads, (void*)&thread_data);
-	
-	while (thread_data.thread_ended == FALSE) {
+	if(G.background) {
+		ptcache_make_cache_thread((void*)&thread_data);
+	}
+	else {
+		BLI_init_threads(&threads, ptcache_make_cache_thread, 1);
+		BLI_insert_thread(&threads, (void*)&thread_data);
 
-		if(bake)
-			progress = (int)(100.0f * (float)(CFRA - startframe)/(float)(thread_data.endframe-startframe));
-		else
-			progress = CFRA;
+		while (thread_data.thread_ended == FALSE) {
 
-		/* NOTE: baking should not redraw whole ui as this slows things down */
-		if ((baker->progressbar) && (progress != old_progress)) {
-			baker->progressbar(baker->progresscontext, progress);
-			old_progress = progress;
-		}
-		
-		/* Delay to lessen CPU load from UI thread */
-		PIL_sleep_ms(200);
+			if(bake)
+				progress = (int)(100.0f * (float)(CFRA - startframe)/(float)(thread_data.endframe-startframe));
+			else
+				progress = CFRA;
 
-		/* NOTE: breaking baking should leave calculated frames in cache, not clear it */
-		if(blender_test_break() && !thread_data.break_operation) {
-			thread_data.break_operation = TRUE;
-			if (baker->progressend)
-				baker->progressend(baker->progresscontext);
-			WM_cursor_wait(1);
+			/* NOTE: baking should not redraw whole ui as this slows things down */
+			if ((baker->progressbar) && (progress != old_progress)) {
+				baker->progressbar(baker->progresscontext, progress);
+				old_progress = progress;
+			}
+
+			/* Delay to lessen CPU load from UI thread */
+			PIL_sleep_ms(200);
+
+			/* NOTE: breaking baking should leave calculated frames in cache, not clear it */
+			if(blender_test_break() && !thread_data.break_operation) {
+				thread_data.break_operation = TRUE;
+				if (baker->progressend)
+					baker->progressend(baker->progresscontext);
+				WM_cursor_wait(1);
+			}
 		}
-	}
 
 	BLI_end_threads(&threads);
-
+	}
 	/* clear baking flag */
 	if(pid) {
 		cache->flag &= ~(PTCACHE_BAKING|PTCACHE_REDO_NEEDED);

Modified: branches/render25/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/render25/source/blender/blenloader/intern/readfile.c	2010-05-19 08:26:33 UTC (rev 28851)
+++ branches/render25/source/blender/blenloader/intern/readfile.c	2010-05-19 08:38:07 UTC (rev 28852)
@@ -4214,8 +4214,8 @@
 				base->object= newlibadr_us(fd, sce->id.lib, base->object);
 				
 				if(base->object==NULL) {
-					printf("LIB ERROR: base removed\n");
 					BKE_reportf(fd->reports, RPT_ERROR, "LIB ERROR: Object lost from scene:'%s\'\n", sce->id.name+2);
+					if(G.background==0) printf("LIB ERROR: base removed from scene:'%s\'\n", sce->id.name+2);
 					BLI_remlink(&sce->base, base);
 					if(base==sce->basact) sce->basact= 0;
 					MEM_freeN(base);
@@ -12428,8 +12428,8 @@
 				if(fd==NULL) {
 
 					/* printf and reports for now... its important users know this */
-					printf("read library: '%s', '%s'\n", mainptr->curlib->filename, mainptr->curlib->name);
 					BKE_reportf(basefd->reports, RPT_INFO, "read library:  '%s', '%s'\n", mainptr->curlib->filename, mainptr->curlib->name);
+					if(!G.background && basefd->reports) printf("read library: '%s', '%s'\n", mainptr->curlib->filename, mainptr->curlib->name);
 

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list