Fix T62366: Grease pencil material color keying
Do proper tagging for material changes, and avoid grease-pencil hack in the relations builder. The dependency graph code was forcing animation to be run for any copy-on-write change of material. However, animation is not supposed to be run on copy-on-write changes.
This commit is contained in:
parent
4879d8001c
commit
01dec326ed
Notes:
blender-bot
2023-02-14 10:14:07 +01:00
Referenced by issue #62366, Grease pencil matterial color keying
|
@ -2623,10 +2623,6 @@ void DepsgraphRelationBuilder::build_copy_on_write_relations(IDNode *id_node)
|
|||
if (id_type == ID_ME && comp_node->type == NodeType::GEOMETRY) {
|
||||
rel_flag &= ~RELATION_FLAG_NO_FLUSH;
|
||||
}
|
||||
/* materials need update grease pencil objects */
|
||||
if (id_type == ID_MA) {
|
||||
rel_flag &= ~RELATION_FLAG_NO_FLUSH;
|
||||
}
|
||||
/* Notes on exceptions:
|
||||
* - Parameters component is where drivers are living. Changing any
|
||||
* of the (custom) properties in the original datablock (even the
|
||||
|
|
|
@ -91,7 +91,7 @@ static void rna_Material_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Point
|
|||
{
|
||||
Material *ma = ptr->id.data;
|
||||
|
||||
DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ma->id, ID_RECALC_SHADING);
|
||||
WM_main_add_notifier(NC_MATERIAL | ND_SHADING, ma);
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ static void rna_Material_draw_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
|
|||
{
|
||||
Material *ma = ptr->id.data;
|
||||
|
||||
DEG_id_tag_update(&ma->id, ID_RECALC_COPY_ON_WRITE);
|
||||
DEG_id_tag_update(&ma->id, ID_RECALC_SHADING);
|
||||
WM_main_add_notifier(NC_MATERIAL | ND_SHADING_DRAW, ma);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue