Blender V4.3
rna_light.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#include <cstdlib>
10
11#include "BLI_math_base.h"
12#include "BLI_math_rotation.h"
13#include "BLI_sys_types.h"
14
15#include "BLT_translation.hh"
16
17#include "RNA_define.hh"
18#include "RNA_enum_types.hh"
19#include "rna_internal.hh"
20
21#include "DNA_light_types.h"
22#include "DNA_material_types.h"
23#include "DNA_texture_types.h"
24
25#ifdef RNA_RUNTIME
26
27# include "MEM_guardedalloc.h"
28
29# include "BKE_context.hh"
30# include "BKE_main.hh"
31# include "BKE_texture.h"
32
33# include "DEG_depsgraph.hh"
34
35# include "ED_node.hh"
36# include "WM_api.hh"
37# include "WM_types.hh"
38
39static StructRNA *rna_Light_refine(PointerRNA *ptr)
40{
41 Light *la = (Light *)ptr->data;
42
43 switch (la->type) {
44 case LA_LOCAL:
45 return &RNA_PointLight;
46 case LA_SUN:
47 return &RNA_SunLight;
48 case LA_SPOT:
49 return &RNA_SpotLight;
50 case LA_AREA:
51 return &RNA_AreaLight;
52 default:
53 return &RNA_Light;
54 }
55}
56
57static void rna_Light_update(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
58{
59 Light *la = (Light *)ptr->owner_id;
60
61 DEG_id_tag_update(&la->id, 0);
63}
64
65static void rna_Light_draw_update(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
66{
67 Light *la = (Light *)ptr->owner_id;
68
69 DEG_id_tag_update(&la->id, 0);
71}
72
73static void rna_Light_use_nodes_update(bContext *C, PointerRNA *ptr)
74{
75 Light *la = (Light *)ptr->data;
76
77 if (la->use_nodes && la->nodetree == nullptr) {
78 ED_node_shader_default(C, &la->id);
79 }
80
81 rna_Light_update(CTX_data_main(C), CTX_data_scene(C), ptr);
82}
83
84#else
85
86/* NOTE(@dingto): Don't define icons here,
87 * so they don't show up in the Light UI (properties editor). */
88
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},
95};
96
97static void rna_def_light(BlenderRNA *brna)
98{
99 StructRNA *srna;
100 PropertyRNA *prop;
101 static const float default_color[4] = {1.0f, 1.0f, 1.0f, 1.0f};
102
103 srna = RNA_def_struct(brna, "Light", "ID");
104 RNA_def_struct_sdna(srna, "Light");
105 RNA_def_struct_refine_func(srna, "rna_Light_refine");
106 RNA_def_struct_ui_text(srna, "Light", "Light data-block for lighting a scene");
108 RNA_def_struct_ui_icon(srna, ICON_LIGHT_DATA);
109
110 prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
112 RNA_def_property_ui_text(prop, "Type", "Type of light");
114 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
115
116 prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
117 RNA_def_property_float_sdna(prop, nullptr, "r");
118 RNA_def_property_array(prop, 3);
119 RNA_def_property_float_array_default(prop, default_color);
120 RNA_def_property_ui_text(prop, "Color", "Light color");
121 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
122
123 prop = RNA_def_property(srna, "specular_factor", PROP_FLOAT, PROP_FACTOR);
124 RNA_def_property_float_sdna(prop, nullptr, "spec_fac");
125 RNA_def_property_range(prop, 0.0f, FLT_MAX);
126 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.01, 2);
127 RNA_def_property_ui_text(prop, "Specular Factor", "Specular reflection multiplier");
128 RNA_def_property_update(prop, 0, "rna_Light_update");
129
130 prop = RNA_def_property(srna, "diffuse_factor", PROP_FLOAT, PROP_FACTOR);
131 RNA_def_property_float_sdna(prop, nullptr, "diff_fac");
132 RNA_def_property_range(prop, 0.0f, FLT_MAX);
133 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.01, 2);
134 RNA_def_property_ui_text(prop, "Diffuse Factor", "Diffuse reflection multiplier");
135 RNA_def_property_update(prop, 0, "rna_Light_update");
136
137 prop = RNA_def_property(srna, "transmission_factor", PROP_FLOAT, PROP_FACTOR);
138 RNA_def_property_float_sdna(prop, nullptr, "transmission_fac");
139 RNA_def_property_range(prop, 0.0f, FLT_MAX);
140 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.01, 2);
141 RNA_def_property_ui_text(prop, "Transmission Factor", "Transmission light multiplier");
142 RNA_def_property_update(prop, 0, "rna_Light_update");
143
144 prop = RNA_def_property(srna, "volume_factor", PROP_FLOAT, PROP_FACTOR);
145 RNA_def_property_float_sdna(prop, nullptr, "volume_fac");
146 RNA_def_property_range(prop, 0.0f, FLT_MAX);
147 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.01, 2);
148 RNA_def_property_ui_text(prop, "Volume Factor", "Volume light multiplier");
149 RNA_def_property_update(prop, 0, "rna_Light_update");
150
151 prop = RNA_def_property(srna, "use_custom_distance", PROP_BOOLEAN, PROP_NONE);
154 "Custom Attenuation",
155 "Use custom attenuation distance instead of global light threshold");
156 RNA_def_property_update(prop, 0, "rna_Light_update");
157
158 prop = RNA_def_property(srna, "cutoff_distance", PROP_FLOAT, PROP_DISTANCE);
159 RNA_def_property_float_sdna(prop, nullptr, "att_dist");
160 RNA_def_property_range(prop, 0.0f, FLT_MAX);
161 RNA_def_property_ui_range(prop, 0.01f, 100.0f, 1.0, 2);
163 prop, "Cutoff Distance", "Distance at which the light influence will be set to 0");
164 RNA_def_property_update(prop, 0, "rna_Light_update");
165
166 prop = RNA_def_property(srna, "use_shadow", PROP_BOOLEAN, PROP_NONE);
167 RNA_def_property_boolean_sdna(prop, nullptr, "mode", LA_SHADOW);
168 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
169
170 /* nodes */
171 prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
172 RNA_def_property_pointer_sdna(prop, nullptr, "nodetree");
175 RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node based lights");
176
177 prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
178 RNA_def_property_boolean_sdna(prop, nullptr, "use_nodes", 1);
181 RNA_def_property_ui_text(prop, "Use Nodes", "Use shader nodes to render the light");
182 RNA_def_property_update(prop, 0, "rna_Light_use_nodes_update");
183
184 /* common */
186}
187
188static void rna_def_light_energy(StructRNA *srna, const short light_type)
189{
190 PropertyRNA *prop;
191
192 switch (light_type) {
193 case LA_SUN: {
194 /* Distant light strength has no unit defined,
195 * it's proportional to 'watt/m^2' and is not sensitive to scene unit scale. */
196 prop = RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE);
197 RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
199 prop, "Strength", "Sunlight strength in watts per meter squared (W/m²)");
200 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
201 break;
202 }
203 case LA_SPOT: {
204 /* Lights with a location have power in Watts,
205 * which is sensitive to scene unit scale. */
206 prop = RNA_def_property(srna, "energy", PROP_FLOAT, PROP_POWER);
207 RNA_def_property_ui_range(prop, 0.0f, 1000000.0f, 10, 5);
209 "Power",
210 "The energy this light would emit over its entire area "
211 "if it wasn't limited by the spot angle");
213 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
214 break;
215 }
216 default: {
217 /* Lights with a location have power in Watts,
218 * which is sensitive to scene unit scale. */
219 prop = RNA_def_property(srna, "energy", PROP_FLOAT, PROP_POWER);
220 RNA_def_property_ui_range(prop, 0.0f, 1000000.0f, 10, 5);
222 prop,
223 "Power",
224 "Light energy emitted over the entire area of the light in all directions");
226 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
227 break;
228 }
229 }
230}
231
232static void rna_def_light_shadow(StructRNA *srna, bool sun)
233{
234 PropertyRNA *prop;
235
236 prop = RNA_def_property(srna, "shadow_buffer_clip_start", PROP_FLOAT, PROP_DISTANCE);
237 RNA_def_property_float_sdna(prop, nullptr, "clipsta");
238 RNA_def_property_range(prop, 1e-6f, FLT_MAX);
239 RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 10, 3);
241 "Shadow Buffer Clip Start",
242 "Shadow map clip start, below which objects will not generate shadows");
243 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
244
245 prop = RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_DISTANCE);
246 RNA_def_property_float_sdna(prop, nullptr, "radius");
247 RNA_def_property_range(prop, 0.0f, FLT_MAX);
248 RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
250 prop, "Shadow Soft Size", "Light size for ray shadow sampling (Raytraced shadows)");
251 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
252
253 /* Eevee */
254 prop = RNA_def_property(srna, "shadow_filter_radius", PROP_FLOAT, PROP_NONE);
255 RNA_def_property_range(prop, 0.0f, FLT_MAX);
256 RNA_def_property_ui_range(prop, 0.0f, 5.0f, 1.0f, 2);
258 prop, "Shadow Filter Radius", "Blur shadow aliasing using Percentage Closer Filtering");
260 RNA_def_property_update(prop, 0, "rna_Light_update");
261
262 prop = RNA_def_property(srna, "shadow_maximum_resolution", PROP_FLOAT, PROP_DISTANCE);
263 RNA_def_property_range(prop, 0.0f, FLT_MAX);
264 RNA_def_property_ui_range(prop, 0.0001f, 0.020f, 0.05f, 4);
266 "Shadows Resolution Limit",
267 "Minimum size of a shadow map pixel. Higher values use less memory at "
268 "the cost of shadow quality.");
270 RNA_def_property_update(prop, 0, "rna_Light_update");
271
272 prop = RNA_def_property(srna, "use_shadow_jitter", PROP_BOOLEAN, PROP_NONE);
273 RNA_def_property_boolean_sdna(prop, nullptr, "mode", LA_SHADOW_JITTER);
275 prop,
276 "Shadow Jitter",
277 "Enable jittered soft shadows to increase shadow precision (disabled in viewport unless "
278 "enabled in the render settings). Has a high performance impact.");
280 RNA_def_property_update(prop, 0, "rna_Light_update");
281
282 prop = RNA_def_property(srna, "shadow_jitter_overblur", PROP_FLOAT, PROP_PERCENTAGE);
283 RNA_def_property_range(prop, 0.0f, 100.0f);
284 RNA_def_property_ui_range(prop, 0.0f, 20.0f, 10.0f, 0);
286 prop,
287 "Shadow Jitter Overblur",
288 "Apply shadow tracing to each jittered sample to reduce under-sampling artifacts");
290 RNA_def_property_update(prop, 0, "rna_Light_update");
291
292 if (sun) {
293 prop = RNA_def_property(srna, "shadow_cascade_max_distance", PROP_FLOAT, PROP_DISTANCE);
294 RNA_def_property_float_sdna(prop, nullptr, "cascade_max_dist");
295 RNA_def_property_range(prop, 0.0f, FLT_MAX);
297 "Cascade Max Distance",
298 "End distance of the cascaded shadow map (only in perspective view)");
299 RNA_def_property_update(prop, 0, "rna_Light_update");
300
301 prop = RNA_def_property(srna, "shadow_cascade_count", PROP_INT, PROP_NONE);
302 RNA_def_property_int_sdna(prop, nullptr, "cascade_count");
303 RNA_def_property_range(prop, 1, 4);
305 prop, "Cascade Count", "Number of texture used by the cascaded shadow map");
306 RNA_def_property_update(prop, 0, "rna_Light_update");
307
308 prop = RNA_def_property(srna, "shadow_cascade_exponent", PROP_FLOAT, PROP_FACTOR);
309 RNA_def_property_float_sdna(prop, nullptr, "cascade_exponent");
310 RNA_def_property_range(prop, 0.0f, 1.0f);
312 "Exponential Distribution",
313 "Higher value increase resolution towards the viewpoint");
314 RNA_def_property_update(prop, 0, "rna_Light_update");
315
316 prop = RNA_def_property(srna, "shadow_cascade_fade", PROP_FLOAT, PROP_FACTOR);
317 RNA_def_property_float_sdna(prop, nullptr, "cascade_fade");
318 RNA_def_property_range(prop, 0.0f, 1.0f);
320 prop, "Cascade Fade", "How smooth is the transition between each cascade");
321 RNA_def_property_update(prop, 0, "rna_Light_update");
322 }
323 else {
324 prop = RNA_def_property(srna, "use_absolute_resolution", PROP_BOOLEAN, PROP_NONE);
327 "Absolute Resolution Limit",
328 "Limit the resolution at 1 unit from the light origin instead of "
329 "relative to the shadowed pixel");
331 RNA_def_property_update(prop, 0, "rna_Light_update");
332 }
333}
334
336{
337 StructRNA *srna;
338
339 srna = RNA_def_struct(brna, "PointLight", "Light");
340 RNA_def_struct_sdna(srna, "Light");
341 RNA_def_struct_ui_text(srna, "Point Light", "Omnidirectional point Light");
342 RNA_def_struct_ui_icon(srna, ICON_LIGHT_POINT);
343
344 PropertyRNA *prop;
345 prop = RNA_def_property(srna, "use_soft_falloff", PROP_BOOLEAN, PROP_NONE);
348 prop,
349 "Soft Falloff",
350 "Apply falloff to avoid sharp edges when the light geometry intersects with other objects");
351 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
352
354 rna_def_light_shadow(srna, false);
355}
356
358{
359 StructRNA *srna;
360 PropertyRNA *prop;
361
362 static const EnumPropertyItem prop_areashape_items[] = {
363 {LA_AREA_SQUARE, "SQUARE", 0, "Square", ""},
364 {LA_AREA_RECT, "RECTANGLE", 0, "Rectangle", ""},
365 {LA_AREA_DISK, "DISK", 0, "Disk", ""},
366 {LA_AREA_ELLIPSE, "ELLIPSE", 0, "Ellipse", ""},
367 {0, nullptr, 0, nullptr, nullptr},
368 };
369
370 srna = RNA_def_struct(brna, "AreaLight", "Light");
371 RNA_def_struct_sdna(srna, "Light");
372 RNA_def_struct_ui_text(srna, "Area Light", "Directional area Light");
373 RNA_def_struct_ui_icon(srna, ICON_LIGHT_AREA);
374
376 rna_def_light_shadow(srna, false);
377
378 prop = RNA_def_property(srna, "shape", PROP_ENUM, PROP_NONE);
379 RNA_def_property_enum_sdna(prop, nullptr, "area_shape");
380 RNA_def_property_enum_items(prop, prop_areashape_items);
381 RNA_def_property_ui_text(prop, "Shape", "Shape of the area Light");
382 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
383
384 prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_DISTANCE);
385 RNA_def_property_float_sdna(prop, nullptr, "area_size");
386 RNA_def_property_range(prop, 0.0f, FLT_MAX);
387 RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
389 prop, "Size", "Size of the area of the area light, X direction size for rectangle shapes");
390 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
391
392 prop = RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_DISTANCE);
393 RNA_def_property_float_sdna(prop, nullptr, "area_sizey");
394 RNA_def_property_range(prop, 0.0f, FLT_MAX);
395 RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
397 prop,
398 "Size Y",
399 "Size of the area of the area light in the Y direction for rectangle shapes");
400 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
401
402 prop = RNA_def_property(srna, "spread", PROP_FLOAT, PROP_ANGLE);
403 RNA_def_property_float_sdna(prop, nullptr, "area_spread");
404 RNA_def_property_range(prop, DEG2RADF(0.0f), DEG2RADF(180.0f));
406 prop,
407 "Spread",
408 "How widely the emitted light fans out, as in the case of a gridded softbox");
409 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
410}
411
413{
414 StructRNA *srna;
415 PropertyRNA *prop;
416
417 srna = RNA_def_struct(brna, "SpotLight", "Light");
418 RNA_def_struct_sdna(srna, "Light");
419 RNA_def_struct_ui_text(srna, "Spot Light", "Directional cone Light");
420 RNA_def_struct_ui_icon(srna, ICON_LIGHT_SPOT);
421
423 rna_def_light_shadow(srna, false);
424
425 prop = RNA_def_property(srna, "use_square", PROP_BOOLEAN, PROP_NONE);
426 RNA_def_property_boolean_sdna(prop, nullptr, "mode", LA_SQUARE);
427 RNA_def_property_ui_text(prop, "Square", "Cast a square spot light shape");
428 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
429
430 prop = RNA_def_property(srna, "spot_blend", PROP_FLOAT, PROP_NONE);
431 RNA_def_property_float_sdna(prop, nullptr, "spotblend");
432 RNA_def_property_range(prop, 0.0f, 1.0f);
433 RNA_def_property_ui_text(prop, "Spot Blend", "The softness of the spotlight edge");
434 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
435
436 prop = RNA_def_property(srna, "spot_size", PROP_FLOAT, PROP_ANGLE);
437 RNA_def_property_float_sdna(prop, nullptr, "spotsize");
438 RNA_def_property_range(prop, DEG2RADF(1.0f), DEG2RADF(180.0f));
439 RNA_def_property_ui_text(prop, "Spot Size", "Angle of the spotlight beam");
440 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
441
442 prop = RNA_def_property(srna, "show_cone", PROP_BOOLEAN, PROP_NONE);
443 RNA_def_property_boolean_sdna(prop, nullptr, "mode", LA_SHOW_CONE);
445 prop,
446 "Show Cone",
447 "Display transparent cone in 3D view to visualize which objects are contained in it");
448 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
449
450 prop = RNA_def_property(srna, "use_soft_falloff", PROP_BOOLEAN, PROP_NONE);
453 prop,
454 "Soft Falloff",
455 "Apply falloff to avoid sharp edges when the light geometry intersects with other objects");
456 RNA_def_property_update(prop, 0, "rna_Light_draw_update");
457}
458
460{
461 StructRNA *srna;
462 PropertyRNA *prop;
463
464 srna = RNA_def_struct(brna, "SunLight", "Light");
465 RNA_def_struct_sdna(srna, "Light");
466 RNA_def_struct_ui_text(srna, "Sun Light", "Constant direction parallel ray Light");
467 RNA_def_struct_ui_icon(srna, ICON_LIGHT_SUN);
468
469 prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
470 RNA_def_property_float_sdna(prop, nullptr, "sun_angle");
471 RNA_def_property_range(prop, DEG2RADF(0.0f), DEG2RADF(180.0f));
472 RNA_def_property_ui_text(prop, "Angle", "Angular diameter of the Sun as seen from the Earth");
473 RNA_def_property_update(prop, 0, "rna_Light_update");
474
476 rna_def_light_shadow(srna, true);
477}
478
480{
481 rna_def_light(brna);
483 rna_def_area_light(brna);
484 rna_def_spot_light(brna);
485 rna_def_sun_light(brna);
486}
487
488#endif
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
#define DEG2RADF(_deg)
#define BLT_I18NCONTEXT_ID_LIGHT
void DEG_id_tag_update(ID *id, unsigned int flags)
@ LA_SHAD_RES_ABSOLUTE
@ LA_CUSTOM_ATTENUATION
@ LA_SQUARE
@ LA_SHOW_CONE
@ LA_SHADOW_JITTER
@ LA_SHADOW
@ LA_USE_SOFT_FALLOFF
@ LA_AREA
@ LA_LOCAL
@ LA_SPOT
@ LA_SUN
@ LA_AREA_ELLIPSE
@ LA_AREA_SQUARE
@ LA_AREA_RECT
@ LA_AREA_DISK
void ED_node_shader_default(const bContext *C, ID *id)
Definition node_edit.cc:549
Read Guarded memory(de)allocation.
@ PROP_FLOAT
Definition RNA_types.hh:67
@ PROP_BOOLEAN
Definition RNA_types.hh:65
@ PROP_ENUM
Definition RNA_types.hh:69
@ PROP_INT
Definition RNA_types.hh:66
@ PROP_POINTER
Definition RNA_types.hh:70
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
Definition RNA_types.hh:355
@ PROP_CONTEXT_UPDATE
Definition RNA_types.hh:296
@ PROP_ANIMATABLE
Definition RNA_types.hh:220
@ PROP_PTR_NO_OWNERSHIP
Definition RNA_types.hh:284
@ PROP_DISTANCE
Definition RNA_types.hh:159
@ PROP_POWER
Definition RNA_types.hh:184
@ PROP_COLOR
Definition RNA_types.hh:163
@ PROP_ANGLE
Definition RNA_types.hh:155
@ PROP_NONE
Definition RNA_types.hh:136
@ PROP_PERCENTAGE
Definition RNA_types.hh:153
@ PROP_FACTOR
Definition RNA_types.hh:154
#define ND_LIGHTING_DRAW
Definition WM_types.hh:451
#define NC_LAMP
Definition WM_types.hh:349
#define ND_LIGHTING
Definition WM_types.hh:450
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)
Definition rna_light.cc:357
void RNA_def_light(BlenderRNA *brna)
Definition rna_light.cc:479
static void rna_def_sun_light(BlenderRNA *brna)
Definition rna_light.cc:459
static void rna_def_light_shadow(StructRNA *srna, bool sun)
Definition rna_light.cc:232
const EnumPropertyItem rna_enum_light_type_items[]
Definition rna_light.cc:89
static void rna_def_point_light(BlenderRNA *brna)
Definition rna_light.cc:335
static void rna_def_light_energy(StructRNA *srna, const short light_type)
Definition rna_light.cc:188
static void rna_def_spot_light(BlenderRNA *brna)
Definition rna_light.cc:412
static void rna_def_light(BlenderRNA *brna)
Definition rna_light.cc:97
#define FLT_MAX
Definition stdcycles.h:14
ID * owner_id
Definition RNA_types.hh:40
void * data
Definition RNA_types.hh:42
void WM_main_add_notifier(uint type, void *reference)
PointerRNA * ptr
Definition wm_files.cc:4126