merge from trunk 38379

This commit is contained in:
Xiao Xiangquan
2011-07-14 17:29:53 +00:00
352 changed files with 34266 additions and 32729 deletions

View File

@@ -231,7 +231,17 @@ else()
set(TARGETDIR ${EXECUTABLE_OUTPUT_PATH})
endif()
# install target
# -----------------------------------------------------------------------------
# Install Targets
set(BLENDER_TEXT_FILES
${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt
${CMAKE_SOURCE_DIR}/release/text/Python-license.txt
${CMAKE_SOURCE_DIR}/release/text/copyright.txt
${CMAKE_SOURCE_DIR}/release/text/readme.html
)
if(UNIX AND NOT APPLE)
if(WITH_INSTALL_PORTABLE)
@@ -274,9 +284,8 @@ if(UNIX AND NOT APPLE)
)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/release/text
FILES ${BLENDER_TEXT_FILES}
DESTINATION ${TARGETDIR}
PATTERN ".svn" EXCLUDE
)
else()
@@ -332,27 +341,26 @@ if(UNIX AND NOT APPLE)
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
)
install(
DIRECTORY ${CMAKE_SOURCE_DIR}/release/text
FILES ${BLENDER_TEXT_FILES}
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/doc/blender
PATTERN ".svn" EXCLUDE
)
endif()
install(
FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf
DESTINATION ${TARGETDIR_VER}/config
DESTINATION ${TARGETDIR_VER}
)
if(WITH_INTERNATIONAL)
install(
FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages
DESTINATION ${TARGETDIR_VER}/config
DESTINATION ${TARGETDIR_VER}
)
install(
DIRECTORY
${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
DESTINATION ${TARGETDIR_VER}/datafiles
PATTERN ".svn" EXCLUDE
)
@@ -411,25 +419,24 @@ elseif(WIN32)
)
install( # same as linux!, deduplicate
DIRECTORY ${CMAKE_SOURCE_DIR}/release/text
FILES ${BLENDER_TEXT_FILES}
DESTINATION ${TARGETDIR}
PATTERN ".svn" EXCLUDE
)
install( # same as linux!, deduplicate
FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf
DESTINATION ${TARGETDIR_VER}/config
DESTINATION ${TARGETDIR_VER}
)
if(WITH_INTERNATIONAL) # same as linux!, deduplicate
install(
FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages
DESTINATION ${TARGETDIR_VER}/config
DESTINATION ${TARGETDIR_VER}
)
install(
DIRECTORY
${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
DESTINATION ${TARGETDIR_VER}/datafiles
PATTERN ".svn" EXCLUDE
)
@@ -634,9 +641,9 @@ elseif(APPLE)
endmacro()
# install release and app files
install_dir(
${CMAKE_SOURCE_DIR}/release/text/
\${TARGETDIR}
install(
FILES ${BLENDER_TEXT_FILES}
DESTINATION ${TARGETDIR}
)
install(
@@ -651,7 +658,7 @@ elseif(APPLE)
install(
FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.bfont.ttf
DESTINATION ${TARGETDIR_VER}/datafiles
DESTINATION ${TARGETDIR_VER}
)
# localization
@@ -703,6 +710,12 @@ elseif(APPLE)
endif()
endif()
unset(BLENDER_TEXT_FILES)
# -----------------------------------------------------------------------------
# Setup link libs
add_dependencies(blender makesdna)
get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)

View File

@@ -64,6 +64,7 @@
#include "BLI_threads.h"
#include "BLI_scanfill.h" // for BLI_setErrorCallBack, TODO, move elsewhere
#include "BLI_utildefines.h"
#include "BLI_callbacks.h"
#include "DNA_ID.h"
#include "DNA_scene_types.h"
@@ -767,7 +768,9 @@ static int render_frame(int argc, const char **argv, void *data)
frame = MIN2(MAXFRAME, MAX2(MINAFRAME, frame));
RE_BlenderAnim(re, bmain, scene, NULL, scene->lay, frame, frame, scene->r.frame_step, &reports);
RE_SetReports(re, &reports);
RE_BlenderAnim(re, bmain, scene, NULL, scene->lay, frame, frame, scene->r.frame_step);
RE_SetReports(re, NULL);
return 1;
} else {
printf("\nError: frame number must follow '-f / --render-frame'.\n");
@@ -788,7 +791,9 @@ static int render_animation(int UNUSED(argc), const char **UNUSED(argv), void *d
Render *re= RE_NewRender(scene->id.name);
ReportList reports;
BKE_reports_init(&reports, RPT_PRINT);
RE_BlenderAnim(re, bmain, scene, NULL, scene->lay, scene->r.sfra, scene->r.efra, scene->r.frame_step, &reports);
RE_SetReports(re, &reports);
RE_BlenderAnim(re, bmain, scene, NULL, scene->lay, scene->r.sfra, scene->r.efra, scene->r.frame_step);
RE_SetReports(re, NULL);
} else {
printf("\nError: no blend loaded. cannot use '-a'.\n");
}
@@ -990,6 +995,7 @@ static int load_file(int UNUSED(argc), const char **argv, void *data)
#ifdef WITH_PYTHON
/* run any texts that were loaded in and flagged as modules */
BPY_driver_reset();
BPY_app_handlers_reset();
BPY_modules_load_user(C);
#endif
@@ -1128,7 +1134,8 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
#ifdef WITH_PYTHON_MODULE
/* allow python module to call main */
#define main main_python
#define main main_python_enter
static void *evil_C= NULL;
#endif
int main(int argc, const char **argv)
@@ -1139,6 +1146,7 @@ int main(int argc, const char **argv)
#ifdef WITH_PYTHON_MODULE
#undef main
evil_C= C;
#endif
#ifdef WITH_BINRELOC
@@ -1199,6 +1207,8 @@ int main(int argc, const char **argv)
IMB_init();
BLI_cb_init();
#ifdef WITH_GAMEENGINE
syshandle = SYS_GetSystem();
#else
@@ -1305,6 +1315,14 @@ int main(int argc, const char **argv)
return 0;
} /* end of int main(argc,argv) */
#ifdef WITH_PYTHON_MODULE
void main_python_exit(void)
{
WM_exit((bContext *)evil_C);
evil_C= NULL;
}
#endif
static void error_cb(const char *err)
{