Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/io/io_obj.c
| Show All 32 Lines | |||||
| #include "io_obj.h" | #include "io_obj.h" | ||||
| static const EnumPropertyItem io_obj_transform_axis_forward[] = { | static const EnumPropertyItem io_obj_transform_axis_forward[] = { | ||||
| {OBJ_AXIS_X_FORWARD, "X_FORWARD", 0, "X", "Positive X axis"}, | {OBJ_AXIS_X_FORWARD, "X_FORWARD", 0, "X", "Positive X axis"}, | ||||
| {OBJ_AXIS_Y_FORWARD, "Y_FORWARD", 0, "Y", "Positive Y axis"}, | {OBJ_AXIS_Y_FORWARD, "Y_FORWARD", 0, "Y", "Positive Y axis"}, | ||||
| {OBJ_AXIS_Z_FORWARD, "Z_FORWARD", 0, "Z", "Positive Z axis"}, | {OBJ_AXIS_Z_FORWARD, "Z_FORWARD", 0, "Z", "Positive Z axis"}, | ||||
| {OBJ_AXIS_NEGATIVE_X_FORWARD, "NEGATIVE_X_FORWARD", 0, "-X", "Negative X axis"}, | {OBJ_AXIS_NEGATIVE_X_FORWARD, "NEGATIVE_X_FORWARD", 0, "-X", "Negative X axis"}, | ||||
| {OBJ_AXIS_NEGATIVE_Y_FORWARD, "NEGATIVE_Y_FORWARD", 0, "-Y", "Negative Y axis"}, | {OBJ_AXIS_NEGATIVE_Y_FORWARD, "NEGATIVE_Y_FORWARD", 0, "-Y", "Negative Y axis"}, | ||||
| {OBJ_AXIS_NEGATIVE_Z_FORWARD, "NEGATIVE_Z_FORWARD", 0, "-Z (Default)", "Negative Z axis"}, | {OBJ_AXIS_NEGATIVE_Z_FORWARD, "NEGATIVE_Z_FORWARD", 0, "-Z", "Negative Z axis"}, | ||||
| {0, NULL, 0, NULL, NULL}}; | {0, NULL, 0, NULL, NULL}}; | ||||
| static const EnumPropertyItem io_obj_transform_axis_up[] = { | static const EnumPropertyItem io_obj_transform_axis_up[] = { | ||||
| {OBJ_AXIS_X_UP, "X_UP", 0, "X", "Positive X axis"}, | {OBJ_AXIS_X_UP, "X_UP", 0, "X", "Positive X axis"}, | ||||
| {OBJ_AXIS_Y_UP, "Y_UP", 0, "Y (Default)", "Positive Y axis"}, | {OBJ_AXIS_Y_UP, "Y_UP", 0, "Y", "Positive Y axis"}, | ||||
| {OBJ_AXIS_Z_UP, "Z_UP", 0, "Z", "Positive Z axis"}, | {OBJ_AXIS_Z_UP, "Z_UP", 0, "Z", "Positive Z axis"}, | ||||
| {OBJ_AXIS_NEGATIVE_X_UP, "NEGATIVE_X_UP", 0, "-X", "Negative X axis"}, | {OBJ_AXIS_NEGATIVE_X_UP, "NEGATIVE_X_UP", 0, "-X", "Negative X axis"}, | ||||
| {OBJ_AXIS_NEGATIVE_Y_UP, "NEGATIVE_Y_UP", 0, "-Y", "Negative Y axis"}, | {OBJ_AXIS_NEGATIVE_Y_UP, "NEGATIVE_Y_UP", 0, "-Y", "Negative Y axis"}, | ||||
| {OBJ_AXIS_NEGATIVE_Z_UP, "NEGATIVE_Z_UP", 0, "-Z", "Negative Z axis"}, | {OBJ_AXIS_NEGATIVE_Z_UP, "NEGATIVE_Z_UP", 0, "-Z", "Negative Z axis"}, | ||||
| {0, NULL, 0, NULL, NULL}}; | {0, NULL, 0, NULL, NULL}}; | ||||
| static const EnumPropertyItem io_obj_export_evaluation_mode[] = { | static const EnumPropertyItem io_obj_export_evaluation_mode[] = { | ||||
| {DAG_EVAL_RENDER, "DAG_EVAL_RENDER", 0, "Render", "Export objects as they appear in render"}, | {DAG_EVAL_RENDER, "DAG_EVAL_RENDER", 0, "Render", "Export objects as they appear in render"}, | ||||
| {DAG_EVAL_VIEWPORT, | {DAG_EVAL_VIEWPORT, | ||||
| "DAG_EVAL_VIEWPORT", | "DAG_EVAL_VIEWPORT", | ||||
| 0, | 0, | ||||
| "Viewport (Default)", | "Viewport", | ||||
| "Export objects as they appear in the viewport"}, | "Export objects as they appear in the viewport"}, | ||||
| {0, NULL, 0, NULL, NULL}}; | {0, NULL, 0, NULL, NULL}}; | ||||
| static int wm_obj_export_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) | static int wm_obj_export_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) | ||||
| { | { | ||||
| if (!RNA_struct_property_is_set(op->ptr, "filepath")) { | if (!RNA_struct_property_is_set(op->ptr, "filepath")) { | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| char filepath[FILE_MAX]; | char filepath[FILE_MAX]; | ||||
| ▲ Show 20 Lines • Show All 289 Lines • Show Last 20 Lines | |||||