Blender  V2.93
node_group.c File Reference
#include <stdlib.h>
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
#include "DNA_node_types.h"
#include "BLI_linklist.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "BLT_translation.h"
#include "BKE_action.h"
#include "BKE_animsys.h"
#include "BKE_context.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_report.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 "WM_api.h"
#include "WM_types.h"
#include "UI_resources.h"
#include "NOD_common.h"
#include "NOD_socket.h"
#include "node_intern.h"

Go to the source code of this file.

Functions

Local Utilities
static bool node_group_operator_active_poll (bContext *C)
 
static bool node_group_operator_editable (bContext *C)
 
static const char * group_ntree_idname (bContext *C)
 
const char * node_group_idname (bContext *C)
 
static bNodenode_group_get_active (bContext *C, const char *node_idname)
 
Edit Group Operator
static int node_group_edit_exec (bContext *C, wmOperator *op)
 
void NODE_OT_group_edit (wmOperatorType *ot)
 
Ungroup Operator
static AnimationBasePathChangeanimation_basepath_change_new (const char *src_basepath, const char *dst_basepath)
 
static void animation_basepath_change_free (AnimationBasePathChange *basepath_change)
 
static int node_group_ungroup (Main *bmain, bNodeTree *ntree, bNode *gnode)
 
static int node_group_ungroup_exec (bContext *C, wmOperator *op)
 
void NODE_OT_group_ungroup (wmOperatorType *ot)
 
Make Group Operator
static bool node_group_make_use_node (bNode *node, bNode *gnode)
 
static bool node_group_make_test_selected (bNodeTree *ntree, bNode *gnode, const char *ntree_idname, struct ReportList *reports)
 
static int node_get_selected_minmax (bNodeTree *ntree, bNode *gnode, float *min, float *max, bool use_size)
 
static void node_group_make_insert_selected (const bContext *C, bNodeTree *ntree, bNode *gnode)
 
static bNodenode_group_make_from_selected (const bContext *C, bNodeTree *ntree, const char *ntype, const char *ntreetype)
 
static int node_group_make_exec (bContext *C, wmOperator *op)
 
void NODE_OT_group_make (wmOperatorType *ot)
 
Group Insert Operator
static int node_group_insert_exec (bContext *C, wmOperator *op)
 
void NODE_OT_group_insert (wmOperatorType *ot)
 

Separate Operator

enum  eNodeGroupSeparateType { NODE_GS_COPY , NODE_GS_MOVE }
 
typedef enum eNodeGroupSeparateType eNodeGroupSeparateType
 
static const EnumPropertyItem node_group_separate_types []
 
static int node_group_separate_selected (Main *bmain, bNodeTree *ntree, bNodeTree *ngroup, float offx, float offy, int make_copy)
 
static int node_group_separate_exec (bContext *C, wmOperator *op)
 
static int node_group_separate_invoke (bContext *C, wmOperator *UNUSED(op), const wmEvent *UNUSED(event))
 
void NODE_OT_group_separate (wmOperatorType *ot)
 

Typedef Documentation

◆ eNodeGroupSeparateType

Enumeration Type Documentation

◆ eNodeGroupSeparateType

Enumerator
NODE_GS_COPY 
NODE_GS_MOVE 

Definition at line 565 of file node_group.c.

Function Documentation

◆ animation_basepath_change_free()

static void animation_basepath_change_free ( AnimationBasePathChange basepath_change)
static

◆ animation_basepath_change_new()

static AnimationBasePathChange* animation_basepath_change_new ( const char *  src_basepath,
const char *  dst_basepath 
)
static

The given paths will be owned by the returned instance. Both pointers are allowed to point to the same string.

Definition at line 200 of file node_group.c.

References AT, AnimationBasePathChange::dst_basepath, MEM_callocN, and AnimationBasePathChange::src_basepath.

Referenced by node_group_make_insert_selected(), node_group_separate_selected(), and node_group_ungroup().

◆ group_ntree_idname()

static const char* group_ntree_idname ( bContext C)
static

Definition at line 104 of file node_group.c.

References C, CTX_wm_space_node(), and SpaceNode::tree_idname.

Referenced by node_group_make_exec().

◆ node_get_selected_minmax()

static int node_get_selected_minmax ( bNodeTree ntree,
bNode gnode,
float min,
float max,
bool  use_size 
)
static

◆ node_group_edit_exec()

static int node_group_edit_exec ( bContext C,
wmOperator op 
)
static

◆ node_group_get_active()

static bNode* node_group_get_active ( bContext C,
const char *  node_idname 
)
static

◆ node_group_idname()

const char* node_group_idname ( bContext C)

◆ node_group_insert_exec()

static int node_group_insert_exec ( bContext C,
wmOperator op 
)
static

◆ node_group_make_exec()

static int node_group_make_exec ( bContext C,
wmOperator op 
)
static

◆ node_group_make_from_selected()

static bNode* node_group_make_from_selected ( const bContext C,
bNodeTree ntree,
const char *  ntype,
const char *  ntreetype 
)
static

◆ node_group_make_insert_selected()

static void node_group_make_insert_selected ( const bContext C,
bNodeTree ntree,
bNode gnode 
)
static

◆ node_group_make_test_selected()

static bool node_group_make_test_selected ( bNodeTree ntree,
bNode gnode,
const char *  ntree_idname,
struct ReportList reports 
)
static

◆ node_group_make_use_node()

static bool node_group_make_use_node ( bNode node,
bNode gnode 
)
static

◆ node_group_operator_active_poll()

static bool node_group_operator_active_poll ( bContext C)
static

◆ node_group_operator_editable()

static bool node_group_operator_editable ( bContext C)
static

◆ node_group_separate_exec()

static int node_group_separate_exec ( bContext C,
wmOperator op 
)
static

◆ node_group_separate_invoke()

static int node_group_separate_invoke ( bContext C,
wmOperator UNUSEDop,
const wmEvent UNUSEDevent 
)
static

◆ node_group_separate_selected()

static int node_group_separate_selected ( Main bmain,
bNodeTree ntree,
bNodeTree ngroup,
float  offx,
float  offy,
int  make_copy 
)
static

◆ node_group_ungroup()

static int node_group_ungroup ( Main bmain,
bNodeTree ntree,
bNode gnode 
)
static

◆ node_group_ungroup_exec()

static int node_group_ungroup_exec ( bContext C,
wmOperator op 
)
static

◆ NODE_OT_group_edit()

void NODE_OT_group_edit ( wmOperatorType ot)

◆ NODE_OT_group_insert()

void NODE_OT_group_insert ( wmOperatorType ot)

◆ NODE_OT_group_make()

void NODE_OT_group_make ( wmOperatorType ot)

◆ NODE_OT_group_separate()

void NODE_OT_group_separate ( wmOperatorType ot)

◆ NODE_OT_group_ungroup()

void NODE_OT_group_ungroup ( wmOperatorType ot)

Variable Documentation

◆ node_group_separate_types

const EnumPropertyItem node_group_separate_types[]
static
Initial value:
= {
{NODE_GS_COPY, "COPY", 0, "Copy", "Copy to parent node tree, keep group intact"},
{NODE_GS_MOVE, "MOVE", 0, "Move", "Move to parent node tree, remove from group"},
{0, NULL, 0, NULL, NULL},
}
@ NODE_GS_MOVE
Definition: node_group.c:567
@ NODE_GS_COPY
Definition: node_group.c:566

Definition at line 571 of file node_group.c.

Referenced by NODE_OT_group_separate().