Blender V2.61 - r43446
Functions

BKE_material.h File Reference

General operations, lookup, etc. for materials. More...

Go to the source code of this file.

Functions

void init_def_material (void)
void free_material (struct Material *sc)
void test_object_materials (struct ID *id)
void resize_object_material (struct Object *ob, const short totcol)
void init_material (struct Material *ma)
struct Materialadd_material_main (struct Main *main, const char *name)
struct Materialadd_material (const char *name)
struct Materialcopy_material (struct Material *ma)
struct Materiallocalize_material (struct Material *ma)
struct Materialgive_node_material (struct Material *ma)
void make_local_material (struct Material *ma)
void extern_local_matarar (struct Material **matar, short totcol)
void automatname (struct Material *)
struct Material *** give_matarar (struct Object *ob)
short * give_totcolp (struct Object *ob)
struct Material *** give_matarar_id (struct ID *id)
short * give_totcolp_id (struct ID *id)
struct Materialgive_current_material (struct Object *ob, short act)
struct IDmaterial_from (struct Object *ob, short act)
void assign_material_id (struct ID *id, struct Material *ma, short act)
void assign_material (struct Object *ob, struct Material *ma, short act)
void assign_matarar (struct Object *ob, struct Material ***matar, short totcol)
short find_material_index (struct Object *ob, struct Material *ma)
int object_add_material_slot (struct Object *ob)
int object_remove_material_slot (struct Object *ob)
void material_append_id (struct ID *id, struct Material *ma)
struct Materialmaterial_pop_id (struct ID *id, int index, int remove_material_slot)
void init_render_material (struct Material *, int, float *)
void init_render_materials (struct Main *, int, float *)
void end_render_material (struct Material *)
void end_render_materials (struct Main *)
int material_in_material (struct Material *parmat, struct Material *mat)
void ramp_blend (int type, float r_col[3], const float fac, const float col[3])
void clear_matcopybuf (void)
void free_matcopybuf (void)
void copy_matcopybuf (struct Material *ma)
void paste_matcopybuf (struct Material *ma)
void clear_mat_mtex_copybuf (void)
void copy_mat_mtex_copybuf (struct ID *id)
void paste_mat_mtex_copybuf (struct ID *id)
int do_version_tface (struct Main *main, int fileload)

Detailed Description

General operations, lookup, etc. for materials.

Definition in file BKE_material.h.


Function Documentation

struct Material* add_material ( const char *  name) [read]
struct Material* add_material_main ( struct Main main,
const char *  name 
) [read]
void assign_matarar ( struct Object ob,
struct Material ***  matar,
short  totcol 
)
void assign_material ( struct Object ob,
struct Material ma,
short  act 
)
void assign_material_id ( struct ID id,
struct Material ma,
short  act 
)
void automatname ( struct Material )
void clear_mat_mtex_copybuf ( void  )
void clear_matcopybuf ( void  )

Definition at line 1402 of file material.c.

References matcopied.

Referenced by WM_init().

void copy_mat_mtex_copybuf ( struct ID id)
void copy_matcopybuf ( struct Material ma)
struct Material* copy_material ( struct Material ma) [read]
int do_version_tface ( struct Main main,
int  fileload 
)
void end_render_material ( struct Material )
void end_render_materials ( struct Main )

Definition at line 1019 of file material.c.

References end_render_material(), ListBase::first, Material::id, Main::mat, ID::next, and ID::us.

Referenced by RE_Database_Free().

void extern_local_matarar ( struct Material **  matar,
short  totcol 
)

Definition at line 443 of file material.c.

References i, and id_lib_extern().

Referenced by expand_local_mesh(), extern_local_curve(), extern_local_mball(), and extern_local_object().

short find_material_index ( struct Object ob,
struct Material ma 
)

Definition at line 856 of file material.c.

References give_matarar(), give_totcolp(), and NULL.

void free_matcopybuf ( void  )
void free_material ( struct Material sc)
struct Material* give_current_material ( struct Object ob,
short  act 
) [read]
struct Material*** give_matarar ( struct Object ob) [read]
struct Material*** give_matarar_id ( struct ID id) [read]

Definition at line 494 of file material.c.

References GS, ID_CU, ID_MB, ID_ME, ID::name, and NULL.

Referenced by assign_material_id(), material_append_id(), and material_pop_id().

struct Material* give_node_material ( struct Material ma) [read]
short* give_totcolp ( struct Object ob)
short* give_totcolp_id ( struct ID id)

Definition at line 510 of file material.c.

References GS, ID_CU, ID_MB, ID_ME, ID::name, and NULL.

Referenced by assign_material_id(), material_append_id(), material_pop_id(), and test_object_materials().

void init_def_material ( void  )

Definition at line 74 of file material.c.

References init_material().

Referenced by main().

void init_material ( struct Material ma)

Definition at line 111 of file material.c.

References Material::adapt_thresh_mir, Material::adapt_thresh_tra, Material::alpha, GameSettings::alpha_blend, Material::amb, Material::ang, Material::b, Material::darkness, VolumeSettings::density, VolumeSettings::density_scale, VolumeSettings::depth_cutoff, Material::dist_mir, VolumeSettings::emission, VolumeSettings::emission_col, GameSettings::face_orientation, Material::fadeto_mir, GameSettings::flag, Material::flareboost, Material::flarec, Material::flaresize, Material::fresnel_mir, Material::fresnel_mir_i, Material::fresnel_tra, Material::fresnel_tra_i, Material::friction, Material::g, Material::game, GEMAT_BACKCULL, Material::gloss_mir, Material::gloss_tra, Material::har, Material::hasize, Material::linec, MA_APPROX_OCCLUSION, MA_RAYBIAS, MA_RAYMIR_FADETOSKY, MA_SHADBUF, MA_SHADOW, MA_SPHERE, MA_TANGENT_STR, MA_TRACEBLE, MA_VOL_PRECACHESHADING, MA_VOL_SHADE_SHADED, MA_VOL_STEP_RANDOMIZED, MA_ZTRANSP, Material::mirb, Material::mirg, Material::mirr, Material::mode, VolumeSettings::ms_diff, VolumeSettings::ms_intensity, VolumeSettings::ms_spread, NULL, Material::param, Material::pr_lamp, Material::pr_type, VolumeSettings::precache_resolution, Material::preview, Material::r, Material::rampfac_col, Material::rampfac_spec, Material::ray_depth, Material::ray_depth_tra, Material::ref, VolumeSettings::reflection, VolumeSettings::reflection_col, Material::refrac, Material::ringc, Material::rms, Material::roughness, Material::samp_gloss_mir, Material::samp_gloss_tra, VolumeSettings::scattering, Material::seed2, Material::shad_alpha, Material::shade_flag, VolumeSettings::shade_type, VolumeSettings::shadeflag, Material::spec, Material::specb, Material::specg, Material::specr, Material::spectra, Material::sss_back, Material::sss_col, Material::sss_colfac, Material::sss_error, Material::sss_front, Material::sss_ior, Material::sss_radius, Material::sss_scale, Material::sss_texfac, Material::starc, VolumeSettings::stepsize, VolumeSettings::stepsize_type, Material::strand_end, Material::strand_sta, Material::subsize, VolumeSettings::transmission_col, Material::tx_falloff, Material::tx_limit, and Material::vol.

Referenced by add_material(), and init_def_material().

void init_render_material ( struct Material ,
int  ,
float *   
)
void init_render_materials ( struct Main ,
int  ,
float *   
)
struct Material* localize_material ( struct Material ma) [read]
void make_local_material ( struct Material ma)
void material_append_id ( struct ID id,
struct Material ma 
)
struct ID* material_from ( struct Object ob,
short  act 
) [read]

Definition at line 641 of file material.c.

References Object::data, Object::matbits, NULL, and Object::totcol.

int material_in_material ( struct Material parmat,
struct Material mat 
)

Definition at line 1044 of file material.c.

References material_in_nodetree(), Material::nodetree, and Material::use_nodes.

Referenced by zbuffer_sss().

struct Material* material_pop_id ( struct ID id,
int  index,
int  remove_material_slot 
) [read]
int object_add_material_slot ( struct Object ob)

Definition at line 876 of file material.c.

References Object::actcol, assign_material(), FALSE, MAXMAT, NULL, Object::totcol, and TRUE.

Referenced by material_slot_add_exec().

int object_remove_material_slot ( struct Object ob)
void paste_mat_mtex_copybuf ( struct ID id)
void paste_matcopybuf ( struct Material ma)
void ramp_blend ( int  type,
float  r_col[3],
const float  fac,
const float  col[3] 
)
void resize_object_material ( struct Object ob,
const short  totcol 
)
void test_object_materials ( struct ID id)