Blender V4.3
object_shader_fx.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2018 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#include <cmath>
10#include <cstdio>
11#include <cstdlib>
12#include <cstring>
13
14#include "MEM_guardedalloc.h"
15
17#include "DNA_object_types.h"
18#include "DNA_scene_types.h"
19#include "DNA_shader_fx_types.h"
20
21#include "BLI_listbase.h"
22#include "BLI_string.h"
23#include "BLI_string_utf8.h"
24#include "BLI_utildefines.h"
25
26#include "BLT_translation.hh"
27
28#include "BKE_context.hh"
29#include "BKE_lib_id.hh"
30#include "BKE_object.hh"
31#include "BKE_report.hh"
32#include "BKE_shader_fx.h"
33
34#include "DEG_depsgraph.hh"
36
37#include "RNA_access.hh"
38#include "RNA_define.hh"
39#include "RNA_enum_types.hh"
40#include "RNA_prototypes.hh"
41
42#include "ED_object.hh"
43#include "ED_screen.hh"
44
45#include "UI_interface.hh"
46
47#include "WM_api.hh"
48#include "WM_types.hh"
49
50#include "object_intern.hh"
51
52namespace blender::ed::object {
53
54/* -------------------------------------------------------------------- */
59 ReportList *reports, Main *bmain, Scene * /*scene*/, Object *ob, const char *name, int type)
60{
61 ShaderFxData *new_fx = nullptr;
63
65 BKE_reportf(reports, RPT_WARNING, "Effect cannot be added to object '%s'", ob->id.name + 2);
66 return nullptr;
67 }
68
71 BKE_report(reports, RPT_WARNING, "Only one Effect of this type is allowed");
72 return nullptr;
73 }
74 }
75
76 /* get new effect data to add */
77 new_fx = BKE_shaderfx_new(type);
78
79 BLI_addtail(&ob->shader_fx, new_fx);
80
81 if (name) {
82 STRNCPY_UTF8(new_fx->name, name);
83 }
84
85 /* make sure effect data has unique name */
87
89 GreasePencil *grease_pencil = static_cast<GreasePencil *>(ob->data);
91
94
95 return new_fx;
96}
97
98/* Return true if the object has a effect of type 'type' other than
99 * the shaderfx pointed to be 'exclude', otherwise returns false. */
101 const ShaderFxData *exclude,
102 ShaderFxType type)
103{
104 LISTBASE_FOREACH (ShaderFxData *, fx, &ob->shader_fx) {
105 if ((fx != exclude) && (fx->type == type)) {
106 return true;
107 }
108 }
109
110 return false;
111}
112
113static bool object_shaderfx_remove(Main *bmain,
114 Object *ob,
115 ShaderFxData *fx,
116 bool * /*r_sort_depsgraph*/)
117{
118 /* It seems on rapid delete it is possible to
119 * get called twice on same effect, so make
120 * sure it is in list. */
121 if (BLI_findindex(&ob->shader_fx, fx) == -1) {
122 return false;
123 }
124
126
127 BLI_remlink(&ob->shader_fx, fx);
130
131 return true;
132}
133
134bool shaderfx_remove(ReportList *reports, Main *bmain, Object *ob, ShaderFxData *fx)
135{
136 bool sort_depsgraph = false;
137 bool ok;
138
139 ok = object_shaderfx_remove(bmain, ob, fx, &sort_depsgraph);
140
141 if (!ok) {
142 BKE_reportf(reports, RPT_ERROR, "Effect '%s' not in object '%s'", fx->name, ob->id.name);
143 return false;
144 }
145
148
149 return true;
150}
151
152void shaderfx_clear(Main *bmain, Object *ob)
153{
154 ShaderFxData *fx = static_cast<ShaderFxData *>(ob->shader_fx.first);
155 bool sort_depsgraph = false;
156
157 if (!fx) {
158 return;
159 }
160
161 while (fx) {
162 ShaderFxData *next_fx;
163
164 next_fx = fx->next;
165
166 object_shaderfx_remove(bmain, ob, fx, &sort_depsgraph);
167
168 fx = next_fx;
169 }
170
173}
174
175int shaderfx_move_up(ReportList * /*reports*/, Object *ob, ShaderFxData *fx)
176{
177 if (fx->prev) {
178 BLI_remlink(&ob->shader_fx, fx);
179 BLI_insertlinkbefore(&ob->shader_fx, fx->prev, fx);
180 }
181
182 return 1;
183}
184
186{
187 if (fx->next) {
188 BLI_remlink(&ob->shader_fx, fx);
189 BLI_insertlinkafter(&ob->shader_fx, fx->next, fx);
190 }
191
192 return 1;
193}
194
195bool shaderfx_move_to_index(ReportList *reports, Object *ob, ShaderFxData *fx, const int index)
196{
197 BLI_assert(fx != nullptr);
198 BLI_assert(index >= 0);
199 if (index >= BLI_listbase_count(&ob->shader_fx)) {
200 BKE_report(reports, RPT_WARNING, "Cannot move effect beyond the end of the stack");
201 return false;
202 }
203
204 int fx_index = BLI_findindex(&ob->shader_fx, fx);
205 BLI_assert(fx_index != -1);
206 if (fx_index < index) {
207 /* Move shaderfx down in list. */
208 for (; fx_index < index; fx_index++) {
209 if (!shaderfx_move_down(reports, ob, fx)) {
210 break;
211 }
212 }
213 }
214 else {
215 /* Move shaderfx up in list. */
216 for (; fx_index > index; fx_index--) {
217 if (!shaderfx_move_up(reports, ob, fx)) {
218 break;
219 }
220 }
221 }
222
225
226 return true;
227}
228
237
239{
241 STRNCPY(nfx->name, fx->name);
242 BKE_shaderfx_copydata(fx, nfx);
243 BLI_addtail(&dst->shader_fx, nfx);
244
247}
248
251/* -------------------------------------------------------------------- */
256 StructRNA *rna_type,
257 int obtype_flag,
258 const bool is_liboverride_allowed)
259{
260 PointerRNA ptr = CTX_data_pointer_get_type(C, "shaderfx", rna_type);
262 ShaderFxData *fx = static_cast<ShaderFxData *>(ptr.data); /* May be nullptr. */
263
265 return false;
266 }
267
268 /* NOTE: Temporary 'forbid all' for overrides, until we implement support to add shaderfx to
269 * overrides. */
270 if (ID_IS_OVERRIDE_LIBRARY(ob)) {
271 CTX_wm_operator_poll_msg_set(C, "Cannot edit shaderfxs in a library override");
272 return false;
273 }
274
275 if (obtype_flag != 0 && ((1 << ob->type) & obtype_flag) == 0) {
276 CTX_wm_operator_poll_msg_set(C, "Object type is not supported");
277 return false;
278 }
279 if (ptr.owner_id != nullptr && !BKE_id_is_editable(CTX_data_main(C), ptr.owner_id)) {
280 CTX_wm_operator_poll_msg_set(C, "Cannot edit library or override data");
281 return false;
282 }
283 if (!is_liboverride_allowed && BKE_shaderfx_is_nonlocal_in_liboverride(ob, fx)) {
285 C, "Cannot edit shaderfxs coming from linked data in a library override");
286 return false;
287 }
288
289 return true;
290}
291
293{
294 return edit_shaderfx_poll_generic(C, &RNA_ShaderFx, 0, false);
295}
296
299/* -------------------------------------------------------------------- */
304{
305 Main *bmain = CTX_data_main(C);
306 Scene *scene = CTX_data_scene(C);
308 int type = RNA_enum_get(op->ptr, "type");
309
310 if (!shaderfx_add(op->reports, bmain, scene, ob, nullptr, type)) {
311 return OPERATOR_CANCELLED;
312 }
313
315
316 return OPERATOR_FINISHED;
317}
318
320 PointerRNA * /*ptr*/,
321 PropertyRNA * /*prop*/,
322 bool *r_free)
323{
325 EnumPropertyItem *item = nullptr;
326 const EnumPropertyItem *fx_item, *group_item = nullptr;
327 const ShaderFxTypeInfo *mti;
328 int totitem = 0, a;
329
330 if (!ob) {
332 }
333
336 if (fx_item->identifier[0]) {
338
340 continue;
341 }
342 }
343 else {
344 group_item = fx_item;
345 fx_item = nullptr;
346
347 continue;
348 }
349
350 if (group_item) {
351 RNA_enum_item_add(&item, &totitem, group_item);
352 group_item = nullptr;
353 }
354
355 RNA_enum_item_add(&item, &totitem, fx_item);
356 }
357
358 RNA_enum_item_end(&item, &totitem);
359 *r_free = true;
360
361 return item;
362}
363
365{
366 /* identifiers */
367 ot->name = "Add Effect";
368 ot->description = "Add a visual effect to the active object";
369 ot->idname = "OBJECT_OT_shaderfx_add";
370
371 /* api callbacks */
375
376 /* flags */
378
379 /* properties */
383
384 /* Abused, for "Light"... */
386}
387
390/* -------------------------------------------------------------------- */
395{
397 ot->srna, "shaderfx", nullptr, MAX_NAME, "Shader", "Name of the shaderfx to edit");
399}
400
402{
404 ot->srna, "report", false, "Report", "Create a notification after the operation");
406}
407
415 wmOperator *op,
416 const wmEvent *event,
417 int *r_retval)
418{
419 if (RNA_struct_property_is_set(op->ptr, "shaderfx")) {
420 return true;
421 }
422
423 PointerRNA ctx_ptr = CTX_data_pointer_get_type(C, "shaderfx", &RNA_ShaderFx);
424 if (ctx_ptr.data != nullptr) {
425 ShaderFxData *fx = static_cast<ShaderFxData *>(ctx_ptr.data);
426 RNA_string_set(op->ptr, "shaderfx", fx->name);
427 return true;
428 }
429
430 /* Check the custom data of panels under the mouse for an effect. */
431 if (event != nullptr) {
433
434 if (!(panel_ptr == nullptr || RNA_pointer_is_null(panel_ptr))) {
435 if (RNA_struct_is_a(panel_ptr->type, &RNA_ShaderFx)) {
436 ShaderFxData *fx = static_cast<ShaderFxData *>(panel_ptr->data);
437 RNA_string_set(op->ptr, "shaderfx", fx->name);
438 return true;
439 }
440
441 BLI_assert(r_retval != nullptr); /* We need the return value in this case. */
442 if (r_retval != nullptr) {
444 }
445 return false;
446 }
447 }
448
449 if (r_retval != nullptr) {
450 *r_retval = OPERATOR_CANCELLED;
451 }
452 return false;
453}
454
456{
457 char shaderfx_name[MAX_NAME];
458 ShaderFxData *fx;
459 RNA_string_get(op->ptr, "shaderfx", shaderfx_name);
460
461 fx = BKE_shaderfx_findby_name(ob, shaderfx_name);
462
463 if (fx && type != 0 && fx->type != type) {
464 fx = nullptr;
465 }
466
467 return fx;
468}
469
472/* -------------------------------------------------------------------- */
477{
478 Main *bmain = CTX_data_main(C);
481 if (!fx) {
482 return OPERATOR_CANCELLED;
483 }
484
485 /* Store name temporarily for report. */
486 char name[MAX_NAME];
487 STRNCPY(name, fx->name);
488
489 if (!shaderfx_remove(op->reports, bmain, ob, fx)) {
490 return OPERATOR_CANCELLED;
491 }
492
493 if (RNA_boolean_get(op->ptr, "report")) {
494 BKE_reportf(op->reports, RPT_INFO, "Removed effect: %s", name);
495 }
496
498
499 return OPERATOR_FINISHED;
500}
501
502static int shaderfx_remove_invoke(bContext *C, wmOperator *op, const wmEvent *event)
503{
504 int retval;
505 if (edit_shaderfx_invoke_properties(C, op, event, &retval)) {
506 return shaderfx_remove_exec(C, op);
507 }
508 return retval;
509}
510
512{
513 ot->name = "Remove Grease Pencil Effect";
514 ot->description = "Remove a effect from the active grease pencil object";
515 ot->idname = "OBJECT_OT_shaderfx_remove";
516
520
521 /* flags */
525}
526
529/* -------------------------------------------------------------------- */
534{
537
538 if (!fx || !shaderfx_move_up(op->reports, ob, fx)) {
539 return OPERATOR_CANCELLED;
540 }
541
544
545 return OPERATOR_FINISHED;
546}
547
548static int shaderfx_move_up_invoke(bContext *C, wmOperator *op, const wmEvent *event)
549{
550 int retval;
551 if (edit_shaderfx_invoke_properties(C, op, event, &retval)) {
552 return shaderfx_move_up_exec(C, op);
553 }
554 return retval;
555}
556
558{
559 ot->name = "Move Up Effect";
560 ot->description = "Move effect up in the stack";
561 ot->idname = "OBJECT_OT_shaderfx_move_up";
562
566
567 /* flags */
570}
571
574/* -------------------------------------------------------------------- */
579{
582
583 if (!fx || !shaderfx_move_down(op->reports, ob, fx)) {
584 return OPERATOR_CANCELLED;
585 }
586
589
590 return OPERATOR_FINISHED;
591}
592
593static int shaderfx_move_down_invoke(bContext *C, wmOperator *op, const wmEvent *event)
594{
595 int retval;
596 if (edit_shaderfx_invoke_properties(C, op, event, &retval)) {
597 return shaderfx_move_down_exec(C, op);
598 }
599 return retval;
600}
601
603{
604 ot->name = "Move Down Effect";
605 ot->description = "Move effect down in the stack";
606 ot->idname = "OBJECT_OT_shaderfx_move_down";
607
611
612 /* flags */
615}
616
619/* -------------------------------------------------------------------- */
624{
627 int index = RNA_int_get(op->ptr, "index");
628
629 if (!fx || !shaderfx_move_to_index(op->reports, ob, fx, index)) {
630 return OPERATOR_CANCELLED;
631 }
632
633 return OPERATOR_FINISHED;
634}
635
637{
638 int retval;
639 if (edit_shaderfx_invoke_properties(C, op, event, &retval)) {
640 return shaderfx_move_to_index_exec(C, op);
641 }
642 return retval;
643}
644
646{
647 ot->name = "Move Effect to Index";
648 ot->idname = "OBJECT_OT_shaderfx_move_to_index";
649 ot->description =
650 "Change the effect's position in the list so it evaluates after the set number of "
651 "others";
652
656
657 /* flags */
661 ot->srna, "index", 0, 0, INT_MAX, "Index", "The index to move the effect to", 0, INT_MAX);
662}
663
666/* -------------------------------------------------------------------- */
671{
674 if (!fx) {
675 return OPERATOR_CANCELLED;
676 }
678 if (!nfx) {
679 return OPERATOR_CANCELLED;
680 }
681
682 STRNCPY(nfx->name, fx->name);
683 /* Make sure effect data has unique name. */
685
686 BKE_shaderfx_copydata(fx, nfx);
687 BLI_insertlinkafter(&ob->shader_fx, fx, nfx);
688
691
692 return OPERATOR_FINISHED;
693}
694
695static int shaderfx_copy_invoke(bContext *C, wmOperator *op, const wmEvent *event)
696{
697 int retval;
698 if (edit_shaderfx_invoke_properties(C, op, event, &retval)) {
699 return shaderfx_copy_exec(C, op);
700 }
701 return retval;
702}
703
705{
706 ot->name = "Copy Effect";
707 ot->description = "Duplicate effect at the same position in the stack";
708 ot->idname = "OBJECT_OT_shaderfx_copy";
709
713
714 /* flags */
717}
718
721} // namespace blender::ed::object
PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type)
void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
bool BKE_id_is_editable(const Main *bmain, const ID *id)
Definition lib_id.cc:2456
General operations, lookup, etc. for blender objects.
void BKE_object_free_derived_caches(Object *ob)
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
Definition report.cc:125
struct ShaderFxData * BKE_shaderfx_findby_type(struct Object *ob, ShaderFxType type)
Definition shader_fx.cc:227
void BKE_shaderfx_copy(struct ListBase *dst, const struct ListBase *src)
struct ShaderFxData * BKE_shaderfx_new(int type)
Definition shader_fx.cc:54
void BKE_shaderfx_free(struct ShaderFxData *fx)
Definition shader_fx.cc:110
void BKE_shaderfx_copydata(struct ShaderFxData *fx, struct ShaderFxData *target)
Definition shader_fx.cc:205
bool BKE_shaderfx_is_nonlocal_in_liboverride(const struct Object *ob, const struct ShaderFxData *shaderfx)
const ShaderFxTypeInfo * BKE_shaderfx_get_info(ShaderFxType type)
Definition shader_fx.cc:131
struct ShaderFxData * BKE_shaderfx_findby_name(struct Object *ob, const char *name)
Definition shader_fx.cc:253
void BKE_shaderfx_unique_name(struct ListBase *shaders, struct ShaderFxData *fx)
Definition shader_fx.cc:115
@ eShaderFxTypeFlag_NoUserAdd
@ eShaderFxTypeFlag_Single
#define BLI_assert(a)
Definition BLI_assert.h:50
#define LISTBASE_FOREACH(type, var, list)
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
Definition listbase.cc:331
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
Definition listbase.cc:496
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:110
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition listbase.cc:130
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
Definition listbase.cc:370
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define STRNCPY(dst, src)
Definition BLI_string.h:593
#define STRNCPY_UTF8(dst, src)
#define UNUSED_FUNCTION(x)
#define ELEM(...)
#define BLT_I18NCONTEXT_ID_ID
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
@ ID_RECALC_TRANSFORM
Definition DNA_ID.h:1021
@ ID_RECALC_GEOMETRY
Definition DNA_ID.h:1041
#define ID_IS_OVERRIDE_LIBRARY(_id)
Definition DNA_ID.h:683
#define MAX_NAME
Definition DNA_defs.h:50
Object is a sort of wrapper for general info.
@ OB_GREASE_PENCIL
@ OB_GPENCIL_LEGACY
@ eShaderFxType_Blur
@ OPERATOR_PASS_THROUGH
bool ED_operator_object_active_editable_ex(bContext *C, const Object *ob)
Read Guarded memory(de)allocation.
@ PROP_SKIP_SAVE
Definition RNA_types.hh:245
@ PROP_HIDDEN
Definition RNA_types.hh:239
PointerRNA * UI_region_panel_custom_data_under_cursor(const bContext *C, const wmEvent *event)
@ OPTYPE_INTERNAL
Definition WM_types.hh:182
@ OPTYPE_UNDO
Definition WM_types.hh:162
@ OPTYPE_REGISTER
Definition WM_types.hh:160
#define ND_SHADERFX
Definition WM_types.hh:438
#define NC_OBJECT
Definition WM_types.hh:346
static int shaderfx_move_down_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static int shaderfx_copy_exec(bContext *C, wmOperator *op)
static int shaderfx_move_up_exec(bContext *C, wmOperator *op)
static int shaderfx_move_to_index_exec(bContext *C, wmOperator *op)
static int shaderfx_remove_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void shaderfx_clear(Main *bmain, Object *ob)
static int shaderfx_copy_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool UNUSED_FUNCTION object_has_shaderfx(const Object *ob, const ShaderFxData *exclude, ShaderFxType type)
static ShaderFxData * edit_shaderfx_property_get(wmOperator *op, Object *ob, int type)
int shaderfx_move_up(ReportList *reports, Object *ob, ShaderFxData *fx)
static int shaderfx_move_down_exec(bContext *C, wmOperator *op)
static bool edit_shaderfx_poll(bContext *C)
static int shaderfx_remove_exec(bContext *C, wmOperator *op)
static bool edit_shaderfx_invoke_properties(bContext *C, wmOperator *op, const wmEvent *event, int *r_retval)
ShaderFxData * shaderfx_add(ReportList *reports, Main *bmain, Scene *scene, Object *ob, const char *name, int type)
void OBJECT_OT_shaderfx_add(wmOperatorType *ot)
static bool object_shaderfx_remove(Main *bmain, Object *ob, ShaderFxData *fx, bool *)
static int shaderfx_move_to_index_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static void edit_shaderfx_report_property(wmOperatorType *ot)
static const EnumPropertyItem * shaderfx_add_itemf(bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
int shaderfx_move_down(ReportList *reports, Object *ob, ShaderFxData *fx)
static int shaderfx_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_shaderfx_copy(wmOperatorType *ot)
void shaderfx_copy(Object *dst, ShaderFxData *fx)
Object * context_active_object(const bContext *C)
static bool edit_shaderfx_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag, const bool is_liboverride_allowed)
void OBJECT_OT_shaderfx_remove(wmOperatorType *ot)
void OBJECT_OT_shaderfx_move_up(wmOperatorType *ot)
static void edit_shaderfx_properties(wmOperatorType *ot)
bool shaderfx_remove(ReportList *reports, Main *bmain, Object *ob, ShaderFxData *fx)
void OBJECT_OT_shaderfx_move_down(wmOperatorType *ot)
bool shaderfx_move_to_index(ReportList *reports, Object *ob, ShaderFxData *fx, int index)
void OBJECT_OT_shaderfx_move_to_index(wmOperatorType *ot)
static int shaderfx_move_up_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void shaderfx_link(Object *dst, Object *src)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
int RNA_int_get(PointerRNA *ptr, const char *name)
bool RNA_pointer_is_null(const PointerRNA *ptr)
bool RNA_struct_property_is_set(PointerRNA *ptr, const char *identifier)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_enum_funcs(PropertyRNA *prop, EnumPropertyItemFunc itemfunc)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, const int default_value, const int hardmin, const int hardmax, const char *ui_name, const char *ui_description, const int softmin, const int softmax)
const EnumPropertyItem rna_enum_object_shaderfx_type_items[]
const char * identifier
Definition RNA_types.hh:506
char name[66]
Definition DNA_ID.h:425
void * first
ListBase shader_fx
ID * owner_id
Definition RNA_types.hh:40
StructRNA * type
Definition RNA_types.hh:41
void * data
Definition RNA_types.hh:42
struct ShaderFxData * prev
struct ShaderFxData * next
ShaderFxTypeFlag flags
const char * name
Definition WM_types.hh:990
bool(* poll)(bContext *C) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1042
const char * idname
Definition WM_types.hh:992
int(* invoke)(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1022
int(* exec)(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
Definition WM_types.hh:1006
const char * description
Definition WM_types.hh:996
PropertyRNA * prop
Definition WM_types.hh:1092
StructRNA * srna
Definition WM_types.hh:1080
struct ReportList * reports
struct PointerRNA * ptr
void WM_main_add_notifier(uint type, void *reference)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
PointerRNA * ptr
Definition wm_files.cc:4126
wmOperatorType * ot
Definition wm_files.cc:4125
int WM_menu_invoke(bContext *C, wmOperator *op, const wmEvent *)