[Bf-blender-cvs] [001930b] alembic_pointcache: Moved the compression enum items for point cache into a true enum typedef instead of using #defines.

Lukas Tönne noreply at git.blender.org
Thu Oct 16 16:53:48 CEST 2014


Commit: 001930bda0543fcaf0211524dfc27ec9380e3103
Author: Lukas Tönne
Date:   Sat Nov 30 12:42:33 2013 +0100
Branches: alembic_pointcache
https://developer.blender.org/rB001930bda0543fcaf0211524dfc27ec9380e3103

Moved the compression enum items for point cache into a true enum
typedef instead of using #defines.

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

M	source/blender/makesdna/DNA_pointcache_types.h
M	source/blender/makesrna/intern/rna_pointcache.c

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

diff --git a/source/blender/makesdna/DNA_pointcache_types.h b/source/blender/makesdna/DNA_pointcache_types.h
index 73ccad2..bbf0c28 100644
--- a/source/blender/makesdna/DNA_pointcache_types.h
+++ b/source/blender/makesdna/DNA_pointcache_types.h
@@ -121,6 +121,12 @@ typedef struct PointCache {
 	char cachedir[768];	/* FILE_MAXDIR length */
 } PointCache;
 
+typedef enum ePointCacheCompression {
+	PTC_COMPRESS_NO			= 0,
+	PTC_COMPRESS_LZO		= 1,
+	PTC_COMPRESS_LZMA		= 2
+} ePointCacheCompression;
+
 /* pointcache->flag */
 #define PTCACHE_BAKED				1
 #define PTCACHE_OUTDATED			2
@@ -142,9 +148,5 @@ typedef struct PointCache {
 /* PTCACHE_OUTDATED + PTCACHE_FRAMES_SKIPPED */
 #define PTCACHE_REDO_NEEDED			258
 
-#define PTCACHE_COMPRESS_NO			0
-#define PTCACHE_COMPRESS_LZO		1
-#define PTCACHE_COMPRESS_LZMA		2
-
 #endif
 
diff --git a/source/blender/makesrna/intern/rna_pointcache.c b/source/blender/makesrna/intern/rna_pointcache.c
index c231db4..7895270 100644
--- a/source/blender/makesrna/intern/rna_pointcache.c
+++ b/source/blender/makesrna/intern/rna_pointcache.c
@@ -174,9 +174,9 @@ static void rna_def_pointcache(BlenderRNA *brna)
 
 #ifdef POINTCACHE_OLD
 	static EnumPropertyItem point_cache_compress_items[] = {
-		{PTCACHE_COMPRESS_NO, "NO", 0, "No", "No compression"},
-		{PTCACHE_COMPRESS_LZO, "LIGHT", 0, "Light", "Fast but not so effective compression"},
-		{PTCACHE_COMPRESS_LZMA, "HEAVY", 0, "Heavy", "Effective but slow compression"},
+		{PTC_COMPRESS_NO, "NO", 0, "No", "No compression"},
+		{PTC_COMPRESS_LZO, "LIGHT", 0, "Light", "Fast but not so effective compression"},
+		{PTC_COMPRESS_LZMA, "HEAVY", 0, "Heavy", "Effective but slow compression"},
 		{0, NULL, 0, NULL, NULL}
 	};
 #endif /*POINTCACHE_OLD*/




More information about the Bf-blender-cvs mailing list