40 for (
const int frame_group : drawings_per_frame.
index_range()) {
54 std::atomic<bool> changed =
false;
57 Array<DrawingWeightData> &drawing_weights = this->drawing_weight_data[frame_group];
61 threading::parallel_for_each(drawing_weights, [&](DrawingWeightData &drawing_weight) {
62 for (const int point_index : drawing_weight.point_positions.index_range()) {
63 const float2 &co = drawing_weight.point_positions[point_index];
66 this->add_point_under_brush_to_brush_buffer(co, drawing_weight, point_index);
103 return std::make_unique<DrawWeightPaintOperation>(stroke_mode);
Scene * CTX_data_scene(const bContext *C)
void DEG_id_tag_update(ID *id, unsigned int flags)
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
IndexRange index_range() const
DrawWeightPaintOperation(const BrushStrokeMode &stroke_mode)
void on_stroke_begin(const bContext &C, const InputSample &start_sample) override
void on_stroke_done(const bContext &) override
void on_stroke_extended(const bContext &C, const InputSample &extension_sample) override
void ensure_active_vertex_group_in_object()
void get_mouse_input_sample(const InputSample &input_sample, const float brush_widen_factor=1.0f)
BrushStrokeMode stroke_mode
Array< Array< DrawingWeightData > > drawing_weight_data
void get_brush_settings(const bContext &C, const InputSample &start_sample)
void get_locked_and_bone_deformed_vertex_groups()
GreasePencil * grease_pencil
void init_weight_data_for_drawings(const bContext &C, const Span< ed::greasepencil::MutableDrawingInfo > &drawings, const int frame_group)
void apply_weight_to_point(const BrushPoint &point, const float target_weight, DrawingWeightData &drawing_weight)
void normalize_vertex_weights(MDeformVert &dvert, const int active_vertex_group, const Span< bool > vertex_group_is_locked, const Span< bool > vertex_group_is_bone_deformed)
Array< Vector< MutableDrawingInfo > > retrieve_editable_drawings_grouped_per_frame(const Scene &scene, GreasePencil &grease_pencil)
std::unique_ptr< GreasePencilStrokeOperation > new_weight_paint_draw_operation(const BrushStrokeMode &brush_mode)
void parallel_for_each(Range &&range, const Function &function)
Vector< bool > locked_vgroups
Vector< BrushPoint > points_in_brush
MutableSpan< MDeformVert > deform_verts
Vector< bool > bone_deformed_vgroups
void WM_event_add_notifier(const bContext *C, uint type, void *reference)