diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenlib/intern/system.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 14 |
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"); |