diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_color.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_color.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index ed2283dedab..4793310e192 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -47,6 +47,7 @@ #include "BKE_depsgraph.h" #include "BKE_node.h" #include "BKE_texture.h" +#include "BKE_linestyle.h" #include "WM_api.h" #include "WM_types.h" @@ -150,6 +151,14 @@ static char *rna_ColorRamp_path(PointerRNA *ptr) return BLI_strdup("specular_ramp"); } break; + + case ID_LS: + { + char *path = FRS_path_from_ID_to_color_ramp((FreestyleLineStyle *)id, (ColorBand *)ptr->data); + if (path) + return path; + } + break; } } @@ -219,6 +228,20 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr) } break; + case ID_LS: + { + ListBase listbase; + LinkData *link; + + FRS_list_modifier_color_ramps((FreestyleLineStyle *)id, &listbase); + for (link = (LinkData *)listbase.first; link; link = link->next) { + RNA_pointer_create(id, &RNA_ColorRamp, link->data, &ramp_ptr); + COLRAMP_GETPATH; + } + BLI_freelistN(&listbase); + } + break; + default: /* everything else should have a "color_ramp" property */ { /* create pointer to the ID block, and try to resolve "color_ramp" pointer */ @@ -270,6 +293,13 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA * WM_main_add_notifier(NC_TEXTURE, tex); } break; + case ID_LS: + { + FreestyleLineStyle *linestyle= ptr->id.data; + + WM_main_add_notifier(NC_LINESTYLE, linestyle); + } + break; default: break; } |