Changeset View
Changeset View
Standalone View
Standalone View
source/creator/creator_args.c
| Show First 20 Lines • Show All 1,084 Lines • ▼ Show 20 Lines | if (STREQ(argv[1], "help")) { | ||||
| for (type = R_engines.first; type; type = type->next) { | for (type = R_engines.first; type; type = type->next) { | ||||
| printf("\t%s\n", type->idname); | printf("\t%s\n", type->idname); | ||||
| } | } | ||||
| exit(0); | exit(0); | ||||
| } | } | ||||
| else { | else { | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| if (scene) { | if (scene) { | ||||
| RenderData *rd = &scene->r; | |||||
| if (BLI_findstring(&R_engines, argv[1], offsetof(RenderEngineType, idname))) { | if (BLI_findstring(&R_engines, argv[1], offsetof(RenderEngineType, idname))) { | ||||
| BLI_strncpy_utf8(rd->engine, argv[1], sizeof(rd->engine)); | BLI_strncpy_utf8(scene->view_render.engine_id, argv[1], sizeof(scene->view_render.engine_id)); | ||||
| } | } | ||||
| else { | else { | ||||
| printf("\nError: engine not found '%s'\n", argv[1]); | printf("\nError: engine not found '%s'\n", argv[1]); | ||||
| exit(1); | exit(1); | ||||
| } | } | ||||
| } | } | ||||
| else { | else { | ||||
| printf("\nError: no blend loaded. " | printf("\nError: no blend loaded. " | ||||
| ▲ Show 20 Lines • Show All 779 Lines • Show Last 20 Lines | |||||