Changeset View
Changeset View
Standalone View
Standalone View
source/blender/render/intern/source/convertblender.c
| Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_customdata.h" | #include "BKE_customdata.h" | ||||
| #include "BKE_colortools.h" | #include "BKE_colortools.h" | ||||
| #include "BKE_displist.h" | #include "BKE_displist.h" | ||||
| #include "BKE_DerivedMesh.h" | #include "BKE_DerivedMesh.h" | ||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BKE_key.h" | #include "BKE_key.h" | ||||
| #include "BKE_image.h" | #include "BKE_image.h" | ||||
| #include "BKE_lattice.h" | #include "BKE_lattice.h" | ||||
| #include "BKE_layer.h" | |||||
| #include "BKE_material.h" | #include "BKE_material.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_mball.h" | #include "BKE_mball.h" | ||||
| #include "BKE_mesh.h" | #include "BKE_mesh.h" | ||||
| #include "BKE_modifier.h" | #include "BKE_modifier.h" | ||||
| #include "BKE_node.h" | #include "BKE_node.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_particle.h" | #include "BKE_particle.h" | ||||
| ▲ Show 20 Lines • Show All 5,113 Lines • ▼ Show 20 Lines | void RE_Database_FromScene(Render *re, Main *bmain, Scene *scene, unsigned int lay, int use_camera_view) | ||||
| /* scene needs to be set to get camera */ | /* scene needs to be set to get camera */ | ||||
| camera= RE_GetCamera(re); | camera= RE_GetCamera(re); | ||||
| /* per second, per object, stats print this */ | /* per second, per object, stats print this */ | ||||
| re->i.infostr= "Preparing Scene data"; | re->i.infostr= "Preparing Scene data"; | ||||
| re->i.cfra= scene->r.cfra; | re->i.cfra= scene->r.cfra; | ||||
| BLI_strncpy(re->i.scene_name, scene->id.name + 2, sizeof(re->i.scene_name)); | BLI_strncpy(re->i.scene_name, scene->id.name + 2, sizeof(re->i.scene_name)); | ||||
| BLI_strncpy(re->engine_name, scene->r.engine, sizeof(re->engine_name)); | |||||
| /* XXX add test if dbase was filled already? */ | /* XXX add test if dbase was filled already? */ | ||||
| re->memArena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "render db arena"); | re->memArena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "render db arena"); | ||||
| re->totvlak=re->totvert=re->totstrand=re->totlamp=re->tothalo= 0; | re->totvlak=re->totvert=re->totstrand=re->totlamp=re->tothalo= 0; | ||||
| re->lights.first= re->lights.last= NULL; | re->lights.first= re->lights.last= NULL; | ||||
| re->lampren.first= re->lampren.last= NULL; | re->lampren.first= re->lampren.last= NULL; | ||||
| ▲ Show 20 Lines • Show All 693 Lines • ▼ Show 20 Lines | void RE_Database_Baking(Render *re, Main *bmain, Scene *scene, unsigned int lay, const int type, Object *actob) | ||||
| const short nolamps= ELEM(type, RE_BAKE_NORMALS, RE_BAKE_TEXTURE, RE_BAKE_DISPLACEMENT, RE_BAKE_DERIVATIVE, RE_BAKE_VERTEX_COLORS); | const short nolamps= ELEM(type, RE_BAKE_NORMALS, RE_BAKE_TEXTURE, RE_BAKE_DISPLACEMENT, RE_BAKE_DERIVATIVE, RE_BAKE_VERTEX_COLORS); | ||||
| re->main= bmain; | re->main= bmain; | ||||
| re->scene= scene; | re->scene= scene; | ||||
| re->lay= lay; | re->lay= lay; | ||||
| /* renderdata setup and exceptions */ | /* renderdata setup and exceptions */ | ||||
| render_copy_renderdata(&re->r, &scene->r); | render_copy_renderdata(&re->r, &scene->r); | ||||
| BLI_strncpy(re->engine_name, scene->r.engine, sizeof(re->engine_name)); | |||||
| RE_init_threadcount(re); | RE_init_threadcount(re); | ||||
| re->flag |= R_BAKING; | re->flag |= R_BAKING; | ||||
| re->excludeob= actob; | re->excludeob= actob; | ||||
| if (actob) | if (actob) | ||||
| re->flag |= R_BAKE_TRACE; | re->flag |= R_BAKE_TRACE; | ||||
| ▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines | |||||