53 lines
1.7 KiB
C++
53 lines
1.7 KiB
C++
#pragma once
|
|
#include "node.h"
|
|
#include "node_stroke_preview.h"
|
|
#include "node_slider.h"
|
|
#include "brush.h"
|
|
#include "node_checkbox.h"
|
|
#include "node_combobox.h"
|
|
|
|
class NodePanelStroke : public Node
|
|
{
|
|
public:
|
|
NodeStrokePreview* m_preview;
|
|
NodeComboBox* m_blend_mode;
|
|
NodeSliderH* m_tip_size;
|
|
NodeSliderH* m_tip_spacing;
|
|
NodeSliderH* m_tip_flow;
|
|
NodeSliderH* m_tip_opacity;
|
|
NodeSliderH* m_tip_angle;
|
|
NodeSliderH* m_tip_stencil;
|
|
NodeSliderH* m_tip_wet;
|
|
NodeSliderH* m_tip_noise;
|
|
NodeSliderH* m_tip_hue;
|
|
NodeSliderH* m_tip_sat;
|
|
NodeSliderH* m_tip_val;
|
|
NodeSliderH* m_jitter_scale;
|
|
NodeSliderH* m_jitter_angle;
|
|
NodeSliderH* m_jitter_spread;
|
|
NodeSliderH* m_jitter_flow;
|
|
NodeSliderH* m_jitter_hue;
|
|
NodeSliderH* m_jitter_sat;
|
|
NodeSliderH* m_jitter_val;
|
|
NodeCheckBox* m_tip_angle_follow;
|
|
NodeCheckBox* m_tip_flow_pressure;
|
|
NodeCheckBox* m_tip_size_pressure;
|
|
NodeCheckBox* m_tip_hue_pressure;
|
|
NodeCheckBox* m_tip_sat_pressure;
|
|
NodeCheckBox* m_tip_val_pressure;
|
|
std::function<void(Node* target)> on_stroke_change;
|
|
std::map<NodeSliderH*, std::function<float(float)>> m_curves;
|
|
|
|
virtual Node* clone_instantiate() const override;
|
|
virtual void clone_finalize(Node* dest) const override;
|
|
virtual void init() override;
|
|
void init_controls();
|
|
void update_controls();
|
|
|
|
void init_slider(NodeSliderH*& slider, const char* id, float ui::Brush::* prop);
|
|
void handle_slide(float ui::Brush::* prop, Node* target, float value);
|
|
|
|
void init_checkbox(NodeCheckBox*& slider, const char* id, bool ui::Brush::* prop);
|
|
void handle_checkbox(bool ui::Brush::* prop, Node* target, bool value);
|
|
};
|