27#include "RNA_prototypes.hh"
60 else if (
object.type ==
OB_LAMP) {
88 return ICON_ASSET_MANAGER;
100 if (ntree ==
nullptr) {
103 ntree->ensure_topology_cache();
104 for (
const bNode *group_node : ntree->group_nodes()) {
116 if (!snode || !tree) {
128 tree->ensure_topology_cache();
131 for (
bNode *group_node : tree->group_nodes()) {
136 if (visited_groups.
add(id_cast<bNodeTree *>(group_node->id))) {
137 group_nodes.
append(group_node);
140 std::ranges::sort(group_nodes, [](
const bNode *a,
const bNode *
b) {
144 for (
bNode *group_node : group_nodes) {
145 bNodeTree *group_tree = id_cast<bNodeTree *>(group_node->id);
147 auto enter_group_fn = [tree, group_node, group_tree](
bContext &
C) {
160 if (group_tree == child_tree_in_path) {
186 const bool skip_base =
false)
189 for (
const auto [i, path_item] : snode.
treepath.enumerate()) {
190 if (skip_base && &path_item == snode.
treepath.first_) {
193 if (path_item.nodetree ==
nullptr) {
197 const bool is_last_path = &path_item == snode.
treepath.last();
217 if (scene !=
nullptr) {
237 snode, path, *RNA_Material, material, snode.
nodetree);
242 if (scene !=
nullptr) {
270 bool skip_base =
false;
272 if (sequencer_scene) {
291 if (node_group !=
nullptr) {
293 snode, path, *RNA_NodeTree, node_group, node_group);
341 if (snode ==
nullptr) {
General operations, lookup, etc. for materials.
General operations, lookup, etc. for blender objects.
#define ID_IS_PACKED(_id)
#define ID_IS_LINKED(_id)
void append(const T &value)
SceneCompositorEffect * get_active_effect(const Scene &scene)
void node_set_active(bNodeTree &ntree, bNode &node)
static std::function< void(bContext &)> tree_path_handle_func(int i)
static void get_context_path_node_shader(const bContext &C, SpaceNode &snode, Vector< ui::ContextPathItem > &path)
static void get_context_path_node_geometry(const bContext &C, SpaceNode &snode, Vector< ui::ContextPathItem > &path)
static void context_path_add_object_data(Vector< ui::ContextPathItem > &path, Object &object)
static void navigate_menu_create(bContext *C, ui::Layout *layout, void *arg)
static bool node_group_is_enterable(const bNode &node)
static void get_context_path_node_compositor(const bContext &C, SpaceNode &snode, Vector< ui::ContextPathItem > &path)
static bool node_tree_has_enterable_group(const bNodeTree *ntree)
Vector< ui::ContextPathItem > context_path_for_space_node(const bContext &C)
static void context_path_add_top_level_shader_node_tree(const SpaceNode &snode, Vector< ui::ContextPathItem > &path, StructRNA &rna_type, void *ptr, bNodeTree *tree)
static BIFIconID node_tree_icon(const ID &tree_id)
static void context_path_add_node_tree_and_node_groups(const SpaceNode &snode, Vector< ui::ContextPathItem > &path, const bool skip_base=false)
Strip * select_active_get(const Scene *scene)
StripModifierData * modifier_get_active(const Strip *strip)
void button_flag_enable(Button *but, int64_t flag)
void context_path_add_generic(Vector< ContextPathItem > &path, StructRNA &rna_type, void *ptr, const BIFIconID icon_override=ICON_NONE, std::function< void(bContext &)> handle_func=nullptr, MenuCreateFunc menu_func=nullptr, void *menu_arg=nullptr)
bool ED_node_is_compositor(const SpaceNode *snode)
void ED_node_tree_push(ARegion *region, SpaceNode *snode, bNodeTree *ntree, bNode *gnode)
bool ED_node_is_geometry(const SpaceNode *snode)
Scene * CTX_data_sequencer_scene(const bContext *C)
int char char int int int BLI_strcasecmp_natural(const char *s1, const char *s2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void WM_operator_properties_free(PointerRNA *ptr)
void ED_node_tree_pop(ARegion *region, SpaceNode *snode)
Material * BKE_object_material_get(Object *ob, short act)
bool ED_node_is_shader(SpaceNode *snode)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
PointerRNA WM_operator_properties_create_ptr(wmOperatorType *ot)
const char * BKE_id_name(const ID &id)
ViewLayer * CTX_data_view_layer(const bContext *C)
ModifierData * BKE_object_active_modifier(const Object *ob)
@ SNODE_COMPOSITOR_SEQUENCER
BMesh const char void * data
SpaceNode * CTX_wm_space_node(const bContext *C)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
FreestyleLineStyle * BKE_linestyle_active_from_view_layer(struct ViewLayer *view_layer)
wmOperatorStatus WM_operator_name_call_ptr(bContext *C, wmOperatorType *ot, wm::OpCallContext context, PointerRNA *properties, const wmEvent *event)
Scene * CTX_data_scene(const bContext *C)
@ eSeqModifierType_Compositor
Object * CTX_data_active_object(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
struct bNodeTree * node_group
struct bNodeTree * node_group
eSpaceNode_ShaderFrom shaderfrom
struct bNodeTree * edittree
struct bNodeTree * nodetree
ListBaseT< bNodeTreePath > treepath
struct bNodeTreePath * next
struct bNodeTree * nodetree
Button * button(StringRef name, int icon, std::function< void(bContext &)> func, std::optional< StringRef > tooltip=std::nullopt)