diff options
Diffstat (limited to 'source/blender/editors/io/io_obj.c')
-rw-r--r-- | source/blender/editors/io/io_obj.c | 39 |
1 files changed, 7 insertions, 32 deletions
diff --git a/source/blender/editors/io/io_obj.c b/source/blender/editors/io/io_obj.c index 59e8c20da04..05bccce7948 100644 --- a/source/blender/editors/io/io_obj.c +++ b/source/blender/editors/io/io_obj.c @@ -31,28 +31,11 @@ #include "DEG_depsgraph.h" +#include "IO_orientation.h" #include "IO_path_util_types.h" #include "IO_wavefront_obj.h" #include "io_obj.h" -static const EnumPropertyItem io_obj_transform_axis_forward[] = { - {OBJ_AXIS_X_FORWARD, "X_FORWARD", 0, "X", "Positive X 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_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_Z_FORWARD, "NEGATIVE_Z_FORWARD", 0, "-Z", "Negative Z axis"}, - {0, NULL, 0, NULL, NULL}}; - -static const EnumPropertyItem io_obj_transform_axis_up[] = { - {OBJ_AXIS_X_UP, "X_UP", 0, "X", "Positive X 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_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_Z_UP, "NEGATIVE_Z_UP", 0, "-Z", "Negative Z axis"}, - {0, NULL, 0, NULL, NULL}}; - 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_VIEWPORT, @@ -296,13 +279,9 @@ void WM_OT_obj_export(struct wmOperatorType *ot) INT_MIN, INT_MAX); /* Object transform options. */ - RNA_def_enum(ot->srna, - "forward_axis", - io_obj_transform_axis_forward, - OBJ_AXIS_NEGATIVE_Z_FORWARD, - "Forward Axis", - ""); - RNA_def_enum(ot->srna, "up_axis", io_obj_transform_axis_up, OBJ_AXIS_Y_UP, "Up Axis", ""); + RNA_def_enum( + ot->srna, "forward_axis", io_transform_axis, IO_AXIS_NEGATIVE_Z, "Forward Axis", ""); + RNA_def_enum(ot->srna, "up_axis", io_transform_axis, IO_AXIS_Y, "Up Axis", ""); RNA_def_float(ot->srna, "scaling_factor", 1.0f, @@ -480,13 +459,9 @@ void WM_OT_obj_import(struct wmOperatorType *ot) "Resize the objects to keep bounding box under this value. Value 0 disables clamping", 0.0f, 1000.0f); - RNA_def_enum(ot->srna, - "forward_axis", - io_obj_transform_axis_forward, - OBJ_AXIS_NEGATIVE_Z_FORWARD, - "Forward Axis", - ""); - RNA_def_enum(ot->srna, "up_axis", io_obj_transform_axis_up, OBJ_AXIS_Y_UP, "Up Axis", ""); + RNA_def_enum( + ot->srna, "forward_axis", io_transform_axis, IO_AXIS_NEGATIVE_Z, "Forward Axis", ""); + RNA_def_enum(ot->srna, "up_axis", io_transform_axis, IO_AXIS_Y, "Up Axis", ""); RNA_def_boolean(ot->srna, "validate_meshes", false, |