[Bf-blender-cvs] [d210d5de1ac] hair_guides_grooming: Bind/Unbind regions immediately when setting their face map.

Lukas Tönne noreply at git.blender.org
Tue May 29 09:37:44 CEST 2018


Commit: d210d5de1acf7ef1f139fe44aed31d67a1667581
Author: Lukas Tönne
Date:   Tue May 29 08:37:12 2018 +0100
Branches: hair_guides_grooming
https://developer.blender.org/rBd210d5de1acf7ef1f139fe44aed31d67a1667581

Bind/Unbind regions immediately when setting their face map.

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

M	source/blender/makesrna/intern/rna_groom.c

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

diff --git a/source/blender/makesrna/intern/rna_groom.c b/source/blender/makesrna/intern/rna_groom.c
index 0751eb4e3aa..904761ce835 100644
--- a/source/blender/makesrna/intern/rna_groom.c
+++ b/source/blender/makesrna/intern/rna_groom.c
@@ -90,11 +90,15 @@ static void rna_GroomBundle_scalp_facemap_name_set(PointerRNA *ptr, const char *
 		if (fm) {
 			/* no need for BLI_strncpy_utf8, since this matches an existing facemap */
 			BLI_strncpy(bundle->scalp_facemap_name, value, sizeof(bundle->scalp_facemap_name));
+			/* Bind to the region right away */
+			BKE_groom_bundle_bind(groom, bundle, true);
 			return;
 		}
 	}
 	
 	bundle->scalp_facemap_name[0] = '\0';
+	/* Unbind from region */
+	BKE_groom_bundle_unbind(bundle);
 }
 
 static PointerRNA rna_Groom_active_bundle_get(PointerRNA *ptr)



More information about the Bf-blender-cvs mailing list