|
Blender V4.3
|
Classes | |
| struct | TraceParams |
Enumerations | |
| enum class | TurnPolicy : int8_t { Foreground = 0 , Background = 1 , Left = 2 , Right = 3 , Minority = 4 , Majority = 5 , Random = 6 } |
Functions | |
| Bitmap * | create_bitmap (const int2 &size) |
| void | free_bitmap (Bitmap *bm) |
| template<typename ThresholdFn > | |
| Bitmap * | image_to_bitmap (const ImBuf &ibuf, ThresholdFn fn) |
| ImBuf * | bitmap_to_image (const Bitmap &bm) |
| Trace * | trace_bitmap (const TraceParams ¶ms, Bitmap &bm) |
| void | free_trace (Trace *trace) |
| bke::CurvesGeometry | trace_to_curves (const Trace &trace, StringRef hole_attribute_id, const float4x4 &transform) |
| bke::CurvesGeometry | trace_to_curves (const Trace &trace, StringRef hole_attribute_id, FunctionRef< float3(const int2 &)> pixel_to_position) |
|
strong |
| Enumerator | |
|---|---|
| Foreground | |
| Background | |
| Left | |
| Right | |
| Minority | |
| Majority | |
| Random | |
Definition at line 48 of file grease_pencil_trace_util.hh.
| ImBuf * blender::ed::image_trace::bitmap_to_image | ( | const Bitmap & | bm | ) |
| Bitmap * blender::ed::image_trace::create_bitmap | ( | const int2 & | size | ) |
Referenced by image_to_bitmap().
| void blender::ed::image_trace::free_bitmap | ( | Bitmap * | bm | ) |
| void blender::ed::image_trace::free_trace | ( | Trace * | trace | ) |
| Bitmap * blender::ed::image_trace::image_to_bitmap | ( | const ImBuf & | ibuf, |
| ThresholdFn | fn ) |
ThresholdFn separates foreground/background pixels by turning a color value into a bool. Must accept either a ColorGeometry4f or a ColorGeometry4b. bool fn(const ColorGeometry4f &color); bool fn(const ColorGeometry4b &color);
Definition at line 101 of file grease_pencil_trace_util.hh.
References bm, create_bitmap(), ImBufFloatBuffer::data, ImBuf::float_buffer, int, blender::threading::parallel_for(), ImBuf::x, and ImBuf::y.
| Trace * blender::ed::image_trace::trace_bitmap | ( | const TraceParams & | params, |
| Bitmap & | bm ) |
Trace boundaries in the bitmap.
| bke::CurvesGeometry blender::ed::image_trace::trace_to_curves | ( | const Trace & | trace, |
| StringRef | hole_attribute_id, | ||
| const float4x4 & | transform ) |
Create curves from trace data. Pixels are interpreted as (x, y, 0) coordinates and transformed.
| bke::CurvesGeometry blender::ed::image_trace::trace_to_curves | ( | const Trace & | trace, |
| StringRef | hole_attribute_id, | ||
| FunctionRef< float3(const int2 &)> | pixel_to_position ) |
Create curves from trace data. Pixels are transformed by the pixel_to_position function.