46 "Vertex colors in the file are in sRGB color space"},
51 "Vertex colors in the file are in linear color space"},
52 {0,
nullptr, 0,
nullptr,
nullptr}};
78 export_params.export_selected_objects =
RNA_boolean_get(op->
ptr,
"export_selected_objects");
83 export_params.export_triangulated_mesh =
RNA_boolean_get(op->
ptr,
"export_triangulated_mesh");
88 export_params.reports = op->
reports;
132 "export_triangulated_mesh",
134 IFACE_(
"Triangulated Mesh"),
146 bool changed =
false;
166 ot->
exec = wm_ply_export_exec;
168 ot->
ui = wm_ply_export_draw;
169 ot->
check = wm_ply_export_check;
193 "Value by which to enlarge or shrink the objects with respect to the world's origin",
198 ot->
srna,
"apply_modifiers",
true,
"Apply Modifiers",
"Apply modifiers to exported meshes");
200 "export_selected_objects",
202 "Export Selected Objects",
203 "Export only selected objects instead of all supported objects");
209 "Export only objects from this collection (and its children)");
217 "Export Vertex Normals",
218 "Export specific vertex normals if available, export calculated normals otherwise");
221 ply_vertex_colors_mode,
223 "Export Vertex Colors",
224 "Export vertex color attributes");
228 "Export Vertex Attributes",
229 "Export custom vertex attributes");
231 "export_triangulated_mesh",
233 "Export Triangulated Mesh",
234 "All ngons with four or more vertices will be triangulated. Meshes in "
235 "the scene will not be affected. Behaves like Triangulate Modifier with "
236 "ngon-method: \"Beauty\", quad-method: \"Shortest Diagonal\", min vertices: 4");
241 "Export file in ASCII format, export as binary otherwise");
263 if (paths.is_empty()) {
267 for (
const auto &path : paths) {
303 ui_ply_import_settings(C, op->
layout, op->
ptr);
315 ot->
exec = wm_ply_import_exec;
316 ot->
ui = wm_ply_import_draw;
334 "Apply current scene's unit (as defined by unit scale) to imported data");
342 ply_vertex_colors_mode,
345 "Import vertex color attributes");
347 ot->
srna,
"import_attributes",
true,
"Vertex Attributes",
"Import custom vertex attributes");
357 auto fh = std::make_unique<blender::bke::FileHandlerType>();
358 STRNCPY(fh->idname,
"IO_FH_ply");
359 STRNCPY(fh->import_operator,
"WM_OT_ply_import");
360 STRNCPY(fh->export_operator,
"WM_OT_ply_export");
361 STRNCPY(fh->label,
"Stanford PLY");
362 STRNCPY(fh->file_extensions_str,
".ply");
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
#define STRNCPY(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 *import_params)
void PLY_export(bContext *C, const PLYExportParams *export_params)
@ PLY_VERTEX_COLOR_LINEAR
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
PanelLayout uiLayoutPanel(const bContext *C, uiLayout *layout, const char *idname, bool default_closed)
uiLayout * uiLayoutColumnWithHeading(uiLayout *layout, bool align, const char *heading)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
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)
void ply_file_handler_add()
int filesel_drop_import_invoke(bContext *C, wmOperator *op, const wmEvent *)
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)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
float RNA_float_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)
char file_base_for_tests[FILE_MAX]
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
bool(* check)(bContext *C, wmOperator *op)
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(* ui)(bContext *C, wmOperator *op)
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)