|
Blender V5.0
|
Classes | |
| struct | IOContext |
| struct | ImportParams |
| struct | ExportParams |
| class | PDFExporter |
| class | SVGExporter |
| class | SVGImporter |
| class | GreasePencilImporter |
| class | GreasePencilExporter |
Enumerations | |
| enum class | ExportStatus : int8_t { Ok = 0 , NoFramesSelected , InvalidActiveObjectType , FileWriteError , UnknownError } |
Functions | |
| bool | import_svg (const IOContext &context, const ImportParams ¶ms, StringRefNull filepath) |
| ExportStatus | export_svg (const IOContext &context, const ExportParams ¶ms, Scene &scene, StringRefNull filepath) |
| bool | export_pdf (const IOContext &context, const ExportParams ¶ms, Scene &scene, StringRefNull filepath) |
| static float | get_average (const Span< float > values) |
| static ColorGeometry4f | get_average (const Span< ColorGeometry4f > values) |
| static float4x4 | persmat_from_camera_object (Scene &scene) |
| static std::string | rgb_to_hexstr (const float color[3]) |
| static void | write_stroke_color_attribute (pugi::xml_node node, const ColorGeometry4f &stroke_color, const float stroke_opacity, const bool round_cap) |
| static void | write_fill_color_attribute (pugi::xml_node node, const ColorGeometry4f &fill_color, const float layer_opacity) |
| static void | write_rect (pugi::xml_node node, const float x, const float y, const float width, const float height, const float thickness, const std::string &hexcolor) |
| static std::string | frame_name (int frame_number) |
| static std::string | get_layer_id (const NSVGshape &shape, const int prefix) |
| static ColorGeometry4f | unpack_nano_color (const uint pack) |
| static ColorGeometry4f | average_gradient_color (const NSVGgradient &svg_gradient) |
| static ColorGeometry4f | convert_svg_color (const NSVGpaint &svg_paint) |
| static IndexRange | extend_curves_geometry (bke::CurvesGeometry &curves, const NSVGshape &shape) |
| static void | shape_attributes_to_curves (bke::CurvesGeometry &curves, const NSVGshape &shape, const IndexRange curves_range, const float4x4 &transform, const int material_index) |
| static void | shift_to_bounds_center (GreasePencil &grease_pencil) |
Variables | |
| constexpr const char * | svg_exporter_name = "SVG Export for Grease Pencil" |
| constexpr const char * | svg_exporter_version = "v2.0" |
|
strong |
| Enumerator | |
|---|---|
| Ok | |
| NoFramesSelected | |
| InvalidActiveObjectType | |
| FileWriteError | |
| UnknownError | |
Definition at line 48 of file grease_pencil_io.hh.
|
static |
Definition at line 77 of file grease_pencil_io_import_svg.cc.
References i, blender::Span< T >::index_range(), blender::Span< T >::is_empty(), blender::Span< T >::size(), and unpack_nano_color().
Referenced by convert_svg_color().
|
static |
Definition at line 98 of file grease_pencil_io_import_svg.cc.
References average_gradient_color(), BLI_assert_unreachable, and unpack_nano_color().
Referenced by shape_attributes_to_curves().
| bool blender::io::grease_pencil::export_pdf | ( | const IOContext & | context, |
| const ExportParams & | params, | ||
| Scene & | scene, | ||
| StringRefNull | filepath ) |
Definition at line 276 of file grease_pencil_io_export_pdf.cc.
References blender::io::grease_pencil::PDFExporter::export_scene(), and params.
| ExportStatus blender::io::grease_pencil::export_svg | ( | const IOContext & | context, |
| const ExportParams & | params, | ||
| Scene & | scene, | ||
| StringRefNull | filepath ) |
Definition at line 584 of file grease_pencil_io_export_svg.cc.
References blender::io::grease_pencil::SVGExporter::export_scene(), and params.
|
static |
Definition at line 120 of file grease_pencil_io_import_svg.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), BLI_assert, MutableSpan< T >::copy_from(), blender::bke::CurvesGeometry::curves_num(), blender::Span< T >::drop_back(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::bke::CurvesGeometry::offsets(), blender::bke::CurvesGeometry::offsets_for_write(), blender::IndexRange::one_after_last(), blender::bke::CurvesGeometry::points_num(), blender::bke::CurvesGeometry::resize(), blender::offset_indices::OffsetIndices< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), blender::bke::CurvesGeometry::tag_topology_changed(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by blender::io::grease_pencil::SVGImporter::read().
|
static |
Definition at line 229 of file grease_pencil_io_export_svg.cc.
Referenced by blender::io::grease_pencil::SVGExporter::export_grease_pencil_objects(), and blender::io::grease_pencil::SVGExporter::write_animation_node().
|
static |
Definition at line 56 of file grease_pencil_io.cc.
References blender::Span< T >::begin(), blender::Span< T >::cast(), blender::Span< T >::end(), blender::Span< T >::is_empty(), and blender::Span< T >::size().
Definition at line 50 of file grease_pencil_io.cc.
References blender::Span< T >::begin(), blender::Span< T >::end(), blender::Span< T >::is_empty(), and blender::Span< T >::size().
Referenced by blender::io::grease_pencil::GreasePencilExporter::compute_average_stroke_color(), and blender::io::grease_pencil::GreasePencilExporter::compute_average_stroke_opacity().
|
static |
Definition at line 53 of file grease_pencil_io_import_svg.cc.
Referenced by blender::io::grease_pencil::SVGImporter::read().
| bool blender::io::grease_pencil::import_svg | ( | const IOContext & | context, |
| const ImportParams & | params, | ||
| StringRefNull | filepath ) |
Definition at line 399 of file grease_pencil_io_import_svg.cc.
References params, and blender::io::grease_pencil::SVGImporter::read().
Definition at line 220 of file grease_pencil_io.cc.
References BKE_camera_params_compute_matrix(), BKE_camera_params_compute_viewplane(), BKE_camera_params_from_object(), BKE_camera_params_init(), BKE_scene_camera_switch_update(), Scene::camera, blender::MatBase< float, 4, 4 >::identity(), blender::math::invert(), params, Scene::r, RenderData::xasp, RenderData::xsch, RenderData::yasp, and RenderData::ysch.
Referenced by blender::io::grease_pencil::GreasePencilExporter::prepare_render_params().
|
static |
Definition at line 42 of file grease_pencil_io_export_svg.cc.
References b.
Referenced by write_fill_color_attribute(), and write_stroke_color_attribute().
|
static |
Definition at line 165 of file grease_pencil_io_import_svg.cc.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::a, blender::bke::CurvesGeometry::attributes_for_write(), blender::math::average(), BEZIER_HANDLE_FREE, blender::Span< T >::cast(), convert_svg_color(), blender::bke::Curve, CURVE_TYPE_BEZIER, blender::bke::CurvesGeometry::curve_types_for_write(), blender::bke::CurvesGeometry::cyclic_for_write(), blender::bke::SpanAttributeWriter< T >::finish(), blender::bke::CurvesGeometry::handle_positions_left_for_write(), blender::bke::CurvesGeometry::handle_positions_right_for_write(), blender::bke::CurvesGeometry::handle_types_left_for_write(), blender::bke::CurvesGeometry::handle_types_right_for_write(), i, blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::bke::Point, blender::bke::CurvesGeometry::points_by_curve(), blender::bke::CurvesGeometry::positions_for_write(), blender::bke::SpanAttributeWriter< T >::span, blender::IndexRange::start(), blender::bke::CurvesGeometry::tag_positions_changed(), blender::bke::CurvesGeometry::tag_radii_changed(), blender::math::to_scale(), transform(), blender::math::transform_point(), and blender::bke::CurvesGeometry::update_curve_types().
Referenced by blender::io::grease_pencil::SVGImporter::read().
|
static |
Definition at line 261 of file grease_pencil_io_import_svg.cc.
References blender::bke::CurvesGeometry::bounds_min_max(), GP_DRAWING, blender::bounds::merge(), blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::strokes_for_write(), blender::bke::greasepencil::Drawing::tag_positions_changed(), blender::bke::CurvesGeometry::translate(), and wrap().
Referenced by blender::io::grease_pencil::SVGImporter::read().
|
static |
Definition at line 60 of file grease_pencil_io_import_svg.cc.
References float, and srgb_to_linearrgb_v4().
Referenced by average_gradient_color(), and convert_svg_color().
|
static |
Definition at line 66 of file grease_pencil_io_export_svg.cc.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::a, linearrgb_to_srgb_v3_v3(), and rgb_to_hexstr().
Referenced by blender::io::grease_pencil::SVGExporter::export_grease_pencil_layer().
|
static |
Definition at line 79 of file grease_pencil_io_export_svg.cc.
Referenced by blender::io::grease_pencil::SVGExporter::export_grease_pencil_objects().
|
static |
Definition at line 50 of file grease_pencil_io_export_svg.cc.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::a, linearrgb_to_srgb_v3_v3(), and rgb_to_hexstr().
Referenced by blender::io::grease_pencil::SVGExporter::export_grease_pencil_layer().
|
constexpr |
Definition at line 39 of file grease_pencil_io_export_svg.cc.
Referenced by blender::io::grease_pencil::SVGExporter::write_document_header().
|
constexpr |
Definition at line 40 of file grease_pencil_io_export_svg.cc.
Referenced by blender::io::grease_pencil::SVGExporter::write_document_header().