[Bf-blender-cvs] [5f41014a4c8] hair_guides: Stub displist function for groom.

Lukas Tönne noreply at git.blender.org
Tue Dec 19 13:56:02 CET 2017


Commit: 5f41014a4c857a66856676a9c3c1c12312a6a98d
Author: Lukas Tönne
Date:   Tue Dec 19 10:30:16 2017 +0000
Branches: hair_guides
https://developer.blender.org/rB5f41014a4c857a66856676a9c3c1c12312a6a98d

Stub displist function for groom.

===================================================================

M	source/blender/blenkernel/BKE_displist.h
M	source/blender/blenkernel/intern/displist.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h
index c2229976dd9..3c69a7cccc7 100644
--- a/source/blender/blenkernel/BKE_displist.h
+++ b/source/blender/blenkernel/BKE_displist.h
@@ -100,6 +100,8 @@ void BKE_displist_make_mball(
         const struct EvaluationContext *eval_ctx, struct Scene *scene, struct Object *ob);
 void BKE_displist_make_mball_forRender(
         const struct EvaluationContext *eval_ctx, struct Scene *scene, struct Object *ob, struct ListBase *dispbase);
+void BKE_displist_make_groom(
+        const struct EvaluationContext *eval_ctx, struct Scene *scene, struct Object *ob);
 
 bool BKE_displist_surfindex_get(DispList *dl, int a, int *b, int *p1, int *p2, int *p3, int *p4);
 void BKE_displist_fill(struct ListBase *dispbase, struct ListBase *to, const float normal_proj[3], const bool flipnormal);
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 15a520fe8ce..dbc26ab8ad3 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -37,6 +37,7 @@
 #include "MEM_guardedalloc.h"
 
 #include "DNA_curve_types.h"
+#include "DNA_groom_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_object_types.h"
 #include "DNA_vfont_types.h"
@@ -59,6 +60,7 @@
 #include "BKE_font.h"
 #include "BKE_lattice.h"
 #include "BKE_modifier.h"
+#include "BKE_groom.h"
 
 #include "BLI_sys_types.h" // for intptr_t support
 
@@ -756,6 +758,23 @@ void BKE_displist_make_mball_forRender(const EvaluationContext *eval_ctx, Scene
 	object_deform_mball(ob, dispbase);
 }
 
+void BKE_displist_make_groom(const EvaluationContext *eval_ctx, Scene *scene, Object *ob)
+{
+	if (!ob || ob->type != OB_GROOM)
+		return;
+
+	if (ob->curve_cache) {
+		BKE_displist_free(&(ob->curve_cache->disp));
+	}
+	else {
+		ob->curve_cache = MEM_callocN(sizeof(CurveCache), "CurveCache for Groom");
+	}
+	
+	// TODO
+	
+	boundbox_displist_object(ob);
+}
+
 static ModifierData *curve_get_tessellate_point(Scene *scene, Object *ob,
                                                 const bool use_render_resolution, const bool editmode)
 {



More information about the Bf-blender-cvs mailing list