diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2018-04-15 11:30:15 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2018-04-15 11:30:15 +0300 |
commit | c0c8df3f2cf3ab03cec1f660619b0fe2290caf2a (patch) | |
tree | 7593fcdf09f54ce443a10951704810ae882c7406 /source/blender/editors/groom/groom_hair.c | |
parent | 8fa55d38854e239b33da74af5f65848edfd9414b (diff) |
Initial system for generating guide curves from groom.
Diffstat (limited to 'source/blender/editors/groom/groom_hair.c')
-rw-r--r-- | source/blender/editors/groom/groom_hair.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/groom/groom_hair.c b/source/blender/editors/groom/groom_hair.c index 22664361639..0a179a9b20e 100644 --- a/source/blender/editors/groom/groom_hair.c +++ b/source/blender/editors/groom/groom_hair.c @@ -72,7 +72,8 @@ static int hair_distribute_exec(bContext *C, wmOperator *op) { Object *ob = ED_object_context(C); Groom *groom = ob->data; - int count = RNA_int_get(op->ptr, "count"); + int hair_count = RNA_int_get(op->ptr, "hair_count"); + int guide_curve_count = RNA_int_get(op->ptr, "guide_curve_count"); unsigned int seed = (unsigned int)RNA_int_get(op->ptr, "seed"); if (!groom->scalp_object) @@ -81,7 +82,7 @@ static int hair_distribute_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } - BKE_groom_distribute_follicles(groom, seed, count); + BKE_groom_hair_distribute(groom, seed, hair_count, guide_curve_count); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob); DEG_id_tag_update(&ob->id, OB_RECALC_DATA); @@ -104,8 +105,10 @@ void GROOM_OT_hair_distribute(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - RNA_def_int(ot->srna, "count", 1000, 0, INT_MAX, - "Count", "Number of follicles to generate", 1, 1e6); + RNA_def_int(ot->srna, "hair_count", 1000, 0, INT_MAX, + "Hair Count", "Number of hairs to generate", 1, 1e6); + RNA_def_int(ot->srna, "guide_curve_count", 10, 0, INT_MAX, + "Guide Curve Count", "Number of guide curves to generate", 1, 1e4); RNA_def_int(ot->srna, "seed", 0, 0, INT_MAX, "Seed", "Seed value for randomized follicle distribution", 0, INT_MAX); } |