Commit: 6917de6919408f5ceecf578b884fa207fee67262 Author: Joshua Leung Date: Fri Oct 14 01:18:53 2016 +1300 Branches: master https://developer.blender.org/rB6917de6919408f5ceecf578b884fa207fee67262
Fix: Grease Pencil palettes were missing a RNA path callback =================================================================== M source/blender/makesrna/intern/rna_gpencil.c =================================================================== diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index 9b881c1..7ba8953 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 */ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs