Blender V5.3
interface_template_scene_compositor_effects.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2026 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11#include <fmt/format.h>
12
13#include "BLI_listbase.hh"
14#include "BLI_string.hh"
15#include "BLI_string_utf8.hh"
16
17#include "BLT_translation.hh"
18
19#include "DNA_listBase.h"
20#include "DNA_scene_types.h"
21#include "DNA_screen_types.h"
22
23#include "WM_api.hh"
24
26#include "BKE_context.hh"
27#include "BKE_scene_runtime.hh"
28#include "BKE_screen.hh"
29
30#include "RNA_access.hh"
31#include "RNA_prototypes.hh"
32
33#include "NOD_caller_ui.hh"
34#include "NOD_eval_log.hh"
36
37#include "UI_interface_c.hh"
39#include "UI_resources.hh"
40
41namespace blender::ui {
42
43static void draw_effect_extra_menu(bContext *C, ui::Layout *layout, void *effect_v)
44{
45 Scene *scene = CTX_data_scene(C);
46 SceneCompositorEffect *effect = static_cast<SceneCompositorEffect *>(effect_v);
47
48 {
49 PointerRNA operator_ptr = layout->op("SCENE_OT_duplicate_compositor_effect",
51 ICON_DUPLICATE);
52 RNA_string_set(&operator_ptr, "name", effect->name);
53 }
54
55 layout->separator();
56
57 {
58 ui::Layout &row = layout->row(false);
59 PointerRNA operator_ptr = row.op("SCENE_OT_move_compositor_effect_to_index",
60 IFACE_("Move to First"),
61 ICON_TRIA_UP,
64 RNA_string_set(&operator_ptr, "name", effect->name);
65 RNA_int_set(&operator_ptr, "index", 0);
66 row.enabled_set(effect->previous != nullptr);
67 }
68
69 {
70 ui::Layout &row = layout->row(false);
71 PointerRNA operator_ptr = row.op("SCENE_OT_move_compositor_effect_to_index",
72 IFACE_("Move to Last"),
73 ICON_TRIA_DOWN,
76 RNA_string_set(&operator_ptr, "name", effect->name);
77 RNA_int_set(&operator_ptr, "index", scene->compositor_effects.count() - 1);
78 row.enabled_set(effect->next != nullptr);
79 }
80
81 layout->separator();
82
84 &scene->id, RNA_SceneCompositorEffect, effect);
85 layout->prop(&effect_ptr, "show_node_group_selector", UI_ITEM_NONE, std::nullopt, ICON_NONE);
86}
87
88static void draw_effect_panel_header(const bContext * /*C*/, Panel *panel)
89{
90 ui::Layout &layout = *panel->layout;
91
92 PointerRNA *effect_ptr = ui::panel_custom_data_get(panel);
93 ui::panel_context_pointer_set(panel, "effect", effect_ptr);
95
96 ui::Layout &icon_row = layout.row(true);
98 if (!effect->node_group || ID_MISSING(effect->node_group)) {
99 icon_row.red_alert_set(true);
100 }
101 PointerRNA set_active_operator_ptr = icon_row.op(
102 "SCENE_OT_set_active_compositor_effect", "", ICON_NODE_COMPOSITING);
103 RNA_string_set(&set_active_operator_ptr, "name", effect->name);
104
105 ui::Layout &buttons_row = layout.row(true);
106 ui::Layout &name_row = buttons_row.row(true);
107
108 constexpr int number_of_buttons = 3;
109 const int available_space_for_name = (panel->sizex / UI_UNIT_X) - number_of_buttons;
110 const bool is_panel_drawn_for_first_time = panel->sizex == 0;
111 if (is_panel_drawn_for_first_time || available_space_for_name > 5) {
112 name_row.prop(effect_ptr, "name", UI_ITEM_NONE, "", ICON_NONE);
113 }
114 else {
116 }
117
118 ui::Layout &enable_for_preview_row = buttons_row.row(true);
119 enable_for_preview_row.prop(effect_ptr, "enable_for_preview", UI_ITEM_NONE, "", ICON_NONE);
120
121 ui::Layout &enable_for_render_row = buttons_row.row(true);
122 enable_for_render_row.prop(effect_ptr, "enable_for_render", UI_ITEM_NONE, "", ICON_NONE);
123
124 buttons_row.menu_fn("", ICON_DOWNARROW_HLT, draw_effect_extra_menu, effect);
125
126 ui::Layout &remove_row = buttons_row.row(false);
128 PointerRNA remove_operator_ptr = remove_row.op("SCENE_OT_remove_compositor_effect", "", ICON_X);
129 RNA_string_set(&remove_operator_ptr, "name", effect->name);
130
131 layout.separator();
132}
133
134static void reorder_effect(bContext *C, Panel *panel, const int new_index)
135{
136 PointerRNA *effect_ptr = ui::panel_custom_data_get(panel);
137 SceneCompositorEffect *effect = effect_ptr->data_as<SceneCompositorEffect>();
138
139 wmOperatorType *operator_type = WM_operatortype_find("SCENE_OT_move_compositor_effect_to_index",
140 false);
141 PointerRNA properties_ptr = WM_operator_properties_create_ptr(operator_type);
142 RNA_string_set(&properties_ptr, "name", effect->name);
143 RNA_int_set(&properties_ptr, "index", new_index);
145 C, operator_type, wm::OpCallContext::InvokeDefault, &properties_ptr, nullptr);
146 WM_operator_properties_free(&properties_ptr);
147}
148
149static short get_effect_expand_flag(const bContext * /*C*/, Panel *panel)
150{
151 PointerRNA *effect_ptr = ui::panel_custom_data_get(panel);
152 SceneCompositorEffect *effect = effect_ptr->data_as<SceneCompositorEffect>();
153 return effect->ui_panel_data_expansion;
154}
155
156static void set_effect_expand_flag(const bContext * /*C*/, Panel *panel, short expand_flag)
157{
158 PointerRNA *effect_ptr = ui::panel_custom_data_get(panel);
159 SceneCompositorEffect *effect = effect_ptr->data_as<SceneCompositorEffect>();
160 effect->ui_panel_data_expansion = uiPanelDataExpansion(expand_flag);
161}
162
163/* Drawing the properties manually with #ui::Layout::prop instead of #uiDefAutoButsRNA allows using
164 * the node socket identifier for the property names, since they are unique, but also having
165 * the correct label displayed in the UI. */
167 const bContext &C,
168 ui::Layout &layout,
169 const bNodeTreeInterfaceSocket &socket,
170 PointerRNA &input_ptr,
171 const bNodeTree &node_group,
173{
174 if (!input_usages[node_group.interface_input_index(socket)].is_visible) {
175 /* The input is not used currently, but it would be used if any menu input is changed.
176 * By convention, the input is hidden in this case instead of just grayed out. */
177 return;
178 }
179
180 ui::Layout &row = layout.row(true);
182 row.active_set(input_usages[node_group.interface_input_index(socket)].is_used);
183
184 const bke::bNodeSocketType *typeinfo = socket.socket_typeinfo();
185 const eNodeSocketDatatype type = typeinfo ? typeinfo->type : SOCK_CUSTOM;
186
188 return;
189 }
190
191 std::string name = socket.name();
192
193 switch (type) {
194 case SOCK_OBJECT: {
195 /* Use #ui::Layout::prop_search to draw pointer properties because #ui::Layout::prop would
196 * not have enough information about what type of ID to select for editing the values. This
197 * is because pointer IDProperties contain no information about their type. */
198 Main *bmain = CTX_data_main(&C);
199 PointerRNA bmain_ptr = RNA_main_pointer_create(bmain);
200 row.prop_search(&input_ptr, "value", &bmain_ptr, "objects", name, ICON_OBJECT_DATA);
201 break;
202 }
203 case SOCK_MENU: {
205 /* Use a single space when the name is empty to work around a bug with expanded enums. Also
206 * see #ui_item_enum_expand_exec. */
207 row.prop(&input_ptr,
208 "value",
210 StringRef(name).is_empty() ? " " : name,
211 ICON_NONE);
212 }
213 else {
214 row.prop(&input_ptr, "value", UI_ITEM_NONE, name, ICON_NONE);
215 }
216 break;
217 }
218 case SOCK_FONT: {
219 template_id(&row,
220 &C,
221 &input_ptr,
222 "value",
223 nullptr,
224 "FONT_OT_open",
225 "FONT_OT_unlink",
227 false,
228 name);
229 break;
230 }
231 default: {
232 row.prop(&input_ptr, "value", UI_ITEM_NONE, name, ICON_NONE);
233 break;
234 }
235 }
236}
237
238static void draw_effect_inputs(const bContext &C, PointerRNA &effect_ptr, ui::Layout &layout)
239{
240 SceneCompositorEffect &effect = *effect_ptr.data_as<SceneCompositorEffect>();
241 PointerRNA properties_ptr = RNA_pointer_get(&effect_ptr, "properties");
242
243 effect.node_group->ensure_interface_cache();
245 input_usages.reinitialize(effect.node_group->interface_inputs().size());
247 *effect.node_group, properties_ptr, input_usages);
248
249 for (const bNodeTreeInterfaceItem *item : effect.node_group->tree_interface.root_panel.items()) {
250 switch (item->item_type) {
252 const auto &sub_interface_panel = *reinterpret_cast<const bNodeTreeInterfacePanel *>(item);
254 C,
255 layout,
256 &properties_ptr,
257 sub_interface_panel,
258 [&](const bNodeTreeInterfaceSocket &socket) {
259 return input_usages[effect.node_group->interface_input_index(socket)].is_visible;
260 },
261 [&](const bNodeTreeInterfaceSocket &socket) {
262 return input_usages[effect.node_group->interface_input_index(socket)].is_used;
263 },
264 [&](ui::Layout &layout,
265 const bNodeTreeInterfaceSocket &socket,
266 PointerRNA *input_ptr,
267 const std::optional<StringRef> /*parent_name*/) {
269 C, layout, socket, *input_ptr, *effect.node_group, input_usages);
270 });
271 break;
272 }
274 const auto &socket = *reinterpret_cast<const bNodeTreeInterfaceSocket *>(item);
275 if (socket.flag & NODE_INTERFACE_SOCKET_INPUT) {
276 if (&socket == effect.node_group->interface_inputs().first()) {
277 }
278 else if (!(socket.flag & NODE_INTERFACE_SOCKET_HIDE_IN_MODIFIER)) {
279 PointerRNA inputs_ptr = RNA_pointer_get(&properties_ptr, "inputs");
280 PointerRNA input_ptr = RNA_pointer_get(&inputs_ptr, socket.identifier);
282 C, layout, socket, input_ptr, *effect.node_group, input_usages);
283 }
284 }
285 break;
286 }
287 }
288 }
289}
290
292 const SceneCompositorEffect &effect)
293{
295 return nullptr;
296 }
297 bke::DataBlockComputeContext data_block_context{nullptr, scene.id};
298 bke::SceneCompositorEffectComputeContext modifier_context{&data_block_context, effect};
299 return &scene.runtime->compositor.nodes_evaluation_log->get_tree_log(modifier_context.hash());
300}
301
302static std::string get_node_warning_panel_name(const int num_errors,
303 const int num_warnings,
304 const int num_infos)
305{
306 fmt::memory_buffer buffer;
307 fmt::appender buf = fmt::appender(buffer);
308 if (num_errors > 0) {
309 fmt::format_to(buf, "{} ({})", IFACE_("Errors"), num_errors);
310 }
311 if (num_warnings > 0) {
312 if (num_errors > 0) {
313 fmt::format_to(buf, ", ");
314 }
315 fmt::format_to(buf, "{} ({})", IFACE_("Warnings"), num_warnings);
316 }
317 if (num_infos > 0) {
318 if (num_errors > 0 || num_warnings > 0) {
319 fmt::format_to(buf, ", ");
320 }
321 fmt::format_to(buf, "{} ({})", IFACE_("Info"), num_infos);
322 }
323 return std::string(buffer.data(), buffer.size());
324}
325
326static void draw_warnings(const bContext *C, ui::Layout &layout, PointerRNA &effect_ptr)
327{
328 using namespace nodes::eval_log;
329 Scene &scene = *id_cast<Scene *>(effect_ptr.owner_id);
330 SceneCompositorEffect &effect = *effect_ptr.data_as<SceneCompositorEffect>();
331 NodeTreeLog *tree_log = get_root_tree_log(scene, effect);
332 if (!tree_log) {
333 return;
334 }
335
336 tree_log->ensure_node_warnings(*CTX_data_main(C));
337 if (tree_log->all_warnings.is_empty()) {
338 return;
339 }
340
342 for (const nodes::NodeWarning &warning : tree_log->all_warnings) {
343 count_by_type.lookup_or_add(warning.type, 0)++;
344 }
345 const int num_errors = count_by_type.lookup_default(nodes::NodeWarningType::Error, 0);
346 const int num_warnings = count_by_type.lookup_default(nodes::NodeWarningType::Warning, 0);
347 const int num_infos = count_by_type.lookup_default(nodes::NodeWarningType::Info, 0);
348 const std::string panel_name = get_node_warning_panel_name(num_errors, num_warnings, num_infos);
349 ui::Layout *panel = layout.panel(C, "Warnings", true, panel_name);
350 if (!panel) {
351 return;
352 }
353
354 Vector<const nodes::NodeWarning *> warnings(tree_log->all_warnings.size());
355 for (const int i : warnings.index_range()) {
356 warnings[i] = &tree_log->all_warnings[i];
357 }
358 std::ranges::sort(warnings, [](const nodes::NodeWarning *a, const nodes::NodeWarning *b) {
359 const int severity_a = node_warning_type_severity(a->type);
360 const int severity_b = node_warning_type_severity(b->type);
361 if (severity_a > severity_b) {
362 return true;
363 }
364 if (severity_a < severity_b) {
365 return false;
366 }
367 return BLI_strcasecmp_natural(a->message.c_str(), b->message.c_str()) < 0;
368 });
369
370 ui::Layout &col = panel->column(false);
371 ui::Block *block = col.block();
372 for (const nodes::NodeWarning *warning : warnings) {
373 const int icon = node_warning_type_icon(warning->type);
374 const StringRef message = RPT_(warning->message);
376 block, ui::ButtonType::Label, icon, message, 0, 0, 1, UI_UNIT_Y, nullptr, std::nullopt);
377 /* Add tooltip containing the same message. This is helpful if the message is very long so that
378 * it doesn't fit in the panel. */
380 but,
381 [](bContext * /*C*/, void *argN, StringRef /*tip*/) -> std::string {
382 return *static_cast<std::string *>(argN);
383 },
384 MEM_new<std::string>(__func__, message),
385 [](void *arg) { MEM_delete(static_cast<std::string *>(arg)); });
386 }
387}
388
389static void draw_effect_panel(const bContext *C, Panel *panel)
390{
391 PointerRNA *effect_ptr = ui::panel_custom_data_get(panel);
392 ui::panel_context_pointer_set(panel, "effect", effect_ptr);
393
394 SceneCompositorEffect &effect = *effect_ptr->data_as<SceneCompositorEffect>();
395
396 ui::Layout &layout = *panel->layout;
397 layout.use_property_split_set(true);
398
400 const char *operator_name = (effect.node_group == nullptr) ?
401 "scene.new_compositor_effect_node_group" :
402 "scene.duplicate_compositor_effect_node_group";
403 template_id(&layout, C, effect_ptr, "node_group", operator_name, nullptr, nullptr);
404 }
405
406 if (effect.node_group && !ID_MISSING(effect.node_group)) {
407 draw_effect_inputs(*C, *effect_ptr, layout);
408 }
409
410 draw_warnings(C, layout, *effect_ptr);
411}
412
413static constexpr char SCENE_COMPOSITOR_EFFECT_PANEL_IDNAME[] = "SCENE_COMPOSITOR_EFFECT_PT";
414
416{
417 PanelType *panel_type = MEM_new_zeroed<PanelType>(__func__);
418
420 STRNCPY_UTF8(panel_type->label, "");
421 STRNCPY_UTF8(panel_type->context, "compositor");
423 STRNCPY_UTF8(panel_type->active_property, "is_active");
424
426 panel_type->draw = draw_effect_panel;
427
428 /* Give the panel the special flag that says it was built here and corresponds to a
429 * effect rather than a #PanelType. */
431 panel_type->reorder = reorder_effect;
434
435 BLI_addtail(&region_type->paneltypes, panel_type);
436}
437
438static void effect_panel_id(void * /*effect_link*/, char *r_name)
439{
441}
442
444{
445 Scene *scene = CTX_data_scene(C);
446 if (!scene) {
447 return;
448 }
449 ListBaseT<SceneCompositorEffect> *effects = &scene->compositor_effects;
450
451 ARegion *region = CTX_wm_region(C);
452 const bool panels_match = panel_list_matches_data(region, effects, effect_panel_id);
453
454 if (!panels_match) {
455 panels_free_instanced(C, region);
456 for (SceneCompositorEffect &effect : *effects) {
457 /* Create custom data RNA pointer. */
458 PointerRNA *effect_ptr = MEM_new<PointerRNA>(__func__);
459 *effect_ptr = RNA_pointer_create_discrete(&scene->id, RNA_SceneCompositorEffect, &effect);
460
462 C, region, &region->panels, SCENE_COMPOSITOR_EFFECT_PANEL_IDNAME, effect_ptr);
463 }
464 }
465 else {
466 /* Assuming there's only one group of instanced panels, update the custom data pointers. */
467 Panel *panel = region->panels.first();
468 for (SceneCompositorEffect &effect : *effects) {
469 /* Move to the next instanced panel corresponding to the next effect. */
470 while ((panel->type == nullptr) || !(panel->type->flag & PANEL_TYPE_INSTANCED)) {
471 panel = panel->next;
472 /* There shouldn't be fewer panels than effects with UIs. */
473 BLI_assert(panel != nullptr);
474 }
475
476 PointerRNA *effect_ptr = MEM_new<PointerRNA>(__func__);
477 *effect_ptr = RNA_pointer_create_discrete(&scene->id, RNA_SceneCompositorEffect, &effect);
478 panel_custom_data_set(panel, effect_ptr);
479
480 panel = panel->next;
481 }
482 }
483}
484
485} // namespace blender::ui
#define STRNCPY_UTF8(dst, src)
#define RPT_(msgid)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
#define IFACE_(msgid)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
#define ID_MISSING(_id)
Definition DNA_ID.h:695
#define MAX_NAME
Definition DNA_defs.h:63
These structs are the foundation for all linked lists in the library system.
#define C
Definition RandGen.cpp:29
#define UI_UNIT_Y
#define UI_UNIT_X
#define UI_ITEM_NONE
void reinitialize(const int64_t new_size)
Definition BLI_array.hh:430
const ComputeContextHash & hash() const
Value lookup_default(const Key &key, const Value &default_value) const
Definition BLI_map.hh:570
Value & lookup_or_add(const Key &key, const Value &value)
Definition BLI_map.hh:588
constexpr StringRef()
std::unique_ptr< nodes::eval_log::NodesEvalLog > nodes_evaluation_log
IndexRange index_range() const
void infer_group_interface_inputs_usage(const bNodeTree &group, Span< const bNodeSocket * > input_sockets, MutableSpan< SocketUsage > r_input_usages)
void draw_interface_panel_as_panel(const bContext &C, ui::Layout &layout, PointerRNA *properties_ptr, const bNodeTreeInterfacePanel &interface_panel, FunctionRef< bool(const bNodeTreeInterfaceSocket &)> fn_input_is_visible, FunctionRef< bool(const bNodeTreeInterfaceSocket &)> fn_input_is_active, FunctionRef< void(ui::Layout &, const bNodeTreeInterfaceSocket &, PointerRNA *, const std::optional< StringRef >)> fn_draw_property_for_socket)
int node_warning_type_severity(const NodeWarningType type)
Definition warning.cc:51
int node_warning_type_icon(const NodeWarningType type)
Definition warning.cc:37
Button * uiDefIconTextBut(Block *block, ButtonTypeWithPointerType but_and_ptr_type, int icon, StringRef str, int x, int y, short width, short height, void *poin, std::optional< StringRef > tip)
static std::string get_node_warning_panel_name(const int num_errors, const int num_warnings, const int num_infos)
void panel_context_pointer_set(Panel *panel, const char *name, PointerRNA *ptr)
void template_scene_compositor_effects(Layout *layout, bContext *C)
static void draw_effect_inputs(const bContext &C, PointerRNA &effect_ptr, ui::Layout &layout)
static short get_effect_expand_flag(const bContext *, Panel *panel)
bool panel_list_matches_data(ARegion *region, ListBase *data, ListPanelIDFromDataFunc panel_idname_func)
static void effect_panel_id(void *, char *r_name)
static constexpr char SCENE_COMPOSITOR_EFFECT_PANEL_IDNAME[]
static void draw_property_for_socket(const bContext &C, ui::Layout &layout, const bNodeTreeInterfaceSocket &socket, PointerRNA &input_ptr, const bNodeTree &node_group, Array< nodes::socket_usage_inference::SocketUsage > &input_usages)
void register_scene_compositor_effects_panel(ARegionType *region_type)
void template_id(Layout *layout, const bContext *C, PointerRNA *ptr, StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int filter=TEMPLATE_ID_FILTER_ALL, bool live_icon=false, std::optional< StringRef > text=std::nullopt)
static void draw_effect_panel(const bContext *C, Panel *panel)
void button_func_tooltip_set(Button *but, ButtonToolTipFunc func, void *arg, FreeArgFunc free_arg)
static void draw_effect_extra_menu(bContext *C, ui::Layout *layout, void *effect_v)
static void set_effect_expand_flag(const bContext *, Panel *panel, short expand_flag)
void panels_free_instanced(const bContext *C, ARegion *region)
void panel_custom_data_set(Panel *panel, PointerRNA *custom_data)
Panel * panel_add_instanced(const bContext *C, ARegion *region, ListBaseT< Panel > *panels, const char *panel_idname, PointerRNA *custom_data)
static void draw_effect_panel_header(const bContext *, Panel *panel)
static void reorder_effect(bContext *C, Panel *panel, const int new_index)
PointerRNA * panel_custom_data_get(const Panel *panel)
static void draw_warnings(const bContext *C, ui::Layout &layout, PointerRNA &effect_ptr)
static nodes::eval_log::NodeTreeLog * get_root_tree_log(const Scene &scene, const SceneCompositorEffect &effect)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
PointerRNA RNA_main_pointer_create(Main *main)
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 RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void RNA_int_set(PointerRNA *ptr, const char *name, int value)
PointerRNA WM_operator_properties_create_ptr(wmOperatorType *ot)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:118
Main * CTX_data_main(const bContext *C)
@ PANEL_TYPE_HEADER_EXPAND
@ PANEL_TYPE_INSTANCED
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)
ARegion * CTX_wm_region(const bContext *C)
ListBaseT< PanelType > paneltypes
ListBaseT< Panel > panels
void(*) reorder(bContext *C, Panel *pa, int new_index)
char active_property[BKE_ST_MAXNAME]
char translation_context[BKE_ST_MAXNAME]
short(*) get_list_data_expand_flag(const bContext *C, Panel *pa)
char context[BKE_ST_MAXNAME]
void(*) draw(const bContext *C, Panel *panel)
void(*) set_list_data_expand_flag(const bContext *C, Panel *pa, short expand_flag)
void(*) draw_header(const bContext *C, Panel *panel)
char idname[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
struct PanelType * type
ui::Layout * layout
struct Panel * next
T * data_as() const
Definition RNA_types.hh:139
struct SceneCompositorEffect * previous
struct SceneCompositorEffect * next
uiPanelDataExpansion ui_panel_data_expansion
SceneCompositorEffectFlags flags
ListBaseT< SceneCompositorEffect > compositor_effects
bke::SceneRuntime * runtime
bNodeTreeInterface tree_interface
Defines a socket type.
Definition BKE_node.hh:163
eNodeSocketDatatype type
Definition BKE_node.hh:198
SocketMakeNodesInputSrnaFunction make_scene_compositor_effect_input_srna
Definition BKE_node.hh:220
void enabled_set(bool enabled)
void alignment_set(LayoutAlign alignment)
void prop_search(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *searchptr, PropertyRNA *searchprop, PropertyRNA *item_searchpropname, std::optional< StringRefNull > name, int icon, bool results_are_suggestions)
void use_property_decorate_set(bool is_decorate)
void use_property_split_set(bool is_sep)
PointerRNA op(wmOperatorType *ot, std::optional< StringRef > name, int icon, wm::OpCallContext context, eUI_Item_Flag flag)
PanelLayout panel(const bContext *C, StringRef idname, bool default_closed)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)
void active_set(bool active)
Layout & column(bool align)
void separator(float factor=1.0f, LayoutSeparatorType type=LayoutSeparatorType::Auto)
Layout & row(bool align)
void menu_fn(StringRefNull name, int icon, MenuCreateFunc func, void *arg)
void emboss_set(EmbossType emboss)