Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-07-23 05:43:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-07-23 05:43:30 +0400
commit026ac2492232fac4fb7350ff210ba34b353a84e2 (patch)
tree0667dafd2dc948c93e6ac7b5be42d80045bd2f6f /source/blender/editors/space_script/script_edit.c
parent43d5357a2e0dc2be209bdcbdf63246002dda4a7f (diff)
[#22488] Reloading scripts causes crash
F8 key enabled again, useful for script UI development. - keying set freeing wasnt freeing from all scenes and the builtin list. - PointerProperty() cant refer to a removed python srna type (fixed in rigify and netrender). - Added a check for freeing a type used by a PointerProperty but its very slow, makes reloading take ~10sec. Only enabled this in debug mode for now. Netrender register() function isnt re-registering the property, probably because the module is cached by python and not re-run.
Diffstat (limited to 'source/blender/editors/space_script/script_edit.c')
-rw-r--r--source/blender/editors/space_script/script_edit.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c
index 71b37e514d7..6f41f235b7b 100644
--- a/source/blender/editors/space_script/script_edit.c
+++ b/source/blender/editors/space_script/script_edit.c
@@ -90,13 +90,9 @@ static int script_reload_exec(bContext *C, wmOperator *op)
#ifndef DISABLE_PYTHON
/* TODO, this crashes on netrender and keying sets, need to look into why
* disable for now unless running in debug mode */
- if(G.f & G_DEBUG) {
- BPY_eval_string(C, "__import__('bpy').utils.load_scripts(reload_scripts=True)");
- }
- else {
- BKE_reportf(op->reports, RPT_ERROR, "reloading is currently unstable, only operates in debug mode.\n");
- return OPERATOR_CANCELLED;
- }
+ WM_cursor_wait(1);
+ BPY_eval_string(C, "__import__('bpy').utils.load_scripts(reload_scripts=True)");
+ WM_cursor_wait(0);
return OPERATOR_FINISHED;
#endif
return OPERATOR_CANCELLED;