64#include "RNA_prototypes.hh"
165 printf(
"error in texture initialize\n");
174 out->location[0] = 300.0f;
175 out->location[1] = 300.0f;
178 in->location[0] = 10.0f;
179 in->location[1] = 300.0f;
189namespace ed::space_node {
198 ID *
id = snode->
id, *from = snode->
from;
201 if (!treetype || (treetype->
poll && !treetype->
poll(&
C, treetype))) {
226 if (snode->
nodetree != ntree || snode->
id !=
id || snode->
from != from ||
227 (snode->
treepath.last() ==
nullptr && ntree))
240 if (r_active_texture_changed) {
241 *r_active_texture_changed =
false;
250 bool do_update =
false;
253 if (
node->is_group_output()) {
254 for (
bNode *node_iter : ntree->all_nodes()) {
255 if (node_iter->is_group_output()) {
275 for (
bNode *node_iter : ntree->all_nodes()) {
276 if (node_iter->type_legacy ==
node->type_legacy) {
295 if (ma.texpaintslot) {
298 for (
int i = 0; i < ma.tot_slots; i++) {
299 if (ma.texpaintslot[i].ima ==
image) {
300 ma.paint_active_slot = i;
323 if (r_active_texture_changed) {
324 *r_active_texture_changed =
true;
335 for (
bNode *node_iter : ntree->all_nodes()) {
342 if (was_output == 0) {
347 else if (do_update) {
354 for (
bNode *node_iter : ntree->all_nodes()) {
377namespace ed::space_node {
385 const bNode &node_the_socket_belongs_to,
389 if (
node == &node_the_socket_belongs_to) {
404 const float tolerance = 0.1f *
U.widget_unit;
408 const rctf socket_bounds = {location.x - half_width,
409 location.x + half_width,
410 location.y - half_height,
411 location.y + half_height};
500 {0,
nullptr, 0,
nullptr,
nullptr},
521 float rest =
fmod(co, grid_size);
522 float offset = rest - grid_size / 2 >= 0 ? grid_size : 0;
524 return co - rest + offset;
551 switch (event->
type) {
562 float *pwidth = &
node->width;
563 float *pheight = &
node->height;
565 float widthmin =
node->typeinfo->minwidth;
566 float widthmax =
node->typeinfo->maxwidth;
570 *pwidth = oldwidth + dx;
575 CLAMP(*pwidth, widthmin, widthmax);
578 float locmax = rd.
oldlocx + oldwidth;
579 *pwidth = oldwidth - dx;
584 CLAMP(*pwidth, widthmin, widthmax);
585 node->location[0] = locmax - *pwidth;
590 if (
node->is_frame()) {
600 CLAMP(*pheight, heightmin, heightmax);
601 node->location[1] = locmin + *pheight;
609 CLAMP(*pheight, heightmin, heightmax);
651 if (
node ==
nullptr) {
672 ot->
name =
"Resize Node";
673 ot->
idname =
"NODE_OT_resize";
695 if (sock.is_user_hidden()) {
700 if (sock.is_user_hidden()) {
710 if (
node->is_reroute()) {
725 if (sock.
link ==
nullptr) {
765 const int total_inputs)
781 rctf multi_socket_rect;
785 location.y - node_socket_height,
786 location.y + node_socket_height);
799 const float max_distance =
NODE_SOCKSIZE + std::clamp(20.0f / view2d_scale, 5.0f, 30.0f);
803 tree.ensure_topology_cache();
819 best_socket = socket;
825 if (!
node->is_reroute() && !node_collapsed &&
826 node->runtime->draw_bounds.ymax - cursor.y <
NODE_DY)
834 if (!sock->is_icon_visible()) {
837 const float2 location = sock->runtime->location;
846 if (node_collapsed) {
848 ((location.x < cursor.x) && (cursor.x - location.x <= padded_socket_size) &&
861 if (!sock->is_icon_visible()) {
864 const float2 location = sock->runtime->location;
867 if (node_collapsed) {
869 ((location.x > cursor.x) && (location.x - cursor.x <= padded_socket_size) &&
903 const float min_endpoint_distance = std::min(
907 if (min_endpoint_distance == 0.0f) {
911 return std::clamp(1.0f - min_endpoint_distance / viewport_width * 10.0f, 0.05f, 1.0f);
934 for (parent =
node->parent; parent; parent = parent->
parent) {
935 if (parent->is_selected()) {
954 for (
const auto &item : node_map.
items()) {
956 dst_output_node_map.
add_new(item.key->identifier, item.value);
964 if (
const bNode *output_node = dst_output_node_map.
lookup_default(output_node_id,
nullptr)) {
965 output_node_id = output_node->identifier;
982 const bool dupli_node_tree = !linked;
999 ID *new_group = BKE_id_copy(bmain, node->id);
1001 id_us_min(new_group);
1006 new_node->
id = new_group;
1022 bNodeLink *newlink = MEM_new<bNodeLink>(
"bNodeLink");
1045 if (&link == lastlink) {
1054 ntree->ensure_topology_cache();
1060 for (
bNode *
node : ntree->all_nodes()) {
1073 for (
const auto item : node_map.
items()) {
1074 const_node_map.
add(item.key, item.value);
1080 for (
const auto item : node_map.
items()) {
1081 bNode *src_node = item.key;
1082 bNode *dst_node = item.value;
1099 ot->
name =
"Duplicate Nodes";
1101 ot->
idname =
"NODE_OT_duplicate";
1111 ot->
srna,
"keep_inputs",
false,
"Keep Inputs",
"Keep the input links to duplicated nodes");
1117 "Duplicate node but not node trees, linking to the original data");
1136 for (
bNode *
node : edit_tree.all_nodes()) {
1142 if (
id ==
nullptr) {
1160 ot->
name =
"Read View Layers";
1161 ot->
idname =
"NODE_OT_read_viewlayers";
1162 ot->
description =
"Read all render layers of all used scenes";
1182 if (node_iter->id == id_cast<ID *>(sce)) {
1217 ot->
name =
"Render Changed Layer";
1218 ot->
idname =
"NODE_OT_render_changed";
1219 ot->
description =
"Render current scene, when input node's layer has been changed";
1242 const bool tag_update =
false)
1244 int tot_eq = 0, tot_neq = 0;
1247 if (
node->is_selected()) {
1253 !(
node->typeinfo->draw_buttons ||
node->typeinfo->draw_buttons_ex))
1258 if (
node->flag & toggle_flag) {
1267 if (
node->is_selected()) {
1273 !(
node->typeinfo->draw_buttons ||
node->typeinfo->draw_buttons_ex))
1278 if ((tot_eq && tot_neq) || tot_eq == 0) {
1279 node->flag |= toggle_flag;
1282 node->flag &= ~toggle_flag;
1297 if ((snode ==
nullptr) || (snode->
edittree ==
nullptr)) {
1311 ot->
name =
"Collapse";
1313 ot->
description =
"Toggle collapsing of selected nodes";
1314 ot->
idname =
"NODE_OT_hide_toggle";
1329 if ((snode ==
nullptr) || (snode->
edittree ==
nullptr)) {
1357 ot->
name =
"Toggle Node Preview";
1358 ot->
description =
"Toggle preview display for selected nodes";
1359 ot->
idname =
"NODE_OT_preview_toggle";
1381 else if (snode && snode->
edittree) {
1390 if (
node->is_type(
"CompositorNodeViewer"_ustr)) {
1391 for (
bNode *other_node : ntree->all_nodes()) {
1392 if (other_node->type_legacy ==
node->type_legacy) {
1401 else if (
node->is_type(
"GeometryNodeViewer"_ustr)) {
1416 ot->
name =
"Activate Viewer Node";
1417 ot->
description =
"Activate selected viewer node in compositor and geometry nodes";
1418 ot->
idname =
"NODE_OT_activate_viewer";
1439 group_node->
id = &new_tree->
id;
1451 ot->
name =
"Test Inlining Shader Nodes";
1452 ot->
description =
"Create a new inlined shader node tree as is consumed by renderers";
1453 ot->
idname =
"NODE_OT_test_inlining_shader_nodes";
1472 if (
node == active_viewer) {
1488 ot->
name =
"Deactivate Viewer Node";
1489 ot->
description =
"Deactivate selected viewer node in geometry nodes";
1513 else if (snode && snode->
edittree) {
1523 if (
node == active_viewer) {
1537 ot->
name =
"Toggle Viewer Node";
1538 ot->
description =
"Toggle selected viewer node in compositor and geometry nodes";
1539 ot->
idname =
"NODE_OT_toggle_viewer";
1552 if ((snode ==
nullptr) || (snode->
edittree ==
nullptr)) {
1566 ot->
name =
"Toggle Node Options";
1567 ot->
description =
"Toggle option buttons display for selected nodes";
1568 ot->
idname =
"NODE_OT_options_toggle";
1583 if ((snode ==
nullptr) || (snode->
edittree ==
nullptr)) {
1590 bool hidden =
false;
1592 if (
node->is_selected()) {
1601 if (
node->is_selected()) {
1618 ot->
name =
"Toggle Hidden Node Sockets";
1619 ot->
description =
"Toggle unused node socket display";
1620 ot->
idname =
"NODE_OT_hide_socket_toggle";
1644 if (
node->is_selected() && !
node->typeinfo->no_muting) {
1658 ot->
name =
"Toggle Node Mute";
1659 ot->
description =
"Toggle muting of selected nodes";
1660 ot->
idname =
"NODE_OT_mute_toggle";
1697 if (!
node || !
node->is_type(
"NodeComment"_ustr)) {
1714 ot->
name =
"Edit Comment";
1715 ot->
description =
"Enter edit mode for the comment node under the cursor";
1716 ot->
idname =
"NODE_OT_comment_edit";
1727 "Edit the active comment node, rather than the one under "
1750 if (
node->is_selected()) {
1756 for (
bNode *parent =
node->parent; parent; parent = parent->parent) {
1757 if (!parent->is_selected()) {
1758 node->parent = parent;
1765 if (
node.is_selected()) {
1782 ot->
name =
"Delete";
1784 ot->
idname =
"NODE_OT_delete";
1811 if (
node.is_selected()) {
1831 ot->
name =
"Delete with Reconnect";
1832 ot->
description =
"Remove nodes and reconnect nodes as if deletion was muted";
1833 ot->
idname =
"NODE_OT_delete_reconnect";
1860 if (
node->is_selected() &&
node != active_node) {
1879 ot->
name =
"Copy Color";
1880 ot->
description =
"Copy color to all selected nodes";
1881 ot->
idname =
"NODE_OT_node_copy_color";
1939 ntree_base = id_cast<bNodeTree *>(nodeptr.
owner_id);
1942 else if (snode && snode->
edittree) {
1958 ot->
name =
"Script Node Update";
1959 ot->
description =
"Update shader script node with new sockets and options from the script";
1960 ot->
idname =
"NODE_OT_shader_script_update";
1981 int backdrop_height,
1985 float bufx = backdrop_width * snode->
zoom;
1986 float bufy = backdrop_height * snode->
zoom;
1988 *fx = (bufx > 0.0f ? (
float(
x) - 0.5f * region->
winx - snode->
xof) / bufx + 0.5f : 0.0f);
1989 *fy = (bufy > 0.0f ? (
float(
y) - 0.5f * region->
winy - snode->
yof) / bufy + 0.5f : 0.0f);
2028 if (rectf.
xmin == 0.0f && rectf.
ymin == 0.0f && rectf.
xmax == 1.0f && rectf.
ymax == 1.0f) {
2051 ot->
name =
"Viewer Region";
2052 ot->
description =
"Set the boundaries for viewer operations (Not implemented)";
2053 ot->
idname =
"NODE_OT_viewer_border";
2084 ot->
name =
"Clear Viewer Region";
2085 ot->
description =
"Clear the boundaries for viewer operations";
2086 ot->
idname =
"NODE_OT_clear_viewer_border";
2111 ntree = id_cast<bNodeTree *>(ptr.
owner_id);
2113 else if (snode && snode->
edittree) {
2133 ot->
name =
"Add Cryptomatte Socket";
2134 ot->
description =
"Add a new input layer to a Cryptomatte node";
2135 ot->
idname =
"NODE_OT_cryptomatte_layer_add";
2160 ntree = id_cast<bNodeTree *>(ptr.
owner_id);
2162 else if (snode && snode->
edittree) {
2184 ot->
name =
"Remove Cryptomatte Socket";
2185 ot->
description =
"Remove layer from a Cryptomatte node";
2186 ot->
idname =
"NODE_OT_cryptomatte_layer_remove";
General operations, lookup, etc. for materials.
#define SH_NODE_OUTPUT_WORLD
#define CMP_NODE_CRYPTOMATTE
#define CMP_NODE_CRYPTOMATTE_LEGACY
#define SH_NODE_OUTPUT_MATERIAL
#define CMP_NODE_R_LAYERS
#define SH_NODE_OUTPUT_LIGHT
#define SH_NODE_OUTPUT_LINESTYLE
#define STRNCPY_UTF8(dst, src)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define ID_IS_LINKED(_id)
#define USER_EXPERIMENTAL_TEST(userdef, member)
Read Blender memory allocation and freeing.
ValueIterator values() const &
bool add(const Key &key, const Value &value)
const Value & lookup(const Key &key) const
Value lookup_default(const Key &key, const Value &default_value) const
Value & lookup_or_add_cb(const Key &key, const CreateValueF &create_value)
void add_new(const Key &key, const Value &value)
KeyIterator keys() const &
ItemIterator items() const &
const char * c_str() const
StringRefNull ref() const
virtual const int & get_corresponding_output_id(const bNode &input_bnode) const =0
#define storage(slot, qualifiers)
float distance(float, float) RET
ccl_device_inline float2 fmod(const float2 a, const float b)
const bNodeZoneType * zone_type_by_node_type(const int node_type)
void node_attach_node(bNodeTree &ntree, bNode &node, bNode &parent)
bNodeTreeType * node_tree_type_find(StringRef idname)
bNodeTree * node_tree_add_tree_embedded(Main *bmain, ID *owner_id, StringRefNull name, StringRefNull idname)
void node_remove_node(Main *bmain, bNodeTree &ntree, bNode &node, bool do_id_user, bool remove_animation=true)
bNode * node_get_active(bNodeTree &ntree)
Span< int > all_zone_output_node_types()
bNode * node_add_node(const bContext *C, bNodeTree &ntree, UString idname, std::optional< int > unique_identifier=std::nullopt)
void node_internal_relink(bNodeTree &ntree, bNode &node)
bool node_set_selected(bNode &node, bool select)
bool node_tree_contains_tree(const bNodeTree &tree_to_search_in, const bNodeTree &tree_to_search_for)
void node_detach_node(bNodeTree &ntree, bNode &node)
bNode * node_add_static_node(const bContext *C, bNodeTree &ntree, int type)
bNodeLink & node_add_link(bNodeTree &ntree, bNode &fromnode, bNodeSocket &fromsock, bNode &tonode, bNodeSocket &tosock)
Span< int > all_zone_input_node_types()
bNodeTree * node_tree_add_tree(Main *bmain, StringRef name, StringRef idname)
bNode * node_copy_with_mapping(bNodeTree *dst_tree, const bNode &node_src, int flag, std::optional< StringRefNull > dst_unique_name, std::optional< int > dst_unique_identifier, Map< const bNodeSocket *, bNodeSocket * > &new_socket_map, bool allow_duplicate_names=false)
bool node_declaration_ensure(bNodeTree &ntree, bNode &node)
void node_set_active(bNodeTree &ntree, bNode &node)
bool node_link_is_hidden(const bNodeLink &link)
void NODE_OT_test_inlining_shader_nodes(wmOperatorType *ot)
void NODE_OT_delete(wmOperatorType *ot)
void NODE_OT_cryptomatte_layer_add(wmOperatorType *ot)
float node_socket_calculate_height(const bNodeSocket &socket)
void NODE_OT_read_viewlayers(wmOperatorType *ot)
wmKeyMap * node_resize_modal_keymap(wmKeyConfig *keyconf)
int node_get_resize_cursor(NodeResizeDirection directions)
void NODE_OT_comment_edit(wmOperatorType *ot)
void tree_draw_order_update(bNodeTree &ntree)
static bool cursor_isect_multi_input_socket(const float2 &cursor, const bNodeSocket &socket)
static bool node_shader_script_update_poll(bContext *C)
static void node_resize_exit(bContext *C, wmOperator *op, bool cancel)
static void node_resize_cancel(bContext *C, wmOperator *op)
static wmOperatorStatus node_delete_reconnect_exec(bContext *C, wmOperator *)
static wmOperatorStatus node_cryptomatte_remove_socket_exec(bContext *C, wmOperator *)
static bool socket_is_occluded(const float2 &cursor, const bNodeSocket &socket, const bNode &node_the_socket_belongs_to, const Span< bNode * > sorted_nodes)
static void node_flag_toggle_exec(SpaceNode *snode, eNode_Flag toggle_flag, const bool tag_update=false)
void NODE_OT_node_copy_color(wmOperatorType *ot)
bool composite_node_editable(bContext *C)
void NODE_OT_viewer_border(wmOperatorType *ot)
void node_select_paired(bNodeTree &node_tree)
void NODE_OT_activate_viewer(wmOperatorType *ot)
bool node_deselect_all(bNodeTree &node_tree)
static wmOperatorStatus node_activate_viewer_exec(bContext *C, wmOperator *)
bNodeSocket * node_find_indicated_socket(SpaceNode &snode, ARegion ®ion, const float2 &cursor, const eNodeSocketInOut in_out)
static wmOperatorStatus node_toggle_viewer_exec(bContext *C, wmOperator *)
Array< bNode * > tree_draw_order_calc_nodes_reversed(bNodeTree &ntree)
void NODE_OT_deactivate_viewer(wmOperatorType *ot)
float2 node_link_calculate_multi_input_position(const float2 &socket_position, const int index, const int total_inputs)
void NODE_OT_resize(wmOperatorType *ot)
void NODE_OT_render_changed(wmOperatorType *ot)
static wmOperatorStatus node_cryptomatte_add_socket_exec(bContext *C, wmOperator *)
static wmOperatorStatus node_read_viewlayers_exec(bContext *C, wmOperator *)
static void node_duplicate_reparent_recursive(bNodeTree *ntree, const Map< bNode *, bNode * > &node_map, bNode *node)
static bool node_previewable(bContext *C)
void NODE_OT_delete_reconnect(wmOperatorType *ot)
void NODE_OT_shader_script_update(wmOperatorType *ot)
void NODE_OT_hide_socket_toggle(wmOperatorType *ot)
void node_set_hidden_sockets(bNode *node, int set)
bool node_is_previewable(const SpaceNode &snode, const bNodeTree &ntree, const bNode &node)
void remap_node_pairing(bNodeTree &dst_tree, const Map< const bNode *, bNode * > &node_map)
float node_link_dim_factor(const View2D &v2d, const bNodeLink &link)
static wmOperatorStatus node_resize_modal(bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus clear_viewer_border_exec(bContext *C, wmOperator *)
static wmOperatorStatus node_copy_color_exec(bContext *C, wmOperator *)
bNode * node_under_mouse_get(const SpaceNode &snode, const float2 mouse)
static void viewer_border_corner_to_backdrop(SpaceNode *snode, ARegion *region, int x, int y, int backdrop_width, int backdrop_height, float *fx, float *fy)
static wmOperatorStatus node_shader_script_update_exec(bContext *C, wmOperator *op)
static wmOperatorStatus node_options_toggle_exec(bContext *C, wmOperator *)
bool node_link_is_hidden_or_dimmed(const View2D &v2d, const bNodeLink &link)
static wmOperatorStatus node_comment_edit_invoke(bContext *C, wmOperator *op, const wmEvent *event)
VectorSet< bNode * > get_selected_nodes(bNodeTree &node_tree)
static wmOperatorStatus node_socket_toggle_exec(bContext *C, wmOperator *)
void NODE_OT_preview_toggle(wmOperatorType *ot)
void NODE_OT_clear_viewer_border(wmOperatorType *ot)
static void node_resize_init(bContext *C, wmOperator *op, const float2 &cursor, const VectorSet< bNode * > &nodes, NodeResizeDirection dir)
static wmOperatorStatus node_collapse_toggle_exec(bContext *C, wmOperator *)
void snode_set_context(const bContext &C)
void NODE_OT_duplicate(wmOperatorType *ot)
NodeResizeDirection node_get_resize_direction(const SpaceNode &snode, const bNode *node, const int x, const int y)
bool node_has_hidden_sockets(bNode *node)
static wmOperatorStatus test_inline_shader_nodes_exec(bContext *C, wmOperator *)
void NODE_OT_options_toggle(wmOperatorType *ot)
void NODE_OT_toggle_viewer(wmOperatorType *ot)
static wmOperatorStatus viewer_border_exec(bContext *C, wmOperator *op)
static wmOperatorStatus node_duplicate_exec(bContext *C, wmOperator *op)
static wmOperatorStatus node_deactivate_viewer_exec(bContext *C, wmOperator *)
bool composite_node_active(bContext *C)
wmOperatorStatus node_render_changed_exec(bContext *C, wmOperator *)
void NODE_OT_collapse_toggle(wmOperatorType *ot)
static wmOperatorStatus node_resize_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void update_multi_input_indices_for_removed_links(bNode &node)
static wmOperatorStatus node_delete_exec(bContext *C, wmOperator *)
void NODE_OT_cryptomatte_layer_remove(wmOperatorType *ot)
static wmOperatorStatus node_preview_toggle_exec(bContext *C, wmOperator *)
static wmOperatorStatus node_mute_exec(bContext *C, wmOperator *)
float nearest_node_grid_coord(float co)
void NODE_OT_mute_toggle(wmOperatorType *ot)
void activate_geometry_node(Main &bmain, SpaceNode &snode, bNode &node, std::optional< int > item_identifier=std::nullopt)
bNode * find_geometry_nodes_viewer(const ViewerPath &viewer_path, SpaceNode &snode)
T distance(const T &a, const T &b)
bool inline_shader_node_tree(const bNodeTree &src_tree, bNodeTree &dst_tree, InlineShaderNodeTreeParams ¶ms)
void update_node_declaration_and_sockets(bNodeTree &ntree, bNode &node, Main *bmain)
Button * but_find_mouse_over(const ARegion *region, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
void view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
float view2d_scale_get_x(const View2D *v2d)
MINLINE float min_ff(float a, float b)
void WM_main_add_notifier(uint type, void *reference)
bool ED_node_is_compositor(const SpaceNode *snode)
bool ED_operator_node_active(bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
bool ED_node_is_geometry(const SpaceNode *snode)
float BLI_rctf_length_y(const rctf *rect, float y)
void ED_node_texture_default(const bContext *C, Tex *tex)
bool BLI_rctf_isect_pt_v(const struct rctf *rect, const float xy[2])
wmKeyMap * WM_modalkeymap_find(wmKeyConfig *keyconf, const char *idname)
wmOperatorStatus WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
MINLINE void copy_v3_v3(float r[3], const float a[3])
WorkSpace * CTX_wm_workspace(const bContext *C)
void ED_space_image_sync(Main *bmain, Image *image, bool ignore_render_viewer)
void WM_operator_properties_free(PointerRNA *ptr)
void ED_node_set_active(Main *bmain, SpaceNode *snode, bNodeTree *ntree, bNode *node, bool *r_active_texture_changed)
bke::bNodeTreeType * ntreeType_Geometry
bke::bNodeTreeType * ntreeType_Composite
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
bool ED_node_is_shader(SpaceNode *snode)
void WM_cursor_modal_set(wmWindow *win, int val)
bool ED_operator_node_editable(bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
MINLINE int max_ii(int a, int b)
void ED_node_tree_start(ARegion *region, SpaceNode *snode, bNodeTree *ntree, ID *id, ID *from)
void ED_region_tag_redraw(ARegion *region)
RenderEngineType * CTX_data_engine_type(const bContext *C)
void RE_engine_free(RenderEngine *engine)
struct bke::bNodeTreeType * ntreeType_Texture
PointerRNA WM_operator_properties_create(const char *opstring)
void GPU_material_free(ListBaseT< LinkData > *gpumaterial)
void ED_preview_kill_jobs(wmWindowManager *wm, Main *bmain)
void * BLI_findlink(const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BKE_ntree_update_tag_node_mute(bNodeTree *ntree, bNode *node)
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
bool ntreeCompositCryptomatteRemoveSocket(bNode *node)
void DEG_id_tag_update(ID *id, unsigned int flags)
void ntreeCompositCryptomatteAddSocket(bNode *node)
PointerRNA CTX_data_pointer_get(const bContext *C, const char *member)
bool ED_node_is_texture(SpaceNode *snode)
wmWindowManager * CTX_wm_manager(const bContext *C)
bool BLI_rctf_isect_pt(const struct rctf *rect, float x, float y)
void BKE_main_ensure_invariants(Main &bmain, std::optional< Span< ID * > > modified_ids=std::nullopt)
void BKE_ntree_update_after_single_tree_change(Main &bmain, bNodeTree &modified_tree, const NodeTreeUpdateExtraParams ¶ms={})
void WM_operator_properties_border_to_rcti(wmOperator *op, rcti *r_rect)
void ED_node_post_apply_transform(bContext *C, bNodeTree *ntree)
void WM_cursor_modal_restore(wmWindow *win)
bool BLI_rctf_inside_rctf(const rctf *rct_a, const rctf *rct_b)
SpaceNode * CTX_wm_space_node(const bContext *C)
void WM_operator_properties_gesture_box(wmOperatorType *ot)
wmOperatorStatus WM_operator_name_call(bContext *C, const char *opstring, wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
void WM_event_drag_start_mval(const wmEvent *event, const ARegion *region, int r_mval[2])
ImBuf * BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **r_lock)
ARegion * BKE_area_find_region_type(const ScrArea *area, int region_type)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
struct bke::bNodeTreeType * ntreeType_Shader
wmOperatorStatus WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void WM_event_handling_break(const bContext &C)
float BLI_rctf_length_x(const rctf *rect, float x)
RenderEngine * RE_engine_create(RenderEngineType *type)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BKE_ntree_update_tag_node_property(bNodeTree *ntree, bNode *node)
Main * CTX_data_main(const bContext *C)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
MINLINE float max_ff(float a, float b)
void ED_node_set_active_viewer_key(SpaceNode *snode)
Image * BKE_image_ensure_viewer(Main *bmain, int type, const char *name)
void BKE_ntree_update_tag_active_output_changed(bNodeTree *ntree)
void ntreeCompositTagRender(Scene *scene)
void WM_gesture_box_cancel(bContext *C, wmOperator *op)
void WM_modalkeymap_assign(wmKeyMap *km, const char *opname)
void ED_node_set_tree_type(SpaceNode *snode, bke::bNodeTreeType *typeinfo)
Scene * CTX_data_scene(const bContext *C)
wmKeyMap * WM_modalkeymap_ensure(wmKeyConfig *keyconf, const char *idname, const EnumPropertyItem *items)
bool ED_node_supports_preview(SpaceNode *snode)
@ NODE_LINK_INSERT_TARGET_INVALID
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void WM_event_add_mousemove(wmWindow *win)
@ CMP_NODE_CRYPTOMATTE_SOURCE_RENDER
bool RE_ReadRenderResult(Scene *scene, Scene *scenode)
ARegion * CTX_wm_region(const bContext *C)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
@ SN_OVERLAY_SHOW_OVERLAYS
@ SN_OVERLAY_SHOW_PREVIEWS
void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax)
void BKE_image_release_ibuf(Image *ima, ImBuf *ibuf, void *lock)
#define NODE_MULTI_INPUT_LINK_GAP
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
ListBaseT< World > worlds
ListBaseT< Material > materials
ListBaseT< Scene > scenes
void(*) update_script_node(struct RenderEngine *engine, struct bNodeTree *ntree, struct bNode *node)
struct ReportList * reports
struct bNodeTree * node_group
ListBaseT< ViewLayer > view_layers
ListBaseT< SceneCompositorEffect > compositor_effects
struct ToolSettings * toolsettings
eSpaceNodeOverlay_Flag flag
struct bNodeTree * selected_node_group
eSpaceNode_ShaderFrom shaderfrom
struct bNodeTree * edittree
struct bNodeTree * nodetree
ListBaseT< bNodeTreePath > treepath
struct bNodeTree * nodetree
bke::bNodeSocketRuntime * runtime
ListBaseT< bNodeLink > links
bke::bNodeTreeType * typeinfo
void(*) get_from_context(const bContext *C, bNodeTreeType *ntreetype, bNodeTree **r_ntree, ID **r_id, ID **r_from)
bool(*) poll(const bContext *C, bNodeTreeType *ntreetype)
bool allow_preserving_repeat_zones
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
void(*) cancel(bContext *C, wmOperator *op)
const char * translation_context
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
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
#define ISMOUSE_BUTTON(event_type)