34 {
eShaderFxType_Blur,
"FX_BLUR", ICON_SHADERFX,
"Blur",
"Apply Gaussian Blur to object"},
39 "Apply different tint effects"},
50 "Apply sinusoidal deformation"},
51 {0,
nullptr, 0,
nullptr,
nullptr},
61 {0,
nullptr, 0,
nullptr,
nullptr}};
66 {0,
nullptr, 0,
nullptr,
nullptr}};
74 {0,
nullptr, 0,
nullptr,
nullptr}};
82 {0,
nullptr, 0,
nullptr,
nullptr}};
88# include <fmt/format.h>
108 return RNA_ShaderFxBlur;
110 return RNA_ShaderFxColorize;
112 return RNA_ShaderFxWave;
114 return RNA_ShaderFxPixel;
116 return RNA_ShaderFxRim;
118 return RNA_ShaderFxShadow;
120 return RNA_ShaderFxSwirl;
122 return RNA_ShaderFxFlip;
124 return RNA_ShaderFxGlow;
135static void rna_ShaderFx_name_set(
PointerRNA *ptr,
const char *value)
138 char oldname[
sizeof(gmd->name)];
148 Object *ob = id_cast<Object *>(ptr->owner_id);
161static std::optional<std::string> rna_ShaderFx_path(
const PointerRNA *ptr)
164 char name_esc[
sizeof(gmd->name) * 2];
167 return fmt::format(
"shader_effects[\"{}\"]", name_esc);
178 rna_ShaderFx_update(bmain, scene, ptr);
188 if (!self || ob != self) {
196# define RNA_FX_OBJECT_SET(_type, _prop, _obtype) \
197 static void rna_##_type##ShaderFx_##_prop##_set( \
198 PointerRNA *ptr, PointerRNA value, ReportList * ) \
200 _type##ShaderFxData *tmd = (_type##ShaderFxData *)ptr->data; \
201 shaderfx_object_set((Object *)ptr->owner_id, &tmd->_prop, _obtype, value); \
204RNA_FX_OBJECT_SET(Shadow,
object,
OB_EMPTY);
205RNA_FX_OBJECT_SET(Swirl,
object,
OB_EMPTY);
207# undef RNA_FX_OBJECT_SET
302 {0,
"HORIZONTAL", 0,
"Horizontal",
""},
303 {1,
"VERTICAL", 0,
"Vertical",
""},
304 {0,
nullptr, 0,
nullptr,
nullptr}};
409 prop,
"Blur",
"Number of pixels for blurring rim (set to 0 to disable)");
426 {0,
"HORIZONTAL", 0,
"Horizontal",
""},
427 {1,
"VERTICAL", 0,
"Vertical",
""},
428 {0,
nullptr, 0,
nullptr,
nullptr}};
500 prop,
"Blur",
"Number of pixels for blurring shadow (set to 0 to disable)");
588 prop,
"Glow Under",
"Glow only areas with alpha (not supported with Regular blend mode)");
#define STRNCPY_UTF8(dst, src)
#define BLT_I18NCONTEXT_ID_ID
#define BLT_I18NCONTEXT_ID_GPENCIL
void WM_main_add_notifier(uint type, void *reference)
static void rna_def_shader_fx_wave(BlenderRNA *brna)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void id_lib_extern(ID *id, bool enforce_fix=false)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
char * STRNCPY(char(&dst)[N], const char *src)
static void rna_def_shader_fx_colorize(BlenderRNA *brna)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
static const EnumPropertyItem rna_enum_shaderfx_colorize_modes_items[]
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
@ FX_PIXEL_FILTER_NEAREST
static void rna_def_shader_fx_swirl(BlenderRNA *brna)
std::string RNA_path_name_to_infix(const StringRefNull string)
void RNA_define_lib_overridable(const bool make_overridable)
static void rna_def_shader_fx_glow(BlenderRNA *brna)
static void rna_def_shader_fx_flip(BlenderRNA *brna)
static const EnumPropertyItem rna_enum_shaderfx_rim_modes_items[]
static const EnumPropertyItem rna_enum_shaderfx_glow_modes_items[]
static const EnumPropertyItem rna_enum_glow_blend_modes_items[]
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
void BKE_animdata_fix_paths(ID &id, StringRef prefix, StringRef old_infix, StringRef new_infix, bool verify_paths, const DriverMap &driver_map)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier_c_str, int type, int subtype)
void BKE_shaderfx_unique_name(ListBaseT< ShaderFxData > *shaders, ShaderFxData *fx)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
static void rna_def_shader_fx_shadow(BlenderRNA *brna)
void DEG_id_tag_update(ID *id, unsigned int flags)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
char char size_t BLI_str_escape(char *__restrict dst, StringRef src, size_t dst_maxncpy) ATTR_NONNULL(1)
static void rna_def_shader_fx_blur(BlenderRNA *brna)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
@ FX_SWIRL_MAKE_TRANSPARENT
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
@ eShaderFxColorizeMode_Custom
@ eShaderFxColorizeMode_Transparent
@ eShaderFxColorizeMode_Duotone
@ eShaderFxColorizeMode_GrayScale
@ eShaderFxColorizeMode_Sepia
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
void DEG_relations_tag_update(Main *bmain)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_property_int_default(PropertyRNA *prop, int value)
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop, const bool allow_replace)
void RNA_def_property_array(PropertyRNA *prop, int length)
@ eShaderFxGlowMode_Color
@ eShaderFxGlowMode_Luminance
static void rna_def_shader_fx_pixel(BlenderRNA *brna)
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
static void rna_def_shader_fx_rim(BlenderRNA *brna)
const EnumPropertyItem rna_enum_object_shaderfx_type_items[]
void RNA_def_shader_fx(BlenderRNA *brna)
@ eShaderFxRimMode_Normal
@ eShaderFxRimMode_Divide
@ eShaderFxRimMode_Subtract
@ eShaderFxRimMode_Overlay
@ eShaderFxRimMode_Multiply