Blender  V3.3
rna_space.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #include <stdlib.h>
8 #include <string.h>
9 
10 #include "MEM_guardedalloc.h"
11 
12 #include "BLT_translation.h"
13 
14 #include "BKE_attribute.h"
15 #include "BKE_context.h"
16 #include "BKE_geometry_set.h"
17 #include "BKE_image.h"
18 #include "BKE_key.h"
19 #include "BKE_movieclip.h"
20 #include "BKE_node.h"
21 #include "BKE_studiolight.h"
22 
23 #include "ED_asset.h"
24 #include "ED_spreadsheet.h"
25 #include "ED_text.h"
26 
27 #include "BLI_listbase.h"
28 #include "BLI_math.h"
29 #include "BLI_string.h"
30 #include "BLI_sys_types.h"
31 #include "BLI_uuid.h"
32 
33 #include "DNA_action_types.h"
34 #include "DNA_gpencil_types.h"
35 #include "DNA_key_types.h"
36 #include "DNA_mask_types.h"
37 #include "DNA_material_types.h"
38 #include "DNA_node_types.h"
39 #include "DNA_object_types.h"
40 #include "DNA_sequence_types.h"
41 #include "DNA_space_types.h"
42 #include "DNA_view3d_types.h"
43 #include "DNA_workspace_types.h"
44 
45 #include "RNA_access.h"
46 #include "RNA_define.h"
47 
48 #include "rna_internal.h"
49 
50 #include "SEQ_proxy.h"
51 #include "SEQ_relations.h"
52 #include "SEQ_sequencer.h"
53 
54 #include "WM_api.h"
55 #include "WM_types.h"
56 
57 #include "RE_engine.h"
58 #include "RE_pipeline.h"
59 
60 #include "RNA_enum_types.h"
61 
64  "MESH",
65  ICON_MESH_DATA,
66  "Mesh",
67  "Mesh component containing point, corner, edge and face data"},
69  "POINTCLOUD",
70  ICON_POINTCLOUD_DATA,
71  "Point Cloud",
72  "Point cloud component containing only point data"},
74  "CURVE",
75  ICON_CURVE_DATA,
76  "Curve",
77  "Curve component containing spline and control point data"},
79  "INSTANCES",
80  ICON_EMPTY_AXIS,
81  "Instances",
82  "Instances of objects or collections"},
83  {0, NULL, 0, NULL, NULL},
84 };
85 
87  /* empty must be here for python, is skipped for UI */
88  {SPACE_EMPTY, "EMPTY", ICON_NONE, "Empty", ""},
89 
90  /* General. */
91  RNA_ENUM_ITEM_HEADING(N_("General"), NULL),
92  {SPACE_VIEW3D,
93  "VIEW_3D",
94  ICON_VIEW3D,
95  "3D Viewport",
96  "Manipulate objects in a 3D environment"},
97  {SPACE_IMAGE,
98  "IMAGE_EDITOR",
99  ICON_IMAGE,
100  "UV/Image Editor",
101  "View and edit images and UV Maps"},
102  {SPACE_NODE,
103  "NODE_EDITOR",
104  ICON_NODETREE,
105  "Node Editor",
106  "Editor for node-based shading and compositing tools"},
107  {SPACE_SEQ, "SEQUENCE_EDITOR", ICON_SEQUENCE, "Video Sequencer", "Video editing tools"},
108  {SPACE_CLIP, "CLIP_EDITOR", ICON_TRACKER, "Movie Clip Editor", "Motion tracking tools"},
109 
110  /* Animation. */
111  RNA_ENUM_ITEM_HEADING(N_("Animation"), NULL),
112 #if 0
113  {SPACE_ACTION,
114  "TIMELINE",
115  ICON_TIME,
116  "Timeline",
117  "Timeline and playback controls (NOTE: Switch to 'Timeline' mode)"}, /* XXX */
118 #endif
119  {SPACE_ACTION, "DOPESHEET_EDITOR", ICON_ACTION, "Dope Sheet", "Adjust timing of keyframes"},
120  {SPACE_GRAPH,
121  "GRAPH_EDITOR",
122  ICON_GRAPH,
123  "Graph Editor",
124  "Edit drivers and keyframe interpolation"},
125  {SPACE_NLA, "NLA_EDITOR", ICON_NLA, "Nonlinear Animation", "Combine and layer Actions"},
126 
127  /* Scripting. */
128  RNA_ENUM_ITEM_HEADING(N_("Scripting"), NULL),
129  {SPACE_TEXT,
130  "TEXT_EDITOR",
131  ICON_TEXT,
132  "Text Editor",
133  "Edit scripts and in-file documentation"},
134  {SPACE_CONSOLE,
135  "CONSOLE",
136  ICON_CONSOLE,
137  "Python Console",
138  "Interactive programmatic console for "
139  "advanced editing and script development"},
140  {SPACE_INFO, "INFO", ICON_INFO, "Info", "Log of operations, warnings and error messages"},
141  /* Special case: Top-bar and Status-bar aren't supposed to be a regular editor for the user. */
142  {SPACE_TOPBAR,
143  "TOPBAR",
144  ICON_NONE,
145  "Top Bar",
146  "Global bar at the top of the screen for "
147  "global per-window settings"},
149  "STATUSBAR",
150  ICON_NONE,
151  "Status Bar",
152  "Global bar at the bottom of the "
153  "screen for general status information"},
154 
155  /* Data. */
156  RNA_ENUM_ITEM_HEADING(N_("Data"), NULL),
158  "OUTLINER",
159  ICON_OUTLINER,
160  "Outliner",
161  "Overview of scene graph and all available data-blocks"},
163  "PROPERTIES",
164  ICON_PROPERTIES,
165  "Properties",
166  "Edit properties of active object and related data-blocks"},
167  {SPACE_FILE, "FILE_BROWSER", ICON_FILEBROWSER, "File Browser", "Browse for files and assets"},
169  "SPREADSHEET",
170  ICON_SPREADSHEET,
171  "Spreadsheet",
172  "Explore geometry data in a table"},
174  "PREFERENCES",
175  ICON_PREFERENCES,
176  "Preferences",
177  "Edit persistent configuration settings"},
178  {0, NULL, 0, NULL, NULL},
179 };
180 
183  "FCURVES",
184  ICON_GRAPH,
185  "Graph Editor",
186  "Edit animation/keyframes displayed as 2D curves"},
187  {SIPO_MODE_DRIVERS, "DRIVERS", ICON_DRIVER, "Drivers", "Edit drivers"},
188  {0, NULL, 0, NULL, NULL},
189 };
190 
192  {SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""},
193  {SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Preview", ""},
195  "SEQUENCER_PREVIEW",
196  ICON_SEQ_SPLITVIEW,
197  "Sequencer & Preview",
198  ""},
199  {0, NULL, 0, NULL, NULL},
200 };
201 
203  {FILE_BROWSE_MODE_FILES, "FILES", ICON_FILEBROWSER, "File Browser", ""},
204  {FILE_BROWSE_MODE_ASSETS, "ASSETS", ICON_ASSET_MANAGER, "Asset Browser", ""},
205  {0, NULL, 0, NULL, NULL},
206 };
207 
208 #define SACT_ITEM_DOPESHEET \
209  { \
210  SACTCONT_DOPESHEET, "DOPESHEET", ICON_ACTION, "Dope Sheet", "Edit all keyframes in scene" \
211  }
212 #define SACT_ITEM_TIMELINE \
213  { \
214  SACTCONT_TIMELINE, "TIMELINE", ICON_TIME, "Timeline", "Timeline and playback controls" \
215  }
216 #define SACT_ITEM_ACTION \
217  { \
218  SACTCONT_ACTION, "ACTION", ICON_OBJECT_DATA, "Action Editor", \
219  "Edit keyframes in active object's Object-level action" \
220  }
221 #define SACT_ITEM_SHAPEKEY \
222  { \
223  SACTCONT_SHAPEKEY, "SHAPEKEY", ICON_SHAPEKEY_DATA, "Shape Key Editor", \
224  "Edit keyframes in active object's Shape Keys action" \
225  }
226 #define SACT_ITEM_GPENCIL \
227  { \
228  SACTCONT_GPENCIL, "GPENCIL", ICON_GREASEPENCIL, "Grease Pencil", \
229  "Edit timings for all Grease Pencil sketches in file" \
230  }
231 #define SACT_ITEM_MASK \
232  { \
233  SACTCONT_MASK, "MASK", ICON_MOD_MASK, "Mask", "Edit timings for Mask Editor splines" \
234  }
235 #define SACT_ITEM_CACHEFILE \
236  { \
237  SACTCONT_CACHEFILE, "CACHEFILE", ICON_FILE, "Cache File", \
238  "Edit timings for Cache File data-blocks" \
239  }
240 
241 #ifndef RNA_RUNTIME
242 /* XXX: action-editor is currently for object-level only actions,
243  * so show that using object-icon hint */
252  {0, NULL, 0, NULL, NULL},
253 };
256  /* SACT_ITEM_TIMELINE, */
262  {0, NULL, 0, NULL, NULL},
263 };
264 #endif
265 /* expose as ui_mode */
269  {0, NULL, 0, NULL, NULL},
270 };
271 
272 #undef SACT_ITEM_DOPESHEET
273 #undef SACT_ITEM_TIMELINE
274 #undef SACT_ITEM_ACTION
275 #undef SACT_ITEM_SHAPEKEY
276 #undef SACT_ITEM_GPENCIL
277 #undef SACT_ITEM_MASK
278 #undef SACT_ITEM_CACHEFILE
279 
280 #define SI_ITEM_VIEW(identifier, name, icon) \
281  { \
282  SI_MODE_VIEW, identifier, icon, name, "View the image" \
283  }
284 #define SI_ITEM_UV \
285  { \
286  SI_MODE_UV, "UV", ICON_UV, "UV Editor", "UV edit in mesh editmode" \
287  }
288 #define SI_ITEM_PAINT \
289  { \
290  SI_MODE_PAINT, "PAINT", ICON_TPAINT_HLT, "Paint", "2D image painting mode" \
291  }
292 #define SI_ITEM_MASK \
293  { \
294  SI_MODE_MASK, "MASK", ICON_MOD_MASK, "Mask", "Mask editing" \
295  }
296 
298  SI_ITEM_VIEW("VIEW", "View", ICON_FILE_IMAGE),
299  SI_ITEM_UV,
301  SI_ITEM_MASK,
302  {0, NULL, 0, NULL, NULL},
303 };
304 
306  SI_ITEM_VIEW("VIEW", "View", ICON_FILE_IMAGE),
308  SI_ITEM_MASK,
309  {0, NULL, 0, NULL, NULL},
310 };
311 
313  SI_ITEM_VIEW("IMAGE_EDITOR", "Image Editor", ICON_IMAGE),
314  SI_ITEM_UV,
315  {0, NULL, 0, NULL, NULL},
316 };
317 
318 #undef SI_ITEM_VIEW
319 #undef SI_ITEM_UV
320 #undef SI_ITEM_PAINT
321 #undef SI_ITEM_MASK
322 
323 #define V3D_S3D_CAMERA_LEFT {STEREO_LEFT_ID, "LEFT", ICON_RESTRICT_RENDER_OFF, "Left", ""},
324 #define V3D_S3D_CAMERA_RIGHT {STEREO_RIGHT_ID, "RIGHT", ICON_RESTRICT_RENDER_OFF, "Right", ""},
325 #define V3D_S3D_CAMERA_S3D {STEREO_3D_ID, "S3D", ICON_CAMERA_STEREO, "3D", ""},
326 #ifdef RNA_RUNTIME
327 # define V3D_S3D_CAMERA_VIEWS {STEREO_MONO_ID, "MONO", ICON_RESTRICT_RENDER_OFF, "Views", ""},
328 #endif
329 
332 };
333 
334 #ifdef RNA_RUNTIME
335 static const EnumPropertyItem multiview_camera_items[] = {
336  V3D_S3D_CAMERA_VIEWS V3D_S3D_CAMERA_S3D{0, NULL, 0, NULL, NULL},
337 };
338 #endif
339 
340 #undef V3D_S3D_CAMERA_LEFT
341 #undef V3D_S3D_CAMERA_RIGHT
342 #undef V3D_S3D_CAMERA_S3D
343 #undef V3D_S3D_CAMERA_VIEWS
344 
346  {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_NONE, "Name", "Sort the file list alphabetically"},
348  "FILE_SORT_EXTENSION",
349  ICON_NONE,
350  "Extension",
351  "Sort the file list by extension/type"},
353  "FILE_SORT_TIME",
354  ICON_NONE,
355  "Modified Date",
356  "Sort files by modification time"},
357  {FILE_SORT_SIZE, "FILE_SORT_SIZE", ICON_NONE, "Size", "Sort files by size"},
358  {0, NULL, 0, NULL, NULL},
359 };
360 
361 #ifndef RNA_RUNTIME
363  {STEREO_LEFT_ID, "LEFT_EYE", ICON_NONE, "Left Eye"},
364  {STEREO_RIGHT_ID, "RIGHT_EYE", ICON_NONE, "Right Eye"},
365  {0, NULL, 0, NULL, NULL},
366 };
367 #endif
368 
370  {SI_USE_ALPHA,
371  "COLOR_ALPHA",
372  ICON_IMAGE_RGB_ALPHA,
373  "Color and Alpha",
374  "Display image with RGB colors and alpha transparency"},
375  {0, "COLOR", ICON_IMAGE_RGB, "Color", "Display image with RGB colors"},
376  {SI_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, "Alpha", "Display alpha transparency channel"},
377  {SI_SHOW_ZBUF,
378  "Z_BUFFER",
379  ICON_IMAGE_ZDEPTH,
380  "Z-Buffer",
381  "Display Z-buffer associated with image (mapped from camera clip start to end)"},
382  {SI_SHOW_R, "RED", ICON_COLOR_RED, "Red", ""},
383  {SI_SHOW_G, "GREEN", ICON_COLOR_GREEN, "Green", ""},
384  {SI_SHOW_B, "BLUE", ICON_COLOR_BLUE, "Blue", ""},
385  {0, NULL, 0, NULL, NULL},
386 };
387 
388 #ifndef RNA_RUNTIME
390  {SACTSNAP_OFF, "NONE", 0, "No Auto-Snap", ""},
391  /* {-1, "", 0, "", ""}, */
392  {SACTSNAP_STEP, "STEP", 0, "Frame Step", "Snap to 1.0 frame intervals"},
393  {SACTSNAP_TSTEP, "TIME_STEP", 0, "Second Step", "Snap to 1.0 second intervals"},
394  /* {-1, "", 0, "", ""}, */
395  {SACTSNAP_FRAME, "FRAME", 0, "Nearest Frame", "Snap to actual frames (nla-action time)"},
396  {SACTSNAP_SECOND, "SECOND", 0, "Nearest Second", "Snap to actual seconds (nla-action time)"},
397  /* {-1, "", 0, "", ""}, */
398  {SACTSNAP_MARKER, "MARKER", 0, "Nearest Marker", "Snap to nearest marker"},
399  {0, NULL, 0, NULL, NULL},
400 };
401 #endif
402 
404  {OB_WIRE, "WIREFRAME", ICON_SHADING_WIRE, "Wireframe", "Display the object as wire edges"},
405  {OB_SOLID, "SOLID", ICON_SHADING_SOLID, "Solid", "Display in solid mode"},
406  {OB_MATERIAL,
407  "MATERIAL",
408  ICON_SHADING_TEXTURE,
409  "Material Preview",
410  "Display in Material Preview mode"},
411  {OB_RENDER, "RENDERED", ICON_SHADING_RENDERED, "Rendered", "Display render preview"},
412  {0, NULL, 0, NULL, NULL},
413 };
414 
416  {V3D_LIGHTING_STUDIO, "STUDIO", 0, "Studio", "Display using studio lighting"},
417  {V3D_LIGHTING_MATCAP, "MATCAP", 0, "MatCap", "Display using matcap material and lighting"},
418  {V3D_LIGHTING_FLAT, "FLAT", 0, "Flat", "Display using flat lighting"},
419  {0, NULL, 0, NULL, NULL},
420 };
421 
423  {V3D_SHADING_MATERIAL_COLOR, "MATERIAL", 0, "Material", "Show material color"},
424  {V3D_SHADING_SINGLE_COLOR, "SINGLE", 0, "Single", "Show scene in a single color"},
425  {V3D_SHADING_OBJECT_COLOR, "OBJECT", 0, "Object", "Show object color"},
426  {V3D_SHADING_RANDOM_COLOR, "RANDOM", 0, "Random", "Show random object color"},
427  {V3D_SHADING_VERTEX_COLOR, "VERTEX", 0, "Attribute", "Show active color attribute"},
428  {V3D_SHADING_TEXTURE_COLOR, "TEXTURE", 0, "Texture", "Show texture"},
429  {0, NULL, 0, NULL, NULL},
430 };
431 
433  {0, "DEFAULT", 0, "Default", ""},
434  {0, NULL, 0, NULL, NULL},
435 };
436 
438  RNA_ENUM_ITEM_HEADING(N_("General"), NULL),
439  {EEVEE_RENDER_PASS_COMBINED, "COMBINED", 0, "Combined", ""},
440  {EEVEE_RENDER_PASS_EMIT, "EMISSION", 0, "Emission", ""},
441  {EEVEE_RENDER_PASS_ENVIRONMENT, "ENVIRONMENT", 0, "Environment", ""},
442  {EEVEE_RENDER_PASS_AO, "AO", 0, "Ambient Occlusion", ""},
443  {EEVEE_RENDER_PASS_SHADOW, "SHADOW", 0, "Shadow", ""},
444 
445  RNA_ENUM_ITEM_HEADING(N_("Light"), NULL),
446  {EEVEE_RENDER_PASS_DIFFUSE_LIGHT, "DIFFUSE_LIGHT", 0, "Diffuse Light", ""},
447  {EEVEE_RENDER_PASS_DIFFUSE_COLOR, "DIFFUSE_COLOR", 0, "Diffuse Color", ""},
448  {EEVEE_RENDER_PASS_SPECULAR_LIGHT, "SPECULAR_LIGHT", 0, "Specular Light", ""},
449  {EEVEE_RENDER_PASS_SPECULAR_COLOR, "SPECULAR_COLOR", 0, "Specular Color", ""},
450  {EEVEE_RENDER_PASS_VOLUME_LIGHT, "VOLUME_LIGHT", 0, "Volume Light", ""},
451 
452  RNA_ENUM_ITEM_HEADING(N_("Effects"), NULL),
453  {EEVEE_RENDER_PASS_BLOOM, "BLOOM", 0, "Bloom", ""},
454 
455  RNA_ENUM_ITEM_HEADING(N_("Data"), NULL),
456  {EEVEE_RENDER_PASS_NORMAL, "NORMAL", 0, "Normal", ""},
457  {EEVEE_RENDER_PASS_MIST, "MIST", 0, "Mist", ""},
458 
459  RNA_ENUM_ITEM_HEADING(N_("Shader AOV"), NULL),
460  {EEVEE_RENDER_PASS_AOV, "AOV", 0, "AOV", ""},
461 
462  {0, NULL, 0, NULL, NULL},
463 };
464 
466  {SC_MODE_TRACKING, "TRACKING", ICON_ANIM_DATA, "Tracking", "Show tracking and solving tools"},
467  {SC_MODE_MASKEDIT, "MASK", ICON_MOD_MASK, "Mask", "Show mask editing tools"},
468  {0, NULL, 0, NULL, NULL},
469 };
470 
471 /* Actually populated dynamically through a function,
472  * but helps for context-less access (e.g. doc, i18n...). */
474  {BCONTEXT_TOOL, "TOOL", ICON_TOOL_SETTINGS, "Tool", "Active Tool and Workspace settings"},
475  {BCONTEXT_SCENE, "SCENE", ICON_SCENE_DATA, "Scene", "Scene Properties"},
476  {BCONTEXT_RENDER, "RENDER", ICON_SCENE, "Render", "Render Properties"},
477  {BCONTEXT_OUTPUT, "OUTPUT", ICON_OUTPUT, "Output", "Output Properties"},
478  {BCONTEXT_VIEW_LAYER, "VIEW_LAYER", ICON_RENDER_RESULT, "View Layer", "View Layer Properties"},
479  {BCONTEXT_WORLD, "WORLD", ICON_WORLD, "World", "World Properties"},
480  {BCONTEXT_COLLECTION, "COLLECTION", ICON_GROUP, "Collection", "Collection Properties"},
481  {BCONTEXT_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Object Properties"},
483  "CONSTRAINT",
484  ICON_CONSTRAINT,
485  "Constraints",
486  "Object Constraint Properties"},
487  {BCONTEXT_MODIFIER, "MODIFIER", ICON_MODIFIER, "Modifiers", "Modifier Properties"},
488  {BCONTEXT_DATA, "DATA", ICON_NONE, "Data", "Object Data Properties"},
489  {BCONTEXT_BONE, "BONE", ICON_BONE_DATA, "Bone", "Bone Properties"},
491  "BONE_CONSTRAINT",
492  ICON_CONSTRAINT_BONE,
493  "Bone Constraints",
494  "Bone Constraint Properties"},
495  {BCONTEXT_MATERIAL, "MATERIAL", ICON_MATERIAL, "Material", "Material Properties"},
496  {BCONTEXT_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture Properties"},
497  {BCONTEXT_PARTICLE, "PARTICLES", ICON_PARTICLES, "Particles", "Particle Properties"},
498  {BCONTEXT_PHYSICS, "PHYSICS", ICON_PHYSICS, "Physics", "Physics Properties"},
499  {BCONTEXT_SHADERFX, "SHADERFX", ICON_SHADERFX, "Effects", "Visual Effects Properties"},
500  {0, NULL, 0, NULL, NULL},
501 };
502 
504  {0, "NONE", 0, "None", "Only list current directory's content, with no recursion"},
505  {1, "BLEND", 0, "Blend File", "List .blend files' content"},
506  {2, "ALL_1", 0, "One Level", "List all sub-directories' content, one level of recursion"},
507  {3, "ALL_2", 0, "Two Levels", "List all sub-directories' content, two levels of recursion"},
508  {4,
509  "ALL_3",
510  0,
511  "Three Levels",
512  "List all sub-directories' content, three levels of recursion"},
513  {0, NULL, 0, NULL, NULL},
514 };
515 
517  {CURVE_HANDLE_NONE, "NONE", 0, "None", ""},
518  {CURVE_HANDLE_SELECTED, "SELECTED", 0, "Selected", ""},
519  {CURVE_HANDLE_ALL, "ALL", 0, "All", ""},
520  {0, NULL, 0, NULL, NULL},
521 };
522 
523 #ifdef RNA_RUNTIME
524 
525 # include "DNA_anim_types.h"
526 # include "DNA_asset_types.h"
527 # include "DNA_scene_types.h"
528 # include "DNA_screen_types.h"
529 # include "DNA_userdef_types.h"
530 
531 # include "BLI_path_util.h"
532 # include "BLI_string.h"
533 
534 # include "BKE_anim_data.h"
535 # include "BKE_brush.h"
536 # include "BKE_colortools.h"
537 # include "BKE_context.h"
538 # include "BKE_global.h"
539 # include "BKE_icons.h"
540 # include "BKE_idprop.h"
541 # include "BKE_layer.h"
542 # include "BKE_nla.h"
543 # include "BKE_paint.h"
544 # include "BKE_preferences.h"
545 # include "BKE_scene.h"
546 # include "BKE_screen.h"
547 # include "BKE_workspace.h"
548 
549 # include "DEG_depsgraph.h"
550 # include "DEG_depsgraph_build.h"
551 
552 # include "ED_anim_api.h"
553 # include "ED_asset.h"
554 # include "ED_buttons.h"
555 # include "ED_clip.h"
556 # include "ED_fileselect.h"
557 # include "ED_image.h"
558 # include "ED_node.h"
559 # include "ED_screen.h"
560 # include "ED_sequencer.h"
561 # include "ED_transform.h"
562 # include "ED_view3d.h"
563 
564 # include "GPU_material.h"
565 
566 # include "IMB_imbuf_types.h"
567 
568 # include "UI_interface.h"
569 # include "UI_view2d.h"
570 
571 static StructRNA *rna_Space_refine(struct PointerRNA *ptr)
572 {
573  SpaceLink *space = (SpaceLink *)ptr->data;
574 
575  switch ((eSpace_Type)space->spacetype) {
576  case SPACE_VIEW3D:
577  return &RNA_SpaceView3D;
578  case SPACE_GRAPH:
579  return &RNA_SpaceGraphEditor;
580  case SPACE_OUTLINER:
581  return &RNA_SpaceOutliner;
582  case SPACE_PROPERTIES:
583  return &RNA_SpaceProperties;
584  case SPACE_FILE:
585  return &RNA_SpaceFileBrowser;
586  case SPACE_IMAGE:
587  return &RNA_SpaceImageEditor;
588  case SPACE_INFO:
589  return &RNA_SpaceInfo;
590  case SPACE_SEQ:
591  return &RNA_SpaceSequenceEditor;
592  case SPACE_TEXT:
593  return &RNA_SpaceTextEditor;
594  case SPACE_ACTION:
595  return &RNA_SpaceDopeSheetEditor;
596  case SPACE_NLA:
597  return &RNA_SpaceNLA;
598  case SPACE_NODE:
599  return &RNA_SpaceNodeEditor;
600  case SPACE_CONSOLE:
601  return &RNA_SpaceConsole;
602  case SPACE_USERPREF:
603  return &RNA_SpacePreferences;
604  case SPACE_CLIP:
605  return &RNA_SpaceClipEditor;
606  case SPACE_SPREADSHEET:
607  return &RNA_SpaceSpreadsheet;
608 
609  /* Currently no type info. */
610  case SPACE_SCRIPT:
611  case SPACE_EMPTY:
612  case SPACE_TOPBAR:
613  case SPACE_STATUSBAR:
614  break;
615  }
616 
617  return &RNA_Space;
618 }
619 
620 static ScrArea *rna_area_from_space(PointerRNA *ptr)
621 {
622  bScreen *screen = (bScreen *)ptr->owner_id;
623  SpaceLink *link = (SpaceLink *)ptr->data;
624  return BKE_screen_find_area_from_space(screen, link);
625 }
626 
627 static void area_region_from_regiondata(bScreen *screen,
628  void *regiondata,
629  ScrArea **r_area,
630  ARegion **r_region)
631 {
632  ScrArea *area;
633  ARegion *region;
634 
635  *r_area = NULL;
636  *r_region = NULL;
637 
638  for (area = screen->areabase.first; area; area = area->next) {
639  for (region = area->regionbase.first; region; region = region->next) {
640  if (region->regiondata == regiondata) {
641  *r_area = area;
642  *r_region = region;
643  return;
644  }
645  }
646  }
647 }
648 
649 static void rna_area_region_from_regiondata(PointerRNA *ptr, ScrArea **r_area, ARegion **r_region)
650 {
651  bScreen *screen = (bScreen *)ptr->owner_id;
652  void *regiondata = ptr->data;
653 
654  area_region_from_regiondata(screen, regiondata, r_area, r_region);
655 }
656 
657 /* -------------------------------------------------------------------- */
661 static bool rna_Space_bool_from_region_flag_get_by_type(PointerRNA *ptr,
662  const int region_type,
663  const int region_flag)
664 {
665  ScrArea *area = rna_area_from_space(ptr);
666  ARegion *region = BKE_area_find_region_type(area, region_type);
667  if (region) {
668  return (region->flag & region_flag);
669  }
670  return false;
671 }
672 
673 static void rna_Space_bool_from_region_flag_set_by_type(PointerRNA *ptr,
674  const int region_type,
675  const int region_flag,
676  bool value)
677 {
678  ScrArea *area = rna_area_from_space(ptr);
679  ARegion *region = BKE_area_find_region_type(area, region_type);
680  if (region && (region->alignment != RGN_ALIGN_NONE)) {
681  SET_FLAG_FROM_TEST(region->flag, value, region_flag);
682  }
683  ED_region_tag_redraw(region);
684 }
685 
686 static void rna_Space_bool_from_region_flag_update_by_type(bContext *C,
687  PointerRNA *ptr,
688  const int region_type,
689  const int region_flag)
690 {
691  ScrArea *area = rna_area_from_space(ptr);
692  ARegion *region = BKE_area_find_region_type(area, region_type);
693  if (region) {
694  if (region_flag == RGN_FLAG_HIDDEN) {
695  /* Only support animation when the area is in the current context. */
696  if (region->overlap && (area == CTX_wm_area(C))) {
698  }
699  else {
701  }
702  }
703  else if (region_flag == RGN_FLAG_HIDDEN_BY_USER) {
704  if (!(region->flag & RGN_FLAG_HIDDEN_BY_USER) != !(region->flag & RGN_FLAG_HIDDEN)) {
705  ED_region_toggle_hidden(C, region);
706 
707  if ((region->flag & RGN_FLAG_HIDDEN_BY_USER) == 0) {
709  }
710  }
711  }
712  }
713 }
714 
717 /* -------------------------------------------------------------------- */
721 /* Header Region. */
722 static bool rna_Space_show_region_header_get(PointerRNA *ptr)
723 {
724  return !rna_Space_bool_from_region_flag_get_by_type(ptr, RGN_TYPE_HEADER, RGN_FLAG_HIDDEN);
725 }
726 static void rna_Space_show_region_header_set(PointerRNA *ptr, bool value)
727 {
728  rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_HEADER, RGN_FLAG_HIDDEN, !value);
729 
730  /* Special case, never show the tool properties when the header is invisible. */
731  bool value_for_tool_header = value;
732  if (value == true) {
733  ScrArea *area = rna_area_from_space(ptr);
735  if (region_tool_header != NULL) {
736  value_for_tool_header = !(region_tool_header->flag & RGN_FLAG_HIDDEN_BY_USER);
737  }
738  }
739  rna_Space_bool_from_region_flag_set_by_type(
740  ptr, RGN_TYPE_TOOL_HEADER, RGN_FLAG_HIDDEN, !value_for_tool_header);
741 }
742 static void rna_Space_show_region_header_update(bContext *C, PointerRNA *ptr)
743 {
744  rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_HEADER, RGN_FLAG_HIDDEN);
745 }
746 
747 /* Footer Region. */
748 static bool rna_Space_show_region_footer_get(PointerRNA *ptr)
749 {
750  return !rna_Space_bool_from_region_flag_get_by_type(ptr, RGN_TYPE_FOOTER, RGN_FLAG_HIDDEN);
751 }
752 static void rna_Space_show_region_footer_set(PointerRNA *ptr, bool value)
753 {
754  rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_FOOTER, RGN_FLAG_HIDDEN, !value);
755 }
756 static void rna_Space_show_region_footer_update(bContext *C, PointerRNA *ptr)
757 {
758  rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_FOOTER, RGN_FLAG_HIDDEN);
759 }
760 
761 /* Tool Header Region.
762  *
763  * This depends on the 'RGN_TYPE_TOOL_HEADER'
764  */
765 static bool rna_Space_show_region_tool_header_get(PointerRNA *ptr)
766 {
767  return !rna_Space_bool_from_region_flag_get_by_type(
769 }
770 static void rna_Space_show_region_tool_header_set(PointerRNA *ptr, bool value)
771 {
772  rna_Space_bool_from_region_flag_set_by_type(
774  rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_TOOL_HEADER, RGN_FLAG_HIDDEN, !value);
775 }
776 static void rna_Space_show_region_tool_header_update(bContext *C, PointerRNA *ptr)
777 {
778  rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_TOOL_HEADER, RGN_FLAG_HIDDEN);
779 }
780 
781 /* Tools Region. */
782 static bool rna_Space_show_region_toolbar_get(PointerRNA *ptr)
783 {
784  return !rna_Space_bool_from_region_flag_get_by_type(ptr, RGN_TYPE_TOOLS, RGN_FLAG_HIDDEN);
785 }
786 static void rna_Space_show_region_toolbar_set(PointerRNA *ptr, bool value)
787 {
788  rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_TOOLS, RGN_FLAG_HIDDEN, !value);
789 }
790 static void rna_Space_show_region_toolbar_update(bContext *C, PointerRNA *ptr)
791 {
792  rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_TOOLS, RGN_FLAG_HIDDEN);
793 }
794 
795 static bool rna_Space_show_region_tool_props_get(PointerRNA *ptr)
796 {
797  return !rna_Space_bool_from_region_flag_get_by_type(ptr, RGN_TYPE_TOOL_PROPS, RGN_FLAG_HIDDEN);
798 }
799 static void rna_Space_show_region_tool_props_set(PointerRNA *ptr, bool value)
800 {
801  rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_TOOL_PROPS, RGN_FLAG_HIDDEN, !value);
802 }
803 static void rna_Space_show_region_tool_props_update(bContext *C, PointerRNA *ptr)
804 {
805  rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_TOOL_PROPS, RGN_FLAG_HIDDEN);
806 }
807 
808 /* Channels Region. */
809 static bool rna_Space_show_region_channels_get(PointerRNA *ptr)
810 {
811  return !rna_Space_bool_from_region_flag_get_by_type(ptr, RGN_TYPE_CHANNELS, RGN_FLAG_HIDDEN);
812 }
813 static void rna_Space_show_region_channels_set(PointerRNA *ptr, bool value)
814 {
815  rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_CHANNELS, RGN_FLAG_HIDDEN, !value);
816 }
817 static void rna_Space_show_region_channels_update(bContext *C, PointerRNA *ptr)
818 {
819  rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_CHANNELS, RGN_FLAG_HIDDEN);
820 }
821 
822 /* UI Region */
823 static bool rna_Space_show_region_ui_get(PointerRNA *ptr)
824 {
825  return !rna_Space_bool_from_region_flag_get_by_type(ptr, RGN_TYPE_UI, RGN_FLAG_HIDDEN);
826 }
827 static void rna_Space_show_region_ui_set(PointerRNA *ptr, bool value)
828 {
829  rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_UI, RGN_FLAG_HIDDEN, !value);
830 }
831 static void rna_Space_show_region_ui_update(bContext *C, PointerRNA *ptr)
832 {
833  rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_UI, RGN_FLAG_HIDDEN);
834 }
835 
836 /* Redo (HUD) Region */
837 static bool rna_Space_show_region_hud_get(PointerRNA *ptr)
838 {
839  return !rna_Space_bool_from_region_flag_get_by_type(ptr, RGN_TYPE_HUD, RGN_FLAG_HIDDEN_BY_USER);
840 }
841 static void rna_Space_show_region_hud_set(PointerRNA *ptr, bool value)
842 {
843  rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_HUD, RGN_FLAG_HIDDEN_BY_USER, !value);
844 }
845 static void rna_Space_show_region_hud_update(bContext *C, PointerRNA *ptr)
846 {
847  rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_HUD, RGN_FLAG_HIDDEN_BY_USER);
848 }
849 
852 static bool rna_Space_view2d_sync_get(PointerRNA *ptr)
853 {
854  ScrArea *area;
855  ARegion *region;
856 
857  area = rna_area_from_space(ptr); /* can be NULL */
859  if (region) {
860  View2D *v2d = &region->v2d;
861  return (v2d->flag & V2D_VIEWSYNC_SCREEN_TIME) != 0;
862  }
863 
864  return false;
865 }
866 
867 static void rna_Space_view2d_sync_set(PointerRNA *ptr, bool value)
868 {
869  ScrArea *area;
870  ARegion *region;
871 
872  area = rna_area_from_space(ptr); /* can be NULL */
873  if ((area != NULL) && !UI_view2d_area_supports_sync(area)) {
875  RPT_ERROR,
876  "'show_locked_time' is not supported for the '%s' editor",
877  area->type->name);
878  return;
879  }
880 
882  if (region) {
883  View2D *v2d = &region->v2d;
884  if (value) {
886  }
887  else {
889  }
890  }
891 }
892 
893 static void rna_Space_view2d_sync_update(Main *UNUSED(bmain),
894  Scene *UNUSED(scene),
895  PointerRNA *ptr)
896 {
897  ScrArea *area;
898  ARegion *region;
899 
900  area = rna_area_from_space(ptr); /* can be NULL */
902 
903  if (region) {
904  bScreen *screen = (bScreen *)ptr->owner_id;
905  View2D *v2d = &region->v2d;
906 
907  UI_view2d_sync(screen, area, v2d, V2D_LOCK_SET);
908  }
909 }
910 
911 static void rna_GPencil_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
912 {
913  bool changed = false;
914  /* need set all caches as dirty to recalculate onion skinning */
915  for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) {
916  if (ob->type == OB_GPENCIL) {
917  bGPdata *gpd = (bGPdata *)ob->data;
919  changed = true;
920  }
921  }
922  if (changed) {
924  }
925 }
926 
927 /* Space 3D View */
928 static void rna_SpaceView3D_camera_update(Main *bmain, Scene *scene, PointerRNA *ptr)
929 {
930  View3D *v3d = (View3D *)(ptr->data);
931  if (v3d->scenelock && scene != NULL) {
932  wmWindowManager *wm = bmain->wm.first;
933 
934  scene->camera = v3d->camera;
936  }
937 }
938 
939 static void rna_SpaceView3D_use_local_camera_set(PointerRNA *ptr, bool value)
940 {
941  View3D *v3d = (View3D *)(ptr->data);
942  bScreen *screen = (bScreen *)ptr->owner_id;
943 
944  v3d->scenelock = !value;
945 
946  if (!value) {
947  Scene *scene = ED_screen_scene_find(screen, G_MAIN->wm.first);
948  /* NULL if the screen isn't in an active window (happens when setting from Python).
949  * This could be moved to the update function, in that case the scene won't relate to the
950  * screen so keep it working this way. */
951  if (scene != NULL) {
952  v3d->camera = scene->camera;
953  }
954  }
955 }
956 
957 static float rna_View3DOverlay_GridScaleUnit_get(PointerRNA *ptr)
958 {
959  View3D *v3d = (View3D *)(ptr->data);
960  bScreen *screen = (bScreen *)ptr->owner_id;
961  Scene *scene = ED_screen_scene_find(screen, G_MAIN->wm.first);
962  if (scene != NULL) {
963  return ED_view3d_grid_scale(scene, v3d, NULL);
964  }
965  else {
966  /* When accessed from non-active screen. */
967  return 1.0f;
968  }
969 }
970 
971 static PointerRNA rna_SpaceView3D_region_3d_get(PointerRNA *ptr)
972 {
973  View3D *v3d = (View3D *)(ptr->data);
974  ScrArea *area = rna_area_from_space(ptr);
975  void *regiondata = NULL;
976  if (area) {
977  ListBase *regionbase = (area->spacedata.first == v3d) ? &area->regionbase : &v3d->regionbase;
978  ARegion *region = regionbase->last; /* always last in list, weak. */
979  regiondata = region->regiondata;
980  }
981 
982  return rna_pointer_inherit_refine(ptr, &RNA_RegionView3D, regiondata);
983 }
984 
985 static void rna_SpaceView3D_region_quadviews_begin(CollectionPropertyIterator *iter,
986  PointerRNA *ptr)
987 {
988  View3D *v3d = (View3D *)(ptr->data);
989  ScrArea *area = rna_area_from_space(ptr);
990  int i = 3;
991 
992  ARegion *region =
993  ((area && area->spacedata.first == v3d) ? &area->regionbase : &v3d->regionbase)->last;
994  ListBase lb = {NULL, NULL};
995 
996  if (region && region->alignment == RGN_ALIGN_QSPLIT) {
997  while (i-- && region) {
998  region = region->prev;
999  }
1000 
1001  if (i < 0) {
1002  lb.first = region;
1003  }
1004  }
1005 
1006  rna_iterator_listbase_begin(iter, &lb, NULL);
1007 }
1008 
1009 static PointerRNA rna_SpaceView3D_region_quadviews_get(CollectionPropertyIterator *iter)
1010 {
1011  void *regiondata = ((ARegion *)rna_iterator_listbase_get(iter))->regiondata;
1012 
1013  return rna_pointer_inherit_refine(&iter->parent, &RNA_RegionView3D, regiondata);
1014 }
1015 
1016 static void rna_RegionView3D_quadview_update(Main *UNUSED(main),
1017  Scene *UNUSED(scene),
1018  PointerRNA *ptr)
1019 {
1020  ScrArea *area;
1021  ARegion *region;
1022 
1023  rna_area_region_from_regiondata(ptr, &area, &region);
1024  if (area && region && region->alignment == RGN_ALIGN_QSPLIT) {
1025  ED_view3d_quadview_update(area, region, false);
1026  }
1027 }
1028 
1029 /* same as above but call clip==true */
1030 static void rna_RegionView3D_quadview_clip_update(Main *UNUSED(main),
1031  Scene *UNUSED(scene),
1032  PointerRNA *ptr)
1033 {
1034  ScrArea *area;
1035  ARegion *region;
1036 
1037  rna_area_region_from_regiondata(ptr, &area, &region);
1038  if (area && region && region->alignment == RGN_ALIGN_QSPLIT) {
1039  ED_view3d_quadview_update(area, region, true);
1040  }
1041 }
1042 
1048 static void rna_RegionView3D_view_rotation_set_validate_view_axis(RegionView3D *rv3d)
1049 {
1050  /* Never rotate from a "User" view into an axis aligned view,
1051  * otherwise rotation could be aligned by accident - giving unexpected behavior. */
1052  if (!RV3D_VIEW_IS_AXIS(rv3d->view)) {
1053  return;
1054  }
1055  /* Keep this small as script authors wont expect the assigned value to change. */
1056  const float eps_quat = 1e-6f;
1058  rv3d->viewquat, eps_quat, &rv3d->view, &rv3d->view_axis_roll);
1059 }
1060 
1061 static void rna_RegionView3D_view_location_get(PointerRNA *ptr, float *values)
1062 {
1063  RegionView3D *rv3d = (RegionView3D *)(ptr->data);
1064  negate_v3_v3(values, rv3d->ofs);
1065 }
1066 
1067 static void rna_RegionView3D_view_location_set(PointerRNA *ptr, const float *values)
1068 {
1069  RegionView3D *rv3d = (RegionView3D *)(ptr->data);
1070  negate_v3_v3(rv3d->ofs, values);
1071 }
1072 
1073 static void rna_RegionView3D_view_rotation_get(PointerRNA *ptr, float *values)
1074 {
1075  RegionView3D *rv3d = (RegionView3D *)(ptr->data);
1076  invert_qt_qt(values, rv3d->viewquat);
1077 }
1078 
1079 static void rna_RegionView3D_view_rotation_set(PointerRNA *ptr, const float *values)
1080 {
1081  RegionView3D *rv3d = (RegionView3D *)(ptr->data);
1082  invert_qt_qt(rv3d->viewquat, values);
1083  rna_RegionView3D_view_rotation_set_validate_view_axis(rv3d);
1084 }
1085 
1086 static void rna_RegionView3D_view_matrix_set(PointerRNA *ptr, const float *values)
1087 {
1088  RegionView3D *rv3d = (RegionView3D *)(ptr->data);
1089  float mat[4][4];
1090  invert_m4_m4(mat, (float(*)[4])values);
1091  ED_view3d_from_m4(mat, rv3d->ofs, rv3d->viewquat, &rv3d->dist);
1092  rna_RegionView3D_view_rotation_set_validate_view_axis(rv3d);
1093 }
1094 
1095 static bool rna_RegionView3D_is_orthographic_side_view_get(PointerRNA *ptr)
1096 {
1097  /* NOTE: only checks axis alignment, not orthographic,
1098  * we may deprecate the current name to reflect this. */
1099  RegionView3D *rv3d = (RegionView3D *)(ptr->data);
1100  return RV3D_VIEW_IS_AXIS(rv3d->view);
1101 }
1102 
1103 static void rna_RegionView3D_is_orthographic_side_view_set(PointerRNA *ptr, int value)
1104 {
1105  RegionView3D *rv3d = (RegionView3D *)(ptr->data);
1106  const bool was_axis_view = RV3D_VIEW_IS_AXIS(rv3d->view);
1107  if (value) {
1108  /* Already axis aligned, nothing to do. */
1109  if (was_axis_view) {
1110  return;
1111  }
1112  /* Use a large value as we always want to set this to the closest axis. */
1113  const float eps_quat = FLT_MAX;
1115  rv3d->viewquat, eps_quat, &rv3d->view, &rv3d->view_axis_roll);
1116  }
1117  else {
1118  /* Only allow changing from axis-views to user view as camera view for e.g.
1119  * doesn't make sense to update. */
1120  if (!was_axis_view) {
1121  return;
1122  }
1123  rv3d->view = RV3D_VIEW_USER;
1124  }
1125 }
1126 
1127 static IDProperty **rna_View3DShading_idprops(PointerRNA *ptr)
1128 {
1129  View3DShading *shading = ptr->data;
1130  return &shading->prop;
1131 }
1132 
1133 static void rna_3DViewShading_type_update(Main *bmain, Scene *scene, PointerRNA *ptr)
1134 {
1135  ID *id = ptr->owner_id;
1136  if (GS(id->name) != ID_SCR) {
1137  return;
1138  }
1139 
1140  View3DShading *shading = ptr->data;
1141  if (shading->type == OB_MATERIAL ||
1143  /* When switching from workbench to render or material mode the geometry of any
1144  * active sculpt session needs to be recalculated. */
1145  for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) {
1146  if (ob->sculpt) {
1148  }
1149  }
1150  }
1151 
1152  /* Update Gpencil. */
1153  rna_GPencil_update(bmain, scene, ptr);
1154 
1155  bScreen *screen = (bScreen *)ptr->owner_id;
1156  LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
1157  LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
1158  if (sl->spacetype == SPACE_VIEW3D) {
1159  View3D *v3d = (View3D *)sl;
1160  if (&v3d->shading == shading) {
1161  ED_view3d_shade_update(bmain, v3d, area);
1162  return;
1163  }
1164  }
1165  }
1166  }
1167 }
1168 
1169 static Scene *rna_3DViewShading_scene(PointerRNA *ptr)
1170 {
1171  /* Get scene, depends if using 3D view or OpenGL render settings. */
1172  ID *id = ptr->owner_id;
1173  if (GS(id->name) == ID_SCE) {
1174  return (Scene *)id;
1175  }
1176  else {
1177  bScreen *screen = (bScreen *)ptr->owner_id;
1178  return WM_windows_scene_get_from_screen(G_MAIN->wm.first, screen);
1179  }
1180 }
1181 
1182 static ViewLayer *rna_3DViewShading_view_layer(PointerRNA *ptr)
1183 {
1184  /* Get scene, depends if using 3D view or OpenGL render settings. */
1185  ID *id = ptr->owner_id;
1186  if (GS(id->name) == ID_SCE) {
1187  return NULL;
1188  }
1189  else {
1190  bScreen *screen = (bScreen *)ptr->owner_id;
1191  return WM_windows_view_layer_get_from_screen(G_MAIN->wm.first, screen);
1192  }
1193 }
1194 
1195 static int rna_3DViewShading_type_get(PointerRNA *ptr)
1196 {
1197  /* Available shading types depend on render engine. */
1198  Scene *scene = rna_3DViewShading_scene(ptr);
1200  View3DShading *shading = (View3DShading *)ptr->data;
1201 
1203  return shading->type;
1204  }
1206  return (shading->type == OB_MATERIAL) ? OB_SOLID : shading->type;
1207  }
1208  else {
1209  if (shading->type == OB_RENDER && !(type && type->view_draw)) {
1210  return OB_MATERIAL;
1211  }
1212  else {
1213  return shading->type;
1214  }
1215  }
1216 }
1217 
1218 static void rna_3DViewShading_type_set(PointerRNA *ptr, int value)
1219 {
1220  View3DShading *shading = (View3DShading *)ptr->data;
1221  if (value != shading->type && value == OB_RENDER) {
1222  shading->prev_type = shading->type;
1223  }
1224  shading->type = value;
1225 }
1226 
1227 static const EnumPropertyItem *rna_3DViewShading_type_itemf(bContext *UNUSED(C),
1228  PointerRNA *ptr,
1229  PropertyRNA *UNUSED(prop),
1230  bool *r_free)
1231 {
1232  Scene *scene = rna_3DViewShading_scene(ptr);
1234 
1235  EnumPropertyItem *item = NULL;
1236  int totitem = 0;
1237 
1240 
1244  }
1247  }
1248  else {
1250  if (type && type->view_draw) {
1252  }
1253  }
1254 
1255  RNA_enum_item_end(&item, &totitem);
1256  *r_free = true;
1257 
1258  return item;
1259 }
1260 
1261 /* Shading.selected_studio_light */
1262 static PointerRNA rna_View3DShading_selected_studio_light_get(PointerRNA *ptr)
1263 {
1264  View3DShading *shading = (View3DShading *)ptr->data;
1265  StudioLight *sl;
1266  if (shading->type == OB_SOLID && shading->light == V3D_LIGHTING_MATCAP) {
1268  }
1269  else if (shading->type == OB_SOLID && shading->light == V3D_LIGHTING_STUDIO) {
1271  }
1272  else {
1273  /* OB_MATERIAL and OB_RENDER */
1275  }
1276  return rna_pointer_inherit_refine(ptr, &RNA_StudioLight, sl);
1277 }
1278 
1279 /* shading.light */
1280 static const EnumPropertyItem *rna_View3DShading_color_type_itemf(bContext *UNUSED(C),
1281  PointerRNA *ptr,
1282  PropertyRNA *UNUSED(prop),
1283  bool *r_free)
1284 {
1285  View3DShading *shading = (View3DShading *)ptr->data;
1286 
1287  int totitem = 0;
1288 
1289  if (shading->type == OB_WIRE) {
1290  EnumPropertyItem *item = NULL;
1297  RNA_enum_item_end(&item, &totitem);
1298  *r_free = true;
1299  return item;
1300  }
1301  else {
1302  /* Solid mode, or lookdev mode for workbench engine. */
1303  *r_free = false;
1305  }
1306 }
1307 
1308 static void rna_View3DShading_studio_light_get_storage(View3DShading *shading,
1309  char **dna_storage,
1310  int *flag)
1311 {
1312  *dna_storage = shading->studio_light;
1313 
1314  *flag = STUDIOLIGHT_TYPE_STUDIO;
1315  if (shading->type == OB_SOLID) {
1316  if (shading->light == V3D_LIGHTING_MATCAP) {
1317  *flag = STUDIOLIGHT_TYPE_MATCAP;
1318  *dna_storage = shading->matcap;
1319  }
1320  }
1321  else {
1322  *flag = STUDIOLIGHT_TYPE_WORLD;
1323  *dna_storage = shading->lookdev_light;
1324  }
1325 }
1326 
1327 static int rna_View3DShading_studio_light_get(PointerRNA *ptr)
1328 {
1329  View3DShading *shading = (View3DShading *)ptr->data;
1330  char *dna_storage;
1331  int flag;
1332 
1333  rna_View3DShading_studio_light_get_storage(shading, &dna_storage, &flag);
1334  StudioLight *sl = BKE_studiolight_find(dna_storage, flag);
1335  if (sl) {
1336  BLI_strncpy(dna_storage, sl->name, FILE_MAXFILE);
1337  return sl->index;
1338  }
1339  else {
1340  return 0;
1341  }
1342 }
1343 
1344 static void rna_View3DShading_studio_light_set(PointerRNA *ptr, int value)
1345 {
1346  View3DShading *shading = (View3DShading *)ptr->data;
1347  char *dna_storage;
1348  int flag;
1349 
1350  rna_View3DShading_studio_light_get_storage(shading, &dna_storage, &flag);
1351  StudioLight *sl = BKE_studiolight_findindex(value, flag);
1352  if (sl) {
1353  BLI_strncpy(dna_storage, sl->name, FILE_MAXFILE);
1354  }
1355 }
1356 
1357 static const EnumPropertyItem *rna_View3DShading_studio_light_itemf(bContext *UNUSED(C),
1358  PointerRNA *ptr,
1359  PropertyRNA *UNUSED(prop),
1360  bool *r_free)
1361 {
1362  View3DShading *shading = (View3DShading *)ptr->data;
1363  EnumPropertyItem *item = NULL;
1364  int totitem = 0;
1365 
1366  if (shading->type == OB_SOLID && shading->light == V3D_LIGHTING_MATCAP) {
1367  const int flags = (STUDIOLIGHT_EXTERNAL_FILE | STUDIOLIGHT_TYPE_MATCAP);
1368 
1370  int icon_id = (shading->flag & V3D_SHADING_MATCAP_FLIP_X) ? sl->icon_id_matcap_flipped :
1371  sl->icon_id_matcap;
1372  if ((sl->flag & flags) == flags) {
1373  EnumPropertyItem tmp = {sl->index, sl->name, icon_id, sl->name, ""};
1374  RNA_enum_item_add(&item, &totitem, &tmp);
1375  }
1376  }
1377  }
1378  else {
1380  int icon_id = sl->icon_id_irradiance;
1381  bool show_studiolight = false;
1382 
1383  if (sl->flag & STUDIOLIGHT_INTERNAL) {
1384  /* always show internal lights for solid */
1385  if (shading->type == OB_SOLID) {
1386  show_studiolight = true;
1387  }
1388  }
1389  else {
1390  switch (shading->type) {
1391  case OB_SOLID:
1392  case OB_TEXTURE:
1393  show_studiolight = ((sl->flag & STUDIOLIGHT_TYPE_STUDIO) != 0);
1394  break;
1395 
1396  case OB_MATERIAL:
1397  case OB_RENDER:
1398  show_studiolight = ((sl->flag & STUDIOLIGHT_TYPE_WORLD) != 0);
1399  icon_id = sl->icon_id_radiance;
1400  break;
1401  }
1402  }
1403 
1404  if (show_studiolight) {
1405  EnumPropertyItem tmp = {sl->index, sl->name, icon_id, sl->name, ""};
1406  RNA_enum_item_add(&item, &totitem, &tmp);
1407  }
1408  }
1409  }
1410 
1411  RNA_enum_item_end(&item, &totitem);
1412  *r_free = true;
1413  return item;
1414 }
1415 
1416 static const EnumPropertyItem *rna_3DViewShading_render_pass_itemf(bContext *C,
1417  PointerRNA *UNUSED(ptr),
1418  PropertyRNA *UNUSED(prop),
1419  bool *r_free)
1420 {
1422  ViewLayer *view_layer = CTX_data_view_layer(C);
1423 
1424  const bool bloom_enabled = scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED;
1425  const bool aov_available = BKE_view_layer_has_valid_aov(view_layer);
1426 
1427  int totitem = 0;
1429  EnumPropertyItem aov_template;
1430  for (int i = 0; rna_enum_view3dshading_render_pass_type_items[i].identifier != NULL; i++) {
1432  if (item->value == EEVEE_RENDER_PASS_AOV) {
1433  aov_template.value = item->value;
1434  aov_template.icon = 0;
1435  aov_template.description = item->description;
1436  LISTBASE_FOREACH (ViewLayerAOV *, aov, &view_layer->aovs) {
1437  if ((aov->flag & AOV_CONFLICT) != 0) {
1438  continue;
1439  }
1440  aov_template.name = aov->name;
1441  aov_template.identifier = aov->name;
1442  RNA_enum_item_add(&result, &totitem, &aov_template);
1443  aov_template.value++;
1444  }
1445  }
1446  else if (!((!bloom_enabled &&
1447  (item->value == EEVEE_RENDER_PASS_BLOOM || STREQ(item->name, "Effects"))) ||
1448  (!aov_available && STREQ(item->name, "Shader AOV")))) {
1449  RNA_enum_item_add(&result, &totitem, item);
1450  }
1451  }
1452 
1453  RNA_enum_item_end(&result, &totitem);
1454  *r_free = true;
1455  return result;
1456 }
1457 static int rna_3DViewShading_render_pass_get(PointerRNA *ptr)
1458 {
1459  View3DShading *shading = (View3DShading *)ptr->data;
1461  Scene *scene = rna_3DViewShading_scene(ptr);
1462  ViewLayer *view_layer = rna_3DViewShading_view_layer(ptr);
1463 
1466  }
1467  else if (result == EEVEE_RENDER_PASS_AOV) {
1468  if (!view_layer) {
1470  }
1471  const int aov_index = BLI_findstringindex(
1472  &view_layer->aovs, shading->aov_name, offsetof(ViewLayerAOV, name));
1473  if (aov_index == -1) {
1475  }
1476  return result + aov_index;
1477  }
1478 
1479  return result;
1480 }
1481 
1482 static void rna_3DViewShading_render_pass_set(PointerRNA *ptr, int value)
1483 {
1484  View3DShading *shading = (View3DShading *)ptr->data;
1485  Scene *scene = rna_3DViewShading_scene(ptr);
1486  ViewLayer *view_layer = rna_3DViewShading_view_layer(ptr);
1487  shading->aov_name[0] = 0;
1488 
1489  if ((value & EEVEE_RENDER_PASS_AOV) != 0) {
1490  if (!view_layer) {
1492  return;
1493  }
1494  const int aov_index = value & ~EEVEE_RENDER_PASS_AOV;
1495  ViewLayerAOV *aov = BLI_findlink(&view_layer->aovs, aov_index);
1496  if (!aov) {
1497  /* AOV not found, cannot select AOV. */
1499  return;
1500  }
1501 
1503  BLI_strncpy(shading->aov_name, aov->name, sizeof(aov->name));
1504  }
1505  else if (value == EEVEE_RENDER_PASS_BLOOM &&
1506  ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0)) {
1508  }
1509  else {
1510  shading->render_pass = value;
1511  }
1512 }
1513 
1514 static void rna_SpaceView3D_use_local_collections_update(bContext *C, PointerRNA *ptr)
1515 {
1516  Main *bmain = CTX_data_main(C);
1518  ViewLayer *view_layer = CTX_data_view_layer(C);
1519  View3D *v3d = (View3D *)ptr->data;
1520 
1521  if (ED_view3d_local_collections_set(bmain, v3d)) {
1522  BKE_layer_collection_local_sync(view_layer, v3d);
1524  }
1525 }
1526 
1527 static const EnumPropertyItem *rna_SpaceView3D_stereo3d_camera_itemf(bContext *C,
1528  PointerRNA *UNUSED(ptr),
1529  PropertyRNA *UNUSED(prop),
1530  bool *UNUSED(r_free))
1531 {
1533 
1535  return multiview_camera_items;
1536  }
1537  else {
1538  return stereo3d_camera_items;
1539  }
1540 }
1541 
1542 static void rna_SpaceView3D_mirror_xr_session_update(Main *main,
1543  Scene *UNUSED(scene),
1544  PointerRNA *ptr)
1545 {
1546 # ifdef WITH_XR_OPENXR
1547  const wmWindowManager *wm = main->wm.first;
1548 
1549  /* Handle mirror toggling while there is a session already. */
1550  if (WM_xr_session_exists(&wm->xr)) {
1551  const View3D *v3d = ptr->data;
1552  const ScrArea *area = rna_area_from_space(ptr);
1553  ED_view3d_xr_mirror_update(area, v3d, v3d->flag & V3D_XR_SESSION_MIRROR);
1554  }
1555 
1556 # else
1557  UNUSED_VARS(main, ptr);
1558 # endif
1559 }
1560 
1561 static int rna_SpaceView3D_icon_from_show_object_viewport_get(PointerRNA *ptr)
1562 {
1563  const View3D *v3d = (View3D *)ptr->data;
1566 }
1567 
1568 static char *rna_View3DShading_path(const PointerRNA *ptr)
1569 {
1570  if (GS(ptr->owner_id->name) == ID_SCE) {
1571  return BLI_strdup("display.shading");
1572  }
1573  return BLI_strdup("shading");
1574 }
1575 
1576 static PointerRNA rna_SpaceView3D_overlay_get(PointerRNA *ptr)
1577 {
1578  return rna_pointer_inherit_refine(ptr, &RNA_View3DOverlay, ptr->data);
1579 }
1580 
1581 static char *rna_View3DOverlay_path(const PointerRNA *UNUSED(ptr))
1582 {
1583  return BLI_strdup("overlay");
1584 }
1585 
1586 /* Space Image Editor */
1587 
1588 static PointerRNA rna_SpaceImage_overlay_get(PointerRNA *ptr)
1589 {
1590  return rna_pointer_inherit_refine(ptr, &RNA_SpaceImageOverlay, ptr->data);
1591 }
1592 
1593 static char *rna_SpaceImageOverlay_path(const PointerRNA *UNUSED(ptr))
1594 {
1595  return BLI_strdup("overlay");
1596 }
1597 
1598 static char *rna_SpaceUVEditor_path(const PointerRNA *UNUSED(ptr))
1599 {
1600  return BLI_strdup("uv_editor");
1601 }
1602 
1603 static PointerRNA rna_SpaceImageEditor_uvedit_get(PointerRNA *ptr)
1604 {
1605  return rna_pointer_inherit_refine(ptr, &RNA_SpaceUVEditor, ptr->data);
1606 }
1607 
1608 static void rna_SpaceImageEditor_mode_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr))
1609 {
1610  if (scene != NULL) {
1611  ED_space_image_paint_update(bmain, bmain->wm.first, scene);
1612  }
1613 }
1614 
1615 static void rna_SpaceImageEditor_show_stereo_set(PointerRNA *ptr, int value)
1616 {
1617  SpaceImage *sima = (SpaceImage *)(ptr->data);
1618 
1619  if (value) {
1620  sima->iuser.flag |= IMA_SHOW_STEREO;
1621  }
1622  else {
1623  sima->iuser.flag &= ~IMA_SHOW_STEREO;
1624  }
1625 }
1626 
1627 static bool rna_SpaceImageEditor_show_stereo_get(PointerRNA *ptr)
1628 {
1629  SpaceImage *sima = (SpaceImage *)(ptr->data);
1630  return (sima->iuser.flag & IMA_SHOW_STEREO) != 0;
1631 }
1632 
1633 static void rna_SpaceImageEditor_show_stereo_update(Main *UNUSED(bmain),
1634  Scene *UNUSED(unused),
1635  PointerRNA *ptr)
1636 {
1637  SpaceImage *sima = (SpaceImage *)(ptr->data);
1638  Image *ima = sima->image;
1639 
1640  if (ima) {
1641  if (ima->rr) {
1642  BKE_image_multilayer_index(ima->rr, &sima->iuser);
1643  }
1644  else {
1645  BKE_image_multiview_index(ima, &sima->iuser);
1646  }
1647  }
1648 }
1649 
1650 static bool rna_SpaceImageEditor_show_render_get(PointerRNA *ptr)
1651 {
1652  SpaceImage *sima = (SpaceImage *)(ptr->data);
1653  return ED_space_image_show_render(sima);
1654 }
1655 
1656 static bool rna_SpaceImageEditor_show_paint_get(PointerRNA *ptr)
1657 {
1658  SpaceImage *sima = (SpaceImage *)(ptr->data);
1659  return ED_space_image_show_paint(sima);
1660 }
1661 
1662 static bool rna_SpaceImageEditor_show_uvedit_get(PointerRNA *ptr)
1663 {
1664  SpaceImage *sima = ptr->data;
1665  bScreen *screen = (bScreen *)ptr->owner_id;
1666  Object *obedit = NULL;
1667  wmWindow *win = ED_screen_window_find(screen, G_MAIN->wm.first);
1668  if (win != NULL) {
1669  ViewLayer *view_layer = WM_window_get_active_view_layer(win);
1670  obedit = OBEDIT_FROM_VIEW_LAYER(view_layer);
1671  }
1672  return ED_space_image_show_uvedit(sima, obedit);
1673 }
1674 
1675 static bool rna_SpaceImageEditor_show_maskedit_get(PointerRNA *ptr)
1676 {
1677  SpaceImage *sima = (SpaceImage *)(ptr->data);
1678  bScreen *screen = (bScreen *)ptr->owner_id;
1679  Object *obedit = NULL;
1680  wmWindow *win = ED_screen_window_find(screen, G_MAIN->wm.first);
1681  if (win != NULL) {
1682  ViewLayer *view_layer = WM_window_get_active_view_layer(win);
1683  obedit = OBEDIT_FROM_VIEW_LAYER(view_layer);
1684  }
1685  return ED_space_image_check_show_maskedit(sima, obedit);
1686 }
1687 
1688 static void rna_SpaceImageEditor_image_set(PointerRNA *ptr,
1689  PointerRNA value,
1690  struct ReportList *UNUSED(reports))
1691 {
1693  SpaceImage *sima = ptr->data;
1694  ED_space_image_set(G_MAIN, sima, (Image *)value.data, false);
1695 }
1696 
1697 static void rna_SpaceImageEditor_mask_set(PointerRNA *ptr,
1698  PointerRNA value,
1699  struct ReportList *UNUSED(reports))
1700 {
1701  SpaceImage *sima = (SpaceImage *)(ptr->data);
1702 
1703  ED_space_image_set_mask(NULL, sima, (Mask *)value.data);
1704 }
1705 
1706 static const EnumPropertyItem *rna_SpaceImageEditor_display_channels_itemf(
1707  bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
1708 {
1709  SpaceImage *sima = (SpaceImage *)ptr->data;
1710  EnumPropertyItem *item = NULL;
1711  ImBuf *ibuf;
1712  void *lock;
1713  int totitem = 0;
1714 
1715  ibuf = ED_space_image_acquire_buffer(sima, &lock, 0);
1717  ED_space_image_release_buffer(sima, ibuf, lock);
1718 
1719  if (mask & SI_USE_ALPHA) {
1721  }
1722  RNA_enum_items_add_value(&item, &totitem, display_channels_items, 0);
1723  if (mask & SI_SHOW_ALPHA) {
1725  }
1726  if (mask & SI_SHOW_ZBUF) {
1728  }
1729  if (mask & SI_SHOW_R) {
1731  }
1732  if (mask & SI_SHOW_G) {
1734  }
1735  if (mask & SI_SHOW_B) {
1737  }
1738 
1739  RNA_enum_item_end(&item, &totitem);
1740  *r_free = true;
1741 
1742  return item;
1743 }
1744 
1745 static int rna_SpaceImageEditor_display_channels_get(PointerRNA *ptr)
1746 {
1747  SpaceImage *sima = (SpaceImage *)ptr->data;
1748  ImBuf *ibuf;
1749  void *lock;
1750 
1751  ibuf = ED_space_image_acquire_buffer(sima, &lock, 0);
1753  ED_space_image_release_buffer(sima, ibuf, lock);
1754 
1755  return sima->flag & mask;
1756 }
1757 
1758 static void rna_SpaceImageEditor_zoom_get(PointerRNA *ptr, float *values)
1759 {
1760  SpaceImage *sima = (SpaceImage *)ptr->data;
1761  ScrArea *area;
1762  ARegion *region;
1763 
1764  values[0] = values[1] = 1;
1765 
1766  /* Find #ARegion. */
1767  area = rna_area_from_space(ptr); /* can be NULL */
1769  if (region) {
1770  ED_space_image_get_zoom(sima, region, &values[0], &values[1]);
1771  }
1772 }
1773 
1774 static void rna_SpaceImageEditor_cursor_location_get(PointerRNA *ptr, float *values)
1775 {
1776  SpaceImage *sima = (SpaceImage *)ptr->data;
1777 
1778  if (sima->flag & SI_COORDFLOATS) {
1779  copy_v2_v2(values, sima->cursor);
1780  }
1781  else {
1782  int w, h;
1783  ED_space_image_get_size(sima, &w, &h);
1784 
1785  values[0] = sima->cursor[0] * w;
1786  values[1] = sima->cursor[1] * h;
1787  }
1788 }
1789 
1790 static void rna_SpaceImageEditor_cursor_location_set(PointerRNA *ptr, const float *values)
1791 {
1792  SpaceImage *sima = (SpaceImage *)ptr->data;
1793 
1794  if (sima->flag & SI_COORDFLOATS) {
1795  copy_v2_v2(sima->cursor, values);
1796  }
1797  else {
1798  int w, h;
1799  ED_space_image_get_size(sima, &w, &h);
1800 
1801  sima->cursor[0] = values[0] / w;
1802  sima->cursor[1] = values[1] / h;
1803  }
1804 }
1805 
1806 static void rna_SpaceImageEditor_image_update(Main *UNUSED(bmain),
1807  Scene *UNUSED(scene),
1808  PointerRNA *ptr)
1809 {
1810  SpaceImage *sima = (SpaceImage *)ptr->data;
1811  Image *ima = sima->image;
1812 
1813  /* make sure all the iuser settings are valid for the sima image */
1814  if (ima) {
1815  if (ima->rr) {
1816  if (BKE_image_multilayer_index(sima->image->rr, &sima->iuser) == NULL) {
1817  BKE_image_init_imageuser(sima->image, &sima->iuser);
1818  }
1819  }
1820  else {
1821  BKE_image_multiview_index(ima, &sima->iuser);
1822  }
1823  }
1824 }
1825 
1826 static void rna_SpaceImageEditor_scopes_update(struct bContext *C, struct PointerRNA *ptr)
1827 {
1828  SpaceImage *sima = (SpaceImage *)ptr->data;
1829  ImBuf *ibuf;
1830  void *lock;
1831 
1832  /* TODO(lukas): Support tiles in scopes? */
1833  ibuf = ED_space_image_acquire_buffer(sima, &lock, 0);
1834  if (ibuf) {
1835  ED_space_image_scopes_update(C, sima, ibuf, true);
1837  }
1838  ED_space_image_release_buffer(sima, ibuf, lock);
1839 }
1840 
1841 static const EnumPropertyItem *rna_SpaceImageEditor_pivot_itemf(bContext *UNUSED(C),
1842  PointerRNA *ptr,
1843  PropertyRNA *UNUSED(prop),
1844  bool *UNUSED(r_free))
1845 {
1846  static const EnumPropertyItem pivot_items[] = {
1847  {V3D_AROUND_CENTER_BOUNDS, "CENTER", ICON_PIVOT_BOUNDBOX, "Bounding Box Center", ""},
1848  {V3D_AROUND_CENTER_MEDIAN, "MEDIAN", ICON_PIVOT_MEDIAN, "Median Point", ""},
1849  {V3D_AROUND_CURSOR, "CURSOR", ICON_PIVOT_CURSOR, "2D Cursor", ""},
1851  "INDIVIDUAL_ORIGINS",
1852  ICON_PIVOT_INDIVIDUAL,
1853  "Individual Origins",
1854  "Pivot around each selected island's own median point"},
1855  {0, NULL, 0, NULL, NULL},
1856  };
1857 
1858  SpaceImage *sima = (SpaceImage *)ptr->data;
1859 
1860  if (sima->mode == SI_MODE_PAINT) {
1862  }
1863  else {
1864  return pivot_items;
1865  }
1866 }
1867 
1868 static void rna_SpaceUVEditor_tile_grid_shape_set(PointerRNA *ptr, const int *values)
1869 {
1870  SpaceImage *data = (SpaceImage *)(ptr->data);
1871 
1872  int clamp[2] = {10, 100};
1873  for (int i = 0; i < 2; i++) {
1874  data->tile_grid_shape[i] = CLAMPIS(values[i], 1, clamp[i]);
1875  }
1876 }
1877 
1878 /* Space Text Editor */
1879 
1880 static void rna_SpaceTextEditor_word_wrap_set(PointerRNA *ptr, bool value)
1881 {
1882  SpaceText *st = (SpaceText *)(ptr->data);
1883 
1884  st->wordwrap = value;
1885  st->left = 0;
1886 }
1887 
1888 static void rna_SpaceTextEditor_text_set(PointerRNA *ptr,
1889  PointerRNA value,
1890  struct ReportList *UNUSED(reports))
1891 {
1892  SpaceText *st = (SpaceText *)(ptr->data);
1893 
1894  st->text = value.data;
1895  if (st->text != NULL) {
1896  id_us_ensure_real((ID *)st->text);
1897  }
1898 
1899  ScrArea *area = rna_area_from_space(ptr);
1900  if (area) {
1902  if (region) {
1903  ED_text_scroll_to_cursor(st, region, true);
1904  }
1905  }
1906 }
1907 
1908 static bool rna_SpaceTextEditor_text_is_syntax_highlight_supported(struct SpaceText *space)
1909 {
1911 }
1912 
1913 static void rna_SpaceTextEditor_updateEdited(Main *UNUSED(bmain),
1914  Scene *UNUSED(scene),
1915  PointerRNA *ptr)
1916 {
1917  SpaceText *st = (SpaceText *)ptr->data;
1918 
1919  if (st->text) {
1921  }
1922 }
1923 
1924 /* Space Properties */
1925 
1926 /* NOTE: this function exists only to avoid id refcounting. */
1927 static void rna_SpaceProperties_pin_id_set(PointerRNA *ptr,
1928  PointerRNA value,
1929  struct ReportList *UNUSED(reports))
1930 {
1931  SpaceProperties *sbuts = (SpaceProperties *)(ptr->data);
1932  sbuts->pinid = value.data;
1933 }
1934 
1935 static StructRNA *rna_SpaceProperties_pin_id_typef(PointerRNA *ptr)
1936 {
1937  SpaceProperties *sbuts = (SpaceProperties *)(ptr->data);
1938 
1939  if (sbuts->pinid) {
1940  return ID_code_to_RNA_type(GS(sbuts->pinid->name));
1941  }
1942 
1943  return &RNA_ID;
1944 }
1945 
1946 static void rna_SpaceProperties_pin_id_update(Main *UNUSED(bmain),
1947  Scene *UNUSED(scene),
1948  PointerRNA *ptr)
1949 {
1950  SpaceProperties *sbuts = (SpaceProperties *)(ptr->data);
1951  ID *id = sbuts->pinid;
1952 
1953  if (id == NULL) {
1954  sbuts->flag &= ~SB_PIN_CONTEXT;
1955  return;
1956  }
1957 
1958  switch (GS(id->name)) {
1959  case ID_MA:
1961  break;
1962  case ID_TE:
1964  break;
1965  case ID_WO:
1967  break;
1968  case ID_LA:
1970  break;
1971  default:
1972  break;
1973  }
1974 }
1975 
1976 static void rna_SpaceProperties_context_set(PointerRNA *ptr, int value)
1977 {
1978  SpaceProperties *sbuts = (SpaceProperties *)(ptr->data);
1979 
1980  sbuts->mainb = value;
1981  sbuts->mainbuser = value;
1982 }
1983 
1984 static const EnumPropertyItem *rna_SpaceProperties_context_itemf(bContext *UNUSED(C),
1985  PointerRNA *ptr,
1986  PropertyRNA *UNUSED(prop),
1987  bool *r_free)
1988 {
1989  SpaceProperties *sbuts = (SpaceProperties *)(ptr->data);
1990  EnumPropertyItem *item = NULL;
1991 
1992  /* Although it would never reach this amount, a theoretical maximum number of tabs
1993  * is BCONTEXT_TOT * 2, with every tab displayed and a spacer in every other item. */
1994  short context_tabs_array[BCONTEXT_TOT * 2];
1995  int totitem = ED_buttons_tabs_list(sbuts, context_tabs_array);
1996  BLI_assert(totitem <= ARRAY_SIZE(context_tabs_array));
1997 
1998  int totitem_added = 0;
1999  for (int i = 0; i < totitem; i++) {
2000  if (context_tabs_array[i] == -1) {
2001  RNA_enum_item_add_separator(&item, &totitem_added);
2002  continue;
2003  }
2004 
2005  RNA_enum_items_add_value(&item, &totitem_added, buttons_context_items, context_tabs_array[i]);
2006 
2007  /* Add the object data icon dynamically for the data tab. */
2008  if (context_tabs_array[i] == BCONTEXT_DATA) {
2009  (item + totitem_added - 1)->icon = sbuts->dataicon;
2010  }
2011  }
2012 
2013  RNA_enum_item_end(&item, &totitem);
2014  *r_free = true;
2015 
2016  return item;
2017 }
2018 
2019 static void rna_SpaceProperties_context_update(Main *UNUSED(bmain),
2020  Scene *UNUSED(scene),
2021  PointerRNA *ptr)
2022 {
2023  SpaceProperties *sbuts = (SpaceProperties *)(ptr->data);
2024  /* XXX BCONTEXT_DATA is ugly, but required for lights... See T51318. */
2026  sbuts->preview = 1;
2027  }
2028 }
2029 
2030 static int rna_SpaceProperties_tab_search_results_getlength(const PointerRNA *ptr,
2032 {
2033  SpaceProperties *sbuts = ptr->data;
2034 
2035  short context_tabs_array[BCONTEXT_TOT * 2]; /* Dummy variable. */
2036  const int tabs_len = ED_buttons_tabs_list(sbuts, context_tabs_array);
2037 
2038  length[0] = tabs_len;
2039 
2040  return length[0];
2041 }
2042 
2043 static void rna_SpaceProperties_tab_search_results_get(PointerRNA *ptr, bool *values)
2044 {
2045  SpaceProperties *sbuts = ptr->data;
2046 
2047  short context_tabs_array[BCONTEXT_TOT * 2]; /* Dummy variable. */
2048  const int tabs_len = ED_buttons_tabs_list(sbuts, context_tabs_array);
2049 
2050  for (int i = 0; i < tabs_len; i++) {
2051  values[i] = ED_buttons_tab_has_search_result(sbuts, i);
2052  }
2053 }
2054 
2055 static void rna_SpaceProperties_search_filter_get(PointerRNA *ptr, char *value)
2056 {
2057  SpaceProperties *sbuts = ptr->data;
2058  const char *search_filter = ED_buttons_search_string_get(sbuts);
2059 
2060  strcpy(value, search_filter);
2061 }
2062 
2063 static int rna_SpaceProperties_search_filter_length(PointerRNA *ptr)
2064 {
2065  SpaceProperties *sbuts = ptr->data;
2066 
2067  return ED_buttons_search_string_length(sbuts);
2068 }
2069 
2070 static void rna_SpaceProperties_search_filter_set(struct PointerRNA *ptr, const char *value)
2071 {
2072  SpaceProperties *sbuts = ptr->data;
2073 
2074  ED_buttons_search_string_set(sbuts, value);
2075 }
2076 
2077 static void rna_SpaceProperties_search_filter_update(Main *UNUSED(bmain),
2078  Scene *UNUSED(scene),
2079  PointerRNA *ptr)
2080 {
2081  ScrArea *area = rna_area_from_space(ptr);
2082 
2083  /* Update the search filter flag for the main region with the panels. */
2085  BLI_assert(main_region != NULL);
2086  ED_region_search_filter_update(area, main_region);
2087 }
2088 
2089 /* Space Console */
2090 static void rna_ConsoleLine_body_get(PointerRNA *ptr, char *value)
2091 {
2092  ConsoleLine *ci = (ConsoleLine *)ptr->data;
2093  memcpy(value, ci->line, ci->len + 1);
2094 }
2095 
2096 static int rna_ConsoleLine_body_length(PointerRNA *ptr)
2097 {
2098  ConsoleLine *ci = (ConsoleLine *)ptr->data;
2099  return ci->len;
2100 }
2101 
2102 static void rna_ConsoleLine_body_set(PointerRNA *ptr, const char *value)
2103 {
2104  ConsoleLine *ci = (ConsoleLine *)ptr->data;
2105  int len = strlen(value);
2106 
2107  if ((len >= ci->len_alloc) || (len * 2 < ci->len_alloc)) { /* allocate a new string */
2108  MEM_freeN(ci->line);
2109  ci->line = MEM_mallocN((len + 1) * sizeof(char), "rna_consoleline");
2110  ci->len_alloc = len + 1;
2111  }
2112  memcpy(ci->line, value, len + 1);
2113  ci->len = len;
2114 
2115  if (ci->cursor > len) {
2116  /* clamp the cursor */
2117  ci->cursor = len;
2118  }
2119 }
2120 
2121 static void rna_ConsoleLine_cursor_index_range(
2122  PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax))
2123 {
2124  ConsoleLine *ci = (ConsoleLine *)ptr->data;
2125 
2126  *min = 0;
2127  *max = ci->len; /* intentionally _not_ -1 */
2128 }
2129 
2130 /* Space Dopesheet */
2131 
2132 static void rna_SpaceDopeSheetEditor_action_set(PointerRNA *ptr,
2133  PointerRNA value,
2134  struct ReportList *UNUSED(reports))
2135 {
2136  SpaceAction *saction = (SpaceAction *)(ptr->data);
2137  bAction *act = (bAction *)value.data;
2138 
2139  if ((act == NULL) || (act->idroot == 0)) {
2140  /* just set if we're clearing the action or if the action is "amorphous" still */
2141  saction->action = act;
2142  }
2143  else {
2144  /* action to set must strictly meet the mode criteria... */
2145  if (saction->mode == SACTCONT_ACTION) {
2146  /* currently, this is "object-level" only, until we have some way of specifying this */
2147  if (act->idroot == ID_OB) {
2148  saction->action = act;
2149  }
2150  else {
2151  printf(
2152  "ERROR: cannot assign Action '%s' to Action Editor, as action is not object-level "
2153  "animation\n",
2154  act->id.name + 2);
2155  }
2156  }
2157  else if (saction->mode == SACTCONT_SHAPEKEY) {
2158  /* as the name says, "shapekey-level" only... */
2159  if (act->idroot == ID_KE) {
2160  saction->action = act;
2161  }
2162  else {
2163  printf(
2164  "ERROR: cannot assign Action '%s' to Shape Key Editor, as action doesn't animate "
2165  "Shape Keys\n",
2166  act->id.name + 2);
2167  }
2168  }
2169  else {
2170  printf(
2171  "ACK: who's trying to set an action while not in a mode displaying a single Action "
2172  "only?\n");
2173  }
2174  }
2175 }
2176 
2177 static void rna_SpaceDopeSheetEditor_action_update(bContext *C, PointerRNA *ptr)
2178 {
2179  SpaceAction *saction = (SpaceAction *)(ptr->data);
2180  ViewLayer *view_layer = CTX_data_view_layer(C);
2181  Main *bmain = CTX_data_main(C);
2182 
2183  Object *obact = OBACT(view_layer);
2184  if (obact == NULL) {
2185  return;
2186  }
2187 
2188  AnimData *adt = NULL;
2189  ID *id = NULL;
2190  switch (saction->mode) {
2191  case SACTCONT_ACTION:
2192  /* TODO: context selector could help decide this with more control? */
2193  adt = BKE_animdata_ensure_id(&obact->id);
2194  id = &obact->id;
2195  break;
2196  case SACTCONT_SHAPEKEY: {
2197  Key *key = BKE_key_from_object(obact);
2198  if (key == NULL) {
2199  return;
2200  }
2201  adt = BKE_animdata_ensure_id(&key->id);
2202  id = &key->id;
2203  break;
2204  }
2205  case SACTCONT_GPENCIL:
2206  case SACTCONT_DOPESHEET:
2207  case SACTCONT_MASK:
2208  case SACTCONT_CACHEFILE:
2209  case SACTCONT_TIMELINE:
2210  return;
2211  }
2212 
2213  if (adt == NULL) {
2214  /* No animdata was added, so the depsgraph also doesn't need tagging. */
2215  return;
2216  }
2217 
2218  /* Don't do anything if old and new actions are the same... */
2219  if (adt->action == saction->action) {
2220  return;
2221  }
2222 
2223  /* Exit editmode first - we cannot change actions while in tweak-mode. */
2225 
2226  /* To prevent data loss (i.e. if users flip between actions using the Browse menu),
2227  * stash this action if nothing else uses it.
2228  *
2229  * EXCEPTION:
2230  * This callback runs when unlinking actions. In that case, we don't want to
2231  * stash the action, as the user is signaling that they want to detach it.
2232  * This can be reviewed again later,
2233  * but it could get annoying if we keep these instead.
2234  */
2235  if (adt->action != NULL && adt->action->id.us <= 0 && saction->action != NULL) {
2236  /* XXX: Things here get dodgy if this action is only partially completed,
2237  * and the user then uses the browse menu to get back to this action,
2238  * assigning it as the active action (i.e. the stash strip gets out of sync)
2239  */
2241  }
2242 
2243  BKE_animdata_set_action(NULL, id, saction->action);
2244 
2246 
2247  /* Update relations as well, so new time source dependency is added. */
2248  DEG_relations_tag_update(bmain);
2249 }
2250 
2251 static void rna_SpaceDopeSheetEditor_mode_update(bContext *C, PointerRNA *ptr)
2252 {
2253  SpaceAction *saction = (SpaceAction *)(ptr->data);
2254  ScrArea *area = CTX_wm_area(C);
2255  ViewLayer *view_layer = CTX_data_view_layer(C);
2256  Object *obact = OBACT(view_layer);
2257 
2258  /* special exceptions for ShapeKey Editor mode */
2259  if (saction->mode == SACTCONT_SHAPEKEY) {
2260  Key *key = BKE_key_from_object(obact);
2261 
2262  /* 1) update the action stored for the editor */
2263  if (key) {
2264  saction->action = (key->adt) ? key->adt->action : NULL;
2265  }
2266  else {
2267  saction->action = NULL;
2268  }
2269  }
2270  /* make sure action stored is valid */
2271  else if (saction->mode == SACTCONT_ACTION) {
2272  /* 1) update the action stored for the editor */
2273  /* TODO: context selector could help decide this with more control? */
2274  if (obact) {
2275  saction->action = (obact->adt) ? obact->adt->action : NULL;
2276  }
2277  else {
2278  saction->action = NULL;
2279  }
2280  }
2281 
2282  /* Collapse (and show) summary channel and hide channel list for timeline */
2283  if (saction->mode == SACTCONT_TIMELINE) {
2284  saction->ads.flag |= ADS_FLAG_SUMMARY_COLLAPSED;
2285  saction->ads.filterflag |= ADS_FILTER_SUMMARY;
2286  }
2287 
2288  if (area && area->spacedata.first == saction) {
2290  if (channels_region) {
2291  if (saction->mode == SACTCONT_TIMELINE) {
2292  channels_region->flag |= RGN_FLAG_HIDDEN;
2293  }
2294  else {
2295  channels_region->flag &= ~RGN_FLAG_HIDDEN;
2296  }
2297  ED_region_visibility_change_update(C, area, channels_region);
2298  }
2299  }
2300 
2301  /* recalculate extents of channel list */
2303 
2304  /* store current mode as "old mode",
2305  * so that returning from other editors doesn't always reset to "Action Editor" */
2306  if (saction->mode != SACTCONT_TIMELINE) {
2307  saction->mode_prev = saction->mode;
2308  }
2309 }
2310 
2311 /* Space Graph Editor */
2312 
2313 static void rna_SpaceGraphEditor_display_mode_update(bContext *C, PointerRNA *ptr)
2314 {
2315  ScrArea *area = rna_area_from_space(ptr);
2316  SpaceGraph *sipo = (SpaceGraph *)ptr->data;
2317 
2318  /* for "Drivers" mode, enable all the necessary bits and pieces */
2319  if (sipo->mode == SIPO_MODE_DRIVERS) {
2322  }
2323 
2324  /* after changing view mode, must force recalculation of F-Curve colors
2325  * which can only be achieved using refresh as opposed to redraw
2326  */
2328 }
2329 
2330 static bool rna_SpaceGraphEditor_has_ghost_curves_get(PointerRNA *ptr)
2331 {
2332  SpaceGraph *sipo = (SpaceGraph *)(ptr->data);
2333  return (BLI_listbase_is_empty(&sipo->runtime.ghost_curves) == false);
2334 }
2335 
2336 static void rna_SpaceConsole_rect_update(Main *UNUSED(bmain),
2337  Scene *UNUSED(scene),
2338  PointerRNA *ptr)
2339 {
2340  SpaceConsole *sc = ptr->data;
2342 }
2343 
2344 static void rna_SequenceEditor_update_cache(Main *UNUSED(bmain),
2345  Scene *scene,
2346  PointerRNA *UNUSED(ptr))
2347 {
2349 }
2350 
2351 static void seq_build_proxy(bContext *C, PointerRNA *ptr)
2352 {
2353  if (U.sequencer_proxy_setup != USER_SEQ_PROXY_SETUP_AUTOMATIC) {
2354  return;
2355  }
2356 
2357  SpaceSeq *sseq = ptr->data;
2360 
2361  GSet *file_list = BLI_gset_new(BLI_ghashutil_strhash_p, BLI_ghashutil_strcmp, "file list");
2362  wmJob *wm_job = ED_seq_proxy_wm_job_get(C);
2363  ProxyJob *pj = ED_seq_proxy_job_get(C, wm_job);
2364 
2365  LISTBASE_FOREACH (Sequence *, seq, seqbase) {
2366  if (seq->type != SEQ_TYPE_MOVIE || seq->strip == NULL || seq->strip->proxy == NULL) {
2367  continue;
2368  }
2369 
2370  /* Add new proxy size. */
2371  seq->strip->proxy->build_size_flags |= SEQ_rendersize_to_proxysize(sseq->render_size);
2372 
2373  /* Build proxy. */
2375  pj->main, pj->depsgraph, pj->scene, seq, file_list, &pj->queue, true);
2376  }
2377 
2378  BLI_gset_free(file_list, MEM_freeN);
2379 
2380  if (!WM_jobs_is_running(wm_job)) {
2381  G.is_break = false;
2382  WM_jobs_start(CTX_wm_manager(C), wm_job);
2383  }
2384 
2386 }
2387 
2388 static void rna_SequenceEditor_render_size_update(bContext *C, PointerRNA *ptr)
2389 {
2390  seq_build_proxy(C, ptr);
2391  rna_SequenceEditor_update_cache(CTX_data_main(C), CTX_data_scene(C), ptr);
2392 }
2393 
2394 static bool rna_SequenceEditor_clamp_view_get(PointerRNA *ptr)
2395 {
2396  SpaceSeq *sseq = ptr->data;
2397  return (sseq->flag & SEQ_CLAMP_VIEW) != 0;
2398 }
2399 
2400 static void rna_SequenceEditor_clamp_view_set(PointerRNA *ptr, bool value)
2401 {
2402  SpaceSeq *sseq = ptr->data;
2403  ScrArea *area;
2404  ARegion *region;
2405 
2406  area = rna_area_from_space(ptr); /* can be NULL */
2407  if (area == NULL) {
2408  return;
2409  }
2410 
2412  if (region) {
2413  if (value) {
2414  sseq->flag |= SEQ_CLAMP_VIEW;
2415  region->v2d.align &= ~V2D_ALIGN_NO_NEG_Y;
2416  }
2417  else {
2418  sseq->flag &= ~SEQ_CLAMP_VIEW;
2419  region->v2d.align |= V2D_ALIGN_NO_NEG_Y;
2420  }
2421  }
2422 }
2423 
2424 static void rna_Sequencer_view_type_update(Main *UNUSED(bmain),
2425  Scene *UNUSED(scene),
2426  PointerRNA *ptr)
2427 {
2428  ScrArea *area = rna_area_from_space(ptr);
2430 }
2431 
2432 static char *rna_SpaceSequencerPreviewOverlay_path(const PointerRNA *UNUSED(ptr))
2433 {
2434  return BLI_strdup("preview_overlay");
2435 }
2436 
2437 static char *rna_SpaceSequencerTimelineOverlay_path(const PointerRNA *UNUSED(ptr))
2438 {
2439  return BLI_strdup("timeline_overlay");
2440 }
2441 
2442 /* Space Node Editor */
2443 static PointerRNA rna_SpaceNode_overlay_get(PointerRNA *ptr)
2444 {
2445  return rna_pointer_inherit_refine(ptr, &RNA_SpaceNodeOverlay, ptr->data);
2446 }
2447 
2448 static char *rna_SpaceNodeOverlay_path(const PointerRNA *UNUSED(ptr))
2449 {
2450  return BLI_strdup("overlay");
2451 }
2452 
2453 static void rna_SpaceNodeEditor_node_tree_set(PointerRNA *ptr,
2454  const PointerRNA value,
2455  struct ReportList *UNUSED(reports))
2456 {
2457  SpaceNode *snode = (SpaceNode *)ptr->data;
2458  ED_node_tree_start(snode, (bNodeTree *)value.data, NULL, NULL);
2459 }
2460 
2461 static bool rna_SpaceNodeEditor_node_tree_poll(PointerRNA *ptr, const PointerRNA value)
2462 {
2463  SpaceNode *snode = (SpaceNode *)ptr->data;
2464  bNodeTree *ntree = (bNodeTree *)value.data;
2465 
2466  /* node tree type must match the selected type in node editor */
2467  return (STREQ(snode->tree_idname, ntree->idname));
2468 }
2469 
2470 static void rna_SpaceNodeEditor_node_tree_update(const bContext *C, PointerRNA *UNUSED(ptr))
2471 {
2473 }
2474 
2475 static int rna_SpaceNodeEditor_tree_type_get(PointerRNA *ptr)
2476 {
2477  SpaceNode *snode = (SpaceNode *)ptr->data;
2479 }
2480 static void rna_SpaceNodeEditor_tree_type_set(PointerRNA *ptr, int value)
2481 {
2482  SpaceNode *snode = (SpaceNode *)ptr->data;
2484 }
2485 static bool rna_SpaceNodeEditor_tree_type_poll(void *Cv, bNodeTreeType *type)
2486 {
2487  bContext *C = (bContext *)Cv;
2488  if (type->poll) {
2489  return type->poll(C, type);
2490  }
2491  else {
2492  return true;
2493  }
2494 }
2495 
2496 static void rna_SpaceNodeEditor_cursor_location_get(PointerRNA *ptr, float value[2])
2497 {
2498  const SpaceNode *snode = (SpaceNode *)ptr->data;
2499 
2500  ED_node_cursor_location_get(snode, value);
2501 }
2502 
2503 static void rna_SpaceNodeEditor_cursor_location_set(PointerRNA *ptr, const float value[2])
2504 {
2505  SpaceNode *snode = (SpaceNode *)ptr->data;
2506 
2507  ED_node_cursor_location_set(snode, value);
2508 }
2509 
2511 {
2512  return rna_node_tree_type_itemf(C, rna_SpaceNodeEditor_tree_type_poll, r_free);
2513 }
2514 
2515 static const EnumPropertyItem *rna_SpaceNodeEditor_tree_type_itemf(bContext *C,
2516  PointerRNA *UNUSED(ptr),
2517  PropertyRNA *UNUSED(prop),
2518  bool *r_free)
2519 {
2520  return RNA_enum_node_tree_types_itemf_impl(C, r_free);
2521 }
2522 
2523 static void rna_SpaceNodeEditor_path_get(PointerRNA *ptr, char *value)
2524 {
2525  SpaceNode *snode = ptr->data;
2526  ED_node_tree_path_get(snode, value);
2527 }
2528 
2529 static int rna_SpaceNodeEditor_path_length(PointerRNA *ptr)
2530 {
2531  SpaceNode *snode = ptr->data;
2532  return ED_node_tree_path_length(snode);
2533 }
2534 
2535 static void rna_SpaceNodeEditor_path_clear(SpaceNode *snode, bContext *C)
2536 {
2537  ED_node_tree_start(snode, NULL, NULL, NULL);
2539 }
2540 
2541 static void rna_SpaceNodeEditor_path_start(SpaceNode *snode, bContext *C, PointerRNA *node_tree)
2542 {
2545 }
2546 
2547 static void rna_SpaceNodeEditor_path_append(SpaceNode *snode,
2548  bContext *C,
2550  PointerRNA *node)
2551 {
2552  ED_node_tree_push(snode, node_tree->data, node->data);
2554 }
2555 
2556 static void rna_SpaceNodeEditor_path_pop(SpaceNode *snode, bContext *C)
2557 {
2558  ED_node_tree_pop(snode);
2560 }
2561 
2562 static void rna_SpaceNodeEditor_show_backdrop_update(Main *UNUSED(bmain),
2563  Scene *UNUSED(scene),
2564  PointerRNA *UNUSED(ptr))
2565 {
2568 }
2569 
2570 static void rna_SpaceNodeEditor_cursor_location_from_region(SpaceNode *snode,
2571  bContext *C,
2572  int x,
2573  int y)
2574 {
2575  ARegion *region = CTX_wm_region(C);
2576 
2577  float cursor_location[2];
2578 
2579  UI_view2d_region_to_view(&region->v2d, x, y, &cursor_location[0], &cursor_location[1]);
2580  cursor_location[0] /= UI_DPI_FAC;
2581  cursor_location[1] /= UI_DPI_FAC;
2582 
2583  ED_node_cursor_location_set(snode, cursor_location);
2584 }
2585 
2586 static void rna_SpaceClipEditor_clip_set(PointerRNA *ptr,
2587  PointerRNA value,
2588  struct ReportList *UNUSED(reports))
2589 {
2590  SpaceClip *sc = (SpaceClip *)(ptr->data);
2591  bScreen *screen = (bScreen *)ptr->owner_id;
2592 
2593  ED_space_clip_set_clip(NULL, screen, sc, (MovieClip *)value.data);
2594 }
2595 
2596 static void rna_SpaceClipEditor_mask_set(PointerRNA *ptr,
2597  PointerRNA value,
2598  struct ReportList *UNUSED(reports))
2599 {
2600  SpaceClip *sc = (SpaceClip *)(ptr->data);
2601 
2602  ED_space_clip_set_mask(NULL, sc, (Mask *)value.data);
2603 }
2604 
2605 static void rna_SpaceClipEditor_clip_mode_update(Main *UNUSED(bmain),
2606  Scene *UNUSED(scene),
2607  PointerRNA *ptr)
2608 {
2609  SpaceClip *sc = (SpaceClip *)(ptr->data);
2610 
2611  if (sc->mode == SC_MODE_MASKEDIT && sc->view != SC_VIEW_CLIP) {
2612  /* Make sure we are in the right view for mask editing */
2613  sc->view = SC_VIEW_CLIP;
2614  ScrArea *area = rna_area_from_space(ptr);
2616  }
2617 
2618  sc->scopes.ok = 0;
2619 }
2620 
2621 static void rna_SpaceClipEditor_lock_selection_update(Main *UNUSED(bmain),
2622  Scene *UNUSED(scene),
2623  PointerRNA *ptr)
2624 {
2625  SpaceClip *sc = (SpaceClip *)(ptr->data);
2626 
2627  sc->xlockof = 0.0f;
2628  sc->ylockof = 0.0f;
2629 }
2630 
2631 static void rna_SpaceClipEditor_view_type_update(Main *UNUSED(bmain),
2632  Scene *UNUSED(scene),
2633  PointerRNA *ptr)
2634 {
2635  ScrArea *area = rna_area_from_space(ptr);
2637 }
2638 
2639 /* File browser. */
2640 
2641 static char *rna_FileSelectParams_path(const PointerRNA *UNUSED(ptr))
2642 {
2643  return BLI_strdup("params");
2644 }
2645 
2646 int rna_FileSelectParams_filename_editable(struct PointerRNA *ptr, const char **r_info)
2647 {
2649 
2650  if (params && (params->flag & FILE_DIRSEL_ONLY)) {
2651  *r_info = "Only directories can be chosen for the current operation.";
2652  return 0;
2653  }
2654 
2655  return params ? PROP_EDITABLE : 0;
2656 }
2657 
2658 static bool rna_FileSelectParams_use_lib_get(PointerRNA *ptr)
2659 {
2661 
2662  return params && (params->type == FILE_LOADLIB);
2663 }
2664 
2665 static const EnumPropertyItem *rna_FileSelectParams_recursion_level_itemf(
2666  bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
2667 {
2669 
2670  if (params && params->type != FILE_LOADLIB) {
2671  EnumPropertyItem *item = NULL;
2672  int totitem = 0;
2673 
2678 
2679  RNA_enum_item_end(&item, &totitem);
2680  *r_free = true;
2681 
2682  return item;
2683  }
2684 
2685  *r_free = false;
2687 }
2688 
2689 static void rna_FileSelectPrams_filter_glob_set(PointerRNA *ptr, const char *value)
2690 {
2692 
2693  BLI_strncpy(params->filter_glob, value, sizeof(params->filter_glob));
2694 
2695  /* Remove stupid things like last group being a wildcard-only one. */
2697 }
2698 
2699 static PointerRNA rna_FileSelectParams_filter_id_get(PointerRNA *ptr)
2700 {
2701  return rna_pointer_inherit_refine(ptr, &RNA_FileSelectIDFilter, ptr->data);
2702 }
2703 
2704 static int rna_FileAssetSelectParams_asset_library_get(PointerRNA *ptr)
2705 {
2707  /* Just an extra sanity check to ensure this isn't somehow called for RNA_FileSelectParams. */
2708  BLI_assert(ptr->type == &RNA_FileAssetSelectParams);
2709 
2710  return ED_asset_library_reference_to_enum_value(&params->asset_library_ref);
2711 }
2712 
2713 static void rna_FileAssetSelectParams_asset_library_set(PointerRNA *ptr, int value)
2714 {
2716  params->asset_library_ref = ED_asset_library_reference_from_enum_value(value);
2717 }
2718 
2719 static PointerRNA rna_FileAssetSelectParams_filter_id_get(PointerRNA *ptr)
2720 {
2721  return rna_pointer_inherit_refine(ptr, &RNA_FileAssetSelectIDFilter, ptr->data);
2722 }
2723 
2724 static PointerRNA rna_FileBrowser_FileSelectEntry_asset_data_get(PointerRNA *ptr)
2725 {
2726  const FileDirEntry *entry = ptr->data;
2727 
2728  /* Note that the owning ID of the RNA pointer (`ptr->owner_id`) has to be set carefully:
2729  * Local IDs (`entry->id`) own their asset metadata themselves. Asset metadata from other blend
2730  * files are owned by the file browser (`entry`). Only if this is set correctly, we can tell from
2731  * the metadata RNA pointer if the metadata is stored locally and can thus be edited or not. */
2732 
2733  if (entry->id) {
2734  PointerRNA id_ptr;
2735  RNA_id_pointer_create(entry->id, &id_ptr);
2736  return rna_pointer_inherit_refine(&id_ptr, &RNA_AssetMetaData, entry->asset_data);
2737  }
2738 
2739  return rna_pointer_inherit_refine(ptr, &RNA_AssetMetaData, entry->asset_data);
2740 }
2741 
2742 static int rna_FileBrowser_FileSelectEntry_name_editable(PointerRNA *ptr, const char **r_info)
2743 {
2744  const FileDirEntry *entry = ptr->data;
2745 
2746  /* This actually always returns 0 (the name is never editable) but we want to get a disabled
2747  * message returned to `r_info` in some cases. */
2748 
2749  if (entry->asset_data) {
2750  PointerRNA asset_data_ptr = rna_FileBrowser_FileSelectEntry_asset_data_get(ptr);
2751  /* Get disabled hint from asset metadata polling. */
2752  rna_AssetMetaData_editable(&asset_data_ptr, r_info);
2753  }
2754 
2755  return 0;
2756 }
2757 
2758 static void rna_FileBrowser_FileSelectEntry_name_get(PointerRNA *ptr, char *value)
2759 {
2760  const FileDirEntry *entry = ptr->data;
2761  BLI_strncpy_utf8(value, entry->name, strlen(entry->name) + 1);
2762 }
2763 
2764 static int rna_FileBrowser_FileSelectEntry_name_length(PointerRNA *ptr)
2765 {
2766  const FileDirEntry *entry = ptr->data;
2767  return (int)strlen(entry->name);
2768 }
2769 
2770 static void rna_FileBrowser_FileSelectEntry_relative_path_get(PointerRNA *ptr, char *value)
2771 {
2772  const FileDirEntry *entry = ptr->data;
2773  BLI_strncpy_utf8(value, entry->relpath, strlen(entry->relpath) + 1);
2774 }
2775 
2776 static int rna_FileBrowser_FileSelectEntry_relative_path_length(PointerRNA *ptr)
2777 {
2778  const FileDirEntry *entry = ptr->data;
2779  return (int)strlen(entry->relpath);
2780 }
2781 
2782 static const EnumPropertyItem *rna_FileBrowser_FileSelectEntry_id_type_itemf(
2783  bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *UNUSED(r_free))
2784 {
2785  const FileDirEntry *entry = ptr->data;
2786  if (entry->blentype == 0) {
2787  static const EnumPropertyItem none_items[] = {
2788  {0, "NONE", 0, "None", ""},
2789  };
2790  return none_items;
2791  }
2792 
2793  return rna_enum_id_type_items;
2794 }
2795 
2796 static int rna_FileBrowser_FileSelectEntry_id_type_get(PointerRNA *ptr)
2797 {
2798  const FileDirEntry *entry = ptr->data;
2799  return entry->blentype;
2800 }
2801 
2802 static PointerRNA rna_FileBrowser_FileSelectEntry_local_id_get(PointerRNA *ptr)
2803 {
2804  const FileDirEntry *entry = ptr->data;
2805  return rna_pointer_inherit_refine(ptr, &RNA_ID, entry->id);
2806 }
2807 
2808 static int rna_FileBrowser_FileSelectEntry_preview_icon_id_get(PointerRNA *ptr)
2809 {
2810  const FileDirEntry *entry = ptr->data;
2811  return ED_file_icon(entry);
2812 }
2813 
2814 static StructRNA *rna_FileBrowser_params_typef(PointerRNA *ptr)
2815 {
2816  SpaceFile *sfile = ptr->data;
2818 
2819  if (params == ED_fileselect_get_file_params(sfile)) {
2820  return &RNA_FileSelectParams;
2821  }
2822  if (params == (void *)ED_fileselect_get_asset_params(sfile)) {
2823  return &RNA_FileAssetSelectParams;
2824  }
2825 
2826  BLI_assert_msg(0, "Could not identify file select parameters");
2827  return NULL;
2828 }
2829 
2830 static PointerRNA rna_FileBrowser_params_get(PointerRNA *ptr)
2831 {
2832  SpaceFile *sfile = ptr->data;
2834  StructRNA *params_struct = rna_FileBrowser_params_typef(ptr);
2835 
2836  if (params && params_struct) {
2837  return rna_pointer_inherit_refine(ptr, params_struct, params);
2838  }
2839 
2841 }
2842 
2843 static void rna_FileBrowser_FSMenuEntry_path_get(PointerRNA *ptr, char *value)
2844 {
2845  char *path = ED_fsmenu_entry_get_path(ptr->data);
2846 
2847  strcpy(value, path ? path : "");
2848 }
2849 
2850 static int rna_FileBrowser_FSMenuEntry_path_length(PointerRNA *ptr)
2851 {
2852  char *path = ED_fsmenu_entry_get_path(ptr->data);
2853 
2854  return (int)(path ? strlen(path) : 0);
2855 }
2856 
2857 static void rna_FileBrowser_FSMenuEntry_path_set(PointerRNA *ptr, const char *value)
2858 {
2859  FSMenuEntry *fsm = ptr->data;
2860 
2861  /* NOTE: this will write to file immediately.
2862  * Not nice (and to be fixed ultimately), but acceptable in this case for now. */
2863  ED_fsmenu_entry_set_path(fsm, value);
2864 }
2865 
2866 static void rna_FileBrowser_FSMenuEntry_name_get(PointerRNA *ptr, char *value)
2867 {
2868  strcpy(value, ED_fsmenu_entry_get_name(ptr->data));
2869 }
2870 
2871 static int rna_FileBrowser_FSMenuEntry_name_length(PointerRNA *ptr)
2872 {
2873  return (int)strlen(ED_fsmenu_entry_get_name(ptr->data));
2874 }
2875 
2876 static void rna_FileBrowser_FSMenuEntry_name_set(PointerRNA *ptr, const char *value)
2877 {
2878  FSMenuEntry *fsm = ptr->data;
2879 
2880  /* NOTE: this will write to file immediately.
2881  * Not nice (and to be fixed ultimately), but acceptable in this case for now. */
2882  ED_fsmenu_entry_set_name(fsm, value);
2883 }
2884 
2885 static int rna_FileBrowser_FSMenuEntry_name_get_editable(PointerRNA *ptr,
2886  const char **UNUSED(r_info))
2887 {
2888  FSMenuEntry *fsm = ptr->data;
2889 
2890  return fsm->save ? PROP_EDITABLE : 0;
2891 }
2892 
2893 static int rna_FileBrowser_FSMenuEntry_icon_get(PointerRNA *ptr)
2894 {
2895  FSMenuEntry *fsm = ptr->data;
2896  return ED_fsmenu_entry_get_icon(fsm);
2897 }
2898 
2899 static void rna_FileBrowser_FSMenuEntry_icon_set(PointerRNA *ptr, int value)
2900 {
2901  FSMenuEntry *fsm = ptr->data;
2902  ED_fsmenu_entry_set_icon(fsm, value);
2903 }
2904 
2905 static bool rna_FileBrowser_FSMenuEntry_use_save_get(PointerRNA *ptr)
2906 {
2907  FSMenuEntry *fsm = ptr->data;
2908  return fsm->save;
2909 }
2910 
2911 static bool rna_FileBrowser_FSMenuEntry_is_valid_get(PointerRNA *ptr)
2912 {
2913  FSMenuEntry *fsm = ptr->data;
2914  return fsm->valid;
2915 }
2916 
2917 static void rna_FileBrowser_FSMenu_next(CollectionPropertyIterator *iter)
2918 {
2919  ListBaseIterator *internal = &iter->internal.listbase;
2920 
2921  if (internal->skip) {
2922  do {
2923  internal->link = (Link *)(((FSMenuEntry *)(internal->link))->next);
2924  iter->valid = (internal->link != NULL);
2925  } while (iter->valid && internal->skip(iter, internal->link));
2926  }
2927  else {
2928  internal->link = (Link *)(((FSMenuEntry *)(internal->link))->next);
2929  iter->valid = (internal->link != NULL);
2930  }
2931 }
2932 
2933 static void rna_FileBrowser_FSMenu_begin(CollectionPropertyIterator *iter, FSMenuCategory category)
2934 {
2935  ListBaseIterator *internal = &iter->internal.listbase;
2936 
2937  struct FSMenu *fsmenu = ED_fsmenu_get();
2938  struct FSMenuEntry *fsmentry = ED_fsmenu_get_category(fsmenu, category);
2939 
2940  internal->link = (fsmentry) ? (Link *)fsmentry : NULL;
2941  internal->skip = NULL;
2942 
2943  iter->valid = (internal->link != NULL);
2944 }
2945 
2946 static PointerRNA rna_FileBrowser_FSMenu_get(CollectionPropertyIterator *iter)
2947 {
2948  ListBaseIterator *internal = &iter->internal.listbase;
2949  PointerRNA r_ptr;
2950 
2951  RNA_pointer_create(NULL, &RNA_FileBrowserFSMenuEntry, internal->link, &r_ptr);
2952 
2953  return r_ptr;
2954 }
2955 
2956 static void rna_FileBrowser_FSMenu_end(CollectionPropertyIterator *UNUSED(iter))
2957 {
2958 }
2959 
2960 static void rna_FileBrowser_FSMenuSystem_data_begin(CollectionPropertyIterator *iter,
2961  PointerRNA *UNUSED(ptr))
2962 {
2963  rna_FileBrowser_FSMenu_begin(iter, FS_CATEGORY_SYSTEM);
2964 }
2965 
2966 static int rna_FileBrowser_FSMenuSystem_data_length(PointerRNA *UNUSED(ptr))
2967 {
2968  struct FSMenu *fsmenu = ED_fsmenu_get();
2969 
2971 }
2972 
2973 static void rna_FileBrowser_FSMenuSystemBookmark_data_begin(CollectionPropertyIterator *iter,
2974  PointerRNA *UNUSED(ptr))
2975 {
2976  rna_FileBrowser_FSMenu_begin(iter, FS_CATEGORY_SYSTEM_BOOKMARKS);
2977 }
2978 
2979 static int rna_FileBrowser_FSMenuSystemBookmark_data_length(PointerRNA *UNUSED(ptr))
2980 {
2981  struct FSMenu *fsmenu = ED_fsmenu_get();
2982 
2984 }
2985 
2986 static void rna_FileBrowser_FSMenuBookmark_data_begin(CollectionPropertyIterator *iter,
2987  PointerRNA *UNUSED(ptr))
2988 {
2989  rna_FileBrowser_FSMenu_begin(iter, FS_CATEGORY_BOOKMARKS);
2990 }
2991 
2992 static int rna_FileBrowser_FSMenuBookmark_data_length(PointerRNA *UNUSED(ptr))
2993 {
2994  struct FSMenu *fsmenu = ED_fsmenu_get();
2995 
2997 }
2998 
2999 static void rna_FileBrowser_FSMenuRecent_data_begin(CollectionPropertyIterator *iter,
3000  PointerRNA *UNUSED(ptr))
3001 {
3002  rna_FileBrowser_FSMenu_begin(iter, FS_CATEGORY_RECENT);
3003 }
3004 
3005 static int rna_FileBrowser_FSMenuRecent_data_length(PointerRNA *UNUSED(ptr))
3006 {
3007  struct FSMenu *fsmenu = ED_fsmenu_get();
3008 
3010 }
3011 
3012 static int rna_FileBrowser_FSMenu_active_get(PointerRNA *ptr, const FSMenuCategory category)
3013 {
3014  SpaceFile *sf = ptr->data;
3015  int actnr = -1;
3016 
3017  switch (category) {
3018  case FS_CATEGORY_SYSTEM:
3019  actnr = sf->systemnr;
3020  break;
3022  actnr = sf->system_bookmarknr;
3023  break;
3024  case FS_CATEGORY_BOOKMARKS:
3025  actnr = sf->bookmarknr;
3026  break;
3027  case FS_CATEGORY_RECENT:
3028  actnr = sf->recentnr;
3029  break;
3030  case FS_CATEGORY_OTHER:
3031  /* pass. */
3032  break;
3033  }
3034 
3035  return actnr;
3036 }
3037 
3038 static void rna_FileBrowser_FSMenu_active_set(PointerRNA *ptr,
3039  int value,
3040  const FSMenuCategory category)
3041 {
3042  SpaceFile *sf = ptr->data;
3043  struct FSMenu *fsmenu = ED_fsmenu_get();
3044  FSMenuEntry *fsm = ED_fsmenu_get_entry(fsmenu, category, value);
3045 
3046  if (fsm && sf->params) {
3047  switch (category) {
3048  case FS_CATEGORY_SYSTEM:
3049  sf->systemnr = value;
3050  break;
3052  sf->system_bookmarknr = value;
3053  break;
3054  case FS_CATEGORY_BOOKMARKS:
3055  sf->bookmarknr = value;
3056  break;
3057  case FS_CATEGORY_RECENT:
3058  sf->recentnr = value;
3059  break;
3060  case FS_CATEGORY_OTHER:
3061  /* pass. */
3062  break;
3063  }
3064 
3065  BLI_strncpy(sf->params->dir, fsm->path, sizeof(sf->params->dir));
3066  }
3067 }
3068 
3069 static void rna_FileBrowser_FSMenu_active_range(PointerRNA *UNUSED(ptr),
3070  int *min,
3071  int *max,
3072  int *softmin,
3073  int *softmax,
3074  const FSMenuCategory category)
3075 {
3076  struct FSMenu *fsmenu = ED_fsmenu_get();
3077 
3078  *min = *softmin = -1;
3079  *max = *softmax = ED_fsmenu_get_nentries(fsmenu, category) - 1;
3080 }
3081 
3082 static void rna_FileBrowser_FSMenu_active_update(struct bContext *C, PointerRNA *ptr)
3083 {
3084  ScrArea *area = rna_area_from_space(ptr);
3086 }
3087 
3088 static int rna_FileBrowser_FSMenuSystem_active_get(PointerRNA *ptr)
3089 {
3090  return rna_FileBrowser_FSMenu_active_get(ptr, FS_CATEGORY_SYSTEM);
3091 }
3092 
3093 static void rna_FileBrowser_FSMenuSystem_active_set(PointerRNA *ptr, int value)
3094 {
3095  rna_FileBrowser_FSMenu_active_set(ptr, value, FS_CATEGORY_SYSTEM);
3096 }
3097 
3098 static void rna_FileBrowser_FSMenuSystem_active_range(
3099  PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
3100 {
3101  rna_FileBrowser_FSMenu_active_range(ptr, min, max, softmin, softmax, FS_CATEGORY_SYSTEM);
3102 }
3103 
3104 static int rna_FileBrowser_FSMenuSystemBookmark_active_get(PointerRNA *ptr)
3105 {
3106  return rna_FileBrowser_FSMenu_active_get(ptr, FS_CATEGORY_SYSTEM_BOOKMARKS);
3107 }
3108 
3109 static void rna_FileBrowser_FSMenuSystemBookmark_active_set(PointerRNA *ptr, int value)
3110 {
3111  rna_FileBrowser_FSMenu_active_set(ptr, value, FS_CATEGORY_SYSTEM_BOOKMARKS);
3112 }
3113 
3114 static void rna_FileBrowser_FSMenuSystemBookmark_active_range(
3115  PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
3116 {
3117  rna_FileBrowser_FSMenu_active_range(
3118  ptr, min, max, softmin, softmax, FS_CATEGORY_SYSTEM_BOOKMARKS);
3119 }
3120 
3121 static int rna_FileBrowser_FSMenuBookmark_active_get(PointerRNA *ptr)
3122 {
3123  return rna_FileBrowser_FSMenu_active_get(ptr, FS_CATEGORY_BOOKMARKS);
3124 }
3125 
3126 static void rna_FileBrowser_FSMenuBookmark_active_set(PointerRNA *ptr, int value)
3127 {
3128  rna_FileBrowser_FSMenu_active_set(ptr, value, FS_CATEGORY_BOOKMARKS);
3129 }
3130 
3131 static void rna_FileBrowser_FSMenuBookmark_active_range(
3132  PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
3133 {
3134  rna_FileBrowser_FSMenu_active_range(ptr, min, max, softmin, softmax, FS_CATEGORY_BOOKMARKS);
3135 }
3136 
3137 static int rna_FileBrowser_FSMenuRecent_active_get(PointerRNA *ptr)
3138 {
3139  return rna_FileBrowser_FSMenu_active_get(ptr, FS_CATEGORY_RECENT);
3140 }
3141 
3142 static void rna_FileBrowser_FSMenuRecent_active_set(PointerRNA *ptr, int value)
3143 {
3144  rna_FileBrowser_FSMenu_active_set(ptr, value, FS_CATEGORY_RECENT);
3145 }
3146 
3147 static void rna_FileBrowser_FSMenuRecent_active_range(
3148  PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
3149 {
3150  rna_FileBrowser_FSMenu_active_range(ptr, min, max, softmin, softmax, FS_CATEGORY_RECENT);
3151 }
3152 
3153 static void rna_SpaceFileBrowser_browse_mode_update(Main *UNUSED(bmain),
3154  Scene *UNUSED(scene),
3155  PointerRNA *ptr)
3156 {
3157  ScrArea *area = rna_area_from_space(ptr);
3159 }
3160 
3161 static void rna_SpaceSpreadsheet_geometry_component_type_update(Main *UNUSED(bmain),
3162  Scene *UNUSED(scene),
3163  PointerRNA *ptr)
3164 {
3165  SpaceSpreadsheet *sspreadsheet = (SpaceSpreadsheet *)ptr->data;
3166  switch (sspreadsheet->geometry_component_type) {
3167  case GEO_COMPONENT_TYPE_MESH: {
3168  if (!ELEM(sspreadsheet->attribute_domain,
3172  ATTR_DOMAIN_CORNER)) {
3173  sspreadsheet->attribute_domain = ATTR_DOMAIN_POINT;
3174  }
3175  break;
3176  }
3178  sspreadsheet->attribute_domain = ATTR_DOMAIN_POINT;
3179  break;
3180  }
3182  sspreadsheet->attribute_domain = ATTR_DOMAIN_INSTANCE;
3183  break;
3184  }
3186  break;
3187  }
3188  case GEO_COMPONENT_TYPE_CURVE: {
3189  if (!ELEM(sspreadsheet->attribute_domain, ATTR_DOMAIN_POINT, ATTR_DOMAIN_CURVE)) {
3190  sspreadsheet->attribute_domain = ATTR_DOMAIN_POINT;
3191  }
3192  break;
3193  }
3194  }
3195 }
3196 
3197 const EnumPropertyItem *rna_SpaceSpreadsheet_attribute_domain_itemf(bContext *UNUSED(C),
3198  PointerRNA *ptr,
3199  PropertyRNA *UNUSED(prop),
3200  bool *r_free)
3201 {
3202  SpaceSpreadsheet *sspreadsheet = (SpaceSpreadsheet *)ptr->data;
3203  GeometryComponentType component_type = sspreadsheet->geometry_component_type;
3205  ID *used_id = ED_spreadsheet_get_current_id(sspreadsheet);
3206  if (used_id != NULL) {
3207  if (GS(used_id->name) == ID_OB) {
3208  Object *used_object = (Object *)used_id;
3209  if (used_object->type == OB_POINTCLOUD) {
3210  component_type = GEO_COMPONENT_TYPE_POINT_CLOUD;
3211  }
3212  else {
3213  component_type = GEO_COMPONENT_TYPE_MESH;
3214  }
3215  }
3216  }
3217  }
3218 
3219  static EnumPropertyItem mesh_vertex_domain_item = {
3220  ATTR_DOMAIN_POINT, "POINT", 0, "Vertex", "Attribute per point/vertex"};
3221 
3222  EnumPropertyItem *item_array = NULL;
3223  int items_len = 0;
3224  for (const EnumPropertyItem *item = rna_enum_attribute_domain_items; item->identifier != NULL;
3225  item++) {
3226  if (component_type == GEO_COMPONENT_TYPE_MESH) {
3227  if (!ELEM(item->value,
3231  ATTR_DOMAIN_FACE)) {
3232  continue;
3233  }
3234  }
3235  if (component_type == GEO_COMPONENT_TYPE_POINT_CLOUD) {
3236  if (item->value != ATTR_DOMAIN_POINT) {
3237  continue;
3238  }
3239  }
3240  if (component_type == GEO_COMPONENT_TYPE_CURVE) {
3242  continue;
3243  }
3244  }
3245  if (item->value == ATTR_DOMAIN_POINT && component_type == GEO_COMPONENT_TYPE_MESH) {
3246  RNA_enum_item_add(&item_array, &items_len, &mesh_vertex_domain_item);
3247  }
3248  else {
3249  RNA_enum_item_add(&item_array, &items_len, item);
3250  }
3251  }
3252  RNA_enum_item_end(&item_array, &items_len);
3253 
3254  *r_free = true;
3255  return item_array;
3256 }
3257 
3258 static SpreadsheetContext *rna_SpaceSpreadsheet_context_path_append(SpaceSpreadsheet *sspreadsheet,
3259  int type)
3260 {
3262  BLI_addtail(&sspreadsheet->context_path, context);
3265  return context;
3266 }
3267 
3268 static void rna_SpaceSpreadsheet_context_path_clear(SpaceSpreadsheet *sspreadsheet)
3269 {
3270  ED_spreadsheet_context_path_clear(sspreadsheet);
3273 }
3274 
3275 static StructRNA *rna_spreadsheet_context_refine(PointerRNA *ptr)
3276 {
3278  switch (context->type) {
3280  return &RNA_SpreadsheetContextObject;
3282  return &RNA_SpreadsheetContextModifier;
3284  return &RNA_SpreadsheetContextNode;
3285  }
3287  return NULL;
3288 }
3289 
3290 static void rna_spreadsheet_context_update(Main *UNUSED(bmain),
3291  Scene *UNUSED(scene),
3292  PointerRNA *ptr)
3293 {
3294  bScreen *screen = (bScreen *)ptr->owner_id;
3295  LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
3296  SpaceLink *sl = area->spacedata.first;
3297  if (sl->spacetype == SPACE_SPREADSHEET) {
3298  SpaceSpreadsheet *sspreadsheet = (SpaceSpreadsheet *)sl;
3300  }
3301  }
3302 }
3303 
3304 static void rna_SpaceSpreadsheet_context_path_guess(SpaceSpreadsheet *sspreadsheet, bContext *C)
3305 {
3306  ED_spreadsheet_context_path_guess(C, sspreadsheet);
3309 }
3310 
3311 static void rna_FileAssetSelectParams_catalog_id_get(PointerRNA *ptr, char *value)
3312 {
3314  BLI_uuid_format(value, params->catalog_id);
3315 }
3316 
3317 static int rna_FileAssetSelectParams_catalog_id_length(PointerRNA *UNUSED(ptr))
3318 {
3319  return UUID_STRING_LEN - 1;
3320 }
3321 
3322 #else
3323 
3324 static const EnumPropertyItem dt_uv_items[] = {
3325  {SI_UVDT_OUTLINE, "OUTLINE", 0, "Outline", "Display white edges with black outline"},
3326  {SI_UVDT_DASH, "DASH", 0, "Dash", "Display dashed black-white edges"},
3327  {SI_UVDT_BLACK, "BLACK", 0, "Black", "Display black edges"},
3328  {SI_UVDT_WHITE, "WHITE", 0, "White", "Display white edges"},
3329  {0, NULL, 0, NULL, NULL},
3330 };
3331 
3333  /* Categories */
3334  {FILTER_ID_SCE, "category_scene", ICON_SCENE_DATA, "Scenes", "Show scenes"},
3335  {FILTER_ID_AC, "category_animation", ICON_ANIM_DATA, "Animations", "Show animation data"},
3337  "category_object",
3338  ICON_OUTLINER_COLLECTION,
3339  "Objects & Collections",
3340  "Show objects and collections"},
3343  "category_geometry",
3344  ICON_GEOMETRY_NODES,
3345  "Geometry",
3346  "Show meshes, curves, lattice, armatures and metaballs data"},
3348  "category_shading",
3349  ICON_MATERIAL_DATA,
3350  "Shading",
3351  "Show materials, nodetrees, textures and Freestyle's linestyles"},
3353  "category_image",
3354  ICON_IMAGE_DATA,
3355  "Images & Sounds",
3356  "Show images, movie clips, sounds and masks"},
3358  "category_environment",
3359  ICON_WORLD_DATA,
3360  "Environment",
3361  "Show worlds, lights, cameras and speakers"},
3364  "category_misc",
3365  ICON_GREASEPENCIL,
3366  "Miscellaneous",
3367  "Show other data types"},
3368  {0, NULL, 0, NULL, NULL},
3369 };
3370 
3371 static void rna_def_space_generic_show_region_toggles(StructRNA *srna, int region_type_mask)
3372 {
3373  PropertyRNA *prop;
3374 
3375 # define DEF_SHOW_REGION_PROPERTY(identifier, label, description) \
3376  { \
3377  prop = RNA_def_property(srna, STRINGIFY(identifier), PROP_BOOLEAN, PROP_NONE); \
3378  RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); \
3379  RNA_def_property_boolean_funcs(prop, \
3380  STRINGIFY(rna_Space_##identifier##_get), \
3381  STRINGIFY(rna_Space_##identifier##_set)); \
3382  RNA_def_property_ui_text(prop, label, description); \
3383  RNA_def_property_update(prop, 0, STRINGIFY(rna_Space_##identifier##_update)); \
3384  } \
3385  ((void)0)
3386 
3387  if (region_type_mask & (1 << RGN_TYPE_TOOL_HEADER)) {
3388  region_type_mask &= ~(1 << RGN_TYPE_TOOL_HEADER);
3389  DEF_SHOW_REGION_PROPERTY(show_region_tool_header, "Tool Settings", "");
3390  }
3391  if (region_type_mask & (1 << RGN_TYPE_HEADER)) {
3392  region_type_mask &= ~(1 << RGN_TYPE_HEADER);
3393  DEF_SHOW_REGION_PROPERTY(show_region_header, "Header", "");
3394  }
3395  if (region_type_mask & (1 << RGN_TYPE_FOOTER)) {
3396  region_type_mask &= ~(1 << RGN_TYPE_FOOTER);
3397  DEF_SHOW_REGION_PROPERTY(show_region_footer, "Footer", "");
3398  }
3399  if (region_type_mask & (1 << RGN_TYPE_TOOLS)) {
3400  region_type_mask &= ~(1 << RGN_TYPE_TOOLS);
3401  DEF_SHOW_REGION_PROPERTY(show_region_toolbar, "Toolbar", "");
3402  }
3403  if (region_type_mask & (1 << RGN_TYPE_TOOL_PROPS)) {
3404  region_type_mask &= ~(1 << RGN_TYPE_TOOL_PROPS);
3405  DEF_SHOW_REGION_PROPERTY(show_region_tool_props, "Toolbar", "");
3406  }
3407  if (region_type_mask & (1 << RGN_TYPE_CHANNELS)) {
3408  region_type_mask &= ~(1 << RGN_TYPE_CHANNELS);
3409  DEF_SHOW_REGION_PROPERTY(show_region_channels, "Channels", "");
3410  }
3411  if (region_type_mask & (1 << RGN_TYPE_UI)) {
3412  region_type_mask &= ~(1 << RGN_TYPE_UI);
3413  DEF_SHOW_REGION_PROPERTY(show_region_ui, "Sidebar", "");
3414  }
3415  if (region_type_mask & (1 << RGN_TYPE_HUD)) {
3416  region_type_mask &= ~(1 << RGN_TYPE_HUD);
3417  DEF_SHOW_REGION_PROPERTY(show_region_hud, "Adjust Last Operation", "");
3418  }
3419  BLI_assert(region_type_mask == 0);
3420 }
3421 
3422 static void rna_def_space(BlenderRNA *brna)
3423 {
3424  StructRNA *srna;
3425  PropertyRNA *prop;
3426 
3427  srna = RNA_def_struct(brna, "Space", NULL);
3428  RNA_def_struct_sdna(srna, "SpaceLink");
3429  RNA_def_struct_ui_text(srna, "Space", "Space data for a screen area");
3430  RNA_def_struct_refine_func(srna, "rna_Space_refine");
3431 
3432  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
3433  RNA_def_property_enum_sdna(prop, NULL, "spacetype");
3435  /* When making this editable, take care for the special case of global areas
3436  * (see rna_Area_type_set). */
3438  RNA_def_property_ui_text(prop, "Type", "Space data type");
3439 
3440  /* access to V2D_VIEWSYNC_SCREEN_TIME */
3441  prop = RNA_def_property(srna, "show_locked_time", PROP_BOOLEAN, PROP_NONE);
3442  RNA_def_property_boolean_funcs(prop, "rna_Space_view2d_sync_get", "rna_Space_view2d_sync_set");
3444  "Sync Visible Range",
3445  "Synchronize the visible timeline range with other time-based editors");
3446  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, "rna_Space_view2d_sync_update");
3447 
3449 }
3450 
3451 /* for all spaces that use a mask */
3452 static void rna_def_space_mask_info(StructRNA *srna, int noteflag, const char *mask_set_func)
3453 {
3454  PropertyRNA *prop;
3455 
3456  static const EnumPropertyItem overlay_mode_items[] = {
3458  "ALPHACHANNEL",
3459  ICON_NONE,
3460  "Alpha Channel",
3461  "Show alpha channel of the mask"},
3463  "COMBINED",
3464  ICON_NONE,
3465  "Combined",
3466  "Combine space background image with the mask"},
3467  {0, NULL, 0, NULL, NULL},
3468  };
3469 
3470  prop = RNA_def_property(srna, "mask", PROP_POINTER, PROP_NONE);
3471  RNA_def_property_pointer_sdna(prop, NULL, "mask_info.mask");
3473  RNA_def_property_ui_text(prop, "Mask", "Mask displayed and edited in this space");
3474  RNA_def_property_pointer_funcs(prop, NULL, mask_set_func, NULL, NULL);
3475  RNA_def_property_update(prop, noteflag, NULL);
3476 
3477  /* mask drawing */
3478  prop = RNA_def_property(srna, "mask_display_type", PROP_ENUM, PROP_NONE);
3479  RNA_def_property_enum_sdna(prop, NULL, "mask_info.draw_type");
3481  RNA_def_property_ui_text(prop, "Edge Display Type", "Display type for mask splines");
3482  RNA_def_property_update(prop, noteflag, NULL);
3483 
3484  prop = RNA_def_property(srna, "show_mask_spline", PROP_BOOLEAN, PROP_NONE);
3485  RNA_def_property_boolean_sdna(prop, NULL, "mask_info.draw_flag", MASK_DRAWFLAG_SPLINE);
3486  RNA_def_property_ui_text(prop, "Show Mask Spline", "");
3487  RNA_def_property_update(prop, noteflag, NULL);
3488 
3489  prop = RNA_def_property(srna, "show_mask_overlay", PROP_BOOLEAN, PROP_NONE);
3490  RNA_def_property_boolean_sdna(prop, NULL, "mask_info.draw_flag", MASK_DRAWFLAG_OVERLAY);
3491  RNA_def_property_ui_text(prop, "Show Mask Overlay", "");
3492  RNA_def_property_update(prop, noteflag, NULL);
3493 
3494  prop = RNA_def_property(srna, "mask_overlay_mode", PROP_ENUM, PROP_NONE);
3495  RNA_def_property_enum_sdna(prop, NULL, "mask_info.overlay_mode");
3496  RNA_def_property_enum_items(prop, overlay_mode_items);
3497  RNA_def_property_ui_text(prop, "Overlay Mode", "Overlay mode of rasterized mask");
3498  RNA_def_property_update(prop, noteflag, NULL);
3499 
3500  prop = RNA_def_property(srna, "blend_factor", PROP_FLOAT, PROP_FACTOR);
3501  RNA_def_property_float_sdna(prop, NULL, "mask_info.blend_factor");
3502  RNA_def_property_range(prop, 0.0f, 1.0f);
3503  RNA_def_property_ui_range(prop, 0, 1., 0.1, 1);
3504  RNA_def_property_ui_text(prop, "Blending Factor", "Overlay blending factor of rasterized mask");
3505  RNA_def_property_update(prop, noteflag, NULL);
3506 }
3507 
3509 {
3510  StructRNA *srna;
3511  PropertyRNA *prop;
3512 
3513  static const EnumPropertyItem dt_uvstretch_items[] = {
3514  {SI_UVDT_STRETCH_ANGLE, "ANGLE", 0, "Angle", "Angular distortion between UV and 3D angles"},
3515  {SI_UVDT_STRETCH_AREA, "AREA", 0, "Area", "Area distortion between UV and 3D faces"},
3516  {0, NULL, 0, NULL, NULL},
3517  };
3518 
3519  static const EnumPropertyItem pixel_snap_mode_items[] = {
3520  {SI_PIXEL_SNAP_DISABLED, "DISABLED", 0, "Disabled", "Don't snap to pixels"},
3521  {SI_PIXEL_SNAP_CORNER, "CORNER", 0, "Corner", "Snap to pixel corners"},
3522  {SI_PIXEL_SNAP_CENTER, "CENTER", 0, "Center", "Snap to pixel centers"},
3523  {0, NULL, 0, NULL, NULL},
3524  };
3525 
3526  srna = RNA_def_struct(brna, "SpaceUVEditor", NULL);
3527  RNA_def_struct_sdna(srna, "SpaceImage");
3528  RNA_def_struct_nested(brna, srna, "SpaceImageEditor");
3529  RNA_def_struct_path_func(srna, "rna_SpaceUVEditor_path");
3530  RNA_def_struct_ui_text(srna, "Space UV Editor", "UV editor data for the image editor space");
3531 
3532  /* drawing */
3533  prop = RNA_def_property(srna, "edge_display_type", PROP_ENUM, PROP_NONE);
3534  RNA_def_property_enum_sdna(prop, NULL, "dt_uv");
3536  RNA_def_property_ui_text(prop, "Display As", "Display style for UV edges");
3538 
3539  prop = RNA_def_property(srna, "show_stretch", PROP_BOOLEAN, PROP_NONE);
3542  prop,
3543  "Display Stretch",
3544  "Display faces colored according to the difference in shape between UVs and "
3545  "their 3D coordinates (blue for low distortion, red for high distortion)");
3547 
3548  prop = RNA_def_property(srna, "display_stretch_type", PROP_ENUM, PROP_NONE);
3549  RNA_def_property_enum_sdna(prop, NULL, "dt_uvstretch");
3550  RNA_def_property_enum_items(prop, dt_uvstretch_items);
3551  RNA_def_property_ui_text(prop, "Display Stretch Type", "Type of stretch to display");
3553 
3554  prop = RNA_def_property(srna, "show_modified_edges", PROP_BOOLEAN, PROP_NONE);
3557  prop, "Display Modified Edges", "Display edges after modifiers are applied");
3559 
3560  prop = RNA_def_property(srna, "show_metadata", PROP_BOOLEAN, PROP_NONE);
3562  RNA_def_property_ui_text(prop, "Show Metadata", "Display metadata properties of the image");
3564 
3565  prop = RNA_def_property(srna, "show_texpaint", PROP_BOOLEAN, PROP_NONE);
3568  prop, "Display Texture Paint UVs", "Display overlay of texture paint uv layer");
3570 
3571  prop = RNA_def_property(srna, "show_pixel_coords", PROP_BOOLEAN, PROP_NONE);
3574  prop, "Pixel Coordinates", "Display UV coordinates in pixels rather than from 0.0 to 1.0");
3576 
3577  prop = RNA_def_property(srna, "show_faces", PROP_BOOLEAN, PROP_NONE);
3579  RNA_def_property_ui_text(prop, "Display Faces", "Display faces over the image");
3581 
3582  prop = RNA_def_property(srna, "tile_grid_shape", PROP_INT, PROP_XYZ);
3583  RNA_def_property_int_sdna(prop, NULL, "tile_grid_shape");
3584  RNA_def_property_array(prop, 2);
3586  RNA_def_property_range(prop, 1, 100);
3587  RNA_def_property_int_funcs(prop, NULL, "rna_SpaceUVEditor_tile_grid_shape_set", NULL);
3589  prop, "Tile Grid Shape", "How many tiles will be shown in the background");
3591 
3592  prop = RNA_def_property(srna, "use_custom_grid", PROP_BOOLEAN, PROP_NONE);
3595  RNA_def_property_ui_text(prop, "Custom Grid", "Use a grid with a user-defined number of steps");
3597 
3598  prop = RNA_def_property(srna, "custom_grid_subdivisions", PROP_INT, PROP_NONE);
3599  RNA_def_property_int_sdna(prop, NULL, "custom_grid_subdiv");
3600  RNA_def_property_range(prop, 1, 5000);
3602  prop, "Dynamic Grid Size", "Number of grid units in UV space that make one UV Unit");
3604 
3605  prop = RNA_def_property(srna, "uv_opacity", PROP_FLOAT, PROP_FACTOR);
3606  RNA_def_property_float_sdna(prop, NULL, "uv_opacity");
3607  RNA_def_property_range(prop, 0.0f, 1.0f);
3608  RNA_def_property_ui_text(prop, "UV Opacity", "Opacity of UV overlays");
3610 
3611  /* TODO: move edge and face drawing options here from `G.f`. */
3612 
3613  prop = RNA_def_property(srna, "pixel_snap_mode", PROP_ENUM, PROP_NONE);
3614  RNA_def_property_enum_items(prop, pixel_snap_mode_items);
3615  RNA_def_property_ui_text(prop, "Snap to Pixels", "Snap UVs to pixels while editing");
3617 
3618  prop = RNA_def_property(srna, "lock_bounds", PROP_BOOLEAN, PROP_NONE);
3621  "Constrain to Image Bounds",
3622  "Constraint to stay within the image bounds while editing");
3624 
3625  prop = RNA_def_property(srna, "use_live_unwrap", PROP_BOOLEAN, PROP_NONE);
3628  prop,
3629  "Live Unwrap",
3630  "Continuously unwrap the selected UV island while transforming pinned vertices");
3632 }
3633 
3635 {
3636  StructRNA *srna;
3637  PropertyRNA *prop;
3638 
3639  static const EnumPropertyItem display_mode_items[] = {
3640  {SO_SCENES,
3641  "SCENES",
3642  ICON_SCENE_DATA,
3643  "Scenes",
3644  "Display scenes and their view layers, collections and objects"},
3645  {SO_VIEW_LAYER,
3646  "VIEW_LAYER",
3647  ICON_RENDER_RESULT,
3648  "View Layer",
3649  "Display collections and objects in the view layer"},
3650  {SO_SEQUENCE,
3651  "SEQUENCE",
3652  ICON_SEQUENCE,
3653  "Video Sequencer",
3654  "Display data belonging to the Video Sequencer"},
3655  {SO_LIBRARIES,
3656  "LIBRARIES",
3657  ICON_FILE_BLEND,
3658  "Blender File",
3659  "Display data of current file and linked libraries"},
3660  {SO_DATA_API,
3661  "DATA_API",
3662  ICON_RNA,
3663  "Data API",
3664  "Display low level Blender data and its properties"},
3666  "LIBRARY_OVERRIDES",
3667  ICON_LIBRARY_DATA_OVERRIDE,
3668  "Library Overrides",
3669  "Display data-blocks with library overrides and list their overridden properties"},
3670  {SO_ID_ORPHANS,
3671  "ORPHAN_DATA",
3672  ICON_ORPHAN_DATA,
3673  "Orphan Data",
3674  "Display data-blocks which are unused and/or will be lost when the file is reloaded"},
3675  {0, NULL, 0, NULL, NULL},
3676  };
3677 
3678  static const EnumPropertyItem lib_override_view_mode[] = {
3680  "PROPERTIES",
3681  ICON_NONE,
3682  "Properties",
3683  "Display all local override data-blocks with their overridden properties and buttons to "
3684  "edit them"},
3686  "HIERARCHIES",
3687  ICON_NONE,
3688  "Hierarchies",
3689  "Display library override relationships"},
3690  {0, NULL, 0, NULL, NULL},
3691  };
3692 
3693  static const EnumPropertyItem filter_state_items[] = {
3694  {SO_FILTER_OB_ALL, "ALL", 0, "All", "Show all objects in the view layer"},
3695  {SO_FILTER_OB_VISIBLE, "VISIBLE", 0, "Visible", "Show visible objects"},
3696  {SO_FILTER_OB_SELECTED, "SELECTED", 0, "Selected", "Show selected objects"},
3697  {SO_FILTER_OB_ACTIVE, "ACTIVE", 0, "Active", "Show only the active object"},
3698  {SO_FILTER_OB_SELECTABLE, "SELECTABLE", 0, "Selectable", "Show only selectable objects"},
3699  {0, NULL, 0, NULL, NULL},
3700  };
3701 
3702  srna = RNA_def_struct(brna, "SpaceOutliner", "Space");
3703  RNA_def_struct_sdna(srna, "SpaceOutliner");
3704  RNA_def_struct_ui_text(srna, "Space Outliner", "Outliner space data");
3705 
3706  prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
3707  RNA_def_property_enum_sdna(prop, NULL, "outlinevis");
3708  RNA_def_property_enum_items(prop, display_mode_items);
3709  RNA_def_property_ui_text(prop, "Display Mode", "Type of information to display");
3711 
3712  prop = RNA_def_property(srna, "lib_override_view_mode", PROP_ENUM, PROP_NONE);
3713  RNA_def_property_enum_items(prop, lib_override_view_mode);
3715  "Library Override View Mode",
3716  "Choose different visualizations of library override data");
3718 
3719  prop = RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE);
3720  RNA_def_property_string_sdna(prop, NULL, "search_string");
3721  RNA_def_property_ui_text(prop, "Display Filter", "Live search filtering string");
3724 
3725  prop = RNA_def_property(srna, "use_filter_case_sensitive", PROP_BOOLEAN, PROP_NONE);
3728  prop, "Case Sensitive Matches Only", "Only use case sensitive matches of search string");
3730 
3731  prop = RNA_def_property(srna, "use_filter_complete", PROP_BOOLEAN, PROP_NONE);
3732  RNA_def_property_boolean_sdna(prop, NULL, "search_flags", SO_FIND_COMPLETE);
3734  prop, "Complete Matches Only", "Only use complete matches of search string");
3736 
3737  prop = RNA_def_property(srna, "use_sort_alpha", PROP_BOOLEAN, PROP_NONE);
3739  RNA_def_property_ui_text(prop, "Sort Alphabetically", "");
3741 
3742  prop = RNA_def_property(srna, "use_sync_select", PROP_BOOLEAN, PROP_NONE);
3745  prop, "Sync Outliner Selection", "Sync outliner selection with other editors");
3747 
3748  prop = RNA_def_property(srna, "show_mode_column", PROP_BOOLEAN, PROP_NONE);
3751  prop, "Show Mode Column", "Show the mode column for mode toggle and activation");
3753 
3754  /* Granular restriction column option. */
3755  prop = RNA_def_property(srna, "show_restrict_column_enable", PROP_BOOLEAN, PROP_NONE);
3756  RNA_def_property_boolean_sdna(prop, NULL, "show_restrict_flags", SO_RESTRICT_ENABLE);
3757  RNA_def_property_ui_text(prop, "Exclude from View Layer", "Exclude from view layer");
3758  RNA_def_property_ui_icon(prop, ICON_CHECKBOX_HLT, 0);
3760 
3761  prop = RNA_def_property(srna, "show_restrict_column_select", PROP_BOOLEAN, PROP_NONE);
3762  RNA_def_property_boolean_sdna(prop, NULL, "show_restrict_flags", SO_RESTRICT_SELECT);
3763  RNA_def_property_ui_text(prop, "Selectable", "Selectable");
3764  RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, 0);
3766 
3767  prop = RNA_def_property(srna, "show_restrict_column_hide", PROP_BOOLEAN, PROP_NONE);
3768  RNA_def_property_boolean_sdna(prop, NULL, "show_restrict_flags", SO_RESTRICT_HIDE);
3769  RNA_def_property_ui_text(prop, "Hide in Viewport", "Temporarily hide in viewport");
3770  RNA_def_property_ui_icon(prop, ICON_HIDE_OFF, 0);
3772 
3773  prop = RNA_def_property(srna, "show_restrict_column_viewport", PROP_BOOLEAN, PROP_NONE);
3774  RNA_def_property_boolean_sdna(prop, NULL, "show_restrict_flags", SO_RESTRICT_VIEWPORT);
3775  RNA_def_property_ui_text(prop, "Disable in Viewports", "Globally disable in viewports");
3776  RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 0);
3778 
3779  prop = RNA_def_property(srna, "show_restrict_column_render", PROP_BOOLEAN, PROP_NONE);
3780  RNA_def_property_boolean_sdna(prop, NULL, "show_restrict_flags", SO_RESTRICT_RENDER);
3781  RNA_def_property_ui_text(prop, "Disable in Renders", "Globally disable in renders");
3782  RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 0);
3784 
3785  prop = RNA_def_property(srna, "show_restrict_column_holdout", PROP_BOOLEAN, PROP_NONE);
3786  RNA_def_property_boolean_sdna(prop, NULL, "show_restrict_flags", SO_RESTRICT_HOLDOUT);
3787  RNA_def_property_ui_text(prop, "Holdout", "Holdout");
3788  RNA_def_property_ui_icon(prop, ICON_HOLDOUT_ON, 0);
3790 
3791  prop = RNA_def_property(srna, "show_restrict_column_indirect_only", PROP_BOOLEAN, PROP_NONE);
3792  RNA_def_property_boolean_sdna(prop, NULL, "show_restrict_flags", SO_RESTRICT_INDIRECT_ONLY);
3793  RNA_def_property_ui_text(prop, "Indirect Only", "Indirect only");
3794  RNA_def_property_ui_icon(prop, ICON_INDIRECT_ONLY_ON, 0);
3796 
3797  /* Filters. */
3798  prop = RNA_def_property(srna, "use_filter_object", PROP_BOOLEAN, PROP_NONE);
3800  RNA_def_property_ui_text(prop, "Filter Objects", "Show objects");
3802 
3803  prop = RNA_def_property(srna, "use_filter_object_content", PROP_BOOLEAN, PROP_NONE);
3806  prop, "Show Object Contents", "Show what is inside the objects elements");
3808 
3809  prop = RNA_def_property(srna, "use_filter_children", PROP_BOOLEAN, PROP_NONE);
3811  RNA_def_property_ui_text(prop, "Show Object Children", "Show children");
3813 
3814  prop = RNA_def_property(srna, "use_filter_collection", PROP_BOOLEAN, PROP_NONE);
3816  RNA_def_property_ui_text(prop, "Show Collections", "Show collections");
3818 
3819  prop = RNA_def_property(srna, "use_filter_view_layers", PROP_BOOLEAN, PROP_NONE);
3821  RNA_def_property_ui_text(prop, "Show All View Layers", "Show all the view layers");
3823 
3824  /* Filters object state. */
3825  prop = RNA_def_property(srna, "filter_state", PROP_ENUM, PROP_NONE);
3826  RNA_def_property_enum_sdna(prop, NULL, "filter_state");
3827  RNA_def_property_enum_items(prop, filter_state_items);
3828  RNA_def_property_ui_text(prop, "Object State Filter", "");
3830 
3831  prop = RNA_def_property(srna, "filter_invert", PROP_BOOLEAN, PROP_NONE);
3833  RNA_def_property_ui_text(prop, "Invert", "Invert the object state filter");
3835 
3836  /* Filters object type. */
3837  prop = RNA_def_property(srna, "use_filter_object_mesh", PROP_BOOLEAN, PROP_NONE);
3839  RNA_def_property_ui_text(prop, "Show Meshes", "Show mesh objects");
3841 
3842  prop = RNA_def_property(srna, "use_filter_object_armature", PROP_BOOLEAN, PROP_NONE);
3844  RNA_def_property_ui_text(prop, "Show Armatures", "Show armature objects");
3846 
3847  prop = RNA_def_property(srna, "use_filter_object_empty", PROP_BOOLEAN, PROP_NONE);
3849  RNA_def_property_ui_text(prop, "Show Empties", "Show empty objects");
3851 
3852  prop = RNA_def_property(srna, "use_filter_object_light", PROP_BOOLEAN, PROP_NONE);
3854  RNA_def_property_ui_text(prop, "Show Lights", "Show light objects");
3856 
3857  prop = RNA_def_property(srna, "use_filter_object_camera", PROP_BOOLEAN, PROP_NONE);
3859  RNA_def_property_ui_text(prop, "Show Cameras", "Show camera objects");
3861 
3862  prop = RNA_def_property(srna, "use_filter_object_others", PROP_BOOLEAN, PROP_NONE);
3865  prop, "Show Other Objects", "Show curves, lattices, light probes, fonts, ...");
3867 
3868  /* Libraries filter. */
3869  prop = RNA_def_property(srna, "use_filter_id_type", PROP_BOOLEAN, PROP_NONE);
3871  RNA_def_property_ui_text(prop, "Filter by Type", "Show only data-blocks of one type");
3873 
3874  prop = RNA_def_property(srna, "filter_id_type", PROP_ENUM, PROP_NONE);
3875  RNA_def_property_enum_sdna(prop, NULL, "filter_id_type");
3877  RNA_def_property_ui_text(prop, "Filter by Type", "Data-block type to show");
3879 
3880  prop = RNA_def_property(srna, "use_filter_lib_override_system", PROP_BOOLEAN, PROP_NONE);
3883  prop,
3884  "Show System Overrides",
3885  "For libraries with overrides created, show the overridden values that are "
3886  "defined/controlled automatically (e.g. to make users of an overridden data-block point to "
3887  "the override data, not the original linked data)");
3889 }
3890 
3892 {
3893  StructRNA *srna;
3894  PropertyRNA *prop;
3895 
3896  static const EnumPropertyItem background_type_items[] = {
3897  {V3D_SHADING_BACKGROUND_THEME, "THEME", 0, "Theme", "Use the theme for background color"},
3898  {V3D_SHADING_BACKGROUND_WORLD, "WORLD", 0, "World", "Use the world for background color"},
3900  "VIEWPORT",
3901  0,
3902  "Viewport",
3903  "Use a custom color limited to this viewport only"},
3904  {0, NULL, 0, NULL, NULL},
3905  };
3906 
3907  static const EnumPropertyItem cavity_type_items[] = {
3909  "WORLD",
3910  0,
3911  "World",
3912  "Cavity shading computed in world space, useful for larger-scale occlusion"},
3914  "SCREEN",
3915  0,
3916  "Screen",
3917  "Curvature-based shading, useful for making fine details more visible"},
3918  {V3D_SHADING_CAVITY_BOTH, "BOTH", 0, "Both", "Use both effects simultaneously"},
3919  {0, NULL, 0, NULL, NULL},
3920  };
3921 
3922  /* Note these settings are used for both 3D viewport and the OpenGL render
3923  * engine in the scene, so can't assume to always be part of a screen. */
3924  srna = RNA_def_struct(brna, "View3DShading", NULL);
3925  RNA_def_struct_path_func(srna, "rna_View3DShading_path");
3927  srna, "3D View Shading Settings", "Settings for shading in the 3D viewport");
3928  RNA_def_struct_idprops_func(srna, "rna_View3DShading_idprops");
3929 
3930  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
3933  "rna_3DViewShading_type_get",
3934  "rna_3DViewShading_type_set",
3935  "rna_3DViewShading_type_itemf");
3937  prop, "Viewport Shading", "Method to display/shade objects in the 3D View");
3939  prop, NC_SPACE | ND_SPACE_VIEW3D | NS_VIEW3D_SHADING, "rna_3DViewShading_type_update");
3940 
3941  prop = RNA_def_property(srna, "light", PROP_ENUM, PROP_NONE);
3942  RNA_def_property_enum_sdna(prop, NULL, "light");
3944  RNA_def_property_ui_text(prop, "Lighting", "Lighting Method for Solid/Texture Viewport Shading");
3946 
3947  prop = RNA_def_property(srna, "show_object_outline", PROP_BOOLEAN, PROP_NONE);
3950  RNA_def_property_ui_text(prop, "Outline", "Show Object Outline");
3952 
3953  prop = RNA_def_property(srna, "studio_light", PROP_ENUM, PROP_NONE);
3957  "rna_View3DShading_studio_light_get",
3958  "rna_View3DShading_studio_light_set",
3959  "rna_View3DShading_studio_light_itemf");
3960  RNA_def_property_ui_text(prop, "Studiolight", "Studio lighting setup");
3962 
3963  prop = RNA_def_property(srna, "use_world_space_lighting", PROP_BOOLEAN, PROP_NONE);
3967  prop, "World Space Lighting", "Make the lighting fixed and not follow the camera");
3969 
3970  prop = RNA_def_property(srna, "show_backface_culling", PROP_BOOLEAN, PROP_NONE);
3973  prop, "Backface Culling", "Use back face culling to hide the back side of faces");
3975 
3976  prop = RNA_def_property(srna, "show_cavity", PROP_BOOLEAN, PROP_NONE);
3979  RNA_def_property_ui_text(prop, "Cavity", "Show Cavity");
3981 
3982  prop = RNA_def_property(srna, "cavity_type", PROP_ENUM, PROP_NONE);
3983  RNA_def_property_enum_items(prop, cavity_type_items);
3984  RNA_def_property_ui_text(prop, "Cavity Type", "Way to display the cavity shading");
3986 
3987  prop = RNA_def_property(srna, "curvature_ridge_factor", PROP_FLOAT, PROP_FACTOR);
3988  RNA_def_property_float_sdna(prop, NULL, "curvature_ridge_factor");
3989  RNA_def_property_ui_text(prop, "Curvature Ridge", "Factor for the curvature ridges");
3990  RNA_def_property_range(prop, 0.0f, 2.0f);
3993 
3994  prop = RNA_def_property(srna, "curvature_valley_factor", PROP_FLOAT, PROP_FACTOR);
3995  RNA_def_property_float_sdna(prop, NULL, "curvature_valley_factor");
3996  RNA_def_property_ui_text(prop, "Curvature Valley", "Factor for the curvature valleys");
3997  RNA_def_property_range(prop, 0.0f, 2.0f);
4000 
4001  prop = RNA_def_property(srna, "cavity_ridge_factor", PROP_FLOAT, PROP_FACTOR);
4002  RNA_def_property_float_sdna(prop, NULL, "cavity_ridge_factor");
4003  RNA_def_property_ui_text(prop, "Cavity Ridge", "Factor for the cavity ridges");
4004  RNA_def_property_range(prop, 0.0f, 250.0f);
4005  RNA_def_property_ui_range(prop, 0.00f, 2.5f, 1, 3);
4008 
4009  prop = RNA_def_property(srna, "cavity_valley_factor", PROP_FLOAT, PROP_FACTOR);
4010  RNA_def_property_float_sdna(prop, NULL, "cavity_valley_factor");
4011  RNA_def_property_ui_text(prop, "Cavity Valley", "Factor for the cavity valleys");
4012  RNA_def_property_range(prop, 0.0f, 250.0f);
4013  RNA_def_property_ui_range(prop, 0.00f, 2.5f, 1, 3);
4016 
4017  prop = RNA_def_property(srna, "selected_studio_light", PROP_POINTER, PROP_NONE);
4018  RNA_def_property_struct_type(prop, "StudioLight");
4020  RNA_def_property_ui_text(prop, "Studio Light", "Selected StudioLight");
4022  prop, "rna_View3DShading_selected_studio_light_get", NULL, NULL, NULL);
4025 
4026  prop = RNA_def_property(srna, "studiolight_rotate_z", PROP_FLOAT, PROP_ANGLE);
4027  RNA_def_property_float_sdna(prop, NULL, "studiolight_rot_z");
4029  prop, "Studiolight Rotation", "Rotation of the studiolight around the Z-Axis");
4030  RNA_def_property_range(prop, -M_PI, M_PI);
4033 
4034  prop = RNA_def_property(srna, "studiolight_intensity", PROP_FLOAT, PROP_FACTOR);
4035  RNA_def_property_float_sdna(prop, NULL, "studiolight_intensity");
4037  RNA_def_property_ui_text(prop, "Strength", "Strength of the studiolight");
4038  RNA_def_property_range(prop, 0.0f, FLT_MAX);
4039  RNA_def_property_ui_range(prop, 0.0f, 2.0f, 1, 3);
4041 
4042  prop = RNA_def_property(srna, "studiolight_background_alpha", PROP_FLOAT, PROP_FACTOR);
4043  RNA_def_property_float_sdna(prop, NULL, "studiolight_background");
4044  RNA_def_property_ui_text(prop, "World Opacity", "Show the studiolight in the background");
4045  RNA_def_property_range(prop, 0.0f, 1.0f);
4046  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3);
4049 
4050  prop = RNA_def_property(srna, "studiolight_background_blur", PROP_FLOAT, PROP_FACTOR);
4051  RNA_def_property_float_sdna(prop, NULL, "studiolight_blur");
4052  RNA_def_property_ui_text(prop, "Blur", "Blur the studiolight in the background");
4053  RNA_def_property_float_default(prop, 0.5f);
4054  RNA_def_property_range(prop, 0.0f, 1.0f);
4055  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 2);
4058 
4059  prop = RNA_def_property(srna, "use_studiolight_view_rotation", PROP_BOOLEAN, PROP_NONE);
4063  RNA_def_property_boolean_default(prop, false);
4065  prop, "World Space Lighting", "Make the HDR rotation fixed and not follow the camera");
4067 
4068  prop = RNA_def_property(srna, "color_type", PROP_ENUM, PROP_NONE);
4069  RNA_def_property_enum_sdna(prop, NULL, "color_type");
4071  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_View3DShading_color_type_itemf");
4072  RNA_def_property_ui_text(prop, "Color", "Color Type");
4075  prop, NC_SPACE | ND_SPACE_VIEW3D | NS_VIEW3D_SHADING, "rna_GPencil_update");
4076 
4077  prop = RNA_def_property(srna, "wireframe_color_type", PROP_ENUM, PROP_NONE);
4078  RNA_def_property_enum_sdna(prop, NULL, "wire_color_type");
4080  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_View3DShading_color_type_itemf");
4081  RNA_def_property_ui_text(prop, "Color", "Color Type");
4083 
4084  prop = RNA_def_property(srna, "single_color", PROP_FLOAT, PROP_COLOR);
4085  RNA_def_property_float_sdna(prop, NULL, "single_color");
4086  RNA_def_property_array(prop, 3);
4087  RNA_def_property_ui_text(prop, "Color", "Color for single color mode");
4088  RNA_def_property_range(prop, 0.0f, 1.0f);
4090 
4091  prop = RNA_def_property(srna, "background_type", PROP_ENUM, PROP_NONE);
4092  RNA_def_property_enum_items(prop, background_type_items);
4093  RNA_def_property_ui_text(prop, "Background", "Way to display the background");
4095 
4096  prop = RNA_def_property(srna, "background_color", PROP_FLOAT, PROP_COLOR);
4097  RNA_def_property_array(prop, 3);
4098  RNA_def_property_ui_text(prop, "Background Color", "Color for custom background color");
4099  RNA_def_property_range(prop, 0.0f, 1.0f);
4101 
4102  prop = RNA_def_property(srna, "show_shadows", PROP_BOOLEAN, PROP_NONE);
4105  RNA_def_property_ui_text(prop, "Shadow", "Show Shadow");
4107 
4108  prop = RNA_def_property(srna, "show_xray", PROP_BOOLEAN, PROP_NONE);
4111  RNA_def_property_ui_text(prop, "Show X-Ray", "Show whole scene transparent");
4113 
4114  prop = RNA_def_property(srna, "show_xray_wireframe", PROP_BOOLEAN, PROP_NONE);
4117  RNA_def_property_ui_text(prop, "Show X-Ray", "Show whole scene transparent");
4119 
4120  prop = RNA_def_property(srna, "xray_alpha", PROP_FLOAT, PROP_FACTOR);
4121  RNA_def_property_float_sdna(prop, NULL, "xray_alpha");
4122  RNA_def_property_ui_text(prop, "X-Ray Alpha", "Amount of alpha to use");
4123  RNA_def_property_range(prop, 0.0f, 1.0f);
4126 
4127  prop = RNA_def_property(srna, "xray_alpha_wireframe", PROP_FLOAT, PROP_FACTOR);
4128  RNA_def_property_float_sdna(prop, NULL, "xray_alpha_wire");
4129  RNA_def_property_ui_text(prop, "X-Ray Alpha", "Amount of alpha to use");
4130  RNA_def_property_range(prop, 0.0f, 1.0f);
4133 
4134  prop = RNA_def_property(srna, "use_dof", PROP_BOOLEAN, PROP_NONE);
4138  prop,
4139  "Depth Of Field",
4140  "Use depth of field on viewport using the values from the active camera");
4142 
4143  prop = RNA_def_property(srna, "use_scene_lights", PROP_BOOLEAN, PROP_NONE);
4145  RNA_def_property_boolean_default(prop, false);
4147  RNA_def_property_ui_text(prop, "Scene Lights", "Render lights and light probes of the scene");
4149 
4150  prop = RNA_def_property(srna, "use_scene_world", PROP_BOOLEAN, PROP_NONE);
4152  RNA_def_property_boolean_default(prop, false);
4154  RNA_def_property_ui_text(prop, "Scene World", "Use scene world for lighting");
4156 
4157  prop = RNA_def_property(srna, "use_scene_lights_render", PROP_BOOLEAN, PROP_NONE);
4160  RNA_def_property_ui_text(prop, "Scene Lights", "Render lights and light probes of the scene");
4162 
4163  prop = RNA_def_property(srna, "use_scene_world_render", PROP_BOOLEAN, PROP_NONE);
4166  RNA_def_property_ui_text(prop, "Scene World", "Use scene world for lighting");
4168 
4169  prop = RNA_def_property(srna, "show_specular_highlight", PROP_BOOLEAN, PROP_NONE);
4172  RNA_def_property_ui_text(prop, "Specular Highlights", "Render specular highlights");
4174 
4175  prop = RNA_def_property(srna, "object_outline_color", PROP_FLOAT, PROP_COLOR);
4176  RNA_def_property_float_sdna(prop, NULL, "object_outline_color");
4177  RNA_def_property_array(prop, 3);
4178  RNA_def_property_ui_text(prop, "Outline Color", "Color for object outline");
4179  RNA_def_property_range(prop, 0.0f, 1.0f);
4181 
4182  prop = RNA_def_property(srna, "shadow_intensity", PROP_FLOAT, PROP_FACTOR);
4183  RNA_def_property_float_sdna(prop, NULL, "shadow_intensity");
4184  RNA_def_property_ui_text(prop, "Shadow Intensity", "Darkness of shadows");
4185  RNA_def_property_range(prop, 0.0f, 1.0f);
4186  RNA_def_property_ui_range(prop, 0.00f, 1.0f, 1, 3);
4189 
4190  prop = RNA_def_property(srna, "render_pass", PROP_ENUM, PROP_NONE);
4191  RNA_def_property_enum_sdna(prop, NULL, "render_pass");
4193  RNA_def_property_ui_text(prop, "Render Pass", "Render Pass to show in the viewport");
4195  "rna_3DViewShading_render_pass_get",
4196  "rna_3DViewShading_render_pass_set",
4197  "rna_3DViewShading_render_pass_itemf");
4199 
4200  prop = RNA_def_property(srna, "aov_name", PROP_STRING, PROP_NONE);
4201  RNA_def_property_string_sdna(prop, NULL, "aov_name");
4202  RNA_def_property_ui_text(prop, "Shader AOV Name", "Name of the active Shader AOV");
4205 }
4206 
4208 {
4209  StructRNA *srna;
4210  PropertyRNA *prop;
4211 
4212  srna = RNA_def_struct(brna, "View3DOverlay", NULL);
4213  RNA_def_struct_sdna(srna, "View3D");
4214  RNA_def_struct_nested(brna, srna, "SpaceView3D");
4215  RNA_def_struct_path_func(srna, "rna_View3DOverlay_path");
4217  srna, "3D View Overlay Settings", "Settings for display of overlays in the 3D viewport");
4218 
4219  prop = RNA_def_property(srna, "show_overlays", PROP_BOOLEAN, PROP_NONE);
4221  RNA_def_property_ui_text(prop, "Show Overlays", "Display overlays like gizmos and outlines");
4222  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4223 
4224  prop = RNA_def_property(srna, "show_ortho_grid", PROP_BOOLEAN, PROP_NONE);
4226  RNA_def_property_ui_text(prop, "Display Grid", "Show grid in orthographic side view");
4228 
4229  prop = RNA_def_property(srna, "show_floor", PROP_BOOLEAN, PROP_NONE);
4231  RNA_def_property_ui_text(prop, "Display Grid Floor", "Show the ground plane grid");
4233 
4234  prop = RNA_def_property(srna, "show_axis_x", PROP_BOOLEAN, PROP_NONE);
4235  RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_X);
4236  RNA_def_property_ui_text(prop, "Display X Axis", "Show the X axis line");
4238 
4239  prop = RNA_def_property(srna, "show_axis_y", PROP_BOOLEAN, PROP_NONE);
4240  RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Y);
4241  RNA_def_property_ui_text(prop, "Display Y Axis", "Show the Y axis line");
4243 
4244  prop = RNA_def_property(srna, "show_axis_z", PROP_BOOLEAN, PROP_NONE);
4245  RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Z);
4246  RNA_def_property_ui_text(prop, "Display Z Axis", "Show the Z axis line");
4248 
4249  prop = RNA_def_property(srna, "grid_scale", PROP_FLOAT, PROP_NONE);
4250  RNA_def_property_float_sdna(prop, NULL, "grid");
4252  prop, "Grid Scale", "Multiplier for the distance between 3D View grid lines");
4253  RNA_def_property_range(prop, 0.0f, FLT_MAX);
4254  RNA_def_property_ui_range(prop, 0.001f, 1000.0f, 0.1f, 3);
4256 
4257  prop = RNA_def_property(srna, "grid_lines", PROP_INT, PROP_NONE);
4258  RNA_def_property_int_sdna(prop, NULL, "gridlines");
4260  prop, "Grid Lines", "Number of grid lines to display in perspective view");
4261  RNA_def_property_range(prop, 0, 1024);
4263 
4264  prop = RNA_def_property(srna, "grid_subdivisions", PROP_INT, PROP_NONE);
4265  RNA_def_property_int_sdna(prop, NULL, "gridsubdiv");
4266  RNA_def_property_ui_text(prop, "Grid Subdivisions", "Number of subdivisions between grid lines");
4267  RNA_def_property_range(prop, 1, 1024);
4269 
4270  prop = RNA_def_property(srna, "grid_scale_unit", PROP_FLOAT, PROP_NONE);
4272  RNA_def_property_float_funcs(prop, "rna_View3DOverlay_GridScaleUnit_get", NULL, NULL);
4274  prop, "Grid Scale Unit", "Grid cell size scaled by scene unit system settings");
4275 
4276  prop = RNA_def_property(srna, "show_outline_selected", PROP_BOOLEAN, PROP_NONE);
4279  prop, "Outline Selected", "Show an outline highlight around selected objects");
4281 
4282  prop = RNA_def_property(srna, "show_object_origins", PROP_BOOLEAN, PROP_NONE);
4284  prop, NULL, "overlay.flag", V3D_OVERLAY_HIDE_OBJECT_ORIGINS);
4285  RNA_def_property_ui_text(prop, "Object Origins", "Show object center dots");
4287 
4288  prop = RNA_def_property(srna, "show_object_origins_all", PROP_BOOLEAN, PROP_NONE);
4291  prop,
4292  "All Object Origins",
4293  "Show the object origin center dot for all (selected and unselected) objects");
4295 
4296  prop = RNA_def_property(srna, "show_relationship_lines", PROP_BOOLEAN, PROP_NONE);
4299  "Relationship Lines",
4300  "Show dashed lines indicating parent or constraint relationships");
4302 
4303  prop = RNA_def_property(srna, "show_cursor", PROP_BOOLEAN, PROP_NONE);
4305  RNA_def_property_ui_text(prop, "Show 3D Cursor", "Display 3D Cursor Overlay");
4307 
4308  prop = RNA_def_property(srna, "show_text", PROP_BOOLEAN, PROP_NONE);
4310  RNA_def_property_ui_text(prop, "Show Text", "Display overlay text");
4312 
4313  prop = RNA_def_property(srna, "show_stats", PROP_BOOLEAN, PROP_NONE);
4314  RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", V3D_OVERLAY_STATS);
4315  RNA_def_property_ui_text(prop, "Show Statistics", "Display scene statistics overlay text");
4317 
4318  prop = RNA_def_property(srna, "show_extras", PROP_BOOLEAN, PROP_NONE);
4320  prop, NULL, "overlay.flag", V3D_OVERLAY_HIDE_OBJECT_XTRAS);
4322  prop, "Extras", "Object details, including empty wire, cameras and other visual guides");
4324 
4325  prop = RNA_def_property(srna, "show_bones", PROP_BOOLEAN, PROP_NONE);
4328  prop, "Show Bones", "Display bones (disable to show motion paths only)");
4330 
4331  prop = RNA_def_property(srna, "show_face_orientation", PROP_BOOLEAN, PROP_NONE);
4334  RNA_def_property_ui_text(prop, "Face Orientation", "Show the Face Orientation Overlay");
4336 
4337  prop = RNA_def_property(srna, "show_fade_inactive", PROP_BOOLEAN, PROP_NONE);
4341  prop, "Fade Inactive Objects", "Fade inactive geometry using the viewport background color");
4343 
4344  prop = RNA_def_property(srna, "fade_inactive_alpha", PROP_FLOAT, PROP_FACTOR);
4345  RNA_def_property_float_sdna(prop, NULL, "overlay.fade_alpha");
4346  RNA_def_property_ui_text(prop, "Opacity", "Strength of the fade effect");
4347  RNA_def_property_range(prop, 0.0f, 1.0f);
4349  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4350 
4351  prop = RNA_def_property(srna, "show_xray_bone", PROP_BOOLEAN, PROP_NONE);
4354  RNA_def_property_ui_text(prop, "Show Bone X-Ray", "Show the bone selection overlay");
4355  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4356 
4357  prop = RNA_def_property(srna, "xray_alpha_bone", PROP_FLOAT, PROP_FACTOR);
4358  RNA_def_property_float_sdna(prop, NULL, "overlay.xray_alpha_bone");
4359  RNA_def_property_ui_text(prop, "Opacity", "Opacity to use for bone selection");
4360  RNA_def_property_range(prop, 0.0f, 1.0f);
4362  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4363 
4364  prop = RNA_def_property(srna, "bone_wire_alpha", PROP_FLOAT, PROP_FACTOR);
4365  RNA_def_property_float_sdna(prop, NULL, "overlay.bone_wire_alpha");
4367  prop, "Bone Wireframe Opacity", "Maximum opacity of bones in wireframe display mode");
4368  RNA_def_property_range(prop, 0.0f, FLT_MAX);
4369  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 2);
4371  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4372 
4373  prop = RNA_def_property(srna, "show_motion_paths", PROP_BOOLEAN, PROP_NONE);
4375  prop, NULL, "overlay.flag", V3D_OVERLAY_HIDE_MOTION_PATHS);
4377  RNA_def_property_ui_text(prop, "Motion Paths", "Show the Motion Paths Overlay");
4379 
4380  prop = RNA_def_property(srna, "show_onion_skins", PROP_BOOLEAN, PROP_NONE);
4383  RNA_def_property_ui_text(prop, "Onion Skins", "Show the Onion Skinning Overlay");
4385 
4386  prop = RNA_def_property(srna, "show_look_dev", PROP_BOOLEAN, PROP_NONE);
4389  RNA_def_property_ui_text(prop, "HDRI Preview", "Show HDRI preview spheres");
4391 
4392  prop = RNA_def_property(srna, "show_wireframes", PROP_BOOLEAN, PROP_NONE);
4395  RNA_def_property_ui_text(prop, "Wireframe", "Show face edges wires");
4397 
4398  prop = RNA_def_property(srna, "wireframe_threshold", PROP_FLOAT, PROP_FACTOR);
4399  RNA_def_property_float_sdna(prop, NULL, "overlay.wireframe_threshold");
4401  "Wireframe Threshold",
4402  "Adjust the angle threshold for displaying edges "
4403  "(1.0 for all)");
4404  RNA_def_property_range(prop, 0.0f, 1.0f);
4407 
4408  prop = RNA_def_property(srna, "wireframe_opacity", PROP_FLOAT, PROP_FACTOR);
4409  RNA_def_property_float_sdna(prop, NULL, "overlay.wireframe_opacity");
4411  "Wireframe Opacity",
4412  "Opacity of the displayed edges "
4413  "(1.0 for opaque)");
4414  RNA_def_property_range(prop, 0.0f, 1.0f);
4417 
4418  prop = RNA_def_property(srna, "show_paint_wire", PROP_BOOLEAN, PROP_NONE);
4419  RNA_def_property_boolean_sdna(prop, NULL, "overlay.paint_flag", V3D_OVERLAY_PAINT_WIRE);
4420  RNA_def_property_ui_text(prop, "Show Wire", "Use wireframe display in painting modes");
4422 
4423  prop = RNA_def_property(srna, "show_wpaint_contours", PROP_BOOLEAN, PROP_NONE);
4424  RNA_def_property_boolean_sdna(prop, NULL, "overlay.wpaint_flag", V3D_OVERLAY_WPAINT_CONTOURS);
4426  prop,
4427  "Show Weight Contours",
4428  "Show contour lines formed by points with the same interpolated weight");
4430 
4431  prop = RNA_def_property(srna, "show_weight", PROP_BOOLEAN, PROP_NONE);
4432  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_WEIGHT);
4433  RNA_def_property_ui_text(prop, "Show Weights", "Display weights in editmode");
4435 
4436  prop = RNA_def_property(srna, "show_occlude_wire", PROP_BOOLEAN, PROP_NONE);
4438  RNA_def_property_ui_text(prop, "Hidden Wire", "Use hidden wireframe display");
4440 
4441  prop = RNA_def_property(srna, "show_face_normals", PROP_BOOLEAN, PROP_NONE);
4443  RNA_def_property_ui_text(prop, "Display Normals", "Display face normals as lines");
4445 
4446  prop = RNA_def_property(srna, "show_vertex_normals", PROP_BOOLEAN, PROP_NONE);
4448  RNA_def_property_ui_text(prop, "Display Vertex Normals", "Display vertex normals as lines");
4450 
4451  prop = RNA_def_property(srna, "show_split_normals", PROP_BOOLEAN, PROP_NONE);
4454  prop, "Display Split Normals", "Display vertex-per-face normals as lines");
4456 
4457  prop = RNA_def_property(srna, "show_edges", PROP_BOOLEAN, PROP_NONE);
4458  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_EDGES);
4459  RNA_def_property_ui_text(prop, "Display Edges", "Highlight selected edges");
4461 
4462  prop = RNA_def_property(srna, "show_faces", PROP_BOOLEAN, PROP_NONE);
4463  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_FACES);
4464  RNA_def_property_ui_text(prop, "Display Faces", "Highlight selected faces");
4466 
4467  prop = RNA_def_property(srna, "show_face_center", PROP_BOOLEAN, PROP_NONE);
4468  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_FACE_DOT);
4470  prop,
4471  "Display Face Center",
4472  "Display face center when face selection is enabled in solid shading modes");
4474 
4475  prop = RNA_def_property(srna, "show_edge_crease", PROP_BOOLEAN, PROP_NONE);
4476  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_CREASES);
4478  prop, "Display Creases", "Display creases created for Subdivision Surface modifier");
4480 
4481  prop = RNA_def_property(srna, "show_edge_bevel_weight", PROP_BOOLEAN, PROP_NONE);
4482  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_BWEIGHTS);
4484  prop, "Display Bevel Weights", "Display weights created for the Bevel modifier");
4486 
4487  prop = RNA_def_property(srna, "show_edge_seams", PROP_BOOLEAN, PROP_NONE);
4488  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_SEAMS);
4489  RNA_def_property_ui_text(prop, "Display Seams", "Display UV unwrapping seams");
4491 
4492  prop = RNA_def_property(srna, "show_edge_sharp", PROP_BOOLEAN, PROP_NONE);
4493  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_SHARP);
4495  prop, "Display Sharp", "Display sharp edges, used with the Edge Split modifier");
4497 
4498  prop = RNA_def_property(srna, "show_freestyle_edge_marks", PROP_BOOLEAN, PROP_NONE);
4501  "Display Freestyle Edge Marks",
4502  "Display Freestyle edge marks, used with the Freestyle renderer");
4504 
4505  prop = RNA_def_property(srna, "show_freestyle_face_marks", PROP_BOOLEAN, PROP_NONE);
4508  "Display Freestyle Face Marks",
4509  "Display Freestyle face marks, used with the Freestyle renderer");
4511 
4512  prop = RNA_def_property(srna, "show_statvis", PROP_BOOLEAN, PROP_NONE);
4513  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_STATVIS);
4514  RNA_def_property_ui_text(prop, "Stat Vis", "Display statistical information about the mesh");
4516 
4517  prop = RNA_def_property(srna, "show_extra_edge_length", PROP_BOOLEAN, PROP_NONE);
4518  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_EDGE_LEN);
4520  prop,
4521  "Edge Length",
4522  "Display selected edge lengths, using global values when set in the transform panel");
4524 
4525  prop = RNA_def_property(srna, "show_extra_edge_angle", PROP_BOOLEAN, PROP_NONE);
4526  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_EDGE_ANG);
4528  prop,
4529  "Edge Angle",
4530  "Display selected edge angle, using global values when set in the transform panel");
4532 
4533  prop = RNA_def_property(srna, "show_extra_face_angle", PROP_BOOLEAN, PROP_NONE);
4534  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_FACE_ANG);
4536  "Face Angles",
4537  "Display the angles in the selected edges, "
4538  "using global values when set in the transform panel");
4540 
4541  prop = RNA_def_property(srna, "show_extra_face_area", PROP_BOOLEAN, PROP_NONE);
4542  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_FACE_AREA);
4544  "Face Area",
4545  "Display the area of selected faces, "
4546  "using global values when set in the transform panel");
4548 
4549  prop = RNA_def_property(srna, "show_extra_indices", PROP_BOOLEAN, PROP_NONE);
4550  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_INDICES);
4552  prop, "Indices", "Display the index numbers of selected vertices, edges, and faces");
4554 
4555  prop = RNA_def_property(srna, "display_handle", PROP_ENUM, PROP_NONE);
4556  RNA_def_property_enum_sdna(prop, NULL, "overlay.handle_display");
4559  prop, "Display Handles", "Limit the display of curve handles in edit mode");
4560  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4561 
4562  prop = RNA_def_property(srna, "show_curve_normals", PROP_BOOLEAN, PROP_NONE);
4563  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_CU_NORMALS);
4564  RNA_def_property_ui_text(prop, "Draw Normals", "Display 3D curve normals in editmode");
4566 
4567  prop = RNA_def_property(srna, "normals_length", PROP_FLOAT, PROP_FACTOR);
4568  RNA_def_property_float_sdna(prop, NULL, "overlay.normals_length");
4569  RNA_def_property_ui_text(prop, "Normal Size", "Display size for normals in the 3D view");
4570  RNA_def_property_range(prop, 0.00001, 100000.0);
4571  RNA_def_property_ui_range(prop, 0.01, 2.0, 1, 2);
4572  RNA_def_property_float_default(prop, 0.02);
4574 
4575  prop = RNA_def_property(srna, "normals_constant_screen_size", PROP_FLOAT, PROP_PIXEL);
4576  RNA_def_property_float_sdna(prop, NULL, "overlay.normals_constant_screen_size");
4577  RNA_def_property_ui_text(prop, "Normal Screen Size", "Screen size for normals in the 3D view");
4578  RNA_def_property_range(prop, 0.0, 100000.0);
4579  RNA_def_property_ui_range(prop, 1.0, 100.0, 50, 0);
4581 
4582  prop = RNA_def_property(srna, "use_normals_constant_screen_size", PROP_BOOLEAN, PROP_NONE);
4584  prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_CONSTANT_SCREEN_SIZE_NORMALS);
4586  "Constant Screen Size Normals",
4587  "Keep size of normals constant in relation to 3D view");
4589 
4590  prop = RNA_def_property(srna, "backwire_opacity", PROP_FLOAT, PROP_FACTOR);
4591  RNA_def_property_float_sdna(prop, NULL, "overlay.backwire_opacity");
4592  RNA_def_property_ui_text(prop, "Backwire Opacity", "Opacity when rendering transparent wires");
4593  RNA_def_property_range(prop, 0.0f, 1.0f);
4595 
4596  prop = RNA_def_property(srna, "texture_paint_mode_opacity", PROP_FLOAT, PROP_FACTOR);
4597  RNA_def_property_float_sdna(prop, NULL, "overlay.texture_paint_mode_opacity");
4599  prop, "Stencil Mask Opacity", "Opacity of the texture paint mode stencil mask overlay");
4600  RNA_def_property_range(prop, 0.0f, 1.0f);
4602 
4603  prop = RNA_def_property(srna, "vertex_paint_mode_opacity", PROP_FLOAT, PROP_FACTOR);
4604  RNA_def_property_float_sdna(prop, NULL, "overlay.vertex_paint_mode_opacity");
4606  prop, "Stencil Mask Opacity", "Opacity of the texture paint mode stencil mask overlay");
4607  RNA_def_property_range(prop, 0.0f, 1.0f);
4609 
4610  prop = RNA_def_property(srna, "weight_paint_mode_opacity", PROP_FLOAT, PROP_FACTOR);
4611  RNA_def_property_float_sdna(prop, NULL, "overlay.weight_paint_mode_opacity");
4613  prop, "Weight Paint Opacity", "Opacity of the weight paint mode overlay");
4614  RNA_def_property_range(prop, 0.0f, 1.0f);
4616 
4617  prop = RNA_def_property(srna, "sculpt_mode_mask_opacity", PROP_FLOAT, PROP_FACTOR);
4618  RNA_def_property_float_sdna(prop, NULL, "overlay.sculpt_mode_mask_opacity");
4619  RNA_def_property_ui_text(prop, "Sculpt Mask Opacity", "");
4620  RNA_def_property_range(prop, 0.0f, 1.0f);
4622 
4623  prop = RNA_def_property(srna, "sculpt_mode_face_sets_opacity", PROP_FLOAT, PROP_FACTOR);
4624  RNA_def_property_float_sdna(prop, NULL, "overlay.sculpt_mode_face_sets_opacity");
4625  RNA_def_property_ui_text(prop, "Sculpt Face Sets Opacity", "");
4626  RNA_def_property_range(prop, 0.0f, 1.0f);
4628 
4629  /* grease pencil paper settings */
4630  prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE);
4632  RNA_def_property_ui_text(prop, "Show Annotation", "Show annotations for this view");
4634 
4635  prop = RNA_def_property(srna, "use_gpencil_fade_objects", PROP_BOOLEAN, PROP_NONE);
4638  prop,
4639  "Fade Objects",
4640  "Fade all viewport objects with a full color layer to improve visibility");
4642 
4643  prop = RNA_def_property(srna, "use_gpencil_grid", PROP_BOOLEAN, PROP_NONE);
4645  RNA_def_property_ui_text(prop, "Use Grid", "Display a grid over grease pencil paper");
4647 
4648  prop = RNA_def_property(srna, "use_gpencil_fade_layers", PROP_BOOLEAN, PROP_NONE);
4651  prop, "Fade Layers", "Toggle fading of Grease Pencil layers except the active one");
4652  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4653 
4654  prop = RNA_def_property(srna, "use_gpencil_fade_gp_objects", PROP_BOOLEAN, PROP_NONE);
4657  prop, "Fade Grease Pencil Objects", "Fade Grease Pencil Objects, except the active one");
4658  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4659 
4660  prop = RNA_def_property(srna, "use_gpencil_canvas_xray", PROP_BOOLEAN, PROP_NONE);
4662  RNA_def_property_ui_text(prop, "Canvas X-Ray", "Show Canvas grid in front");
4663  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4664 
4665  prop = RNA_def_property(srna, "use_gpencil_show_directions", PROP_BOOLEAN, PROP_NONE);
4668  "Stroke Direction",
4669  "Show stroke drawing direction with a bigger green dot (start) "
4670  "and smaller red dot (end) points");
4671  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4672 
4673  prop = RNA_def_property(srna, "use_gpencil_show_material_name", PROP_BOOLEAN, PROP_NONE);
4676  prop, "Stroke Material Name", "Show material name assigned to each stroke");
4677  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4678 
4679  prop = RNA_def_property(srna, "gpencil_grid_opacity", PROP_FLOAT, PROP_NONE);
4680  RNA_def_property_float_sdna(prop, NULL, "overlay.gpencil_grid_opacity");
4681  RNA_def_property_range(prop, 0.1f, 1.0f);
4682  RNA_def_property_ui_text(prop, "Opacity", "Canvas grid opacity");
4684 
4685  /* Paper opacity factor */
4686  prop = RNA_def_property(srna, "gpencil_fade_objects", PROP_FLOAT, PROP_NONE);
4687  RNA_def_property_float_sdna(prop, NULL, "overlay.gpencil_paper_opacity");
4688  RNA_def_property_range(prop, 0.0f, 1.0f);
4689  RNA_def_property_ui_text(prop, "Opacity", "Fade factor");
4691 
4692  /* Paper opacity factor */
4693  prop = RNA_def_property(srna, "gpencil_fade_layer", PROP_FLOAT, PROP_NONE);
4694  RNA_def_property_float_sdna(prop, NULL, "overlay.gpencil_fade_layer");
4695  RNA_def_property_range(prop, 0.0f, 1.0f);
4696  RNA_def_property_float_default(prop, 0.5f);
4698  prop, "Opacity", "Fade layer opacity for Grease Pencil layers except the active one");
4699  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4700 
4701  /* show edit lines */
4702  prop = RNA_def_property(srna, "use_gpencil_edit_lines", PROP_BOOLEAN, PROP_NONE);
4704  RNA_def_property_ui_text(prop, "Show Edit Lines", "Show Edit Lines when editing strokes");
4705  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4706 
4707  prop = RNA_def_property(srna, "use_gpencil_multiedit_line_only", PROP_BOOLEAN, PROP_NONE);
4709  RNA_def_property_ui_text(prop, "Lines Only", "Show Edit Lines only in multiframe");
4710  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4711 
4712  /* main grease pencil onion switch */
4713  prop = RNA_def_property(srna, "use_gpencil_onion_skin", PROP_BOOLEAN, PROP_NONE);
4716  prop, "Onion Skins", "Show ghosts of the keyframes before and after the current frame");
4717  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4718 
4719  /* vertex opacity */
4720  prop = RNA_def_property(srna, "vertex_opacity", PROP_FLOAT, PROP_FACTOR);
4721  RNA_def_property_float_sdna(prop, NULL, "vertex_opacity");
4722  RNA_def_property_range(prop, 0.0f, 1.0f);
4723  RNA_def_property_ui_text(prop, "Vertex Opacity", "Opacity for edit vertices");
4725  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, "rna_GPencil_update");
4726 
4727  /* Vertex Paint opacity factor */
4728  prop = RNA_def_property(srna, "gpencil_vertex_paint_opacity", PROP_FLOAT, PROP_FACTOR);
4729  RNA_def_property_float_sdna(prop, NULL, "overlay.gpencil_vertex_paint_opacity");
4730  RNA_def_property_range(prop, 0.0f, 1.0f);
4731  RNA_def_property_ui_text(prop, "Opacity", "Vertex Paint mix factor");
4732  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4733 }
4734 
4736 {
4737  StructRNA *srna;
4738  PropertyRNA *prop;
4739 
4740  static const EnumPropertyItem rv3d_persp_items[] = {
4741  {RV3D_PERSP, "PERSP", 0, "Perspective", ""},
4742  {RV3D_ORTHO, "ORTHO", 0, "Orthographic", ""},
4743  {RV3D_CAMOB, "CAMERA", 0, "Camera", ""},
4744  {0, NULL, 0, NULL, NULL},
4745  };
4746 
4747  static const EnumPropertyItem bundle_drawtype_items[] = {
4748  {OB_PLAINAXES, "PLAIN_AXES", 0, "Plain Axes", ""},
4749  {OB_ARROWS, "ARROWS", 0, "Arrows", ""},
4750  {OB_SINGLE_ARROW, "SINGLE_ARROW", 0, "Single Arrow", ""},
4751  {OB_CIRCLE, "CIRCLE", 0, "Circle", ""},
4752  {OB_CUBE, "CUBE", 0, "Cube", ""},
4753  {OB_EMPTY_SPHERE, "SPHERE", 0, "Sphere", ""},
4754  {OB_EMPTY_CONE, "CONE", 0, "Cone", ""},
4755  {0, NULL, 0, NULL, NULL},
4756  };
4757 
4758  srna = RNA_def_struct(brna, "SpaceView3D", "Space");
4759  RNA_def_struct_sdna(srna, "View3D");
4760  RNA_def_struct_ui_text(srna, "3D View Space", "3D View space data");
4761 
4763  ((1 << RGN_TYPE_TOOL_HEADER) | (1 << RGN_TYPE_TOOLS) |
4764  (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_HUD)));
4765 
4766  prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
4768  RNA_def_property_pointer_sdna(prop, NULL, "camera");
4770  prop,
4771  "Camera",
4772  "Active camera used in this view (when unlocked from the scene's active camera)");
4773  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_camera_update");
4774 
4775  /* render border */
4776  prop = RNA_def_property(srna, "use_render_border", PROP_BOOLEAN, PROP_NONE);
4780  "Render Region",
4781  "Use a region within the frame size for rendered viewport "
4782  "(when not viewing through the camera)");
4784 
4785  prop = RNA_def_property(srna, "render_border_min_x", PROP_FLOAT, PROP_NONE);
4786  RNA_def_property_float_sdna(prop, NULL, "render_border.xmin");
4787  RNA_def_property_range(prop, 0.0f, 1.0f);
4788  RNA_def_property_ui_text(prop, "Region Minimum X", "Minimum X value for the render region");
4790 
4791  prop = RNA_def_property(srna, "render_border_min_y", PROP_FLOAT, PROP_NONE);
4792  RNA_def_property_float_sdna(prop, NULL, "render_border.ymin");
4793  RNA_def_property_range(prop, 0.0f, 1.0f);
4794  RNA_def_property_ui_text(prop, "Region Minimum Y", "Minimum Y value for the render region");
4796 
4797  prop = RNA_def_property(srna, "render_border_max_x", PROP_FLOAT, PROP_NONE);
4798  RNA_def_property_float_sdna(prop, NULL, "render_border.xmax");
4799  RNA_def_property_range(prop, 0.0f, 1.0f);
4800  RNA_def_property_ui_text(prop, "Region Maximum X", "Maximum X value for the render region");
4802 
4803  prop = RNA_def_property(srna, "render_border_max_y", PROP_FLOAT, PROP_NONE);
4804  RNA_def_property_float_sdna(prop, NULL, "render_border.ymax");
4805  RNA_def_property_range(prop, 0.0f, 1.0f);
4806  RNA_def_property_ui_text(prop, "Region Maximum Y", "Maximum Y value for the render region");
4808 
4809  prop = RNA_def_property(srna, "lock_object", PROP_POINTER, PROP_NONE);
4811  RNA_def_property_pointer_sdna(prop, NULL, "ob_center");
4813  prop, "Lock to Object", "3D View center is locked to this object's position");
4815 
4816  prop = RNA_def_property(srna, "lock_bone", PROP_STRING, PROP_NONE);
4817  RNA_def_property_string_sdna(prop, NULL, "ob_center_bone");
4819  prop, "Lock to Bone", "3D View center is locked to this bone's position");
4821 
4822  prop = RNA_def_property(srna, "lock_cursor", PROP_BOOLEAN, PROP_NONE);
4823  RNA_def_property_boolean_sdna(prop, NULL, "ob_center_cursor", 1);
4825  prop, "Lock to Cursor", "3D View center is locked to the cursor's position");
4827 
4828  prop = RNA_def_property(srna, "local_view", PROP_POINTER, PROP_NONE);
4829  RNA_def_property_pointer_sdna(prop, NULL, "localvd");
4831  prop,
4832  "Local View",
4833  "Display an isolated subset of objects, apart from the scene visibility");
4834 
4835  prop = RNA_def_property(srna, "lens", PROP_FLOAT, PROP_UNIT_CAMERA);
4836  RNA_def_property_float_sdna(prop, NULL, "lens");
4837  RNA_def_property_ui_text(prop, "Lens", "Viewport lens angle");
4838  RNA_def_property_range(prop, 1.0f, 250.0f);
4840 
4841  prop = RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE);
4842  RNA_def_property_range(prop, 1e-6f, FLT_MAX);
4843  RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 10, 3);
4845  prop, "Clip Start", "3D View near clipping distance (perspective view only)");
4847 
4848  prop = RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE);
4849  RNA_def_property_range(prop, 1e-6f, FLT_MAX);
4850  RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 10, 3);
4851  RNA_def_property_ui_text(prop, "Clip End", "3D View far clipping distance");
4853 
4854  prop = RNA_def_property(srna, "lock_camera", PROP_BOOLEAN, PROP_NONE);
4857  prop, "Lock Camera to View", "Enable view navigation within the camera view");
4859 
4860  prop = RNA_def_property(srna, "show_gizmo", PROP_BOOLEAN, PROP_NONE);
4862  RNA_def_property_ui_text(prop, "Show Gizmo", "Show gizmos of all types");
4864 
4865  prop = RNA_def_property(srna, "show_gizmo_navigate", PROP_BOOLEAN, PROP_NONE);
4867  RNA_def_property_ui_text(prop, "Navigate Gizmo", "Viewport navigation gizmo");
4869 
4870  prop = RNA_def_property(srna, "show_gizmo_context", PROP_BOOLEAN, PROP_NONE);
4872  RNA_def_property_ui_text(prop, "Context Gizmo", "Context sensitive gizmos for the active item");
4874 
4875  prop = RNA_def_property(srna, "show_gizmo_tool", PROP_BOOLEAN, PROP_NONE);
4877  RNA_def_property_ui_text(prop, "Tool Gizmo", "Active tool gizmo");
4879 
4880  /* Per object type gizmo display flags. */
4881 
4882  prop = RNA_def_property(srna, "show_gizmo_object_translate", PROP_BOOLEAN, PROP_NONE);
4884  RNA_def_property_ui_text(prop, "Show Object Location", "Gizmo to adjust location");
4886 
4887  prop = RNA_def_property(srna, "show_gizmo_object_rotate", PROP_BOOLEAN, PROP_NONE);
4889  RNA_def_property_ui_text(prop, "Show Object Rotation", "Gizmo to adjust rotation");
4891 
4892  prop = RNA_def_property(srna, "show_gizmo_object_scale", PROP_BOOLEAN, PROP_NONE);
4893  RNA_def_property_boolean_sdna(prop, NULL, "gizmo_show_object", V3D_GIZMO_SHOW_OBJECT_SCALE);
4894  RNA_def_property_ui_text(prop, "Show Object Scale", "Gizmo to adjust scale");
4896 
4897  /* Empty Object Data. */
4898  prop = RNA_def_property(srna, "show_gizmo_empty_image", PROP_BOOLEAN, PROP_NONE);
4900  RNA_def_property_ui_text(prop, "Show Empty Image", "Gizmo to adjust image size and position");
4902 
4903  prop = RNA_def_property(srna, "show_gizmo_empty_force_field", PROP_BOOLEAN, PROP_NONE);
4905  RNA_def_property_ui_text(prop, "Show Empty Force Field", "Gizmo to adjust the force field");
4907 
4908  /* Light Object Data. */
4909  prop = RNA_def_property(srna, "show_gizmo_light_size", PROP_BOOLEAN, PROP_NONE);
4910  RNA_def_property_boolean_sdna(prop, NULL, "gizmo_show_light", V3D_GIZMO_SHOW_LIGHT_SIZE);
4911  RNA_def_property_ui_text(prop, "Show Light Size", "Gizmo to adjust spot and area size");
4913 
4914  prop = RNA_def_property(srna, "show_gizmo_light_look_at", PROP_BOOLEAN, PROP_NONE);
4917  prop, "Show Light Look-At", "Gizmo to adjust the direction of the light");
4919 
4920  /* Camera Object Data. */
4921  prop = RNA_def_property(srna, "show_gizmo_camera_lens", PROP_BOOLEAN, PROP_NONE);
4922  RNA_def_property_boolean_sdna(prop, NULL, "gizmo_show_camera", V3D_GIZMO_SHOW_CAMERA_LENS);
4924  prop, "Show Camera Lens", "Gizmo to adjust camera focal length or orthographic scale");
4926 
4927  prop = RNA_def_property(srna, "show_gizmo_camera_dof_distance", PROP_BOOLEAN, PROP_NONE);
4930  "Show Camera Focus Distance",
4931  "Gizmo to adjust camera focus distance "
4932  "(depends on limits display)");
4934 
4935  prop = RNA_def_property(srna, "use_local_camera", PROP_BOOLEAN, PROP_NONE);
4936  RNA_def_property_boolean_negative_sdna(prop, NULL, "scenelock", 1);
4937  RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceView3D_use_local_camera_set");
4939  "Use Local Camera",
4940  "Use a local camera in this view, rather than scene's active camera");
4942 
4943  prop = RNA_def_property(srna, "region_3d", PROP_POINTER, PROP_NONE);
4944  RNA_def_property_struct_type(prop, "RegionView3D");
4945  RNA_def_property_pointer_funcs(prop, "rna_SpaceView3D_region_3d_get", NULL, NULL, NULL);
4947  prop, "3D Region", "3D region in this space, in case of quad view the camera region");
4948 
4949  prop = RNA_def_property(srna, "region_quadviews", PROP_COLLECTION, PROP_NONE);
4950  RNA_def_property_struct_type(prop, "RegionView3D");
4952  "rna_SpaceView3D_region_quadviews_begin",
4953  "rna_iterator_listbase_next",
4954  "rna_iterator_listbase_end",
4955  "rna_SpaceView3D_region_quadviews_get",
4956  NULL,
4957  NULL,
4958  NULL,
4959  NULL);
4961  "Quad View Regions",
4962  "3D regions (the third one defines quad view settings, "
4963  "the fourth one is same as 'region_3d')");
4964 
4965  prop = RNA_def_property(srna, "show_reconstruction", PROP_BOOLEAN, PROP_NONE);
4968  prop, "Show Reconstruction", "Display reconstruction data from active movie clip");
4970 
4971  prop = RNA_def_property(srna, "tracks_display_size", PROP_FLOAT, PROP_NONE);
4972  RNA_def_property_range(prop, 0.0, FLT_MAX);
4973  RNA_def_property_ui_range(prop, 0, 5, 1, 3);
4974  RNA_def_property_float_sdna(prop, NULL, "bundle_size");
4975  RNA_def_property_ui_text(prop, "Tracks Size", "Display size of tracks from reconstructed data");
4977 
4978  prop = RNA_def_property(srna, "tracks_display_type", PROP_ENUM, PROP_NONE);
4979  RNA_def_property_enum_sdna(prop, NULL, "bundle_drawtype");
4980  RNA_def_property_enum_items(prop, bundle_drawtype_items);
4981  RNA_def_property_ui_text(prop, "Tracks Display Type", "Viewport display style for tracks");
4983 
4984  prop = RNA_def_property(srna, "show_camera_path", PROP_BOOLEAN, PROP_NONE);
4986  RNA_def_property_ui_text(prop, "Show Camera Path", "Show reconstructed camera path");
4988 
4989  prop = RNA_def_property(srna, "show_bundle_names", PROP_BOOLEAN, PROP_NONE);
4992  prop, "Show 3D Marker Names", "Show names for reconstructed tracks objects");
4994 
4995  prop = RNA_def_property(srna, "use_local_collections", PROP_BOOLEAN, PROP_NONE);
4998  prop, "Local Collections", "Display a different set of collections in this viewport");
5001  prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_use_local_collections_update");
5002 
5003  /* Stereo Settings */
5004  prop = RNA_def_property(srna, "stereo_3d_eye", PROP_ENUM, PROP_NONE);
5005  RNA_def_property_enum_sdna(prop, NULL, "multiview_eye");
5007  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceView3D_stereo3d_camera_itemf");
5008  RNA_def_property_ui_text(prop, "Stereo Eye", "Current stereo eye being displayed");
5010 
5011  prop = RNA_def_property(srna, "stereo_3d_camera", PROP_ENUM, PROP_NONE);
5012  RNA_def_property_enum_sdna(prop, NULL, "stereo3d_camera");
5014  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceView3D_stereo3d_camera_itemf");
5015  RNA_def_property_ui_text(prop, "Camera", "");
5017 
5018  prop = RNA_def_property(srna, "show_stereo_3d_cameras", PROP_BOOLEAN, PROP_NONE);
5019  RNA_def_property_boolean_sdna(prop, NULL, "stereo3d_flag", V3D_S3D_DISPCAMERAS);
5020  RNA_def_property_ui_text(prop, "Cameras", "Show the left and right cameras");
5022 
5023  prop = RNA_def_property(srna, "show_stereo_3d_convergence_plane", PROP_BOOLEAN, PROP_NONE);
5024  RNA_def_property_boolean_sdna(prop, NULL, "stereo3d_flag", V3D_S3D_DISPPLANE);
5025  RNA_def_property_ui_text(prop, "Plane", "Show the stereo 3D convergence plane");
5027 
5028  prop = RNA_def_property(srna, "stereo_3d_convergence_plane_alpha", PROP_FLOAT, PROP_FACTOR);
5029  RNA_def_property_float_sdna(prop, NULL, "stereo3d_convergence_alpha");
5030  RNA_def_property_ui_text(prop, "Plane Alpha", "Opacity (alpha) of the convergence plane");
5032 
5033  prop = RNA_def_property(srna, "show_stereo_3d_volume", PROP_BOOLEAN, PROP_NONE);
5034  RNA_def_property_boolean_sdna(prop, NULL, "stereo3d_flag", V3D_S3D_DISPVOLUME);
5035  RNA_def_property_ui_text(prop, "Volume", "Show the stereo 3D frustum volume");
5037 
5038  prop = RNA_def_property(srna, "stereo_3d_volume_alpha", PROP_FLOAT, PROP_FACTOR);
5039  RNA_def_property_float_sdna(prop, NULL, "stereo3d_volume_alpha");
5040  RNA_def_property_ui_text(prop, "Volume Alpha", "Opacity (alpha) of the cameras' frustum volume");
5042 
5043  prop = RNA_def_property(srna, "mirror_xr_session", PROP_BOOLEAN, PROP_NONE);
5046  prop,
5047  "Mirror VR Session",
5048  "Synchronize the viewer perspective of virtual reality sessions with this 3D viewport");
5050  prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_mirror_xr_session_update");
5051 
5054 
5055  /* Helper for drawing the icon. */
5056  prop = RNA_def_property(srna, "icon_from_show_object_viewport", PROP_INT, PROP_NONE);
5058  prop, "rna_SpaceView3D_icon_from_show_object_viewport_get", NULL, NULL);
5060  RNA_def_property_ui_text(prop, "Visibility Icon", "");
5061 
5062  /* Nested Structs */
5063  prop = RNA_def_property(srna, "shading", PROP_POINTER, PROP_NONE);
5065  RNA_def_property_struct_type(prop, "View3DShading");
5066  RNA_def_property_ui_text(prop, "Shading Settings", "Settings for shading in the 3D viewport");
5067 
5068  prop = RNA_def_property(srna, "overlay", PROP_POINTER, PROP_NONE);
5070  RNA_def_property_struct_type(prop, "View3DOverlay");
5071  RNA_def_property_pointer_funcs(prop, "rna_SpaceView3D_overlay_get", NULL, NULL, NULL);
5073  prop, "Overlay Settings", "Settings for display of overlays in the 3D viewport");
5074 
5077 
5078  /* *** Animated *** */
5080  /* region */
5081 
5082  srna = RNA_def_struct(brna, "RegionView3D", NULL);
5083  RNA_def_struct_sdna(srna, "RegionView3D");
5084  RNA_def_struct_ui_text(srna, "3D View Region", "3D View region data");
5085 
5086  prop = RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_NONE);
5089  prop, "Lock Rotation", "Lock view rotation of side views to Top/Front/Right");
5090  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_update");
5091 
5092  prop = RNA_def_property(srna, "show_sync_view", PROP_BOOLEAN, PROP_NONE);
5093  RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_BOXVIEW);
5094  RNA_def_property_ui_text(prop, "Sync Zoom/Pan", "Sync view position between side views");
5095  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_update");
5096 
5097  prop = RNA_def_property(srna, "use_box_clip", PROP_BOOLEAN, PROP_NONE);
5098  RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_BOXCLIP);
5100  prop, "Clip Contents", "Clip view contents based on what is visible in other side views");
5102  prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_clip_update");
5103 
5104  prop = RNA_def_property(srna, "perspective_matrix", PROP_FLOAT, PROP_MATRIX);
5105  RNA_def_property_float_sdna(prop, NULL, "persmat");
5107  prop, PROP_EDITABLE); /* XXX: for now, it's too risky for users to do this */
5110  prop, "Perspective Matrix", "Current perspective matrix (``window_matrix * view_matrix``)");
5111 
5112  prop = RNA_def_property(srna, "window_matrix", PROP_FLOAT, PROP_MATRIX);
5113  RNA_def_property_float_sdna(prop, NULL, "winmat");
5116  RNA_def_property_ui_text(prop, "Window Matrix", "Current window matrix");
5117 
5118  prop = RNA_def_property(srna, "view_matrix", PROP_FLOAT, PROP_MATRIX);
5119  RNA_def_property_float_sdna(prop, NULL, "viewmat");
5121  RNA_def_property_float_funcs(prop, NULL, "rna_RegionView3D_view_matrix_set", NULL);
5122  RNA_def_property_ui_text(prop, "View Matrix", "Current view matrix");
5124 
5125  prop = RNA_def_property(srna, "view_perspective", PROP_ENUM, PROP_NONE);
5126  RNA_def_property_enum_sdna(prop, NULL, "persp");
5127  RNA_def_property_enum_items(prop, rv3d_persp_items);
5128  RNA_def_property_ui_text(prop, "Perspective", "View Perspective");
5130 
5131  prop = RNA_def_property(srna, "is_perspective", PROP_BOOLEAN, PROP_NONE);
5132  RNA_def_property_boolean_sdna(prop, NULL, "is_persp", 1);
5133  RNA_def_property_ui_text(prop, "Is Perspective", "");
5135 
5136  /* WARNING: Using "orthographic" in this name isn't correct and could be changed. */
5137  prop = RNA_def_property(srna, "is_orthographic_side_view", PROP_BOOLEAN, PROP_NONE);
5138  RNA_def_property_boolean_sdna(prop, NULL, "view", 0);
5140  "rna_RegionView3D_is_orthographic_side_view_get",
5141  "rna_RegionView3D_is_orthographic_side_view_set");
5143  prop,
5144  "Is Axis Aligned",
5145  "Is current view aligned to an axis "
5146  "(does not check the view is orthographic use \"is_perspective\" for that). "
5147  "Assignment sets the \"view_rotation\" to the closest axis aligned view");
5148 
5149  /* This isn't directly accessible from the UI, only an operator. */
5150  prop = RNA_def_property(srna, "use_clip_planes", PROP_BOOLEAN, PROP_NONE);
5152  RNA_def_property_ui_text(prop, "Use Clip Planes", "");
5153 
5154  prop = RNA_def_property(srna, "clip_planes", PROP_FLOAT, PROP_NONE);
5155  RNA_def_property_float_sdna(prop, NULL, "clip");
5156  RNA_def_property_multi_array(prop, 2, (int[]){6, 4});
5157  RNA_def_property_ui_text(prop, "Clip Planes", "");
5158 
5159  prop = RNA_def_property(srna, "view_location", PROP_FLOAT, PROP_TRANSLATION);
5160 # if 0
5161  RNA_def_property_float_sdna(prop, NULL, "ofs"); /* can't use because it's negated */
5162 # else
5163  RNA_def_property_array(prop, 3);
5165  prop, "rna_RegionView3D_view_location_get", "rna_RegionView3D_view_location_set", NULL);
5166 # endif
5167  RNA_def_property_ui_text(prop, "View Location", "View pivot location");
5168  RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, RNA_TRANSLATION_PREC_DEFAULT);
5170 
5171  prop = RNA_def_property(
5172  srna, "view_rotation", PROP_FLOAT, PROP_QUATERNION); /* can't use because it's inverted */
5173 # if 0
5174  RNA_def_property_float_sdna(prop, NULL, "viewquat");
5175 # else
5176  RNA_def_property_array(prop, 4);
5178  prop, "rna_RegionView3D_view_rotation_get", "rna_RegionView3D_view_rotation_set", NULL);
5179 # endif
5180  RNA_def_property_ui_text(prop, "View Rotation", "Rotation in quaternions (keep normalized)");
5182 
5183  /* not sure we need rna access to these but adding anyway */
5184  prop = RNA_def_property(srna, "view_distance", PROP_FLOAT, PROP_UNSIGNED);
5185  RNA_def_property_float_sdna(prop, NULL, "dist");
5186  RNA_def_property_ui_text(prop, "Distance", "Distance to the view location");
5188 
5189  prop = RNA_def_property(srna, "view_camera_zoom", PROP_FLOAT, PROP_UNSIGNED);
5190  RNA_def_property_float_sdna(prop, NULL, "camzoom");
5191  RNA_def_property_ui_text(prop, "Camera Zoom", "Zoom factor in camera view");
5194 
5195  prop = RNA_def_property(srna, "view_camera_offset", PROP_FLOAT, PROP_NONE);
5196  RNA_def_property_float_sdna(prop, NULL, "camdx");
5197  RNA_def_property_array(prop, 2);
5198  RNA_def_property_ui_text(prop, "Camera Offset", "View shift in camera view");
5200 
5201  RNA_api_region_view3d(srna);
5202 }
5203 
5205 {
5206  StructRNA *srna;
5207  PropertyRNA *prop;
5208 
5209  static const EnumPropertyItem tab_sync_items[] = {
5211  "ALWAYS",
5212  0,
5213  "Always",
5214  "Always change tabs when clicking an icon in an outliner"},
5216  "NEVER",
5217  0,
5218  "Never",
5219  "Never change tabs when clicking an icon in an outliner"},
5221  "AUTO",
5222  0,
5223  "Auto",
5224  "Change tabs only when this editor shares a border with an outliner"},
5225  {0, NULL, 0, NULL, NULL},
5226  };
5227 
5228  srna = RNA_def_struct(brna, "SpaceProperties", "Space");
5229  RNA_def_struct_sdna(srna, "SpaceProperties");
5230  RNA_def_struct_ui_text(srna, "Properties Space", "Properties space data");
5231 
5232  prop = RNA_def_property(srna, "context", PROP_ENUM, PROP_NONE);
5233  RNA_def_property_enum_sdna(prop, NULL, "mainb");
5236  prop, NULL, "rna_SpaceProperties_context_set", "rna_SpaceProperties_context_itemf");
5237  RNA_def_property_ui_text(prop, "", "");
5239  prop, NC_SPACE | ND_SPACE_PROPERTIES, "rna_SpaceProperties_context_update");
5240 
5241  /* pinned data */
5242  prop = RNA_def_property(srna, "pin_id", PROP_POINTER, PROP_NONE);
5243  RNA_def_property_pointer_sdna(prop, NULL, "pinid");
5244  RNA_def_property_struct_type(prop, "ID");
5245  /* NOTE: custom set function is ONLY to avoid rna setting a user for this. */
5247  prop, NULL, "rna_SpaceProperties_pin_id_set", "rna_SpaceProperties_pin_id_typef", NULL);
5250  prop, NC_SPACE | ND_SPACE_PROPERTIES, "rna_SpaceProperties_pin_id_update");
5251 
5252  prop = RNA_def_property(srna, "use_pin_id", PROP_BOOLEAN, PROP_NONE);
5254  RNA_def_property_ui_text(prop, "Pin ID", "Use the pinned context");
5255 
5256  /* Property search. */
5257 
5258  prop = RNA_def_property(srna, "tab_search_results", PROP_BOOLEAN, PROP_NONE);
5259  RNA_def_property_array(prop, 0); /* Dynamic length, see next line. */
5262  RNA_def_property_boolean_funcs(prop, "rna_SpaceProperties_tab_search_results_get", NULL);
5263  RNA_def_property_dynamic_array_funcs(prop, "rna_SpaceProperties_tab_search_results_getlength");
5265  prop, "Tab Search Results", "Whether or not each visible tab has a search result");
5266 
5267  prop = RNA_def_property(srna, "search_filter", PROP_STRING, PROP_NONE);
5268  /* The search filter is stored in the property editor's runtime struct which
5269  * is only defined in an internal header, so use the getter / setter here. */
5271  "rna_SpaceProperties_search_filter_get",
5272  "rna_SpaceProperties_search_filter_length",
5273  "rna_SpaceProperties_search_filter_set");
5274  RNA_def_property_ui_text(prop, "Display Filter", "Live search filtering string");
5277  prop, NC_SPACE | ND_SPACE_PROPERTIES, "rna_SpaceProperties_search_filter_update");
5278 
5279  /* Outliner sync. */
5280  prop = RNA_def_property(srna, "outliner_sync", PROP_ENUM, PROP_NONE);
5281  RNA_def_property_enum_sdna(prop, NULL, "outliner_sync");
5282  RNA_def_property_enum_items(prop, tab_sync_items);
5284  "Outliner Sync",
5285  "Change to the corresponding tab when outliner data icons are clicked");
5287 }
5288 
5290 {
5291  StructRNA *srna;
5292  PropertyRNA *prop;
5293 
5294  srna = RNA_def_struct(brna, "SpaceImageOverlay", NULL);
5295  RNA_def_struct_sdna(srna, "SpaceImage");
5296  RNA_def_struct_nested(brna, srna, "SpaceImageEditor");
5297  RNA_def_struct_path_func(srna, "rna_SpaceImageOverlay_path");
5299  srna, "Overlay Settings", "Settings for display of overlays in the UV/Image editor");
5300 
5301  prop = RNA_def_property(srna, "show_overlays", PROP_BOOLEAN, PROP_NONE);
5303  RNA_def_property_ui_text(prop, "Show Overlays", "Display overlays like UV Maps and Metadata");
5305 
5306  prop = RNA_def_property(srna, "show_grid_background", PROP_BOOLEAN, PROP_NONE);
5308  RNA_def_property_ui_text(prop, "Display Background", "Show the grid background and borders");
5310 }
5311 
5313 {
5314  StructRNA *srna;
5315  PropertyRNA *prop;
5316 
5317  srna = RNA_def_struct(brna, "SpaceImageEditor", "Space");
5318  RNA_def_struct_sdna(srna, "SpaceImage");
5319  RNA_def_struct_ui_text(srna, "Space Image Editor", "Image and UV editor space data");
5320 
5322  ((1 << RGN_TYPE_TOOL_HEADER) | (1 << RGN_TYPE_TOOLS) |
5323  (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_HUD)));
5324 
5325  /* image */
5326  prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
5327  RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceImageEditor_image_set", NULL, NULL);
5328  RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space");
5331  prop,
5332  NC_GEOM | ND_DATA,
5333  "rna_SpaceImageEditor_image_update"); /* is handled in image editor too */
5334 
5335  prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
5337  RNA_def_property_pointer_sdna(prop, NULL, "iuser");
5339  prop,
5340  "Image User",
5341  "Parameters defining which layer, pass and frame of the image is displayed");
5343 
5344  prop = RNA_def_property(srna, "scopes", PROP_POINTER, PROP_NONE);
5345  RNA_def_property_pointer_sdna(prop, NULL, "scopes");
5346  RNA_def_property_struct_type(prop, "Scopes");
5347  RNA_def_property_ui_text(prop, "Scopes", "Scopes to visualize image statistics");
5349  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_scopes_update");
5350 
5351  prop = RNA_def_property(srna, "use_image_pin", PROP_BOOLEAN, PROP_NONE);
5352  RNA_def_property_boolean_sdna(prop, NULL, "pin", 0);
5354  prop, "Image Pin", "Display current image regardless of object selection");
5355  RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
5357 
5358  prop = RNA_def_property(srna, "sample_histogram", PROP_POINTER, PROP_NONE);
5359  RNA_def_property_pointer_sdna(prop, NULL, "sample_line_hist");
5360  RNA_def_property_struct_type(prop, "Histogram");
5361  RNA_def_property_ui_text(prop, "Line Sample", "Sampled colors along line");
5362 
5363  prop = RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
5364  RNA_def_property_array(prop, 2);
5366  RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_zoom_get", NULL, NULL);
5367  RNA_def_property_ui_text(prop, "Zoom", "Zoom factor");
5368 
5369  /* image draw */
5370  prop = RNA_def_property(srna, "show_repeat", PROP_BOOLEAN, PROP_NONE);
5373  prop, "Display Repeated", "Display the image repeated outside of the main view");
5375 
5376  prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE);
5378  RNA_def_property_ui_text(prop, "Show Annotation", "Show annotations for this view");
5380 
5381  prop = RNA_def_property(srna, "display_channels", PROP_ENUM, PROP_NONE);
5385  "rna_SpaceImageEditor_display_channels_get",
5386  NULL,
5387  "rna_SpaceImageEditor_display_channels_itemf");
5388  RNA_def_property_ui_text(prop, "Display Channels", "Channels of the image to display");
5390 
5391  prop = RNA_def_property(srna, "show_stereo_3d", PROP_BOOLEAN, PROP_NONE);
5393  prop, "rna_SpaceImageEditor_show_stereo_get", "rna_SpaceImageEditor_show_stereo_set");
5394  RNA_def_property_ui_text(prop, "Show Stereo", "Display the image in Stereo 3D");
5395  RNA_def_property_ui_icon(prop, ICON_CAMERA_STEREO, 0);
5397  prop, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_show_stereo_update");
5398 
5399  /* uv */
5400  prop = RNA_def_property(srna, "uv_editor", PROP_POINTER, PROP_NONE);
5402  RNA_def_property_struct_type(prop, "SpaceUVEditor");
5403  RNA_def_property_pointer_funcs(prop, "rna_SpaceImageEditor_uvedit_get", NULL, NULL, NULL);
5404  RNA_def_property_ui_text(prop, "UV Editor", "UV editor settings");
5405 
5406  /* mode (hidden in the UI, see 'ui_mode') */
5407  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
5408  RNA_def_property_enum_sdna(prop, NULL, "mode");
5410  RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
5411  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_mode_update");
5412 
5413  prop = RNA_def_property(srna, "ui_mode", PROP_ENUM, PROP_NONE);
5414  RNA_def_property_enum_sdna(prop, NULL, "mode");
5416  RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
5417  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_mode_update");
5418 
5419  /* transform */
5420  prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ);
5421  RNA_def_property_array(prop, 2);
5423  "rna_SpaceImageEditor_cursor_location_get",
5424  "rna_SpaceImageEditor_cursor_location_set",
5425  NULL);
5426  RNA_def_property_ui_text(prop, "2D Cursor Location", "2D cursor location for this view");
5428 
5429  prop = RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
5430  RNA_def_property_enum_sdna(prop, NULL, "around");
5432  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceImageEditor_pivot_itemf");
5433  RNA_def_property_ui_text(prop, "Pivot", "Rotation/Scaling Pivot");
5435 
5436  /* grease pencil */
5437  prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
5438  RNA_def_property_pointer_sdna(prop, NULL, "gpd");
5439  RNA_def_property_struct_type(prop, "GreasePencil");
5441  prop, NULL, NULL, NULL, "rna_GPencil_datablocks_annotations_poll");
5443  RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space");
5445 
5446  /* update */
5447  prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
5448  RNA_def_property_boolean_sdna(prop, NULL, "lock", 0);
5450  "Update Automatically",
5451  "Update other affected window spaces automatically to reflect changes "
5452  "during interactive operations such as transform");
5453 
5454  /* state */
5455  prop = RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE);
5456  RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_render_get", NULL);
5458  RNA_def_property_ui_text(prop, "Show Render", "Show render related properties");
5459 
5460  prop = RNA_def_property(srna, "show_paint", PROP_BOOLEAN, PROP_NONE);
5461  RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_paint_get", NULL);
5463  RNA_def_property_ui_text(prop, "Show Paint", "Show paint related properties");
5464 
5465  prop = RNA_def_property(srna, "show_uvedit", PROP_BOOLEAN, PROP_NONE);
5466  RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_uvedit_get", NULL);
5468  RNA_def_property_ui_text(prop, "Show UV Editor", "Show UV editing related properties");
5469 
5470  prop = RNA_def_property(srna, "show_maskedit", PROP_BOOLEAN, PROP_NONE);
5471  RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_maskedit_get", NULL);
5473  RNA_def_property_ui_text(prop, "Show Mask Editor", "Show Mask editing related properties");
5474 
5475  /* Gizmo Toggles. */
5476  prop = RNA_def_property(srna, "show_gizmo", PROP_BOOLEAN, PROP_NONE);
5478  RNA_def_property_ui_text(prop, "Show Gizmo", "Show gizmos of all types");
5480 
5481  prop = RNA_def_property(srna, "show_gizmo_navigate", PROP_BOOLEAN, PROP_NONE);
5483  RNA_def_property_ui_text(prop, "Navigate Gizmo", "Viewport navigation gizmo");
5485 
5486  /* Overlays */
5487  prop = RNA_def_property(srna, "overlay", PROP_POINTER, PROP_NONE);
5489  RNA_def_property_struct_type(prop, "SpaceImageOverlay");
5490  RNA_def_property_pointer_funcs(prop, "rna_SpaceImage_overlay_get", NULL, NULL, NULL);
5492  prop, "Overlay Settings", "Settings for display of overlays in the UV/Image editor");
5493 
5494  rna_def_space_image_uv(brna);
5496 
5497  /* mask */
5498  rna_def_space_mask_info(srna, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_mask_set");
5499 }
5500 
5502 {
5503  StructRNA *srna;
5504  PropertyRNA *prop;
5505 
5506  srna = RNA_def_struct(brna, "SequencerPreviewOverlay", NULL);
5507  RNA_def_struct_sdna(srna, "SequencerPreviewOverlay");
5508  RNA_def_struct_nested(brna, srna, "SpaceSequenceEditor");
5509  RNA_def_struct_path_func(srna, "rna_SpaceSequencerPreviewOverlay_path");
5510  RNA_def_struct_ui_text(srna, "Preview Overlay Settings", "");
5511 
5512  prop = RNA_def_property(srna, "show_safe_areas", PROP_BOOLEAN, PROP_NONE);
5515  prop, "Safe Areas", "Show TV title safe and action safe areas in preview");
5517 
5518  prop = RNA_def_property(srna, "show_safe_center", PROP_BOOLEAN, PROP_NONE);
5521  prop, "Center-Cut Safe Areas", "Show safe areas to fit content in a different aspect ratio");
5523 
5524  prop = RNA_def_property(srna, "show_metadata", PROP_BOOLEAN, PROP_NONE);
5526  RNA_def_property_ui_text(prop, "Show Metadata", "Show metadata of first visible strip");
5528 
5529  prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE);
5531  RNA_def_property_ui_text(prop, "Show Annotation", "Show annotations for this view");
5533 
5534  prop = RNA_def_property(srna, "show_image_outline", PROP_BOOLEAN, PROP_NONE);
5536  RNA_def_property_ui_text(prop, "Image Outline", "");
5538 
5539  prop = RNA_def_property(srna, "show_cursor", PROP_BOOLEAN, PROP_NONE);
5541  RNA_def_property_ui_text(prop, "2D Cursor", "");
5543 }
5544 
5546 {
5547  StructRNA *srna;
5548  PropertyRNA *prop;
5549 
5550  srna = RNA_def_struct(brna, "SequencerTimelineOverlay", NULL);
5551  RNA_def_struct_sdna(srna, "SequencerTimelineOverlay");
5552  RNA_def_struct_nested(brna, srna, "SpaceSequenceEditor");
5553  RNA_def_struct_path_func(srna, "rna_SpaceSequencerTimelineOverlay_path");
5554  RNA_def_struct_ui_text(srna, "Timeline Overlay Settings", "");
5555 
5556  static const EnumPropertyItem waveform_type_display_items[] = {
5558  "NO_WAVEFORMS",
5559  0,
5560  "Waveforms Off",
5561  "Don't display waveforms for any sound strips"},
5563  "ALL_WAVEFORMS",
5564  0,
5565  "Waveforms On",
5566  "Display waveforms for all sound strips"},
5567  {0,
5568  "DEFAULT_WAVEFORMS",
5569  0,
5570  "Use Strip Option",
5571  "Display waveforms depending on strip setting"},
5572  {0, NULL, 0, NULL, NULL},
5573  };
5574 
5575  prop = RNA_def_property(srna, "waveform_display_type", PROP_ENUM, PROP_NONE);
5577  RNA_def_property_enum_items(prop, waveform_type_display_items);
5578  RNA_def_property_ui_text(prop, "Waveform Display", "How Waveforms are displayed");
5580 
5581  prop = RNA_def_property(srna, "show_fcurves", PROP_BOOLEAN, PROP_NONE);
5583  RNA_def_property_ui_text(prop, "Show F-Curves", "Display strip opacity/volume curve");
5585 
5586  prop = RNA_def_property(srna, "show_strip_name", PROP_BOOLEAN, PROP_NONE);
5588  RNA_def_property_ui_text(prop, "Show Name", "");
5590 
5591  prop = RNA_def_property(srna, "show_strip_source", PROP_BOOLEAN, PROP_NONE);
5594  prop, "Show Source", "Display path to source file, or name of source datablock");
5596 
5597  prop = RNA_def_property(srna, "show_strip_duration", PROP_BOOLEAN, PROP_NONE);
5599  RNA_def_property_ui_text(prop, "Show Duration", "");
5601 
5602  prop = RNA_def_property(srna, "show_grid", PROP_BOOLEAN, PROP_NONE);
5604  RNA_def_property_ui_text(prop, "Show Grid", "Show vertical grid lines");
5606 
5607  prop = RNA_def_property(srna, "show_strip_offset", PROP_BOOLEAN, PROP_NONE);
5609  RNA_def_property_ui_text(prop, "Show Offsets", "Display strip in/out offsets");
5611 
5612  prop = RNA_def_property(srna, "show_thumbnails", PROP_BOOLEAN, PROP_NONE);
5614  RNA_def_property_ui_text(prop, "Show Thumbnails", "Show strip thumbnails");
5616 
5617  prop = RNA_def_property(srna, "show_strip_tag_color", PROP_BOOLEAN, PROP_NONE);
5620  prop, "Show Color Tags", "Display the strip color tags in the sequencer");
5622 }
5623 
5625 {
5626  StructRNA *srna;
5627  PropertyRNA *prop;
5628 
5629  static const EnumPropertyItem display_mode_items[] = {
5630  {SEQ_DRAW_IMG_IMBUF, "IMAGE", ICON_SEQ_PREVIEW, "Image Preview", ""},
5631  {SEQ_DRAW_IMG_WAVEFORM, "WAVEFORM", ICON_SEQ_LUMA_WAVEFORM, "Luma Waveform", ""},
5632  {SEQ_DRAW_IMG_VECTORSCOPE, "VECTOR_SCOPE", ICON_SEQ_CHROMA_SCOPE, "Chroma Vectorscope", ""},
5633  {SEQ_DRAW_IMG_HISTOGRAM, "HISTOGRAM", ICON_SEQ_HISTOGRAM, "Histogram", ""},
5634  {0, NULL, 0, NULL, NULL},
5635  };
5636 
5637  static const EnumPropertyItem proxy_render_size_items[] = {
5638  {SEQ_RENDER_SIZE_NONE, "NONE", 0, "No display", ""},
5639  {SEQ_RENDER_SIZE_SCENE, "SCENE", 0, "Scene size", ""},
5640  {SEQ_RENDER_SIZE_PROXY_25, "PROXY_25", 0, "25%", ""},
5641  {SEQ_RENDER_SIZE_PROXY_50, "PROXY_50", 0, "50%", ""},
5642  {SEQ_RENDER_SIZE_PROXY_75, "PROXY_75", 0, "75%", ""},
5643  {SEQ_RENDER_SIZE_PROXY_100, "PROXY_100", 0, "100%", ""},
5644  {0, NULL, 0, NULL, NULL},
5645  };
5646 
5647  static const EnumPropertyItem overlay_frame_type_items[] = {
5648  {SEQ_OVERLAY_FRAME_TYPE_RECT, "RECTANGLE", 0, "Rectangle", "Show rectangle area overlay"},
5649  {SEQ_OVERLAY_FRAME_TYPE_REFERENCE, "REFERENCE", 0, "Reference", "Show reference frame only"},
5650  {SEQ_OVERLAY_FRAME_TYPE_CURRENT, "CURRENT", 0, "Current", "Show current frame only"},
5651  {0, NULL, 0, NULL, NULL},
5652  };
5653 
5654  static const EnumPropertyItem preview_channels_items[] = {
5655  {SEQ_USE_ALPHA,
5656  "COLOR_ALPHA",
5657  ICON_IMAGE_RGB_ALPHA,
5658  "Color and Alpha",
5659  "Display image with RGB colors and alpha transparency"},
5660  {0, "COLOR", ICON_IMAGE_RGB, "Color", "Display image with RGB colors"},
5661  {0, NULL, 0, NULL, NULL},
5662  };
5663 
5664  srna = RNA_def_struct(brna, "SpaceSequenceEditor", "Space");
5665  RNA_def_struct_sdna(srna, "SpaceSeq");
5666  RNA_def_struct_ui_text(srna, "Space Sequence Editor", "Sequence editor space data");
5667 
5669  (1 << RGN_TYPE_TOOL_HEADER) | (1 << RGN_TYPE_UI) |
5670  (1 << RGN_TYPE_TOOLS) | (1 << RGN_TYPE_HUD) |
5671  (1 << RGN_TYPE_CHANNELS));
5672 
5673  /* view type, fairly important */
5674  prop = RNA_def_property(srna, "view_type", PROP_ENUM, PROP_NONE);
5675  RNA_def_property_enum_sdna(prop, NULL, "view");
5678  prop, "View Type", "Type of the Sequencer view (sequencer, preview or both)");
5679  RNA_def_property_update(prop, 0, "rna_Sequencer_view_type_update");
5680 
5681  /* display type, fairly important */
5682  prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
5683  RNA_def_property_enum_sdna(prop, NULL, "mainb");
5684  RNA_def_property_enum_items(prop, display_mode_items);
5686  prop, "Display Mode", "View mode to use for displaying sequencer output");
5688 
5689  /* flags */
5690  prop = RNA_def_property(srna, "show_frames", PROP_BOOLEAN, PROP_NONE);
5692  RNA_def_property_ui_text(prop, "Display Frames", "Display frames rather than seconds");
5694 
5695  prop = RNA_def_property(srna, "use_marker_sync", PROP_BOOLEAN, PROP_NONE);
5697  RNA_def_property_ui_text(prop, "Sync Markers", "Transform markers as well as strips");
5699 
5700  prop = RNA_def_property(srna, "show_separate_color", PROP_BOOLEAN, PROP_NONE);
5702  RNA_def_property_ui_text(prop, "Separate Colors", "Separate color channels in preview");
5704 
5705  prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
5707  RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
5709 
5710  prop = RNA_def_property(srna, "show_markers", PROP_BOOLEAN, PROP_NONE);
5713  prop,
5714  "Show Markers",
5715  "If any exists, show markers in a separate row at the bottom of the editor");
5717 
5718  prop = RNA_def_property(srna, "display_channel", PROP_INT, PROP_NONE);
5719  RNA_def_property_int_sdna(prop, NULL, "chanshown");
5721  prop,
5722  "Display Channel",
5723  "The channel number shown in the image preview. 0 is the result of all strips combined");
5724  RNA_def_property_range(prop, -5, MAXSEQ);
5725  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_update_cache");
5726 
5727  prop = RNA_def_property(srna, "preview_channels", PROP_ENUM, PROP_NONE);
5729  RNA_def_property_enum_items(prop, preview_channels_items);
5730  RNA_def_property_ui_text(prop, "Display Channels", "Channels of the preview to display");
5731  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_update_cache");
5732 
5733  prop = RNA_def_property(srna, "use_zoom_to_fit", PROP_BOOLEAN, PROP_NONE);
5736  prop, "Zoom to Fit", "Automatically zoom preview image to make it fully fit the region");
5738 
5739  prop = RNA_def_property(srna, "show_overexposed", PROP_INT, PROP_NONE);
5740  RNA_def_property_int_sdna(prop, NULL, "zebra");
5741  RNA_def_property_ui_text(prop, "Show Overexposed", "Show overexposed areas with zebra stripes");
5742  RNA_def_property_range(prop, 0, 110);
5744 
5745  prop = RNA_def_property(srna, "proxy_render_size", PROP_ENUM, PROP_NONE);
5746  RNA_def_property_enum_sdna(prop, NULL, "render_size");
5747  RNA_def_property_enum_items(prop, proxy_render_size_items);
5749  "Proxy Render Size",
5750  "Display preview using full resolution or different proxy resolutions");
5753  prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_render_size_update");
5754 
5755  prop = RNA_def_property(srna, "use_proxies", PROP_BOOLEAN, PROP_NONE);
5758  prop, "Use Proxies", "Use optimized files for faster scrubbing when available");
5759  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_update_cache");
5760 
5761  prop = RNA_def_property(srna, "use_clamp_view", PROP_BOOLEAN, PROP_NONE);
5764  prop, "rna_SequenceEditor_clamp_view_get", "rna_SequenceEditor_clamp_view_set");
5766  prop, "Limit View to Contents", "Limit timeline height to maximum used channel slot");
5768 
5769  /* grease pencil */
5770  prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
5771  RNA_def_property_pointer_sdna(prop, NULL, "gpd");
5772  RNA_def_property_struct_type(prop, "GreasePencil");
5774  prop, NULL, NULL, NULL, "rna_GPencil_datablocks_annotations_poll");
5776  RNA_def_property_ui_text(prop, "Grease Pencil", "Grease Pencil data for this Preview region");
5778 
5779  prop = RNA_def_property(srna, "overlay_frame_type", PROP_ENUM, PROP_NONE);
5780  RNA_def_property_enum_sdna(prop, NULL, "overlay_frame_type");
5781  RNA_def_property_enum_items(prop, overlay_frame_type_items);
5782  RNA_def_property_ui_text(prop, "Overlay Type", "Overlay display method");
5784 
5785  prop = RNA_def_property(srna, "show_backdrop", PROP_BOOLEAN, PROP_NONE);
5787  RNA_def_property_ui_text(prop, "Use Backdrop", "Display result under strips");
5789 
5790  prop = RNA_def_property(srna, "show_transform_preview", PROP_BOOLEAN, PROP_NONE);
5792  RNA_def_property_ui_text(prop, "Transform Preview", "Show preview of the transformed frames");
5794 
5795  /* Gizmo toggles. */
5796  prop = RNA_def_property(srna, "show_gizmo", PROP_BOOLEAN, PROP_NONE);
5798  RNA_def_property_ui_text(prop, "Show Gizmo", "Show gizmos of all types");
5800 
5801  prop = RNA_def_property(srna, "show_gizmo_navigate", PROP_BOOLEAN, PROP_NONE);
5803  RNA_def_property_ui_text(prop, "Navigate Gizmo", "Viewport navigation gizmo");
5805 
5806  prop = RNA_def_property(srna, "show_gizmo_context", PROP_BOOLEAN, PROP_NONE);
5808  RNA_def_property_ui_text(prop, "Context Gizmo", "Context sensitive gizmos for the active item");
5810 
5811  prop = RNA_def_property(srna, "show_gizmo_tool", PROP_BOOLEAN, PROP_NONE);
5813  RNA_def_property_ui_text(prop, "Tool Gizmo", "Active tool gizmo");
5815 
5816  /* Overlay settings. */
5817  prop = RNA_def_property(srna, "show_overlays", PROP_BOOLEAN, PROP_NONE);
5819  RNA_def_property_ui_text(prop, "Show Overlay", "");
5821 
5822  prop = RNA_def_property(srna, "preview_overlay", PROP_POINTER, PROP_NONE);
5824  RNA_def_property_struct_type(prop, "SequencerPreviewOverlay");
5825  RNA_def_property_pointer_sdna(prop, NULL, "preview_overlay");
5826  RNA_def_property_ui_text(prop, "Preview Overlay Settings", "Settings for display of overlays");
5827 
5828  prop = RNA_def_property(srna, "timeline_overlay", PROP_POINTER, PROP_NONE);
5830  RNA_def_property_struct_type(prop, "SequencerTimelineOverlay");
5831  RNA_def_property_pointer_sdna(prop, NULL, "timeline_overlay");
5832  RNA_def_property_ui_text(prop, "Timeline Overlay Settings", "Settings for display of overlays");
5833 
5836 
5837  /* transform */
5838  prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ);
5839  RNA_def_property_float_sdna(prop, NULL, "cursor");
5840  RNA_def_property_array(prop, 2);
5841  RNA_def_property_ui_text(prop, "2D Cursor Location", "2D cursor location for this view");
5843 }
5844 
5845 static void rna_def_space_text(BlenderRNA *brna)
5846 {
5847  StructRNA *srna;
5848  PropertyRNA *prop;
5849  FunctionRNA *func;
5850 
5851  srna = RNA_def_struct(brna, "SpaceTextEditor", "Space");
5852  RNA_def_struct_sdna(srna, "SpaceText");
5853  RNA_def_struct_ui_text(srna, "Space Text Editor", "Text editor space data");
5854 
5856 
5857  /* text */
5858  prop = RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
5860  RNA_def_property_ui_text(prop, "Text", "Text displayed and edited in this space");
5861  RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceTextEditor_text_set", NULL, NULL);
5863 
5864  /* display */
5865  prop = RNA_def_property(srna, "show_word_wrap", PROP_BOOLEAN, PROP_NONE);
5866  RNA_def_property_boolean_sdna(prop, NULL, "wordwrap", 0);
5867  RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceTextEditor_word_wrap_set");
5869  prop, "Word Wrap", "Wrap words if there is not enough horizontal space");
5870  RNA_def_property_ui_icon(prop, ICON_WORDWRAP_ON, 0);
5872 
5873  prop = RNA_def_property(srna, "show_line_numbers", PROP_BOOLEAN, PROP_NONE);
5874  RNA_def_property_boolean_sdna(prop, NULL, "showlinenrs", 0);
5875  RNA_def_property_ui_text(prop, "Line Numbers", "Show line numbers next to the text");
5876  RNA_def_property_ui_icon(prop, ICON_LINENUMBERS_ON, 0);
5878 
5879  func = RNA_def_function(srna,
5880  "is_syntax_highlight_supported",
5881  "rna_SpaceTextEditor_text_is_syntax_highlight_supported");
5883  RNA_def_boolean(func, "is_syntax_highlight_supported", false, "", ""));
5885  "Returns True if the editor supports syntax highlighting "
5886  "for the current text datablock");
5887 
5888  prop = RNA_def_property(srna, "show_syntax_highlight", PROP_BOOLEAN, PROP_NONE);
5889  RNA_def_property_boolean_sdna(prop, NULL, "showsyntax", 0);
5890  RNA_def_property_ui_text(prop, "Syntax Highlight", "Syntax highlight for scripting");
5891  RNA_def_property_ui_icon(prop, ICON_SYNTAX_ON, 0);
5893 
5894  prop = RNA_def_property(srna, "show_line_highlight", PROP_BOOLEAN, PROP_NONE);
5895  RNA_def_property_boolean_sdna(prop, NULL, "line_hlight", 0);
5896  RNA_def_property_ui_text(prop, "Highlight Line", "Highlight the current line");
5898 
5899  prop = RNA_def_property(srna, "tab_width", PROP_INT, PROP_NONE);
5900  RNA_def_property_int_sdna(prop, NULL, "tabnumber");
5901  RNA_def_property_range(prop, 2, 8);
5902  RNA_def_property_ui_text(prop, "Tab Width", "Number of spaces to display tabs with");
5903  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TEXT, "rna_SpaceTextEditor_updateEdited");
5904 
5905  prop = RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE);
5906  RNA_def_property_int_sdna(prop, NULL, "lheight");
5907  RNA_def_property_range(prop, 8, 32);
5908  RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text");
5910 
5911  prop = RNA_def_property(srna, "show_margin", PROP_BOOLEAN, PROP_NONE);
5913  RNA_def_property_ui_text(prop, "Show Margin", "Show right margin");
5915 
5916  prop = RNA_def_property(srna, "margin_column", PROP_INT, PROP_NONE);
5917  RNA_def_property_int_sdna(prop, NULL, "margin_column");
5918  RNA_def_property_range(prop, 0, 1024);
5919  RNA_def_property_ui_text(prop, "Margin Column", "Column number to show right margin at");
5921 
5922  prop = RNA_def_property(srna, "top", PROP_INT, PROP_NONE);
5923  RNA_def_property_int_sdna(prop, NULL, "top");
5924  RNA_def_property_range(prop, 0, INT_MAX);
5925  RNA_def_property_ui_text(prop, "Top Line", "Top line visible");
5927 
5928  prop = RNA_def_property(srna, "visible_lines", PROP_INT, PROP_NONE);
5930  RNA_def_property_int_sdna(prop, NULL, "runtime.viewlines");
5932  prop, "Visible Lines", "Amount of lines that can be visible in current editor");
5933 
5934  /* functionality options */
5935  prop = RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
5936  RNA_def_property_boolean_sdna(prop, NULL, "overwrite", 1);
5938  prop, "Overwrite", "Overwrite characters when typing rather than inserting them");
5940 
5941  prop = RNA_def_property(srna, "use_live_edit", PROP_BOOLEAN, PROP_NONE);
5942  RNA_def_property_boolean_sdna(prop, NULL, "live_edit", 1);
5943  RNA_def_property_ui_text(prop, "Live Edit", "Run python while editing");
5945 
5946  /* find */
5947  prop = RNA_def_property(srna, "use_find_all", PROP_BOOLEAN, PROP_NONE);
5950  prop, "Find All", "Search in all text data-blocks, instead of only the active one");
5952 
5953  prop = RNA_def_property(srna, "use_find_wrap", PROP_BOOLEAN, PROP_NONE);
5956  prop, "Find Wrap", "Search again from the start of the file when reaching the end");
5958 
5959  prop = RNA_def_property(srna, "use_match_case", PROP_BOOLEAN, PROP_NONE);
5962  prop, "Match Case", "Search string is sensitive to uppercase and lowercase letters");
5964 
5965  prop = RNA_def_property(srna, "find_text", PROP_STRING, PROP_NONE);
5966  RNA_def_property_string_sdna(prop, NULL, "findstr");
5967  RNA_def_property_ui_text(prop, "Find Text", "Text to search for with the find tool");
5969 
5970  prop = RNA_def_property(srna, "replace_text", PROP_STRING, PROP_NONE);
5971  RNA_def_property_string_sdna(prop, NULL, "replacestr");
5973  prop, "Replace Text", "Text to replace selected text with using the replace tool");
5975 
5976  RNA_api_space_text(srna);
5977 }
5978 
5980 {
5981  StructRNA *srna;
5982  PropertyRNA *prop;
5983 
5984  srna = RNA_def_struct(brna, "SpaceDopeSheetEditor", "Space");
5985  RNA_def_struct_sdna(srna, "SpaceAction");
5986  RNA_def_struct_ui_text(srna, "Space Dope Sheet Editor", "Dope Sheet space data");
5987 
5989 
5990  /* data */
5991  prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
5994  prop, NULL, "rna_SpaceDopeSheetEditor_action_set", NULL, "rna_Action_actedit_assign_poll");
5995  RNA_def_property_ui_text(prop, "Action", "Action displayed and edited in this space");
5998  prop, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, "rna_SpaceDopeSheetEditor_action_update");
5999 
6000  /* mode (hidden in the UI, see 'ui_mode') */
6001  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
6002  RNA_def_property_enum_sdna(prop, NULL, "mode");
6004  RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
6007  prop, NC_SPACE | ND_SPACE_DOPESHEET, "rna_SpaceDopeSheetEditor_mode_update");
6008 
6009  prop = RNA_def_property(srna, "ui_mode", PROP_ENUM, PROP_NONE);
6010  RNA_def_property_enum_sdna(prop, NULL, "mode");
6012  RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
6015  prop, NC_SPACE | ND_SPACE_DOPESHEET, "rna_SpaceDopeSheetEditor_mode_update");
6016 
6017  /* display */
6018  prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
6020  RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
6022 
6023  prop = RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
6025  RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels");
6027 
6028  prop = RNA_def_property(srna, "show_pose_markers", PROP_BOOLEAN, PROP_NONE);
6031  "Show Pose Markers",
6032  "Show markers belonging to the active action instead of Scene markers "
6033  "(Action and Shape Key Editors only)");
6035 
6036  prop = RNA_def_property(srna, "show_interpolation", PROP_BOOLEAN, PROP_NONE);
6039  "Show Handles and Interpolation",
6040  "Display keyframe handle types and non-bezier interpolation modes");
6042 
6043  prop = RNA_def_property(srna, "show_extremes", PROP_BOOLEAN, PROP_NONE);
6046  "Show Curve Extremes",
6047  "Mark keyframes where the key value flow changes direction, based on "
6048  "comparison with adjacent keys");
6050 
6051  prop = RNA_def_property(srna, "show_markers", PROP_BOOLEAN, PROP_NONE);
6054  prop,
6055  "Show Markers",
6056  "If any exists, show markers in a separate row at the bottom of the editor");
6058 
6059  /* editing */
6060  prop = RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE);
6062  RNA_def_property_ui_text(prop, "Auto-Merge Keyframes", "Automatically merge nearby keyframes");
6064 
6065  prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
6068  prop,
6069  "Realtime Updates",
6070  "When transforming keyframes, changes to the animation data are flushed to other views");
6072 
6073  prop = RNA_def_property(srna, "use_marker_sync", PROP_BOOLEAN, PROP_NONE);
6075  RNA_def_property_ui_text(prop, "Sync Markers", "Sync Markers with keyframe edits");
6076 
6077  /* dopesheet */
6078  prop = RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
6079  RNA_def_property_struct_type(prop, "DopeSheet");
6080  RNA_def_property_pointer_sdna(prop, NULL, "ads");
6081  RNA_def_property_ui_text(prop, "Dope Sheet", "Settings for filtering animation data");
6082 
6083  /* autosnap */
6084  prop = RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE);
6085  RNA_def_property_enum_sdna(prop, NULL, "autosnap");
6088  prop, "Auto Snap", "Automatic time snapping settings for transformations");
6090 
6091  /* displaying cache status */
6092  prop = RNA_def_property(srna, "show_cache", PROP_BOOLEAN, PROP_NONE);
6093  RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_DISPLAY);
6094  RNA_def_property_ui_text(prop, "Show Cache", "Show the status of cached frames in the timeline");
6096 
6097  prop = RNA_def_property(srna, "cache_softbody", PROP_BOOLEAN, PROP_NONE);
6098  RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_SOFTBODY);
6099  RNA_def_property_ui_text(prop, "Softbody", "Show the active object's softbody point cache");
6101 
6102  prop = RNA_def_property(srna, "cache_particles", PROP_BOOLEAN, PROP_NONE);
6103  RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_PARTICLES);
6104  RNA_def_property_ui_text(prop, "Particles", "Show the active object's particle point cache");
6106 
6107  prop = RNA_def_property(srna, "cache_cloth", PROP_BOOLEAN, PROP_NONE);
6108  RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_CLOTH);
6109  RNA_def_property_ui_text(prop, "Cloth", "Show the active object's cloth point cache");
6111 
6112  prop = RNA_def_property(srna, "cache_smoke", PROP_BOOLEAN, PROP_NONE);
6113  RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_SMOKE);
6114  RNA_def_property_ui_text(prop, "Smoke", "Show the active object's smoke cache");
6116 
6117  prop = RNA_def_property(srna, "cache_dynamicpaint", PROP_BOOLEAN, PROP_NONE);
6119  RNA_def_property_ui_text(prop, "Dynamic Paint", "Show the active object's Dynamic Paint cache");
6121 
6122  prop = RNA_def_property(srna, "cache_rigidbody", PROP_BOOLEAN, PROP_NONE);
6123  RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_RIGIDBODY);
6124  RNA_def_property_ui_text(prop, "Rigid Body", "Show the active object's Rigid Body cache");
6126 }
6127 
6129 {
6130  StructRNA *srna;
6131  PropertyRNA *prop;
6132 
6133  /* this is basically the same as the one for the 3D-View, but with some entries omitted */
6134  static const EnumPropertyItem gpivot_items[] = {
6136  "BOUNDING_BOX_CENTER",
6137  ICON_PIVOT_BOUNDBOX,
6138  "Bounding Box Center",
6139  ""},
6140  {V3D_AROUND_CURSOR, "CURSOR", ICON_PIVOT_CURSOR, "2D Cursor", ""},
6142  "INDIVIDUAL_ORIGINS",
6143  ICON_PIVOT_INDIVIDUAL,
6144  "Individual Centers",
6145  ""},
6146  /*{V3D_AROUND_CENTER_MEDIAN, "MEDIAN_POINT", 0, "Median Point", ""}, */
6147  /*{V3D_AROUND_ACTIVE, "ACTIVE_ELEMENT", 0, "Active Element", ""}, */
6148  {0, NULL, 0, NULL, NULL},
6149  };
6150 
6151  srna = RNA_def_struct(brna, "SpaceGraphEditor", "Space");
6152  RNA_def_struct_sdna(srna, "SpaceGraph");
6153  RNA_def_struct_ui_text(srna, "Space Graph Editor", "Graph Editor space data");
6154 
6156 
6157  /* mode */
6158  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
6159  RNA_def_property_enum_sdna(prop, NULL, "mode");
6161  RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
6164  prop, NC_SPACE | ND_SPACE_GRAPH, "rna_SpaceGraphEditor_display_mode_update");
6165 
6166  /* display */
6167  prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
6169  RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
6171 
6172  prop = RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
6174  RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels");
6176 
6177  prop = RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
6179  RNA_def_property_ui_text(prop, "Show Handles", "Show handles of Bezier control points");
6181 
6182  prop = RNA_def_property(srna, "use_only_selected_curves_handles", PROP_BOOLEAN, PROP_NONE);
6185  "Only Selected Curve Keyframes",
6186  "Only keyframes of selected F-Curves are visible and editable");
6188 
6189  prop = RNA_def_property(srna, "use_only_selected_keyframe_handles", PROP_BOOLEAN, PROP_NONE);
6192  prop, "Only Selected Keyframes Handles", "Only show and edit handles of selected keyframes");
6194 
6195  prop = RNA_def_property(srna, "use_beauty_drawing", PROP_BOOLEAN, PROP_NONE);
6198  "Use High Quality Display",
6199  "Display F-Curves using Anti-Aliasing and other fancy effects "
6200  "(disable for better performance)");
6202 
6203  prop = RNA_def_property(srna, "show_markers", PROP_BOOLEAN, PROP_NONE);
6206  prop,
6207  "Show Markers",
6208  "If any exists, show markers in a separate row at the bottom of the editor");
6210 
6211  prop = RNA_def_property(srna, "show_extrapolation", PROP_BOOLEAN, PROP_NONE);
6213  RNA_def_property_ui_text(prop, "Show Extrapolation", "");
6215 
6216  /* editing */
6217  prop = RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE);
6219  RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Automatically merge nearby keyframes");
6221 
6222  prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
6225  prop,
6226  "Realtime Updates",
6227  "When transforming keyframes, changes to the animation data are flushed to other views");
6229 
6230  /* cursor */
6231  prop = RNA_def_property(srna, "show_cursor", PROP_BOOLEAN, PROP_NONE);
6233  RNA_def_property_ui_text(prop, "Show Cursor", "Show 2D cursor");
6235 
6236  prop = RNA_def_property(srna, "cursor_position_x", PROP_FLOAT, PROP_NONE);
6237  RNA_def_property_float_sdna(prop, NULL, "cursorTime");
6239  prop, "Cursor X-Value", "Graph Editor 2D-Value cursor - X-Value component");
6241 
6242  prop = RNA_def_property(srna, "cursor_position_y", PROP_FLOAT, PROP_NONE);
6243  RNA_def_property_float_sdna(prop, NULL, "cursorVal");
6245  prop, "Cursor Y-Value", "Graph Editor 2D-Value cursor - Y-Value component");
6247 
6248  prop = RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
6249  RNA_def_property_enum_sdna(prop, NULL, "around");
6250  RNA_def_property_enum_items(prop, gpivot_items);
6251  RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling");
6253 
6254  /* Dope-sheet. */
6255  prop = RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
6256  RNA_def_property_struct_type(prop, "DopeSheet");
6257  RNA_def_property_pointer_sdna(prop, NULL, "ads");
6258  RNA_def_property_ui_text(prop, "Dope Sheet", "Settings for filtering animation data");
6259 
6260  /* Auto-snap. */
6261  prop = RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE);
6262  RNA_def_property_enum_sdna(prop, NULL, "autosnap");
6265  prop, "Auto Snap", "Automatic time snapping settings for transformations");
6267 
6268  /* Read-only state info. */
6269  prop = RNA_def_property(srna, "has_ghost_curves", PROP_BOOLEAN, PROP_NONE);
6270  RNA_def_property_boolean_funcs(prop, "rna_SpaceGraphEditor_has_ghost_curves_get", NULL);
6273  prop, "Has Ghost Curves", "Graph Editor instance has some ghost curves stored");
6274 
6275  /* Normalize curves. */
6276  prop = RNA_def_property(srna, "use_normalization", PROP_BOOLEAN, PROP_NONE);
6279  "Use Normalization",
6280  "Display curves in normalized range from -1 to 1, "
6281  "for easier editing of multiple curves with different ranges");
6283 
6284  prop = RNA_def_property(srna, "use_auto_normalization", PROP_BOOLEAN, PROP_NONE);
6287  "Auto Normalization",
6288  "Automatically recalculate curve normalization on every curve edit");
6290 }
6291 
6292 static void rna_def_space_nla(BlenderRNA *brna)
6293 {
6294  StructRNA *srna;
6295  PropertyRNA *prop;
6296 
6297  srna = RNA_def_struct(brna, "SpaceNLA", "Space");
6298  RNA_def_struct_sdna(srna, "SpaceNla");
6299  RNA_def_struct_ui_text(srna, "Space Nla Editor", "NLA editor space data");
6300 
6302 
6303  /* display */
6304  prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
6306  RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
6308 
6309  prop = RNA_def_property(srna, "show_strip_curves", PROP_BOOLEAN, PROP_NONE);
6311  RNA_def_property_ui_text(prop, "Show Control F-Curves", "Show influence F-Curves on strips");
6313 
6314  prop = RNA_def_property(srna, "show_local_markers", PROP_BOOLEAN, PROP_NONE);
6317  prop,
6318  "Show Local Markers",
6319  "Show action-local markers on the strips, useful when synchronizing timing across strips");
6321 
6322  prop = RNA_def_property(srna, "show_markers", PROP_BOOLEAN, PROP_NONE);
6325  prop,
6326  "Show Markers",
6327  "If any exists, show markers in a separate row at the bottom of the editor");
6329 
6330  /* editing */
6331  prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
6334  prop,
6335  "Realtime Updates",
6336  "When transforming strips, changes to the animation data are flushed to other views");
6338 
6339  /* dopesheet */
6340  prop = RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
6341  RNA_def_property_struct_type(prop, "DopeSheet");
6342  RNA_def_property_pointer_sdna(prop, NULL, "ads");
6343  RNA_def_property_ui_text(prop, "Dope Sheet", "Settings for filtering animation data");
6344 
6345  /* autosnap */
6346  prop = RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE);
6347  RNA_def_property_enum_sdna(prop, NULL, "autosnap");
6350  prop, "Auto Snap", "Automatic time snapping settings for transformations");
6352 }
6353 
6355 {
6356  static const EnumPropertyItem console_line_type_items[] = {
6357  {CONSOLE_LINE_OUTPUT, "OUTPUT", 0, "Output", ""},
6358  {CONSOLE_LINE_INPUT, "INPUT", 0, "Input", ""},
6359  {CONSOLE_LINE_INFO, "INFO", 0, "Info", ""},
6360  {CONSOLE_LINE_ERROR, "ERROR", 0, "Error", ""},
6361  {0, NULL, 0, NULL, NULL},
6362  };
6363 
6364  StructRNA *srna;
6365  PropertyRNA *prop;
6366 
6367  srna = RNA_def_struct(brna, "ConsoleLine", NULL);
6368  RNA_def_struct_ui_text(srna, "Console Input", "Input line for the interactive console");
6369 
6370  prop = RNA_def_property(srna, "body", PROP_STRING, PROP_NONE);
6372  prop, "rna_ConsoleLine_body_get", "rna_ConsoleLine_body_length", "rna_ConsoleLine_body_set");
6373  RNA_def_property_ui_text(prop, "Line", "Text in the line");
6376 
6377  prop = RNA_def_property(
6378  srna, "current_character", PROP_INT, PROP_NONE); /* copied from text editor */
6379  RNA_def_property_int_sdna(prop, NULL, "cursor");
6380  RNA_def_property_int_funcs(prop, NULL, NULL, "rna_ConsoleLine_cursor_index_range");
6382 
6383  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
6384  RNA_def_property_enum_sdna(prop, NULL, "type");
6385  RNA_def_property_enum_items(prop, console_line_type_items);
6386  RNA_def_property_ui_text(prop, "Type", "Console line type when used in scrollback");
6387 }
6388 
6390 {
6391  StructRNA *srna;
6392  PropertyRNA *prop;
6393 
6394  srna = RNA_def_struct(brna, "SpaceConsole", "Space");
6395  RNA_def_struct_sdna(srna, "SpaceConsole");
6396  RNA_def_struct_ui_text(srna, "Space Console", "Interactive python console");
6397 
6398  /* display */
6399  prop = RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE); /* copied from text editor */
6400  RNA_def_property_int_sdna(prop, NULL, "lheight");
6401  RNA_def_property_range(prop, 8, 32);
6402  RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text");
6403  RNA_def_property_update(prop, 0, "rna_SpaceConsole_rect_update");
6404 
6405  prop = RNA_def_property(
6406  srna, "select_start", PROP_INT, PROP_UNSIGNED); /* copied from text editor */
6407  RNA_def_property_int_sdna(prop, NULL, "sel_start");
6409 
6410  prop = RNA_def_property(
6411  srna, "select_end", PROP_INT, PROP_UNSIGNED); /* copied from text editor */
6412  RNA_def_property_int_sdna(prop, NULL, "sel_end");
6414 
6415  prop = RNA_def_property(srna, "prompt", PROP_STRING, PROP_NONE);
6416  RNA_def_property_ui_text(prop, "Prompt", "Command line prompt");
6417 
6418  prop = RNA_def_property(srna, "language", PROP_STRING, PROP_NONE);
6419  RNA_def_property_ui_text(prop, "Language", "Command line prompt language");
6420 
6421  prop = RNA_def_property(srna, "history", PROP_COLLECTION, PROP_NONE);
6422  RNA_def_property_collection_sdna(prop, NULL, "history", NULL);
6423  RNA_def_property_struct_type(prop, "ConsoleLine");
6424  RNA_def_property_ui_text(prop, "History", "Command history");
6425 
6426  prop = RNA_def_property(srna, "scrollback", PROP_COLLECTION, PROP_NONE);
6427  RNA_def_property_collection_sdna(prop, NULL, "scrollback", NULL);
6428  RNA_def_property_struct_type(prop, "ConsoleLine");
6429  RNA_def_property_ui_text(prop, "Output", "Command output");
6430 }
6431 
6432 /* Filter for datablock types in link/append. */
6434 {
6435 
6436  StructRNA *srna = RNA_def_struct(brna, "FileSelectIDFilter", NULL);
6437  RNA_def_struct_sdna(srna, "FileSelectParams");
6438  RNA_def_struct_nested(brna, srna, "FileSelectParams");
6440  srna, "File Select ID Filter", "Which ID types to show/hide, when browsing a library");
6441 
6442  const struct IDFilterEnumPropertyItem *individual_ids_and_categories[] = {
6445  NULL,
6446  };
6447  for (uint i = 0; individual_ids_and_categories[i]; i++) {
6448  for (int j = 0; individual_ids_and_categories[i][j].identifier; j++) {
6449  PropertyRNA *prop = RNA_def_property(
6450  srna, individual_ids_and_categories[i][j].identifier, PROP_BOOLEAN, PROP_NONE);
6452  prop, NULL, "filter_id", individual_ids_and_categories[i][j].flag);
6454  individual_ids_and_categories[i][j].name,
6455  individual_ids_and_categories[i][j].description);
6456  RNA_def_property_ui_icon(prop, individual_ids_and_categories[i][j].icon, 0);
6458  }
6459  }
6460 }
6461 
6462 /* Filter for datablock types in the Asset Browser. */
6464 {
6465  StructRNA *srna = RNA_def_struct(brna, "FileAssetSelectIDFilter", NULL);
6466  RNA_def_struct_sdna(srna, "FileSelectParams");
6467  RNA_def_struct_nested(brna, srna, "FileSelectParams");
6469  "File Select Asset Filter",
6470  "Which asset types to show/hide, when browsing an asset library");
6471 
6472  static char experimental_prop_names[INDEX_ID_MAX][MAX_NAME];
6473 
6474  for (uint i = 0; rna_enum_id_type_filter_items[i].identifier; i++) {
6476  const bool is_experimental = (ED_ASSET_TYPE_IDS_NON_EXPERIMENTAL_FLAGS & item->flag) == 0;
6477 
6479  if (is_experimental) {
6480  /* Create name for experimental property and store in static buffer. */
6481  snprintf(experimental_prop_names[i],
6482  ARRAY_SIZE(experimental_prop_names[i]),
6483  "experimental_%s",
6484  identifier);
6485  identifier = experimental_prop_names[i];
6486  }
6487 
6489  RNA_def_property_boolean_sdna(prop, NULL, "filter_id", item->flag);
6490  RNA_def_property_ui_text(prop, item->name, item->description);
6491  RNA_def_property_ui_icon(prop, item->icon, 0);
6493  }
6494 }
6495 
6497 {
6498  PropertyRNA *prop;
6499  StructRNA *srna = RNA_def_struct(brna, "FileSelectEntry", NULL);
6500  RNA_def_struct_sdna(srna, "FileDirEntry");
6501  RNA_def_struct_ui_text(srna, "File Select Entry", "A file viewable in the File Browser");
6502 
6503  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_FILENAME);
6504  RNA_def_property_editable_func(prop, "rna_FileBrowser_FileSelectEntry_name_editable");
6507  "rna_FileBrowser_FileSelectEntry_name_get",
6508  "rna_FileBrowser_FileSelectEntry_name_length",
6509  NULL);
6510  RNA_def_property_ui_text(prop, "Name", "");
6511  RNA_def_struct_name_property(srna, prop);
6512 
6513  prop = RNA_def_property(srna, "relative_path", PROP_STRING, PROP_FILEPATH);
6515  "rna_FileBrowser_FileSelectEntry_relative_path_get",
6516  "rna_FileBrowser_FileSelectEntry_relative_path_length",
6517  NULL);
6519  "Relative Path",
6520  "Path relative to the directory currently displayed in the File "
6521  "Browser (includes the file name)");
6523 
6524  prop = RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE);
6527  "rna_FileBrowser_FileSelectEntry_id_type_get",
6528  NULL,
6529  "rna_FileBrowser_FileSelectEntry_id_type_itemf");
6532  prop,
6533  "Data-block Type",
6534  "The type of the data-block, if the file represents one ('NONE' otherwise)");
6535 
6536  prop = RNA_def_property(srna, "local_id", PROP_POINTER, PROP_NONE);
6537  RNA_def_property_struct_type(prop, "ID");
6539  prop, "rna_FileBrowser_FileSelectEntry_local_id_get", NULL, NULL, NULL);
6541  "",
6542  "The local data-block this file represents; only valid if that is a "
6543  "data-block in this file");
6545 
6546  prop = RNA_def_int(
6547  srna,
6548  "preview_icon_id",
6549  0,
6550  INT_MIN,
6551  INT_MAX,
6552  "Icon ID",
6553  "Unique integer identifying the preview of this file as an icon (zero means invalid)",
6554  INT_MIN,
6555  INT_MAX);
6558  prop, "rna_FileBrowser_FileSelectEntry_preview_icon_id_get", NULL, NULL);
6559 
6560  prop = RNA_def_property(srna, "asset_data", PROP_POINTER, PROP_NONE);
6561  RNA_def_property_struct_type(prop, "AssetMetaData");
6563  prop, "rna_FileBrowser_FileSelectEntry_asset_data_get", NULL, NULL, NULL);
6565  prop, "Asset Data", "Asset data, valid if the file represents an asset");
6566 }
6567 
6569 {
6570  StructRNA *srna;
6571  PropertyRNA *prop;
6572 
6573  static const EnumPropertyItem file_display_items[] = {
6575  "LIST_VERTICAL",
6576  ICON_LONGDISPLAY,
6577  "Vertical List",
6578  "Display files as a vertical list"},
6580  "LIST_HORIZONTAL",
6581  ICON_SHORTDISPLAY,
6582  "Horizontal List",
6583  "Display files as a horizontal list"},
6584  {FILE_IMGDISPLAY, "THUMBNAIL", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"},
6585  {0, NULL, 0, NULL, NULL},
6586  };
6587 
6588  static const EnumPropertyItem display_size_items[] = {
6589  {64, "TINY", 0, "Tiny", ""},
6590  {96, "SMALL", 0, "Small", ""},
6591  {128, "NORMAL", 0, "Medium", ""},
6592  {192, "LARGE", 0, "Large", ""},
6593  {0, NULL, 0, NULL, NULL},
6594  };
6595 
6596  srna = RNA_def_struct(brna, "FileSelectParams", NULL);
6597  RNA_def_struct_path_func(srna, "rna_FileSelectParams_path");
6598  RNA_def_struct_ui_text(srna, "File Select Parameters", "File Select Parameters");
6599 
6600  prop = RNA_def_property(srna, "title", PROP_STRING, PROP_NONE);
6601  RNA_def_property_string_sdna(prop, NULL, "title");
6602  RNA_def_property_ui_text(prop, "Title", "Title for the file browser");
6604 
6605  /* Use BYTESTRING rather than DIRPATH as subtype so UI code doesn't add OT_directory_browse
6606  * button when displaying this prop in the file browser (it would just open a file browser). That
6607  * should be the only effective difference between the two. */
6608  prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_BYTESTRING);
6609  RNA_def_property_string_sdna(prop, NULL, "dir");
6610  RNA_def_property_ui_text(prop, "Directory", "Directory displayed in the file browser");
6612 
6613  prop = RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
6614  RNA_def_property_string_sdna(prop, NULL, "file");
6615  RNA_def_property_ui_text(prop, "File Name", "Active file in the file browser");
6616  RNA_def_property_editable_func(prop, "rna_FileSelectParams_filename_editable");
6618 
6619  prop = RNA_def_property(srna, "use_library_browsing", PROP_BOOLEAN, PROP_NONE);
6621  prop, "Library Browser", "Whether we may browse blender files' content or not");
6623  RNA_def_property_boolean_funcs(prop, "rna_FileSelectParams_use_lib_get", NULL);
6624 
6625  prop = RNA_def_property(srna, "display_type", PROP_ENUM, PROP_NONE);
6626  RNA_def_property_enum_sdna(prop, NULL, "display");
6627  RNA_def_property_enum_items(prop, file_display_items);
6628  RNA_def_property_ui_text(prop, "Display Mode", "Display mode for the file list");
6630 
6631  prop = RNA_def_property(srna, "recursion_level", PROP_ENUM, PROP_NONE);
6633  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_FileSelectParams_recursion_level_itemf");
6634  RNA_def_property_ui_text(prop, "Recursion", "Numbers of dirtree levels to show simultaneously");
6636 
6637  prop = RNA_def_property(srna, "show_details_size", PROP_BOOLEAN, PROP_NONE);
6638  RNA_def_property_boolean_sdna(prop, NULL, "details_flags", FILE_DETAILS_SIZE);
6639  RNA_def_property_ui_text(prop, "File Size", "Show a column listing the size of each file");
6641 
6642  prop = RNA_def_property(srna, "show_details_datetime", PROP_BOOLEAN, PROP_NONE);
6643  RNA_def_property_boolean_sdna(prop, NULL, "details_flags", FILE_DETAILS_DATETIME);
6645  prop,
6646  "File Modification Date",
6647  "Show a column listing the date and time of modification for each file");
6649 
6650  prop = RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE);
6652  RNA_def_property_ui_text(prop, "Filter Files", "Enable filtering of files");
6654 
6655  prop = RNA_def_property(srna, "show_hidden", PROP_BOOLEAN, PROP_NONE);
6657  RNA_def_property_ui_text(prop, "Show Hidden", "Show hidden dot files");
6659 
6660  prop = RNA_def_property(srna, "sort_method", PROP_ENUM, PROP_NONE);
6661  RNA_def_property_enum_sdna(prop, NULL, "sort");
6663  RNA_def_property_ui_text(prop, "Sort", "");
6665 
6666  prop = RNA_def_property(srna, "use_sort_invert", PROP_BOOLEAN, PROP_NONE);
6669  prop, "Reverse Sorting", "Sort items descending, from highest value to lowest");
6671 
6672  prop = RNA_def_property(srna, "use_filter_image", PROP_BOOLEAN, PROP_NONE);
6674  RNA_def_property_ui_text(prop, "Filter Images", "Show image files");
6675  RNA_def_property_ui_icon(prop, ICON_FILE_IMAGE, 0);
6677 
6678  prop = RNA_def_property(srna, "use_filter_blender", PROP_BOOLEAN, PROP_NONE);
6680  RNA_def_property_ui_text(prop, "Filter Blender", "Show .blend files");
6681  RNA_def_property_ui_icon(prop, ICON_FILE_BLEND, 0);
6683 
6684  prop = RNA_def_property(srna, "use_filter_backup", PROP_BOOLEAN, PROP_NONE);
6687  prop, "Filter Blender Backup Files", "Show .blend1, .blend2, etc. files");
6688  RNA_def_property_ui_icon(prop, ICON_FILE_BACKUP, 0);
6690 
6691  prop = RNA_def_property(srna, "use_filter_movie", PROP_BOOLEAN, PROP_NONE);
6693  RNA_def_property_ui_text(prop, "Filter Movies", "Show movie files");
6694  RNA_def_property_ui_icon(prop, ICON_FILE_MOVIE, 0);
6696 
6697  prop = RNA_def_property(srna, "use_filter_script", PROP_BOOLEAN, PROP_NONE);
6699  RNA_def_property_ui_text(prop, "Filter Script", "Show script files");
6700  RNA_def_property_ui_icon(prop, ICON_FILE_SCRIPT, 0);
6702 
6703  prop = RNA_def_property(srna, "use_filter_font", PROP_BOOLEAN, PROP_NONE);
6705  RNA_def_property_ui_text(prop, "Filter Fonts", "Show font files");
6706  RNA_def_property_ui_icon(prop, ICON_FILE_FONT, 0);
6708 
6709  prop = RNA_def_property(srna, "use_filter_sound", PROP_BOOLEAN, PROP_NONE);
6711  RNA_def_property_ui_text(prop, "Filter Sound", "Show sound files");
6712  RNA_def_property_ui_icon(prop, ICON_FILE_SOUND, 0);
6714 
6715  prop = RNA_def_property(srna, "use_filter_text", PROP_BOOLEAN, PROP_NONE);
6717  RNA_def_property_ui_text(prop, "Filter Text", "Show text files");
6718  RNA_def_property_ui_icon(prop, ICON_FILE_TEXT, 0);
6720 
6721  prop = RNA_def_property(srna, "use_filter_volume", PROP_BOOLEAN, PROP_NONE);
6723  RNA_def_property_ui_text(prop, "Filter Volume", "Show 3D volume files");
6724  RNA_def_property_ui_icon(prop, ICON_FILE_VOLUME, 0);
6726 
6727  prop = RNA_def_property(srna, "use_filter_folder", PROP_BOOLEAN, PROP_NONE);
6729  RNA_def_property_ui_text(prop, "Filter Folder", "Show folders");
6730  RNA_def_property_ui_icon(prop, ICON_FILE_FOLDER, 0);
6732 
6733  prop = RNA_def_property(srna, "use_filter_blendid", PROP_BOOLEAN, PROP_NONE);
6736  prop, "Filter Blender IDs", "Show .blend files items (objects, materials, etc.)");
6737  RNA_def_property_ui_icon(prop, ICON_BLENDER, 0);
6739 
6740  prop = RNA_def_property(srna, "use_filter_asset_only", PROP_BOOLEAN, PROP_NONE);
6743  prop, "Only Assets", "Hide .blend files items that are not data-blocks with asset metadata");
6745 
6746  prop = RNA_def_property(srna, "filter_id", PROP_POINTER, PROP_NONE);
6748  RNA_def_property_struct_type(prop, "FileSelectIDFilter");
6749  RNA_def_property_pointer_funcs(prop, "rna_FileSelectParams_filter_id_get", NULL, NULL, NULL);
6751  prop, "Filter ID Types", "Which ID types to show/hide, when browsing a library");
6752 
6753  prop = RNA_def_property(srna, "filter_glob", PROP_STRING, PROP_NONE);
6754  RNA_def_property_string_sdna(prop, NULL, "filter_glob");
6756  "Extension Filter",
6757  "UNIX shell-like filename patterns matching, supports wildcards ('*') "
6758  "and list of patterns separated by ';'");
6759  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_FileSelectPrams_filter_glob_set");
6761 
6762  prop = RNA_def_property(srna, "filter_search", PROP_STRING, PROP_NONE);
6763  RNA_def_property_string_sdna(prop, NULL, "filter_search");
6764  RNA_def_property_ui_text(prop, "Name Filter", "Filter by name, supports '*' wildcard");
6767 
6768  prop = RNA_def_property(srna, "display_size", PROP_ENUM, PROP_NONE);
6769  RNA_def_property_enum_sdna(prop, NULL, "thumbnail_size");
6770  RNA_def_property_enum_items(prop, display_size_items);
6772  "Display Size",
6773  "Change the size of the display (width of columns or thumbnails size)");
6775 }
6776 
6778 {
6779  StructRNA *srna;
6780  PropertyRNA *prop;
6781 
6782  static const EnumPropertyItem asset_import_type_items[] = {
6783  {FILE_ASSET_IMPORT_LINK, "LINK", 0, "Link", "Import the assets as linked data-block"},
6785  "APPEND",
6786  0,
6787  "Append",
6788  "Import the assets as copied data-block, with no link to the original asset data-block"},
6790  "APPEND_REUSE",
6791  0,
6792  "Append (Reuse Data)",
6793  "Import the assets as copied data-block while avoiding multiple copies of nested, "
6794  "typically heavy data. For example the textures of a material asset, or the mesh of an "
6795  "object asset, don't have to be copied every time this asset is imported. The instances of "
6796  "the asset share the data instead"},
6797  {0, NULL, 0, NULL, NULL},
6798  };
6799 
6800  srna = RNA_def_struct(brna, "FileAssetSelectParams", "FileSelectParams");
6802  srna, "Asset Select Parameters", "Settings for the file selection in Asset Browser mode");
6803 
6805  "rna_FileAssetSelectParams_asset_library_get",
6806  "rna_FileAssetSelectParams_asset_library_set");
6807  RNA_def_property_ui_text(prop, "Asset Library", "");
6809 
6810  prop = RNA_def_property(srna, "catalog_id", PROP_STRING, PROP_NONE);
6812  "rna_FileAssetSelectParams_catalog_id_get",
6813  "rna_FileAssetSelectParams_catalog_id_length",
6814  NULL);
6816  RNA_def_property_ui_text(prop, "Catalog UUID", "The UUID of the catalog shown in the browser");
6817 
6818  prop = RNA_def_property(srna, "filter_asset_id", PROP_POINTER, PROP_NONE);
6820  RNA_def_property_struct_type(prop, "FileAssetSelectIDFilter");
6822  prop, "rna_FileAssetSelectParams_filter_id_get", NULL, NULL, NULL);
6824  "Filter Asset Types",
6825  "Which asset types to show/hide, when browsing an asset library");
6826 
6827  prop = RNA_def_property(srna, "import_type", PROP_ENUM, PROP_NONE);
6828  RNA_def_property_enum_items(prop, asset_import_type_items);
6829  RNA_def_property_ui_text(prop, "Import Type", "Determine how the asset will be imported");
6830  /* Asset drag info saved by buttons stores the import type, so the space must redraw when import
6831  * type changes. */
6833 }
6834 
6836 {
6837  StructRNA *srna;
6838  PropertyRNA *prop;
6839 
6840  srna = RNA_def_struct(brna, "FileBrowserFSMenuEntry", NULL);
6841  RNA_def_struct_sdna(srna, "FSMenuEntry");
6842  RNA_def_struct_ui_text(srna, "File Select Parameters", "File Select Parameters");
6843 
6844  prop = RNA_def_property(srna, "path", PROP_STRING, PROP_FILEPATH);
6846  "rna_FileBrowser_FSMenuEntry_path_get",
6847  "rna_FileBrowser_FSMenuEntry_path_length",
6848  "rna_FileBrowser_FSMenuEntry_path_set");
6849  RNA_def_property_ui_text(prop, "Path", "");
6850 
6851  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
6853  "rna_FileBrowser_FSMenuEntry_name_get",
6854  "rna_FileBrowser_FSMenuEntry_name_length",
6855  "rna_FileBrowser_FSMenuEntry_name_set");
6856  RNA_def_property_editable_func(prop, "rna_FileBrowser_FSMenuEntry_name_get_editable");
6857  RNA_def_property_ui_text(prop, "Name", "");
6858  RNA_def_struct_name_property(srna, prop);
6859 
6860  prop = RNA_def_property(srna, "icon", PROP_INT, PROP_NONE);
6862  prop, "rna_FileBrowser_FSMenuEntry_icon_get", "rna_FileBrowser_FSMenuEntry_icon_set", NULL);
6863  RNA_def_property_ui_text(prop, "Icon", "");
6864 
6865  prop = RNA_def_property(srna, "use_save", PROP_BOOLEAN, PROP_NONE);
6866  RNA_def_property_boolean_funcs(prop, "rna_FileBrowser_FSMenuEntry_use_save_get", NULL);
6868  prop, "Save", "Whether this path is saved in bookmarks, or generated from OS");
6870 
6871  prop = RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
6872  RNA_def_property_boolean_funcs(prop, "rna_FileBrowser_FSMenuEntry_is_valid_get", NULL);
6873  RNA_def_property_ui_text(prop, "Valid", "Whether this path is currently reachable");
6875 }
6876 
6878 {
6879  StructRNA *srna;
6880  PropertyRNA *prop;
6881 
6882  srna = RNA_def_struct(brna, "SpaceFileBrowser", "Space");
6883  RNA_def_struct_sdna(srna, "SpaceFile");
6884  RNA_def_struct_ui_text(srna, "Space File Browser", "File browser space data");
6885 
6887  srna, (1 << RGN_TYPE_TOOLS) | (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_TOOL_PROPS));
6888 
6889  prop = RNA_def_property(srna, "browse_mode", PROP_ENUM, PROP_NONE);
6892  prop,
6893  "Browsing Mode",
6894  "Type of the File Editor view (regular file browsing or asset browsing)");
6895  RNA_def_property_update(prop, 0, "rna_SpaceFileBrowser_browse_mode_update");
6896 
6897  prop = RNA_def_property(srna, "params", PROP_POINTER, PROP_NONE);
6898  RNA_def_property_struct_type(prop, "FileSelectParams");
6900  prop, "rna_FileBrowser_params_get", NULL, "rna_FileBrowser_params_typef", NULL);
6902  prop, "Filebrowser Parameter", "Parameters and Settings for the Filebrowser");
6903 
6904  prop = RNA_def_property(srna, "active_operator", PROP_POINTER, PROP_NONE);
6905  RNA_def_property_pointer_sdna(prop, NULL, "op");
6906  RNA_def_property_ui_text(prop, "Active Operator", "");
6907 
6908  /* keep this for compatibility with existing presets,
6909  * not exposed in c++ api because of keyword conflict */
6910  prop = RNA_def_property(srna, "operator", PROP_POINTER, PROP_NONE);
6911  RNA_def_property_pointer_sdna(prop, NULL, "op");
6912  RNA_def_property_ui_text(prop, "Active Operator", "");
6913 
6914  /* bookmarks, recent files etc. */
6915  prop = RNA_def_collection(srna,
6916  "system_folders",
6917  "FileBrowserFSMenuEntry",
6918  "System Folders",
6919  "System's folders (usually root, available hard drives, etc)");
6921  "rna_FileBrowser_FSMenuSystem_data_begin",
6922  "rna_FileBrowser_FSMenu_next",
6923  "rna_FileBrowser_FSMenu_end",
6924  "rna_FileBrowser_FSMenu_get",
6925  "rna_FileBrowser_FSMenuSystem_data_length",
6926  NULL,
6927  NULL,
6928  NULL);
6930 
6931  prop = RNA_def_int(srna,
6932  "system_folders_active",
6933  -1,
6934  -1,
6935  INT_MAX,
6936  "Active System Folder",
6937  "Index of active system folder (-1 if none)",
6938  -1,
6939  INT_MAX);
6940  RNA_def_property_int_sdna(prop, NULL, "systemnr");
6942  "rna_FileBrowser_FSMenuSystem_active_get",
6943  "rna_FileBrowser_FSMenuSystem_active_set",
6944  "rna_FileBrowser_FSMenuSystem_active_range");
6947  prop, NC_SPACE | ND_SPACE_FILE_PARAMS, "rna_FileBrowser_FSMenu_active_update");
6948 
6949  prop = RNA_def_collection(srna,
6950  "system_bookmarks",
6951  "FileBrowserFSMenuEntry",
6952  "System Bookmarks",
6953  "System's bookmarks");
6955  "rna_FileBrowser_FSMenuSystemBookmark_data_begin",
6956  "rna_FileBrowser_FSMenu_next",
6957  "rna_FileBrowser_FSMenu_end",
6958  "rna_FileBrowser_FSMenu_get",
6959  "rna_FileBrowser_FSMenuSystemBookmark_data_length",
6960  NULL,
6961  NULL,
6962  NULL);
6964 
6965  prop = RNA_def_int(srna,
6966  "system_bookmarks_active",
6967  -1,
6968  -1,
6969  INT_MAX,
6970  "Active System Bookmark",
6971  "Index of active system bookmark (-1 if none)",
6972  -1,
6973  INT_MAX);
6974  RNA_def_property_int_sdna(prop, NULL, "system_bookmarknr");
6976  "rna_FileBrowser_FSMenuSystemBookmark_active_get",
6977  "rna_FileBrowser_FSMenuSystemBookmark_active_set",
6978  "rna_FileBrowser_FSMenuSystemBookmark_active_range");
6981  prop, NC_SPACE | ND_SPACE_FILE_PARAMS, "rna_FileBrowser_FSMenu_active_update");
6982 
6983  prop = RNA_def_collection(
6984  srna, "bookmarks", "FileBrowserFSMenuEntry", "Bookmarks", "User's bookmarks");
6986  "rna_FileBrowser_FSMenuBookmark_data_begin",
6987  "rna_FileBrowser_FSMenu_next",
6988  "rna_FileBrowser_FSMenu_end",
6989  "rna_FileBrowser_FSMenu_get",
6990  "rna_FileBrowser_FSMenuBookmark_data_length",
6991  NULL,
6992  NULL,
6993  NULL);
6995 
6996  prop = RNA_def_int(srna,
6997  "bookmarks_active",
6998  -1,
6999  -1,
7000  INT_MAX,
7001  "Active Bookmark",
7002  "Index of active bookmark (-1 if none)",
7003  -1,
7004  INT_MAX);
7005  RNA_def_property_int_sdna(prop, NULL, "bookmarknr");
7007  "rna_FileBrowser_FSMenuBookmark_active_get",
7008  "rna_FileBrowser_FSMenuBookmark_active_set",
7009  "rna_FileBrowser_FSMenuBookmark_active_range");
7012  prop, NC_SPACE | ND_SPACE_FILE_PARAMS, "rna_FileBrowser_FSMenu_active_update");
7013 
7014  prop = RNA_def_collection(
7015  srna, "recent_folders", "FileBrowserFSMenuEntry", "Recent Folders", "");
7017  "rna_FileBrowser_FSMenuRecent_data_begin",
7018  "rna_FileBrowser_FSMenu_next",
7019  "rna_FileBrowser_FSMenu_end",
7020  "rna_FileBrowser_FSMenu_get",
7021  "rna_FileBrowser_FSMenuRecent_data_length",
7022  NULL,
7023  NULL,
7024  NULL);
7026 
7027  prop = RNA_def_int(srna,
7028  "recent_folders_active",
7029  -1,
7030  -1,
7031  INT_MAX,
7032  "Active Recent Folder",
7033  "Index of active recent folder (-1 if none)",
7034  -1,
7035  INT_MAX);
7036  RNA_def_property_int_sdna(prop, NULL, "recentnr");
7038  "rna_FileBrowser_FSMenuRecent_active_get",
7039  "rna_FileBrowser_FSMenuRecent_active_set",
7040  "rna_FileBrowser_FSMenuRecent_active_range");
7043  prop, NC_SPACE | ND_SPACE_FILE_PARAMS, "rna_FileBrowser_FSMenu_active_update");
7044 
7046 }
7047 
7048 static void rna_def_space_info(BlenderRNA *brna)
7049 {
7050  StructRNA *srna;
7051  PropertyRNA *prop;
7052 
7053  srna = RNA_def_struct(brna, "SpaceInfo", "Space");
7054  RNA_def_struct_sdna(srna, "SpaceInfo");
7055  RNA_def_struct_ui_text(srna, "Space Info", "Info space data");
7056 
7057  /* reporting display */
7058  prop = RNA_def_property(srna, "show_report_debug", PROP_BOOLEAN, PROP_NONE);
7060  RNA_def_property_ui_text(prop, "Show Debug", "Display debug reporting info");
7062 
7063  prop = RNA_def_property(srna, "show_report_info", PROP_BOOLEAN, PROP_NONE);
7064  RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_INFO);
7065  RNA_def_property_ui_text(prop, "Show Info", "Display general information");
7067 
7068  prop = RNA_def_property(srna, "show_report_operator", PROP_BOOLEAN, PROP_NONE);
7069  RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_OP);
7070  RNA_def_property_ui_text(prop, "Show Operator", "Display the operator log");
7072 
7073  prop = RNA_def_property(srna, "show_report_warning", PROP_BOOLEAN, PROP_NONE);
7074  RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_WARN);
7075  RNA_def_property_ui_text(prop, "Show Warn", "Display warnings");
7077 
7078  prop = RNA_def_property(srna, "show_report_error", PROP_BOOLEAN, PROP_NONE);
7079  RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_ERR);
7080  RNA_def_property_ui_text(prop, "Show Error", "Display error text");
7082 }
7083 
7085 {
7086  static const EnumPropertyItem filter_type_items[] = {
7087  {0, "NAME", 0, "Name", "Filter based on the operator name"},
7088  {1, "KEY", 0, "Key-Binding", "Filter based on key bindings"},
7089  {0, NULL, 0, NULL, NULL},
7090  };
7091 
7092  StructRNA *srna;
7093  PropertyRNA *prop;
7094 
7095  srna = RNA_def_struct(brna, "SpacePreferences", "Space");
7096  RNA_def_struct_sdna(srna, "SpaceUserPref");
7097  RNA_def_struct_ui_text(srna, "Space Preferences", "Blender preferences space data");
7098 
7099  prop = RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE);
7100  RNA_def_property_enum_sdna(prop, NULL, "filter_type");
7101  RNA_def_property_enum_items(prop, filter_type_items);
7102  RNA_def_property_ui_text(prop, "Filter Type", "Filter method");
7104 
7105  prop = RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE);
7106  RNA_def_property_string_sdna(prop, NULL, "filter");
7108  RNA_def_property_ui_text(prop, "Filter", "Search term for filtering in the UI");
7109 }
7110 
7112 {
7113  StructRNA *srna;
7114  PropertyRNA *prop;
7115 
7116  srna = RNA_def_struct(brna, "NodeTreePath", NULL);
7117  RNA_def_struct_sdna(srna, "bNodeTreePath");
7118  RNA_def_struct_ui_text(srna, "Node Tree Path", "Element of the node space tree path");
7119 
7120  prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
7121  RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
7123  RNA_def_property_ui_text(prop, "Node Tree", "Base node tree from context");
7124 }
7125 
7127 {
7128  StructRNA *srna;
7129  PropertyRNA *prop, *parm;
7130  FunctionRNA *func;
7131 
7132  RNA_def_property_srna(cprop, "SpaceNodeEditorPath");
7133  srna = RNA_def_struct(brna, "SpaceNodeEditorPath", NULL);
7134  RNA_def_struct_sdna(srna, "SpaceNode");
7135  RNA_def_struct_ui_text(srna, "Space Node Editor Path", "History of node trees in the editor");
7136 
7137  prop = RNA_def_property(srna, "to_string", PROP_STRING, PROP_NONE);
7139  prop, "rna_SpaceNodeEditor_path_get", "rna_SpaceNodeEditor_path_length", NULL);
7141  RNA_def_struct_ui_text(srna, "Path", "Get the node tree path as a string");
7142 
7143  func = RNA_def_function(srna, "clear", "rna_SpaceNodeEditor_path_clear");
7144  RNA_def_function_ui_description(func, "Reset the node tree path");
7146 
7147  func = RNA_def_function(srna, "start", "rna_SpaceNodeEditor_path_start");
7148  RNA_def_function_ui_description(func, "Set the root node tree");
7150  parm = RNA_def_pointer(func, "node_tree", "NodeTree", "Node Tree", "");
7152 
7153  func = RNA_def_function(srna, "append", "rna_SpaceNodeEditor_path_append");
7154  RNA_def_function_ui_description(func, "Append a node group tree to the path");
7156  parm = RNA_def_pointer(
7157  func, "node_tree", "NodeTree", "Node Tree", "Node tree to append to the node editor path");
7159  parm = RNA_def_pointer(func, "node", "Node", "Node", "Group node linking to this node tree");
7161 
7162  func = RNA_def_function(srna, "pop", "rna_SpaceNodeEditor_path_pop");
7163  RNA_def_function_ui_description(func, "Remove the last node tree from the path");
7165 }
7166 
7168 {
7169  StructRNA *srna;
7170  PropertyRNA *prop;
7171 
7172  srna = RNA_def_struct(brna, "SpaceNodeOverlay", NULL);
7173  RNA_def_struct_sdna(srna, "SpaceNode");
7174  RNA_def_struct_nested(brna, srna, "SpaceNodeEditor");
7175  RNA_def_struct_path_func(srna, "rna_SpaceNodeOverlay_path");
7177  srna, "Overlay Settings", "Settings for display of overlays in the Node Editor");
7178 
7179  prop = RNA_def_property(srna, "show_overlays", PROP_BOOLEAN, PROP_NONE);
7182  RNA_def_property_ui_text(prop, "Show Overlays", "Display overlays like colored or dashed wires");
7184 
7185  prop = RNA_def_property(srna, "show_wire_color", PROP_BOOLEAN, PROP_NONE);
7189  prop, "Show Wire Colors", "Color node links based on their connected sockets");
7191 
7192  prop = RNA_def_property(srna, "show_timing", PROP_BOOLEAN, PROP_NONE);
7194  RNA_def_property_boolean_default(prop, false);
7195  RNA_def_property_ui_text(prop, "Show Timing", "Display each node's last execution time");
7197 
7198  prop = RNA_def_property(srna, "show_context_path", PROP_BOOLEAN, PROP_NONE);
7201  RNA_def_property_ui_text(prop, "Show Tree Path", "Display breadcrumbs for the editor's context");
7203 
7204  prop = RNA_def_property(srna, "show_named_attributes", PROP_BOOLEAN, PROP_NONE);
7208  prop, "Show Named Attributes", "Show when nodes are using named attributes");
7210 }
7211 
7212 static void rna_def_space_node(BlenderRNA *brna)
7213 {
7214  StructRNA *srna;
7215  PropertyRNA *prop;
7216 
7217  static const EnumPropertyItem texture_id_type_items[] = {
7218  {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World"},
7219  {SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, "Brush", "Edit texture nodes from Brush"},
7220 # ifdef WITH_FREESTYLE
7222  "LINESTYLE",
7223  ICON_LINE_DATA,
7224  "Line Style",
7225  "Edit texture nodes from Line Style"},
7226 # endif
7227  {0, NULL, 0, NULL, NULL},
7228  };
7229 
7230  static const EnumPropertyItem shader_type_items[] = {
7231  {SNODE_SHADER_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit shader nodes from Object"},
7232  {SNODE_SHADER_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit shader nodes from World"},
7233 # ifdef WITH_FREESTYLE
7235  "LINESTYLE",
7236  ICON_LINE_DATA,
7237  "Line Style",
7238  "Edit shader nodes from Line Style"},
7239 # endif
7240  {0, NULL, 0, NULL, NULL},
7241  };
7242 
7243  static const EnumPropertyItem backdrop_channels_items[] = {
7244  {SNODE_USE_ALPHA,
7245  "COLOR_ALPHA",
7246  ICON_IMAGE_RGB_ALPHA,
7247  "Color and Alpha",
7248  "Display image with RGB colors and alpha transparency"},
7249  {0, "COLOR", ICON_IMAGE_RGB, "Color", "Display image with RGB colors"},
7250  {SNODE_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, "Alpha", "Display alpha transparency channel"},
7251  {SNODE_SHOW_R, "RED", ICON_COLOR_RED, "Red", ""},
7252  {SNODE_SHOW_G, "GREEN", ICON_COLOR_GREEN, "Green", ""},
7253  {SNODE_SHOW_B, "BLUE", ICON_COLOR_BLUE, "Blue", ""},
7254  {0, NULL, 0, NULL, NULL},
7255  };
7256 
7257  static const EnumPropertyItem insert_ofs_dir_items[] = {
7258  {SNODE_INSERTOFS_DIR_RIGHT, "RIGHT", 0, "Right"},
7259  {SNODE_INSERTOFS_DIR_LEFT, "LEFT", 0, "Left"},
7260  {0, NULL, 0, NULL, NULL},
7261  };
7262 
7263  static const EnumPropertyItem dummy_items[] = {
7264  {0, "DUMMY", 0, "", ""},
7265  {0, NULL, 0, NULL, NULL},
7266  };
7267 
7268  srna = RNA_def_struct(brna, "SpaceNodeEditor", "Space");
7269  RNA_def_struct_sdna(srna, "SpaceNode");
7270  RNA_def_struct_ui_text(srna, "Space Node Editor", "Node editor space data");
7271 
7273 
7274  prop = RNA_def_property(srna, "tree_type", PROP_ENUM, PROP_NONE);
7275  RNA_def_property_enum_items(prop, dummy_items);
7277  "rna_SpaceNodeEditor_tree_type_get",
7278  "rna_SpaceNodeEditor_tree_type_set",
7279  "rna_SpaceNodeEditor_tree_type_itemf");
7280  RNA_def_property_ui_text(prop, "Tree Type", "Node tree type to display and edit");
7282 
7283  prop = RNA_def_property(srna, "texture_type", PROP_ENUM, PROP_NONE);
7284  RNA_def_property_enum_sdna(prop, NULL, "texfrom");
7285  RNA_def_property_enum_items(prop, texture_id_type_items);
7286  RNA_def_property_ui_text(prop, "Texture Type", "Type of data to take texture from");
7288 
7289  prop = RNA_def_property(srna, "shader_type", PROP_ENUM, PROP_NONE);
7290  RNA_def_property_enum_sdna(prop, NULL, "shaderfrom");
7291  RNA_def_property_enum_items(prop, shader_type_items);
7292  RNA_def_property_ui_text(prop, "Shader Type", "Type of data to take shader from");
7294 
7295  prop = RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
7297  RNA_def_property_ui_text(prop, "ID", "Data-block whose nodes are being edited");
7298 
7299  prop = RNA_def_property(srna, "id_from", PROP_POINTER, PROP_NONE);
7300  RNA_def_property_pointer_sdna(prop, NULL, "from");
7303  prop, "ID From", "Data-block from which the edited data-block is linked");
7304 
7305  prop = RNA_def_property(srna, "path", PROP_COLLECTION, PROP_NONE);
7306  RNA_def_property_collection_sdna(prop, NULL, "treepath", NULL);
7307  RNA_def_property_struct_type(prop, "NodeTreePath");
7309  prop, "Node Tree Path", "Path from the data-block to the currently edited node tree");
7310  rna_def_space_node_path_api(brna, prop);
7311 
7312  prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
7314  prop, NULL, "rna_SpaceNodeEditor_node_tree_set", NULL, "rna_SpaceNodeEditor_node_tree_poll");
7315  RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
7317  RNA_def_property_ui_text(prop, "Node Tree", "Base node tree from context");
7318  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, "rna_SpaceNodeEditor_node_tree_update");
7319 
7320  prop = RNA_def_property(srna, "edit_tree", PROP_POINTER, PROP_NONE);
7321  RNA_def_property_pointer_sdna(prop, NULL, "edittree");
7323  RNA_def_property_ui_text(prop, "Edit Tree", "Node tree being displayed and edited");
7324 
7325  prop = RNA_def_property(srna, "pin", PROP_BOOLEAN, PROP_NONE);
7327  RNA_def_property_ui_text(prop, "Pinned", "Use the pinned node tree");
7328  RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
7330 
7331  prop = RNA_def_property(srna, "show_backdrop", PROP_BOOLEAN, PROP_NONE);
7334  prop, "Backdrop", "Use active Viewer Node output as backdrop for compositing nodes");
7336  prop, NC_SPACE | ND_SPACE_NODE_VIEW, "rna_SpaceNodeEditor_show_backdrop_update");
7337 
7338  prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE);
7340  RNA_def_property_ui_text(prop, "Show Annotation", "Show annotations for this view");
7342 
7343  prop = RNA_def_property(srna, "use_auto_render", PROP_BOOLEAN, PROP_NONE);
7346  prop, "Auto Render", "Re-render and composite changed layers on 3D edits");
7348 
7349  prop = RNA_def_property(srna, "backdrop_zoom", PROP_FLOAT, PROP_NONE);
7350  RNA_def_property_float_sdna(prop, NULL, "zoom");
7351  RNA_def_property_float_default(prop, 1.0f);
7352  RNA_def_property_range(prop, 0.01f, FLT_MAX);
7353  RNA_def_property_ui_range(prop, 0.01, 100, 1, 2);
7354  RNA_def_property_ui_text(prop, "Backdrop Zoom", "Backdrop zoom factor");
7356 
7357  prop = RNA_def_property(srna, "backdrop_offset", PROP_FLOAT, PROP_NONE);
7358  RNA_def_property_float_sdna(prop, NULL, "xof");
7359  RNA_def_property_array(prop, 2);
7360  RNA_def_property_ui_text(prop, "Backdrop Offset", "Backdrop offset");
7362 
7363  prop = RNA_def_property(srna, "backdrop_channels", PROP_ENUM, PROP_NONE);
7365  RNA_def_property_enum_items(prop, backdrop_channels_items);
7366  RNA_def_property_ui_text(prop, "Display Channels", "Channels of the image to draw");
7368  /* the mx/my "cursor" in the node editor is used only by operators to store the mouse position */
7369  prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ);
7370  RNA_def_property_array(prop, 2);
7372  "rna_SpaceNodeEditor_cursor_location_get",
7373  "rna_SpaceNodeEditor_cursor_location_set",
7374  NULL);
7375  RNA_def_property_ui_text(prop, "Cursor Location", "Location for adding new nodes");
7377 
7378  /* insert offset (called "Auto-offset" in UI) */
7379  prop = RNA_def_property(srna, "use_insert_offset", PROP_BOOLEAN, PROP_NONE);
7382  "Auto-offset",
7383  "Automatically offset the following or previous nodes in a "
7384  "chain when inserting a new node");
7385  RNA_def_property_ui_icon(prop, ICON_NODE_INSERT_ON, 1);
7387 
7388  prop = RNA_def_property(srna, "insert_offset_direction", PROP_ENUM, PROP_NONE);
7389  RNA_def_property_enum_bitflag_sdna(prop, NULL, "insert_ofs_dir");
7390  RNA_def_property_enum_items(prop, insert_ofs_dir_items);
7392  prop, "Auto-offset Direction", "Direction to offset nodes on insertion");
7394 
7395  /* Overlays */
7396  prop = RNA_def_property(srna, "overlay", PROP_POINTER, PROP_NONE);
7398  RNA_def_property_struct_type(prop, "SpaceNodeOverlay");
7399  RNA_def_property_pointer_funcs(prop, "rna_SpaceNode_overlay_get", NULL, NULL, NULL);
7401  prop, "Overlay Settings", "Settings for display of overlays in the Node Editor");
7402 
7404  RNA_api_space_node(srna);
7405 }
7406 
7407 static void rna_def_space_clip(BlenderRNA *brna)
7408 {
7409  StructRNA *srna;
7410  PropertyRNA *prop;
7411 
7412  static const EnumPropertyItem view_items[] = {
7413  {SC_VIEW_CLIP, "CLIP", ICON_SEQUENCE, "Clip", "Show editing clip preview"},
7414  {SC_VIEW_GRAPH, "GRAPH", ICON_GRAPH, "Graph", "Show graph view for active element"},
7416  "DOPESHEET",
7417  ICON_ACTION,
7418  "Dopesheet",
7419  "Dopesheet view for tracking data"},
7420  {0, NULL, 0, NULL, NULL},
7421  };
7422 
7423  static const EnumPropertyItem annotation_source_items[] = {
7425  "CLIP",
7426  0,
7427  "Clip",
7428  "Show annotation data-block which belongs to movie clip"},
7430  "TRACK",
7431  0,
7432  "Track",
7433  "Show annotation data-block which belongs to active track"},
7434  {0, NULL, 0, NULL, NULL},
7435  };
7436 
7437  static const EnumPropertyItem pivot_items[] = {
7439  "BOUNDING_BOX_CENTER",
7440  ICON_PIVOT_BOUNDBOX,
7441  "Bounding Box Center",
7442  "Pivot around bounding box center of selected object(s)"},
7443  {V3D_AROUND_CURSOR, "CURSOR", ICON_PIVOT_CURSOR, "2D Cursor", "Pivot around the 2D cursor"},
7445  "INDIVIDUAL_ORIGINS",
7446  ICON_PIVOT_INDIVIDUAL,
7447  "Individual Origins",
7448  "Pivot around each object's own origin"},
7450  "MEDIAN_POINT",
7451  ICON_PIVOT_MEDIAN,
7452  "Median Point",
7453  "Pivot around the median point of selected objects"},
7454  {0, NULL, 0, NULL, NULL},
7455  };
7456 
7457  srna = RNA_def_struct(brna, "SpaceClipEditor", "Space");
7458  RNA_def_struct_sdna(srna, "SpaceClip");
7459  RNA_def_struct_ui_text(srna, "Space Clip Editor", "Clip editor space data");
7460 
7462  srna, (1 << RGN_TYPE_TOOLS) | (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_HUD));
7463 
7464  /* movieclip */
7465  prop = RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
7467  RNA_def_property_ui_text(prop, "Movie Clip", "Movie clip displayed and edited in this space");
7468  RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceClipEditor_clip_set", NULL, NULL);
7470 
7471  /* clip user */
7472  prop = RNA_def_property(srna, "clip_user", PROP_POINTER, PROP_NONE);
7474  RNA_def_property_struct_type(prop, "MovieClipUser");
7475  RNA_def_property_pointer_sdna(prop, NULL, "user");
7477  prop, "Movie Clip User", "Parameters defining which frame of the movie clip is displayed");
7479 
7480  /* mask */
7481  rna_def_space_mask_info(srna, NC_SPACE | ND_SPACE_CLIP, "rna_SpaceClipEditor_mask_set");
7482 
7483  /* mode */
7484  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
7485  RNA_def_property_enum_sdna(prop, NULL, "mode");
7487  RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
7488  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, "rna_SpaceClipEditor_clip_mode_update");
7489 
7490  /* view */
7491  prop = RNA_def_property(srna, "view", PROP_ENUM, PROP_NONE);
7492  RNA_def_property_enum_sdna(prop, NULL, "view");
7493  RNA_def_property_enum_items(prop, view_items);
7494  RNA_def_property_ui_text(prop, "View", "Type of the clip editor view");
7496  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, "rna_SpaceClipEditor_view_type_update");
7497 
7498  /* show pattern */
7499  prop = RNA_def_property(srna, "show_marker_pattern", PROP_BOOLEAN, PROP_NONE);
7500  RNA_def_property_ui_text(prop, "Show Marker Pattern", "Show pattern boundbox for markers");
7503 
7504  /* show search */
7505  prop = RNA_def_property(srna, "show_marker_search", PROP_BOOLEAN, PROP_NONE);
7506  RNA_def_property_ui_text(prop, "Show Marker Search", "Show search boundbox for markers");
7509 
7510  /* lock to selection */
7511  prop = RNA_def_property(srna, "lock_selection", PROP_BOOLEAN, PROP_NONE);
7513  prop, "Lock to Selection", "Lock viewport to selected markers during playback");
7516  prop, NC_SPACE | ND_SPACE_CLIP, "rna_SpaceClipEditor_lock_selection_update");
7517 
7518  /* lock to time cursor */
7519  prop = RNA_def_property(srna, "lock_time_cursor", PROP_BOOLEAN, PROP_NONE);
7521  prop, "Lock to Time Cursor", "Lock curves view to time cursor during playback and tracking");
7524 
7525  /* show markers paths */
7526  prop = RNA_def_property(srna, "show_track_path", PROP_BOOLEAN, PROP_NONE);
7528  RNA_def_property_ui_text(prop, "Show Track Path", "Show path of how track moves");
7530 
7531  /* path length */
7532  prop = RNA_def_property(srna, "path_length", PROP_INT, PROP_NONE);
7533  RNA_def_property_int_sdna(prop, NULL, "path_length");
7534  RNA_def_property_range(prop, 0, INT_MAX);
7535  RNA_def_property_ui_text(prop, "Path Length", "Length of displaying path, in frames");
7537 
7538  /* show tiny markers */
7539  prop = RNA_def_property(srna, "show_tiny_markers", PROP_BOOLEAN, PROP_NONE);
7540  RNA_def_property_ui_text(prop, "Show Tiny Markers", "Show markers in a more compact manner");
7543 
7544  /* show bundles */
7545  prop = RNA_def_property(srna, "show_bundles", PROP_BOOLEAN, PROP_NONE);
7546  RNA_def_property_ui_text(prop, "Show Bundles", "Show projection of 3D markers into footage");
7549 
7550  /* mute footage */
7551  prop = RNA_def_property(srna, "use_mute_footage", PROP_BOOLEAN, PROP_NONE);
7552  RNA_def_property_ui_text(prop, "Mute Footage", "Mute footage and show black background instead");
7555 
7556  /* hide disabled */
7557  prop = RNA_def_property(srna, "show_disabled", PROP_BOOLEAN, PROP_NONE);
7558  RNA_def_property_ui_text(prop, "Show Disabled", "Show disabled tracks from the footage");
7561 
7562  prop = RNA_def_property(srna, "show_metadata", PROP_BOOLEAN, PROP_NONE);
7564  RNA_def_property_ui_text(prop, "Show Metadata", "Show metadata of clip");
7566 
7567  /* scopes */
7568  prop = RNA_def_property(srna, "scopes", PROP_POINTER, PROP_NONE);
7569  RNA_def_property_pointer_sdna(prop, NULL, "scopes");
7570  RNA_def_property_struct_type(prop, "MovieClipScopes");
7571  RNA_def_property_ui_text(prop, "Scopes", "Scopes to visualize movie clip statistics");
7572 
7573  /* show names */
7574  prop = RNA_def_property(srna, "show_names", PROP_BOOLEAN, PROP_NONE);
7576  RNA_def_property_ui_text(prop, "Show Names", "Show track names and status");
7578 
7579  /* show grid */
7580  prop = RNA_def_property(srna, "show_grid", PROP_BOOLEAN, PROP_NONE);
7582  RNA_def_property_ui_text(prop, "Show Grid", "Show grid showing lens distortion");
7584 
7585  /* show stable */
7586  prop = RNA_def_property(srna, "show_stable", PROP_BOOLEAN, PROP_NONE);
7589  prop, "Show Stable", "Show stable footage in editor (if stabilization is enabled)");
7591 
7592  /* manual calibration */
7593  prop = RNA_def_property(srna, "use_manual_calibration", PROP_BOOLEAN, PROP_NONE);
7595  RNA_def_property_ui_text(prop, "Manual Calibration", "Use manual calibration helpers");
7597 
7598  /* show annotation */
7599  prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE);
7601  RNA_def_property_ui_text(prop, "Show Annotation", "Show annotations for this view");
7603 
7604  /* show filters */
7605  prop = RNA_def_property(srna, "show_filters", PROP_BOOLEAN, PROP_NONE);
7607  RNA_def_property_ui_text(prop, "Show Filters", "Show filters for graph editor");
7609 
7610  /* show graph_frames */
7611  prop = RNA_def_property(srna, "show_graph_frames", PROP_BOOLEAN, PROP_NONE);
7614  prop,
7615  "Show Frames",
7616  "Show curve for per-frame average error (camera motion should be solved first)");
7618 
7619  /* show graph tracks motion */
7620  prop = RNA_def_property(srna, "show_graph_tracks_motion", PROP_BOOLEAN, PROP_NONE);
7623  prop,
7624  "Show Tracks Motion",
7625  "Display the speed curves (in \"x\" direction red, in \"y\" direction green) "
7626  "for the selected tracks");
7628 
7629  /* show graph tracks motion */
7630  prop = RNA_def_property(srna, "show_graph_tracks_error", PROP_BOOLEAN, PROP_NONE);
7633  prop, "Show Tracks Error", "Display the reprojection error curve for selected tracks");
7635 
7636  /* show_only_selected */
7637  prop = RNA_def_property(srna, "show_graph_only_selected", PROP_BOOLEAN, PROP_NONE);
7640  prop, "Only Show Selected", "Only include channels relating to selected objects and data");
7641  RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, 0);
7643 
7644  /* show_hidden */
7645  prop = RNA_def_property(srna, "show_graph_hidden", PROP_BOOLEAN, PROP_NONE);
7648  prop, "Display Hidden", "Include channels from objects/bone that aren't visible");
7649  RNA_def_property_ui_icon(prop, ICON_GHOST_ENABLED, 0);
7651 
7652  /* ** channels ** */
7653 
7654  /* show_red_channel */
7655  prop = RNA_def_property(srna, "show_red_channel", PROP_BOOLEAN, PROP_NONE);
7657  RNA_def_property_ui_text(prop, "Show Red Channel", "Show red channel in the frame");
7659 
7660  /* show_green_channel */
7661  prop = RNA_def_property(srna, "show_green_channel", PROP_BOOLEAN, PROP_NONE);
7663  RNA_def_property_ui_text(prop, "Show Green Channel", "Show green channel in the frame");
7665 
7666  /* show_blue_channel */
7667  prop = RNA_def_property(srna, "show_blue_channel", PROP_BOOLEAN, PROP_NONE);
7669  RNA_def_property_ui_text(prop, "Show Blue Channel", "Show blue channel in the frame");
7671 
7672  /* preview_grayscale */
7673  prop = RNA_def_property(srna, "use_grayscale_preview", PROP_BOOLEAN, PROP_NONE);
7675  RNA_def_property_ui_text(prop, "Grayscale", "Display frame in grayscale mode");
7677 
7678  /* timeline */
7679  prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
7681  RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
7683 
7684  /* grease pencil source */
7685  prop = RNA_def_property(srna, "annotation_source", PROP_ENUM, PROP_NONE);
7686  RNA_def_property_enum_sdna(prop, NULL, "gpencil_src");
7687  RNA_def_property_enum_items(prop, annotation_source_items);
7688  RNA_def_property_ui_text(prop, "Annotation Source", "Where the annotation comes from");
7691 
7692  /* transform */
7693  prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ);
7694  RNA_def_property_float_sdna(prop, NULL, "cursor");
7695  RNA_def_property_array(prop, 2);
7696  RNA_def_property_ui_text(prop, "2D Cursor Location", "2D cursor location for this view");
7698 
7699  /* pivot point */
7700  prop = RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
7701  RNA_def_property_enum_sdna(prop, NULL, "around");
7702  RNA_def_property_enum_items(prop, pivot_items);
7703  RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling");
7705 }
7706 
7708 {
7709  StructRNA *srna;
7710  PropertyRNA *prop;
7711 
7712  srna = RNA_def_struct(brna, "SpreadsheetColumnID", NULL);
7713  RNA_def_struct_sdna(srna, "SpreadsheetColumnID");
7715  srna, "Spreadsheet Column ID", "Data used to identify a spreadsheet column");
7716 
7717  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
7718  RNA_def_property_ui_text(prop, "Column Name", "");
7720 }
7721 
7723 {
7724  StructRNA *srna;
7725  PropertyRNA *prop;
7726 
7727  static const EnumPropertyItem data_type_items[] = {
7728  {SPREADSHEET_VALUE_TYPE_INT32, "INT32", ICON_NONE, "Integer", ""},
7729  {SPREADSHEET_VALUE_TYPE_FLOAT, "FLOAT", ICON_NONE, "Float", ""},
7730  {SPREADSHEET_VALUE_TYPE_BOOL, "BOOLEAN", ICON_NONE, "Boolean", ""},
7731  {SPREADSHEET_VALUE_TYPE_INSTANCES, "INSTANCES", ICON_NONE, "Instances", ""},
7732  {0, NULL, 0, NULL, NULL},
7733  };
7734 
7735  srna = RNA_def_struct(brna, "SpreadsheetColumn", NULL);
7736  RNA_def_struct_sdna(srna, "SpreadsheetColumn");
7738  srna, "Spreadsheet Column", "Persistent data associated with a spreadsheet column");
7739 
7740  prop = RNA_def_property(srna, "data_type", PROP_ENUM, PROP_NONE);
7741  RNA_def_property_enum_sdna(prop, NULL, "data_type");
7742  RNA_def_property_enum_items(prop, data_type_items);
7744  prop, "Data Type", "The data type of the corresponding column visible in the spreadsheet");
7747 
7749 
7750  prop = RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
7751  RNA_def_property_struct_type(prop, "SpreadsheetColumnID");
7753  prop, "ID", "Data used to identify the corresponding data from the data source");
7754 }
7755 
7757 {
7758  StructRNA *srna;
7759  PropertyRNA *prop;
7760 
7761  static const EnumPropertyItem rule_operation_items[] = {
7762  {SPREADSHEET_ROW_FILTER_EQUAL, "EQUAL", ICON_NONE, "Equal To", ""},
7763  {SPREADSHEET_ROW_FILTER_GREATER, "GREATER", ICON_NONE, "Greater Than", ""},
7764  {SPREADSHEET_ROW_FILTER_LESS, "LESS", ICON_NONE, "Less Than", ""},
7765  {0, NULL, 0, NULL, NULL},
7766  };
7767 
7768  srna = RNA_def_struct(brna, "SpreadsheetRowFilter", NULL);
7769  RNA_def_struct_sdna(srna, "SpreadsheetRowFilter");
7770  RNA_def_struct_ui_text(srna, "Spreadsheet Row Filter", "");
7771 
7772  prop = RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
7774  RNA_def_property_ui_text(prop, "Enabled", "");
7775  RNA_def_property_ui_icon(prop, ICON_CHECKBOX_DEHLT, 1);
7777 
7778  prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
7780  RNA_def_property_ui_text(prop, "Show Expanded", "");
7781  RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
7783 
7784  prop = RNA_def_property(srna, "column_name", PROP_STRING, PROP_NONE);
7785  RNA_def_property_ui_text(prop, "Column Name", "");
7787 
7788  prop = RNA_def_property(srna, "operation", PROP_ENUM, PROP_NONE);
7789  RNA_def_property_enum_items(prop, rule_operation_items);
7790  RNA_def_property_ui_text(prop, "Operation", "");
7792 
7793  prop = RNA_def_property(srna, "value_float", PROP_FLOAT, PROP_NONE);
7794  RNA_def_property_ui_text(prop, "Float Value", "");
7796 
7797  prop = RNA_def_property(srna, "value_float2", PROP_FLOAT, PROP_NONE);
7798  RNA_def_property_array(prop, 2);
7799  RNA_def_property_ui_text(prop, "2D Vector Value", "");
7801 
7802  prop = RNA_def_property(srna, "value_float3", PROP_FLOAT, PROP_NONE);
7803  RNA_def_property_array(prop, 3);
7804  RNA_def_property_ui_text(prop, "Vector Value", "");
7806 
7807  prop = RNA_def_property(srna, "value_color", PROP_FLOAT, PROP_NONE);
7808  RNA_def_property_array(prop, 4);
7809  RNA_def_property_ui_text(prop, "Color Value", "");
7811 
7812  prop = RNA_def_property(srna, "value_string", PROP_STRING, PROP_NONE);
7813  RNA_def_property_ui_text(prop, "Text Value", "");
7815 
7816  prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
7817  RNA_def_property_ui_text(prop, "Threshold", "How close float values need to be to be equal");
7818  RNA_def_property_range(prop, 0.0, FLT_MAX);
7820 
7821  prop = RNA_def_property(srna, "value_int", PROP_INT, PROP_NONE);
7822  RNA_def_property_int_sdna(prop, NULL, "value_int");
7823  RNA_def_property_ui_text(prop, "Integer Value", "");
7825 
7826  prop = RNA_def_property(srna, "value_int8", PROP_INT, PROP_NONE);
7827  RNA_def_property_int_sdna(prop, NULL, "value_int");
7828  RNA_def_property_range(prop, -128, 127);
7829  RNA_def_property_ui_text(prop, "8-Bit Integer Value", "");
7831 
7832  prop = RNA_def_property(srna, "value_boolean", PROP_BOOLEAN, PROP_NONE);
7834  RNA_def_property_ui_text(prop, "Boolean Value", "");
7836 }
7837 
7839  {SPREADSHEET_CONTEXT_OBJECT, "OBJECT", ICON_NONE, "Object", ""},
7840  {SPREADSHEET_CONTEXT_MODIFIER, "MODIFIER", ICON_NONE, "Modifier", ""},
7841  {SPREADSHEET_CONTEXT_NODE, "NODE", ICON_NONE, "Node", ""},
7842  {0, NULL, 0, NULL, NULL},
7843 };
7844 
7846 {
7847  StructRNA *srna;
7848  PropertyRNA *prop;
7849 
7850  srna = RNA_def_struct(brna, "SpreadsheetContext", NULL);
7851  RNA_def_struct_ui_text(srna, "Spreadsheet Context", "Element of spreadsheet context path");
7852  RNA_def_struct_refine_func(srna, "rna_spreadsheet_context_refine");
7853 
7854  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
7856  RNA_def_property_ui_text(prop, "Type", "Type of the context");
7858 
7860  (1 << RGN_TYPE_CHANNELS) | (1 << RGN_TYPE_FOOTER));
7861 }
7862 
7864 {
7865  StructRNA *srna;
7866  PropertyRNA *prop;
7867 
7868  srna = RNA_def_struct(brna, "SpreadsheetContextObject", "SpreadsheetContext");
7869 
7870  prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
7871  RNA_def_property_struct_type(prop, "Object");
7873  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, "rna_spreadsheet_context_update");
7874 }
7875 
7877 {
7878  StructRNA *srna;
7879  PropertyRNA *prop;
7880 
7881  srna = RNA_def_struct(brna, "SpreadsheetContextModifier", "SpreadsheetContext");
7882 
7883  prop = RNA_def_property(srna, "modifier_name", PROP_STRING, PROP_NONE);
7884  RNA_def_property_ui_text(prop, "Modifier Name", "");
7885  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, "rna_spreadsheet_context_update");
7886 }
7887 
7889 {
7890  StructRNA *srna;
7891  PropertyRNA *prop;
7892 
7893  srna = RNA_def_struct(brna, "SpreadsheetContextNode", "SpreadsheetContext");
7894 
7895  prop = RNA_def_property(srna, "node_name", PROP_STRING, PROP_NONE);
7896  RNA_def_property_ui_text(prop, "Node Name", "");
7897  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, "rna_spreadsheet_context_update");
7898 }
7899 
7901 {
7902  StructRNA *srna;
7903  PropertyRNA *parm;
7904  FunctionRNA *func;
7905 
7906  RNA_def_property_srna(cprop, "SpreadsheetContextPath");
7907  srna = RNA_def_struct(brna, "SpreadsheetContextPath", NULL);
7908  RNA_def_struct_sdna(srna, "SpaceSpreadsheet");
7909 
7910  func = RNA_def_function(srna, "append", "rna_SpaceSpreadsheet_context_path_append");
7911  RNA_def_function_ui_description(func, "Append a context path element");
7912  parm = RNA_def_property(func, "type", PROP_ENUM, PROP_NONE);
7915  parm = RNA_def_pointer(
7916  func, "context", "SpreadsheetContext", "", "Newly created context path element");
7917  RNA_def_function_return(func, parm);
7918 
7919  func = RNA_def_function(srna, "clear", "rna_SpaceSpreadsheet_context_path_clear");
7920  RNA_def_function_ui_description(func, "Clear entire context path");
7921 
7922  func = RNA_def_function(srna, "guess", "rna_SpaceSpreadsheet_context_path_guess");
7923  RNA_def_function_ui_description(func, "Guess the context path from the current context");
7925 }
7926 
7928 {
7929  PropertyRNA *prop;
7930  StructRNA *srna;
7931 
7932  static const EnumPropertyItem object_eval_state_items[] = {
7934  "EVALUATED",
7935  ICON_NONE,
7936  "Evaluated",
7937  "Use data from fully or partially evaluated object"},
7939  "ORIGINAL",
7940  ICON_NONE,
7941  "Original",
7942  "Use data from original object without any modifiers applied"},
7944  "VIEWER_NODE",
7945  ICON_NONE,
7946  "Viewer Node",
7947  "Use intermediate data from viewer node"},
7948  {0, NULL, 0, NULL, NULL},
7949  };
7950 
7955 
7956  srna = RNA_def_struct(brna, "SpaceSpreadsheet", "Space");
7957  RNA_def_struct_ui_text(srna, "Space Spreadsheet", "Spreadsheet space data");
7958 
7960  srna, (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_CHANNELS) | (1 << RGN_TYPE_FOOTER));
7961 
7962  prop = RNA_def_property(srna, "is_pinned", PROP_BOOLEAN, PROP_NONE);
7964  RNA_def_property_ui_text(prop, "Is Pinned", "Context path is pinned");
7966 
7967  prop = RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE);
7969  RNA_def_property_ui_text(prop, "Use Filter", "");
7971 
7972  prop = RNA_def_property(srna, "display_context_path_collapsed", PROP_BOOLEAN, PROP_NONE);
7974  RNA_def_property_ui_text(prop, "Display Context Path Collapsed", "");
7976 
7977  prop = RNA_def_property(srna, "context_path", PROP_COLLECTION, PROP_NONE);
7978  RNA_def_property_struct_type(prop, "SpreadsheetContext");
7979  RNA_def_property_ui_text(prop, "Context Path", "Context path to the data being displayed");
7981 
7982  prop = RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE);
7985  prop, "Show Only Selected", "Only include rows that correspond to selected elements");
7986  RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, 0);
7988 
7989  prop = RNA_def_property(srna, "geometry_component_type", PROP_ENUM, PROP_NONE);
7992  prop, "Geometry Component", "Part of the geometry to display data from");
7995  "rna_SpaceSpreadsheet_geometry_component_type_update");
7996 
7997  prop = RNA_def_property(srna, "attribute_domain", PROP_ENUM, PROP_NONE);
7999  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceSpreadsheet_attribute_domain_itemf");
8000  RNA_def_property_ui_text(prop, "Attribute Domain", "Attribute domain to display");
8002 
8003  prop = RNA_def_property(srna, "object_eval_state", PROP_ENUM, PROP_NONE);
8004  RNA_def_property_enum_items(prop, object_eval_state_items);
8005  RNA_def_property_ui_text(prop, "Object Evaluation State", "");
8007 
8009 
8010  prop = RNA_def_property(srna, "columns", PROP_COLLECTION, PROP_NONE);
8011  RNA_def_property_collection_sdna(prop, NULL, "columns", NULL);
8012  RNA_def_property_struct_type(prop, "SpreadsheetColumn");
8013  RNA_def_property_ui_text(prop, "Columns", "Persistent data associated with spreadsheet columns");
8015 
8017 
8018  prop = RNA_def_property(srna, "row_filters", PROP_COLLECTION, PROP_NONE);
8019  RNA_def_property_collection_sdna(prop, NULL, "row_filters", NULL);
8020  RNA_def_property_struct_type(prop, "SpreadsheetRowFilter");
8021  RNA_def_property_ui_text(prop, "Row Filters", "Filters to remove rows from the displayed data");
8023 }
8024 
8026 {
8027  rna_def_space(brna);
8028  rna_def_space_image(brna);
8030  rna_def_space_text(brna);
8036  rna_def_filemenu_entry(brna);
8038  rna_def_space_outliner(brna);
8039  rna_def_space_view3d(brna);
8042  rna_def_space_graph(brna);
8043  rna_def_space_nla(brna);
8044  rna_def_space_console(brna);
8045  rna_def_console_line(brna);
8046  rna_def_space_info(brna);
8047  rna_def_space_userpref(brna);
8048  rna_def_node_tree_path(brna);
8049  rna_def_space_node(brna);
8050  rna_def_space_clip(brna);
8052 }
8053 
8054 #endif
bool BKE_animdata_set_action(struct ReportList *reports, struct ID *id, struct bAction *act)
Definition: anim_data.c:118
struct AnimData * BKE_animdata_ensure_id(struct ID *id)
Definition: anim_data.c:90
Generic geometry attributes built on CustomData.
@ ATTR_DOMAIN_CURVE
Definition: BKE_attribute.h:31
@ ATTR_DOMAIN_INSTANCE
Definition: BKE_attribute.h:32
@ ATTR_DOMAIN_POINT
Definition: BKE_attribute.h:27
@ ATTR_DOMAIN_FACE
Definition: BKE_attribute.h:29
@ ATTR_DOMAIN_CORNER
Definition: BKE_attribute.h:30
@ ATTR_DOMAIN_EDGE
Definition: BKE_attribute.h:28
struct ScrArea * CTX_wm_area(const bContext *C)
Definition: context.c:738
struct Scene * CTX_data_scene(const bContext *C)
Definition: context.c:1090
struct wmWindowManager * CTX_wm_manager(const bContext *C)
Definition: context.c:713
struct ViewLayer * CTX_data_view_layer(const bContext *C)
Definition: context.c:1100
struct ARegion * CTX_wm_region(const bContext *C)
Definition: context.c:749
struct Main * CTX_data_main(const bContext *C)
Definition: context.c:1074
GeometryComponentType
@ GEO_COMPONENT_TYPE_MESH
@ GEO_COMPONENT_TYPE_POINT_CLOUD
@ GEO_COMPONENT_TYPE_INSTANCES
@ GEO_COMPONENT_TYPE_CURVE
@ GEO_COMPONENT_TYPE_VOLUME
#define G_MAIN
Definition: BKE_global.h:267
struct RenderPass * BKE_image_multilayer_index(struct RenderResult *rr, struct ImageUser *iuser)
void BKE_image_multiview_index(const struct Image *ima, struct ImageUser *iuser)
void BKE_image_init_imageuser(struct Image *ima, struct ImageUser *iuser)
struct Key * BKE_key_from_object(struct Object *ob)
Definition: key.c:1803
void BKE_layer_collection_local_sync(struct ViewLayer *view_layer, const struct View3D *v3d)
bool BKE_view_layer_has_valid_aov(struct ViewLayer *view_layer)
Definition: layer.c:2493
void id_us_ensure_real(struct ID *id)
Definition: lib_id.c:260
bool BKE_id_is_in_global_main(struct ID *id)
Definition: lib_id.c:1902
#define MOVIECLIP_PREVIEW_GRAYSCALE
#define MOVIECLIP_DISABLE_BLUE
#define MOVIECLIP_DISABLE_RED
#define MOVIECLIP_DISABLE_GREEN
bool BKE_nla_action_stash(struct AnimData *adt, bool is_liboverride)
Definition: nla.c:1841
void BKE_nla_tweakmode_exit(struct AnimData *adt)
Definition: nla.c:2092
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
bool BKE_scene_uses_blender_eevee(const struct Scene *scene)
bool BKE_scene_uses_blender_workbench(const struct Scene *scene)
struct ARegion * BKE_area_find_region_type(const struct ScrArea *area, int type)
struct ARegion struct ARegion struct ScrArea * BKE_screen_find_area_from_space(struct bScreen *screen, struct SpaceLink *sl) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
struct StudioLight * BKE_studiolight_findindex(int index, int flag)
Definition: studiolight.c:1478
@ STUDIOLIGHT_INTERNAL
@ STUDIOLIGHT_TYPE_MATCAP
@ STUDIOLIGHT_TYPE_WORLD
@ STUDIOLIGHT_TYPE_STUDIO
@ STUDIOLIGHT_EXTERNAL_FILE
struct ListBase * BKE_studiolight_listbase(void)
Definition: studiolight.c:1489
struct StudioLight * BKE_studiolight_find(const char *name, int flag)
Definition: studiolight.c:1462
#define STUDIOLIGHT_FLAG_ALL
#define BLI_assert_unreachable()
Definition: BLI_assert.h:93
#define BLI_assert(a)
Definition: BLI_assert.h:46
#define BLI_assert_msg(a, msg)
Definition: BLI_assert.h:53
struct GSet GSet
Definition: BLI_ghash.h:340
bool BLI_ghashutil_strcmp(const void *a, const void *b)
unsigned int BLI_ghashutil_strhash_p(const void *ptr)
GSet * BLI_gset_new(GSetHashFP hashfp, GSetCmpFP cmpfp, const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT
Definition: BLI_ghash.c:947
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
Definition: BLI_ghash.c:1037
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
Definition: BLI_listbase.h:269
#define LISTBASE_FOREACH(type, var, list)
Definition: BLI_listbase.h:336
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:80
int BLI_findstringindex(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define M_PI
Definition: BLI_math_base.h:20
bool invert_m4_m4(float R[4][4], const float A[4][4])
Definition: math_matrix.c:1287
void invert_qt_qt(float q1[4], const float q2[4])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void negate_v3_v3(float r[3], const float a[3])
#define FILE_MAXFILE
bool BLI_path_extension_glob_validate(char *ext_fnmatch) ATTR_NONNULL()
Definition: path_util.c:1367
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
Definition: string.c:42
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
Definition: string.c:64
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL(1
unsigned int uint
Definition: BLI_sys_types.h:67
#define ARRAY_SIZE(arr)
#define UNUSED_VARS(...)
#define CLAMPIS(a, b, c)
#define UNUSED(x)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define ELEM(...)
#define STREQ(a, b)
void BLI_uuid_format(char *buffer, bUUID uuid) ATTR_NONNULL()
Definition: uuid.cc:86
#define snprintf
Definition: BLI_winstuff.h:53
#define BLT_I18NCONTEXT_ID_TEXT
#define BLT_I18NCONTEXT_ID_ID
#define BLT_I18NCONTEXT_ID_MOVIECLIP
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
#define FILTER_ID_OB
Definition: DNA_ID.h:916
#define FILTER_ID_MC
Definition: DNA_ID.h:912
#define FILTER_ID_SPK
Definition: DNA_ID.h:920
#define FILTER_ID_CF
Definition: DNA_ID.h:927
@ ID_RECALC_TRANSFORM
Definition: DNA_ID.h:771
@ ID_RECALC_ANIMATION
Definition: DNA_ID.h:794
@ ID_RECALC_GEOMETRY
Definition: DNA_ID.h:791
@ ID_RECALC_BASE_FLAGS
Definition: DNA_ID.h:821
#define FILTER_ID_AC
Definition: DNA_ID.h:899
#define FILTER_ID_MA
Definition: DNA_ID.h:910
#define FILTER_ID_CA
Definition: DNA_ID.h:902
#define FILTER_ID_SO
Definition: DNA_ID.h:921
#define FILTER_ID_PT
Definition: DNA_ID.h:931
#define FILTER_ID_CU_LEGACY
Definition: DNA_ID.h:903
#define FILTER_ID_BR
Definition: DNA_ID.h:901
@ INDEX_ID_MAX
Definition: DNA_ID.h:1058
#define FILTER_ID_WS
Definition: DNA_ID.h:928
#define FILTER_ID_MB
Definition: DNA_ID.h:911
#define FILTER_ID_VF
Definition: DNA_ID.h:924
#define FILTER_ID_LA
Definition: DNA_ID.h:907
#define FILTER_ID_GR
Definition: DNA_ID.h:905
#define FILTER_ID_TE
Definition: DNA_ID.h:922
#define FILTER_ID_LT
Definition: DNA_ID.h:909
#define FILTER_ID_LS
Definition: DNA_ID.h:908
#define FILTER_ID_PA
Definition: DNA_ID.h:926
#define FILTER_ID_CV
Definition: DNA_ID.h:930
#define FILTER_ID_ME
Definition: DNA_ID.h:913
#define FILTER_ID_AR
Definition: DNA_ID.h:900
#define FILTER_ID_MSK
Definition: DNA_ID.h:914
#define FILTER_ID_GD
Definition: DNA_ID.h:904
#define FILTER_ID_PC
Definition: DNA_ID.h:918
#define ID_IS_OVERRIDE_LIBRARY(_id)
Definition: DNA_ID.h:588
#define FILTER_ID_PAL
Definition: DNA_ID.h:917
#define FILTER_ID_IM
Definition: DNA_ID.h:906
#define FILTER_ID_SCE
Definition: DNA_ID.h:919
#define FILTER_ID_LP
Definition: DNA_ID.h:929
#define FILTER_ID_VO
Definition: DNA_ID.h:932
#define FILTER_ID_WO
Definition: DNA_ID.h:925
#define FILTER_ID_NT
Definition: DNA_ID.h:915
#define FILTER_ID_TXT
Definition: DNA_ID.h:923
@ ID_TE
Definition: DNA_ID_enums.h:52
@ ID_LA
Definition: DNA_ID_enums.h:55
@ ID_KE
Definition: DNA_ID_enums.h:58
@ ID_SCE
Definition: DNA_ID_enums.h:45
@ ID_WO
Definition: DNA_ID_enums.h:59
@ ID_MA
Definition: DNA_ID_enums.h:51
@ ID_SCR
Definition: DNA_ID_enums.h:60
@ ID_OB
Definition: DNA_ID_enums.h:47
@ ADS_FILTER_SUMMARY
@ SACTSNAP_OFF
@ SACTSNAP_SECOND
@ SACTSNAP_TSTEP
@ SACTSNAP_MARKER
@ SACTSNAP_STEP
@ SACTSNAP_FRAME
@ TIME_CACHE_PARTICLES
@ TIME_CACHE_RIGIDBODY
@ TIME_CACHE_DYNAMICPAINT
@ TIME_CACHE_SOFTBODY
@ TIME_CACHE_DISPLAY
@ TIME_CACHE_CLOTH
@ TIME_CACHE_SMOKE
@ ADS_FLAG_SUMMARY_COLLAPSED
@ SACTCONT_GPENCIL
@ SACTCONT_ACTION
@ SACTCONT_TIMELINE
@ SACTCONT_DOPESHEET
@ SACTCONT_SHAPEKEY
@ SACTCONT_MASK
@ SACTCONT_CACHEFILE
@ SACTION_RUNTIME_FLAG_NEED_CHAN_SYNC
@ SACTION_NOTRANSKEYCULL
@ SACTION_POSEMARKERS_SHOW
@ SACTION_SHOW_INTERPOLATION
@ SACTION_SHOW_EXTREMES
@ SACTION_SHOW_MARKERS
@ SACTION_SLIDERS
@ SACTION_MARKERS_MOVE
@ SACTION_NOREALTIMEUPDATES
@ SACTION_DRAWTIME
#define MAX_NAME
Definition: DNA_defs.h:48
#define IMA_SHOW_STEREO
eViewLayerEEVEEPassType
@ EEVEE_RENDER_PASS_AO
@ EEVEE_RENDER_PASS_NORMAL
@ EEVEE_RENDER_PASS_DIFFUSE_LIGHT
@ EEVEE_RENDER_PASS_VOLUME_LIGHT
@ EEVEE_RENDER_PASS_AOV
@ EEVEE_RENDER_PASS_BLOOM
@ EEVEE_RENDER_PASS_DIFFUSE_COLOR
@ EEVEE_RENDER_PASS_ENVIRONMENT
@ EEVEE_RENDER_PASS_COMBINED
@ EEVEE_RENDER_PASS_SPECULAR_LIGHT
@ EEVEE_RENDER_PASS_SPECULAR_COLOR
@ EEVEE_RENDER_PASS_EMIT
@ EEVEE_RENDER_PASS_MIST
@ EEVEE_RENDER_PASS_SHADOW
@ AOV_CONFLICT
@ MASK_OVERLAY_COMBINED
@ MASK_OVERLAY_ALPHACHANNEL
#define MASK_DRAWFLAG_SPLINE
#define MASK_DRAWFLAG_OVERLAY
@ OB_WIRE
@ OB_TEXTURE
@ OB_SOLID
@ OB_RENDER
@ OB_MATERIAL
Object is a sort of wrapper for general info.
@ OB_EMPTY_CONE
@ OB_SINGLE_ARROW
@ OB_PLAINAXES
@ OB_ARROWS
@ OB_CIRCLE
@ OB_CUBE
@ OB_EMPTY_SPHERE
@ OB_POINTCLOUD
@ OB_GPENCIL
#define OBEDIT_FROM_VIEW_LAYER(view_layer)
#define OBACT(_view_layer)
@ SCE_EEVEE_BLOOM_ENABLED
@ STEREO_LEFT_ID
@ STEREO_RIGHT_ID
@ SCE_VIEWS_FORMAT_MULTIVIEW
@ RGN_FLAG_HIDDEN
@ RGN_FLAG_HIDDEN_BY_USER
@ RGN_TYPE_CHANNELS
@ RGN_TYPE_TOOL_HEADER
@ RGN_TYPE_UI
@ RGN_TYPE_WINDOW
@ RGN_TYPE_HUD
@ RGN_TYPE_FOOTER
@ RGN_TYPE_HEADER
@ RGN_TYPE_TOOLS
@ RGN_TYPE_TOOL_PROPS
@ RGN_ALIGN_NONE
@ RGN_ALIGN_QSPLIT
@ SEQ_TYPE_MOVIE
#define MAXSEQ
@ SN_OVERLAY_SHOW_PATH
@ SN_OVERLAY_SHOW_WIRE_COLORS
@ SN_OVERLAY_SHOW_TIMINGS
@ SN_OVERLAY_SHOW_OVERLAYS
@ SN_OVERLAY_SHOW_NAMED_ATTRIBUTES
@ SI_CUSTOM_GRID
@ SI_DRAW_TILE
@ SI_SHOW_ZBUF
@ SI_NO_DRAW_TEXPAINT
@ SI_SHOW_R
@ SI_DRAW_STRETCH
@ SI_SHOW_GPENCIL
@ SI_DRAW_METADATA
@ SI_CLIP_UV
@ SI_USE_ALPHA
@ SI_COORDFLOATS
@ SI_SHOW_G
@ SI_SHOW_B
@ SI_SHOW_ALPHA
@ SI_LIVE_UNWRAP
@ SI_NO_DRAWFACES
@ SI_DRAWSHADOW
@ SNODE_PIN
@ SNODE_USE_ALPHA
@ SNODE_SHOW_B
@ SNODE_AUTO_RENDER
@ SNODE_SHOW_G
@ SNODE_SHOW_R
@ SNODE_BACKDRAW
@ SNODE_SKIP_INSOFFSET
@ SNODE_SHOW_ALPHA
@ SNODE_SHOW_GPENCIL
@ SNODE_INSERTOFS_DIR_RIGHT
@ SNODE_INSERTOFS_DIR_LEFT
@ FILE_SORT_ALPHA
@ FILE_SORT_TIME
@ FILE_SORT_EXTENSION
@ FILE_SORT_SIZE
@ SI_OVERLAY_SHOW_OVERLAYS
@ SI_OVERLAY_SHOW_GRID_BACKGROUND
@ FILE_LOADLIB
@ SPREADSHEET_CONTEXT_OBJECT
@ SPREADSHEET_CONTEXT_MODIFIER
@ SPREADSHEET_CONTEXT_NODE
@ SEQ_RENDER_SIZE_PROXY_25
@ SEQ_RENDER_SIZE_PROXY_75
@ SEQ_RENDER_SIZE_PROXY_50
@ SEQ_RENDER_SIZE_SCENE
@ SEQ_RENDER_SIZE_PROXY_100
@ SEQ_RENDER_SIZE_NONE
@ FILE_TYPE_BLENDER
@ FILE_TYPE_TEXT
@ FILE_TYPE_PYSCRIPT
@ FILE_TYPE_BLENDER_BACKUP
@ FILE_TYPE_VOLUME
@ FILE_TYPE_MOVIE
@ FILE_TYPE_SOUND
@ FILE_TYPE_FOLDER
@ FILE_TYPE_FTFONT
@ FILE_TYPE_BLENDERLIB
@ FILE_TYPE_IMAGE
eSpace_Type
@ SPACE_TEXT
@ SPACE_CLIP
@ SPACE_ACTION
@ SPACE_CONSOLE
@ SPACE_OUTLINER
@ SPACE_STATUSBAR
@ SPACE_TOPBAR
@ SPACE_NODE
@ SPACE_SPREADSHEET
@ SPACE_USERPREF
@ SPACE_FILE
@ SPACE_PROPERTIES
@ SPACE_NLA
@ SPACE_SEQ
@ SPACE_EMPTY
@ SPACE_SCRIPT
@ SPACE_IMAGE
@ SPACE_GRAPH
@ SPACE_VIEW3D
@ SPACE_INFO
@ SEQ_TIMELINE_SHOW_FCURVES
@ SEQ_TIMELINE_SHOW_STRIP_DURATION
@ SEQ_TIMELINE_SHOW_THUMBNAILS
@ SEQ_TIMELINE_SHOW_STRIP_OFFSETS
@ SEQ_TIMELINE_ALL_WAVEFORMS
@ SEQ_TIMELINE_SHOW_STRIP_SOURCE
@ SEQ_TIMELINE_SHOW_STRIP_NAME
@ SEQ_TIMELINE_SHOW_GRID
@ SEQ_TIMELINE_NO_WAVEFORMS
@ SEQ_TIMELINE_SHOW_STRIP_COLOR_TAG
@ SI_GIZMO_HIDE
@ SI_GIZMO_HIDE_NAVIGATE
@ SI_UVDT_BLACK
@ SI_UVDT_DASH
@ SI_UVDT_WHITE
@ SI_UVDT_OUTLINE
@ SC_VIEW_GRAPH
@ SC_VIEW_CLIP
@ SC_VIEW_DOPESHEET
@ SEQ_GIZMO_HIDE
@ SEQ_GIZMO_HIDE_NAVIGATE
@ SEQ_GIZMO_HIDE_CONTEXT
@ SEQ_GIZMO_HIDE_TOOL
@ FILE_DETAILS_DATETIME
@ FILE_DETAILS_SIZE
@ SO_FIND_COMPLETE
@ SO_FIND_CASE_SENSITIVE
@ SEQ_VIEW_SEQUENCE_PREVIEW
@ SEQ_VIEW_SEQUENCE
@ SEQ_VIEW_PREVIEW
@ SI_UVDT_STRETCH_AREA
@ SI_UVDT_STRETCH_ANGLE
@ SIPO_MODE_DRIVERS
@ SIPO_MODE_ANIMATION
@ SIPO_DRAWTIME
@ SIPO_NODRAWCURSOR
@ SIPO_SELCUVERTSONLY
@ SIPO_SELVHANDLESONLY
@ SIPO_NORMALIZE_FREEZE
@ SIPO_NO_DRAW_EXTRAPOLATION
@ SIPO_NOREALTIMEUPDATES
@ SIPO_NOTRANSKEYCULL
@ SIPO_SHOW_MARKERS
@ SIPO_NOHANDLES
@ SIPO_NORMALIZE
@ SIPO_SLIDERS
@ SIPO_BEAUTYDRAW_OFF
@ CONSOLE_LINE_INFO
@ CONSOLE_LINE_ERROR
@ CONSOLE_LINE_INPUT
@ CONSOLE_LINE_OUTPUT
@ INFO_RPT_INFO
@ INFO_RPT_WARN
@ INFO_RPT_ERR
@ INFO_RPT_OP
@ INFO_RPT_DEBUG
@ FILE_BROWSE_MODE_ASSETS
@ FILE_BROWSE_MODE_FILES
@ SO_LIB_OVERRIDE_VIEW_HIERARCHIES
@ SO_LIB_OVERRIDE_VIEW_PROPERTIES
@ SPREADSHEET_ROW_FILTER_BOOL_VALUE
@ SPREADSHEET_ROW_FILTER_UI_EXPAND
@ SPREADSHEET_ROW_FILTER_ENABLED
@ SO_RESTRICT_HIDE
@ SO_RESTRICT_RENDER
@ SO_RESTRICT_INDIRECT_ONLY
@ SO_RESTRICT_VIEWPORT
@ SO_RESTRICT_ENABLE
@ SO_RESTRICT_HOLDOUT
@ SO_RESTRICT_SELECT
@ SC_MODE_TRACKING
@ SC_MODE_MASKEDIT
@ SO_FILTER_NO_OB_MESH
@ SO_FILTER_SHOW_SYSTEM_OVERRIDES
@ SO_FILTER_NO_OB_CAMERA
@ SO_FILTER_NO_CHILDREN
@ SO_FILTER_NO_OB_CONTENT
@ SO_FILTER_NO_OB_LAMP
@ SO_FILTER_ID_TYPE
@ SO_FILTER_OB_STATE_INVERSE
@ SO_FILTER_NO_OBJECT
@ SO_FILTER_NO_VIEW_LAYERS
@ SO_FILTER_NO_OB_OTHERS
@ SO_FILTER_NO_OB_EMPTY
@ SO_FILTER_NO_COLLECTION
@ SO_FILTER_NO_OB_ARMATURE
@ SPREADSHEET_FILTER_SELECTED_ONLY
@ SPREADSHEET_FILTER_ENABLE
@ SEQ_PREVIEW_SHOW_METADATA
@ SEQ_PREVIEW_SHOW_GPENCIL
@ SEQ_PREVIEW_SHOW_SAFE_MARGINS
@ SEQ_PREVIEW_SHOW_OUTLINE_SELECTED
@ SEQ_PREVIEW_SHOW_SAFE_CENTER
@ SEQ_PREVIEW_SHOW_2D_CURSOR
@ SNLA_DRAWTIME
@ SNLA_NOSTRIPCURVES
@ SNLA_NOLOCALMARKERS
@ SNLA_SHOW_MARKERS
@ SNLA_NOREALTIMEUPDATES
@ SO_SYNC_SELECT
@ SO_MODE_COLUMN
@ SO_SKIP_SORT_ALPHA
@ SEQ_DRAW_TRANSFORM_PREVIEW
@ SEQ_DRAW_BACKDROP
@ FILE_ASSET_IMPORT_APPEND_REUSE
@ FILE_ASSET_IMPORT_APPEND
@ FILE_ASSET_IMPORT_LINK
@ SO_FILTER_OB_SELECTABLE
@ SO_FILTER_OB_SELECTED
@ SO_FILTER_OB_VISIBLE
@ SO_FILTER_OB_ALL
@ SO_FILTER_OB_ACTIVE
@ SC_HIDE_DISABLED
@ SC_SHOW_SECONDS
@ SC_SHOW_MARKER_SEARCH
@ SC_SHOW_GRAPH_HIDDEN
@ SC_SHOW_NAMES
@ SC_SHOW_TINY_MARKER
@ SC_SHOW_GRAPH_FRAMES
@ SC_LOCK_SELECTION
@ SC_SHOW_METADATA
@ SC_SHOW_ANNOTATION
@ SC_SHOW_GRAPH_SEL_ONLY
@ SC_SHOW_GRID
@ SC_SHOW_STABLE
@ SC_SHOW_GRAPH_TRACKS_MOTION
@ SC_MUTE_FOOTAGE
@ SC_SHOW_BUNDLES
@ SC_LOCK_TIMECURSOR
@ SC_SHOW_MARKER_PATTERN
@ SC_MANUAL_CALIBRATION
@ SC_SHOW_TRACK_PATH
@ SC_SHOW_GRAPH_TRACKS_ERROR
@ SC_SHOW_FILTERS
@ SB_PIN_CONTEXT
@ FILE_VERTICALDISPLAY
@ FILE_IMGDISPLAY
@ FILE_HORIZONTALDISPLAY
@ ST_FIND_WRAP
@ ST_SHOW_MARGIN
@ ST_MATCH_CASE
@ ST_FIND_ALL
@ SEQ_OVERLAY_FRAME_TYPE_RECT
@ SEQ_OVERLAY_FRAME_TYPE_CURRENT
@ SEQ_OVERLAY_FRAME_TYPE_REFERENCE
@ SPREADSHEET_OBJECT_EVAL_STATE_VIEWER_NODE
@ SPREADSHEET_OBJECT_EVAL_STATE_EVALUATED
@ SPREADSHEET_OBJECT_EVAL_STATE_ORIGINAL
@ FILE_FILTER
@ FILE_SORT_INVERT
@ FILE_DIRSEL_ONLY
@ FILE_ASSETS_ONLY
@ FILE_HIDE_DOT
@ SEQ_DRAW_IMG_VECTORSCOPE
@ SEQ_DRAW_IMG_HISTOGRAM
@ SEQ_DRAW_IMG_IMBUF
@ SEQ_DRAW_IMG_WAVEFORM
@ SEQ_DRAWFRAMES
@ SEQ_SHOW_MARKERS
@ SEQ_USE_ALPHA
@ SEQ_MARKER_TRANS
@ SEQ_USE_PROXIES
@ SEQ_DRAW_COLOR_SEPARATED
@ SEQ_ZOOM_TO_FIT
@ SEQ_CLAMP_VIEW
@ SEQ_SHOW_OVERLAY
@ SC_GPENCIL_SRC_CLIP
@ SC_GPENCIL_SRC_TRACK
@ SI_PIXEL_SNAP_CORNER
@ SI_PIXEL_SNAP_CENTER
@ SI_PIXEL_SNAP_DISABLED
@ SPREADSHEET_ROW_FILTER_GREATER
@ SPREADSHEET_ROW_FILTER_EQUAL
@ SPREADSHEET_ROW_FILTER_LESS
@ SPREADSHEET_VALUE_TYPE_FLOAT
@ SPREADSHEET_VALUE_TYPE_BOOL
@ SPREADSHEET_VALUE_TYPE_INT32
@ SPREADSHEET_VALUE_TYPE_INSTANCES
@ PROPERTIES_SYNC_NEVER
@ PROPERTIES_SYNC_ALWAYS
@ PROPERTIES_SYNC_AUTO
@ SI_MODE_PAINT
@ SO_OVERRIDES_LIBRARY
@ SO_SEQUENCE
@ SO_DATA_API
@ SO_LIBRARIES
@ SO_VIEW_LAYER
@ SO_SCENES
@ SO_ID_ORPHANS
@ SNODE_TEX_BRUSH
@ SNODE_TEX_WORLD
@ SNODE_TEX_LINESTYLE
@ SNODE_SHADER_WORLD
@ SNODE_SHADER_LINESTYLE
@ SNODE_SHADER_OBJECT
@ SPREADSHEET_FLAG_CONTEXT_PATH_COLLAPSED
@ SPREADSHEET_FLAG_PINNED
@ BCONTEXT_CONSTRAINT
@ BCONTEXT_COLLECTION
@ BCONTEXT_OUTPUT
@ BCONTEXT_VIEW_LAYER
@ BCONTEXT_MATERIAL
@ BCONTEXT_TOT
@ BCONTEXT_SHADERFX
@ BCONTEXT_MODIFIER
@ BCONTEXT_BONE
@ BCONTEXT_DATA
@ BCONTEXT_OBJECT
@ BCONTEXT_BONE_CONSTRAINT
@ BCONTEXT_PHYSICS
@ BCONTEXT_SCENE
@ BCONTEXT_WORLD
@ BCONTEXT_RENDER
@ BCONTEXT_TEXTURE
@ BCONTEXT_TOOL
@ BCONTEXT_PARTICLE
@ USER_SEQ_PROXY_SETUP_AUTOMATIC
#define UUID_STRING_LEN
@ V2D_VIEWSYNC_SCREEN_TIME
@ V2D_ALIGN_NO_NEG_Y
@ V3D_SHADING_BACKGROUND_VIEWPORT
@ V3D_SHADING_BACKGROUND_WORLD
@ V3D_SHADING_BACKGROUND_THEME
@ V3D_SHADING_TEXTURE_COLOR
@ V3D_SHADING_VERTEX_COLOR
@ V3D_SHADING_MATERIAL_COLOR
@ V3D_SHADING_OBJECT_COLOR
@ V3D_SHADING_RANDOM_COLOR
@ V3D_SHADING_SINGLE_COLOR
@ V3D_LIGHTING_FLAT
@ V3D_LIGHTING_STUDIO
@ V3D_LIGHTING_MATCAP
@ V3D_OVERLAY_PAINT_WIRE
@ V3D_AROUND_CENTER_BOUNDS
@ V3D_AROUND_CURSOR
@ V3D_AROUND_CENTER_MEDIAN
@ V3D_AROUND_LOCAL_ORIGINS
#define V3D_SHOW_ANNOTATION
#define RV3D_VIEW_IS_AXIS(view)
#define V3D_GP_FADE_OBJECTS
@ V3D_GIZMO_SHOW_EMPTY_FORCE_FIELD
@ V3D_GIZMO_SHOW_EMPTY_IMAGE
#define RV3D_CAMZOOM_MAX
@ V3D_OVERLAY_LOOK_DEV
@ V3D_OVERLAY_FACE_ORIENTATION
@ V3D_OVERLAY_HIDE_OBJECT_ORIGINS
@ V3D_OVERLAY_HIDE_BONES
@ V3D_OVERLAY_HIDE_MOTION_PATHS
@ V3D_OVERLAY_WIREFRAMES
@ V3D_OVERLAY_HIDE_OBJECT_XTRAS
@ V3D_OVERLAY_ONION_SKINS
@ V3D_OVERLAY_FADE_INACTIVE
@ V3D_OVERLAY_HIDE_CURSOR
@ V3D_OVERLAY_HIDE_TEXT
@ V3D_OVERLAY_STATS
@ V3D_OVERLAY_BONE_SELECT
@ V3D_GIZMO_SHOW_LIGHT_LOOK_AT
@ V3D_GIZMO_SHOW_LIGHT_SIZE
#define V3D_LOCK_CAMERA
#define V3D_SHOW_ORTHO_GRID
#define V3D_S3D_DISPCAMERAS
#define RV3D_CAMOB
#define V3D_HIDE_HELPLINES
#define V3D_GP_FADE_NOACTIVE_LAYERS
#define V3D_SELECT_OUTLINE
#define V3D_DRAW_CENTERS
#define V3D_GP_SHOW_GRID_XRAY
@ RV3D_LOCK_ROTATION
@ RV3D_BOXVIEW
@ RV3D_BOXCLIP
#define RV3D_CLIPPING
@ V3D_GIZMO_SHOW_CAMERA_DOF_DIST
@ V3D_GIZMO_SHOW_CAMERA_LENS
@ V3D_SHADING_SHADOW
@ V3D_SHADING_SCENE_WORLD_RENDER
@ V3D_SHADING_SPECULAR_HIGHLIGHT
@ V3D_SHADING_DEPTH_OF_FIELD
@ V3D_SHADING_WORLD_ORIENTATION
@ V3D_SHADING_SCENE_WORLD
@ V3D_SHADING_OBJECT_OUTLINE
@ V3D_SHADING_SCENE_LIGHTS
@ V3D_SHADING_CAVITY
@ V3D_SHADING_SCENE_LIGHTS_RENDER
@ V3D_SHADING_STUDIOLIGHT_VIEW_ROTATION
@ V3D_SHADING_MATCAP_FLIP_X
@ V3D_SHADING_XRAY_WIREFRAME
@ V3D_SHADING_XRAY
@ V3D_SHADING_BACKFACE_CULLING
@ V3D_GIZMO_HIDE_TOOL
@ V3D_GIZMO_HIDE
@ V3D_GIZMO_HIDE_NAVIGATE
@ V3D_GIZMO_HIDE_CONTEXT
#define V3D_SHOW_BUNDLENAME
#define V3D_GP_SHOW_MATERIAL_NAME
#define V3D_XR_SESSION_MIRROR
#define V3D_SHOW_CAMERAPATH
#define V3D_SHOW_Z
@ V3D_OVERLAY_EDIT_VERT_NORMALS
@ V3D_OVERLAY_EDIT_INDICES
@ V3D_OVERLAY_EDIT_FREESTYLE_FACE
@ V3D_OVERLAY_EDIT_LOOP_NORMALS
@ V3D_OVERLAY_EDIT_CU_NORMALS
@ V3D_OVERLAY_EDIT_FACE_NORMALS
@ V3D_OVERLAY_EDIT_CREASES
@ V3D_OVERLAY_EDIT_FREESTYLE_EDGE
@ V3D_OVERLAY_EDIT_CONSTANT_SCREEN_SIZE_NORMALS
@ V3D_OVERLAY_EDIT_FACES
@ V3D_OVERLAY_EDIT_FACE_AREA
@ V3D_OVERLAY_EDIT_EDGE_ANG
@ V3D_OVERLAY_EDIT_FACE_DOT
@ V3D_OVERLAY_EDIT_FACE_ANG
@ V3D_OVERLAY_EDIT_OCCLUDE_WIRE
@ V3D_OVERLAY_EDIT_SEAMS
@ V3D_OVERLAY_EDIT_STATVIS
@ V3D_OVERLAY_EDIT_BWEIGHTS
@ V3D_OVERLAY_EDIT_WEIGHT
@ V3D_OVERLAY_EDIT_SHARP
@ V3D_OVERLAY_EDIT_EDGES
@ V3D_OVERLAY_EDIT_EDGE_LEN
#define V3D_SHOW_RECONSTRUCTION
#define V3D_RENDER_BORDER
@ V3D_SHADING_CAVITY_BOTH
@ V3D_SHADING_CAVITY_SSAO
@ V3D_SHADING_CAVITY_CURVATURE
#define V3D_SHOW_Y
@ V3D_OVERLAY_WPAINT_CONTOURS
@ V3D_GIZMO_SHOW_OBJECT_ROTATE
@ V3D_GIZMO_SHOW_OBJECT_SCALE
@ V3D_GIZMO_SHOW_OBJECT_TRANSLATE
#define V3D_GP_SHOW_STROKE_DIRECTION
#define V3D_GP_SHOW_EDIT_LINES
#define V3D_SHOW_X
#define RV3D_PERSP
#define V3D_GP_SHOW_ONION_SKIN
#define V3D_HIDE_OVERLAYS
#define V3D_S3D_DISPVOLUME
#define V3D_LOCAL_COLLECTIONS
#define V3D_GP_SHOW_GRID
#define RV3D_CAMZOOM_MIN
@ CURVE_HANDLE_NONE
@ CURVE_HANDLE_ALL
@ CURVE_HANDLE_SELECTED
#define V3D_GP_FADE_NOACTIVE_GPENCIL
#define RV3D_VIEW_USER
#define V3D_SHOW_FLOOR
#define RV3D_ORTHO
#define V3D_S3D_DISPPLANE
#define V3D_GP_SHOW_MULTIEDIT_LINES
void ED_drivers_editor_init(struct bContext *C, struct ScrArea *area)
Definition: graph_utils.c:38
int ED_asset_library_reference_to_enum_value(const AssetLibraryReference *library)
AssetLibraryReference ED_asset_library_reference_from_enum_value(int value)
#define ED_ASSET_TYPE_IDS_NON_EXPERIMENTAL_FLAGS
Definition: ED_asset_type.h:18
bool ED_buttons_tab_has_search_result(struct SpaceProperties *sbuts, int index)
const char * ED_buttons_search_string_get(struct SpaceProperties *sbuts)
void ED_buttons_search_string_set(struct SpaceProperties *sbuts, const char *value)
int ED_buttons_tabs_list(struct SpaceProperties *sbuts, short *context_tabs_array)
int ED_buttons_search_string_length(struct SpaceProperties *sbuts)
void ED_space_clip_set_mask(struct bContext *C, struct SpaceClip *sc, struct Mask *mask)
Definition: clip_editor.c:636
void ED_space_clip_set_clip(struct bContext *C, struct bScreen *screen, struct SpaceClip *sc, struct MovieClip *clip)
Definition: clip_editor.c:575
struct FileAssetSelectParams * ED_fileselect_get_asset_params(const struct SpaceFile *sfile)
FSMenuCategory
@ FS_CATEGORY_RECENT
@ FS_CATEGORY_BOOKMARKS
@ FS_CATEGORY_SYSTEM_BOOKMARKS
@ FS_CATEGORY_OTHER
@ FS_CATEGORY_SYSTEM
struct FSMenu * ED_fsmenu_get(void)
Definition: fsmenu.c:63
int ED_file_icon(const struct FileDirEntry *file)
char * ED_fsmenu_entry_get_path(struct FSMenuEntry *fsentry)
Definition: fsmenu.c:243
struct FSMenuEntry * ED_fsmenu_get_category(struct FSMenu *fsmenu, FSMenuCategory category)
Definition: fsmenu.c:71
void ED_file_change_dir_ex(struct bContext *C, struct ScrArea *area)
Definition: filesel.c:1072
void ED_fsmenu_entry_set_path(struct FSMenuEntry *fsentry, const char *path)
Definition: fsmenu.c:248
int ED_fsmenu_get_nentries(struct FSMenu *fsmenu, FSMenuCategory category)
Definition: fsmenu.c:219
char * ED_fsmenu_entry_get_name(struct FSMenuEntry *fsentry)
Definition: fsmenu.c:292
struct FileSelectParams * ED_fileselect_get_active_params(const struct SpaceFile *sfile)
struct FileSelectParams * ED_fileselect_get_file_params(const struct SpaceFile *sfile)
struct FSMenuEntry * ED_fsmenu_get_entry(struct FSMenu *fsmenu, FSMenuCategory category, int idx)
Definition: fsmenu.c:231
int ED_fsmenu_entry_get_icon(struct FSMenuEntry *fsentry)
Definition: fsmenu.c:265
void ED_fsmenu_entry_set_name(struct FSMenuEntry *fsentry, const char *name)
Definition: fsmenu.c:306
void ED_fsmenu_entry_set_icon(struct FSMenuEntry *fsentry, int icon)
Definition: fsmenu.c:270
void ED_space_image_release_buffer(struct SpaceImage *sima, struct ImBuf *ibuf, void *lock)
Definition: image_edit.c:158
void ED_space_image_set_mask(struct bContext *C, struct SpaceImage *sima, struct Mask *mask)
Definition: image_edit.c:106
bool ED_space_image_check_show_maskedit(struct SpaceImage *sima, struct Object *obedit)
Definition: image_edit.c:458
bool ED_space_image_show_paint(const struct SpaceImage *sima)
void ED_space_image_scopes_update(const struct bContext *C, struct SpaceImage *sima, struct ImBuf *ibuf, bool use_view_settings)
Definition: image_edit.c:391
bool ED_space_image_show_uvedit(const struct SpaceImage *sima, struct Object *obedit)
void ED_space_image_paint_update(struct Main *bmain, struct wmWindowManager *wm, struct Scene *scene)
Definition: paint_image.cc:438
void ED_space_image_get_zoom(struct SpaceImage *sima, const struct ARegion *region, float *r_zoomx, float *r_zoomy)
void ED_space_image_set(struct Main *bmain, struct SpaceImage *sima, struct Image *ima, bool automatic)
Definition: image_edit.c:45
int ED_space_image_get_display_channel_mask(struct ImBuf *ibuf)
Definition: image_edit.c:165
void ED_space_image_get_size(struct SpaceImage *sima, int *r_width, int *r_height)
Definition: image_edit.c:201
struct ImBuf * ED_space_image_acquire_buffer(struct SpaceImage *sima, void **r_lock, int tile)
Definition: image_edit.c:118
bool ED_space_image_show_render(const struct SpaceImage *sima)
void ED_node_tree_update(const struct bContext *C)
void ED_node_tree_start(struct SpaceNode *snode, struct bNodeTree *ntree, struct ID *id, struct ID *from)
Definition: space_node.cc:44
void ED_node_set_tree_type(struct SpaceNode *snode, struct bNodeTreeType *typeinfo)
Definition: node_edit.cc:456
void ED_node_tree_push(struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *gnode)
Definition: space_node.cc:83
int ED_node_tree_path_length(struct SpaceNode *snode)
Definition: space_node.cc:157
void ED_node_cursor_location_set(struct SpaceNode *snode, const float value[2])
Definition: space_node.cc:200
void ED_node_tree_path_get(struct SpaceNode *snode, char *value)
Definition: space_node.cc:170
void ED_node_cursor_location_get(const struct SpaceNode *snode, float value[2])
void ED_node_tree_pop(struct SpaceNode *snode)
Definition: space_node.cc:118
void ED_area_tag_redraw(ScrArea *area)
Definition: area.c:729
void ED_region_visibility_change_update(struct bContext *C, struct ScrArea *area, struct ARegion *region)
Definition: area.c:2086
void ED_region_visibility_change_update_animated(struct bContext *C, struct ScrArea *area, struct ARegion *region)
Definition: screen_ops.c:5362
void ED_region_toggle_hidden(struct bContext *C, struct ARegion *region)
Definition: area.c:2117
Scene * ED_screen_scene_find(const struct bScreen *screen, const struct wmWindowManager *wm)
void ED_region_tag_redraw(struct ARegion *region)
Definition: area.c:655
void ED_area_tag_refresh(ScrArea *area)
Definition: area.c:758
void ED_region_search_filter_update(const struct ScrArea *area, struct ARegion *region)
struct wmWindow * ED_screen_window_find(const struct bScreen *screen, const struct wmWindowManager *wm)
void ED_area_type_hud_ensure(struct bContext *C, struct ScrArea *area)
bool ED_spreadsheet_context_path_update_tag(struct SpaceSpreadsheet *sspreadsheet)
struct ID * ED_spreadsheet_get_current_id(const struct SpaceSpreadsheet *sspreadsheet)
struct SpreadsheetContext * ED_spreadsheet_context_new(int type)
void ED_spreadsheet_context_path_clear(struct SpaceSpreadsheet *sspreadsheet)
void ED_spreadsheet_context_path_guess(const struct bContext *C, struct SpaceSpreadsheet *sspreadsheet)
bool ED_text_is_syntax_highlight_supported(struct Text *text)
Definition: text_format.c:202
void ED_text_scroll_to_cursor(struct SpaceText *st, struct ARegion *region, bool center)
bool ED_view3d_quat_to_axis_view_and_reset_quat(float viewquat[4], float epsilon, char *r_view, char *r_view_axis_rotation)
float ED_view3d_grid_scale(const struct Scene *scene, struct View3D *v3d, const char **r_grid_unit)
void ED_view3d_from_m4(const float mat[4][4], float ofs[3], float quat[4], const float *dist)
bool ED_view3d_local_collections_set(struct Main *bmain, struct View3D *v3d)
Definition: view3d_view.c:1215
void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *area)
Definition: space_view3d.c:223
void ED_view3d_quadview_update(struct ScrArea *area, struct ARegion *region, bool do_clip)
Definition: view3d_utils.c:938
_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 const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_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.
StructRNA * ID_code_to_RNA_type(short idcode)
#define RNA_MAX_ARRAY_DIMENSION
Definition: RNA_define.h:28
const EnumPropertyItem * rna_node_tree_type_itemf(void *data, bool(*poll)(void *data, struct bNodeTreeType *), bool *r_free)
struct bNodeTreeType * rna_node_tree_type_from_enum(int value)
int rna_node_tree_idname_to_enum(const char *idname)
const EnumPropertyItem * RNA_enum_node_tree_types_itemf_impl(struct bContext *C, bool *r_free)
@ PARM_RNAPTR
Definition: RNA_types.h:354
@ PARM_REQUIRED
Definition: RNA_types.h:352
@ FUNC_USE_CONTEXT
Definition: RNA_types.h:662
@ PROP_FLOAT
Definition: RNA_types.h:61
@ PROP_BOOLEAN
Definition: RNA_types.h:59
@ PROP_ENUM
Definition: RNA_types.h:63
@ PROP_INT
Definition: RNA_types.h:60
@ PROP_STRING
Definition: RNA_types.h:62
@ PROP_POINTER
Definition: RNA_types.h:64
@ PROP_COLLECTION
Definition: RNA_types.h:65
@ PROP_UNIT_CAMERA
Definition: RNA_types.h:80
#define RNA_TRANSLATION_PREC_DEFAULT
Definition: RNA_types.h:117
@ PROP_DYNAMIC
Definition: RNA_types.h:290
@ PROP_CONTEXT_UPDATE
Definition: RNA_types.h:269
@ PROP_ANIMATABLE
Definition: RNA_types.h:202
@ PROP_NEVER_UNLINK
Definition: RNA_types.h:246
@ PROP_EDITABLE
Definition: RNA_types.h:189
@ PROP_NEVER_NULL
Definition: RNA_types.h:239
@ PROP_TEXTEDIT_UPDATE
Definition: RNA_types.h:209
@ PROP_HIDDEN
Definition: RNA_types.h:216
@ PROP_ID_REFCOUNT
Definition: RNA_types.h:226
#define RNA_ENUM_ITEM_HEADING(name, description)
Definition: RNA_types.h:477
@ PROP_MATRIX
Definition: RNA_types.h:158
@ PROP_XYZ
Definition: RNA_types.h:162
@ PROP_DISTANCE
Definition: RNA_types.h:149
@ PROP_BYTESTRING
Definition: RNA_types.h:133
@ PROP_FILENAME
Definition: RNA_types.h:131
@ PROP_COLOR
Definition: RNA_types.h:153
@ PROP_PIXEL
Definition: RNA_types.h:141
@ PROP_ANGLE
Definition: RNA_types.h:145
@ PROP_NONE
Definition: RNA_types.h:126
@ PROP_FACTOR
Definition: RNA_types.h:144
@ PROP_TRANSLATION
Definition: RNA_types.h:154
@ PROP_UNSIGNED
Definition: RNA_types.h:142
@ PROP_QUATERNION
Definition: RNA_types.h:160
@ PROP_FILEPATH
Definition: RNA_types.h:129
#define C
Definition: RandGen.cpp:25
#define UI_DPI_FAC
Definition: UI_interface.h:305
bool UI_view2d_area_supports_sync(struct ScrArea *area)
Definition: view2d.cc:846
#define V2D_LOCK_SET
Definition: UI_view2d.h:80
void UI_view2d_region_to_view(const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
void UI_view2d_sync(struct bScreen *screen, struct ScrArea *area, struct View2D *v2dcur, int flag)
Definition: view2d.cc:851
#define NC_WORLD
Definition: WM_types.h:337
#define ND_SHADING
Definition: WM_types.h:425
#define ND_SPACE_SEQUENCER
Definition: WM_types.h:478
#define NC_WINDOW
Definition: WM_types.h:325
#define NC_NODE
Definition: WM_types.h:344
#define NC_GEOM
Definition: WM_types.h:343
#define ND_DATA
Definition: WM_types.h:456
#define ND_SPACE_DOPESHEET
Definition: WM_types.h:476
#define NC_ANIMATION
Definition: WM_types.h:338
#define ND_SPACE_NLA
Definition: WM_types.h:477
#define ND_SPACE_NODE
Definition: WM_types.h:469
#define ND_DISPLAY
Definition: WM_types.h:439
#define NC_MOVIECLIP
Definition: WM_types.h:347
#define ND_SPACE_PROPERTIES
Definition: WM_types.h:472
#define NC_SCENE
Definition: WM_types.h:328
#define ND_SPACE_NODE_VIEW
Definition: WM_types.h:479
#define ND_NODES
Definition: WM_types.h:384
#define ND_TOOLSETTINGS
Definition: WM_types.h:397
#define ND_SPACE_IMAGE
Definition: WM_types.h:465
#define NA_EDITED
Definition: WM_types.h:523
#define ND_SPACE_GRAPH
Definition: WM_types.h:475
#define NC_TEXT
Definition: WM_types.h:336
#define NC_MATERIAL
Definition: WM_types.h:330
#define NC_LAMP
Definition: WM_types.h:332
#define NC_IMAGE
Definition: WM_types.h:334
#define ND_SPACE_CLIP
Definition: WM_types.h:482
#define ND_SPACE_INFO_REPORT
Definition: WM_types.h:463
#define ND_SPACE_TIME
Definition: WM_types.h:474
#define NC_GPENCIL
Definition: WM_types.h:349
#define NC_TEXTURE
Definition: WM_types.h:331
#define ND_SPACE_TEXT
Definition: WM_types.h:473
#define ND_SPACE_SPREADSHEET
Definition: WM_types.h:484
#define ND_SPACE_VIEW3D
Definition: WM_types.h:471
#define ND_KEYFRAME
Definition: WM_types.h:442
#define NS_VIEW3D_SHADING
Definition: WM_types.h:516
#define ND_SPACE_CONSOLE
Definition: WM_types.h:462
#define ND_SPACE_FILE_PARAMS
Definition: WM_types.h:466
#define NC_SPACE
Definition: WM_types.h:342
#define ND_SPACE_OUTLINER
Definition: WM_types.h:470
#define ND_SPACE_FILE_LIST
Definition: WM_types.h:467
volatile int lock
int main(int argc, char *argv[])
unsigned int U
Definition: btGjkEpa3.h:78
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btQuadWord.h:119
struct RenderResult * rr
OperationNode * node
Scene scene
int len
Definition: draw_manager.c:108
bNodeTree * ntree
RenderEngineType * RE_engines_find(const char *idname)
Definition: engine.c:98
void SEQ_cache_cleanup(Scene *scene)
Definition: image_cache.c:602
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
#define GS(x)
Definition: iris.c:225
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:27
void *(* MEM_mallocN)(size_t len, const char *str)
Definition: mallocn.c:33
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
Definition: math_float4.h:513
#define G(x, y, z)
static void area(int d1, int d2, int e1, int e2, float weights[2])
T clamp(const T &a, const T &min, const T &max)
T length(const vec_base< T, Size > &a)
static const pxr::TfToken st("st", pxr::TfToken::Immortal)
int SEQ_rendersize_to_proxysize(int render_size)
Definition: proxy.c:71
bool SEQ_proxy_rebuild_context(Main *bmain, Depsgraph *depsgraph, Scene *scene, Sequence *seq, struct GSet *file_list, ListBase *queue, bool build_only_on_bad_performance)
Definition: proxy.c:401
ProxyJob * ED_seq_proxy_job_get(const bContext *C, wmJob *wm_job)
Definition: proxy_job.c:77
struct wmJob * ED_seq_proxy_wm_job_get(const bContext *C)
Definition: proxy_job.c:94
const EnumPropertyItem rna_enum_id_type_items[]
Definition: rna_ID.c:33
const struct IDFilterEnumPropertyItem rna_enum_id_type_filter_items[]
Definition: rna_ID.c:119
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
Definition: rna_access.c:136
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
Definition: rna_access.c:112
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb, IteratorSkipFunc skip)
Definition: rna_access.c:4729
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
Definition: rna_access.c:186
void * rna_iterator_listbase_get(CollectionPropertyIterator *iter)
Definition: rna_access.c:4761
PropertyRNA * rna_def_asset_library_reference_common(struct StructRNA *srna, const char *get, const char *set)
Definition: rna_asset.c:482
const EnumPropertyItem rna_enum_attribute_domain_items[]
Definition: rna_attribute.c:70
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
Definition: rna_define.c:1148
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2740
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
Definition: rna_define.c:1193
void RNA_define_animate_sdna(bool animate)
Definition: rna_define.c:748
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3493
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
Definition: rna_define.c:4170
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
Definition: rna_define.c:2236
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1526
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
Definition: rna_define.c:3285
void RNA_def_property_float_default(PropertyRNA *prop, float value)
Definition: rna_define.c:2022
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
Definition: rna_define.c:4312
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
Definition: rna_define.c:2106
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
Definition: rna_define.c:3126
void RNA_define_verify_sdna(bool verify)
Definition: rna_define.c:737
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
Definition: rna_define.c:1645
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2695
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
Definition: rna_define.c:1653
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
Definition: rna_define.c:4273
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
Definition: rna_define.c:3474
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:3420
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
Definition: rna_define.c:1237
void RNA_def_property_boolean_default(PropertyRNA *prop, bool value)
Definition: rna_define.c:1937
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
Definition: rna_define.c:2944
void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength)
Definition: rna_define.c:2926
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
Definition: rna_define.c:1598
void RNA_def_property_int_default(PropertyRNA *prop, int value)
Definition: rna_define.c:1978
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
Definition: rna_define.c:1872
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
Definition: rna_define.c:1048
void RNA_def_property_array(PropertyRNA *prop, int length)
Definition: rna_define.c:1539
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
Definition: rna_define.c:1737
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
Definition: rna_define.c:1772
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
Definition: rna_define.c:2769
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
Definition: rna_define.c:4347
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
Definition: rna_define.c:2900
const int rna_matrix_dimsize_4x4[]
Definition: rna_define.c:1595
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
Definition: rna_define.c:3224
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
Definition: rna_define.c:2855
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
Definition: rna_define.c:1257
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2669
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
Definition: rna_define.c:4487
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
Definition: rna_define.c:1103
void RNA_def_function_flag(FunctionRNA *func, int flag)
Definition: rna_define.c:4342
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1495
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:3385
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
Definition: rna_define.c:1028
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2601
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
Definition: rna_define.c:4436
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
Definition: rna_define.c:3028
void RNA_def_struct_idprops_func(StructRNA *srna, const char *idproperties)
Definition: rna_define.c:1160
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
Definition: rna_define.c:2848
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1490
void RNA_enum_item_add_separator(EnumPropertyItem **items, int *totitem)
Definition: rna_define.c:4459
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:3597
PropertyRNA * RNA_def_collection(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
Definition: rna_define.c:4205
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2493
void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item, int value)
Definition: rna_define.c:4472
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
Definition: rna_define.c:1664
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2343
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
Definition: rna_define.c:2327
void RNA_def_struct_nested(BlenderRNA *brna, StructRNA *srna, const char *structname)
Definition: rna_define.c:1119
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1518
void RNA_api_space_node(struct StructRNA *srna)
Definition: rna_space_api.c:88
void rna_def_object_type_visibility_flags_common(StructRNA *srna, int noteflag)
void RNA_api_space_filebrowser(struct StructRNA *srna)
int rna_AssetMetaData_editable(struct PointerRNA *ptr, const char **r_info)
int rna_object_type_visibility_icon_get_common(int object_type_exclude_viewport, const int *object_type_exclude_select)
void RNA_api_region_view3d(struct StructRNA *srna)
Definition: rna_space_api.c:79
void RNA_api_space_text(struct StructRNA *srna)
const EnumPropertyItem rna_enum_transform_pivot_items_full[]
Definition: rna_scene.c:565
static void rna_def_spreadsheet_row_filter(BlenderRNA *brna)
Definition: rna_space.c:7756
static void rna_def_space_userpref(BlenderRNA *brna)
Definition: rna_space.c:7084
static void rna_def_space_node_overlay(BlenderRNA *brna)
Definition: rna_space.c:7167
static void rna_def_space_view3d_overlay(BlenderRNA *brna)
Definition: rna_space.c:4207
static const EnumPropertyItem rna_enum_viewport_lighting_items[]
Definition: rna_space.c:415
#define SACT_ITEM_MASK
Definition: rna_space.c:231
const EnumPropertyItem rna_enum_space_type_items[]
Definition: rna_space.c:86
static const EnumPropertyItem rna_enum_view3dshading_render_pass_type_items[]
Definition: rna_space.c:437
static const EnumPropertyItem stereo3d_camera_items[]
Definition: rna_space.c:330
static void rna_def_space_node_path_api(BlenderRNA *brna, PropertyRNA *cprop)
Definition: rna_space.c:7126
static void rna_def_space_spreadsheet_context(BlenderRNA *brna)
Definition: rna_space.c:7845
static const EnumPropertyItem rna_enum_studio_light_items[]
Definition: rna_space.c:432
static void rna_def_space_graph(BlenderRNA *brna)
Definition: rna_space.c:6128
static void rna_def_fileselect_entry(BlenderRNA *brna)
Definition: rna_space.c:6496
const EnumPropertyItem rna_enum_shading_type_items[]
Definition: rna_space.c:403
const EnumPropertyItem rna_enum_space_sequencer_view_type_items[]
Definition: rna_space.c:191
#define SI_ITEM_MASK
Definition: rna_space.c:292
static void rna_def_spreadsheet_column(BlenderRNA *brna)
Definition: rna_space.c:7722
static void rna_def_space_filebrowser(BlenderRNA *brna)
Definition: rna_space.c:6877
static void rna_def_space_sequencer(BlenderRNA *brna)
Definition: rna_space.c:5624
#define SACT_ITEM_CACHEFILE
Definition: rna_space.c:235
static void rna_def_fileselect_params(BlenderRNA *brna)
Definition: rna_space.c:6568
#define DEF_SHOW_REGION_PROPERTY(identifier, label, description)
#define SACT_ITEM_SHAPEKEY
Definition: rna_space.c:221
static void rna_def_space_sequencer_preview_overlay(BlenderRNA *brna)
Definition: rna_space.c:5501
static void rna_def_space_view3d(BlenderRNA *brna)
Definition: rna_space.c:4735
static const EnumPropertyItem fileselectparams_recursion_level_items[]
Definition: rna_space.c:503
static const EnumPropertyItem autosnap_items[]
Definition: rna_space.c:389
#define SI_ITEM_VIEW(identifier, name, icon)
Definition: rna_space.c:280
static void rna_def_space_properties(BlenderRNA *brna)
Definition: rna_space.c:5204
#define SACT_ITEM_DOPESHEET
Definition: rna_space.c:208
static void rna_def_filemenu_entry(BlenderRNA *brna)
Definition: rna_space.c:6835
static EnumPropertyItem rna_enum_space_action_ui_mode_items[]
Definition: rna_space.c:254
static void rna_def_space_spreadsheet_context_node(BlenderRNA *brna)
Definition: rna_space.c:7888
static const EnumPropertyItem rna_enum_shading_color_type_items[]
Definition: rna_space.c:422
#define SI_ITEM_PAINT
Definition: rna_space.c:288
static void rna_def_space_spreadsheet_context_path(BlenderRNA *brna, PropertyRNA *cprop)
Definition: rna_space.c:7900
static void rna_def_space_sequencer_timeline_overlay(BlenderRNA *brna)
Definition: rna_space.c:5545
const EnumPropertyItem rna_enum_space_image_mode_items[]
Definition: rna_space.c:312
static const EnumPropertyItem rna_enum_space_image_mode_ui_items[]
Definition: rna_space.c:305
static void rna_def_space_text(BlenderRNA *brna)
Definition: rna_space.c:5845
static void rna_def_space(BlenderRNA *brna)
Definition: rna_space.c:3422
static const EnumPropertyItem stereo3d_eye_items[]
Definition: rna_space.c:362
static const EnumPropertyItem buttons_context_items[]
Definition: rna_space.c:473
static void rna_def_space_nla(BlenderRNA *brna)
Definition: rna_space.c:6292
static void rna_def_space_info(BlenderRNA *brna)
Definition: rna_space.c:7048
static void rna_def_space_clip(BlenderRNA *brna)
Definition: rna_space.c:7407
static void rna_def_space_outliner(BlenderRNA *brna)
Definition: rna_space.c:3634
void RNA_def_space(BlenderRNA *brna)
Definition: rna_space.c:8025
static void rna_def_space_image(BlenderRNA *brna)
Definition: rna_space.c:5312
static void rna_def_space_dopesheet(BlenderRNA *brna)
Definition: rna_space.c:5979
static void rna_def_fileselect_idfilter(BlenderRNA *brna)
Definition: rna_space.c:6433
static const EnumPropertyItem rna_enum_curve_display_handle_items[]
Definition: rna_space.c:516
#define SACT_ITEM_ACTION
Definition: rna_space.c:216
const EnumPropertyItem rna_enum_space_file_browse_mode_items[]
Definition: rna_space.c:202
const EnumPropertyItem rna_enum_clip_editor_mode_items[]
Definition: rna_space.c:465
#define SACT_ITEM_GPENCIL
Definition: rna_space.c:226
#define SACT_ITEM_TIMELINE
Definition: rna_space.c:212
#define V3D_S3D_CAMERA_LEFT
Definition: rna_space.c:323
static EnumPropertyItem rna_enum_space_action_mode_all_items[]
Definition: rna_space.c:244
static void rna_def_space_generic_show_region_toggles(StructRNA *srna, int region_type_mask)
Definition: rna_space.c:3371
const EnumPropertyItem rna_enum_geometry_component_type_items[]
Definition: rna_space.c:62
const EnumPropertyItem rna_enum_space_image_mode_all_items[]
Definition: rna_space.c:297
static void rna_def_spreadsheet_column_id(BlenderRNA *brna)
Definition: rna_space.c:7707
const EnumPropertyItem rna_enum_space_graph_mode_items[]
Definition: rna_space.c:181
static void rna_def_fileselect_asset_params(BlenderRNA *brna)
Definition: rna_space.c:6777
static const EnumPropertyItem dt_uv_items[]
Definition: rna_space.c:3324
#define V3D_S3D_CAMERA_RIGHT
Definition: rna_space.c:324
const EnumPropertyItem rna_enum_fileselect_params_sort_items[]
Definition: rna_space.c:345
static void rna_def_fileselect_asset_idfilter(BlenderRNA *brna)
Definition: rna_space.c:6463
static void rna_def_space_spreadsheet(BlenderRNA *brna)
Definition: rna_space.c:7927
static const EnumPropertyItem spreadsheet_context_type_items[]
Definition: rna_space.c:7838
static void rna_def_space_image_overlay(BlenderRNA *brna)
Definition: rna_space.c:5289
static void rna_def_space_spreadsheet_context_object(BlenderRNA *brna)
Definition: rna_space.c:7863
#define SI_ITEM_UV
Definition: rna_space.c:284
static void rna_def_node_tree_path(BlenderRNA *brna)
Definition: rna_space.c:7111
static void rna_def_space_mask_info(StructRNA *srna, int noteflag, const char *mask_set_func)
Definition: rna_space.c:3452
static const EnumPropertyItem display_channels_items[]
Definition: rna_space.c:369
#define V3D_S3D_CAMERA_S3D
Definition: rna_space.c:325
static void rna_def_space_node(BlenderRNA *brna)
Definition: rna_space.c:7212
const EnumPropertyItem rna_enum_space_action_mode_items[]
Definition: rna_space.c:266
static void rna_def_space_image_uv(BlenderRNA *brna)
Definition: rna_space.c:3508
static void rna_def_console_line(BlenderRNA *brna)
Definition: rna_space.c:6354
static void rna_def_space_spreadsheet_context_modifier(BlenderRNA *brna)
Definition: rna_space.c:7876
static struct IDFilterEnumPropertyItem rna_enum_space_file_id_filter_categories[]
Definition: rna_space.c:3332
static void rna_def_space_view3d_shading(BlenderRNA *brna)
Definition: rna_space.c:3891
static void rna_def_space_console(BlenderRNA *brna)
Definition: rna_space.c:6389
const char * RE_engine_id_BLENDER_WORKBENCH
Definition: scene.cc:1696
ListBase * SEQ_active_seqbase_get(const Editing *ed)
Definition: sequencer.c:388
Editing * SEQ_editing_get(const Scene *scene)
Definition: sequencer.c:241
static void seq_build_proxy(bContext *C, SeqCollection *movie_strips)
#define min(a, b)
Definition: sort.c:35
void * regiondata
struct ARegion * prev
struct ARegion * next
short alignment
bAction * action
ListBaseIterator listbase
Definition: RNA_types.h:409
union CollectionPropertyIterator::@1147 internal
const char * identifier
Definition: RNA_types.h:461
const char * name
Definition: RNA_types.h:465
const char * description
Definition: RNA_types.h:467
Definition: fsmenu.c:53
struct AssetMetaData * asset_data
Definition: DNA_ID.h:368
int us
Definition: DNA_ID.h:388
char name[66]
Definition: DNA_ID.h:378
ID id
Definition: DNA_key_types.h:63
struct AnimData * adt
Definition: DNA_key_types.h:65
struct Link * link
Definition: RNA_types.h:370
void * last
Definition: DNA_listBase.h:31
void * first
Definition: DNA_listBase.h:31
Definition: BKE_main.h:121
ListBase wm
Definition: BKE_main.h:197
ListBase objects
Definition: BKE_main.h:170
struct AnimData * adt
struct StructRNA * type
Definition: RNA_types.h:37
void * data
Definition: RNA_types.h:38
struct ID * owner_id
Definition: RNA_types.h:36
Scene * scene
Definition: clip_ops.c:1171
struct ListBase queue
Definition: SEQ_proxy.h:45
struct Main * main
Definition: clip_ops.c:1172
struct Depsgraph * depsgraph
Definition: SEQ_proxy.h:43
float viewquat[4]
char engine[32]
short views_format
struct RenderData r
struct Object * camera
struct SceneEEVEE eevee
bAction * action
bDopeSheet ads
SpaceAction_Runtime runtime
struct MovieClipScopes scopes
short bookmarknr
short system_bookmarknr
FileSelectParams * params
SpaceGraph_Runtime runtime
float cursor[2]
struct ImageUser iuser
struct Image * image
char tree_idname[64]
short render_size
uint8_t geometry_component_type
struct Text * text
int icon_id_matcap_flipped
char name[FILE_MAXFILE]
short flag
short align
char studio_light[256]
char lookdev_light[256]
struct IDProperty * prop
struct Object * camera
short scenelock
int object_type_exclude_select
int object_type_exclude_viewport
ListBase regionbase
View3DShading shading
ListBase aovs
char idname[64]
ListBase areabase
PBVHNode * data
Definition: pbvh.c:892
Definition: wm_jobs.c:57
float max
#define N_(msgid)
void WM_main_add_notifier(unsigned int type, void *reference)
PointerRNA * ptr
Definition: wm_files.c:3480
bool WM_jobs_is_running(const wmJob *wm_job)
Definition: wm_jobs.c:304
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
Definition: wm_jobs.c:437
Scene * WM_windows_scene_get_from_screen(const wmWindowManager *wm, const bScreen *screen)
Definition: wm_window.c:2151
ViewLayer * WM_windows_view_layer_get_from_screen(const wmWindowManager *wm, const bScreen *screen)
Definition: wm_window.c:2162
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)
Definition: wm_window.c:2217
void WM_windows_scene_data_sync(const ListBase *win_lb, Scene *scene)
Definition: wm_window.c:2142
bool WM_xr_session_exists(const wmXrData *xr)