52 return RNA_PointLight;
66 Light *la = id_cast<Light *>(ptr->owner_id);
74 Light *la = id_cast<Light *>(ptr->owner_id);
80static bool rna_Light_use_nodes_get(
PointerRNA * )
86static void rna_Light_use_nodes_set(
PointerRNA * ,
bool )
94static void rna_Light_temperature_color_get(
PointerRNA *ptr,
float *
color)
111static float rna_Light_area(
Light *light,
const float matrix_world[16])
127 {
LA_LOCAL,
"POINT", 0,
"Point",
"Omnidirectional point light source"},
128 {
LA_SUN,
"SUN", 0,
"Sun",
"Constant direction parallel ray light source"},
129 {
LA_SPOT,
"SPOT", 0,
"Spot",
"Directional cone light source"},
130 {
LA_AREA,
"AREA", 0,
"Area",
"Directional area light source"},
131 {0,
nullptr, 0,
nullptr,
nullptr},
138 "Compute light area based on type and shape. The normalize "
139 "option divides light intensity by this area");
151 static const float default_color[4] = {1.0f, 1.0f, 1.0f, 1.0f};
171 prop,
"Use Temperature",
"Use blackbody temperature to define a natural light color");
233 "Custom Attenuation",
234 "Use custom attenuation distance instead of global light threshold");
242 prop,
"Cutoff Distance",
"Distance at which the light influence will be set to 0");
256 "Scales the power of the light exponentially, multiplying the intensity by 2^exposure");
264 "Normalize intensity by light area, for consistent total light "
265 "output regardless of size and shape");
283 "Unused but kept for compatibility reasons. Setting the property "
284 "has no effect, and getting it always returns True.",
299 switch (light_type) {
306 prop,
"Strength",
"Sunlight strength in watts per meter squared (W/m²)");
319 "The energy this light would emit over its entire area "
320 "if it wasn't limited by the spot angle, in units of radiant power (W)");
332 "Light energy emitted over the entire area of the light in all "
333 "directions, in units of radiant power (W)");
354 "Shadow Buffer Clip Start",
355 "Shadow map clip start, below which objects will not generate shadows");
363 prop,
"Shadow Soft Size",
"Light size for ray shadow sampling (Raytraced shadows)");
371 prop,
"Shadow Filter Radius",
"Blur shadow aliasing using Percentage Closer Filtering");
378 "Shadows Resolution Limit",
379 "Minimum size of a shadow map pixel. Higher values use less memory at "
380 "the cost of shadow quality.");
388 "Enable jittered soft shadows to increase shadow precision (disabled in viewport unless "
389 "enabled in the render settings). Has a high performance impact.");
397 "Shadow Jitter Overblur",
398 "Apply shadow tracing to each jittered sample to reduce under-sampling artifacts");
406 "Cascade Max Distance",
407 "End distance of the cascaded shadow map (only in perspective view)");
414 prop,
"Cascade Count",
"Number of texture used by the cascaded shadow map");
421 "Exponential Distribution",
422 "Higher value increase resolution towards the viewpoint");
429 prop,
"Cascade Fade",
"How smooth is the transition between each cascade");
436 "Absolute Resolution Limit",
437 "Limit the resolution at 1 unit from the light origin instead of "
438 "relative to the shadowed pixel");
460 "Apply falloff to avoid sharp edges when the light geometry intersects with other objects");
478 {0,
nullptr, 0,
nullptr,
nullptr},
502 prop,
"Size",
"Size of the area of the area light, X direction size for rectangle shapes");
512 "Size of the area of the area light in the Y direction for rectangle shapes");
521 "How widely the emitted light fans out, as in the case of a gridded softbox");
564 "Display transparent cone in 3D view to visualize which objects are contained in it");
572 "Apply falloff to avoid sharp edges when the light geometry intersects with other objects");
General operations, lookup, etc. for blender lights.
#define BLT_I18NCONTEXT_ID_LIGHT
Read Blender memory allocation and freeing.
void WM_main_add_notifier(uint type, void *reference)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_deprecated(PropertyRNA *prop, const char *note, const short version, const short removal_version)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
static void rna_def_light_api(StructRNA *srna)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_light(BlenderRNA *brna)
void RNA_define_lib_overridable(const bool make_overridable)
const EnumPropertyItem rna_enum_light_type_items[]
MatBase< float, 4, 4 > float4x4
static void rna_def_point_light(BlenderRNA *brna)
void RNA_def_property_float_array_default(PropertyRNA *prop, const float *array)
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 RNA_def_property_float_default(PropertyRNA *prop, float value)
void rna_def_animdata_common(StructRNA *srna)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier_c_str, int type, int subtype)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
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)
static void rna_def_area_light(BlenderRNA *brna)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier_c_str, const char *call)
void IMB_colormanagement_blackbody_temperature_to_rgb(float r_dest[4], float value)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_struct_translation_context(StructRNA *srna, const char *context)
MINLINE void copy_v3_fl(float r[3], float f)
static void rna_def_sun_light(BlenderRNA *brna)
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)
float BKE_light_area(const Light &light, const float4x4 &object_to_world)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
static void rna_def_light(BlenderRNA *brna)
static void rna_def_spot_light(BlenderRNA *brna)
static void rna_def_light_shadow(StructRNA *srna, bool sun)
void RNA_def_property_array(PropertyRNA *prop, int length)
const int rna_matrix_dimsize_4x4[]
static void rna_def_light_energy(StructRNA *srna, const short light_type)