diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-09-03 11:25:37 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-09-03 11:25:37 +0400 |
commit | d0c54d3d0e77f0ed6b73ed5c3ac100ebd5e58660 (patch) | |
tree | e20fc4af058ed1a1dd48f0c8100c32988769b1a4 /source/blender/blenkernel/BKE_material.h | |
parent | 870469ec0e49f47b61fe9bda27c4b11fdd955d6b (diff) |
use set as a suffix (matches operators)
- set_frame() --> frame_set()
- set_context_pointer() --> context_pointer_set()
material adding works for curves and metaballs, new function to remove materials.
materials.link() didnt well fit how this is used elsewhere
- order matters
- it can be linked more than once.
- remove(material), isnt that useful since you need to manage indicies.
... use list style functions instead. materials.append(mat) / materials.pop(index)
Diffstat (limited to 'source/blender/blenkernel/BKE_material.h')
-rw-r--r-- | source/blender/blenkernel/BKE_material.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h index a220153523e..40d98394a8e 100644 --- a/source/blender/blenkernel/BKE_material.h +++ b/source/blender/blenkernel/BKE_material.h @@ -57,6 +57,9 @@ 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); /* same but for ID's */ +short *give_totcolp_id(struct ID *id); + struct Material *give_current_material(struct Object *ob, int act); struct ID *material_from(struct Object *ob, int act); void assign_material(struct Object *ob, struct Material *ma, int act); @@ -67,6 +70,10 @@ int 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); +/* rna api */ +void material_append_id(struct ID *id, struct Material *ma); +struct Material *material_pop_id(struct ID *id, int index); + /* rendering */ void init_render_material(struct Material *, int, float *); |