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:
authorCampbell Barton <ideasman42@gmail.com>2009-07-10 08:25:49 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-07-10 08:25:49 +0400
commit1e85785704c8602ed90e2feae99b94735eec4d33 (patch)
tree7b595f5bb3124905c3b1927ca7ccc73c0bf21eb5 /source/blender/makesrna
parent9241559ab4c223d30a949f2e06c776642b69715c (diff)
PyRNA api wasnt using python subclasses most of the time.
Now this will return True isinstance(bpy.data.meshes[0], bpy.types.Mesh) Use the StructRNA identifier for the new classes name properties because classes were being named by the data names rather then the type names. Set the __module__ for the new type which makes printing the class not use the script name where the type is first initialized. eg: bpy.types.Mesh instead of buttons_object.Mesh This still isnt quite right since opertators and panels all get their own type, when they should all use an operator type.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/RNA_access.h1
-rw-r--r--source/blender/makesrna/intern/rna_access.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index e145722428c..3b2520c41b2 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -496,6 +496,7 @@ int RNA_struct_ui_icon(StructRNA *type);
PropertyRNA *RNA_struct_name_property(StructRNA *type);
PropertyRNA *RNA_struct_iterator_property(StructRNA *type);
+StructRNA *RNA_struct_base(StructRNA *type);
int RNA_struct_is_ID(StructRNA *type);
int RNA_struct_is_a(StructRNA *type, StructRNA *srna);
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index cc8704dc350..eb53d0fbf51 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -392,6 +392,11 @@ PropertyRNA *RNA_struct_iterator_property(StructRNA *type)
return type->iteratorproperty;
}
+StructRNA *RNA_struct_base(StructRNA *type)
+{
+ return type->base;
+}
+
int RNA_struct_is_ID(StructRNA *type)
{
return (type->flag & STRUCT_ID) != 0;