48 "Vertex colors in the file are in sRGB color space"},
53 "Vertex colors in the file are in linear color space"},
54 {0,
nullptr, 0,
nullptr,
nullptr}};
120 sub = &
col->column(
false,
IFACE_(
"Include"));
149 bool changed =
false;
164 ot->name =
"Export PLY";
165 ot->description =
"Save the scene to a PLY file";
166 ot->idname =
"WM_OT_ply_export";
168 ot->invoke = wm_ply_export_invoke;
169 ot->exec = wm_ply_export_exec;
171 ot->ui = wm_ply_export_draw;
172 ot->check = wm_ply_export_check;
196 "Value by which to enlarge or shrink the objects with respect to the world's origin",
201 ot->srna,
"apply_modifiers",
true,
"Apply Modifiers",
"Apply modifiers to exported meshes");
203 "export_selected_objects",
205 "Export Selected Objects",
206 "Export only selected objects instead of all supported objects");
212 "Export only objects from this collection (and its children)");
220 "Export Vertex Normals",
221 "Export specific vertex normals if available, export calculated normals otherwise");
224 ply_vertex_colors_mode,
226 "Export Vertex Colors",
227 "Export vertex color attributes");
231 "Export Vertex Attributes",
232 "Export custom vertex attributes");
234 "export_triangulated_mesh",
236 "Export Triangulated Mesh",
237 "All ngons with four or more vertices will be triangulated. Meshes in "
238 "the scene will not be affected. Behaves like Triangulate Modifier with "
239 "ngon-method: \"Beauty\", quad-method: \"Shortest Diagonal\", min vertices: 4");
244 "Export file in ASCII format, export as binary otherwise");
247 prop =
RNA_def_string(
ot->srna,
"filter_glob",
"*.ply", 0,
"Extension Filter",
"");
266 if (paths.is_empty()) {
270 for (
const auto &path : paths) {
306 ui_ply_import_settings(
C, op->
layout, op->
ptr);
313 ot->name =
"Import PLY";
314 ot->description =
"Import an PLY file as an object";
315 ot->idname =
"WM_OT_ply_import";
318 ot->exec = wm_ply_import_exec;
319 ot->ui = wm_ply_import_draw;
332 RNA_def_float(
ot->srna,
"global_scale", 1.0f, 1e-6f, 1e6f,
"Scale",
"", 0.001f, 1000.0f);
337 "Apply current scene's unit (as defined by unit scale) to imported data");
342 RNA_def_boolean(
ot->srna,
"merge_verts",
false,
"Merge Vertices",
"Merges vertices by distance");
345 ply_vertex_colors_mode,
348 "Import vertex color attributes");
350 ot->srna,
"import_attributes",
true,
"Vertex Attributes",
"Import custom vertex attributes");
353 prop =
RNA_def_string(
ot->srna,
"filter_glob",
"*.ply", 0,
"Extension Filter",
"");
360 auto fh = std::make_unique<blender::bke::FileHandlerType>();
SpaceFile * CTX_wm_space_file(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
bool BKE_reports_contain(ReportList *reports, eReportType level)
void BKE_report(ReportList *reports, eReportType type, const char *message)
bool BLI_path_extension_check(const char *path, const char *ext) ATTR_NONNULL(1
bool BLI_path_extension_ensure(char *path, size_t path_maxncpy, const char *ext) ATTR_NONNULL(1
char * STRNCPY(char(&dst)[N], const char *src)
#define STRNCPY_UTF8(dst, src)
void ED_fileselect_ensure_default_filepath(bContext *C, wmOperator *op, const char *extension)
void ED_outliner_select_sync_from_object_tag(bContext *C)
void PLY_import(bContext *C, const PLYImportParams ¶ms)
void PLY_export(bContext *C, const PLYExportParams ¶ms)
void WM_OT_ply_export(wmOperatorType *ot)
void WM_OT_ply_import(wmOperatorType *ot)
void file_handler_add(std::unique_ptr< FileHandlerType > file_handler)
bool poll_file_object_drop(const bContext *C, blender::bke::FileHandlerType *)
Vector< std::string > paths_from_operator_properties(PointerRNA *ptr)
wmOperatorStatus filesel_drop_import_invoke(bContext *C, wmOperator *op, const wmEvent *)
void ply_file_handler_add()
const EnumPropertyItem io_transform_axis[]
void io_ui_forward_axis_update(Main *, Scene *, PointerRNA *ptr)
void io_ui_up_axis_update(Main *, Scene *, PointerRNA *ptr)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
bool RNA_struct_property_is_set_ex(PointerRNA *ptr, const char *identifier, bool use_ghost)
float RNA_float_get(PointerRNA *ptr, const char *name)
std::string RNA_string_get(PointerRNA *ptr, const char *name)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
void RNA_def_property_update_runtime(PropertyRNA *prop, RNAPropertyUpdateFunc func)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
const char * blen_filepath
ePLYVertexColorMode vertex_colors
char file_base_for_tests[FILE_MAX]
bool export_triangulated_mesh
char collection[MAX_ID_NAME - 2]
bool export_selected_objects
void use_property_decorate_set(bool is_sep)
PanelLayout panel(const bContext *C, blender::StringRef idname, bool default_closed)
void use_property_split_set(bool value)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)
struct ReportList * reports
void WM_event_add_fileselect(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_operator_properties_filesel(wmOperatorType *ot, const int filter, const short type, const eFileSel_Action action, const eFileSel_Flag flag, const short display, const short sort)
bool WM_operator_winactive(bContext *C)