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
path: root/source
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-02-17 17:57:34 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-02-17 17:57:34 +0300
commitc5f13ecbc064a3cb2c57492d7c7075e248be5bda (patch)
tree18278120919d1443dcc2d04d905bcc6f3e3c7a35 /source
parent319b9d6501f2170dcf06b10de0add340d0be83a3 (diff)
parent8a97b8555587d8241fd79d54c08c1a6ced7acf53 (diff)
Merge branch 'blender2.7'
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenlib/intern/system.c1
-rw-r--r--source/blender/makesrna/intern/rna_ID.c14
2 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/system.c b/source/blender/blenlib/intern/system.c
index 22fbd20ccf3..7cb987c0bbd 100644
--- a/source/blender/blenlib/intern/system.c
+++ b/source/blender/blenlib/intern/system.c
@@ -28,6 +28,7 @@
/* for backtrace and gethostname/GetComputerName */
#if defined(WIN32)
+# include <intrin.h>
# include <windows.h>
# include <dbghelp.h>
#else
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index b3660fe6fb0..6ace86d0076 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -848,6 +848,14 @@ static IDProperty *rna_IDPropertyWrapPtr_idprops(PointerRNA *ptr, bool UNUSED(cr
return ptr->data;
}
+static void rna_Library_version_get(PointerRNA *ptr, int *value)
+{
+ Library *lib = (Library *)ptr->data;
+ value[0] = lib->versionfile / 100;
+ value[1] = lib->versionfile % 100;
+ value[2] = lib->subversionfile;
+}
+
#else
static void rna_def_ID_properties(BlenderRNA *brna)
@@ -1316,6 +1324,12 @@ static void rna_def_library(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "packedfile");
RNA_def_property_ui_text(prop, "Packed File", "");
+ prop = RNA_def_int_vector(srna, "version", 3, NULL, 0, INT_MAX,
+ "Version", "Version of Blender the library .blend was saved with", 0, INT_MAX);
+ RNA_def_property_int_funcs(prop, "rna_Library_version_get", NULL, NULL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_flag(prop, PROP_THICK_WRAP);
+
func = RNA_def_function(srna, "reload", "WM_lib_reload");
RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Reload this library and all its linked data-blocks");