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/editors/mesh | |
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/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 35cb9f02b64..d1c6ff4c4ae 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -772,24 +772,3 @@ void ED_mesh_calc_normals(Mesh *me) { mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL); } - -/* always adds the material even if its linked alredy - * for pradictable material indicies */ -void ED_mesh_material_link(Mesh *me, Material *ma) -{ - int totcol = me->totcol + 1; - Material **mat; - - mat= MEM_callocN(sizeof(void*)*totcol, "newmatar"); - - if(me->totcol) memcpy(mat, me->mat, sizeof(void*) * me->totcol); - if(me->mat) MEM_freeN(me->mat); - - me->mat = mat; - me->mat[me->totcol++] = ma; - if(ma) - ma->id.us++; - - test_object_materials((ID*)me); -} - |