Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_access.c
| Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | |||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "RNA_define.h" | #include "RNA_define.h" | ||||
| #include "RNA_enum_types.h" | #include "RNA_enum_types.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_message.h" | |||||
| /* flush updates */ | /* flush updates */ | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "rna_internal.h" | #include "rna_internal.h" | ||||
| const PointerRNA PointerRNA_NULL = {{NULL}}; | const PointerRNA PointerRNA_NULL = {{NULL}}; | ||||
| ▲ Show 20 Lines • Show All 1,844 Lines • ▼ Show 20 Lines | if (prop->update) { | ||||
| else { | else { | ||||
| ((ContextUpdateFunc)prop->update)(C, ptr); | ((ContextUpdateFunc)prop->update)(C, ptr); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| else | else | ||||
| prop->update(bmain, scene, ptr); | prop->update(bmain, scene, ptr); | ||||
| } | } | ||||
| #if 0 | |||||
| if (prop->noteflag) | if (prop->noteflag) | ||||
| WM_main_add_notifier(prop->noteflag, ptr->id.data); | WM_main_add_notifier(prop->noteflag, ptr->id.data); | ||||
| #else | |||||
| { | |||||
| struct wmMsgBus *mbus = CTX_wm_message_bus(C); | |||||
| /* we could add NULL check, for now don't */ | |||||
| WM_msg_publish_rna(mbus, ptr, prop); | |||||
| } | |||||
| #endif | |||||
| } | } | ||||
| if (!is_rna || (prop->flag & PROP_IDPROPERTY)) { | if (!is_rna || (prop->flag & PROP_IDPROPERTY)) { | ||||
| /* WARNING! This is so property drivers update the display! | /* WARNING! This is so property drivers update the display! | ||||
| * not especially nice */ | * not especially nice */ | ||||
| DEG_id_tag_update(ptr->id.data, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); | DEG_id_tag_update(ptr->id.data, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); | ||||
| WM_main_add_notifier(NC_WINDOW, NULL); | WM_main_add_notifier(NC_WINDOW, NULL); | ||||
| /* Not nice as well, but the only way to make sure material preview | /* Not nice as well, but the only way to make sure material preview | ||||
| ▲ Show 20 Lines • Show All 5,314 Lines • Show Last 20 Lines | |||||