[Bf-blender-cvs] [d5d5002] particles_refactor: Disabled some unused DNA code for nparticles.

Lukas Tönne noreply at git.blender.org
Tue Apr 22 12:05:31 CEST 2014


Commit: d5d5002c49fcdc2b24e8e6a3a36d3b68fd1fc2e0
Author: Lukas Tönne
Date:   Wed Aug 14 13:37:22 2013 +0200
https://developer.blender.org/rBd5d5002c49fcdc2b24e8e6a3a36d3b68fd1fc2e0

Disabled some unused DNA code for nparticles.

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

M	source/blender/makesdna/DNA_nparticle_types.h
M	source/blender/makesrna/intern/rna_nparticle.c

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

diff --git a/source/blender/makesdna/DNA_nparticle_types.h b/source/blender/makesdna/DNA_nparticle_types.h
index 5841629..fe461ab 100644
--- a/source/blender/makesdna/DNA_nparticle_types.h
+++ b/source/blender/makesdna/DNA_nparticle_types.h
@@ -29,12 +29,48 @@
  *  \ingroup DNA
  */
 
+#include "DNA_pagedbuffer_types.h"
+
+/* Attribute descriptor */
+typedef struct NParticleAttribute {
+	char name[64];
+	int datatype;
+	int pad;
+} NParticleAttribute;
+
+/* particle attribute types */
+enum NParticleAttributeDataType {
+	PAR_ATTR_DATATYPE_INTERNAL		= 0,	/* for static attributes with special types */
+	PAR_ATTR_DATATYPE_FLOAT			= 1,
+	PAR_ATTR_DATATYPE_INT			= 2,
+	PAR_ATTR_DATATYPE_BOOL			= 3,
+	PAR_ATTR_DATATYPE_VECTOR		= 4,
+	PAR_ATTR_DATATYPE_POINT			= 5,
+	PAR_ATTR_DATATYPE_NORMAL		= 6,
+	PAR_ATTR_DATATYPE_COLOR			= 7,
+	PAR_ATTR_DATATYPE_MATRIX		= 8
+};
+
+/* Attribute data in a buffer */
+typedef struct NParticleBufferAttribute {
+	struct NParticleBufferAttribute *next, *prev;
+	struct NParticleBufferAttribute *new_attribute;	/* temporary pointer after copy */
+	
+	NParticleAttribute desc;
+	bPagedBuffer data;
+} NParticleBufferAttribute;
+
+typedef struct NParticleBuffer {
+	ListBase attributes;
+} NParticleBuffer;
+
+
+#if 0
 #include "BLO_sys_types.h"	/* for uint64_t */
 
 #include "DNA_ID.h"
 
 #include "DNA_node_types.h"
-#include "DNA_pagedbuffer_types.h"
 
 
 /* Standard attribute types */
@@ -65,35 +101,6 @@ enum NodeParAttributeStandard {
 };
 
 
-/* Attribute descriptor */
-typedef struct NParticleAttribute {
-	char name[64];
-	int datatype;
-	int pad;
-} NParticleAttribute;
-
-/* particle attribute types */
-enum NParticleAttributeDataType {
-	PAR_ATTR_DATATYPE_INTERNAL		= 0,	/* for static attributes with special types */
-	PAR_ATTR_DATATYPE_FLOAT			= 1,
-	PAR_ATTR_DATATYPE_INT			= 2,
-	PAR_ATTR_DATATYPE_BOOL			= 3,
-	PAR_ATTR_DATATYPE_VECTOR		= 4,
-	PAR_ATTR_DATATYPE_POINT			= 5,
-	PAR_ATTR_DATATYPE_NORMAL		= 6,
-	PAR_ATTR_DATATYPE_COLOR			= 7,
-	PAR_ATTR_DATATYPE_MATRIX		= 8
-};
-
-/* Attribute data in a buffer */
-typedef struct NParticleBufferAttribute {
-	struct NParticleBufferAttribute *next, *prev;
-	struct NParticleBufferAttribute *new_attribute;	/* temporary pointer after copy */
-	
-	NParticleAttribute desc;
-	bPagedBuffer data;
-} NParticleBufferAttribute;
-
 /* ******** Various specialized typedefs for attributes ******** */
 /* data type of the flag attribute layer */
 typedef int NParticleFlagLayerType;
@@ -142,10 +149,6 @@ typedef struct bNodeInstanceMap {
 	ListBase lb;
 } bNodeInstanceMap;
 
-typedef struct NParticleBuffer {
-	ListBase attributes;
-} NParticleBuffer;
-
 
 typedef struct NParticleSource {
 	int id;
@@ -158,5 +161,6 @@ typedef struct NParticleSource {
 	float emit_carry;
 	int pad;
 } NParticleSource;
+#endif
 
 #endif
diff --git a/source/blender/makesrna/intern/rna_nparticle.c b/source/blender/makesrna/intern/rna_nparticle.c
index 448cb5f..ca0fb3e 100644
--- a/source/blender/makesrna/intern/rna_nparticle.c
+++ b/source/blender/makesrna/intern/rna_nparticle.c
@@ -421,7 +421,7 @@ static void rna_def_nparticle_buffer_attributes_api(BlenderRNA *brna, PropertyRN
 	func = RNA_def_function(srna, "new", "rna_NParticleBuffer_attributes_new");
 	RNA_def_function_ui_description(func, "Add a particle attribute");
 	RNA_def_function_flag(func, FUNC_USE_REPORTS);
-	parm = RNA_def_string(func, "name", "", MAX_NAME, "Name", "");
+	parm = RNA_def_string(func, "name", "", 64, "Name", "");
 	RNA_def_property_flag(parm, PROP_REQUIRED);
 	parm = RNA_def_enum(func, "datatype", nparticle_attribute_datatype_user, PAR_ATTR_DATATYPE_FLOAT, "Data Type", "Base data type");
 	RNA_def_property_flag(parm, PROP_REQUIRED);




More information about the Bf-blender-cvs mailing list