55 return this->placement.
project(screen_co);
65 this->vc.v3d->overlay.handle_display,
77 this->vc.v3d->overlay.handle_display,
114 aspect_ratios.span.last() = 1.0f;
115 aspect_ratios.finish();
119 u_scales.span.last() = 1.0f;
126 fill_opacities.span.last() = 1.0f;
127 fill_opacities.finish();
133 if (!this->grease_pencil->has_active_layer()) {
139 if (!
layer.is_editable()) {
147 if (material !=
nullptr && material->gp_style !=
nullptr &&
156 bool inserted_keyframe =
false;
158 *this->
vc.
scene, *this->grease_pencil,
layer,
false, inserted_keyframe))
207 bool inserted_keyframe =
false;
210 const bool use_duplicate_previous_key =
true;
212 if (
layer->is_editable()) {
216 use_duplicate_previous_key,
222 if (inserted_keyframe) {
229 for (
const int drawing_index : this->drawings.
index_range()) {
239 if (active_layer !=
nullptr) {
241 this->grease_pencil->get_editable_drawing_at(*active_layer, this->
vc.
scene->
r.
cfra);
243 for (
const int drawing_index : this->drawings.
index_range()) {
246 if (active_drawing == &info.
drawing) {
305 ot->
name =
"Grease Pencil Pen";
306 ot->
idname =
"GREASE_PENCIL_OT_pen";
Low-level operations for curves.
Low-level operations for curves.
Low-level operations for grease pencil.
General operations, lookup, etc. for materials.
IndexRange index_range() const
GSpanAttributeWriter lookup_for_write_span(StringRef name)
MutableSpan< float > opacities_for_write()
bke::CurvesGeometry & strokes_for_write()
void tag_topology_changed()
bool use_project_to_surface() const
void cache_viewport_depths(Depsgraph *depsgraph, ARegion *region, View3D *view3d)
bool use_project_to_stroke() const
DrawingPlacement()=default
float3 project(float2 co, bool &clipped) const
bool ensure_active_keyframe(const Scene &scene, GreasePencil &grease_pencil, bke::greasepencil::Layer &layer, const bool duplicate_previous_key, bool &r_inserted_keyframe)
static void grease_pencil_pen_exit(bContext *C, wmOperator *op)
IndexMask retrieve_editable_and_all_selected_points(Object &object, const bke::greasepencil::Drawing &drawing, const int layer_index, const eHandleDisplay handle_display, IndexMaskMemory &memory)
static void GREASE_PENCIL_OT_pen(wmOperatorType *ot)
IndexMask retrieve_visible_bezier_handle_points(Object &object, const bke::greasepencil::Drawing &drawing, const int layer_index, const eHandleDisplay handle_display, IndexMaskMemory &memory)
static wmOperatorStatus grease_pencil_pen_modal(bContext *C, wmOperator *op, const wmEvent *event)
IndexMask retrieve_editable_strokes(Object &object, const bke::greasepencil::Drawing &drawing, int layer_index, IndexMaskMemory &memory)
Vector< MutableDrawingInfo > retrieve_editable_drawings(const Scene &scene, GreasePencil &grease_pencil)
static wmOperatorStatus grease_pencil_pen_invoke(bContext *C, wmOperator *op, const wmEvent *event)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void WM_operatortype_append(void(*opfunc)(wmOperatorType *))
Depsgraph * CTX_data_depsgraph_pointer(const bContext *C)
Material * BKE_object_material_get(Object *ob, short act)
void ED_grease_pencil_pentool_modal_keymap(wmKeyConfig *keyconf)
void ED_region_tag_redraw(ARegion *region)
VecBase< float, 2 > float2
void DEG_id_tag_update(ID *id, unsigned int flags)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void WM_cursor_modal_restore(wmWindow *win)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void ED_operatortypes_grease_pencil_pen()
void WM_modalkeymap_assign(wmKeyMap *km, const char *opname)
VecBase< float, 3 > float3
void ED_workspace_status_text(bContext *C, const char *str)
View3D * CTX_wm_view3d(const bContext *C)
struct ToolSettings * toolsettings
bke::greasepencil::Drawing & drawing
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) modal(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports