[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11619] branches/soc-2007-mosani/source/ blender: 1.
Aaron Moore
two.a.ron at gmail.com
Thu Aug 16 06:17:58 CEST 2007
Revision: 11619
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11619
Author: mosani
Date: 2007-08-16 06:17:58 +0200 (Thu, 16 Aug 2007)
Log Message:
-----------
1. Put in test code for the pluging loading error mfoxdogg was
talking about.
2. Temporarily disabled the render API for the preview renders,
because they use a different pipeline: it was crashing.
3. Fixed another OSA error, tiles work correctly...
(at least they do on my computer... these system incompatibilities
are making me paraniod.)
Modified Paths:
--------------
branches/soc-2007-mosani/source/blender/blenpluginapi/intern/pluginapi.c
branches/soc-2007-mosani/source/blender/render/intern/source/RND_convertblender.c
branches/soc-2007-mosani/source/blender/render/intern/source/RND_initrender.c
branches/soc-2007-mosani/source/blender/render/intern/source/rendercallbacks.c
branches/soc-2007-mosani/source/blender/render/render_api/source/RND_internal.c
branches/soc-2007-mosani/source/blender/src/previewrender.c
Modified: branches/soc-2007-mosani/source/blender/blenpluginapi/intern/pluginapi.c
===================================================================
--- branches/soc-2007-mosani/source/blender/blenpluginapi/intern/pluginapi.c 2007-08-16 03:46:46 UTC (rev 11618)
+++ branches/soc-2007-mosani/source/blender/blenpluginapi/intern/pluginapi.c 2007-08-16 04:17:58 UTC (rev 11619)
@@ -826,6 +826,11 @@
if (!h) {
return;
}
+
+ /* plugin-loading-error */
+ printf( "dynamic library opened: \n pointer - %p\n name - %s\n",
+ h,
+ filename );
stat(filename, &status);
@@ -833,6 +838,10 @@
current_lastchanged = status.st_mtime;
query_func = (void (*)()) PIL_dynlib_find_symbol(h, "plugin_query");
+
+ /* plugin-loading-error */
+ printf( "plugin query function: \n pointer - %p\n",
+ query_func );
if (query_func) {
if (!plugin_store_all_apis(h)) {
@@ -1654,6 +1663,9 @@
char *s = NULL;
dir = opendir(dirname);
+
+ /* plugin-loading-error */
+ printf( "directory pointer: \n pointer - %p\n name - %s\n", dir, dirname );
if (dir != NULL) {
while ((de = readdir(dir)) != NULL) {
@@ -1743,12 +1755,10 @@
if (strcmp(U.plugtexdir, U.plugseqdir) != 0) {
plugin_parsedir(U.plugseqdir, 0);
}
-#ifndef FAKE_RENDERAPI
if(strcmp(U.plugtexdir, U.plugrendir) != 0 &&
strcmp(U.plugseqdir, U.plugrendir) != 0 ) {
plugin_parsedir(U.plugrendir, 0);
}
-#endif
}
static void plugin_scan_all(int force_refresh)
Modified: branches/soc-2007-mosani/source/blender/render/intern/source/RND_convertblender.c
===================================================================
--- branches/soc-2007-mosani/source/blender/render/intern/source/RND_convertblender.c 2007-08-16 03:46:46 UTC (rev 11618)
+++ branches/soc-2007-mosani/source/blender/render/intern/source/RND_convertblender.c 2007-08-16 04:17:58 UTC (rev 11619)
@@ -136,6 +136,7 @@
void render_database_from_scene( RenderDatabase *db, RNDScene scene )
{
/* variables */
+ float color[3];
RNDObject object;
int startface, startvert;
@@ -150,6 +151,22 @@
set_node_shader_lamp_loop(shade_material_loop);
+ /* initialize World */
+
+ db->wrld.range = 1.0f;
+ RND_get_horizon_color( scene, color );
+ db->wrld.horr = color[0];
+ db->wrld.horg = color[1];
+ db->wrld.horb = color[2];
+ RND_get_zenith_color( scene, color );
+ db->wrld.zenr = color[0];
+ db->wrld.zeng = color[1];
+ db->wrld.zenb = color[2];
+ RND_get_ambient_color( scene, color );
+ db->wrld.ambr = color[0];
+ db->wrld.ambg = color[1];
+ db->wrld.ambb = color[2];
+
/* loop through all objects */
object = RND_get_objects( scene, RND_ALL );
for( ; RND_object_exists( object ); RND_object_next( object ) )
Modified: branches/soc-2007-mosani/source/blender/render/intern/source/RND_initrender.c
===================================================================
--- branches/soc-2007-mosani/source/blender/render/intern/source/RND_initrender.c 2007-08-16 03:46:46 UTC (rev 11618)
+++ branches/soc-2007-mosani/source/blender/render/intern/source/RND_initrender.c 2007-08-16 04:17:58 UTC (rev 11619)
@@ -104,7 +104,6 @@
RenderDatabase *render_database_initialize( RNDScene scene )
{
RenderDatabase *db = NULL;
- float color[3];
/**** new RenderDatabase ****/
@@ -114,26 +113,12 @@
db->ok= TRUE; /* maybe flag */
- /* fill RenderData, World */
+ /* fill RenderData */
db->r.osa = RND_get_pixel_filter_sample_number( scene );
db->r.filtertype = convert_filter_type( RND_get_pixel_filter_type(scene) );
db->r.gauss = 1; /* hard coded: render API hole */
db->r.xasp = db->r.yasp = 100;
- db->wrld.range = 1.0f;
- RND_get_horizon_color( scene, color );
- db->wrld.horr = color[0];
- db->wrld.horg = color[1];
- db->wrld.horb = color[2];
- RND_get_zenith_color( scene, color );
- db->wrld.zenr = color[0];
- db->wrld.zeng = color[1];
- db->wrld.zenb = color[2];
- RND_get_ambient_color( scene, color );
- db->wrld.ambr = color[0];
- db->wrld.ambg = color[1];
- db->wrld.ambb = color[2];
-
/**** initialize rasterization properties ****/
/* set render settings */
Modified: branches/soc-2007-mosani/source/blender/render/intern/source/rendercallbacks.c
===================================================================
--- branches/soc-2007-mosani/source/blender/render/intern/source/rendercallbacks.c 2007-08-16 03:46:46 UTC (rev 11618)
+++ branches/soc-2007-mosani/source/blender/render/intern/source/rendercallbacks.c 2007-08-16 04:17:58 UTC (rev 11619)
@@ -105,6 +105,7 @@
#include "RE_pipeline.h"
#include "radio.h"
+#include "intern/openexr/openexr_multi.h"
#include "PIL_time.h"
#include "MEM_guardedalloc.h"
@@ -396,7 +397,7 @@
{
RNDPass pass;
/* next is the offset to the next row buffer */
- int bounds[4], i, y_start, y_end, next;
+ int bounds[4], i, y_start, y_end, width, next;
float *row_buffer;
pass = RND_get_passes( result );
for( ; RND_pass_exists( pass ); RND_pass_next( pass ) )
@@ -407,12 +408,13 @@
bounds[1] = part->disprect.xmax - part->crop;
y_start = part->disprect.ymin + part->crop;
y_end = part->disprect.ymax - part->crop;
- next = (part->disprect.xmax - part->disprect.xmin)*4;
- row_buffer = part->result->renlay->rectf + next;
+ width = bounds[1] - bounds[0];
+ next = (width + part->crop*2) * 4;
+ row_buffer = part->result->renlay->rectf + ((width*part->crop + part->crop*5) * 4);
for( i = y_start; i < y_end; i++, row_buffer+=next )
{
- bounds[2] = y_start + i;
+ bounds[2] = i;
bounds[3] = bounds[2] + 1;
RND_pass_send_data( pass, bounds, row_buffer );
}
Modified: branches/soc-2007-mosani/source/blender/render/render_api/source/RND_internal.c
===================================================================
--- branches/soc-2007-mosani/source/blender/render/render_api/source/RND_internal.c 2007-08-16 03:46:46 UTC (rev 11618)
+++ branches/soc-2007-mosani/source/blender/render/render_api/source/RND_internal.c 2007-08-16 04:17:58 UTC (rev 11619)
@@ -47,7 +47,7 @@
void RenderAPI_load_plugins( char renderer_menu[], char force_refresh ){
static char done = 0;
- plugin_descriptor_t * renderers;
+ plugin_descriptor_t * renderers = NULL;
short renderer_index = 2; /* internal = 0, yafray = 1,
so start at 2. */
if( !done || force_refresh ){
@@ -60,7 +60,11 @@
"Rendering Engine %t|Blender Internal %x0" );
#endif
- renderers = plugin_enumerate( PLUGIN_TYPE_RENDER_OUTPUT, force_refresh );
+ renderers = plugin_enumerate( PLUGIN_TYPE_RENDER_OUTPUT, force_refresh );
+ /* plugin-loading-error */
+ printf( "plugin renderers: \n pointer - %p\n name - %s\n",
+ renderers,
+ renderers ? renderers->name : "bad pointer" );
for( ; renderers; renderers = renderers->next, renderer_index++ ){
sprintf( renderer_menu, "%s|%s %%x%d",
renderer_menu, renderers->menu_entry, renderer_index );
Modified: branches/soc-2007-mosani/source/blender/src/previewrender.c
===================================================================
--- branches/soc-2007-mosani/source/blender/src/previewrender.c 2007-08-16 03:46:46 UTC (rev 11618)
+++ branches/soc-2007-mosani/source/blender/src/previewrender.c 2007-08-16 04:17:58 UTC (rev 11619)
@@ -402,7 +402,14 @@
SpaceButs *sbuts= NULL;
int oldx= ri->pr_rectx, oldy= ri->pr_recty;
char name [32];
+ int renderAPI = 0;
+ /* turn off render API for preview render (for the moment) */
+ if( G.renderAPI_toggle ){
+ renderAPI = 1;
+ G.renderAPI_toggle = 0;
+ }
+
if(ri->tottile && ri->curtile>=ri->tottile) return;
/* check for return with a new event */
@@ -466,6 +473,7 @@
ntreeClearPreview(ma->nodetree);
}
}
+
/* entire cycle for render engine */
RE_SetCamera(re, sce->camera);
RE_Database_FromScene(re, sce, 1);
@@ -504,6 +512,8 @@
/* unassign the pointers, reset vars */
preview_prepare_scene(ri, GS(id->name), NULL, 0);
+ /* turn back on render API from preview render (for the moment) */
+ if( renderAPI ) G.renderAPI_toggle = 1;
}
More information about the Bf-blender-cvs
mailing list