52 const float2 node_offset = {node.offsetx, node.offsety};
66 td.center[0] = td2d.
loc[0];
67 td.center[1] = td2d.
loc[1];
87 while ((node = node->parent)) {
125 t->
flag = t->
flag & ~T_PROP_EDIT_ALL;
129 if (nodes.is_empty()) {
134 tc->
data = MEM_cnew_array<TransData>(tc->
data_len, __func__);
137 for (
const int i : nodes.index_range()) {
167 for (
const int i :
IndexRange(tc->data_len)) {
169 float iloc[2], loc[2], tvec[2];
180 loc[0] = roundf(iloc[0] / grid_size[0]) * grid_size[0];
181 loc[1] = roundf(iloc[1] / grid_size[1]) * grid_size[1];
210 float offset[2] = {0.0f, 0.0f};
224 for (
int i = 0; i < tc->data_len; i++) {
227 bNode *node =
static_cast<bNode *
>(td->extra);
236 const float2 node_offset = {node->offsetx, node->offsety};
239 node->locx = location.x;
240 node->locy = location.y;
244 if (tc->data_len == 1) {
Main * CTX_data_main(const bContext *C)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void unit_m3(float m[3][3])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void add_v2_v2(float r[2], const float a[2])
MINLINE void add_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
void BLI_rctf_transform_pt_v(const rctf *dst, const rctf *src, float xy_dst[2], const float xy_src[2])
bool BLI_rctf_compare(const struct rctf *rect_a, const struct rctf *rect_b, float limit)
void ED_node_tree_propagate_change(const bContext *C, Main *bmain, bNodeTree *ntree)
#define NODE_EDGE_PAN_OUTSIDE_PAD
#define NODE_EDGE_PAN_INSIDE_PAD
#define NODE_EDGE_PAN_MAX_SPEED
void ED_node_post_apply_transform(bContext *C, bNodeTree *ntree)
#define NODE_EDGE_PAN_DELAY
#define NODE_EDGE_PAN_ZOOM_INFLUENCE
#define NODE_EDGE_PAN_SPEED_RAMP
Read Guarded memory(de)allocation.
void UI_view2d_edge_pan_cancel(bContext *C, View2DEdgePanData *vpd)
void UI_view2d_edge_pan_init(bContext *C, View2DEdgePanData *vpd, float inside_pad, float outside_pad, float speed_ramp, float max_speed, float delay, float zoom_influence)
void UI_view2d_edge_pan_apply(bContext *C, View2DEdgePanData *vpd, const int xy[2]) ATTR_NONNULL(1
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
float2 node_to_view(const bNode *node, float2 loc)
void node_remove_node(Main *bmain, bNodeTree *ntree, bNode *node, bool do_id_user)
float2 node_from_view(const bNode *node, float2 view_loc)
void node_insert_on_link_flags_set(SpaceNode &snode, const ARegion ®ion, bool attach_enabled, bool is_new_node)
VectorSet< bNode * > get_selected_nodes(bNodeTree &node_tree)
void node_insert_on_link_flags_clear(bNodeTree &node_tree)
void node_insert_on_link_flags(Main &bmain, SpaceNode &snode, bool is_new_node)
struct bNodeTree * edittree
float snap_spatial_precision
TransCustomDataContainer custom
int WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void WM_operator_properties_create_ptr(PointerRNA *ptr, wmOperatorType *ot)
void WM_operator_properties_free(PointerRNA *ptr)