[Bf-blender-cvs] [dc766bfffcd] hair_guides: Rename the fur modifier to hair modifier.

Lukas Tönne noreply at git.blender.org
Fri Jun 29 14:33:04 CEST 2018


Commit: dc766bfffcd75f6c498f0cba92585b6a67a6925c
Author: Lukas Tönne
Date:   Fri Jun 29 13:21:33 2018 +0100
Branches: hair_guides
https://developer.blender.org/rBdc766bfffcd75f6c498f0cba92585b6a67a6925c

Rename the fur modifier to hair modifier.

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

M	intern/cycles/blender/blender_curves.cpp
M	source/blender/blenloader/intern/readfile.c
M	source/blender/blenloader/intern/writefile.c
M	source/blender/draw/engines/eevee/eevee_materials.c
M	source/blender/draw/modes/object_mode.c
M	source/blender/editors/object/object_intern.h
M	source/blender/editors/object/object_modifier.c
M	source/blender/editors/object/object_ops.c
M	source/blender/editors/space_outliner/outliner_draw.c
M	source/blender/makesdna/DNA_modifier_types.h
M	source/blender/makesrna/RNA_access.h
M	source/blender/makesrna/intern/rna_modifier.c
M	source/blender/modifiers/CMakeLists.txt
M	source/blender/modifiers/MOD_modifiertypes.h
R073	source/blender/modifiers/intern/MOD_fur.c	source/blender/modifiers/intern/MOD_hair.c
M	source/blender/modifiers/intern/MOD_util.c

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

diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp
index e006ce4bed1..9e0921a8f6c 100644
--- a/intern/cycles/blender/blender_curves.cpp
+++ b/intern/cycles/blender/blender_curves.cpp
@@ -429,9 +429,9 @@ static bool ObtainCacheDataFromObject(Mesh *mesh,
 				                                  &curvenum,
 				                                  &keyno);
 			}
-			if((b_mod->type() == b_mod->type_FUR)) {
-				BL::FurModifier b_fmd((const PointerRNA)b_mod->ptr);
-				BL::HairSystem b_hsys = b_fmd.hair_system();
+			if((b_mod->type() == b_mod->type_HAIR)) {
+				BL::HairModifier b_hmd((const PointerRNA)b_mod->ptr);
+				BL::HairSystem b_hsys = b_hmd.hair_system();
 				
 				const int material_index = 1; /* TODO */
 				int shader = clamp(material_index - 1, 0, mesh->used_shaders.size()-1);
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 4d64f0a744b..9c98cbceacf 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5367,15 +5367,15 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
 				}
 			}
 		}
-		else if (md->type == eModifierType_Fur) {
-			FurModifierData *fmd = (FurModifierData *)md;
+		else if (md->type == eModifierType_Hair) {
+			HairModifierData *hmd = (HairModifierData *)md;
 			
-			fmd->hair_system = newdataadr(fd, fmd->hair_system);
-			direct_link_hair(fd, fmd->hair_system);
+			hmd->hair_system = newdataadr(fd, hmd->hair_system);
+			direct_link_hair(fd, hmd->hair_system);
 			
-			fmd->draw_settings = newdataadr(fd, fmd->draw_settings);
+			hmd->draw_settings = newdataadr(fd, hmd->draw_settings);
 
-			BLI_listbase_clear(&fmd->guide_curves); // runtime
+			BLI_listbase_clear(&hmd->guide_curves); // runtime
 		}
 	}
 }
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 69fa0c9a386..a455c22dd14 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1788,16 +1788,16 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
 				}
 			}
 		}
-		else if (md->type == eModifierType_Fur) {
-			FurModifierData *fmd = (FurModifierData *)md;
+		else if (md->type == eModifierType_Hair) {
+			HairModifierData *hmd = (HairModifierData *)md;
 			
-			if (fmd->hair_system) {
-				writestruct(wd, DATA, HairSystem, 1, fmd->hair_system);
-				write_hair(wd, fmd->hair_system);
+			if (hmd->hair_system) {
+				writestruct(wd, DATA, HairSystem, 1, hmd->hair_system);
+				write_hair(wd, hmd->hair_system);
 			}
-			if (fmd->draw_settings)
+			if (hmd->draw_settings)
 			{
-				writestruct(wd, DATA, HairDrawSettings, 1, fmd->draw_settings);
+				writestruct(wd, DATA, HairDrawSettings, 1, hmd->draw_settings);
 			}
 		}
 	}
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c
index 3701093245f..be6ab9c9b6e 100644
--- a/source/blender/draw/engines/eevee/eevee_materials.c
+++ b/source/blender/draw/engines/eevee/eevee_materials.c
@@ -1815,13 +1815,13 @@ void EEVEE_hair_cache_populate(EEVEE_Data *vedata, EEVEE_ViewLayerData *sldata,
 					material_particle_hair(vedata, sldata, ob, psys, md);
 					*cast_shadow = true;
 				}
-				else if (md->type == eModifierType_Fur) {
-					FurModifierData *fmd = (FurModifierData *)md;
+				else if (md->type == eModifierType_Hair) {
+					HairModifierData *hmd = (HairModifierData *)md;
 					
 					const int material_index = 1; /* TODO */
 					Material *material = give_current_material(ob, material_index);
 					
-					material_hair(vedata, sldata, ob, fmd->hair_system, fmd->draw_settings, material, ob->data);
+					material_hair(vedata, sldata, ob, hmd->hair_system, hmd->draw_settings, material, ob->data);
 				}
 			}
 		}
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index 29a5950d95a..84de131810d 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -2275,16 +2275,16 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
 		{
 			for (ModifierData *md = ob->modifiers.first; md; md = md->next)
 			{
-				if (md->type == eModifierType_Fur)
+				if (md->type == eModifierType_Hair)
 				{
-					FurModifierData *fmd = (FurModifierData*)md;
+					HairModifierData *hmd = (HairModifierData*)md;
 					
 					if (!modifier_isEnabled(draw_ctx->scene, md, eModifierMode_Realtime))
 					{
 						continue;
 					}
 					
-					DRW_shgroup_hair(ob, fmd->hair_system, fmd->draw_settings, scalp, stl->g_data->hair_verts, stl->g_data->hair_edges);
+					DRW_shgroup_hair(ob, hmd->hair_system, hmd->draw_settings, scalp, stl->g_data->hair_verts, stl->g_data->hair_edges);
 				}
 			}
 		}
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index e4452193a74..19e9c4c1aa7 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -174,7 +174,7 @@ void OBJECT_OT_skin_radii_equalize(struct wmOperatorType *ot);
 void OBJECT_OT_skin_armature_create(struct wmOperatorType *ot);
 void OBJECT_OT_laplaciandeform_bind(struct wmOperatorType *ot);
 void OBJECT_OT_surfacedeform_bind(struct wmOperatorType *ot);
-void OBJECT_OT_fur_generate_follicles(struct wmOperatorType *ot);
+void OBJECT_OT_hair_generate_follicles(struct wmOperatorType *ot);
 
 /* object_constraint.c */
 void OBJECT_OT_constraint_add(struct wmOperatorType *ot);
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 91b5506b329..32942ebf5af 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -2429,22 +2429,22 @@ void OBJECT_OT_surfacedeform_bind(wmOperatorType *ot)
 	edit_modifier_properties(ot);
 }
 
-/************************ Fur follicle generate operator *********************/
+/************************ Hair follicle generate operator *********************/
 
-static int fur_generate_follicles_poll(bContext *C)
+static int hair_generate_follicles_poll(bContext *C)
 {
-	return edit_modifier_poll_generic(C, &RNA_FurModifier, 0);
+	return edit_modifier_poll_generic(C, &RNA_HairModifier, 0);
 }
 
-static int fur_generate_follicles_exec(bContext *C, wmOperator *op)
+static int hair_generate_follicles_exec(bContext *C, wmOperator *op)
 {
 	Object *ob = ED_object_active_context(C);
-	FurModifierData *fmd = (FurModifierData *)edit_modifier_property_get(op, ob, eModifierType_Fur);
+	HairModifierData *hmd = (HairModifierData *)edit_modifier_property_get(op, ob, eModifierType_Hair);
 
-	if (!fmd)
+	if (!hmd)
 		return OPERATOR_CANCELLED;
 
-	BLI_assert(fmd->hair_system != NULL);
+	BLI_assert(hmd->hair_system != NULL);
 	
 	struct Depsgraph *depsgraph = CTX_data_depsgraph(C);
 	
@@ -2452,12 +2452,12 @@ static int fur_generate_follicles_exec(bContext *C, wmOperator *op)
 	Mesh *scalp = (Mesh *)DEG_get_evaluated_id(depsgraph, ob->data);
 	
 	BKE_hair_generate_follicles(
-	            fmd->hair_system,
+	            hmd->hair_system,
 	            scalp,
-	            (unsigned int)fmd->follicle_seed,
-	            fmd->follicle_count);
+	            (unsigned int)hmd->follicle_seed,
+	            hmd->follicle_count);
 	
-	BKE_hair_bind_follicles(fmd->hair_system, scalp);
+	BKE_hair_bind_follicles(hmd->hair_system, scalp);
 	
 	DEG_id_tag_update(&ob->id, OB_RECALC_DATA);
 	WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
@@ -2465,25 +2465,25 @@ static int fur_generate_follicles_exec(bContext *C, wmOperator *op)
 	return OPERATOR_FINISHED;
 }
 
-static int fur_generate_follicles_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
+static int hair_generate_follicles_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
 {
 	if (edit_modifier_invoke_properties(C, op))
-		return fur_generate_follicles_exec(C, op);
+		return hair_generate_follicles_exec(C, op);
 	else
 		return OPERATOR_CANCELLED;
 }
 
-void OBJECT_OT_fur_generate_follicles(wmOperatorType *ot)
+void OBJECT_OT_hair_generate_follicles(wmOperatorType *ot)
 {
 	/* identifiers */
-	ot->name = "Fur Follicles Generate";
-	ot->description = "Generate hair follicles for a fur modifier";
-	ot->idname = "OBJECT_OT_fur_generate_follicles";
+	ot->name = "Hair Follicles Generate";
+	ot->description = "Generate hair follicles for a hair modifier";
+	ot->idname = "OBJECT_OT_hair_generate_follicles";
 
 	/* api callbacks */
-	ot->poll = fur_generate_follicles_poll;
-	ot->invoke = fur_generate_follicles_invoke;
-	ot->exec = fur_generate_follicles_exec;
+	ot->poll = hair_generate_follicles_poll;
+	ot->invoke = hair_generate_follicles_invoke;
+	ot->exec = hair_generate_follicles_exec;
 
 	/* flags */
 	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 9061717e04a..4687e400491 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -247,7 +247,7 @@ void ED_operatortypes_object(void)
 	WM_operatortype_append(OBJECT_OT_data_transfer);
 	WM_operatortype_append(OBJECT_OT_datalayout_transfer);
 	WM_operatortype_append(OBJECT_OT_surfacedeform_bind);
-	WM_operatortype_append(OBJECT_OT_fur_generate_follicles);
+	WM_operatortype_append(OBJECT_OT_hair_generate_follicles);
 
 	WM_operatortype_append(OBJECT_OT_hide_view_clear);
 	WM_operatortype_append(OBJECT_OT_hide_view_set);
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 6f3a99e1d14..b8433554c61 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -1112,7 +1112,7 @@ static void tselem_draw_icon(
 					case eModifierType_NormalEdit:
 						ICON_DRAW(ICON_MOD_NORMALEDIT);
 						break;
-					case eModifierType_Fur:
+					case eModifierType_Hair:
 						ICON_DRAW(ICON_STRANDS);
 						break;
 					/* Default */
diff --git a/source/blender/makesdna/DNA_modifier_types.h b

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list