diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_color.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_color.c | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c index aa1164068d8..083551f2367 100644 --- a/source/blender/makesrna/intern/rna_color.c +++ b/source/blender/makesrna/intern/rna_color.c @@ -54,13 +54,14 @@ #include "BKE_colorband.h" #include "BKE_colortools.h" -#include "BKE_depsgraph.h" #include "BKE_image.h" #include "BKE_movieclip.h" #include "BKE_node.h" #include "BKE_sequencer.h" #include "BKE_linestyle.h" +#include "DEG_depsgraph.h" + #include "ED_node.h" #include "IMB_colormanagement.h" @@ -159,17 +160,6 @@ static char *rna_ColorRamp_path(PointerRNA *ptr) ID *id = ptr->id.data; switch (GS(id->name)) { - case ID_MA: /* material has 2 cases - diffuse and specular */ - { - Material *ma = (Material *)id; - - if (ptr->data == ma->ramp_col) - path = BLI_strdup("diffuse_ramp"); - else if (ptr->data == ma->ramp_spec) - path = BLI_strdup("specular_ramp"); - break; - } - case ID_NT: { bNodeTree *ntree = (bNodeTree *)id; @@ -244,22 +234,6 @@ static char *rna_ColorRampElement_path(PointerRNA *ptr) ID *id = ptr->id.data; switch (GS(id->name)) { - case ID_MA: /* 2 cases for material - diffuse and spec */ - { - Material *ma = (Material *)id; - - /* try diffuse first */ - if (ma->ramp_col) { - RNA_pointer_create(id, &RNA_ColorRamp, ma->ramp_col, &ramp_ptr); - COLRAMP_GETPATH; - } - /* try specular if not diffuse */ - if (!path && ma->ramp_spec) { - RNA_pointer_create(id, &RNA_ColorRamp, ma->ramp_spec, &ramp_ptr); - COLRAMP_GETPATH; - } - break; - } case ID_NT: { bNodeTree *ntree = (bNodeTree *)id; @@ -315,7 +289,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA * { Material *ma = ptr->id.data; - DAG_id_tag_update(&ma->id, 0); + DEG_id_tag_update(&ma->id, 0); WM_main_add_notifier(NC_MATERIAL | ND_SHADING_DRAW, ma); break; } @@ -335,7 +309,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA * { Tex *tex = ptr->id.data; - DAG_id_tag_update(&tex->id, 0); + DEG_id_tag_update(&tex->id, 0); WM_main_add_notifier(NC_TEXTURE, tex); break; } @@ -350,7 +324,7 @@ static void rna_ColorRamp_update(Main *bmain, Scene *UNUSED(scene), PointerRNA * { ParticleSettings *part = ptr->id.data; - DAG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_REDO); + DEG_id_tag_update(&part->id, OB_RECALC_DATA | PSYS_RECALC_REDO); WM_main_add_notifier(NC_OBJECT | ND_PARTICLE | NA_EDITED, part); } default: @@ -446,7 +420,7 @@ static void rna_ColorManagedDisplaySettings_display_device_update(Main *UNUSED(b IMB_colormanagement_validate_settings(&scene->display_settings, &scene->view_settings); - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL); } } @@ -581,7 +555,7 @@ static void rna_ColorManagedColorspaceSettings_reload_update(Main *bmain, Scene if (GS(id->name) == ID_IM) { Image *ima = (Image *) id; - DAG_id_tag_update(&ima->id, 0); + DEG_id_tag_update(&ima->id, 0); BKE_image_signal(bmain, ima, NULL, IMA_SIGNAL_COLORMANAGE); @@ -664,7 +638,7 @@ static void rna_ColorManagement_update(Main *UNUSED(bmain), Scene *UNUSED(scene) return; if (GS(id->name) == ID_SCE) { - DAG_id_tag_update(id, 0); + DEG_id_tag_update(id, 0); WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL); } } |