118 for (
int i = 0; i < tot - 1; i++) {
121 mcoords[i], mcoords[i + 1], coord_array[b], coord_array[b + 1],
result) > 0) {
141 const float point[2])
146 socklink->
sock = sock;
147 socklink->
link = link;
151 if (
prev->sock == sock) {
167 float insert_point[2];
173 while (socklink && socklink->
sock == cursock) {
211 socklink = socklink->
next;
216 mul_v2_fl(insert_point, 1.0f / num_links);
230 float mcoords[256][2];
239 ®ion->
v2d, (
short)loc[0], (
short)loc[1], &mcoords[i][0], &mcoords[i][1]);
251 float insert_point[2];
278 socklink = output_links.
first;
282 socklink = input_links.
first;
343 const char *disabled_hint =
NULL;
348 "Can not add node group '%s' to '%s':\n %s",
356 "Can not add node group '%s' to '%s'",
391 group_node->
id = &node_group->
id;
425 ot->
name =
"Add Node Group";
426 ot->
description =
"Add an existing node group to the current node editor";
486 socket_data->
value = object;
529 ot->
name =
"Add Node Object";
530 ot->
description =
"Add an object info node to the current node editor";
628 ot->
name =
"Add Node Texture";
629 ot->
description =
"Add a texture to the current node editor";
641 ot->
srna,
"name",
"Texture",
MAX_ID_NAME - 2,
"Name",
"Data-block name to assign");
679 if (!collection_node) {
691 socket_data->
value = collection;
733 ot->
name =
"Add Node Collection";
734 ot->
description =
"Add an collection info node to the current node editor";
735 ot->
idname =
"NODE_OT_add_collection";
746 ot->
srna,
"name",
"Collection",
MAX_ID_NAME - 2,
"Name",
"Data-block name to assign");
839 ot->
name =
"Add File Node";
840 ot->
description =
"Add a file node to the current node editor";
912 ot->
name =
"Add Mask Node";
913 ot->
description =
"Add a mask node to the current node editor";
941 const char *treename;
956 treename = treename_buf;
959 treename =
DATA_(
"NodeTree");
1004 ot->
name =
"New Node Tree";
1005 ot->
idname =
"NODE_OT_new_node_tree";
struct SpaceNode * CTX_wm_space_node(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
#define IMA_SIGNAL_RELOAD
void BKE_image_signal(struct Main *bmain, struct Image *ima, struct ImageUser *iuser, int signal)
void id_us_min(struct ID *id)
void id_us_plus(struct ID *id)
struct ID * BKE_libblock_find_name(struct Main *bmain, const short type, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
bool nodeLinkIsHidden(const struct bNodeLink *link)
bool nodeGroupPoll(struct bNodeTree *nodetree, struct bNodeTree *grouptree, const char **r_disabled_hint)
#define NODE_CUSTOM_GROUP
struct bNodeTreeType * ntreeTypeFind(const char *idname)
void ntreeUpdateTree(struct Main *main, struct bNodeTree *ntree)
void ntreeTexCheckCyclics(struct bNodeTree *ntree)
struct bNodeLink * nodeAddLink(struct bNodeTree *ntree, struct bNode *fromnode, struct bNodeSocket *fromsock, struct bNode *tonode, struct bNodeSocket *tosock)
struct bNodeSocket * nodeFindSocket(const struct bNode *node, eNodeSocketInOut in_out, const char *identifier)
struct bNode * nodeAddNode(const struct bContext *C, struct bNodeTree *ntree, const char *idname)
void nodeSetSelected(struct bNode *node, bool select)
struct bNodeTree * ntreeAddTree(struct Main *bmain, const char *name, const char *idname)
struct bNode * nodeAddStaticNode(const struct bContext *C, struct bNodeTree *ntree, int type)
void nodeSetActive(struct bNodeTree *ntree, struct bNode *node)
void BKE_report(ReportList *reports, ReportType type, const char *message)
void BKE_reportf(ReportList *reports, ReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
int isect_seg_seg_v2_point(const float v0[2], const float v1[2], const float v2[2], const float v3[2], float vi[2])
MINLINE void mul_v2_fl(float r[2], float f)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void add_v2_v2(float r[2], const float a[2])
MINLINE void zero_v2(float r[2])
void DEG_relations_tag_update(struct Main *bmain)
Object groups, one object can be in many groups at once.
void ED_node_tree_update(const struct bContext *C)
void ED_node_tag_update_nodetree(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node)
void ED_node_set_active(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node, bool *r_active_texture_changed)
void ED_preview_kill_jobs(struct wmWindowManager *wm, struct Main *bmain)
bool ED_operator_node_editable(struct bContext *C)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View Corner Anti Mix RGB Hue Separate TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC Boolean Random Edge Subdivision Point Object Attribute Attribute Attribute Color Attribute Attribute Vector Point GEO_NODE_ATTRIBUTE_SAMPLE_TEXTURE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View Corner Anti Mix RGB Hue Separate TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC Boolean Random Edge Subdivision Point Object Attribute Attribute Attribute Color Attribute Attribute Vector Point Attribute Sample GEO_NODE_COLLECTION_INFO
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View CMP_NODE_MASK
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View Corner Anti Mix RGB Hue Separate TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC Boolean Random Edge Subdivision Point GEO_NODE_OBJECT_INFO
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume SH_NODE_TEX_IMAGE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set CMP_NODE_IMAGE
#define RNA_BEGIN(sptr, itemptr, propname)
StructRNA RNA_OperatorMousePath
const EnumPropertyItem * rna_node_tree_type_itemf(void *data, bool(*poll)(void *data, struct bNodeTreeType *), bool *r_free)
bool UI_but_active_drop_name(struct bContext *C)
void UI_context_active_but_prop_get_templateID(struct bContext *C, struct PointerRNA *r_ptr, struct PropertyRNA **r_prop)
void UI_view2d_region_to_view(const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
#define WM_FILESEL_RELPATH
#define WM_FILESEL_FILEPATH
bool node_link_bezier_points(const View2D *v2d, const SpaceNode *snode, const bNodeLink *link, float coord_array[][2], const int resol)
void *(* MEM_callocN)(size_t len, const char *str)
static bool node_add_object_poll(bContext *C)
static int node_add_object_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool node_add_texture_poll(bContext *C)
void NODE_OT_add_file(wmOperatorType *ot)
void NODE_OT_add_collection(wmOperatorType *ot)
static const EnumPropertyItem * new_node_tree_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
static int node_add_mask_exec(bContext *C, wmOperator *op)
static Object * node_add_object_get_and_poll_object_node_tree(Main *bmain, wmOperator *op)
void NODE_OT_add_group(wmOperatorType *ot)
static int node_add_texture_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bNodeTree * node_add_group_get_and_poll_group_node_tree(Main *bmain, wmOperator *op, bNodeTree *ntree)
void NODE_OT_add_reroute(wmOperatorType *ot)
static bool node_add_mask_poll(bContext *C)
static int node_add_group_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int node_add_object_exec(bContext *C, wmOperator *op)
void NODE_OT_add_texture(wmOperatorType *ot)
static int node_add_collection_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bNodeSocketLink * add_reroute_insert_socket_link(ListBase *lb, bNodeSocket *sock, bNodeLink *link, const float point[2])
static int add_reroute_exec(bContext *C, wmOperator *op)
static int node_add_file_exec(bContext *C, wmOperator *op)
static bool node_add_collection_poll(bContext *C)
static int node_add_texture_exec(bContext *C, wmOperator *op)
static Collection * node_add_collection_get_and_poll_collection_node_tree(Main *bmain, wmOperator *op)
void NODE_OT_add_mask(wmOperatorType *ot)
static int node_add_collection_exec(bContext *C, wmOperator *op)
void NODE_OT_add_object(wmOperatorType *ot)
static bNodeSocketLink * add_reroute_do_socket_section(bContext *C, bNodeSocketLink *socklink, int in_out)
static int node_add_file_invoke(bContext *C, wmOperator *op, const wmEvent *event)
bNode * node_add_node(const bContext *C, const char *idname, int type, float locx, float locy)
struct bNodeSocketLink bNodeSocketLink
static Tex * node_add_texture_get_and_poll_texture_node_tree(Main *bmain, wmOperator *op)
static bool add_reroute_intersect_check(bNodeLink *link, float mcoords[][2], int tot, float result[2])
void NODE_OT_new_node_tree(wmOperatorType *ot)
static bool node_add_file_poll(bContext *C)
static int node_add_group_exec(bContext *C, wmOperator *op)
static int new_node_tree_exec(bContext *C, wmOperator *op)
void snode_update(SpaceNode *snode, bNode *node)
void snode_dag_update(bContext *C, SpaceNode *snode)
void snode_notify(bContext *C, SpaceNode *snode)
const char * node_group_idname(bContext *C)
void node_deselect_all(struct SpaceNode *snode)
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr_value, ReportList *reports)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
void RNA_float_get_array(PointerRNA *ptr, const char *name, float *values)
void RNA_property_update(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
bool RNA_property_enum_identifier(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **identifier)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
PropertyRNA * RNA_def_collection_runtime(StructOrFunctionRNA *cont_, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
const EnumPropertyItem DummyRNA_NULL_items[]
SpaceNode_Runtime * runtime
struct bNodeTree * edittree
struct bNodeTree * nodetree
struct bNodeSocketLink * next
struct bNodeSocket * sock
struct bNodeSocketLink * prev
struct Collection * value
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
int WM_gesture_lines_modal(bContext *C, wmOperator *op, const wmEvent *event)
void WM_gesture_lines_cancel(bContext *C, wmOperator *op)
int WM_gesture_lines_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type, short action, short flag, short display, short sort)
int WM_operator_filesel(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
ID * WM_operator_drop_load_path(struct bContext *C, wmOperator *op, const short idcode)