37 #include "RNA_prototypes.h"
93 for (
int i = 0; i < tot - 1; i++) {
96 mcoords[i], mcoords[i + 1], coord_array[
b], coord_array[
b + 1],
result) > 0) {
116 const float point[2])
120 socklink = MEM_cnew<bNodeSocketLink>(
"socket link");
121 socklink->
sock = sock;
122 socklink->
link = link;
126 if (
prev->sock == sock) {
140 bNode *reroute_node =
nullptr;
142 float insert_point[2];
148 while (socklink && socklink->
sock == cursock) {
186 socklink = socklink->
next;
191 mul_v2_fl(insert_point, 1.0f / num_links);
212 float mcoords[256][2];
221 ®ion.
v2d, (
short)loc[0], (
short)loc[1], &mcoords[i][0], &mcoords[i][1]);
232 float insert_point[2];
319 const char *disabled_hint =
nullptr;
324 "Can not add node group '%s' to '%s':\n %s",
332 "Can not add node group '%s' to '%s'",
357 if (node_idname[0] ==
'\0') {
373 group_node->
id = &node_group->
id;
391 "This node editor displays a custom (Python defined) node tree. "
392 "Dropping node groups isn't supported for this");
419 ot->
name =
"Add Node Group";
420 ot->
description =
"Add an existing node group to the current node editor";
469 socket_data->
value =
object;
506 ot->
name =
"Add Node Object";
507 ot->
description =
"Add an object info node to the current node editor";
544 if (!collection_node) {
556 socket_data->
value = collection;
593 ot->
name =
"Add Node Collection";
594 ot->
description =
"Add an collection info node to the current node editor";
595 ot->
idname =
"NODE_OT_add_collection";
663 socket_value->value = ima;
708 ot->
name =
"Add File Node";
709 ot->
description =
"Add a file node to the current node editor";
776 ot->
name =
"Add Mask Node";
777 ot->
description =
"Add a mask node to the current node editor";
805 const char *treename;
820 treename = treename_buf;
823 treename =
DATA_(
"NodeTree");
870 ot->
name =
"New Node Tree";
871 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)
void CTX_wm_operator_poll_msg_set(struct bContext *C, const char *msg)
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)
#define GEO_NODE_OBJECT_INFO
bool nodeGroupPoll(struct bNodeTree *nodetree, struct bNodeTree *grouptree, const char **r_disabled_hint)
#define NODE_CUSTOM_GROUP
struct bNodeTreeType * ntreeTypeFind(const char *idname)
void nodeAttachNode(struct bNode *node, struct bNode *parent)
#define GEO_NODE_IMAGE_TEXTURE
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)
#define GEO_NODE_COLLECTION_INFO
void nodeSetActive(struct bNodeTree *ntree, struct bNode *node)
void BKE_ntree_update_tag_node_property(struct bNodeTree *ntree, struct bNode *node)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_BACKWARD(type, var, list)
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])
bool BLI_rctf_isect_pt_v(const struct rctf *rect, const float xy[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_set_active(struct Main *bmain, struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *node, bool *r_active_texture_changed)
void ED_node_tree_propagate_change(const struct bContext *C, struct Main *bmain, struct bNodeTree *ntree)
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.
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 Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise 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 point
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 SH_NODE_TEX_IMAGE
#define RNA_BEGIN(sptr, itemptr, propname)
const EnumPropertyItem * rna_node_tree_type_itemf(void *data, bool(*poll)(void *data, struct bNodeTreeType *), bool *r_free)
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()
@ OPTYPE_DEPENDS_ON_CURSOR
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
void NODE_OT_add_object(wmOperatorType *ot)
static const EnumPropertyItem * new_node_tree_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
void NODE_OT_add_mask(wmOperatorType *ot)
static bNodeSocketLink * add_reroute_insert_socket_link(ListBase *lb, bNodeSocket *sock, bNodeLink *link, const float point[2])
static int node_add_file_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool node_add_object_poll(bContext *C)
static bool add_reroute_intersect_check(const bNodeLink &link, float mcoords[][2], int tot, float result[2])
static bool node_add_group_poll(bContext *C)
static bool node_add_file_poll(bContext *C)
void NODE_OT_add_reroute(wmOperatorType *ot)
void NODE_OT_add_collection(wmOperatorType *ot)
static int add_reroute_exec(bContext *C, wmOperator *op)
static int node_add_mask_exec(bContext *C, wmOperator *op)
bool node_link_bezier_points(const View2D *v2d, const SpaceNode *snode, const bNodeLink &link, float coord_array[][2], const int resol)
bNode * node_add_node(const bContext &C, const char *idname, int type, float locx, float locy)
void node_deselect_all(SpaceNode &snode)
static int new_node_tree_exec(bContext *C, wmOperator *op)
static bNodeSocketLink * add_reroute_do_socket_section(bContext *C, bNodeSocketLink *socklink, int in_out)
static int node_add_group_exec(bContext *C, wmOperator *op)
bool node_link_is_hidden_or_dimmed(const View2D &v2d, const bNodeLink &link)
const char * node_group_idname(bContext *C)
static int node_add_object_exec(bContext *C, wmOperator *op)
static int node_add_file_exec(bContext *C, wmOperator *op)
static bool node_add_mask_poll(bContext *C)
static int node_add_collection_exec(bContext *C, wmOperator *op)
static int node_add_group_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int node_add_collection_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_group(wmOperatorType *ot)
void NODE_OT_add_file(wmOperatorType *ot)
static bool node_add_collection_poll(bContext *C)
static int node_add_object_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void NODE_OT_new_node_tree(wmOperatorType *ot)
SymEdge< T > * prev(const SymEdge< T > *se)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
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 Collection * value
struct bNodeSocketLink * prev
struct bNodeSocketLink * next
struct bNodeSocket * sock
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
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)
ID * WM_operator_properties_id_lookup_from_name_or_session_uuid(Main *bmain, PointerRNA *ptr, const ID_Type type)
bool WM_operator_properties_id_lookup_is_set(PointerRNA *ptr)
void WM_operator_properties_filesel(wmOperatorType *ot, const int filter, const short type, const eFileSel_Action action, const eFileSel_Flag flag, const short display, const short sort)
void WM_operator_properties_id_lookup(wmOperatorType *ot, const bool add_name_prop)
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)