diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-14 23:24:11 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2010-03-14 23:24:11 +0300 |
commit | ed076d74ef3f0593971108511dc25e63cab7e829 (patch) | |
tree | d52679de90117424affcfd5c106884f7696d4c79 /source | |
parent | 114f437837a4b1711c85f0a3e229df04f2d0420d (diff) |
Rendering from 3d view in local view or with unlocked layer was not
working yet, now layer is passed along to render engine, changes quite
a few files because simple swapping trick no longer works with threading.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_bake.c | 4 | ||||
-rw-r--r-- | source/blender/editors/render/render_internal.c | 13 | ||||
-rw-r--r-- | source/blender/editors/render/render_preview.c | 9 | ||||
-rw-r--r-- | source/blender/render/extern/include/RE_pipeline.h | 8 | ||||
-rw-r--r-- | source/blender/render/intern/include/render_types.h | 1 | ||||
-rw-r--r-- | source/blender/render/intern/include/renderdatabase.h | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/convertblender.c | 38 | ||||
-rw-r--r-- | source/blender/render/intern/source/envmap.c | 3 | ||||
-rw-r--r-- | source/blender/render/intern/source/occlusion.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 30 | ||||
-rw-r--r-- | source/blender/render/intern/source/rendercore.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/volume_precache.c | 2 | ||||
-rw-r--r-- | source/creator/creator.c | 4 |
14 files changed, 64 insertions, 56 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index d43747cf3f3..a4a0a533545 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -2181,7 +2181,7 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int else re= RE_NewRender(sce->id.name, RE_SLOT_VIEW); - RE_BlenderFrame(re, sce, NULL, frame); + RE_BlenderFrame(re, sce, sce->lay, NULL, frame); RE_AcquireResultImage(re, &rres); diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c index a4f419cf996..9458614293f 100644 --- a/source/blender/editors/object/object_bake.c +++ b/source/blender/editors/object/object_bake.c @@ -203,7 +203,7 @@ static void bake_startjob(void *bkv, short *stop, short *do_update) RE_test_break_cb(bkr->re, NULL, thread_break); G.afbreek= 0; /* blender_test_break uses this global */ - RE_Database_Baking(bkr->re, scene, scene->r.bake_mode, bkr->actob); + RE_Database_Baking(bkr->re, scene, scene->r.bake_mode, bkr->actob, scene->lay); /* baking itself is threaded, cannot use test_break in threads. we also update optional imagewindow */ bkr->tot= RE_bake_shade_all_selected(bkr->re, scene->r.bake_mode, bkr->actob, bkr->do_update); @@ -301,7 +301,7 @@ static int bake_image_exec(bContext *C, wmOperator *op) RE_test_break_cb(bkr.re, NULL, thread_break); G.afbreek= 0; /* blender_test_break uses this global */ - RE_Database_Baking(bkr.re, scene, scene->r.bake_mode, (scene->r.bake_flag & R_BAKE_TO_ACTIVE)? OBACT: NULL); + RE_Database_Baking(bkr.re, scene, scene->r.bake_mode, (scene->r.bake_flag & R_BAKE_TO_ACTIVE)? OBACT: NULL, scene->lay); /* baking itself is threaded, cannot use test_break in threads */ BLI_init_threads(&threads, do_bake_render, 1); diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 22c4f9e729c..af58f3b4ee1 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -405,6 +405,8 @@ static int screen_render_exec(bContext *C, wmOperator *op) { Scene *scene= CTX_data_scene(C); Render *re= RE_GetRender(scene->id.name, RE_SLOT_VIEW); + View3D *v3d= CTX_wm_view3d(C); + int lay= (v3d)? v3d->lay|scene->lay: scene->lay; if(re==NULL) { re= RE_NewRender(scene->id.name, RE_SLOT_VIEW); @@ -412,9 +414,9 @@ static int screen_render_exec(bContext *C, wmOperator *op) RE_test_break_cb(re, NULL, (int (*)(void *)) blender_test_break); if(RNA_boolean_get(op->ptr, "animation")) - RE_BlenderAnim(re, scene, scene->r.sfra, scene->r.efra, scene->r.frame_step, op->reports); + RE_BlenderAnim(re, scene, lay, scene->r.sfra, scene->r.efra, scene->r.frame_step, op->reports); else - RE_BlenderFrame(re, scene, NULL, scene->r.cfra); + RE_BlenderFrame(re, scene, NULL, lay, scene->r.cfra); // no redraw needed, we leave state as we entered it ED_update_for_newframe(C, 1); @@ -429,6 +431,7 @@ typedef struct RenderJob { Render *re; wmWindow *win; SceneRenderLayer *srl; + int lay; int anim; Image *image; ImageUser iuser; @@ -531,9 +534,9 @@ static void render_startjob(void *rjv, short *stop, short *do_update) rj->do_update= do_update; if(rj->anim) - RE_BlenderAnim(rj->re, rj->scene, rj->scene->r.sfra, rj->scene->r.efra, rj->scene->r.frame_step, rj->reports); + RE_BlenderAnim(rj->re, rj->scene, rj->lay, rj->scene->r.sfra, rj->scene->r.efra, rj->scene->r.frame_step, rj->reports); else - RE_BlenderFrame(rj->re, rj->scene, rj->srl, rj->scene->r.cfra); + RE_BlenderFrame(rj->re, rj->scene, rj->srl, rj->lay, rj->scene->r.cfra); // if(mainp) // free_main(mainp); @@ -573,6 +576,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) /* new render clears all callbacks */ Scene *scene= CTX_data_scene(C); SceneRenderLayer *srl=NULL; + View3D *v3d= CTX_wm_view3d(C); Render *re; wmJob *steve; RenderJob *rj; @@ -624,6 +628,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) rj->scene= scene; rj->win= CTX_wm_window(C); rj->srl = srl; + rj->lay = (v3d)? v3d->lay|scene->lay: scene->lay; rj->anim= RNA_boolean_get(op->ptr, "animation"); rj->iuser.scene= scene; rj->iuser.ok= 1; diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 44ca80867e4..1eac01a1fa1 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -752,11 +752,10 @@ void BIF_view3d_previewrender(Scene *scene, ScrArea *sa) /* allow localview render for objects with lights in normal layers */ if(v3d->lay & 0xFF000000) - scene->lay |= v3d->lay; - else scene->lay= v3d->lay; + lay |= v3d->lay; + else lay= v3d->lay; - RE_Database_FromScene(re, scene, 0); // 0= dont use camera view - scene->lay= lay; + RE_Database_FromScene(re, scene, lay, 0); // 0= dont use camera view rstats= RE_GetStats(re); if(rstats->convertdone) @@ -934,7 +933,7 @@ static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int firs /* entire cycle for render engine */ RE_SetCamera(re, sce->camera); - RE_Database_FromScene(re, sce, 1); + RE_Database_FromScene(re, sce, sce->lay, 1); RE_TileProcessor(re, 0, 1); // actual render engine RE_Database_Free(re); diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h index f9c4e9690a1..19f6dcfbaa8 100644 --- a/source/blender/render/extern/include/RE_pipeline.h +++ b/source/blender/render/extern/include/RE_pipeline.h @@ -198,7 +198,7 @@ void RE_SetPixelSize(struct Render *re, float pixsize); void RE_SetView (struct Render *re, float mat[][4]); /* make or free the dbase */ -void RE_Database_FromScene(struct Render *re, struct Scene *scene, int use_camera_view); +void RE_Database_FromScene(struct Render *re, struct Scene *scene, unsigned int lay, int use_camera_view); void RE_Database_Free (struct Render *re); /* project dbase again, when viewplane/perspective changed */ @@ -214,8 +214,8 @@ void RE_init_threadcount(Render *re); void RE_TileProcessor(struct Render *re, int firsttile, int threaded); /* only RE_NewRender() needed, main Blender render calls */ -void RE_BlenderFrame(struct Render *re, struct Scene *scene, struct SceneRenderLayer *srl, int frame); -void RE_BlenderAnim(struct Render *re, struct Scene *scene, int sfra, int efra, int tfra, struct ReportList *reports); +void RE_BlenderFrame(struct Render *re, struct Scene *scene, struct SceneRenderLayer *srl, unsigned int lay, int frame); +void RE_BlenderAnim(struct Render *re, struct Scene *scene, unsigned int lay, int sfra, int efra, int tfra, struct ReportList *reports); void RE_ReadRenderResult(struct Scene *scene, struct Scene *scenode); void RE_WriteRenderResult(RenderResult *rr, char *filename, int compress); @@ -251,7 +251,7 @@ void RE_zbuf_accumulate_vecblur(struct NodeBlurData *nbd, int xsize, int ysize, #define RE_BAKE_DISPLACEMENT 5 #define RE_BAKE_SHADOW 6 -void RE_Database_Baking(struct Render *re, struct Scene *scene, int type, struct Object *actob); +void RE_Database_Baking(struct Render *re, struct Scene *scene, unsigned int lay, int type, struct Object *actob); void RE_DataBase_GetView(struct Render *re, float mat[][4]); void RE_GetCameraWindow(struct Render *re, struct Object *camera, int frame, float mat[][4]); diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h index e093c1a6c99..0b0ea075d79 100644 --- a/source/blender/render/intern/include/render_types.h +++ b/source/blender/render/intern/include/render_types.h @@ -174,6 +174,7 @@ struct Render Scene *scene; RenderData r; World wrld; + unsigned int lay; ListBase parts; diff --git a/source/blender/render/intern/include/renderdatabase.h b/source/blender/render/intern/include/renderdatabase.h index 9ed12a8fe60..2a0086b436c 100644 --- a/source/blender/render/intern/include/renderdatabase.h +++ b/source/blender/render/intern/include/renderdatabase.h @@ -137,7 +137,7 @@ void RE_set_customdata_names(struct ObjectRen *obr, struct CustomData *data); /* convertblender.c */ void init_render_world(Render *re); -void RE_Database_FromScene_Vectors(Render *re, struct Scene *sce); +void RE_Database_FromScene_Vectors(Render *re, struct Scene *sce, unsigned int lay); #endif /* RENDERDATABASE_H */ diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c index c75e825a0e7..5a363b9cdfe 100644 --- a/source/blender/render/intern/source/convertblender.c +++ b/source/blender/render/intern/source/convertblender.c @@ -3859,7 +3859,7 @@ static void add_lightgroup(Render *re, Group *group, int exclusive) for(go= group->gobject.first; go; go= go->next) { go->lampren= NULL; - if(go->ob->lay & re->scene->lay) { + if(go->ob->lay & re->lay) { if(go->ob && go->ob->type==OB_LAMP) { for(gol= re->lights.first; gol; gol= gol->next) { if(gol->ob==go->ob) { @@ -4721,7 +4721,7 @@ static void dupli_render_particle_set(Render *re, Object *ob, int timeoffset, in static int get_vector_renderlayers(Scene *sce) { SceneRenderLayer *srl; - int lay= 0; + unsigned int lay= 0; for(srl= sce->r.layers.first; srl; srl= srl->next) if(srl->passflag & SCE_PASS_VECTOR) @@ -4805,7 +4805,7 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp } } } - else if((base->lay & lay) || (ob->type==OB_LAMP && (base->lay & re->scene->lay)) ) { + else if((base->lay & lay) || (ob->type==OB_LAMP && (base->lay & re->lay)) ) { if((ob->transflag & OB_DUPLI) && (ob->type!=OB_MBALL)) { DupliObject *dob; ListBase *lb; @@ -4932,15 +4932,15 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp } /* used to be 'rotate scene' */ -void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view) +void RE_Database_FromScene(Render *re, Scene *scene, unsigned int lay, int use_camera_view) { extern int slurph_opt; /* key.c */ Scene *sce; float mat[4][4]; float amb[3]; - unsigned int lay; re->scene= scene; + re->lay= lay; /* per second, per object, stats print this */ re->i.infostr= "Preparing Scene data"; @@ -4958,8 +4958,8 @@ void RE_Database_FromScene(Render *re, Scene *scene, int use_camera_view) re->i.partsdone= 0; /* signal now in use for previewrender */ /* in localview, lamps are using normal layers, objects only local bits */ - if(re->scene->lay & 0xFF000000) lay= re->scene->lay & 0xFF000000; - else lay= re->scene->lay; + if(re->lay & 0xFF000000) + lay &= 0xFF000000; /* applies changes fully */ if((re->r.scemode & R_PREVIEWBUTS)==0) @@ -5089,13 +5089,13 @@ void RE_DataBase_GetView(Render *re, float mat[][4]) /* Speed Vectors */ /* ------------------------------------------------------------------------- */ -static void database_fromscene_vectors(Render *re, Scene *scene, int timeoffset) +static void database_fromscene_vectors(Render *re, Scene *scene, unsigned int lay, int timeoffset) { extern int slurph_opt; /* key.c */ float mat[4][4]; - unsigned int lay; re->scene= scene; + re->lay= lay; /* XXX add test if dbase was filled already? */ @@ -5107,8 +5107,8 @@ static void database_fromscene_vectors(Render *re, Scene *scene, int timeoffset) slurph_opt= 0; /* in localview, lamps are using normal layers, objects only local bits */ - if(re->scene->lay & 0xFF000000) lay= re->scene->lay & 0xFF000000; - else lay= re->scene->lay; + if(re->lay & 0xFF000000) + lay &= 0xFF000000; /* applies changes fully */ scene->r.cfra += timeoffset; @@ -5471,7 +5471,7 @@ static void free_dbase_object_vectors(ListBase *lb) BLI_freelistN(lb); } -void RE_Database_FromScene_Vectors(Render *re, Scene *sce) +void RE_Database_FromScene_Vectors(Render *re, Scene *sce, unsigned int lay) { ObjectInstanceRen *obi, *oldobi; StrandSurface *mesh; @@ -5486,7 +5486,7 @@ void RE_Database_FromScene_Vectors(Render *re, Scene *sce) speedvector_project(re, NULL, NULL, NULL); /* initializes projection code */ /* creates entire dbase */ - database_fromscene_vectors(re, sce, -1); + database_fromscene_vectors(re, sce, lay, -1); /* copy away vertex info */ copy_dbase_object_vectors(re, &oldtable); @@ -5501,7 +5501,7 @@ void RE_Database_FromScene_Vectors(Render *re, Scene *sce) /* creates entire dbase */ re->i.infostr= "Calculating next frame vectors"; - database_fromscene_vectors(re, sce, +1); + database_fromscene_vectors(re, sce, lay, +1); } /* copy away vertex info */ copy_dbase_object_vectors(re, &newtable); @@ -5513,7 +5513,7 @@ void RE_Database_FromScene_Vectors(Render *re, Scene *sce) re->strandsurface= strandsurface; if(!re->test_break(re->tbh)) - RE_Database_FromScene(re, sce, 1); + RE_Database_FromScene(re, sce, lay, 1); if(!re->test_break(re->tbh)) { for(step= 0; step<2; step++) { @@ -5602,14 +5602,14 @@ void RE_Database_FromScene_Vectors(Render *re, Scene *sce) RE_BAKE_DISPLACEMENT:for baking, no lamps, only selected objects RE_BAKE_SHADOW: for baking, only shadows, but all objects */ -void RE_Database_Baking(Render *re, Scene *scene, int type, Object *actob) +void RE_Database_Baking(Render *re, Scene *scene, unsigned int lay, int type, Object *actob) { float mat[4][4]; float amb[3]; - unsigned int lay; int onlyselected, nolamps; re->scene= scene; + re->lay= lay; /* renderdata setup and exceptions */ re->r= scene->r; @@ -5642,8 +5642,8 @@ void RE_Database_Baking(Render *re, Scene *scene, int type, Object *actob) re->lampren.first= re->lampren.last= NULL; /* in localview, lamps are using normal layers, objects only local bits */ - if(re->scene->lay & 0xFF000000) lay= re->scene->lay & 0xFF000000; - else lay= re->scene->lay; + if(re->lay & 0xFF000000) + lay &= 0xFF000000; /* if no camera, set unit */ if(re->scene->camera) { diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c index 7daf3e07105..73c9aaf6642 100644 --- a/source/blender/render/intern/source/envmap.c +++ b/source/blender/render/intern/source/envmap.c @@ -143,6 +143,7 @@ static Render *envmap_render_copy(Render *re, EnvMap *env) RE_InitState(envre, NULL, &envre->r, NULL, cuberes, cuberes, NULL); envre->scene= re->scene; /* unsure about this... */ + envre->lay= re->lay; /* view stuff in env render */ envre->lens= 16.0f; @@ -513,7 +514,7 @@ void make_envmaps(Render *re) if(tex->env && tex->env->object) { EnvMap *env= tex->env; - if(env->object->lay & re->scene->lay) { + if(env->object->lay & re->lay) { if(env->stype==ENV_LOAD) { float orthmat[4][4], mat[4][4], tmat[4][4]; diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c index 7c52857a94b..39faf22fb31 100644 --- a/source/blender/render/intern/source/occlusion.c +++ b/source/blender/render/intern/source/occlusion.c @@ -213,7 +213,7 @@ static void occ_build_shade(Render *re, OcclusionTree *tree) /* setup shade sample with correct passes */ memset(&ssamp, 0, sizeof(ShadeSample)); - ssamp.shi[0].lay= re->scene->lay; + ssamp.shi[0].lay= re->lay; ssamp.shi[0].passflag= SCE_PASS_DIFFUSE|SCE_PASS_RGBA; ssamp.shi[0].combinedflag= ~(SCE_PASS_SPEC); ssamp.tot= 1; diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index e800ce3acf0..ec250a7136b 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -1849,9 +1849,9 @@ static void do_render_3d(Render *re) /* make render verts/faces/halos/lamps */ if(render_scene_needs_vector(re)) - RE_Database_FromScene_Vectors(re, re->scene); + RE_Database_FromScene_Vectors(re, re->scene, re->lay); else - RE_Database_FromScene(re, re->scene, 1); + RE_Database_FromScene(re, re->scene, re->lay, 1); threaded_tile_processor(re); @@ -2468,7 +2468,7 @@ static void do_render_composite_fields_blur_3d(Render *re) R.stats_draw= re->stats_draw; if (update_newframe) - scene_update_for_newframe(re->scene, re->scene->lay); + scene_update_for_newframe(re->scene, re->lay); if(re->r.scemode & R_FULL_SAMPLE) do_merge_fullsample(re, ntree); @@ -2729,7 +2729,7 @@ static void update_physics_cache(Render *re, Scene *scene, int anim_init) BKE_ptcache_make_cache(&baker); } /* evaluating scene options for general Blender render */ -static int render_initialize_from_scene(Render *re, Scene *scene, SceneRenderLayer *srl, int anim, int anim_init) +static int render_initialize_from_scene(Render *re, Scene *scene, SceneRenderLayer *srl, unsigned int lay, int anim, int anim_init) { int winx, winy; rcti disprect; @@ -2756,6 +2756,7 @@ static int render_initialize_from_scene(Render *re, Scene *scene, SceneRenderLay } re->scene= scene; + re->lay= lay; /* not too nice, but it survives anim-border render */ if(anim) { @@ -2796,7 +2797,7 @@ static int render_initialize_from_scene(Render *re, Scene *scene, SceneRenderLay } /* general Blender frame render call */ -void RE_BlenderFrame(Render *re, Scene *scene, SceneRenderLayer *srl, int frame) +void RE_BlenderFrame(Render *re, Scene *scene, SceneRenderLayer *srl, unsigned int lay, int frame) { /* ugly global still... is to prevent preview events and signal subsurfs etc to make full resol */ RenderGlobal.renderingslot= re->slot; @@ -2805,7 +2806,7 @@ void RE_BlenderFrame(Render *re, Scene *scene, SceneRenderLayer *srl, int frame) scene->r.cfra= frame; - if(render_initialize_from_scene(re, scene, srl, 0, 0)) { + if(render_initialize_from_scene(re, scene, srl, lay, 0, 0)) { do_render_all_options(re); } @@ -2902,15 +2903,14 @@ static int do_write_image_or_movie(Render *re, Scene *scene, bMovieHandle *mh, R } /* saves images to disk */ -void RE_BlenderAnim(Render *re, Scene *scene, int sfra, int efra, int tfra, ReportList *reports) +void RE_BlenderAnim(Render *re, Scene *scene, unsigned int lay, int sfra, int efra, int tfra, ReportList *reports) { bMovieHandle *mh= BKE_get_movie_handle(scene->r.imtype); - unsigned int lay; int cfrao= scene->r.cfra; int nfra; /* do not fully call for each frame, it initializes & pops output window */ - if(!render_initialize_from_scene(re, scene, NULL, 0, 1)) + if(!render_initialize_from_scene(re, scene, NULL, lay, 0, 1)) return; /* ugly global still... is to prevent renderwin events and signal subsurfs etc to make full resol */ @@ -2945,7 +2945,7 @@ void RE_BlenderAnim(Render *re, Scene *scene, int sfra, int efra, int tfra, Repo char name[FILE_MAX]; /* only border now, todo: camera lens. (ton) */ - render_initialize_from_scene(re, scene, NULL, 1, 0); + render_initialize_from_scene(re, scene, NULL, lay, 1, 0); if(nfra!=scene->r.cfra) { /* @@ -2953,12 +2953,14 @@ void RE_BlenderAnim(Render *re, Scene *scene, int sfra, int efra, int tfra, Repo * From convertblender.c: * in localview, lamps are using normal layers, objects only local bits. */ - if(scene->lay & 0xFF000000) - lay= scene->lay & 0xFF000000; + unsigned int updatelay; + + if(re->lay & 0xFF000000) + updatelay= re->lay & 0xFF000000; else - lay= scene->lay; + updatelay= re->lay; - scene_update_for_newframe(scene, lay); + scene_update_for_newframe(scene, updatelay); continue; } else diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index 85c96d17ac0..d0a334f039e 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -2652,7 +2652,7 @@ int RE_bake_shade_all_selected(Render *re, int type, Object *actob, short *do_up /* get the threads running */ for(a=0; a<re->r.threads; a++) { /* set defaults in handles */ - handles[a].ssamp.shi[0].lay= re->scene->lay; + handles[a].ssamp.shi[0].lay= re->lay; if (type==RE_BAKE_SHADOW) { handles[a].ssamp.shi[0].passflag= SCE_PASS_SHADOW; diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c index 75ad292c003..0af05c3cdee 100644 --- a/source/blender/render/intern/source/volume_precache.c +++ b/source/blender/render/intern/source/volume_precache.c @@ -494,7 +494,7 @@ static void precache_setup_shadeinput(Render *re, ObjectInstanceRen *obi, Materi shi->har= shi->mat->har; shi->obi= obi; shi->obr= obi->obr; - shi->lay = re->scene->lay; + shi->lay = re->lay; } static void precache_init_parts(Render *re, RayObject *tree, ShadeInput *shi, ObjectInstanceRen *obi, int totthread, int *parts) diff --git a/source/creator/creator.c b/source/creator/creator.c index bf45a89fa5b..3eb2cad1f65 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -685,7 +685,7 @@ static int render_frame(int argc, char **argv, void *data) frame = MIN2(MAXFRAME, MAX2(MINAFRAME, frame)); - RE_BlenderAnim(re, scene, frame, frame, scene->r.frame_step, &reports); + RE_BlenderAnim(re, scene, scene->lay, frame, frame, scene->r.frame_step, &reports); return 1; } else { printf("\nError: frame number must follow '-f'.\n"); @@ -705,7 +705,7 @@ static int render_animation(int argc, char **argv, void *data) Render *re= RE_NewRender(scene->id.name, RE_SLOT_DEFAULT); ReportList reports; BKE_reports_init(&reports, RPT_PRINT); - RE_BlenderAnim(re, scene, scene->r.sfra, scene->r.efra, scene->r.frame_step, &reports); + RE_BlenderAnim(re, scene, scene->lay, scene->r.sfra, scene->r.efra, scene->r.frame_step, &reports); } else { printf("\nError: no blend loaded. cannot use '-a'.\n"); } |