From f6c79c553b8ac512ff5bd394b956a0a8d0ff27a8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 12 Jan 2010 10:04:03 +0000 Subject: [PATCH] [#20646] 2.5 does not load python scripts with multiple dots in the filename - not a bug so add a warning if people add scripts with invalid names like this. --- release/scripts/modules/bpy/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/release/scripts/modules/bpy/__init__.py b/release/scripts/modules/bpy/__init__.py index 6209cbe4f0e..c760268d6f7 100644 --- a/release/scripts/modules/bpy/__init__.py +++ b/release/scripts/modules/bpy/__init__.py @@ -47,6 +47,10 @@ def load_scripts(reload_scripts=False): t_main = time.time() def test_import(module_name): + if "." in module_name: + print("Ignoring '%s', can't import files containing multiple periods." % module_name) + return None + try: t = time.time() ret = __import__(module_name)