|
Blender V4.3
|
Classes | |
| struct | ExportParams |
| class | GreasePencilExporter |
| class | GreasePencilImporter |
| struct | ImportParams |
| struct | IOContext |
| class | PDFExporter |
| class | SVGExporter |
| class | SVGImporter |
Functions | |
| bool | import_svg (const IOContext &context, const ImportParams ¶ms, StringRefNull filepath) |
| bool | 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 std::optional< float > | try_get_constant_value (const VArray< float > values, const float epsilon=1e-5f) |
| static IndexMask | get_visible_strokes (const Object &object, const bke::greasepencil::Drawing &drawing, IndexMaskMemory &memory) |
| static std::optional< Bounds< float2 > > | compute_drawing_bounds (const ARegion ®ion, const RegionView3D &rv3d, const Object &object, const Object &object_eval, const int layer_index, const int frame_number, const bke::greasepencil::Drawing &drawing) |
| static std::optional< Bounds< float2 > > | compute_objects_bounds (const ARegion ®ion, const RegionView3D &rv3d, const Depsgraph &depsgraph, const Span< GreasePencilExporter::ObjectInfo > objects, const int frame_number) |
| static float4x4 | persmat_from_camera_object (Scene &scene) |
| static bool | is_selected_frame (const GreasePencil &grease_pencil, const int frame_number) |
| 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 | 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 * | attr_material_index = "material_index" |
| constexpr const char * | svg_exporter_name = "SVG Export for Grease Pencil" |
| constexpr const char * | svg_exporter_version = "v2.0" |
|
static |
Definition at line 79 of file grease_pencil_io_import_svg.cc.
References 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 193 of file grease_pencil_io.cc.
References BLI_assert, ED_view3d_pixel_size(), ED_view3d_project_float_global(), blender::index_mask::IndexMask::foreach_index(), blender::bke::crazyspace::get_evaluated_grease_pencil_drawing_deformation(), get_visible_strokes(), blender::bounds::merge(), OB_GREASE_PENCIL, blender::bke::CurvesGeometry::points_by_curve(), blender::bke::greasepencil::Drawing::radii(), blender::bke::greasepencil::Drawing::strokes(), blender::math::transform_point(), V3D_PROJ_RET_OK, and V3D_PROJ_TEST_NOP.
Referenced by compute_objects_bounds().
|
static |
Definition at line 250 of file grease_pencil_io.cc.
References compute_drawing_bounds(), Object::data, DEG_get_evaluated_object(), depsgraph, and blender::bounds::merge().
Referenced by blender::io::grease_pencil::GreasePencilExporter::prepare_render_params().
|
static |
Definition at line 100 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 277 of file grease_pencil_io_export_pdf.cc.
References blender::io::grease_pencil::PDFExporter::export_scene(), and params.
| bool blender::io::grease_pencil::export_svg | ( | const IOContext & | context, |
| const ExportParams & | params, | ||
| Scene & | scene, | ||
| StringRefNull | filepath ) |
Definition at line 381 of file grease_pencil_io_export_svg.cc.
References blender::io::grease_pencil::SVGExporter::export_scene(), and params.
|
static |
Definition at line 122 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, blender::Span< T >::drop_back(), 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 blender::io::grease_pencil::SVGImporter::read().
|
static |
Definition at line 51 of file grease_pencil_io.cc.
References blender::Span< T >::begin(), blender::Span< T >::cast(), and blender::Span< T >::end().
Definition at line 45 of file grease_pencil_io.cc.
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 55 of file grease_pencil_io_import_svg.cc.
Referenced by blender::io::grease_pencil::SVGImporter::read().
|
static |
Definition at line 160 of file grease_pencil_io.cc.
References attr_material_index, blender::bke::CurvesGeometry::attributes(), BKE_object_material_get(), blender::bke::Curve, blender::bke::CurvesGeometry::curves_range(), MaterialGPencilStyle::flag, blender::index_mask::IndexMask::from_predicate(), GP_MATERIAL_HIDE, GP_MATERIAL_STROKE_SHOW, blender::bke::CurvesGeometry::points_by_curve(), and blender::bke::greasepencil::Drawing::strokes().
Referenced by compute_drawing_bounds().
| bool blender::io::grease_pencil::import_svg | ( | const IOContext & | context, |
| const ImportParams & | params, | ||
| StringRefNull | filepath ) |
Definition at line 392 of file grease_pencil_io_import_svg.cc.
References params, and blender::io::grease_pencil::SVGImporter::read().
|
static |
Definition at line 57 of file grease_pencil_io_export_pdf.cc.
Referenced by blender::io::grease_pencil::PDFExporter::export_scene().
Definition at line 289 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(), blender::MatBase< float, 4, 4 >::identity(), blender::math::invert(), and params.
Referenced by blender::io::grease_pencil::GreasePencilExporter::prepare_render_params().
|
static |
Definition at line 50 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 167 of file grease_pencil_io_import_svg.cc.
References blender::ColorRGBA< ChannelStorageType, Space, Alpha >::a, blender::math::average(), BEZIER_HANDLE_FREE, blender::Span< T >::cast(), convert_svg_color(), blender::bke::Curve, CURVE_TYPE_BEZIER, blender::bke::SpanAttributeWriter< T >::finish(), blender::bke::Point, blender::offset_indices::OffsetIndices< T >::slice(), 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().
|
static |
Definition at line 254 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 63 of file grease_pencil_io.cc.
Referenced by blender::io::grease_pencil::GreasePencilExporter::try_get_uniform_point_width().
|
static |
Definition at line 62 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 74 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 87 of file grease_pencil_io_export_svg.cc.
Referenced by blender::io::grease_pencil::SVGExporter::export_grease_pencil_objects().
|
static |
Definition at line 58 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 158 of file grease_pencil_io.cc.
Referenced by get_visible_strokes().
|
constexpr |
Definition at line 47 of file grease_pencil_io_export_svg.cc.
Referenced by blender::io::grease_pencil::SVGExporter::write_document_header().
|
constexpr |
Definition at line 48 of file grease_pencil_io_export_svg.cc.
Referenced by blender::io::grease_pencil::SVGExporter::write_document_header().