|
Blender V5.3
|
Inherits blender::io::grease_pencil::GreasePencilExporter.
Public Member Functions | |
| bool | export_scene (Scene &scene, StringRefNull filepath) |
| void | export_grease_pencil_objects (int frame_number) |
| void | export_grease_pencil_layer (const Object &object, const bke::greasepencil::Layer &layer, const bke::greasepencil::Drawing &drawing) |
| bool | create_document () |
| bool | add_page (Scene &scene) |
| void | write_path (const float4x4 &transform, Span< float3 > positions, const OffsetIndices< int > points_by_curve, const Span< int > shape, const VArray< bool > &cyclic, const VArray< int8_t > &types, const ColorGeometry4f &color, const float opacity, std::optional< float > width, std::optional< float > miter_limit_angle) |
| bool | write_to_file (StringRefNull filepath) |
| GreasePencilExporter (const IOContext &context, const ExportParams ¶ms) | |
| Public Member Functions inherited from blender::io::grease_pencil::GreasePencilExporter | |
| GreasePencilExporter (const IOContext &context, const ExportParams ¶ms) | |
| void | prepare_render_params (Scene &scene, int frame_number) |
| Vector< ObjectInfo > | retrieve_objects () const |
| void | foreach_shape_in_layer (const Object &object, const bke::greasepencil::Layer &layer, const bke::greasepencil::Drawing &drawing, WriteShapeFn shape_fn) |
| float2 | project_to_screen (const float4x4 &transform, const float3 &position) const |
| bool | is_selected_frame (const GreasePencil &grease_pencil, int frame_number) const |
| std::string | coord_to_svg_string (const float2 &screen_co) const |
Public Attributes | |
| HPDF_Doc | pdf_ |
| HPDF_Page | page_ |
Additional Inherited Members | |
| Public Types inherited from blender::io::grease_pencil::GreasePencilExporter | |
| using | WriteShapeFn |
| Static Public Member Functions inherited from blender::io::grease_pencil::GreasePencilExporter | |
| static ColorGeometry4f | compute_average_stroke_color (const Material &material, const Span< ColorGeometry4f > vertex_colors) |
| static float | compute_average_stroke_opacity (const Span< float > opacities) |
| static std::optional< float > | try_get_uniform_point_width (const RegionView3D &rv3d, const Span< float3 > world_positions, const Span< float > radii) |
| Protected Attributes inherited from blender::io::grease_pencil::GreasePencilExporter | |
| const IOContext | context_ |
| const ExportParams | params_ |
| std::optional< float4x4 > | camera_persmat_ |
| Bounds< float2 > | camera_rect_ |
| float2 | camera_fac_ |
| Bounds< float2 > | screen_rect_ |
Definition at line 33 of file grease_pencil_io_export_pdf.cc.
| bool blender::io::grease_pencil::PDFExporter::add_page | ( | Scene & | scene | ) |
Definition at line 220 of file grease_pencil_io_export_pdf.cc.
References blender::BKE_scene_ppm_get(), blender::io::grease_pencil::GreasePencilExporter::camera_persmat_, blender::io::grease_pencil::GreasePencilExporter::camera_rect_, blender::io::grease_pencil::default_pdf_ppi, blender::io::grease_pencil::meter_to_inches_factor, page_, pdf_, blender::Scene::r, and blender::io::grease_pencil::GreasePencilExporter::screen_rect_.
Referenced by export_scene().
| bool blender::io::grease_pencil::PDFExporter::create_document | ( | ) |
Definition at line 203 of file grease_pencil_io_export_pdf.cc.
References pdf_, and blender::gpu::shader::metadata::printf.
Referenced by export_scene().
| void blender::io::grease_pencil::PDFExporter::export_grease_pencil_layer | ( | const Object & | object, |
| const bke::greasepencil::Layer & | layer, | ||
| const bke::greasepencil::Drawing & | drawing ) |
Definition at line 167 of file grease_pencil_io_export_pdf.cc.
References blender::io::grease_pencil::GreasePencilExporter::foreach_shape_in_layer(), layer, and write_path().
Referenced by export_grease_pencil_objects().
| void blender::io::grease_pencil::PDFExporter::export_grease_pencil_objects | ( | int | frame_number | ) |
Definition at line 124 of file grease_pencil_io_export_pdf.cc.
References blender::BLI_assert(), blender::io::grease_pencil::GreasePencilExporter::context_, blender::CURVE_TYPE_POLY, blender::Object::data, blender::DEG_get_evaluated(), blender::io::grease_pencil::IOContext::depsgraph, export_grease_pencil_layer(), layer, blender::OB_GREASE_PENCIL, blender::geometry::resample_to_evaluated(), blender::io::grease_pencil::GreasePencilExporter::retrieve_objects(), blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::strokes_for_write(), blender::bke::greasepencil::Drawing::tag_topology_changed(), and blender::Object::type.
Referenced by export_scene().
| bool blender::io::grease_pencil::PDFExporter::export_scene | ( | Scene & | scene, |
| StringRefNull | filepath ) |
Definition at line 62 of file grease_pencil_io_export_pdf.cc.
References blender::io::grease_pencil::ExportParams::Active, add_page(), blender::BKE_scene_camera_switch_update(), blender::BKE_scene_graph_update_for_newframe(), blender::RenderData::cfra, blender::io::grease_pencil::GreasePencilExporter::context_, create_document(), blender::Object::data, blender::DEG_get_evaluated(), blender::io::grease_pencil::IOContext::depsgraph, blender::RenderData::efra, export_grease_pencil_objects(), blender::io::grease_pencil::ExportParams::frame_mode, blender::io::grease_pencil::GreasePencilExporter::is_selected_frame(), blender::OB_GREASE_PENCIL, blender::io::grease_pencil::ExportParams::object, blender::io::grease_pencil::GreasePencilExporter::params_, blender::io::grease_pencil::GreasePencilExporter::prepare_render_params(), blender::Scene::r, blender::result, blender::io::grease_pencil::ExportParams::Scene, blender::io::grease_pencil::ExportParams::Selected, blender::RenderData::sfra, blender::Object::type, and write_to_file().
Referenced by blender::io::grease_pencil::export_pdf().
| blender::io::grease_pencil::GreasePencilExporter::GreasePencilExporter | ( | const IOContext & | context, |
| const ExportParams & | params ) |
Definition at line 71 of file grease_pencil_io.cc.
References C, blender::CTX_data_depsgraph_pointer(), and blender::CTX_data_scene().
| void blender::io::grease_pencil::PDFExporter::write_path | ( | const float4x4 & | transform, |
| Span< float3 > | positions, | ||
| const OffsetIndices< int > | points_by_curve, | ||
| const Span< int > | shape, | ||
| const VArray< bool > & | cyclic, | ||
| const VArray< int8_t > & | types, | ||
| const ColorGeometry4f & | color, | ||
| const float | opacity, | ||
| std::optional< float > | width, | ||
| std::optional< float > | miter_limit_angle ) |
Definition at line 250 of file grease_pencil_io_export_pdf.cc.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::b, blender::ColorRGBA< ChannelStorageType, Space, Alpha >::g, GP_STROKE_MITER_ANGLE_BEVEL, GP_STROKE_MITER_ANGLE_ROUND, blender::Span< T >::index_range(), blender::linearrgb_to_srgb_v3_v3(), page_, pdf_, blender::io::grease_pencil::GreasePencilExporter::project_to_screen(), blender::ColorRGBA< ChannelStorageType, Space, Alpha >::r, blender::math::sin(), and blender::Span< T >::slice().
Referenced by export_grease_pencil_layer().
| bool blender::io::grease_pencil::PDFExporter::write_to_file | ( | StringRefNull | filepath | ) |
Definition at line 334 of file grease_pencil_io_export_pdf.cc.
References alloc_utf16_from_8(), blender::StringRefNull::c_str(), blender::bke::subdiv::free(), pdf_, blender::result, and blender::true.
Referenced by export_scene().
| HPDF_Page blender::io::grease_pencil::PDFExporter::page_ |
Definition at line 38 of file grease_pencil_io_export_pdf.cc.
Referenced by add_page(), and write_path().
| HPDF_Doc blender::io::grease_pencil::PDFExporter::pdf_ |
Definition at line 37 of file grease_pencil_io_export_pdf.cc.
Referenced by add_page(), create_document(), write_path(), and write_to_file().