Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-11 17:46:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-11 17:46:58 +0400
commit3d3f6b1ddc655a070c20e41abec2e7850fd266e6 (patch)
treea91f11d6c1d4e0565e2b3f356e67d271e5c4c6fd /source/creator
parentab2fc6f106f3dc29c7a07b348facf61eac11fa05 (diff)
fix for 'blender -E' crashing.
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/creator.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 9b2cfb08382..264b4fc6208 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -542,22 +542,17 @@ static int set_output(int argc, const char **argv, void *data)
static int set_engine(int argc, const char **argv, void *data)
{
bContext *C = data;
- if (argc >= 1)
- {
- if (!strcmp(argv[1],"help"))
- {
+ if (argc >= 2) {
+ if (!strcmp(argv[1], "help")) {
RenderEngineType *type = NULL;
-
- for( type = R_engines.first; type; type = type->next )
- {
+ printf("Blender Engine Listing:\n");
+ for( type = R_engines.first; type; type = type->next ) {
printf("\t%s\n", type->idname);
}
exit(0);
}
- else
- {
- if (CTX_data_scene(C)==NULL)
- {
+ else {
+ if (CTX_data_scene(C)==NULL) {
printf("\nError: no blend loaded. order the arguments so '-E / --engine ' is after a blend is loaded.\n");
}
else {
@@ -574,7 +569,7 @@ static int set_engine(int argc, const char **argv, void *data)
}
else
{
- printf("\nEngine not specified.\n");
+ printf("\nEngine not specified, give 'help' for a list of available engines.\n");
return 0;
}
}