Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2018-06-03 20:03:14 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2018-06-03 20:03:14 +0300
commit489d5e998ac5b537eccd3714abb550dfe888680e (patch)
tree97848a8202a70e64e584f365110a5e2812241614 /source/blender/blenkernel/intern/material.c
parent6c98748c701b4cbc7064243bbaa5ed4080e46729 (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.c13
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;
}