Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/io/io_stl_ops.c
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| /** \file | /** \file | ||||
| * \ingroup editor/io | * \ingroup editor/io | ||||
| */ | */ | ||||
| #ifdef WITH_IO_STL | |||||
| #include "BKE_context.h" | # include "BKE_context.h" | ||||
| #include "BKE_report.h" | # include "BKE_report.h" | ||||
| #include "WM_api.h" | # include "WM_api.h" | ||||
| #include "WM_types.h" | # include "WM_types.h" | ||||
| #include "DNA_space_types.h" | # include "DNA_space_types.h" | ||||
| #include "ED_outliner.h" | # include "ED_outliner.h" | ||||
| #include "RNA_access.h" | # include "RNA_access.h" | ||||
| #include "RNA_define.h" | # include "RNA_define.h" | ||||
| #include "IO_stl.h" | # include "IO_stl.h" | ||||
| #include "io_stl_ops.h" | # include "io_stl_ops.h" | ||||
| static int wm_stl_import_invoke(bContext *C, wmOperator *op, const wmEvent *event) | static int wm_stl_import_invoke(bContext *C, wmOperator *op, const wmEvent *event) | ||||
| { | { | ||||
| return WM_operator_filesel(C, op, event); | return WM_operator_filesel(C, op, event); | ||||
| } | } | ||||
| static int wm_stl_import_execute(bContext *C, wmOperator *op) | static int wm_stl_import_execute(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | RNA_def_boolean(ot->srna, | ||||
| false, | false, | ||||
| "Validate Mesh", | "Validate Mesh", | ||||
| "Validate and correct imported mesh (slow)"); | "Validate and correct imported mesh (slow)"); | ||||
| /* Only show .stl files by default. */ | /* Only show .stl files by default. */ | ||||
| prop = RNA_def_string(ot->srna, "filter_glob", "*.stl", 0, "Extension Filter", ""); | prop = RNA_def_string(ot->srna, "filter_glob", "*.stl", 0, "Extension Filter", ""); | ||||
| RNA_def_property_flag(prop, PROP_HIDDEN); | RNA_def_property_flag(prop, PROP_HIDDEN); | ||||
| } | } | ||||
| #endif /* WITH_IO_STL */ | |||||