diff options
-rwxr-xr-x | build_files/cmake/cmake_qtcreator_project.py | 9 | ||||
-rw-r--r-- | release/scripts/modules/bpy_extras/io_utils.py | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/build_files/cmake/cmake_qtcreator_project.py b/build_files/cmake/cmake_qtcreator_project.py index 07ffa659437..8cabc75e426 100755 --- a/build_files/cmake/cmake_qtcreator_project.py +++ b/build_files/cmake/cmake_qtcreator_project.py @@ -47,6 +47,13 @@ import os import sys +def quote_define(define): + if " " in define.strip(): + return '"%s"' % define + else: + return define + + def create_qtc_project_main(): files = list(source_list(SOURCE_DIR, filename_check=is_project_file)) files_rel = [os.path.relpath(f, start=PROJECT_DIR) for f in files] @@ -99,7 +106,7 @@ def create_qtc_project_main(): qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME) f = open(qtc_cfg, 'w') f.write("// ADD PREDEFINED MACROS HERE!\n") - defines_final = [("#define %s %s" % item) for item in defines] + defines_final = [("#define %s %s" % (item[0], quote_define(item[1]))) for item in defines] if sys.platform != "win32": defines_final += cmake_compiler_defines() f.write("\n".join(defines_final)) diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py index 3d71feaf79e..90f0d3f1c1d 100644 --- a/release/scripts/modules/bpy_extras/io_utils.py +++ b/release/scripts/modules/bpy_extras/io_utils.py @@ -269,8 +269,6 @@ def axis_conversion_ensure(operator, forward_attr, up_attr): return axis_forward, axis_up - change = False - axis = getattr(operator, forward_attr), getattr(operator, up_attr) axis_new = validate(*axis) |