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:
-rw-r--r--source/blender/makesrna/intern/rna_rna.c1
-rw-r--r--source/blender/python/intern/bpy_interface.c3
-rw-r--r--source/blender/python/intern/bpy_rna.c14
-rw-r--r--source/blender/python/intern/bpy_rna.h1
4 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index d86ab720b90..c69fb968d18 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -436,6 +436,7 @@ static void rna_def_property(BlenderRNA *brna)
{PROP_NONE, "NONE", "None", ""},
{PROP_UNSIGNED, "UNSIGNED", "Unsigned Number", ""},
{PROP_FILEPATH, "FILEPATH", "File Path", ""},
+ {PROP_DIRPATH, "DIRPATH", "Directory Path", ""},
{PROP_COLOR, "COLOR", "Color", ""},
{PROP_VECTOR, "VECTOR", "Vector", ""},
{PROP_MATRIX, "MATRIX", "Matrix", ""},
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index 8ae7dcb5c88..d30809ff39b 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -25,6 +25,9 @@ static PyObject *CreateGlobalDictionary( void )
PyDict_SetItemString( dict, "bpy", item );
Py_DECREF(item);
+ item = BPY_rna_doc();
+ PyDict_SetItemString( dict, "bpydoc", item );
+ Py_DECREF(item);
return dict;
}
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 0267fa35fd2..356cb40965f 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -1145,3 +1145,17 @@ PyObject *BPY_rna_module( void )
//submodule = Py_InitModule3( "rna", M_rna_methods, "rna module" );
return pyrna_struct_CreatePyObject(&ptr);
}
+
+/* This is a way we can access docstrings for RNA types
+ * without having the datatypes in blender */
+PyObject *BPY_rna_doc( void )
+{
+ PointerRNA ptr;
+
+ /* for now, return the base RNA type rather then a real module */
+ RNA_blender_rna_pointer_create(&ptr);
+
+ return pyrna_struct_CreatePyObject(&ptr);
+}
+
+
diff --git a/source/blender/python/intern/bpy_rna.h b/source/blender/python/intern/bpy_rna.h
index 6ceda34268f..94f97a565a4 100644
--- a/source/blender/python/intern/bpy_rna.h
+++ b/source/blender/python/intern/bpy_rna.h
@@ -44,6 +44,7 @@ typedef struct {
} BPy_PropertyRNA;
PyObject *BPY_rna_module( void );
+PyObject *BPY_rna_doc( void );
PyObject *pyrna_struct_CreatePyObject( PointerRNA *ptr );
PyObject *pyrna_prop_CreatePyObject( PointerRNA *ptr, PropertyRNA *prop );