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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-07-25 20:33:55 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-07-25 20:33:55 +0300
commitbcc020b1bc1b60f6cbd6d2c9bf400744931e57e1 (patch)
treefef4d83d0e5addb59c8389adf125281a4c7e35f8 /source/blender/makesrna/intern/rna_ID.c
parent99bb1accbbb8e1ba38f30b073b22deb107bf3220 (diff)
parent3f36cd3f33e52d53d82a3a221e2a576cf26390a5 (diff)
Merge branch 'asset-engine' into asset-experimentsasset-experiments
Conflicts: source/blender/blenloader/intern/readfile.c
Diffstat (limited to 'source/blender/makesrna/intern/rna_ID.c')
-rw-r--r--source/blender/makesrna/intern/rna_ID.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 533b1991ba5..528aabf33ee 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -698,7 +698,7 @@ static void rna_ImagePreview_icon_pixels_float_set(PointerRNA *ptr, const float
static int rna_ImagePreview_icon_id_get(PointerRNA *ptr)
{
/* Using a callback here allows us to only generate icon matching that preview when icon_id is requested. */
- return BKE_icon_preview_ensure((PreviewImage *)(ptr->data));
+ return BKE_icon_preview_ensure(ptr->id.data, (PreviewImage *)(ptr->data));
}
static void rna_ImagePreview_icon_reload(PreviewImage *prv)
{
@@ -1061,6 +1061,7 @@ static void rna_def_ID(BlenderRNA *brna)
static void rna_def_library(BlenderRNA *brna)
{
StructRNA *srna;
+ FunctionRNA *func;
PropertyRNA *prop;
srna = RNA_def_struct(brna, "Library", "ID");
@@ -1079,6 +1080,10 @@ static void rna_def_library(BlenderRNA *brna)
prop = RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "packedfile");
RNA_def_property_ui_text(prop, "Packed File", "");
+
+ 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 datablocks");
}
void RNA_def_ID(BlenderRNA *brna)
{