Cleanup: use doxy sections for node_group.c
This commit is contained in:
parent
2f58535b78
commit
3c097af51f
|
@ -60,7 +60,11 @@
|
|||
#include "NOD_socket.h"
|
||||
#include "node_intern.h" /* own include */
|
||||
|
||||
static bool node_group_operator_active(bContext *C)
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Local Utilities
|
||||
* \{ */
|
||||
|
||||
static bool node_group_operator_active_poll(bContext *C)
|
||||
{
|
||||
if (ED_operator_node_active(C)) {
|
||||
SpaceNode *snode = CTX_wm_space_node(C);
|
||||
|
@ -134,7 +138,11 @@ static bNode *node_group_get_active(bContext *C, const char *node_idname)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* ***************** Edit Group operator ************* */
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Edit Group Operator
|
||||
* \{ */
|
||||
|
||||
static int node_group_edit_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
|
@ -171,7 +179,7 @@ void NODE_OT_group_edit(wmOperatorType *ot)
|
|||
|
||||
/* api callbacks */
|
||||
ot->exec = node_group_edit_exec;
|
||||
ot->poll = node_group_operator_active;
|
||||
ot->poll = node_group_operator_active_poll;
|
||||
|
||||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
|
@ -179,10 +187,16 @@ void NODE_OT_group_edit(wmOperatorType *ot)
|
|||
RNA_def_boolean(ot->srna, "exit", false, "Exit", "");
|
||||
}
|
||||
|
||||
/* ******************** Ungroup operator ********************** */
|
||||
/** \} */
|
||||
|
||||
/* The given paths will be owned by the returned instance. Both pointers are allowed to point to
|
||||
* the same string. */
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Ungroup Operator
|
||||
* \{ */
|
||||
|
||||
/**
|
||||
* The given paths will be owned by the returned instance.
|
||||
* Both pointers are allowed to point to the same string.
|
||||
*/
|
||||
static AnimationBasePathChange *animation_basepath_change_new(const char *src_basepath,
|
||||
const char *dst_basepath)
|
||||
{
|
||||
|
@ -424,7 +438,11 @@ void NODE_OT_group_ungroup(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
/* ******************** Separate operator ********************** */
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Separate Operator
|
||||
* \{ */
|
||||
|
||||
/* returns 1 if its OK */
|
||||
static int node_group_separate_selected(
|
||||
|
@ -636,7 +654,11 @@ void NODE_OT_group_separate(wmOperatorType *ot)
|
|||
RNA_def_enum(ot->srna, "type", node_group_separate_types, NODE_GS_COPY, "Type", "");
|
||||
}
|
||||
|
||||
/* ****************** Make Group operator ******************* */
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Make Group Operator
|
||||
* \{ */
|
||||
|
||||
static bool node_group_make_use_node(bNode *node, bNode *gnode)
|
||||
{
|
||||
|
@ -1038,7 +1060,11 @@ void NODE_OT_group_make(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
/* ****************** Group Insert operator ******************* */
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Group Insert Operator
|
||||
* \{ */
|
||||
|
||||
static int node_group_insert_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
|
@ -1088,3 +1114,5 @@ void NODE_OT_group_insert(wmOperatorType *ot)
|
|||
/* flags */
|
||||
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
|
@ -55,7 +55,9 @@
|
|||
#include "NOD_composite.h"
|
||||
#include "node_intern.h" /* own include */
|
||||
|
||||
/* **************** View All Operator ************** */
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name View All Operator
|
||||
* \{ */
|
||||
|
||||
int space_node_view_flag(
|
||||
bContext *C, SpaceNode *snode, ARegion *region, const int node_flag, const int smooth_viewtx)
|
||||
|
@ -151,6 +153,12 @@ void NODE_OT_view_all(wmOperatorType *ot)
|
|||
ot->flag = 0;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name View Selected Operator
|
||||
* \{ */
|
||||
|
||||
static int node_view_selected_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
ARegion *region = CTX_wm_region(C);
|
||||
|
@ -178,7 +186,11 @@ void NODE_OT_view_selected(wmOperatorType *ot)
|
|||
ot->flag = 0;
|
||||
}
|
||||
|
||||
/* **************** Background Image Operators ************** */
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Background Image Operators
|
||||
* \{ */
|
||||
|
||||
typedef struct NodeViewMove {
|
||||
int mvalo[2];
|
||||
|
@ -284,6 +296,12 @@ void NODE_OT_backimage_move(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_BLOCKING | OPTYPE_GRAB_CURSOR_XY;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Background Image Zoom
|
||||
* \{ */
|
||||
|
||||
static int backimage_zoom_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
SpaceNode *snode = CTX_wm_space_node(C);
|
||||
|
@ -316,6 +334,12 @@ void NODE_OT_backimage_zoom(wmOperatorType *ot)
|
|||
RNA_def_float(ot->srna, "factor", 1.2f, 0.0f, 10.0f, "Factor", "", 0.0f, 10.0f);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Background Image Fit
|
||||
* \{ */
|
||||
|
||||
static int backimage_fit_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
Main *bmain = CTX_data_main(C);
|
||||
|
@ -372,7 +396,11 @@ void NODE_OT_backimage_fit(wmOperatorType *ot)
|
|||
ot->flag = OPTYPE_BLOCKING;
|
||||
}
|
||||
|
||||
/******************** sample backdrop operator ********************/
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Sample Backdrop Operator
|
||||
* \{ */
|
||||
|
||||
typedef struct ImageSampleInfo {
|
||||
ARegionType *art;
|
||||
|
@ -642,3 +670,5 @@ void NODE_OT_backimage_sample(wmOperatorType *ot)
|
|||
/* flags */
|
||||
ot->flag = OPTYPE_BLOCKING;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
|
@ -47,7 +47,9 @@ enum {
|
|||
REFINE_BACKWARD = 1 << 1,
|
||||
};
|
||||
|
||||
/**** Group ****/
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Node Group
|
||||
* \{ */
|
||||
|
||||
bNodeSocket *node_group_find_input_socket(bNode *groupnode, const char *identifier)
|
||||
{
|
||||
|
@ -193,7 +195,11 @@ void node_group_update(struct bNodeTree *ntree, struct bNode *node)
|
|||
}
|
||||
}
|
||||
|
||||
/**** FRAME ****/
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Node Frame
|
||||
* \{ */
|
||||
|
||||
static void node_frame_init(bNodeTree *UNUSED(ntree), bNode *node)
|
||||
{
|
||||
|
@ -219,7 +225,11 @@ void register_node_type_frame(void)
|
|||
nodeRegisterType(ntype);
|
||||
}
|
||||
|
||||
/* **************** REROUTE ******************** */
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Node Re-Route
|
||||
* \{ */
|
||||
|
||||
/* simple, only a single input and output here */
|
||||
static void node_reroute_update_internal_links(bNodeTree *ntree, bNode *node)
|
||||
|
@ -403,7 +413,11 @@ void BKE_node_tree_unlink_id(ID *id, struct bNodeTree *ntree)
|
|||
}
|
||||
}
|
||||
|
||||
/**** GROUP_INPUT / GROUP_OUTPUT ****/
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Node #GROUP_INPUT / #GROUP_OUTPUT
|
||||
* \{ */
|
||||
|
||||
static void node_group_input_init(bNodeTree *ntree, bNode *node)
|
||||
{
|
||||
|
@ -599,3 +613,5 @@ void register_node_type_group_output(void)
|
|||
|
||||
nodeRegisterType(ntype);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
|
@ -43,7 +43,9 @@
|
|||
|
||||
#include "node_util.h"
|
||||
|
||||
/**** Storage Data ****/
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Storage Data
|
||||
* \{ */
|
||||
|
||||
void node_free_curves(bNode *node)
|
||||
{
|
||||
|
@ -77,7 +79,11 @@ void *node_initexec_curves(bNodeExecContext *UNUSED(context),
|
|||
return NULL; /* unused return */
|
||||
}
|
||||
|
||||
/**** Updates ****/
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Updates
|
||||
* \{ */
|
||||
|
||||
void node_sock_label(bNodeSocket *sock, const char *name)
|
||||
{
|
||||
|
@ -173,7 +179,11 @@ void node_math_update(bNodeTree *UNUSED(ntree), bNode *node)
|
|||
}
|
||||
}
|
||||
|
||||
/**** Labels ****/
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Labels
|
||||
* \{ */
|
||||
|
||||
void node_blend_label(bNodeTree *UNUSED(ntree), bNode *node, char *label, int maxlen)
|
||||
{
|
||||
|
@ -222,7 +232,11 @@ void node_filter_label(bNodeTree *UNUSED(ntree), bNode *node, char *label, int m
|
|||
BLI_strncpy(label, IFACE_(name), maxlen);
|
||||
}
|
||||
|
||||
/*** Link Insertion ***/
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Link Insertion
|
||||
* \{ */
|
||||
|
||||
/* test if two sockets are interchangeable */
|
||||
static bool node_link_socket_match(bNodeSocket *a, bNodeSocket *b)
|
||||
|
@ -321,12 +335,17 @@ void node_insert_link_default(bNodeTree *ntree, bNode *node, bNodeLink *link)
|
|||
}
|
||||
}
|
||||
|
||||
/**** Internal Links (mute and disconnect) ****/
|
||||
/** \} */
|
||||
|
||||
/* common datatype priorities, works for compositor, shader and texture nodes alike
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Internal Links (mute and disconnect)
|
||||
* \{ */
|
||||
|
||||
/**
|
||||
* Common datatype priorities, works for compositor, shader and texture nodes alike
|
||||
* defines priority of datatype connection based on output type (to):
|
||||
* < 0 : never connect these types
|
||||
* >= 0 : priority of connection (higher values chosen first)
|
||||
* `< 0`: never connect these types.
|
||||
* `>= 0`: priority of connection (higher values chosen first).
|
||||
*/
|
||||
static int node_datatype_priority(eNodeSocketDatatype from, eNodeSocketDatatype to)
|
||||
{
|
||||
|
@ -507,7 +526,11 @@ void node_update_internal_links_default(bNodeTree *ntree, bNode *node)
|
|||
}
|
||||
}
|
||||
|
||||
/**** Default value RNA access ****/
|
||||
/** \} */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Default value RNA access
|
||||
* \{ */
|
||||
|
||||
float node_socket_get_float(bNodeTree *ntree, bNode *UNUSED(node), bNodeSocket *sock)
|
||||
{
|
||||
|
@ -556,3 +579,5 @@ void node_socket_set_vector(bNodeTree *ntree,
|
|||
RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr);
|
||||
RNA_float_set_array(&ptr, "default_value", value);
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
|
Loading…
Reference in New Issue