[Bf-blender-cvs] [b81ce32a591] hair_guides: Minor flag rename.
Lukas Tönne
noreply at git.blender.org
Sun Nov 12 11:23:44 CET 2017
Commit: b81ce32a59185003ec4434e6e2da0eb64f004b0f
Author: Lukas Tönne
Date: Sun Nov 12 10:10:28 2017 +0000
Branches: hair_guides
https://developer.blender.org/rBb81ce32a59185003ec4434e6e2da0eb64f004b0f
Minor flag rename.
===================================================================
M source/blender/blenkernel/BKE_hair.h
M source/blender/blenkernel/intern/hair.c
M source/blender/makesdna/DNA_hair_types.h
===================================================================
diff --git a/source/blender/blenkernel/BKE_hair.h b/source/blender/blenkernel/BKE_hair.h
index dc3cc5a1651..0fe0d138492 100644
--- a/source/blender/blenkernel/BKE_hair.h
+++ b/source/blender/blenkernel/BKE_hair.h
@@ -44,8 +44,11 @@ struct EvaluationContext;
struct MeshSample;
struct Scene;
+/* Create a new hair system instance */
struct HairSystem* BKE_hair_new(void);
+/* Copy an existing hair system */
struct HairSystem* BKE_hair_copy(struct HairSystem *hsys);
+/* Delete a hair system */
void BKE_hair_free(struct HairSystem *hsys);
/* === Guide Strands === */
diff --git a/source/blender/blenkernel/intern/hair.c b/source/blender/blenkernel/intern/hair.c
index 325e4a7e7cc..522e7076ba4 100644
--- a/source/blender/blenkernel/intern/hair.c
+++ b/source/blender/blenkernel/intern/hair.c
@@ -150,12 +150,12 @@ void BKE_hair_guide_curves_begin(HairSystem *hsys, int totcurves, int totverts)
if (totcurves != hsys->totcurves)
{
hsys->curves = MEM_reallocN(hsys->curves, sizeof(HairGuideCurve) * totcurves);
- hsys->flag |= HAIR_GUIDE_CURVES_DIRTY;
+ hsys->flag |= HAIR_SYSTEM_CURVES_DIRTY;
}
if (totverts != hsys->totverts)
{
hsys->verts = MEM_reallocN(hsys->curves, sizeof(HairGuideCurve) * totverts);
- hsys->flag |= HAIR_GUIDE_VERTS_DIRTY;
+ hsys->flag |= HAIR_SYSTEM_VERTS_DIRTY;
}
}
@@ -167,7 +167,7 @@ void BKE_hair_set_guide_curve(HairSystem *hsys, int index, const MeshSample *mes
memcpy(&curve->mesh_sample, mesh_sample, sizeof(MeshSample));
curve->numverts = numverts;
- hsys->flag |= HAIR_GUIDE_CURVES_DIRTY;
+ hsys->flag |= HAIR_SYSTEM_CURVES_DIRTY;
}
void BKE_hair_set_guide_vertex(HairSystem *hsys, int index, int flag, const float co[3])
@@ -178,13 +178,13 @@ void BKE_hair_set_guide_vertex(HairSystem *hsys, int index, int flag, const floa
vertex->flag = flag;
copy_v3_v3(vertex->co, co);
- hsys->flag |= HAIR_GUIDE_VERTS_DIRTY;
+ hsys->flag |= HAIR_SYSTEM_VERTS_DIRTY;
}
void BKE_hair_guide_curves_end(HairSystem *hsys)
{
/* Recalculate vertex offsets */
- if (hsys->flag & HAIR_GUIDE_CURVES_DIRTY)
+ if (hsys->flag & HAIR_SYSTEM_CURVES_DIRTY)
{
int vertstart = 0;
for (int i = 0; i < hsys->totcurves; ++i)
diff --git a/source/blender/makesdna/DNA_hair_types.h b/source/blender/makesdna/DNA_hair_types.h
index 68cf0c52834..2ca2fdc6326 100644
--- a/source/blender/makesdna/DNA_hair_types.h
+++ b/source/blender/makesdna/DNA_hair_types.h
@@ -96,9 +96,9 @@ typedef struct HairSystem {
typedef enum eHairSystemFlag
{
/* Guide curves have been changed */
- HAIR_GUIDE_CURVES_DIRTY = (1 << 8),
+ HAIR_SYSTEM_CURVES_DIRTY = (1 << 8),
/* Guide curve vertices have been changed */
- HAIR_GUIDE_VERTS_DIRTY = (1 << 9),
+ HAIR_SYSTEM_VERTS_DIRTY = (1 << 9),
} eHairSystemFlag;
#ifdef __cplusplus
More information about the Bf-blender-cvs
mailing list