- CMake now only uses SOURCE_GROUP with MSVC lib configuration, saves recursive heade...
authorCampbell Barton <ideasman42@gmail.com>
Sat, 23 Oct 2010 04:18:53 +0000 (04:18 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 23 Oct 2010 04:18:53 +0000 (04:18 +0000)
- uv layout export wasn't setting the default filename.

build_files/cmake/macros.cmake
release/scripts/op/uv.py
source/blenderplayer/bad_level_call_stubs/stubs.c

index 08a571cceafc2ce519c4d1a7b2d40fb2752b7ee6..9237f01a950aefce8cca1f7a05faf90d0273b49c 100644 (file)
@@ -1,30 +1,45 @@
-MACRO(BLENDERLIB_NOLIST
-       name
-       sources
-       includes)
 
-       # Gather all headers
-       FILE(GLOB_RECURSE INC_ALL *.h)
-                
-       INCLUDE_DIRECTORIES(${includes})
-       ADD_LIBRARY(${name} ${INC_ALL} ${sources})
+IF(MSVC)
+       # only MSVC uses SOURCE_GROUP
+       MACRO(BLENDERLIB_NOLIST
+               name
+               sources
+               includes)
+
+               MESSAGE(STATUS "Configuring library ${name}")
+
+               # Gather all headers
+               FILE(GLOB_RECURSE INC_ALL *.h)
+                        
+               INCLUDE_DIRECTORIES(${includes})
+               ADD_LIBRARY(${name} ${INC_ALL} ${sources})
+
+               # Group by location on disk
+               SOURCE_GROUP(Files FILES CMakeLists.txt)
+               SET(ALL_FILES ${sources} ${INC_ALL})
+               FOREACH(SRC ${ALL_FILES})
+                       STRING(REGEX REPLACE ${CMAKE_CURRENT_SOURCE_DIR} "Files" REL_DIR "${SRC}")
+                       STRING(REGEX REPLACE "[\\\\/][^\\\\/]*$" "" REL_DIR "${REL_DIR}")
+                       STRING(REGEX REPLACE "^[\\\\/]" "" REL_DIR "${REL_DIR}")
+                       IF(REL_DIR)
+                               SOURCE_GROUP(${REL_DIR} FILES ${SRC})
+                       ELSE(REL_DIR)
+                               SOURCE_GROUP(Files FILES ${SRC})
+                       ENDIF(REL_DIR)
+               ENDFOREACH(SRC)
+       ENDMACRO(BLENDERLIB_NOLIST)
+ELSE(MSVC)
 
-       # Group by location on disk
-       SOURCE_GROUP(Files FILES CMakeLists.txt)
-       SET(ALL_FILES ${sources} ${INC_ALL})
-       FOREACH(SRC ${ALL_FILES})
-               STRING(REGEX REPLACE ${CMAKE_CURRENT_SOURCE_DIR} "Files" REL_DIR "${SRC}")
-               STRING(REGEX REPLACE "[\\\\/][^\\\\/]*$" "" REL_DIR "${REL_DIR}")
-               STRING(REGEX REPLACE "^[\\\\/]" "" REL_DIR "${REL_DIR}")
-               IF(REL_DIR)
-                       SOURCE_GROUP(${REL_DIR} FILES ${SRC})
-               ELSE(REL_DIR)
-                       SOURCE_GROUP(Files FILES ${SRC})
-               ENDIF(REL_DIR)
-       ENDFOREACH(SRC)
+       MACRO(BLENDERLIB_NOLIST
+               name
+               sources
+               includes)
 
-       MESSAGE(STATUS "Configuring library ${name}")
-ENDMACRO(BLENDERLIB_NOLIST)
+               MESSAGE(STATUS "Configuring library ${name}")
+               INCLUDE_DIRECTORIES(${includes})
+               ADD_LIBRARY(${name} ${sources})
+       ENDMACRO(BLENDERLIB_NOLIST)
+ENDIF(MSVC)
 
 MACRO(BLENDERLIB
        name
index 17520ff6d77c7d137645617fc8a6f55c2bd7d287..597421f305a5177c69f7b3a7d651602b1b06053d 100644 (file)
@@ -355,7 +355,9 @@ class ExportUVLayout(bpy.types.Operator):
 
 
     def invoke(self, context, event):
+        import os
         self.size = self._image_size(context)
+        self.filepath = os.path.splitext(bpy.data.filepath)[0]
         wm = context.window_manager
         wm.add_fileselect(self)
         return {'RUNNING_MODAL'}
index ace58791d745aaaba4e3ddbb2f938abdf75a5403..f2970293b05915df5eea68d1174298cc89381d78 100644 (file)
@@ -89,6 +89,7 @@ struct wmKeyMap;
 struct wmOperator;
 struct wmWindowManager;
 struct View3D;
+struct ToolSettings;
 
 
 /*new render funcs */