Blender  V2.93
Classes
node_add.c File Reference
#include "MEM_guardedalloc.h"
#include "DNA_collection_types.h"
#include "DNA_node_types.h"
#include "DNA_texture_types.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLT_translation.h"
#include "BKE_context.h"
#include "BKE_image.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_texture.h"
#include "DEG_depsgraph_build.h"
#include "ED_node.h"
#include "ED_render.h"
#include "ED_screen.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_view2d.h"
#include "node_intern.h"

Go to the source code of this file.

Classes

struct  bNodeSocketLink
 

Functions

Utilities
bNode * node_add_node (const bContext *C, const char *idname, int type, float locx, float locy)
 
Add Node Group Operator
static bNodeTree * node_add_group_get_and_poll_group_node_tree (Main *bmain, wmOperator *op, bNodeTree *ntree)
 
static int node_add_group_exec (bContext *C, wmOperator *op)
 
static int node_add_group_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void NODE_OT_add_group (wmOperatorType *ot)
 
Add Node Object Operator
static Object * node_add_object_get_and_poll_object_node_tree (Main *bmain, wmOperator *op)
 
static int node_add_object_exec (bContext *C, wmOperator *op)
 
static int node_add_object_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static bool node_add_object_poll (bContext *C)
 
void NODE_OT_add_object (wmOperatorType *ot)
 
Add Node Texture Operator
static Tex * node_add_texture_get_and_poll_texture_node_tree (Main *bmain, wmOperator *op)
 
static int node_add_texture_exec (bContext *C, wmOperator *op)
 
static int node_add_texture_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static bool node_add_texture_poll (bContext *C)
 
void NODE_OT_add_texture (wmOperatorType *ot)
 
Add Node Collection Operator
static Collection * node_add_collection_get_and_poll_collection_node_tree (Main *bmain, wmOperator *op)
 
static int node_add_collection_exec (bContext *C, wmOperator *op)
 
static int node_add_collection_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
static bool node_add_collection_poll (bContext *C)
 
void NODE_OT_add_collection (wmOperatorType *ot)
 
Add File Node Operator
static bool node_add_file_poll (bContext *C)
 
static int node_add_file_exec (bContext *C, wmOperator *op)
 
static int node_add_file_invoke (bContext *C, wmOperator *op, const wmEvent *event)
 
void NODE_OT_add_file (wmOperatorType *ot)
 
Add Mask Node Operator
static bool node_add_mask_poll (bContext *C)
 
static int node_add_mask_exec (bContext *C, wmOperator *op)
 
void NODE_OT_add_mask (wmOperatorType *ot)
 
New Node Tree Operator
static int new_node_tree_exec (bContext *C, wmOperator *op)
 
static const EnumPropertyItem * new_node_tree_type_itemf (bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
 
void NODE_OT_new_node_tree (wmOperatorType *ot)
 

Add Reroute Operator

typedef struct bNodeSocketLink bNodeSocketLink
 
static bool add_reroute_intersect_check (bNodeLink *link, float mcoords[][2], int tot, float result[2])
 
static bNodeSocketLink * add_reroute_insert_socket_link (ListBase *lb, bNodeSocket *sock, bNodeLink *link, const float point[2])
 
static bNodeSocketLink * add_reroute_do_socket_section (bContext *C, bNodeSocketLink *socklink, int in_out)
 
static int add_reroute_exec (bContext *C, wmOperator *op)
 
void NODE_OT_add_reroute (wmOperatorType *ot)
 

Typedef Documentation

◆ bNodeSocketLink

Function Documentation

◆ add_reroute_do_socket_section()

static bNodeSocketLink* add_reroute_do_socket_section ( bContext *  C,
bNodeSocketLink *  socklink,
int  in_out 
)
static

◆ add_reroute_exec()

static int add_reroute_exec ( bContext *  C,
wmOperator *  op 
)
static

◆ add_reroute_insert_socket_link()

static bNodeSocketLink* add_reroute_insert_socket_link ( ListBase *  lb,
bNodeSocket *  sock,
bNodeLink *  link,
const float  point[2] 
)
static

◆ add_reroute_intersect_check()

static bool add_reroute_intersect_check ( bNodeLink *  link,
float  mcoords[][2],
int  tot,
float  result[2] 
)
static

Definition at line 110 of file node_add.c.

References isect_seg_seg_v2_point(), node_link_bezier_points(), NODE_LINK_RESOL, NULL, and result.

Referenced by add_reroute_exec().

◆ new_node_tree_exec()

static int new_node_tree_exec ( bContext *  C,
wmOperator *  op 
)
static

◆ new_node_tree_type_itemf()

static const EnumPropertyItem* new_node_tree_type_itemf ( bContext *  UNUSEDC,
PointerRNA *  UNUSEDptr,
PropertyRNA *  UNUSEDprop,
bool *  r_free 
)
static

Definition at line 991 of file node_add.c.

References NULL, and rna_node_tree_type_itemf().

Referenced by NODE_OT_new_node_tree().

◆ node_add_collection_exec()

static int node_add_collection_exec ( bContext *  C,
wmOperator *  op 
)
static

◆ node_add_collection_get_and_poll_collection_node_tree()

static Collection* node_add_collection_get_and_poll_collection_node_tree ( Main *  bmain,
wmOperator *  op 
)
static

◆ node_add_collection_invoke()

static int node_add_collection_invoke ( bContext *  C,
wmOperator *  op,
const wmEvent *  event 
)
static

◆ node_add_collection_poll()

static bool node_add_collection_poll ( bContext *  C)
static

◆ node_add_file_exec()

static int node_add_file_exec ( bContext *  C,
wmOperator *  op 
)
static

◆ node_add_file_invoke()

static int node_add_file_invoke ( bContext *  C,
wmOperator *  op,
const wmEvent *  event 
)
static

◆ node_add_file_poll()

static bool node_add_file_poll ( bContext *  C)
static

◆ node_add_group_exec()

static int node_add_group_exec ( bContext *  C,
wmOperator *  op 
)
static

◆ node_add_group_get_and_poll_group_node_tree()

static bNodeTree* node_add_group_get_and_poll_group_node_tree ( Main *  bmain,
wmOperator *  op,
bNodeTree *  ntree 
)
static

◆ node_add_group_invoke()

static int node_add_group_invoke ( bContext *  C,
wmOperator *  op,
const wmEvent *  event 
)
static

◆ node_add_mask_exec()

static int node_add_mask_exec ( bContext *  C,
wmOperator *  op 
)
static

◆ node_add_mask_poll()

static bool node_add_mask_poll ( bContext *  C)
static

◆ node_add_node()

bNode* node_add_node ( const bContext *  C,
const char *  idname,
int  type,
float  locx,
float  locy 
)

◆ node_add_object_exec()

static int node_add_object_exec ( bContext *  C,
wmOperator *  op 
)
static

◆ node_add_object_get_and_poll_object_node_tree()

static Object* node_add_object_get_and_poll_object_node_tree ( Main *  bmain,
wmOperator *  op 
)
static

Definition at line 446 of file node_add.c.

References BKE_libblock_find_name(), ID_OB, MAX_ID_NAME, NULL, wmOperator::ptr, and RNA_string_get().

Referenced by node_add_object_exec().

◆ node_add_object_invoke()

static int node_add_object_invoke ( bContext *  C,
wmOperator *  op,
const wmEvent *  event 
)
static

◆ node_add_object_poll()

static bool node_add_object_poll ( bContext *  C)
static

◆ node_add_texture_exec()

static int node_add_texture_exec ( bContext *  C,
wmOperator *  op 
)
static

◆ node_add_texture_get_and_poll_texture_node_tree()

static Tex* node_add_texture_get_and_poll_texture_node_tree ( Main *  bmain,
wmOperator *  op 
)
static

Definition at line 550 of file node_add.c.

References BKE_libblock_find_name(), ID_TE, MAX_ID_NAME, NULL, wmOperator::ptr, and RNA_string_get().

Referenced by node_add_texture_exec().

◆ node_add_texture_invoke()

static int node_add_texture_invoke ( bContext *  C,
wmOperator *  op,
const wmEvent *  event 
)
static

◆ node_add_texture_poll()

static bool node_add_texture_poll ( bContext *  C)
static

◆ NODE_OT_add_collection()

void NODE_OT_add_collection ( wmOperatorType *  ot)

◆ NODE_OT_add_file()

void NODE_OT_add_file ( wmOperatorType *  ot)

◆ NODE_OT_add_group()

void NODE_OT_add_group ( wmOperatorType *  ot)

◆ NODE_OT_add_mask()

void NODE_OT_add_mask ( wmOperatorType *  ot)

◆ NODE_OT_add_object()

void NODE_OT_add_object ( wmOperatorType *  ot)

◆ NODE_OT_add_reroute()

void NODE_OT_add_reroute ( wmOperatorType *  ot)

◆ NODE_OT_add_texture()

void NODE_OT_add_texture ( wmOperatorType *  ot)

◆ NODE_OT_new_node_tree()

void NODE_OT_new_node_tree ( wmOperatorType *  ot)