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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-02-02 22:57:57 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-02-02 22:57:57 +0300
commit284db61572125c8b2a916a20e5a4333ea72440dc (patch)
tree826d68aaccaee0cba7855955cc0e5dcf3a90ef62 /source/blender/makesrna/intern/rna_wm.c
parenteb00687cde2fd5724b22a8831d3294f4846ff934 (diff)
RNA: C API
* RNA_blender.h is now generated along with the other files. It is not used anywhere yet, and still located quite hidden next to the other rna_*_gen.c files. Read only access for now. * Inherited properties are not copied from the base anymore but iterated over. Patch by Vekoon, thanks! * Array get/set callbacks now do the whole array instead of getting an index. This is needed for some layers for example so python can set the array as a whole, otherwise the check that one layer has to be enabled at all times gets in the way. Also nicer for the C API. * Also some changes to returning pointers to make the API cleaner, got rid of the type() callback and instead let get() return PointerRNA with the type included. The C API looks like this currently: http://users.pandora.be/blendix/RNA_blender.h
Diffstat (limited to 'source/blender/makesrna/intern/rna_wm.c')
-rw-r--r--source/blender/makesrna/intern/rna_wm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 632c3a2f96c..69e7578da1a 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -69,10 +69,10 @@ static int rna_Operator_name_length(PointerRNA *ptr)
return strlen(op->type->name);
}
-static void *rna_Operator_properties_get(PointerRNA *ptr)
+static PointerRNA rna_Operator_properties_get(PointerRNA *ptr)
{
wmOperator *op= (wmOperator*)ptr->data;
- return op->properties;
+ return rna_pointer_inherit_refine(ptr, &RNA_OperatorProperties, op->properties);
}
#else
@@ -83,7 +83,7 @@ static void rna_def_operator(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "Operator", NULL);
- RNA_def_struct_ui_text(srna, "Operator", "Storage of an operator being or executed, or registered after execution.");
+ RNA_def_struct_ui_text(srna, "Operator", "Storage of an operator being executed, or registered after execution.");
RNA_def_struct_sdna(srna, "wmOperator");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -95,7 +95,7 @@ static void rna_def_operator(BlenderRNA *brna)
prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "OperatorProperties");
RNA_def_property_ui_text(prop, "Properties", "");
- RNA_def_property_pointer_funcs(prop, "rna_Operator_properties_get", NULL, NULL);
+ RNA_def_property_pointer_funcs(prop, "rna_Operator_properties_get", NULL);
srna= RNA_def_struct(brna, "OperatorProperties", NULL);
RNA_def_struct_ui_text(srna, "Operator Properties", "Input properties of an Operator.");