45 return &RNA_PointLight;
49 return &RNA_SpotLight;
51 return &RNA_AreaLight;
77 if (la->use_nodes && la->nodetree ==
nullptr) {
90 {
LA_LOCAL,
"POINT", 0,
"Point",
"Omnidirectional point light source"},
91 {
LA_SUN,
"SUN", 0,
"Sun",
"Constant direction parallel ray light source"},
92 {
LA_SPOT,
"SPOT", 0,
"Spot",
"Directional cone light source"},
93 {
LA_AREA,
"AREA", 0,
"Area",
"Directional area light source"},
94 {0,
nullptr, 0,
nullptr,
nullptr},
101 static const float default_color[4] = {1.0f, 1.0f, 1.0f, 1.0f};
154 "Custom Attenuation",
155 "Use custom attenuation distance instead of global light threshold");
163 prop,
"Cutoff Distance",
"Distance at which the light influence will be set to 0");
192 switch (light_type) {
199 prop,
"Strength",
"Sunlight strength in watts per meter squared (W/m²)");
210 "The energy this light would emit over its entire area "
211 "if it wasn't limited by the spot angle");
224 "Light energy emitted over the entire area of the light in all directions");
241 "Shadow Buffer Clip Start",
242 "Shadow map clip start, below which objects will not generate shadows");
250 prop,
"Shadow Soft Size",
"Light size for ray shadow sampling (Raytraced shadows)");
258 prop,
"Shadow Filter Radius",
"Blur shadow aliasing using Percentage Closer Filtering");
266 "Shadows Resolution Limit",
267 "Minimum size of a shadow map pixel. Higher values use less memory at "
268 "the cost of shadow quality.");
277 "Enable jittered soft shadows to increase shadow precision (disabled in viewport unless "
278 "enabled in the render settings). Has a high performance impact.");
287 "Shadow Jitter Overblur",
288 "Apply shadow tracing to each jittered sample to reduce under-sampling artifacts");
297 "Cascade Max Distance",
298 "End distance of the cascaded shadow map (only in perspective view)");
305 prop,
"Cascade Count",
"Number of texture used by the cascaded shadow map");
312 "Exponential Distribution",
313 "Higher value increase resolution towards the viewpoint");
320 prop,
"Cascade Fade",
"How smooth is the transition between each cascade");
327 "Absolute Resolution Limit",
328 "Limit the resolution at 1 unit from the light origin instead of "
329 "relative to the shadowed pixel");
350 "Apply falloff to avoid sharp edges when the light geometry intersects with other objects");
367 {0,
nullptr, 0,
nullptr,
nullptr},
389 prop,
"Size",
"Size of the area of the area light, X direction size for rectangle shapes");
399 "Size of the area of the area light in the Y direction for rectangle shapes");
408 "How widely the emitted light fans out, as in the case of a gridded softbox");
447 "Display transparent cone in 3D view to visualize which objects are contained in it");
455 "Apply falloff to avoid sharp edges when the light geometry intersects with other objects");
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
#define BLT_I18NCONTEXT_ID_LIGHT
void DEG_id_tag_update(ID *id, unsigned int flags)
void ED_node_shader_default(const bContext *C, ID *id)
Read Guarded memory(de)allocation.
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
void rna_def_animdata_common(StructRNA *srna)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_struct_translation_context(StructRNA *srna, const char *context)
void RNA_def_property_float_array_default(PropertyRNA *prop, const float *array)
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
static void rna_def_area_light(BlenderRNA *brna)
void RNA_def_light(BlenderRNA *brna)
static void rna_def_sun_light(BlenderRNA *brna)
static void rna_def_light_shadow(StructRNA *srna, bool sun)
const EnumPropertyItem rna_enum_light_type_items[]
static void rna_def_point_light(BlenderRNA *brna)
static void rna_def_light_energy(StructRNA *srna, const short light_type)
static void rna_def_spot_light(BlenderRNA *brna)
static void rna_def_light(BlenderRNA *brna)
void WM_main_add_notifier(uint type, void *reference)