Fix T65662: Drivers on custom properties doesn't properly update
Happens if custom property is on object data data-block, which doesn't have translation or geometry components. Not for lights and cameras at least.
This commit is contained in:
parent
b50de0f8b7
commit
5e7e49e00d
Notes:
blender-bot
2023-02-14 02:15:22 +01:00
Referenced by issue #65662, Driver Referencing A Custom Property In Light Object Data Does Not Get Updated On Change
|
@ -226,6 +226,9 @@ void depsgraph_tag_to_component_opcode(const ID *id,
|
|||
case ID_RECALC_AUDIO:
|
||||
*component_type = NodeType::AUDIO;
|
||||
break;
|
||||
case ID_RECALC_PARAMETERS:
|
||||
*component_type = NodeType::PARAMETERS;
|
||||
break;
|
||||
case ID_RECALC_ALL:
|
||||
case ID_RECALC_PSYS_ALL:
|
||||
BLI_assert(!"Should not happen");
|
||||
|
@ -659,6 +662,8 @@ const char *DEG_update_tag_as_string(IDRecalcFlag flag)
|
|||
return "AUDIO_LISTENER";
|
||||
case ID_RECALC_AUDIO:
|
||||
return "AUDIO";
|
||||
case ID_RECALC_PARAMETERS:
|
||||
return "PARAMETERS";
|
||||
case ID_RECALC_ALL:
|
||||
return "ALL";
|
||||
}
|
||||
|
|
|
@ -614,6 +614,8 @@ typedef enum IDRecalcFlag {
|
|||
|
||||
ID_RECALC_AUDIO = (1 << 20),
|
||||
|
||||
ID_RECALC_PARAMETERS = (1 << 21),
|
||||
|
||||
/***************************************************************************
|
||||
* Pseudonyms, to have more semantic meaning in the actual code without
|
||||
* using too much low-level and implementation specific tags. */
|
||||
|
|
|
@ -2316,7 +2316,8 @@ static void rna_property_update(
|
|||
if (!is_rna || (prop->flag & PROP_IDPROPERTY)) {
|
||||
/* WARNING! This is so property drivers update the display!
|
||||
* not especially nice */
|
||||
DEG_id_tag_update(ptr->id.data, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
|
||||
DEG_id_tag_update(ptr->id.data,
|
||||
ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_PARAMETERS);
|
||||
WM_main_add_notifier(NC_WINDOW, NULL);
|
||||
/* Not nice as well, but the only way to make sure material preview
|
||||
* is updated with custom nodes.
|
||||
|
|
Loading…
Reference in New Issue