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:
authorJoshua Leung <aligorith@gmail.com>2016-10-13 15:18:53 +0300
committerJoshua Leung <aligorith@gmail.com>2016-10-13 15:19:30 +0300
commit6917de6919408f5ceecf578b884fa207fee67262 (patch)
treeb5fdfb35c54e3f77ae19f09939e7586bac8a948e /source/blender/makesrna
parent5c651554e2f98bff1cfdff0a6a6f029453dc3309 (diff)
Fix: Grease Pencil palettes were missing a RNA path callback
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 9b881c13347..7ba89538b18 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -783,6 +783,16 @@ static void rna_GPencilPalette_info_set(PointerRNA *ptr, const char *value)
sizeof(palette->info));
}
+static char *rna_GPencilPalette_path(PointerRNA *ptr)
+{
+ bGPDpalette *palette = ptr->data;
+ char name_esc[sizeof(palette->info) * 2];
+
+ BLI_strescape(name_esc, palette->info, sizeof(name_esc));
+
+ return BLI_sprintfN("palettes[\"%s\"]", name_esc);
+}
+
static char *rna_GPencilPalette_color_path(PointerRNA *ptr)
{
bGPdata *gpd = ptr->id.data;
@@ -1510,6 +1520,7 @@ static void rna_def_gpencil_palette(BlenderRNA *brna)
srna = RNA_def_struct(brna, "GPencilPalette", NULL);
RNA_def_struct_sdna(srna, "bGPDpalette");
RNA_def_struct_ui_text(srna, "Grease Pencil Palette", "Collection of related palettes");
+ RNA_def_struct_path_func(srna, "rna_GPencilPalette_path");
RNA_def_struct_ui_icon(srna, ICON_COLOR);
/* Name */