53#include "RNA_prototypes.hh"
120 const int total_inputs)
129 for (
bNode *node : nodetree->all_nodes()) {
151 int recalc_flags = 0;
316 ntree->
runtime->test_break =
nullptr;
317 ntree->
runtime->stats_draw =
nullptr;
318 ntree->
runtime->progress =
nullptr;
367 if (
size_t(width) * height > (
size_t(max_texture_size) * max_texture_size) / 4) {
388 if (
G.is_rendering) {
405 CompoJob *cj = MEM_new<CompoJob>(
"compo job");
411 cj->
ntree = nodetree;
496 if (snode !=
nullptr && root_ntree !=
nullptr) {
605 shader->
locx = 10.0f;
606 shader->
locy = 300.0f;
613 printf(
"ED_node_shader_default called on wrong ID type.\n");
623 printf(
"error in composite initialize\n");
652 printf(
"error in texture initialize\n");
685 ID *
id = snode->
id, *from = snode->
from;
688 if (!treetype || (treetype->
poll && !treetype->
poll(&
C, treetype))) {
713 if (snode->
nodetree != ntree || snode->
id !=
id || snode->
from != from ||
726 if (r_active_texture_changed) {
727 *r_active_texture_changed =
false;
736 bool do_update =
false;
740 for (
bNode *node_iter : ntree->all_nodes()) {
761 for (
bNode *node_iter : ntree->all_nodes()) {
762 if (node_iter->type == node->
type) {
776 if (ma->nodetree && ma->use_nodes &&
783 if (ma->texpaintslot) {
786 for (
int i = 0; i < ma->tot_slots; i++) {
787 if (ma->texpaintslot[i].ima ==
image) {
788 ma->paint_active_slot = i;
797 if (wo->nodetree && wo->use_nodes &&
812 if (r_active_texture_changed) {
813 *r_active_texture_changed =
true;
824 for (
bNode *node_iter : ntree->all_nodes()) {
831 if (was_output == 0) {
840 if (was_output == 0) {
841 for (
bNode *node_iter : ntree->all_nodes()) {
852 else if (do_update) {
859 for (
bNode *node_iter : ntree->all_nodes()) {
889 const bNode &node_the_socket_belongs_to,
892 for (
bNode *node : sorted_nodes) {
893 if (node == &node_the_socket_belongs_to) {
899 const float socket_hitbox_radius =
NODE_SOCKSIZE - 0.1f *
U.widget_unit;
975 switch (event->
type) {
985 float *pwidth = &node->
width;
987 float widthmin = node->
typeinfo->minwidth;
988 float widthmax = node->
typeinfo->maxwidth;
992 *pwidth = oldwidth + dx;
993 CLAMP(*pwidth, widthmin, widthmax);
996 float locmax = nsw->
oldlocx + oldwidth;
999 CLAMP(node->
locx, locmax - widthmax, locmax - widthmin);
1000 *pwidth = locmax - node->
locx;
1012 CLAMP(node->
locy, locmin + heightmin, locmin + heightmax);
1078 if (node ==
nullptr) {
1104 ot->name =
"Resize Node";
1105 ot->idname =
"NODE_OT_resize";
1106 ot->description =
"Resize a node";
1142 if (node->is_reroute()) {
1157 if (sock->link ==
nullptr) {
1177 return U.experimental.use_shader_node_previews && !node.is_frame();
1191 rctf multi_socket_rect;
1195 location.y - node_socket_height,
1196 location.y + node_socket_height);
1209 const float max_distance =
NODE_SOCKSIZE + std::clamp(20.0f / view2d_scale, 5.0f, 30.0f);
1213 tree.ensure_topology_cache();
1220 float best_distance =
FLT_MAX;
1229 best_socket = socket;
1233 for (
bNode *node : sorted_nodes) {
1234 const bool node_hidden = node->flag &
NODE_HIDDEN;
1235 if (!node->is_reroute() && !node_hidden && node->runtime->totr.ymax - cursor.y <
NODE_DY) {
1242 if (!node->is_socket_icon_drawn(*sock)) {
1245 const float2 location = sock->runtime->location;
1249 update_best_socket(sock,
distance);
1254 update_best_socket(sock,
distance);
1259 for (
bNodeSocket *sock : node->output_sockets()) {
1260 if (!node->is_socket_icon_drawn(*sock)) {
1263 const float2 location = sock->runtime->location;
1267 if (location.x - cursor.x > padded_socket_size) {
1272 update_best_socket(sock,
distance);
1299 const float min_endpoint_distance = std::min(
1303 if (min_endpoint_distance == 0.0f) {
1307 return std::clamp(1.0f - min_endpoint_distance / viewport_width * 10.0f, 0.05f, 1.0f);
1330 for (parent = node->
parent; parent; parent = parent->
parent) {
1350 for (
const auto &item : node_map.
items()) {
1352 dst_output_node_map.
add_new(item.key->identifier, item.value);
1360 if (
const bNode *output_node = dst_output_node_map.
lookup_default(output_node_id,
nullptr)) {
1361 output_node_id = output_node->identifier;
1378 const bool dupli_node_tree = !linked;
1391 node_map.
add_new(node, new_node);
1393 if (node->id && dupli_node_tree) {
1395 ID *new_group = BKE_id_copy(bmain, node->id);
1397 id_us_min(new_group);
1402 new_node->
id = new_group;
1415 if (link->tonode && (link->tonode->flag &
NODE_SELECT) &&
1416 (keep_inputs || (link->fromnode && (link->fromnode->flag &
NODE_SELECT))))
1418 bNodeLink *newlink = MEM_cnew<bNodeLink>(
"bNodeLink");
1419 newlink->
flag = link->flag;
1427 if (link->fromnode && (link->fromnode->flag &
NODE_SELECT)) {
1433 newlink->
fromnode = link->fromnode;
1434 newlink->
fromsock = link->fromsock;
1441 if (link == lastlink) {
1450 ntree->ensure_topology_cache();
1456 for (
bNode *node : ntree->all_nodes()) {
1469 for (
const auto item : node_map.
items()) {
1470 const_node_map.
add(item.key, item.value);
1476 for (
const auto item : node_map.
items()) {
1477 bNode *src_node = item.key;
1478 bNode *dst_node = item.value;
1495 ot->name =
"Duplicate Nodes";
1496 ot->description =
"Duplicate selected nodes";
1497 ot->idname =
"NODE_OT_duplicate";
1507 ot->srna,
"keep_inputs",
false,
"Keep Inputs",
"Keep the input links to duplicated nodes");
1513 "Duplicate node but not node trees, linking to the original data");
1532 for (
bNode *node : edit_tree.all_nodes()) {
1537 if (
id ==
nullptr) {
1555 ot->name =
"Read View Layers";
1556 ot->idname =
"NODE_OT_read_viewlayers";
1557 ot->description =
"Read all render layers of all used scenes";
1571 bNode *node =
nullptr;
1573 if (node_iter->id == (
ID *)sce) {
1604 ot->name =
"Render Changed Layer";
1605 ot->idname =
"NODE_OT_render_changed";
1606 ot->description =
"Render current scene, when input node's layer has been changed";
1628 int tot_eq = 0, tot_neq = 0;
1631 if (node->flag &
SELECT) {
1637 !(node->typeinfo->draw_buttons || node->typeinfo->draw_buttons_ex))
1642 if (node->flag & toggle_flag) {
1651 if (node->flag &
SELECT) {
1657 !(node->typeinfo->draw_buttons || node->typeinfo->draw_buttons_ex))
1662 if ((tot_eq && tot_neq) || tot_eq == 0) {
1663 node->flag |= toggle_flag;
1666 node->flag &= ~toggle_flag;
1677 if ((snode ==
nullptr) || (snode->
edittree ==
nullptr)) {
1692 ot->description =
"Toggle hiding of selected nodes";
1693 ot->idname =
"NODE_OT_hide_toggle";
1708 if ((snode ==
nullptr) || (snode->
edittree ==
nullptr)) {
1733 ot->name =
"Toggle Node Preview";
1734 ot->description =
"Toggle preview display for selected nodes";
1735 ot->idname =
"NODE_OT_preview_toggle";
1756 if (!(node->flag &
SELECT)) {
1759 if (node == active_viewer) {
1773 ot->name =
"Deactivate Viewer Node";
1774 ot->description =
"Deactivate selected viewer node in geometry nodes";
1775 ot->idname = __func__;
1790 if ((snode ==
nullptr) || (snode->
edittree ==
nullptr)) {
1804 ot->name =
"Toggle Node Options";
1805 ot->description =
"Toggle option buttons display for selected nodes";
1806 ot->idname =
"NODE_OT_options_toggle";
1821 if ((snode ==
nullptr) || (snode->
edittree ==
nullptr)) {
1828 bool hidden =
false;
1830 if (node->flag &
SELECT) {
1839 if (node->flag &
SELECT) {
1856 ot->name =
"Toggle Hidden Node Sockets";
1857 ot->description =
"Toggle unused node socket display";
1858 ot->idname =
"NODE_OT_hide_socket_toggle";
1882 if ((node->flag &
SELECT) && !node->typeinfo->no_muting) {
1896 ot->name =
"Toggle Node Mute";
1897 ot->description =
"Toggle muting of selected nodes";
1898 ot->idname =
"NODE_OT_mute_toggle";
1925 if (node->flag &
SELECT) {
1938 ot->name =
"Delete";
1939 ot->description =
"Remove selected nodes";
1940 ot->idname =
"NODE_OT_delete";
1967 if (node->flag &
SELECT) {
1985 ot->name =
"Delete with Reconnect";
1986 ot->description =
"Remove nodes and reconnect nodes as if deletion was muted";
1987 ot->idname =
"NODE_OT_delete_reconnect";
2009 bNode *node =
nullptr;
2016 else if (snode && snode->
edittree) {
2036 ot->name =
"Add File Node Socket";
2037 ot->description =
"Add a new input to a file output node";
2038 ot->idname =
"NODE_OT_output_file_add_socket";
2048 ot->srna,
"file_path",
"Image",
MAX_NAME,
"File Path",
"Subpath of the output file");
2062 bNode *node =
nullptr;
2068 else if (snode && snode->
edittree) {
2089 ot->name =
"Remove File Node Socket";
2090 ot->description =
"Remove the active input from a file output node";
2091 ot->idname =
"NODE_OT_output_file_remove_active_socket";
2111 bNode *node =
nullptr;
2116 else if (snode && snode->
edittree) {
2133 if (direction == 1) {
2161 {1,
"UP", 0,
"Up",
""}, {2,
"DOWN", 0,
"Down",
""}, {0,
nullptr, 0,
nullptr,
nullptr}};
2164 ot->name =
"Move File Node Socket";
2165 ot->description =
"Move the active input of a file output node up or down the list";
2166 ot->idname =
"NODE_OT_output_file_move_active_socket";
2175 RNA_def_enum(
ot->srna,
"direction", direction_items, 2,
"Direction",
"");
2194 for (
bNode *node : ntree.all_nodes()) {
2195 if (node->flag &
NODE_SELECT && node != active_node) {
2214 ot->name =
"Copy Color";
2215 ot->description =
"Copy color to all selected nodes";
2216 ot->idname =
"NODE_OT_node_copy_color";
2246 if (!node && snode && snode->
edittree) {
2281 for (
bNode *node : ntree->all_nodes()) {
2284 if (ngroup && !done_trees.
contains(ngroup)) {
2311 bNode *node =
nullptr;
2316 else if (snode && snode->
edittree) {
2339 engine, type, ntree,
text, done_trees);
2359 ot->name =
"Script Node Update";
2360 ot->description =
"Update shader script node with new sockets and options from the script";
2361 ot->idname =
"NODE_OT_shader_script_update";
2382 int backdrop_height,
2386 float bufx = backdrop_width * snode->
zoom;
2387 float bufy = backdrop_height * snode->
zoom;
2389 *fx = (bufx > 0.0f ? (
float(
x) - 0.5f * region->
winx - snode->
xof) / bufx + 0.5f : 0.0f);
2390 *fy = (bufy > 0.0f ? (
float(
y) - 0.5f * region->
winy - snode->
yof) / bufy + 0.5f : 0.0f);
2429 if (rectf.
xmin == 0.0f && rectf.
ymin == 0.0f && rectf.
xmax == 1.0f && rectf.
ymax == 1.0f) {
2452 ot->name =
"Viewer Region";
2453 ot->description =
"Set the boundaries for viewer operations";
2454 ot->idname =
"NODE_OT_viewer_border";
2485 ot->name =
"Clear Viewer Region";
2486 ot->description =
"Clear the boundaries for viewer operations";
2487 ot->idname =
"NODE_OT_clear_viewer_border";
2508 bNode *node =
nullptr;
2514 else if (snode && snode->
edittree) {
2533 ot->name =
"Add Cryptomatte Socket";
2534 ot->description =
"Add a new input layer to a Cryptomatte node";
2535 ot->idname =
"NODE_OT_cryptomatte_layer_add";
2556 bNode *node =
nullptr;
2562 else if (snode && snode->
edittree) {
2583 ot->name =
"Remove Cryptomatte Socket";
2584 ot->description =
"Remove layer from a Cryptomatte node";
2585 ot->idname =
"NODE_OT_cryptomatte_layer_remove";
void BKE_callback_exec_id(Main *bmain, ID *id, eCbEvent evt)
@ BKE_CB_EVT_COMPOSITE_PRE
@ BKE_CB_EVT_COMPOSITE_CANCEL
@ BKE_CB_EVT_COMPOSITE_POST
PointerRNA CTX_data_pointer_get(const bContext *C, const char *member)
WorkSpace * CTX_wm_workspace(const bContext *C)
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
SpaceNode * CTX_wm_space_node(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
ViewLayer * CTX_data_view_layer(const bContext *C)
ImBuf * BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **r_lock)
Image * BKE_image_ensure_viewer(Main *bmain, int type, const char *name)
void BKE_image_release_ibuf(Image *ima, ImBuf *ibuf, void *lock)
void BKE_image_backup_render(Scene *scene, Image *ima, bool free_current_slot)
General operations, lookup, etc. for materials.
struct Material * BKE_material_default_surface(void)
struct Material * BKE_material_default_volume(void)
#define CMP_NODE_COMPOSITE
#define SH_NODE_OUTPUT_WORLD
#define CMP_NODE_CRYPTOMATTE
#define NODE_GROUP_OUTPUT
#define CMP_NODE_CRYPTOMATTE_LEGACY
#define SH_NODE_OUTPUT_MATERIAL
#define CMP_NODE_OUTPUT_FILE
#define FOREACH_NODETREE_END
#define SH_NODE_BACKGROUND
#define FOREACH_NODETREE_BEGIN(bmain, _nodetree, _id)
#define CMP_NODE_R_LAYERS
#define SH_NODE_OUTPUT_LIGHT
#define SH_NODE_OUTPUT_LINESTYLE
void BKE_ntree_update_tag_active_output_changed(bNodeTree *ntree)
void BKE_ntree_update_tag_node_mute(bNodeTree *ntree, bNode *node)
void BKE_ntree_update_main_tree(Main *bmain, bNodeTree *ntree, NodeTreeUpdateExtraParams *params)
void BKE_ntree_update_tag_node_property(bNodeTree *ntree, bNode *node)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void BKE_render_resolution(const RenderData *r, const bool use_crop, int *r_width, int *r_height)
bool BKE_scene_multiview_is_render_view_active(const RenderData *rd, const SceneRenderView *srv)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
MINLINE float max_ff(float a, float b)
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
MINLINE void copy_v3_v3(float r[3], const float a[3])
float BLI_rctf_length_x(const rctf *rect, float x)
void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax)
bool BLI_rctf_isect_pt(const struct rctf *rect, float x, float y)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
bool BLI_rctf_inside_rctf(const rctf *rct_a, const rctf *rct_b)
void BLI_rctf_init_pt_radius(struct rctf *rect, const float xy[2], float size)
float BLI_rctf_length_y(const rctf *rect, float y)
#define STRNCPY(dst, src)
#define STRNCPY_UTF8(dst, src)
void DEG_id_tag_update(ID *id, unsigned int flags)
Depsgraph * DEG_graph_new(Main *bmain, Scene *scene, ViewLayer *view_layer, eEvaluationMode mode)
void DEG_evaluate_on_refresh(Depsgraph *graph, DepsgraphEvaluateSyncWriteback sync_writeback=DEG_EVALUATE_SYNC_WRITEBACK_NO)
void DEG_graph_build_for_compositor_preview(Depsgraph *graph, bNodeTree *nodetree)
void DEG_debug_name_set(Depsgraph *depsgraph, const char *name)
Scene * DEG_get_evaluated_scene(const Depsgraph *graph)
ID * DEG_get_evaluated_id(const Depsgraph *depsgraph, ID *id)
@ CMP_NODE_CRYPTOMATTE_SOURCE_RENDER
@ NODE_LINK_INSERT_TARGET_INVALID
@ SCE_COMPOSITOR_DEVICE_GPU
@ SN_OVERLAY_SHOW_PREVIEWS
@ SN_OVERLAY_SHOW_OVERLAYS
void ED_space_image_sync(Main *bmain, Image *image, bool ignore_render_viewer)
void ED_node_tree_propagate_change(const bContext *C, Main *bmain, bNodeTree *ntree)
bool ED_node_is_compositor(const SpaceNode *snode)
void ED_node_post_apply_transform(bContext *C, bNodeTree *ntree)
bool ED_node_supports_preview(SpaceNode *snode)
void ED_node_tree_start(SpaceNode *snode, bNodeTree *ntree, ID *id, ID *from)
void ED_preview_kill_jobs(wmWindowManager *wm, Main *bmain)
bool ED_operator_node_editable(bContext *C)
bool ED_operator_node_active(bContext *C)
void ED_region_tag_redraw(ARegion *region)
int GPU_max_texture_size()
void GPU_material_free(ListBase *gpumaterial)
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
struct blender::bke::bNodeTreeType * ntreeType_Shader
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 or normal between world
struct blender::bke::bNodeTreeType * ntreeType_Texture
void UI_view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
float UI_view2d_scale_get_x(const View2D *v2d)
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
ValueIterator values() const
Value & lookup_or_add_cb(const Key &key, const CreateValueF &create_value)
void add_new(const Key &key, const Value &value)
ItemIterator items() const
void add_new(const Key &key)
bool contains(const Key &key) const
Depsgraph * preview_depsgraph
virtual const int & get_corresponding_output_id(const bNode &input_bnode) const =0
Map< bNodeInstanceKey, timeit::Nanoseconds > & get_nodes_evaluation_times()
input_tx image(0, GPU_RGBA16F, Qualifier::WRITE, ImageType::FLOAT_2D, "preview_img") .compute_source("compositor_compute_preview.glsl") .do_static_compilation(true)
draw_view in_light_buf[] float
RenderEngineType * RE_engines_find(const char *idname)
RenderEngine * RE_engine_create(RenderEngineType *type)
void RE_engine_free(RenderEngine *engine)
void MEM_freeN(void *vmemh)
const bNodeZoneType * zone_type_by_node_type(const int node_type)
void node_attach_node(bNodeTree *ntree, bNode *node, bNode *parent)
void node_set_active(bNodeTree *ntree, bNode *node)
void node_detach_node(bNodeTree *ntree, bNode *node)
bool node_link_is_hidden(const bNodeLink *link)
bNodeTree * node_tree_copy_tree(Main *bmain, const bNodeTree *ntree)
bNodeTree * node_tree_localize(bNodeTree *ntree, ID *new_owner_id)
bNode * node_add_static_node(const bContext *C, bNodeTree *ntree, int type)
void node_remove_node(Main *bmain, bNodeTree *ntree, bNode *node, bool do_id_user)
void node_internal_relink(bNodeTree *ntree, bNode *node)
bNode * node_copy_with_mapping(bNodeTree *dst_tree, const bNode &node_src, int flag, bool use_unique, Map< const bNodeSocket *, bNodeSocket * > &new_socket_map)
Span< int > all_zone_output_node_types()
bNodeLink * node_add_link(bNodeTree *ntree, bNode *fromnode, bNodeSocket *fromsock, bNode *tonode, bNodeSocket *tosock)
void node_tree_local_merge(Main *bmain, bNodeTree *localtree, bNodeTree *ntree)
bNode * node_get_active(bNodeTree *ntree)
bNodeTree * node_tree_add_tree_embedded(Main *bmain, ID *owner_id, const char *name, const char *idname)
void node_tree_free_tree(bNodeTree *ntree)
bool node_set_selected(bNode *node, bool select)
Span< int > all_zone_input_node_types()
bool node_tree_contains_tree(const bNodeTree *tree_to_search_in, const bNodeTree *tree_to_search_for)
bool node_declaration_ensure(bNodeTree *ntree, bNode *node)
bNodeTreeType * node_tree_type_find(const char *idname)
bNodeSocket * node_find_socket(bNode *node, eNodeSocketInOut in_out, StringRef identifier)
void node_unique_name(bNodeTree *ntree, bNode *node)
static int node_cryptomatte_remove_socket_exec(bContext *C, wmOperator *)
void NODE_OT_delete(wmOperatorType *ot)
static int viewer_border_exec(bContext *C, wmOperator *op)
void NODE_OT_cryptomatte_layer_add(wmOperatorType *ot)
static int clear_viewer_border_exec(bContext *C, wmOperator *)
static void send_notifiers_after_tree_change(ID *id, bNodeTree *ntree)
float node_socket_calculate_height(const bNodeSocket &socket)
void NODE_OT_read_viewlayers(wmOperatorType *ot)
int node_get_resize_cursor(NodeResizeDirection directions)
static void node_flag_toggle_exec(SpaceNode *snode, int toggle_flag)
static bool node_shader_script_update_text_recursive(RenderEngine *engine, RenderEngineType *type, bNodeTree *ntree, Text *text, VectorSet< bNodeTree * > &done_trees)
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 int node_hide_toggle_exec(bContext *C, wmOperator *)
static void compo_redrawjob(void *cjv)
static void compo_statsdrawjob(void *cjv, const char *)
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)
static int node_duplicate_exec(bContext *C, wmOperator *op)
bNodeSocket * node_find_indicated_socket(SpaceNode &snode, ARegion ®ion, const float2 &cursor, const eNodeSocketInOut in_out)
static int node_cryptomatte_add_socket_exec(bContext *C, wmOperator *)
int node_render_changed_exec(bContext *C, wmOperator *)
static int node_preview_toggle_exec(bContext *C, wmOperator *)
static int node_resize_invoke(bContext *C, wmOperator *op, const wmEvent *event)
Array< bNode * > tree_draw_order_calc_nodes_reversed(bNodeTree &ntree)
void NODE_OT_deactivate_viewer(wmOperatorType *ot)
static int node_options_toggle_exec(bContext *C, wmOperator *)
static int node_deactivate_viewer_exec(bContext *C, wmOperator *)
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 void compo_updatejob(void *)
static void node_duplicate_reparent_recursive(bNodeTree *ntree, const Map< bNode *, bNode * > &node_map, bNode *node)
static void compo_freejob(void *cjv)
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)
static int node_socket_toggle_exec(bContext *C, wmOperator *)
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 void compo_canceljob(void *cjv)
void NODE_OT_output_file_remove_active_socket(wmOperatorType *ot)
static int node_output_file_move_active_socket_exec(bContext *C, wmOperator *op)
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)
bool node_link_is_hidden_or_dimmed(const View2D &v2d, const bNodeLink &link)
static int node_resize_modal(bContext *C, wmOperator *op, const wmEvent *event)
static int node_read_viewlayers_exec(bContext *C, wmOperator *)
static void compo_progressjob(void *cjv, float progress)
VectorSet< bNode * > get_selected_nodes(bNodeTree &node_tree)
static void compo_startjob(void *cjv, wmJobWorkerStatus *worker_status)
static int compo_get_recalc_flags(const bContext *C)
static int node_output_file_remove_active_socket_exec(bContext *C, wmOperator *)
void NODE_OT_preview_toggle(wmOperatorType *ot)
void NODE_OT_clear_viewer_border(wmOperatorType *ot)
static int node_shader_script_update_exec(bContext *C, wmOperator *op)
static void compo_tag_output_nodes(bNodeTree *nodetree, int recalc_flags)
static int node_mute_exec(bContext *C, wmOperator *)
static bool compo_breakjob(void *cjv)
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)
void NODE_OT_output_file_add_socket(wmOperatorType *ot)
void NODE_OT_options_toggle(wmOperatorType *ot)
bool composite_node_active(bContext *C)
static bool socket_is_occluded(const float2 &location, const bNode &node_the_socket_belongs_to, const Span< bNode * > sorted_nodes)
static int node_delete_exec(bContext *C, wmOperator *)
static int node_output_file_add_socket_exec(bContext *C, wmOperator *op)
static void node_resize_init(bContext *C, wmOperator *op, const float2 &cursor, const bNode *node, NodeResizeDirection dir)
static void compo_initjob(void *cjv)
static void compo_completejob(void *cjv)
void NODE_OT_hide_toggle(wmOperatorType *ot)
static int node_copy_color_exec(bContext *C, wmOperator *)
void update_multi_input_indices_for_removed_links(bNode &node)
void NODE_OT_cryptomatte_layer_remove(wmOperatorType *ot)
static int node_delete_reconnect_exec(bContext *C, wmOperator *)
void NODE_OT_output_file_move_active_socket(wmOperatorType *ot)
void NODE_OT_mute_toggle(wmOperatorType *ot)
void activate_geometry_node(Main &bmain, SpaceNode &snode, bNode &node)
bNode * find_geometry_nodes_viewer(const ViewerPath &viewer_path, SpaceNode &snode)
T distance(const T &a, const T &b)
void update_node_declaration_and_sockets(bNodeTree &ntree, bNode &node)
VecBase< int32_t, 2 > int2
VecBase< float, 2 > float2
int ntreeCompositCryptomatteRemoveSocket(bNodeTree *ntree, bNode *node)
bNodeSocket * ntreeCompositCryptomatteAddSocket(bNodeTree *ntree, bNode *node)
int ntreeCompositOutputFileRemoveActiveSocket(bNodeTree *ntree, bNode *node)
bNodeSocket * ntreeCompositOutputFileAddSocket(bNodeTree *ntree, bNode *node, const char *name, const ImageFormatData *im_format)
void ntreeCompositExecTree(Render *render, Scene *scene, bNodeTree *ntree, RenderData *rd, const char *view_name, blender::realtime_compositor::RenderContext *render_context, blender::realtime_compositor::Profiler *profiler)
void ntreeCompositTagRender(Scene *scene)
blender::bke::bNodeTreeType * ntreeType_Composite
void ED_node_texture_default(const bContext *C, Tex *tex)
void ED_node_set_tree_type(SpaceNode *snode, blender::bke::bNodeTreeType *typeinfo)
void ED_node_composit_default(const bContext *C, Scene *sce)
bool ED_node_is_compositor(const SpaceNode *snode)
void ED_node_set_active(Main *bmain, SpaceNode *snode, bNodeTree *ntree, bNode *node, bool *r_active_texture_changed)
static bool is_compositing_possible(const bContext *C)
bool ED_node_is_shader(SpaceNode *snode)
void ED_node_composite_job(const bContext *C, bNodeTree *nodetree, Scene *scene_owner)
bool ED_node_is_geometry(SpaceNode *snode)
bool ED_node_supports_preview(SpaceNode *snode)
void ED_node_shader_default(const bContext *C, ID *id)
bool ED_node_is_texture(SpaceNode *snode)
void ED_node_tree_propagate_change(const bContext *C, Main *bmain, bNodeTree *root_ntree)
void ED_node_post_apply_transform(bContext *, bNodeTree *)
blender::bke::bNodeTreeType * ntreeType_Geometry
#define NODE_MULTI_INPUT_LINK_GAP
#define NODE_SOCKSIZE_DRAW_MULIPLIER
float distance(float a, float b)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
Render * RE_NewInteractiveCompositorRender(const Scene *scene)
void RE_system_gpu_context_ensure(Render *re)
bool RE_ReadRenderResult(Scene *scene, Scene *scenode)
struct bNodeTree * nodetree
struct ImageFormatData im_format
void(* update_script_node)(struct RenderEngine *engine, struct bNodeTree *ntree, struct bNode *node)
struct ReportList * reports
struct bNodeTree * nodetree
SceneRuntimeHandle * runtime
struct bNodeTree * edittree
struct bNodeTree * nodetree
struct bNodeTree * nodetree
bNodeSocketRuntimeHandle * runtime
struct bNodeSocket * next
struct bNodeSocket * prev
bNodeTreeRuntimeHandle * runtime
bNodeTypeHandle * typeinfo
bool(* poll)(const bContext *C, bNodeTreeType *ntreetype)
void(* get_from_context)(const bContext *C, bNodeTreeType *ntreetype, bNodeTree **r_ntree, ID **r_id, ID **r_from)
realtime_compositor::Profiler profiler
Depsgraph * compositor_depsgraph
struct ReportList * reports
void WM_cursor_modal_set(wmWindow *win, int val)
void WM_cursor_modal_restore(wmWindow *win)
void WM_event_drag_start_mval(const wmEvent *event, const ARegion *region, int r_mval[2])
void WM_report(eReportType type, const char *message)
void WM_main_add_notifier(uint type, void *reference)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_operator_name_call(bContext *C, const char *opstring, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
void WM_event_add_mousemove(wmWindow *win)
void WM_gesture_box_cancel(bContext *C, wmOperator *op)
int WM_gesture_box_invoke(bContext *C, wmOperator *op, const wmEvent *event)
int WM_gesture_box_modal(bContext *C, wmOperator *op, const wmEvent *event)
void WM_jobs_timer(wmJob *wm_job, double time_step, uint note, uint endnote)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
wmJob * WM_jobs_get(wmWindowManager *wm, wmWindow *win, const void *owner, const char *name, const eWM_JobFlag flag, const eWM_JobType job_type)
void WM_jobs_callbacks_ex(wmJob *wm_job, wm_jobs_start_callback startjob, void(*initjob)(void *), void(*update)(void *), void(*endjob)(void *), void(*completed)(void *), void(*canceled)(void *))
void WM_jobs_customdata_set(wmJob *wm_job, void *customdata, void(*free)(void *customdata))
void WM_operator_properties_border_to_rcti(wmOperator *op, rcti *r_rect)
void WM_operator_properties_gesture_box(wmOperatorType *ot)
void WM_operator_properties_create(PointerRNA *ptr, const char *opstring)
void WM_operator_properties_free(PointerRNA *ptr)
bScreen * WM_window_get_active_screen(const wmWindow *win)