diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2018-06-03 20:03:14 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2018-06-03 20:03:14 +0300 |
commit | 489d5e998ac5b537eccd3714abb550dfe888680e (patch) | |
tree | 97848a8202a70e64e584f365110a5e2812241614 /source/blender/blenkernel/intern/material.c | |
parent | 6c98748c701b4cbc7064243bbaa5ed4080e46729 (diff) |
Support material slots in Groom type objects.
Diffstat (limited to 'source/blender/blenkernel/intern/material.c')
-rw-r--r-- | source/blender/blenkernel/intern/material.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 131d79c249f..28963cd8380 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -39,6 +39,7 @@ #include "DNA_anim_types.h" #include "DNA_curve_types.h" #include "DNA_group_types.h" +#include "DNA_groom_types.h" #include "DNA_material_types.h" #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" @@ -231,6 +232,10 @@ Material ***give_matarar(Object *ob) mb = ob->data; return &(mb->mat); } + else if (ob->type == OB_GROOM) { + Groom *groom = ob->data; + return &(groom->mat); + } return NULL; } @@ -252,6 +257,10 @@ short *give_totcolp(Object *ob) mb = ob->data; return &(mb->totcol); } + else if (ob->type == OB_GROOM) { + Groom *groom = ob->data; + return &(groom->totcol); + } return NULL; } @@ -268,6 +277,8 @@ Material ***give_matarar_id(ID *id) return &(((Curve *)id)->mat); case ID_MB: return &(((MetaBall *)id)->mat); + case ID_GM: + return &(((Groom *)id)->mat); default: break; } @@ -286,6 +297,8 @@ short *give_totcolp_id(ID *id) return &(((Curve *)id)->totcol); case ID_MB: return &(((MetaBall *)id)->totcol); + case ID_GM: + return &(((Groom *)id)->totcol); default: break; } |