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}};
127 if (
uiLayout *panel = layout->
panel(C,
"PLY_export_geometry",
false,
IFACE_(
"Geometry"))) {
147 bool changed =
false;
167 ot->
exec = wm_ply_export_exec;
169 ot->
ui = wm_ply_export_draw;
170 ot->
check = wm_ply_export_check;
194 "Value by which to enlarge or shrink the objects with respect to the world's origin",
199 ot->
srna,
"apply_modifiers",
true,
"Apply Modifiers",
"Apply modifiers to exported meshes");
201 "export_selected_objects",
203 "Export Selected Objects",
204 "Export only selected objects instead of all supported objects");
210 "Export only objects from this collection (and its children)");
218 "Export Vertex Normals",
219 "Export specific vertex normals if available, export calculated normals otherwise");
222 ply_vertex_colors_mode,
224 "Export Vertex Colors",
225 "Export vertex color attributes");
229 "Export Vertex Attributes",
230 "Export custom vertex attributes");
232 "export_triangulated_mesh",
234 "Export Triangulated Mesh",
235 "All ngons with four or more vertices will be triangulated. Meshes in "
236 "the scene will not be affected. Behaves like Triangulate Modifier with "
237 "ngon-method: \"Beauty\", quad-method: \"Shortest Diagonal\", min vertices: 4");
242 "Export file in ASCII format, export as binary otherwise");
264 if (paths.is_empty()) {
268 for (
const auto &path : paths) {
304 ui_ply_import_settings(C, op->
layout, op->
ptr);
316 ot->
exec = wm_ply_import_exec;
317 ot->
ui = wm_ply_import_draw;
335 "Apply current scene's unit (as defined by unit scale) to imported data");
343 ply_vertex_colors_mode,
346 "Import vertex color attributes");
348 ot->
srna,
"import_attributes",
true,
"Vertex Attributes",
"Import custom vertex attributes");
358 auto fh = std::make_unique<blender::bke::FileHandlerType>();
359 STRNCPY(fh->idname,
"IO_FH_ply");
360 STRNCPY(fh->import_operator,
"WM_OT_ply_import");
361 STRNCPY(fh->export_operator,
"WM_OT_ply_export");
362 STRNCPY(fh->label,
"Stanford PLY");
363 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
char * STRNCPY(char(&dst)[N], const char *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 uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
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)
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)
const char * blen_filepath
char collection[MAX_IDPROP_NAME]
ePLYVertexColorMode vertex_colors
char file_base_for_tests[FILE_MAX]
bool export_triangulated_mesh
bool export_selected_objects
PanelLayout panel(const bContext *C, blender::StringRef idname, bool default_closed)
uiLayout & column(bool align)
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)
wmOperatorStatus(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
bool(* check)(bContext *C, wmOperator *op)
wmOperatorStatus(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) 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)