[Bf-blender-cvs] [69f990a] particles_refactor: Disabled data access in particle RNA.

Lukas Tönne noreply at git.blender.org
Mon Jul 14 15:03:33 CEST 2014


Commit: 69f990ad7ef35d102ccf138e9045b1944f75a2eb
Author: Lukas Tönne
Date:   Mon Jul 14 15:00:55 2014 +0200
https://developer.blender.org/rB69f990ad7ef35d102ccf138e9045b1944f75a2eb

Disabled data access in particle RNA.

Only the general attribute descriptions and state instance can be
accessed from plain bpy now. For detailed data read/write the bparticles
module has to be used.

This was forced by a change to collection iterators, which essentially
makes them unsuitable for anything other than ListBase and arrays
(state attributes and particle data in this case). It may be possible
to reeanble this later, but generally bparticles is the better approach.

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

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 18ade0f..4b98d3e 100644
--- a/source/blender/makesrna/intern/rna_nparticle.c
+++ b/source/blender/makesrna/intern/rna_nparticle.c
@@ -52,6 +52,7 @@ static EnumPropertyItem nparticle_display_type_items[] = {
 
 #include "RNA_access.h"
 
+#if 0
 static StructRNA *rna_NParticleAttributeState_refine(PointerRNA *ptr)
 {
 	NParticleAttributeState *attrstate = ptr->data;
@@ -262,6 +263,7 @@ int rna_NParticleState_attributes_lookup_string(PointerRNA *ptr, const char *key
 	RNA_pointer_create(ptr->id.data, &RNA_NParticleAttributeState, attrstate, r_ptr);
 	return attrstate != NULL;
 }
+#endif
 
 
 #if 0
@@ -459,6 +461,7 @@ static void def_nparticle_attribute_description(StructRNA *srna, int update_flag
 		RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 }
 
+#if 0
 /* defines a subtype of NParticleAttribute with a specific collection property for actual data */
 static void def_nparticle_attribute_state_type(BlenderRNA *brna,
                                                const char *state_structname, const char *data_structname,
@@ -608,6 +611,7 @@ static void rna_def_nparticle_attribute_state(BlenderRNA *brna)
 
 #undef DEF_ATTR_TYPE_RNA
 }
+#endif
 
 static void rna_def_nparticle_iterator(BlenderRNA *brna)
 {
@@ -626,6 +630,7 @@ static void rna_def_nparticle_state(BlenderRNA *brna)
 	srna = RNA_def_struct(brna, "NParticleState", NULL);
 	RNA_def_struct_ui_text(srna, "Particle State", "Data in a particle system for a specific frame");
 
+#if 0
 	prop = RNA_def_property(srna, "attributes", PROP_COLLECTION, PROP_NONE);
 	RNA_def_property_collection_funcs(prop, "rna_NParticleState_attributes_begin", "rna_NParticleState_attributes_next",
 	                                  "rna_NParticleState_attributes_end", "rna_NParticleState_attributes_get",
@@ -633,6 +638,7 @@ static void rna_def_nparticle_state(BlenderRNA *brna)
 	                                  "rna_NParticleState_attributes_lookup_string", NULL);
 	RNA_def_property_ui_text(prop, "Attributes", "Data layers associated to particles");
 	RNA_def_property_struct_type(prop, "NParticleAttributeState");
+#endif
 
 #if 0
 	prop = RNA_def_property(srna, "particles", PROP_COLLECTION, PROP_NONE);
@@ -824,7 +830,9 @@ static void rna_def_nparticle_system(BlenderRNA *brna)
 
 void RNA_def_nparticle(BlenderRNA *brna)
 {
+#if 0
 	rna_def_nparticle_attribute_state(brna);
+#endif
 	rna_def_nparticle_iterator(brna);
 	rna_def_nparticle_state(brna);
 	rna_def_nparticle_attribute(brna);




More information about the Bf-blender-cvs mailing list