Revision: 20164
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20164
Author: campbellbarton
Date: 2009-05-12 00:17:58 +0200 (Tue, 12 May 2009)
Log Message:
-----------
problem with unloading modules, py modules would be refreshed but external
modules that were pyc or pyo's would be kept.
This made it not refresh the module when taking an external BGE Module and
making it internal because the external pyc would never be freed so the
internal text wouldn't get used until restarting blender.
Modified Paths:
--------------
trunk/blender/source/blender/python/api2_2x/bpy_internal_import.c
Modified: trunk/blender/source/blender/python/api2_2x/bpy_internal_import.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/bpy_internal_import.c
2009-05-11 22:07:30 UTC (rev 20163)
+++ trunk/blender/source/blender/python/api2_2x/bpy_internal_import.c
2009-05-11 22:17:58 UTC (rev 20164)
@@ -316,7 +316,7 @@
if(fname) {
if (clear_all || ((strstr(fname, SEPSTR))==0)) { /* no
path ? */
file_extension = strstr(fname, ".py");
- if(file_extension && *(file_extension + 3) ==
'\0') { /* .py extension ? */
+ if(file_extension && (*(file_extension + 3) ==
'\0' || *(file_extension + 4) == '\0')) { /* .py or pyc extension? */
/* now we can be fairly sure its a
python import from the blendfile */
PyList_Append(list, key); /* free'd
with the list */
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs