LEFT | RIGHT |
(no file at all) | |
1 /* | 1 /* |
2 * ***** BEGIN GPL LICENSE BLOCK ***** | 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
6 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
7 * of the License, or (at your option) any later version. | 7 * of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 21 matching lines...) Expand all Loading... |
32 * \ingroup bke | 32 * \ingroup bke |
33 * \brief General operations, lookup, etc. for materials. | 33 * \brief General operations, lookup, etc. for materials. |
34 */ | 34 */ |
35 #ifdef __cplusplus | 35 #ifdef __cplusplus |
36 extern "C" { | 36 extern "C" { |
37 #endif | 37 #endif |
38 | 38 |
39 struct Main; | 39 struct Main; |
40 struct Material; | 40 struct Material; |
41 struct ID; | 41 struct ID; |
| 42 struct Material; |
| 43 struct ID; |
42 struct Object; | 44 struct Object; |
43 struct Mesh; | |
44 struct MTFace; | |
45 struct Scene; | |
46 | 45 |
47 /* materials */ | 46 /* materials */ |
48 | 47 |
49 void init_def_material(void); | |
50 void BKE_material_free(struct Material *sc);· | |
51 void BKE_material_free_ex(struct Material *ma, int do_id_user); | |
52 void test_object_materials(struct Main *bmain, struct ID *id); | |
53 void BKE_material_resize_object(struct Object *ob, const short totcol, bool do_i
d_user); | |
54 void init_material(struct Material *ma); | |
55 struct Material *BKE_material_add(struct Main *bmain, const char *name); | |
56 struct Material *BKE_material_copy(struct Material *ma); | |
57 struct Material *localize_material(struct Material *ma); | |
58 struct Material *give_node_material(struct Material *ma); /* returns node materi
al or self */ | |
59 void BKE_material_make_local(struct Material *ma); | |
60 void extern_local_matarar(struct Material **matar, short totcol); | |
61 | |
62 /* UNUSED */ | |
63 // void automatname(struct Material *); | |
64 | |
65 /* material slots */ | |
66 | |
67 struct Material ***give_matarar(struct Object *ob); | |
68 short *give_totcolp(struct Object *ob); | |
69 struct Material ***give_matarar_id(struct ID *id); /* same but for ID's */ | |
70 short *give_totcolp_id(struct ID *id); | |
71 | |
72 enum { | |
73 BKE_MAT_ASSIGN_USERPREF, | |
74 BKE_MAT_ASSIGN_OBDATA, | |
75 BKE_MAT_ASSIGN_OBJECT | |
76 }; | |
77 | |
78 struct Material *give_current_material(struct Object *ob, short act); | |
79 struct ID *material_from(struct Object *ob, short act); | |
80 void assign_material_id(struct ID *id, struct Material *ma, short act); | |
81 void assign_material(struct Object *ob, struct Material *ma, short act, int assi
gn_type); | |
82 void assign_matarar(struct Object *ob, struct Material ***matar, short totcol); | |
83 | |
84 short find_material_index(struct Object *ob, struct Material *ma); | |
85 | |
86 int object_add_material_slot(struct Object *ob); | |
87 int object_remove_material_slot(struct Object *ob); | |
88 | |
89 /* rna api */ | |
90 void BKE_material_resize_id(struct ID *id, short totcol, bool do_id_user); | |
91 void BKE_material_append_id(struct ID *id, struct Material *ma); | |
92 struct Material *BKE_material_pop_id(struct ID *id, int index, bool update_data)
; /* index is an int because of RNA */ | |
93 void BKE_material_clear_id(struct ID *id, bool update_data); | |
94 /* rendering */ | |
95 | |
96 void init_render_material(struct Material *, int, float *); | |
97 void init_render_materials(struct Main *, int, float *); | |
98 void end_render_material(struct Material *); | |
99 void end_render_materials(struct Main *); | |
100 | |
101 int material_in_material(struct Material *parmat, struct Material *mat); | |
102 | |
103 void ramp_blend(int type, float r_col[3], const float fac, const float col[3]); | |
104 | |
105 /* driver update hacks */ | |
106 void material_drivers_update(struct Scene *scene, struct Material *mat, float ct
ime); | |
107 | |
108 /* copy/paste */ | |
109 void clear_matcopybuf(void); | |
110 void free_matcopybuf(void); | |
111 void copy_matcopybuf(struct Material *ma); | |
112 void paste_matcopybuf(struct Material *ma); | |
113 | |
114 /* handle backward compatibility for tface/materials called from doversion (file
load=1) or Help Menu (fileload=0) */···· | |
115 int do_version_tface(struct Main *main, int fileload); | |
116 | |
117 #ifdef __cplusplus | |
118 } | |
119 #endif | |
120 | |
121 #endif | |
LEFT | RIGHT |