Blender V2.61 - r43446
|
#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 HaloRen * | initstar (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 VertRen * | as_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 Material * | give_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 edgesort * | make_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 GroupObject * | add_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 ObjectRen * | find_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) |
Definition in file convertblender.c.
#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, | |
v | |||
) | (startvlak + (u) * sizev + (v)) |
Definition at line 327 of file convertblender.c.
Referenced by dl_surf_to_renderdata().
typedef struct ParticleStrandData ParticleStrandData |
static void add_group_render_dupli_obs | ( | Render * | re, |
Group * | group, | ||
int | nolamps, | ||
int | onlyselected, | ||
Object * | actob, | ||
int | timeoffset, | ||
int | level | ||
) | [static] |
Definition at line 4820 of file convertblender.c.
References allow_render_object(), Object::dup_group, ListBase::first, Object::flag, Group::gobject, init_render_object(), MAX_DUPLI_RECUR, GroupObject::next, NULL, GroupObject::ob, OB_DONE, OB_RENDER_DUPLI, and Object::transflag.
Referenced by database_init_objects().
Definition at line 3937 of file convertblender.c.
References add_render_lamp(), BLI_remlink(), ListBase::first, ID::flag, Group::gobject, Group::id, GroupObject::lampren, Object::lay, Render::lay, LIB_DOIT, Render::lights, MEM_freeN(), GroupObject::next, NULL, GroupObject::ob, OB_LAMP, and Object::type.
Referenced by set_material_lightgroups(), and set_renderlayer_lightgroups().
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] |
Definition at line 4538 of file convertblender.c.
References add_volume(), DupliObject::animated, copy_m4_m4(), ParticleSettings::draw, find_dupli_instances(), ListBase::first, ObjectRen::flag, ParticleSystem::flag, give_render_material(), i, DupliObject::index, init_render_object_data(), Object::lay, MA_TYPE_VOLUME, Material::material_type, ParticleSystem::next, NULL, OB_RENDER_DUPLI, ObjectRen::obmat, Object::obmat, ParticleSystem::part, PART_DRAW_EMITTER, Object::particlesystem, psys_render_restore(), psys_render_set(), PSYS_USE_IMAT, R_INSTANCEABLE, RE_addRenderInstance(), RE_addRenderObject(), set_dupli_tex_mat(), Object::totcol, Object::transflag, Render::viewmat, Render::winmat, Render::winx, and Render::winy.
Referenced by init_render_object().
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] |
Definition at line 4740 of file convertblender.c.
References DupliObject::animated, ELEM5, ListBase::first, give_current_material(), give_totcolp(), MA_TYPE_HALO, Material::material_type, ParticleSystem::next, OB_DUPLIGROUP, ParticleSystem::part, PART_DRAW_BB, PART_DRAW_GR, PART_DRAW_LINE, PART_DRAW_OB, PART_DRAW_PATH, Object::particlesystem, ParticleSettings::ren_as, render_object_type(), DupliObject::type, and Object::type.
Referenced by database_init_objects().
static int allow_render_object | ( | Render * | re, |
Object * | ob, | ||
int | nolamps, | ||
int | onlyselected, | ||
Object * | actob | ||
) | [static] |
Definition at line 4719 of file convertblender.c.
References find_basis_mball(), Object::flag, OB_DUPLI, OB_DUPLIFRAMES, OB_DUPLIPARTS, OB_LAMP, OB_MBALL, Render::scene, SELECT, Object::transflag, and Object::type.
Referenced by add_group_render_dupli_obs(), and database_init_objects().
static void area_lamp_vectors | ( | LampRen * | lar | ) | [static] |
Definition at line 3628 of file convertblender.c.
References LampRen::area, LampRen::area_size, LampRen::area_sizey, LampRen::areasize, LampRen::co, LampRen::dist, LampRen::mat, LampRen::ray_totsamp, and sqrtf.
Referenced by add_render_lamp().
Definition at line 727 of file convertblender.c.
References BLI_addtail(), ASvert::faces, ListBase::first, ListBase::last, MEM_callocN(), NULL, ASvert::totface, and ASface::vlr.
Referenced by autosmooth().
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] |
Definition at line 4415 of file convertblender.c.
References copy_m3_m4(), copy_m4_m4(), invert_m3_m3(), invert_m4_m4(), ObjectInstanceRen::mat, mult_m4_m4m4(), ObjectInstanceRen::nmat, ObjectRen::obmat, ObjectInstanceRen::obr, Render::tothalo, ObjectRen::tothalo, ObjectRen::totstrand, Render::totstrand, Render::totvert, ObjectRen::totvert, ObjectRen::totvlak, Render::totvlak, transpose_m3(), and Render::viewmat.
Referenced by database_init_objects().
Definition at line 808 of file convertblender.c.
References as_addvert(), as_findvertex(), as_testvertex(), BLI_freelistN(), VertRen::co, cosf, DEG2RADF, ASvert::faces, ListBase::first, VertRen::index, MEM_callocN(), MEM_freeN(), mul_m4_v3(), VlakRen::n, ASface::next, normal_quad_v3(), normal_tri_v3(), NULL, ASface::nver, RE_findOrAddVert(), RE_findOrAddVlak(), RE_vertren_copy(), thresh, ASvert::totface, ObjectRen::totvert, ObjectRen::totvlak, VlakRen::v1, VlakRen::v2, VlakRen::v3, VlakRen::v4, and ASface::vlr.
Referenced by init_render_mesh().
Definition at line 394 of file convertblender.c.
References calc_edge_stress_add(), VertRen::index, MEM_callocN(), MEM_freeN(), mesh_get_texspace(), NULL, VertRen::orco, RE_findOrAddVert(), RE_findOrAddVlak(), RE_vertren_get_stress(), size(), ObjectRen::totvert, ObjectRen::totvlak, VlakRen::v1, VlakRen::v2, VlakRen::v3, and VlakRen::v4.
Referenced by init_render_mesh().
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] |
Definition at line 453 of file convertblender.c.
References ObjectRen::actmtface, add_v3_v3(), VertRen::co, VertRen::index, map_to_sphere(), VlakRen::n, NULL, VertRen::orco, RE_vertren_get_tangent(), RE_vlakren_get_tface(), sum_or_add_vertex_tangent(), tangent_from_uv(), MTFace::uv, VlakRen::v1, VlakRen::v2, VlakRen::v3, and VlakRen::v4.
Referenced by calc_vertexnormals().
static void calc_vertexnormals | ( | Render * | UNUSEDre, |
ObjectRen * | obr, | ||
int | do_tangent, | ||
int | do_nmap_tangent | ||
) | [static] |
Definition at line 591 of file convertblender.c.
References accumulate_vertex_normals(), ObjectRen::actmtface, BLI_memarena_free(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, BLI_memarena_use_calloc(), calc_tangent_vector(), VertRen::co, copy_v3_v3(), find_vertex_tangent(), VlakRen::flag, genTangSpaceDefault(), GetNormal(), GetNumFaces(), GetNumVertsOfFace(), GetPosition(), GetTextureCoordinate(), VertRen::index, is_zero_v3(), SMikkTSpaceInterface::m_getNormal, SMikkTSpaceInterface::m_getNumFaces, SMikkTSpaceInterface::m_getNumVerticesOfFace, SMikkTSpaceInterface::m_getPosition, SMikkTSpaceInterface::m_getTexCoord, SMikkTSpaceContext::m_pInterface, SMikkTSpaceContext::m_pUserData, SMikkTSpaceInterface::m_setTSpaceBasic, ME_SMOOTH, MEM_callocN(), MEM_freeN(), VertRen::n, VlakRen::n, normalize_v3(), NULL, SRenderMeshToTangent::obr, RE_findOrAddVert(), RE_findOrAddVlak(), RE_vertren_get_tangent(), RE_vlakren_get_nmap_tangent(), RE_vlakren_get_tface(), SetTSpace(), ObjectRen::totvert, ObjectRen::totvlak, MTFace::uv, VlakRen::v1, VlakRen::v2, VlakRen::v3, and VlakRen::v4.
Referenced by do_displacement(), init_render_dm(), init_render_mesh(), and render_new_particle_system().
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] |
Definition at line 5280 of file convertblender.c.
References len(), NULL, speedvector_project(), and sqrtf.
Referenced by calculate_speedvectors(), and calculate_strandsurface_speedvectors().
static void calculate_speedvectors | ( | Render * | re, |
ObjectInstanceRen * | obi, | ||
float * | vectors, | ||
int | step | ||
) | [static] |
Definition at line 5348 of file convertblender.c.
References calculate_speedvector(), calculate_strandsurface_speedvectors(), StrandSurface::co, VertRen::co, StrandVert::co, copy_m4_m4(), StrandSurface::face, ObjectInstanceRen::flag, interp_weights_face_v3(), madd_v4_v4fl(), ObjectInstanceRen::mat, MEM_freeN(), mult_m4_m4m4(), NULL, ObjectInstanceRen::obr, projectvert(), R_TRANSFORMED, RE_strandren_get_face(), RE_strandren_get_winspeed(), RE_vertren_get_winspeed(), sqrt(), StrandTableNode::strand, ObjectRen::strandbuf, ObjectRen::strandnodes, StrandBuffer::surface, ObjectRen::totstrand, ObjectRen::totvert, VertTableNode::vert, StrandRen::vert, ObjectRen::vertnodes, simple_enum_gen::w, Render::winmat, Render::winx, Render::winy, and zero_v4().
Referenced by RE_Database_FromScene_Vectors().
static float* calculate_strandsurface_speedvectors | ( | Render * | re, |
ObjectInstanceRen * | obi, | ||
StrandSurface * | mesh | ||
) | [static] |
Definition at line 5314 of file convertblender.c.
References calculate_speedvector(), StrandSurface::co, copy_m4_m4(), ObjectInstanceRen::flag, ObjectInstanceRen::mat, MEM_callocN(), mult_m4_m4m4(), StrandSurface::nextco, NULL, StrandSurface::prevco, projectvert(), R_TRANSFORMED, speedvector_project(), sqrt(), StrandSurface::totvert, Render::winmat, Render::winx, and Render::winy.
Referenced by calculate_speedvectors().
static void check_material_mapto | ( | Material * | ma | ) | [static] |
Definition at line 937 of file convertblender.c.
References MAP_DENSITY, MAP_EMISSION, MAP_EMISSION_COL, MAP_REFLECTION, MAP_REFLECTION_COL, MAP_SCATTERING, MAP_TRANSMISSION_COL, MTex::mapto, Material::mapto_textured, MAX_MTEX, Material::mtex, and MTex::tex.
Referenced by give_render_material().
static void check_non_flat_quads | ( | ObjectRen * | obr | ) | [static] |
Definition at line 4185 of file convertblender.c.
References ABS, VertRen::co, fabs(), VlakRen::flag, FLT_EPSILON10, MA_TYPE_WIRE, VlakRen::mat, Material::material_type, VertRen::n, VlakRen::n, normal_tri_v3(), NULL, R_DIVIDE_24, R_FACE_SPLIT, R_STRAND, RE_findOrAddVlak(), RE_vlakren_copy(), sub_v3_v3v3(), ObjectRen::totvlak, VlakRen::v1, VlakRen::v2, VlakRen::v3, and VlakRen::v4.
Referenced by finalize_render_object().
Definition at line 5524 of file convertblender.c.
References BLI_addtail(), VertRen::co, copy_m4_m4(), ListBase::first, ObjectInstanceRen::flag, Render::instancetable, ObjectInstanceRen::mat, MEM_mallocN(), mult_m4_m4m4(), ObjectInstanceRen::next, NULL, ObjectInstanceRen::obr, projectvert(), R_TRANSFORMED, speedvector_project(), ObjectInstanceRen::totvector, ObjectRen::totvert, ObjectInstanceRen::vectors, VertTableNode::vert, ObjectRen::vertnodes, and Render::winmat.
Referenced by RE_Database_FromScene_Vectors().
static void database_fromscene_vectors | ( | Render * | re, |
Scene * | scene, | ||
unsigned int | lay, | ||
int | timeoffset | ||
) | [static] |
Definition at line 5186 of file convertblender.c.
References BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, RenderData::cfra, database_init_objects(), ListBase::first, Render::i, invert_m4_m4(), ListBase::last, Render::lay, Render::lights, Render::main, Render::memArena, RenderData::mode, normalize_m4(), NULL, Object::obmat, project_renderdata(), projectverto(), Scene::r, Render::r, R_PANORAMA, RE_GetCamera(), RE_SetView(), Render::scene, scene_update_for_newframe(), slurph_opt, Render::tbh, Render::test_break, RenderStats::totface, Render::tothalo, RenderStats::tothalo, RenderStats::totlamp, Render::totlamp, Render::totstrand, RenderStats::totstrand, RenderStats::totvert, Render::totvert, and Render::totvlak.
Referenced by RE_Database_FromScene_Vectors().
static void database_init_objects | ( | Render * | re, |
unsigned int | renderlay, | ||
int | nolamps, | ||
int | onlyselected, | ||
Object * | actob, | ||
int | timeoffset | ||
) | [static] |
Definition at line 4847 of file convertblender.c.
References add_group_render_dupli_obs(), allow_render_dupli_instance(), allow_render_object(), assign_dupligroup_dupli(), copy_m4_m4(), copy_v3_v3(), dupli_render_particle_set(), ObjectInstanceRen::dupliorco, ObjectInstanceRen::dupliuv, find_dupli_instances(), find_dupligroup_dupli(), ListBase::first, Object::flag, free_object_duplilist(), get_vector_renderlayers(), Main::group, Group::id, Object::id, Object::imat, Object::imat_ren, DupliObject::index, init_render_object(), invert_m4_m4(), Object::lay, Base::lay, Render::lay, Render::main, DupliObject::mat, mult_m4_m4m4(), ParticleSystem::next, DupliObject::next, ID::next, DupliObject::no_draw, NULL, DupliObject::ob, OB_DONE, OB_DUPLI, OB_DUPLIGROUP, OB_LAMP, OB_MBALL, OB_RENDER_DUPLI, OB_RESTRICT_RENDER, Main::object, Base::object, object_duplilist(), Object::obmat, DupliObject::orco, Object::particlesystem, RE_addRenderInstance(), RE_makeRenderInstances(), Object::restrictflag, Render::scene, set_dupli_tex_mat(), SETLOOPER, Render::tbh, Render::test_break, Object::transflag, DupliObject::type, Object::type, DupliObject::uv, and Render::viewmat.
Referenced by database_fromscene_vectors(), RE_Database_Baking(), and RE_Database_FromScene().
static void displace_render_face | ( | Render * | re, |
ObjectRen * | obr, | ||
VlakRen * | vlr, | ||
float * | scale, | ||
float | mat[][4], | ||
float | imat[][3] | ||
) | [static] |
Definition at line 2333 of file convertblender.c.
References VertRen::accum, VertRen::co, displace_render_vert(), fabs(), VertRen::flag, VlakRen::flag, ShadeInput::mat, VlakRen::mat, VlakRen::n, normal_quad_v3(), normal_tri_v3(), ShadeInput::obr, R_DIVIDE_24, ShadeInput::thread, ShadeInput::v1, VlakRen::v1, ShadeInput::v2, VlakRen::v2, ShadeInput::v3, VlakRen::v3, VlakRen::v4, and ShadeInput::vlr.
Referenced by do_displacement().
static void displace_render_vert | ( | Render * | re, |
ObjectRen * | obr, | ||
ShadeInput * | shi, | ||
VertRen * | vr, | ||
int | vindex, | ||
float * | scale, | ||
float | mat[][4], | ||
float | imat[][3] | ||
) | [static] |
Definition at line 2226 of file convertblender.c.
References VertRen::accum, ObjectRen::actmtface, ShadeInput::actuv, VertRen::co, ShadeInput::co, copy_v3_v3(), ShadeInput::displace, do_material_tex(), VertRen::flag, ShadeInput::gl, i, ShadeInput::lo, ShadeInput::mat, mul_m3_v3(), mul_m4_v3(), VertRen::n, ShadeInputUV::name, VertRen::orco, ShadeInput::orn, RE_vertren_get_sticky(), RE_vertren_get_stress(), RE_vlakren_get_tface(), ShadeInput::sticky, ShadeInput::stress, Material::texco, TEXCO_GLOB, TEXCO_NORM, TEXCO_ORCO, TEXCO_REFL, TEXCO_STICKY, TEXCO_STRESS, TEXCO_UV, ShadeInput::totuv, MTFace::uv, ShadeInputUV::uv, ShadeInput::uv, Render::viewinv, ShadeInput::vlr, and ShadeInput::vn.
Referenced by displace_render_face().
static int dl_surf_to_renderdata | ( | ObjectRen * | obr, |
DispList * | dl, | ||
Material ** | matar, | ||
float * | orco, | ||
float | mat[4][4] | ||
) | [static] |
Definition at line 2532 of file convertblender.c.
References MCol::a, add_v3_v3(), add_v3_v3v3(), VertRen::co, DispList::col, copy_v3_v3(), data, DL_CYCL_U, DL_CYCL_V, VlakRen::ec, DispList::flag, VlakRen::flag, VlakRen::mat, ME_V1V2, ME_V2V3, mul_m4_v3(), VertRen::n, VlakRen::n, normal_quad_v3(), normalize_v3(), DispList::nr, VertRen::orco, DispList::parts, RE_findOrAddVert(), RE_findOrAddVlak(), DispList::rt, ObjectRen::totvert, ObjectRen::totvlak, UVTOINDEX, VlakRen::v1, VlakRen::v2, VlakRen::v3, VlakRen::v4, and DispList::verts.
Referenced by init_render_curve(), and init_render_surf().
static void do_displacement | ( | Render * | re, |
ObjectRen * | obr, | ||
float | mat[][4], | ||
float | imat[][3] | ||
) | [static] |
Definition at line 2389 of file convertblender.c.
References calc_vertexnormals(), displace_render_face(), Object::dscale, VertRen::flag, i, mul_v3_v3v3(), ObjectRen::ob, Object::parent, RE_findOrAddVert(), RE_findOrAddVlak(), Object::size, ObjectRen::totvert, and ObjectRen::totvlak.
Referenced by finalize_render_object(), and init_render_mesh().
static void dupli_render_particle_set | ( | Render * | re, |
Object * | ob, | ||
int | timeoffset, | ||
int | level, | ||
int | enable | ||
) | [static] |
Definition at line 4767 of file convertblender.c.
References CD_MASK_BAREMESH, CD_MASK_MCOL, CD_MASK_MTFACE, Object::dup_group, ELEM, eParticleSystemFlag_psys_updated, ListBase::first, ParticleSystemModifierData::flag, Group::gobject, MAX_DUPLI_RECUR, mesh_create_derived_render(), GroupObject::next, ParticleSystem::next, NULL, GroupObject::ob, OB_DUPLIPARTS, ParticleSystem::part, PART_DRAW_GR, PART_DRAW_OB, Object::particlesystem, psys_get_modifier(), psys_render_restore(), psys_render_set(), DerivedMesh::release, ParticleSettings::ren_as, Render::scene, Object::transflag, Render::viewmat, Render::winmat, Render::winx, and Render::winy.
Referenced by database_init_objects().
Definition at line 4293 of file convertblender.c.
References RenderData::bake_quad_split, StrandBuffer::bound, StrandBound::boundbox, ObjectRen::boundbox, check_non_flat_quads(), VertRen::co, copy_v3_v3(), do_displacement(), DO_MINMAX, StrandBuffer::flag, Render::flag, INIT_MINMAX, StrandBuffer::ma, max, MAX2, StrandBuffer::maxwidth, min, RenderData::mode, NULL, ObjectRen::ob, OB_MESH, Render::r, R_BAKING, R_RAYTRACE, R_SHADOW, R_SIMPLE_NO_TRIANGULATE, R_SIMPLIFY, R_STRAND_B_UNITS, RE_findOrAddStrand(), set_fullsample_trace_flag(), set_phong_threshold(), RenderData::simplify_flag, Object::smoothresh, split_quads(), StrandBound::start, Material::strand_end, strand_minmax(), Material::strand_sta, ObjectRen::strandbuf, test_for_displace(), StrandBuffer::totbound, ObjectRen::tothalo, ObjectRen::totstrand, ObjectRen::totvert, ObjectRen::totvlak, Object::type, VertTableNode::vert, and ObjectRen::vertnodes.
Referenced by init_render_object_data().
Definition at line 4378 of file convertblender.c.
References copy_m3_m4(), copy_m4_m4(), Render::instancetable, invert_m3_m3(), invert_m4_m4(), ListBase::last, ObjectInstanceRen::mat, mult_m4_m4m4(), ObjectInstanceRen::nmat, ObjectRen::ob, ObjectInstanceRen::ob, ObjectRen::obmat, ObjectInstanceRen::obr, ObjectInstanceRen::prev, ObjectRen::psysindex, ObjectInstanceRen::psysindex, Render::tothalo, ObjectRen::tothalo, ObjectRen::totstrand, Render::totstrand, Render::totvert, ObjectRen::totvert, ObjectRen::totvlak, Render::totvlak, transpose_m3(), and Render::viewmat.
Referenced by add_render_object(), and database_init_objects().
Definition at line 4439 of file convertblender.c.
References ListBase::first, ObjectRen::flag, ObjectRen::next, NULL, ObjectRen::ob, OB_RENDER_DUPLI, Render::objecttable, ObjectRen::psysindex, R_INSTANCEABLE, and Object::transflag.
Referenced by database_init_objects().
Definition at line 959 of file convertblender.c.
References ListBase::first, Render::flag, Material::flag, GS, bNode::id, ID_MA, MA_IS_USED, MA_TRANSP, MA_ZTRANSP, Material::mode, ID::name, bNode::next, NODE_GROUP, bNodeTree::nodes, R_ZTRA, and bNode::type.
Referenced by give_render_material().
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] |
Definition at line 5560 of file convertblender.c.
References BLI_freelistN(), ListBase::first, MEM_freeN(), ObjectInstanceRen::next, and ObjectInstanceRen::vectors.
Referenced by RE_Database_FromScene_Vectors().
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().
Definition at line 898 of file convertblender.c.
References BLI_ghash_insert(), BLI_ghash_lookup(), BLI_ghash_new(), BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), ELEM, make_orco_curve(), make_orco_surf(), OB_CURVE, OB_FONT, OB_SURF, Render::orco_hash, Render::scene, and Object::type.
Referenced by init_render_curve(), init_render_mball(), and init_render_surf().
static void get_particle_uvco_mcol | ( | short | from, |
DerivedMesh * | dm, | ||
float * | fuv, | ||
int | num, | ||
ParticleStrandData * | sd | ||
) | [static] |
Definition at line 1513 of file convertblender.c.
References CD_MCOL, CD_MFACE, CD_MTFACE, CustomData_get_layer_n(), DMCACHE_NOTFOUND, ELEM, DerivedMesh::faceData, DerivedMesh::getFaceData, i, ParticleStrandData::mcol, PART_FROM_FACE, PART_FROM_VOLUME, psys_interpolate_mcol(), psys_interpolate_uvs(), ParticleStrandData::totcol, ParticleStrandData::totuv, ParticleStrandData::uvco, and MFace::v4.
Referenced by render_new_particle_system().
static int get_vector_renderlayers | ( | Scene * | sce | ) | [static] |
Definition at line 4808 of file convertblender.c.
References ListBase::first, SceneRenderLayer::lay, RenderData::layers, SceneRenderLayer::next, SceneRenderLayer::passflag, Scene::r, and SCE_PASS_VECTOR.
Referenced by database_init_objects(), and RE_Database_FromScene_Vectors().
static void GetNormal | ( | const SMikkTSpaceContext * | pContext, |
float | fNorm[], | ||
const int | face_num, | ||
const int | vert_index | ||
) | [static] |
Definition at line 571 of file convertblender.c.
References copy_v3_v3(), SMikkTSpaceContext::m_pUserData, SRenderMeshToTangent::obr, and RE_findOrAddVlak().
Referenced by calc_vertexnormals().
static int GetNumFaces | ( | const SMikkTSpaceContext * | pContext | ) | [static] |
Definition at line 529 of file convertblender.c.
References SMikkTSpaceContext::m_pUserData, SRenderMeshToTangent::obr, and ObjectRen::totvlak.
Referenced by calc_vertexnormals().
static int GetNumVertsOfFace | ( | const SMikkTSpaceContext * | pContext, |
const int | face_num | ||
) | [static] |
Definition at line 535 of file convertblender.c.
References SMikkTSpaceContext::m_pUserData, NULL, SRenderMeshToTangent::obr, RE_findOrAddVlak(), and VlakRen::v4.
Referenced by calc_vertexnormals().
static void GetPosition | ( | const SMikkTSpaceContext * | pContext, |
float | fPos[], | ||
const int | face_num, | ||
const int | vert_index | ||
) | [static] |
Definition at line 542 of file convertblender.c.
References co, copy_v3_v3(), SMikkTSpaceContext::m_pUserData, SRenderMeshToTangent::obr, and RE_findOrAddVlak().
Referenced by calc_vertexnormals().
static void GetTextureCoordinate | ( | const SMikkTSpaceContext * | pContext, |
float | fUV[], | ||
const int | face_num, | ||
const int | vert_index | ||
) | [static] |
Definition at line 551 of file convertblender.c.
References ObjectRen::actmtface, SMikkTSpaceContext::m_pUserData, map_to_sphere(), NULL, SRenderMeshToTangent::obr, RE_findOrAddVlak(), RE_vlakren_get_tface(), and MTFace::uv.
Referenced by calc_vertexnormals().
Definition at line 979 of file convertblender.c.
References check_material_mapto(), defmaterial, Render::flag, Material::flag, flag_render_node_material(), give_current_material(), MA_IS_USED, MA_SHADBUF, MA_TRANSP, MA_TYPE_VOLUME, MA_ZTRANSP, Material::material_type, RenderData::mode, Material::mode, NEED_UV, Material::nodetree, NULL, Render::r, R_SPEED, R_ZTRA, Material::texco, and Material::use_nodes.
Referenced by add_render_object(), init_render_curve(), init_render_dm(), init_render_mball(), init_render_mesh(), init_render_surf(), render_new_particle_system(), and test_for_displace().
static void init_camera_inside_volumes | ( | Render * | re | ) | [static] |
Definition at line 3203 of file convertblender.c.
References BLI_addtail(), co, ListBase::first, Render::instancetable, VolumeOb::ma, MatInside::ma, MEM_mallocN(), VolumeOb::next, ObjectInstanceRen::next, MatInside::obi, VolumeOb::obr, ObjectInstanceRen::obr, point_inside_volume_objectinstance(), Render::render_volumes_inside, and Render::volumes.
Referenced by RE_Database_FromScene().
Definition at line 2858 of file convertblender.c.
References MCol::a, add_v3_v3(), area_tri_v3(), MCol::b, DispList::bevelSplitFlag, VertRen::co, DispList::col, copy_v3_v3(), Object::data, data, DL_CYCL_U, DL_CYCL_V, DL_INDEX3, DL_SURF, dl_surf_to_renderdata(), VlakRen::ec, ListBase::first, DispList::flag, VlakRen::flag, freedisplist(), get_object_orco(), give_render_material(), Object::imat, DispList::index, init_render_dm(), invert_m4_m4(), makeDispListCurveTypes_forRender(), makeOrcoDispList(), VlakRen::mat, ME_V1V2, ME_V2V3, ME_V3V4, MEM_callocN(), MEM_freeN(), mul_m4_v3(), mult_m4_m4m4(), VertRen::n, VlakRen::n, DispList::next, normal_quad_v3(), normal_tri_v3(), normalize_v3(), DispList::nr, NULL, Curve::nurb, ObjectRen::ob, OB_CURVE, OB_FONT, Object::obmat, VertRen::orco, DispList::parts, RE_findOrAddVert(), RE_findOrAddVlak(), DerivedMesh::release, DispList::rt, Render::scene, set_object_orco(), split_v_renderfaces(), Curve::str, surfindex_displist(), TEXCO_ORCO, Object::totcol, ObjectRen::totvert, ObjectRen::totvlak, DispList::type, Object::type, VlakRen::v1, VlakRen::v2, VlakRen::v3, VlakRen::v4, DispList::verts, Render::viewmat, and zero_v3().
Referenced by init_render_object_data().
static void init_render_dm | ( | DerivedMesh * | dm, |
Render * | re, | ||
ObjectRen * | obr, | ||
int | timeoffset, | ||
float * | orco, | ||
float | mat[4][4] | ||
) | [static] |
Definition at line 2692 of file convertblender.c.
References MCol::a, calc_vertexnormals(), CD_MCOL, CD_MTFACE, MVert::co, VertRen::co, copy_v3_v3(), CustomDataLayer::data, VlakRen::ec, DerivedMesh::faceData, MFace::flag, VlakRen::flag, DerivedMesh::getFaceArray, DerivedMesh::getNumFaces, DerivedMesh::getNumVerts, DerivedMesh::getVertArray, give_render_material(), CustomData::layers, len(), VlakRen::mat, MFace::mat_nr, MAX_MCOL, MAX_MTFACE, ME_SMOOTH, mul_m4_v3(), VlakRen::n, CustomDataLayer::name, normal_quad_v3(), normal_tri_v3(), NULL, ObjectRen::ob, VertRen::orco, RE_findOrAddVert(), RE_findOrAddVlak(), RE_set_customdata_names(), RE_vlakren_get_mcol(), RE_vlakren_get_tface(), Object::totcol, CustomData::totlayer, ObjectRen::totvert, ObjectRen::totvlak, CustomDataLayer::type, MFace::v1, VlakRen::v1, MFace::v2, VlakRen::v2, MFace::v3, VlakRen::v3, MFace::v4, and VlakRen::v4.
Referenced by init_render_curve(), and init_render_surf().
Definition at line 2425 of file convertblender.c.
References MCol::a, VertRen::co, copy_m3_m4(), copy_v3_v3(), data, VlakRen::ec, find_basis_mball(), ListBase::first, VlakRen::flag, freedisplist(), get_object_orco(), give_render_material(), Object::imat, VlakRen::index, DispList::index, invert_m4_m4(), make_orco_mball(), makeDispListMBall_forRender(), VlakRen::mat, ME_SMOOTH, mul_m4_v3(), mult_m4_m4m4(), VertRen::n, VlakRen::n, normal_tri_v3(), normalize_v3(), DispList::nors, DispList::nr, NULL, ObjectRen::ob, OB_NEG_SCALE, Object::obmat, VertRen::orco, DispList::parts, RE_findOrAddVert(), RE_findOrAddVlak(), Render::scene, set_object_orco(), Material::texco, TEXCO_ORCO, ObjectRen::totvert, ObjectRen::totvlak, Object::transflag, VlakRen::v1, VlakRen::v2, VlakRen::v3, VlakRen::v4, DispList::verts, and Render::viewmat.
Referenced by init_render_object_data().
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] |
Definition at line 4613 of file convertblender.c.
References add_render_lamp(), add_render_object(), Object::flag, Render::i, Object::imat, invert_m4_m4(), mult_m4_m4m4(), OB_DONE, OB_LAMP, Object::obmat, PIL_check_seconds_timer(), render_object_type(), Render::sdh, Render::stats_draw, RenderStats::totface, RenderStats::tothalo, Render::tothalo, RenderStats::totlamp, Render::totlamp, RenderStats::totstrand, Render::totstrand, RenderStats::totvert, Render::totvert, Render::totvlak, Object::type, and Render::viewmat.
Referenced by add_group_render_dupli_obs(), and database_init_objects().
Definition at line 4499 of file convertblender.c.
References CD_MASK_BAREMESH, CD_MASK_MCOL, CD_MASK_MTFACE, ELEM, finalize_render_object(), ListBase::first, ObjectRen::flag, i, init_render_curve(), init_render_mball(), init_render_mesh(), init_render_surf(), mesh_create_derived_render(), ParticleSystem::next, ObjectRen::ob, OB_CURVE, OB_FONT, OB_MBALL, OB_MESH, OB_SURF, Object::particlesystem, ObjectRen::prev, ObjectRen::psysindex, R_INSTANCEABLE, DerivedMesh::release, render_new_particle_system(), Render::scene, Render::tothalo, ObjectRen::tothalo, ObjectRen::totstrand, Render::totstrand, Render::totvert, ObjectRen::totvert, ObjectRen::totvlak, Render::totvlak, and Object::type.
Referenced by add_render_object().
Definition at line 2796 of file convertblender.c.
References MCol::a, Object::data, DL_SURF, dl_surf_to_renderdata(), ListBase::first, freedisplist(), get_object_orco(), give_render_material(), Object::imat, init_render_dm(), invert_m4_m4(), makeDispListSurf(), makeOrcoDispList(), MEM_callocN(), MEM_freeN(), mult_m4_m4m4(), DispList::next, NULL, Curve::nurb, ObjectRen::ob, OB_LATTICE, Object::obmat, Object::parent, DerivedMesh::release, Render::scene, set_object_orco(), TEXCO_ORCO, Object::totcol, DispList::type, Object::type, and Render::viewmat.
Referenced by init_render_object_data().
void init_render_world | ( | Render * | re | ) |
Definition at line 4001 of file convertblender.c.
References World::ao_gather_method, World::aosamp, Render::clipend, Render::clipsta, copy_m3_m4(), copy_v3_v3(), World::exp, World::fastcol, Render::grvec, World::horb, World::horg, World::horr, Render::imat, World::linfac, logf, World::logfac, MAX_MTEX, World::misi, World::mistdist, World::miststa, World::mode, RenderData::mode, World::mtex, normalize_v3(), Render::osa, powf, Render::r, R_RAYTRACE, World::range, Render::scene, World::skytype, MTex::tex, Render::viewinv, Render::viewmat, WO_AMB_OCC, WO_AOGATHER_RAYTRACE, WO_ENV_LIGHT, WO_INDIRECT_LIGHT, WO_SKYTEX, Scene::world, and Render::wrld.
Referenced by RE_Database_Baking(), RE_Database_FromScene(), and render_envmap().
Definition at line 3578 of file convertblender.c.
References LampRen::bias, ShadBuf::bias, LampRen::bufsize, LampRen::buftype, ShadBuf::clipend, LampRen::clipend, LampRen::clipsta, LampRen::co, ShadBuf::co, ShadBuf::compressthresh, LampRen::compressthresh, ShadBuf::d, ELEM, invert_m4_m4(), LA_SHADBUF_DEEP, LA_SHADBUF_HALFWAY, MEM_callocN(), mult_m4_m4m4(), normalize_m4(), NULL, Render::r, LampRen::samp, ShadBuf::samp, ShadBuf::shadhalostep, LampRen::shadhalostep, LampRen::shb, RenderData::size, ShadBuf::size, ShadBuf::soft, LampRen::soft, VECCOPY, Render::viewmat, ShadBuf::viewmat, and ShadBuf::winmat.
Referenced by add_render_lamp().
Definition at line 133 of file convertblender.c.
References HaloRen::co, copy_v3_v3(), HaloRen::hasize, projectverto(), RE_findOrAddHalo(), ObjectRen::tothalo, Render::winmat, and HaloRen::zd.
Referenced by RE_make_stars().
static int load_fluidsimspeedvectors | ( | Render * | re, |
ObjectInstanceRen * | obi, | ||
float * | vectors, | ||
int | step | ||
) | [static] |
Definition at line 5417 of file convertblender.c.
References VertRen::co, copy_m4_m4(), div, eModifierType_Fluidsim, ObjectInstanceRen::flag, FluidsimModifierData::fss, invert_m4_m4(), len(), ObjectInstanceRen::mat, FluidsimSettings::meshVelocities, modifiers_findByType(), mult_m4_m4m4(), NULL, ObjectRen::ob, ObjectInstanceRen::obr, projectvert(), R_TRANSFORMED, RE_vertren_get_winspeed(), sqrt(), sqrtf, FluidsimSettings::totvert, ObjectRen::totvert, FluidVertexVelocity::vel, VertTableNode::vert, ObjectRen::vertnodes, Render::viewmat, Render::winmat, Render::winx, and Render::winy.
Referenced by RE_Database_FromScene_Vectors().
static struct edgesort* make_mesh_edge_lookup | ( | DerivedMesh * | dm, |
int * | totedgesort | ||
) | [static, read] |
Definition at line 3104 of file convertblender.c.
References CD_MCOL, CD_MTFACE, DerivedMesh::getFaceArray, DerivedMesh::getFaceDataArray, DerivedMesh::getNumFaces, MEM_callocN(), NULL, to_edgesort(), MFace::v1, MFace::v2, MFace::v3, MFace::v4, and vergedgesort().
Referenced by init_render_mesh().
static void make_render_halos | ( | Render * | re, |
ObjectRen * | obr, | ||
Mesh * | UNUSEDme, | ||
int | totvert, | ||
MVert * | mvert, | ||
Material * | ma, | ||
float * | orco | ||
) | [static] |
Definition at line 2125 of file convertblender.c.
References MCol::a, MVert::co, copy_m3_m4(), copy_v3_v3(), Render::flag, Material::hasize, Object::imat, Object::lay, HaloRen::lay, MA_HALOPUNO, Material::mode, mul_m4_v3(), mult_m4_m4m4(), MVert::no, normalize_v3(), NULL, ObjectRen::ob, Object::obmat, R_HALO, RE_inithalo(), Material::seed1, and Render::viewmat.
Referenced by init_render_mesh().
static void particle_billboard | ( | Render * | re, |
ObjectRen * | obr, | ||
Material * | ma, | ||
ParticleBillboardData * | bb | ||
) | [static] |
Definition at line 1337 of file convertblender.c.
References add_v3_v3(), add_v3_v3v3(), ParticleBillboardData::align, ParticleBillboardData::anim, VertRen::co, copy_v3_v3(), dot_v3v3(), VlakRen::ec, ELEM, FLT_EPSILON10, ParticleBillboardData::lifetime, ParticleBillboardData::lock, M_PI, VlakRen::mat, ME_V2V3, mul_m4_v3(), VertRen::n, VlakRen::n, normal_quad_v3(), normalize_v3(), NULL, ParticleBillboardData::num, PART_BB_ANIM_AGE, PART_BB_ANIM_ANGLE, PART_BB_ANIM_FRAME, PART_BB_OFF_LINEAR, PART_BB_OFF_RANDOM, PART_BB_VIEW, psys_make_billboard(), ParticleBillboardData::random, RE_findOrAddVert(), RE_findOrAddVlak(), RE_vlakren_get_tface(), saacos(), ParticleBillboardData::split_offset, sub_v3_v3(), sub_v3_v3v3(), ParticleBillboardData::tilt, ParticleBillboardData::time, ParticleBillboardData::totnum, ObjectRen::totvert, ObjectRen::totvlak, MTFace::uv, ParticleBillboardData::uv, ParticleBillboardData::uv_split, VlakRen::v1, VlakRen::v2, VlakRen::v3, VlakRen::v4, and Render::viewmat.
Referenced by particle_normal_ren().
static void particle_curve | ( | Render * | re, |
ObjectRen * | obr, | ||
DerivedMesh * | dm, | ||
Material * | ma, | ||
ParticleStrandData * | sd, | ||
float * | loc, | ||
float * | loc1, | ||
int | seed, | ||
float * | pa_co | ||
) | [static] |
Definition at line 1324 of file convertblender.c.
References ParticleStrandData::first, Object::lay, HaloRen::lay, ParticleStrandData::line, MA_TYPE_HALO, MA_TYPE_WIRE, Material::material_type, ObjectRen::ob, ParticleStrandData::orco, RE_inithalo_particle(), ParticleStrandData::size, static_particle_strand(), static_particle_wire(), and ParticleStrandData::uvco.
Referenced by particle_normal_ren(), and render_new_particle_system().
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] |
Definition at line 1463 of file convertblender.c.
References ParticleKey::co, copy_v3_v3(), ParticleSettings::draw, ParticleSettings::draw_line, Object::lay, HaloRen::lay, len_v3(), ParticleStrandData::line, madd_v3_v3v3fl(), mul_m4_v3(), mul_mat3_m4_v3(), mul_v3_fl(), normalize_v3(), NULL, ObjectRen::ob, ParticleStrandData::orco, PART_DRAW_BB, PART_DRAW_LINE, PART_DRAW_VEL_LENGTH, particle_billboard(), particle_curve(), RE_inithalo_particle(), ParticleStrandData::size, ParticleStrandData::time, ParticleStrandData::uvco, ParticleBillboardData::vec, ParticleKey::vel, ParticleBillboardData::vel, and Render::viewmat.
Referenced by render_new_particle_system().
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 | ||
) |
Definition at line 5703 of file convertblender.c.
References World::ambr, World::ao_gather_method, World::ao_samp_method, RenderData::bake_normal_space, BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, copy_m3_m4(), copy_v3_v3(), database_init_objects(), ELEM3, ELEM4, Render::excludeob, ListBase::first, Render::flag, Render::imat, init_ao_sphere(), 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_occ_tree(), make_pointdensities(), make_voxeldata(), makeraytree(), Render::memArena, World::mode, RenderData::mode, normalize_m4(), NULL, Object::obmat, Scene::r, Render::r, R_BAKE_SPACE_TANGENT, R_BAKE_TRACE, R_BAKING, R_NEED_TANGENT, R_RAYTRACE, R_SHADOW, RE_BAKE_ALL, RE_BAKE_AO, RE_BAKE_DISPLACEMENT, RE_BAKE_LIGHT, RE_BAKE_NORMALS, RE_BAKE_SHADOW, RE_BAKE_TEXTURE, RE_GetCamera(), RE_init_threadcount(), RE_SetView(), Render::scene, set_material_lightgroups(), set_node_shader_lamp_loop(), shade_material_loop(), Render::tbh, Render::test_break, threaded_makeshadowbufs(), Render::tothalo, Render::totlamp, Render::totstrand, Render::totvert, Render::totvlak, unit_m4(), Render::viewinv, Render::winmat, Render::winx, Render::winy, WO_AMB_OCC, WO_AOGATHER_APPROX, WO_AOSAMP_CONSTANT, WO_ENV_LIGHT, WO_INDIRECT_LIGHT, and Render::wrld.
Referenced by bake_image_exec(), and bake_startjob().
void RE_Database_Free | ( | Render * | re | ) |
Definition at line 4643 of file convertblender.c.
References World::aosphere, World::aotables, Render::bakebuf, BKE_image_free_all_textures(), BKE_image_print_memlist(), BLI_freelistN(), BLI_memarena_free(), RenderStats::convertdone, LampRen::curfalloff, curvemapping_free(), end_render_materials(), end_render_textures(), ListBase::first, free_camera_inside_volumes(), free_mesh_orco_hash(), free_occ(), free_pointdensities(), free_render_qmcsampler(), free_renderdata_tables(), free_sss(), free_strand_surface(), free_volume_precache(), freeraytree(), freeshadowbuf(), G, G_DEBUG, Render::i, LampRen::jitter, Render::lampren, Render::lights, Render::main, MEM_freeN(), MEM_printmemlist_stats(), Render::memArena, RenderData::mode, LampRen::next, NULL, Scene::r, Render::r, R_FREE_IMAGE, R_PREVIEWBUTS, R_RAYTRACE, RenderData::scemode, Render::scene, LampRen::shadsamp, LampRen::sunsky, Render::tothalo, Render::totlamp, Render::totstrand, Render::totvert, Render::totvlak, Scene::world, and Render::wrld.
Referenced by do_render_3d(), finish_bake_internal(), RE_Database_FromScene(), and RE_Database_FromScene_Vectors().
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().
Definition at line 5570 of file convertblender.c.
References calculate_speedvectors(), copy_dbase_object_vectors(), database_fromscene_vectors(), eModifierType_Fluidsim, ListBase::first, free_dbase_object_vectors(), FluidsimModifierData::fss, get_vector_renderlayers(), Render::i, Object::id, ObjectInstanceRen::index, RenderStats::infostr, Render::instancetable, ObjectInstanceRen::lay, load_fluidsimspeedvectors(), MEM_freeN(), RenderData::mode, modifiers_findByType(), ID::name, StrandSurface::next, ObjectInstanceRen::next, StrandSurface::nextco, NULL, ObjectInstanceRen::ob, OB_FLUIDSIM_DOMAIN, ObjectInstanceRen::obr, ObjectInstanceRen::par, StrandSurface::prevco, ObjectInstanceRen::psysindex, Render::r, R_SPEED, RE_Database_Free(), RE_Database_FromScene(), Render::scene, Render::sdh, speedvector_project(), Render::stats_draw, step(), Render::strandsurface, table, Render::tbh, Render::test_break, ObjectInstanceRen::totvector, ObjectRen::totvert, FluidsimSettings::type, and ObjectInstanceRen::vectors.
Referenced by do_render_3d().
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 | ||
) |
Definition at line 157 of file convertblender.c.
References HaloRen::add, HaloRen::alfa, HaloRen::b, BLI_drand(), BLI_srand(), Scene::camera, Camera::clipend, Object::data, Render::flag, HaloRen::g, HA_ONLYSKY, HaloRen::hard, hash, initstar(), invert_m4_m4(), HaloRen::lay, mul_m4_v3(), NULL, OB_CAMERA, HaloRen::r, R_HALO, RE_addRenderObject(), RE_GetCamera(), Render::scene, sqrt(), World::starcolnoise, World::stardist, World::starmindist, World::starsize, Render::tbh, Render::test_break, Render::tothalo, ObjectRen::tothalo, Object::type, HaloRen::type, tz, unit_m4(), Render::viewmat, Scene::world, and Render::wrld.
Referenced by RE_Database_FromScene(), and view3d_main_area_draw_objects().
Definition at line 5820 of file convertblender.c.
References Scene::camera, CD_CALLOC, CD_MSTICKY, MVert::co, copy_v3_v3(), CustomData_add_layer(), CustomData_free_layer_active(), Object::data, FIRSTBASE, invert_m4_m4(), Mesh::msticky, mul_m4_v3(), mult_m4_m4m4(), Mesh::mvert, Base::next, normalize_m4(), NULL, OB_MESH, Scene::obedit, Base::object, Object::obmat, projectverto(), Scene::r, RE_InitState(), RE_NewRender(), RE_SetCamera(), RE_SetView(), TESTBASELIB, Mesh::totvert, Object::type, V3D_CAMERA_LOCAL, Render::viewmat, where_is_object(), Render::winmat, RenderData::xsch, and RenderData::ysch.
Referenced by sticky_add_exec().
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] |
Definition at line 4457 of file convertblender.c.
References BLI_memarena_alloc(), ObjectInstanceRen::duplitexmat, give_matarar(), give_totcolp(), invert_m4_m4(), DupliObject::mat, Render::memArena, mul_serie_m4(), NULL, DupliObject::ob, DupliObject::omat, TEXCO_OBJECT, Render::viewinv, and Render::viewmat.
Referenced by add_render_object(), and database_init_objects().
Definition at line 4101 of file convertblender.c.
References VlakRen::flag, Material::gloss_mir, Material::gloss_tra, MA_FULL_OSA, MA_RAYMIRROR, MA_RAYTRANSP, MA_SHLESS, MA_TRACEBLE, MA_TRANSP, MA_TYPE_VOLUME, VlakRen::mat, Material::material_type, RenderData::mode, Material::mode, Render::osa, Render::r, R_FULL_OSA, R_RAYTRACE, R_TRACEBLE, RE_findOrAddVlak(), ObjectRen::totvlak, and trace.
Referenced by finalize_render_object().
static void set_material_lightgroups | ( | Render * | re | ) | [static] |
Definition at line 3967 of file convertblender.c.
References add_lightgroup(), ListBase::first, ID::flag, Main::group, Material::group, Group::id, Material::id, LIB_DOIT, MA_GROUP_NOLAY, Render::main, Main::mat, Material::mode, ID::next, Scene::r, R_PREVIEWBUTS, RenderData::scemode, and Render::scene.
Referenced by RE_Database_Baking(), and RE_Database_FromScene().
static void set_object_orco | ( | Render * | re, |
void * | ob, | ||
float * | orco | ||
) | [static] |
Definition at line 921 of file convertblender.c.
References BLI_ghash_insert(), BLI_ghash_new(), BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), and Render::orco_hash.
Referenced by init_render_curve(), init_render_mball(), init_render_mesh(), init_render_surf(), and render_new_particle_system().
static void set_phong_threshold | ( | ObjectRen * | obr | ) | [static] |
Definition at line 4052 of file convertblender.c.
References ABS, cosf, dot(), dot_v3v3(), VlakRen::flag, i, M_PI, VertRen::n, VlakRen::n, ObjectRen::ob, R_SMOOTH, RE_findOrAddVlak(), saacos(), Object::smoothresh, thresh, ObjectRen::totvlak, VlakRen::v1, VlakRen::v2, VlakRen::v3, and VlakRen::v4.
Referenced by finalize_render_object().
Definition at line 3987 of file convertblender.c.
References add_lightgroup(), ListBase::first, RenderData::layers, SceneRenderLayer::light_override, SceneRenderLayer::next, and Scene::r.
Referenced by RE_Database_FromScene().
static void SetTSpace | ( | const SMikkTSpaceContext * | pContext, |
const float | fvTangent[], | ||
const float | fSign, | ||
const int | face_num, | ||
const int | iVert | ||
) | [static] |
Definition at line 579 of file convertblender.c.
References copy_v3_v3(), SMikkTSpaceContext::m_pUserData, NULL, SRenderMeshToTangent::obr, RE_findOrAddVlak(), and RE_vlakren_get_nmap_tangent().
Referenced by calc_vertexnormals().
static void sort_halos | ( | Render * | re, |
int | totsort | ||
) | [static] |
Definition at line 2185 of file convertblender.c.
References MCol::a, ObjectRen::bloha, ListBase::first, MEM_callocN(), ObjectRen::next, NULL, Render::objecttable, Render::sortedhalos, Render::tothalo, ObjectRen::tothalo, and verghalo().
Referenced by RE_Database_FromScene().
static void speedvector_project | ( | Render * | re, |
float | zco[2], | ||
const float | co[3], | ||
const float | ho[4] | ||
) | [static] |
Definition at line 5229 of file convertblender.c.
References KDL::atan(), Render::clipsta, copy_v3_v3(), div, M_PI, RenderData::mode, Render::r, R_PANORAMA, saacos(), sqrtf, Render::viewplane, Render::winx, Render::winy, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by calculate_speedvector(), calculate_strandsurface_speedvectors(), copy_dbase_object_vectors(), and RE_Database_FromScene_Vectors().
static void split_quads | ( | ObjectRen * | obr, |
int | dir | ||
) | [static] |
Definition at line 4137 of file convertblender.c.
References VertRen::co, VlakRen::flag, MA_TYPE_WIRE, VlakRen::mat, Material::material_type, VlakRen::n, normal_tri_v3(), NULL, R_DIVIDE_24, R_FACE_SPLIT, R_STRAND, RE_findOrAddVlak(), RE_vlakren_copy(), ObjectRen::totvlak, VlakRen::v1, VlakRen::v2, VlakRen::v3, and VlakRen::v4.
Referenced by finalize_render_object().
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] |
Definition at line 1021 of file convertblender.c.
References VertRen::accum, ParticleStrandData::adapt, ParticleStrandData::adapt_angle, ParticleStrandData::adapt_pix, add_v3_v3(), VertRen::co, copy_v3_v3(), cross(), cross_v3_v3v3(), dot_v3v3(), VlakRen::ec, ParticleStrandData::first, VlakRen::flag, i, len_v3(), ParticleStrandData::line, MA_STR_B_UNITS, MA_TANGENT_STR, VlakRen::mat, ParticleStrandData::mcol, ME_V2V3, Material::mode, mul_v3_fl(), VertRen::n, VlakRen::n, normal_quad_v3(), normalize_v3(), NULL, VertRen::orco, ParticleStrandData::orco, ParticleStrandData::override_uv, pow(), project_v3_v3v3(), R_SMOOTH, R_STRAND, R_TANGENT, RE_findOrAddVert(), RE_findOrAddVlak(), RE_vlakren_get_mcol(), RE_vlakren_get_surfnor(), RE_vlakren_get_tface(), sqrt(), Material::strand_ease, Material::strand_end, Material::strand_min, Material::strand_sta, sub_v3_v3v3(), ParticleStrandData::surfnor, ParticleStrandData::time, ParticleStrandData::totcol, ParticleStrandData::totuv, ObjectRen::totvert, ObjectRen::totvlak, MTFace::uv, ParticleStrandData::uvco, VlakRen::v1, VlakRen::v2, VlakRen::v3, VlakRen::v4, simple_enum_gen::w, Render::winmat, Render::winx, and Render::winy.
Referenced by particle_curve().
static void static_particle_wire | ( | ObjectRen * | obr, |
Material * | ma, | ||
const float | vec[3], | ||
const float | vec1[3], | ||
int | first, | ||
int | line | ||
) | [static] |
Definition at line 1276 of file convertblender.c.
References VertRen::co, copy_v3_v3(), VlakRen::ec, VlakRen::mat, ME_V1V2, VertRen::n, VlakRen::n, normalize_v3(), NULL, RE_findOrAddVert(), RE_findOrAddVlak(), sub_v3_v3v3(), ObjectRen::totvert, ObjectRen::totvlak, VlakRen::v1, VlakRen::v2, VlakRen::v3, and VlakRen::v4.
Referenced by particle_curve().
Definition at line 2212 of file convertblender.c.
References give_render_material(), i, MAP_DISPLACE, Material::mapto, and Object::totcol.
Referenced by finalize_render_object(), and init_render_mesh().
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] |
Definition at line 3148 of file convertblender.c.
References CD_MCOL, CD_MTFACE, CustomDataLayer::data, edgesort::f, DerivedMesh::faceData, edgesort::i1, edgesort::i2, CustomData::layers, MAX_MCOL, MAX_MTFACE, CustomDataLayer::name, RE_vlakren_get_mcol(), RE_vlakren_get_tface(), CustomData::totlayer, CustomDataLayer::type, MTFace::uv, MEdge::v1, edgesort::v1, MEdge::v2, edgesort::v2, and vergedgesort().
Referenced by init_render_mesh().
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().