Changeset View
Changeset View
Standalone View
Standalone View
source/blender/io/wavefront_obj/exporter/obj_exporter.hh
| Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | |||||
| void export_frame(Depsgraph *depsgraph, | void export_frame(Depsgraph *depsgraph, | ||||
| const OBJExportParams &export_params, | const OBJExportParams &export_params, | ||||
| const char *filepath); | const char *filepath); | ||||
| /** | /** | ||||
| * Find the objects to be exported in the `view_layer` of the dependency graph`depsgraph`, | * Find the objects to be exported in the `view_layer` of the dependency graph`depsgraph`, | ||||
| * and return them in vectors `unique_ptr`s of `OBJMesh` and `OBJCurve`. | * and return them in vectors `unique_ptr`s of `OBJMesh` and `OBJCurve`. | ||||
| * If `export_params.export_selected_objects` is set, then only selected objects are to be | * If `export_params.export_selected_objects` is set, then only selected objects are to be | ||||
| * exported, else all objects are to be exported. But only objects of type `OB_MESH`, `OB_CURVE`, | * exported, else all objects are to be exported. But only objects of type `OB_MESH`, | ||||
| * and `OB_SURF` are supported; the rest will be ignored. If `export_params.export_curves_as_nurbs` | * `OB_CURVES_LEGACY`, and `OB_SURF` are supported; the rest will be ignored. If | ||||
| * is set, then curves of type `CU_NURBS` are exported in curve form in the .obj file, otherwise | * `export_params.export_curves_as_nurbs` is set, then curves of type `CU_NURBS` are exported in | ||||
| * they are converted to mesh and returned in the `OBJMesh` vector. All other exportable types are | * curve form in the .obj file, otherwise they are converted to mesh and returned in the `OBJMesh` | ||||
| * always converted to mesh and returned in the `OBJMesh` vector. | * vector. All other exportable types are always converted to mesh and returned in the `OBJMesh` | ||||
| * vector. | |||||
| */ | */ | ||||
| std::pair<Vector<std::unique_ptr<OBJMesh>>, Vector<std::unique_ptr<OBJCurve>>> | std::pair<Vector<std::unique_ptr<OBJMesh>>, Vector<std::unique_ptr<OBJCurve>>> | ||||
| filter_supported_objects(Depsgraph *depsgraph, const OBJExportParams &export_params); | filter_supported_objects(Depsgraph *depsgraph, const OBJExportParams &export_params); | ||||
| /** | /** | ||||
| * Makes `r_filepath_with_frames` (which should point at a character array of size `FILE_MAX`) | * Makes `r_filepath_with_frames` (which should point at a character array of size `FILE_MAX`) | ||||
| * be `filepath` with its "#" characters replaced by the number representing `frame`, and with | * be `filepath` with its "#" characters replaced by the number representing `frame`, and with | ||||
| * a .obj extension. | * a .obj extension. | ||||
| */ | */ | ||||
| /** | /** | ||||
| * Append the current frame number in the .OBJ file name. | * Append the current frame number in the .OBJ file name. | ||||
| * | * | ||||
| * \return Whether the filepath is in #FILE_MAX limits. | * \return Whether the filepath is in #FILE_MAX limits. | ||||
| */ | */ | ||||
| bool append_frame_to_filename(const char *filepath, int frame, char *r_filepath_with_frames); | bool append_frame_to_filename(const char *filepath, int frame, char *r_filepath_with_frames); | ||||
| } // namespace blender::io::obj | } // namespace blender::io::obj | ||||