[Bf-blender-cvs] [067c890b361] hair_guides: Simplify class name.

Lukas Tönne noreply at git.blender.org
Mon Dec 25 17:21:08 CET 2017


Commit: 067c890b36138552b8fd2cb0f583f31c379877fe
Author: Lukas Tönne
Date:   Mon Dec 25 15:30:41 2017 +0000
Branches: hair_guides
https://developer.blender.org/rB067c890b36138552b8fd2cb0f583f31c379877fe

Simplify class name.

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

M	source/blender/blenkernel/intern/groom.c
M	source/blender/blenloader/intern/readfile.c
M	source/blender/blenloader/intern/writefile.c
M	source/blender/draw/intern/draw_cache_impl_groom.c
M	source/blender/editors/groom/editgroom.c
M	source/blender/editors/groom/editgroom_region.c
M	source/blender/editors/groom/editgroom_select.c
M	source/blender/makesdna/DNA_groom_types.h

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

diff --git a/source/blender/blenkernel/intern/groom.c b/source/blender/blenkernel/intern/groom.c
index 4470532d27c..3e07968c74b 100644
--- a/source/blender/blenkernel/intern/groom.c
+++ b/source/blender/blenkernel/intern/groom.c
@@ -75,7 +75,7 @@ static void groom_bundles_free(ListBase *bundles)
 {
 	for (GroomBundle *bundle = bundles->first; bundle; bundle = bundle->next)
 	{
-		for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+		for (GroomSection *section = bundle->sections.first; section; section = section->next)
 		{
 			if (section->verts)
 			{
@@ -125,7 +125,7 @@ void BKE_groom_copy_data(Main *UNUSED(bmain), Groom *groom_dst, const Groom *gro
 	for (GroomBundle *bundle = groom_dst->bundles.first; bundle; bundle = bundle->next)
 	{
 		BLI_duplicatelist(&bundle->sections, &bundle->sections);
-		for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+		for (GroomSection *section = bundle->sections.first; section; section = section->next)
 		{
 			if (section->verts)
 			{
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 33a22449b49..c4955911472 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -8399,7 +8399,7 @@ static void direct_link_groom(FileData *fd, Groom *groom)
 	for (GroomBundle *bundle = groom->bundles.first; bundle; bundle = bundle->next)
 	{
 		link_list(fd, &bundle->sections);
-		for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+		for (GroomSection *section = bundle->sections.first; section; section = section->next)
 		{
 			section->verts = newdataadr(fd, section->verts);
 		}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index b5a2224c65a..8ae92f2d92c 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -3825,8 +3825,8 @@ static void write_groom(WriteData *wd, Groom *groom)
 	writelist(wd, DATA, GroomBundle, &groom->bundles);
 	for (GroomBundle *bundle = groom->bundles.first; bundle; bundle = bundle->next)
 	{
-		writelist(wd, DATA, GroomBundleSection, &bundle->sections);
-		for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+		writelist(wd, DATA, GroomSection, &bundle->sections);
+		for (GroomSection *section = bundle->sections.first; section; section = section->next)
 		{
 			writestruct(wd, DATA, GroomSectionVertex, section->totverts, section->verts);
 		}
diff --git a/source/blender/draw/intern/draw_cache_impl_groom.c b/source/blender/draw/intern/draw_cache_impl_groom.c
index d24c7b041b8..eb6b82151db 100644
--- a/source/blender/draw/intern/draw_cache_impl_groom.c
+++ b/source/blender/draw/intern/draw_cache_impl_groom.c
@@ -214,7 +214,7 @@ static int groom_count_verts(Groom *groom, int parts, int tessellation)
 	{
 		for (GroomBundle *bundle = bundles->first; bundle; bundle = bundle->next)
 		{
-			for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+			for (GroomSection *section = bundle->sections.first; section; section = section->next)
 			{
 				vert_len += section->totverts;
 			}
@@ -247,7 +247,7 @@ static int groom_count_edges(Groom *groom, int parts, int tessellation)
 	{
 		for (GroomBundle *bundle = bundles->first; bundle; bundle = bundle->next)
 		{
-			for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+			for (GroomSection *section = bundle->sections.first; section; section = section->next)
 			{
 				// Closed edge loop, 1 edge per vertex
 				edge_len += section->totverts;
@@ -283,7 +283,7 @@ static void groom_get_verts(
 		for (GroomBundle *bundle = bundles->first; bundle; bundle = bundle->next)
 		{
 			const bool active = bundle->flag & GM_BUNDLE_SELECT;
-			for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+			for (GroomSection *section = bundle->sections.first; section; section = section->next)
 			{
 				if (id_pos != GM_ATTR_ID_UNUSED)
 				{
@@ -304,7 +304,7 @@ static void groom_get_verts(
 		uint idx = 0;
 		for (GroomBundle *bundle = bundles->first; bundle; bundle = bundle->next)
 		{
-			for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+			for (GroomSection *section = bundle->sections.first; section; section = section->next)
 			{
 				const bool active = (bundle->flag & GM_BUNDLE_SELECT) && (section->flag & GM_SECTION_SELECT);
 				float mat[4][4];
@@ -358,7 +358,7 @@ static void groom_get_edges(
 		uint idx = 0;
 		for (GroomBundle *bundle = bundles->first; bundle; bundle = bundle->next)
 		{
-			for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+			for (GroomSection *section = bundle->sections.first; section; section = section->next)
 			{
 				if (section->prev)
 				{
@@ -374,7 +374,7 @@ static void groom_get_edges(
 		uint idx = 0;
 		for (GroomBundle *bundle = bundles->first; bundle; bundle = bundle->next)
 		{
-			for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+			for (GroomSection *section = bundle->sections.first; section; section = section->next)
 			{
 				if (section->totverts > 1)
 				{
diff --git a/source/blender/editors/groom/editgroom.c b/source/blender/editors/groom/editgroom.c
index 60ad1448087..dd4f27005be 100644
--- a/source/blender/editors/groom/editgroom.c
+++ b/source/blender/editors/groom/editgroom.c
@@ -72,7 +72,7 @@ static void groom_bundles_free(ListBase *bundles)
 {
 	for (GroomBundle *bundle = bundles->first; bundle; bundle = bundle->next)
 	{
-		for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+		for (GroomSection *section = bundle->sections.first; section; section = section->next)
 		{
 			if (section->verts)
 			{
@@ -90,7 +90,7 @@ static void groom_bundles_copy(ListBase *bundles_dst, ListBase *bundles_src)
 	for (GroomBundle *bundle = bundles_dst->first; bundle; bundle = bundle->next)
 	{
 		BLI_duplicatelist(&bundle->sections, &bundle->sections);
-		for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+		for (GroomSection *section = bundle->sections.first; section; section = section->next)
 		{
 			if (section->verts)
 			{
diff --git a/source/blender/editors/groom/editgroom_region.c b/source/blender/editors/groom/editgroom_region.c
index d37d91f3fb0..ed0dac06700 100644
--- a/source/blender/editors/groom/editgroom_region.c
+++ b/source/blender/editors/groom/editgroom_region.c
@@ -59,9 +59,9 @@
 
 #include "groom_intern.h"
 
-static GroomBundleSection* groom_add_bundle_section(float mat[4][4], float cparam)
+static GroomSection* groom_add_bundle_section(float mat[4][4], float cparam)
 {
-	GroomBundleSection *section = MEM_callocN(sizeof(GroomBundleSection), "groom bundle section");
+	GroomSection *section = MEM_callocN(sizeof(GroomSection), "groom bundle section");
 	
 	madd_v3_v3v3fl(section->center, mat[3], mat[2], cparam);
 	copy_v3_v3(section->normal, mat[2]);
diff --git a/source/blender/editors/groom/editgroom_select.c b/source/blender/editors/groom/editgroom_select.c
index 388f24cfe22..8857d32fdda 100644
--- a/source/blender/editors/groom/editgroom_select.c
+++ b/source/blender/editors/groom/editgroom_select.c
@@ -71,7 +71,7 @@ bool ED_groom_select_check_curves(const EditGroom *edit)
 {
 	for (GroomBundle* bundle = edit->bundles.first; bundle; bundle = bundle->next)
 	{
-		for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+		for (GroomSection *section = bundle->sections.first; section; section = section->next)
 		{
 			if (section->flag & GM_SECTION_SELECT) {
 				return true;
@@ -86,7 +86,7 @@ bool ED_groom_select_check_sections(const EditGroom *edit)
 {
 	for (GroomBundle* bundle = edit->bundles.first; bundle; bundle = bundle->next)
 	{
-		for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+		for (GroomSection *section = bundle->sections.first; section; section = section->next)
 		{
 			GroomSectionVertex *vertex = section->verts;
 			for (int i = 0; i < section->totverts; ++i, ++vertex)
@@ -122,7 +122,7 @@ void ED_groom_select_curves(EditGroom *edit, EditGroomSelectCb select_cb, void *
 {
 	for (GroomBundle* bundle = edit->bundles.first; bundle; bundle = bundle->next)
 	{
-		for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+		for (GroomSection *section = bundle->sections.first; section; section = section->next)
 		{
 			const bool select = select_cb(userdata, section->flag & GM_SECTION_SELECT);
 			if (select)
@@ -141,7 +141,7 @@ void ED_groom_select_sections(EditGroom *edit, EditGroomSelectCb select_cb, void
 {
 	for (GroomBundle* bundle = edit->bundles.first; bundle; bundle = bundle->next)
 	{
-		for (GroomBundleSection *section = bundle->sections.first; section; section = section->next)
+		for (GroomSection *section = bundle->sections.first; section; section = section->next)
 		{
 			GroomSectionVertex *vertex = section->verts;
 			for (int i = 0; i < section->totverts; ++i, ++vertex)
diff --git a/source/blender/makesdna/DNA_groom_types.h b/source/blender/makesdna/DNA_groom_types.h
index 463637fddb7..02cecbd269f 100644
--- a/source/blender/makesdna/DNA_groom_types.h
+++ b/source/blender/makesdna/DNA_groom_types.h
@@ -53,8 +53,8 @@ typedef enum GroomVertexFlag
 } GroomVertexFlag;
 
 /* Cross-section of a bundle */
-typedef struct GroomBundleSection {
-	struct GroomBundleSection *next, *prev; /* Pointers for ListBase element */
+typedef struct GroomSection {
+	struct GroomSection *next, *prev; /* Pointers for ListBase element */
 	
 	int flag;
 	int pad;
@@ -65,12 +65,12 @@ typedef struct GroomBundleSection {
 	GroomSectionVertex *verts;
 	int totverts;
 	int pad2;
-} GroomBundleSection;
+} GroomSection;
 
-typedef enum GroomBundleSectionFlag
+typedef enum GroomSectionFlag
 {
 	GM_SECTION_SELECT       = (1 << 0),
-} GroomBundleSectionFlag;
+} GroomSectionFlag;
 
 /* Bundle of hair strands fol

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list