Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2013-08-26 20:08:03 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-08-26 20:08:03 +0400
commitc93750d893e25a9f2ffd98222aa63cc3852f8a37 (patch)
tree437951b267c83acd04f6aa7e82de64cc00615b99 /source/blender/makesrna/RNA_access.h
parentf157753120b0a0cce61f0f4a4f8a24c2cdd7642a (diff)
RNA fixes regarding dynamic array properties in functions parameters (reviewed by Brecht, thanks!):
* It was not clear that RNA_parameter_length_get() & co only affected dynamic properties, renamed them to RNA_parameter_dynamic_length_get() and such. * Fixed RNA_function_find_parameter(), we can't use BLI_findstring() here, need to call RNA_property_identifier()! * Fixed RNA_parameter_get() and RNA_parameter_set(), which were completely wrong for dynamic properties. * Fixed RNA_parameter_dynamic_length_get/set_data(), they did not check the property was actually a dynamic one and were using again ugly blackmagic casting intead of ParameterDynAlloc structure! * makesrna was still using an ugly hackish (and perhaps not always working) code when handling dynamic parameters, now synchronized with RNA_parameter_dynamic_length_get_data and RNA_parameter_get code.
Diffstat (limited to 'source/blender/makesrna/RNA_access.h')
-rw-r--r--source/blender/makesrna/RNA_access.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index b18d3c83342..0725cea3291 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -1073,10 +1073,11 @@ void RNA_parameter_get(ParameterList *parms, PropertyRNA *parm, void **value);
void RNA_parameter_get_lookup(ParameterList *parms, const char *identifier, void **value);
void RNA_parameter_set(ParameterList *parms, PropertyRNA *parm, const void *value);
void RNA_parameter_set_lookup(ParameterList *parms, const char *identifier, const void *value);
-int RNA_parameter_length_get(ParameterList *parms, PropertyRNA *parm);
-int RNA_parameter_length_get_data(ParameterList *parms, PropertyRNA *parm, void *data);
-void RNA_parameter_length_set(ParameterList *parms, PropertyRNA *parm, int length);
-void RNA_parameter_length_set_data(ParameterList *parms, PropertyRNA *parm, void *data, int length);
+/* Only for PROP_DYNAMIC properties! */
+int RNA_parameter_dynamic_length_get(ParameterList *parms, PropertyRNA *parm);
+int RNA_parameter_dynamic_length_get_data(ParameterList *parms, PropertyRNA *parm, void *data);
+void RNA_parameter_dynamic_length_set(ParameterList *parms, PropertyRNA *parm, int length);
+void RNA_parameter_dynamic_length_set_data(ParameterList *parms, PropertyRNA *parm, void *data, int length);
int RNA_function_call(struct bContext *C, struct ReportList *reports, PointerRNA *ptr,
FunctionRNA *func, ParameterList *parms);