mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix: Grease Pencil palettes were missing a RNA path callback
This commit is contained in:
parent
759b5fb2a6
commit
0b734f0b59
1 changed files with 11 additions and 0 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue