Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions

convertblender.c File Reference

#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_rand.h"
#include "BLI_memarena.h"
#include "BLI_ghash.h"
#include "DNA_armature_types.h"
#include "DNA_camera_types.h"
#include "DNA_material_types.h"
#include "DNA_curve_types.h"
#include "DNA_effect_types.h"
#include "DNA_group_types.h"
#include "DNA_lamp_types.h"
#include "DNA_image_types.h"
#include "DNA_lattice_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_meta_types.h"
#include "DNA_modifier_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_object_force.h"
#include "DNA_object_fluidsim.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "DNA_texture_types.h"
#include "DNA_view3d_types.h"
#include "BKE_anim.h"
#include "BKE_armature.h"
#include "BKE_action.h"
#include "BKE_curve.h"
#include "BKE_customdata.h"
#include "BKE_colortools.h"
#include "BKE_constraint.h"
#include "BKE_displist.h"
#include "BKE_deform.h"
#include "BKE_DerivedMesh.h"
#include "BKE_effect.h"
#include "BKE_global.h"
#include "BKE_group.h"
#include "BKE_key.h"
#include "BKE_ipo.h"
#include "BKE_image.h"
#include "BKE_lattice.h"
#include "BKE_library.h"
#include "BKE_material.h"
#include "BKE_main.h"
#include "BKE_mball.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_node.h"
#include "BKE_object.h"
#include "BKE_particle.h"
#include "BKE_scene.h"
#include "BKE_subsurf.h"
#include "BKE_texture.h"
#include "BKE_world.h"
#include "PIL_time.h"
#include "IMB_imbuf_types.h"
#include "envmap.h"
#include "occlusion.h"
#include "pointdensity.h"
#include "voxeldata.h"
#include "render_types.h"
#include "rendercore.h"
#include "renderdatabase.h"
#include "renderpipeline.h"
#include "shadbuf.h"
#include "shading.h"
#include "strand.h"
#include "texture.h"
#include "volume_precache.h"
#include "sss.h"
#include "zbuf.h"
#include "sunsky.h"
#include "mikktspace.h"

Go to the source code of this file.

Classes

struct  SRenderMeshToTangent
struct  ASvert
struct  ASface
struct  ParticleStrandData
struct  edgesort

Defines

#define FLT_EPSILON10   1.19209290e-06F
#define UVTOINDEX(u, v)   (startvlak + (u) * sizev + (v))

Typedefs

typedef struct ASvert ASvert
typedef struct ASface ASface
typedef struct ParticleStrandData ParticleStrandData

Functions

static HaloReninitstar (Render *re, ObjectRen *obr, float *vec, float hasize)
void RE_make_stars (Render *re, Scene *scenev3d, void(*initfunc)(void), void(*vertexfunc)(float *), void(*termfunc)(void))
static void split_v_renderfaces (ObjectRen *obr, int startvlak, int UNUSED(startvert), int UNUSED(usize), int vsize, int uIndex, int UNUSED(cyclu), int cyclv)
static void calc_edge_stress_add (float *accum, VertRen *v1, VertRen *v2)
static void calc_edge_stress (Render *UNUSED(re), ObjectRen *obr, Mesh *me)
static void calc_tangent_vector (ObjectRen *obr, VertexTangent **vtangents, MemArena *arena, VlakRen *vlr, int do_nmap_tangent, int do_tangent)
static int GetNumFaces (const SMikkTSpaceContext *pContext)
static int GetNumVertsOfFace (const SMikkTSpaceContext *pContext, const int face_num)
static void GetPosition (const SMikkTSpaceContext *pContext, float fPos[], const int face_num, const int vert_index)
static void GetTextureCoordinate (const SMikkTSpaceContext *pContext, float fUV[], const int face_num, const int vert_index)
static void GetNormal (const SMikkTSpaceContext *pContext, float fNorm[], const int face_num, const int vert_index)
static void SetTSpace (const SMikkTSpaceContext *pContext, const float fvTangent[], const float fSign, const int face_num, const int iVert)
static void calc_vertexnormals (Render *UNUSED(re), ObjectRen *obr, int do_tangent, int do_nmap_tangent)
static void as_addvert (ASvert *asv, VertRen *v1, VlakRen *vlr)
static int as_testvertex (VlakRen *vlr, VertRen *UNUSED(ver), ASvert *asv, float thresh)
static VertRenas_findvertex (VlakRen *vlr, VertRen *UNUSED(ver), ASvert *asv, float thresh)
static void autosmooth (Render *UNUSED(re), ObjectRen *obr, float mat[][4], int degr)
static float * get_object_orco (Render *re, Object *ob)
static void set_object_orco (Render *re, void *ob, float *orco)
static void free_mesh_orco_hash (Render *re)
static void check_material_mapto (Material *ma)
static void flag_render_node_material (Render *re, bNodeTree *ntree)
static Materialgive_render_material (Render *re, Object *ob, short nr)
static void static_particle_strand (Render *re, ObjectRen *obr, Material *ma, ParticleStrandData *sd, const float vec[3], const float vec1[3])
static void static_particle_wire (ObjectRen *obr, Material *ma, const float vec[3], const float vec1[3], int first, int line)
static void particle_curve (Render *re, ObjectRen *obr, DerivedMesh *dm, Material *ma, ParticleStrandData *sd, float *loc, float *loc1, int seed, float *pa_co)
static void particle_billboard (Render *re, ObjectRen *obr, Material *ma, ParticleBillboardData *bb)
static void particle_normal_ren (short ren_as, ParticleSettings *part, Render *re, ObjectRen *obr, DerivedMesh *dm, Material *ma, ParticleStrandData *sd, ParticleBillboardData *bb, ParticleKey *state, int seed, float hasize, float *pa_co)
static void get_particle_uvco_mcol (short from, DerivedMesh *dm, float *fuv, int num, ParticleStrandData *sd)
static int render_new_particle_system (Render *re, ObjectRen *obr, ParticleSystem *psys, int timeoffset)
static void make_render_halos (Render *re, ObjectRen *obr, Mesh *UNUSED(me), int totvert, MVert *mvert, Material *ma, float *orco)
static int verghalo (const void *a1, const void *a2)
static void sort_halos (Render *re, int totsort)
static short test_for_displace (Render *re, Object *ob)
static void displace_render_vert (Render *re, ObjectRen *obr, ShadeInput *shi, VertRen *vr, int vindex, float *scale, float mat[][4], float imat[][3])
static void displace_render_face (Render *re, ObjectRen *obr, VlakRen *vlr, float *scale, float mat[][4], float imat[][3])
static void do_displacement (Render *re, ObjectRen *obr, float mat[][4], float imat[][3])
static void init_render_mball (Render *re, ObjectRen *obr)
static int dl_surf_to_renderdata (ObjectRen *obr, DispList *dl, Material **matar, float *orco, float mat[4][4])
static void init_render_dm (DerivedMesh *dm, Render *re, ObjectRen *obr, int timeoffset, float *orco, float mat[4][4])
static void init_render_surf (Render *re, ObjectRen *obr, int timeoffset)
static void init_render_curve (Render *re, ObjectRen *obr, int timeoffset)
static void to_edgesort (struct edgesort *ed, unsigned int i1, unsigned int i2, unsigned int v1, unsigned int v2, int f)
static int vergedgesort (const void *v1, const void *v2)
static struct edgesortmake_mesh_edge_lookup (DerivedMesh *dm, int *totedgesort)
static void use_mesh_edge_lookup (ObjectRen *obr, DerivedMesh *dm, MEdge *medge, VlakRen *vlr, struct edgesort *edgetable, int totedge)
static void free_camera_inside_volumes (Render *re)
static void init_camera_inside_volumes (Render *re)
static void add_volume (Render *re, ObjectRen *obr, Material *ma)
static void init_render_mesh (Render *re, ObjectRen *obr, int timeoffset)
static void initshadowbuf (Render *re, LampRen *lar, float mat[][4])
static void area_lamp_vectors (LampRen *lar)
static GroupObjectadd_render_lamp (Render *re, Object *ob)
static void add_lightgroup (Render *re, Group *group, int exclusive)
static void set_material_lightgroups (Render *re)
static void set_renderlayer_lightgroups (Render *re, Scene *sce)
void init_render_world (Render *re)
static void set_phong_threshold (ObjectRen *obr)
static void set_fullsample_trace_flag (Render *re, ObjectRen *obr)
static void split_quads (ObjectRen *obr, int dir)
static void check_non_flat_quads (ObjectRen *obr)
static void finalize_render_object (Render *re, ObjectRen *obr, int timeoffset)
static int render_object_type (short type)
static void find_dupli_instances (Render *re, ObjectRen *obr)
static void assign_dupligroup_dupli (Render *re, ObjectInstanceRen *obi, ObjectRen *obr)
static ObjectRenfind_dupligroup_dupli (Render *re, Object *ob, int psysindex)
static void set_dupli_tex_mat (Render *re, ObjectInstanceRen *obi, DupliObject *dob)
static void init_render_object_data (Render *re, ObjectRen *obr, int timeoffset)
static void add_render_object (Render *re, Object *ob, Object *par, DupliObject *dob, int timeoffset)
static void init_render_object (Render *re, Object *ob, Object *par, DupliObject *dob, int timeoffset)
void RE_Database_Free (Render *re)
static int allow_render_object (Render *re, Object *ob, int nolamps, int onlyselected, Object *actob)
static int allow_render_dupli_instance (Render *UNUSED(re), DupliObject *dob, Object *obd)
static void dupli_render_particle_set (Render *re, Object *ob, int timeoffset, int level, int enable)
static int get_vector_renderlayers (Scene *sce)
static void add_group_render_dupli_obs (Render *re, Group *group, int nolamps, int onlyselected, Object *actob, int timeoffset, int level)
static void database_init_objects (Render *re, unsigned int renderlay, int nolamps, int onlyselected, Object *actob, int timeoffset)
void RE_Database_FromScene (Render *re, Main *bmain, Scene *scene, unsigned int lay, int use_camera_view)
void RE_DataBase_ApplyWindow (Render *re)
void RE_DataBase_GetView (Render *re, float mat[][4])
static void database_fromscene_vectors (Render *re, Scene *scene, unsigned int lay, int timeoffset)
static void speedvector_project (Render *re, float zco[2], const float co[3], const float ho[4])
static void calculate_speedvector (const float vectors[2], int step, float winsq, float winroot, const float co[3], const float ho[4], float speed[4])
static float * calculate_strandsurface_speedvectors (Render *re, ObjectInstanceRen *obi, StrandSurface *mesh)
static void calculate_speedvectors (Render *re, ObjectInstanceRen *obi, float *vectors, int step)
static int load_fluidsimspeedvectors (Render *re, ObjectInstanceRen *obi, float *vectors, int step)
static void copy_dbase_object_vectors (Render *re, ListBase *lb)
static void free_dbase_object_vectors (ListBase *lb)
void RE_Database_FromScene_Vectors (Render *re, Main *bmain, Scene *sce, unsigned int lay)
void RE_Database_Baking (Render *re, Main *bmain, Scene *scene, unsigned int lay, const int type, Object *actob)
void RE_make_sticky (Scene *scene, View3D *v3d)

Detailed Description

Definition in file convertblender.c.


Define Documentation

#define FLT_EPSILON10   1.19209290e-06F

Definition at line 124 of file convertblender.c.

Referenced by check_non_flat_quads(), and particle_billboard().

#define UVTOINDEX (   u,
 
)    (startvlak + (u) * sizev + (v))

Definition at line 327 of file convertblender.c.

Referenced by dl_surf_to_renderdata().


Typedef Documentation

typedef struct ASface ASface
typedef struct ASvert ASvert

Function Documentation

static void add_group_render_dupli_obs ( Render re,
Group group,
int  nolamps,
int  onlyselected,
Object actob,
int  timeoffset,
int  level 
) [static]
static void add_lightgroup ( Render re,
Group group,
int  exclusive 
) [static]
static GroupObject* add_render_lamp ( Render re,
Object ob 
) [static]

Definition at line 3661 of file convertblender.c.

References Lamp::adapt_thresh, LampRen::adapt_thresh, angle(), area_lamp_vectors(), LampRen::area_shape, Lamp::area_shape, LampRen::area_size, Lamp::area_size, LampRen::area_sizey, Lamp::area_sizey, LampRen::area_sizez, Lamp::area_sizez, Lamp::atm_distance_factor, Lamp::atm_extinction_factor, Lamp::atm_inscattering_factor, Lamp::atm_turbidity, Lamp::att1, Lamp::att2, LampRen::b, Lamp::b, Lamp::backscattered_light, Lamp::bias, LampRen::bias, BLI_addtail(), LampRen::buffers, Lamp::buffers, LampRen::bufflag, Lamp::bufflag, LampRen::bufsize, Lamp::bufsize, LampRen::buftype, Lamp::buftype, LampRen::clipend, Lamp::clipend, LampRen::clipsta, Lamp::clipsta, LampRen::co, LampRen::compressthresh, Lamp::compressthresh, copy_m3_m4(), copy_m4_m4(), copy_v3_v3(), cos(), cosf, Lamp::curfalloff, LampRen::curfalloff, curvemapping_copy(), Object::data, LampRen::dist, Lamp::dist, LampRen::distkw, SunSky::effect_type, ELEM, ELEM3, ELEM4, LampRen::energy, Lamp::energy, LampRen::falloff_type, Lamp::falloff_type, LampRen::filtertype, Lamp::filtertype, Render::flag, Lamp::g, G, LampRen::g, Lamp::haint, LampRen::haint, Lamp::horizon_brightness, LampRen::imat, Object::imat, init_jitter_plane(), InitAtmosphere(), initshadowbuf(), InitSunSky(), invert_m4_m4(), Lamp::k, LampRen::k, LA_AREA, LA_AREA_BOX, LA_AREA_CUBE, LA_AREA_RECT, LA_AREA_SQUARE, LA_HALO, LA_HEMI, LA_LOCAL, LA_NEG, LA_ONLYSHADOW, LA_OSATEX, LA_SAMP_CONSTANT, LA_SAMP_HALTON, LA_SHAD_BUF, LA_SHAD_RAY, LA_SHAD_TEX, LA_SHADBUF_DEEP, LA_SHADBUF_HALFWAY, LA_SHADBUF_REGULAR, LA_SPOT, LA_SUN, LA_SUN_EFFECT_AP, LA_SUN_EFFECT_SKY, LA_TEXTURE, LAMAP_COL, LAMAP_SHAD, Render::lampren, GroupObject::lampren, Object::lay, LampRen::lay, LampRen::ld1, LampRen::ld2, Render::lights, M_PI, MTex::mapto, LampRen::mat, MAX_MTEX, MEM_callocN(), MEM_mallocN(), RenderData::mode, Lamp::mode, LampRen::mode, LampRen::mtex, Lamp::mtex, mul_m3_v3(), mult_m4_m4m4(), normalize_v3(), NULL, GroupObject::ob, Object::obmat, RenderData::osa, Render::osa, LampRen::r, Lamp::r, Render::r, R_LAMPHALO, R_RAYTRACE, R_SHADOW, LampRen::ray_samp, Lamp::ray_samp, Lamp::ray_samp_method, LampRen::ray_samp_method, Lamp::ray_samp_type, LampRen::ray_samp_type, Lamp::ray_sampy, LampRen::ray_sampy, Lamp::ray_sampz, LampRen::ray_sampz, LampRen::ray_totsamp, LampShadowSample::s, saacos(), Lamp::samp, LampRen::samp, LampShadowSubSample::samplenr, LampRen::sh_invcampos, LampRen::sh_zfac, LampShadowSubSample::shadfac, Lamp::shadhalostep, LampRen::shadhalostep, Render::shadowsamplenr, LampRen::shadsamp, LampRen::shb, LampRen::shdwb, Lamp::shdwb, Lamp::shdwg, LampRen::shdwg, Lamp::shdwr, LampRen::shdwr, sin(), Lamp::sky_colorspace, Lamp::sky_exposure, Lamp::skyblendfac, Lamp::skyblendtype, Lamp::soft, LampRen::soft, LampRen::spotbl, Lamp::spotblend, LampRen::spotsi, Lamp::spotsize, LampRen::spottexfac, Lamp::spread, Lamp::sun_brightness, Lamp::sun_effect_type, Lamp::sun_intensity, Lamp::sun_size, LampRen::sunsky, MTex::tex, TEX_IMAGE, RenderData::threads, Render::totlamp, Lamp::type, LampRen::type, Tex::type, LampRen::vec, and Render::viewmat.

Referenced by add_lightgroup(), and init_render_object().

static void add_render_object ( Render re,
Object ob,
Object par,
DupliObject dob,
int  timeoffset 
) [static]
static void add_volume ( Render re,
ObjectRen obr,
Material ma 
) [static]

Definition at line 3233 of file convertblender.c.

References BLI_addtail(), VolumeOb::ma, MEM_mallocN(), VolumeOb::obr, and Render::volumes.

Referenced by add_render_object().

static int allow_render_dupli_instance ( Render UNUSEDre,
DupliObject dob,
Object obd 
) [static]
static int allow_render_object ( Render re,
Object ob,
int  nolamps,
int  onlyselected,
Object actob 
) [static]
static void area_lamp_vectors ( LampRen lar) [static]
static void as_addvert ( ASvert asv,
VertRen v1,
VlakRen vlr 
) [static]
static VertRen* as_findvertex ( VlakRen vlr,
VertRen UNUSEDver,
ASvert asv,
float  thresh 
) [static]

Definition at line 780 of file convertblender.c.

References fabs(), ASvert::faces, ListBase::first, VlakRen::n, ASface::next, NULL, ASface::nver, and ASface::vlr.

Referenced by autosmooth().

static int as_testvertex ( VlakRen vlr,
VertRen UNUSEDver,
ASvert asv,
float  thresh 
) [static]

Definition at line 757 of file convertblender.c.

References fabs(), ASvert::faces, ListBase::first, VlakRen::n, ASface::next, and ASface::vlr.

Referenced by autosmooth().

static void assign_dupligroup_dupli ( Render re,
ObjectInstanceRen obi,
ObjectRen obr 
) [static]
static void autosmooth ( Render UNUSEDre,
ObjectRen obr,
float  mat[][4],
int  degr 
) [static]
static void calc_edge_stress ( Render UNUSEDre,
ObjectRen obr,
Mesh me 
) [static]
static void calc_edge_stress_add ( float *  accum,
VertRen v1,
VertRen v2 
) [static]

Definition at line 380 of file convertblender.c.

References VertRen::co, VertRen::index, len(), len_v3v3(), and VertRen::orco.

Referenced by calc_edge_stress().

static void calc_tangent_vector ( ObjectRen obr,
VertexTangent **  vtangents,
MemArena arena,
VlakRen vlr,
int  do_nmap_tangent,
int  do_tangent 
) [static]
static void calc_vertexnormals ( Render UNUSEDre,
ObjectRen obr,
int  do_tangent,
int  do_nmap_tangent 
) [static]
static void calculate_speedvector ( const float  vectors[2],
int  step,
float  winsq,
float  winroot,
const float  co[3],
const float  ho[4],
float  speed[4] 
) [static]
static void calculate_speedvectors ( Render re,
ObjectInstanceRen obi,
float *  vectors,
int  step 
) [static]
static float* calculate_strandsurface_speedvectors ( Render re,
ObjectInstanceRen obi,
StrandSurface mesh 
) [static]
static void check_material_mapto ( Material ma) [static]
static void check_non_flat_quads ( ObjectRen obr) [static]
static void copy_dbase_object_vectors ( Render re,
ListBase lb 
) [static]
static void database_fromscene_vectors ( Render re,
Scene scene,
unsigned int  lay,
int  timeoffset 
) [static]
static void database_init_objects ( Render re,
unsigned int  renderlay,
int  nolamps,
int  onlyselected,
Object actob,
int  timeoffset 
) [static]
static void displace_render_face ( Render re,
ObjectRen obr,
VlakRen vlr,
float *  scale,
float  mat[][4],
float  imat[][3] 
) [static]
static void displace_render_vert ( Render re,
ObjectRen obr,
ShadeInput shi,
VertRen vr,
int  vindex,
float *  scale,
float  mat[][4],
float  imat[][3] 
) [static]
static int dl_surf_to_renderdata ( ObjectRen obr,
DispList dl,
Material **  matar,
float *  orco,
float  mat[4][4] 
) [static]
static void do_displacement ( Render re,
ObjectRen obr,
float  mat[][4],
float  imat[][3] 
) [static]
static void dupli_render_particle_set ( Render re,
Object ob,
int  timeoffset,
int  level,
int  enable 
) [static]
static void finalize_render_object ( Render re,
ObjectRen obr,
int  timeoffset 
) [static]
static void find_dupli_instances ( Render re,
ObjectRen obr 
) [static]
static ObjectRen* find_dupligroup_dupli ( Render re,
Object ob,
int  psysindex 
) [static]
static void flag_render_node_material ( Render re,
bNodeTree ntree 
) [static]
static void free_camera_inside_volumes ( Render re) [static]

Definition at line 3198 of file convertblender.c.

References BLI_freelistN(), and Render::render_volumes_inside.

Referenced by RE_Database_Free().

static void free_dbase_object_vectors ( ListBase lb) [static]
static void free_mesh_orco_hash ( Render re) [static]

Definition at line 929 of file convertblender.c.

References BLI_ghash_free(), MEM_freeN(), NULL, and Render::orco_hash.

Referenced by RE_Database_Free().

static float* get_object_orco ( Render re,
Object ob 
) [static]
static void get_particle_uvco_mcol ( short  from,
DerivedMesh dm,
float *  fuv,
int  num,
ParticleStrandData sd 
) [static]
static int get_vector_renderlayers ( Scene sce) [static]
static void GetNormal ( const SMikkTSpaceContext pContext,
float  fNorm[],
const int  face_num,
const int  vert_index 
) [static]
static int GetNumFaces ( const SMikkTSpaceContext pContext) [static]
static int GetNumVertsOfFace ( const SMikkTSpaceContext pContext,
const int  face_num 
) [static]
static void GetPosition ( const SMikkTSpaceContext pContext,
float  fPos[],
const int  face_num,
const int  vert_index 
) [static]
static void GetTextureCoordinate ( const SMikkTSpaceContext pContext,
float  fUV[],
const int  face_num,
const int  vert_index 
) [static]
static Material* give_render_material ( Render re,
Object ob,
short  nr 
) [static]
static void init_camera_inside_volumes ( Render re) [static]
static void init_render_curve ( Render re,
ObjectRen obr,
int  timeoffset 
) [static]
static void init_render_dm ( DerivedMesh dm,
Render re,
ObjectRen obr,
int  timeoffset,
float *  orco,
float  mat[4][4] 
) [static]
static void init_render_mball ( Render re,
ObjectRen obr 
) [static]
static void init_render_mesh ( Render re,
ObjectRen obr,
int  timeoffset 
) [static]

Definition at line 3245 of file convertblender.c.

References Material::alpha, autosmooth(), calc_edge_stress(), calc_vertexnormals(), CD_MASK_BAREMESH, CD_MASK_MCOL, CD_MASK_MTFACE, CD_MASK_ORCO, CD_MCOL, CD_MTFACE, CD_ORCO, CD_TANGENT, MVert::co, VertRen::co, MSticky::co, copy_m3_m4(), copy_v3_v3(), copy_v4_v4(), CustomData_get_layer_index(), Object::data, CustomDataLayer::data, DM_add_tangent_layer(), do_displacement(), VlakRen::ec, DerivedMesh::faceData, Material::filter, MFace::flag, MEdge::flag, Mesh::flag, Render::flag, VlakRen::flag, DerivedMesh::getEdgeArray, DerivedMesh::getFaceArray, DerivedMesh::getNumEdges, DerivedMesh::getNumFaces, DerivedMesh::getNumVerts, DerivedMesh::getVertArray, DerivedMesh::getVertDataArray, give_render_material(), Object::imat, invert_m4_m4(), is_negative_m4(), CustomData::layers, len(), VolumeOb::ma, MA_NORMAP_TANG, MA_RAYMIRROR, MA_TANGENT_V, MA_TRANSP, MA_TYPE_HALO, MA_TYPE_WIRE, make_mesh_edge_lookup(), make_render_halos(), MAP_ALPHA, MTex::mapto, VlakRen::mat, MFace::mat_nr, Material::material_type, MAX_MCOL, MAX_MTEX, MAX_MTFACE, ME_AUTOSMOOTH, ME_EDGERENDER, ME_SMOOTH, ME_V1V2, MEM_dupallocN(), MEM_freeN(), mesh_create_derived_render(), Mesh::mface, Material::mode, Material::mode_l, Mesh::msticky, Material::mtex, Mesh::mtface, mul_m4_v3(), mul_mat3_m4_v3(), mul_transposed_m3_v3(), mult_m4_m4m4(), Mesh::mvert, VertRen::n, VlakRen::n, CustomDataLayer::name, negate_v3(), MVert::no, normal_quad_v3(), normal_short_to_float_v3(), normal_tri_v3(), normalize_v3(), NULL, ObjectRen::ob, Object::obmat, VertRen::orco, R_NEED_TANGENT, RE_findOrAddVert(), RE_findOrAddVlak(), RE_set_customdata_names(), RE_vertren_get_sticky(), RE_vlakren_get_mcol(), RE_vlakren_get_nmap_tangent(), RE_vlakren_get_tface(), DerivedMesh::release, Render::scene, set_object_orco(), Mesh::smoothresh, Material::spectra, test_for_displace(), MTex::tex, Material::texco, TEXCO_ORCO, TEXCO_STRESS, Object::totcol, Mesh::totface, CustomData::totlayer, Mesh::totvert, ObjectRen::totvert, ObjectRen::totvlak, CustomDataLayer::type, use_mesh_edge_lookup(), MTFace::uv, MEdge::v1, MFace::v1, VlakRen::v1, edgesort::v1, MEdge::v2, MFace::v2, VlakRen::v2, MFace::v3, VlakRen::v3, MFace::v4, VlakRen::v4, and Render::viewmat.

Referenced by init_render_object_data().

static void init_render_object ( Render re,
Object ob,
Object par,
DupliObject dob,
int  timeoffset 
) [static]
static void init_render_object_data ( Render re,
ObjectRen obr,
int  timeoffset 
) [static]
static void init_render_surf ( Render re,
ObjectRen obr,
int  timeoffset 
) [static]
void init_render_world ( Render re)
static void initshadowbuf ( Render re,
LampRen lar,
float  mat[][4] 
) [static]
static HaloRen* initstar ( Render re,
ObjectRen obr,
float *  vec,
float  hasize 
) [static]
static int load_fluidsimspeedvectors ( Render re,
ObjectInstanceRen obi,
float *  vectors,
int  step 
) [static]
static struct edgesort* make_mesh_edge_lookup ( DerivedMesh dm,
int *  totedgesort 
) [static, read]
static void make_render_halos ( Render re,
ObjectRen obr,
Mesh UNUSEDme,
int  totvert,
MVert mvert,
Material ma,
float *  orco 
) [static]
static void particle_billboard ( Render re,
ObjectRen obr,
Material ma,
ParticleBillboardData bb 
) [static]
static void particle_curve ( Render re,
ObjectRen obr,
DerivedMesh dm,
Material ma,
ParticleStrandData sd,
float *  loc,
float *  loc1,
int  seed,
float *  pa_co 
) [static]
static void particle_normal_ren ( short  ren_as,
ParticleSettings part,
Render re,
ObjectRen obr,
DerivedMesh dm,
Material ma,
ParticleStrandData sd,
ParticleBillboardData bb,
ParticleKey state,
int  seed,
float  hasize,
float *  pa_co 
) [static]
void RE_DataBase_ApplyWindow ( Render re)

Definition at line 5172 of file convertblender.c.

References project_renderdata(), and projectverto().

void RE_Database_Baking ( Render re,
Main bmain,
Scene scene,
unsigned int  lay,
const int  type,
Object actob 
)
void RE_Database_Free ( Render re)
void RE_Database_FromScene ( Render re,
Main bmain,
Scene scene,
unsigned int  lay,
int  use_camera_view 
)

Definition at line 5022 of file convertblender.c.

References World::ambr, World::ao_gather_method, World::ao_samp_method, BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, BLI_strncpy(), RenderData::cfra, RenderStats::cfra, RenderStats::convertdone, copy_v3_v3(), database_init_objects(), ListBase::first, Render::i, Scene::id, RenderStats::infostr, init_ao_sphere(), init_camera_inside_volumes(), init_render_materials(), init_render_qmcsampler(), init_render_textures(), init_render_world(), invert_m4_m4(), Render::lampren, ListBase::last, Render::lay, Render::lights, Render::main, make_envmaps(), make_occ_tree(), make_pointdensities(), make_sss_tree(), make_voxeldata(), makeraytree(), Render::memArena, World::mode, RenderData::mode, ID::name, normalize_m4(), NULL, OB_RECALC_OB, Object::obmat, RenderStats::partsdone, project_renderdata(), projectverto(), Render::r, Scene::r, R_NO_FRAME_UPDATE, R_PANORAMA, R_PREVIEWBUTS, R_RAYTRACE, R_SHADOW, R_SSS, RE_Database_Free(), RE_GetCamera(), RE_make_stars(), RE_SetCamera(), RE_SetView(), Object::recalc, RenderData::scemode, Render::scene, scene_update_for_newframe(), RenderStats::scenename, Render::sdh, Scene::set, set_material_lightgroups(), set_node_shader_lamp_loop(), set_renderlayer_lightgroups(), shade_material_loop(), slurph_opt, sort_halos(), Render::stats_draw, Render::tbh, Render::test_break, threaded_makeshadowbufs(), RenderStats::totface, RenderStats::tothalo, Render::tothalo, RenderStats::totlamp, Render::totlamp, RenderStats::totstrand, Render::totstrand, RenderStats::totvert, Render::totvert, Render::totvlak, volume_precache(), WO_AMB_OCC, WO_AOGATHER_APPROX, WO_AOSAMP_CONSTANT, WO_ENV_LIGHT, WO_INDIRECT_LIGHT, WO_STARS, and Render::wrld.

Referenced by do_render_3d(), and RE_Database_FromScene_Vectors().

void RE_Database_FromScene_Vectors ( Render re,
Main bmain,
Scene sce,
unsigned int  lay 
)
void RE_DataBase_GetView ( Render re,
float  mat[][4] 
)

Definition at line 5177 of file convertblender.c.

References copy_m4_m4(), and Render::viewmat.

void RE_make_stars ( Render re,
Scene scenev3d,
void(*)(void)  initfunc,
void(*)(float *)  vertexfunc,
void(*)(void)  termfunc 
)
void RE_make_sticky ( Scene scene,
View3D v3d 
)
static int render_new_particle_system ( Render re,
ObjectRen obr,
ParticleSystem psys,
int  timeoffset 
) [static]

Definition at line 1549 of file convertblender.c.

References MCol::a, ParticleStrandData::adapt, ParticleSettings::adapt_angle, ParticleStrandData::adapt_angle, ParticleSettings::adapt_pix, ParticleStrandData::adapt_pix, StrandBuffer::adaptcos, add_v3_v3v3(), ParticleBillboardData::align, Material::amb, ParticleBillboardData::anim, World::ao_gather_method, ParticleSettings::bb_align, ParticleSettings::bb_anim, ParticleSettings::bb_ob, ParticleSettings::bb_offset, ParticleSettings::bb_rand_tilt, ParticleSettings::bb_size, ParticleSettings::bb_split_offset, ParticleSettings::bb_tilt, ParticleSettings::bb_uv_split, ParticleSystem::bb_uvname, ParticleSettings::bb_vel_head, ParticleSettings::bb_vel_tail, BKE_curframe(), StrandBuffer::bound, StrandRen::buffer, cache_strand_surface(), calc_vertexnormals(), CD_MCOL, CD_MTFACE, CD_ORIGINDEX, ParticleSystem::child, ParticleSystem::childcache, ParticleSettings::childtype, co, ParticleKey::co, StrandVert::co, copy_m3_m4(), copy_m4_m4(), copy_v3_v3(), cosf, CustomData_get_active_layer_index(), CustomData_get_layer_index(), CustomData_get_named_layer_index(), CustomData_number_of_layers(), DEG2RADF, ParticleSettings::disp, ParticleSystemModifierData::dm, DMCACHE_ISCHILD, DMCACHE_NOTFOUND, ParticleSettings::draw, credits_svn_gen::e, ELEM, eModifierMode_Render, StrandBound::end, end_latt_deform(), DerivedMesh::faceData, ParticleStrandData::first, StrandBuffer::flag, ParticleSettings::flag, ParticleSystem::flag, Render::flag, ChildParticle::foffset, ParticleData::foffset, ParticleSettings::from, ParticleData::fuv, ChildParticle::fuv, G, get_particle_uvco_mcol(), DerivedMesh::getFaceDataArray, DerivedMesh::getNumFaces, give_render_material(), Material::hasize, i, ParticleSystem::imat, Object::imat, invert_m4_m4(), ParticleSystem::lattice, Object::lay, StrandBuffer::lay, len_v3(), len_v3v3(), length(), ParticleBillboardData::lifetime, ParticleBillboardData::lock, StrandBuffer::ma, MA_STR_B_UNITS, MA_STR_SURFDIFF, MA_TANGENT_STR, MA_TYPE_HALO, MA_TYPE_WIRE, Material::material_type, MAX2, StrandBuffer::maxdepth, ParticleStrandData::mcol, MEM_callocN(), MEM_freeN(), MEM_mallocN(), StrandBuffer::minwidth, RenderData::mode, World::mode, Material::mode, ModifierData::mode, Material::mode_l, ParticleSystemModifierData::modifier, mul_m3_v3(), mul_m4_v3(), mul_m4_v4(), mult_m4_m4m4(), NULL, ParticleData::num, ParticleBillboardData::num, ChildParticle::num, ParticleData::num_dmcache, ParticleSimulationData::ob, ParticleBillboardData::ob, ObjectRen::ob, Object::obmat, ParticleBillboardData::offset, ParticleSettings::omat, StrandRen::orco, ParticleStrandData::orco, ParticleStrandData::override_uv, StrandBuffer::overrideuv, ChildParticle::parent, ParticleSystem::parent, PARS_UNEXIST, ParticleSystem::part, PART_ABS_PATH_TIME, PART_BB_VEL, PART_CHILD_FACES, PART_DRAW_BB, PART_DRAW_BB_LOCK, PART_DRAW_GR, PART_DRAW_NOT, PART_DRAW_OB, PART_DRAW_PARENT, PART_DRAW_PATH, PART_DRAW_REN_ADAPT, PART_DRAW_REN_STRAND, PART_FROM_FACE, PART_HAIR, PART_HAIR_BSPLINE, PART_PHYS_KEYED, PART_PHYS_NO, particle_curve(), particle_normal_ren(), ParticleSystem::particles, ParticleSettings::path_end, ParticleSystem::pathcache, ParticleSettings::phystype, pow(), ParticleSimulationData::psmd, ParticleSimulationData::psys, psys_check_enabled(), psys_count_keyed_targets(), PSYS_DRAWING, PSYS_FRAND, psys_get_child_size(), psys_get_child_time(), psys_get_lattice(), psys_get_modifier(), psys_get_particle_on_path(), psys_get_particle_state(), psys_make_temp_pointcache(), psys_particle_on_emitter(), psys_render_simplify_params(), PSYS_USE_IMAT, Render::r, R_HALO, R_SPEED, R_STRAND_B_UNITS, R_STRAND_BSPLINE, ParticleSettings::randlength, ParticleBillboardData::random, random(), RE_addStrandBuffer(), RE_findOrAddStrand(), RE_GetCamera(), RE_set_customdata_names(), RE_strandren_get_face(), RE_strandren_get_mcol(), RE_strandren_get_simplify(), RE_strandren_get_surfnor(), RE_strandren_get_uv(), ParticleSettings::ren_as, ParticleSettings::ren_step, rng_free(), rng_getFloat(), rng_new(), Render::scene, ParticleSimulationData::scene, ParticleSystem::seed, Material::seed1, set_object_orco(), ParticleStrandData::size, ParticleBillboardData::size, ParticleBillboardData::split_offset, StrandBound::start, state, ParticleCacheKey::steps, Material::strand_min, Material::strand_uvname, Material::strand_widthfade, StrandVert::strandco, sub_v3_v3v3(), StrandBuffer::surface, ParticleStrandData::surfnor, Render::tbh, Render::test_break, Material::texco, TEXCO_UV, ParticleBillboardData::tilt, ParticleStrandData::time, ParticleKey::time, ParticleBillboardData::time, StrandBuffer::totbound, ParticleSystem::totchild, ParticleStrandData::totcol, ParticleBillboardData::totnum, ParticleSystem::totpart, ObjectRen::totstrand, ParticleStrandData::totuv, StrandRen::totvert, ParticleSettings::trail_count, transpose_m3(), ParticleSettings::type, ParticleBillboardData::uv, ParticleBillboardData::uv_split, ParticleStrandData::uvco, ParticleKey::vel, StrandBuffer::vert, StrandRen::vert, Render::viewmat, StrandBuffer::widthfade, StrandBuffer::winmat, Render::winmat, StrandBuffer::winx, Render::winx, StrandBuffer::winy, Render::winy, WO_AMB_OCC, WO_AOGATHER_APPROX, WO_ENV_LIGHT, WO_INDIRECT_LIGHT, and Render::wrld.

Referenced by init_render_object_data().

static int render_object_type ( short  type) [static]

Definition at line 4373 of file convertblender.c.

References OB_TYPE_SUPPORT_MATERIAL.

Referenced by allow_render_dupli_instance(), and init_render_object().

static void set_dupli_tex_mat ( Render re,
ObjectInstanceRen obi,
DupliObject dob 
) [static]
static void set_fullsample_trace_flag ( Render re,
ObjectRen obr 
) [static]
static void set_material_lightgroups ( Render re) [static]
static void set_object_orco ( Render re,
void *  ob,
float *  orco 
) [static]
static void set_phong_threshold ( ObjectRen obr) [static]
static void set_renderlayer_lightgroups ( Render re,
Scene sce 
) [static]
static void SetTSpace ( const SMikkTSpaceContext pContext,
const float  fvTangent[],
const float  fSign,
const int  face_num,
const int  iVert 
) [static]
static void sort_halos ( Render re,
int  totsort 
) [static]
static void speedvector_project ( Render re,
float  zco[2],
const float  co[3],
const float  ho[4] 
) [static]
static void split_quads ( ObjectRen obr,
int  dir 
) [static]
static void split_v_renderfaces ( ObjectRen obr,
int  startvlak,
int   UNUSEDstartvert,
int   UNUSEDusize,
int  vsize,
int  uIndex,
int   UNUSEDcyclu,
int  cyclv 
) [static]

Definition at line 342 of file convertblender.c.

References RE_findOrAddVlak(), RE_vertren_copy(), VlakRen::v1, and VlakRen::v2.

Referenced by init_render_curve().

static void static_particle_strand ( Render re,
ObjectRen obr,
Material ma,
ParticleStrandData sd,
const float  vec[3],
const float  vec1[3] 
) [static]
static void static_particle_wire ( ObjectRen obr,
Material ma,
const float  vec[3],
const float  vec1[3],
int  first,
int  line 
) [static]
static short test_for_displace ( Render re,
Object ob 
) [static]
static void to_edgesort ( struct edgesort ed,
unsigned int  i1,
unsigned int  i2,
unsigned int  v1,
unsigned int  v2,
int  f 
) [static]

Definition at line 3076 of file convertblender.c.

References edgesort::f, edgesort::i1, edgesort::i2, SWAP, edgesort::v1, and edgesort::v2.

Referenced by make_mesh_edge_lookup().

static void use_mesh_edge_lookup ( ObjectRen obr,
DerivedMesh dm,
MEdge medge,
VlakRen vlr,
struct edgesort edgetable,
int  totedge 
) [static]
static int vergedgesort ( const void *  v1,
const void *  v2 
) [static]

Definition at line 3092 of file convertblender.c.

References edgesort::v1, and edgesort::v2.

Referenced by make_mesh_edge_lookup(), and use_mesh_edge_lookup().

static int verghalo ( const void *  a1,
const void *  a2 
) [static]

Definition at line 2175 of file convertblender.c.

References HaloRen::zs.

Referenced by sort_halos().