Blender V5.3
blender::io::grease_pencil::SVGExporter Class Reference

Inherits blender::io::grease_pencil::GreasePencilExporter.

Public Member Functions

ExportStatus export_scene (Scene &scene, StringRefNull filepath)
void export_grease_pencil_objects (pugi::xml_node node, int frame_number)
void export_grease_pencil_layer (pugi::xml_node node, const Object &object, const bke::greasepencil::Layer &layer, const bke::greasepencil::Drawing &drawing)
void write_document_header ()
pugi::xml_node write_main_node ()
pugi::xml_node write_animation_node (pugi::xml_node parent_node, IndexMask frames, float duration)
pugi::xml_node write_path (pugi::xml_node node, const float4x4 &transform, const Span< float3 > positions, const std::optional< Span< float3 > > positions_left, const std::optional< Span< float3 > > positions_right, const OffsetIndices< int > points_by_curve, const Span< int > shape, const VArray< bool > &cyclic, const VArray< int8_t > &types, std::optional< float > width)
bool write_to_file (StringRefNull filepath)
 GreasePencilExporter (const IOContext &context, const ExportParams &params)
Public Member Functions inherited from blender::io::grease_pencil::GreasePencilExporter
 GreasePencilExporter (const IOContext &context, const ExportParams &params)
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

pugi::xml_document main_doc_

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_

Detailed Description

Definition at line 116 of file grease_pencil_io_export_svg.cc.

Member Function Documentation

◆ export_grease_pencil_layer()

void blender::io::grease_pencil::SVGExporter::export_grease_pencil_layer ( pugi::xml_node node,
const Object & object,
const bke::greasepencil::Layer & layer,
const bke::greasepencil::Drawing & drawing )

◆ export_grease_pencil_objects()

◆ export_scene()

ExportStatus blender::io::grease_pencil::SVGExporter::export_scene ( Scene & scene,
StringRefNull filepath )

Definition at line 158 of file grease_pencil_io_export_svg.cc.

References blender::io::grease_pencil::ExportParams::Active, blender::BKE_scene_camera_switch_update(), blender::BKE_scene_graph_update_for_newframe(), BLI_assert_unreachable, blender::RenderData::cfra, blender::io::grease_pencil::GreasePencilExporter::context_, blender::Object::data, blender::DEG_get_evaluated(), blender::io::grease_pencil::IOContext::depsgraph, blender::RenderData::efra, export_grease_pencil_objects(), blender::io::grease_pencil::FileWriteError, blender::index_mask::IndexMask::first(), blender::index_mask::IndexMask::foreach_index(), blender::io::grease_pencil::ExportParams::frame_mode, blender::IndexMask::from_predicate(), blender::RenderData::frs_sec, blender::RenderData::frs_sec_base, blender::IndexMask::IndexMask(), blender::IndexRange::IndexRange(), blender::io::grease_pencil::InvalidActiveObjectType, blender::index_mask::IndexMask::is_empty(), blender::io::grease_pencil::GreasePencilExporter::is_selected_frame(), blender::io::grease_pencil::NoFramesSelected, blender::OB_GREASE_PENCIL, blender::io::grease_pencil::ExportParams::object, blender::io::grease_pencil::Ok, blender::io::grease_pencil::GreasePencilExporter::params_, blender::io::grease_pencil::GreasePencilExporter::prepare_render_params(), blender::Scene::r, blender::io::grease_pencil::ExportParams::Scene, blender::io::grease_pencil::ExportParams::Selected, blender::RenderData::sfra, blender::index_mask::IndexMask::size(), blender::Object::type, blender::io::grease_pencil::UnknownError, write_animation_node(), write_document_header(), write_main_node(), and write_to_file().

Referenced by blender::io::grease_pencil::export_svg().

◆ GreasePencilExporter()

◆ write_animation_node()

pugi::xml_node blender::io::grease_pencil::SVGExporter::write_animation_node ( pugi::xml_node parent_node,
IndexMask frames,
float duration )

◆ write_document_header()

void blender::io::grease_pencil::SVGExporter::write_document_header ( )

◆ write_main_node()

◆ write_path()

pugi::xml_node blender::io::grease_pencil::SVGExporter::write_path ( pugi::xml_node node,
const float4x4 & transform,
const Span< float3 > positions,
const std::optional< Span< float3 > > positions_left,
const std::optional< Span< float3 > > positions_right,
const OffsetIndices< int > points_by_curve,
const Span< int > shape,
const VArray< bool > & cyclic,
const VArray< int8_t > & types,
std::optional< float > width )

◆ write_to_file()

bool blender::io::grease_pencil::SVGExporter::write_to_file ( StringRefNull filepath)

Member Data Documentation

◆ main_doc_

pugi::xml_document blender::io::grease_pencil::SVGExporter::main_doc_

The documentation for this class was generated from the following file: