[Bf-blender-cvs] [8873e54] particles_refactor: Setter callback for particle attribute data type. Currently just throws an assert failure, later on this should make sure the particle data is converted to the correct type (or simply make datatype read-only).

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


Commit: 8873e54701c23b79e6bb7d8bb77bd11c13c93499
Author: Lukas Tönne
Date:   Mon Aug 12 12:15:36 2013 +0200
https://developer.blender.org/rB8873e54701c23b79e6bb7d8bb77bd11c13c93499

Setter callback for particle attribute data type. Currently just throws an assert failure, later on this should make sure the particle data is converted to the correct type (or simply make datatype read-only).

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

M	source/blender/makesrna/intern/rna_nparticle.c

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

diff --git a/source/blender/makesrna/intern/rna_nparticle.c b/source/blender/makesrna/intern/rna_nparticle.c
index 42ccb6d..aa918a8 100644
--- a/source/blender/makesrna/intern/rna_nparticle.c
+++ b/source/blender/makesrna/intern/rna_nparticle.c
@@ -35,6 +35,13 @@
 #include "BKE_nparticle.h"
 #include "BKE_report.h"
 
+static void rna_NParticleAttribute_datatype_set(PointerRNA *ptr, int value)
+{
+//	NParticleAttribute *attr = ptr->data;
+	/* XXX TODO */
+	BLI_assert(false);
+}
+
 static NParticleBufferAttribute *rna_NParticleBuffer_attributes_new(NParticleBuffer *buf, ReportList *reports, const char *name, int datatype)
 {
 	if (BKE_nparticle_attribute_find(buf, name)) {
@@ -98,6 +105,7 @@ static void def_nparticle_attribute(StructRNA *srna)
 	prop = RNA_def_property(srna, "datatype", PROP_ENUM, PROP_NONE);
 	RNA_def_property_enum_sdna(prop, NULL, "datatype");
 	RNA_def_property_enum_items(prop, nparticle_attribute_datatype_all);
+	RNA_def_property_enum_funcs(prop, NULL, "rna_NParticleAttribute_datatype_set", NULL);
 	RNA_def_property_ui_text(prop, "Data Type", "Basic data type");
 }




More information about the Bf-blender-cvs mailing list