Blender V4.3
blender::io::grease_pencil::GreasePencilExporter Class Reference

#include <grease_pencil_io_intern.hh>

Inherited by blender::io::grease_pencil::PDFExporter, and blender::io::grease_pencil::SVGExporter.

Classes

struct  ObjectInfo
 

Public Types

using WriteStrokeFn
 

Public Member Functions

 GreasePencilExporter (const IOContext &context, const ExportParams &params)
 
void prepare_render_params (Scene &scene, int frame_number)
 
Vector< ObjectInforetrieve_objects () const
 
void foreach_stroke_in_layer (const Object &object, const bke::greasepencil::Layer &layer, const bke::greasepencil::Drawing &drawing, WriteStrokeFn stroke_fn)
 
float2 project_to_screen (const float4x4 &transform, const float3 &position) const
 

Static Public Member Functions

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< floattry_get_uniform_point_width (const RegionView3D &rv3d, const Span< float3 > world_positions, const Span< float > radii)
 

Protected Attributes

const IOContext context_
 
const ExportParams params_
 
std::optional< float4x4camera_persmat_
 
blender::Bounds< float2render_rect_
 

Detailed Description

Definition at line 48 of file grease_pencil_io_intern.hh.

Member Typedef Documentation

◆ WriteStrokeFn

Initial value:
FunctionRef<void(const Span<float3> positions,
bool cyclic,
const ColorGeometry4f &color,
float opacity,
std::optional<float> width,
bool round_cap,
bool is_outline)>
ColorSceneLinear4f< eAlpha::Premultiplied > ColorGeometry4f
Definition BLI_color.hh:337

Definition at line 79 of file grease_pencil_io_intern.hh.

Constructor & Destructor Documentation

◆ GreasePencilExporter()

blender::io::grease_pencil::GreasePencilExporter::GreasePencilExporter ( const IOContext & context,
const ExportParams & params )

Definition at line 153 of file grease_pencil_io.cc.

Member Function Documentation

◆ compute_average_stroke_color()

ColorGeometry4f blender::io::grease_pencil::GreasePencilExporter::compute_average_stroke_color ( const Material & material,
const Span< ColorGeometry4f > vertex_colors )
static

◆ compute_average_stroke_opacity()

float blender::io::grease_pencil::GreasePencilExporter::compute_average_stroke_opacity ( const Span< float > opacities)
static

Definition at line 353 of file grease_pencil_io.cc.

References blender::io::grease_pencil::get_average().

◆ foreach_stroke_in_layer()

◆ prepare_render_params()

◆ project_to_screen()

◆ retrieve_objects()

◆ try_get_uniform_point_width()

std::optional< float > blender::io::grease_pencil::GreasePencilExporter::try_get_uniform_point_width ( const RegionView3D & rv3d,
const Span< float3 > world_positions,
const Span< float > radii )
static

Member Data Documentation

◆ camera_persmat_

std::optional<float4x4> blender::io::grease_pencil::GreasePencilExporter::camera_persmat_
protected

◆ context_

◆ params_

const ExportParams blender::io::grease_pencil::GreasePencilExporter::params_
protected

◆ render_rect_


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