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:
Diffstat (limited to 'source/blender/editors/io/io_alembic.c')
-rw-r--r--source/blender/editors/io/io_alembic.c36
1 files changed, 28 insertions, 8 deletions
diff --git a/source/blender/editors/io/io_alembic.c b/source/blender/editors/io/io_alembic.c
index 28838d677f0..12890552b1d 100644
--- a/source/blender/editors/io/io_alembic.c
+++ b/source/blender/editors/io/io_alembic.c
@@ -63,10 +63,26 @@
# include "WM_api.h"
# include "WM_types.h"
+# include "DEG_depsgraph.h"
+
# include "io_alembic.h"
# include "ABC_alembic.h"
+const EnumPropertyItem rna_enum_abc_export_evaluation_mode_items[] = {
+ {DAG_EVAL_RENDER,
+ "RENDER",
+ 0,
+ "Render",
+ "Use Render settings for object visibility, modifier settings, etc"},
+ {DAG_EVAL_VIEWPORT,
+ "VIEWPORT",
+ 0,
+ "Viewport",
+ "Use Viewport settings for object visibility, modifier settings, etc"},
+ {0, NULL, 0, NULL, NULL},
+};
+
static int wm_alembic_export_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
if (!RNA_struct_property_is_set(op->ptr, "as_background_job")) {
@@ -126,7 +142,6 @@ static int wm_alembic_export_exec(bContext *C, wmOperator *op)
.curves_as_mesh = RNA_boolean_get(op->ptr, "curves_as_mesh"),
.flatten_hierarchy = RNA_boolean_get(op->ptr, "flatten"),
.visible_objects_only = RNA_boolean_get(op->ptr, "visible_objects_only"),
- .renderable_only = RNA_boolean_get(op->ptr, "renderable_only"),
.face_sets = RNA_boolean_get(op->ptr, "face_sets"),
.use_subdiv_schema = RNA_boolean_get(op->ptr, "subdiv_schema"),
.export_hair = RNA_boolean_get(op->ptr, "export_hair"),
@@ -137,6 +152,7 @@ static int wm_alembic_export_exec(bContext *C, wmOperator *op)
.triangulate = RNA_boolean_get(op->ptr, "triangulate"),
.quad_method = RNA_enum_get(op->ptr, "quad_method"),
.ngon_method = RNA_enum_get(op->ptr, "ngon_method"),
+ .evaluation_mode = RNA_enum_get(op->ptr, "evaluation_mode"),
.global_scale = RNA_float_get(op->ptr, "global_scale"),
};
@@ -194,9 +210,11 @@ static void ui_alembic_export_settings(uiLayout *layout, PointerRNA *imfptr)
sub = uiLayoutColumnWithHeading(col, true, IFACE_("Only"));
uiItemR(sub, imfptr, "selected", 0, IFACE_("Selected Objects"), ICON_NONE);
- uiItemR(sub, imfptr, "renderable_only", 0, IFACE_("Renderable Objects"), ICON_NONE);
uiItemR(sub, imfptr, "visible_objects_only", 0, IFACE_("Visible Objects"), ICON_NONE);
+ col = uiLayoutColumn(box, true);
+ uiItemR(col, imfptr, "evaluation_mode", 0, NULL, ICON_NONE);
+
/* Object Data */
box = uiLayoutBox(layout);
row = uiLayoutRow(box, false);
@@ -355,12 +373,6 @@ void WM_OT_alembic_export(wmOperatorType *ot)
ot->srna, "selected", 0, "Selected Objects Only", "Export only selected objects");
RNA_def_boolean(ot->srna,
- "renderable_only",
- 1,
- "Renderable Objects Only",
- "Export only objects marked renderable in the outliner");
-
- RNA_def_boolean(ot->srna,
"visible_objects_only",
0,
"Visible Objects Only",
@@ -468,6 +480,14 @@ void WM_OT_alembic_export(wmOperatorType *ot)
"This option is deprecated; EXECUTE this operator to run in the foreground, and INVOKE it "
"to run as a background job");
+ RNA_def_enum(ot->srna,
+ "evaluation_mode",
+ rna_enum_abc_export_evaluation_mode_items,
+ DAG_EVAL_RENDER,
+ "Use Settings for",
+ "Determines visibility of objects, modifier settings, and other areas where there "
+ "are different settings for viewport and rendering");
+
/* This dummy prop is used to check whether we need to init the start and
* end frame values to that of the scene's, otherwise they are reset at
* every change, draw update. */