Blender  V2.93
rna_scene.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #include <stdlib.h>
22 
23 #include "DNA_brush_types.h"
24 #include "DNA_collection_types.h"
25 #include "DNA_gpencil_types.h"
26 #include "DNA_layer_types.h"
27 #include "DNA_linestyle_types.h"
28 #include "DNA_modifier_types.h"
29 #include "DNA_particle_types.h"
30 #include "DNA_rigidbody_types.h"
31 #include "DNA_scene_types.h"
32 #include "DNA_screen_types.h" /* TransformOrientation */
33 #include "DNA_userdef_types.h"
34 #include "DNA_view3d_types.h"
35 #include "DNA_world_types.h"
36 
37 #include "IMB_imbuf_types.h"
38 
39 #include "BLI_listbase.h"
40 #include "BLI_math.h"
41 
42 #include "BLT_translation.h"
43 
44 #include "BKE_armature.h"
45 #include "BKE_editmesh.h"
46 #include "BKE_paint.h"
47 #include "BKE_volume.h"
48 
49 #include "ED_gpencil.h"
50 #include "ED_object.h"
51 
52 #include "RNA_define.h"
53 #include "RNA_enum_types.h"
54 
55 #include "rna_internal.h"
56 
57 /* Include for Bake Options */
58 #include "RE_engine.h"
59 #include "RE_pipeline.h"
60 
61 #ifdef WITH_FFMPEG
62 # include "BKE_writeffmpeg.h"
63 # include "ffmpeg_compat.h"
64 # include <libavcodec/avcodec.h>
65 # include <libavformat/avformat.h>
66 #endif
67 
68 #include "ED_render.h"
69 #include "ED_transform.h"
70 
71 #include "WM_api.h"
72 #include "WM_types.h"
73 
74 #include "BLI_threads.h"
75 
76 #include "DEG_depsgraph.h"
77 
78 #ifdef WITH_OPENEXR
80  {R_IMF_EXR_CODEC_NONE, "NONE", 0, "None", ""},
81  {R_IMF_EXR_CODEC_PXR24, "PXR24", 0, "Pxr24 (lossy)", ""},
82  {R_IMF_EXR_CODEC_ZIP, "ZIP", 0, "ZIP (lossless)", ""},
83  {R_IMF_EXR_CODEC_PIZ, "PIZ", 0, "PIZ (lossless)", ""},
84  {R_IMF_EXR_CODEC_RLE, "RLE", 0, "RLE (lossless)", ""},
85  {R_IMF_EXR_CODEC_ZIPS, "ZIPS", 0, "ZIPS (lossless)", ""},
86  {R_IMF_EXR_CODEC_B44, "B44", 0, "B44 (lossy)", ""},
87  {R_IMF_EXR_CODEC_B44A, "B44A", 0, "B44A (lossy)", ""},
88  {R_IMF_EXR_CODEC_DWAA, "DWAA", 0, "DWAA (lossy)", ""},
89  /* NOTE: Commented out for until new OpenEXR is released, see T50673. */
90  /* {R_IMF_EXR_CODEC_DWAB, "DWAB", 0, "DWAB (lossy)", ""}, */
91  {0, NULL, 0, NULL, NULL},
92 };
93 #endif
94 
95 #ifndef RNA_RUNTIME
98  "LAPLACIAN",
99  0,
100  "Laplacian",
101  "Use Laplacian method for relaxation"},
102  {UV_SCULPT_TOOL_RELAX_HC, "HC", 0, "HC", "Use HC method for relaxation"},
103  {0, NULL, 0, NULL, NULL},
104 };
105 #endif
106 
108  {SCE_SNAP_TARGET_CLOSEST, "CLOSEST", 0, "Closest", "Snap closest point onto target"},
109  {SCE_SNAP_TARGET_CENTER, "CENTER", 0, "Center", "Snap transformation center onto target"},
110  {SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target"},
111  {SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", "Snap active onto target"},
112  {0, NULL, 0, NULL, NULL},
113 };
114 
116  {PROP_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", "Smooth falloff"},
117  {PROP_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", "Spherical falloff"},
118  {PROP_ROOT, "ROOT", ICON_ROOTCURVE, "Root", "Root falloff"},
120  "INVERSE_SQUARE",
121  ICON_INVERSESQUARECURVE,
122  "Inverse Square",
123  "Inverse Square falloff"},
124  {PROP_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", "Sharp falloff"},
125  {PROP_LIN, "LINEAR", ICON_LINCURVE, "Linear", "Linear falloff"},
126  {PROP_CONST, "CONSTANT", ICON_NOCURVE, "Constant", "Constant falloff"},
127  {PROP_RANDOM, "RANDOM", ICON_RNDCURVE, "Random", "Random falloff"},
128  {0, NULL, 0, NULL, NULL},
129 };
130 
131 /* subset of the enum - only curves, missing random and const */
133  {PROP_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", "Smooth falloff"},
134  {PROP_SPHERE, "SPHERE", ICON_SPHERECURVE, "Sphere", "Spherical falloff"},
135  {PROP_ROOT, "ROOT", ICON_ROOTCURVE, "Root", "Root falloff"},
136  {PROP_INVSQUARE, "INVERSE_SQUARE", ICON_ROOTCURVE, "Inverse Square", "Inverse Square falloff"},
137  {PROP_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", "Sharp falloff"},
138  {PROP_LIN, "LINEAR", ICON_LINCURVE, "Linear", "Linear falloff"},
139  {0, NULL, 0, NULL, NULL},
140 };
141 
142 /* keep for operators, not used here */
144  {SCE_SELECT_VERTEX, "VERT", ICON_VERTEXSEL, "Vertex", "Vertex selection mode"},
145  {SCE_SELECT_EDGE, "EDGE", ICON_EDGESEL, "Edge", "Edge selection mode"},
146  {SCE_SELECT_FACE, "FACE", ICON_FACESEL, "Face", "Face selection mode"},
147  {0, NULL, 0, NULL, NULL},
148 };
149 
151  {UV_SELECT_VERTEX, "VERTEX", ICON_UV_VERTEXSEL, "Vertex", "Vertex selection mode"},
152  {UV_SELECT_EDGE, "EDGE", ICON_UV_EDGESEL, "Edge", "Edge selection mode"},
153  {UV_SELECT_FACE, "FACE", ICON_UV_FACESEL, "Face", "Face selection mode"},
154  {UV_SELECT_ISLAND, "ISLAND", ICON_UV_ISLANDSEL, "Island", "Island selection mode"},
155  {0, NULL, 0, NULL, NULL},
156 };
157 
160  "INCREMENT",
161  ICON_SNAP_INCREMENT,
162  "Increment",
163  "Snap to increments of grid"},
164  {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices"},
165  {SCE_SNAP_MODE_EDGE, "EDGE", ICON_SNAP_EDGE, "Edge", "Snap to edges"},
166  {SCE_SNAP_MODE_FACE, "FACE", ICON_SNAP_FACE, "Face", "Snap to faces"},
167  {SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume"},
169  "EDGE_MIDPOINT",
170  ICON_SNAP_MIDPOINT,
171  "Edge Center",
172  "Snap to the middle of edges"},
174  "EDGE_PERPENDICULAR",
175  ICON_SNAP_PERPENDICULAR,
176  "Edge Perpendicular",
177  "Snap to the nearest point on an edge"},
178  {0, NULL, 0, NULL, NULL},
179 };
180 
182  {SCE_SNAP_MODE_GRID, "GRID", ICON_SNAP_GRID, "Grid", "Snap to grid"},
183  {SCE_SNAP_MODE_NODE_X, "NODE_X", ICON_NODE_SIDE, "Node X", "Snap to left/right node border"},
184  {SCE_SNAP_MODE_NODE_Y, "NODE_Y", ICON_NODE_TOP, "Node Y", "Snap to top/bottom node border"},
186  "NODE_XY",
187  ICON_NODE_CORNER,
188  "Node X / Y",
189  "Snap to any node border"},
190  {0, NULL, 0, NULL, NULL},
191 };
192 
193 #ifndef RNA_RUNTIME
196  "INCREMENT",
197  ICON_SNAP_INCREMENT,
198  "Increment",
199  "Snap to increments of grid"},
200  {SCE_SNAP_MODE_VERTEX, "VERTEX", ICON_SNAP_VERTEX, "Vertex", "Snap to vertices"},
201  {0, NULL, 0, NULL, NULL},
202 };
203 
206  "OFF",
207  0,
208  "No Anti-Aliasing",
209  "Scene will be rendering without any anti-aliasing"},
211  "FXAA",
212  0,
213  "Single Pass Anti-Aliasing",
214  "Scene will be rendered using a single pass anti-aliasing method (FXAA)"},
216  "5",
217  0,
218  "5 Samples",
219  "Scene will be rendered using 5 anti-aliasing samples"},
221  "8",
222  0,
223  "8 Samples",
224  "Scene will be rendered using 8 anti-aliasing samples"},
226  "11",
227  0,
228  "11 Samples",
229  "Scene will be rendered using 11 anti-aliasing samples"},
231  "16",
232  0,
233  "16 Samples",
234  "Scene will be rendered using 16 anti-aliasing samples"},
236  "32",
237  0,
238  "32 Samples",
239  "Scene will be rendered using 32 anti-aliasing samples"},
240  {0, NULL, 0, NULL, NULL},
241 };
242 #endif
243 
246  "REFIT",
247  0,
248  "Refit",
249  "Incrementally refit the curve (high quality)"},
251  "SPLIT",
252  0,
253  "Split",
254  "Split the curve until the tolerance is met (fast)"},
255  {0, NULL, 0, NULL, NULL},
256 };
257 
258 /* workaround for duplicate enums,
259  * have each enum line as a define then conditionally set it or not
260  */
261 
262 #define R_IMF_ENUM_BMP \
263  {R_IMF_IMTYPE_BMP, "BMP", ICON_FILE_IMAGE, "BMP", "Output image in bitmap format"},
264 #define R_IMF_ENUM_IRIS \
265  {R_IMF_IMTYPE_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", "Output image in SGI IRIS format"},
266 #define R_IMF_ENUM_PNG \
267  {R_IMF_IMTYPE_PNG, "PNG", ICON_FILE_IMAGE, "PNG", "Output image in PNG format"},
268 #define R_IMF_ENUM_JPEG \
269  {R_IMF_IMTYPE_JPEG90, "JPEG", ICON_FILE_IMAGE, "JPEG", "Output image in JPEG format"},
270 #define R_IMF_ENUM_TAGA \
271  {R_IMF_IMTYPE_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", "Output image in Targa format"},
272 #define R_IMF_ENUM_TAGA_RAW \
273  {R_IMF_IMTYPE_RAWTGA, \
274  "TARGA_RAW", \
275  ICON_FILE_IMAGE, \
276  "Targa Raw", \
277  "Output image in uncompressed Targa format"},
278 
279 #if 0 /* UNUSED (so far) */
280 # ifdef WITH_DDS
281 # define R_IMF_ENUM_DDS \
282  {R_IMF_IMTYPE_DDS, "DDS", ICON_FILE_IMAGE, "DDS", "Output image in DDS format"},
283 # else
284 # define R_IMF_ENUM_DDS
285 # endif
286 #endif
287 
288 #ifdef WITH_OPENJPEG
289 # define R_IMF_ENUM_JPEG2K \
290  {R_IMF_IMTYPE_JP2, \
291  "JPEG2000", \
292  ICON_FILE_IMAGE, \
293  "JPEG 2000", \
294  "Output image in JPEG 2000 format"},
295 #else
296 # define R_IMF_ENUM_JPEG2K
297 #endif
298 
299 #ifdef WITH_CINEON
300 # define R_IMF_ENUM_CINEON \
301  {R_IMF_IMTYPE_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", "Output image in Cineon format"},
302 # define R_IMF_ENUM_DPX \
303  {R_IMF_IMTYPE_DPX, "DPX", ICON_FILE_IMAGE, "DPX", "Output image in DPX format"},
304 #else
305 # define R_IMF_ENUM_CINEON
306 # define R_IMF_ENUM_DPX
307 #endif
308 
309 #ifdef WITH_OPENEXR
310 # define R_IMF_ENUM_EXR_MULTILAYER \
311  {R_IMF_IMTYPE_MULTILAYER, \
312  "OPEN_EXR_MULTILAYER", \
313  ICON_FILE_IMAGE, \
314  "OpenEXR MultiLayer", \
315  "Output image in multilayer OpenEXR format"},
316 # define R_IMF_ENUM_EXR \
317  {R_IMF_IMTYPE_OPENEXR, \
318  "OPEN_EXR", \
319  ICON_FILE_IMAGE, \
320  "OpenEXR", \
321  "Output image in OpenEXR format"},
322 #else
323 # define R_IMF_ENUM_EXR_MULTILAYER
324 # define R_IMF_ENUM_EXR
325 #endif
326 
327 #ifdef WITH_HDR
328 # define R_IMF_ENUM_HDR \
329  {R_IMF_IMTYPE_RADHDR, \
330  "HDR", \
331  ICON_FILE_IMAGE, \
332  "Radiance HDR", \
333  "Output image in Radiance HDR format"},
334 #else
335 # define R_IMF_ENUM_HDR
336 #endif
337 
338 #ifdef WITH_TIFF
339 # define R_IMF_ENUM_TIFF \
340  {R_IMF_IMTYPE_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", "Output image in TIFF format"},
341 #else
342 # define R_IMF_ENUM_TIFF
343 #endif
344 
345 #define IMAGE_TYPE_ITEMS_IMAGE_ONLY \
346  R_IMF_ENUM_BMP \
347  /* DDS save not supported yet R_IMF_ENUM_DDS */ \
348  R_IMF_ENUM_IRIS \
349  R_IMF_ENUM_PNG \
350  R_IMF_ENUM_JPEG \
351  R_IMF_ENUM_JPEG2K \
352  R_IMF_ENUM_TAGA \
353  R_IMF_ENUM_TAGA_RAW{0, "", 0, " ", NULL}, \
354  R_IMF_ENUM_CINEON R_IMF_ENUM_DPX R_IMF_ENUM_EXR_MULTILAYER R_IMF_ENUM_EXR R_IMF_ENUM_HDR \
355  R_IMF_ENUM_TIFF
356 
357 #ifdef RNA_RUNTIME
358 static const EnumPropertyItem image_only_type_items[] = {
359 
361 
362  {0, NULL, 0, NULL, NULL},
363 };
364 #endif
365 
367  {0, "", 0, N_("Image"), NULL},
368 
370 
371  {0, "", 0, N_("Movie"), NULL},
373  "AVI_JPEG",
374  ICON_FILE_MOVIE,
375  "AVI JPEG",
376  "Output video in AVI JPEG format"},
377  {R_IMF_IMTYPE_AVIRAW, "AVI_RAW", ICON_FILE_MOVIE, "AVI Raw", "Output video in AVI Raw format"},
378 #ifdef WITH_FFMPEG
380  "FFMPEG",
381  ICON_FILE_MOVIE,
382  "FFmpeg Video",
383  "The most versatile way to output video files"},
384 #endif
385  {0, NULL, 0, NULL, NULL},
386 };
387 
390  "BW",
391  0,
392  "BW",
393  "Images get saved in 8-bit grayscale (only PNG, JPEG, TGA, TIF)"},
394  {R_IMF_PLANES_RGB, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
396  "RGBA",
397  0,
398  "RGBA",
399  "Images are saved with RGB and Alpha data (if supported)"},
400  {0, NULL, 0, NULL, NULL},
401 };
402 
403 #ifdef RNA_RUNTIME
404 # define IMAGE_COLOR_MODE_BW rna_enum_image_color_mode_items[0]
405 # define IMAGE_COLOR_MODE_RGB rna_enum_image_color_mode_items[1]
406 # define IMAGE_COLOR_MODE_RGBA rna_enum_image_color_mode_items[2]
407 #endif
408 
410  /* 1 (monochrome) not used */
411  {R_IMF_CHAN_DEPTH_8, "8", 0, "8", "8-bit color channels"},
412  {R_IMF_CHAN_DEPTH_10, "10", 0, "10", "10-bit color channels"},
413  {R_IMF_CHAN_DEPTH_12, "12", 0, "12", "12-bit color channels"},
414  {R_IMF_CHAN_DEPTH_16, "16", 0, "16", "16-bit color channels"},
415  /* 24 not used */
416  {R_IMF_CHAN_DEPTH_32, "32", 0, "32", "32-bit color channels"},
417  {0, NULL, 0, NULL, NULL},
418 };
419 
421  {R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", "Bake the normals in object space"},
422  {R_BAKE_SPACE_TANGENT, "TANGENT", 0, "Tangent", "Bake the normals in tangent space"},
423  {0, NULL, 0, NULL, NULL},
424 };
425 
427  {R_BAKE_POSX, "POS_X", 0, "+X", ""},
428  {R_BAKE_POSY, "POS_Y", 0, "+Y", ""},
429  {R_BAKE_POSZ, "POS_Z", 0, "+Z", ""},
430  {R_BAKE_NEGX, "NEG_X", 0, "-X", ""},
431  {R_BAKE_NEGY, "NEG_Y", 0, "-Y", ""},
432  {R_BAKE_NEGZ, "NEG_Z", 0, "-Z", ""},
433  {0, NULL, 0, NULL, NULL},
434 };
435 
438  "IMAGE_TEXTURES",
439  0,
440  "Image Textures",
441  "Bake to image data-blocks associated with active image texture nodes in materials"},
443  "VERTEX_COLORS",
444  0,
445  "Vertex Colors",
446  "Bake to active vertex color layer on meshes"},
447  {0, NULL, 0, NULL, NULL},
448 };
449 
452  "INTERNAL",
453  0,
454  "Internal",
455  "Save the baking map in an internal image data-block"},
456  {R_BAKE_SAVE_EXTERNAL, "EXTERNAL", 0, "External", "Save the baking map in an external file"},
457  {0, NULL, 0, NULL, NULL},
458 };
459 
460 #define R_IMF_VIEWS_ENUM_IND \
461  {R_IMF_VIEWS_INDIVIDUAL, \
462  "INDIVIDUAL", \
463  0, \
464  "Individual", \
465  "Individual files for each view with the prefix as defined by the scene views"},
466 #define R_IMF_VIEWS_ENUM_S3D \
467  {R_IMF_VIEWS_STEREO_3D, "STEREO_3D", 0, "Stereo 3D", "Single file with an encoded stereo pair"},
468 #define R_IMF_VIEWS_ENUM_MV \
469  {R_IMF_VIEWS_MULTIVIEW, "MULTIVIEW", 0, "Multi-View", "Single file with all the views"},
470 
473 };
474 
477 };
478 
481 };
482 
483 #undef R_IMF_VIEWS_ENUM_IND
484 #undef R_IMF_VIEWS_ENUM_S3D
485 #undef R_IMF_VIEWS_ENUM_MV
486 
489  "ANAGLYPH",
490  0,
491  "Anaglyph",
492  "Render views for left and right eyes as two differently filtered colors in a single image "
493  "(anaglyph glasses are required)"},
495  "INTERLACE",
496  0,
497  "Interlace",
498  "Render views for left and right eyes interlaced in a single image (3D-ready monitor is "
499  "required)"},
501  "TIMESEQUENTIAL",
502  0,
503  "Time Sequential",
504  "Render alternate eyes (also known as page flip, quad buffer support in the graphic card is "
505  "required)"},
507  "SIDEBYSIDE",
508  0,
509  "Side-by-Side",
510  "Render views for left and right eyes side-by-side"},
512  "TOPBOTTOM",
513  0,
514  "Top-Bottom",
515  "Render views for left and right eyes one above another"},
516  {0, NULL, 0, NULL, NULL},
517 };
518 
520  {S3D_ANAGLYPH_REDCYAN, "RED_CYAN", 0, "Red-Cyan", ""},
521  {S3D_ANAGLYPH_GREENMAGENTA, "GREEN_MAGENTA", 0, "Green-Magenta", ""},
522  {S3D_ANAGLYPH_YELLOWBLUE, "YELLOW_BLUE", 0, "Yellow-Blue", ""},
523  {0, NULL, 0, NULL, NULL},
524 };
525 
527  {S3D_INTERLACE_ROW, "ROW_INTERLEAVED", 0, "Row Interleaved", ""},
528  {S3D_INTERLACE_COLUMN, "COLUMN_INTERLEAVED", 0, "Column Interleaved", ""},
529  {S3D_INTERLACE_CHECKERBOARD, "CHECKERBOARD_INTERLEAVED", 0, "Checkerboard Interleaved", ""},
530  {0, NULL, 0, NULL, NULL},
531 };
532 
534  {R_BAKE_PASS_FILTER_NONE, "NONE", 0, "None", ""},
535  {R_BAKE_PASS_FILTER_AO, "AO", 0, "Ambient Occlusion", ""},
536  {R_BAKE_PASS_FILTER_EMIT, "EMIT", 0, "Emit", ""},
537  {R_BAKE_PASS_FILTER_DIRECT, "DIRECT", 0, "Direct", ""},
538  {R_BAKE_PASS_FILTER_INDIRECT, "INDIRECT", 0, "Indirect", ""},
539  {R_BAKE_PASS_FILTER_COLOR, "COLOR", 0, "Color", ""},
540  {R_BAKE_PASS_FILTER_DIFFUSE, "DIFFUSE", 0, "Diffuse", ""},
541  {R_BAKE_PASS_FILTER_GLOSSY, "GLOSSY", 0, "Glossy", ""},
542  {R_BAKE_PASS_FILTER_TRANSM, "TRANSMISSION", 0, "Transmission", ""},
543  {0, NULL, 0, NULL, NULL},
544 };
545 
547  {AOV_TYPE_COLOR, "COLOR", 0, "Color", ""},
548  {AOV_TYPE_VALUE, "VALUE", 0, "Value", ""},
549  {0, NULL, 0, NULL, NULL},
550 };
551 
554  "BOUNDING_BOX_CENTER",
555  ICON_PIVOT_BOUNDBOX,
556  "Bounding Box Center",
557  "Pivot around bounding box center of selected object(s)"},
558  {V3D_AROUND_CURSOR, "CURSOR", ICON_PIVOT_CURSOR, "3D Cursor", "Pivot around the 3D cursor"},
560  "INDIVIDUAL_ORIGINS",
561  ICON_PIVOT_INDIVIDUAL,
562  "Individual Origins",
563  "Pivot around each object's own origin"},
565  "MEDIAN_POINT",
566  ICON_PIVOT_MEDIAN,
567  "Median Point",
568  "Pivot around the median point of selected objects"},
570  "ACTIVE_ELEMENT",
571  ICON_PIVOT_ACTIVE,
572  "Active Element",
573  "Pivot around active object"},
574  {0, NULL, 0, NULL, NULL},
575 };
576 
577 /* Icons could be made a consistent set of images. */
580  "GLOBAL",
581  ICON_ORIENTATION_GLOBAL,
582  "Global",
583  "Align the transformation axes to world space"},
585  "LOCAL",
586  ICON_ORIENTATION_LOCAL,
587  "Local",
588  "Align the transformation axes to the selected objects' local space"},
590  "NORMAL",
591  ICON_ORIENTATION_NORMAL,
592  "Normal",
593  "Align the transformation axes to average normal of selected elements "
594  "(bone Y axis for pose mode)"},
596  "GIMBAL",
597  ICON_ORIENTATION_GIMBAL,
598  "Gimbal",
599  "Align each axis to the Euler rotation axis as used for input"},
601  "VIEW",
602  ICON_ORIENTATION_VIEW,
603  "View",
604  "Align the transformation axes to the window"},
606  "CURSOR",
607  ICON_ORIENTATION_CURSOR,
608  "Cursor",
609  "Align the transformation axes to the 3D cursor"},
610  // {V3D_ORIENT_CUSTOM, "CUSTOM", 0, "Custom", "Use a custom transform orientation"},
611  {0, NULL, 0, NULL, NULL},
612 };
613 
614 #ifdef RNA_RUNTIME
615 
616 # include "BLI_string_utils.h"
617 
618 # include "DNA_anim_types.h"
619 # include "DNA_color_types.h"
620 # include "DNA_mesh_types.h"
621 # include "DNA_node_types.h"
622 # include "DNA_object_types.h"
623 # include "DNA_text_types.h"
624 # include "DNA_workspace_types.h"
625 
626 # include "RNA_access.h"
627 
628 # include "MEM_guardedalloc.h"
629 
630 # include "BKE_animsys.h"
631 # include "BKE_brush.h"
632 # include "BKE_collection.h"
633 # include "BKE_colortools.h"
634 # include "BKE_context.h"
635 # include "BKE_freestyle.h"
636 # include "BKE_global.h"
637 # include "BKE_gpencil.h"
638 # include "BKE_idprop.h"
639 # include "BKE_image.h"
640 # include "BKE_layer.h"
641 # include "BKE_main.h"
642 # include "BKE_mesh.h"
643 # include "BKE_node.h"
644 # include "BKE_pointcache.h"
645 # include "BKE_scene.h"
646 # include "BKE_screen.h"
647 # include "BKE_unit.h"
648 
649 # include "ED_image.h"
650 # include "ED_info.h"
651 # include "ED_keyframing.h"
652 # include "ED_mesh.h"
653 # include "ED_node.h"
654 # include "ED_scene.h"
655 # include "ED_view3d.h"
656 
657 # include "DEG_depsgraph_build.h"
658 # include "DEG_depsgraph_query.h"
659 
660 # include "SEQ_relations.h"
661 # include "SEQ_sequencer.h"
662 # include "SEQ_sound.h"
663 
664 # ifdef WITH_FREESTYLE
665 # include "FRS_freestyle.h"
666 # endif
667 
668 static void rna_ToolSettings_snap_mode_set(struct PointerRNA *ptr, int value)
669 {
670  ToolSettings *ts = (ToolSettings *)ptr->data;
671  if (value != 0) {
672  ts->snap_mode = value;
673  }
674 }
675 
676 /* Grease Pencil update cache */
677 static void rna_GPencil_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
678 {
680 }
681 
682 static void rna_Gpencil_extend_selection(bContext *C, PointerRNA *UNUSED(ptr))
683 {
684  /* Extend selection to all points in all selected strokes. */
685  ViewLayer *view_layer = CTX_data_view_layer(C);
686  Object *ob = OBACT(view_layer);
687  if ((ob) && (ob->type == OB_GPENCIL)) {
688  bGPdata *gpd = (bGPdata *)ob->data;
689  CTX_DATA_BEGIN (C, bGPDstroke *, gps, editable_gpencil_strokes) {
690  if ((gps->flag & GP_STROKE_SELECT) && (gps->totpoints > 1)) {
691  bGPDspoint *pt;
692  for (int i = 0; i < gps->totpoints; i++) {
693  pt = &gps->points[i];
694  pt->flag |= GP_SPOINT_SELECT;
695  }
696  }
697  }
698  CTX_DATA_END;
699 
702  }
703 }
704 
705 static void rna_Gpencil_selectmode_update(bContext *C, PointerRNA *ptr)
706 {
707  ToolSettings *ts = (ToolSettings *)ptr->data;
708  /* If the mode is not Stroke, don't extend selection. */
710  return;
711  }
712 
713  rna_Gpencil_extend_selection(C, ptr);
714 }
715 
716 static void rna_Gpencil_mask_point_update(bContext *UNUSED(C), PointerRNA *ptr)
717 {
718  ToolSettings *ts = (ToolSettings *)ptr->data;
719 
722 }
723 
724 static void rna_Gpencil_mask_stroke_update(bContext *C, PointerRNA *ptr)
725 {
726  ToolSettings *ts = (ToolSettings *)ptr->data;
727 
730 
731  rna_Gpencil_extend_selection(C, ptr);
732 }
733 
734 static void rna_Gpencil_mask_segment_update(bContext *UNUSED(C), PointerRNA *ptr)
735 {
736  ToolSettings *ts = (ToolSettings *)ptr->data;
737 
740 }
741 
742 static void rna_Gpencil_vertex_mask_point_update(bContext *C, PointerRNA *ptr)
743 {
744  ToolSettings *ts = (ToolSettings *)ptr->data;
745 
748 
750 }
751 
752 static void rna_Gpencil_vertex_mask_stroke_update(bContext *C, PointerRNA *ptr)
753 {
754  ToolSettings *ts = (ToolSettings *)ptr->data;
755 
758 
759  rna_Gpencil_extend_selection(C, ptr);
760 
762 }
763 
764 static void rna_Gpencil_vertex_mask_segment_update(bContext *C, PointerRNA *ptr)
765 {
766  ToolSettings *ts = (ToolSettings *)ptr->data;
767 
770 
772 }
773 
774 /* Read-only Iterator of all the scene objects. */
775 
776 static void rna_Scene_objects_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
777 {
778  Scene *scene = (Scene *)ptr->data;
779  iter->internal.custom = MEM_callocN(sizeof(BLI_Iterator), __func__);
780 
782  iter->valid = ((BLI_Iterator *)iter->internal.custom)->valid;
783 }
784 
785 static void rna_Scene_objects_next(CollectionPropertyIterator *iter)
786 {
788  iter->valid = ((BLI_Iterator *)iter->internal.custom)->valid;
789 }
790 
791 static void rna_Scene_objects_end(CollectionPropertyIterator *iter)
792 {
794  MEM_freeN(iter->internal.custom);
795 }
796 
797 static PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
798 {
799  Object *ob = ((BLI_Iterator *)iter->internal.custom)->current;
800  return rna_pointer_inherit_refine(&iter->parent, &RNA_Object, ob);
801 }
802 
803 /* End of read-only Iterator of all the scene objects. */
804 
805 static void rna_Scene_set_set(PointerRNA *ptr,
806  PointerRNA value,
807  struct ReportList *UNUSED(reports))
808 {
809  Scene *scene = (Scene *)ptr->data;
810  Scene *set = (Scene *)value.data;
811  Scene *nested_set;
812 
813  for (nested_set = set; nested_set; nested_set = nested_set->set) {
814  if (nested_set == scene) {
815  return;
816  }
817  /* prevent eternal loops, set can point to next, and next to set, without problems usually */
818  if (nested_set->set == set) {
819  return;
820  }
821  }
822 
823  id_lib_extern((ID *)set);
824  scene->set = set;
825 }
826 
827 void rna_Scene_set_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
828 {
829  Scene *scene = (Scene *)ptr->owner_id;
830 
832  DEG_id_tag_update_ex(bmain, &scene->id, 0);
833  if (scene->set != NULL) {
834  /* Objects which are pulled into main scene's depsgraph needs to have
835  * their base flags updated.
836  */
837  DEG_id_tag_update_ex(bmain, &scene->set->id, 0);
838  }
839 }
840 
841 static void rna_Scene_camera_update(Main *bmain, Scene *UNUSED(scene_unused), PointerRNA *ptr)
842 {
843  wmWindowManager *wm = bmain->wm.first;
844  Scene *scene = (Scene *)ptr->data;
845 
849 }
850 
851 static void rna_Scene_fps_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr))
852 {
854  /* NOTE: Tag via dependency graph will take care of all the updates ion the evaluated domain,
855  * however, changes in FPS actually modifies an original skip length,
856  * so this we take care about here. */
858 }
859 
860 static void rna_Scene_listener_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
861 {
863 }
864 
865 static void rna_Scene_volume_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
866 {
867  Scene *scene = (Scene *)ptr->owner_id;
869 }
870 
871 static const char *rna_Scene_statistics_string_get(Scene *scene,
872  Main *bmain,
873  ReportList *reports,
874  ViewLayer *view_layer)
875 {
876  if (!BKE_scene_has_view_layer(scene, view_layer)) {
877  BKE_reportf(reports,
878  RPT_ERROR,
879  "View Layer '%s' not found in scene '%s'",
880  view_layer->name,
881  scene->id.name + 2);
882  return "";
883  }
884 
885  return ED_info_statistics_string(bmain, scene, view_layer);
886 }
887 
888 static void rna_Scene_framelen_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
889 {
890  scene->r.framelen = (float)scene->r.framapto / (float)scene->r.images;
891 }
892 
893 static void rna_Scene_frame_current_set(PointerRNA *ptr, int value)
894 {
895  Scene *data = (Scene *)ptr->data;
896 
897  /* if negative frames aren't allowed, then we can't use them */
898  FRAMENUMBER_MIN_CLAMP(value);
899  data->r.cfra = value;
900 }
901 
902 static float rna_Scene_frame_float_get(PointerRNA *ptr)
903 {
904  Scene *data = (Scene *)ptr->data;
905  return (float)data->r.cfra + data->r.subframe;
906 }
907 
908 static void rna_Scene_frame_float_set(PointerRNA *ptr, float value)
909 {
910  Scene *data = (Scene *)ptr->data;
911  /* if negative frames aren't allowed, then we can't use them */
912  FRAMENUMBER_MIN_CLAMP(value);
913  data->r.cfra = (int)value;
914  data->r.subframe = value - data->r.cfra;
915 }
916 
917 static float rna_Scene_frame_current_final_get(PointerRNA *ptr)
918 {
919  Scene *scene = (Scene *)ptr->data;
920 
921  return BKE_scene_frame_to_ctime(scene, (float)scene->r.cfra);
922 }
923 
924 static void rna_Scene_start_frame_set(PointerRNA *ptr, int value)
925 {
926  Scene *data = (Scene *)ptr->data;
927  /* MINFRAME not MINAFRAME, since some output formats can't taken negative frames */
928  CLAMP(value, MINFRAME, MAXFRAME);
929  data->r.sfra = value;
930 
931  if (value > data->r.efra) {
932  data->r.efra = MIN2(value, MAXFRAME);
933  }
934 }
935 
936 static void rna_Scene_end_frame_set(PointerRNA *ptr, int value)
937 {
938  Scene *data = (Scene *)ptr->data;
939  CLAMP(value, MINFRAME, MAXFRAME);
940  data->r.efra = value;
941 
942  if (data->r.sfra > value) {
943  data->r.sfra = MAX2(value, MINFRAME);
944  }
945 }
946 
947 static void rna_Scene_use_preview_range_set(PointerRNA *ptr, bool value)
948 {
949  Scene *data = (Scene *)ptr->data;
950 
951  if (value) {
952  /* copy range from scene if not set before */
953  if ((data->r.psfra == data->r.pefra) && (data->r.psfra == 0)) {
954  data->r.psfra = data->r.sfra;
955  data->r.pefra = data->r.efra;
956  }
957 
958  data->r.flag |= SCER_PRV_RANGE;
959  }
960  else {
961  data->r.flag &= ~SCER_PRV_RANGE;
962  }
963 }
964 
965 static void rna_Scene_preview_range_start_frame_set(PointerRNA *ptr, int value)
966 {
967  Scene *data = (Scene *)ptr->data;
968 
969  /* check if enabled already */
970  if ((data->r.flag & SCER_PRV_RANGE) == 0) {
971  /* set end of preview range to end frame, then clamp as per normal */
972  /* TODO: or just refuse to set instead? */
973  data->r.pefra = data->r.efra;
974  }
975  CLAMP(value, MINAFRAME, MAXFRAME);
976  data->r.psfra = value;
977 
978  if (value > data->r.pefra) {
979  data->r.pefra = MIN2(value, MAXFRAME);
980  }
981 }
982 
983 static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value)
984 {
985  Scene *data = (Scene *)ptr->data;
986 
987  /* check if enabled already */
988  if ((data->r.flag & SCER_PRV_RANGE) == 0) {
989  /* set start of preview range to start frame, then clamp as per normal */
990  /* TODO: or just refuse to set instead? */
991  data->r.psfra = data->r.sfra;
992  }
993  CLAMP(value, MINAFRAME, MAXFRAME);
994  data->r.pefra = value;
995 
996  if (data->r.psfra > value) {
997  data->r.psfra = MAX2(value, MINAFRAME);
998  }
999 }
1000 
1001 static void rna_Scene_show_subframe_update(Main *UNUSED(bmain),
1002  Scene *UNUSED(current_scene),
1003  PointerRNA *ptr)
1004 {
1005  Scene *scene = (Scene *)ptr->owner_id;
1006  scene->r.subframe = 0.0f;
1007 }
1008 
1009 static void rna_Scene_frame_update(Main *UNUSED(bmain),
1010  Scene *UNUSED(current_scene),
1011  PointerRNA *ptr)
1012 {
1013  Scene *scene = (Scene *)ptr->owner_id;
1016 }
1017 
1018 static PointerRNA rna_Scene_active_keying_set_get(PointerRNA *ptr)
1019 {
1020  Scene *scene = (Scene *)ptr->data;
1022 }
1023 
1024 static void rna_Scene_active_keying_set_set(PointerRNA *ptr,
1025  PointerRNA value,
1026  struct ReportList *UNUSED(reports))
1027 {
1028  Scene *scene = (Scene *)ptr->data;
1029  KeyingSet *ks = (KeyingSet *)value.data;
1030 
1032 }
1033 
1034 /* get KeyingSet index stuff for list of Keying Sets editing UI
1035  * - active_keyingset-1 since 0 is reserved for 'none'
1036  * - don't clamp, otherwise can never set builtin's types as active...
1037  */
1038 static int rna_Scene_active_keying_set_index_get(PointerRNA *ptr)
1039 {
1040  Scene *scene = (Scene *)ptr->data;
1041  return scene->active_keyingset - 1;
1042 }
1043 
1044 /* get KeyingSet index stuff for list of Keying Sets editing UI
1045  * - value+1 since 0 is reserved for 'none'
1046  */
1047 static void rna_Scene_active_keying_set_index_set(PointerRNA *ptr, int value)
1048 {
1049  Scene *scene = (Scene *)ptr->data;
1050  scene->active_keyingset = value + 1;
1051 }
1052 
1053 /* XXX: evil... builtin_keyingsets is defined in keyingsets.c! */
1054 /* TODO: make API function to retrieve this... */
1056 
1057 static void rna_Scene_all_keyingsets_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
1058 {
1059  Scene *scene = (Scene *)ptr->data;
1060 
1061  /* start going over the scene KeyingSets first, while we still have pointer to it
1062  * but only if we have any Keying Sets to use...
1063  */
1064  if (scene->keyingsets.first) {
1066  }
1067  else {
1069  }
1070 }
1071 
1072 static void rna_Scene_all_keyingsets_next(CollectionPropertyIterator *iter)
1073 {
1074  ListBaseIterator *internal = &iter->internal.listbase;
1075  KeyingSet *ks = (KeyingSet *)internal->link;
1076 
1077  /* If we've run out of links in Scene list,
1078  * jump over to the builtins list unless we're there already. */
1079  if ((ks->next == NULL) && (ks != builtin_keyingsets.last)) {
1080  internal->link = (Link *)builtin_keyingsets.first;
1081  }
1082  else {
1083  internal->link = (Link *)ks->next;
1084  }
1085 
1086  iter->valid = (internal->link != NULL);
1087 }
1088 
1089 static char *rna_SceneEEVEE_path(PointerRNA *UNUSED(ptr))
1090 {
1091  return BLI_strdup("eevee");
1092 }
1093 
1094 static char *rna_SceneGpencil_path(PointerRNA *UNUSED(ptr))
1095 {
1096  return BLI_strdup("grease_pencil_settings");
1097 }
1098 
1099 static int rna_RenderSettings_stereoViews_skip(CollectionPropertyIterator *iter,
1100  void *UNUSED(data))
1101 {
1102  ListBaseIterator *internal = &iter->internal.listbase;
1103  SceneRenderView *srv = (SceneRenderView *)internal->link;
1104 
1106  return 0;
1107  }
1108 
1109  return 1;
1110 };
1111 
1112 static void rna_RenderSettings_stereoViews_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
1113 {
1114  RenderData *rd = (RenderData *)ptr->data;
1115  rna_iterator_listbase_begin(iter, &rd->views, rna_RenderSettings_stereoViews_skip);
1116 }
1117 
1118 static char *rna_RenderSettings_path(PointerRNA *UNUSED(ptr))
1119 {
1120  return BLI_strdup("render");
1121 }
1122 
1123 static char *rna_BakeSettings_path(PointerRNA *UNUSED(ptr))
1124 {
1125  return BLI_strdup("render.bake");
1126 }
1127 
1128 static char *rna_ImageFormatSettings_path(PointerRNA *ptr)
1129 {
1131  ID *id = ptr->owner_id;
1132 
1133  switch (GS(id->name)) {
1134  case ID_SCE: {
1135  Scene *scene = (Scene *)id;
1136 
1137  if (&scene->r.im_format == imf) {
1138  return BLI_strdup("render.image_settings");
1139  }
1140  else if (&scene->r.bake.im_format == imf) {
1141  return BLI_strdup("render.bake.image_settings");
1142  }
1143  return BLI_strdup("..");
1144  }
1145  case ID_NT: {
1146  bNodeTree *ntree = (bNodeTree *)id;
1147  bNode *node;
1148 
1149  for (node = ntree->nodes.first; node; node = node->next) {
1150  if (node->type == CMP_NODE_OUTPUT_FILE) {
1151  if (&((NodeImageMultiFile *)node->storage)->format == imf) {
1152  return BLI_sprintfN("nodes['%s'].format", node->name);
1153  }
1154  else {
1155  bNodeSocket *sock;
1156 
1157  for (sock = node->inputs.first; sock; sock = sock->next) {
1158  NodeImageMultiFileSocket *sockdata = sock->storage;
1159  if (&sockdata->format == imf) {
1160  return BLI_sprintfN(
1161  "nodes['%s'].file_slots['%s'].format", node->name, sockdata->path);
1162  }
1163  }
1164  }
1165  }
1166  }
1167  return BLI_strdup("..");
1168  }
1169  default:
1170  return BLI_strdup("..");
1171  }
1172 }
1173 
1174 static int rna_RenderSettings_threads_get(PointerRNA *ptr)
1175 {
1176  RenderData *rd = (RenderData *)ptr->data;
1177  return BKE_render_num_threads(rd);
1178 }
1179 
1180 static int rna_RenderSettings_threads_mode_get(PointerRNA *ptr)
1181 {
1182  RenderData *rd = (RenderData *)ptr->data;
1183  int override = BLI_system_num_threads_override_get();
1184 
1185  if (override > 0) {
1186  return R_FIXED_THREADS;
1187  }
1188  else {
1189  return (rd->mode & R_FIXED_THREADS);
1190  }
1191 }
1192 
1193 static bool rna_RenderSettings_is_movie_format_get(PointerRNA *ptr)
1194 {
1195  RenderData *rd = (RenderData *)ptr->data;
1196  return BKE_imtype_is_movie(rd->im_format.imtype);
1197 }
1198 
1199 static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
1200 {
1202  ID *id = ptr->owner_id;
1203  imf->imtype = value;
1204 
1205  const bool is_render = (id && GS(id->name) == ID_SCE);
1206  /* see note below on why this is */
1207  const char chan_flag = BKE_imtype_valid_channels(imf->imtype, true) |
1208  (is_render ? IMA_CHAN_FLAG_BW : 0);
1209 
1210  /* ensure depth and color settings match */
1211  if (((imf->planes == R_IMF_PLANES_BW) && !(chan_flag & IMA_CHAN_FLAG_BW)) ||
1212  ((imf->planes == R_IMF_PLANES_RGBA) && !(chan_flag & IMA_CHAN_FLAG_ALPHA))) {
1213  imf->planes = R_IMF_PLANES_RGB;
1214  }
1215 
1216  /* ensure usable depth */
1217  {
1218  const int depth_ok = BKE_imtype_valid_depths(imf->imtype);
1219  if ((imf->depth & depth_ok) == 0) {
1220  /* set first available depth */
1221  char depth_ls[] = {
1229  0,
1230  };
1231  int i;
1232 
1233  for (i = 0; depth_ls[i]; i++) {
1234  if (depth_ok & depth_ls[i]) {
1235  imf->depth = depth_ls[i];
1236  break;
1237  }
1238  }
1239  }
1240  }
1241 
1242  if (id && GS(id->name) == ID_SCE) {
1243  Scene *scene = (Scene *)ptr->owner_id;
1244  RenderData *rd = &scene->r;
1245 # ifdef WITH_FFMPEG
1246  BKE_ffmpeg_image_type_verify(rd, imf);
1247 # endif
1248  (void)rd;
1249  }
1250 }
1251 
1252 static const EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf(bContext *UNUSED(C),
1253  PointerRNA *ptr,
1254  PropertyRNA *UNUSED(prop),
1255  bool *UNUSED(r_free))
1256 {
1257  ID *id = ptr->owner_id;
1258  if (id && GS(id->name) == ID_SCE) {
1260  }
1261  else {
1262  return image_only_type_items;
1263  }
1264 }
1265 
1266 static const EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext *UNUSED(C),
1267  PointerRNA *ptr,
1268  PropertyRNA *UNUSED(prop),
1269  bool *r_free)
1270 {
1272  ID *id = ptr->owner_id;
1273  const bool is_render = (id && GS(id->name) == ID_SCE);
1274 
1275  /* note, we need to act differently for render
1276  * where 'BW' will force grayscale even if the output format writes
1277  * as RGBA, this is age old blender convention and not sure how useful
1278  * it really is but keep it for now - campbell */
1279  char chan_flag = BKE_imtype_valid_channels(imf->imtype, true) |
1280  (is_render ? IMA_CHAN_FLAG_BW : 0);
1281 
1282 # ifdef WITH_FFMPEG
1283  /* a WAY more crappy case than B&W flag: depending on codec, file format MIGHT support
1284  * alpha channel. for example MPEG format with h264 codec can't do alpha channel, but
1285  * the same MPEG format with QTRLE codec can easily handle alpha channel.
1286  * not sure how to deal with such cases in a nicer way (sergey) */
1287  if (is_render) {
1288  Scene *scene = (Scene *)ptr->owner_id;
1289  RenderData *rd = &scene->r;
1290 
1291  if (BKE_ffmpeg_alpha_channel_is_supported(rd)) {
1292  chan_flag |= IMA_CHAN_FLAG_ALPHA;
1293  }
1294  }
1295 # endif
1296 
1297  if (chan_flag == (IMA_CHAN_FLAG_BW | IMA_CHAN_FLAG_RGB | IMA_CHAN_FLAG_ALPHA)) {
1299  }
1300  else {
1301  int totitem = 0;
1302  EnumPropertyItem *item = NULL;
1303 
1304  if (chan_flag & IMA_CHAN_FLAG_BW) {
1305  RNA_enum_item_add(&item, &totitem, &IMAGE_COLOR_MODE_BW);
1306  }
1307  if (chan_flag & IMA_CHAN_FLAG_RGB) {
1308  RNA_enum_item_add(&item, &totitem, &IMAGE_COLOR_MODE_RGB);
1309  }
1310  if (chan_flag & IMA_CHAN_FLAG_ALPHA) {
1311  RNA_enum_item_add(&item, &totitem, &IMAGE_COLOR_MODE_RGBA);
1312  }
1313 
1314  RNA_enum_item_end(&item, &totitem);
1315  *r_free = true;
1316 
1317  return item;
1318  }
1319 }
1320 
1321 static const EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *UNUSED(C),
1322  PointerRNA *ptr,
1323  PropertyRNA *UNUSED(prop),
1324  bool *r_free)
1325 {
1327 
1328  if (imf == NULL) {
1330  }
1331  else {
1332  const int depth_ok = BKE_imtype_valid_depths(imf->imtype);
1333  const int is_float = ELEM(
1335 
1336  const EnumPropertyItem *item_8bit = &rna_enum_image_color_depth_items[0];
1337  const EnumPropertyItem *item_10bit = &rna_enum_image_color_depth_items[1];
1338  const EnumPropertyItem *item_12bit = &rna_enum_image_color_depth_items[2];
1339  const EnumPropertyItem *item_16bit = &rna_enum_image_color_depth_items[3];
1340  const EnumPropertyItem *item_32bit = &rna_enum_image_color_depth_items[4];
1341 
1342  int totitem = 0;
1343  EnumPropertyItem *item = NULL;
1344  EnumPropertyItem tmp = {0, "", 0, "", ""};
1345 
1346  if (depth_ok & R_IMF_CHAN_DEPTH_8) {
1347  RNA_enum_item_add(&item, &totitem, item_8bit);
1348  }
1349 
1350  if (depth_ok & R_IMF_CHAN_DEPTH_10) {
1351  RNA_enum_item_add(&item, &totitem, item_10bit);
1352  }
1353 
1354  if (depth_ok & R_IMF_CHAN_DEPTH_12) {
1355  RNA_enum_item_add(&item, &totitem, item_12bit);
1356  }
1357 
1358  if (depth_ok & R_IMF_CHAN_DEPTH_16) {
1359  if (is_float) {
1360  tmp = *item_16bit;
1361  tmp.name = "Float (Half)";
1362  RNA_enum_item_add(&item, &totitem, &tmp);
1363  }
1364  else {
1365  RNA_enum_item_add(&item, &totitem, item_16bit);
1366  }
1367  }
1368 
1369  if (depth_ok & R_IMF_CHAN_DEPTH_32) {
1370  if (is_float) {
1371  tmp = *item_32bit;
1372  tmp.name = "Float (Full)";
1373  RNA_enum_item_add(&item, &totitem, &tmp);
1374  }
1375  else {
1376  RNA_enum_item_add(&item, &totitem, item_32bit);
1377  }
1378  }
1379 
1380  RNA_enum_item_end(&item, &totitem);
1381  *r_free = true;
1382 
1383  return item;
1384  }
1385 }
1386 
1387 static const EnumPropertyItem *rna_ImageFormatSettings_views_format_itemf(
1388  bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
1389 {
1391 
1392  if (imf == NULL) {
1394  }
1395  else if (imf->imtype == R_IMF_IMTYPE_OPENEXR) {
1397  }
1398  else if (imf->imtype == R_IMF_IMTYPE_MULTILAYER) {
1400  }
1401  else {
1403  }
1404 }
1405 
1406 # ifdef WITH_OPENEXR
1407 /* OpenEXR */
1408 
1409 static const EnumPropertyItem *rna_ImageFormatSettings_exr_codec_itemf(bContext *UNUSED(C),
1410  PointerRNA *ptr,
1411  PropertyRNA *UNUSED(prop),
1412  bool *r_free)
1413 {
1415 
1416  EnumPropertyItem *item = NULL;
1417  int i = 1, totitem = 0;
1418 
1419  if (imf->depth == 16) {
1420  return rna_enum_exr_codec_items; /* All compression types are defined for half-float. */
1421  }
1422 
1423  for (i = 0; i < R_IMF_EXR_CODEC_MAX; i++) {
1424  if ((i == R_IMF_EXR_CODEC_B44 || i == R_IMF_EXR_CODEC_B44A)) {
1425  continue; /* B44 and B44A are not defined for 32 bit floats */
1426  }
1427 
1428  RNA_enum_item_add(&item, &totitem, &rna_enum_exr_codec_items[i]);
1429  }
1430 
1431  RNA_enum_item_end(&item, &totitem);
1432  *r_free = true;
1433 
1434  return item;
1435 }
1436 
1437 # endif
1438 static int rna_SceneRender_file_ext_length(PointerRNA *ptr)
1439 {
1440  RenderData *rd = (RenderData *)ptr->data;
1441  char ext[8];
1442  ext[0] = '\0';
1444  return strlen(ext);
1445 }
1446 
1447 static void rna_SceneRender_file_ext_get(PointerRNA *ptr, char *str)
1448 {
1449  RenderData *rd = (RenderData *)ptr->data;
1450  str[0] = '\0';
1452 }
1453 
1454 # ifdef WITH_FFMPEG
1455 static void rna_FFmpegSettings_lossless_output_set(PointerRNA *ptr, bool value)
1456 {
1457  Scene *scene = (Scene *)ptr->owner_id;
1458  RenderData *rd = &scene->r;
1459 
1460  if (value) {
1462  }
1463  else {
1465  }
1466 
1467  BKE_ffmpeg_codec_settings_verify(rd);
1468 }
1469 
1470 static void rna_FFmpegSettings_codec_settings_update(Main *UNUSED(bmain),
1471  Scene *UNUSED(scene_unused),
1472  PointerRNA *ptr)
1473 {
1474  Scene *scene = (Scene *)ptr->owner_id;
1475  RenderData *rd = &scene->r;
1476 
1477  BKE_ffmpeg_codec_settings_verify(rd);
1478 }
1479 # endif
1480 
1481 static int rna_RenderSettings_active_view_index_get(PointerRNA *ptr)
1482 {
1483  RenderData *rd = (RenderData *)ptr->data;
1484  return rd->actview;
1485 }
1486 
1487 static void rna_RenderSettings_active_view_index_set(PointerRNA *ptr, int value)
1488 {
1489  RenderData *rd = (RenderData *)ptr->data;
1490  rd->actview = value;
1491 }
1492 
1493 static void rna_RenderSettings_active_view_index_range(
1494  PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax))
1495 {
1496  RenderData *rd = (RenderData *)ptr->data;
1497 
1498  *min = 0;
1499  *max = max_ii(0, BLI_listbase_count(&rd->views) - 1);
1500 }
1501 
1502 static PointerRNA rna_RenderSettings_active_view_get(PointerRNA *ptr)
1503 {
1504  RenderData *rd = (RenderData *)ptr->data;
1505  SceneRenderView *srv = BLI_findlink(&rd->views, rd->actview);
1506 
1507  return rna_pointer_inherit_refine(ptr, &RNA_SceneRenderView, srv);
1508 }
1509 
1510 static void rna_RenderSettings_active_view_set(PointerRNA *ptr,
1511  PointerRNA value,
1512  struct ReportList *UNUSED(reports))
1513 {
1514  RenderData *rd = (RenderData *)ptr->data;
1515  SceneRenderView *srv = (SceneRenderView *)value.data;
1516  const int index = BLI_findindex(&rd->views, srv);
1517  if (index != -1) {
1518  rd->actview = index;
1519  }
1520 }
1521 
1522 static SceneRenderView *rna_RenderView_new(ID *id, RenderData *UNUSED(rd), const char *name)
1523 {
1524  Scene *scene = (Scene *)id;
1526 
1528 
1529  return srv;
1530 }
1531 
1532 static void rna_RenderView_remove(
1533  ID *id, RenderData *UNUSED(rd), Main *UNUSED(bmain), ReportList *reports, PointerRNA *srv_ptr)
1534 {
1535  SceneRenderView *srv = srv_ptr->data;
1536  Scene *scene = (Scene *)id;
1537 
1538  if (!BKE_scene_remove_render_view(scene, srv)) {
1539  BKE_reportf(reports,
1540  RPT_ERROR,
1541  "Render view '%s' could not be removed from scene '%s'",
1542  srv->name,
1543  scene->id.name + 2);
1544  return;
1545  }
1546 
1547  RNA_POINTER_INVALIDATE(srv_ptr);
1548 
1550 }
1551 
1552 static void rna_RenderSettings_views_format_set(PointerRNA *ptr, int value)
1553 {
1554  RenderData *rd = (RenderData *)ptr->data;
1555 
1557  /* make sure the actview is visible */
1558  if (rd->actview > 1) {
1559  rd->actview = 1;
1560  }
1561  }
1562 
1563  rd->views_format = value;
1564 }
1565 
1566 static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value)
1567 {
1568  RenderData *rd = (RenderData *)ptr->data;
1570 
1571  if (type) {
1572  BLI_strncpy_utf8(rd->engine, type->idname, sizeof(rd->engine));
1574  }
1575 }
1576 
1577 static const EnumPropertyItem *rna_RenderSettings_engine_itemf(bContext *UNUSED(C),
1578  PointerRNA *UNUSED(ptr),
1579  PropertyRNA *UNUSED(prop),
1580  bool *r_free)
1581 {
1583  EnumPropertyItem *item = NULL;
1584  EnumPropertyItem tmp = {0, "", 0, "", ""};
1585  int a = 0, totitem = 0;
1586 
1587  for (type = R_engines.first; type; type = type->next, a++) {
1588  tmp.value = a;
1589  tmp.identifier = type->idname;
1590  tmp.name = type->name;
1591  RNA_enum_item_add(&item, &totitem, &tmp);
1592  }
1593 
1594  RNA_enum_item_end(&item, &totitem);
1595  *r_free = true;
1596 
1597  return item;
1598 }
1599 
1600 static int rna_RenderSettings_engine_get(PointerRNA *ptr)
1601 {
1602  RenderData *rd = (RenderData *)ptr->data;
1604  int a = 0;
1605 
1606  for (type = R_engines.first; type; type = type->next, a++) {
1607  if (STREQ(type->idname, rd->engine)) {
1608  return a;
1609  }
1610  }
1611 
1612  return 0;
1613 }
1614 
1615 static void rna_RenderSettings_engine_update(Main *bmain,
1616  Scene *UNUSED(unused),
1617  PointerRNA *UNUSED(ptr))
1618 {
1619  ED_render_engine_changed(bmain, true);
1620 }
1621 
1622 static bool rna_RenderSettings_multiple_engines_get(PointerRNA *UNUSED(ptr))
1623 {
1624  return (BLI_listbase_count(&R_engines) > 1);
1625 }
1626 
1627 static bool rna_RenderSettings_use_spherical_stereo_get(PointerRNA *ptr)
1628 {
1629  Scene *scene = (Scene *)ptr->owner_id;
1631 }
1632 
1634 {
1635  Scene *scene = (Scene *)ptr->owner_id;
1636 
1637  DEG_id_tag_update(&scene->id, 0);
1638 }
1639 
1640 static void rna_Scene_world_update(Main *bmain, Scene *scene, PointerRNA *ptr)
1641 {
1642  Scene *screen = (Scene *)ptr->owner_id;
1643 
1644  rna_Scene_glsl_update(bmain, scene, ptr);
1646  DEG_relations_tag_update(bmain);
1647 }
1648 
1649 static void rna_Scene_mesh_quality_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
1650 {
1651  Scene *scene = (Scene *)ptr->owner_id;
1652 
1654  if (ELEM(ob->type, OB_MESH, OB_CURVE, OB_VOLUME, OB_MBALL)) {
1656  }
1657  }
1659 
1660  rna_Scene_glsl_update(bmain, scene, ptr);
1661 }
1662 
1664 {
1665  Scene *scene = (Scene *)ptr->owner_id;
1666 
1667  DEG_id_tag_update(&scene->id, 0);
1668 }
1669 
1670 void rna_Scene_use_freestyle_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
1671 {
1672  Scene *scene = (Scene *)ptr->owner_id;
1673 
1674  DEG_id_tag_update(&scene->id, 0);
1675 
1676  if (scene->nodetree) {
1678  }
1679 }
1680 
1682  Scene *UNUSED(scene),
1683  PointerRNA *UNUSED(ptr))
1684 {
1685 # ifdef WITH_FREESTYLE
1687 # endif
1688 }
1689 
1690 void rna_ViewLayer_name_set(PointerRNA *ptr, const char *value)
1691 {
1692  Scene *scene = (Scene *)ptr->owner_id;
1693  ViewLayer *view_layer = (ViewLayer *)ptr->data;
1695  BKE_view_layer_rename(G_MAIN, scene, view_layer, value);
1696 }
1697 
1698 static void rna_SceneRenderView_name_set(PointerRNA *ptr, const char *value)
1699 {
1700  Scene *scene = (Scene *)ptr->owner_id;
1702  BLI_strncpy_utf8(rv->name, value, sizeof(rv->name));
1704  rv,
1705  DATA_("RenderView"),
1706  '.',
1707  offsetof(SceneRenderView, name),
1708  sizeof(rv->name));
1709 }
1710 
1712 {
1713  Scene *scene = (Scene *)ptr->owner_id;
1714  rna_Scene_glsl_update(bmain, scene, ptr);
1715  DEG_relations_tag_update(bmain);
1716 }
1717 
1718 void rna_ViewLayer_pass_update(Main *bmain, Scene *activescene, PointerRNA *ptr)
1719 {
1720  Scene *scene = (Scene *)ptr->owner_id;
1721 
1722  if (scene->nodetree) {
1724  }
1725 
1726  ViewLayer *view_layer = NULL;
1727  if (ptr->type == &RNA_ViewLayer) {
1728  view_layer = (ViewLayer *)ptr->data;
1729  }
1730  else if (ptr->type == &RNA_AOV) {
1731  ViewLayerAOV *aov = (ViewLayerAOV *)ptr->data;
1732  view_layer = BKE_view_layer_find_with_aov(scene, aov);
1733  }
1734 
1735  if (view_layer) {
1736  RenderEngineType *engine_type = RE_engines_find(scene->r.engine);
1737  if (engine_type->update_render_passes) {
1738  RenderEngine *engine = RE_engine_create(engine_type);
1739  if (engine) {
1740  BKE_view_layer_verify_aov(engine, scene, view_layer);
1741  }
1742  RE_engine_free(engine);
1743  engine = NULL;
1744  }
1745  }
1746 
1747  rna_Scene_glsl_update(bmain, activescene, ptr);
1748 }
1749 
1750 static char *rna_SceneRenderView_path(PointerRNA *ptr)
1751 {
1753  char srv_name_esc[sizeof(srv->name) * 2];
1754  BLI_str_escape(srv_name_esc, srv->name, sizeof(srv_name_esc));
1755  return BLI_sprintfN("render.views[\"%s\"]", srv_name_esc);
1756 }
1757 
1758 static void rna_Scene_use_nodes_update(bContext *C, PointerRNA *ptr)
1759 {
1760  Scene *scene = (Scene *)ptr->data;
1761  if (scene->use_nodes && scene->nodetree == NULL) {
1763  }
1765 }
1766 
1767 static void rna_Physics_relations_update(Main *bmain,
1768  Scene *UNUSED(scene),
1769  PointerRNA *UNUSED(ptr))
1770 {
1771  DEG_relations_tag_update(bmain);
1772 }
1773 
1774 static void rna_Physics_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
1775 {
1776  Scene *scene = (Scene *)ptr->owner_id;
1779  }
1781 
1783 }
1784 
1785 static void rna_Scene_editmesh_select_mode_set(PointerRNA *ptr, const bool *value)
1786 {
1787  ToolSettings *ts = (ToolSettings *)ptr->data;
1788  int flag = (value[0] ? SCE_SELECT_VERTEX : 0) | (value[1] ? SCE_SELECT_EDGE : 0) |
1789  (value[2] ? SCE_SELECT_FACE : 0);
1790 
1791  if (flag) {
1792  ts->selectmode = flag;
1793 
1794  /* Update select mode in all the workspaces in mesh edit mode. */
1795  wmWindowManager *wm = G_MAIN->wm.first;
1796  LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
1797  ViewLayer *view_layer = WM_window_get_active_view_layer(win);
1798 
1799  if (view_layer && view_layer->basact) {
1800  Mesh *me = BKE_mesh_from_object(view_layer->basact->object);
1801  if (me && me->edit_mesh && me->edit_mesh->selectmode != flag) {
1802  me->edit_mesh->selectmode = flag;
1804  }
1805  }
1806  }
1807  }
1808 }
1809 
1810 static void rna_Scene_editmesh_select_mode_update(bContext *C, PointerRNA *UNUSED(ptr))
1811 {
1812  ViewLayer *view_layer = CTX_data_view_layer(C);
1813  Mesh *me = NULL;
1814 
1815  if (view_layer->basact) {
1816  me = BKE_mesh_from_object(view_layer->basact->object);
1817  if (me && me->edit_mesh == NULL) {
1818  me = NULL;
1819  }
1820  }
1821 
1822  if (me) {
1825  }
1826 }
1827 
1828 static void object_simplify_update(Object *ob)
1829 {
1830  ModifierData *md;
1831  ParticleSystem *psys;
1832 
1833  if ((ob->id.tag & LIB_TAG_DOIT) == 0) {
1834  return;
1835  }
1836 
1837  ob->id.tag &= ~LIB_TAG_DOIT;
1838 
1839  for (md = ob->modifiers.first; md; md = md->next) {
1840  if (ELEM(md->type,
1845  }
1846  }
1847 
1848  for (psys = ob->particlesystem.first; psys; psys = psys->next) {
1849  psys->recalc |= ID_RECALC_PSYS_CHILD;
1850  }
1851 
1852  if (ob->instance_collection) {
1854  object_simplify_update(ob_collection);
1855  }
1857  }
1858 
1859  if (ob->type == OB_VOLUME) {
1861  }
1862 }
1863 
1864 static void rna_Scene_use_simplify_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
1865 {
1866  Scene *sce = (Scene *)ptr->owner_id;
1867  Scene *sce_iter;
1868  Base *base;
1869 
1871  FOREACH_SCENE_OBJECT_BEGIN (sce, ob) {
1872  object_simplify_update(ob);
1873  }
1875 
1876  for (SETLOOPER_SET_ONLY(sce, sce_iter, base)) {
1877  object_simplify_update(base->object);
1878  }
1879 
1882  DEG_id_tag_update(&sce->id, 0);
1883 }
1884 
1885 static void rna_Scene_simplify_update(Main *bmain, Scene *scene, PointerRNA *ptr)
1886 {
1887  Scene *sce = (Scene *)ptr->owner_id;
1888 
1889  if (sce->r.mode & R_SIMPLIFY) {
1890  rna_Scene_use_simplify_update(bmain, scene, ptr);
1891  }
1892 }
1893 
1894 static void rna_Scene_use_persistent_data_update(Main *UNUSED(bmain),
1895  Scene *UNUSED(scene),
1896  PointerRNA *ptr)
1897 {
1898  Scene *scene = (Scene *)ptr->owner_id;
1899 
1900  if (!(scene->r.mode & R_PERSISTENT_DATA)) {
1902  }
1903 }
1904 
1905 /* Scene.transform_orientation_slots */
1906 static void rna_Scene_transform_orientation_slots_begin(CollectionPropertyIterator *iter,
1907  PointerRNA *ptr)
1908 {
1909  Scene *scene = (Scene *)ptr->owner_id;
1910  TransformOrientationSlot *orient_slot = &scene->orientation_slots[0];
1912  iter, orient_slot, sizeof(*orient_slot), ARRAY_SIZE(scene->orientation_slots), 0, NULL);
1913 }
1914 
1915 static int rna_Scene_transform_orientation_slots_length(PointerRNA *ptr)
1916 {
1917  Scene *scene = (Scene *)ptr->owner_id;
1919 }
1920 
1921 static bool rna_Scene_use_audio_get(PointerRNA *ptr)
1922 {
1923  Scene *scene = (Scene *)ptr->data;
1924  return (scene->audio.flag & AUDIO_MUTE) != 0;
1925 }
1926 
1927 static void rna_Scene_use_audio_set(PointerRNA *ptr, bool value)
1928 {
1929  Scene *scene = (Scene *)ptr->data;
1930 
1931  if (value) {
1932  scene->audio.flag |= AUDIO_MUTE;
1933  }
1934  else {
1935  scene->audio.flag &= ~AUDIO_MUTE;
1936  }
1937 }
1938 
1939 static void rna_Scene_use_audio_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
1940 {
1942 }
1943 
1944 static int rna_Scene_sync_mode_get(PointerRNA *ptr)
1945 {
1946  Scene *scene = (Scene *)ptr->data;
1947  if (scene->audio.flag & AUDIO_SYNC) {
1948  return AUDIO_SYNC;
1949  }
1950  return scene->flag & SCE_FRAME_DROP;
1951 }
1952 
1953 static void rna_Scene_sync_mode_set(PointerRNA *ptr, int value)
1954 {
1955  Scene *scene = (Scene *)ptr->data;
1956 
1957  if (value == AUDIO_SYNC) {
1958  scene->audio.flag |= AUDIO_SYNC;
1959  }
1960  else if (value == SCE_FRAME_DROP) {
1961  scene->audio.flag &= ~AUDIO_SYNC;
1963  }
1964  else {
1965  scene->audio.flag &= ~AUDIO_SYNC;
1966  scene->flag &= ~SCE_FRAME_DROP;
1967  }
1968 }
1969 
1970 static void rna_View3DCursor_rotation_mode_set(PointerRNA *ptr, int value)
1971 {
1972  View3DCursor *cursor = ptr->data;
1973 
1974  /* use API Method for conversions... */
1976  cursor->rotation_euler,
1977  cursor->rotation_axis,
1978  &cursor->rotation_angle,
1979  cursor->rotation_mode,
1980  (short)value);
1981 
1982  /* finally, set the new rotation type */
1983  cursor->rotation_mode = value;
1984 }
1985 
1986 static void rna_View3DCursor_rotation_axis_angle_get(PointerRNA *ptr, float *value)
1987 {
1988  View3DCursor *cursor = ptr->data;
1989  value[0] = cursor->rotation_angle;
1990  copy_v3_v3(&value[1], cursor->rotation_axis);
1991 }
1992 
1993 static void rna_View3DCursor_rotation_axis_angle_set(PointerRNA *ptr, const float *value)
1994 {
1995  View3DCursor *cursor = ptr->data;
1996  cursor->rotation_angle = value[0];
1997  copy_v3_v3(cursor->rotation_axis, &value[1]);
1998 }
1999 
2000 static void rna_View3DCursor_matrix_get(PointerRNA *ptr, float *values)
2001 {
2002  const View3DCursor *cursor = ptr->data;
2003  BKE_scene_cursor_to_mat4(cursor, (float(*)[4])values);
2004 }
2005 
2006 static void rna_View3DCursor_matrix_set(PointerRNA *ptr, const float *values)
2007 {
2008  View3DCursor *cursor = ptr->data;
2009  float unit_mat[4][4];
2010  normalize_m4_m4(unit_mat, (const float(*)[4])values);
2011  BKE_scene_cursor_from_mat4(cursor, unit_mat, false);
2012 }
2013 
2014 static char *rna_TransformOrientationSlot_path(PointerRNA *ptr)
2015 {
2016  Scene *scene = (Scene *)ptr->owner_id;
2017  TransformOrientationSlot *orientation_slot = ptr->data;
2018 
2019  if (!ELEM(NULL, scene, orientation_slot)) {
2020  for (int i = 0; i < ARRAY_SIZE(scene->orientation_slots); i++) {
2021  if (&scene->orientation_slots[i] == orientation_slot) {
2022  return BLI_sprintfN("transform_orientation_slots[%d]", i);
2023  }
2024  }
2025  }
2026 
2027  /* Should not happen, but in case, just return default path. */
2028  BLI_assert(0);
2029  return BLI_strdup("transform_orientation_slots[0]");
2030 }
2031 
2032 static char *rna_View3DCursor_path(PointerRNA *UNUSED(ptr))
2033 {
2034  return BLI_strdup("cursor");
2035 }
2036 
2037 static TimeMarker *rna_TimeLine_add(Scene *scene, const char name[], int frame)
2038 {
2039  TimeMarker *marker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
2040  marker->flag = SELECT;
2041  marker->frame = frame;
2042  BLI_strncpy_utf8(marker->name, name, sizeof(marker->name));
2043  BLI_addtail(&scene->markers, marker);
2044 
2047 
2048  return marker;
2049 }
2050 
2051 static void rna_TimeLine_remove(Scene *scene, ReportList *reports, PointerRNA *marker_ptr)
2052 {
2053  TimeMarker *marker = marker_ptr->data;
2054  if (BLI_remlink_safe(&scene->markers, marker) == false) {
2055  BKE_reportf(reports,
2056  RPT_ERROR,
2057  "Timeline marker '%s' not found in scene '%s'",
2058  marker->name,
2059  scene->id.name + 2);
2060  return;
2061  }
2062 
2063  MEM_freeN(marker);
2064  RNA_POINTER_INVALIDATE(marker_ptr);
2065 
2068 }
2069 
2070 static void rna_TimeLine_clear(Scene *scene)
2071 {
2073 
2076 }
2077 
2078 static KeyingSet *rna_Scene_keying_set_new(Scene *sce,
2079  ReportList *reports,
2080  const char idname[],
2081  const char name[])
2082 {
2083  KeyingSet *ks = NULL;
2084 
2085  /* call the API func, and set the active keyingset index */
2086  ks = BKE_keyingset_add(&sce->keyingsets, idname, name, KEYINGSET_ABSOLUTE, 0);
2087 
2088  if (ks) {
2090  return ks;
2091  }
2092  else {
2093  BKE_report(reports, RPT_ERROR, "Keying set could not be added");
2094  return NULL;
2095  }
2096 }
2097 
2098 static void rna_UnifiedPaintSettings_update(bContext *C, PointerRNA *UNUSED(ptr))
2099 {
2101  ViewLayer *view_layer = CTX_data_view_layer(C);
2102  Brush *br = BKE_paint_brush(BKE_paint_get_active(scene, view_layer));
2104 }
2105 
2106 static void rna_UnifiedPaintSettings_size_set(PointerRNA *ptr, int value)
2107 {
2108  UnifiedPaintSettings *ups = ptr->data;
2109 
2110  /* scale unprojected radius so it stays consistent with brush size */
2112  ups->size = value;
2113 }
2114 
2115 static void rna_UnifiedPaintSettings_unprojected_radius_set(PointerRNA *ptr, float value)
2116 {
2117  UnifiedPaintSettings *ups = ptr->data;
2118 
2119  /* scale brush size so it stays consistent with unprojected_radius */
2120  BKE_brush_scale_size(&ups->size, value, ups->unprojected_radius);
2121  ups->unprojected_radius = value;
2122 }
2123 
2124 static void rna_UnifiedPaintSettings_radius_update(bContext *C, PointerRNA *ptr)
2125 {
2126  /* changing the unified size should invalidate the overlay but also update the brush */
2128  rna_UnifiedPaintSettings_update(C, ptr);
2129 }
2130 
2131 static char *rna_UnifiedPaintSettings_path(PointerRNA *UNUSED(ptr))
2132 {
2133  return BLI_strdup("tool_settings.unified_paint_settings");
2134 }
2135 
2136 static char *rna_CurvePaintSettings_path(PointerRNA *UNUSED(ptr))
2137 {
2138  return BLI_strdup("tool_settings.curve_paint_settings");
2139 }
2140 
2141 static char *rna_SequencerToolSettings_path(PointerRNA *UNUSED(ptr))
2142 {
2143  return BLI_strdup("tool_settings.sequencer_tool_settings");
2144 }
2145 
2146 /* generic function to recalc geometry */
2147 static void rna_EditMesh_update(bContext *C, PointerRNA *UNUSED(ptr))
2148 {
2149  ViewLayer *view_layer = CTX_data_view_layer(C);
2150  Mesh *me = NULL;
2151 
2152  if (view_layer->basact) {
2153  me = BKE_mesh_from_object(view_layer->basact->object);
2154  if (me && me->edit_mesh == NULL) {
2155  me = NULL;
2156  }
2157  }
2158 
2159  if (me) {
2162  }
2163 }
2164 
2165 static char *rna_MeshStatVis_path(PointerRNA *UNUSED(ptr))
2166 {
2167  return BLI_strdup("tool_settings.statvis");
2168 }
2169 
2170 /* note: without this, when Multi-Paint is activated/deactivated, the colors
2171  * will not change right away when multiple bones are selected, this function
2172  * is not for general use and only for the few cases where changing scene
2173  * settings and NOT for general purpose updates, possibly this should be
2174  * given its own notifier. */
2175 static void rna_Scene_update_active_object_data(bContext *C, PointerRNA *UNUSED(ptr))
2176 {
2177  ViewLayer *view_layer = CTX_data_view_layer(C);
2178  Object *ob = OBACT(view_layer);
2179 
2180  if (ob) {
2183  }
2184 }
2185 
2186 static void rna_SceneCamera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
2187 {
2188  Scene *scene = (Scene *)ptr->owner_id;
2189  Object *camera = scene->camera;
2190 
2192 
2193  if (camera && (camera->type == OB_CAMERA)) {
2194  DEG_id_tag_update(&camera->id, ID_RECALC_GEOMETRY);
2195  }
2196 }
2197 
2198 static void rna_SceneSequencer_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
2199 {
2201 }
2202 
2203 static char *rna_ToolSettings_path(PointerRNA *UNUSED(ptr))
2204 {
2205  return BLI_strdup("tool_settings");
2206 }
2207 
2209 {
2210  FreestyleLineSet *lineset = (FreestyleLineSet *)ptr->data;
2211 
2213 }
2214 
2216  PointerRNA value,
2217  struct ReportList *UNUSED(reports))
2218 {
2219  FreestyleLineSet *lineset = (FreestyleLineSet *)ptr->data;
2220 
2221  if (lineset->linestyle) {
2222  id_us_min(&lineset->linestyle->id);
2223  }
2224  lineset->linestyle = (FreestyleLineStyle *)value.data;
2225  id_us_plus(&lineset->linestyle->id);
2226 }
2227 
2229  FreestyleSettings *config,
2230  Main *bmain,
2231  const char *name)
2232 {
2233  Scene *scene = (Scene *)id;
2234  FreestyleLineSet *lineset = BKE_freestyle_lineset_add(bmain, (FreestyleConfig *)config, name);
2235 
2236  DEG_id_tag_update(&scene->id, 0);
2238 
2239  return lineset;
2240 }
2241 
2243  FreestyleSettings *config,
2244  ReportList *reports,
2245  PointerRNA *lineset_ptr)
2246 {
2247  FreestyleLineSet *lineset = lineset_ptr->data;
2248  Scene *scene = (Scene *)id;
2249 
2250  if (!BKE_freestyle_lineset_delete((FreestyleConfig *)config, lineset)) {
2251  BKE_reportf(reports, RPT_ERROR, "Line set '%s' could not be removed", lineset->name);
2252  return;
2253  }
2254 
2255  RNA_POINTER_INVALIDATE(lineset_ptr);
2256 
2257  DEG_id_tag_update(&scene->id, 0);
2259 }
2260 
2262 {
2263  FreestyleConfig *config = (FreestyleConfig *)ptr->data;
2266 }
2267 
2269  PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax))
2270 {
2271  FreestyleConfig *config = (FreestyleConfig *)ptr->data;
2272 
2273  *min = 0;
2274  *max = max_ii(0, BLI_listbase_count(&config->linesets) - 1);
2275 }
2276 
2278 {
2279  FreestyleConfig *config = (FreestyleConfig *)ptr->data;
2281 }
2282 
2284 {
2285  FreestyleConfig *config = (FreestyleConfig *)ptr->data;
2287 }
2288 
2290 {
2291  Scene *scene = (Scene *)id;
2293 
2294  DEG_id_tag_update(&scene->id, 0);
2296 
2297  return module;
2298 }
2299 
2301  FreestyleSettings *config,
2302  ReportList *reports,
2303  PointerRNA *module_ptr)
2304 {
2305  Scene *scene = (Scene *)id;
2306  FreestyleModuleConfig *module = module_ptr->data;
2307 
2309  if (module->script) {
2310  BKE_reportf(reports,
2311  RPT_ERROR,
2312  "Style module '%s' could not be removed",
2313  module->script->id.name + 2);
2314  }
2315  else {
2316  BKE_report(reports, RPT_ERROR, "Style module could not be removed");
2317  }
2318  return;
2319  }
2320 
2321  RNA_POINTER_INVALIDATE(module_ptr);
2322 
2323  DEG_id_tag_update(&scene->id, 0);
2325 }
2326 
2327 static void rna_Stereo3dFormat_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
2328 {
2329  ID *id = ptr->owner_id;
2330 
2331  if (id && GS(id->name) == ID_IM) {
2332  Image *ima = (Image *)id;
2333  ImBuf *ibuf;
2334  void *lock;
2335 
2336  if (!BKE_image_is_stereo(ima)) {
2337  return;
2338  }
2339 
2340  ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock);
2341 
2342  if (ibuf) {
2343  BKE_image_signal(bmain, ima, NULL, IMA_SIGNAL_FREE);
2344  }
2345  BKE_image_release_ibuf(ima, ibuf, lock);
2346  }
2347 }
2348 
2349 static ViewLayer *rna_ViewLayer_new(ID *id, Scene *UNUSED(sce), Main *bmain, const char *name)
2350 {
2351  Scene *scene = (Scene *)id;
2352  ViewLayer *view_layer = BKE_view_layer_add(scene, name, NULL, VIEWLAYER_ADD_NEW);
2353 
2354  DEG_id_tag_update(&scene->id, 0);
2355  DEG_relations_tag_update(bmain);
2357 
2358  return view_layer;
2359 }
2360 
2361 static void rna_ViewLayer_remove(
2362  ID *id, Scene *UNUSED(sce), Main *bmain, ReportList *reports, PointerRNA *sl_ptr)
2363 {
2364  Scene *scene = (Scene *)id;
2365  ViewLayer *view_layer = sl_ptr->data;
2366 
2367  if (ED_scene_view_layer_delete(bmain, scene, view_layer, reports)) {
2368  RNA_POINTER_INVALIDATE(sl_ptr);
2369  }
2370 }
2371 
2373  PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax))
2374 {
2375  ViewLayer *view_layer = (ViewLayer *)ptr->data;
2376 
2377  *min = 0;
2378  *max = max_ii(0, BLI_listbase_count(&view_layer->aovs) - 1);
2379 }
2380 
2382 {
2383  ViewLayer *view_layer = (ViewLayer *)ptr->data;
2384  return BLI_findindex(&view_layer->aovs, view_layer->active_aov);
2385 }
2386 
2388 {
2389  ViewLayer *view_layer = (ViewLayer *)ptr->data;
2390  ViewLayerAOV *aov = BLI_findlink(&view_layer->aovs, value);
2391  view_layer->active_aov = aov;
2392 }
2393 
2394 /* Fake value, used internally (not saved to DNA). */
2395 # define V3D_ORIENT_DEFAULT -1
2396 
2397 static int rna_TransformOrientationSlot_type_get(PointerRNA *ptr)
2398 {
2399  Scene *scene = (Scene *)ptr->owner_id;
2400  TransformOrientationSlot *orient_slot = ptr->data;
2401  if (orient_slot != &scene->orientation_slots[SCE_ORIENT_DEFAULT]) {
2402  if ((orient_slot->flag & SELECT) == 0) {
2403  return V3D_ORIENT_DEFAULT;
2404  }
2405  }
2406  return BKE_scene_orientation_slot_get_index(orient_slot);
2407 }
2408 
2409 void rna_TransformOrientationSlot_type_set(PointerRNA *ptr, int value)
2410 {
2411  Scene *scene = (Scene *)ptr->owner_id;
2412  TransformOrientationSlot *orient_slot = ptr->data;
2413 
2414  if (orient_slot != &scene->orientation_slots[SCE_ORIENT_DEFAULT]) {
2415  if (value == V3D_ORIENT_DEFAULT) {
2416  orient_slot->flag &= ~SELECT;
2417  return;
2418  }
2419  else {
2420  orient_slot->flag |= SELECT;
2421  }
2422  }
2423 
2424  BKE_scene_orientation_slot_set_index(orient_slot, value);
2425 }
2426 
2427 static PointerRNA rna_TransformOrientationSlot_get(PointerRNA *ptr)
2428 {
2429  Scene *scene = (Scene *)ptr->owner_id;
2430  TransformOrientationSlot *orient_slot = ptr->data;
2431  TransformOrientation *orientation;
2432  if (orient_slot->type < V3D_ORIENT_CUSTOM) {
2433  orientation = NULL;
2434  }
2435  else {
2436  orientation = BKE_scene_transform_orientation_find(scene, orient_slot->index_custom);
2437  }
2438  return rna_pointer_inherit_refine(ptr, &RNA_TransformOrientation, orientation);
2439 }
2440 
2441 static const EnumPropertyItem *rna_TransformOrientation_impl_itemf(Scene *scene,
2442  const bool include_default,
2443  bool *r_free)
2444 {
2445  EnumPropertyItem tmp = {0, "", 0, "", ""};
2446  EnumPropertyItem *item = NULL;
2447  int i = V3D_ORIENT_CUSTOM, totitem = 0;
2448 
2449  if (include_default) {
2450  tmp.identifier = "DEFAULT";
2451  tmp.name = "Default";
2452  tmp.description = "Use the scene orientation";
2453  tmp.value = V3D_ORIENT_DEFAULT;
2454  tmp.icon = ICON_OBJECT_ORIGIN;
2455  RNA_enum_item_add(&item, &totitem, &tmp);
2456  tmp.icon = 0;
2457 
2458  RNA_enum_item_add_separator(&item, &totitem);
2459  }
2460 
2462 
2463  const ListBase *transform_orientations = scene ? &scene->transform_spaces : NULL;
2464 
2465  if (transform_orientations && (BLI_listbase_is_empty(transform_orientations) == false)) {
2466  RNA_enum_item_add_separator(&item, &totitem);
2467 
2468  LISTBASE_FOREACH (TransformOrientation *, ts, transform_orientations) {
2469  tmp.identifier = ts->name;
2470  tmp.name = ts->name;
2471  tmp.value = i++;
2472  RNA_enum_item_add(&item, &totitem, &tmp);
2473  }
2474  }
2475 
2476  RNA_enum_item_end(&item, &totitem);
2477  *r_free = true;
2478 
2479  return item;
2480 }
2482  PointerRNA *ptr,
2483  PropertyRNA *UNUSED(prop),
2484  bool *r_free)
2485 {
2486  if (C == NULL) {
2488  }
2489 
2490  Scene *scene;
2491  if (ptr->owner_id && (GS(ptr->owner_id->name) == ID_SCE)) {
2492  scene = (Scene *)ptr->owner_id;
2493  }
2494  else {
2495  scene = CTX_data_scene(C);
2496  }
2497  return rna_TransformOrientation_impl_itemf(scene, false, r_free);
2498 }
2499 
2500 const EnumPropertyItem *rna_TransformOrientation_with_scene_itemf(bContext *C,
2501  PointerRNA *ptr,
2502  PropertyRNA *UNUSED(prop),
2503  bool *r_free)
2504 {
2505  if (C == NULL) {
2507  }
2508 
2509  Scene *scene = (Scene *)ptr->owner_id;
2510  TransformOrientationSlot *orient_slot = ptr->data;
2511  bool include_default = (orient_slot != &scene->orientation_slots[SCE_ORIENT_DEFAULT]);
2512  return rna_TransformOrientation_impl_itemf(scene, include_default, r_free);
2513 }
2514 
2515 # undef V3D_ORIENT_DEFAULT
2516 
2517 static const EnumPropertyItem *rna_UnitSettings_itemf_wrapper(const int system,
2518  const int type,
2519  bool *r_free)
2520 {
2521  const void *usys;
2522  int len;
2523  BKE_unit_system_get(system, type, &usys, &len);
2524 
2525  EnumPropertyItem *items = NULL;
2526  int totitem = 0;
2527 
2528  EnumPropertyItem adaptive = {0};
2529  adaptive.identifier = "ADAPTIVE";
2530  adaptive.name = "Adaptive";
2531  adaptive.value = USER_UNIT_ADAPTIVE;
2532  RNA_enum_item_add(&items, &totitem, &adaptive);
2533 
2534  for (int i = 0; i < len; i++) {
2535  if (!BKE_unit_is_suppressed(usys, i)) {
2536  EnumPropertyItem tmp = {0};
2537  tmp.identifier = BKE_unit_identifier_get(usys, i);
2538  tmp.name = BKE_unit_display_name_get(usys, i);
2539  tmp.value = i;
2540  RNA_enum_item_add(&items, &totitem, &tmp);
2541  }
2542  }
2543 
2544  RNA_enum_item_end(&items, &totitem);
2545  *r_free = true;
2546 
2547  return items;
2548 }
2549 
2550 const EnumPropertyItem *rna_UnitSettings_length_unit_itemf(bContext *UNUSED(C),
2551  PointerRNA *ptr,
2552  PropertyRNA *UNUSED(prop),
2553  bool *r_free)
2554 {
2555  UnitSettings *units = ptr->data;
2556  return rna_UnitSettings_itemf_wrapper(units->system, B_UNIT_LENGTH, r_free);
2557 }
2558 
2559 const EnumPropertyItem *rna_UnitSettings_mass_unit_itemf(bContext *UNUSED(C),
2560  PointerRNA *ptr,
2561  PropertyRNA *UNUSED(prop),
2562  bool *r_free)
2563 {
2564  UnitSettings *units = ptr->data;
2565  return rna_UnitSettings_itemf_wrapper(units->system, B_UNIT_MASS, r_free);
2566 }
2567 
2568 const EnumPropertyItem *rna_UnitSettings_time_unit_itemf(bContext *UNUSED(C),
2569  PointerRNA *ptr,
2570  PropertyRNA *UNUSED(prop),
2571  bool *r_free)
2572 {
2573  UnitSettings *units = ptr->data;
2574  return rna_UnitSettings_itemf_wrapper(units->system, B_UNIT_TIME, r_free);
2575 }
2576 
2577 const EnumPropertyItem *rna_UnitSettings_temperature_unit_itemf(bContext *UNUSED(C),
2578  PointerRNA *ptr,
2579  PropertyRNA *UNUSED(prop),
2580  bool *r_free)
2581 {
2582  UnitSettings *units = ptr->data;
2583  return rna_UnitSettings_itemf_wrapper(units->system, B_UNIT_TEMPERATURE, r_free);
2584 }
2585 
2586 static void rna_UnitSettings_system_update(Main *UNUSED(bmain),
2587  Scene *scene,
2588  PointerRNA *UNUSED(ptr))
2589 {
2590  UnitSettings *unit = &scene->unit;
2591  if (unit->system == USER_UNIT_NONE) {
2593  unit->mass_unit = USER_UNIT_ADAPTIVE;
2594  }
2595  else {
2598  }
2599 }
2600 
2601 static char *rna_UnitSettings_path(PointerRNA *UNUSED(ptr))
2602 {
2603  return BLI_strdup("unit_settings");
2604 }
2605 
2606 static char *rna_FFmpegSettings_path(PointerRNA *UNUSED(ptr))
2607 {
2608  return BLI_strdup("render.ffmpeg");
2609 }
2610 
2611 #else
2612 
2613 /* Grease Pencil Interpolation tool settings */
2615 {
2616  StructRNA *srna;
2617  PropertyRNA *prop;
2618 
2619  srna = RNA_def_struct(brna, "GPencilInterpolateSettings", NULL);
2620  RNA_def_struct_sdna(srna, "GP_Interpolate_Settings");
2622  "Grease Pencil Interpolate Settings",
2623  "Settings for Grease Pencil interpolation tools");
2624 
2625  /* custom curvemap */
2626  prop = RNA_def_property(srna, "interpolation_curve", PROP_POINTER, PROP_NONE);
2627  RNA_def_property_pointer_sdna(prop, NULL, "custom_ipo");
2628  RNA_def_property_struct_type(prop, "CurveMapping");
2630  prop,
2631  "Interpolation Curve",
2632  "Custom curve to control 'sequence' interpolation between Grease Pencil frames");
2633 }
2634 
2636 {
2637  StructRNA *srna;
2638  PropertyRNA *prop;
2639 
2640  srna = RNA_def_struct(brna, "TransformOrientation", NULL);
2641 
2642  prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
2643  RNA_def_property_float_sdna(prop, NULL, "mat");
2646 
2647  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
2648  RNA_def_struct_name_property(srna, prop);
2649  RNA_def_property_ui_text(prop, "Name", "Name of the custom transform orientation");
2651 }
2652 
2654 {
2655  StructRNA *srna;
2656  PropertyRNA *prop;
2657 
2658  srna = RNA_def_struct(brna, "TransformOrientationSlot", NULL);
2659  RNA_def_struct_sdna(srna, "TransformOrientationSlot");
2660  RNA_def_struct_path_func(srna, "rna_TransformOrientationSlot_path");
2661  RNA_def_struct_ui_text(srna, "Orientation Slot", "");
2662 
2663  /* Orientations */
2664  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
2667  "rna_TransformOrientationSlot_type_get",
2668  "rna_TransformOrientationSlot_type_set",
2669  "rna_TransformOrientation_with_scene_itemf");
2670  RNA_def_property_ui_text(prop, "Orientation", "Transformation orientation");
2672 
2673  prop = RNA_def_property(srna, "custom_orientation", PROP_POINTER, PROP_NONE);
2674  RNA_def_property_struct_type(prop, "TransformOrientation");
2675  RNA_def_property_pointer_funcs(prop, "rna_TransformOrientationSlot_get", NULL, NULL, NULL);
2676  RNA_def_property_ui_text(prop, "Current Transform Orientation", "");
2677 
2678  /* flag */
2679  prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
2680  RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
2681  RNA_def_property_ui_text(prop, "Use", "Use scene orientation instead of a custom setting");
2683 }
2684 
2686 {
2687  StructRNA *srna;
2688  PropertyRNA *prop;
2689 
2690  srna = RNA_def_struct(brna, "View3DCursor", NULL);
2691  RNA_def_struct_sdna(srna, "View3DCursor");
2692  RNA_def_struct_path_func(srna, "rna_View3DCursor_path");
2693  RNA_def_struct_ui_text(srna, "3D Cursor", "");
2694  RNA_def_struct_ui_icon(srna, ICON_CURSOR);
2696 
2697  prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ_LENGTH);
2699  RNA_def_property_float_sdna(prop, NULL, "location");
2700  RNA_def_property_ui_text(prop, "Location", "");
2701  RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
2703 
2704  prop = RNA_def_property(srna, "rotation_quaternion", PROP_FLOAT, PROP_QUATERNION);
2706  RNA_def_property_float_sdna(prop, NULL, "rotation_quaternion");
2708  prop, "Quaternion Rotation", "Rotation in quaternions (keep normalized)");
2710 
2711  prop = RNA_def_property(srna, "rotation_axis_angle", PROP_FLOAT, PROP_AXISANGLE);
2713  RNA_def_property_array(prop, 4);
2715  "rna_View3DCursor_rotation_axis_angle_get",
2716  "rna_View3DCursor_rotation_axis_angle_set",
2717  NULL);
2720  prop, "Axis-Angle Rotation", "Angle of Rotation for Axis-Angle rotation representation");
2722 
2723  prop = RNA_def_property(srna, "rotation_euler", PROP_FLOAT, PROP_EULER);
2725  RNA_def_property_float_sdna(prop, NULL, "rotation_euler");
2726  RNA_def_property_ui_text(prop, "Euler Rotation", "3D rotation");
2728 
2729  prop = RNA_def_property(srna, "rotation_mode", PROP_ENUM, PROP_NONE);
2731  RNA_def_property_enum_sdna(prop, NULL, "rotation_mode");
2733  RNA_def_property_enum_funcs(prop, NULL, "rna_View3DCursor_rotation_mode_set", NULL);
2734  RNA_def_property_ui_text(prop, "Rotation Mode", "");
2736 
2737  /* Matrix access to avoid having to check current rotation mode. */
2738  prop = RNA_def_property(srna, "matrix", PROP_FLOAT, PROP_MATRIX);
2740  RNA_def_property_flag(prop, PROP_THICK_WRAP); /* no reference to original data */
2742  prop, "Transform Matrix", "Matrix combining location and rotation of the cursor");
2744  prop, "rna_View3DCursor_matrix_get", "rna_View3DCursor_matrix_set", NULL);
2745 }
2746 
2748 {
2749  StructRNA *srna;
2750  PropertyRNA *prop;
2751 
2752  /* the construction of this enum is quite special - everything is stored as bitflags,
2753  * with 1st position only for on/off (and exposed as boolean), while others are mutually
2754  * exclusive options but which will only have any effect when autokey is enabled
2755  */
2756  static const EnumPropertyItem auto_key_items[] = {
2757  {AUTOKEY_MODE_NORMAL & ~AUTOKEY_ON, "ADD_REPLACE_KEYS", 0, "Add & Replace", ""},
2758  {AUTOKEY_MODE_EDITKEYS & ~AUTOKEY_ON, "REPLACE_KEYS", 0, "Replace", ""},
2759  {0, NULL, 0, NULL, NULL},
2760  };
2761 
2762  static const EnumPropertyItem draw_groupuser_items[] = {
2763  {OB_DRAW_GROUPUSER_NONE, "NONE", 0, "None", ""},
2765  "ACTIVE",
2766  0,
2767  "Active",
2768  "Show vertices with no weights in the active group"},
2769  {OB_DRAW_GROUPUSER_ALL, "ALL", 0, "All", "Show vertices with no weights in any group"},
2770  {0, NULL, 0, NULL, NULL},
2771  };
2772 
2773  static const EnumPropertyItem vertex_group_select_items[] = {
2774  {WT_VGROUP_ALL, "ALL", 0, "All", "All Vertex Groups"},
2776  "BONE_DEFORM",
2777  0,
2778  "Deform",
2779  "Vertex Groups assigned to Deform Bones"},
2781  "OTHER_DEFORM",
2782  0,
2783  "Other",
2784  "Vertex Groups assigned to non Deform Bones"},
2785  {0, NULL, 0, NULL, NULL},
2786  };
2787 
2788  static const EnumPropertyItem gpencil_stroke_placement_items[] = {
2790  "ORIGIN",
2791  ICON_OBJECT_ORIGIN,
2792  "Origin",
2793  "Draw stroke at Object origin"},
2795  "CURSOR",
2796  ICON_PIVOT_CURSOR,
2797  "3D Cursor",
2798  "Draw stroke at 3D cursor location"},
2800  "SURFACE",
2801  ICON_SNAP_FACE,
2802  "Surface",
2803  "Stick stroke to surfaces"},
2805  "STROKE",
2806  ICON_STROKE,
2807  "Stroke",
2808  "Stick stroke to other strokes"},
2809  {0, NULL, 0, NULL, NULL},
2810  };
2811 
2812  static const EnumPropertyItem gpencil_stroke_snap_items[] = {
2813  {0, "NONE", 0, "All Points", "Snap to all points"},
2815  "ENDS",
2816  0,
2817  "End Points",
2818  "Snap to first and last points and interpolate"},
2819  {GP_PROJECT_DEPTH_STROKE_FIRST, "FIRST", 0, "First Point", "Snap to first point"},
2820  {0, NULL, 0, NULL, NULL},
2821  };
2822 
2823  static const EnumPropertyItem gpencil_selectmode_items[] = {
2824  {GP_SELECTMODE_POINT, "POINT", ICON_GP_SELECT_POINTS, "Point", "Select only points"},
2826  "STROKE",
2827  ICON_GP_SELECT_STROKES,
2828  "Stroke",
2829  "Select all stroke points"},
2831  "SEGMENT",
2832  ICON_GP_SELECT_BETWEEN_STROKES,
2833  "Segment",
2834  "Select all stroke points between other strokes"},
2835  {0, NULL, 0, NULL, NULL},
2836  };
2837 
2838  static const EnumPropertyItem annotation_stroke_placement_items[] = {
2840  "CURSOR",
2841  ICON_PIVOT_CURSOR,
2842  "3D Cursor",
2843  "Draw stroke at 3D cursor location"},
2844  /* Weird, GP_PROJECT_VIEWALIGN is inverted. */
2845  {0, "VIEW", ICON_RESTRICT_VIEW_ON, "View", "Stick stroke to the view"},
2847  "SURFACE",
2848  ICON_FACESEL,
2849  "Surface",
2850  "Stick stroke to surfaces"},
2851  {0, NULL, 0, NULL, NULL},
2852  };
2853 
2854  srna = RNA_def_struct(brna, "ToolSettings", NULL);
2855  RNA_def_struct_path_func(srna, "rna_ToolSettings_path");
2856  RNA_def_struct_ui_text(srna, "Tool Settings", "");
2857 
2858  prop = RNA_def_property(srna, "sculpt", PROP_POINTER, PROP_NONE);
2859  RNA_def_property_struct_type(prop, "Sculpt");
2860  RNA_def_property_ui_text(prop, "Sculpt", "");
2861 
2862  prop = RNA_def_property(srna, "use_auto_normalize", PROP_BOOLEAN, PROP_NONE);
2864  RNA_def_property_boolean_sdna(prop, NULL, "auto_normalize", 1);
2866  "Weight Paint Auto-Normalize",
2867  "Ensure all bone-deforming vertex groups add up "
2868  "to 1.0 while weight painting");
2869  RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
2870 
2871  prop = RNA_def_property(srna, "use_lock_relative", PROP_BOOLEAN, PROP_NONE);
2873  RNA_def_property_boolean_sdna(prop, NULL, "wpaint_lock_relative", 1);
2875  "Weight Paint Lock-Relative",
2876  "Display bone-deforming groups as if all locked deform groups "
2877  "were deleted, and the remaining ones were re-normalized");
2878  RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
2879 
2880  prop = RNA_def_property(srna, "use_multipaint", PROP_BOOLEAN, PROP_NONE);
2882  RNA_def_property_boolean_sdna(prop, NULL, "multipaint", 1);
2884  "Weight Paint Multi-Paint",
2885  "Paint across the weights of all selected bones, "
2886  "maintaining their relative influence");
2887  RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
2888 
2889  prop = RNA_def_property(srna, "vertex_group_user", PROP_ENUM, PROP_NONE);
2891  RNA_def_property_enum_sdna(prop, NULL, "weightuser");
2892  RNA_def_property_enum_items(prop, draw_groupuser_items);
2893  RNA_def_property_ui_text(prop, "Mask Non-Group Vertices", "Display unweighted vertices");
2894  RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
2895 
2896  prop = RNA_def_property(srna, "vertex_group_subset", PROP_ENUM, PROP_NONE);
2898  RNA_def_property_enum_sdna(prop, NULL, "vgroupsubset");
2899  RNA_def_property_enum_items(prop, vertex_group_select_items);
2900  RNA_def_property_ui_text(prop, "Subset", "Filter Vertex groups for Display");
2901  RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
2902 
2903  prop = RNA_def_property(srna, "vertex_paint", PROP_POINTER, PROP_NONE);
2904  RNA_def_property_pointer_sdna(prop, NULL, "vpaint");
2905  RNA_def_property_ui_text(prop, "Vertex Paint", "");
2906 
2907  prop = RNA_def_property(srna, "weight_paint", PROP_POINTER, PROP_NONE);
2908  RNA_def_property_pointer_sdna(prop, NULL, "wpaint");
2909  RNA_def_property_ui_text(prop, "Weight Paint", "");
2910 
2911  prop = RNA_def_property(srna, "image_paint", PROP_POINTER, PROP_NONE);
2912  RNA_def_property_pointer_sdna(prop, NULL, "imapaint");
2913  RNA_def_property_ui_text(prop, "Image Paint", "");
2914 
2915  prop = RNA_def_property(srna, "uv_sculpt", PROP_POINTER, PROP_NONE);
2916  RNA_def_property_pointer_sdna(prop, NULL, "uvsculpt");
2917  RNA_def_property_ui_text(prop, "UV Sculpt", "");
2918 
2919  prop = RNA_def_property(srna, "gpencil_paint", PROP_POINTER, PROP_NONE);
2920  RNA_def_property_pointer_sdna(prop, NULL, "gp_paint");
2921  RNA_def_property_ui_text(prop, "Grease Pencil Paint", "");
2922 
2923  prop = RNA_def_property(srna, "gpencil_vertex_paint", PROP_POINTER, PROP_NONE);
2924  RNA_def_property_pointer_sdna(prop, NULL, "gp_vertexpaint");
2925  RNA_def_property_ui_text(prop, "Grease Pencil Vertex Paint", "");
2926 
2927  prop = RNA_def_property(srna, "gpencil_sculpt_paint", PROP_POINTER, PROP_NONE);
2928  RNA_def_property_pointer_sdna(prop, NULL, "gp_sculptpaint");
2929  RNA_def_property_ui_text(prop, "Grease Pencil Sculpt Paint", "");
2930 
2931  prop = RNA_def_property(srna, "gpencil_weight_paint", PROP_POINTER, PROP_NONE);
2932  RNA_def_property_pointer_sdna(prop, NULL, "gp_weightpaint");
2933  RNA_def_property_ui_text(prop, "Grease Pencil Weight Paint", "");
2934 
2935  prop = RNA_def_property(srna, "particle_edit", PROP_POINTER, PROP_NONE);
2936  RNA_def_property_pointer_sdna(prop, NULL, "particle");
2937  RNA_def_property_ui_text(prop, "Particle Edit", "");
2938 
2939  prop = RNA_def_property(srna, "uv_sculpt_lock_borders", PROP_BOOLEAN, PROP_NONE);
2940  RNA_def_property_boolean_sdna(prop, NULL, "uv_sculpt_settings", UV_SCULPT_LOCK_BORDERS);
2941  RNA_def_property_ui_text(prop, "Lock Borders", "Disable editing of boundary edges");
2942 
2943  prop = RNA_def_property(srna, "uv_sculpt_all_islands", PROP_BOOLEAN, PROP_NONE);
2944  RNA_def_property_boolean_sdna(prop, NULL, "uv_sculpt_settings", UV_SCULPT_ALL_ISLANDS);
2945  RNA_def_property_ui_text(prop, "Sculpt All Islands", "Brush operates on all islands");
2946 
2947  prop = RNA_def_property(srna, "uv_relax_method", PROP_ENUM, PROP_NONE);
2948  RNA_def_property_enum_sdna(prop, NULL, "uv_relax_method");
2950  RNA_def_property_ui_text(prop, "Relaxation Method", "Algorithm used for UV relaxation");
2951 
2952  prop = RNA_def_property(srna, "lock_object_mode", PROP_BOOLEAN, PROP_NONE);
2954  RNA_def_property_ui_text(prop, "Lock Object Modes", "Restrict select to the current mode");
2956 
2957  static const EnumPropertyItem workspace_tool_items[] = {
2958  {SCE_WORKSPACE_TOOL_DEFAULT, "DEFAULT", 0, "Active Tool", ""},
2959  {SCE_WORKSPACE_TOOL_FALLBACK, "FALLBACK", 0, "Select", ""},
2960  {0, NULL, 0, NULL, NULL},
2961  };
2962 
2963  prop = RNA_def_property(srna, "workspace_tool_type", PROP_ENUM, PROP_NONE);
2964  RNA_def_property_enum_sdna(prop, NULL, "workspace_tool_type");
2965  RNA_def_property_enum_items(prop, workspace_tool_items);
2966  RNA_def_property_ui_text(prop, "Drag", "Action when dragging in the viewport");
2967 
2968  /* Transform */
2969  prop = RNA_def_property(srna, "use_proportional_edit", PROP_BOOLEAN, PROP_NONE);
2970  RNA_def_property_boolean_sdna(prop, NULL, "proportional_edit", PROP_EDIT_USE);
2971  RNA_def_property_ui_text(prop, "Proportional Editing", "Proportional edit mode");
2972  RNA_def_property_ui_icon(prop, ICON_PROP_ON, 0);
2973  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
2974 
2975  prop = RNA_def_property(srna, "use_proportional_edit_objects", PROP_BOOLEAN, PROP_NONE);
2976  RNA_def_property_boolean_sdna(prop, NULL, "proportional_objects", 0);
2978  prop, "Proportional Editing Objects", "Proportional editing object mode");
2979  RNA_def_property_ui_icon(prop, ICON_PROP_OFF, 1);
2980  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
2981 
2982  prop = RNA_def_property(srna, "use_proportional_projected", PROP_BOOLEAN, PROP_NONE);
2983  RNA_def_property_boolean_sdna(prop, NULL, "proportional_edit", PROP_EDIT_PROJECTED);
2985  prop, "Projected from View", "Proportional Editing using screen space locations");
2986  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
2987 
2988  prop = RNA_def_property(srna, "use_proportional_connected", PROP_BOOLEAN, PROP_NONE);
2989  RNA_def_property_boolean_sdna(prop, NULL, "proportional_edit", PROP_EDIT_CONNECTED);
2991  prop, "Connected Only", "Proportional Editing using connected geometry only");
2992  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
2993 
2994  prop = RNA_def_property(srna, "use_proportional_edit_mask", PROP_BOOLEAN, PROP_NONE);
2995  RNA_def_property_boolean_sdna(prop, NULL, "proportional_mask", 0);
2996  RNA_def_property_ui_text(prop, "Proportional Editing Objects", "Proportional editing mask mode");
2997  RNA_def_property_ui_icon(prop, ICON_PROP_OFF, 1);
2998  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
2999 
3000  prop = RNA_def_property(srna, "use_proportional_action", PROP_BOOLEAN, PROP_NONE);
3001  RNA_def_property_boolean_sdna(prop, NULL, "proportional_action", 0);
3003  prop, "Proportional Editing Actions", "Proportional editing in action editor");
3004  RNA_def_property_ui_icon(prop, ICON_PROP_OFF, 1);
3005  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3006 
3007  prop = RNA_def_property(srna, "use_proportional_fcurve", PROP_BOOLEAN, PROP_NONE);
3008  RNA_def_property_boolean_sdna(prop, NULL, "proportional_fcurve", 0);
3010  prop, "Proportional Editing FCurves", "Proportional editing in FCurve editor");
3011  RNA_def_property_ui_icon(prop, ICON_PROP_OFF, 1);
3012  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3013 
3014  prop = RNA_def_property(srna, "lock_markers", PROP_BOOLEAN, PROP_NONE);
3015  RNA_def_property_boolean_sdna(prop, NULL, "lock_markers", 0);
3016  RNA_def_property_ui_text(prop, "Lock Markers", "Prevent marker editing");
3017 
3018  prop = RNA_def_property(srna, "proportional_edit_falloff", PROP_ENUM, PROP_NONE);
3019  RNA_def_property_enum_sdna(prop, NULL, "prop_mode");
3022  prop, "Proportional Editing Falloff", "Falloff type for proportional editing mode");
3023  /* Abusing id_curve :/ */
3025  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3026 
3027  prop = RNA_def_property(srna, "proportional_size", PROP_FLOAT, PROP_DISTANCE);
3028  RNA_def_property_float_sdna(prop, NULL, "proportional_size");
3030  prop, "Proportional Size", "Display size for proportional editing circle");
3031  RNA_def_property_range(prop, 0.00001, 5000.0);
3032 
3033  prop = RNA_def_property(srna, "double_threshold", PROP_FLOAT, PROP_DISTANCE);
3034  RNA_def_property_float_sdna(prop, NULL, "doublimit");
3035  RNA_def_property_ui_text(prop, "Merge Threshold", "Threshold distance for Auto Merge");
3036  RNA_def_property_range(prop, 0.0, 1.0);
3037  RNA_def_property_ui_range(prop, 0.0, 0.1, 0.01, 6);
3038 
3039  /* Pivot Point */
3040  prop = RNA_def_property(srna, "transform_pivot_point", PROP_ENUM, PROP_NONE);
3041  RNA_def_property_enum_sdna(prop, NULL, "transform_pivot_point");
3043  RNA_def_property_ui_text(prop, "Transform Pivot Point", "Pivot center for rotation/scaling");
3045 
3046  prop = RNA_def_property(srna, "use_transform_pivot_point_align", PROP_BOOLEAN, PROP_NONE);
3047  RNA_def_property_boolean_sdna(prop, NULL, "transform_flag", SCE_XFORM_AXIS_ALIGN);
3049  prop,
3050  "Only Locations",
3051  "Only transform object locations, without affecting rotation or scaling");
3053 
3054  prop = RNA_def_property(srna, "use_transform_data_origin", PROP_BOOLEAN, PROP_NONE);
3055  RNA_def_property_boolean_sdna(prop, NULL, "transform_flag", SCE_XFORM_DATA_ORIGIN);
3057  prop, "Transform Origins", "Transform object origins, while leaving the shape in place");
3059 
3060  prop = RNA_def_property(srna, "use_transform_skip_children", PROP_BOOLEAN, PROP_NONE);
3063  prop, "Transform Parents", "Transform the parents, leaving the children in place");
3065 
3066  prop = RNA_def_property(srna, "use_transform_correct_face_attributes", PROP_BOOLEAN, PROP_NONE);
3069  "Correct Face Attributes",
3070  "Correct data such as UV's and vertex colors when transforming");
3072 
3073  prop = RNA_def_property(srna, "use_transform_correct_keep_connected", PROP_BOOLEAN, PROP_NONE);
3075  prop, NULL, "uvcalc_flag", UVCALC_TRANSFORM_CORRECT_KEEP_CONNECTED);
3077  prop,
3078  "Keep Connected",
3079  "During the Face Attributes correction, merge attributes connected to the same vertex");
3081 
3082  prop = RNA_def_property(srna, "use_mesh_automerge", PROP_BOOLEAN, PROP_NONE);
3083  RNA_def_property_boolean_sdna(prop, NULL, "automerge", AUTO_MERGE);
3085  prop, "Auto Merge Vertices", "Automatically merge vertices moved to the same location");
3086  RNA_def_property_ui_icon(prop, ICON_AUTOMERGE_OFF, 1);
3087  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3088 
3089  prop = RNA_def_property(srna, "use_mesh_automerge_and_split", PROP_BOOLEAN, PROP_NONE);
3091  RNA_def_property_ui_text(prop, "Split Edges & Faces", "Automatically split edges and faces");
3092  RNA_def_property_ui_icon(prop, ICON_AUTOMERGE_OFF, 1);
3093  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3094 
3095  prop = RNA_def_property(srna, "use_snap", PROP_BOOLEAN, PROP_NONE);
3096  RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP);
3097  RNA_def_property_ui_text(prop, "Snap", "Snap during transform");
3098  RNA_def_property_ui_icon(prop, ICON_SNAP_OFF, 1);
3099  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3100 
3101  prop = RNA_def_property(srna, "use_snap_align_rotation", PROP_BOOLEAN, PROP_NONE);
3102  RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ROTATE);
3104  prop, "Align Rotation to Target", "Align rotation with the snapping target");
3105  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3106 
3107  prop = RNA_def_property(srna, "use_snap_grid_absolute", PROP_BOOLEAN, PROP_NONE);
3110  prop,
3111  "Absolute Grid Snap",
3112  "Absolute grid alignment while translating (based on the pivot center)");
3113  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3114 
3115  prop = RNA_def_property(srna, "snap_elements", PROP_ENUM, PROP_NONE);
3116  RNA_def_property_enum_bitflag_sdna(prop, NULL, "snap_mode");
3118  RNA_def_property_enum_funcs(prop, NULL, "rna_ToolSettings_snap_mode_set", NULL);
3120  RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap to");
3121  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3122 
3123  /* node editor uses own set of snap modes */
3124  prop = RNA_def_property(srna, "snap_node_element", PROP_ENUM, PROP_NONE);
3125  RNA_def_property_enum_bitflag_sdna(prop, NULL, "snap_node_mode");
3127  RNA_def_property_ui_text(prop, "Snap Node Element", "Type of element to snap to");
3128  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3129 
3130  /* image editor uses own set of snap modes */
3131  prop = RNA_def_property(srna, "snap_uv_element", PROP_ENUM, PROP_NONE);
3132  RNA_def_property_enum_bitflag_sdna(prop, NULL, "snap_uv_mode");
3134  RNA_def_property_ui_text(prop, "Snap UV Element", "Type of element to snap to");
3135  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3136 
3137  prop = RNA_def_property(srna, "snap_target", PROP_ENUM, PROP_NONE);
3138  RNA_def_property_enum_sdna(prop, NULL, "snap_target");
3140  RNA_def_property_ui_text(prop, "Snap Target", "Which part to snap onto the target");
3141  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3142 
3143  prop = RNA_def_property(srna, "use_snap_peel_object", PROP_BOOLEAN, PROP_NONE);
3146  prop, "Snap Peel Object", "Consider objects as whole when finding volume center");
3147  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3148 
3149  prop = RNA_def_property(srna, "use_snap_project", PROP_BOOLEAN, PROP_NONE);
3152  "Project Individual Elements",
3153  "Project individual elements on the surface of other objects");
3154  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3155 
3156  prop = RNA_def_property(srna, "use_snap_backface_culling", PROP_BOOLEAN, PROP_NONE);
3158  RNA_def_property_ui_text(prop, "Backface Culling", "Exclude back facing geometry from snapping");
3159  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3160 
3161  prop = RNA_def_property(srna, "use_snap_self", PROP_BOOLEAN, PROP_NONE);
3163  RNA_def_property_ui_text(prop, "Project onto Self", "Snap onto itself (Edit Mode Only)");
3164  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3165 
3166  prop = RNA_def_property(srna, "use_snap_translate", PROP_BOOLEAN, PROP_NONE);
3168  prop, NULL, "snap_transform_mode_flag", SCE_SNAP_TRANSFORM_MODE_TRANSLATE);
3170  prop, "Use Snap for Translation", "Move is affected by snapping settings");
3171  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3172 
3173  prop = RNA_def_property(srna, "use_snap_rotate", PROP_BOOLEAN, PROP_NONE);
3175  prop, NULL, "snap_transform_mode_flag", SCE_SNAP_TRANSFORM_MODE_ROTATE);
3176  RNA_def_property_boolean_default(prop, false);
3178  prop, "Use Snap for Rotation", "Rotate is affected by the snapping settings");
3179  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3180 
3181  prop = RNA_def_property(srna, "use_snap_scale", PROP_BOOLEAN, PROP_NONE);
3183  prop, NULL, "snap_transform_mode_flag", SCE_SNAP_TRANSFORM_MODE_SCALE);
3184  RNA_def_property_boolean_default(prop, false);
3185  RNA_def_property_ui_text(prop, "Use Snap for Scale", "Scale is affected by snapping settings");
3186  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
3187 
3188  /* Grease Pencil */
3189  prop = RNA_def_property(srna, "use_gpencil_draw_additive", PROP_BOOLEAN, PROP_NONE);
3192  "Use Additive Drawing",
3193  "When creating new frames, the strokes from the previous/active frame "
3194  "are included as the basis for the new one");
3196 
3197  prop = RNA_def_property(srna, "use_gpencil_draw_onback", PROP_BOOLEAN, PROP_NONE);
3200  prop,
3201  "Draw Strokes on Back",
3202  "When draw new strokes, the new stroke is drawn below of all strokes in the layer");
3204 
3205  prop = RNA_def_property(srna, "use_gpencil_thumbnail_list", PROP_BOOLEAN, PROP_NONE);
3208  prop, "Compact List", "Show compact list of color instead of thumbnails");
3210 
3211  prop = RNA_def_property(srna, "use_gpencil_weight_data_add", PROP_BOOLEAN, PROP_NONE);
3214  "Add weight data for new strokes",
3215  "When creating new strokes, the weight data is added according to the "
3216  "current vertex group and weight, "
3217  "if no vertex group selected, weight is not added");
3219 
3220  prop = RNA_def_property(srna, "use_gpencil_automerge_strokes", PROP_BOOLEAN, PROP_NONE);
3222  RNA_def_property_boolean_default(prop, false);
3223  RNA_def_property_ui_icon(prop, ICON_AUTOMERGE_OFF, 1);
3225  prop,
3226  "Automerge",
3227  "Join by distance last drawn stroke with previous strokes in the active layer");
3230 
3231  prop = RNA_def_property(srna, "gpencil_sculpt", PROP_POINTER, PROP_NONE);
3232  RNA_def_property_pointer_sdna(prop, NULL, "gp_sculpt");
3233  RNA_def_property_struct_type(prop, "GPencilSculptSettings");
3235  prop, "Grease Pencil Sculpt", "Settings for stroke sculpting tools and brushes");
3236 
3237  prop = RNA_def_property(srna, "gpencil_interpolate", PROP_POINTER, PROP_NONE);
3238  RNA_def_property_pointer_sdna(prop, NULL, "gp_interpolate");
3239  RNA_def_property_struct_type(prop, "GPencilInterpolateSettings");
3241  prop, "Grease Pencil Interpolate", "Settings for Grease Pencil Interpolation tools");
3242 
3243  /* Grease Pencil - 3D View Stroke Placement */
3244  prop = RNA_def_property(srna, "gpencil_stroke_placement_view3d", PROP_ENUM, PROP_NONE);
3245  RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_v3d_align");
3246  RNA_def_property_enum_items(prop, gpencil_stroke_placement_items);
3247  RNA_def_property_ui_text(prop, "Stroke Placement (3D View)", "");
3249 
3250  prop = RNA_def_property(srna, "gpencil_stroke_snap_mode", PROP_ENUM, PROP_NONE);
3251  RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_v3d_align");
3252  RNA_def_property_enum_items(prop, gpencil_stroke_snap_items);
3253  RNA_def_property_ui_text(prop, "Stroke Snap", "");
3255 
3256  prop = RNA_def_property(srna, "use_gpencil_stroke_endpoints", PROP_BOOLEAN, PROP_NONE);
3258  prop, NULL, "gpencil_v3d_align", GP_PROJECT_DEPTH_STROKE_ENDPOINTS);
3260  prop, "Only Endpoints", "Only use the first and last parts of the stroke for snapping");
3262 
3263  /* Grease Pencil - Select mode Edit */
3264  prop = RNA_def_property(srna, "gpencil_selectmode_edit", PROP_ENUM, PROP_NONE);
3265  RNA_def_property_enum_sdna(prop, NULL, "gpencil_selectmode_edit");
3266  RNA_def_property_enum_items(prop, gpencil_selectmode_items);
3267  RNA_def_property_ui_text(prop, "Select Mode", "");
3270  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_Gpencil_selectmode_update");
3271 
3272  /* Grease Pencil - Select mode Sculpt */
3273  prop = RNA_def_property(srna, "use_gpencil_select_mask_point", PROP_BOOLEAN, PROP_NONE);
3275  prop, NULL, "gpencil_selectmode_sculpt", GP_SCULPT_MASK_SELECTMODE_POINT);
3276  RNA_def_property_ui_text(prop, "Selection Mask", "Only sculpt selected stroke points");
3277  RNA_def_property_ui_icon(prop, ICON_GP_SELECT_POINTS, 0);
3280  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_Gpencil_mask_point_update");
3281 
3282  prop = RNA_def_property(srna, "use_gpencil_select_mask_stroke", PROP_BOOLEAN, PROP_NONE);
3284  prop, NULL, "gpencil_selectmode_sculpt", GP_SCULPT_MASK_SELECTMODE_STROKE);
3285  RNA_def_property_ui_text(prop, "Selection Mask", "Only sculpt selected stroke");
3286  RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0);
3289  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_Gpencil_mask_stroke_update");
3290 
3291  prop = RNA_def_property(srna, "use_gpencil_select_mask_segment", PROP_BOOLEAN, PROP_NONE);
3293  prop, NULL, "gpencil_selectmode_sculpt", GP_SCULPT_MASK_SELECTMODE_SEGMENT);
3295  prop, "Selection Mask", "Only sculpt selected stroke points between other strokes");
3296  RNA_def_property_ui_icon(prop, ICON_GP_SELECT_BETWEEN_STROKES, 0);
3299  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_Gpencil_mask_segment_update");
3300 
3301  /* Grease Pencil - Select mode Vertex Paint */
3302  prop = RNA_def_property(srna, "use_gpencil_vertex_select_mask_point", PROP_BOOLEAN, PROP_NONE);
3304  prop, NULL, "gpencil_selectmode_vertex", GP_VERTEX_MASK_SELECTMODE_POINT);
3305  RNA_def_property_ui_text(prop, "Selection Mask", "Only paint selected stroke points");
3306  RNA_def_property_ui_icon(prop, ICON_GP_SELECT_POINTS, 0);
3310  prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_Gpencil_vertex_mask_point_update");
3311 
3312  prop = RNA_def_property(srna, "use_gpencil_vertex_select_mask_stroke", PROP_BOOLEAN, PROP_NONE);
3314  prop, NULL, "gpencil_selectmode_vertex", GP_VERTEX_MASK_SELECTMODE_STROKE);
3315  RNA_def_property_ui_text(prop, "Selection Mask", "Only paint selected stroke");
3316  RNA_def_property_ui_icon(prop, ICON_GP_SELECT_STROKES, 0);
3320  prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_Gpencil_vertex_mask_stroke_update");
3321 
3322  prop = RNA_def_property(srna, "use_gpencil_vertex_select_mask_segment", PROP_BOOLEAN, PROP_NONE);
3324  prop, NULL, "gpencil_selectmode_vertex", GP_VERTEX_MASK_SELECTMODE_SEGMENT);
3326  prop, "Selection Mask", "Only paint selected stroke points between other strokes");
3327  RNA_def_property_ui_icon(prop, ICON_GP_SELECT_BETWEEN_STROKES, 0);
3331  prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_Gpencil_vertex_mask_segment_update");
3332 
3333  /* Annotations - 2D Views Stroke Placement */
3334  prop = RNA_def_property(srna, "annotation_stroke_placement_view2d", PROP_ENUM, PROP_NONE);
3335  RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_v2d_align");
3336  RNA_def_property_enum_items(prop, annotation_stroke_placement_items);
3337  RNA_def_property_ui_text(prop, "Stroke Placement (2D View)", "");
3339 
3340  /* Annotations - Sequencer Preview Stroke Placement */
3341  prop = RNA_def_property(
3342  srna, "annotation_stroke_placement_sequencer_preview", PROP_ENUM, PROP_NONE);
3343  RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_seq_align");
3344  RNA_def_property_enum_items(prop, annotation_stroke_placement_items);
3345  RNA_def_property_ui_text(prop, "Stroke Placement (Sequencer Preview)", "");
3347 
3348  /* Annotations - Image Editor Stroke Placement */
3349  prop = RNA_def_property(srna, "annotation_stroke_placement_image_editor", PROP_ENUM, PROP_NONE);
3350  RNA_def_property_enum_bitflag_sdna(prop, NULL, "gpencil_ima_align");
3351  RNA_def_property_enum_items(prop, annotation_stroke_placement_items);
3352  RNA_def_property_ui_text(prop, "Stroke Placement (Image Editor)", "");
3354 
3355  /* Annotations - 3D View Stroke Placement */
3356  /* XXX: Do we need to decouple the stroke_endpoints setting too? */
3357  prop = RNA_def_property(srna, "annotation_stroke_placement_view3d", PROP_ENUM, PROP_NONE);
3358  RNA_def_property_enum_bitflag_sdna(prop, NULL, "annotate_v3d_align");
3359  RNA_def_property_enum_items(prop, annotation_stroke_placement_items);
3362  "Annotation Stroke Placement (3D View)",
3363  "How annotation strokes are orientated in 3D space");
3365 
3366  /* Annotations - Stroke Thickness */
3367  prop = RNA_def_property(srna, "annotation_thickness", PROP_INT, PROP_PIXEL);
3368  RNA_def_property_int_sdna(prop, NULL, "annotate_thickness");
3369  RNA_def_property_range(prop, 1, 10);
3370  RNA_def_property_ui_text(prop, "Annotation Stroke Thickness", "Thickness of annotation strokes");
3371  RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
3372 
3373  /* Auto Keying */
3374  prop = RNA_def_property(srna, "use_keyframe_insert_auto", PROP_BOOLEAN, PROP_NONE);
3375  RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
3377  prop, "Auto Keying", "Automatic keyframe insertion for Objects, Bones and Masks");
3378  RNA_def_property_ui_icon(prop, ICON_REC, 0);
3379 
3380  prop = RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
3381  RNA_def_property_enum_bitflag_sdna(prop, NULL, "autokey_mode");
3382  RNA_def_property_enum_items(prop, auto_key_items);
3384  "Auto-Keying Mode",
3385  "Mode of automatic keyframe insertion for Objects, Bones and Masks");
3386 
3387  prop = RNA_def_property(srna, "use_record_with_nla", PROP_BOOLEAN, PROP_NONE);
3390  prop,
3391  "Layered",
3392  "Add a new NLA Track + Strip for every loop/pass made over the animation "
3393  "to allow non-destructive tweaking");
3394 
3395  prop = RNA_def_property(srna, "use_keyframe_insert_keyingset", PROP_BOOLEAN, PROP_NONE);
3398  "Auto Keyframe Insert Keying Set",
3399  "Automatic keyframe insertion using active Keying Set only");
3400  RNA_def_property_ui_icon(prop, ICON_KEYINGSET, 0);
3401 
3402  prop = RNA_def_property(srna, "use_keyframe_cycle_aware", PROP_BOOLEAN, PROP_NONE);
3405  prop,
3406  "Cycle-Aware Keying",
3407  "For channels with cyclic extrapolation, keyframe insertion is automatically "
3408  "remapped inside the cycle time range, and keeps ends in sync");
3409 
3410  /* Keyframing */
3411  prop = RNA_def_property(srna, "keyframe_type", PROP_ENUM, PROP_NONE);
3412  RNA_def_property_enum_sdna(prop, NULL, "keyframe_type");
3415  prop, "New Keyframe Type", "Type of keyframes to create when inserting keyframes");
3416 
3417  /* UV */
3418  prop = RNA_def_property(srna, "uv_select_mode", PROP_ENUM, PROP_NONE);
3419  RNA_def_property_enum_sdna(prop, NULL, "uv_selectmode");
3421  RNA_def_property_ui_text(prop, "UV Selection Mode", "UV selection and display mode");
3423 
3424  prop = RNA_def_property(srna, "use_uv_select_sync", PROP_BOOLEAN, PROP_NONE);
3427  prop, "UV Sync Selection", "Keep UV and edit mode mesh selection in sync");
3428  RNA_def_property_ui_icon(prop, ICON_UV_SYNC_SELECT, 0);
3430 
3431  prop = RNA_def_property(srna, "show_uv_local_view", PROP_BOOLEAN, PROP_NONE);
3434  prop, "UV Local View", "Display only faces with the currently displayed image assigned");
3436 
3437  /* Mesh */
3438  prop = RNA_def_property(srna, "mesh_select_mode", PROP_BOOLEAN, PROP_NONE);
3439  RNA_def_property_boolean_sdna(prop, NULL, "selectmode", 1);
3440  RNA_def_property_array(prop, 3);
3441  RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_editmesh_select_mode_set");
3442  RNA_def_property_ui_text(prop, "Mesh Selection Mode", "Which mesh elements selection works on");
3444  RNA_def_property_update(prop, 0, "rna_Scene_editmesh_select_mode_update");
3445 
3446  prop = RNA_def_property(srna, "vertex_group_weight", PROP_FLOAT, PROP_FACTOR);
3447  RNA_def_property_float_sdna(prop, NULL, "vgroup_weight");
3448  RNA_def_property_ui_text(prop, "Vertex Group Weight", "Weight to assign in vertex groups");
3449 
3450  prop = RNA_def_property(srna, "use_edge_path_live_unwrap", PROP_BOOLEAN, PROP_NONE);
3451  RNA_def_property_boolean_sdna(prop, NULL, "edge_mode_live_unwrap", 1);
3452  RNA_def_property_ui_text(prop, "Live Unwrap", "Changing edge seams recalculates UV unwrap");
3453 
3454  prop = RNA_def_property(srna, "normal_vector", PROP_FLOAT, PROP_XYZ);
3455  RNA_def_property_ui_text(prop, "Normal Vector", "Normal Vector used to copy, add or multiply");
3456  RNA_def_property_ui_range(prop, -10000.0, 10000.0, 1, 3);
3457 
3458  /* Unified Paint Settings */
3459  prop = RNA_def_property(srna, "unified_paint_settings", PROP_POINTER, PROP_NONE);
3461  RNA_def_property_struct_type(prop, "UnifiedPaintSettings");
3462  RNA_def_property_ui_text(prop, "Unified Paint Settings", NULL);
3463 
3464  /* Curve Paint Settings */
3465  prop = RNA_def_property(srna, "curve_paint_settings", PROP_POINTER, PROP_NONE);
3467  RNA_def_property_struct_type(prop, "CurvePaintSettings");
3468  RNA_def_property_ui_text(prop, "Curve Paint Settings", NULL);
3469 
3470  /* Mesh Statistics */
3471  prop = RNA_def_property(srna, "statvis", PROP_POINTER, PROP_NONE);
3473  RNA_def_property_struct_type(prop, "MeshStatVis");
3474  RNA_def_property_ui_text(prop, "Mesh Statistics Visualization", NULL);
3475 
3476  /* CurveProfile */
3477  prop = RNA_def_property(srna, "custom_bevel_profile_preset", PROP_POINTER, PROP_NONE);
3478  RNA_def_property_pointer_sdna(prop, NULL, "custom_bevel_profile_preset");
3479  RNA_def_property_struct_type(prop, "CurveProfile");
3480  RNA_def_property_ui_text(prop, "Curve Profile Widget", "Used for defining a profile's path");
3481 
3482  /* Sequencer tool settings */
3483  prop = RNA_def_property(srna, "sequencer_tool_settings", PROP_POINTER, PROP_NONE);
3485  RNA_def_property_struct_type(prop, "SequencerToolSettings");
3486  RNA_def_property_ui_text(prop, "Sequencer Tool Settings", NULL);
3487 }
3488 
3490 {
3491  StructRNA *srna;
3492  PropertyRNA *prop;
3493 
3494  static const EnumPropertyItem scale_fit_methods[] = {
3495  {SEQ_SCALE_TO_FIT, "FIT", 0, "Scale to Fit", "Scale image to fit within the canvas"},
3496  {SEQ_SCALE_TO_FILL, "FILL", 0, "Scale to Fill", "Scale image to completely fill the canvas"},
3497  {SEQ_STRETCH_TO_FILL, "STRETCH", 0, "Stretch to Fill", "Stretch image to fill the canvas"},
3499  "ORIGINAL",
3500  0,
3501  "Use Original Size",
3502  "Keep image at its original size"},
3503  {0, NULL, 0, NULL, NULL},
3504  };
3505 
3506  srna = RNA_def_struct(brna, "SequencerToolSettings", NULL);
3507  RNA_def_struct_path_func(srna, "rna_SequencerToolSettings_path");
3508  RNA_def_struct_ui_text(srna, "Sequencer Tool Settings", "");
3509 
3510  prop = RNA_def_property(srna, "fit_method", PROP_ENUM, PROP_NONE);
3512  RNA_def_property_ui_text(prop, "Fit Method", "Scale fit method");
3513 }
3514 
3516 {
3517  StructRNA *srna;
3518  PropertyRNA *prop;
3519 
3520  static const EnumPropertyItem brush_size_unit_items[] = {
3521  {0, "VIEW", 0, "View", "Measure brush size relative to the view"},
3523  "SCENE",
3524  0,
3525  "Scene",
3526  "Measure brush size relative to the scene"},
3527  {0, NULL, 0, NULL, NULL},
3528  };
3529 
3530  srna = RNA_def_struct(brna, "UnifiedPaintSettings", NULL);
3531  RNA_def_struct_path_func(srna, "rna_UnifiedPaintSettings_path");
3533  srna, "Unified Paint Settings", "Overrides for some of the active brush's settings");
3534 
3535  /* high-level flags to enable or disable unified paint settings */
3536  prop = RNA_def_property(srna, "use_unified_size", PROP_BOOLEAN, PROP_NONE);
3539  "Use Unified Radius",
3540  "Instead of per-brush radius, the radius is shared across brushes");
3541 
3542  prop = RNA_def_property(srna, "use_unified_strength", PROP_BOOLEAN, PROP_NONE);
3545  "Use Unified Strength",
3546  "Instead of per-brush strength, the strength is shared across brushes");
3547 
3548  prop = RNA_def_property(srna, "use_unified_weight", PROP_BOOLEAN, PROP_NONE);
3551  "Use Unified Weight",
3552  "Instead of per-brush weight, the weight is shared across brushes");
3553 
3554  prop = RNA_def_property(srna, "use_unified_color", PROP_BOOLEAN, PROP_NONE);
3557  prop, "Use Unified Color", "Instead of per-brush color, the color is shared across brushes");
3558 
3559  /* unified paint settings that override the equivalent settings
3560  * from the active brush */
3561  prop = RNA_def_property(srna, "size", PROP_INT, PROP_PIXEL);
3562  RNA_def_property_int_funcs(prop, NULL, "rna_UnifiedPaintSettings_size_set", NULL);
3566  RNA_def_property_ui_text(prop, "Radius", "Radius of the brush");
3567  RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_radius_update");
3568 
3569  prop = RNA_def_property(srna, "unprojected_radius", PROP_FLOAT, PROP_DISTANCE);
3571  prop, NULL, "rna_UnifiedPaintSettings_unprojected_radius_set", NULL);
3573  RNA_def_property_range(prop, 0.001, FLT_MAX);
3574  RNA_def_property_ui_range(prop, 0.001, 1, 1, -1);
3575  RNA_def_property_ui_text(prop, "Unprojected Radius", "Radius of brush in Blender units");
3576  RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_radius_update");
3577 
3578  prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
3579  RNA_def_property_float_sdna(prop, NULL, "alpha");
3581  RNA_def_property_range(prop, 0.0f, 10.0f);
3582  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
3584  prop, "Strength", "How powerful the effect of the brush is when applied");
3585  RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_update");
3586 
3587  prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR);
3588  RNA_def_property_float_sdna(prop, NULL, "weight");
3590  RNA_def_property_range(prop, 0.0f, 1.0f);
3591  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3);
3592  RNA_def_property_ui_text(prop, "Weight", "Weight to assign in vertex groups");
3593  RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_update");
3594 
3595  prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
3597  RNA_def_property_range(prop, 0.0, 1.0);
3598  RNA_def_property_float_sdna(prop, NULL, "rgb");
3599  RNA_def_property_ui_text(prop, "Color", "");
3600  RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_update");
3601 
3602  prop = RNA_def_property(srna, "secondary_color", PROP_FLOAT, PROP_COLOR_GAMMA);
3604  RNA_def_property_range(prop, 0.0, 1.0);
3605  RNA_def_property_float_sdna(prop, NULL, "secondary_rgb");
3606  RNA_def_property_ui_text(prop, "Secondary Color", "");
3607  RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_update");
3608 
3609  prop = RNA_def_property(srna, "use_locked_size", PROP_ENUM, PROP_NONE); /* as an enum */
3611  RNA_def_property_enum_items(prop, brush_size_unit_items);
3613  prop, "Radius Unit", "Measure brush size relative to the view or the scene");
3614 }
3615 
3617 {
3618  StructRNA *srna;
3619  PropertyRNA *prop;
3620 
3621  srna = RNA_def_struct(brna, "CurvePaintSettings", NULL);
3622  RNA_def_struct_path_func(srna, "rna_CurvePaintSettings_path");
3623  RNA_def_struct_ui_text(srna, "Curve Paint Settings", "");
3624 
3625  static const EnumPropertyItem curve_type_items[] = {
3626  {CU_POLY, "POLY", 0, "Poly", ""},
3627  {CU_BEZIER, "BEZIER", 0, "Bezier", ""},
3628  {0, NULL, 0, NULL, NULL},
3629  };
3630 
3631  prop = RNA_def_property(srna, "curve_type", PROP_ENUM, PROP_NONE);
3632  RNA_def_property_enum_sdna(prop, NULL, "curve_type");
3634  RNA_def_property_ui_text(prop, "Type", "Type of curve to use for new strokes");
3635 
3636  prop = RNA_def_property(srna, "use_corners_detect", PROP_BOOLEAN, PROP_NONE);
3638  RNA_def_property_ui_text(prop, "Detect Corners", "Detect corners and use non-aligned handles");
3639 
3640  prop = RNA_def_property(srna, "use_pressure_radius", PROP_BOOLEAN, PROP_NONE);
3642  RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
3643  RNA_def_property_ui_text(prop, "Use Pressure", "Map tablet pressure to curve radius");
3644 
3645  prop = RNA_def_property(srna, "use_stroke_endpoints", PROP_BOOLEAN, PROP_NONE);
3647  RNA_def_property_ui_text(prop, "Only First", "Use the start of the stroke for the depth");
3648 
3649  prop = RNA_def_property(srna, "use_offset_absolute", PROP_BOOLEAN, PROP_NONE);
3652  prop, "Absolute Offset", "Apply a fixed offset (don't scale by the radius)");
3653 
3654  prop = RNA_def_property(srna, "error_threshold", PROP_INT, PROP_PIXEL);
3655  RNA_def_property_range(prop, 1, 100);
3656  RNA_def_property_ui_text(prop, "Tolerance", "Allow deviation for a smoother, less precise line");
3657 
3658  prop = RNA_def_property(srna, "fit_method", PROP_ENUM, PROP_PIXEL);
3659  RNA_def_property_enum_sdna(prop, NULL, "fit_method");
3661  RNA_def_property_ui_text(prop, "Method", "Curve fitting method");
3662 
3663  prop = RNA_def_property(srna, "corner_angle", PROP_FLOAT, PROP_ANGLE);
3664  RNA_def_property_range(prop, 0, M_PI);
3665  RNA_def_property_ui_text(prop, "Corner Angle", "Angles above this are considered corners");
3666 
3667  prop = RNA_def_property(srna, "radius_min", PROP_FLOAT, PROP_NONE);
3668  RNA_def_property_range(prop, 0.0, 100.0);
3669  RNA_def_property_ui_range(prop, 0.0f, 10.0, 10, 2);
3671  prop,
3672  "Radius Min",
3673  "Minimum radius when the minimum pressure is applied (also the minimum when tapering)");
3674 
3675  prop = RNA_def_property(srna, "radius_max", PROP_FLOAT, PROP_NONE);
3676  RNA_def_property_range(prop, 0.0, 100.0);
3677  RNA_def_property_ui_range(prop, 0.0f, 10.0, 10, 2);
3679  prop,
3680  "Radius Max",
3681  "Radius to use when the maximum pressure is applied (or when a tablet isn't used)");
3682 
3683  prop = RNA_def_property(srna, "radius_taper_start", PROP_FLOAT, PROP_NONE);
3684  RNA_def_property_range(prop, 0.0, 1.0);
3685  RNA_def_property_ui_range(prop, 0.0f, 1.0, 1, 2);
3687  prop, "Radius Min", "Taper factor for the radius of each point along the curve");
3688 
3689  prop = RNA_def_property(srna, "radius_taper_end", PROP_FLOAT, PROP_NONE);
3690  RNA_def_property_range(prop, 0.0, 10.0);
3691  RNA_def_property_ui_range(prop, 0.0f, 1.0, 1, 2);
3693  prop, "Radius Max", "Taper factor for the radius of each point along the curve");
3694 
3695  prop = RNA_def_property(srna, "surface_offset", PROP_FLOAT, PROP_NONE);
3696  RNA_def_property_range(prop, -10.0, 10.0);
3697  RNA_def_property_ui_range(prop, -1.0f, 1.0, 1, 2);
3698  RNA_def_property_ui_text(prop, "Offset", "Offset the stroke from the surface");
3699 
3700  static const EnumPropertyItem depth_mode_items[] = {
3701  {CURVE_PAINT_PROJECT_CURSOR, "CURSOR", 0, "Cursor", ""},
3702  {CURVE_PAINT_PROJECT_SURFACE, "SURFACE", 0, "Surface", ""},
3703  {0, NULL, 0, NULL, NULL},
3704  };
3705 
3706  prop = RNA_def_property(srna, "depth_mode", PROP_ENUM, PROP_NONE);
3707  RNA_def_property_enum_sdna(prop, NULL, "depth_mode");
3708  RNA_def_property_enum_items(prop, depth_mode_items);
3709  RNA_def_property_ui_text(prop, "Depth", "Method of projecting depth");
3710 
3711  static const EnumPropertyItem surface_plane_items[] = {
3713  "NORMAL_VIEW",
3714  0,
3715  "Normal/View",
3716  "Display perpendicular to the surface"},
3718  "NORMAL_SURFACE",
3719  0,
3720  "Normal/Surface",
3721  "Display aligned to the surface"},
3722  {CURVE_PAINT_SURFACE_PLANE_VIEW, "VIEW", 0, "View", "Display aligned to the viewport"},
3723  {0, NULL, 0, NULL, NULL},
3724  };
3725 
3726  prop = RNA_def_property(srna, "surface_plane", PROP_ENUM, PROP_NONE);
3727  RNA_def_property_enum_sdna(prop, NULL, "surface_plane");
3728  RNA_def_property_enum_items(prop, surface_plane_items);
3729  RNA_def_property_ui_text(prop, "Plane", "Plane for projected stroke");
3730 }
3731 
3732 static void rna_def_statvis(BlenderRNA *brna)
3733 {
3734  StructRNA *srna;
3735  PropertyRNA *prop;
3736 
3737  static const EnumPropertyItem stat_type[] = {
3738  {SCE_STATVIS_OVERHANG, "OVERHANG", 0, "Overhang", ""},
3739  {SCE_STATVIS_THICKNESS, "THICKNESS", 0, "Thickness", ""},
3740  {SCE_STATVIS_INTERSECT, "INTERSECT", 0, "Intersect", ""},
3741  {SCE_STATVIS_DISTORT, "DISTORT", 0, "Distortion", ""},
3742  {SCE_STATVIS_SHARP, "SHARP", 0, "Sharp", ""},
3743  {0, NULL, 0, NULL, NULL},
3744  };
3745 
3746  srna = RNA_def_struct(brna, "MeshStatVis", NULL);
3747  RNA_def_struct_path_func(srna, "rna_MeshStatVis_path");
3748  RNA_def_struct_ui_text(srna, "Mesh Visualize Statistics", "");
3749 
3750  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
3751  RNA_def_property_enum_items(prop, stat_type);
3752  RNA_def_property_ui_text(prop, "Type", "Type of data to visualize/check");
3754  RNA_def_property_update(prop, 0, "rna_EditMesh_update");
3755 
3756  /* overhang */
3757  prop = RNA_def_property(srna, "overhang_min", PROP_FLOAT, PROP_ANGLE);
3758  RNA_def_property_float_sdna(prop, NULL, "overhang_min");
3759  RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f));
3760  RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 10, 3);
3761  RNA_def_property_ui_text(prop, "Overhang Min", "Minimum angle to display");
3763  RNA_def_property_update(prop, 0, "rna_EditMesh_update");
3764 
3765  prop = RNA_def_property(srna, "overhang_max", PROP_FLOAT, PROP_ANGLE);
3766  RNA_def_property_float_sdna(prop, NULL, "overhang_max");
3767  RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f));
3768  RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 10, 3);
3769  RNA_def_property_ui_text(prop, "Overhang Max", "Maximum angle to display");
3771  RNA_def_property_update(prop, 0, "rna_EditMesh_update");
3772 
3773  prop = RNA_def_property(srna, "overhang_axis", PROP_ENUM, PROP_NONE);
3774  RNA_def_property_enum_sdna(prop, NULL, "overhang_axis");
3776  RNA_def_property_ui_text(prop, "Axis", "");
3778  RNA_def_property_update(prop, 0, "rna_EditMesh_update");
3779 
3780  /* thickness */
3781  prop = RNA_def_property(srna, "thickness_min", PROP_FLOAT, PROP_DISTANCE);
3782  RNA_def_property_float_sdna(prop, NULL, "thickness_min");
3783  RNA_def_property_range(prop, 0.0f, 1000.0);
3784  RNA_def_property_ui_range(prop, 0.0f, 100.0, 0.001, 3);
3785  RNA_def_property_ui_text(prop, "Thickness Min", "Minimum for measuring thickness");
3787  RNA_def_property_update(prop, 0, "rna_EditMesh_update");
3788 
3789  prop = RNA_def_property(srna, "thickness_max", PROP_FLOAT, PROP_DISTANCE);
3790  RNA_def_property_float_sdna(prop, NULL, "thickness_max");
3791  RNA_def_property_range(prop, 0.0f, 1000.0);
3792  RNA_def_property_ui_range(prop, 0.0f, 100.0, 0.001, 3);
3793  RNA_def_property_ui_text(prop, "Thickness Max", "Maximum for measuring thickness");
3795  RNA_def_property_update(prop, 0, "rna_EditMesh_update");
3796 
3797  prop = RNA_def_property(srna, "thickness_samples", PROP_INT, PROP_UNSIGNED);
3798  RNA_def_property_int_sdna(prop, NULL, "thickness_samples");
3799  RNA_def_property_range(prop, 1, 32);
3800  RNA_def_property_ui_text(prop, "Samples", "Number of samples to test per face");
3802  RNA_def_property_update(prop, 0, "rna_EditMesh_update");
3803 
3804  /* distort */
3805  prop = RNA_def_property(srna, "distort_min", PROP_FLOAT, PROP_ANGLE);
3806  RNA_def_property_float_sdna(prop, NULL, "distort_min");
3807  RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f));
3808  RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 10, 3);
3809  RNA_def_property_ui_text(prop, "Distort Min", "Minimum angle to display");
3811  RNA_def_property_update(prop, 0, "rna_EditMesh_update");
3812 
3813  prop = RNA_def_property(srna, "distort_max", PROP_FLOAT, PROP_ANGLE);
3814  RNA_def_property_float_sdna(prop, NULL, "distort_max");
3815  RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f));
3816  RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 10, 3);
3817  RNA_def_property_ui_text(prop, "Distort Max", "Maximum angle to display");
3819  RNA_def_property_update(prop, 0, "rna_EditMesh_update");
3820 
3821  /* sharp */
3822  prop = RNA_def_property(srna, "sharp_min", PROP_FLOAT, PROP_ANGLE);
3823  RNA_def_property_float_sdna(prop, NULL, "sharp_min");
3824  RNA_def_property_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f));
3825  RNA_def_property_ui_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f), 10, 3);
3826  RNA_def_property_ui_text(prop, "Distort Min", "Minimum angle to display");
3828  RNA_def_property_update(prop, 0, "rna_EditMesh_update");
3829 
3830  prop = RNA_def_property(srna, "sharp_max", PROP_FLOAT, PROP_ANGLE);
3831  RNA_def_property_float_sdna(prop, NULL, "sharp_max");
3832  RNA_def_property_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f));
3833  RNA_def_property_ui_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f), 10, 3);
3834  RNA_def_property_ui_text(prop, "Distort Max", "Maximum angle to display");
3836  RNA_def_property_update(prop, 0, "rna_EditMesh_update");
3837 }
3838 
3840 {
3841  StructRNA *srna;
3842  PropertyRNA *prop;
3843 
3844  static const EnumPropertyItem unit_systems[] = {
3845  {USER_UNIT_NONE, "NONE", 0, "None", ""},
3846  {USER_UNIT_METRIC, "METRIC", 0, "Metric", ""},
3847  {USER_UNIT_IMPERIAL, "IMPERIAL", 0, "Imperial", ""},
3848  {0, NULL, 0, NULL, NULL},
3849  };
3850 
3851  static const EnumPropertyItem rotation_units[] = {
3852  {0, "DEGREES", 0, "Degrees", "Use degrees for measuring angles and rotations"},
3853  {USER_UNIT_ROT_RADIANS, "RADIANS", 0, "Radians", ""},
3854  {0, NULL, 0, NULL, NULL},
3855  };
3856 
3857  srna = RNA_def_struct(brna, "UnitSettings", NULL);
3858  RNA_def_struct_ui_text(srna, "Unit Settings", "");
3859  RNA_def_struct_nested(brna, srna, "Scene");
3860  RNA_def_struct_path_func(srna, "rna_UnitSettings_path");
3861 
3862  /* Units */
3863  prop = RNA_def_property(srna, "system", PROP_ENUM, PROP_NONE);
3864  RNA_def_property_enum_items(prop, unit_systems);
3866  prop, "Unit System", "The unit system to use for user interface controls");
3867  RNA_def_property_update(prop, NC_WINDOW, "rna_UnitSettings_system_update");
3868 
3869  prop = RNA_def_property(srna, "system_rotation", PROP_ENUM, PROP_NONE);
3870  RNA_def_property_enum_items(prop, rotation_units);
3872  prop, "Rotation Units", "Unit to use for displaying/editing rotation values");
3874 
3875  prop = RNA_def_property(srna, "scale_length", PROP_FLOAT, PROP_UNSIGNED);
3877  prop,
3878  "Unit Scale",
3879  "Scale to use when converting between blender units and dimensions."
3880  " When working at microscopic or astronomical scale, a small or large unit scale"
3881  " respectively can be used to avoid numerical precision problems");
3882  RNA_def_property_range(prop, 1e-9f, 1e+9f);
3883  RNA_def_property_ui_range(prop, 0.001, 100.0, 0.1, 6);
3885 
3886  prop = RNA_def_property(srna, "use_separate", PROP_BOOLEAN, PROP_NONE);
3888  RNA_def_property_ui_text(prop, "Separate Units", "Display units in pairs (e.g. 1m 0cm)");
3890 
3891  prop = RNA_def_property(srna, "length_unit", PROP_ENUM, PROP_NONE);
3893  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_UnitSettings_length_unit_itemf");
3894  RNA_def_property_ui_text(prop, "Length Unit", "Unit that will be used to display length values");
3896 
3897  prop = RNA_def_property(srna, "mass_unit", PROP_ENUM, PROP_NONE);
3899  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_UnitSettings_mass_unit_itemf");
3900  RNA_def_property_ui_text(prop, "Mass Unit", "Unit that will be used to display mass values");
3902 
3903  prop = RNA_def_property(srna, "time_unit", PROP_ENUM, PROP_NONE);
3905  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_UnitSettings_time_unit_itemf");
3906  RNA_def_property_ui_text(prop, "Time Unit", "Unit that will be used to display time values");
3908 
3909  prop = RNA_def_property(srna, "temperature_unit", PROP_ENUM, PROP_NONE);
3911  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_UnitSettings_temperature_unit_itemf");
3913  prop, "Temperature Unit", "Unit that will be used to display temperature values");
3915 }
3916 
3918 {
3919  StructRNA *srna;
3920  PropertyRNA *prop;
3921  srna = RNA_def_struct(brna, "ViewLayerEEVEE", NULL);
3922  RNA_def_struct_ui_text(srna, "Eevee Settings", "View layer settings for Eevee");
3923 
3924  prop = RNA_def_property(srna, "use_pass_volume_direct", PROP_BOOLEAN, PROP_NONE);
3926  RNA_def_property_ui_text(prop, "Volume Light", "Deliver volume direct light pass");
3927  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
3928 
3929  prop = RNA_def_property(srna, "use_pass_bloom", PROP_BOOLEAN, PROP_NONE);
3931  RNA_def_property_ui_text(prop, "Bloom", "Deliver bloom pass");
3932  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
3933 }
3934 
3936 {
3937  StructRNA *srna;
3938  /* PropertyRNA *prop; */
3939 
3940  FunctionRNA *func;
3941  PropertyRNA *parm;
3942 
3943  RNA_def_property_srna(cprop, "AOVs");
3944  srna = RNA_def_struct(brna, "AOVs", NULL);
3945  RNA_def_struct_sdna(srna, "ViewLayer");
3946  RNA_def_struct_ui_text(srna, "List of AOVs", "Collection of AOVs");
3947 
3948  func = RNA_def_function(srna, "add", "BKE_view_layer_add_aov");
3949  parm = RNA_def_pointer(func, "aov", "AOV", "", "Newly created AOV");
3950  RNA_def_function_return(func, parm);
3951 }
3952 
3954 {
3955  StructRNA *srna;
3956  PropertyRNA *prop;
3957  srna = RNA_def_struct(brna, "AOV", NULL);
3958  RNA_def_struct_sdna(srna, "ViewLayerAOV");
3959  RNA_def_struct_ui_text(srna, "Shader AOV", "");
3960 
3961  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
3962  RNA_def_property_string_sdna(prop, NULL, "name");
3964  RNA_def_property_ui_text(prop, "Name", "Name of the AOV");
3965  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
3966  RNA_def_struct_name_property(srna, prop);
3967 
3968  prop = RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
3970  RNA_def_property_ui_text(prop, "Valid", "Is the name of the AOV conflicting");
3971 
3972  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
3973  RNA_def_property_enum_sdna(prop, NULL, "type");
3976  RNA_def_property_ui_text(prop, "Type", "Data type of the AOV");
3977  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
3978 }
3979 
3980 void rna_def_view_layer_common(BlenderRNA *brna, StructRNA *srna, const bool scene)
3981 {
3982  PropertyRNA *prop;
3983 
3984  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
3985  if (scene) {
3986  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_ViewLayer_name_set");
3987  }
3988  else {
3989  RNA_def_property_string_sdna(prop, NULL, "name");
3990  }
3991  RNA_def_property_ui_text(prop, "Name", "View layer name");
3992  RNA_def_struct_name_property(srna, prop);
3993  if (scene) {
3995  }
3996  else {
3998  }
3999 
4000  if (scene) {
4001  prop = RNA_def_property(srna, "material_override", PROP_POINTER, PROP_NONE);
4002  RNA_def_property_pointer_sdna(prop, NULL, "mat_override");
4003  RNA_def_property_struct_type(prop, "Material");
4007  prop, "Material Override", "Material to override all other materials in this view layer");
4009  prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_material_override_update");
4010 
4011  prop = RNA_def_property(srna, "samples", PROP_INT, PROP_UNSIGNED);
4013  "Samples",
4014  "Override number of render samples for this view layer, "
4015  "0 will use the scene setting");
4017 
4018  prop = RNA_def_property(srna, "pass_alpha_threshold", PROP_FLOAT, PROP_FACTOR);
4020  prop,
4021  "Alpha Threshold",
4022  "Z, Index, normal, UV and vector passes are only affected by surfaces with "
4023  "alpha transparency equal to or higher than this threshold");
4025 
4026  prop = RNA_def_property(srna, "eevee", PROP_POINTER, PROP_NONE);
4028  RNA_def_property_struct_type(prop, "ViewLayerEEVEE");
4029  RNA_def_property_ui_text(prop, "Eevee Settings", "View layer settings for Eevee");
4030 
4031  prop = RNA_def_property(srna, "aovs", PROP_COLLECTION, PROP_NONE);
4032  RNA_def_property_collection_sdna(prop, NULL, "aovs", NULL);
4033  RNA_def_property_struct_type(prop, "AOV");
4034  RNA_def_property_ui_text(prop, "Shader AOV", "");
4035  rna_def_view_layer_aovs(brna, prop);
4036 
4037  prop = RNA_def_property(srna, "active_aov", PROP_POINTER, PROP_NONE);
4038  RNA_def_property_struct_type(prop, "AOV");
4040  RNA_def_property_ui_text(prop, "Shader AOV", "Active AOV");
4041 
4042  prop = RNA_def_property(srna, "active_aov_index", PROP_INT, PROP_UNSIGNED);
4044  "rna_ViewLayer_active_aov_index_get",
4045  "rna_ViewLayer_active_aov_index_set",
4046  "rna_ViewLayer_active_aov_index_range");
4047  RNA_def_property_ui_text(prop, "Active AOV Index", "Index of active aov");
4049 
4050  prop = RNA_def_property(srna, "use_pass_cryptomatte_object", PROP_BOOLEAN, PROP_NONE);
4053  prop,
4054  "Cryptomatte Object",
4055  "Render cryptomatte object pass, for isolating objects in compositing");
4056  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4057 
4058  prop = RNA_def_property(srna, "use_pass_cryptomatte_material", PROP_BOOLEAN, PROP_NONE);
4061  prop,
4062  "Cryptomatte Material",
4063  "Render cryptomatte material pass, for isolating materials in compositing");
4064  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4065 
4066  prop = RNA_def_property(srna, "use_pass_cryptomatte_asset", PROP_BOOLEAN, PROP_NONE);
4069  prop,
4070  "Cryptomatte Asset",
4071  "Render cryptomatte asset pass, for isolating groups of objects with the same parent");
4072  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4073 
4074  prop = RNA_def_property(srna, "pass_cryptomatte_depth", PROP_INT, PROP_NONE);
4075  RNA_def_property_int_sdna(prop, NULL, "cryptomatte_levels");
4077  RNA_def_property_range(prop, 2.0, 16.0);
4079  prop, "Cryptomatte Levels", "Sets how many unique objects can be distinguished per pixel");
4080  RNA_def_property_ui_range(prop, 2.0, 16.0, 2.0, 0.0);
4081  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4082 
4083  prop = RNA_def_property(srna, "use_pass_cryptomatte_accurate", PROP_BOOLEAN, PROP_NONE);
4087  prop, "Cryptomatte Accurate", "Generate a more accurate cryptomatte pass");
4088  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4089  }
4090 
4091  /* layer options */
4092  prop = RNA_def_property(srna, "use_zmask", PROP_BOOLEAN, PROP_NONE);
4094  RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of the solid z values");
4095  if (scene) {
4096  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
4097  }
4098  else {
4100  }
4101 
4102  prop = RNA_def_property(srna, "invert_zmask", PROP_BOOLEAN, PROP_NONE);
4105  prop,
4106  "Zmask Negate",
4107  "For Zmask, only render what is behind solid z values instead of in front");
4108  if (scene) {
4109  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
4110  }
4111  else {
4113  }
4114 
4115  prop = RNA_def_property(srna, "use_all_z", PROP_BOOLEAN, PROP_NONE);
4118  prop, "All Z", "Fill in Z values for solid faces in invisible layers, for masking");
4119  if (scene) {
4121  }
4122  else {
4124  }
4125 
4126  prop = RNA_def_property(srna, "use_solid", PROP_BOOLEAN, PROP_NONE);
4128  RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Layer");
4129  if (scene) {
4131  }
4132  else {
4134  }
4135 
4136  prop = RNA_def_property(srna, "use_halo", PROP_BOOLEAN, PROP_NONE);
4137  RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_HALO);
4138  RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on top of Solid)");
4139  if (scene) {
4141  }
4142  else {
4144  }
4145 
4146  prop = RNA_def_property(srna, "use_ztransp", PROP_BOOLEAN, PROP_NONE);
4147  RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZTRA);
4149  "Z-Transparent",
4150  "Render Z-transparent faces in this layer (on top of Solid and Halos)");
4151  if (scene) {
4153  }
4154  else {
4156  }
4157 
4158  prop = RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
4159  RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SKY);
4160  RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer");
4161  if (scene) {
4162  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
4163  }
4164  else {
4166  }
4167 
4168  prop = RNA_def_property(srna, "use_ao", PROP_BOOLEAN, PROP_NONE);
4169  RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_AO);
4170  RNA_def_property_ui_text(prop, "Ambient Occlusion", "Render Ambient Occlusion in this Layer");
4171  if (scene) {
4172  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
4173  }
4174  else {
4176  }
4177 
4178  prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NONE);
4179  RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE);
4181  prop, "Edge", "Render edge-enhance in this layer (only works for solid faces)");
4182  if (scene) {
4184  }
4185  else {
4187  }
4188 
4189  prop = RNA_def_property(srna, "use_strand", PROP_BOOLEAN, PROP_NONE);
4191  RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer");
4192  if (scene) {
4194  }
4195  else {
4197  }
4198 
4199  prop = RNA_def_property(srna, "use_volumes", PROP_BOOLEAN, PROP_NONE);
4201  RNA_def_property_ui_text(prop, "Volumes", "Render volumes in this Layer");
4202  if (scene) {
4204  }
4205  else {
4207  }
4208 
4209  /* passes */
4210  prop = RNA_def_property(srna, "use_pass_combined", PROP_BOOLEAN, PROP_NONE);
4212  RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA buffer");
4213  if (scene) {
4214  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4215  }
4216  else {
4218  }
4219 
4220  prop = RNA_def_property(srna, "use_pass_z", PROP_BOOLEAN, PROP_NONE);
4221  RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z);
4222  RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass");
4223  if (scene) {
4224  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4225  }
4226  else {
4228  }
4229 
4230  prop = RNA_def_property(srna, "use_pass_vector", PROP_BOOLEAN, PROP_NONE);
4232  RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass");
4233  if (scene) {
4234  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4235  }
4236  else {
4238  }
4239 
4240  prop = RNA_def_property(srna, "use_pass_normal", PROP_BOOLEAN, PROP_NONE);
4242  RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass");
4243  if (scene) {
4244  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4245  }
4246  else {
4248  }
4249 
4250  prop = RNA_def_property(srna, "use_pass_uv", PROP_BOOLEAN, PROP_NONE);
4251  RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV);
4252  RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass");
4253  if (scene) {
4254  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4255  }
4256  else {
4258  }
4259 
4260  prop = RNA_def_property(srna, "use_pass_mist", PROP_BOOLEAN, PROP_NONE);
4261  RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST);
4262  RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0 to 1.0)");
4263  if (scene) {
4264  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4265  }
4266  else {
4268  }
4269 
4270  prop = RNA_def_property(srna, "use_pass_object_index", PROP_BOOLEAN, PROP_NONE);
4272  RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pass");
4273  if (scene) {
4274  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4275  }
4276  else {
4278  }
4279 
4280  prop = RNA_def_property(srna, "use_pass_material_index", PROP_BOOLEAN, PROP_NONE);
4282  RNA_def_property_ui_text(prop, "Material Index", "Deliver material index pass");
4283  if (scene) {
4284  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4285  }
4286  else {
4288  }
4289 
4290  prop = RNA_def_property(srna, "use_pass_shadow", PROP_BOOLEAN, PROP_NONE);
4292  RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass");
4293  if (scene) {
4294  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4295  }
4296  else {
4298  }
4299 
4300  prop = RNA_def_property(srna, "use_pass_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
4301  RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO);
4302  RNA_def_property_ui_text(prop, "Ambient Occlusion", "Deliver Ambient Occlusion pass");
4303  if (scene) {
4304  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4305  }
4306  else {
4308  }
4309 
4310  prop = RNA_def_property(srna, "use_pass_emit", PROP_BOOLEAN, PROP_NONE);
4311  RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_EMIT);
4312  RNA_def_property_ui_text(prop, "Emit", "Deliver emission pass");
4313  if (scene) {
4314  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4315  }
4316  else {
4318  }
4319 
4320  prop = RNA_def_property(srna, "use_pass_environment", PROP_BOOLEAN, PROP_NONE);
4322  RNA_def_property_ui_text(prop, "Environment", "Deliver environment lighting pass");
4323  if (scene) {
4324  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4325  }
4326  else {
4328  }
4329 
4330  prop = RNA_def_property(srna, "use_pass_diffuse_direct", PROP_BOOLEAN, PROP_NONE);
4332  RNA_def_property_ui_text(prop, "Diffuse Direct", "Deliver diffuse direct pass");
4333  if (scene) {
4334  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4335  }
4336  else {
4338  }
4339 
4340  prop = RNA_def_property(srna, "use_pass_diffuse_indirect", PROP_BOOLEAN, PROP_NONE);
4342  RNA_def_property_ui_text(prop, "Diffuse Indirect", "Deliver diffuse indirect pass");
4343  if (scene) {
4344  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4345  }
4346  else {
4348  }
4349 
4350  prop = RNA_def_property(srna, "use_pass_diffuse_color", PROP_BOOLEAN, PROP_NONE);
4352  RNA_def_property_ui_text(prop, "Diffuse Color", "Deliver diffuse color pass");
4353  if (scene) {
4354  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4355  }
4356  else {
4358  }
4359 
4360  prop = RNA_def_property(srna, "use_pass_glossy_direct", PROP_BOOLEAN, PROP_NONE);
4362  RNA_def_property_ui_text(prop, "Glossy Direct", "Deliver glossy direct pass");
4363  if (scene) {
4364  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4365  }
4366  else {
4368  }
4369 
4370  prop = RNA_def_property(srna, "use_pass_glossy_indirect", PROP_BOOLEAN, PROP_NONE);
4372  RNA_def_property_ui_text(prop, "Glossy Indirect", "Deliver glossy indirect pass");
4373  if (scene) {
4374  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4375  }
4376  else {
4378  }
4379 
4380  prop = RNA_def_property(srna, "use_pass_glossy_color", PROP_BOOLEAN, PROP_NONE);
4382  RNA_def_property_ui_text(prop, "Glossy Color", "Deliver glossy color pass");
4383  if (scene) {
4384  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4385  }
4386  else {
4388  }
4389 
4390  prop = RNA_def_property(srna, "use_pass_transmission_direct", PROP_BOOLEAN, PROP_NONE);
4392  RNA_def_property_ui_text(prop, "Transmission Direct", "Deliver transmission direct pass");
4393  if (scene) {
4394  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4395  }
4396  else {
4398  }
4399 
4400  prop = RNA_def_property(srna, "use_pass_transmission_indirect", PROP_BOOLEAN, PROP_NONE);
4402  RNA_def_property_ui_text(prop, "Transmission Indirect", "Deliver transmission indirect pass");
4403  if (scene) {
4404  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4405  }
4406  else {
4408  }
4409 
4410  prop = RNA_def_property(srna, "use_pass_transmission_color", PROP_BOOLEAN, PROP_NONE);
4412  RNA_def_property_ui_text(prop, "Transmission Color", "Deliver transmission color pass");
4413  if (scene) {
4414  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4415  }
4416  else {
4418  }
4419 
4420  prop = RNA_def_property(srna, "use_pass_subsurface_direct", PROP_BOOLEAN, PROP_NONE);
4422  RNA_def_property_ui_text(prop, "Subsurface Direct", "Deliver subsurface direct pass");
4423  if (scene) {
4424  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4425  }
4426  else {
4428  }
4429 
4430  prop = RNA_def_property(srna, "use_pass_subsurface_indirect", PROP_BOOLEAN, PROP_NONE);
4432  RNA_def_property_ui_text(prop, "Subsurface Indirect", "Deliver subsurface indirect pass");
4433  if (scene) {
4434  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4435  }
4436  else {
4438  }
4439 
4440  prop = RNA_def_property(srna, "use_pass_subsurface_color", PROP_BOOLEAN, PROP_NONE);
4442  RNA_def_property_ui_text(prop, "Subsurface Color", "Deliver subsurface color pass");
4443  if (scene) {
4444  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4445  }
4446  else {
4448  }
4449 }
4450 
4452 {
4453  StructRNA *srna;
4454  FunctionRNA *func;
4455  PropertyRNA *parm;
4456 
4457  RNA_def_property_srna(cprop, "FreestyleModules");
4458  srna = RNA_def_struct(brna, "FreestyleModules", NULL);
4459  RNA_def_struct_sdna(srna, "FreestyleSettings");
4461  srna, "Style Modules", "A list of style modules (to be applied from top to bottom)");
4462 
4463  func = RNA_def_function(srna, "new", "rna_FreestyleSettings_module_add");
4465  "Add a style module to scene render layer Freestyle settings");
4467  parm = RNA_def_pointer(
4468  func, "module", "FreestyleModuleSettings", "", "Newly created style module");
4469  RNA_def_function_return(func, parm);
4470 
4471  func = RNA_def_function(srna, "remove", "rna_FreestyleSettings_module_remove");
4473  func, "Remove a style module from scene render layer Freestyle settings");
4475  parm = RNA_def_pointer(func, "module", "FreestyleModuleSettings", "", "Style module to remove");
4478 }
4479 
4481 {
4482  StructRNA *srna;
4483  PropertyRNA *prop;
4484  FunctionRNA *func;
4485  PropertyRNA *parm;
4486 
4487  RNA_def_property_srna(cprop, "Linesets");
4488  srna = RNA_def_struct(brna, "Linesets", NULL);
4489  RNA_def_struct_sdna(srna, "FreestyleSettings");
4491  srna, "Line Sets", "Line sets for associating lines and style parameters");
4492 
4493  prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
4494  RNA_def_property_struct_type(prop, "FreestyleLineSet");
4496  prop, "rna_FreestyleSettings_active_lineset_get", NULL, NULL, NULL);
4497  RNA_def_property_ui_text(prop, "Active Line Set", "Active line set being displayed");
4499 
4500  prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
4502  "rna_FreestyleSettings_active_lineset_index_get",
4503  "rna_FreestyleSettings_active_lineset_index_set",
4504  "rna_FreestyleSettings_active_lineset_index_range");
4505  RNA_def_property_ui_text(prop, "Active Line Set Index", "Index of active line set slot");
4507 
4508  func = RNA_def_function(srna, "new", "rna_FreestyleSettings_lineset_add");
4509  RNA_def_function_ui_description(func, "Add a line set to scene render layer Freestyle settings");
4511  parm = RNA_def_string(func, "name", "LineSet", 0, "", "New name for the line set (not unique)");
4513  parm = RNA_def_pointer(func, "lineset", "FreestyleLineSet", "", "Newly created line set");
4514  RNA_def_function_return(func, parm);
4515 
4516  func = RNA_def_function(srna, "remove", "rna_FreestyleSettings_lineset_remove");
4518  "Remove a line set from scene render layer Freestyle settings");
4520  parm = RNA_def_pointer(func, "lineset", "FreestyleLineSet", "", "Line set to remove");
4523 }
4524 
4526 {
4527  StructRNA *srna;
4528  PropertyRNA *prop;
4529 
4530  static const EnumPropertyItem edge_type_negation_items[] = {
4531  {0,
4532  "INCLUSIVE",
4533  0,
4534  "Inclusive",
4535  "Select feature edges satisfying the given edge type conditions"},
4537  "EXCLUSIVE",
4538  0,
4539  "Exclusive",
4540  "Select feature edges not satisfying the given edge type conditions"},
4541  {0, NULL, 0, NULL, NULL},
4542  };
4543 
4544  static const EnumPropertyItem edge_type_combination_items[] = {
4545  {0,
4546  "OR",
4547  0,
4548  "Logical OR",
4549  "Select feature edges satisfying at least one of edge type conditions"},
4551  "AND",
4552  0,
4553  "Logical AND",
4554  "Select feature edges satisfying all edge type conditions"},
4555  {0, NULL, 0, NULL, NULL},
4556  };
4557 
4558  static const EnumPropertyItem collection_negation_items[] = {
4559  {0,
4560  "INCLUSIVE",
4561  0,
4562  "Inclusive",
4563  "Select feature edges belonging to some object in the group"},
4565  "EXCLUSIVE",
4566  0,
4567  "Exclusive",
4568  "Select feature edges not belonging to any object in the group"},
4569  {0, NULL, 0, NULL, NULL},
4570  };
4571 
4572  static const EnumPropertyItem face_mark_negation_items[] = {
4573  {0,
4574  "INCLUSIVE",
4575  0,
4576  "Inclusive",
4577  "Select feature edges satisfying the given face mark conditions"},
4579  "EXCLUSIVE",
4580  0,
4581  "Exclusive",
4582  "Select feature edges not satisfying the given face mark conditions"},
4583  {0, NULL, 0, NULL, NULL},
4584  };
4585 
4586  static const EnumPropertyItem face_mark_condition_items[] = {
4587  {0, "ONE", 0, "One Face", "Select a feature edge if either of its adjacent faces is marked"},
4589  "BOTH",
4590  0,
4591  "Both Faces",
4592  "Select a feature edge if both of its adjacent faces are marked"},
4593  {0, NULL, 0, NULL, NULL},
4594  };
4595 
4596  static const EnumPropertyItem freestyle_ui_mode_items[] = {
4598  "SCRIPT",
4599  0,
4600  "Python Scripting Mode",
4601  "Advanced mode for using style modules written in Python"},
4603  "EDITOR",
4604  0,
4605  "Parameter Editor Mode",
4606  "Basic mode for interactive style parameter editing"},
4607  {0, NULL, 0, NULL, NULL},
4608  };
4609 
4610  static const EnumPropertyItem visibility_items[] = {
4611  {FREESTYLE_QI_VISIBLE, "VISIBLE", 0, "Visible", "Select visible feature edges"},
4612  {FREESTYLE_QI_HIDDEN, "HIDDEN", 0, "Hidden", "Select hidden feature edges"},
4614  "RANGE",
4615  0,
4616  "QI Range",
4617  "Select feature edges within a range of quantitative invisibility (QI) values"},
4618  {0, NULL, 0, NULL, NULL},
4619  };
4620 
4621  /* FreestyleLineSet */
4622 
4623  srna = RNA_def_struct(brna, "FreestyleLineSet", NULL);
4625  srna, "Freestyle Line Set", "Line set for associating lines and style parameters");
4626 
4627  /* access to line style settings is redirected through functions
4628  * to allow proper id-buttons functionality
4629  */
4630  prop = RNA_def_property(srna, "linestyle", PROP_POINTER, PROP_NONE);
4631  RNA_def_property_struct_type(prop, "FreestyleLineStyle");
4634  "rna_FreestyleLineSet_linestyle_get",
4635  "rna_FreestyleLineSet_linestyle_set",
4636  NULL,
4637  NULL);
4638  RNA_def_property_ui_text(prop, "Line Style", "Line style settings");
4639  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4640 
4641  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
4642  RNA_def_property_string_sdna(prop, NULL, "name");
4643  RNA_def_property_ui_text(prop, "Line Set Name", "Line set name");
4645  RNA_def_struct_name_property(srna, prop);
4646 
4647  prop = RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE);
4650  prop, "Render", "Enable or disable this line set during stroke rendering");
4651  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4652 
4653  prop = RNA_def_property(srna, "select_by_visibility", PROP_BOOLEAN, PROP_NONE);
4656  prop, "Selection by Visibility", "Select feature edges based on visibility");
4657  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4658 
4659  prop = RNA_def_property(srna, "select_by_edge_types", PROP_BOOLEAN, PROP_NONE);
4662  prop, "Selection by Edge Types", "Select feature edges based on edge types");
4663  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4664 
4665  prop = RNA_def_property(srna, "select_by_collection", PROP_BOOLEAN, PROP_NONE);
4668  prop, "Selection by Collection", "Select feature edges based on a collection of objects");
4669  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4670 
4671  prop = RNA_def_property(srna, "select_by_image_border", PROP_BOOLEAN, PROP_NONE);
4674  "Selection by Image Border",
4675  "Select feature edges by image border (less memory consumption)");
4676  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4677 
4678  prop = RNA_def_property(srna, "select_by_face_marks", PROP_BOOLEAN, PROP_NONE);
4680  RNA_def_property_ui_text(prop, "Selection by Face Marks", "Select feature edges by face marks");
4681  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4682 
4683  prop = RNA_def_property(srna, "edge_type_negation", PROP_ENUM, PROP_NONE);
4684  RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
4685  RNA_def_property_enum_items(prop, edge_type_negation_items);
4687  prop,
4688  "Edge Type Negation",
4689  "Specify either inclusion or exclusion of feature edges selected by edge types");
4690  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4691 
4692  prop = RNA_def_property(srna, "edge_type_combination", PROP_ENUM, PROP_NONE);
4693  RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
4694  RNA_def_property_enum_items(prop, edge_type_combination_items);
4696  prop,
4697  "Edge Type Combination",
4698  "Specify a logical combination of selection conditions on feature edge types");
4699  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4700 
4701  prop = RNA_def_property(srna, "collection", PROP_POINTER, PROP_NONE);
4702  RNA_def_property_pointer_sdna(prop, NULL, "group");
4703  RNA_def_property_struct_type(prop, "Collection");
4706  prop, "Collection", "A collection of objects based on which feature edges are selected");
4707  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4708 
4709  prop = RNA_def_property(srna, "collection_negation", PROP_ENUM, PROP_NONE);
4710  RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
4711  RNA_def_property_enum_items(prop, collection_negation_items);
4713  "Collection Negation",
4714  "Specify either inclusion or exclusion of feature edges belonging to a "
4715  "collection of objects");
4716  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4717 
4718  prop = RNA_def_property(srna, "face_mark_negation", PROP_ENUM, PROP_NONE);
4719  RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
4720  RNA_def_property_enum_items(prop, face_mark_negation_items);
4722  prop,
4723  "Face Mark Negation",
4724  "Specify either inclusion or exclusion of feature edges selected by face marks");
4725  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4726 
4727  prop = RNA_def_property(srna, "face_mark_condition", PROP_ENUM, PROP_NONE);
4728  RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags");
4729  RNA_def_property_enum_items(prop, face_mark_condition_items);
4731  "Face Mark Condition",
4732  "Specify a feature edge selection condition based on face marks");
4733  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4734 
4735  prop = RNA_def_property(srna, "select_silhouette", PROP_BOOLEAN, PROP_NONE);
4738  prop,
4739  "Silhouette",
4740  "Select silhouettes (edges at the boundary of visible and hidden faces)");
4741  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4742 
4743  prop = RNA_def_property(srna, "select_border", PROP_BOOLEAN, PROP_NONE);
4745  RNA_def_property_ui_text(prop, "Border", "Select border edges (open mesh edges)");
4746  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4747 
4748  prop = RNA_def_property(srna, "select_crease", PROP_BOOLEAN, PROP_NONE);
4751  "Crease",
4752  "Select crease edges (those between two faces making an angle smaller "
4753  "than the Crease Angle)");
4754  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4755 
4756  prop = RNA_def_property(srna, "select_ridge_valley", PROP_BOOLEAN, PROP_NONE);
4759  prop,
4760  "Ridge & Valley",
4761  "Select ridges and valleys (boundary lines between convex and concave areas of surface)");
4762  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4763 
4764  prop = RNA_def_property(srna, "select_suggestive_contour", PROP_BOOLEAN, PROP_NONE);
4767  prop, "Suggestive Contour", "Select suggestive contours (almost silhouette/contour edges)");
4768  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4769 
4770  prop = RNA_def_property(srna, "select_material_boundary", PROP_BOOLEAN, PROP_NONE);
4772  RNA_def_property_ui_text(prop, "Material Boundary", "Select edges at material boundaries");
4773  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4774 
4775  prop = RNA_def_property(srna, "select_contour", PROP_BOOLEAN, PROP_NONE);
4777  RNA_def_property_ui_text(prop, "Contour", "Select contours (outer silhouettes of each object)");
4778  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4779 
4780  prop = RNA_def_property(srna, "select_external_contour", PROP_BOOLEAN, PROP_NONE);
4783  prop,
4784  "External Contour",
4785  "Select external contours (outer silhouettes of occluding and occluded objects)");
4786  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4787 
4788  prop = RNA_def_property(srna, "select_edge_mark", PROP_BOOLEAN, PROP_NONE);
4791  prop, "Edge Mark", "Select edge marks (edges annotated by Freestyle edge marks)");
4792  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4793 
4794  prop = RNA_def_property(srna, "exclude_silhouette", PROP_BOOLEAN, PROP_NONE);
4795  RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_SILHOUETTE);
4796  RNA_def_property_ui_text(prop, "Silhouette", "Exclude silhouette edges");
4797  RNA_def_property_ui_icon(prop, ICON_X, 0);
4798  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4799 
4800  prop = RNA_def_property(srna, "exclude_border", PROP_BOOLEAN, PROP_NONE);
4801  RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_BORDER);
4802  RNA_def_property_ui_text(prop, "Border", "Exclude border edges");
4803  RNA_def_property_ui_icon(prop, ICON_X, 0);
4804  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4805 
4806  prop = RNA_def_property(srna, "exclude_crease", PROP_BOOLEAN, PROP_NONE);
4807  RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_CREASE);
4808  RNA_def_property_ui_text(prop, "Crease", "Exclude crease edges");
4809  RNA_def_property_ui_icon(prop, ICON_X, 0);
4810  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4811 
4812  prop = RNA_def_property(srna, "exclude_ridge_valley", PROP_BOOLEAN, PROP_NONE);
4813  RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_RIDGE_VALLEY);
4814  RNA_def_property_ui_text(prop, "Ridge & Valley", "Exclude ridges and valleys");
4815  RNA_def_property_ui_icon(prop, ICON_X, 0);
4816  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4817 
4818  prop = RNA_def_property(srna, "exclude_suggestive_contour", PROP_BOOLEAN, PROP_NONE);
4820  RNA_def_property_ui_text(prop, "Suggestive Contour", "Exclude suggestive contours");
4821  RNA_def_property_ui_icon(prop, ICON_X, 0);
4822  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4823 
4824  prop = RNA_def_property(srna, "exclude_material_boundary", PROP_BOOLEAN, PROP_NONE);
4826  RNA_def_property_ui_text(prop, "Material Boundary", "Exclude edges at material boundaries");
4827  RNA_def_property_ui_icon(prop, ICON_X, 0);
4828  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4829 
4830  prop = RNA_def_property(srna, "exclude_contour", PROP_BOOLEAN, PROP_NONE);
4831  RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_CONTOUR);
4832  RNA_def_property_ui_text(prop, "Contour", "Exclude contours");
4833  RNA_def_property_ui_icon(prop, ICON_X, 0);
4834  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4835 
4836  prop = RNA_def_property(srna, "exclude_external_contour", PROP_BOOLEAN, PROP_NONE);
4838  RNA_def_property_ui_text(prop, "External Contour", "Exclude external contours");
4839  RNA_def_property_ui_icon(prop, ICON_X, 0);
4840  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4841 
4842  prop = RNA_def_property(srna, "exclude_edge_mark", PROP_BOOLEAN, PROP_NONE);
4843  RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYLE_FE_EDGE_MARK);
4844  RNA_def_property_ui_text(prop, "Edge Mark", "Exclude edge marks");
4845  RNA_def_property_ui_icon(prop, ICON_X, 0);
4846  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4847 
4848  prop = RNA_def_property(srna, "visibility", PROP_ENUM, PROP_NONE);
4849  RNA_def_property_enum_sdna(prop, NULL, "qi");
4850  RNA_def_property_enum_items(prop, visibility_items);
4852  prop, "Visibility", "Determine how to use visibility for feature edge selection");
4853  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4854 
4855  prop = RNA_def_property(srna, "qi_start", PROP_INT, PROP_UNSIGNED);
4856  RNA_def_property_int_sdna(prop, NULL, "qi_start");
4857  RNA_def_property_range(prop, 0, INT_MAX);
4858  RNA_def_property_ui_text(prop, "Start", "First QI value of the QI range");
4859  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4860 
4861  prop = RNA_def_property(srna, "qi_end", PROP_INT, PROP_UNSIGNED);
4862  RNA_def_property_int_sdna(prop, NULL, "qi_end");
4863  RNA_def_property_range(prop, 0, INT_MAX);
4864  RNA_def_property_ui_text(prop, "End", "Last QI value of the QI range");
4865  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4866 
4867  /* FreestyleModuleSettings */
4868 
4869  srna = RNA_def_struct(brna, "FreestyleModuleSettings", NULL);
4870  RNA_def_struct_sdna(srna, "FreestyleModuleConfig");
4872  srna, "Freestyle Module", "Style module configuration for specifying a style module");
4873 
4874  prop = RNA_def_property(srna, "script", PROP_POINTER, PROP_NONE);
4875  RNA_def_property_struct_type(prop, "Text");
4877  RNA_def_property_ui_text(prop, "Style Module", "Python script to define a style module");
4878  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4879 
4880  prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
4881  RNA_def_property_boolean_sdna(prop, NULL, "is_displayed", 1);
4883  prop, "Use", "Enable or disable this style module during stroke rendering");
4884  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4885 
4886  /* FreestyleSettings */
4887 
4888  srna = RNA_def_struct(brna, "FreestyleSettings", NULL);
4889  RNA_def_struct_sdna(srna, "FreestyleConfig");
4890  RNA_def_struct_nested(brna, srna, "ViewLayer");
4892  srna, "Freestyle Settings", "Freestyle settings for a ViewLayer data-block");
4893 
4894  prop = RNA_def_property(srna, "modules", PROP_COLLECTION, PROP_NONE);
4895  RNA_def_property_collection_sdna(prop, NULL, "modules", NULL);
4896  RNA_def_property_struct_type(prop, "FreestyleModuleSettings");
4898  prop, "Style Modules", "A list of style modules (to be applied from top to bottom)");
4899  rna_def_freestyle_modules(brna, prop);
4900 
4901  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
4902  RNA_def_property_enum_sdna(prop, NULL, "mode");
4903  RNA_def_property_enum_items(prop, freestyle_ui_mode_items);
4904  RNA_def_property_ui_text(prop, "Control Mode", "Select the Freestyle control mode");
4905  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4906 
4907  prop = RNA_def_property(srna, "use_culling", PROP_BOOLEAN, PROP_NONE);
4909  RNA_def_property_ui_text(prop, "Culling", "If enabled, out-of-view edges are ignored");
4910  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4911 
4912  prop = RNA_def_property(srna, "use_suggestive_contours", PROP_BOOLEAN, PROP_NONE);
4914  RNA_def_property_ui_text(prop, "Suggestive Contours", "Enable suggestive contours");
4915  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4916 
4917  prop = RNA_def_property(srna, "use_ridges_and_valleys", PROP_BOOLEAN, PROP_NONE);
4919  RNA_def_property_ui_text(prop, "Ridges and Valleys", "Enable ridges and valleys");
4920  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4921 
4922  prop = RNA_def_property(srna, "use_material_boundaries", PROP_BOOLEAN, PROP_NONE);
4924  RNA_def_property_ui_text(prop, "Material Boundaries", "Enable material boundaries");
4925  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4926 
4927  prop = RNA_def_property(srna, "use_smoothness", PROP_BOOLEAN, PROP_NONE);
4930  prop, "Face Smoothness", "Take face smoothness into account in view map calculation");
4931  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4932 
4933  prop = RNA_def_property(srna, "use_advanced_options", PROP_BOOLEAN, PROP_NONE);
4936  prop,
4937  "Advanced Options",
4938  "Enable advanced edge detection options (sphere radius and Kr derivative epsilon)");
4939  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4940 
4941  prop = RNA_def_property(srna, "use_view_map_cache", PROP_BOOLEAN, PROP_NONE);
4944  prop,
4945  "View Map Cache",
4946  "Keep the computed view map and avoid recalculating it if mesh geometry is unchanged");
4948  prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_use_view_map_cache_update");
4949 
4950  prop = RNA_def_property(srna, "as_render_pass", PROP_BOOLEAN, PROP_NONE);
4953  prop,
4954  "As Render Pass",
4955  "Renders Freestyle output to a separate pass instead of overlaying it on the Combined pass");
4956  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_ViewLayer_pass_update");
4957 
4958  prop = RNA_def_property(srna, "sphere_radius", PROP_FLOAT, PROP_NONE);
4959  RNA_def_property_float_sdna(prop, NULL, "sphere_radius");
4960  RNA_def_property_range(prop, 0.0, 1000.0);
4961  RNA_def_property_ui_text(prop, "Sphere Radius", "Sphere radius for computing curvatures");
4962  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4963 
4964  prop = RNA_def_property(srna, "kr_derivative_epsilon", PROP_FLOAT, PROP_NONE);
4965  RNA_def_property_float_sdna(prop, NULL, "dkr_epsilon");
4966  RNA_def_property_range(prop, -1000.0, 1000.0);
4968  prop, "Kr Derivative Epsilon", "Kr derivative epsilon for computing suggestive contours");
4969  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4970 
4971  prop = RNA_def_property(srna, "crease_angle", PROP_FLOAT, PROP_ANGLE);
4972  RNA_def_property_float_sdna(prop, NULL, "crease_angle");
4973  RNA_def_property_range(prop, 0.0, DEG2RAD(180.0));
4974  RNA_def_property_ui_text(prop, "Crease Angle", "Angular threshold for detecting crease edges");
4975  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
4976 
4977  prop = RNA_def_property(srna, "linesets", PROP_COLLECTION, PROP_NONE);
4978  RNA_def_property_collection_sdna(prop, NULL, "linesets", NULL);
4979  RNA_def_property_struct_type(prop, "FreestyleLineSet");
4980  RNA_def_property_ui_text(prop, "Line Sets", "");
4981  rna_def_freestyle_linesets(brna, prop);
4982 }
4983 
4984 static void rna_def_bake_data(BlenderRNA *brna)
4985 {
4986  StructRNA *srna;
4987  PropertyRNA *prop;
4988 
4989  srna = RNA_def_struct(brna, "BakeSettings", NULL);
4990  RNA_def_struct_sdna(srna, "BakeData");
4991  RNA_def_struct_nested(brna, srna, "RenderSettings");
4992  RNA_def_struct_ui_text(srna, "Bake Data", "Bake data for a Scene data-block");
4993  RNA_def_struct_path_func(srna, "rna_BakeSettings_path");
4994 
4995  prop = RNA_def_property(srna, "cage_object", PROP_POINTER, PROP_NONE);
4997  prop,
4998  "Cage Object",
4999  "Object to use as cage "
5000  "instead of calculating the cage from the active object with cage extrusion");
5003 
5004  prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
5005  RNA_def_property_ui_text(prop, "File Path", "Image filepath to use when saving externally");
5007 
5008  prop = RNA_def_property(srna, "width", PROP_INT, PROP_PIXEL);
5009  RNA_def_property_range(prop, 4, 10000);
5010  RNA_def_property_ui_text(prop, "Width", "Horizontal dimension of the baking map");
5012 
5013  prop = RNA_def_property(srna, "height", PROP_INT, PROP_PIXEL);
5014  RNA_def_property_range(prop, 4, 10000);
5015  RNA_def_property_ui_text(prop, "Height", "Vertical dimension of the baking map");
5017 
5018  prop = RNA_def_property(srna, "margin", PROP_INT, PROP_PIXEL);
5019  RNA_def_property_range(prop, 0, SHRT_MAX);
5020  RNA_def_property_ui_range(prop, 0, 64, 1, 1);
5021  RNA_def_property_ui_text(prop, "Margin", "Extends the baked result as a post process filter");
5023 
5024  prop = RNA_def_property(srna, "max_ray_distance", PROP_FLOAT, PROP_DISTANCE);
5025  RNA_def_property_range(prop, 0.0, FLT_MAX);
5026  RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 3);
5028  "Max Ray Distance",
5029  "The maximum ray distance for matching points between the active and "
5030  "selected objects. If zero, there is no limit");
5032 
5033  prop = RNA_def_property(srna, "cage_extrusion", PROP_FLOAT, PROP_DISTANCE);
5034  RNA_def_property_range(prop, 0.0, FLT_MAX);
5035  RNA_def_property_ui_range(prop, 0.0, 1.0, 1, 3);
5037  prop,
5038  "Cage Extrusion",
5039  "Inflate the active object by the specified distance for baking. This helps matching to "
5040  "points nearer to the outside of the selected object meshes");
5042 
5043  prop = RNA_def_property(srna, "normal_space", PROP_ENUM, PROP_NONE);
5044  RNA_def_property_enum_bitflag_sdna(prop, NULL, "normal_space");
5046  RNA_def_property_ui_text(prop, "Normal Space", "Choose normal space for baking");
5048 
5049  prop = RNA_def_property(srna, "normal_r", PROP_ENUM, PROP_NONE);
5050  RNA_def_property_enum_bitflag_sdna(prop, NULL, "normal_swizzle[0]");
5052  RNA_def_property_ui_text(prop, "Normal Space", "Axis to bake in red channel");
5054 
5055  prop = RNA_def_property(srna, "normal_g", PROP_ENUM, PROP_NONE);
5056  RNA_def_property_enum_bitflag_sdna(prop, NULL, "normal_swizzle[1]");
5058  RNA_def_property_ui_text(prop, "Normal Space", "Axis to bake in green channel");
5060 
5061  prop = RNA_def_property(srna, "normal_b", PROP_ENUM, PROP_NONE);
5062  RNA_def_property_enum_bitflag_sdna(prop, NULL, "normal_swizzle[2]");
5064  RNA_def_property_ui_text(prop, "Normal Space", "Axis to bake in blue channel");
5066 
5067  prop = RNA_def_property(srna, "image_settings", PROP_POINTER, PROP_NONE);
5069  RNA_def_property_pointer_sdna(prop, NULL, "im_format");
5070  RNA_def_property_struct_type(prop, "ImageFormatSettings");
5071  RNA_def_property_ui_text(prop, "Image Format", "");
5072 
5073  prop = RNA_def_property(srna, "target", PROP_ENUM, PROP_NONE);
5075  RNA_def_property_ui_text(prop, "Target", "Where to output the baked map");
5077 
5078  prop = RNA_def_property(srna, "save_mode", PROP_ENUM, PROP_NONE);
5079  RNA_def_property_enum_bitflag_sdna(prop, NULL, "save_mode");
5081  RNA_def_property_ui_text(prop, "Save Mode", "Where to save baked image textures");
5083 
5084  /* flags */
5085  prop = RNA_def_property(srna, "use_selected_to_active", PROP_BOOLEAN, PROP_NONE);
5088  "Selected to Active",
5089  "Bake shading on the surface of selected objects to the active object");
5091 
5092  prop = RNA_def_property(srna, "use_clear", PROP_BOOLEAN, PROP_NONE);
5094  RNA_def_property_ui_text(prop, "Clear", "Clear Images before baking (internal only)");
5096 
5097  prop = RNA_def_property(srna, "use_split_materials", PROP_BOOLEAN, PROP_NONE);
5100  prop, "Split Materials", "Split external images per material (external only)");
5102 
5103  prop = RNA_def_property(srna, "use_automatic_name", PROP_BOOLEAN, PROP_NONE);
5106  prop,
5107  "Automatic Name",
5108  "Automatically name the output file with the pass type (external only)");
5110 
5111  prop = RNA_def_property(srna, "use_cage", PROP_BOOLEAN, PROP_NONE);
5113  RNA_def_property_ui_text(prop, "Cage", "Cast rays to active object from a cage");
5115 
5116  /* custom passes flags */
5117  prop = RNA_def_property(srna, "use_pass_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
5119  RNA_def_property_ui_text(prop, "Ambient Occlusion", "Add ambient occlusion contribution");
5120 
5121  prop = RNA_def_property(srna, "use_pass_emit", PROP_BOOLEAN, PROP_NONE);
5123  RNA_def_property_ui_text(prop, "Emit", "Add emission contribution");
5124 
5125  prop = RNA_def_property(srna, "use_pass_direct", PROP_BOOLEAN, PROP_NONE);
5127  RNA_def_property_ui_text(prop, "Direct", "Add direct lighting contribution");
5129 
5130  prop = RNA_def_property(srna, "use_pass_indirect", PROP_BOOLEAN, PROP_NONE);
5132  RNA_def_property_ui_text(prop, "Indirect", "Add indirect lighting contribution");
5134 
5135  prop = RNA_def_property(srna, "use_pass_color", PROP_BOOLEAN, PROP_NONE);
5137  RNA_def_property_ui_text(prop, "Color", "Color the pass");
5139 
5140  prop = RNA_def_property(srna, "use_pass_diffuse", PROP_BOOLEAN, PROP_NONE);
5142  RNA_def_property_ui_text(prop, "Diffuse", "Add diffuse contribution");
5144 
5145  prop = RNA_def_property(srna, "use_pass_glossy", PROP_BOOLEAN, PROP_NONE);
5147  RNA_def_property_ui_text(prop, "Glossy", "Add glossy contribution");
5149 
5150  prop = RNA_def_property(srna, "use_pass_transmission", PROP_BOOLEAN, PROP_NONE);
5152  RNA_def_property_ui_text(prop, "Transmission", "Add transmission contribution");
5154 
5155  prop = RNA_def_property(srna, "pass_filter", PROP_ENUM, PROP_NONE);
5156  RNA_def_property_enum_sdna(prop, NULL, "pass_filter");
5159  RNA_def_property_ui_text(prop, "Pass Filter", "Passes to include in the active baking pass");
5161 }
5162 
5163 static void rna_def_view_layers(BlenderRNA *brna, PropertyRNA *cprop)
5164 {
5165  StructRNA *srna;
5166  FunctionRNA *func;
5167  PropertyRNA *parm;
5168 
5169  RNA_def_property_srna(cprop, "ViewLayers");
5170  srna = RNA_def_struct(brna, "ViewLayers", NULL);
5171  RNA_def_struct_sdna(srna, "Scene");
5172  RNA_def_struct_ui_text(srna, "Render Layers", "Collection of render layers");
5173 
5174  func = RNA_def_function(srna, "new", "rna_ViewLayer_new");
5175  RNA_def_function_ui_description(func, "Add a view layer to scene");
5177  parm = RNA_def_string(
5178  func, "name", "ViewLayer", 0, "", "New name for the view layer (not unique)");
5180  parm = RNA_def_pointer(func, "result", "ViewLayer", "", "Newly created view layer");
5181  RNA_def_function_return(func, parm);
5182 
5183  func = RNA_def_function(srna, "remove", "rna_ViewLayer_remove");
5184  RNA_def_function_ui_description(func, "Remove a view layer");
5186  parm = RNA_def_pointer(func, "layer", "ViewLayer", "", "View layer to remove");
5189 }
5190 
5191 /* Render Views - MultiView */
5193 {
5194  StructRNA *srna;
5195  PropertyRNA *prop;
5196 
5197  srna = RNA_def_struct(brna, "SceneRenderView", NULL);
5199  srna, "Scene Render View", "Render viewpoint for 3D stereo and multiview rendering");
5200  RNA_def_struct_ui_icon(srna, ICON_RESTRICT_RENDER_OFF);
5201  RNA_def_struct_path_func(srna, "rna_SceneRenderView_path");
5202 
5203  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
5204  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRenderView_name_set");
5205  RNA_def_property_ui_text(prop, "Name", "Render view name");
5206  RNA_def_struct_name_property(srna, prop);
5208 
5209  prop = RNA_def_property(srna, "file_suffix", PROP_STRING, PROP_NONE);
5210  RNA_def_property_string_sdna(prop, NULL, "suffix");
5211  RNA_def_property_ui_text(prop, "File Suffix", "Suffix added to the render images for this view");
5213 
5214  prop = RNA_def_property(srna, "camera_suffix", PROP_STRING, PROP_NONE);
5215  RNA_def_property_string_sdna(prop, NULL, "suffix");
5217  prop,
5218  "Camera Suffix",
5219  "Suffix to identify the cameras to use, and added to the render images for this view");
5221 
5222  prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
5225  RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render view");
5227 }
5228 
5229 static void rna_def_render_views(BlenderRNA *brna, PropertyRNA *cprop)
5230 {
5231  StructRNA *srna;
5232  PropertyRNA *prop;
5233 
5234  FunctionRNA *func;
5235  PropertyRNA *parm;
5236 
5237  RNA_def_property_srna(cprop, "RenderViews");
5238  srna = RNA_def_struct(brna, "RenderViews", NULL);
5239  RNA_def_struct_sdna(srna, "RenderData");
5240  RNA_def_struct_ui_text(srna, "Render Views", "Collection of render views");
5241 
5242  prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
5243  RNA_def_property_int_sdna(prop, NULL, "actview");
5245  "rna_RenderSettings_active_view_index_get",
5246  "rna_RenderSettings_active_view_index_set",
5247  "rna_RenderSettings_active_view_index_range");
5248  RNA_def_property_ui_text(prop, "Active View Index", "Active index in render view array");
5250 
5251  prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
5252  RNA_def_property_struct_type(prop, "SceneRenderView");
5254  "rna_RenderSettings_active_view_get",
5255  "rna_RenderSettings_active_view_set",
5256  NULL,
5257  NULL);
5259  RNA_def_property_ui_text(prop, "Active Render View", "Active Render View");
5261 
5262  func = RNA_def_function(srna, "new", "rna_RenderView_new");
5263  RNA_def_function_ui_description(func, "Add a render view to scene");
5265  parm = RNA_def_string(func, "name", "RenderView", 0, "", "New name for the marker (not unique)");
5267  parm = RNA_def_pointer(func, "result", "SceneRenderView", "", "Newly created render view");
5268  RNA_def_function_return(func, parm);
5269 
5270  func = RNA_def_function(srna, "remove", "rna_RenderView_remove");
5271  RNA_def_function_ui_description(func, "Remove a render view");
5273  parm = RNA_def_pointer(func, "view", "SceneRenderView", "", "Render view to remove");
5276 }
5277 
5279 {
5280  StructRNA *srna;
5281  PropertyRNA *prop;
5282 
5283  /* rna_enum_stereo3d_display_items, without (S3D_DISPLAY_PAGEFLIP) */
5284  static const EnumPropertyItem stereo3d_display_items[] = {
5286  "ANAGLYPH",
5287  0,
5288  "Anaglyph",
5289  "Render views for left and right eyes as two differently filtered colors in a single image "
5290  "(anaglyph glasses are required)"},
5292  "INTERLACE",
5293  0,
5294  "Interlace",
5295  "Render views for left and right eyes interlaced in a single image (3D-ready monitor is "
5296  "required)"},
5298  "SIDEBYSIDE",
5299  0,
5300  "Side-by-Side",
5301  "Render views for left and right eyes side-by-side"},
5303  "TOPBOTTOM",
5304  0,
5305  "Top-Bottom",
5306  "Render views for left and right eyes one above another"},
5307  {0, NULL, 0, NULL, NULL},
5308  };
5309 
5310  srna = RNA_def_struct(brna, "Stereo3dFormat", NULL);
5311  RNA_def_struct_sdna(srna, "Stereo3dFormat");
5313  RNA_def_struct_ui_text(srna, "Stereo Output", "Settings for stereo output");
5314 
5315  prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
5316  RNA_def_property_enum_sdna(prop, NULL, "display_mode");
5317  RNA_def_property_enum_items(prop, stereo3d_display_items);
5318  RNA_def_property_ui_text(prop, "Stereo Mode", "");
5319  RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update");
5320 
5321  prop = RNA_def_property(srna, "anaglyph_type", PROP_ENUM, PROP_NONE);
5323  RNA_def_property_ui_text(prop, "Anaglyph Type", "");
5324  RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update");
5325 
5326  prop = RNA_def_property(srna, "interlace_type", PROP_ENUM, PROP_NONE);
5328  RNA_def_property_ui_text(prop, "Interlace Type", "");
5329  RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update");
5330 
5331  prop = RNA_def_property(srna, "use_interlace_swap", PROP_BOOLEAN, PROP_BOOLEAN);
5333  RNA_def_property_ui_text(prop, "Swap Left/Right", "Swap left and right stereo channels");
5334  RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update");
5335 
5336  prop = RNA_def_property(srna, "use_sidebyside_crosseyed", PROP_BOOLEAN, PROP_BOOLEAN);
5338  RNA_def_property_ui_text(prop, "Cross-Eyed", "Right eye should see left image and vice versa");
5339  RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update");
5340 
5341  prop = RNA_def_property(srna, "use_squeezed_frame", PROP_BOOLEAN, PROP_BOOLEAN);
5343  RNA_def_property_ui_text(prop, "Squeezed Frame", "Combine both views in a squeezed image");
5344  RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Stereo3dFormat_update");
5345 }
5346 
5347 /* use for render output and image save operator,
5348  * note: there are some cases where the members act differently when this is
5349  * used from a scene, video formats can only be selected for render output
5350  * for example, this is checked by seeing if the ptr->owner_id is a Scene id */
5351 
5353 {
5354 
5355 # ifdef WITH_OPENJPEG
5356  static const EnumPropertyItem jp2_codec_items[] = {
5357  {R_IMF_JP2_CODEC_JP2, "JP2", 0, "JP2", ""},
5358  {R_IMF_JP2_CODEC_J2K, "J2K", 0, "J2K", ""},
5359  {0, NULL, 0, NULL, NULL},
5360  };
5361 # endif
5362 
5363 # ifdef WITH_TIFF
5364  static const EnumPropertyItem tiff_codec_items[] = {
5365  {R_IMF_TIFF_CODEC_NONE, "NONE", 0, "None", ""},
5366  {R_IMF_TIFF_CODEC_DEFLATE, "DEFLATE", 0, "Deflate", ""},
5367  {R_IMF_TIFF_CODEC_LZW, "LZW", 0, "LZW", ""},
5368  {R_IMF_TIFF_CODEC_PACKBITS, "PACKBITS", 0, "Pack Bits", ""},
5369  {0, NULL, 0, NULL, NULL},
5370  };
5371 # endif
5372 
5373  StructRNA *srna;
5374  PropertyRNA *prop;
5375 
5377 
5378  srna = RNA_def_struct(brna, "ImageFormatSettings", NULL);
5379  RNA_def_struct_sdna(srna, "ImageFormatData");
5380  RNA_def_struct_nested(brna, srna, "Scene");
5381  RNA_def_struct_path_func(srna, "rna_ImageFormatSettings_path");
5382  RNA_def_struct_ui_text(srna, "Image Format", "Settings for image formats");
5383 
5384  prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
5385  RNA_def_property_enum_sdna(prop, NULL, "imtype");
5388  NULL,
5389  "rna_ImageFormatSettings_file_format_set",
5390  "rna_ImageFormatSettings_file_format_itemf");
5391  RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as");
5393 
5394  prop = RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
5395  RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
5397  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_color_mode_itemf");
5399  prop,
5400  "Color Mode",
5401  "Choose BW for saving grayscale images, RGB for saving red, green and blue channels, "
5402  "and RGBA for saving red, green, blue and alpha channels");
5404 
5405  prop = RNA_def_property(srna, "color_depth", PROP_ENUM, PROP_NONE);
5406  RNA_def_property_enum_bitflag_sdna(prop, NULL, "depth");
5408  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_color_depth_itemf");
5409  RNA_def_property_ui_text(prop, "Color Depth", "Bit depth per channel");
5411 
5412  /* was 'file_quality' */
5413  prop = RNA_def_property(srna, "quality", PROP_INT, PROP_PERCENTAGE);
5414  RNA_def_property_int_sdna(prop, NULL, "quality");
5415  RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
5417  prop, "Quality", "Quality for image formats that support lossy compression");
5419 
5420  /* was shared with file_quality */
5421  prop = RNA_def_property(srna, "compression", PROP_INT, PROP_PERCENTAGE);
5422  RNA_def_property_int_sdna(prop, NULL, "compress");
5423  RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
5425  "Compression",
5426  "Amount of time to determine best compression: "
5427  "0 = no compression with fast file output, "
5428  "100 = maximum lossless compression with slow file output");
5430 
5431  /* flag */
5432  prop = RNA_def_property(srna, "use_zbuffer", PROP_BOOLEAN, PROP_NONE);
5435  prop, "Z Buffer", "Save the z-depth per pixel (32-bit unsigned integer z-buffer)");
5437 
5438  prop = RNA_def_property(srna, "use_preview", PROP_BOOLEAN, PROP_NONE);
5441  prop, "Preview", "When rendering animations, save JPG preview images in same directory");
5443 
5444  /* format specific */
5445 
5446 # ifdef WITH_OPENEXR
5447  /* OpenEXR */
5448 
5449  prop = RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
5450  RNA_def_property_enum_sdna(prop, NULL, "exr_codec");
5452  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_exr_codec_itemf");
5453  RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
5455 # endif
5456 
5457 # ifdef WITH_OPENJPEG
5458  /* Jpeg 2000 */
5459  prop = RNA_def_property(srna, "use_jpeg2k_ycc", PROP_BOOLEAN, PROP_NONE);
5462  prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors");
5464 
5465  prop = RNA_def_property(srna, "use_jpeg2k_cinema_preset", PROP_BOOLEAN, PROP_NONE);
5467  RNA_def_property_ui_text(prop, "Cinema", "Use Openjpeg Cinema Preset");
5469 
5470  prop = RNA_def_property(srna, "use_jpeg2k_cinema_48", PROP_BOOLEAN, PROP_NONE);
5472  RNA_def_property_ui_text(prop, "Cinema (48)", "Use Openjpeg Cinema Preset (48fps)");
5474 
5475  prop = RNA_def_property(srna, "jpeg2k_codec", PROP_ENUM, PROP_NONE);
5476  RNA_def_property_enum_sdna(prop, NULL, "jp2_codec");
5477  RNA_def_property_enum_items(prop, jp2_codec_items);
5478  RNA_def_property_ui_text(prop, "Codec", "Codec settings for Jpeg2000");
5480 # endif
5481 
5482 # ifdef WITH_TIFF
5483  /* TIFF */
5484  prop = RNA_def_property(srna, "tiff_codec", PROP_ENUM, PROP_NONE);
5485  RNA_def_property_enum_sdna(prop, NULL, "tiff_codec");
5486  RNA_def_property_enum_items(prop, tiff_codec_items);
5487  RNA_def_property_ui_text(prop, "Compression", "Compression mode for TIFF");
5489 # endif
5490 
5491  /* Cineon and DPX */
5492 
5493  prop = RNA_def_property(srna, "use_cineon_log", PROP_BOOLEAN, PROP_NONE);
5495  RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space");
5497 
5498  prop = RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE);
5499  RNA_def_property_int_sdna(prop, NULL, "cineon_black");
5500  RNA_def_property_range(prop, 0, 1024);
5501  RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint");
5503 
5504  prop = RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE);
5505  RNA_def_property_int_sdna(prop, NULL, "cineon_white");
5506  RNA_def_property_range(prop, 0, 1024);
5507  RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint");
5509 
5510  prop = RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE);
5511  RNA_def_property_float_sdna(prop, NULL, "cineon_gamma");
5512  RNA_def_property_range(prop, 0.0f, 10.0f);
5513  RNA_def_property_ui_text(prop, "G", "Log conversion gamma");
5515 
5516  /* multiview */
5517  prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE);
5518  RNA_def_property_enum_sdna(prop, NULL, "views_format");
5520  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_views_format_itemf");
5521  RNA_def_property_ui_text(prop, "Views Format", "Format of multiview media");
5523 
5524  prop = RNA_def_property(srna, "stereo_3d_format", PROP_POINTER, PROP_NONE);
5525  RNA_def_property_pointer_sdna(prop, NULL, "stereo3d_format");
5527  RNA_def_property_struct_type(prop, "Stereo3dFormat");
5528  RNA_def_property_ui_text(prop, "Stereo 3D Format", "Settings for stereo 3D");
5529 
5530  /* color management */
5531  prop = RNA_def_property(srna, "view_settings", PROP_POINTER, PROP_NONE);
5532  RNA_def_property_pointer_sdna(prop, NULL, "view_settings");
5533  RNA_def_property_struct_type(prop, "ColorManagedViewSettings");
5535  prop, "View Settings", "Color management settings applied on image before saving");
5536 
5537  prop = RNA_def_property(srna, "display_settings", PROP_POINTER, PROP_NONE);
5538  RNA_def_property_pointer_sdna(prop, NULL, "display_settings");
5539  RNA_def_property_struct_type(prop, "ColorManagedDisplaySettings");
5541  prop, "Display Settings", "Settings of device saved image would be displayed on");
5542 }
5543 
5545 {
5546  StructRNA *srna;
5547  PropertyRNA *prop;
5548 
5549 # ifdef WITH_FFMPEG
5550  /* Container types */
5551  static const EnumPropertyItem ffmpeg_format_items[] = {
5552  {FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""},
5553  {FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""},
5554  {FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""},
5555  {FFMPEG_AVI, "AVI", 0, "AVI", ""},
5556  {FFMPEG_MOV, "QUICKTIME", 0, "Quicktime", ""},
5557  {FFMPEG_DV, "DV", 0, "DV", ""},
5558  {FFMPEG_OGG, "OGG", 0, "Ogg", ""},
5559  {FFMPEG_MKV, "MKV", 0, "Matroska", ""},
5560  {FFMPEG_FLV, "FLASH", 0, "Flash", ""},
5561  {FFMPEG_WEBM, "WEBM", 0, "WebM", ""},
5562  {0, NULL, 0, NULL, NULL},
5563  };
5564 
5565  static const EnumPropertyItem ffmpeg_codec_items[] = {
5566  {AV_CODEC_ID_NONE, "NONE", 0, "No Video", "Disables video output, for audio-only renders"},
5567  {AV_CODEC_ID_DNXHD, "DNXHD", 0, "DNxHD", ""},
5568  {AV_CODEC_ID_DVVIDEO, "DV", 0, "DV", ""},
5569  {AV_CODEC_ID_FFV1, "FFV1", 0, "FFmpeg video codec #1", ""},
5570  {AV_CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""},
5571  {AV_CODEC_ID_H264, "H264", 0, "H.264", ""},
5572  {AV_CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""},
5573  {AV_CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""},
5574  {AV_CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""},
5575  {AV_CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4 (divx)", ""},
5576  {AV_CODEC_ID_PNG, "PNG", 0, "PNG", ""},
5577  {AV_CODEC_ID_QTRLE, "QTRLE", 0, "QT rle / QT Animation", ""},
5578  {AV_CODEC_ID_THEORA, "THEORA", 0, "Theora", ""},
5579  {AV_CODEC_ID_VP9, "WEBM", 0, "WEBM / VP9", ""},
5580  {0, NULL, 0, NULL, NULL},
5581  };
5582 
5583  /* Recommendations come from the FFmpeg wiki, https://trac.ffmpeg.org/wiki/Encode/VP9.
5584  * The label for BEST has been changed to "Slowest" so that it fits the "Encoding Speed"
5585  * property label in the UI. */
5586  static const EnumPropertyItem ffmpeg_preset_items[] = {
5587  {FFM_PRESET_BEST,
5588  "BEST",
5589  0,
5590  "Slowest",
5591  "Recommended if you have lots of time and want the best compression efficiency"},
5592  {FFM_PRESET_GOOD, "GOOD", 0, "Good", "The default and recommended for most applications"},
5593  {FFM_PRESET_REALTIME, "REALTIME", 0, "Realtime", "Recommended for fast encoding"},
5594  {0, NULL, 0, NULL, NULL},
5595  };
5596 
5597  static const EnumPropertyItem ffmpeg_crf_items[] = {
5598  {FFM_CRF_NONE,
5599  "NONE",
5600  0,
5601  "Constant Bitrate",
5602  "Configure constant bit rate, rather than constant output quality"},
5603  {FFM_CRF_LOSSLESS, "LOSSLESS", 0, "Lossless", ""},
5604  {FFM_CRF_PERC_LOSSLESS, "PERC_LOSSLESS", 0, "Perceptually Lossless", ""},
5605  {FFM_CRF_HIGH, "HIGH", 0, "High Quality", ""},
5606  {FFM_CRF_MEDIUM, "MEDIUM", 0, "Medium Quality", ""},
5607  {FFM_CRF_LOW, "LOW", 0, "Low Quality", ""},
5608  {FFM_CRF_VERYLOW, "VERYLOW", 0, "Very Low Quality", ""},
5609  {FFM_CRF_LOWEST, "LOWEST", 0, "Lowest Quality", ""},
5610  {0, NULL, 0, NULL, NULL},
5611  };
5612 
5613  static const EnumPropertyItem ffmpeg_audio_codec_items[] = {
5614  {AV_CODEC_ID_NONE, "NONE", 0, "No Audio", "Disables audio output, for video-only renders"},
5615  {AV_CODEC_ID_AAC, "AAC", 0, "AAC", ""},
5616  {AV_CODEC_ID_AC3, "AC3", 0, "AC3", ""},
5617  {AV_CODEC_ID_FLAC, "FLAC", 0, "FLAC", ""},
5618  {AV_CODEC_ID_MP2, "MP2", 0, "MP2", ""},
5619  {AV_CODEC_ID_MP3, "MP3", 0, "MP3", ""},
5620  {AV_CODEC_ID_OPUS, "OPUS", 0, "Opus", ""},
5621  {AV_CODEC_ID_PCM_S16LE, "PCM", 0, "PCM", ""},
5622  {AV_CODEC_ID_VORBIS, "VORBIS", 0, "Vorbis", ""},
5623  {0, NULL, 0, NULL, NULL},
5624  };
5625 # endif
5626 
5627  static const EnumPropertyItem audio_channel_items[] = {
5628  {FFM_CHANNELS_MONO, "MONO", 0, "Mono", "Set audio channels to mono"},
5629  {FFM_CHANNELS_STEREO, "STEREO", 0, "Stereo", "Set audio channels to stereo"},
5630  {FFM_CHANNELS_SURROUND4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"},
5632  "SURROUND51",
5633  0,
5634  "5.1 Surround",
5635  "Set audio channels to 5.1 surround sound"},
5637  "SURROUND71",
5638  0,
5639  "7.1 Surround",
5640  "Set audio channels to 7.1 surround sound"},
5641  {0, NULL, 0, NULL, NULL},
5642  };
5643 
5644  srna = RNA_def_struct(brna, "FFmpegSettings", NULL);
5645  RNA_def_struct_sdna(srna, "FFMpegCodecData");
5646  RNA_def_struct_path_func(srna, "rna_FFmpegSettings_path");
5647  RNA_def_struct_ui_text(srna, "FFmpeg Settings", "FFmpeg related settings for the scene");
5648 
5649 # ifdef WITH_FFMPEG
5650  prop = RNA_def_property(srna, "format", PROP_ENUM, PROP_NONE);
5653  RNA_def_property_enum_items(prop, ffmpeg_format_items);
5654  RNA_def_property_enum_default(prop, FFMPEG_MKV);
5655  RNA_def_property_ui_text(prop, "Container", "Output file container");
5657  prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update");
5658 
5659  prop = RNA_def_property(srna, "codec", PROP_ENUM, PROP_NONE);
5660  RNA_def_property_enum_bitflag_sdna(prop, NULL, "codec");
5662  RNA_def_property_enum_items(prop, ffmpeg_codec_items);
5663  RNA_def_property_enum_default(prop, AV_CODEC_ID_H264);
5664  RNA_def_property_ui_text(prop, "Video Codec", "FFmpeg codec to use for video output");
5666  prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegSettings_codec_settings_update");
5667 
5668  prop = RNA_def_property(srna, "video_bitrate", PROP_INT, PROP_NONE);
5669  RNA_def_property_int_sdna(prop, NULL, "video_bitrate");
5671  RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate (kbit/s)");
5673 
5674  prop = RNA_def_property(srna, "minrate", PROP_INT, PROP_NONE);
5675  RNA_def_property_int_sdna(prop, NULL, "rc_min_rate");
5677  RNA_def_property_ui_text(prop, "Min Rate", "Rate control: min rate (kbit/s)");
5679 
5680  prop = RNA_def_property(srna, "maxrate", PROP_INT, PROP_NONE);
5681  RNA_def_property_int_sdna(prop, NULL, "rc_max_rate");
5683  RNA_def_property_ui_text(prop, "Max Rate", "Rate control: max rate (kbit/s)");
5685 
5686  prop = RNA_def_property(srna, "muxrate", PROP_INT, PROP_NONE);
5687  RNA_def_property_int_sdna(prop, NULL, "mux_rate");
5689  RNA_def_property_range(prop, 0, 100000000);
5690  RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/second)");
5692 
5693  prop = RNA_def_property(srna, "gopsize", PROP_INT, PROP_NONE);
5694  RNA_def_property_int_sdna(prop, NULL, "gop_size");
5696  RNA_def_property_range(prop, 0, 500);
5697  RNA_def_property_int_default(prop, 25);
5699  "Keyframe Interval",
5700  "Distance between key frames, also known as GOP size; "
5701  "influences file size and seekability");
5703 
5704  prop = RNA_def_property(srna, "max_b_frames", PROP_INT, PROP_NONE);
5705  RNA_def_property_int_sdna(prop, NULL, "max_b_frames");
5707  RNA_def_property_range(prop, 0, 16);
5709  prop,
5710  "Max B-Frames",
5711  "Maximum number of B-frames between non-B-frames; influences file size and seekability");
5713 
5714  prop = RNA_def_property(srna, "use_max_b_frames", PROP_BOOLEAN, PROP_NONE);
5717  RNA_def_property_ui_text(prop, "Use Max B-Frames", "Set a maximum number of B-frames");
5719 
5720  prop = RNA_def_property(srna, "buffersize", PROP_INT, PROP_NONE);
5721  RNA_def_property_int_sdna(prop, NULL, "rc_buffer_size");
5723  RNA_def_property_range(prop, 0, 2000);
5724  RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size (kb)");
5726 
5727  prop = RNA_def_property(srna, "packetsize", PROP_INT, PROP_NONE);
5728  RNA_def_property_int_sdna(prop, NULL, "mux_packet_size");
5730  RNA_def_property_range(prop, 0, 16384);
5731  RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte)");
5733 
5734  prop = RNA_def_property(srna, "constant_rate_factor", PROP_ENUM, PROP_NONE);
5735  RNA_def_property_enum_sdna(prop, NULL, "constant_rate_factor");
5737  RNA_def_property_enum_items(prop, ffmpeg_crf_items);
5740  prop,
5741  "Output Quality",
5742  "Constant Rate Factor (CRF); tradeoff between video quality and file size");
5744 
5745  prop = RNA_def_property(srna, "ffmpeg_preset", PROP_ENUM, PROP_NONE);
5746  RNA_def_property_enum_bitflag_sdna(prop, NULL, "ffmpeg_preset");
5748  RNA_def_property_enum_items(prop, ffmpeg_preset_items);
5751  prop, "Encoding Speed", "Tradeoff between encoding speed and compression ratio");
5753 
5754  prop = RNA_def_property(srna, "use_autosplit", PROP_BOOLEAN, PROP_NONE);
5757  RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at 2GB boundary");
5759 
5760  prop = RNA_def_property(srna, "use_lossless_output", PROP_BOOLEAN, PROP_NONE);
5763  RNA_def_property_boolean_funcs(prop, NULL, "rna_FFmpegSettings_lossless_output_set");
5764  RNA_def_property_ui_text(prop, "Lossless Output", "Use lossless output for video streams");
5766 
5767  /* FFMPEG Audio*/
5768  prop = RNA_def_property(srna, "audio_codec", PROP_ENUM, PROP_NONE);
5769  RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio_codec");
5771  RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items);
5772  RNA_def_property_ui_text(prop, "Audio Codec", "FFmpeg audio codec to use");
5774 
5775  prop = RNA_def_property(srna, "audio_bitrate", PROP_INT, PROP_NONE);
5776  RNA_def_property_int_sdna(prop, NULL, "audio_bitrate");
5778  RNA_def_property_range(prop, 32, 384);
5779  RNA_def_property_ui_text(prop, "Bitrate", "Audio bitrate (kb/s)");
5781 
5782  prop = RNA_def_property(srna, "audio_volume", PROP_FLOAT, PROP_NONE);
5783  RNA_def_property_float_sdna(prop, NULL, "audio_volume");
5785  RNA_def_property_range(prop, 0.0f, 1.0f);
5786  RNA_def_property_ui_text(prop, "Volume", "Audio volume");
5789 # endif
5790 
5791  /* the following two "ffmpeg" settings are general audio settings */
5792  prop = RNA_def_property(srna, "audio_mixrate", PROP_INT, PROP_NONE);
5793  RNA_def_property_int_sdna(prop, NULL, "audio_mixrate");
5795  RNA_def_property_range(prop, 8000, 192000);
5796  RNA_def_property_ui_text(prop, "Samplerate", "Audio samplerate(samples/s)");
5798 
5799  prop = RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE);
5800  RNA_def_property_enum_sdna(prop, NULL, "audio_channels");
5802  RNA_def_property_enum_items(prop, audio_channel_items);
5803  RNA_def_property_ui_text(prop, "Audio Channels", "Audio channel count");
5804 }
5805 
5807 {
5808  StructRNA *srna;
5809  PropertyRNA *prop;
5810 
5811  /* Bake */
5812  static const EnumPropertyItem bake_mode_items[] = {
5813  //{RE_BAKE_AO, "AO", 0, "Ambient Occlusion", "Bake ambient occlusion"},
5814  {RE_BAKE_NORMALS, "NORMALS", 0, "Normals", "Bake normals"},
5815  {RE_BAKE_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", "Bake displacement"},
5816  {0, NULL, 0, NULL, NULL},
5817  };
5818 
5819  static const EnumPropertyItem pixel_size_items[] = {
5820  {0, "AUTO", 0, "Automatic", "Automatic pixel size, depends on the user interface scale"},
5821  {1, "1", 0, "1x", "Render at full resolution"},
5822  {2, "2", 0, "2x", "Render at 50% resolution"},
5823  {4, "4", 0, "4x", "Render at 25% resolution"},
5824  {8, "8", 0, "8x", "Render at 12.5% resolution"},
5825  {0, NULL, 0, NULL, NULL},
5826  };
5827 
5828  static const EnumPropertyItem threads_mode_items[] = {
5829  {0,
5830  "AUTO",
5831  0,
5832  "Auto-Detect",
5833  "Automatically determine the number of threads, based on CPUs"},
5834  {R_FIXED_THREADS, "FIXED", 0, "Fixed", "Manually determine the number of threads"},
5835  {0, NULL, 0, NULL, NULL},
5836  };
5837 
5838  static const EnumPropertyItem engine_items[] = {
5839  {0, "BLENDER_EEVEE", 0, "Eevee", ""},
5840  {0, NULL, 0, NULL, NULL},
5841  };
5842 
5843  static const EnumPropertyItem freestyle_thickness_items[] = {
5845  "ABSOLUTE",
5846  0,
5847  "Absolute",
5848  "Specify unit line thickness in pixels"},
5850  "RELATIVE",
5851  0,
5852  "Relative",
5853  "Unit line thickness is scaled by the proportion of the present vertical image "
5854  "resolution to 480 pixels"},
5855  {0, NULL, 0, NULL, NULL},
5856  };
5857 
5858  static const EnumPropertyItem views_format_items[] = {
5860  "STEREO_3D",
5861  0,
5862  "Stereo 3D",
5863  "Single stereo camera system, adjust the stereo settings in the camera panel"},
5865  "MULTIVIEW",
5866  0,
5867  "Multi-View",
5868  "Multi camera system, adjust the cameras individually"},
5869  {0, NULL, 0, NULL, NULL},
5870  };
5871 
5872  static const EnumPropertyItem hair_shape_type_items[] = {
5873  {SCE_HAIR_SHAPE_STRAND, "STRAND", 0, "Strand", ""},
5874  {SCE_HAIR_SHAPE_STRIP, "STRIP", 0, "Strip", ""},
5875  {0, NULL, 0, NULL, NULL},
5876  };
5877 
5878  static const EnumPropertyItem meta_input_items[] = {
5879  {0, "SCENE", 0, "Scene", "Use metadata from the current scene"},
5881  "STRIPS",
5882  0,
5883  "Sequencer Strips",
5884  "Use metadata from the strips in the sequencer"},
5885  {0, NULL, 0, NULL, NULL},
5886  };
5887 
5889 
5890  srna = RNA_def_struct(brna, "RenderSettings", NULL);
5891  RNA_def_struct_sdna(srna, "RenderData");
5892  RNA_def_struct_nested(brna, srna, "Scene");
5893  RNA_def_struct_path_func(srna, "rna_RenderSettings_path");
5894  RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene data-block");
5895 
5896  /* Render Data */
5897  prop = RNA_def_property(srna, "image_settings", PROP_POINTER, PROP_NONE);
5899  RNA_def_property_pointer_sdna(prop, NULL, "im_format");
5900  RNA_def_property_struct_type(prop, "ImageFormatSettings");
5901  RNA_def_property_ui_text(prop, "Image Format", "");
5902 
5903  prop = RNA_def_property(srna, "resolution_x", PROP_INT, PROP_PIXEL);
5904  RNA_def_property_int_sdna(prop, NULL, "xsch");
5907  RNA_def_property_range(prop, 4, 65536);
5909  prop, "Resolution X", "Number of horizontal pixels in the rendered image");
5910  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCamera_update");
5911 
5912  prop = RNA_def_property(srna, "resolution_y", PROP_INT, PROP_PIXEL);
5913  RNA_def_property_int_sdna(prop, NULL, "ysch");
5916  RNA_def_property_range(prop, 4, 65536);
5918  prop, "Resolution Y", "Number of vertical pixels in the rendered image");
5919  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCamera_update");
5920 
5921  prop = RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE);
5922  RNA_def_property_int_sdna(prop, NULL, "size");
5924  RNA_def_property_range(prop, 1, SHRT_MAX);
5925  RNA_def_property_ui_range(prop, 1, 100, 10, 1);
5926  RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for render resolution");
5927  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneSequencer_update");
5928 
5929  prop = RNA_def_property(srna, "tile_x", PROP_INT, PROP_PIXEL);
5930  RNA_def_property_int_sdna(prop, NULL, "tilex");
5932  RNA_def_property_range(prop, 8, 65536);
5933  RNA_def_property_ui_text(prop, "Tile X", "Horizontal tile size to use while rendering");
5935 
5936  prop = RNA_def_property(srna, "tile_y", PROP_INT, PROP_PIXEL);
5937  RNA_def_property_int_sdna(prop, NULL, "tiley");
5939  RNA_def_property_range(prop, 8, 65536);
5940  RNA_def_property_ui_text(prop, "Tile Y", "Vertical tile size to use while rendering");
5942 
5943  prop = RNA_def_property(srna, "preview_start_resolution", PROP_INT, PROP_NONE);
5945  RNA_def_property_range(prop, 8, 16384);
5947  "Start Resolution",
5948  "Resolution to start rendering preview at, "
5949  "progressively increasing it to the full viewport size");
5951 
5952  prop = RNA_def_property(srna, "preview_pixel_size", PROP_ENUM, PROP_NONE);
5953  RNA_def_property_enum_sdna(prop, NULL, "preview_pixel_size");
5954  RNA_def_property_enum_items(prop, pixel_size_items);
5955  RNA_def_property_ui_text(prop, "Pixel Size", "Pixel size for viewport rendering");
5957 
5958  prop = RNA_def_property(srna, "pixel_aspect_x", PROP_FLOAT, PROP_NONE);
5959  RNA_def_property_float_sdna(prop, NULL, "xasp");
5962  RNA_def_property_range(prop, 1.0f, 200.0f);
5964  "Pixel Aspect X",
5965  "Horizontal aspect ratio - for anamorphic or non-square pixel output");
5966  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCamera_update");
5967 
5968  prop = RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE);
5969  RNA_def_property_float_sdna(prop, NULL, "yasp");
5972  RNA_def_property_range(prop, 1.0f, 200.0f);
5974  prop, "Pixel Aspect Y", "Vertical aspect ratio - for anamorphic or non-square pixel output");
5975  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCamera_update");
5976 
5977  prop = RNA_def_property(srna, "ffmpeg", PROP_POINTER, PROP_NONE);
5978  RNA_def_property_struct_type(prop, "FFmpegSettings");
5979  RNA_def_property_pointer_sdna(prop, NULL, "ffcodecdata");
5981  RNA_def_property_ui_text(prop, "FFmpeg Settings", "FFmpeg related settings for the scene");
5982 
5983  prop = RNA_def_property(srna, "fps", PROP_INT, PROP_NONE);
5984  RNA_def_property_int_sdna(prop, NULL, "frs_sec");
5986  RNA_def_property_range(prop, 1, SHRT_MAX);
5987  RNA_def_property_ui_range(prop, 1, 240, 1, -1);
5988  RNA_def_property_ui_text(prop, "FPS", "Framerate, expressed in frames per second");
5989  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_fps_update");
5990 
5991  prop = RNA_def_property(srna, "fps_base", PROP_FLOAT, PROP_NONE);
5992  RNA_def_property_float_sdna(prop, NULL, "frs_sec_base");
5994  RNA_def_property_range(prop, 1e-5f, 1e6f);
5995  /* Important to show at least 3 decimal points because multiple presets set this to 1.001. */
5996  RNA_def_property_ui_range(prop, 0.1f, 120.0f, 2, 3);
5997  RNA_def_property_ui_text(prop, "FPS Base", "Framerate base");
5998  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_fps_update");
5999 
6000  /* frame mapping */
6001  prop = RNA_def_property(srna, "frame_map_old", PROP_INT, PROP_NONE);
6002  RNA_def_property_int_sdna(prop, NULL, "framapto");
6004  RNA_def_property_range(prop, 1, 900);
6005  RNA_def_property_ui_text(prop, "Frame Map Old", "Old mapping value in frames");
6006  RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_framelen_update");
6007 
6008  prop = RNA_def_property(srna, "frame_map_new", PROP_INT, PROP_NONE);
6009  RNA_def_property_int_sdna(prop, NULL, "images");
6011  RNA_def_property_range(prop, 1, 900);
6012  RNA_def_property_ui_text(prop, "Frame Map New", "How many frames the Map Old will last");
6013  RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_framelen_update");
6014 
6015  prop = RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE);
6016  RNA_def_property_float_sdna(prop, NULL, "dither_intensity");
6017  RNA_def_property_range(prop, 0.0, FLT_MAX);
6018  RNA_def_property_ui_range(prop, 0.0, 2.0, 0.1, 2);
6020  prop,
6021  "Dither Intensity",
6022  "Amount of dithering noise added to the rendered image to break up banding");
6024 
6025  prop = RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_PIXEL);
6026  RNA_def_property_float_sdna(prop, NULL, "gauss");
6027  RNA_def_property_range(prop, 0.0f, 500.0f);
6028  RNA_def_property_ui_range(prop, 0.01f, 10.0f, 1, 2);
6030  prop, "Filter Size", "Width over which the reconstruction filter combines samples");
6032 
6033  prop = RNA_def_property(srna, "film_transparent", PROP_BOOLEAN, PROP_NONE);
6034  RNA_def_property_boolean_sdna(prop, NULL, "alphamode", R_ALPHAPREMUL);
6036  prop,
6037  "Transparent",
6038  "World background is transparent, for compositing the render over another background");
6039  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
6040 
6041  prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE);
6044  RNA_def_property_ui_text(prop, "Edge", "Draw stylized strokes using Freestyle");
6045  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_use_freestyle_update");
6046 
6047  /* threads */
6048  prop = RNA_def_property(srna, "threads", PROP_INT, PROP_NONE);
6049  RNA_def_property_int_sdna(prop, NULL, "threads");
6051  RNA_def_property_int_funcs(prop, "rna_RenderSettings_threads_get", NULL, NULL);
6053  "Threads",
6054  "Maximum number of CPU cores to use simultaneously while rendering "
6055  "(for multi-core/CPU systems)");
6057 
6058  prop = RNA_def_property(srna, "threads_mode", PROP_ENUM, PROP_NONE);
6060  RNA_def_property_enum_items(prop, threads_mode_items);
6061  RNA_def_property_enum_funcs(prop, "rna_RenderSettings_threads_mode_get", NULL, NULL);
6062  RNA_def_property_ui_text(prop, "Threads Mode", "Determine the amount of render threads used");
6064 
6065  /* motion blur */
6066  prop = RNA_def_property(srna, "use_motion_blur", PROP_BOOLEAN, PROP_NONE);
6067  RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR);
6068  RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur");
6070  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
6071 
6072  prop = RNA_def_property(srna, "motion_blur_shutter", PROP_FLOAT, PROP_FACTOR);
6073  RNA_def_property_float_sdna(prop, NULL, "blurfac");
6074  RNA_def_property_range(prop, 0.0f, FLT_MAX);
6075  RNA_def_property_ui_range(prop, 0.01f, 1.0f, 1, 2);
6076  RNA_def_property_ui_text(prop, "Shutter", "Time taken in frames between shutter open and close");
6077  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
6078 
6079  prop = RNA_def_property(srna, "motion_blur_shutter_curve", PROP_POINTER, PROP_NONE);
6080  RNA_def_property_pointer_sdna(prop, NULL, "mblur_shutter_curve");
6081  RNA_def_property_struct_type(prop, "CurveMapping");
6083  prop, "Shutter Curve", "Curve defining the shutter's openness over time");
6084 
6085  /* Hairs */
6086  prop = RNA_def_property(srna, "hair_type", PROP_ENUM, PROP_NONE);
6087  RNA_def_property_enum_items(prop, hair_shape_type_items);
6088  RNA_def_property_ui_text(prop, "Hair Shape Type", "Hair shape type");
6089  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
6090 
6091  prop = RNA_def_property(srna, "hair_subdiv", PROP_INT, PROP_NONE);
6092  RNA_def_property_range(prop, 0, 3);
6093  RNA_def_property_ui_text(prop, "Additional Subdiv", "Additional subdivision along the hair");
6094  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_glsl_update");
6095 
6096  /* Performance */
6097  prop = RNA_def_property(srna, "use_high_quality_normals", PROP_BOOLEAN, PROP_NONE);
6100  "High Quality Normals",
6101  "Use high quality tangent space at the cost of lower performance");
6102  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_mesh_quality_update");
6103 
6104  /* border */
6105  prop = RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE);
6109  prop, "Render Region", "Render a user-defined render region, within the frame size");
6111 
6112  prop = RNA_def_property(srna, "border_min_x", PROP_FLOAT, PROP_NONE);
6113  RNA_def_property_float_sdna(prop, NULL, "border.xmin");
6114  RNA_def_property_range(prop, 0.0f, 1.0f);
6116  RNA_def_property_ui_text(prop, "Region Minimum X", "Minimum X value for the render region");
6118 
6119  prop = RNA_def_property(srna, "border_min_y", PROP_FLOAT, PROP_NONE);
6120  RNA_def_property_float_sdna(prop, NULL, "border.ymin");
6121  RNA_def_property_range(prop, 0.0f, 1.0f);
6123  RNA_def_property_ui_text(prop, "Region Minimum Y", "Minimum Y value for the render region");
6125 
6126  prop = RNA_def_property(srna, "border_max_x", PROP_FLOAT, PROP_NONE);
6127  RNA_def_property_float_sdna(prop, NULL, "border.xmax");
6128  RNA_def_property_range(prop, 0.0f, 1.0f);
6130  RNA_def_property_ui_text(prop, "Region Maximum X", "Maximum X value for the render region");
6132 
6133  prop = RNA_def_property(srna, "border_max_y", PROP_FLOAT, PROP_NONE);
6134  RNA_def_property_float_sdna(prop, NULL, "border.ymax");
6135  RNA_def_property_range(prop, 0.0f, 1.0f);
6137  RNA_def_property_ui_text(prop, "Region Maximum Y", "Maximum Y value for the render region");
6139 
6140  prop = RNA_def_property(srna, "use_crop_to_border", PROP_BOOLEAN, PROP_NONE);
6141  RNA_def_property_boolean_sdna(prop, NULL, "mode", R_CROP);
6144  prop, "Crop to Render Region", "Crop the rendered frame to the defined render region size");
6146 
6147  prop = RNA_def_property(srna, "use_placeholder", PROP_BOOLEAN, PROP_NONE);
6148  RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH);
6151  prop,
6152  "Placeholders",
6153  "Create empty placeholder files while rendering frames (similar to Unix 'touch')");
6155 
6156  prop = RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
6158  RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing files while rendering");
6160 
6161  prop = RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE);
6162  RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP);
6165  "Compositing",
6166  "Process the render result through the compositing pipeline, "
6167  "if compositing nodes are enabled");
6169 
6170  prop = RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE);
6171  RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ);
6174  "Sequencer",
6175  "Process the render (and composited) result through the video sequence "
6176  "editor pipeline, if sequencer strips exist");
6178 
6179  prop = RNA_def_property(srna, "use_file_extension", PROP_BOOLEAN, PROP_NONE);
6180  RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXTENSION);
6183  prop,
6184  "File Extensions",
6185  "Add the file format extensions to the rendered file name (eg: filename + .jpg)");
6187 
6188 # if 0 /* moved */
6189  prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
6190  RNA_def_property_enum_sdna(prop, NULL, "imtype");
6192  RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_file_format_set", NULL);
6193  RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as");
6195 # endif
6196 
6197  prop = RNA_def_property(srna, "file_extension", PROP_STRING, PROP_NONE);
6199  prop, "rna_SceneRender_file_ext_get", "rna_SceneRender_file_ext_length", NULL);
6200  RNA_def_property_ui_text(prop, "Extension", "The file extension used for saving renders");
6202 
6203  prop = RNA_def_property(srna, "is_movie_format", PROP_BOOLEAN, PROP_NONE);
6204  RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_is_movie_format_get", NULL);
6206  RNA_def_property_ui_text(prop, "Movie Format", "When true the format is a movie");
6207 
6208  prop = RNA_def_property(srna, "use_save_buffers", PROP_BOOLEAN, PROP_NONE);
6212  prop,
6213  "Save Buffers",
6214  "Save tiles for all RenderLayers and SceneNodes to files in the temp directory "
6215  "(saves memory, required for Full Sample)");
6217 
6218  prop = RNA_def_property(srna, "use_full_sample", PROP_BOOLEAN, PROP_NONE);
6221  "Full Sample",
6222  "Save for every anti-aliasing sample the entire RenderLayer results "
6223  "(this solves anti-aliasing issues with compositing)");
6225 
6226  prop = RNA_def_property(srna, "use_lock_interface", PROP_BOOLEAN, PROP_NONE);
6227  RNA_def_property_boolean_sdna(prop, NULL, "use_lock_interface", 1);
6229  RNA_def_property_ui_icon(prop, ICON_UNLOCKED, true);
6231  prop,
6232  "Lock Interface",
6233  "Lock interface during rendering in favor of giving more memory to the renderer");
6235 
6236  prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
6237  RNA_def_property_string_sdna(prop, NULL, "pic");
6239  "Output Path",
6240  "Directory/name to save animations, # characters defines the position "
6241  "and length of frame numbers");
6243 
6244  /* Render result EXR cache. */
6245  prop = RNA_def_property(srna, "use_render_cache", PROP_BOOLEAN, PROP_NONE);
6249  "Cache Result",
6250  "Save render cache to EXR files (useful for heavy compositing, "
6251  "Note: affects indirectly rendered scenes)");
6253 
6254  /* Bake */
6255 
6256  prop = RNA_def_property(srna, "bake_type", PROP_ENUM, PROP_NONE);
6257  RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_mode");
6258  RNA_def_property_enum_items(prop, bake_mode_items);
6259  RNA_def_property_ui_text(prop, "Bake Type", "Choose shading information to bake into the image");
6261 
6262  prop = RNA_def_property(srna, "use_bake_selected_to_active", PROP_BOOLEAN, PROP_NONE);
6265  "Selected to Active",
6266  "Bake shading on the surface of selected objects to the active object");
6268 
6269  prop = RNA_def_property(srna, "use_bake_clear", PROP_BOOLEAN, PROP_NONE);
6270  RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR);
6271  RNA_def_property_ui_text(prop, "Clear", "Clear Images before baking");
6273 
6274  prop = RNA_def_property(srna, "bake_margin", PROP_INT, PROP_PIXEL);
6275  RNA_def_property_int_sdna(prop, NULL, "bake_filter");
6276  RNA_def_property_range(prop, 0, 64);
6277  RNA_def_property_ui_text(prop, "Margin", "Extends the baked result as a post process filter");
6279 
6280  prop = RNA_def_property(srna, "bake_bias", PROP_FLOAT, PROP_NONE);
6281  RNA_def_property_float_sdna(prop, NULL, "bake_biasdist");
6282  RNA_def_property_range(prop, 0.0, 1000.0);
6284  prop, "Bias", "Bias towards faces further away from the object (in blender units)");
6286 
6287  prop = RNA_def_property(srna, "use_bake_multires", PROP_BOOLEAN, PROP_NONE);
6288  RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_MULTIRES);
6289  RNA_def_property_ui_text(prop, "Bake from Multires", "Bake directly from multires object");
6291 
6292  prop = RNA_def_property(srna, "use_bake_lores_mesh", PROP_BOOLEAN, PROP_NONE);
6295  prop, "Low Resolution Mesh", "Calculate heights against unsubdivided low resolution mesh");
6297 
6298  prop = RNA_def_property(srna, "bake_samples", PROP_INT, PROP_NONE);
6299  RNA_def_property_int_sdna(prop, NULL, "bake_samples");
6300  RNA_def_property_range(prop, 64, 1024);
6302  prop, "Samples", "Number of samples used for ambient occlusion baking from multires");
6304 
6305  prop = RNA_def_property(srna, "use_bake_user_scale", PROP_BOOLEAN, PROP_NONE);
6307  RNA_def_property_ui_text(prop, "User Scale", "Use a user scale for the derivative map");
6308 
6309  prop = RNA_def_property(srna, "bake_user_scale", PROP_FLOAT, PROP_NONE);
6310  RNA_def_property_float_sdna(prop, NULL, "bake_user_scale");
6311  RNA_def_property_range(prop, 0.0, 1000.0);
6313  "Scale",
6314  "Instead of automatically normalizing to the range 0 to 1, "
6315  "apply a user scale to the derivative map");
6316 
6317  /* stamp */
6318 
6319  prop = RNA_def_property(srna, "use_stamp_time", PROP_BOOLEAN, PROP_NONE);
6322  prop, "Stamp Time", "Include the rendered frame timecode as HH:MM:SS.FF in image metadata");
6324 
6325  prop = RNA_def_property(srna, "use_stamp_date", PROP_BOOLEAN, PROP_NONE);
6327  RNA_def_property_ui_text(prop, "Stamp Date", "Include the current date in image/video metadata");
6329 
6330  prop = RNA_def_property(srna, "use_stamp_frame", PROP_BOOLEAN, PROP_NONE);
6332  RNA_def_property_ui_text(prop, "Stamp Frame", "Include the frame number in image metadata");
6334 
6335  prop = RNA_def_property(srna, "use_stamp_frame_range", PROP_BOOLEAN, PROP_NONE);
6338  prop, "Stamp Frame", "Include the rendered frame range in image/video metadata");
6340 
6341  prop = RNA_def_property(srna, "use_stamp_camera", PROP_BOOLEAN, PROP_NONE);
6344  prop, "Stamp Camera", "Include the name of the active camera in image metadata");
6346 
6347  prop = RNA_def_property(srna, "use_stamp_lens", PROP_BOOLEAN, PROP_NONE);
6350  prop, "Stamp Lens", "Include the active camera's lens in image metadata");
6352 
6353  prop = RNA_def_property(srna, "use_stamp_scene", PROP_BOOLEAN, PROP_NONE);
6356  prop, "Stamp Scene", "Include the name of the active scene in image/video metadata");
6358 
6359  prop = RNA_def_property(srna, "use_stamp_note", PROP_BOOLEAN, PROP_NONE);
6361  RNA_def_property_ui_text(prop, "Stamp Note", "Include a custom note in image/video metadata");
6363 
6364  prop = RNA_def_property(srna, "use_stamp_marker", PROP_BOOLEAN, PROP_NONE);
6367  prop, "Stamp Marker", "Include the name of the last marker in image metadata");
6369 
6370  prop = RNA_def_property(srna, "use_stamp_filename", PROP_BOOLEAN, PROP_NONE);
6373  prop, "Stamp Filename", "Include the .blend filename in image/video metadata");
6375 
6376  prop = RNA_def_property(srna, "use_stamp_sequencer_strip", PROP_BOOLEAN, PROP_NONE);
6379  "Stamp Sequence Strip",
6380  "Include the name of the foreground sequence strip in image metadata");
6382 
6383  prop = RNA_def_property(srna, "use_stamp_render_time", PROP_BOOLEAN, PROP_NONE);
6385  RNA_def_property_ui_text(prop, "Stamp Render Time", "Include the render time in image metadata");
6387 
6388  prop = RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_NONE);
6389  RNA_def_property_string_sdna(prop, NULL, "stamp_udata");
6390  RNA_def_property_ui_text(prop, "Stamp Note Text", "Custom text to appear in the stamp note");
6392 
6393  prop = RNA_def_property(srna, "use_stamp", PROP_BOOLEAN, PROP_NONE);
6396  prop, "Stamp Output", "Render the stamp info text in the rendered image");
6398 
6399  prop = RNA_def_property(srna, "use_stamp_labels", PROP_BOOLEAN, PROP_NONE);
6402  prop, "Stamp Labels", "Display stamp labels (\"Camera\" in front of camera name, etc.)");
6404 
6405  prop = RNA_def_property(srna, "metadata_input", PROP_ENUM, PROP_NONE); /* as an enum */
6406  RNA_def_property_enum_bitflag_sdna(prop, NULL, "stamp");
6407  RNA_def_property_enum_items(prop, meta_input_items);
6408  RNA_def_property_ui_text(prop, "Metadata Input", "Where to take the metadata from");
6410 
6411  prop = RNA_def_property(srna, "use_stamp_memory", PROP_BOOLEAN, PROP_NONE);
6414  prop, "Stamp Peak Memory", "Include the peak memory usage in image metadata");
6416 
6417  prop = RNA_def_property(srna, "use_stamp_hostname", PROP_BOOLEAN, PROP_NONE);
6420  prop, "Stamp Hostname", "Include the hostname of the machine that rendered the frame");
6422 
6423  prop = RNA_def_property(srna, "stamp_font_size", PROP_INT, PROP_PIXEL);
6424  RNA_def_property_int_sdna(prop, NULL, "stamp_font_id");
6425  RNA_def_property_range(prop, 8, 64);
6426  RNA_def_property_ui_text(prop, "Font Size", "Size of the font used when rendering stamp text");
6428 
6429  prop = RNA_def_property(srna, "stamp_foreground", PROP_FLOAT, PROP_COLOR);
6430  RNA_def_property_float_sdna(prop, NULL, "fg_stamp");
6431  RNA_def_property_array(prop, 4);
6432  RNA_def_property_range(prop, 0.0, 1.0);
6433  RNA_def_property_ui_text(prop, "Text Color", "Color to use for stamp text");
6435 
6436  prop = RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR);
6437  RNA_def_property_float_sdna(prop, NULL, "bg_stamp");
6438  RNA_def_property_array(prop, 4);
6439  RNA_def_property_range(prop, 0.0, 1.0);
6440  RNA_def_property_ui_text(prop, "Background", "Color to use behind stamp text");
6442 
6443  /* sequencer draw options */
6444 
6445 # if 0 /* see R_SEQ_GL_REND comment */
6446  prop = RNA_def_property(srna, "use_sequencer_gl_render", PROP_BOOLEAN, PROP_NONE);
6447  RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_GL_REND);
6448  RNA_def_property_ui_text(prop, "Sequencer OpenGL", "");
6449 # endif
6450 
6451  prop = RNA_def_property(srna, "sequencer_gl_preview", PROP_ENUM, PROP_NONE);
6452  RNA_def_property_enum_sdna(prop, NULL, "seq_prev_type");
6455  prop, "Sequencer Preview Shading", "Display method used in the sequencer view");
6456  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SceneSequencer_update");
6457 
6458 # if 0 /* UNUSED, see R_SEQ_GL_REND comment */
6459  prop = RNA_def_property(srna, "sequencer_gl_render", PROP_ENUM, PROP_NONE);
6460  RNA_def_property_enum_sdna(prop, NULL, "seq_rend_type");
6462  /* XXX Label and tooltips are obviously wrong! */
6464  prop, "Sequencer Preview Shading", "Display method used in the sequencer view");
6465 # endif
6466 
6467  prop = RNA_def_property(srna, "use_sequencer_override_scene_strip", PROP_BOOLEAN, PROP_NONE);
6470  "Override Scene Settings",
6471  "Use workbench render settings from the sequencer scene, instead of "
6472  "each individual scene used in the strip");
6473  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SceneSequencer_update");
6474 
6475  prop = RNA_def_property(srna, "use_single_layer", PROP_BOOLEAN, PROP_NONE);
6478  "Render Single Layer",
6479  "Only render the active layer. Only affects rendering from the "
6480  "interface, ignored for rendering from command line");
6483 
6484  /* views (stereoscopy et al) */
6485  prop = RNA_def_property(srna, "views", PROP_COLLECTION, PROP_NONE);
6486  RNA_def_property_struct_type(prop, "SceneRenderView");
6487  RNA_def_property_ui_text(prop, "Render Views", "");
6488  rna_def_render_views(brna, prop);
6489 
6490  prop = RNA_def_property(srna, "stereo_views", PROP_COLLECTION, PROP_NONE);
6491  RNA_def_property_collection_sdna(prop, NULL, "views", NULL);
6493  "rna_RenderSettings_stereoViews_begin",
6494  "rna_iterator_listbase_next",
6495  "rna_iterator_listbase_end",
6496  "rna_iterator_listbase_get",
6497  NULL,
6498  NULL,
6499  NULL,
6500  NULL);
6501  RNA_def_property_struct_type(prop, "SceneRenderView");
6502  RNA_def_property_ui_text(prop, "Render Views", "");
6503 
6504  prop = RNA_def_property(srna, "use_multiview", PROP_BOOLEAN, PROP_NONE);
6505  RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_MULTIVIEW);
6506  RNA_def_property_ui_text(prop, "Multiple Views", "Use multiple views in the scene");
6508 
6509  prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE);
6510  RNA_def_property_enum_items(prop, views_format_items);
6512  RNA_def_property_ui_text(prop, "Setup Stereo Mode", "");
6513  RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_views_format_set", NULL);
6515 
6516  /* engine */
6517  prop = RNA_def_property(srna, "engine", PROP_ENUM, PROP_NONE);
6518  RNA_def_property_enum_items(prop, engine_items);
6520  "rna_RenderSettings_engine_get",
6521  "rna_RenderSettings_engine_set",
6522  "rna_RenderSettings_engine_itemf");
6524  RNA_def_property_ui_text(prop, "Engine", "Engine to use for rendering");
6525  RNA_def_property_update(prop, NC_WINDOW, "rna_RenderSettings_engine_update");
6526 
6527  prop = RNA_def_property(srna, "has_multiple_engines", PROP_BOOLEAN, PROP_NONE);
6528  RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_multiple_engines_get", NULL);
6531  prop, "Multiple Engines", "More than one rendering engine is available");
6532 
6533  prop = RNA_def_property(srna, "use_spherical_stereo", PROP_BOOLEAN, PROP_NONE);
6534  RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_use_spherical_stereo_get", NULL);
6537  prop, "Use Spherical Stereo", "Active render engine supports spherical stereo rendering");
6538 
6539  /* simplify */
6540  prop = RNA_def_property(srna, "use_simplify", PROP_BOOLEAN, PROP_NONE);
6543  prop, "Use Simplify", "Enable simplification of scene for quicker preview renders");
6544  RNA_def_property_update(prop, 0, "rna_Scene_use_simplify_update");
6545 
6546  prop = RNA_def_property(srna, "simplify_subdivision", PROP_INT, PROP_UNSIGNED);
6547  RNA_def_property_int_sdna(prop, NULL, "simplify_subsurf");
6548  RNA_def_property_ui_range(prop, 0, 6, 1, -1);
6549  RNA_def_property_ui_text(prop, "Simplify Subdivision", "Global maximum subdivision level");
6550  RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
6551 
6552  prop = RNA_def_property(srna, "simplify_child_particles", PROP_FLOAT, PROP_FACTOR);
6553  RNA_def_property_float_sdna(prop, NULL, "simplify_particles");
6554  RNA_def_property_ui_text(prop, "Simplify Child Particles", "Global child particles percentage");
6555  RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
6556 
6557  prop = RNA_def_property(srna, "simplify_subdivision_render", PROP_INT, PROP_UNSIGNED);
6558  RNA_def_property_int_sdna(prop, NULL, "simplify_subsurf_render");
6559  RNA_def_property_ui_range(prop, 0, 6, 1, -1);
6561  prop, "Simplify Subdivision", "Global maximum subdivision level during rendering");
6562  RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
6563 
6564  prop = RNA_def_property(srna, "simplify_child_particles_render", PROP_FLOAT, PROP_FACTOR);
6565  RNA_def_property_float_sdna(prop, NULL, "simplify_particles_render");
6567  prop, "Simplify Child Particles", "Global child particles percentage during rendering");
6568  RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
6569 
6570  prop = RNA_def_property(srna, "simplify_volumes", PROP_FLOAT, PROP_FACTOR);
6571  RNA_def_property_range(prop, 0.0, 1.0f);
6573  prop, "Simplify Volumes", "Resolution percentage of volume objects in viewport");
6574  RNA_def_property_update(prop, 0, "rna_Scene_simplify_update");
6575 
6576  /* Grease Pencil - Simplify Options */
6577  prop = RNA_def_property(srna, "simplify_gpencil", PROP_BOOLEAN, PROP_NONE);
6578  RNA_def_property_boolean_sdna(prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_ENABLE);
6579  RNA_def_property_ui_text(prop, "Simplify", "Simplify Grease Pencil drawing");
6580  RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
6581 
6582  prop = RNA_def_property(srna, "simplify_gpencil_onplay", PROP_BOOLEAN, PROP_NONE);
6583  RNA_def_property_boolean_sdna(prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_ON_PLAY);
6585  prop, "Playback Only", "Simplify Grease Pencil only during animation playback");
6586  RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
6587 
6588  prop = RNA_def_property(srna, "simplify_gpencil_antialiasing", PROP_BOOLEAN, PROP_NONE);
6590  RNA_def_property_ui_text(prop, "Antialiasing", "Use Antialiasing to smooth stroke edges");
6591  RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
6592 
6593  prop = RNA_def_property(srna, "simplify_gpencil_view_fill", PROP_BOOLEAN, PROP_NONE);
6595  RNA_def_property_ui_text(prop, "Fill", "Display fill strokes in the viewport");
6596  RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
6597 
6598  prop = RNA_def_property(srna, "simplify_gpencil_modifier", PROP_BOOLEAN, PROP_NONE);
6600  prop, NULL, "simplify_gpencil", SIMPLIFY_GPENCIL_MODIFIER);
6601  RNA_def_property_ui_text(prop, "Modifiers", "Display modifiers");
6602  RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
6603 
6604  prop = RNA_def_property(srna, "simplify_gpencil_shader_fx", PROP_BOOLEAN, PROP_NONE);
6606  RNA_def_property_ui_text(prop, "Shader Effects", "Display Shader Effects");
6607  RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
6608 
6609  prop = RNA_def_property(srna, "simplify_gpencil_tint", PROP_BOOLEAN, PROP_NONE);
6611  RNA_def_property_ui_text(prop, "Layers Tinting", "Display layer tint");
6612  RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
6613 
6614  /* persistent data */
6615  prop = RNA_def_property(srna, "use_persistent_data", PROP_BOOLEAN, PROP_NONE);
6618  "Persistent Data",
6619  "Keep render data around for faster re-renders and animation renders, "
6620  "at the cost of increased memory usage");
6621  RNA_def_property_update(prop, 0, "rna_Scene_use_persistent_data_update");
6622 
6623  /* Freestyle line thickness options */
6624  prop = RNA_def_property(srna, "line_thickness_mode", PROP_ENUM, PROP_NONE);
6625  RNA_def_property_enum_sdna(prop, NULL, "line_thickness_mode");
6626  RNA_def_property_enum_items(prop, freestyle_thickness_items);
6628  prop, "Line Thickness Mode", "Line thickness mode for Freestyle line drawing");
6629  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
6630 
6631  prop = RNA_def_property(srna, "line_thickness", PROP_FLOAT, PROP_PIXEL);
6632  RNA_def_property_float_sdna(prop, NULL, "unit_line_thickness");
6633  RNA_def_property_range(prop, 0.0f, 10000.0f);
6634  RNA_def_property_ui_text(prop, "Line Thickness", "Line thickness in pixels");
6635  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_freestyle_update");
6636 
6637  /* Bake Settings */
6638  prop = RNA_def_property(srna, "bake", PROP_POINTER, PROP_NONE);
6640  RNA_def_property_pointer_sdna(prop, NULL, "bake");
6641  RNA_def_property_struct_type(prop, "BakeSettings");
6642  RNA_def_property_ui_text(prop, "Bake Data", "");
6643 
6644  /* Nestled Data */
6645  /* *** Non-Animated *** */
6646  RNA_define_animate_sdna(false);
6647  rna_def_bake_data(brna);
6649 
6650  /* *** Animated *** */
6651 
6652  /* Scene API */
6653  RNA_api_scene_render(srna);
6654 }
6655 
6656 /* scene.objects */
6658 {
6659  StructRNA *srna;
6660 
6661  RNA_def_property_srna(cprop, "SceneObjects");
6662  srna = RNA_def_struct(brna, "SceneObjects", NULL);
6663  RNA_def_struct_sdna(srna, "Scene");
6664  RNA_def_struct_ui_text(srna, "Scene Objects", "All of the scene objects");
6665 }
6666 
6667 /* scene.timeline_markers */
6669 {
6670  StructRNA *srna;
6671 
6672  FunctionRNA *func;
6673  PropertyRNA *parm;
6674 
6675  RNA_def_property_srna(cprop, "TimelineMarkers");
6676  srna = RNA_def_struct(brna, "TimelineMarkers", NULL);
6677  RNA_def_struct_sdna(srna, "Scene");
6678  RNA_def_struct_ui_text(srna, "Timeline Markers", "Collection of timeline markers");
6679 
6680  func = RNA_def_function(srna, "new", "rna_TimeLine_add");
6681  RNA_def_function_ui_description(func, "Add a keyframe to the curve");
6682  parm = RNA_def_string(func, "name", "Marker", 0, "", "New name for the marker (not unique)");
6684  parm = RNA_def_int(func,
6685  "frame",
6686  1,
6687  -MAXFRAME,
6688  MAXFRAME,
6689  "",
6690  "The frame for the new marker",
6691  -MAXFRAME,
6692  MAXFRAME);
6693  parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Newly created timeline marker");
6694  RNA_def_function_return(func, parm);
6695 
6696  func = RNA_def_function(srna, "remove", "rna_TimeLine_remove");
6697  RNA_def_function_ui_description(func, "Remove a timeline marker");
6699  parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline marker to remove");
6702 
6703  func = RNA_def_function(srna, "clear", "rna_TimeLine_clear");
6704  RNA_def_function_ui_description(func, "Remove all timeline markers");
6705 }
6706 
6707 /* scene.keying_sets */
6709 {
6710  StructRNA *srna;
6711  PropertyRNA *prop;
6712 
6713  FunctionRNA *func;
6714  PropertyRNA *parm;
6715 
6716  RNA_def_property_srna(cprop, "KeyingSets");
6717  srna = RNA_def_struct(brna, "KeyingSets", NULL);
6718  RNA_def_struct_sdna(srna, "Scene");
6719  RNA_def_struct_ui_text(srna, "Keying Sets", "Scene keying sets");
6720 
6721  /* Add Keying Set */
6722  func = RNA_def_function(srna, "new", "rna_Scene_keying_set_new");
6723  RNA_def_function_ui_description(func, "Add a new Keying Set to Scene");
6725  /* name */
6726  RNA_def_string(func, "idname", "KeyingSet", 64, "IDName", "Internal identifier of Keying Set");
6727  RNA_def_string(func, "name", "KeyingSet", 64, "Name", "User visible name of Keying Set");
6728  /* returns the new KeyingSet */
6729  parm = RNA_def_pointer(func, "keyingset", "KeyingSet", "", "Newly created Keying Set");
6730  RNA_def_function_return(func, parm);
6731 
6732  prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
6733  RNA_def_property_struct_type(prop, "KeyingSet");
6736  prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL, NULL);
6738  prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes");
6740 
6741  prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
6742  RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
6744  "rna_Scene_active_keying_set_index_get",
6745  "rna_Scene_active_keying_set_index_set",
6746  NULL);
6748  prop,
6749  "Active Keying Set Index",
6750  "Current Keying Set index (negative for 'builtin' and positive for 'absolute')");
6752 }
6753 
6755 {
6756  StructRNA *srna;
6757  PropertyRNA *prop;
6758 
6759  RNA_def_property_srna(cprop, "KeyingSetsAll");
6760  srna = RNA_def_struct(brna, "KeyingSetsAll", NULL);
6761  RNA_def_struct_sdna(srna, "Scene");
6762  RNA_def_struct_ui_text(srna, "Keying Sets All", "All available keying sets");
6763 
6764  /* NOTE: no add/remove available here, without screwing up this amalgamated list... */
6765 
6766  prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
6767  RNA_def_property_struct_type(prop, "KeyingSet");
6770  prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL, NULL);
6772  prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes");
6774 
6775  prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE);
6776  RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
6778  "rna_Scene_active_keying_set_index_get",
6779  "rna_Scene_active_keying_set_index_set",
6780  NULL);
6782  prop,
6783  "Active Keying Set Index",
6784  "Current Keying Set index (negative for 'builtin' and positive for 'absolute')");
6786 }
6787 
6788 /* Runtime property, used to remember uv indices, used only in UV stitch for now.
6789  */
6791 {
6792  StructRNA *srna;
6793  PropertyRNA *prop;
6794 
6795  srna = RNA_def_struct(brna, "SelectedUvElement", "PropertyGroup");
6796  RNA_def_struct_ui_text(srna, "Selected UV Element", "");
6797 
6798  /* store the index to the UV element selected */
6799  prop = RNA_def_property(srna, "element_index", PROP_INT, PROP_UNSIGNED);
6801  RNA_def_property_ui_text(prop, "Element Index", "");
6802 
6803  prop = RNA_def_property(srna, "face_index", PROP_INT, PROP_UNSIGNED);
6805  RNA_def_property_ui_text(prop, "Face Index", "");
6806 }
6807 
6809 {
6810  StructRNA *srna;
6811  PropertyRNA *prop;
6812 
6813  srna = RNA_def_struct(brna, "DisplaySafeAreas", NULL);
6814  RNA_def_struct_ui_text(srna, "Safe Areas", "Safe areas used in 3D view and the sequencer");
6815  RNA_def_struct_sdna(srna, "DisplaySafeAreas");
6816 
6817  /* SAFE AREAS */
6818  prop = RNA_def_property(srna, "title", PROP_FLOAT, PROP_XYZ);
6819  RNA_def_property_float_sdna(prop, NULL, "title");
6820  RNA_def_property_array(prop, 2);
6821  RNA_def_property_range(prop, 0.0f, 1.0f);
6822  RNA_def_property_ui_text(prop, "Title Safe Margins", "Safe area for text and graphics");
6824 
6825  prop = RNA_def_property(srna, "action", PROP_FLOAT, PROP_XYZ);
6826  RNA_def_property_float_sdna(prop, NULL, "action");
6827  RNA_def_property_array(prop, 2);
6828  RNA_def_property_range(prop, 0.0f, 1.0f);
6829  RNA_def_property_ui_text(prop, "Action Safe Margins", "Safe area for general elements");
6831 
6832  prop = RNA_def_property(srna, "title_center", PROP_FLOAT, PROP_XYZ);
6833  RNA_def_property_float_sdna(prop, NULL, "title_center");
6834  RNA_def_property_array(prop, 2);
6835  RNA_def_property_range(prop, 0.0f, 1.0f);
6837  "Center Title Safe Margins",
6838  "Safe area for text and graphics in a different aspect ratio");
6840 
6841  prop = RNA_def_property(srna, "action_center", PROP_FLOAT, PROP_XYZ);
6842  RNA_def_property_float_sdna(prop, NULL, "action_center");
6843  RNA_def_property_array(prop, 2);
6844  RNA_def_property_range(prop, 0.0f, 1.0f);
6846  "Center Action Safe Margins",
6847  "Safe area for general elements in a different aspect ratio");
6849 }
6850 
6852 {
6853  StructRNA *srna;
6854  PropertyRNA *prop;
6855 
6856  srna = RNA_def_struct(brna, "SceneDisplay", NULL);
6857  RNA_def_struct_ui_text(srna, "Scene Display", "Scene display settings for 3D viewport");
6858  RNA_def_struct_sdna(srna, "SceneDisplay");
6859 
6860  prop = RNA_def_property(srna, "light_direction", PROP_FLOAT, PROP_DIRECTION);
6861  RNA_def_property_float_sdna(prop, NULL, "light_direction");
6863  RNA_def_property_array(prop, 3);
6865  prop, "Light Direction", "Direction of the light for shadows and highlights");
6866  RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_set_update");
6867 
6868  prop = RNA_def_property(srna, "shadow_shift", PROP_FLOAT, PROP_ANGLE);
6869  RNA_def_property_ui_text(prop, "Shadow Shift", "Shadow termination angle");
6870  RNA_def_property_range(prop, 0.0f, 1.0f);
6871  RNA_def_property_ui_range(prop, 0.00f, 1.0f, 1, 2);
6873  RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_set_update");
6874 
6875  prop = RNA_def_property(srna, "shadow_focus", PROP_FLOAT, PROP_FACTOR);
6876  RNA_def_property_float_default(prop, 0.0);
6877  RNA_def_property_ui_text(prop, "Shadow Focus", "Shadow factor hardness");
6878  RNA_def_property_range(prop, 0.0f, 1.0f);
6879  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 2);
6881  RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_set_update");
6882 
6883  prop = RNA_def_property(srna, "matcap_ssao_distance", PROP_FLOAT, PROP_NONE);
6885  prop, "Distance", "Distance of object that contribute to the Cavity/Edge effect");
6886  RNA_def_property_range(prop, 0.0f, 100000.0f);
6887  RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, 3);
6888 
6889  prop = RNA_def_property(srna, "matcap_ssao_attenuation", PROP_FLOAT, PROP_NONE);
6890  RNA_def_property_ui_text(prop, "Attenuation", "Attenuation constant");
6891  RNA_def_property_range(prop, 1.0f, 100000.0f);
6892  RNA_def_property_ui_range(prop, 1.0f, 100.0f, 1, 3);
6893 
6894  prop = RNA_def_property(srna, "matcap_ssao_samples", PROP_INT, PROP_NONE);
6895  RNA_def_property_ui_text(prop, "Samples", "Number of samples");
6896  RNA_def_property_range(prop, 1, 500);
6897 
6898  prop = RNA_def_property(srna, "render_aa", PROP_ENUM, PROP_NONE);
6901  prop, "Render Anti-Aliasing", "Method of anti-aliasing when rendering final image");
6903 
6904  prop = RNA_def_property(srna, "viewport_aa", PROP_ENUM, PROP_NONE);
6907  prop, "Viewport Anti-Aliasing", "Method of anti-aliasing when rendering 3d viewport");
6909 
6910  /* OpenGL render engine settings. */
6911  prop = RNA_def_property(srna, "shading", PROP_POINTER, PROP_NONE);
6912  RNA_def_property_ui_text(prop, "Shading Settings", "Shading settings for OpenGL render engine");
6913 }
6914 
6916 {
6917  StructRNA *srna;
6918  PropertyRNA *prop;
6919 
6920  static const EnumPropertyItem eevee_shadow_size_items[] = {
6921  {64, "64", 0, "64 px", ""},
6922  {128, "128", 0, "128 px", ""},
6923  {256, "256", 0, "256 px", ""},
6924  {512, "512", 0, "512 px", ""},
6925  {1024, "1024", 0, "1024 px", ""},
6926  {2048, "2048", 0, "2048 px", ""},
6927  {4096, "4096", 0, "4096 px", ""},
6928  {0, NULL, 0, NULL, NULL},
6929  };
6930 
6931  static const EnumPropertyItem eevee_gi_visibility_size_items[] = {
6932  {8, "8", 0, "8 px", ""},
6933  {16, "16", 0, "16 px", ""},
6934  {32, "32", 0, "32 px", ""},
6935  {64, "64", 0, "64 px", ""},
6936  {0, NULL, 0, NULL, NULL},
6937  };
6938 
6939  static const EnumPropertyItem eevee_volumetric_tile_size_items[] = {
6940  {2, "2", 0, "2 px", ""},
6941  {4, "4", 0, "4 px", ""},
6942  {8, "8", 0, "8 px", ""},
6943  {16, "16", 0, "16 px", ""},
6944  {0, NULL, 0, NULL, NULL},
6945  };
6946 
6947  static const EnumPropertyItem eevee_motion_blur_position_items[] = {
6948  {SCE_EEVEE_MB_START, "START", 0, "Start on Frame", "The shutter opens at the current frame"},
6950  "CENTER",
6951  0,
6952  "Center on Frame",
6953  "The shutter is open during the current frame"},
6954  {SCE_EEVEE_MB_END, "END", 0, "End on Frame", "The shutter closes at the current frame"},
6955  {0, NULL, 0, NULL, NULL},
6956  };
6957 
6958  srna = RNA_def_struct(brna, "SceneEEVEE", NULL);
6959  RNA_def_struct_path_func(srna, "rna_SceneEEVEE_path");
6960  RNA_def_struct_ui_text(srna, "Scene Display", "Scene display settings for 3D viewport");
6961 
6962  /* Indirect Lighting */
6963  prop = RNA_def_property(srna, "gi_diffuse_bounces", PROP_INT, PROP_NONE);
6965  "Diffuse Bounces",
6966  "Number of time the light is reinjected inside light grids, "
6967  "0 disable indirect diffuse light");
6968  RNA_def_property_range(prop, 0, INT_MAX);
6970 
6971  prop = RNA_def_property(srna, "gi_cubemap_resolution", PROP_ENUM, PROP_NONE);
6972  RNA_def_property_enum_items(prop, eevee_shadow_size_items);
6973  RNA_def_property_ui_text(prop, "Cubemap Size", "Size of every cubemaps");
6975 
6976  prop = RNA_def_property(srna, "gi_visibility_resolution", PROP_ENUM, PROP_NONE);
6977  RNA_def_property_enum_items(prop, eevee_gi_visibility_size_items);
6979  "Irradiance Visibility Size",
6980  "Size of the shadow map applied to each irradiance sample");
6982 
6983  prop = RNA_def_property(srna, "gi_irradiance_smoothing", PROP_FLOAT, PROP_FACTOR);
6984  RNA_def_property_range(prop, 0.0f, FLT_MAX);
6985  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 5, 2);
6987  "Irradiance Smoothing",
6988  "Smoother irradiance interpolation but introduce light bleeding");
6991 
6992  prop = RNA_def_property(srna, "gi_glossy_clamp", PROP_FLOAT, PROP_NONE);
6994  "Clamp Glossy",
6995  "Clamp pixel intensity to reduce noise inside glossy reflections "
6996  "from reflection cubemaps (0 to disabled)");
6997  RNA_def_property_range(prop, 0.0f, FLT_MAX);
6999 
7000  prop = RNA_def_property(srna, "gi_filter_quality", PROP_FLOAT, PROP_NONE);
7002  prop, "Filter Quality", "Take more samples during cubemap filtering to remove artifacts");
7003  RNA_def_property_range(prop, 1.0f, 8.0f);
7005 
7006  prop = RNA_def_property(srna, "gi_show_irradiance", PROP_BOOLEAN, PROP_NONE);
7008  RNA_def_property_ui_icon(prop, ICON_HIDE_ON, 1);
7010  prop, "Show Irradiance Cache", "Display irradiance samples in the viewport");
7013 
7014  prop = RNA_def_property(srna, "gi_show_cubemaps", PROP_BOOLEAN, PROP_NONE);
7016  RNA_def_property_ui_icon(prop, ICON_HIDE_ON, 1);
7018  prop, "Show Cubemap Cache", "Display captured cubemaps in the viewport");
7021 
7022  prop = RNA_def_property(srna, "gi_irradiance_display_size", PROP_FLOAT, PROP_DISTANCE);
7023  RNA_def_property_float_sdna(prop, NULL, "gi_irradiance_draw_size");
7024  RNA_def_property_range(prop, 0.05f, 10.0f);
7026  "Irradiance Display Size",
7027  "Size of the irradiance sample spheres to debug captured light");
7029 
7030  prop = RNA_def_property(srna, "gi_cubemap_display_size", PROP_FLOAT, PROP_DISTANCE);
7031  RNA_def_property_float_sdna(prop, NULL, "gi_cubemap_draw_size");
7032  RNA_def_property_range(prop, 0.05f, 10.0f);
7034  prop, "Cubemap Display Size", "Size of the cubemap spheres to debug captured light");
7036 
7037  prop = RNA_def_property(srna, "gi_auto_bake", PROP_BOOLEAN, PROP_NONE);
7039  RNA_def_property_ui_text(prop, "Auto Bake", "Auto bake indirect lighting when editing probes");
7040 
7041  prop = RNA_def_property(srna, "gi_cache_info", PROP_STRING, PROP_NONE);
7042  RNA_def_property_string_sdna(prop, NULL, "light_cache_info");
7044  RNA_def_property_ui_text(prop, "Light Cache Info", "Info on current cache status");
7045 
7046  /* Temporal Anti-Aliasing (super sampling) */
7047  prop = RNA_def_property(srna, "taa_samples", PROP_INT, PROP_NONE);
7048  RNA_def_property_ui_text(prop, "Viewport Samples", "Number of samples, unlimited if 0");
7049  RNA_def_property_range(prop, 0, INT_MAX);
7052 
7053  prop = RNA_def_property(srna, "taa_render_samples", PROP_INT, PROP_NONE);
7054  RNA_def_property_ui_text(prop, "Render Samples", "Number of samples per pixels for rendering");
7055  RNA_def_property_range(prop, 1, INT_MAX);
7058 
7059  prop = RNA_def_property(srna, "use_taa_reprojection", PROP_BOOLEAN, PROP_NONE);
7062  "Viewport Denoising",
7063  "Denoise image using temporal reprojection "
7064  "(can leave some ghosting)");
7067 
7068  /* Screen Space Subsurface Scattering */
7069  prop = RNA_def_property(srna, "sss_samples", PROP_INT, PROP_NONE);
7070  RNA_def_property_ui_text(prop, "Samples", "Number of samples to compute the scattering effect");
7071  RNA_def_property_range(prop, 1, 32);
7074 
7075  prop = RNA_def_property(srna, "sss_jitter_threshold", PROP_FLOAT, PROP_FACTOR);
7077  prop, "Jitter Threshold", "Rotate samples that are below this threshold");
7078  RNA_def_property_range(prop, 0.0f, 1.0f);
7081 
7082  /* Screen Space Reflection */
7083  prop = RNA_def_property(srna, "use_ssr", PROP_BOOLEAN, PROP_NONE);
7085  RNA_def_property_ui_text(prop, "Screen Space Reflections", "Enable screen space reflection");
7088 
7089  prop = RNA_def_property(srna, "use_ssr_refraction", PROP_BOOLEAN, PROP_NONE);
7091  RNA_def_property_ui_text(prop, "Screen Space Refractions", "Enable screen space Refractions");
7094 
7095  prop = RNA_def_property(srna, "use_ssr_halfres", PROP_BOOLEAN, PROP_NONE);
7097  RNA_def_property_ui_text(prop, "Half Res Trace", "Raytrace at a lower resolution");
7100 
7101  prop = RNA_def_property(srna, "ssr_quality", PROP_FLOAT, PROP_FACTOR);
7102  RNA_def_property_ui_text(prop, "Trace Precision", "Precision of the screen space raytracing");
7103  RNA_def_property_range(prop, 0.0f, 1.0f);
7106 
7107  prop = RNA_def_property(srna, "ssr_max_roughness", PROP_FLOAT, PROP_FACTOR);
7109  prop, "Max Roughness", "Do not raytrace reflections for roughness above this value");
7110  RNA_def_property_range(prop, 0.0f, 1.0f);
7113 
7114  prop = RNA_def_property(srna, "ssr_thickness", PROP_FLOAT, PROP_DISTANCE);
7115  RNA_def_property_ui_text(prop, "Thickness", "Pixel thickness used to detect intersection");
7116  RNA_def_property_range(prop, 1e-6f, FLT_MAX);
7117  RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 5, 3);
7120 
7121  prop = RNA_def_property(srna, "ssr_border_fade", PROP_FLOAT, PROP_FACTOR);
7122  RNA_def_property_ui_text(prop, "Edge Fading", "Screen percentage used to fade the SSR");
7123  RNA_def_property_range(prop, 0.0f, 0.5f);
7126 
7127  prop = RNA_def_property(srna, "ssr_firefly_fac", PROP_FLOAT, PROP_NONE);
7128  RNA_def_property_ui_text(prop, "Clamp", "Clamp pixel intensity to remove noise (0 to disabled)");
7129  RNA_def_property_range(prop, 0.0f, FLT_MAX);
7132 
7133  /* Volumetrics */
7134  prop = RNA_def_property(srna, "volumetric_start", PROP_FLOAT, PROP_DISTANCE);
7135  RNA_def_property_ui_text(prop, "Start", "Start distance of the volumetric effect");
7136  RNA_def_property_range(prop, 1e-6f, FLT_MAX);
7137  RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 10, 3);
7140 
7141  prop = RNA_def_property(srna, "volumetric_end", PROP_FLOAT, PROP_DISTANCE);
7142  RNA_def_property_ui_text(prop, "End", "End distance of the volumetric effect");
7143  RNA_def_property_range(prop, 1e-6f, FLT_MAX);
7144  RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 10, 3);
7147 
7148  prop = RNA_def_property(srna, "volumetric_tile_size", PROP_ENUM, PROP_NONE);
7149  RNA_def_property_enum_items(prop, eevee_volumetric_tile_size_items);
7151  "Tile Size",
7152  "Control the quality of the volumetric effects "
7153  "(lower size increase vram usage and quality)");
7156 
7157  prop = RNA_def_property(srna, "volumetric_samples", PROP_INT, PROP_NONE);
7158  RNA_def_property_ui_text(prop, "Samples", "Number of samples to compute volumetric effects");
7159  RNA_def_property_range(prop, 1, 256);
7162 
7163  prop = RNA_def_property(srna, "volumetric_sample_distribution", PROP_FLOAT, PROP_FACTOR);
7165  prop, "Exponential Sampling", "Distribute more samples closer to the camera");
7168 
7169  prop = RNA_def_property(srna, "use_volumetric_lights", PROP_BOOLEAN, PROP_NONE);
7172  prop, "Volumetric Lighting", "Enable scene light interactions with volumetrics");
7175 
7176  prop = RNA_def_property(srna, "volumetric_light_clamp", PROP_FLOAT, PROP_NONE);
7177  RNA_def_property_range(prop, 0.0f, FLT_MAX);
7178  RNA_def_property_ui_text(prop, "Clamp", "Maximum light contribution, reducing noise");
7181 
7182  prop = RNA_def_property(srna, "use_volumetric_shadows", PROP_BOOLEAN, PROP_NONE);
7185  prop, "Volumetric Shadows", "Generate shadows from volumetric material (Very expensive)");
7188 
7189  prop = RNA_def_property(srna, "volumetric_shadow_samples", PROP_INT, PROP_NONE);
7190  RNA_def_property_range(prop, 1, 128);
7192  prop, "Volumetric Shadow Samples", "Number of samples to compute volumetric shadowing");
7195 
7196  /* Ambient Occlusion */
7197  prop = RNA_def_property(srna, "use_gtao", PROP_BOOLEAN, PROP_NONE);
7200  "Ambient Occlusion",
7201  "Enable ambient occlusion to simulate medium scale indirect shadowing");
7204 
7205  prop = RNA_def_property(srna, "use_gtao_bent_normals", PROP_BOOLEAN, PROP_NONE);
7208  prop, "Bent Normals", "Compute main non occluded direction to sample the environment");
7211 
7212  prop = RNA_def_property(srna, "use_gtao_bounce", PROP_BOOLEAN, PROP_NONE);
7215  "Bounces Approximation",
7216  "An approximation to simulate light bounces "
7217  "giving less occlusion on brighter objects");
7220 
7221  prop = RNA_def_property(srna, "gtao_factor", PROP_FLOAT, PROP_FACTOR);
7222  RNA_def_property_ui_text(prop, "Factor", "Factor for ambient occlusion blending");
7223  RNA_def_property_range(prop, 0.0f, FLT_MAX);
7224  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1f, 2);
7227 
7228  prop = RNA_def_property(srna, "gtao_quality", PROP_FLOAT, PROP_FACTOR);
7229  RNA_def_property_ui_text(prop, "Trace Precision", "Precision of the horizon search");
7230  RNA_def_property_range(prop, 0.0f, 1.0f);
7233 
7234  prop = RNA_def_property(srna, "gtao_distance", PROP_FLOAT, PROP_DISTANCE);
7236  prop, "Distance", "Distance of object that contribute to the ambient occlusion effect");
7237  RNA_def_property_range(prop, 0.0f, 100000.0f);
7238  RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, 3);
7241 
7242  /* Depth of Field */
7243 
7244  prop = RNA_def_property(srna, "bokeh_max_size", PROP_FLOAT, PROP_PIXEL);
7246  prop, "Max Size", "Max size of the bokeh shape for the depth of field (lower is faster)");
7247  RNA_def_property_range(prop, 0.0f, 2000.0f);
7248  RNA_def_property_ui_range(prop, 0.0f, 200.0f, 100.0f, 1);
7250 
7251  prop = RNA_def_property(srna, "bokeh_threshold", PROP_FLOAT, PROP_FACTOR);
7253  prop, "Sprite Threshold", "Brightness threshold for using sprite base depth of field");
7254  RNA_def_property_range(prop, 0.0f, 100000.0f);
7255  RNA_def_property_ui_range(prop, 0.0f, 10.0f, 10, 2);
7258 
7259  prop = RNA_def_property(srna, "bokeh_neighbor_max", PROP_FLOAT, PROP_FACTOR);
7261  "Neighbor Rejection",
7262  "Maximum brightness to consider when rejecting bokeh sprites "
7263  "based on neighborhood (lower is faster)");
7264  RNA_def_property_range(prop, 0.0f, 100000.0f);
7265  RNA_def_property_ui_range(prop, 0.0f, 40.0f, 10, 2);
7268 
7269  prop = RNA_def_property(srna, "bokeh_denoise_fac", PROP_FLOAT, PROP_FACTOR);
7271  prop, "Denoise Amount", "Amount of flicker removal applied to bokeh highlights");
7272  RNA_def_property_range(prop, 0.0f, 1.0f);
7273  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 10, 2);
7276 
7277  prop = RNA_def_property(srna, "use_bokeh_high_quality_slight_defocus", PROP_BOOLEAN, PROP_NONE);
7280  "High Quality Slight Defocus",
7281  "Sample all pixels in almost in-focus regions to eliminate noise");
7284 
7285  prop = RNA_def_property(srna, "use_bokeh_jittered", PROP_BOOLEAN, PROP_NONE);
7288  "Jitter Camera",
7289  "Jitter camera position to create accurate blurring "
7290  "using render samples");
7293 
7294  prop = RNA_def_property(srna, "bokeh_overblur", PROP_FLOAT, PROP_PERCENTAGE);
7296  "Over-blur",
7297  "Apply blur to each jittered sample to reduce "
7298  "under-sampling artifacts");
7299  RNA_def_property_range(prop, 0, 100);
7300  RNA_def_property_ui_range(prop, 0.0f, 20.0f, 1, 1);
7302 
7303  /* Bloom */
7304  prop = RNA_def_property(srna, "use_bloom", PROP_BOOLEAN, PROP_NONE);
7306  RNA_def_property_ui_text(prop, "Bloom", "High brightness pixels generate a glowing effect");
7309 
7310  prop = RNA_def_property(srna, "bloom_threshold", PROP_FLOAT, PROP_FACTOR);
7311  RNA_def_property_ui_text(prop, "Threshold", "Filters out pixels under this level of brightness");
7312  RNA_def_property_range(prop, 0.0f, 100000.0f);
7313  RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
7316 
7317  prop = RNA_def_property(srna, "bloom_color", PROP_FLOAT, PROP_COLOR);
7318  RNA_def_property_array(prop, 3);
7319  RNA_def_property_ui_text(prop, "Color", "Color applied to the bloom effect");
7322 
7323  prop = RNA_def_property(srna, "bloom_knee", PROP_FLOAT, PROP_FACTOR);
7324  RNA_def_property_ui_text(prop, "Knee", "Makes transition between under/over-threshold gradual");
7325  RNA_def_property_range(prop, 0.0f, 1.0f);
7328 
7329  prop = RNA_def_property(srna, "bloom_radius", PROP_FLOAT, PROP_FACTOR);
7330  RNA_def_property_ui_text(prop, "Radius", "Bloom spread distance");
7331  RNA_def_property_range(prop, 0.0f, 100.0f);
7332  RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3);
7335 
7336  prop = RNA_def_property(srna, "bloom_clamp", PROP_FLOAT, PROP_FACTOR);
7338  prop, "Clamp", "Maximum intensity a bloom pixel can have (0 to disabled)");
7339  RNA_def_property_range(prop, 0.0f, 100000.0f);
7340  RNA_def_property_ui_range(prop, 0.0f, 1000.0f, 1, 3);
7343 
7344  prop = RNA_def_property(srna, "bloom_intensity", PROP_FLOAT, PROP_FACTOR);
7345  RNA_def_property_ui_text(prop, "Intensity", "Blend factor");
7346  RNA_def_property_range(prop, 0.0f, 10000.0f);
7347  RNA_def_property_ui_range(prop, 0.0f, 0.1f, 1, 3);
7350 
7351  /* Motion blur */
7352  prop = RNA_def_property(srna, "use_motion_blur", PROP_BOOLEAN, PROP_NONE);
7354  RNA_def_property_ui_text(prop, "Motion Blur", "Enable motion blur effect (only in camera view)");
7357 
7358  prop = RNA_def_property(srna, "motion_blur_shutter", PROP_FLOAT, PROP_FACTOR);
7359  RNA_def_property_ui_text(prop, "Shutter", "Time taken in frames between shutter open and close");
7360  RNA_def_property_range(prop, 0.0f, FLT_MAX);
7361  RNA_def_property_ui_range(prop, 0.01f, 1.0f, 1, 2);
7364 
7365  prop = RNA_def_property(srna, "motion_blur_depth_scale", PROP_FLOAT, PROP_NONE);
7367  "Background Separation",
7368  "Lower values will reduce background"
7369  " bleeding onto foreground elements");
7370  RNA_def_property_range(prop, 0.0f, FLT_MAX);
7371  RNA_def_property_ui_range(prop, 0.01f, 1000.0f, 1, 2);
7374 
7375  prop = RNA_def_property(srna, "motion_blur_max", PROP_INT, PROP_PIXEL);
7376  RNA_def_property_ui_text(prop, "Max Blur", "Maximum blur distance a pixel can spread over");
7377  RNA_def_property_range(prop, 0, 2048);
7378  RNA_def_property_ui_range(prop, 0, 512, 1, -1);
7381 
7382  prop = RNA_def_property(srna, "motion_blur_steps", PROP_INT, PROP_NONE);
7384  "Motion steps",
7385  "Controls accuracy of motion blur, "
7386  "more steps means longer render time");
7387  RNA_def_property_range(prop, 1, INT_MAX);
7388  RNA_def_property_ui_range(prop, 1, 64, 1, -1);
7391 
7392  prop = RNA_def_property(srna, "motion_blur_position", PROP_ENUM, PROP_NONE);
7393  RNA_def_property_enum_items(prop, eevee_motion_blur_position_items);
7395  "Motion Blur Position",
7396  "Offset for the shutter's time interval, "
7397  "allows to change the motion blur trails");
7400 
7401  /* Shadows */
7402  prop = RNA_def_property(srna, "shadow_cube_size", PROP_ENUM, PROP_NONE);
7403  RNA_def_property_enum_items(prop, eevee_shadow_size_items);
7405  prop, "Cube Shadows Resolution", "Size of point and area light shadow maps");
7408 
7409  prop = RNA_def_property(srna, "shadow_cascade_size", PROP_ENUM, PROP_NONE);
7410  RNA_def_property_enum_items(prop, eevee_shadow_size_items);
7412  prop, "Directional Shadows Resolution", "Size of sun light shadow maps");
7415 
7416  prop = RNA_def_property(srna, "use_shadow_high_bitdepth", PROP_BOOLEAN, PROP_NONE);
7418  RNA_def_property_ui_text(prop, "High Bit Depth", "Use 32-bit shadows");
7421 
7422  prop = RNA_def_property(srna, "use_soft_shadows", PROP_BOOLEAN, PROP_NONE);
7425  prop, "Soft Shadows", "Randomize shadowmaps origin to create soft shadows");
7428 
7429  prop = RNA_def_property(srna, "light_threshold", PROP_FLOAT, PROP_UNSIGNED);
7431  "Light Threshold",
7432  "Minimum light intensity for a light to contribute to the lighting");
7433  RNA_def_property_range(prop, 0.0f, FLT_MAX);
7434  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
7437 
7438  /* Overscan */
7439  prop = RNA_def_property(srna, "use_overscan", PROP_BOOLEAN, PROP_NONE);
7442  "Overscan",
7443  "Internally render past the image border to avoid "
7444  "screen-space effects disappearing");
7446 
7447  prop = RNA_def_property(srna, "overscan_size", PROP_FLOAT, PROP_PERCENTAGE);
7448  RNA_def_property_float_sdna(prop, NULL, "overscan");
7450  "Overscan Size",
7451  "Percentage of render size to add as overscan to the "
7452  "internal render buffers");
7453  RNA_def_property_range(prop, 0.0f, 50.0f);
7454  RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 2);
7456 }
7457 
7459 {
7460  StructRNA *srna;
7461  PropertyRNA *prop;
7462 
7463  srna = RNA_def_struct(brna, "SceneGpencil", NULL);
7464  RNA_def_struct_path_func(srna, "rna_SceneGpencil_path");
7465  RNA_def_struct_ui_text(srna, "Grease Pencil Render", "Render settings");
7466 
7467  prop = RNA_def_property(srna, "antialias_threshold", PROP_FLOAT, PROP_NONE);
7468  RNA_def_property_float_sdna(prop, NULL, "smaa_threshold");
7469  RNA_def_property_float_default(prop, 1.0f);
7470  RNA_def_property_range(prop, 0.0f, FLT_MAX);
7471  RNA_def_property_ui_range(prop, 0.0f, 2.0f, 1, 3);
7473  "Anti-Aliasing Threshold",
7474  "Threshold for edge detection algorithm (higher values might over-blur "
7475  "some part of the image)");
7478 }
7479 
7481 {
7482  StructRNA *srna;
7483  PropertyRNA *prop;
7484 
7485  FunctionRNA *func;
7486  PropertyRNA *parm;
7487 
7488  static const EnumPropertyItem audio_distance_model_items[] = {
7489  {0, "NONE", 0, "None", "No distance attenuation"},
7490  {1, "INVERSE", 0, "Inverse", "Inverse distance model"},
7491  {2, "INVERSE_CLAMPED", 0, "Inverse Clamped", "Inverse distance model with clamping"},
7492  {3, "LINEAR", 0, "Linear", "Linear distance model"},
7493  {4, "LINEAR_CLAMPED", 0, "Linear Clamped", "Linear distance model with clamping"},
7494  {5, "EXPONENT", 0, "Exponent", "Exponent distance model"},
7495  {6, "EXPONENT_CLAMPED", 0, "Exponent Clamped", "Exponent distance model with clamping"},
7496  {0, NULL, 0, NULL, NULL},
7497  };
7498 
7499  static const EnumPropertyItem sync_mode_items[] = {
7500  {0, "NONE", 0, "Play Every Frame", "Do not sync, play every frame"},
7501  {SCE_FRAME_DROP, "FRAME_DROP", 0, "Frame Dropping", "Drop frames if playback is too slow"},
7502  {AUDIO_SYNC, "AUDIO_SYNC", 0, "Sync to Audio", "Sync to audio playback, dropping frames"},
7503  {0, NULL, 0, NULL, NULL},
7504  };
7505 
7506  /* Struct definition */
7507  srna = RNA_def_struct(brna, "Scene", "ID");
7509  "Scene",
7510  "Scene data-block, consisting in objects and "
7511  "defining time and render related settings");
7512  RNA_def_struct_ui_icon(srna, ICON_SCENE_DATA);
7514 
7515  /* Global Settings */
7516  prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
7519  RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Camera_object_poll");
7520  RNA_def_property_ui_text(prop, "Camera", "Active camera, used for rendering the scene");
7521  RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_camera_update");
7522 
7523  prop = RNA_def_property(srna, "background_set", PROP_POINTER, PROP_NONE);
7524  RNA_def_property_pointer_sdna(prop, NULL, "set");
7525  RNA_def_property_struct_type(prop, "Scene");
7528  RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_set_set", NULL, NULL);
7529  RNA_def_property_ui_text(prop, "Background Scene", "Background set scene");
7530  RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_set_update");
7531 
7532  prop = RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE);
7535  RNA_def_property_ui_text(prop, "World", "World used for rendering the scene");
7536  RNA_def_property_update(prop, NC_SCENE | ND_WORLD, "rna_Scene_world_update");
7537 
7538  prop = RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
7539  RNA_def_property_struct_type(prop, "Object");
7540  RNA_def_property_ui_text(prop, "Objects", "");
7542  "rna_Scene_objects_begin",
7543  "rna_Scene_objects_next",
7544  "rna_Scene_objects_end",
7545  "rna_Scene_objects_get",
7546  NULL,
7547  NULL,
7548  NULL,
7549  NULL);
7550  rna_def_scene_objects(brna, prop);
7551 
7552  /* Frame Range Stuff */
7553  prop = RNA_def_property(srna, "frame_current", PROP_INT, PROP_TIME);
7555  RNA_def_property_int_sdna(prop, NULL, "r.cfra");
7557  RNA_def_property_int_funcs(prop, NULL, "rna_Scene_frame_current_set", NULL);
7559  prop,
7560  "Current Frame",
7561  "Current frame, to update animation data from python frame_set() instead");
7562  RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_frame_update");
7563 
7564  prop = RNA_def_property(srna, "frame_subframe", PROP_FLOAT, PROP_TIME);
7565  RNA_def_property_float_sdna(prop, NULL, "r.subframe");
7566  RNA_def_property_ui_text(prop, "Current Subframe", "");
7568  RNA_def_property_range(prop, 0.0f, 1.0f);
7569  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.01, 2);
7570  RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_frame_update");
7571 
7572  prop = RNA_def_property(srna, "frame_float", PROP_FLOAT, PROP_TIME);
7573  RNA_def_property_ui_text(prop, "Current Subframe", "");
7578  prop, "rna_Scene_frame_float_get", "rna_Scene_frame_float_set", NULL);
7579  RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_frame_update");
7580 
7581  prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
7583  RNA_def_property_int_sdna(prop, NULL, "r.sfra");
7584  RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL);
7586  RNA_def_property_ui_text(prop, "Start Frame", "First frame of the playback/rendering range");
7588 
7589  prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
7591  RNA_def_property_int_sdna(prop, NULL, "r.efra");
7592  RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL);
7594  RNA_def_property_ui_text(prop, "End Frame", "Final frame of the playback/rendering range");
7596 
7597  prop = RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME);
7599  RNA_def_property_int_sdna(prop, NULL, "r.frame_step");
7600  RNA_def_property_range(prop, 0, MAXFRAME);
7601  RNA_def_property_ui_range(prop, 1, 100, 1, -1);
7603  prop,
7604  "Frame Step",
7605  "Number of frames to skip forward while rendering/playing back each frame");
7607 
7608  prop = RNA_def_property(srna, "frame_current_final", PROP_FLOAT, PROP_TIME);
7611  RNA_def_property_float_funcs(prop, "rna_Scene_frame_current_final_get", NULL, NULL);
7613  prop, "Current Frame Final", "Current frame with subframe and time remapping applied");
7614 
7615  prop = RNA_def_property(srna, "lock_frame_selection_to_range", PROP_BOOLEAN, PROP_NONE);
7619  "Lock Frame Selection",
7620  "Don't allow frame to be selected with mouse outside of frame range");
7622 
7623  /* Preview Range (frame-range for UI playback) */
7624  prop = RNA_def_property(srna, "use_preview_range", PROP_BOOLEAN, PROP_NONE);
7627  RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_preview_range_set");
7629  prop,
7630  "Use Preview Range",
7631  "Use an alternative start/end frame range for animation playback and view renders");
7633  RNA_def_property_ui_icon(prop, ICON_PREVIEW_RANGE, 0);
7634 
7635  prop = RNA_def_property(srna, "frame_preview_start", PROP_INT, PROP_TIME);
7637  RNA_def_property_int_sdna(prop, NULL, "r.psfra");
7638  RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_start_frame_set", NULL);
7640  prop, "Preview Range Start Frame", "Alternative start frame for UI playback");
7642 
7643  prop = RNA_def_property(srna, "frame_preview_end", PROP_INT, PROP_TIME);
7645  RNA_def_property_int_sdna(prop, NULL, "r.pefra");
7646  RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_end_frame_set", NULL);
7648  prop, "Preview Range End Frame", "Alternative end frame for UI playback");
7650 
7651  /* Sub-frame for motion-blur debug. */
7652  prop = RNA_def_property(srna, "show_subframe", PROP_BOOLEAN, PROP_NONE);
7656  prop, "Show Subframe", "Show current scene subframe and allow set it using interface tools");
7657  RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_show_subframe_update");
7658 
7659  /* Timeline / Time Navigation settings */
7660  prop = RNA_def_property(srna, "show_keys_from_selected_only", PROP_BOOLEAN, PROP_NONE);
7663  "Only Keyframes from Selected Channels",
7664  "Consider keyframes for active object and/or its selected bones only "
7665  "(in timeline and when jumping between keyframes)");
7667 
7668  /* Stamp */
7669  prop = RNA_def_property(srna, "use_stamp_note", PROP_STRING, PROP_NONE);
7670  RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata");
7671  RNA_def_property_ui_text(prop, "Stamp Note", "User defined note for the render stamping");
7673 
7674  /* Animation Data (for Scene) */
7676 
7677  /* Readonly Properties */
7678  prop = RNA_def_property(srna, "is_nla_tweakmode", PROP_BOOLEAN, PROP_NONE);
7681  PROP_EDITABLE); /* DO NOT MAKE THIS EDITABLE, OR NLA EDITOR BREAKS */
7683  prop,
7684  "NLA Tweak Mode",
7685  "Whether there is any action referenced by NLA being edited (strictly read-only)");
7687 
7688  /* Frame dropping flag for playback and sync enum */
7689 # if 0 /* XXX: Is this actually needed? */
7690  prop = RNA_def_property(srna, "use_frame_drop", PROP_BOOLEAN, PROP_NONE);
7693  prop, "Frame Dropping", "Play back dropping frames if frame display is too slow");
7695 # endif
7696 
7697  prop = RNA_def_property(srna, "sync_mode", PROP_ENUM, PROP_NONE);
7698  RNA_def_property_enum_funcs(prop, "rna_Scene_sync_mode_get", "rna_Scene_sync_mode_set", NULL);
7699  RNA_def_property_enum_items(prop, sync_mode_items);
7701  RNA_def_property_ui_text(prop, "Sync Mode", "How to sync playback");
7703 
7704  /* Nodes (Compositing) */
7705  prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
7706  RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
7708  RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree");
7709 
7710  prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
7711  RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
7713  RNA_def_property_ui_text(prop, "Use Nodes", "Enable the compositing node tree");
7714  RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_use_nodes_update");
7715 
7716  /* Sequencer */
7717  prop = RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
7718  RNA_def_property_pointer_sdna(prop, NULL, "ed");
7719  RNA_def_property_struct_type(prop, "SequenceEditor");
7720  RNA_def_property_ui_text(prop, "Sequence Editor", "");
7721 
7722  /* Keying Sets */
7723  prop = RNA_def_property(srna, "keying_sets", PROP_COLLECTION, PROP_NONE);
7724  RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL);
7725  RNA_def_property_struct_type(prop, "KeyingSet");
7726  RNA_def_property_ui_text(prop, "Absolute Keying Sets", "Absolute Keying Sets for this Scene");
7728  rna_def_scene_keying_sets(brna, prop);
7729 
7730  prop = RNA_def_property(srna, "keying_sets_all", PROP_COLLECTION, PROP_NONE);
7732  "rna_Scene_all_keyingsets_begin",
7733  "rna_Scene_all_keyingsets_next",
7734  "rna_iterator_listbase_end",
7735  "rna_iterator_listbase_get",
7736  NULL,
7737  NULL,
7738  NULL,
7739  NULL);
7740  RNA_def_property_struct_type(prop, "KeyingSet");
7742  prop,
7743  "All Keying Sets",
7744  "All Keying Sets available for use (Builtins and Absolute Keying Sets for this Scene)");
7746  rna_def_scene_keying_sets_all(brna, prop);
7747 
7748  /* Rigid Body Simulation */
7749  prop = RNA_def_property(srna, "rigidbody_world", PROP_POINTER, PROP_NONE);
7750  RNA_def_property_pointer_sdna(prop, NULL, "rigidbody_world");
7751  RNA_def_property_struct_type(prop, "RigidBodyWorld");
7752  RNA_def_property_ui_text(prop, "Rigid Body World", "");
7753  RNA_def_property_update(prop, NC_SCENE, "rna_Physics_relations_update");
7754 
7755  /* Tool Settings */
7756  prop = RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE);
7758  RNA_def_property_pointer_sdna(prop, NULL, "toolsettings");
7759  RNA_def_property_struct_type(prop, "ToolSettings");
7760  RNA_def_property_ui_text(prop, "Tool Settings", "");
7761 
7762  /* Unit Settings */
7763  prop = RNA_def_property(srna, "unit_settings", PROP_POINTER, PROP_NONE);
7765  RNA_def_property_pointer_sdna(prop, NULL, "unit");
7766  RNA_def_property_struct_type(prop, "UnitSettings");
7767  RNA_def_property_ui_text(prop, "Unit Settings", "Unit editing settings");
7768 
7769  /* Physics Settings */
7770  prop = RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
7771  RNA_def_property_float_sdna(prop, NULL, "physics_settings.gravity");
7772  RNA_def_property_array(prop, 3);
7773  RNA_def_property_ui_range(prop, -200.0f, 200.0f, 1, 2);
7774  RNA_def_property_ui_text(prop, "Gravity", "Constant acceleration in a given direction");
7775  RNA_def_property_update(prop, 0, "rna_Physics_update");
7776 
7777  prop = RNA_def_property(srna, "use_gravity", PROP_BOOLEAN, PROP_NONE);
7778  RNA_def_property_boolean_sdna(prop, NULL, "physics_settings.flag", PHYS_GLOBAL_GRAVITY);
7779  RNA_def_property_ui_text(prop, "Global Gravity", "Use global gravity for all dynamics");
7780  RNA_def_property_update(prop, 0, "rna_Physics_update");
7781 
7782  /* Render Data */
7783  prop = RNA_def_property(srna, "render", PROP_POINTER, PROP_NONE);
7785  RNA_def_property_pointer_sdna(prop, NULL, "r");
7786  RNA_def_property_struct_type(prop, "RenderSettings");
7787  RNA_def_property_ui_text(prop, "Render Data", "");
7788 
7789  /* Safe Areas */
7790  prop = RNA_def_property(srna, "safe_areas", PROP_POINTER, PROP_NONE);
7791  RNA_def_property_pointer_sdna(prop, NULL, "safe_areas");
7793  RNA_def_property_struct_type(prop, "DisplaySafeAreas");
7794  RNA_def_property_ui_text(prop, "Safe Areas", "");
7795 
7796  /* Markers */
7797  prop = RNA_def_property(srna, "timeline_markers", PROP_COLLECTION, PROP_NONE);
7798  RNA_def_property_collection_sdna(prop, NULL, "markers", NULL);
7799  RNA_def_property_struct_type(prop, "TimelineMarker");
7801  prop, "Timeline Markers", "Markers used in all timelines for the current scene");
7802  rna_def_timeline_markers(brna, prop);
7803 
7804  /* Transform Orientations */
7805  prop = RNA_def_property(srna, "transform_orientation_slots", PROP_COLLECTION, PROP_NONE);
7807  "rna_Scene_transform_orientation_slots_begin",
7808  "rna_iterator_array_next",
7809  "rna_iterator_array_end",
7810  "rna_iterator_array_get",
7811  "rna_Scene_transform_orientation_slots_length",
7812  NULL,
7813  NULL,
7814  NULL);
7815  RNA_def_property_struct_type(prop, "TransformOrientationSlot");
7816  RNA_def_property_ui_text(prop, "Transform Orientation Slots", "");
7817 
7818  /* 3D View Cursor */
7819  prop = RNA_def_property(srna, "cursor", PROP_POINTER, PROP_NONE);
7821  RNA_def_property_pointer_sdna(prop, NULL, "cursor");
7822  RNA_def_property_struct_type(prop, "View3DCursor");
7823  RNA_def_property_ui_text(prop, "3D Cursor", "");
7824 
7825  /* Audio Settings */
7826  prop = RNA_def_property(srna, "use_audio", PROP_BOOLEAN, PROP_NONE);
7827  RNA_def_property_boolean_funcs(prop, "rna_Scene_use_audio_get", "rna_Scene_use_audio_set");
7829  prop, "Audio Muted", "Play back of audio from Sequence Editor will be muted");
7830  RNA_def_property_update(prop, NC_SCENE, "rna_Scene_use_audio_update");
7831 
7832 # if 0 /* XXX: Is this actually needed? */
7833  prop = RNA_def_property(srna, "use_audio_sync", PROP_BOOLEAN, PROP_NONE);
7834  RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC);
7836  prop,
7837  "Audio Sync",
7838  "Play back and sync with audio clock, dropping frames if frame display is too slow");
7840 # endif
7841 
7842  prop = RNA_def_property(srna, "use_audio_scrub", PROP_BOOLEAN, PROP_NONE);
7843  RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SCRUB);
7845  prop, "Audio Scrubbing", "Play audio from Sequence Editor while scrubbing");
7847 
7848  prop = RNA_def_property(srna, "audio_doppler_speed", PROP_FLOAT, PROP_NONE);
7849  RNA_def_property_float_sdna(prop, NULL, "audio.speed_of_sound");
7851  RNA_def_property_range(prop, 0.01f, FLT_MAX);
7853  prop, "Speed of Sound", "Speed of sound for Doppler effect calculation");
7854  RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update");
7855 
7856  prop = RNA_def_property(srna, "audio_doppler_factor", PROP_FLOAT, PROP_NONE);
7857  RNA_def_property_float_sdna(prop, NULL, "audio.doppler_factor");
7859  RNA_def_property_range(prop, 0.0, FLT_MAX);
7860  RNA_def_property_ui_text(prop, "Doppler Factor", "Pitch factor for Doppler effect calculation");
7861  RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update");
7862 
7863  prop = RNA_def_property(srna, "audio_distance_model", PROP_ENUM, PROP_NONE);
7864  RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio.distance_model");
7866  RNA_def_property_enum_items(prop, audio_distance_model_items);
7868  prop, "Distance Model", "Distance model for distance attenuation calculation");
7869  RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update");
7870 
7871  prop = RNA_def_property(srna, "audio_volume", PROP_FLOAT, PROP_NONE);
7872  RNA_def_property_float_sdna(prop, NULL, "audio.volume");
7873  RNA_def_property_range(prop, 0.0f, 100.0f);
7874  RNA_def_property_ui_text(prop, "Volume", "Audio volume");
7877  RNA_def_property_update(prop, NC_SCENE, "rna_Scene_volume_update");
7878 
7879  /* Statistics */
7880  func = RNA_def_function(srna, "statistics", "rna_Scene_statistics_string_get");
7882  parm = RNA_def_pointer(func, "view_layer", "ViewLayer", "View Layer", "");
7884  parm = RNA_def_string(func, "statistics", NULL, 0, "Statistics", "");
7885  RNA_def_function_return(func, parm);
7886 
7887  /* Grease Pencil */
7888  prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
7889  RNA_def_property_pointer_sdna(prop, NULL, "gpd");
7890  RNA_def_property_struct_type(prop, "GreasePencil");
7892  prop, NULL, NULL, NULL, "rna_GPencil_datablocks_annotations_poll");
7896  prop, "Annotations", "Grease Pencil data-block used for annotations in the 3D view");
7898 
7899  /* active MovieClip */
7900  prop = RNA_def_property(srna, "active_clip", PROP_POINTER, PROP_NONE);
7901  RNA_def_property_pointer_sdna(prop, NULL, "clip");
7903  RNA_def_property_struct_type(prop, "MovieClip");
7905  prop, "Active Movie Clip", "Active movie clip used for constraints and viewport drawing");
7907 
7908  /* color management */
7909  prop = RNA_def_property(srna, "view_settings", PROP_POINTER, PROP_NONE);
7910  RNA_def_property_pointer_sdna(prop, NULL, "view_settings");
7911  RNA_def_property_struct_type(prop, "ColorManagedViewSettings");
7913  prop, "View Settings", "Color management settings applied on image before saving");
7914 
7915  prop = RNA_def_property(srna, "display_settings", PROP_POINTER, PROP_NONE);
7916  RNA_def_property_pointer_sdna(prop, NULL, "display_settings");
7917  RNA_def_property_struct_type(prop, "ColorManagedDisplaySettings");
7919  prop, "Display Settings", "Settings of device saved image would be displayed on");
7920 
7921  prop = RNA_def_property(srna, "sequencer_colorspace_settings", PROP_POINTER, PROP_NONE);
7922  RNA_def_property_pointer_sdna(prop, NULL, "sequencer_colorspace_settings");
7923  RNA_def_property_struct_type(prop, "ColorManagedSequencerColorspaceSettings");
7925  prop, "Sequencer Color Space Settings", "Settings of color space sequencer is working in");
7926 
7927  /* Layer and Collections */
7928  prop = RNA_def_property(srna, "view_layers", PROP_COLLECTION, PROP_NONE);
7929  RNA_def_property_collection_sdna(prop, NULL, "view_layers", NULL);
7930  RNA_def_property_struct_type(prop, "ViewLayer");
7931  RNA_def_property_ui_text(prop, "View Layers", "");
7932  rna_def_view_layers(brna, prop);
7933 
7934  prop = RNA_def_property(srna, "collection", PROP_POINTER, PROP_NONE);
7936  RNA_def_property_pointer_sdna(prop, NULL, "master_collection");
7937  RNA_def_property_struct_type(prop, "Collection");
7940  prop,
7941  "Collection",
7942  "Scene master collection that objects and other collections in the scene");
7943 
7944  /* Scene Display */
7945  prop = RNA_def_property(srna, "display", PROP_POINTER, PROP_NONE);
7946  RNA_def_property_pointer_sdna(prop, NULL, "display");
7947  RNA_def_property_struct_type(prop, "SceneDisplay");
7948  RNA_def_property_ui_text(prop, "Scene Display", "Scene display settings for 3D viewport");
7949 
7950  /* EEVEE */
7951  prop = RNA_def_property(srna, "eevee", PROP_POINTER, PROP_NONE);
7952  RNA_def_property_struct_type(prop, "SceneEEVEE");
7953  RNA_def_property_ui_text(prop, "Eevee", "Eevee settings for the scene");
7954 
7955  /* Grease Pencil */
7956  prop = RNA_def_property(srna, "grease_pencil_settings", PROP_POINTER, PROP_NONE);
7957  RNA_def_property_struct_type(prop, "SceneGpencil");
7958  RNA_def_property_ui_text(prop, "Grease Pencil", "Grease Pencil settings for the scene");
7959 
7960  /* Nestled Data */
7961  /* *** Non-Animated *** */
7962  RNA_define_animate_sdna(false);
7963  rna_def_tool_settings(brna);
7968  rna_def_statvis(brna);
7969  rna_def_unit_settings(brna);
7973  rna_def_view3d_cursor(brna);
7976  rna_def_scene_display(brna);
7977  rna_def_scene_eevee(brna);
7978  rna_def_view_layer_aov(brna);
7980  rna_def_scene_gpencil(brna);
7982  /* *** Animated *** */
7985 
7986  /* Scene API */
7987  RNA_api_scene(srna);
7988 }
7989 
7990 #endif
typedef float(TangentPoint)[2]
struct KeyingSet * BKE_keyingset_add(struct ListBase *list, const char idname[], const char name[], short flag, short keyingflag)
Definition: anim_sys.c:144
void BKE_rotMode_change_values(float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode)
Definition: armature.c:1984
void BKE_brush_scale_size(int *r_brush_size, float new_unprojected_radius, float old_unprojected_radius)
Definition: brush.c:2365
void BKE_brush_scale_unprojected_radius(float *unprojected_radius, int new_brush_size, int old_brush_size)
Definition: brush.c:2352
void BKE_scene_objects_iterator_next(struct BLI_Iterator *iter)
Definition: collection.c:2145
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_END
#define FOREACH_SCENE_OBJECT_END
#define FOREACH_COLLECTION_OBJECT_RECURSIVE_BEGIN(_collection, _object)
void BKE_scene_objects_iterator_end(struct BLI_Iterator *iter)
Definition: collection.c:2177
#define FOREACH_SCENE_OBJECT_BEGIN(scene, _instance)
void BKE_scene_objects_iterator_begin(struct BLI_Iterator *iter, void *data_in)
Definition: collection.c:2122
struct Scene * CTX_data_scene(const bContext *C)
Definition: context.c:1034
#define CTX_DATA_BEGIN(C, Type, instance, member)
Definition: BKE_context.h:252
struct ViewLayer * CTX_data_view_layer(const bContext *C)
Definition: context.c:1044
struct Main * CTX_data_main(const bContext *C)
Definition: context.c:1018
#define CTX_DATA_END
Definition: BKE_context.h:260
struct FreestyleSettings FreestyleSettings
Definition: BKE_freestyle.h:37
short BKE_freestyle_lineset_get_active_index(struct FreestyleConfig *config)
Definition: freestyle.c:245
struct FreestyleModuleConfig * BKE_freestyle_module_add(struct FreestyleConfig *config)
Definition: freestyle.c:131
struct FreestyleLineSet * BKE_freestyle_lineset_add(struct Main *bmain, struct FreestyleConfig *config, const char *name)
Definition: freestyle.c:182
bool BKE_freestyle_lineset_delete(struct FreestyleConfig *config, struct FreestyleLineSet *lineset)
Definition: freestyle.c:216
void BKE_freestyle_lineset_set_active_index(struct FreestyleConfig *config, short index)
Definition: freestyle.c:259
struct FreestyleLineSet * BKE_freestyle_lineset_get_active(struct FreestyleConfig *config)
Definition: freestyle.c:233
bool BKE_freestyle_module_delete(struct FreestyleConfig *config, struct FreestyleModuleConfig *module_conf)
Definition: freestyle.c:146
#define G_MAIN
Definition: BKE_global.h:232
void BKE_image_release_ibuf(struct Image *ima, struct ImBuf *ibuf, void *lock)
Definition: image.c:5113
bool BKE_image_is_stereo(struct Image *ima)
Definition: image.c:3889
#define IMA_CHAN_FLAG_RGB
Definition: BKE_image.h:171
struct ImBuf * BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **r_lock)
Definition: image.c:5100
char BKE_imtype_valid_depths(const char imtype)
Definition: image.c:1541
#define IMA_CHAN_FLAG_ALPHA
Definition: BKE_image.h:172
char BKE_imtype_valid_channels(const char imtype, bool write_file)
Definition: image.c:1500
#define IMA_SIGNAL_FREE
Definition: BKE_image.h:163
#define IMA_CHAN_FLAG_BW
Definition: BKE_image.h:170
int BKE_image_path_ensure_ext_from_imformat(char *string, const struct ImageFormatData *im_format)
bool BKE_imtype_is_movie(const char imtype)
Definition: image.c:1443
void BKE_image_signal(struct Main *bmain, struct Image *ima, struct ImageUser *iuser, int signal)
Definition: image.c:3499
struct ViewLayer * BKE_view_layer_add(struct Scene *scene, const char *name, struct ViewLayer *view_layer_source, const int type)
Definition: layer.c:200
void BKE_view_layer_rename(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, const char *name)
Definition: layer.c:522
@ VIEWLAYER_ADD_NEW
Definition: BKE_layer.h:50
void BKE_view_layer_verify_aov(struct RenderEngine *engine, struct Scene *scene, struct ViewLayer *view_layer)
Definition: layer.c:2095
struct ViewLayer * BKE_view_layer_find_with_aov(struct Scene *scene, struct ViewLayerAOV *view_layer_aov)
Definition: layer.c:2123
void id_us_min(struct ID *id)
Definition: lib_id.c:297
void id_lib_extern(struct ID *id)
Definition: lib_id.c:207
void id_us_plus(struct ID *id)
Definition: lib_id.c:288
bool BKE_id_is_in_global_main(struct ID *id)
Definition: lib_id.c:2287
void BKE_main_id_tag_listbase(struct ListBase *lb, const int tag, const bool value)
Definition: lib_id.c:891
struct Mesh * BKE_mesh_from_object(struct Object *ob)
Definition: mesh.c:1271
void ntreeCompositUpdateRLayers(struct bNodeTree *ntree)
#define CMP_NODE_OUTPUT_FILE
Definition: BKE_node.h:1154
struct Paint * BKE_paint_get_active(struct Scene *sce, struct ViewLayer *view_layer)
Definition: paint.c:447
struct Brush * BKE_paint_brush(struct Paint *paint)
Definition: paint.c:604
void BKE_paint_invalidate_overlay_all(void)
Definition: paint.c:272
int BKE_ptcache_object_reset(struct Scene *scene, struct Object *ob, int mode)
Definition: pointcache.c:2953
#define PTCACHE_RESET_DEPSGRAPH
void BKE_report(ReportList *reports, ReportType type, const char *message)
Definition: report.c:104
void BKE_reportf(ReportList *reports, ReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
int BKE_scene_orientation_slot_get_index(const struct TransformOrientationSlot *orient_slot)
struct TransformOrientation * BKE_scene_transform_orientation_find(const struct Scene *scene, const int index)
void BKE_scene_cursor_to_mat4(const struct View3DCursor *cursor, float mat[4][4])
void BKE_scene_cursor_from_mat4(struct View3DCursor *cursor, const float mat[4][4], bool use_compat)
Definition: scene.c:3764
float BKE_scene_frame_to_ctime(const struct Scene *scene, const float frame)
#define SETLOOPER_SET_ONLY(_sce_basis, _sce_iter, _base)
Definition: BKE_scene.h:62
struct SceneRenderView * BKE_scene_add_render_view(struct Scene *sce, const char *name)
Definition: scene.c:2813
bool BKE_scene_has_view_layer(const struct Scene *scene, const struct ViewLayer *layer)
int BKE_render_num_threads(const struct RenderData *r)
void BKE_scene_orientation_slot_set_index(struct TransformOrientationSlot *orient_slot, int orientation)
Definition: scene.c:2517
bool BKE_scene_remove_render_view(struct Scene *scene, struct SceneRenderView *srv)
Definition: scene.c:2834
bool BKE_scene_use_spherical_stereo(struct Scene *scene)
Definition: scene.c:2925
int BKE_unit_base_of_type_get(int system, int type)
Definition: unit.c:1285
const char * BKE_unit_display_name_get(const void *usys_pt, int index)
Definition: unit.c:1294
bool BKE_unit_is_suppressed(const void *usys_pt, int index)
Definition: unit.c:1312
void BKE_unit_system_get(int system, int type, const void **r_usys_pt, int *r_len)
Definition: unit.c:1267
@ B_UNIT_LENGTH
Definition: BKE_unit.h:79
@ B_UNIT_TEMPERATURE
Definition: BKE_unit.h:89
@ B_UNIT_MASS
Definition: BKE_unit.h:82
@ B_UNIT_TIME
Definition: BKE_unit.h:84
const char * BKE_unit_identifier_get(const void *usys_pt, int index)
Definition: unit.c:1298
Volume datablock.
#define BLI_assert(a)
Definition: BLI_assert.h:58
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
Definition: BLI_listbase.h:124
#define LISTBASE_FOREACH(type, var, list)
Definition: BLI_listbase.h:172
bool BLI_remlink_safe(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:159
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
Definition: listbase.c:547
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:110
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
#define M_PI
Definition: BLI_math_base.h:38
void normalize_m4_m4(float R[4][4], const float M[4][4]) ATTR_NONNULL()
Definition: math_matrix.c:1972
#define DEG2RAD(_deg)
#define DEG2RADF(_deg)
MINLINE void copy_v3_v3(float r[3], const float a[3])
size_t size_t char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
#define STR_ELEM(...)
Definition: BLI_string.h:218
size_t size_t char size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, const size_t dst_maxncpy) ATTR_NONNULL()
Definition: string.c:333
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
Definition: string.c:70
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
Definition: string_utf8.c:258
bool BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t len)
Definition: string_utils.c:381
int BLI_system_num_threads_override_get(void)
Definition: threads.cc:350
#define BLENDER_MAX_THREADS
Definition: BLI_threads.h:35
#define ARRAY_SIZE(arr)
#define UNUSED(x)
#define MAX2(a, b)
#define ELEM(...)
#define MIN2(a, b)
#define STREQ(a, b)
#define BLT_I18NCONTEXT_ID_CURVE
#define BLT_I18NCONTEXT_ID_SOUND
#define N_(msgid)
#define DATA_(msgid)
void DEG_id_tag_update_ex(struct Main *bmain, struct ID *id, int flag)
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
@ ID_RECALC_AUDIO_FPS
Definition: DNA_ID.h:661
@ ID_RECALC_AUDIO_LISTENER
Definition: DNA_ID.h:664
@ ID_RECALC_TRANSFORM
Definition: DNA_ID.h:599
@ ID_RECALC_COPY_ON_WRITE
Definition: DNA_ID.h:654
@ ID_RECALC_SELECT
Definition: DNA_ID.h:638
@ ID_RECALC_PSYS_CHILD
Definition: DNA_ID.h:622
@ ID_RECALC_AUDIO_MUTE
Definition: DNA_ID.h:663
@ ID_RECALC_SEQUENCER_STRIPS
Definition: DNA_ID.h:658
@ ID_RECALC_AUDIO_SEEK
Definition: DNA_ID.h:660
@ ID_RECALC_GEOMETRY
Definition: DNA_ID.h:611
@ ID_RECALC_AUDIO_VOLUME
Definition: DNA_ID.h:662
@ LIB_TAG_DOIT
Definition: DNA_ID.h:554
@ ID_IM
Definition: DNA_ID_enums.h:65
@ ID_NT
Definition: DNA_ID_enums.h:80
@ ID_SCE
Definition: DNA_ID_enums.h:57
@ KEYINGSET_ABSOLUTE
#define MAX_BRUSH_PIXEL_RADIUS
Object groups, one object can be in many groups at once.
@ CU_BEZIER
@ CU_POLY
@ FREESTYLE_CONTROL_EDITOR_MODE
@ FREESTYLE_CONTROL_SCRIPT_MODE
@ FREESTYLE_FE_EDGE_MARK
@ FREESTYLE_FE_BORDER
@ FREESTYLE_FE_SILHOUETTE
@ FREESTYLE_FE_RIDGE_VALLEY
@ FREESTYLE_FE_CREASE
@ FREESTYLE_FE_EXTERNAL_CONTOUR
@ FREESTYLE_FE_CONTOUR
@ FREESTYLE_FE_SUGGESTIVE_CONTOUR
@ FREESTYLE_FE_MATERIAL_BOUNDARY
@ FREESTYLE_QI_VISIBLE
@ FREESTYLE_QI_RANGE
@ FREESTYLE_QI_HIDDEN
@ FREESTYLE_LINESET_FE_AND
@ FREESTYLE_LINESET_ENABLED
@ FREESTYLE_LINESET_FM_NOT
@ FREESTYLE_LINESET_FE_NOT
@ FREESTYLE_LINESET_FM_BOTH
@ FREESTYLE_LINESET_GR_NOT
@ FREESTYLE_SEL_VISIBILITY
@ FREESTYLE_SEL_EDGE_TYPES
@ FREESTYLE_SEL_IMAGE_BORDER
@ FREESTYLE_SEL_FACE_MARK
@ FREESTYLE_SEL_GROUP
@ FREESTYLE_CULLING
@ FREESTYLE_FACE_SMOOTHNESS_FLAG
@ FREESTYLE_MATERIAL_BOUNDARIES_FLAG
@ FREESTYLE_ADVANCED_OPTIONS_FLAG
@ FREESTYLE_RIDGES_AND_VALLEYS_FLAG
@ FREESTYLE_VIEW_MAP_CACHE
@ FREESTYLE_SUGGESTIVE_CONTOURS_FLAG
@ FREESTYLE_AS_RENDER_PASS
@ GP_STROKE_SELECT
@ GP_DATA_CACHE_IS_DIRTY
@ GP_SPOINT_SELECT
@ VIEW_LAYER_CRYPTOMATTE_MATERIAL
@ VIEW_LAYER_CRYPTOMATTE_ASSET
@ VIEW_LAYER_CRYPTOMATTE_ACCURATE
@ VIEW_LAYER_CRYPTOMATTE_OBJECT
@ EEVEE_RENDER_PASS_VOLUME_LIGHT
@ EEVEE_RENDER_PASS_BLOOM
@ AOV_TYPE_COLOR
@ AOV_TYPE_VALUE
@ AOV_CONFLICT
@ eModifierType_ParticleSystem
@ eModifierType_Subsurf
@ eModifierType_Multires
Object is a sort of wrapper for general info.
@ OB_MBALL
@ OB_CAMERA
@ OB_MESH
@ OB_VOLUME
@ OB_CURVE
@ OB_GPENCIL
Types and defines for representing Rigid Body entities.
@ SCE_OBJECT_MODE_LOCK
#define SCER_LOCK_FRAME_SELECTION
#define PROP_RANDOM
#define R_IMF_IMTYPE_FFMPEG
#define USER_UNIT_METRIC
#define STEREO_LEFT_NAME
#define SCE_SNAP_MODE_NODE_Y
#define R_EXTENSION
#define MINFRAME
#define R_SINGLE_LAYER
#define SCE_NLA_EDIT_ON
#define R_STAMP_RENDERTIME
#define R_BAKE_CLEAR
#define R_BORDER
#define R_STAMP_HOSTNAME
@ R_ALPHAPREMUL
#define UV_SCULPT_TOOL_RELAX_HC
#define R_MULTIVIEW
#define UV_SELECT_EDGE
@ R_SEQ_OVERRIDE_SCENE_SETTINGS
#define USER_UNIT_OPT_SPLIT
#define R_BAKE_SPACE_OBJECT
#define SCE_SNAP_TARGET_CLOSEST
#define R_IMF_EXR_CODEC_MAX
#define R_LINE_THICKNESS_ABSOLUTE
#define R_IMF_PLANES_BW
@ UNIFIED_PAINT_WEIGHT
@ UNIFIED_PAINT_SIZE
@ UNIFIED_PAINT_BRUSH_LOCK_SIZE
@ UNIFIED_PAINT_ALPHA
@ UNIFIED_PAINT_COLOR
#define UV_SHOW_SAME_IMAGE
#define AUDIO_SCRUB
@ SCE_DISPLAY_AA_OFF
@ SCE_DISPLAY_AA_SAMPLES_32
@ SCE_DISPLAY_AA_SAMPLES_8
@ SCE_DISPLAY_AA_SAMPLES_11
@ SCE_DISPLAY_AA_SAMPLES_5
@ SCE_DISPLAY_AA_SAMPLES_16
@ SCE_DISPLAY_AA_FXAA
#define R_IMF_EXR_CODEC_PXR24
@ CURVE_PAINT_PROJECT_CURSOR
@ CURVE_PAINT_PROJECT_SURFACE
#define R_PERSISTENT_DATA
#define PROP_LIN
#define SCE_SNAP_PEEL_OBJECT
#define R_CROP
@ SCE_PERF_HQ_NORMALS
#define MINAFRAME
#define SCE_STATVIS_INTERSECT
#define UV_SELECT_FACE
#define SCE_LAY_NEG_ZMASK
#define R_IMF_IMTYPE_AVIJPEG
@ AUTO_MERGE
@ AUTO_MERGE_AND_SPLIT
#define SCE_SNAP
#define R_STAMP_MARKER
#define USER_UNIT_NONE
#define SCE_SNAP_MODE_FACE
@ SCE_XFORM_SKIP_CHILDREN
@ SCE_XFORM_AXIS_ALIGN
@ SCE_XFORM_DATA_ORIGIN
#define R_BAKE_USERSCALE
@ CURVE_PAINT_FLAG_DEPTH_STROKE_ENDPOINTS
@ CURVE_PAINT_FLAG_DEPTH_STROKE_OFFSET_ABS
@ CURVE_PAINT_FLAG_CORNERS_DETECT
@ CURVE_PAINT_FLAG_PRESSURE_RADIUS
@ FFM_PRESET_GOOD
@ FFM_PRESET_REALTIME
@ FFM_PRESET_BEST
#define SCE_STATVIS_THICKNESS
#define SCE_SNAP_TARGET_ACTIVE
#define SCE_SNAP_MODE_NODE_X
@ GP_SELECTMODE_POINT
@ GP_SELECTMODE_SEGMENT
@ GP_SELECTMODE_STROKE
#define SCE_STATVIS_SHARP
#define R_STAMP_MEMORY
#define SCE_LAY_EDGE
#define R_NO_OVERWRITE
#define R_IMF_EXR_CODEC_NONE
#define R_IMF_EXR_CODEC_RLE
#define PHYS_GLOBAL_GRAVITY
#define SCE_STATVIS_DISTORT
#define R_DOCOMP
@ SCE_HAIR_SHAPE_STRAND
@ SCE_HAIR_SHAPE_STRIP
#define SCER_PRV_RANGE
#define R_IMF_JP2_CODEC_J2K
#define SCE_KEYS_NO_SELONLY
@ R_BAKE_TARGET_VERTEX_COLORS
@ R_BAKE_TARGET_IMAGE_TEXTURES
@ S3D_ANAGLYPH_REDCYAN
@ S3D_ANAGLYPH_YELLOWBLUE
@ S3D_ANAGLYPH_GREENMAGENTA
#define PROP_SPHERE
@ R_BAKE_POSY
@ R_BAKE_NEGX
@ R_BAKE_POSZ
@ R_BAKE_NEGY
@ R_BAKE_POSX
@ R_BAKE_NEGZ
#define R_IMF_EXR_CODEC_ZIP
#define R_STAMP_FRAME_RANGE
@ SCE_WORKSPACE_TOOL_DEFAULT
@ SCE_WORKSPACE_TOOL_FALLBACK
#define SCE_SELECT_FACE
#define R_DOSEQ
#define SCE_LAY_HALO
#define SCE_LAY_ZTRA
#define SCE_SNAP_ABS_GRID
@ FFMPEG_LOSSLESS_OUTPUT
@ FFMPEG_AUTOSPLIT_OUTPUT
@ FFMPEG_USE_MAX_B_FRAMES
@ CURVE_PAINT_SURFACE_PLANE_NORMAL_SURFACE
@ CURVE_PAINT_SURFACE_PLANE_VIEW
@ CURVE_PAINT_SURFACE_PLANE_NORMAL_VIEW
#define SCE_SNAP_TARGET_CENTER
#define R_EXR_CACHE_FILE
@ OB_DRAW_GROUPUSER_ACTIVE
@ OB_DRAW_GROUPUSER_NONE
@ OB_DRAW_GROUPUSER_ALL
#define OBACT(_view_layer)
@ S3D_SQUEEZED_FRAME
@ S3D_INTERLACE_SWAP
@ S3D_SIDEBYSIDE_CROSSEYED
#define R_IMF_IMTYPE_MULTILAYER
#define R_IMF_EXR_CODEC_DWAA
#define SCE_LAY_ALL_Z
#define UV_SCULPT_TOOL_RELAX_LAPLACIAN
@ CURVE_PAINT_FIT_METHOD_REFIT
@ CURVE_PAINT_FIT_METHOD_SPLIT
#define PROP_SMOOTH
@ S3D_DISPLAY_ANAGLYPH
@ S3D_DISPLAY_INTERLACE
@ S3D_DISPLAY_TOPBOTTOM
@ S3D_DISPLAY_SIDEBYSIDE
@ S3D_DISPLAY_PAGEFLIP
@ FFM_CRF_LOW
@ FFM_CRF_MEDIUM
@ FFM_CRF_VERYLOW
@ FFM_CRF_LOSSLESS
@ FFM_CRF_PERC_LOSSLESS
@ FFM_CRF_NONE
@ FFM_CRF_LOWEST
@ FFM_CRF_HIGH
#define R_IMF_JP2_FLAG_CINE_PRESET
#define R_STAMP_DRAW
#define R_FIXED_THREADS
@ R_IMF_CHAN_DEPTH_24
@ R_IMF_CHAN_DEPTH_8
@ R_IMF_CHAN_DEPTH_16
@ R_IMF_CHAN_DEPTH_12
@ R_IMF_CHAN_DEPTH_1
@ R_IMF_CHAN_DEPTH_10
@ R_IMF_CHAN_DEPTH_32
@ SCE_EEVEE_MB_END
@ SCE_EEVEE_MB_START
@ SCE_EEVEE_MB_CENTER
#define R_BAKE_SPACE_TANGENT
#define UV_SCULPT_LOCK_BORDERS
#define SCE_STATVIS_OVERHANG
#define UV_SCULPT_ALL_ISLANDS
#define R_STAMP_HIDE_LABELS
#define SCE_SNAP_MODE_VOLUME
@ SCE_VIEWS_FORMAT_STEREO_3D
@ SCE_VIEWS_FORMAT_MULTIVIEW
#define SCE_SNAP_MODE_EDGE_PERPENDICULAR
#define SCE_LAY_SOLID
#define R_STAMP_NOTE
#define AUDIO_SYNC
@ GP_SCULPT_MASK_SELECTMODE_POINT
@ GP_SCULPT_MASK_SELECTMODE_STROKE
@ GP_SCULPT_MASK_SELECTMODE_SEGMENT
#define UV_SYNC_SELECTION
#define SCE_SELECT_VERTEX
#define UVCALC_TRANSFORM_CORRECT_KEEP_CONNECTED
#define SCE_SNAP_MODE_EDGE_MIDPOINT
#define SCER_SHOW_SUBFRAME
#define UV_SELECT_ISLAND
#define R_FULL_SAMPLE
#define R_BAKE_AUTO_NAME
#define PROP_ROOT
#define SCE_SNAP_NO_SELF
@ GP_VERTEX_MASK_SELECTMODE_SEGMENT
@ GP_VERTEX_MASK_SELECTMODE_STROKE
@ GP_VERTEX_MASK_SELECTMODE_POINT
#define SCE_LAY_AO
#define USER_UNIT_IMPERIAL
#define USER_UNIT_ROT_RADIANS
@ SCE_ORIENT_DEFAULT
#define R_STAMP_FRAME
@ S3D_INTERLACE_ROW
@ S3D_INTERLACE_COLUMN
@ S3D_INTERLACE_CHECKERBOARD
@ PROP_EDIT_PROJECTED
@ PROP_EDIT_USE
@ PROP_EDIT_CONNECTED
#define UV_SELECT_VERTEX
#define R_IMF_PLANES_RGBA
#define R_IMF_CINEON_FLAG_LOG
#define SCE_SNAP_TARGET_MEDIAN
#define R_BAKE_MULTIRES
#define R_STAMP_CAMERA
#define R_STAMP_STRIPMETA
#define R_TOUCH
#define R_BAKE_CAGE
@ GP_PROJECT_VIEWSPACE
@ GP_PROJECT_DEPTH_VIEW
@ GP_PROJECT_CURSOR
@ GP_PROJECT_DEPTH_STROKE_ENDPOINTS
@ GP_PROJECT_DEPTH_STROKE
@ GP_PROJECT_DEPTH_STROKE_FIRST
#define R_STAMP_DATE
#define R_BAKE_SPLIT_MAT
@ SIMPLIFY_GPENCIL_FILL
@ SIMPLIFY_GPENCIL_ON_PLAY
@ SIMPLIFY_GPENCIL_AA
@ SIMPLIFY_GPENCIL_MODIFIER
@ SIMPLIFY_GPENCIL_TINT
@ SIMPLIFY_GPENCIL_ENABLE
@ SIMPLIFY_GPENCIL_FX
#define UVCALC_TRANSFORM_CORRECT
#define R_STAMP_FILENAME
#define SCE_LAY_STRAND
#define R_IMF_IMTYPE_AVIRAW
#define R_MBLUR
#define R_IMF_EXR_CODEC_ZIPS
#define R_EXR_TILE_FILE
#define SCE_LAY_ZMASK
#define R_EDGE_FRS
#define STEREO_RIGHT_NAME
#define R_IMF_FLAG_PREVIEW_JPG
@ GP_TOOL_FLAG_RETAIN_LAST
@ GP_TOOL_FLAG_THUMBNAIL_LIST
@ GP_TOOL_FLAG_PAINT_ONBACK
@ GP_TOOL_FLAG_AUTOMERGE_STROKE
@ GP_TOOL_FLAG_CREATE_WEIGHTS
#define R_LINE_THICKNESS_RELATIVE
#define SCE_SNAP_ROTATE
@ FFM_CHANNELS_SURROUND4
@ FFM_CHANNELS_STEREO
@ FFM_CHANNELS_SURROUND51
@ FFM_CHANNELS_SURROUND71
@ FFM_CHANNELS_MONO
#define R_IMF_IMTYPE_RADHDR
@ SCE_EEVEE_SHADOW_HIGH_BITDEPTH
@ SCE_EEVEE_VOLUMETRIC_SHADOWS
@ SCE_EEVEE_DOF_HQ_SLIGHT_FOCUS
@ SCE_EEVEE_SSR_ENABLED
@ SCE_EEVEE_MOTION_BLUR_ENABLED
@ SCE_EEVEE_SHOW_IRRADIANCE
@ SCE_EEVEE_SSR_REFRACTION
@ SCE_EEVEE_BLOOM_ENABLED
@ SCE_EEVEE_GTAO_BOUNCE
@ SCE_EEVEE_SSR_HALF_RESOLUTION
@ SCE_EEVEE_TAA_REPROJECTION
@ SCE_EEVEE_OVERSCAN
@ SCE_EEVEE_SHADOW_SOFT
@ SCE_EEVEE_GTAO_BENT_NORMALS
@ SCE_EEVEE_GTAO_ENABLED
@ SCE_EEVEE_SHOW_CUBEMAPS
@ SCE_EEVEE_DOF_JITTER
@ SCE_EEVEE_VOLUMETRIC_LIGHTS
@ SCE_EEVEE_GI_AUTOBAKE
@ SCE_SNAP_TRANSFORM_MODE_SCALE
@ SCE_SNAP_TRANSFORM_MODE_ROTATE
@ SCE_SNAP_TRANSFORM_MODE_TRANSLATE
#define AUDIO_MUTE
#define SCE_LAY_SKY
#define SCE_SNAP_PROJECT
#define R_STAMP_SCENE
#define USER_UNIT_ADAPTIVE
@ SEQ_SCALE_TO_FILL
@ SEQ_STRETCH_TO_FILL
@ SEQ_USE_ORIGINAL_SIZE
@ SEQ_SCALE_TO_FIT
#define R_IMF_JP2_FLAG_YCC
#define R_STAMP_SEQSTRIP
#define R_IMF_EXR_CODEC_B44A
#define R_IMF_JP2_CODEC_JP2
#define R_IMF_JP2_FLAG_CINE_48
#define PROP_INVSQUARE
#define SCE_SNAP_MODE_VERTEX
#define SCE_SNAP_BACKFACE_CULLING
#define SCE_SNAP_MODE_GRID
#define R_SIMPLIFY
#define SCE_SELECT_EDGE
#define R_STAMP_CAMERALENS
#define SCE_FRAME_DROP
#define SCE_VIEW_DISABLE
#define R_IMF_FLAG_ZBUF
#define R_IMF_IMTYPE_OPENEXR
#define R_BAKE_TO_ACTIVE
#define PROP_CONST
@ R_BAKE_SAVE_EXTERNAL
@ R_BAKE_SAVE_INTERNAL
#define SCE_SNAP_MODE_EDGE
#define R_STAMP_TIME
@ R_IMF_TIFF_CODEC_PACKBITS
@ R_IMF_TIFF_CODEC_DEFLATE
@ R_IMF_TIFF_CODEC_NONE
@ R_IMF_TIFF_CODEC_LZW
#define R_IMF_PLANES_RGB
#define PROP_SHARP
#define R_IMF_EXR_CODEC_B44
@ R_BAKE_PASS_FILTER_DIFFUSE
@ R_BAKE_PASS_FILTER_NONE
@ R_BAKE_PASS_FILTER_COLOR
@ R_BAKE_PASS_FILTER_INDIRECT
@ R_BAKE_PASS_FILTER_AO
@ R_BAKE_PASS_FILTER_DIRECT
@ R_BAKE_PASS_FILTER_GLOSSY
@ R_BAKE_PASS_FILTER_EMIT
@ R_BAKE_PASS_FILTER_TRANSM
#define SCE_LAY_VOLUMES
@ SCE_PASS_NORMAL
@ SCE_PASS_GLOSSY_DIRECT
@ SCE_PASS_AO
@ SCE_PASS_DIFFUSE_COLOR
@ SCE_PASS_UV
@ SCE_PASS_SUBSURFACE_INDIRECT
@ SCE_PASS_TRANSM_DIRECT
@ SCE_PASS_SUBSURFACE_COLOR
@ SCE_PASS_GLOSSY_COLOR
@ SCE_PASS_DIFFUSE_DIRECT
@ SCE_PASS_GLOSSY_INDIRECT
@ SCE_PASS_INDEXMA
@ SCE_PASS_INDEXOB
@ SCE_PASS_TRANSM_INDIRECT
@ SCE_PASS_COMBINED
@ SCE_PASS_Z
@ SCE_PASS_VECTOR
@ SCE_PASS_DIFFUSE_INDIRECT
@ SCE_PASS_SUBSURFACE_DIRECT
@ SCE_PASS_SHADOW
@ SCE_PASS_TRANSM_COLOR
@ SCE_PASS_MIST
@ SCE_PASS_EMIT
@ SCE_PASS_ENVIRONMENT
#define R_BAKE_LORES_MESH
#define SCE_SNAP_MODE_INCREMENT
#define R_IMF_EXR_CODEC_PIZ
@ WT_VGROUP_ALL
@ WT_VGROUP_BONE_DEFORM_OFF
@ WT_VGROUP_BONE_DEFORM
#define MAXFRAME
#define FRAMENUMBER_MIN_CLAMP(cfra)
@ ANIMRECORD_FLAG_WITHNLA
@ AUTOKEY_FLAG_CYCLEAWARE
@ AUTOKEY_FLAG_ONLYKEYINGSET
@ AUTOKEY_MODE_NORMAL
@ AUTOKEY_MODE_EDITKEYS
@ AUTOKEY_ON
@ V3D_ORIENT_NORMAL
@ V3D_ORIENT_CUSTOM
@ V3D_ORIENT_GLOBAL
@ V3D_ORIENT_LOCAL
@ V3D_ORIENT_VIEW
@ V3D_ORIENT_CURSOR
@ V3D_ORIENT_GIMBAL
@ V3D_AROUND_ACTIVE
@ V3D_AROUND_CENTER_BOUNDS
@ V3D_AROUND_CURSOR
@ V3D_AROUND_CENTER_MEDIAN
@ V3D_AROUND_LOCAL_ORIGINS
const char * ED_info_statistics_string(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer)
Definition: info_stats.c:661
void EDBM_selectmode_set(struct BMEditMesh *em)
void ED_node_composit_default(const struct bContext *C, struct Scene *scene)
void ED_render_engine_changed(struct Main *bmain, const bool update_scene_data)
bool ED_scene_view_layer_delete(struct Main *bmain, struct Scene *scene, struct ViewLayer *layer, struct ReportList *reports) ATTR_NONNULL(1
void FRS_free_view_map_cache(void)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera CLAMP
#define RE_BAKE_NORMALS
Definition: RE_pipeline.h:356
#define RE_BAKE_DISPLACEMENT
Definition: RE_pipeline.h:357
#define RNA_POINTER_INVALIDATE(ptr)
Definition: RNA_access.h:1425
StructRNA RNA_ViewLayer
StructRNA RNA_KeyingSet
StructRNA RNA_Object
StructRNA RNA_FreestyleLineSet
StructRNA RNA_FreestyleLineStyle
StructRNA RNA_AOV
const EnumPropertyItem rna_enum_exr_codec_items[]
const EnumPropertyItem * rna_TransformOrientation_itemf(struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop, bool *r_free)
@ PARM_RNAPTR
Definition: RNA_types.h:339
@ PARM_REQUIRED
Definition: RNA_types.h:337
@ FUNC_USE_REPORTS
Definition: RNA_types.h:578
@ FUNC_USE_MAIN
Definition: RNA_types.h:576
@ FUNC_USE_SELF_ID
Definition: RNA_types.h:565
@ STRUCT_ID_REFCOUNT
Definition: RNA_types.h:621
@ STRUCT_UNDO
Definition: RNA_types.h:623
@ PROP_FLOAT
Definition: RNA_types.h:75
@ PROP_BOOLEAN
Definition: RNA_types.h:73
@ PROP_ENUM
Definition: RNA_types.h:77
@ PROP_INT
Definition: RNA_types.h:74
@ PROP_STRING
Definition: RNA_types.h:76
@ PROP_POINTER
Definition: RNA_types.h:78
@ PROP_COLLECTION
Definition: RNA_types.h:79
@ PROPOVERRIDE_OVERRIDABLE_LIBRARY
Definition: RNA_types.h:297
@ PROP_THICK_WRAP
Definition: RNA_types.h:270
@ PROP_CONTEXT_UPDATE
Definition: RNA_types.h:254
@ PROP_ANIMATABLE
Definition: RNA_types.h:188
@ PROP_PROPORTIONAL
Definition: RNA_types.h:209
@ PROP_NEVER_UNLINK
Definition: RNA_types.h:232
@ PROP_EDITABLE
Definition: RNA_types.h:175
@ PROP_ENUM_FLAG
Definition: RNA_types.h:251
@ PROP_NEVER_NULL
Definition: RNA_types.h:225
@ PROP_PTR_NO_OWNERSHIP
Definition: RNA_types.h:242
@ PROP_ID_SELF_CHECK
Definition: RNA_types.h:218
@ PROP_ID_REFCOUNT
Definition: RNA_types.h:212
@ PROP_IDPROPERTY
Definition: RNA_types.h:273
@ PROP_TIME
Definition: RNA_types.h:133
@ PROP_MATRIX
Definition: RNA_types.h:144
@ PROP_DIRECTION
Definition: RNA_types.h:141
@ PROP_XYZ
Definition: RNA_types.h:148
@ PROP_DISTANCE
Definition: RNA_types.h:135
@ PROP_ACCELERATION
Definition: RNA_types.h:143
@ PROP_COLOR
Definition: RNA_types.h:139
@ PROP_PIXEL
Definition: RNA_types.h:128
@ PROP_ANGLE
Definition: RNA_types.h:132
@ PROP_AXISANGLE
Definition: RNA_types.h:147
@ PROP_EULER
Definition: RNA_types.h:145
@ PROP_NONE
Definition: RNA_types.h:113
@ PROP_PERCENTAGE
Definition: RNA_types.h:130
@ PROP_FACTOR
Definition: RNA_types.h:131
@ PROP_COLOR_GAMMA
Definition: RNA_types.h:151
@ PROP_XYZ_LENGTH
Definition: RNA_types.h:149
@ PROP_UNSIGNED
Definition: RNA_types.h:129
@ PROP_QUATERNION
Definition: RNA_types.h:146
@ PROP_FILEPATH
Definition: RNA_types.h:116
#define C
Definition: RandGen.cpp:39
#define ND_SEQUENCER
Definition: WM_types.h:337
#define NC_WORLD
Definition: WM_types.h:288
#define ND_WORLD
Definition: WM_types.h:353
#define NC_WINDOW
Definition: WM_types.h:277
#define NC_GEOM
Definition: WM_types.h:294
#define ND_DRAW
Definition: WM_types.h:362
#define NC_BRUSH
Definition: WM_types.h:286
#define ND_DATA
Definition: WM_types.h:408
#define ND_RENDER_OPTIONS
Definition: WM_types.h:335
#define NC_ANIMATION
Definition: WM_types.h:289
#define ND_DISPLAY
Definition: WM_types.h:391
#define ND_KEYINGSET
Definition: WM_types.h:348
#define NC_SCENE
Definition: WM_types.h:279
#define ND_TOOLSETTINGS
Definition: WM_types.h:349
#define ND_SPACE_IMAGE
Definition: WM_types.h:417
#define NA_EDITED
Definition: WM_types.h:462
#define ND_SPACE_GRAPH
Definition: WM_types.h:427
#define ND_FRAME_RANGE
Definition: WM_types.h:351
#define NC_IMAGE
Definition: WM_types.h:285
#define ND_MARKERS
Definition: WM_types.h:333
#define ND_FRAME
Definition: WM_types.h:334
#define NC_GPENCIL
Definition: WM_types.h:300
#define ND_TRANSFORM
Definition: WM_types.h:357
#define ND_LAYER
Definition: WM_types.h:350
#define ND_SPACE_VIEW3D
Definition: WM_types.h:423
#define NC_OBJECT
Definition: WM_types.h:280
#define NC_SPACE
Definition: WM_types.h:293
#define ND_DRAW_RENDER_VIEWPORT
Definition: WM_types.h:370
ListBase builtin_keyingsets
Definition: keyingsets.c:533
static struct PyModuleDef module
return(oflags[bm->toolflag_index].f &oflag) !=0
#define SELECT
OperationNode * node
Scene scene
bNodeTree * ntree
RenderEngine * RE_engine_create(RenderEngineType *type)
Definition: engine.c:133
RenderEngineType * RE_engines_find(const char *idname)
Definition: engine.c:108
void RE_engine_free(RenderEngine *engine)
Definition: engine.c:161
ListBase R_engines
Definition: engine.c:72
#define str(s)
void ED_gpencil_tag_scene_gpencil(Scene *scene)
void SEQ_cache_cleanup(Scene *scene)
Definition: image_cache.c:1251
#define GS(x)
Definition: iris.c:241
KeyingSet * ANIM_scene_get_active_keyingset(const Scene *scene)
Definition: keyingsets.c:674
int ANIM_scene_get_keyingset_index(Scene *scene, KeyingSet *ks)
Definition: keyingsets.c:693
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:41
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:45
static unsigned a[3]
Definition: RandGen.cpp:92
void RE_FreePersistentData(const Scene *scene)
Definition: pipeline.c:700
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb, IteratorSkipFunc skip)
Definition: rna_access.c:4823
void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int itemsize, int length, bool free_ptr, IteratorSkipFunc skip)
Definition: rna_access.c:4875
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
Definition: rna_access.c:196
void rna_def_animdata_common(StructRNA *srna)
static const EnumPropertyItem curve_type_items[]
Definition: rna_curve.c:141
void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
Definition: rna_define.c:4448
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2762
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
Definition: rna_define.c:1212
void RNA_define_animate_sdna(bool animate)
Definition: rna_define.c:766
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
Definition: rna_define.c:4159
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
Definition: rna_define.c:2257
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1555
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
Definition: rna_define.c:3312
void RNA_def_property_float_default(PropertyRNA *prop, float value)
Definition: rna_define.c:2042
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
Definition: rna_define.c:4302
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
Definition: rna_define.c:2127
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
Definition: rna_define.c:3153
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
Definition: rna_define.c:1676
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2717
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
Definition: rna_define.c:1684
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
Definition: rna_define.c:4262
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
Definition: rna_define.c:3462
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
Definition: rna_define.c:3408
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
Definition: rna_define.c:1259
void RNA_def_property_boolean_default(PropertyRNA *prop, bool value)
Definition: rna_define.c:1957
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
Definition: rna_define.c:2971
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
Definition: rna_define.c:1629
void RNA_def_property_int_default(PropertyRNA *prop, int value)
Definition: rna_define.c:1998
const float rna_default_axis_angle[4]
Definition: rna_define.c:1621
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
Definition: rna_define.c:1892
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
Definition: rna_define.c:1067
void RNA_def_struct_clear_flag(StructRNA *srna, int flag)
Definition: rna_define.c:1157
void RNA_def_property_array(PropertyRNA *prop, int length)
Definition: rna_define.c:1568
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
Definition: rna_define.c:1757
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
Definition: rna_define.c:1792
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
Definition: rna_define.c:2791
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
Definition: rna_define.c:4337
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
Definition: rna_define.c:2927
const int rna_matrix_dimsize_4x4[]
Definition: rna_define.c:1626
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
Definition: rna_define.c:3251
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
Definition: rna_define.c:1279
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2691
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
Definition: rna_define.c:4470
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
Definition: rna_define.c:1122
void RNA_def_function_flag(FunctionRNA *func, int flag)
Definition: rna_define.c:4332
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1517
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
Definition: rna_define.c:3373
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
Definition: rna_define.c:1047
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2623
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
Definition: rna_define.c:4416
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
Definition: rna_define.c:3055
const int rna_matrix_dimsize_3x3[]
Definition: rna_define.c:1625
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
Definition: rna_define.c:1267
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3675
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
Definition: rna_define.c:2870
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1512
void RNA_enum_item_add_separator(EnumPropertyItem **items, int *totitem)
Definition: rna_define.c:4442
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
Definition: rna_define.c:3585
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2515
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
Definition: rna_define.c:1706
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2364
void RNA_def_property_float_array_default(PropertyRNA *prop, const float *array)
Definition: rna_define.c:2064
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
Definition: rna_define.c:2348
void RNA_def_struct_nested(BlenderRNA *brna, StructRNA *srna, const char *structname)
Definition: rna_define.c:1138
void RNA_def_property_override_flag(PropertyRNA *prop, PropertyOverrideFlag flag)
Definition: rna_define.c:1525
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1547
const EnumPropertyItem rna_enum_beztriple_keyframe_type_items[]
Definition: rna_fcurve.c:95
void rna_Scene_glsl_update(struct Main *bmain, struct Scene *scene, struct PointerRNA *ptr)
void rna_FreestyleSettings_active_lineset_index_set(struct PointerRNA *ptr, int value)
void rna_FreestyleSettings_active_lineset_index_range(struct PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
int rna_FreestyleSettings_active_lineset_index_get(struct PointerRNA *ptr)
void rna_ViewLayer_material_override_update(struct Main *bmain, struct Scene *activescene, struct PointerRNA *ptr)
void rna_Scene_use_view_map_cache_update(struct Main *bmain, struct Scene *scene, struct PointerRNA *ptr)
int rna_ViewLayer_active_aov_index_get(PointerRNA *ptr)
struct FreestyleLineSet * rna_FreestyleSettings_lineset_add(struct ID *id, struct FreestyleSettings *config, struct Main *bmain, const char *name)
void rna_FreestyleSettings_lineset_remove(struct ID *id, struct FreestyleSettings *config, struct ReportList *reports, struct PointerRNA *lineset_ptr)
void RNA_api_scene(struct StructRNA *srna)
struct FreestyleModuleConfig * rna_FreestyleSettings_module_add(struct ID *id, struct FreestyleSettings *config)
struct PointerRNA rna_FreestyleSettings_active_lineset_get(struct PointerRNA *ptr)
void rna_ViewLayer_active_aov_index_set(PointerRNA *ptr, int value)
void rna_ViewLayer_active_aov_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
void rna_ViewLayer_name_set(struct PointerRNA *ptr, const char *value)
struct PointerRNA rna_FreestyleLineSet_linestyle_get(struct PointerRNA *ptr)
void rna_FreestyleSettings_module_remove(struct ID *id, struct FreestyleSettings *config, struct ReportList *reports, struct PointerRNA *module_ptr)
void rna_Scene_freestyle_update(struct Main *bmain, struct Scene *scene, struct PointerRNA *ptr)
void rna_ViewLayer_pass_update(struct Main *bmain, struct Scene *activescene, struct PointerRNA *ptr)
void RNA_api_scene_render(struct StructRNA *srna)
void rna_FreestyleLineSet_linestyle_set(struct PointerRNA *ptr, struct PointerRNA value, struct ReportList *reports)
const EnumPropertyItem rna_enum_object_rotation_mode_items[]
Definition: rna_object.c:286
const EnumPropertyItem rna_enum_object_axis_items[]
Definition: rna_object.c:302
const EnumPropertyItem DummyRNA_DEFAULT_items[]
Definition: rna_rna.c:45
const EnumPropertyItem rna_enum_mesh_select_mode_uv_items[]
Definition: rna_scene.c:150
static void rna_def_view3d_cursor(BlenderRNA *brna)
Definition: rna_scene.c:2685
static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna)
Definition: rna_scene.c:5544
void rna_def_freestyle_settings(BlenderRNA *brna)
Definition: rna_scene.c:4525
const EnumPropertyItem rna_enum_image_color_depth_items[]
Definition: rna_scene.c:409
const EnumPropertyItem rna_enum_image_type_items[]
Definition: rna_scene.c:366
static void rna_def_scene_keying_sets_all(BlenderRNA *brna, PropertyRNA *cprop)
Definition: rna_scene.c:6754
static void rna_def_display_safe_areas(BlenderRNA *brna)
Definition: rna_scene.c:6808
const EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[]
Definition: rna_scene.c:132
static void rna_def_timeline_markers(BlenderRNA *brna, PropertyRNA *cprop)
Definition: rna_scene.c:6668
static void rna_def_scene_gpencil(BlenderRNA *brna)
Definition: rna_scene.c:7458
const EnumPropertyItem rna_enum_views_format_multilayer_items[]
Definition: rna_scene.c:475
const EnumPropertyItem rna_enum_mesh_select_mode_items[]
Definition: rna_scene.c:143
static void rna_def_curve_paint_settings(BlenderRNA *brna)
Definition: rna_scene.c:3616
const EnumPropertyItem rna_enum_snap_target_items[]
Definition: rna_scene.c:107
static void rna_def_scene_keying_sets(BlenderRNA *brna, PropertyRNA *cprop)
Definition: rna_scene.c:6708
static void rna_def_scene_display(BlenderRNA *brna)
Definition: rna_scene.c:6851
static void rna_def_tool_settings(BlenderRNA *brna)
Definition: rna_scene.c:2747
void rna_def_view_layer_common(BlenderRNA *brna, StructRNA *srna, const bool scene)
Definition: rna_scene.c:3980
static void rna_def_freestyle_linesets(BlenderRNA *brna, PropertyRNA *cprop)
Definition: rna_scene.c:4480
const EnumPropertyItem rna_enum_stereo3d_display_items[]
Definition: rna_scene.c:487
const EnumPropertyItem rna_enum_normal_swizzle_items[]
Definition: rna_scene.c:426
static const EnumPropertyItem rna_enum_scene_display_aa_methods[]
Definition: rna_scene.c:204
static void rna_def_scene_objects(BlenderRNA *brna, PropertyRNA *cprop)
Definition: rna_scene.c:6657
static void rna_def_scene_eevee(BlenderRNA *brna)
Definition: rna_scene.c:6915
static const EnumPropertyItem snap_uv_element_items[]
Definition: rna_scene.c:194
#define R_IMF_VIEWS_ENUM_MV
Definition: rna_scene.c:468
static void rna_def_selected_uv_element(BlenderRNA *brna)
Definition: rna_scene.c:6790
static const EnumPropertyItem uv_sculpt_relaxation_items[]
Definition: rna_scene.c:96
static void rna_def_transform_orientation_slot(BlenderRNA *brna)
Definition: rna_scene.c:2653
const EnumPropertyItem rna_enum_proportional_falloff_items[]
Definition: rna_scene.c:115
void RNA_def_scene(BlenderRNA *brna)
Definition: rna_scene.c:7480
const EnumPropertyItem rna_enum_snap_node_element_items[]
Definition: rna_scene.c:181
static void rna_def_gpencil_interpolate(BlenderRNA *brna)
Definition: rna_scene.c:2614
static void rna_def_bake_data(BlenderRNA *brna)
Definition: rna_scene.c:4984
static void rna_def_sequencer_tool_settings(BlenderRNA *brna)
Definition: rna_scene.c:3489
#define R_IMF_VIEWS_ENUM_IND
Definition: rna_scene.c:460
static void rna_def_transform_orientation(BlenderRNA *brna)
Definition: rna_scene.c:2635
static void rna_def_scene_image_format_data(BlenderRNA *brna)
Definition: rna_scene.c:5352
const EnumPropertyItem rna_enum_bake_pass_filter_type_items[]
Definition: rna_scene.c:533
static void rna_def_statvis(BlenderRNA *brna)
Definition: rna_scene.c:3732
const EnumPropertyItem rna_enum_snap_element_items[]
Definition: rna_scene.c:158
const EnumPropertyItem rna_enum_bake_save_mode_items[]
Definition: rna_scene.c:450
static void rna_def_scene_render_view(BlenderRNA *brna)
Definition: rna_scene.c:5192
static void rna_def_view_layer_aovs(BlenderRNA *brna, PropertyRNA *cprop)
Definition: rna_scene.c:3935
static const EnumPropertyItem rna_enum_view_layer_aov_type_items[]
Definition: rna_scene.c:546
const EnumPropertyItem rna_enum_transform_pivot_items_full[]
Definition: rna_scene.c:552
static void rna_def_view_layer_eevee(BlenderRNA *brna)
Definition: rna_scene.c:3917
const EnumPropertyItem rna_enum_bake_target_items[]
Definition: rna_scene.c:436
static void rna_def_freestyle_modules(BlenderRNA *brna, PropertyRNA *cprop)
Definition: rna_scene.c:4451
const EnumPropertyItem rna_enum_curve_fit_method_items[]
Definition: rna_scene.c:244
const EnumPropertyItem rna_enum_views_format_items[]
Definition: rna_scene.c:471
static void rna_def_render_views(BlenderRNA *brna, PropertyRNA *cprop)
Definition: rna_scene.c:5229
const EnumPropertyItem rna_enum_normal_space_items[]
Definition: rna_scene.c:420
static void rna_def_unified_paint_settings(BlenderRNA *brna)
Definition: rna_scene.c:3515
const EnumPropertyItem rna_enum_views_format_multiview_items[]
Definition: rna_scene.c:479
#define IMAGE_TYPE_ITEMS_IMAGE_ONLY
Definition: rna_scene.c:345
const EnumPropertyItem rna_enum_transform_orientation_items[]
Definition: rna_scene.c:578
const EnumPropertyItem rna_enum_stereo3d_anaglyph_type_items[]
Definition: rna_scene.c:519
const EnumPropertyItem rna_enum_stereo3d_interlace_type_items[]
Definition: rna_scene.c:526
#define R_IMF_VIEWS_ENUM_S3D
Definition: rna_scene.c:466
static void rna_def_view_layer_aov(BlenderRNA *brna)
Definition: rna_scene.c:3953
static void rna_def_unit_settings(BlenderRNA *brna)
Definition: rna_scene.c:3839
static void rna_def_image_format_stereo3d_format(BlenderRNA *brna)
Definition: rna_scene.c:5278
const EnumPropertyItem rna_enum_image_color_mode_items[]
Definition: rna_scene.c:388
static void rna_def_scene_render_data(BlenderRNA *brna)
Definition: rna_scene.c:5806
static void rna_def_view_layers(BlenderRNA *brna, PropertyRNA *cprop)
Definition: rna_scene.c:5163
const EnumPropertyItem rna_enum_shading_type_items[]
Definition: rna_space.c:385
void SEQ_sound_update_length(Main *bmain, Scene *scene)
static const EnumPropertyItem scale_fit_methods[]
#define min(a, b)
Definition: sort.c:51
short selectmode
Definition: BKE_editmesh.h:72
struct ImageFormatData im_format
struct Object * object
union CollectionPropertyIterator::@1099 internal
ListBaseIterator listbase
Definition: RNA_types.h:394
const char * identifier
Definition: RNA_types.h:446
const char * name
Definition: RNA_types.h:450
const char * description
Definition: RNA_types.h:452
struct FreestyleLineStyle * linestyle
Definition: DNA_ID.h:273
int tag
Definition: DNA_ID.h:292
char name[66]
Definition: DNA_ID.h:283
struct KeyingSet * next
void * last
Definition: DNA_listBase.h:47
void * first
Definition: DNA_listBase.h:47
Definition: BKE_main.h:116
ListBase wm
Definition: BKE_main.h:175
ListBase objects
Definition: BKE_main.h:148
struct BMEditMesh * edit_mesh
struct ModifierData * next
ListBase particlesystem
struct Collection * instance_collection
ListBase modifiers
void * data
struct ParticleSystem * next
struct StructRNA * type
Definition: RNA_types.h:51
void * data
Definition: RNA_types.h:52
struct ID * owner_id
Definition: RNA_types.h:50
struct BakeData bake
char engine[32]
struct ImageFormatData im_format
ListBase views
struct FFMpegCodecData ffcodecdata
short views_format
void(* update_render_passes)(struct RenderEngine *engine, struct Scene *scene, struct ViewLayer *view_layer)
Definition: RE_engine.h:107
struct bNodeTree * nodetree
int active_keyingset
short flag
ListBase keyingsets
struct RenderData r
TransformOrientationSlot orientation_slots[4]
struct UnitSettings unit
struct Object * camera
char use_nodes
ListBase markers
ListBase transform_spaces
struct Scene * set
struct AudioData audio
char name[64]
unsigned int flag
char gpencil_selectmode_vertex
char gpencil_selectmode_edit
char gpencil_selectmode_sculpt
float rotation_axis[3]
float rotation_quaternion[4]
float rotation_euler[3]
ViewLayerAOV * active_aov
struct Base * basact
ListBase aovs
char name[64]
void * storage
struct bNodeSocket * next
ListBase nodes
float max
uint len
void WM_main_add_notifier(unsigned int type, void *reference)
PointerRNA * ptr
Definition: wm_files.c:3157
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)
Definition: wm_window.c:2286
void WM_windows_scene_data_sync(const ListBase *win_lb, Scene *scene)
Definition: wm_window.c:2208