|
Blender V5.3
|
Classes | |
| struct | ExportParams |
| class | GreasePencilExporter |
| class | GreasePencilImporter |
| struct | ImportParams |
| struct | IOContext |
| class | PDFExporter |
| class | SVGExporter |
| class | SVGImporter |
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 float | get_miter_limit_angle (const VArray< float > miter_angles, const IndexRange points, const bool is_cyclic) |
| 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 std::optional< float > miter_limit_angle, 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 shape_index, const int material_index) |
| static void | shift_to_bounds_center (GreasePencil &grease_pencil) |
Variables | |
| constexpr double | meter_to_inches_factor = 1000.0 / 25.4 |
| constexpr double | default_pdf_ppi = 72.0 |
| constexpr const char * | svg_exporter_name = "SVG Export for Grease Pencil" |
| constexpr const char * | svg_exporter_version = "v2.1" |
|
strong |
| Enumerator | |
|---|---|
| Ok | |
| NoFramesSelected | |
| InvalidActiveObjectType | |
| FileWriteError | |
| UnknownError | |
Definition at line 49 of file grease_pencil_io.hh.
|
static |
Definition at line 79 of file grease_pencil_io_import_svg.cc.
References average_gradient_color(), blender::Span< T >::index_range(), blender::Span< T >::is_empty(), blender::Span< T >::size(), and unpack_nano_color().
Referenced by average_gradient_color(), and convert_svg_color().
|
static |
Definition at line 100 of file grease_pencil_io_import_svg.cc.
References average_gradient_color(), BLI_assert_unreachable, convert_svg_color(), and unpack_nano_color().
Referenced by convert_svg_color(), and shape_attributes_to_curves().
| bool blender::io::grease_pencil::export_pdf | ( | const IOContext & | context, |
| const ExportParams & | params, | ||
| Scene & | scene, | ||
| StringRefNull | filepath ) |
Definition at line 352 of file grease_pencil_io_export_pdf.cc.
References export_pdf(), and blender::io::grease_pencil::PDFExporter::export_scene().
Referenced by export_pdf().
| ExportStatus blender::io::grease_pencil::export_svg | ( | const IOContext & | context, |
| const ExportParams & | params, | ||
| Scene & | scene, | ||
| StringRefNull | filepath ) |
Definition at line 555 of file grease_pencil_io_export_svg.cc.
References blender::io::grease_pencil::SVGExporter::export_scene(), and export_svg().
Referenced by export_svg().
|
static |
Definition at line 122 of file grease_pencil_io_import_svg.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::math::almost_equal_relative(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::BLI_assert(), blender::Span< T >::cast(), blender::Span< T >::drop_back(), extend_curves_geometry(), blender::Span< T >::first(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), blender::IndexRange::one_after_last(), blender::offset_indices::OffsetIndices< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by extend_curves_geometry(), and blender::io::grease_pencil::SVGImporter::read().
|
static |
Definition at line 237 of file grease_pencil_io_export_svg.cc.
References frame_name().
Referenced by blender::io::grease_pencil::SVGExporter::export_grease_pencil_objects(), frame_name(), 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(), get_average(), 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(), get_average(), blender::Span< T >::is_empty(), and blender::Span< T >::size().
Referenced by blender::io::grease_pencil::GreasePencilExporter::compute_average_stroke_color(), blender::io::grease_pencil::GreasePencilExporter::compute_average_stroke_opacity(), get_average(), and get_average().
|
static |
Definition at line 55 of file grease_pencil_io_import_svg.cc.
References get_layer_id().
Referenced by get_layer_id(), and blender::io::grease_pencil::SVGImporter::read().
|
static |
Definition at line 365 of file grease_pencil_io.cc.
References blender::IndexRange::drop_back(), blender::IndexRange::drop_front(), get_miter_limit_angle(), GP_STROKE_MITER_ANGLE_ROUND, and blender::math::min().
Referenced by blender::io::grease_pencil::GreasePencilExporter::foreach_shape_in_layer(), and get_miter_limit_angle().
| bool blender::io::grease_pencil::import_svg | ( | const IOContext & | context, |
| const ImportParams & | params, | ||
| StringRefNull | filepath ) |
Definition at line 494 of file grease_pencil_io_import_svg.cc.
References import_svg(), and blender::io::grease_pencil::SVGImporter::read().
Referenced by import_svg().
Definition at line 214 of file grease_pencil_io.cc.
References blender::BKE_camera_params_compute_matrix(), blender::BKE_camera_params_compute_viewplane(), blender::BKE_camera_params_from_object(), blender::BKE_camera_params_init(), blender::BKE_scene_camera_switch_update(), blender::Scene::camera, blender::MatBase< float, 4, 4 >::identity(), blender::math::invert(), persmat_from_camera_object(), blender::Scene::r, blender::CameraParams::winmat, blender::RenderData::xasp, blender::RenderData::xsch, blender::RenderData::yasp, and blender::RenderData::ysch.
Referenced by persmat_from_camera_object(), and blender::io::grease_pencil::GreasePencilExporter::prepare_render_params().
|
static |
Definition at line 43 of file grease_pencil_io_export_svg.cc.
References blender::rgb_float_to_uchar(), and rgb_to_hexstr().
Referenced by rgb_to_hexstr(), write_fill_color_attribute(), and write_stroke_color_attribute().
|
static |
Definition at line 180 of file grease_pencil_io_import_svg.cc.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::a, blender::bke::MutableAttributeAccessor::add(), blender::math::average(), blender::BEZIER_HANDLE_FREE, blender::Span< T >::cast(), convert_svg_color(), blender::bke::Curve, blender::CURVE_TYPE_BEZIER, blender::IndexRange::drop_front(), blender::bke::SpanAttributeWriter< T >::finish(), blender::IndexRange::first(), blender::Span< T >::first(), blender::IndexRange::index_range(), blender::bke::MutableAttributeAccessor::lookup_for_write_span(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_span(), blender::bke::Point, shape_attributes_to_curves(), blender::IndexRange::size(), blender::bke::SpanAttributeWriter< T >::span, blender::IndexRange::start(), blender::math::to_scale(), and blender::math::transform_point().
Referenced by blender::io::grease_pencil::SVGImporter::read(), and shape_attributes_to_curves().
|
static |
Definition at line 327 of file grease_pencil_io_import_svg.cc.
References blender::bke::CurvesGeometry::bounds_min_max(), blender::GP_DRAWING, blender::bounds::merge(), shift_to_bounds_center(), blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::strokes_for_write(), blender::bke::greasepencil::Drawing::tag_positions_changed(), blender::bke::CurvesGeometry::translate(), and blender::gpu::wrap().
Referenced by blender::io::grease_pencil::SVGImporter::read(), and shift_to_bounds_center().
|
static |
Definition at line 62 of file grease_pencil_io_import_svg.cc.
References float, blender::srgb_to_linearrgb_v4(), and unpack_nano_color().
Referenced by average_gradient_color(), convert_svg_color(), and unpack_nano_color().
|
static |
Definition at line 83 of file grease_pencil_io_export_svg.cc.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::a, blender::linearrgb_to_srgb_v3_v3(), node, rgb_to_hexstr(), and write_fill_color_attribute().
Referenced by blender::io::grease_pencil::SVGExporter::export_grease_pencil_layer(), and write_fill_color_attribute().
|
static |
Definition at line 96 of file grease_pencil_io_export_svg.cc.
References node, write_rect(), blender::x, and y.
Referenced by blender::io::grease_pencil::SVGExporter::export_grease_pencil_objects(), and write_rect().
|
static |
Definition at line 50 of file grease_pencil_io_export_svg.cc.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::a, GP_STROKE_MITER_ANGLE_BEVEL, GP_STROKE_MITER_ANGLE_ROUND, blender::linearrgb_to_srgb_v3_v3(), node, rgb_to_hexstr(), blender::math::sin(), and write_stroke_color_attribute().
Referenced by blender::io::grease_pencil::SVGExporter::export_grease_pencil_layer(), and write_stroke_color_attribute().
|
constexpr |
Definition at line 218 of file grease_pencil_io_export_pdf.cc.
Referenced by blender::io::grease_pencil::PDFExporter::add_page().
|
constexpr |
Definition at line 217 of file grease_pencil_io_export_pdf.cc.
Referenced by blender::io::grease_pencil::PDFExporter::add_page().
|
constexpr |
Definition at line 40 of file grease_pencil_io_export_svg.cc.
Referenced by blender::io::grease_pencil::SVGExporter::write_document_header().
|
constexpr |
Definition at line 41 of file grease_pencil_io_export_svg.cc.
Referenced by blender::io::grease_pencil::SVGExporter::write_document_header().