[Bf-blender-cvs] [8fa55d38854] hair_guides: Popup for setting hair distribution operator properties.
Lukas Tönne
noreply at git.blender.org
Sun Jan 28 16:25:51 CET 2018
Commit: 8fa55d38854e239b33da74af5f65848edfd9414b
Author: Lukas Tönne
Date: Sun Jan 28 15:25:28 2018 +0000
Branches: hair_guides
https://developer.blender.org/rB8fa55d38854e239b33da74af5f65848edfd9414b
Popup for setting hair distribution operator properties.
===================================================================
M source/blender/blenkernel/intern/groom.c
M source/blender/editors/groom/groom_hair.c
===================================================================
diff --git a/source/blender/blenkernel/intern/groom.c b/source/blender/blenkernel/intern/groom.c
index d2542fa89de..eae4724f047 100644
--- a/source/blender/blenkernel/intern/groom.c
+++ b/source/blender/blenkernel/intern/groom.c
@@ -499,6 +499,10 @@ void BKE_groom_distribute_follicles(Groom *groom, unsigned int seed, int count)
{
BLI_assert(groom->scalp_object);
DerivedMesh *scalp = object_get_derived_final(groom->scalp_object, false);
+ if (!scalp)
+ {
+ return;
+ }
BKE_hair_generate_follicles(groom->hair_system, scalp, seed, count);
}
diff --git a/source/blender/editors/groom/groom_hair.c b/source/blender/editors/groom/groom_hair.c
index 503a8b9daef..22664361639 100644
--- a/source/blender/editors/groom/groom_hair.c
+++ b/source/blender/editors/groom/groom_hair.c
@@ -97,6 +97,7 @@ void GROOM_OT_hair_distribute(wmOperatorType *ot)
ot->idname = "GROOM_OT_hair_distribute";
/* api callbacks */
+ ot->invoke = WM_operator_props_popup_confirm;
ot->exec = hair_distribute_exec;
ot->poll = groom_object_poll;
More information about the Bf-blender-cvs
mailing list