Python/context: python could get invalid bpy.data in scene update handler after

undo.

The way this got updated from the context is a bit unreliable, and for handlers
the update couldn't happen because there is no context passed in. Now it's
updated from setup_app_data, which is where the change actually happens. I left
in the other updates to be sure but they should not be needed anymore.
This commit is contained in:
2012-05-08 22:07:06 +00:00
parent f6abd6ee40
commit d9ce1cda94
5 changed files with 19 additions and 7 deletions

View File

@@ -6339,11 +6339,13 @@ PyObject *BPY_rna_module(void)
void BPY_update_rna_module(void)
{
if(rna_module_ptr) {
#if 0
RNA_main_pointer_create(G.main, rna_module_ptr);
RNA_main_pointer_create(G.main, rna_module_ptr);
#else
rna_module_ptr->data = G.main; /* just set data is enough */
rna_module_ptr->data = G.main; /* just set data is enough */
#endif
}
}
#if 0