Blender  V2.93
rna_space.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #include <stdlib.h>
22 #include <string.h>
23 
24 #include "MEM_guardedalloc.h"
25 
26 #include "BLT_translation.h"
27 
28 #include "BKE_attribute.h"
29 #include "BKE_context.h"
30 #include "BKE_geometry_set.h"
31 #include "BKE_image.h"
32 #include "BKE_key.h"
33 #include "BKE_movieclip.h"
34 #include "BKE_node.h"
35 #include "BKE_studiolight.h"
36 
37 #include "ED_spreadsheet.h"
38 #include "ED_text.h"
39 
40 #include "BLI_listbase.h"
41 #include "BLI_math.h"
42 
43 #include "DNA_action_types.h"
44 #include "DNA_gpencil_types.h"
45 #include "DNA_key_types.h"
46 #include "DNA_mask_types.h"
47 #include "DNA_material_types.h"
48 #include "DNA_node_types.h"
49 #include "DNA_object_types.h"
50 #include "DNA_sequence_types.h"
51 #include "DNA_space_types.h"
52 #include "DNA_view3d_types.h"
53 #include "DNA_workspace_types.h"
54 
55 #include "RNA_access.h"
56 #include "RNA_define.h"
57 
58 #include "rna_internal.h"
59 
60 #include "SEQ_proxy.h"
61 #include "SEQ_relations.h"
62 #include "SEQ_sequencer.h"
63 
64 #include "WM_api.h"
65 #include "WM_types.h"
66 
67 #include "RE_engine.h"
68 #include "RE_pipeline.h"
69 
70 #include "RNA_enum_types.h"
71 
73  /* empty must be here for python, is skipped for UI */
74  {SPACE_EMPTY, "EMPTY", ICON_NONE, "Empty", ""},
75 
76  /* General */
77  {0, "", ICON_NONE, "General", ""},
78  {SPACE_VIEW3D,
79  "VIEW_3D",
80  ICON_VIEW3D,
81  "3D Viewport",
82  "Manipulate objects in a 3D environment"},
83  {SPACE_IMAGE,
84  "IMAGE_EDITOR",
85  ICON_IMAGE,
86  "UV/Image Editor",
87  "View and edit images and UV Maps"},
88  {SPACE_NODE,
89  "NODE_EDITOR",
90  ICON_NODETREE,
91  "Node Editor",
92  "Editor for node-based shading and compositing tools"},
93  {SPACE_SEQ, "SEQUENCE_EDITOR", ICON_SEQUENCE, "Video Sequencer", "Video editing tools"},
94  {SPACE_CLIP, "CLIP_EDITOR", ICON_TRACKER, "Movie Clip Editor", "Motion tracking tools"},
95 
96  /* Animation */
97  {0, "", ICON_NONE, "Animation", ""},
98 #if 0
99  {SPACE_ACTION,
100  "TIMELINE",
101  ICON_TIME,
102  "Timeline",
103  "Timeline and playback controls (NOTE: Switch to 'Timeline' mode)"}, /* XXX */
104 #endif
105  {SPACE_ACTION, "DOPESHEET_EDITOR", ICON_ACTION, "Dope Sheet", "Adjust timing of keyframes"},
106  {SPACE_GRAPH,
107  "GRAPH_EDITOR",
108  ICON_GRAPH,
109  "Graph Editor",
110  "Edit drivers and keyframe interpolation"},
111  {SPACE_NLA, "NLA_EDITOR", ICON_NLA, "Nonlinear Animation", "Combine and layer Actions"},
112 
113  /* Scripting */
114  {0, "", ICON_NONE, "Scripting", ""},
115  {SPACE_TEXT,
116  "TEXT_EDITOR",
117  ICON_TEXT,
118  "Text Editor",
119  "Edit scripts and in-file documentation"},
120  {SPACE_CONSOLE,
121  "CONSOLE",
122  ICON_CONSOLE,
123  "Python Console",
124  "Interactive programmatic console for "
125  "advanced editing and script development"},
126  {SPACE_INFO, "INFO", ICON_INFO, "Info", "Log of operations, warnings and error messages"},
127  /* Special case: Top-bar and Status-bar aren't supposed to be a regular editor for the user. */
128  {SPACE_TOPBAR,
129  "TOPBAR",
130  ICON_NONE,
131  "Top Bar",
132  "Global bar at the top of the screen for "
133  "global per-window settings"},
135  "STATUSBAR",
136  ICON_NONE,
137  "Status Bar",
138  "Global bar at the bottom of the "
139  "screen for general status information"},
140 
141  /* Data */
142  {0, "", ICON_NONE, "Data", ""},
144  "OUTLINER",
145  ICON_OUTLINER,
146  "Outliner",
147  "Overview of scene graph and all available data-blocks"},
149  "PROPERTIES",
150  ICON_PROPERTIES,
151  "Properties",
152  "Edit properties of active object and related data-blocks"},
153  {SPACE_FILE, "FILE_BROWSER", ICON_FILEBROWSER, "File Browser", "Browse for files and assets"},
155  "SPREADSHEET",
156  ICON_SPREADSHEET,
157  "Spreadsheet",
158  "Explore geometry data in a table"},
160  "PREFERENCES",
161  ICON_PREFERENCES,
162  "Preferences",
163  "Edit persistent configuration settings"},
164  {0, NULL, 0, NULL, NULL},
165 };
166 
169  "FCURVES",
170  ICON_GRAPH,
171  "Graph Editor",
172  "Edit animation/keyframes displayed as 2D curves"},
173  {SIPO_MODE_DRIVERS, "DRIVERS", ICON_DRIVER, "Drivers", "Edit drivers"},
174  {0, NULL, 0, NULL, NULL},
175 };
176 
178  {SEQ_VIEW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""},
179  {SEQ_VIEW_PREVIEW, "PREVIEW", ICON_SEQ_PREVIEW, "Preview", ""},
180  {SEQ_VIEW_SEQUENCE_PREVIEW, "SEQUENCER_PREVIEW", ICON_SEQ_SPLITVIEW, "Sequencer/Preview", ""},
181  {0, NULL, 0, NULL, NULL},
182 };
183 
185  {FILE_BROWSE_MODE_FILES, "FILES", ICON_FILEBROWSER, "File Browser", ""},
186  {FILE_BROWSE_MODE_ASSETS, "ASSETS", ICON_ASSET_MANAGER, "Asset Browser", ""},
187  {0, NULL, 0, NULL, NULL},
188 };
189 
190 #define SACT_ITEM_DOPESHEET \
191  { \
192  SACTCONT_DOPESHEET, "DOPESHEET", ICON_ACTION, "Dope Sheet", "Edit all keyframes in scene" \
193  }
194 #define SACT_ITEM_TIMELINE \
195  { \
196  SACTCONT_TIMELINE, "TIMELINE", ICON_TIME, "Timeline", "Timeline and playback controls" \
197  }
198 #define SACT_ITEM_ACTION \
199  { \
200  SACTCONT_ACTION, "ACTION", ICON_OBJECT_DATA, "Action Editor", \
201  "Edit keyframes in active object's Object-level action" \
202  }
203 #define SACT_ITEM_SHAPEKEY \
204  { \
205  SACTCONT_SHAPEKEY, "SHAPEKEY", ICON_SHAPEKEY_DATA, "Shape Key Editor", \
206  "Edit keyframes in active object's Shape Keys action" \
207  }
208 #define SACT_ITEM_GPENCIL \
209  { \
210  SACTCONT_GPENCIL, "GPENCIL", ICON_GREASEPENCIL, "Grease Pencil", \
211  "Edit timings for all Grease Pencil sketches in file" \
212  }
213 #define SACT_ITEM_MASK \
214  { \
215  SACTCONT_MASK, "MASK", ICON_MOD_MASK, "Mask", "Edit timings for Mask Editor splines" \
216  }
217 #define SACT_ITEM_CACHEFILE \
218  { \
219  SACTCONT_CACHEFILE, "CACHEFILE", ICON_FILE, "Cache File", \
220  "Edit timings for Cache File data-blocks" \
221  }
222 
223 #ifndef RNA_RUNTIME
224 /* XXX: action-editor is currently for object-level only actions,
225  * so show that using object-icon hint */
234  {0, NULL, 0, NULL, NULL},
235 };
238  /* SACT_ITEM_TIMELINE, */
244  {0, NULL, 0, NULL, NULL},
245 };
246 #endif
247 /* expose as ui_mode */
251  {0, NULL, 0, NULL, NULL},
252 };
253 
254 #undef SACT_ITEM_DOPESHEET
255 #undef SACT_ITEM_TIMELINE
256 #undef SACT_ITEM_ACTION
257 #undef SACT_ITEM_SHAPEKEY
258 #undef SACT_ITEM_GPENCIL
259 #undef SACT_ITEM_MASK
260 #undef SACT_ITEM_CACHEFILE
261 
262 #define SI_ITEM_VIEW(identifier, name, icon) \
263  { \
264  SI_MODE_VIEW, identifier, icon, name, "View the image" \
265  }
266 #define SI_ITEM_UV \
267  { \
268  SI_MODE_UV, "UV", ICON_UV, "UV Editor", "UV edit in mesh editmode" \
269  }
270 #define SI_ITEM_PAINT \
271  { \
272  SI_MODE_PAINT, "PAINT", ICON_TPAINT_HLT, "Paint", "2D image painting mode" \
273  }
274 #define SI_ITEM_MASK \
275  { \
276  SI_MODE_MASK, "MASK", ICON_MOD_MASK, "Mask", "Mask editing" \
277  }
278 
280  SI_ITEM_VIEW("VIEW", "View", ICON_FILE_IMAGE),
281  SI_ITEM_UV,
283  SI_ITEM_MASK,
284  {0, NULL, 0, NULL, NULL},
285 };
286 
288  SI_ITEM_VIEW("VIEW", "View", ICON_FILE_IMAGE),
290  SI_ITEM_MASK,
291  {0, NULL, 0, NULL, NULL},
292 };
293 
295  SI_ITEM_VIEW("IMAGE_EDITOR", "Image Editor", ICON_IMAGE),
296  SI_ITEM_UV,
297  {0, NULL, 0, NULL, NULL},
298 };
299 
300 #undef SI_ITEM_VIEW
301 #undef SI_ITEM_UV
302 #undef SI_ITEM_PAINT
303 #undef SI_ITEM_MASK
304 
305 #define V3D_S3D_CAMERA_LEFT {STEREO_LEFT_ID, "LEFT", ICON_RESTRICT_RENDER_OFF, "Left", ""},
306 #define V3D_S3D_CAMERA_RIGHT {STEREO_RIGHT_ID, "RIGHT", ICON_RESTRICT_RENDER_OFF, "Right", ""},
307 #define V3D_S3D_CAMERA_S3D {STEREO_3D_ID, "S3D", ICON_CAMERA_STEREO, "3D", ""},
308 #ifdef RNA_RUNTIME
309 # define V3D_S3D_CAMERA_VIEWS {STEREO_MONO_ID, "MONO", ICON_RESTRICT_RENDER_OFF, "Views", ""},
310 #endif
311 
314 };
315 
316 #ifdef RNA_RUNTIME
317 static const EnumPropertyItem multiview_camera_items[] = {
318  V3D_S3D_CAMERA_VIEWS V3D_S3D_CAMERA_S3D{0, NULL, 0, NULL, NULL},
319 };
320 #endif
321 
322 #undef V3D_S3D_CAMERA_LEFT
323 #undef V3D_S3D_CAMERA_RIGHT
324 #undef V3D_S3D_CAMERA_S3D
325 #undef V3D_S3D_CAMERA_VIEWS
326 
328  {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_NONE, "Name", "Sort the file list alphabetically"},
330  "FILE_SORT_EXTENSION",
331  ICON_NONE,
332  "Extension",
333  "Sort the file list by extension/type"},
335  "FILE_SORT_TIME",
336  ICON_NONE,
337  "Modified Date",
338  "Sort files by modification time"},
339  {FILE_SORT_SIZE, "FILE_SORT_SIZE", ICON_NONE, "Size", "Sort files by size"},
340  {0, NULL, 0, NULL, NULL},
341 };
342 
343 #ifndef RNA_RUNTIME
345  {STEREO_LEFT_ID, "LEFT_EYE", ICON_NONE, "Left Eye"},
346  {STEREO_RIGHT_ID, "RIGHT_EYE", ICON_NONE, "Right Eye"},
347  {0, NULL, 0, NULL, NULL},
348 };
349 #endif
350 
352  {SI_USE_ALPHA,
353  "COLOR_ALPHA",
354  ICON_IMAGE_RGB_ALPHA,
355  "Color and Alpha",
356  "Display image with RGB colors and alpha transparency"},
357  {0, "COLOR", ICON_IMAGE_RGB, "Color", "Display image with RGB colors"},
358  {SI_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, "Alpha", "Display alpha transparency channel"},
359  {SI_SHOW_ZBUF,
360  "Z_BUFFER",
361  ICON_IMAGE_ZDEPTH,
362  "Z-Buffer",
363  "Display Z-buffer associated with image (mapped from camera clip start to end)"},
364  {SI_SHOW_R, "RED", ICON_COLOR_RED, "Red", ""},
365  {SI_SHOW_G, "GREEN", ICON_COLOR_GREEN, "Green", ""},
366  {SI_SHOW_B, "BLUE", ICON_COLOR_BLUE, "Blue", ""},
367  {0, NULL, 0, NULL, NULL},
368 };
369 
370 #ifndef RNA_RUNTIME
372  {SACTSNAP_OFF, "NONE", 0, "No Auto-Snap", ""},
373  /* {-1, "", 0, "", ""}, */
374  {SACTSNAP_STEP, "STEP", 0, "Frame Step", "Snap to 1.0 frame intervals"},
375  {SACTSNAP_TSTEP, "TIME_STEP", 0, "Second Step", "Snap to 1.0 second intervals"},
376  /* {-1, "", 0, "", ""}, */
377  {SACTSNAP_FRAME, "FRAME", 0, "Nearest Frame", "Snap to actual frames (nla-action time)"},
378  {SACTSNAP_SECOND, "SECOND", 0, "Nearest Second", "Snap to actual seconds (nla-action time)"},
379  /* {-1, "", 0, "", ""}, */
380  {SACTSNAP_MARKER, "MARKER", 0, "Nearest Marker", "Snap to nearest marker"},
381  {0, NULL, 0, NULL, NULL},
382 };
383 #endif
384 
386  {OB_WIRE, "WIREFRAME", ICON_SHADING_WIRE, "Wireframe", "Display the object as wire edges"},
387  {OB_SOLID, "SOLID", ICON_SHADING_SOLID, "Solid", "Display in solid mode"},
388  {OB_MATERIAL,
389  "MATERIAL",
390  ICON_SHADING_TEXTURE,
391  "Material Preview",
392  "Display in Material Preview mode"},
393  {OB_RENDER, "RENDERED", ICON_SHADING_RENDERED, "Rendered", "Display render preview"},
394  {0, NULL, 0, NULL, NULL},
395 };
396 
398  {V3D_LIGHTING_STUDIO, "STUDIO", 0, "Studio", "Display using studio lighting"},
399  {V3D_LIGHTING_MATCAP, "MATCAP", 0, "MatCap", "Display using matcap material and lighting"},
400  {V3D_LIGHTING_FLAT, "FLAT", 0, "Flat", "Display using flat lighting"},
401  {0, NULL, 0, NULL, NULL},
402 };
403 
405  {V3D_SHADING_MATERIAL_COLOR, "MATERIAL", 0, "Material", "Show material color"},
406  {V3D_SHADING_SINGLE_COLOR, "SINGLE", 0, "Single", "Show scene in a single color"},
407  {V3D_SHADING_OBJECT_COLOR, "OBJECT", 0, "Object", "Show object color"},
408  {V3D_SHADING_RANDOM_COLOR, "RANDOM", 0, "Random", "Show random object color"},
409  {V3D_SHADING_VERTEX_COLOR, "VERTEX", 0, "Vertex", "Show active vertex color"},
410  {V3D_SHADING_TEXTURE_COLOR, "TEXTURE", 0, "Texture", "Show texture"},
411  {0, NULL, 0, NULL, NULL},
412 };
413 
415  {0, "DEFAULT", 0, "Default", ""},
416  {0, NULL, 0, NULL, NULL},
417 };
418 
420  {0, "", ICON_NONE, "General", ""},
421  {EEVEE_RENDER_PASS_COMBINED, "COMBINED", 0, "Combined", ""},
422  {EEVEE_RENDER_PASS_EMIT, "EMISSION", 0, "Emission", ""},
423  {EEVEE_RENDER_PASS_ENVIRONMENT, "ENVIRONMENT", 0, "Environment", ""},
424  {EEVEE_RENDER_PASS_AO, "AO", 0, "Ambient Occlusion", ""},
425  {EEVEE_RENDER_PASS_SHADOW, "SHADOW", 0, "Shadow", ""},
426 
427  {0, "", ICON_NONE, "Light", ""},
428  {EEVEE_RENDER_PASS_DIFFUSE_LIGHT, "DIFFUSE_LIGHT", 0, "Diffuse Light", ""},
429  {EEVEE_RENDER_PASS_DIFFUSE_COLOR, "DIFFUSE_COLOR", 0, "Diffuse Color", ""},
430  {EEVEE_RENDER_PASS_SPECULAR_LIGHT, "SPECULAR_LIGHT", 0, "Specular Light", ""},
431  {EEVEE_RENDER_PASS_SPECULAR_COLOR, "SPECULAR_COLOR", 0, "Specular Color", ""},
432  {EEVEE_RENDER_PASS_VOLUME_LIGHT, "VOLUME_LIGHT", 0, "Volume Light", ""},
433 
434  {0, "", ICON_NONE, "Effects", ""},
435  {EEVEE_RENDER_PASS_BLOOM, "BLOOM", 0, "Bloom", ""},
436 
437  {0, "", ICON_NONE, "Data", ""},
438  {EEVEE_RENDER_PASS_NORMAL, "NORMAL", 0, "Normal", ""},
439  {EEVEE_RENDER_PASS_MIST, "MIST", 0, "Mist", ""},
440 
441  {0, "", ICON_NONE, "Shader AOV", ""},
442  {EEVEE_RENDER_PASS_AOV, "AOV", 0, "AOV", ""},
443 
444  {0, NULL, 0, NULL, NULL},
445 };
446 
448  {SC_MODE_TRACKING, "TRACKING", ICON_ANIM_DATA, "Tracking", "Show tracking and solving tools"},
449  {SC_MODE_MASKEDIT, "MASK", ICON_MOD_MASK, "Mask", "Show mask editing tools"},
450  {0, NULL, 0, NULL, NULL},
451 };
452 
453 /* Actually populated dynamically through a function,
454  * but helps for context-less access (e.g. doc, i18n...). */
456  {BCONTEXT_TOOL, "TOOL", ICON_TOOL_SETTINGS, "Tool", "Active Tool and Workspace settings"},
457  {BCONTEXT_SCENE, "SCENE", ICON_SCENE_DATA, "Scene", "Scene Properties"},
458  {BCONTEXT_RENDER, "RENDER", ICON_SCENE, "Render", "Render Properties"},
459  {BCONTEXT_OUTPUT, "OUTPUT", ICON_OUTPUT, "Output", "Output Properties"},
460  {BCONTEXT_VIEW_LAYER, "VIEW_LAYER", ICON_RENDER_RESULT, "View Layer", "View Layer Properties"},
461  {BCONTEXT_WORLD, "WORLD", ICON_WORLD, "World", "World Properties"},
462  {BCONTEXT_COLLECTION, "COLLECTION", ICON_GROUP, "Collection", "Collection Properties"},
463  {BCONTEXT_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Object Properties"},
465  "CONSTRAINT",
466  ICON_CONSTRAINT,
467  "Constraints",
468  "Object Constraint Properties"},
469  {BCONTEXT_MODIFIER, "MODIFIER", ICON_MODIFIER, "Modifiers", "Modifier Properties"},
470  {BCONTEXT_DATA, "DATA", ICON_NONE, "Data", "Object Data Properties"},
471  {BCONTEXT_BONE, "BONE", ICON_BONE_DATA, "Bone", "Bone Properties"},
473  "BONE_CONSTRAINT",
474  ICON_CONSTRAINT_BONE,
475  "Bone Constraints",
476  "Bone Constraint Properties"},
477  {BCONTEXT_MATERIAL, "MATERIAL", ICON_MATERIAL, "Material", "Material Properties"},
478  {BCONTEXT_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture Properties"},
479  {BCONTEXT_PARTICLE, "PARTICLES", ICON_PARTICLES, "Particles", "Particle Properties"},
480  {BCONTEXT_PHYSICS, "PHYSICS", ICON_PHYSICS, "Physics", "Physics Properties"},
481  {BCONTEXT_SHADERFX, "SHADERFX", ICON_SHADERFX, "Effects", "Visual Effects Properties"},
482  {0, NULL, 0, NULL, NULL},
483 };
484 
486  {0, "NONE", 0, "None", "Only list current directory's content, with no recursion"},
487  {1, "BLEND", 0, "Blend File", "List .blend files' content"},
488  {2, "ALL_1", 0, "One Level", "List all sub-directories' content, one level of recursion"},
489  {3, "ALL_2", 0, "Two Levels", "List all sub-directories' content, two levels of recursion"},
490  {4,
491  "ALL_3",
492  0,
493  "Three Levels",
494  "List all sub-directories' content, three levels of recursion"},
495  {0, NULL, 0, NULL, NULL},
496 };
497 
499  {CURVE_HANDLE_NONE, "NONE", 0, "None", ""},
500  {CURVE_HANDLE_SELECTED, "SELECTED", 0, "Selected", ""},
501  {CURVE_HANDLE_ALL, "ALL", 0, "All", ""},
502  {0, NULL, 0, NULL, NULL},
503 };
504 
505 #ifdef RNA_RUNTIME
506 
507 # include "DNA_anim_types.h"
508 # include "DNA_scene_types.h"
509 # include "DNA_screen_types.h"
510 # include "DNA_userdef_types.h"
511 
512 # include "BLI_path_util.h"
513 # include "BLI_string.h"
514 
515 # include "BKE_anim_data.h"
516 # include "BKE_brush.h"
517 # include "BKE_colortools.h"
518 # include "BKE_context.h"
519 # include "BKE_global.h"
520 # include "BKE_icons.h"
521 # include "BKE_idprop.h"
522 # include "BKE_layer.h"
523 # include "BKE_nla.h"
524 # include "BKE_paint.h"
525 # include "BKE_preferences.h"
526 # include "BKE_scene.h"
527 # include "BKE_screen.h"
528 # include "BKE_workspace.h"
529 
530 # include "DEG_depsgraph.h"
531 # include "DEG_depsgraph_build.h"
532 
533 # include "ED_anim_api.h"
534 # include "ED_buttons.h"
535 # include "ED_clip.h"
536 # include "ED_fileselect.h"
537 # include "ED_image.h"
538 # include "ED_node.h"
539 # include "ED_screen.h"
540 # include "ED_sequencer.h"
541 # include "ED_transform.h"
542 # include "ED_view3d.h"
543 
544 # include "GPU_material.h"
545 
546 # include "IMB_imbuf_types.h"
547 
548 # include "UI_interface.h"
549 # include "UI_view2d.h"
550 
551 static StructRNA *rna_Space_refine(struct PointerRNA *ptr)
552 {
553  SpaceLink *space = (SpaceLink *)ptr->data;
554 
555  switch ((eSpace_Type)space->spacetype) {
556  case SPACE_VIEW3D:
557  return &RNA_SpaceView3D;
558  case SPACE_GRAPH:
559  return &RNA_SpaceGraphEditor;
560  case SPACE_OUTLINER:
561  return &RNA_SpaceOutliner;
562  case SPACE_PROPERTIES:
563  return &RNA_SpaceProperties;
564  case SPACE_FILE:
565  return &RNA_SpaceFileBrowser;
566  case SPACE_IMAGE:
567  return &RNA_SpaceImageEditor;
568  case SPACE_INFO:
569  return &RNA_SpaceInfo;
570  case SPACE_SEQ:
571  return &RNA_SpaceSequenceEditor;
572  case SPACE_TEXT:
573  return &RNA_SpaceTextEditor;
574  case SPACE_ACTION:
575  return &RNA_SpaceDopeSheetEditor;
576  case SPACE_NLA:
577  return &RNA_SpaceNLA;
578  case SPACE_NODE:
579  return &RNA_SpaceNodeEditor;
580  case SPACE_CONSOLE:
581  return &RNA_SpaceConsole;
582  case SPACE_USERPREF:
583  return &RNA_SpacePreferences;
584  case SPACE_CLIP:
585  return &RNA_SpaceClipEditor;
586  case SPACE_SPREADSHEET:
587  return &RNA_SpaceSpreadsheet;
588 
589  /* Currently no type info. */
590  case SPACE_SCRIPT:
591  case SPACE_EMPTY:
592  case SPACE_TOPBAR:
593  case SPACE_STATUSBAR:
594  break;
595  }
596 
597  return &RNA_Space;
598 }
599 
600 static ScrArea *rna_area_from_space(PointerRNA *ptr)
601 {
602  bScreen *screen = (bScreen *)ptr->owner_id;
603  SpaceLink *link = (SpaceLink *)ptr->data;
604  return BKE_screen_find_area_from_space(screen, link);
605 }
606 
607 static void area_region_from_regiondata(bScreen *screen,
608  void *regiondata,
609  ScrArea **r_area,
610  ARegion **r_region)
611 {
612  ScrArea *area;
613  ARegion *region;
614 
615  *r_area = NULL;
616  *r_region = NULL;
617 
618  for (area = screen->areabase.first; area; area = area->next) {
619  for (region = area->regionbase.first; region; region = region->next) {
620  if (region->regiondata == regiondata) {
621  *r_area = area;
622  *r_region = region;
623  return;
624  }
625  }
626  }
627 }
628 
629 static void rna_area_region_from_regiondata(PointerRNA *ptr, ScrArea **r_area, ARegion **r_region)
630 {
631  bScreen *screen = (bScreen *)ptr->owner_id;
632  void *regiondata = ptr->data;
633 
634  area_region_from_regiondata(screen, regiondata, r_area, r_region);
635 }
636 
637 /* -------------------------------------------------------------------- */
641 static bool rna_Space_bool_from_region_flag_get_by_type(PointerRNA *ptr,
642  const int region_type,
643  const int region_flag)
644 {
645  ScrArea *area = rna_area_from_space(ptr);
646  ARegion *region = BKE_area_find_region_type(area, region_type);
647  if (region) {
648  return (region->flag & region_flag);
649  }
650  return false;
651 }
652 
653 static void rna_Space_bool_from_region_flag_set_by_type(PointerRNA *ptr,
654  const int region_type,
655  const int region_flag,
656  bool value)
657 {
658  ScrArea *area = rna_area_from_space(ptr);
659  ARegion *region = BKE_area_find_region_type(area, region_type);
660  if (region && (region->alignment != RGN_ALIGN_NONE)) {
661  SET_FLAG_FROM_TEST(region->flag, value, region_flag);
662  }
663  ED_region_tag_redraw(region);
664 }
665 
666 static void rna_Space_bool_from_region_flag_update_by_type(bContext *C,
667  PointerRNA *ptr,
668  const int region_type,
669  const int region_flag)
670 {
671  ScrArea *area = rna_area_from_space(ptr);
672  ARegion *region = BKE_area_find_region_type(area, region_type);
673  if (region) {
674  if (region_flag == RGN_FLAG_HIDDEN) {
675  /* Only support animation when the area is in the current context. */
676  if (region->overlap && (area == CTX_wm_area(C))) {
678  }
679  else {
681  }
682  }
683  else if (region_flag == RGN_FLAG_HIDDEN_BY_USER) {
684  if (!(region->flag & RGN_FLAG_HIDDEN_BY_USER) != !(region->flag & RGN_FLAG_HIDDEN)) {
685  ED_region_toggle_hidden(C, region);
686 
687  if ((region->flag & RGN_FLAG_HIDDEN_BY_USER) == 0) {
689  }
690  }
691  }
692  }
693 }
694 
697 /* -------------------------------------------------------------------- */
701 /* Header Region. */
702 static bool rna_Space_show_region_header_get(PointerRNA *ptr)
703 {
704  return !rna_Space_bool_from_region_flag_get_by_type(ptr, RGN_TYPE_HEADER, RGN_FLAG_HIDDEN);
705 }
706 static void rna_Space_show_region_header_set(PointerRNA *ptr, bool value)
707 {
708  rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_HEADER, RGN_FLAG_HIDDEN, !value);
709 
710  /* Special case, never show the tool properties when the header is invisible. */
711  bool value_for_tool_header = value;
712  if (value == true) {
713  ScrArea *area = rna_area_from_space(ptr);
715  if (region_tool_header != NULL) {
716  value_for_tool_header = !(region_tool_header->flag & RGN_FLAG_HIDDEN_BY_USER);
717  }
718  }
719  rna_Space_bool_from_region_flag_set_by_type(
720  ptr, RGN_TYPE_TOOL_HEADER, RGN_FLAG_HIDDEN, !value_for_tool_header);
721 }
722 static void rna_Space_show_region_header_update(bContext *C, PointerRNA *ptr)
723 {
724  rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_HEADER, RGN_FLAG_HIDDEN);
725 }
726 
727 /* Footer Region. */
728 static bool rna_Space_show_region_footer_get(PointerRNA *ptr)
729 {
730  return !rna_Space_bool_from_region_flag_get_by_type(ptr, RGN_TYPE_FOOTER, RGN_FLAG_HIDDEN);
731 }
732 static void rna_Space_show_region_footer_set(PointerRNA *ptr, bool value)
733 {
734  rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_FOOTER, RGN_FLAG_HIDDEN, !value);
735 }
736 static void rna_Space_show_region_footer_update(bContext *C, PointerRNA *ptr)
737 {
738  rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_FOOTER, RGN_FLAG_HIDDEN);
739 }
740 
741 /* Tool Header Region.
742  *
743  * This depends on the 'RGN_TYPE_TOOL_HEADER'
744  */
745 static bool rna_Space_show_region_tool_header_get(PointerRNA *ptr)
746 {
747  return !rna_Space_bool_from_region_flag_get_by_type(
749 }
750 static void rna_Space_show_region_tool_header_set(PointerRNA *ptr, bool value)
751 {
752  rna_Space_bool_from_region_flag_set_by_type(
754  rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_TOOL_HEADER, RGN_FLAG_HIDDEN, !value);
755 }
756 static void rna_Space_show_region_tool_header_update(bContext *C, PointerRNA *ptr)
757 {
758  rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_TOOL_HEADER, RGN_FLAG_HIDDEN);
759 }
760 
761 /* Tools Region. */
762 static bool rna_Space_show_region_toolbar_get(PointerRNA *ptr)
763 {
764  return !rna_Space_bool_from_region_flag_get_by_type(ptr, RGN_TYPE_TOOLS, RGN_FLAG_HIDDEN);
765 }
766 static void rna_Space_show_region_toolbar_set(PointerRNA *ptr, bool value)
767 {
768  rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_TOOLS, RGN_FLAG_HIDDEN, !value);
769 }
770 static void rna_Space_show_region_toolbar_update(bContext *C, PointerRNA *ptr)
771 {
772  rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_TOOLS, RGN_FLAG_HIDDEN);
773 }
774 
775 /* UI Region */
776 static bool rna_Space_show_region_ui_get(PointerRNA *ptr)
777 {
778  return !rna_Space_bool_from_region_flag_get_by_type(ptr, RGN_TYPE_UI, RGN_FLAG_HIDDEN);
779 }
780 static void rna_Space_show_region_ui_set(PointerRNA *ptr, bool value)
781 {
782  rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_UI, RGN_FLAG_HIDDEN, !value);
783 }
784 static void rna_Space_show_region_ui_update(bContext *C, PointerRNA *ptr)
785 {
786  rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_UI, RGN_FLAG_HIDDEN);
787 }
788 
789 /* Redo (HUD) Region */
790 static bool rna_Space_show_region_hud_get(PointerRNA *ptr)
791 {
792  return !rna_Space_bool_from_region_flag_get_by_type(ptr, RGN_TYPE_HUD, RGN_FLAG_HIDDEN_BY_USER);
793 }
794 static void rna_Space_show_region_hud_set(PointerRNA *ptr, bool value)
795 {
796  rna_Space_bool_from_region_flag_set_by_type(ptr, RGN_TYPE_HUD, RGN_FLAG_HIDDEN_BY_USER, !value);
797 }
798 static void rna_Space_show_region_hud_update(bContext *C, PointerRNA *ptr)
799 {
800  rna_Space_bool_from_region_flag_update_by_type(C, ptr, RGN_TYPE_HUD, RGN_FLAG_HIDDEN_BY_USER);
801 }
802 
805 static bool rna_Space_view2d_sync_get(PointerRNA *ptr)
806 {
807  ScrArea *area;
808  ARegion *region;
809 
810  area = rna_area_from_space(ptr); /* can be NULL */
812  if (region) {
813  View2D *v2d = &region->v2d;
814  return (v2d->flag & V2D_VIEWSYNC_SCREEN_TIME) != 0;
815  }
816 
817  return false;
818 }
819 
820 static void rna_Space_view2d_sync_set(PointerRNA *ptr, bool value)
821 {
822  ScrArea *area;
823  ARegion *region;
824 
825  area = rna_area_from_space(ptr); /* can be NULL */
826  if ((area != NULL) && !UI_view2d_area_supports_sync(area)) {
828  RPT_ERROR,
829  "'show_locked_time' is not supported for the '%s' editor",
830  area->type->name);
831  return;
832  }
833 
835  if (region) {
836  View2D *v2d = &region->v2d;
837  if (value) {
839  }
840  else {
842  }
843  }
844 }
845 
846 static void rna_Space_view2d_sync_update(Main *UNUSED(bmain),
847  Scene *UNUSED(scene),
848  PointerRNA *ptr)
849 {
850  ScrArea *area;
851  ARegion *region;
852 
853  area = rna_area_from_space(ptr); /* can be NULL */
855 
856  if (region) {
857  bScreen *screen = (bScreen *)ptr->owner_id;
858  View2D *v2d = &region->v2d;
859 
860  UI_view2d_sync(screen, area, v2d, V2D_LOCK_SET);
861  }
862 }
863 
864 static void rna_GPencil_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
865 {
866  bool changed = false;
867  /* need set all caches as dirty to recalculate onion skinning */
868  for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) {
869  if (ob->type == OB_GPENCIL) {
870  bGPdata *gpd = (bGPdata *)ob->data;
872  changed = true;
873  }
874  }
875  if (changed) {
877  }
878 }
879 
880 /* Space 3D View */
881 static void rna_SpaceView3D_camera_update(Main *bmain, Scene *scene, PointerRNA *ptr)
882 {
883  View3D *v3d = (View3D *)(ptr->data);
884  if (v3d->scenelock) {
885  wmWindowManager *wm = bmain->wm.first;
886 
887  scene->camera = v3d->camera;
889  }
890 }
891 
892 static void rna_SpaceView3D_use_local_camera_set(PointerRNA *ptr, bool value)
893 {
894  View3D *v3d = (View3D *)(ptr->data);
895  bScreen *screen = (bScreen *)ptr->owner_id;
896 
897  v3d->scenelock = !value;
898 
899  if (!value) {
900  Scene *scene = ED_screen_scene_find(screen, G_MAIN->wm.first);
901  /* NULL if the screen isn't in an active window (happens when setting from Python).
902  * This could be moved to the update function, in that case the scene wont relate to the screen
903  * so keep it working this way. */
904  if (scene != NULL) {
905  v3d->camera = scene->camera;
906  }
907  }
908 }
909 
910 static float rna_View3DOverlay_GridScaleUnit_get(PointerRNA *ptr)
911 {
912  View3D *v3d = (View3D *)(ptr->data);
913  bScreen *screen = (bScreen *)ptr->owner_id;
914  Scene *scene = ED_screen_scene_find(screen, G_MAIN->wm.first);
915  if (scene != NULL) {
916  return ED_view3d_grid_scale(scene, v3d, NULL);
917  }
918  else {
919  /* When accessed from non-active screen. */
920  return 1.0f;
921  }
922 }
923 
924 static PointerRNA rna_SpaceView3D_region_3d_get(PointerRNA *ptr)
925 {
926  View3D *v3d = (View3D *)(ptr->data);
927  ScrArea *area = rna_area_from_space(ptr);
928  void *regiondata = NULL;
929  if (area) {
930  ListBase *regionbase = (area->spacedata.first == v3d) ? &area->regionbase : &v3d->regionbase;
931  ARegion *region = regionbase->last; /* always last in list, weak .. */
932  regiondata = region->regiondata;
933  }
934 
935  return rna_pointer_inherit_refine(ptr, &RNA_RegionView3D, regiondata);
936 }
937 
938 static void rna_SpaceView3D_region_quadviews_begin(CollectionPropertyIterator *iter,
939  PointerRNA *ptr)
940 {
941  View3D *v3d = (View3D *)(ptr->data);
942  ScrArea *area = rna_area_from_space(ptr);
943  int i = 3;
944 
945  ARegion *region =
946  ((area && area->spacedata.first == v3d) ? &area->regionbase : &v3d->regionbase)->last;
947  ListBase lb = {NULL, NULL};
948 
949  if (region && region->alignment == RGN_ALIGN_QSPLIT) {
950  while (i-- && region) {
951  region = region->prev;
952  }
953 
954  if (i < 0) {
955  lb.first = region;
956  }
957  }
958 
959  rna_iterator_listbase_begin(iter, &lb, NULL);
960 }
961 
962 static PointerRNA rna_SpaceView3D_region_quadviews_get(CollectionPropertyIterator *iter)
963 {
964  void *regiondata = ((ARegion *)rna_iterator_listbase_get(iter))->regiondata;
965 
966  return rna_pointer_inherit_refine(&iter->parent, &RNA_RegionView3D, regiondata);
967 }
968 
969 static void rna_RegionView3D_quadview_update(Main *UNUSED(main),
970  Scene *UNUSED(scene),
971  PointerRNA *ptr)
972 {
973  ScrArea *area;
974  ARegion *region;
975 
976  rna_area_region_from_regiondata(ptr, &area, &region);
977  if (area && region && region->alignment == RGN_ALIGN_QSPLIT) {
978  ED_view3d_quadview_update(area, region, false);
979  }
980 }
981 
982 /* same as above but call clip==true */
983 static void rna_RegionView3D_quadview_clip_update(Main *UNUSED(main),
984  Scene *UNUSED(scene),
985  PointerRNA *ptr)
986 {
987  ScrArea *area;
988  ARegion *region;
989 
990  rna_area_region_from_regiondata(ptr, &area, &region);
991  if (area && region && region->alignment == RGN_ALIGN_QSPLIT) {
992  ED_view3d_quadview_update(area, region, true);
993  }
994 }
995 
996 static void rna_RegionView3D_view_location_get(PointerRNA *ptr, float *values)
997 {
998  RegionView3D *rv3d = (RegionView3D *)(ptr->data);
999  negate_v3_v3(values, rv3d->ofs);
1000 }
1001 
1002 static void rna_RegionView3D_view_location_set(PointerRNA *ptr, const float *values)
1003 {
1004  RegionView3D *rv3d = (RegionView3D *)(ptr->data);
1005  negate_v3_v3(rv3d->ofs, values);
1006 }
1007 
1008 static void rna_RegionView3D_view_rotation_get(PointerRNA *ptr, float *values)
1009 {
1010  RegionView3D *rv3d = (RegionView3D *)(ptr->data);
1011  invert_qt_qt(values, rv3d->viewquat);
1012 }
1013 
1014 static void rna_RegionView3D_view_rotation_set(PointerRNA *ptr, const float *values)
1015 {
1016  RegionView3D *rv3d = (RegionView3D *)(ptr->data);
1017  invert_qt_qt(rv3d->viewquat, values);
1018 }
1019 
1020 static void rna_RegionView3D_view_matrix_set(PointerRNA *ptr, const float *values)
1021 {
1022  RegionView3D *rv3d = (RegionView3D *)(ptr->data);
1023  float mat[4][4];
1024  invert_m4_m4(mat, (float(*)[4])values);
1025  ED_view3d_from_m4(mat, rv3d->ofs, rv3d->viewquat, &rv3d->dist);
1026 }
1027 
1028 static bool rna_RegionView3D_is_orthographic_side_view_get(PointerRNA *ptr)
1029 {
1030  RegionView3D *rv3d = (RegionView3D *)(ptr->data);
1031  return RV3D_VIEW_IS_AXIS(rv3d->view);
1032 }
1033 
1034 static IDProperty *rna_View3DShading_idprops(PointerRNA *ptr, bool create)
1035 {
1036  View3DShading *shading = ptr->data;
1037 
1038  if (create && !shading->prop) {
1039  IDPropertyTemplate val = {0};
1040  shading->prop = IDP_New(IDP_GROUP, &val, "View3DShading ID properties");
1041  }
1042 
1043  return shading->prop;
1044 }
1045 
1046 static void rna_3DViewShading_type_update(Main *bmain, Scene *scene, PointerRNA *ptr)
1047 {
1048  ID *id = ptr->owner_id;
1049  if (GS(id->name) != ID_SCR) {
1050  return;
1051  }
1052 
1053  View3DShading *shading = ptr->data;
1054  if (shading->type == OB_MATERIAL ||
1056  /* When switching from workbench to render or material mode the geometry of any
1057  * active sculpt session needs to be recalculated. */
1058  for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) {
1059  if (ob->sculpt) {
1061  }
1062  }
1063  }
1064 
1065  /* Update Gpencil. */
1066  rna_GPencil_update(bmain, scene, ptr);
1067 
1068  bScreen *screen = (bScreen *)ptr->owner_id;
1069  LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
1070  LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
1071  if (sl->spacetype == SPACE_VIEW3D) {
1072  View3D *v3d = (View3D *)sl;
1073  if (&v3d->shading == shading) {
1074  ED_view3d_shade_update(bmain, v3d, area);
1075  return;
1076  }
1077  }
1078  }
1079  }
1080 }
1081 
1082 static Scene *rna_3DViewShading_scene(PointerRNA *ptr)
1083 {
1084  /* Get scene, depends if using 3D view or OpenGL render settings. */
1085  ID *id = ptr->owner_id;
1086  if (GS(id->name) == ID_SCE) {
1087  return (Scene *)id;
1088  }
1089  else {
1090  bScreen *screen = (bScreen *)ptr->owner_id;
1091  return WM_windows_scene_get_from_screen(G_MAIN->wm.first, screen);
1092  }
1093 }
1094 
1095 static ViewLayer *rna_3DViewShading_view_layer(PointerRNA *ptr)
1096 {
1097  /* Get scene, depends if using 3D view or OpenGL render settings. */
1098  ID *id = ptr->owner_id;
1099  if (GS(id->name) == ID_SCE) {
1100  return NULL;
1101  }
1102  else {
1103  bScreen *screen = (bScreen *)ptr->owner_id;
1104  return WM_windows_view_layer_get_from_screen(G_MAIN->wm.first, screen);
1105  }
1106 }
1107 
1108 static int rna_3DViewShading_type_get(PointerRNA *ptr)
1109 {
1110  /* Available shading types depend on render engine. */
1111  Scene *scene = rna_3DViewShading_scene(ptr);
1113  View3DShading *shading = (View3DShading *)ptr->data;
1114 
1116  return shading->type;
1117  }
1119  return (shading->type == OB_MATERIAL) ? OB_SOLID : shading->type;
1120  }
1121  else {
1122  if (shading->type == OB_RENDER && !(type && type->view_draw)) {
1123  return OB_MATERIAL;
1124  }
1125  else {
1126  return shading->type;
1127  }
1128  }
1129 }
1130 
1131 static void rna_3DViewShading_type_set(PointerRNA *ptr, int value)
1132 {
1133  View3DShading *shading = (View3DShading *)ptr->data;
1134  if (value != shading->type && value == OB_RENDER) {
1135  shading->prev_type = shading->type;
1136  }
1137  shading->type = value;
1138 }
1139 
1140 static const EnumPropertyItem *rna_3DViewShading_type_itemf(bContext *UNUSED(C),
1141  PointerRNA *ptr,
1142  PropertyRNA *UNUSED(prop),
1143  bool *r_free)
1144 {
1145  Scene *scene = rna_3DViewShading_scene(ptr);
1147 
1148  EnumPropertyItem *item = NULL;
1149  int totitem = 0;
1150 
1153 
1157  }
1160  }
1161  else {
1163  if (type && type->view_draw) {
1165  }
1166  }
1167 
1168  RNA_enum_item_end(&item, &totitem);
1169  *r_free = true;
1170 
1171  return item;
1172 }
1173 
1174 /* Shading.selected_studio_light */
1175 static PointerRNA rna_View3DShading_selected_studio_light_get(PointerRNA *ptr)
1176 {
1177  View3DShading *shading = (View3DShading *)ptr->data;
1178  StudioLight *sl;
1179  if (shading->type == OB_SOLID && shading->light == V3D_LIGHTING_MATCAP) {
1181  }
1182  else if (shading->type == OB_SOLID && shading->light == V3D_LIGHTING_STUDIO) {
1184  }
1185  else {
1186  /* OB_MATERIAL and OB_RENDER */
1188  }
1190 }
1191 
1192 /* shading.light */
1193 static const EnumPropertyItem *rna_View3DShading_color_type_itemf(bContext *UNUSED(C),
1194  PointerRNA *ptr,
1195  PropertyRNA *UNUSED(prop),
1196  bool *r_free)
1197 {
1198  View3DShading *shading = (View3DShading *)ptr->data;
1199 
1200  int totitem = 0;
1201 
1202  if (shading->type == OB_WIRE) {
1203  EnumPropertyItem *item = NULL;
1210  RNA_enum_item_end(&item, &totitem);
1211  *r_free = true;
1212  return item;
1213  }
1214  else {
1215  /* Solid mode, or lookdev mode for workbench engine. */
1216  *r_free = false;
1218  }
1219 }
1220 
1221 static void rna_View3DShading_studio_light_get_storage(View3DShading *shading,
1222  char **dna_storage,
1223  int *flag)
1224 {
1225  *dna_storage = shading->studio_light;
1226 
1227  *flag = STUDIOLIGHT_TYPE_STUDIO;
1228  if (shading->type == OB_SOLID) {
1229  if (shading->light == V3D_LIGHTING_MATCAP) {
1230  *flag = STUDIOLIGHT_TYPE_MATCAP;
1231  *dna_storage = shading->matcap;
1232  }
1233  }
1234  else {
1235  *flag = STUDIOLIGHT_TYPE_WORLD;
1236  *dna_storage = shading->lookdev_light;
1237  }
1238 }
1239 
1240 static int rna_View3DShading_studio_light_get(PointerRNA *ptr)
1241 {
1242  View3DShading *shading = (View3DShading *)ptr->data;
1243  char *dna_storage;
1244  int flag;
1245 
1246  rna_View3DShading_studio_light_get_storage(shading, &dna_storage, &flag);
1247  StudioLight *sl = BKE_studiolight_find(dna_storage, flag);
1248  if (sl) {
1249  BLI_strncpy(dna_storage, sl->name, FILE_MAXFILE);
1250  return sl->index;
1251  }
1252  else {
1253  return 0;
1254  }
1255 }
1256 
1257 static void rna_View3DShading_studio_light_set(PointerRNA *ptr, int value)
1258 {
1259  View3DShading *shading = (View3DShading *)ptr->data;
1260  char *dna_storage;
1261  int flag;
1262 
1263  rna_View3DShading_studio_light_get_storage(shading, &dna_storage, &flag);
1264  StudioLight *sl = BKE_studiolight_findindex(value, flag);
1265  if (sl) {
1266  BLI_strncpy(dna_storage, sl->name, FILE_MAXFILE);
1267  }
1268 }
1269 
1270 static const EnumPropertyItem *rna_View3DShading_studio_light_itemf(bContext *UNUSED(C),
1271  PointerRNA *ptr,
1272  PropertyRNA *UNUSED(prop),
1273  bool *r_free)
1274 {
1275  View3DShading *shading = (View3DShading *)ptr->data;
1276  EnumPropertyItem *item = NULL;
1277  int totitem = 0;
1278 
1279  if (shading->type == OB_SOLID && shading->light == V3D_LIGHTING_MATCAP) {
1280  const int flags = (STUDIOLIGHT_EXTERNAL_FILE | STUDIOLIGHT_TYPE_MATCAP);
1281 
1283  int icon_id = (shading->flag & V3D_SHADING_MATCAP_FLIP_X) ? sl->icon_id_matcap_flipped :
1284  sl->icon_id_matcap;
1285  if ((sl->flag & flags) == flags) {
1286  EnumPropertyItem tmp = {sl->index, sl->name, icon_id, sl->name, ""};
1287  RNA_enum_item_add(&item, &totitem, &tmp);
1288  }
1289  }
1290  }
1291  else {
1293  int icon_id = sl->icon_id_irradiance;
1294  bool show_studiolight = false;
1295 
1296  if (sl->flag & STUDIOLIGHT_INTERNAL) {
1297  /* always show internal lights for solid */
1298  if (shading->type == OB_SOLID) {
1299  show_studiolight = true;
1300  }
1301  }
1302  else {
1303  switch (shading->type) {
1304  case OB_SOLID:
1305  case OB_TEXTURE:
1306  show_studiolight = ((sl->flag & STUDIOLIGHT_TYPE_STUDIO) != 0);
1307  break;
1308 
1309  case OB_MATERIAL:
1310  case OB_RENDER:
1311  show_studiolight = ((sl->flag & STUDIOLIGHT_TYPE_WORLD) != 0);
1312  icon_id = sl->icon_id_radiance;
1313  break;
1314  }
1315  }
1316 
1317  if (show_studiolight) {
1318  EnumPropertyItem tmp = {sl->index, sl->name, icon_id, sl->name, ""};
1319  RNA_enum_item_add(&item, &totitem, &tmp);
1320  }
1321  }
1322  }
1323 
1324  RNA_enum_item_end(&item, &totitem);
1325  *r_free = true;
1326  return item;
1327 }
1328 
1329 static const EnumPropertyItem *rna_3DViewShading_render_pass_itemf(bContext *C,
1330  PointerRNA *UNUSED(ptr),
1331  PropertyRNA *UNUSED(prop),
1332  bool *r_free)
1333 {
1335  ViewLayer *view_layer = CTX_data_view_layer(C);
1336 
1337  const bool bloom_enabled = scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED;
1338  const bool aov_available = BKE_view_layer_has_valid_aov(view_layer);
1339 
1340  int totitem = 0;
1342  EnumPropertyItem aov_template;
1343  for (int i = 0; rna_enum_view3dshading_render_pass_type_items[i].identifier != NULL; i++) {
1345  if (item->value == EEVEE_RENDER_PASS_AOV) {
1346  aov_template.value = item->value;
1347  aov_template.icon = 0;
1348  aov_template.description = item->description;
1349  LISTBASE_FOREACH (ViewLayerAOV *, aov, &view_layer->aovs) {
1350  if ((aov->flag & AOV_CONFLICT) != 0) {
1351  continue;
1352  }
1353  aov_template.name = aov->name;
1354  aov_template.identifier = aov->name;
1355  RNA_enum_item_add(&result, &totitem, &aov_template);
1356  aov_template.value++;
1357  }
1358  }
1359  else if (!((!bloom_enabled &&
1360  (item->value == EEVEE_RENDER_PASS_BLOOM || STREQ(item->name, "Effects"))) ||
1361  (!aov_available && STREQ(item->name, "Shader AOV")))) {
1362  RNA_enum_item_add(&result, &totitem, item);
1363  }
1364  }
1365 
1366  RNA_enum_item_end(&result, &totitem);
1367  *r_free = true;
1368  return result;
1369 }
1370 static int rna_3DViewShading_render_pass_get(PointerRNA *ptr)
1371 {
1372  View3DShading *shading = (View3DShading *)ptr->data;
1374  Scene *scene = rna_3DViewShading_scene(ptr);
1375  ViewLayer *view_layer = rna_3DViewShading_view_layer(ptr);
1376 
1379  }
1380  else if (result == EEVEE_RENDER_PASS_AOV) {
1381  if (!view_layer) {
1383  }
1384  const int aov_index = BLI_findstringindex(
1385  &view_layer->aovs, shading->aov_name, offsetof(ViewLayerAOV, name));
1386  if (aov_index == -1) {
1388  }
1389  return result + aov_index;
1390  }
1391 
1392  return result;
1393 }
1394 
1395 static void rna_3DViewShading_render_pass_set(PointerRNA *ptr, int value)
1396 {
1397  View3DShading *shading = (View3DShading *)ptr->data;
1398  Scene *scene = rna_3DViewShading_scene(ptr);
1399  ViewLayer *view_layer = rna_3DViewShading_view_layer(ptr);
1400  shading->aov_name[0] = 0;
1401 
1402  if ((value & EEVEE_RENDER_PASS_AOV) != 0) {
1403  if (!view_layer) {
1405  return;
1406  }
1407  const int aov_index = value & ~EEVEE_RENDER_PASS_AOV;
1408  ViewLayerAOV *aov = BLI_findlink(&view_layer->aovs, aov_index);
1409  if (!aov) {
1410  /* AOV not found, cannot select AOV. */
1412  return;
1413  }
1414 
1416  BLI_strncpy(shading->aov_name, aov->name, sizeof(aov->name));
1417  }
1418  else if (value == EEVEE_RENDER_PASS_BLOOM &&
1419  ((scene->eevee.flag & SCE_EEVEE_BLOOM_ENABLED) == 0)) {
1421  }
1422  else {
1423  shading->render_pass = value;
1424  }
1425 }
1426 
1427 static void rna_SpaceView3D_use_local_collections_update(bContext *C, PointerRNA *ptr)
1428 {
1429  Main *bmain = CTX_data_main(C);
1431  ViewLayer *view_layer = CTX_data_view_layer(C);
1432  View3D *v3d = (View3D *)ptr->data;
1433 
1434  if (ED_view3d_local_collections_set(bmain, v3d)) {
1435  BKE_layer_collection_local_sync(view_layer, v3d);
1437  }
1438 }
1439 
1440 static const EnumPropertyItem *rna_SpaceView3D_stereo3d_camera_itemf(bContext *C,
1441  PointerRNA *UNUSED(ptr),
1442  PropertyRNA *UNUSED(prop),
1443  bool *UNUSED(r_free))
1444 {
1446 
1448  return multiview_camera_items;
1449  }
1450  else {
1451  return stereo3d_camera_items;
1452  }
1453 }
1454 
1455 static void rna_SpaceView3D_mirror_xr_session_update(Main *main,
1456  Scene *UNUSED(scene),
1457  PointerRNA *ptr)
1458 {
1459 # ifdef WITH_XR_OPENXR
1460  const wmWindowManager *wm = main->wm.first;
1461 
1462  /* Handle mirror toggling while there is a session already. */
1463  if (WM_xr_session_exists(&wm->xr)) {
1464  const View3D *v3d = ptr->data;
1465  const ScrArea *area = rna_area_from_space(ptr);
1466  ED_view3d_xr_mirror_update(area, v3d, v3d->flag & V3D_XR_SESSION_MIRROR);
1467  }
1468 
1469 # else
1470  UNUSED_VARS(main, ptr);
1471 # endif
1472 }
1473 
1474 static int rna_SpaceView3D_icon_from_show_object_viewport_get(PointerRNA *ptr)
1475 {
1476  const View3D *v3d = (View3D *)ptr->data;
1477  /* Ignore selection values when view is off,
1478  * intent is to show if visible objects aren't selectable. */
1479  const int view_value = (v3d->object_type_exclude_viewport != 0);
1480  const int select_value = (v3d->object_type_exclude_select &
1481  ~v3d->object_type_exclude_viewport) != 0;
1482  return ICON_VIS_SEL_11 + (view_value << 1) + select_value;
1483 }
1484 
1485 static char *rna_View3DShading_path(PointerRNA *UNUSED(ptr))
1486 {
1487  return BLI_strdup("shading");
1488 }
1489 
1490 static PointerRNA rna_SpaceView3D_overlay_get(PointerRNA *ptr)
1491 {
1493 }
1494 
1495 static char *rna_View3DOverlay_path(PointerRNA *UNUSED(ptr))
1496 {
1497  return BLI_strdup("overlay");
1498 }
1499 
1500 /* Space Image Editor */
1501 
1502 static PointerRNA rna_SpaceImage_overlay_get(PointerRNA *ptr)
1503 {
1505 }
1506 
1507 static char *rna_SpaceImageOverlay_path(PointerRNA *UNUSED(ptr))
1508 {
1509  return BLI_strdup("overlay");
1510 }
1511 
1512 static char *rna_SpaceUVEditor_path(PointerRNA *UNUSED(ptr))
1513 {
1514  return BLI_strdup("uv_editor");
1515 }
1516 
1517 static PointerRNA rna_SpaceImageEditor_uvedit_get(PointerRNA *ptr)
1518 {
1520 }
1521 
1522 static void rna_SpaceImageEditor_mode_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr))
1523 {
1524  ED_space_image_paint_update(bmain, bmain->wm.first, scene);
1525 }
1526 
1527 static void rna_SpaceImageEditor_show_stereo_set(PointerRNA *ptr, int value)
1528 {
1529  SpaceImage *sima = (SpaceImage *)(ptr->data);
1530 
1531  if (value) {
1532  sima->iuser.flag |= IMA_SHOW_STEREO;
1533  }
1534  else {
1535  sima->iuser.flag &= ~IMA_SHOW_STEREO;
1536  }
1537 }
1538 
1539 static bool rna_SpaceImageEditor_show_stereo_get(PointerRNA *ptr)
1540 {
1541  SpaceImage *sima = (SpaceImage *)(ptr->data);
1542  return (sima->iuser.flag & IMA_SHOW_STEREO) != 0;
1543 }
1544 
1545 static void rna_SpaceImageEditor_show_stereo_update(Main *UNUSED(bmain),
1546  Scene *UNUSED(unused),
1547  PointerRNA *ptr)
1548 {
1549  SpaceImage *sima = (SpaceImage *)(ptr->data);
1550  Image *ima = sima->image;
1551 
1552  if (ima) {
1553  if (ima->rr) {
1554  BKE_image_multilayer_index(ima->rr, &sima->iuser);
1555  }
1556  else {
1557  BKE_image_multiview_index(ima, &sima->iuser);
1558  }
1559  }
1560 }
1561 
1562 static bool rna_SpaceImageEditor_show_render_get(PointerRNA *ptr)
1563 {
1564  SpaceImage *sima = (SpaceImage *)(ptr->data);
1565  return ED_space_image_show_render(sima);
1566 }
1567 
1568 static bool rna_SpaceImageEditor_show_paint_get(PointerRNA *ptr)
1569 {
1570  SpaceImage *sima = (SpaceImage *)(ptr->data);
1571  return ED_space_image_show_paint(sima);
1572 }
1573 
1574 static bool rna_SpaceImageEditor_show_uvedit_get(PointerRNA *ptr)
1575 {
1576  SpaceImage *sima = ptr->data;
1577  bScreen *screen = (bScreen *)ptr->owner_id;
1578  Object *obedit = NULL;
1579  wmWindow *win = ED_screen_window_find(screen, G_MAIN->wm.first);
1580  if (win != NULL) {
1581  ViewLayer *view_layer = WM_window_get_active_view_layer(win);
1582  obedit = OBEDIT_FROM_VIEW_LAYER(view_layer);
1583  }
1584  return ED_space_image_show_uvedit(sima, obedit);
1585 }
1586 
1587 static bool rna_SpaceImageEditor_show_maskedit_get(PointerRNA *ptr)
1588 {
1589  SpaceImage *sima = (SpaceImage *)(ptr->data);
1590  bScreen *screen = (bScreen *)ptr->owner_id;
1591  Object *obedit = NULL;
1592  wmWindow *win = ED_screen_window_find(screen, G_MAIN->wm.first);
1593  if (win != NULL) {
1594  ViewLayer *view_layer = WM_window_get_active_view_layer(win);
1595  obedit = OBEDIT_FROM_VIEW_LAYER(view_layer);
1596  }
1597  return ED_space_image_check_show_maskedit(sima, obedit);
1598 }
1599 
1600 static void rna_SpaceImageEditor_image_set(PointerRNA *ptr,
1601  PointerRNA value,
1602  struct ReportList *UNUSED(reports))
1603 {
1605  SpaceImage *sima = ptr->data;
1606  bScreen *screen = (bScreen *)ptr->owner_id;
1607  Object *obedit = NULL;
1608  wmWindow *win = ED_screen_window_find(screen, G_MAIN->wm.first);
1609  if (win != NULL) {
1610  ViewLayer *view_layer = WM_window_get_active_view_layer(win);
1611  obedit = OBEDIT_FROM_VIEW_LAYER(view_layer);
1612  }
1613  ED_space_image_set(G_MAIN, sima, obedit, (Image *)value.data, false);
1614 }
1615 
1616 static void rna_SpaceImageEditor_mask_set(PointerRNA *ptr,
1617  PointerRNA value,
1618  struct ReportList *UNUSED(reports))
1619 {
1620  SpaceImage *sima = (SpaceImage *)(ptr->data);
1621 
1622  ED_space_image_set_mask(NULL, sima, (Mask *)value.data);
1623 }
1624 
1625 static const EnumPropertyItem *rna_SpaceImageEditor_display_channels_itemf(
1626  bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
1627 {
1628  SpaceImage *sima = (SpaceImage *)ptr->data;
1629  EnumPropertyItem *item = NULL;
1630  ImBuf *ibuf;
1631  void *lock;
1632  int totitem = 0;
1633 
1634  ibuf = ED_space_image_acquire_buffer(sima, &lock, 0);
1636  ED_space_image_release_buffer(sima, ibuf, lock);
1637 
1638  if (mask & SI_USE_ALPHA) {
1640  }
1641  RNA_enum_items_add_value(&item, &totitem, display_channels_items, 0);
1642  if (mask & SI_SHOW_ALPHA) {
1644  }
1645  if (mask & SI_SHOW_ZBUF) {
1647  }
1648  if (mask & SI_SHOW_R) {
1650  }
1651  if (mask & SI_SHOW_G) {
1653  }
1654  if (mask & SI_SHOW_B) {
1656  }
1657 
1658  RNA_enum_item_end(&item, &totitem);
1659  *r_free = true;
1660 
1661  return item;
1662 }
1663 
1664 static int rna_SpaceImageEditor_display_channels_get(PointerRNA *ptr)
1665 {
1666  SpaceImage *sima = (SpaceImage *)ptr->data;
1667  ImBuf *ibuf;
1668  void *lock;
1669 
1670  ibuf = ED_space_image_acquire_buffer(sima, &lock, 0);
1672  ED_space_image_release_buffer(sima, ibuf, lock);
1673 
1674  return sima->flag & mask;
1675 }
1676 
1677 static void rna_SpaceImageEditor_zoom_get(PointerRNA *ptr, float *values)
1678 {
1679  SpaceImage *sima = (SpaceImage *)ptr->data;
1680  ScrArea *area;
1681  ARegion *region;
1682 
1683  values[0] = values[1] = 1;
1684 
1685  /* Find #ARegion. */
1686  area = rna_area_from_space(ptr); /* can be NULL */
1688  if (region) {
1689  ED_space_image_get_zoom(sima, region, &values[0], &values[1]);
1690  }
1691 }
1692 
1693 static void rna_SpaceImageEditor_cursor_location_get(PointerRNA *ptr, float *values)
1694 {
1695  SpaceImage *sima = (SpaceImage *)ptr->data;
1696 
1697  if (sima->flag & SI_COORDFLOATS) {
1698  copy_v2_v2(values, sima->cursor);
1699  }
1700  else {
1701  int w, h;
1702  ED_space_image_get_size(sima, &w, &h);
1703 
1704  values[0] = sima->cursor[0] * w;
1705  values[1] = sima->cursor[1] * h;
1706  }
1707 }
1708 
1709 static void rna_SpaceImageEditor_cursor_location_set(PointerRNA *ptr, const float *values)
1710 {
1711  SpaceImage *sima = (SpaceImage *)ptr->data;
1712 
1713  if (sima->flag & SI_COORDFLOATS) {
1714  copy_v2_v2(sima->cursor, values);
1715  }
1716  else {
1717  int w, h;
1718  ED_space_image_get_size(sima, &w, &h);
1719 
1720  sima->cursor[0] = values[0] / w;
1721  sima->cursor[1] = values[1] / h;
1722  }
1723 }
1724 
1725 static void rna_SpaceImageEditor_image_update(Main *UNUSED(bmain),
1726  Scene *UNUSED(scene),
1727  PointerRNA *ptr)
1728 {
1729  SpaceImage *sima = (SpaceImage *)ptr->data;
1730  Image *ima = sima->image;
1731 
1732  /* make sure all the iuser settings are valid for the sima image */
1733  if (ima) {
1734  if (ima->rr) {
1735  if (BKE_image_multilayer_index(sima->image->rr, &sima->iuser) == NULL) {
1736  BKE_image_init_imageuser(sima->image, &sima->iuser);
1737  }
1738  }
1739  else {
1740  BKE_image_multiview_index(ima, &sima->iuser);
1741  }
1742  }
1743 }
1744 
1745 static void rna_SpaceImageEditor_scopes_update(struct bContext *C, struct PointerRNA *ptr)
1746 {
1747  SpaceImage *sima = (SpaceImage *)ptr->data;
1748  ImBuf *ibuf;
1749  void *lock;
1750 
1751  /* TODO(lukas): Support tiles in scopes? */
1752  ibuf = ED_space_image_acquire_buffer(sima, &lock, 0);
1753  if (ibuf) {
1754  ED_space_image_scopes_update(C, sima, ibuf, true);
1756  }
1757  ED_space_image_release_buffer(sima, ibuf, lock);
1758 }
1759 
1760 static const EnumPropertyItem *rna_SpaceImageEditor_pivot_itemf(bContext *UNUSED(C),
1761  PointerRNA *ptr,
1762  PropertyRNA *UNUSED(prop),
1763  bool *UNUSED(r_free))
1764 {
1765  static const EnumPropertyItem pivot_items[] = {
1766  {V3D_AROUND_CENTER_BOUNDS, "CENTER", ICON_PIVOT_BOUNDBOX, "Bounding Box Center", ""},
1767  {V3D_AROUND_CENTER_MEDIAN, "MEDIAN", ICON_PIVOT_MEDIAN, "Median Point", ""},
1768  {V3D_AROUND_CURSOR, "CURSOR", ICON_PIVOT_CURSOR, "2D Cursor", ""},
1770  "INDIVIDUAL_ORIGINS",
1771  ICON_PIVOT_INDIVIDUAL,
1772  "Individual Origins",
1773  "Pivot around each selected island's own median point"},
1774  {0, NULL, 0, NULL, NULL},
1775  };
1776 
1777  SpaceImage *sima = (SpaceImage *)ptr->data;
1778 
1779  if (sima->mode == SI_MODE_PAINT) {
1781  }
1782  else {
1783  return pivot_items;
1784  }
1785 }
1786 
1787 /* Space Text Editor */
1788 
1789 static void rna_SpaceTextEditor_word_wrap_set(PointerRNA *ptr, bool value)
1790 {
1791  SpaceText *st = (SpaceText *)(ptr->data);
1792 
1793  st->wordwrap = value;
1794  st->left = 0;
1795 }
1796 
1797 static void rna_SpaceTextEditor_text_set(PointerRNA *ptr,
1798  PointerRNA value,
1799  struct ReportList *UNUSED(reports))
1800 {
1801  SpaceText *st = (SpaceText *)(ptr->data);
1802 
1803  st->text = value.data;
1804 
1805  ScrArea *area = rna_area_from_space(ptr);
1806  if (area) {
1808  if (region) {
1809  ED_text_scroll_to_cursor(st, region, true);
1810  }
1811  }
1812 }
1813 
1814 static bool rna_SpaceTextEditor_text_is_syntax_highlight_supported(struct SpaceText *space)
1815 {
1817 }
1818 
1819 static void rna_SpaceTextEditor_updateEdited(Main *UNUSED(bmain),
1820  Scene *UNUSED(scene),
1821  PointerRNA *ptr)
1822 {
1823  SpaceText *st = (SpaceText *)ptr->data;
1824 
1825  if (st->text) {
1827  }
1828 }
1829 
1830 /* Space Properties */
1831 
1832 /* note: this function exists only to avoid id refcounting */
1833 static void rna_SpaceProperties_pin_id_set(PointerRNA *ptr,
1834  PointerRNA value,
1835  struct ReportList *UNUSED(reports))
1836 {
1837  SpaceProperties *sbuts = (SpaceProperties *)(ptr->data);
1838  sbuts->pinid = value.data;
1839 }
1840 
1841 static StructRNA *rna_SpaceProperties_pin_id_typef(PointerRNA *ptr)
1842 {
1843  SpaceProperties *sbuts = (SpaceProperties *)(ptr->data);
1844 
1845  if (sbuts->pinid) {
1846  return ID_code_to_RNA_type(GS(sbuts->pinid->name));
1847  }
1848 
1849  return &RNA_ID;
1850 }
1851 
1852 static void rna_SpaceProperties_pin_id_update(Main *UNUSED(bmain),
1853  Scene *UNUSED(scene),
1854  PointerRNA *ptr)
1855 {
1856  SpaceProperties *sbuts = (SpaceProperties *)(ptr->data);
1857  ID *id = sbuts->pinid;
1858 
1859  if (id == NULL) {
1860  sbuts->flag &= ~SB_PIN_CONTEXT;
1861  return;
1862  }
1863 
1864  switch (GS(id->name)) {
1865  case ID_MA:
1867  break;
1868  case ID_TE:
1870  break;
1871  case ID_WO:
1873  break;
1874  case ID_LA:
1876  break;
1877  default:
1878  break;
1879  }
1880 }
1881 
1882 static void rna_SpaceProperties_context_set(PointerRNA *ptr, int value)
1883 {
1884  SpaceProperties *sbuts = (SpaceProperties *)(ptr->data);
1885 
1886  sbuts->mainb = value;
1887  sbuts->mainbuser = value;
1888 }
1889 
1890 static const EnumPropertyItem *rna_SpaceProperties_context_itemf(bContext *UNUSED(C),
1891  PointerRNA *ptr,
1892  PropertyRNA *UNUSED(prop),
1893  bool *r_free)
1894 {
1895  SpaceProperties *sbuts = (SpaceProperties *)(ptr->data);
1896  EnumPropertyItem *item = NULL;
1897 
1898  /* Although it would never reach this amount, a theoretical maximum number of tabs
1899  * is BCONTEXT_TOT * 2, with every tab displayed and a spacer in every other item. */
1900  short context_tabs_array[BCONTEXT_TOT * 2];
1901  int totitem = ED_buttons_tabs_list(sbuts, context_tabs_array);
1902  BLI_assert(totitem <= ARRAY_SIZE(context_tabs_array));
1903 
1904  int totitem_added = 0;
1905  for (int i = 0; i < totitem; i++) {
1906  if (context_tabs_array[i] == -1) {
1907  RNA_enum_item_add_separator(&item, &totitem_added);
1908  continue;
1909  }
1910 
1911  RNA_enum_items_add_value(&item, &totitem_added, buttons_context_items, context_tabs_array[i]);
1912 
1913  /* Add the object data icon dynamically for the data tab. */
1914  if (context_tabs_array[i] == BCONTEXT_DATA) {
1915  (item + totitem_added - 1)->icon = sbuts->dataicon;
1916  }
1917  }
1918 
1919  RNA_enum_item_end(&item, &totitem);
1920  *r_free = true;
1921 
1922  return item;
1923 }
1924 
1925 static void rna_SpaceProperties_context_update(Main *UNUSED(bmain),
1926  Scene *UNUSED(scene),
1927  PointerRNA *ptr)
1928 {
1929  SpaceProperties *sbuts = (SpaceProperties *)(ptr->data);
1930  /* XXX BCONTEXT_DATA is ugly, but required for lights... See T51318. */
1932  sbuts->preview = 1;
1933  }
1934 }
1935 
1936 static int rna_SpaceProperties_tab_search_results_getlength(PointerRNA *ptr,
1938 {
1939  SpaceProperties *sbuts = ptr->data;
1940 
1941  short context_tabs_array[BCONTEXT_TOT * 2]; /* Dummy variable. */
1942  const int tabs_len = ED_buttons_tabs_list(sbuts, context_tabs_array);
1943 
1944  length[0] = tabs_len;
1945 
1946  return length[0];
1947 }
1948 
1949 static void rna_SpaceProperties_tab_search_results_get(PointerRNA *ptr, bool *values)
1950 {
1951  SpaceProperties *sbuts = ptr->data;
1952 
1953  short context_tabs_array[BCONTEXT_TOT * 2]; /* Dummy variable. */
1954  const int tabs_len = ED_buttons_tabs_list(sbuts, context_tabs_array);
1955 
1956  for (int i = 0; i < tabs_len; i++) {
1957  values[i] = ED_buttons_tab_has_search_result(sbuts, i);
1958  }
1959 }
1960 
1961 static void rna_SpaceProperties_search_filter_get(PointerRNA *ptr, char *value)
1962 {
1963  SpaceProperties *sbuts = ptr->data;
1964  const char *search_filter = ED_buttons_search_string_get(sbuts);
1965 
1966  strcpy(value, search_filter);
1967 }
1968 
1969 static int rna_SpaceProperties_search_filter_length(PointerRNA *ptr)
1970 {
1971  SpaceProperties *sbuts = ptr->data;
1972 
1973  return ED_buttons_search_string_length(sbuts);
1974 }
1975 
1976 static void rna_SpaceProperties_search_filter_set(struct PointerRNA *ptr, const char *value)
1977 {
1978  SpaceProperties *sbuts = ptr->data;
1979 
1980  ED_buttons_search_string_set(sbuts, value);
1981 }
1982 
1983 static void rna_SpaceProperties_search_filter_update(Main *UNUSED(bmain),
1984  Scene *UNUSED(scene),
1985  PointerRNA *ptr)
1986 {
1987  ScrArea *area = rna_area_from_space(ptr);
1988 
1989  /* Update the search filter flag for the main region with the panels. */
1991  BLI_assert(main_region != NULL);
1992  ED_region_search_filter_update(area, main_region);
1993 }
1994 
1995 /* Space Console */
1996 static void rna_ConsoleLine_body_get(PointerRNA *ptr, char *value)
1997 {
1998  ConsoleLine *ci = (ConsoleLine *)ptr->data;
1999  memcpy(value, ci->line, ci->len + 1);
2000 }
2001 
2002 static int rna_ConsoleLine_body_length(PointerRNA *ptr)
2003 {
2004  ConsoleLine *ci = (ConsoleLine *)ptr->data;
2005  return ci->len;
2006 }
2007 
2008 static void rna_ConsoleLine_body_set(PointerRNA *ptr, const char *value)
2009 {
2010  ConsoleLine *ci = (ConsoleLine *)ptr->data;
2011  int len = strlen(value);
2012 
2013  if ((len >= ci->len_alloc) || (len * 2 < ci->len_alloc)) { /* allocate a new string */
2014  MEM_freeN(ci->line);
2015  ci->line = MEM_mallocN((len + 1) * sizeof(char), "rna_consoleline");
2016  ci->len_alloc = len + 1;
2017  }
2018  memcpy(ci->line, value, len + 1);
2019  ci->len = len;
2020 
2021  if (ci->cursor > len) {
2022  /* clamp the cursor */
2023  ci->cursor = len;
2024  }
2025 }
2026 
2027 static void rna_ConsoleLine_cursor_index_range(
2028  PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax))
2029 {
2030  ConsoleLine *ci = (ConsoleLine *)ptr->data;
2031 
2032  *min = 0;
2033  *max = ci->len; /* intentionally _not_ -1 */
2034 }
2035 
2036 /* Space Dopesheet */
2037 
2038 static void rna_SpaceDopeSheetEditor_action_set(PointerRNA *ptr,
2039  PointerRNA value,
2040  struct ReportList *UNUSED(reports))
2041 {
2042  SpaceAction *saction = (SpaceAction *)(ptr->data);
2043  bAction *act = (bAction *)value.data;
2044 
2045  if ((act == NULL) || (act->idroot == 0)) {
2046  /* just set if we're clearing the action or if the action is "amorphous" still */
2047  saction->action = act;
2048  }
2049  else {
2050  /* action to set must strictly meet the mode criteria... */
2051  if (saction->mode == SACTCONT_ACTION) {
2052  /* currently, this is "object-level" only, until we have some way of specifying this */
2053  if (act->idroot == ID_OB) {
2054  saction->action = act;
2055  }
2056  else {
2057  printf(
2058  "ERROR: cannot assign Action '%s' to Action Editor, as action is not object-level "
2059  "animation\n",
2060  act->id.name + 2);
2061  }
2062  }
2063  else if (saction->mode == SACTCONT_SHAPEKEY) {
2064  /* as the name says, "shapekey-level" only... */
2065  if (act->idroot == ID_KE) {
2066  saction->action = act;
2067  }
2068  else {
2069  printf(
2070  "ERROR: cannot assign Action '%s' to Shape Key Editor, as action doesn't animate "
2071  "Shape Keys\n",
2072  act->id.name + 2);
2073  }
2074  }
2075  else {
2076  printf(
2077  "ACK: who's trying to set an action while not in a mode displaying a single Action "
2078  "only?\n");
2079  }
2080  }
2081 }
2082 
2083 static void rna_SpaceDopeSheetEditor_action_update(bContext *C, PointerRNA *ptr)
2084 {
2085  SpaceAction *saction = (SpaceAction *)(ptr->data);
2086  ViewLayer *view_layer = CTX_data_view_layer(C);
2087  Main *bmain = CTX_data_main(C);
2088 
2089  Object *obact = OBACT(view_layer);
2090  if (obact == NULL) {
2091  return;
2092  }
2093 
2094  AnimData *adt = NULL;
2095  ID *id = NULL;
2096  switch (saction->mode) {
2097  case SACTCONT_ACTION:
2098  /* TODO: context selector could help decide this with more control? */
2099  adt = BKE_animdata_add_id(&obact->id);
2100  id = &obact->id;
2101  break;
2102  case SACTCONT_SHAPEKEY: {
2103  Key *key = BKE_key_from_object(obact);
2104  if (key == NULL) {
2105  return;
2106  }
2107  adt = BKE_animdata_add_id(&key->id);
2108  id = &key->id;
2109  break;
2110  }
2111  case SACTCONT_GPENCIL:
2112  case SACTCONT_DOPESHEET:
2113  case SACTCONT_MASK:
2114  case SACTCONT_CACHEFILE:
2115  case SACTCONT_TIMELINE:
2116  return;
2117  }
2118 
2119  if (adt == NULL) {
2120  /* No animdata was added, so the depsgraph also doesn't need tagging. */
2121  return;
2122  }
2123 
2124  /* Don't do anything if old and new actions are the same... */
2125  if (adt->action == saction->action) {
2126  return;
2127  }
2128 
2129  /* Exit editmode first - we cannot change actions while in tweakmode. */
2131 
2132  /* To prevent data loss (i.e. if users flip between actions using the Browse menu),
2133  * stash this action if nothing else uses it.
2134  *
2135  * EXCEPTION:
2136  * This callback runs when unlinking actions. In that case, we don't want to
2137  * stash the action, as the user is signaling that they want to detach it.
2138  * This can be reviewed again later,
2139  * but it could get annoying if we keep these instead.
2140  */
2141  if (adt->action != NULL && adt->action->id.us <= 0 && saction->action != NULL) {
2142  /* XXX: Things here get dodgy if this action is only partially completed,
2143  * and the user then uses the browse menu to get back to this action,
2144  * assigning it as the active action (i.e. the stash strip gets out of sync)
2145  */
2147  }
2148 
2149  BKE_animdata_set_action(NULL, id, saction->action);
2150 
2152 
2153  /* Update relations as well, so new time source dependency is added. */
2154  DEG_relations_tag_update(bmain);
2155 }
2156 
2157 static void rna_SpaceDopeSheetEditor_mode_update(bContext *C, PointerRNA *ptr)
2158 {
2159  SpaceAction *saction = (SpaceAction *)(ptr->data);
2160  ScrArea *area = CTX_wm_area(C);
2161  ViewLayer *view_layer = CTX_data_view_layer(C);
2162  Object *obact = OBACT(view_layer);
2163 
2164  /* special exceptions for ShapeKey Editor mode */
2165  if (saction->mode == SACTCONT_SHAPEKEY) {
2166  Key *key = BKE_key_from_object(obact);
2167 
2168  /* 1) update the action stored for the editor */
2169  if (key) {
2170  saction->action = (key->adt) ? key->adt->action : NULL;
2171  }
2172  else {
2173  saction->action = NULL;
2174  }
2175  }
2176  /* make sure action stored is valid */
2177  else if (saction->mode == SACTCONT_ACTION) {
2178  /* 1) update the action stored for the editor */
2179  /* TODO: context selector could help decide this with more control? */
2180  if (obact) {
2181  saction->action = (obact->adt) ? obact->adt->action : NULL;
2182  }
2183  else {
2184  saction->action = NULL;
2185  }
2186  }
2187 
2188  /* Collapse (and show) summary channel and hide channel list for timeline */
2189  if (saction->mode == SACTCONT_TIMELINE) {
2190  saction->ads.flag |= ADS_FLAG_SUMMARY_COLLAPSED;
2191  saction->ads.filterflag |= ADS_FILTER_SUMMARY;
2192  }
2193 
2194  if (area && area->spacedata.first == saction) {
2196  if (channels_region) {
2197  if (saction->mode == SACTCONT_TIMELINE) {
2198  channels_region->flag |= RGN_FLAG_HIDDEN;
2199  }
2200  else {
2201  channels_region->flag &= ~RGN_FLAG_HIDDEN;
2202  }
2203  ED_region_visibility_change_update(C, area, channels_region);
2204  }
2205  }
2206 
2207  /* recalculate extents of channel list */
2209 
2210  /* store current mode as "old mode",
2211  * so that returning from other editors doesn't always reset to "Action Editor" */
2212  if (saction->mode != SACTCONT_TIMELINE) {
2213  saction->mode_prev = saction->mode;
2214  }
2215 }
2216 
2217 /* Space Graph Editor */
2218 
2219 static void rna_SpaceGraphEditor_display_mode_update(bContext *C, PointerRNA *ptr)
2220 {
2221  ScrArea *area = rna_area_from_space(ptr);
2222  SpaceGraph *sipo = (SpaceGraph *)ptr->data;
2223 
2224  /* for "Drivers" mode, enable all the necessary bits and pieces */
2225  if (sipo->mode == SIPO_MODE_DRIVERS) {
2228  }
2229 
2230  /* after changing view mode, must force recalculation of F-Curve colors
2231  * which can only be achieved using refresh as opposed to redraw
2232  */
2234 }
2235 
2236 static bool rna_SpaceGraphEditor_has_ghost_curves_get(PointerRNA *ptr)
2237 {
2238  SpaceGraph *sipo = (SpaceGraph *)(ptr->data);
2239  return (BLI_listbase_is_empty(&sipo->runtime.ghost_curves) == false);
2240 }
2241 
2242 static void rna_SpaceConsole_rect_update(Main *UNUSED(bmain),
2243  Scene *UNUSED(scene),
2244  PointerRNA *ptr)
2245 {
2246  SpaceConsole *sc = ptr->data;
2248 }
2249 
2250 static void rna_SequenceEditor_update_cache(Main *UNUSED(bmain),
2251  Scene *scene,
2252  PointerRNA *UNUSED(ptr))
2253 {
2255 }
2256 
2257 static void seq_build_proxy(bContext *C, PointerRNA *ptr)
2258 {
2259  if (U.sequencer_proxy_setup != USER_SEQ_PROXY_SETUP_AUTOMATIC) {
2260  return;
2261  }
2262 
2263  SpaceSeq *sseq = ptr->data;
2266 
2267  GSet *file_list = BLI_gset_new(BLI_ghashutil_strhash_p, BLI_ghashutil_strcmp, "file list");
2268  wmJob *wm_job = ED_seq_proxy_wm_job_get(C);
2269  ProxyJob *pj = ED_seq_proxy_job_get(C, wm_job);
2270 
2271  LISTBASE_FOREACH (Sequence *, seq, seqbase) {
2272  if (seq->type != SEQ_TYPE_MOVIE || seq->strip == NULL || seq->strip->proxy == NULL) {
2273  continue;
2274  }
2275 
2276  /* Add new proxy size. */
2277  seq->strip->proxy->build_size_flags |= SEQ_rendersize_to_proxysize(sseq->render_size);
2278 
2279  /* Build proxy. */
2280  SEQ_proxy_rebuild_context(pj->main, pj->depsgraph, pj->scene, seq, file_list, &pj->queue);
2281  }
2282 
2283  BLI_gset_free(file_list, MEM_freeN);
2284 
2285  if (!WM_jobs_is_running(wm_job)) {
2286  G.is_break = false;
2287  WM_jobs_start(CTX_wm_manager(C), wm_job);
2288  }
2289 
2291 }
2292 
2293 static void rna_SequenceEditor_render_size_update(bContext *C, PointerRNA *ptr)
2294 {
2295  seq_build_proxy(C, ptr);
2296  rna_SequenceEditor_update_cache(CTX_data_main(C), CTX_data_scene(C), ptr);
2297 }
2298 
2299 static void rna_Sequencer_view_type_update(Main *UNUSED(bmain),
2300  Scene *UNUSED(scene),
2301  PointerRNA *ptr)
2302 {
2303  ScrArea *area = rna_area_from_space(ptr);
2305 }
2306 
2307 /* Space Node Editor */
2308 
2309 static void rna_SpaceNodeEditor_node_tree_set(PointerRNA *ptr,
2310  const PointerRNA value,
2311  struct ReportList *UNUSED(reports))
2312 {
2313  SpaceNode *snode = (SpaceNode *)ptr->data;
2314  ED_node_tree_start(snode, (bNodeTree *)value.data, NULL, NULL);
2315 }
2316 
2317 static bool rna_SpaceNodeEditor_node_tree_poll(PointerRNA *ptr, const PointerRNA value)
2318 {
2319  SpaceNode *snode = (SpaceNode *)ptr->data;
2320  bNodeTree *ntree = (bNodeTree *)value.data;
2321 
2322  /* node tree type must match the selected type in node editor */
2323  return (STREQ(snode->tree_idname, ntree->idname));
2324 }
2325 
2326 static void rna_SpaceNodeEditor_node_tree_update(const bContext *C, PointerRNA *UNUSED(ptr))
2327 {
2329 }
2330 
2331 static int rna_SpaceNodeEditor_tree_type_get(PointerRNA *ptr)
2332 {
2333  SpaceNode *snode = (SpaceNode *)ptr->data;
2335 }
2336 static void rna_SpaceNodeEditor_tree_type_set(PointerRNA *ptr, int value)
2337 {
2338  SpaceNode *snode = (SpaceNode *)ptr->data;
2340 }
2341 static bool rna_SpaceNodeEditor_tree_type_poll(void *Cv, bNodeTreeType *type)
2342 {
2343  bContext *C = (bContext *)Cv;
2344  if (type->poll) {
2345  return type->poll(C, type);
2346  }
2347  else {
2348  return true;
2349  }
2350 }
2351 
2352 static void rna_SpaceNodeEditor_cursor_location_get(PointerRNA *ptr, float value[2])
2353 {
2354  const SpaceNode *snode = (SpaceNode *)ptr->data;
2355 
2356  ED_node_cursor_location_get(snode, value);
2357 }
2358 
2359 static void rna_SpaceNodeEditor_cursor_location_set(PointerRNA *ptr, const float value[2])
2360 {
2361  SpaceNode *snode = (SpaceNode *)ptr->data;
2362 
2363  ED_node_cursor_location_set(snode, value);
2364 }
2365 
2367 {
2368  return rna_node_tree_type_itemf(C, rna_SpaceNodeEditor_tree_type_poll, r_free);
2369 }
2370 
2371 static const EnumPropertyItem *rna_SpaceNodeEditor_tree_type_itemf(bContext *C,
2372  PointerRNA *UNUSED(ptr),
2373  PropertyRNA *UNUSED(prop),
2374  bool *r_free)
2375 {
2376  return RNA_enum_node_tree_types_itemf_impl(C, r_free);
2377 }
2378 
2379 static void rna_SpaceNodeEditor_path_get(PointerRNA *ptr, char *value)
2380 {
2381  SpaceNode *snode = ptr->data;
2382  ED_node_tree_path_get(snode, value);
2383 }
2384 
2385 static int rna_SpaceNodeEditor_path_length(PointerRNA *ptr)
2386 {
2387  SpaceNode *snode = ptr->data;
2388  return ED_node_tree_path_length(snode);
2389 }
2390 
2391 static void rna_SpaceNodeEditor_path_clear(SpaceNode *snode, bContext *C)
2392 {
2393  ED_node_tree_start(snode, NULL, NULL, NULL);
2395 }
2396 
2397 static void rna_SpaceNodeEditor_path_start(SpaceNode *snode, bContext *C, PointerRNA *node_tree)
2398 {
2401 }
2402 
2403 static void rna_SpaceNodeEditor_path_append(SpaceNode *snode,
2404  bContext *C,
2406  PointerRNA *node)
2407 {
2408  ED_node_tree_push(snode, node_tree->data, node->data);
2410 }
2411 
2412 static void rna_SpaceNodeEditor_path_pop(SpaceNode *snode, bContext *C)
2413 {
2414  ED_node_tree_pop(snode);
2416 }
2417 
2418 static void rna_SpaceNodeEditor_show_backdrop_update(Main *UNUSED(bmain),
2419  Scene *UNUSED(scene),
2420  PointerRNA *UNUSED(ptr))
2421 {
2424 }
2425 
2426 static void rna_SpaceNodeEditor_cursor_location_from_region(SpaceNode *snode,
2427  bContext *C,
2428  int x,
2429  int y)
2430 {
2431  ARegion *region = CTX_wm_region(C);
2432 
2433  float cursor_location[2];
2434 
2435  UI_view2d_region_to_view(&region->v2d, x, y, &cursor_location[0], &cursor_location[1]);
2436  cursor_location[0] /= UI_DPI_FAC;
2437  cursor_location[1] /= UI_DPI_FAC;
2438 
2439  ED_node_cursor_location_set(snode, cursor_location);
2440 }
2441 
2442 static void rna_SpaceClipEditor_clip_set(PointerRNA *ptr,
2443  PointerRNA value,
2444  struct ReportList *UNUSED(reports))
2445 {
2446  SpaceClip *sc = (SpaceClip *)(ptr->data);
2447  bScreen *screen = (bScreen *)ptr->owner_id;
2448 
2449  ED_space_clip_set_clip(NULL, screen, sc, (MovieClip *)value.data);
2450 }
2451 
2452 static void rna_SpaceClipEditor_mask_set(PointerRNA *ptr,
2453  PointerRNA value,
2454  struct ReportList *UNUSED(reports))
2455 {
2456  SpaceClip *sc = (SpaceClip *)(ptr->data);
2457 
2458  ED_space_clip_set_mask(NULL, sc, (Mask *)value.data);
2459 }
2460 
2461 static void rna_SpaceClipEditor_clip_mode_update(Main *UNUSED(bmain),
2462  Scene *UNUSED(scene),
2463  PointerRNA *ptr)
2464 {
2465  SpaceClip *sc = (SpaceClip *)(ptr->data);
2466 
2467  if (sc->mode == SC_MODE_MASKEDIT && sc->view != SC_VIEW_CLIP) {
2468  /* Make sure we are in the right view for mask editing */
2469  sc->view = SC_VIEW_CLIP;
2470  ScrArea *area = rna_area_from_space(ptr);
2472  }
2473 
2474  sc->scopes.ok = 0;
2475 }
2476 
2477 static void rna_SpaceClipEditor_lock_selection_update(Main *UNUSED(bmain),
2478  Scene *UNUSED(scene),
2479  PointerRNA *ptr)
2480 {
2481  SpaceClip *sc = (SpaceClip *)(ptr->data);
2482 
2483  sc->xlockof = 0.0f;
2484  sc->ylockof = 0.0f;
2485 }
2486 
2487 static void rna_SpaceClipEditor_view_type_update(Main *UNUSED(bmain),
2488  Scene *UNUSED(scene),
2489  PointerRNA *ptr)
2490 {
2491  ScrArea *area = rna_area_from_space(ptr);
2493 }
2494 
2495 /* File browser. */
2496 
2497 static char *rna_FileSelectParams_path(PointerRNA *UNUSED(ptr))
2498 {
2499  return BLI_strdup("params");
2500 }
2501 
2502 int rna_FileSelectParams_filename_editable(struct PointerRNA *ptr, const char **r_info)
2503 {
2505 
2506  if (params && (params->flag & FILE_DIRSEL_ONLY)) {
2507  *r_info = "Only directories can be chosen for the current operation.";
2508  return 0;
2509  }
2510 
2511  return params ? PROP_EDITABLE : 0;
2512 }
2513 
2514 static bool rna_FileSelectParams_use_lib_get(PointerRNA *ptr)
2515 {
2517 
2518  return params && (params->type == FILE_LOADLIB);
2519 }
2520 
2521 static const EnumPropertyItem *rna_FileSelectParams_recursion_level_itemf(
2522  bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), bool *r_free)
2523 {
2525 
2526  if (params && params->type != FILE_LOADLIB) {
2527  EnumPropertyItem *item = NULL;
2528  int totitem = 0;
2529 
2534 
2535  RNA_enum_item_end(&item, &totitem);
2536  *r_free = true;
2537 
2538  return item;
2539  }
2540 
2541  *r_free = false;
2543 }
2544 
2545 static void rna_FileSelectPrams_filter_glob_set(PointerRNA *ptr, const char *value)
2546 {
2548 
2549  BLI_strncpy(params->filter_glob, value, sizeof(params->filter_glob));
2550 
2551  /* Remove stupid things like last group being a wildcard-only one. */
2553 }
2554 
2555 static PointerRNA rna_FileSelectParams_filter_id_get(PointerRNA *ptr)
2556 {
2557  return rna_pointer_inherit_refine(ptr, &RNA_FileSelectIDFilter, ptr->data);
2558 }
2559 
2560 static int rna_FileAssetSelectParams_asset_library_get(PointerRNA *ptr)
2561 {
2563  /* Just an extra sanity check to ensure this isn't somehow called for RNA_FileSelectParams. */
2565 
2566  /* Simple case: Predefined repo, just set the value. */
2567  if (params->asset_library.type < FILE_ASSET_LIBRARY_CUSTOM) {
2568  return params->asset_library.type;
2569  }
2570 
2571  /* Note that the path isn't checked for validity here. If an invalid library path is used, the
2572  * Asset Browser can give a nice hint on what's wrong. */
2574  &U, params->asset_library.custom_library_index);
2575  if (user_library) {
2576  return FILE_ASSET_LIBRARY_CUSTOM + params->asset_library.custom_library_index;
2577  }
2578 
2579  BLI_assert(0);
2580  return FILE_ASSET_LIBRARY_LOCAL;
2581 }
2582 
2583 static void rna_FileAssetSelectParams_asset_library_set(PointerRNA *ptr, int value)
2584 {
2586 
2587  /* Simple case: Predefined repo, just set the value. */
2588  if (value < FILE_ASSET_LIBRARY_CUSTOM) {
2589  params->asset_library.type = value;
2590  params->asset_library.custom_library_index = -1;
2592  return;
2593  }
2594 
2596  &U, value - FILE_ASSET_LIBRARY_CUSTOM);
2597 
2598  /* Note that the path isn't checked for validity here. If an invalid library path is used, the
2599  * Asset Browser can give a nice hint on what's wrong. */
2600  const bool is_valid = (user_library->name[0] && user_library->path[0]);
2601  if (!user_library) {
2602  params->asset_library.type = FILE_ASSET_LIBRARY_LOCAL;
2603  params->asset_library.custom_library_index = -1;
2604  }
2605  else if (user_library && is_valid) {
2606  params->asset_library.custom_library_index = value - FILE_ASSET_LIBRARY_CUSTOM;
2607  params->asset_library.type = FILE_ASSET_LIBRARY_CUSTOM;
2608  }
2609 }
2610 
2611 static const EnumPropertyItem *rna_FileAssetSelectParams_asset_library_itemf(
2612  bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), bool *r_free)
2613 {
2614  const EnumPropertyItem predefined_items[] = {
2615  /* For the future. */
2616  // {FILE_ASSET_REPO_BUNDLED, "BUNDLED", 0, "Bundled", "Show the default user assets"},
2618  "LOCAL",
2619  ICON_BLENDER,
2620  "Current File",
2621  "Show the assets currently available in this Blender session"},
2622  {0, NULL, 0, NULL, NULL},
2623  };
2624 
2625  EnumPropertyItem *item = NULL;
2626  int totitem = 0;
2627 
2628  /* Add separator if needed. */
2629  if (!BLI_listbase_is_empty(&U.asset_libraries)) {
2630  const EnumPropertyItem sepr = {0, "", 0, "Custom", NULL};
2631  RNA_enum_item_add(&item, &totitem, &sepr);
2632  }
2633 
2634  int i = 0;
2635  for (bUserAssetLibrary *user_library = U.asset_libraries.first; user_library;
2636  user_library = user_library->next, i++) {
2637  /* Note that the path itself isn't checked for validity here. If an invalid library path is
2638  * used, the Asset Browser can give a nice hint on what's wrong. */
2639  const bool is_valid = (user_library->name[0] && user_library->path[0]);
2640  if (!is_valid) {
2641  continue;
2642  }
2643 
2644  /* Use library path as description, it's a nice hint for users. */
2646  user_library->name,
2647  ICON_NONE,
2648  user_library->name,
2649  user_library->path};
2650  RNA_enum_item_add(&item, &totitem, &tmp);
2651  }
2652 
2653  if (totitem) {
2654  const EnumPropertyItem sepr = {0, "", 0, "Built-in", NULL};
2655  RNA_enum_item_add(&item, &totitem, &sepr);
2656  }
2657 
2658  /* Add predefined items. */
2659  RNA_enum_items_add(&item, &totitem, predefined_items);
2660 
2661  RNA_enum_item_end(&item, &totitem);
2662  *r_free = true;
2663  return item;
2664 }
2665 
2666 static void rna_FileAssetSelectParams_asset_category_set(PointerRNA *ptr, uint64_t value)
2667 {
2669  params->filter_id = value;
2670 }
2671 
2672 static uint64_t rna_FileAssetSelectParams_asset_category_get(PointerRNA *ptr)
2673 {
2675  return params->filter_id;
2676 }
2677 
2678 static void rna_FileBrowser_FileSelectEntry_name_get(PointerRNA *ptr, char *value)
2679 {
2680  const FileDirEntry *entry = ptr->data;
2681  strcpy(value, entry->name);
2682 }
2683 
2684 static int rna_FileBrowser_FileSelectEntry_name_length(PointerRNA *ptr)
2685 {
2686  const FileDirEntry *entry = ptr->data;
2687  return (int)strlen(entry->name);
2688 }
2689 
2690 static int rna_FileBrowser_FileSelectEntry_preview_icon_id_get(PointerRNA *ptr)
2691 {
2692  const FileDirEntry *entry = ptr->data;
2693  return ED_file_icon(entry);
2694 }
2695 
2696 static PointerRNA rna_FileBrowser_FileSelectEntry_asset_data_get(PointerRNA *ptr)
2697 {
2698  const FileDirEntry *entry = ptr->data;
2700 }
2701 
2702 static StructRNA *rna_FileBrowser_params_typef(PointerRNA *ptr)
2703 {
2704  SpaceFile *sfile = ptr->data;
2706 
2707  if (params == ED_fileselect_get_file_params(sfile)) {
2708  return &RNA_FileSelectParams;
2709  }
2710  if (params == (void *)ED_fileselect_get_asset_params(sfile)) {
2711  return &RNA_FileAssetSelectParams;
2712  }
2713 
2714  BLI_assert(!"Could not identify file select parameters");
2715  return NULL;
2716 }
2717 
2718 static PointerRNA rna_FileBrowser_params_get(PointerRNA *ptr)
2719 {
2720  SpaceFile *sfile = ptr->data;
2722  StructRNA *params_struct = rna_FileBrowser_params_typef(ptr);
2723 
2724  if (params && params_struct) {
2725  return rna_pointer_inherit_refine(ptr, params_struct, params);
2726  }
2727 
2729 }
2730 
2731 static void rna_FileBrowser_FSMenuEntry_path_get(PointerRNA *ptr, char *value)
2732 {
2733  char *path = ED_fsmenu_entry_get_path(ptr->data);
2734 
2735  strcpy(value, path ? path : "");
2736 }
2737 
2738 static int rna_FileBrowser_FSMenuEntry_path_length(PointerRNA *ptr)
2739 {
2740  char *path = ED_fsmenu_entry_get_path(ptr->data);
2741 
2742  return (int)(path ? strlen(path) : 0);
2743 }
2744 
2745 static void rna_FileBrowser_FSMenuEntry_path_set(PointerRNA *ptr, const char *value)
2746 {
2747  FSMenuEntry *fsm = ptr->data;
2748 
2749  /* Note: this will write to file immediately.
2750  * Not nice (and to be fixed ultimately), but acceptable in this case for now. */
2751  ED_fsmenu_entry_set_path(fsm, value);
2752 }
2753 
2754 static void rna_FileBrowser_FSMenuEntry_name_get(PointerRNA *ptr, char *value)
2755 {
2756  strcpy(value, ED_fsmenu_entry_get_name(ptr->data));
2757 }
2758 
2759 static int rna_FileBrowser_FSMenuEntry_name_length(PointerRNA *ptr)
2760 {
2761  return (int)strlen(ED_fsmenu_entry_get_name(ptr->data));
2762 }
2763 
2764 static void rna_FileBrowser_FSMenuEntry_name_set(PointerRNA *ptr, const char *value)
2765 {
2766  FSMenuEntry *fsm = ptr->data;
2767 
2768  /* Note: this will write to file immediately.
2769  * Not nice (and to be fixed ultimately), but acceptable in this case for now. */
2770  ED_fsmenu_entry_set_name(fsm, value);
2771 }
2772 
2773 static int rna_FileBrowser_FSMenuEntry_name_get_editable(PointerRNA *ptr,
2774  const char **UNUSED(r_info))
2775 {
2776  FSMenuEntry *fsm = ptr->data;
2777 
2778  return fsm->save ? PROP_EDITABLE : 0;
2779 }
2780 
2781 static int rna_FileBrowser_FSMenuEntry_icon_get(PointerRNA *ptr)
2782 {
2783  FSMenuEntry *fsm = ptr->data;
2784  return ED_fsmenu_entry_get_icon(fsm);
2785 }
2786 
2787 static void rna_FileBrowser_FSMenuEntry_icon_set(PointerRNA *ptr, int value)
2788 {
2789  FSMenuEntry *fsm = ptr->data;
2790  ED_fsmenu_entry_set_icon(fsm, value);
2791 }
2792 
2793 static bool rna_FileBrowser_FSMenuEntry_use_save_get(PointerRNA *ptr)
2794 {
2795  FSMenuEntry *fsm = ptr->data;
2796  return fsm->save;
2797 }
2798 
2799 static bool rna_FileBrowser_FSMenuEntry_is_valid_get(PointerRNA *ptr)
2800 {
2801  FSMenuEntry *fsm = ptr->data;
2802  return fsm->valid;
2803 }
2804 
2805 static void rna_FileBrowser_FSMenu_next(CollectionPropertyIterator *iter)
2806 {
2807  ListBaseIterator *internal = &iter->internal.listbase;
2808 
2809  if (internal->skip) {
2810  do {
2811  internal->link = (Link *)(((FSMenuEntry *)(internal->link))->next);
2812  iter->valid = (internal->link != NULL);
2813  } while (iter->valid && internal->skip(iter, internal->link));
2814  }
2815  else {
2816  internal->link = (Link *)(((FSMenuEntry *)(internal->link))->next);
2817  iter->valid = (internal->link != NULL);
2818  }
2819 }
2820 
2821 static void rna_FileBrowser_FSMenu_begin(CollectionPropertyIterator *iter, FSMenuCategory category)
2822 {
2823  ListBaseIterator *internal = &iter->internal.listbase;
2824 
2825  struct FSMenu *fsmenu = ED_fsmenu_get();
2826  struct FSMenuEntry *fsmentry = ED_fsmenu_get_category(fsmenu, category);
2827 
2828  internal->link = (fsmentry) ? (Link *)fsmentry : NULL;
2829  internal->skip = NULL;
2830 
2831  iter->valid = (internal->link != NULL);
2832 }
2833 
2834 static PointerRNA rna_FileBrowser_FSMenu_get(CollectionPropertyIterator *iter)
2835 {
2836  ListBaseIterator *internal = &iter->internal.listbase;
2837  PointerRNA r_ptr;
2838 
2839  RNA_pointer_create(NULL, &RNA_FileBrowserFSMenuEntry, internal->link, &r_ptr);
2840 
2841  return r_ptr;
2842 }
2843 
2844 static void rna_FileBrowser_FSMenu_end(CollectionPropertyIterator *UNUSED(iter))
2845 {
2846 }
2847 
2848 static void rna_FileBrowser_FSMenuSystem_data_begin(CollectionPropertyIterator *iter,
2849  PointerRNA *UNUSED(ptr))
2850 {
2851  rna_FileBrowser_FSMenu_begin(iter, FS_CATEGORY_SYSTEM);
2852 }
2853 
2854 static int rna_FileBrowser_FSMenuSystem_data_length(PointerRNA *UNUSED(ptr))
2855 {
2856  struct FSMenu *fsmenu = ED_fsmenu_get();
2857 
2859 }
2860 
2861 static void rna_FileBrowser_FSMenuSystemBookmark_data_begin(CollectionPropertyIterator *iter,
2862  PointerRNA *UNUSED(ptr))
2863 {
2864  rna_FileBrowser_FSMenu_begin(iter, FS_CATEGORY_SYSTEM_BOOKMARKS);
2865 }
2866 
2867 static int rna_FileBrowser_FSMenuSystemBookmark_data_length(PointerRNA *UNUSED(ptr))
2868 {
2869  struct FSMenu *fsmenu = ED_fsmenu_get();
2870 
2872 }
2873 
2874 static void rna_FileBrowser_FSMenuBookmark_data_begin(CollectionPropertyIterator *iter,
2875  PointerRNA *UNUSED(ptr))
2876 {
2877  rna_FileBrowser_FSMenu_begin(iter, FS_CATEGORY_BOOKMARKS);
2878 }
2879 
2880 static int rna_FileBrowser_FSMenuBookmark_data_length(PointerRNA *UNUSED(ptr))
2881 {
2882  struct FSMenu *fsmenu = ED_fsmenu_get();
2883 
2885 }
2886 
2887 static void rna_FileBrowser_FSMenuRecent_data_begin(CollectionPropertyIterator *iter,
2888  PointerRNA *UNUSED(ptr))
2889 {
2890  rna_FileBrowser_FSMenu_begin(iter, FS_CATEGORY_RECENT);
2891 }
2892 
2893 static int rna_FileBrowser_FSMenuRecent_data_length(PointerRNA *UNUSED(ptr))
2894 {
2895  struct FSMenu *fsmenu = ED_fsmenu_get();
2896 
2898 }
2899 
2900 static int rna_FileBrowser_FSMenu_active_get(PointerRNA *ptr, const FSMenuCategory category)
2901 {
2902  SpaceFile *sf = ptr->data;
2903  int actnr = -1;
2904 
2905  switch (category) {
2906  case FS_CATEGORY_SYSTEM:
2907  actnr = sf->systemnr;
2908  break;
2910  actnr = sf->system_bookmarknr;
2911  break;
2912  case FS_CATEGORY_BOOKMARKS:
2913  actnr = sf->bookmarknr;
2914  break;
2915  case FS_CATEGORY_RECENT:
2916  actnr = sf->recentnr;
2917  break;
2918  case FS_CATEGORY_OTHER:
2919  /* pass. */
2920  break;
2921  }
2922 
2923  return actnr;
2924 }
2925 
2926 static void rna_FileBrowser_FSMenu_active_set(PointerRNA *ptr,
2927  int value,
2928  const FSMenuCategory category)
2929 {
2930  SpaceFile *sf = ptr->data;
2931  struct FSMenu *fsmenu = ED_fsmenu_get();
2932  FSMenuEntry *fsm = ED_fsmenu_get_entry(fsmenu, category, value);
2933 
2934  if (fsm && sf->params) {
2935  switch (category) {
2936  case FS_CATEGORY_SYSTEM:
2937  sf->systemnr = value;
2938  break;
2940  sf->system_bookmarknr = value;
2941  break;
2942  case FS_CATEGORY_BOOKMARKS:
2943  sf->bookmarknr = value;
2944  break;
2945  case FS_CATEGORY_RECENT:
2946  sf->recentnr = value;
2947  break;
2948  case FS_CATEGORY_OTHER:
2949  /* pass. */
2950  break;
2951  }
2952 
2953  BLI_strncpy(sf->params->dir, fsm->path, sizeof(sf->params->dir));
2954  }
2955 }
2956 
2957 static void rna_FileBrowser_FSMenu_active_range(PointerRNA *UNUSED(ptr),
2958  int *min,
2959  int *max,
2960  int *softmin,
2961  int *softmax,
2962  const FSMenuCategory category)
2963 {
2964  struct FSMenu *fsmenu = ED_fsmenu_get();
2965 
2966  *min = *softmin = -1;
2967  *max = *softmax = ED_fsmenu_get_nentries(fsmenu, category) - 1;
2968 }
2969 
2970 static void rna_FileBrowser_FSMenu_active_update(struct bContext *C, PointerRNA *ptr)
2971 {
2972  ScrArea *area = rna_area_from_space(ptr);
2974 }
2975 
2976 static int rna_FileBrowser_FSMenuSystem_active_get(PointerRNA *ptr)
2977 {
2978  return rna_FileBrowser_FSMenu_active_get(ptr, FS_CATEGORY_SYSTEM);
2979 }
2980 
2981 static void rna_FileBrowser_FSMenuSystem_active_set(PointerRNA *ptr, int value)
2982 {
2983  rna_FileBrowser_FSMenu_active_set(ptr, value, FS_CATEGORY_SYSTEM);
2984 }
2985 
2986 static void rna_FileBrowser_FSMenuSystem_active_range(
2987  PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
2988 {
2989  rna_FileBrowser_FSMenu_active_range(ptr, min, max, softmin, softmax, FS_CATEGORY_SYSTEM);
2990 }
2991 
2992 static int rna_FileBrowser_FSMenuSystemBookmark_active_get(PointerRNA *ptr)
2993 {
2994  return rna_FileBrowser_FSMenu_active_get(ptr, FS_CATEGORY_SYSTEM_BOOKMARKS);
2995 }
2996 
2997 static void rna_FileBrowser_FSMenuSystemBookmark_active_set(PointerRNA *ptr, int value)
2998 {
2999  rna_FileBrowser_FSMenu_active_set(ptr, value, FS_CATEGORY_SYSTEM_BOOKMARKS);
3000 }
3001 
3002 static void rna_FileBrowser_FSMenuSystemBookmark_active_range(
3003  PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
3004 {
3005  rna_FileBrowser_FSMenu_active_range(
3006  ptr, min, max, softmin, softmax, FS_CATEGORY_SYSTEM_BOOKMARKS);
3007 }
3008 
3009 static int rna_FileBrowser_FSMenuBookmark_active_get(PointerRNA *ptr)
3010 {
3011  return rna_FileBrowser_FSMenu_active_get(ptr, FS_CATEGORY_BOOKMARKS);
3012 }
3013 
3014 static void rna_FileBrowser_FSMenuBookmark_active_set(PointerRNA *ptr, int value)
3015 {
3016  rna_FileBrowser_FSMenu_active_set(ptr, value, FS_CATEGORY_BOOKMARKS);
3017 }
3018 
3019 static void rna_FileBrowser_FSMenuBookmark_active_range(
3020  PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
3021 {
3022  rna_FileBrowser_FSMenu_active_range(ptr, min, max, softmin, softmax, FS_CATEGORY_BOOKMARKS);
3023 }
3024 
3025 static int rna_FileBrowser_FSMenuRecent_active_get(PointerRNA *ptr)
3026 {
3027  return rna_FileBrowser_FSMenu_active_get(ptr, FS_CATEGORY_RECENT);
3028 }
3029 
3030 static void rna_FileBrowser_FSMenuRecent_active_set(PointerRNA *ptr, int value)
3031 {
3032  rna_FileBrowser_FSMenu_active_set(ptr, value, FS_CATEGORY_RECENT);
3033 }
3034 
3035 static void rna_FileBrowser_FSMenuRecent_active_range(
3036  PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
3037 {
3038  rna_FileBrowser_FSMenu_active_range(ptr, min, max, softmin, softmax, FS_CATEGORY_RECENT);
3039 }
3040 
3041 static void rna_SpaceFileBrowser_browse_mode_update(Main *UNUSED(bmain),
3042  Scene *UNUSED(scene),
3043  PointerRNA *ptr)
3044 {
3045  ScrArea *area = rna_area_from_space(ptr);
3047 }
3048 
3049 static void rna_SpaceSpreadsheet_geometry_component_type_update(Main *UNUSED(bmain),
3050  Scene *UNUSED(scene),
3051  PointerRNA *ptr)
3052 {
3053  SpaceSpreadsheet *sspreadsheet = (SpaceSpreadsheet *)ptr->data;
3055  sspreadsheet->attribute_domain = ATTR_DOMAIN_POINT;
3056  }
3057 }
3058 
3059 const EnumPropertyItem *rna_SpaceSpreadsheet_attribute_domain_itemf(bContext *UNUSED(C),
3060  PointerRNA *ptr,
3061  PropertyRNA *UNUSED(prop),
3062  bool *r_free)
3063 {
3064  SpaceSpreadsheet *sspreadsheet = (SpaceSpreadsheet *)ptr->data;
3065  GeometryComponentType component_type = sspreadsheet->geometry_component_type;
3067  ID *used_id = ED_spreadsheet_get_current_id(sspreadsheet);
3068  if (used_id != NULL) {
3069  if (GS(used_id->name) == ID_OB) {
3070  Object *used_object = (Object *)used_id;
3071  if (used_object->type == OB_POINTCLOUD) {
3072  component_type = GEO_COMPONENT_TYPE_POINT_CLOUD;
3073  }
3074  else {
3075  component_type = GEO_COMPONENT_TYPE_MESH;
3076  }
3077  }
3078  }
3079  }
3080 
3081  static EnumPropertyItem mesh_vertex_domain_item = {
3082  ATTR_DOMAIN_POINT, "POINT", 0, "Vertex", "Attribute per point/vertex"};
3083 
3084  EnumPropertyItem *item_array = NULL;
3085  int items_len = 0;
3086  for (const EnumPropertyItem *item = rna_enum_attribute_domain_items; item->identifier != NULL;
3087  item++) {
3088  if (component_type == GEO_COMPONENT_TYPE_MESH) {
3089  if (!ELEM(item->value,
3093  ATTR_DOMAIN_FACE)) {
3094  continue;
3095  }
3096  }
3097  if (component_type == GEO_COMPONENT_TYPE_POINT_CLOUD) {
3098  if (item->value != ATTR_DOMAIN_POINT) {
3099  continue;
3100  }
3101  }
3102  if (item->value == ATTR_DOMAIN_POINT && component_type == GEO_COMPONENT_TYPE_MESH) {
3103  RNA_enum_item_add(&item_array, &items_len, &mesh_vertex_domain_item);
3104  }
3105  else {
3106  RNA_enum_item_add(&item_array, &items_len, item);
3107  }
3108  }
3109  RNA_enum_item_end(&item_array, &items_len);
3110 
3111  *r_free = true;
3112  return item_array;
3113 }
3114 
3115 static SpreadsheetContext *rna_SpaceSpreadsheet_context_path_append(SpaceSpreadsheet *sspreadsheet,
3116  int type)
3117 {
3119  BLI_addtail(&sspreadsheet->context_path, context);
3122  return context;
3123 }
3124 
3125 static void rna_SpaceSpreadsheet_context_path_clear(SpaceSpreadsheet *sspreadsheet)
3126 {
3127  ED_spreadsheet_context_path_clear(sspreadsheet);
3130 }
3131 
3132 static StructRNA *rna_spreadsheet_context_refine(PointerRNA *ptr)
3133 {
3135  switch (context->type) {
3142  }
3144  return NULL;
3145 }
3146 
3147 static void rna_spreadsheet_context_update(Main *UNUSED(bmain),
3148  Scene *UNUSED(scene),
3149  PointerRNA *ptr)
3150 {
3151  bScreen *screen = (bScreen *)ptr->owner_id;
3152  LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
3153  SpaceLink *sl = area->spacedata.first;
3154  if (sl->spacetype == SPACE_SPREADSHEET) {
3155  SpaceSpreadsheet *sspreadsheet = (SpaceSpreadsheet *)sl;
3157  }
3158  }
3159 }
3160 
3161 static void rna_spreadsheet_set_geometry_node_context(SpaceSpreadsheet *sspreadsheet,
3162  SpaceNode *snode,
3163  bNode *node)
3164 {
3165  ED_spreadsheet_set_geometry_node_context(sspreadsheet, snode, node);
3168 }
3169 
3170 #else
3171 
3172 static const EnumPropertyItem dt_uv_items[] = {
3173  {SI_UVDT_OUTLINE, "OUTLINE", 0, "Outline", "Display white edges with black outline"},
3174  {SI_UVDT_DASH, "DASH", 0, "Dash", "Display dashed black-white edges"},
3175  {SI_UVDT_BLACK, "BLACK", 0, "Black", "Display black edges"},
3176  {SI_UVDT_WHITE, "WHITE", 0, "White", "Display white edges"},
3177  {0, NULL, 0, NULL, NULL},
3178 };
3179 
3180 static void rna_def_space_generic_show_region_toggles(StructRNA *srna, int region_type_mask)
3181 {
3182  PropertyRNA *prop;
3183 
3184 # define DEF_SHOW_REGION_PROPERTY(identifier, label, description) \
3185  { \
3186  prop = RNA_def_property(srna, STRINGIFY(identifier), PROP_BOOLEAN, PROP_NONE); \
3187  RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); \
3188  RNA_def_property_boolean_funcs(prop, \
3189  STRINGIFY(rna_Space_##identifier##_get), \
3190  STRINGIFY(rna_Space_##identifier##_set)); \
3191  RNA_def_property_ui_text(prop, label, description); \
3192  RNA_def_property_update(prop, 0, STRINGIFY(rna_Space_##identifier##_update)); \
3193  } \
3194  ((void)0)
3195 
3196  if (region_type_mask & (1 << RGN_TYPE_TOOL_HEADER)) {
3197  region_type_mask &= ~(1 << RGN_TYPE_TOOL_HEADER);
3198  DEF_SHOW_REGION_PROPERTY(show_region_tool_header, "Tool Settings", "");
3199  }
3200  if (region_type_mask & (1 << RGN_TYPE_HEADER)) {
3201  region_type_mask &= ~(1 << RGN_TYPE_HEADER);
3202  DEF_SHOW_REGION_PROPERTY(show_region_header, "Header", "");
3203  }
3204  if (region_type_mask & (1 << RGN_TYPE_FOOTER)) {
3205  region_type_mask &= ~(1 << RGN_TYPE_FOOTER);
3206  DEF_SHOW_REGION_PROPERTY(show_region_footer, "Footer", "");
3207  }
3208  if (region_type_mask & (1 << RGN_TYPE_TOOLS)) {
3209  region_type_mask &= ~(1 << RGN_TYPE_TOOLS);
3210  DEF_SHOW_REGION_PROPERTY(show_region_toolbar, "Toolbar", "");
3211  }
3212  if (region_type_mask & (1 << RGN_TYPE_UI)) {
3213  region_type_mask &= ~(1 << RGN_TYPE_UI);
3214  DEF_SHOW_REGION_PROPERTY(show_region_ui, "Sidebar", "");
3215  }
3216  if (region_type_mask & (1 << RGN_TYPE_HUD)) {
3217  region_type_mask &= ~(1 << RGN_TYPE_HUD);
3218  DEF_SHOW_REGION_PROPERTY(show_region_hud, "Adjust Last Operation", "");
3219  }
3220  BLI_assert(region_type_mask == 0);
3221 }
3222 
3223 static void rna_def_space(BlenderRNA *brna)
3224 {
3225  StructRNA *srna;
3226  PropertyRNA *prop;
3227 
3228  srna = RNA_def_struct(brna, "Space", NULL);
3229  RNA_def_struct_sdna(srna, "SpaceLink");
3230  RNA_def_struct_ui_text(srna, "Space", "Space data for a screen area");
3231  RNA_def_struct_refine_func(srna, "rna_Space_refine");
3232 
3233  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
3234  RNA_def_property_enum_sdna(prop, NULL, "spacetype");
3236  /* When making this editable, take care for the special case of global areas
3237  * (see rna_Area_type_set). */
3239  RNA_def_property_ui_text(prop, "Type", "Space data type");
3240 
3241  /* access to V2D_VIEWSYNC_SCREEN_TIME */
3242  prop = RNA_def_property(srna, "show_locked_time", PROP_BOOLEAN, PROP_NONE);
3243  RNA_def_property_boolean_funcs(prop, "rna_Space_view2d_sync_get", "rna_Space_view2d_sync_set");
3245  "Sync Visible Range",
3246  "Synchronize the visible timeline range with other time-based editors");
3247  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, "rna_Space_view2d_sync_update");
3248 
3250 }
3251 
3252 /* for all spaces that use a mask */
3253 static void rna_def_space_mask_info(StructRNA *srna, int noteflag, const char *mask_set_func)
3254 {
3255  PropertyRNA *prop;
3256 
3257  static const EnumPropertyItem overlay_mode_items[] = {
3259  "ALPHACHANNEL",
3260  ICON_NONE,
3261  "Alpha Channel",
3262  "Show alpha channel of the mask"},
3264  "COMBINED",
3265  ICON_NONE,
3266  "Combined",
3267  "Combine space background image with the mask"},
3268  {0, NULL, 0, NULL, NULL},
3269  };
3270 
3271  prop = RNA_def_property(srna, "mask", PROP_POINTER, PROP_NONE);
3272  RNA_def_property_pointer_sdna(prop, NULL, "mask_info.mask");
3274  RNA_def_property_ui_text(prop, "Mask", "Mask displayed and edited in this space");
3275  RNA_def_property_pointer_funcs(prop, NULL, mask_set_func, NULL, NULL);
3276  RNA_def_property_update(prop, noteflag, NULL);
3277 
3278  /* mask drawing */
3279  prop = RNA_def_property(srna, "mask_display_type", PROP_ENUM, PROP_NONE);
3280  RNA_def_property_enum_sdna(prop, NULL, "mask_info.draw_type");
3282  RNA_def_property_ui_text(prop, "Edge Display Type", "Display type for mask splines");
3283  RNA_def_property_update(prop, noteflag, NULL);
3284 
3285  prop = RNA_def_property(srna, "show_mask_smooth", PROP_BOOLEAN, PROP_NONE);
3286  RNA_def_property_boolean_sdna(prop, NULL, "mask_info.draw_flag", MASK_DRAWFLAG_SMOOTH);
3287  RNA_def_property_ui_text(prop, "Display Smooth Splines", "");
3288  RNA_def_property_update(prop, noteflag, NULL);
3289 
3290  prop = RNA_def_property(srna, "show_mask_overlay", PROP_BOOLEAN, PROP_NONE);
3291  RNA_def_property_boolean_sdna(prop, NULL, "mask_info.draw_flag", MASK_DRAWFLAG_OVERLAY);
3292  RNA_def_property_ui_text(prop, "Show Mask Overlay", "");
3293  RNA_def_property_update(prop, noteflag, NULL);
3294 
3295  prop = RNA_def_property(srna, "mask_overlay_mode", PROP_ENUM, PROP_NONE);
3296  RNA_def_property_enum_sdna(prop, NULL, "mask_info.overlay_mode");
3297  RNA_def_property_enum_items(prop, overlay_mode_items);
3298  RNA_def_property_ui_text(prop, "Overlay Mode", "Overlay mode of rasterized mask");
3299  RNA_def_property_update(prop, noteflag, NULL);
3300 }
3301 
3303 {
3304  StructRNA *srna;
3305  PropertyRNA *prop;
3306 
3307  static const EnumPropertyItem sticky_mode_items[] = {
3309  "DISABLED",
3310  ICON_STICKY_UVS_DISABLE,
3311  "Disabled",
3312  "Sticky vertex selection disabled"},
3313  {SI_STICKY_LOC,
3314  "SHARED_LOCATION",
3315  ICON_STICKY_UVS_LOC,
3316  "Shared Location",
3317  "Select UVs that are at the same location and share a mesh vertex"},
3319  "SHARED_VERTEX",
3320  ICON_STICKY_UVS_VERT,
3321  "Shared Vertex",
3322  "Select UVs that share a mesh vertex, whether or not they are at the same location"},
3323  {0, NULL, 0, NULL, NULL},
3324  };
3325 
3326  static const EnumPropertyItem dt_uvstretch_items[] = {
3327  {SI_UVDT_STRETCH_ANGLE, "ANGLE", 0, "Angle", "Angular distortion between UV and 3D angles"},
3328  {SI_UVDT_STRETCH_AREA, "AREA", 0, "Area", "Area distortion between UV and 3D faces"},
3329  {0, NULL, 0, NULL, NULL},
3330  };
3331 
3332  static const EnumPropertyItem pixel_snap_mode_items[] = {
3333  {SI_PIXEL_SNAP_DISABLED, "DISABLED", 0, "Disabled", "Don't snap to pixels"},
3334  {SI_PIXEL_SNAP_CORNER, "CORNER", 0, "Corner", "Snap to pixel corners"},
3335  {SI_PIXEL_SNAP_CENTER, "CENTER", 0, "Center", "Snap to pixel centers"},
3336  {0, NULL, 0, NULL, NULL},
3337  };
3338 
3339  srna = RNA_def_struct(brna, "SpaceUVEditor", NULL);
3340  RNA_def_struct_sdna(srna, "SpaceImage");
3341  RNA_def_struct_nested(brna, srna, "SpaceImageEditor");
3342  RNA_def_struct_path_func(srna, "rna_SpaceUVEditor_path");
3343  RNA_def_struct_ui_text(srna, "Space UV Editor", "UV editor data for the image editor space");
3344 
3345  /* selection */
3346  prop = RNA_def_property(srna, "sticky_select_mode", PROP_ENUM, PROP_NONE);
3347  RNA_def_property_enum_sdna(prop, NULL, "sticky");
3348  RNA_def_property_enum_items(prop, sticky_mode_items);
3350  prop, "Sticky Selection Mode", "Method for extending UV vertex selection");
3352 
3353  /* drawing */
3354  prop = RNA_def_property(srna, "edge_display_type", PROP_ENUM, PROP_NONE);
3355  RNA_def_property_enum_sdna(prop, NULL, "dt_uv");
3357  RNA_def_property_ui_text(prop, "Display As", "Display style for UV edges");
3359 
3360  prop = RNA_def_property(srna, "show_stretch", PROP_BOOLEAN, PROP_NONE);
3363  prop,
3364  "Display Stretch",
3365  "Display faces colored according to the difference in shape between UVs and "
3366  "their 3D coordinates (blue for low distortion, red for high distortion)");
3368 
3369  prop = RNA_def_property(srna, "display_stretch_type", PROP_ENUM, PROP_NONE);
3370  RNA_def_property_enum_sdna(prop, NULL, "dt_uvstretch");
3371  RNA_def_property_enum_items(prop, dt_uvstretch_items);
3372  RNA_def_property_ui_text(prop, "Display Stretch Type", "Type of stretch to display");
3374 
3375  prop = RNA_def_property(srna, "show_modified_edges", PROP_BOOLEAN, PROP_NONE);
3378  prop, "Display Modified Edges", "Display edges after modifiers are applied");
3380 
3381  prop = RNA_def_property(srna, "show_metadata", PROP_BOOLEAN, PROP_NONE);
3383  RNA_def_property_ui_text(prop, "Show Metadata", "Display metadata properties of the image");
3385 
3386  prop = RNA_def_property(srna, "show_texpaint", PROP_BOOLEAN, PROP_NONE);
3389  prop, "Display Texture Paint UVs", "Display overlay of texture paint uv layer");
3391 
3392  prop = RNA_def_property(srna, "show_pixel_coords", PROP_BOOLEAN, PROP_NONE);
3395  prop, "Pixel Coordinates", "Display UV coordinates in pixels rather than from 0.0 to 1.0");
3397 
3398  prop = RNA_def_property(srna, "show_faces", PROP_BOOLEAN, PROP_NONE);
3400  RNA_def_property_ui_text(prop, "Display Faces", "Display faces over the image");
3402 
3403  prop = RNA_def_property(srna, "tile_grid_shape", PROP_INT, PROP_NONE);
3404  RNA_def_property_int_sdna(prop, NULL, "tile_grid_shape");
3405  RNA_def_property_array(prop, 2);
3407  RNA_def_property_range(prop, 1, 10);
3409  prop, "Tile Grid Shape", "How many tiles will be shown in the background");
3411 
3412  prop = RNA_def_property(srna, "uv_opacity", PROP_FLOAT, PROP_FACTOR);
3413  RNA_def_property_float_sdna(prop, NULL, "uv_opacity");
3414  RNA_def_property_range(prop, 0.0f, 1.0f);
3415  RNA_def_property_ui_text(prop, "UV Opacity", "Opacity of UV overlays");
3417 
3418  /* todo: move edge and face drawing options here from G.f */
3419 
3420  prop = RNA_def_property(srna, "pixel_snap_mode", PROP_ENUM, PROP_NONE);
3421  RNA_def_property_enum_items(prop, pixel_snap_mode_items);
3422  RNA_def_property_ui_text(prop, "Snap to Pixels", "Snap UVs to pixels while editing");
3424 
3425  prop = RNA_def_property(srna, "lock_bounds", PROP_BOOLEAN, PROP_NONE);
3428  "Constrain to Image Bounds",
3429  "Constraint to stay within the image bounds while editing");
3431 
3432  prop = RNA_def_property(srna, "use_live_unwrap", PROP_BOOLEAN, PROP_NONE);
3435  prop,
3436  "Live Unwrap",
3437  "Continuously unwrap the selected UV island while transforming pinned vertices");
3439 }
3440 
3442 {
3443  StructRNA *srna;
3444  PropertyRNA *prop;
3445 
3446  static const EnumPropertyItem display_mode_items[] = {
3447  {SO_SCENES,
3448  "SCENES",
3449  ICON_SCENE_DATA,
3450  "Scenes",
3451  "Display scenes and their view layers, collections and objects"},
3452  {SO_VIEW_LAYER,
3453  "VIEW_LAYER",
3454  ICON_RENDER_RESULT,
3455  "View Layer",
3456  "Display collections and objects in the view layer"},
3457  {SO_SEQUENCE,
3458  "SEQUENCE",
3459  ICON_SEQUENCE,
3460  "Video Sequencer",
3461  "Display data belonging to the Video Sequencer"},
3462  {SO_LIBRARIES,
3463  "LIBRARIES",
3464  ICON_FILE_BLEND,
3465  "Blender File",
3466  "Display data of current file and linked libraries"},
3467  {SO_DATA_API,
3468  "DATA_API",
3469  ICON_RNA,
3470  "Data API",
3471  "Display low level Blender data and its properties"},
3473  "LIBRARY_OVERRIDES",
3474  ICON_LIBRARY_DATA_OVERRIDE,
3475  "Library Overrides",
3476  "Display data-blocks with library overrides and list their overridden properties"},
3477  {SO_ID_ORPHANS,
3478  "ORPHAN_DATA",
3479  ICON_ORPHAN_DATA,
3480  "Orphan Data",
3481  "Display data-blocks which are unused and/or will be lost when the file is reloaded"},
3482  {0, NULL, 0, NULL, NULL},
3483  };
3484 
3485  static const EnumPropertyItem filter_state_items[] = {
3486  {SO_FILTER_OB_ALL, "ALL", 0, "All", "Show all objects in the view layer"},
3487  {SO_FILTER_OB_VISIBLE, "VISIBLE", 0, "Visible", "Show visible objects"},
3488  {SO_FILTER_OB_SELECTED, "SELECTED", 0, "Selected", "Show selected objects"},
3489  {SO_FILTER_OB_ACTIVE, "ACTIVE", 0, "Active", "Show only the active object"},
3490  {SO_FILTER_OB_SELECTABLE, "SELECTABLE", 0, "Selectable", "Show only selectable objects"},
3491  {0, NULL, 0, NULL, NULL},
3492  };
3493 
3494  srna = RNA_def_struct(brna, "SpaceOutliner", "Space");
3495  RNA_def_struct_sdna(srna, "SpaceOutliner");
3496  RNA_def_struct_ui_text(srna, "Space Outliner", "Outliner space data");
3497 
3498  prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
3499  RNA_def_property_enum_sdna(prop, NULL, "outlinevis");
3500  RNA_def_property_enum_items(prop, display_mode_items);
3501  RNA_def_property_ui_text(prop, "Display Mode", "Type of information to display");
3503 
3504  prop = RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE);
3505  RNA_def_property_string_sdna(prop, NULL, "search_string");
3506  RNA_def_property_ui_text(prop, "Display Filter", "Live search filtering string");
3509 
3510  prop = RNA_def_property(srna, "use_filter_case_sensitive", PROP_BOOLEAN, PROP_NONE);
3513  prop, "Case Sensitive Matches Only", "Only use case sensitive matches of search string");
3515 
3516  prop = RNA_def_property(srna, "use_filter_complete", PROP_BOOLEAN, PROP_NONE);
3517  RNA_def_property_boolean_sdna(prop, NULL, "search_flags", SO_FIND_COMPLETE);
3519  prop, "Complete Matches Only", "Only use complete matches of search string");
3521 
3522  prop = RNA_def_property(srna, "use_sort_alpha", PROP_BOOLEAN, PROP_NONE);
3524  RNA_def_property_ui_text(prop, "Sort Alphabetically", "");
3526 
3527  prop = RNA_def_property(srna, "use_sync_select", PROP_BOOLEAN, PROP_NONE);
3530  prop, "Sync Outliner Selection", "Sync outliner selection with other editors");
3532 
3533  prop = RNA_def_property(srna, "show_mode_column", PROP_BOOLEAN, PROP_NONE);
3536  prop, "Show Mode Column", "Show the mode column for mode toggle and activation");
3538 
3539  /* Granular restriction column option. */
3540  prop = RNA_def_property(srna, "show_restrict_column_enable", PROP_BOOLEAN, PROP_NONE);
3541  RNA_def_property_boolean_sdna(prop, NULL, "show_restrict_flags", SO_RESTRICT_ENABLE);
3542  RNA_def_property_ui_text(prop, "Exclude from View Layer", "Exclude from view layer");
3543  RNA_def_property_ui_icon(prop, ICON_CHECKBOX_HLT, 0);
3545 
3546  prop = RNA_def_property(srna, "show_restrict_column_select", PROP_BOOLEAN, PROP_NONE);
3547  RNA_def_property_boolean_sdna(prop, NULL, "show_restrict_flags", SO_RESTRICT_SELECT);
3548  RNA_def_property_ui_text(prop, "Selectable", "Selectable");
3549  RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, 0);
3551 
3552  prop = RNA_def_property(srna, "show_restrict_column_hide", PROP_BOOLEAN, PROP_NONE);
3553  RNA_def_property_boolean_sdna(prop, NULL, "show_restrict_flags", SO_RESTRICT_HIDE);
3554  RNA_def_property_ui_text(prop, "Hide in Viewport", "Temporarily hide in viewport");
3555  RNA_def_property_ui_icon(prop, ICON_HIDE_OFF, 0);
3557 
3558  prop = RNA_def_property(srna, "show_restrict_column_viewport", PROP_BOOLEAN, PROP_NONE);
3559  RNA_def_property_boolean_sdna(prop, NULL, "show_restrict_flags", SO_RESTRICT_VIEWPORT);
3560  RNA_def_property_ui_text(prop, "Disable in Viewports", "Globally disable in viewports");
3561  RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 0);
3563 
3564  prop = RNA_def_property(srna, "show_restrict_column_render", PROP_BOOLEAN, PROP_NONE);
3565  RNA_def_property_boolean_sdna(prop, NULL, "show_restrict_flags", SO_RESTRICT_RENDER);
3566  RNA_def_property_ui_text(prop, "Disable in Renders", "Globally disable in renders");
3567  RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 0);
3569 
3570  prop = RNA_def_property(srna, "show_restrict_column_holdout", PROP_BOOLEAN, PROP_NONE);
3571  RNA_def_property_boolean_sdna(prop, NULL, "show_restrict_flags", SO_RESTRICT_HOLDOUT);
3572  RNA_def_property_ui_text(prop, "Holdout", "Holdout");
3573  RNA_def_property_ui_icon(prop, ICON_HOLDOUT_ON, 0);
3575 
3576  prop = RNA_def_property(srna, "show_restrict_column_indirect_only", PROP_BOOLEAN, PROP_NONE);
3577  RNA_def_property_boolean_sdna(prop, NULL, "show_restrict_flags", SO_RESTRICT_INDIRECT_ONLY);
3578  RNA_def_property_ui_text(prop, "Indirect Only", "Indirect only");
3579  RNA_def_property_ui_icon(prop, ICON_INDIRECT_ONLY_ON, 0);
3581 
3582  /* Filters. */
3583  prop = RNA_def_property(srna, "use_filter_object", PROP_BOOLEAN, PROP_NONE);
3585  RNA_def_property_ui_text(prop, "Filter Objects", "Show objects");
3587 
3588  prop = RNA_def_property(srna, "use_filter_object_content", PROP_BOOLEAN, PROP_NONE);
3591  prop, "Show Object Contents", "Show what is inside the objects elements");
3593 
3594  prop = RNA_def_property(srna, "use_filter_children", PROP_BOOLEAN, PROP_NONE);
3596  RNA_def_property_ui_text(prop, "Show Object Children", "Show children");
3598 
3599  prop = RNA_def_property(srna, "use_filter_collection", PROP_BOOLEAN, PROP_NONE);
3601  RNA_def_property_ui_text(prop, "Show Collections", "Show collections");
3603 
3604  /* Filters object state. */
3605  prop = RNA_def_property(srna, "filter_state", PROP_ENUM, PROP_NONE);
3606  RNA_def_property_enum_sdna(prop, NULL, "filter_state");
3607  RNA_def_property_enum_items(prop, filter_state_items);
3608  RNA_def_property_ui_text(prop, "Object State Filter", "");
3610 
3611  prop = RNA_def_property(srna, "filter_invert", PROP_BOOLEAN, PROP_NONE);
3613  RNA_def_property_ui_text(prop, "Invert", "Invert the object state filter");
3615 
3616  /* Filters object type. */
3617  prop = RNA_def_property(srna, "use_filter_object_mesh", PROP_BOOLEAN, PROP_NONE);
3619  RNA_def_property_ui_text(prop, "Show Meshes", "Show mesh objects");
3621 
3622  prop = RNA_def_property(srna, "use_filter_object_armature", PROP_BOOLEAN, PROP_NONE);
3624  RNA_def_property_ui_text(prop, "Show Armatures", "Show armature objects");
3626 
3627  prop = RNA_def_property(srna, "use_filter_object_empty", PROP_BOOLEAN, PROP_NONE);
3629  RNA_def_property_ui_text(prop, "Show Empties", "Show empty objects");
3631 
3632  prop = RNA_def_property(srna, "use_filter_object_light", PROP_BOOLEAN, PROP_NONE);
3634  RNA_def_property_ui_text(prop, "Show Lights", "Show light objects");
3636 
3637  prop = RNA_def_property(srna, "use_filter_object_camera", PROP_BOOLEAN, PROP_NONE);
3639  RNA_def_property_ui_text(prop, "Show Cameras", "Show camera objects");
3641 
3642  prop = RNA_def_property(srna, "use_filter_object_others", PROP_BOOLEAN, PROP_NONE);
3645  prop, "Show Other Objects", "Show curves, lattices, light probes, fonts, ...");
3647 
3648  /* Libraries filter. */
3649  prop = RNA_def_property(srna, "use_filter_id_type", PROP_BOOLEAN, PROP_NONE);
3651  RNA_def_property_ui_text(prop, "Filter by Type", "Show only data-blocks of one type");
3653 
3654  prop = RNA_def_property(srna, "filter_id_type", PROP_ENUM, PROP_NONE);
3655  RNA_def_property_enum_sdna(prop, NULL, "filter_id_type");
3657  RNA_def_property_ui_text(prop, "Filter by Type", "Data-block type to show");
3659 
3660  prop = RNA_def_property(srna, "use_filter_lib_override", PROP_BOOLEAN, PROP_NONE);
3663  "Show Library Overrides",
3664  "For libraries with overrides created, show the overridden values");
3666 
3667  prop = RNA_def_property(srna, "use_filter_lib_override_system", PROP_BOOLEAN, PROP_NONE);
3670  prop,
3671  "Show System Overrides",
3672  "For libraries with overrides created, show the overridden values that are "
3673  "defined/controlled automatically (e.g. to make users of an overridden data-block point to "
3674  "the override data, not the original linked data)");
3676 }
3677 
3679 {
3680  StructRNA *srna;
3681  PropertyRNA *prop;
3682 
3683  static const EnumPropertyItem background_type_items[] = {
3684  {V3D_SHADING_BACKGROUND_THEME, "THEME", 0, "Theme", "Use the theme for background color"},
3685  {V3D_SHADING_BACKGROUND_WORLD, "WORLD", 0, "World", "Use the world for background color"},
3687  "VIEWPORT",
3688  0,
3689  "Viewport",
3690  "Use a custom color limited to this viewport only"},
3691  {0, NULL, 0, NULL, NULL},
3692  };
3693 
3694  static const EnumPropertyItem cavity_type_items[] = {
3696  "WORLD",
3697  0,
3698  "World",
3699  "Cavity shading computed in world space, useful for larger-scale occlusion"},
3701  "SCREEN",
3702  0,
3703  "Screen",
3704  "Curvature-based shading, useful for making fine details more visible"},
3705  {V3D_SHADING_CAVITY_BOTH, "BOTH", 0, "Both", "Use both effects simultaneously"},
3706  {0, NULL, 0, NULL, NULL},
3707  };
3708 
3709  /* Note these settings are used for both 3D viewport and the OpenGL render
3710  * engine in the scene, so can't assume to always be part of a screen. */
3711  srna = RNA_def_struct(brna, "View3DShading", NULL);
3712  RNA_def_struct_path_func(srna, "rna_View3DShading_path");
3714  srna, "3D View Shading Settings", "Settings for shading in the 3D viewport");
3715  RNA_def_struct_idprops_func(srna, "rna_View3DShading_idprops");
3716 
3717  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
3720  "rna_3DViewShading_type_get",
3721  "rna_3DViewShading_type_set",
3722  "rna_3DViewShading_type_itemf");
3724  prop, "Viewport Shading", "Method to display/shade objects in the 3D View");
3726  prop, NC_SPACE | ND_SPACE_VIEW3D | NS_VIEW3D_SHADING, "rna_3DViewShading_type_update");
3727 
3728  prop = RNA_def_property(srna, "light", PROP_ENUM, PROP_NONE);
3729  RNA_def_property_enum_sdna(prop, NULL, "light");
3731  RNA_def_property_ui_text(prop, "Lighting", "Lighting Method for Solid/Texture Viewport Shading");
3733 
3734  prop = RNA_def_property(srna, "show_object_outline", PROP_BOOLEAN, PROP_NONE);
3737  RNA_def_property_ui_text(prop, "Outline", "Show Object Outline");
3739 
3740  prop = RNA_def_property(srna, "studio_light", PROP_ENUM, PROP_NONE);
3744  "rna_View3DShading_studio_light_get",
3745  "rna_View3DShading_studio_light_set",
3746  "rna_View3DShading_studio_light_itemf");
3747  RNA_def_property_ui_text(prop, "Studiolight", "Studio lighting setup");
3749 
3750  prop = RNA_def_property(srna, "use_world_space_lighting", PROP_BOOLEAN, PROP_NONE);
3754  prop, "World Space Lighting", "Make the lighting fixed and not follow the camera");
3756 
3757  prop = RNA_def_property(srna, "show_backface_culling", PROP_BOOLEAN, PROP_NONE);
3760  prop, "Backface Culling", "Use back face culling to hide the back side of faces");
3762 
3763  prop = RNA_def_property(srna, "show_cavity", PROP_BOOLEAN, PROP_NONE);
3766  RNA_def_property_ui_text(prop, "Cavity", "Show Cavity");
3768 
3769  prop = RNA_def_property(srna, "cavity_type", PROP_ENUM, PROP_NONE);
3770  RNA_def_property_enum_items(prop, cavity_type_items);
3771  RNA_def_property_ui_text(prop, "Cavity Type", "Way to display the cavity shading");
3773 
3774  prop = RNA_def_property(srna, "curvature_ridge_factor", PROP_FLOAT, PROP_FACTOR);
3775  RNA_def_property_float_sdna(prop, NULL, "curvature_ridge_factor");
3776  RNA_def_property_ui_text(prop, "Curvature Ridge", "Factor for the curvature ridges");
3777  RNA_def_property_range(prop, 0.0f, 2.0f);
3780 
3781  prop = RNA_def_property(srna, "curvature_valley_factor", PROP_FLOAT, PROP_FACTOR);
3782  RNA_def_property_float_sdna(prop, NULL, "curvature_valley_factor");
3783  RNA_def_property_ui_text(prop, "Curvature Valley", "Factor for the curvature valleys");
3784  RNA_def_property_range(prop, 0.0f, 2.0f);
3787 
3788  prop = RNA_def_property(srna, "cavity_ridge_factor", PROP_FLOAT, PROP_FACTOR);
3789  RNA_def_property_float_sdna(prop, NULL, "cavity_ridge_factor");
3790  RNA_def_property_ui_text(prop, "Cavity Ridge", "Factor for the cavity ridges");
3791  RNA_def_property_range(prop, 0.0f, 250.0f);
3792  RNA_def_property_ui_range(prop, 0.00f, 2.5f, 1, 3);
3795 
3796  prop = RNA_def_property(srna, "cavity_valley_factor", PROP_FLOAT, PROP_FACTOR);
3797  RNA_def_property_float_sdna(prop, NULL, "cavity_valley_factor");
3798  RNA_def_property_ui_text(prop, "Cavity Valley", "Factor for the cavity valleys");
3799  RNA_def_property_range(prop, 0.0f, 250.0f);
3800  RNA_def_property_ui_range(prop, 0.00f, 2.5f, 1, 3);
3803 
3804  prop = RNA_def_property(srna, "selected_studio_light", PROP_POINTER, PROP_NONE);
3805  RNA_def_property_struct_type(prop, "StudioLight");
3807  RNA_def_property_ui_text(prop, "Studio Light", "Selected StudioLight");
3809  prop, "rna_View3DShading_selected_studio_light_get", NULL, NULL, NULL);
3812 
3813  prop = RNA_def_property(srna, "studiolight_rotate_z", PROP_FLOAT, PROP_ANGLE);
3814  RNA_def_property_float_sdna(prop, NULL, "studiolight_rot_z");
3816  prop, "Studiolight Rotation", "Rotation of the studiolight around the Z-Axis");
3817  RNA_def_property_range(prop, -M_PI, M_PI);
3820 
3821  prop = RNA_def_property(srna, "studiolight_intensity", PROP_FLOAT, PROP_FACTOR);
3822  RNA_def_property_float_sdna(prop, NULL, "studiolight_intensity");
3824  RNA_def_property_ui_text(prop, "Strength", "Strength of the studiolight");
3825  RNA_def_property_range(prop, 0.0f, FLT_MAX);
3826  RNA_def_property_ui_range(prop, 0.0f, 2.0f, 1, 3);
3828 
3829  prop = RNA_def_property(srna, "studiolight_background_alpha", PROP_FLOAT, PROP_FACTOR);
3830  RNA_def_property_float_sdna(prop, NULL, "studiolight_background");
3831  RNA_def_property_ui_text(prop, "World Opacity", "Show the studiolight in the background");
3832  RNA_def_property_range(prop, 0.0f, 1.0f);
3833  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 3);
3836 
3837  prop = RNA_def_property(srna, "studiolight_background_blur", PROP_FLOAT, PROP_FACTOR);
3838  RNA_def_property_float_sdna(prop, NULL, "studiolight_blur");
3839  RNA_def_property_ui_text(prop, "Blur", "Blur the studiolight in the background");
3840  RNA_def_property_float_default(prop, 0.5f);
3841  RNA_def_property_range(prop, 0.0f, 1.0f);
3842  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1, 2);
3845 
3846  prop = RNA_def_property(srna, "use_studiolight_view_rotation", PROP_BOOLEAN, PROP_NONE);
3850  RNA_def_property_boolean_default(prop, false);
3852  prop, "World Space Lighting", "Make the HDR rotation fixed and not follow the camera");
3854 
3855  prop = RNA_def_property(srna, "color_type", PROP_ENUM, PROP_NONE);
3856  RNA_def_property_enum_sdna(prop, NULL, "color_type");
3858  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_View3DShading_color_type_itemf");
3859  RNA_def_property_ui_text(prop, "Color", "Color Type");
3862  prop, NC_SPACE | ND_SPACE_VIEW3D | NS_VIEW3D_SHADING, "rna_GPencil_update");
3863 
3864  prop = RNA_def_property(srna, "wireframe_color_type", PROP_ENUM, PROP_NONE);
3865  RNA_def_property_enum_sdna(prop, NULL, "wire_color_type");
3867  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_View3DShading_color_type_itemf");
3868  RNA_def_property_ui_text(prop, "Color", "Color Type");
3870 
3871  prop = RNA_def_property(srna, "single_color", PROP_FLOAT, PROP_COLOR);
3872  RNA_def_property_float_sdna(prop, NULL, "single_color");
3873  RNA_def_property_array(prop, 3);
3874  RNA_def_property_ui_text(prop, "Color", "Color for single color mode");
3875  RNA_def_property_range(prop, 0.0f, 1.0f);
3877 
3878  prop = RNA_def_property(srna, "background_type", PROP_ENUM, PROP_NONE);
3879  RNA_def_property_enum_items(prop, background_type_items);
3880  RNA_def_property_ui_text(prop, "Background", "Way to display the background");
3882 
3883  prop = RNA_def_property(srna, "background_color", PROP_FLOAT, PROP_COLOR);
3884  RNA_def_property_array(prop, 3);
3885  RNA_def_property_ui_text(prop, "Background Color", "Color for custom background color");
3886  RNA_def_property_range(prop, 0.0f, 1.0f);
3888 
3889  prop = RNA_def_property(srna, "show_shadows", PROP_BOOLEAN, PROP_NONE);
3892  RNA_def_property_ui_text(prop, "Shadow", "Show Shadow");
3894 
3895  prop = RNA_def_property(srna, "show_xray", PROP_BOOLEAN, PROP_NONE);
3898  RNA_def_property_ui_text(prop, "Show X-Ray", "Show whole scene transparent");
3900 
3901  prop = RNA_def_property(srna, "show_xray_wireframe", PROP_BOOLEAN, PROP_NONE);
3904  RNA_def_property_ui_text(prop, "Show X-Ray", "Show whole scene transparent");
3906 
3907  prop = RNA_def_property(srna, "xray_alpha", PROP_FLOAT, PROP_FACTOR);
3908  RNA_def_property_float_sdna(prop, NULL, "xray_alpha");
3909  RNA_def_property_ui_text(prop, "X-Ray Alpha", "Amount of alpha to use");
3910  RNA_def_property_range(prop, 0.0f, 1.0f);
3913 
3914  prop = RNA_def_property(srna, "xray_alpha_wireframe", PROP_FLOAT, PROP_FACTOR);
3915  RNA_def_property_float_sdna(prop, NULL, "xray_alpha_wire");
3916  RNA_def_property_ui_text(prop, "X-Ray Alpha", "Amount of alpha to use");
3917  RNA_def_property_range(prop, 0.0f, 1.0f);
3920 
3921  prop = RNA_def_property(srna, "use_dof", PROP_BOOLEAN, PROP_NONE);
3925  prop,
3926  "Depth Of Field",
3927  "Use depth of field on viewport using the values from the active camera");
3929 
3930  prop = RNA_def_property(srna, "use_scene_lights", PROP_BOOLEAN, PROP_NONE);
3932  RNA_def_property_boolean_default(prop, false);
3934  RNA_def_property_ui_text(prop, "Scene Lights", "Render lights and light probes of the scene");
3936 
3937  prop = RNA_def_property(srna, "use_scene_world", PROP_BOOLEAN, PROP_NONE);
3939  RNA_def_property_boolean_default(prop, false);
3941  RNA_def_property_ui_text(prop, "Scene World", "Use scene world for lighting");
3943 
3944  prop = RNA_def_property(srna, "use_scene_lights_render", PROP_BOOLEAN, PROP_NONE);
3947  RNA_def_property_ui_text(prop, "Scene Lights", "Render lights and light probes of the scene");
3949 
3950  prop = RNA_def_property(srna, "use_scene_world_render", PROP_BOOLEAN, PROP_NONE);
3953  RNA_def_property_ui_text(prop, "Scene World", "Use scene world for lighting");
3955 
3956  prop = RNA_def_property(srna, "show_specular_highlight", PROP_BOOLEAN, PROP_NONE);
3959  RNA_def_property_ui_text(prop, "Specular Highlights", "Render specular highlights");
3961 
3962  prop = RNA_def_property(srna, "object_outline_color", PROP_FLOAT, PROP_COLOR);
3963  RNA_def_property_float_sdna(prop, NULL, "object_outline_color");
3964  RNA_def_property_array(prop, 3);
3965  RNA_def_property_ui_text(prop, "Outline Color", "Color for object outline");
3966  RNA_def_property_range(prop, 0.0f, 1.0f);
3968 
3969  prop = RNA_def_property(srna, "shadow_intensity", PROP_FLOAT, PROP_FACTOR);
3970  RNA_def_property_float_sdna(prop, NULL, "shadow_intensity");
3971  RNA_def_property_ui_text(prop, "Shadow Intensity", "Darkness of shadows");
3972  RNA_def_property_range(prop, 0.0f, 1.0f);
3973  RNA_def_property_ui_range(prop, 0.00f, 1.0f, 1, 3);
3976 
3977  prop = RNA_def_property(srna, "render_pass", PROP_ENUM, PROP_NONE);
3978  RNA_def_property_enum_sdna(prop, NULL, "render_pass");
3980  RNA_def_property_ui_text(prop, "Render Pass", "Render Pass to show in the viewport");
3982  "rna_3DViewShading_render_pass_get",
3983  "rna_3DViewShading_render_pass_set",
3984  "rna_3DViewShading_render_pass_itemf");
3986 
3987  prop = RNA_def_property(srna, "aov_name", PROP_STRING, PROP_NONE);
3988  RNA_def_property_string_sdna(prop, NULL, "aov_name");
3989  RNA_def_property_ui_text(prop, "Shader AOV Name", "Name of the active Shader AOV");
3992 }
3993 
3995 {
3996  StructRNA *srna;
3997  PropertyRNA *prop;
3998 
3999  srna = RNA_def_struct(brna, "View3DOverlay", NULL);
4000  RNA_def_struct_sdna(srna, "View3D");
4001  RNA_def_struct_nested(brna, srna, "SpaceView3D");
4002  RNA_def_struct_path_func(srna, "rna_View3DOverlay_path");
4004  srna, "3D View Overlay Settings", "Settings for display of overlays in the 3D viewport");
4005 
4006  prop = RNA_def_property(srna, "show_overlays", PROP_BOOLEAN, PROP_NONE);
4008  RNA_def_property_ui_text(prop, "Show Overlays", "Display overlays like gizmos and outlines");
4009  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4010 
4011  prop = RNA_def_property(srna, "show_ortho_grid", PROP_BOOLEAN, PROP_NONE);
4013  RNA_def_property_ui_text(prop, "Display Grid", "Show grid in orthographic side view");
4015 
4016  prop = RNA_def_property(srna, "show_floor", PROP_BOOLEAN, PROP_NONE);
4018  RNA_def_property_ui_text(prop, "Display Grid Floor", "Show the ground plane grid");
4020 
4021  prop = RNA_def_property(srna, "show_axis_x", PROP_BOOLEAN, PROP_NONE);
4022  RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_X);
4023  RNA_def_property_ui_text(prop, "Display X Axis", "Show the X axis line");
4025 
4026  prop = RNA_def_property(srna, "show_axis_y", PROP_BOOLEAN, PROP_NONE);
4027  RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Y);
4028  RNA_def_property_ui_text(prop, "Display Y Axis", "Show the Y axis line");
4030 
4031  prop = RNA_def_property(srna, "show_axis_z", PROP_BOOLEAN, PROP_NONE);
4032  RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_Z);
4033  RNA_def_property_ui_text(prop, "Display Z Axis", "Show the Z axis line");
4035 
4036  prop = RNA_def_property(srna, "grid_scale", PROP_FLOAT, PROP_NONE);
4037  RNA_def_property_float_sdna(prop, NULL, "grid");
4039  prop, "Grid Scale", "Multiplier for the distance between 3D View grid lines");
4040  RNA_def_property_range(prop, 0.0f, FLT_MAX);
4041  RNA_def_property_ui_range(prop, 0.001f, 1000.0f, 0.1f, 3);
4043 
4044  prop = RNA_def_property(srna, "grid_lines", PROP_INT, PROP_NONE);
4045  RNA_def_property_int_sdna(prop, NULL, "gridlines");
4047  prop, "Grid Lines", "Number of grid lines to display in perspective view");
4048  RNA_def_property_range(prop, 0, 1024);
4050 
4051  prop = RNA_def_property(srna, "grid_subdivisions", PROP_INT, PROP_NONE);
4052  RNA_def_property_int_sdna(prop, NULL, "gridsubdiv");
4053  RNA_def_property_ui_text(prop, "Grid Subdivisions", "Number of subdivisions between grid lines");
4054  RNA_def_property_range(prop, 1, 1024);
4056 
4057  prop = RNA_def_property(srna, "grid_scale_unit", PROP_FLOAT, PROP_NONE);
4059  RNA_def_property_float_funcs(prop, "rna_View3DOverlay_GridScaleUnit_get", NULL, NULL);
4061  prop, "Grid Scale Unit", "Grid cell size scaled by scene unit system settings");
4062 
4063  prop = RNA_def_property(srna, "show_outline_selected", PROP_BOOLEAN, PROP_NONE);
4066  prop, "Outline Selected", "Show an outline highlight around selected objects");
4068 
4069  prop = RNA_def_property(srna, "show_object_origins", PROP_BOOLEAN, PROP_NONE);
4071  prop, NULL, "overlay.flag", V3D_OVERLAY_HIDE_OBJECT_ORIGINS);
4072  RNA_def_property_ui_text(prop, "Object Origins", "Show object center dots");
4074 
4075  prop = RNA_def_property(srna, "show_object_origins_all", PROP_BOOLEAN, PROP_NONE);
4078  prop,
4079  "All Object Origins",
4080  "Show the object origin center dot for all (selected and unselected) objects");
4082 
4083  prop = RNA_def_property(srna, "show_relationship_lines", PROP_BOOLEAN, PROP_NONE);
4086  "Relationship Lines",
4087  "Show dashed lines indicating parent or constraint relationships");
4089 
4090  prop = RNA_def_property(srna, "show_cursor", PROP_BOOLEAN, PROP_NONE);
4092  RNA_def_property_ui_text(prop, "Show 3D Cursor", "Display 3D Cursor Overlay");
4094 
4095  prop = RNA_def_property(srna, "show_text", PROP_BOOLEAN, PROP_NONE);
4097  RNA_def_property_ui_text(prop, "Show Text", "Display overlay text");
4099 
4100  prop = RNA_def_property(srna, "show_stats", PROP_BOOLEAN, PROP_NONE);
4101  RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", V3D_OVERLAY_STATS);
4102  RNA_def_property_ui_text(prop, "Show Statistics", "Display scene statistics overlay text");
4104 
4105  prop = RNA_def_property(srna, "show_extras", PROP_BOOLEAN, PROP_NONE);
4107  prop, NULL, "overlay.flag", V3D_OVERLAY_HIDE_OBJECT_XTRAS);
4109  prop, "Extras", "Object details, including empty wire, cameras and other visual guides");
4111 
4112  prop = RNA_def_property(srna, "show_bones", PROP_BOOLEAN, PROP_NONE);
4115  prop, "Show Bones", "Display bones (disable to show motion paths only)");
4117 
4118  prop = RNA_def_property(srna, "show_face_orientation", PROP_BOOLEAN, PROP_NONE);
4121  RNA_def_property_ui_text(prop, "Face Orientation", "Show the Face Orientation Overlay");
4123 
4124  prop = RNA_def_property(srna, "show_fade_inactive", PROP_BOOLEAN, PROP_NONE);
4128  prop, "Fade Inactive Objects", "Fade inactive geometry using the viewport background color");
4130 
4131  prop = RNA_def_property(srna, "fade_inactive_alpha", PROP_FLOAT, PROP_FACTOR);
4132  RNA_def_property_float_sdna(prop, NULL, "overlay.fade_alpha");
4133  RNA_def_property_ui_text(prop, "Opacity", "Strength of the fade effect");
4134  RNA_def_property_range(prop, 0.0f, 1.0f);
4136  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4137 
4138  prop = RNA_def_property(srna, "show_xray_bone", PROP_BOOLEAN, PROP_NONE);
4141  RNA_def_property_ui_text(prop, "Show Bone X-Ray", "Show the bone selection overlay");
4142  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4143 
4144  prop = RNA_def_property(srna, "xray_alpha_bone", PROP_FLOAT, PROP_FACTOR);
4145  RNA_def_property_float_sdna(prop, NULL, "overlay.xray_alpha_bone");
4146  RNA_def_property_ui_text(prop, "Opacity", "Opacity to use for bone selection");
4147  RNA_def_property_range(prop, 0.0f, 1.0f);
4149  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4150 
4151  prop = RNA_def_property(srna, "show_motion_paths", PROP_BOOLEAN, PROP_NONE);
4153  prop, NULL, "overlay.flag", V3D_OVERLAY_HIDE_MOTION_PATHS);
4155  RNA_def_property_ui_text(prop, "Motion Paths", "Show the Motion Paths Overlay");
4157 
4158  prop = RNA_def_property(srna, "show_onion_skins", PROP_BOOLEAN, PROP_NONE);
4161  RNA_def_property_ui_text(prop, "Onion Skins", "Show the Onion Skinning Overlay");
4163 
4164  prop = RNA_def_property(srna, "show_look_dev", PROP_BOOLEAN, PROP_NONE);
4167  RNA_def_property_ui_text(prop, "HDRI Preview", "Show HDRI preview spheres");
4169 
4170  prop = RNA_def_property(srna, "show_wireframes", PROP_BOOLEAN, PROP_NONE);
4173  RNA_def_property_ui_text(prop, "Wireframe", "Show face edges wires");
4175 
4176  prop = RNA_def_property(srna, "wireframe_threshold", PROP_FLOAT, PROP_FACTOR);
4177  RNA_def_property_float_sdna(prop, NULL, "overlay.wireframe_threshold");
4179  "Wireframe Threshold",
4180  "Adjust the angle threshold for displaying edges "
4181  "(1.0 for all)");
4182  RNA_def_property_range(prop, 0.0f, 1.0f);
4185 
4186  prop = RNA_def_property(srna, "wireframe_opacity", PROP_FLOAT, PROP_FACTOR);
4187  RNA_def_property_float_sdna(prop, NULL, "overlay.wireframe_opacity");
4189  "Wireframe Opacity",
4190  "Opacity of the displayed edges "
4191  "(1.0 for opaque)");
4192  RNA_def_property_range(prop, 0.0f, 1.0f);
4195 
4196  prop = RNA_def_property(srna, "show_paint_wire", PROP_BOOLEAN, PROP_NONE);
4197  RNA_def_property_boolean_sdna(prop, NULL, "overlay.paint_flag", V3D_OVERLAY_PAINT_WIRE);
4198  RNA_def_property_ui_text(prop, "Show Wire", "Use wireframe display in painting modes");
4200 
4201  prop = RNA_def_property(srna, "show_wpaint_contours", PROP_BOOLEAN, PROP_NONE);
4202  RNA_def_property_boolean_sdna(prop, NULL, "overlay.wpaint_flag", V3D_OVERLAY_WPAINT_CONTOURS);
4204  prop,
4205  "Show Weight Contours",
4206  "Show contour lines formed by points with the same interpolated weight");
4208 
4209  prop = RNA_def_property(srna, "show_weight", PROP_BOOLEAN, PROP_NONE);
4210  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_WEIGHT);
4211  RNA_def_property_ui_text(prop, "Show Weights", "Display weights in editmode");
4213 
4214  prop = RNA_def_property(srna, "show_occlude_wire", PROP_BOOLEAN, PROP_NONE);
4216  RNA_def_property_ui_text(prop, "Hidden Wire", "Use hidden wireframe display");
4218 
4219  prop = RNA_def_property(srna, "show_face_normals", PROP_BOOLEAN, PROP_NONE);
4221  RNA_def_property_ui_text(prop, "Display Normals", "Display face normals as lines");
4223 
4224  prop = RNA_def_property(srna, "show_vertex_normals", PROP_BOOLEAN, PROP_NONE);
4226  RNA_def_property_ui_text(prop, "Display Vertex Normals", "Display vertex normals as lines");
4228 
4229  prop = RNA_def_property(srna, "show_split_normals", PROP_BOOLEAN, PROP_NONE);
4232  prop, "Display Split Normals", "Display vertex-per-face normals as lines");
4234 
4235  prop = RNA_def_property(srna, "show_edges", PROP_BOOLEAN, PROP_NONE);
4236  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_EDGES);
4237  RNA_def_property_ui_text(prop, "Display Edges", "Highlight selected edges");
4239 
4240  prop = RNA_def_property(srna, "show_faces", PROP_BOOLEAN, PROP_NONE);
4241  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_FACES);
4242  RNA_def_property_ui_text(prop, "Display Faces", "Highlight selected faces");
4244 
4245  prop = RNA_def_property(srna, "show_face_center", PROP_BOOLEAN, PROP_NONE);
4246  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_FACE_DOT);
4248  prop,
4249  "Display Face Center",
4250  "Display face center when face selection is enabled in solid shading modes");
4252 
4253  prop = RNA_def_property(srna, "show_edge_crease", PROP_BOOLEAN, PROP_NONE);
4254  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_CREASES);
4256  prop, "Display Creases", "Display creases created for Subdivision Surface modifier");
4258 
4259  prop = RNA_def_property(srna, "show_edge_bevel_weight", PROP_BOOLEAN, PROP_NONE);
4260  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_BWEIGHTS);
4262  prop, "Display Bevel Weights", "Display weights created for the Bevel modifier");
4264 
4265  prop = RNA_def_property(srna, "show_edge_seams", PROP_BOOLEAN, PROP_NONE);
4266  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_SEAMS);
4267  RNA_def_property_ui_text(prop, "Display Seams", "Display UV unwrapping seams");
4269 
4270  prop = RNA_def_property(srna, "show_edge_sharp", PROP_BOOLEAN, PROP_NONE);
4271  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_SHARP);
4273  prop, "Display Sharp", "Display sharp edges, used with the Edge Split modifier");
4275 
4276  prop = RNA_def_property(srna, "show_freestyle_edge_marks", PROP_BOOLEAN, PROP_NONE);
4279  "Display Freestyle Edge Marks",
4280  "Display Freestyle edge marks, used with the Freestyle renderer");
4282 
4283  prop = RNA_def_property(srna, "show_freestyle_face_marks", PROP_BOOLEAN, PROP_NONE);
4286  "Display Freestyle Face Marks",
4287  "Display Freestyle face marks, used with the Freestyle renderer");
4289 
4290  prop = RNA_def_property(srna, "show_statvis", PROP_BOOLEAN, PROP_NONE);
4291  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_STATVIS);
4292  RNA_def_property_ui_text(prop, "Stat Vis", "Display statistical information about the mesh");
4294 
4295  prop = RNA_def_property(srna, "show_extra_edge_length", PROP_BOOLEAN, PROP_NONE);
4296  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_EDGE_LEN);
4298  prop,
4299  "Edge Length",
4300  "Display selected edge lengths, using global values when set in the transform panel");
4302 
4303  prop = RNA_def_property(srna, "show_extra_edge_angle", PROP_BOOLEAN, PROP_NONE);
4304  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_EDGE_ANG);
4306  prop,
4307  "Edge Angle",
4308  "Display selected edge angle, using global values when set in the transform panel");
4310 
4311  prop = RNA_def_property(srna, "show_extra_face_angle", PROP_BOOLEAN, PROP_NONE);
4312  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_FACE_ANG);
4314  "Face Angles",
4315  "Display the angles in the selected edges, "
4316  "using global values when set in the transform panel");
4318 
4319  prop = RNA_def_property(srna, "show_extra_face_area", PROP_BOOLEAN, PROP_NONE);
4320  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_FACE_AREA);
4322  "Face Area",
4323  "Display the area of selected faces, "
4324  "using global values when set in the transform panel");
4326 
4327  prop = RNA_def_property(srna, "show_extra_indices", PROP_BOOLEAN, PROP_NONE);
4328  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_INDICES);
4330  prop, "Indices", "Display the index numbers of selected vertices, edges, and faces");
4332 
4333  prop = RNA_def_property(srna, "display_handle", PROP_ENUM, PROP_NONE);
4334  RNA_def_property_enum_sdna(prop, NULL, "overlay.handle_display");
4337  prop, "Display Handles", "Limit the display of curve handles in edit mode");
4339 
4340  prop = RNA_def_property(srna, "show_curve_normals", PROP_BOOLEAN, PROP_NONE);
4341  RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_CU_NORMALS);
4342  RNA_def_property_ui_text(prop, "Draw Normals", "Display 3D curve normals in editmode");
4344 
4345  prop = RNA_def_property(srna, "normals_length", PROP_FLOAT, PROP_FACTOR);
4346  RNA_def_property_float_sdna(prop, NULL, "overlay.normals_length");
4347  RNA_def_property_ui_text(prop, "Normal Size", "Display size for normals in the 3D view");
4348  RNA_def_property_range(prop, 0.00001, 100000.0);
4349  RNA_def_property_ui_range(prop, 0.01, 2.0, 1, 2);
4350  RNA_def_property_float_default(prop, 0.02);
4352 
4353  prop = RNA_def_property(srna, "backwire_opacity", PROP_FLOAT, PROP_FACTOR);
4354  RNA_def_property_float_sdna(prop, NULL, "overlay.backwire_opacity");
4355  RNA_def_property_ui_text(prop, "Backwire Opacity", "Opacity when rendering transparent wires");
4356  RNA_def_property_range(prop, 0.0f, 1.0f);
4358 
4359  prop = RNA_def_property(srna, "texture_paint_mode_opacity", PROP_FLOAT, PROP_FACTOR);
4360  RNA_def_property_float_sdna(prop, NULL, "overlay.texture_paint_mode_opacity");
4362  prop, "Stencil Mask Opacity", "Opacity of the texture paint mode stencil mask overlay");
4363  RNA_def_property_range(prop, 0.0f, 1.0f);
4365 
4366  prop = RNA_def_property(srna, "vertex_paint_mode_opacity", PROP_FLOAT, PROP_FACTOR);
4367  RNA_def_property_float_sdna(prop, NULL, "overlay.vertex_paint_mode_opacity");
4369  prop, "Stencil Mask Opacity", "Opacity of the texture paint mode stencil mask overlay");
4370  RNA_def_property_range(prop, 0.0f, 1.0f);
4372 
4373  prop = RNA_def_property(srna, "weight_paint_mode_opacity", PROP_FLOAT, PROP_FACTOR);
4374  RNA_def_property_float_sdna(prop, NULL, "overlay.weight_paint_mode_opacity");
4376  prop, "Weight Paint Opacity", "Opacity of the weight paint mode overlay");
4377  RNA_def_property_range(prop, 0.0f, 1.0f);
4379 
4380  prop = RNA_def_property(srna, "sculpt_mode_mask_opacity", PROP_FLOAT, PROP_FACTOR);
4381  RNA_def_property_float_sdna(prop, NULL, "overlay.sculpt_mode_mask_opacity");
4382  RNA_def_property_ui_text(prop, "Sculpt Mask Opacity", "");
4383  RNA_def_property_range(prop, 0.0f, 1.0f);
4385 
4386  prop = RNA_def_property(srna, "sculpt_mode_face_sets_opacity", PROP_FLOAT, PROP_FACTOR);
4387  RNA_def_property_float_sdna(prop, NULL, "overlay.sculpt_mode_face_sets_opacity");
4388  RNA_def_property_ui_text(prop, "Sculpt Face Sets Opacity", "");
4389  RNA_def_property_range(prop, 0.0f, 1.0f);
4391 
4392  /* grease pencil paper settings */
4393  prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE);
4395  RNA_def_property_ui_text(prop, "Show Annotation", "Show annotations for this view");
4397 
4398  prop = RNA_def_property(srna, "use_gpencil_fade_objects", PROP_BOOLEAN, PROP_NONE);
4401  prop,
4402  "Fade Objects",
4403  "Fade all viewport objects with a full color layer to improve visibility");
4405 
4406  prop = RNA_def_property(srna, "use_gpencil_grid", PROP_BOOLEAN, PROP_NONE);
4408  RNA_def_property_ui_text(prop, "Use Grid", "Display a grid over grease pencil paper");
4410 
4411  prop = RNA_def_property(srna, "use_gpencil_fade_layers", PROP_BOOLEAN, PROP_NONE);
4414  prop, "Fade Layers", "Toggle fading of Grease Pencil layers except the active one");
4415  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4416 
4417  prop = RNA_def_property(srna, "use_gpencil_fade_gp_objects", PROP_BOOLEAN, PROP_NONE);
4420  prop, "Fade Grease Pencil Objects", "Fade Grease Pencil Objects, except the active one");
4421  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4422 
4423  prop = RNA_def_property(srna, "use_gpencil_canvas_xray", PROP_BOOLEAN, PROP_NONE);
4425  RNA_def_property_ui_text(prop, "Canvas X-Ray", "Show Canvas grid in front");
4426  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4427 
4428  prop = RNA_def_property(srna, "use_gpencil_show_directions", PROP_BOOLEAN, PROP_NONE);
4431  "Stroke Direction",
4432  "Show stroke drawing direction with a bigger green dot (start) "
4433  "and smaller red dot (end) points");
4434  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4435 
4436  prop = RNA_def_property(srna, "use_gpencil_show_material_name", PROP_BOOLEAN, PROP_NONE);
4439  prop, "Stroke Material Name", "Show material name assigned to each stroke");
4440  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4441 
4442  prop = RNA_def_property(srna, "gpencil_grid_opacity", PROP_FLOAT, PROP_NONE);
4443  RNA_def_property_float_sdna(prop, NULL, "overlay.gpencil_grid_opacity");
4444  RNA_def_property_range(prop, 0.1f, 1.0f);
4445  RNA_def_property_ui_text(prop, "Opacity", "Canvas grid opacity");
4447 
4448  /* Paper opacity factor */
4449  prop = RNA_def_property(srna, "gpencil_fade_objects", PROP_FLOAT, PROP_NONE);
4450  RNA_def_property_float_sdna(prop, NULL, "overlay.gpencil_paper_opacity");
4451  RNA_def_property_range(prop, 0.0f, 1.0f);
4452  RNA_def_property_ui_text(prop, "Opacity", "Fade factor");
4454 
4455  /* Paper opacity factor */
4456  prop = RNA_def_property(srna, "gpencil_fade_layer", PROP_FLOAT, PROP_NONE);
4457  RNA_def_property_float_sdna(prop, NULL, "overlay.gpencil_fade_layer");
4458  RNA_def_property_range(prop, 0.0f, 1.0f);
4459  RNA_def_property_float_default(prop, 0.5f);
4461  prop, "Opacity", "Fade layer opacity for Grease Pencil layers except the active one");
4462  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4463 
4464  /* show edit lines */
4465  prop = RNA_def_property(srna, "use_gpencil_edit_lines", PROP_BOOLEAN, PROP_NONE);
4467  RNA_def_property_ui_text(prop, "Show Edit Lines", "Show Edit Lines when editing strokes");
4468  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4469 
4470  prop = RNA_def_property(srna, "use_gpencil_multiedit_line_only", PROP_BOOLEAN, PROP_NONE);
4472  RNA_def_property_ui_text(prop, "Lines Only", "Show Edit Lines only in multiframe");
4473  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4474 
4475  /* main grease pencil onion switch */
4476  prop = RNA_def_property(srna, "use_gpencil_onion_skin", PROP_BOOLEAN, PROP_NONE);
4479  prop, "Onion Skins", "Show ghosts of the keyframes before and after the current frame");
4480  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4481 
4482  /* vertex opacity */
4483  prop = RNA_def_property(srna, "vertex_opacity", PROP_FLOAT, PROP_FACTOR);
4484  RNA_def_property_float_sdna(prop, NULL, "vertex_opacity");
4485  RNA_def_property_range(prop, 0.0f, 1.0f);
4486  RNA_def_property_ui_text(prop, "Vertex Opacity", "Opacity for edit vertices");
4488  RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, "rna_GPencil_update");
4489 
4490  /* Vertex Paint opacity factor */
4491  prop = RNA_def_property(srna, "gpencil_vertex_paint_opacity", PROP_FLOAT, PROP_FACTOR);
4492  RNA_def_property_float_sdna(prop, NULL, "overlay.gpencil_vertex_paint_opacity");
4493  RNA_def_property_range(prop, 0.0f, 1.0f);
4494  RNA_def_property_float_default(prop, 1.0f);
4495  RNA_def_property_ui_text(prop, "Opacity", "Vertex Paint mix factor");
4496  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
4497 }
4498 
4500 {
4501  StructRNA *srna;
4502  PropertyRNA *prop;
4503 
4504  static const EnumPropertyItem rv3d_persp_items[] = {
4505  {RV3D_PERSP, "PERSP", 0, "Perspective", ""},
4506  {RV3D_ORTHO, "ORTHO", 0, "Orthographic", ""},
4507  {RV3D_CAMOB, "CAMERA", 0, "Camera", ""},
4508  {0, NULL, 0, NULL, NULL},
4509  };
4510 
4511  static const EnumPropertyItem bundle_drawtype_items[] = {
4512  {OB_PLAINAXES, "PLAIN_AXES", 0, "Plain Axes", ""},
4513  {OB_ARROWS, "ARROWS", 0, "Arrows", ""},
4514  {OB_SINGLE_ARROW, "SINGLE_ARROW", 0, "Single Arrow", ""},
4515  {OB_CIRCLE, "CIRCLE", 0, "Circle", ""},
4516  {OB_CUBE, "CUBE", 0, "Cube", ""},
4517  {OB_EMPTY_SPHERE, "SPHERE", 0, "Sphere", ""},
4518  {OB_EMPTY_CONE, "CONE", 0, "Cone", ""},
4519  {0, NULL, 0, NULL, NULL},
4520  };
4521 
4522  srna = RNA_def_struct(brna, "SpaceView3D", "Space");
4523  RNA_def_struct_sdna(srna, "View3D");
4524  RNA_def_struct_ui_text(srna, "3D View Space", "3D View space data");
4525 
4527  ((1 << RGN_TYPE_TOOL_HEADER) | (1 << RGN_TYPE_TOOLS) |
4528  (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_HUD)));
4529 
4530  prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE);
4532  RNA_def_property_pointer_sdna(prop, NULL, "camera");
4534  prop,
4535  "Camera",
4536  "Active camera used in this view (when unlocked from the scene's active camera)");
4537  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_camera_update");
4538 
4539  /* render border */
4540  prop = RNA_def_property(srna, "use_render_border", PROP_BOOLEAN, PROP_NONE);
4544  "Render Region",
4545  "Use a region within the frame size for rendered viewport "
4546  "(when not viewing through the camera)");
4548 
4549  prop = RNA_def_property(srna, "render_border_min_x", PROP_FLOAT, PROP_NONE);
4550  RNA_def_property_float_sdna(prop, NULL, "render_border.xmin");
4551  RNA_def_property_range(prop, 0.0f, 1.0f);
4552  RNA_def_property_ui_text(prop, "Region Minimum X", "Minimum X value for the render region");
4554 
4555  prop = RNA_def_property(srna, "render_border_min_y", PROP_FLOAT, PROP_NONE);
4556  RNA_def_property_float_sdna(prop, NULL, "render_border.ymin");
4557  RNA_def_property_range(prop, 0.0f, 1.0f);
4558  RNA_def_property_ui_text(prop, "Region Minimum Y", "Minimum Y value for the render region");
4560 
4561  prop = RNA_def_property(srna, "render_border_max_x", PROP_FLOAT, PROP_NONE);
4562  RNA_def_property_float_sdna(prop, NULL, "render_border.xmax");
4563  RNA_def_property_range(prop, 0.0f, 1.0f);
4564  RNA_def_property_ui_text(prop, "Region Maximum X", "Maximum X value for the render region");
4566 
4567  prop = RNA_def_property(srna, "render_border_max_y", PROP_FLOAT, PROP_NONE);
4568  RNA_def_property_float_sdna(prop, NULL, "render_border.ymax");
4569  RNA_def_property_range(prop, 0.0f, 1.0f);
4570  RNA_def_property_ui_text(prop, "Region Maximum Y", "Maximum Y value for the render region");
4572 
4573  prop = RNA_def_property(srna, "lock_object", PROP_POINTER, PROP_NONE);
4575  RNA_def_property_pointer_sdna(prop, NULL, "ob_center");
4577  prop, "Lock to Object", "3D View center is locked to this object's position");
4579 
4580  prop = RNA_def_property(srna, "lock_bone", PROP_STRING, PROP_NONE);
4581  RNA_def_property_string_sdna(prop, NULL, "ob_center_bone");
4583  prop, "Lock to Bone", "3D View center is locked to this bone's position");
4585 
4586  prop = RNA_def_property(srna, "lock_cursor", PROP_BOOLEAN, PROP_NONE);
4587  RNA_def_property_boolean_sdna(prop, NULL, "ob_center_cursor", 1);
4589  prop, "Lock to Cursor", "3D View center is locked to the cursor's position");
4591 
4592  prop = RNA_def_property(srna, "local_view", PROP_POINTER, PROP_NONE);
4593  RNA_def_property_pointer_sdna(prop, NULL, "localvd");
4595  prop,
4596  "Local View",
4597  "Display an isolated subset of objects, apart from the scene visibility");
4598 
4599  prop = RNA_def_property(srna, "lens", PROP_FLOAT, PROP_UNIT_CAMERA);
4600  RNA_def_property_float_sdna(prop, NULL, "lens");
4601  RNA_def_property_ui_text(prop, "Lens", "Viewport lens angle");
4602  RNA_def_property_range(prop, 1.0f, 250.0f);
4604 
4605  prop = RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE);
4606  RNA_def_property_range(prop, 1e-6f, FLT_MAX);
4607  RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 10, 3);
4609  prop, "Clip Start", "3D View near clipping distance (perspective view only)");
4611 
4612  prop = RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE);
4613  RNA_def_property_range(prop, 1e-6f, FLT_MAX);
4614  RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 10, 3);
4615  RNA_def_property_ui_text(prop, "Clip End", "3D View far clipping distance");
4617 
4618  prop = RNA_def_property(srna, "lock_camera", PROP_BOOLEAN, PROP_NONE);
4621  prop, "Lock Camera to View", "Enable view navigation within the camera view");
4623 
4624  prop = RNA_def_property(srna, "show_gizmo", PROP_BOOLEAN, PROP_NONE);
4626  RNA_def_property_ui_text(prop, "Show Gizmo", "Show gizmos of all types");
4628 
4629  prop = RNA_def_property(srna, "show_gizmo_navigate", PROP_BOOLEAN, PROP_NONE);
4631  RNA_def_property_ui_text(prop, "Navigate Gizmo", "Viewport navigation gizmo");
4633 
4634  prop = RNA_def_property(srna, "show_gizmo_context", PROP_BOOLEAN, PROP_NONE);
4636  RNA_def_property_ui_text(prop, "Context Gizmo", "Context sensitive gizmos for the active item");
4638 
4639  prop = RNA_def_property(srna, "show_gizmo_tool", PROP_BOOLEAN, PROP_NONE);
4641  RNA_def_property_ui_text(prop, "Tool Gizmo", "Active tool gizmo");
4643 
4644  /* Per object type gizmo display flags. */
4645 
4646  prop = RNA_def_property(srna, "show_gizmo_object_translate", PROP_BOOLEAN, PROP_NONE);
4648  RNA_def_property_ui_text(prop, "Show Object Location", "Gizmo to adjust location");
4650 
4651  prop = RNA_def_property(srna, "show_gizmo_object_rotate", PROP_BOOLEAN, PROP_NONE);
4653  RNA_def_property_ui_text(prop, "Show Object Rotation", "Gizmo to adjust rotation");
4655 
4656  prop = RNA_def_property(srna, "show_gizmo_object_scale", PROP_BOOLEAN, PROP_NONE);
4657  RNA_def_property_boolean_sdna(prop, NULL, "gizmo_show_object", V3D_GIZMO_SHOW_OBJECT_SCALE);
4658  RNA_def_property_ui_text(prop, "Show Object Scale", "Gizmo to adjust scale");
4660 
4661  /* Empty Object Data. */
4662  prop = RNA_def_property(srna, "show_gizmo_empty_image", PROP_BOOLEAN, PROP_NONE);
4664  RNA_def_property_ui_text(prop, "Show Empty Image", "Gizmo to adjust image size and position");
4666 
4667  prop = RNA_def_property(srna, "show_gizmo_empty_force_field", PROP_BOOLEAN, PROP_NONE);
4669  RNA_def_property_ui_text(prop, "Show Empty Force Field", "Gizmo to adjust the force field");
4671 
4672  /* Light Object Data. */
4673  prop = RNA_def_property(srna, "show_gizmo_light_size", PROP_BOOLEAN, PROP_NONE);
4674  RNA_def_property_boolean_sdna(prop, NULL, "gizmo_show_light", V3D_GIZMO_SHOW_LIGHT_SIZE);
4675  RNA_def_property_ui_text(prop, "Show Light Size", "Gizmo to adjust spot and area size");
4677 
4678  prop = RNA_def_property(srna, "show_gizmo_light_look_at", PROP_BOOLEAN, PROP_NONE);
4681  prop, "Show Light Look-At", "Gizmo to adjust the direction of the light");
4683 
4684  /* Camera Object Data. */
4685  prop = RNA_def_property(srna, "show_gizmo_camera_lens", PROP_BOOLEAN, PROP_NONE);
4686  RNA_def_property_boolean_sdna(prop, NULL, "gizmo_show_camera", V3D_GIZMO_SHOW_CAMERA_LENS);
4688  prop, "Show Camera Lens", "Gizmo to adjust camera focal length or orthographic scale");
4690 
4691  prop = RNA_def_property(srna, "show_gizmo_camera_dof_distance", PROP_BOOLEAN, PROP_NONE);
4694  "Show Camera Focus Distance",
4695  "Gizmo to adjust camera focus distance "
4696  "(depends on limits display)");
4698 
4699  prop = RNA_def_property(srna, "use_local_camera", PROP_BOOLEAN, PROP_NONE);
4700  RNA_def_property_boolean_negative_sdna(prop, NULL, "scenelock", 1);
4701  RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceView3D_use_local_camera_set");
4703  "Use Local Camera",
4704  "Use a local camera in this view, rather than scene's active camera");
4706 
4707  prop = RNA_def_property(srna, "region_3d", PROP_POINTER, PROP_NONE);
4708  RNA_def_property_struct_type(prop, "RegionView3D");
4709  RNA_def_property_pointer_funcs(prop, "rna_SpaceView3D_region_3d_get", NULL, NULL, NULL);
4711  prop, "3D Region", "3D region in this space, in case of quad view the camera region");
4712 
4713  prop = RNA_def_property(srna, "region_quadviews", PROP_COLLECTION, PROP_NONE);
4714  RNA_def_property_struct_type(prop, "RegionView3D");
4716  "rna_SpaceView3D_region_quadviews_begin",
4717  "rna_iterator_listbase_next",
4718  "rna_iterator_listbase_end",
4719  "rna_SpaceView3D_region_quadviews_get",
4720  NULL,
4721  NULL,
4722  NULL,
4723  NULL);
4725  "Quad View Regions",
4726  "3D regions (the third one defines quad view settings, "
4727  "the fourth one is same as 'region_3d')");
4728 
4729  prop = RNA_def_property(srna, "show_reconstruction", PROP_BOOLEAN, PROP_NONE);
4732  prop, "Show Reconstruction", "Display reconstruction data from active movie clip");
4734 
4735  prop = RNA_def_property(srna, "tracks_display_size", PROP_FLOAT, PROP_NONE);
4736  RNA_def_property_range(prop, 0.0, FLT_MAX);
4737  RNA_def_property_ui_range(prop, 0, 5, 1, 3);
4738  RNA_def_property_float_sdna(prop, NULL, "bundle_size");
4739  RNA_def_property_ui_text(prop, "Tracks Size", "Display size of tracks from reconstructed data");
4741 
4742  prop = RNA_def_property(srna, "tracks_display_type", PROP_ENUM, PROP_NONE);
4743  RNA_def_property_enum_sdna(prop, NULL, "bundle_drawtype");
4744  RNA_def_property_enum_items(prop, bundle_drawtype_items);
4745  RNA_def_property_ui_text(prop, "Tracks Display Type", "Viewport display style for tracks");
4747 
4748  prop = RNA_def_property(srna, "show_camera_path", PROP_BOOLEAN, PROP_NONE);
4750  RNA_def_property_ui_text(prop, "Show Camera Path", "Show reconstructed camera path");
4752 
4753  prop = RNA_def_property(srna, "show_bundle_names", PROP_BOOLEAN, PROP_NONE);
4756  prop, "Show 3D Marker Names", "Show names for reconstructed tracks objects");
4758 
4759  prop = RNA_def_property(srna, "use_local_collections", PROP_BOOLEAN, PROP_NONE);
4762  prop, "Local Collections", "Display a different set of collections in this viewport");
4765  prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_use_local_collections_update");
4766 
4767  /* Stereo Settings */
4768  prop = RNA_def_property(srna, "stereo_3d_eye", PROP_ENUM, PROP_NONE);
4769  RNA_def_property_enum_sdna(prop, NULL, "multiview_eye");
4771  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceView3D_stereo3d_camera_itemf");
4772  RNA_def_property_ui_text(prop, "Stereo Eye", "Current stereo eye being displayed");
4774 
4775  prop = RNA_def_property(srna, "stereo_3d_camera", PROP_ENUM, PROP_NONE);
4776  RNA_def_property_enum_sdna(prop, NULL, "stereo3d_camera");
4778  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceView3D_stereo3d_camera_itemf");
4779  RNA_def_property_ui_text(prop, "Camera", "");
4781 
4782  prop = RNA_def_property(srna, "show_stereo_3d_cameras", PROP_BOOLEAN, PROP_NONE);
4783  RNA_def_property_boolean_sdna(prop, NULL, "stereo3d_flag", V3D_S3D_DISPCAMERAS);
4784  RNA_def_property_ui_text(prop, "Cameras", "Show the left and right cameras");
4786 
4787  prop = RNA_def_property(srna, "show_stereo_3d_convergence_plane", PROP_BOOLEAN, PROP_NONE);
4788  RNA_def_property_boolean_sdna(prop, NULL, "stereo3d_flag", V3D_S3D_DISPPLANE);
4789  RNA_def_property_ui_text(prop, "Plane", "Show the stereo 3D convergence plane");
4791 
4792  prop = RNA_def_property(srna, "stereo_3d_convergence_plane_alpha", PROP_FLOAT, PROP_FACTOR);
4793  RNA_def_property_float_sdna(prop, NULL, "stereo3d_convergence_alpha");
4794  RNA_def_property_ui_text(prop, "Plane Alpha", "Opacity (alpha) of the convergence plane");
4796 
4797  prop = RNA_def_property(srna, "show_stereo_3d_volume", PROP_BOOLEAN, PROP_NONE);
4798  RNA_def_property_boolean_sdna(prop, NULL, "stereo3d_flag", V3D_S3D_DISPVOLUME);
4799  RNA_def_property_ui_text(prop, "Volume", "Show the stereo 3D frustum volume");
4801 
4802  prop = RNA_def_property(srna, "stereo_3d_volume_alpha", PROP_FLOAT, PROP_FACTOR);
4803  RNA_def_property_float_sdna(prop, NULL, "stereo3d_volume_alpha");
4804  RNA_def_property_ui_text(prop, "Volume Alpha", "Opacity (alpha) of the cameras' frustum volume");
4806 
4807  prop = RNA_def_property(srna, "mirror_xr_session", PROP_BOOLEAN, PROP_NONE);
4810  prop,
4811  "Mirror VR Session",
4812  "Synchronize the viewer perspective of virtual reality sessions with this 3D viewport");
4814  prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_mirror_xr_session_update");
4815 
4816  {
4817  struct {
4818  const char *name;
4819  int type_mask;
4820  const char *identifier[2];
4821  } info[] = {
4822  {"Mesh", (1 << OB_MESH), {"show_object_viewport_mesh", "show_object_select_mesh"}},
4823  {"Curve", (1 << OB_CURVE), {"show_object_viewport_curve", "show_object_select_curve"}},
4824  {"Surface", (1 << OB_SURF), {"show_object_viewport_surf", "show_object_select_surf"}},
4825  {"Meta", (1 << OB_MBALL), {"show_object_viewport_meta", "show_object_select_meta"}},
4826  {"Font", (1 << OB_FONT), {"show_object_viewport_font", "show_object_select_font"}},
4827  {"Hair", (1 << OB_HAIR), {"show_object_viewport_hair", "show_object_select_hair"}},
4828  {"Point Cloud",
4829  (1 << OB_POINTCLOUD),
4830  {"show_object_viewport_pointcloud", "show_object_select_pointcloud"}},
4831  {"Volume", (1 << OB_VOLUME), {"show_object_viewport_volume", "show_object_select_volume"}},
4832  {"Armature",
4833  (1 << OB_ARMATURE),
4834  {"show_object_viewport_armature", "show_object_select_armature"}},
4835  {"Lattice",
4836  (1 << OB_LATTICE),
4837  {"show_object_viewport_lattice", "show_object_select_lattice"}},
4838  {"Empty", (1 << OB_EMPTY), {"show_object_viewport_empty", "show_object_select_empty"}},
4839  {"Grease Pencil",
4840  (1 << OB_GPENCIL),
4841  {"show_object_viewport_grease_pencil", "show_object_select_grease_pencil"}},
4842  {"Camera", (1 << OB_CAMERA), {"show_object_viewport_camera", "show_object_select_camera"}},
4843  {"Light", (1 << OB_LAMP), {"show_object_viewport_light", "show_object_select_light"}},
4844  {"Speaker",
4845  (1 << OB_SPEAKER),
4846  {"show_object_viewport_speaker", "show_object_select_speaker"}},
4847  {"Light Probe",
4848  (1 << OB_LIGHTPROBE),
4849  {"show_object_viewport_light_probe", "show_object_select_light_probe"}},
4850  };
4851 
4852  const char *view_mask_member[2] = {
4853  "object_type_exclude_viewport",
4854  "object_type_exclude_select",
4855  };
4856  for (int mask_index = 0; mask_index < 2; mask_index++) {
4857  for (int type_index = 0; type_index < ARRAY_SIZE(info); type_index++) {
4858  prop = RNA_def_property(
4859  srna, info[type_index].identifier[mask_index], PROP_BOOLEAN, PROP_NONE);
4861  prop, NULL, view_mask_member[mask_index], info[type_index].type_mask);
4862  RNA_def_property_ui_text(prop, info[type_index].name, "");
4864  }
4865  }
4866 
4867  /* Helper for drawing the icon. */
4868  prop = RNA_def_property(srna, "icon_from_show_object_viewport", PROP_INT, PROP_NONE);
4870  prop, "rna_SpaceView3D_icon_from_show_object_viewport_get", NULL, NULL);
4872  RNA_def_property_ui_text(prop, "Visibility Icon", "");
4873  }
4874 
4875  /* Nested Structs */
4876  prop = RNA_def_property(srna, "shading", PROP_POINTER, PROP_NONE);
4878  RNA_def_property_struct_type(prop, "View3DShading");
4879  RNA_def_property_ui_text(prop, "Shading Settings", "Settings for shading in the 3D viewport");
4880 
4881  prop = RNA_def_property(srna, "overlay", PROP_POINTER, PROP_NONE);
4883  RNA_def_property_struct_type(prop, "View3DOverlay");
4884  RNA_def_property_pointer_funcs(prop, "rna_SpaceView3D_overlay_get", NULL, NULL, NULL);
4886  prop, "Overlay Settings", "Settings for display of overlays in the 3D viewport");
4887 
4890 
4891  /* *** Animated *** */
4893  /* region */
4894 
4895  srna = RNA_def_struct(brna, "RegionView3D", NULL);
4896  RNA_def_struct_sdna(srna, "RegionView3D");
4897  RNA_def_struct_ui_text(srna, "3D View Region", "3D View region data");
4898 
4899  prop = RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_NONE);
4901  RNA_def_property_ui_text(prop, "Lock", "Lock view rotation in side views");
4902  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_update");
4903 
4904  prop = RNA_def_property(srna, "show_sync_view", PROP_BOOLEAN, PROP_NONE);
4905  RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_BOXVIEW);
4906  RNA_def_property_ui_text(prop, "Box", "Sync view position between side views");
4907  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_update");
4908 
4909  prop = RNA_def_property(srna, "use_box_clip", PROP_BOOLEAN, PROP_NONE);
4910  RNA_def_property_boolean_sdna(prop, NULL, "viewlock", RV3D_BOXCLIP);
4912  prop, "Clip", "Clip objects based on what's visible in other side views");
4914  prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_RegionView3D_quadview_clip_update");
4915 
4916  prop = RNA_def_property(srna, "perspective_matrix", PROP_FLOAT, PROP_MATRIX);
4917  RNA_def_property_float_sdna(prop, NULL, "persmat");
4919  prop, PROP_EDITABLE); /* XXX: for now, it's too risky for users to do this */
4922  prop, "Perspective Matrix", "Current perspective matrix (``window_matrix * view_matrix``)");
4923 
4924  prop = RNA_def_property(srna, "window_matrix", PROP_FLOAT, PROP_MATRIX);
4925  RNA_def_property_float_sdna(prop, NULL, "winmat");
4928  RNA_def_property_ui_text(prop, "Window Matrix", "Current window matrix");
4929 
4930  prop = RNA_def_property(srna, "view_matrix", PROP_FLOAT, PROP_MATRIX);
4931  RNA_def_property_float_sdna(prop, NULL, "viewmat");
4933  RNA_def_property_float_funcs(prop, NULL, "rna_RegionView3D_view_matrix_set", NULL);
4934  RNA_def_property_ui_text(prop, "View Matrix", "Current view matrix");
4936 
4937  prop = RNA_def_property(srna, "view_perspective", PROP_ENUM, PROP_NONE);
4938  RNA_def_property_enum_sdna(prop, NULL, "persp");
4939  RNA_def_property_enum_items(prop, rv3d_persp_items);
4940  RNA_def_property_ui_text(prop, "Perspective", "View Perspective");
4942 
4943  prop = RNA_def_property(srna, "is_perspective", PROP_BOOLEAN, PROP_NONE);
4944  RNA_def_property_boolean_sdna(prop, NULL, "is_persp", 1);
4945  RNA_def_property_ui_text(prop, "Is Perspective", "");
4947 
4948  prop = RNA_def_property(srna, "is_orthographic_side_view", PROP_BOOLEAN, PROP_NONE);
4949  RNA_def_property_boolean_sdna(prop, NULL, "view", 0);
4950  RNA_def_property_boolean_funcs(prop, "rna_RegionView3D_is_orthographic_side_view_get", NULL);
4951  RNA_def_property_ui_text(prop, "Is Axis Aligned", "Is current view an orthographic side view");
4952 
4953  /* This isn't directly accessible from the UI, only an operator. */
4954  prop = RNA_def_property(srna, "use_clip_planes", PROP_BOOLEAN, PROP_NONE);
4956  RNA_def_property_ui_text(prop, "Use Clip Planes", "");
4957 
4958  prop = RNA_def_property(srna, "clip_planes", PROP_FLOAT, PROP_NONE);
4959  RNA_def_property_float_sdna(prop, NULL, "clip");
4960  RNA_def_property_multi_array(prop, 2, (int[]){6, 4});
4961  RNA_def_property_ui_text(prop, "Clip Planes", "");
4962 
4963  prop = RNA_def_property(srna, "view_location", PROP_FLOAT, PROP_TRANSLATION);
4964 # if 0
4965  RNA_def_property_float_sdna(prop, NULL, "ofs"); /* cant use because its negated */
4966 # else
4967  RNA_def_property_array(prop, 3);
4969  prop, "rna_RegionView3D_view_location_get", "rna_RegionView3D_view_location_set", NULL);
4970 # endif
4971  RNA_def_property_ui_text(prop, "View Location", "View pivot location");
4972  RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, RNA_TRANSLATION_PREC_DEFAULT);
4974 
4975  prop = RNA_def_property(
4976  srna, "view_rotation", PROP_FLOAT, PROP_QUATERNION); /* cant use because its inverted */
4977 # if 0
4978  RNA_def_property_float_sdna(prop, NULL, "viewquat");
4979 # else
4980  RNA_def_property_array(prop, 4);
4982  prop, "rna_RegionView3D_view_rotation_get", "rna_RegionView3D_view_rotation_set", NULL);
4983 # endif
4984  RNA_def_property_ui_text(prop, "View Rotation", "Rotation in quaternions (keep normalized)");
4986 
4987  /* not sure we need rna access to these but adding anyway */
4988  prop = RNA_def_property(srna, "view_distance", PROP_FLOAT, PROP_UNSIGNED);
4989  RNA_def_property_float_sdna(prop, NULL, "dist");
4990  RNA_def_property_ui_text(prop, "Distance", "Distance to the view location");
4992 
4993  prop = RNA_def_property(srna, "view_camera_zoom", PROP_FLOAT, PROP_UNSIGNED);
4994  RNA_def_property_float_sdna(prop, NULL, "camzoom");
4995  RNA_def_property_ui_text(prop, "Camera Zoom", "Zoom factor in camera view");
4998 
4999  prop = RNA_def_property(srna, "view_camera_offset", PROP_FLOAT, PROP_NONE);
5000  RNA_def_property_float_sdna(prop, NULL, "camdx");
5001  RNA_def_property_array(prop, 2);
5002  RNA_def_property_ui_text(prop, "Camera Offset", "View shift in camera view");
5004 
5005  RNA_api_region_view3d(srna);
5006 }
5007 
5009 {
5010  StructRNA *srna;
5011  PropertyRNA *prop;
5012 
5013  static const EnumPropertyItem tab_sync_items[] = {
5015  "ALWAYS",
5016  0,
5017  "Always",
5018  "Always change tabs when clicking an icon in an outliner"},
5020  "NEVER",
5021  0,
5022  "Never",
5023  "Never change tabs when clicking an icon in an outliner"},
5025  "AUTO",
5026  0,
5027  "Auto",
5028  "Change tabs only when this editor shares a border with an outliner"},
5029  {0, NULL, 0, NULL, NULL},
5030  };
5031 
5032  srna = RNA_def_struct(brna, "SpaceProperties", "Space");
5033  RNA_def_struct_sdna(srna, "SpaceProperties");
5034  RNA_def_struct_ui_text(srna, "Properties Space", "Properties space data");
5035 
5036  prop = RNA_def_property(srna, "context", PROP_ENUM, PROP_NONE);
5037  RNA_def_property_enum_sdna(prop, NULL, "mainb");
5040  prop, NULL, "rna_SpaceProperties_context_set", "rna_SpaceProperties_context_itemf");
5041  RNA_def_property_ui_text(prop, "", "");
5043  prop, NC_SPACE | ND_SPACE_PROPERTIES, "rna_SpaceProperties_context_update");
5044 
5045  /* pinned data */
5046  prop = RNA_def_property(srna, "pin_id", PROP_POINTER, PROP_NONE);
5047  RNA_def_property_pointer_sdna(prop, NULL, "pinid");
5048  RNA_def_property_struct_type(prop, "ID");
5049  /* note: custom set function is ONLY to avoid rna setting a user for this. */
5051  prop, NULL, "rna_SpaceProperties_pin_id_set", "rna_SpaceProperties_pin_id_typef", NULL);
5054  prop, NC_SPACE | ND_SPACE_PROPERTIES, "rna_SpaceProperties_pin_id_update");
5055 
5056  prop = RNA_def_property(srna, "use_pin_id", PROP_BOOLEAN, PROP_NONE);
5058  RNA_def_property_ui_text(prop, "Pin ID", "Use the pinned context");
5059 
5060  /* Property search. */
5061 
5062  prop = RNA_def_property(srna, "tab_search_results", PROP_BOOLEAN, PROP_NONE);
5063  RNA_def_property_array(prop, 0); /* Dynamic length, see next line. */
5066  RNA_def_property_boolean_funcs(prop, "rna_SpaceProperties_tab_search_results_get", NULL);
5067  RNA_def_property_dynamic_array_funcs(prop, "rna_SpaceProperties_tab_search_results_getlength");
5069  prop, "Tab Search Results", "Whether or not each visible tab has a search result");
5070 
5071  prop = RNA_def_property(srna, "search_filter", PROP_STRING, PROP_NONE);
5072  /* The search filter is stored in the property editor's runtime struct which
5073  * is only defined in an internal header, so use the getter / setter here. */
5075  "rna_SpaceProperties_search_filter_get",
5076  "rna_SpaceProperties_search_filter_length",
5077  "rna_SpaceProperties_search_filter_set");
5078  RNA_def_property_ui_text(prop, "Display Filter", "Live search filtering string");
5081  prop, NC_SPACE | ND_SPACE_PROPERTIES, "rna_SpaceProperties_search_filter_update");
5082 
5083  /* Outliner sync. */
5084  prop = RNA_def_property(srna, "outliner_sync", PROP_ENUM, PROP_NONE);
5085  RNA_def_property_enum_sdna(prop, NULL, "outliner_sync");
5086  RNA_def_property_enum_items(prop, tab_sync_items);
5088  "Outliner Sync",
5089  "Change to the corresponding tab when outliner data icons are clicked");
5091 }
5092 
5094 {
5095  StructRNA *srna;
5096  PropertyRNA *prop;
5097 
5098  srna = RNA_def_struct(brna, "SpaceImageOverlay", NULL);
5099  RNA_def_struct_sdna(srna, "SpaceImage");
5100  RNA_def_struct_nested(brna, srna, "SpaceImageEditor");
5101  RNA_def_struct_path_func(srna, "rna_SpaceImageOverlay_path");
5103  srna, "Overlay Settings", "Settings for display of overlays in the UV/Image editor");
5104 
5105  prop = RNA_def_property(srna, "show_overlays", PROP_BOOLEAN, PROP_NONE);
5107  RNA_def_property_ui_text(prop, "Show Overlays", "Display overlays like UV Maps and Metadata");
5108 }
5109 
5111 {
5112  StructRNA *srna;
5113  PropertyRNA *prop;
5114 
5115  srna = RNA_def_struct(brna, "SpaceImageEditor", "Space");
5116  RNA_def_struct_sdna(srna, "SpaceImage");
5117  RNA_def_struct_ui_text(srna, "Space Image Editor", "Image and UV editor space data");
5118 
5120  ((1 << RGN_TYPE_TOOL_HEADER) | (1 << RGN_TYPE_TOOLS) |
5121  (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_HUD)));
5122 
5123  /* image */
5124  prop = RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
5125  RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceImageEditor_image_set", NULL, NULL);
5126  RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space");
5129  prop,
5130  NC_GEOM | ND_DATA,
5131  "rna_SpaceImageEditor_image_update"); /* is handled in image editor too */
5132 
5133  prop = RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
5135  RNA_def_property_pointer_sdna(prop, NULL, "iuser");
5137  prop,
5138  "Image User",
5139  "Parameters defining which layer, pass and frame of the image is displayed");
5141 
5142  prop = RNA_def_property(srna, "scopes", PROP_POINTER, PROP_NONE);
5143  RNA_def_property_pointer_sdna(prop, NULL, "scopes");
5144  RNA_def_property_struct_type(prop, "Scopes");
5145  RNA_def_property_ui_text(prop, "Scopes", "Scopes to visualize image statistics");
5147  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_scopes_update");
5148 
5149  prop = RNA_def_property(srna, "use_image_pin", PROP_BOOLEAN, PROP_NONE);
5150  RNA_def_property_boolean_sdna(prop, NULL, "pin", 0);
5152  prop, "Image Pin", "Display current image regardless of object selection");
5153  RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
5155 
5156  prop = RNA_def_property(srna, "sample_histogram", PROP_POINTER, PROP_NONE);
5157  RNA_def_property_pointer_sdna(prop, NULL, "sample_line_hist");
5158  RNA_def_property_struct_type(prop, "Histogram");
5159  RNA_def_property_ui_text(prop, "Line Sample", "Sampled colors along line");
5160 
5161  prop = RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
5162  RNA_def_property_array(prop, 2);
5164  RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_zoom_get", NULL, NULL);
5165  RNA_def_property_ui_text(prop, "Zoom", "Zoom factor");
5166 
5167  /* image draw */
5168  prop = RNA_def_property(srna, "show_repeat", PROP_BOOLEAN, PROP_NONE);
5171  prop, "Display Repeated", "Display the image repeated outside of the main view");
5173 
5174  prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE);
5176  RNA_def_property_ui_text(prop, "Show Annotation", "Show annotations for this view");
5178 
5179  prop = RNA_def_property(srna, "display_channels", PROP_ENUM, PROP_NONE);
5183  "rna_SpaceImageEditor_display_channels_get",
5184  NULL,
5185  "rna_SpaceImageEditor_display_channels_itemf");
5186  RNA_def_property_ui_text(prop, "Display Channels", "Channels of the image to display");
5188 
5189  prop = RNA_def_property(srna, "show_stereo_3d", PROP_BOOLEAN, PROP_NONE);
5191  prop, "rna_SpaceImageEditor_show_stereo_get", "rna_SpaceImageEditor_show_stereo_set");
5192  RNA_def_property_ui_text(prop, "Show Stereo", "Display the image in Stereo 3D");
5193  RNA_def_property_ui_icon(prop, ICON_CAMERA_STEREO, 0);
5195  prop, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_show_stereo_update");
5196 
5197  /* uv */
5198  prop = RNA_def_property(srna, "uv_editor", PROP_POINTER, PROP_NONE);
5200  RNA_def_property_struct_type(prop, "SpaceUVEditor");
5201  RNA_def_property_pointer_funcs(prop, "rna_SpaceImageEditor_uvedit_get", NULL, NULL, NULL);
5202  RNA_def_property_ui_text(prop, "UV Editor", "UV editor settings");
5203 
5204  /* mode (hidden in the UI, see 'ui_mode') */
5205  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
5206  RNA_def_property_enum_sdna(prop, NULL, "mode");
5208  RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
5209  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_mode_update");
5210 
5211  prop = RNA_def_property(srna, "ui_mode", PROP_ENUM, PROP_NONE);
5212  RNA_def_property_enum_sdna(prop, NULL, "mode");
5214  RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
5215  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_mode_update");
5216 
5217  /* transform */
5218  prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ);
5219  RNA_def_property_array(prop, 2);
5221  "rna_SpaceImageEditor_cursor_location_get",
5222  "rna_SpaceImageEditor_cursor_location_set",
5223  NULL);
5224  RNA_def_property_ui_text(prop, "2D Cursor Location", "2D cursor location for this view");
5226 
5227  prop = RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
5228  RNA_def_property_enum_sdna(prop, NULL, "around");
5230  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceImageEditor_pivot_itemf");
5231  RNA_def_property_ui_text(prop, "Pivot", "Rotation/Scaling Pivot");
5233 
5234  /* grease pencil */
5235  prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
5236  RNA_def_property_pointer_sdna(prop, NULL, "gpd");
5237  RNA_def_property_struct_type(prop, "GreasePencil");
5239  prop, NULL, NULL, NULL, "rna_GPencil_datablocks_annotations_poll");
5241  RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space");
5243 
5244  /* update */
5245  prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
5246  RNA_def_property_boolean_sdna(prop, NULL, "lock", 0);
5248  "Update Automatically",
5249  "Update other affected window spaces automatically to reflect changes "
5250  "during interactive operations such as transform");
5251 
5252  /* state */
5253  prop = RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE);
5254  RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_render_get", NULL);
5256  RNA_def_property_ui_text(prop, "Show Render", "Show render related properties");
5257 
5258  prop = RNA_def_property(srna, "show_paint", PROP_BOOLEAN, PROP_NONE);
5259  RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_paint_get", NULL);
5261  RNA_def_property_ui_text(prop, "Show Paint", "Show paint related properties");
5262 
5263  prop = RNA_def_property(srna, "show_uvedit", PROP_BOOLEAN, PROP_NONE);
5264  RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_uvedit_get", NULL);
5266  RNA_def_property_ui_text(prop, "Show UV Editor", "Show UV editing related properties");
5267 
5268  prop = RNA_def_property(srna, "show_maskedit", PROP_BOOLEAN, PROP_NONE);
5269  RNA_def_property_boolean_funcs(prop, "rna_SpaceImageEditor_show_maskedit_get", NULL);
5271  RNA_def_property_ui_text(prop, "Show Mask Editor", "Show Mask editing related properties");
5272 
5273  /* Overlays */
5274  prop = RNA_def_property(srna, "overlay", PROP_POINTER, PROP_NONE);
5276  RNA_def_property_struct_type(prop, "SpaceImageOverlay");
5277  RNA_def_property_pointer_funcs(prop, "rna_SpaceImage_overlay_get", NULL, NULL, NULL);
5279  prop, "Overlay Settings", "Settings for display of overlays in the UV/Image editor");
5280 
5281  rna_def_space_image_uv(brna);
5283 
5284  /* mask */
5285  rna_def_space_mask_info(srna, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_mask_set");
5286 }
5287 
5289 {
5290  StructRNA *srna;
5291  PropertyRNA *prop;
5292 
5293  static const EnumPropertyItem display_mode_items[] = {
5294  {SEQ_DRAW_IMG_IMBUF, "IMAGE", ICON_SEQ_PREVIEW, "Image Preview", ""},
5295  {SEQ_DRAW_IMG_WAVEFORM, "WAVEFORM", ICON_SEQ_LUMA_WAVEFORM, "Luma Waveform", ""},
5296  {SEQ_DRAW_IMG_VECTORSCOPE, "VECTOR_SCOPE", ICON_SEQ_CHROMA_SCOPE, "Chroma Vectorscope", ""},
5297  {SEQ_DRAW_IMG_HISTOGRAM, "HISTOGRAM", ICON_SEQ_HISTOGRAM, "Histogram", ""},
5298  {0, NULL, 0, NULL, NULL},
5299  };
5300 
5301  static const EnumPropertyItem proxy_render_size_items[] = {
5302  {SEQ_RENDER_SIZE_NONE, "NONE", 0, "No display", ""},
5303  {SEQ_RENDER_SIZE_SCENE, "SCENE", 0, "Scene size", ""},
5304  {SEQ_RENDER_SIZE_PROXY_25, "PROXY_25", 0, "25%", ""},
5305  {SEQ_RENDER_SIZE_PROXY_50, "PROXY_50", 0, "50%", ""},
5306  {SEQ_RENDER_SIZE_PROXY_75, "PROXY_75", 0, "75%", ""},
5307  {SEQ_RENDER_SIZE_PROXY_100, "PROXY_100", 0, "100%", ""},
5308  {0, NULL, 0, NULL, NULL},
5309  };
5310 
5311  static const EnumPropertyItem overlay_type_items[] = {
5312  {SEQ_DRAW_OVERLAY_RECT, "RECTANGLE", 0, "Rectangle", "Show rectangle area overlay"},
5313  {SEQ_DRAW_OVERLAY_REFERENCE, "REFERENCE", 0, "Reference", "Show reference frame only"},
5314  {SEQ_DRAW_OVERLAY_CURRENT, "CURRENT", 0, "Current", "Show current frame only"},
5315  {0, NULL, 0, NULL, NULL},
5316  };
5317 
5318  static const EnumPropertyItem preview_channels_items[] = {
5319  {SEQ_USE_ALPHA,
5320  "COLOR_ALPHA",
5321  ICON_IMAGE_RGB_ALPHA,
5322  "Color and Alpha",
5323  "Display image with RGB colors and alpha transparency"},
5324  {0, "COLOR", ICON_IMAGE_RGB, "Color", "Display image with RGB colors"},
5325  {0, NULL, 0, NULL, NULL},
5326  };
5327 
5328  static const EnumPropertyItem waveform_type_display_items[] = {
5330  "NO_WAVEFORMS",
5331  0,
5332  "Waveforms Off",
5333  "Don't display waveforms for any sound strips"},
5335  "ALL_WAVEFORMS",
5336  0,
5337  "Waveforms On",
5338  "Display waveforms for all sound strips"},
5339  {0,
5340  "DEFAULT_WAVEFORMS",
5341  0,
5342  "Use Strip Option",
5343  "Display waveforms depending on strip setting"},
5344  {0, NULL, 0, NULL, NULL},
5345  };
5346 
5347  srna = RNA_def_struct(brna, "SpaceSequenceEditor", "Space");
5348  RNA_def_struct_sdna(srna, "SpaceSeq");
5349  RNA_def_struct_ui_text(srna, "Space Sequence Editor", "Sequence editor space data");
5350 
5352  (1 << RGN_TYPE_TOOL_HEADER) | (1 << RGN_TYPE_UI) |
5353  (1 << RGN_TYPE_TOOLS) | (1 << RGN_TYPE_HUD));
5354 
5355  /* view type, fairly important */
5356  prop = RNA_def_property(srna, "view_type", PROP_ENUM, PROP_NONE);
5357  RNA_def_property_enum_sdna(prop, NULL, "view");
5360  prop, "View Type", "Type of the Sequencer view (sequencer, preview or both)");
5361  RNA_def_property_update(prop, 0, "rna_Sequencer_view_type_update");
5362 
5363  /* display type, fairly important */
5364  prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
5365  RNA_def_property_enum_sdna(prop, NULL, "mainb");
5366  RNA_def_property_enum_items(prop, display_mode_items);
5368  prop, "Display Mode", "View mode to use for displaying sequencer output");
5370 
5371  /* flags */
5372  prop = RNA_def_property(srna, "show_frames", PROP_BOOLEAN, PROP_NONE);
5374  RNA_def_property_ui_text(prop, "Display Frames", "Display frames rather than seconds");
5376 
5377  prop = RNA_def_property(srna, "use_marker_sync", PROP_BOOLEAN, PROP_NONE);
5379  RNA_def_property_ui_text(prop, "Sync Markers", "Transform markers as well as strips");
5381 
5382  prop = RNA_def_property(srna, "show_separate_color", PROP_BOOLEAN, PROP_NONE);
5384  RNA_def_property_ui_text(prop, "Separate Colors", "Separate color channels in preview");
5386 
5387  prop = RNA_def_property(srna, "show_safe_areas", PROP_BOOLEAN, PROP_NONE);
5390  prop, "Safe Areas", "Show TV title safe and action safe areas in preview");
5392 
5393  prop = RNA_def_property(srna, "show_safe_center", PROP_BOOLEAN, PROP_NONE);
5396  prop, "Center-Cut Safe Areas", "Show safe areas to fit content in a different aspect ratio");
5398 
5399  prop = RNA_def_property(srna, "show_metadata", PROP_BOOLEAN, PROP_NONE);
5401  RNA_def_property_ui_text(prop, "Show Metadata", "Show metadata of first visible strip");
5403 
5404  prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
5406  RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
5408 
5409  prop = RNA_def_property(srna, "show_markers", PROP_BOOLEAN, PROP_NONE);
5412  prop,
5413  "Show Markers",
5414  "If any exists, show markers in a separate row at the bottom of the editor");
5416 
5417  prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE);
5419  RNA_def_property_ui_text(prop, "Show Annotation", "Show annotations for this view");
5421 
5422  prop = RNA_def_property(srna, "display_channel", PROP_INT, PROP_NONE);
5423  RNA_def_property_int_sdna(prop, NULL, "chanshown");
5425  prop,
5426  "Display Channel",
5427  "The channel number shown in the image preview. 0 is the result of all strips combined");
5428  RNA_def_property_range(prop, -5, MAXSEQ);
5429  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_update_cache");
5430 
5431  prop = RNA_def_property(srna, "preview_channels", PROP_ENUM, PROP_NONE);
5433  RNA_def_property_enum_items(prop, preview_channels_items);
5434  RNA_def_property_ui_text(prop, "Display Channels", "Channels of the preview to display");
5435  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_update_cache");
5436 
5437  prop = RNA_def_property(srna, "waveform_display_type", PROP_ENUM, PROP_NONE);
5439  RNA_def_property_enum_items(prop, waveform_type_display_items);
5440  RNA_def_property_ui_text(prop, "Waveform Display", "How Waveforms are displayed");
5442 
5443  prop = RNA_def_property(srna, "use_zoom_to_fit", PROP_BOOLEAN, PROP_NONE);
5446  prop, "Zoom to Fit", "Automatically zoom preview image to make it fully fit the region");
5448 
5449  prop = RNA_def_property(srna, "show_overexposed", PROP_INT, PROP_NONE);
5450  RNA_def_property_int_sdna(prop, NULL, "zebra");
5451  RNA_def_property_ui_text(prop, "Show Overexposed", "Show overexposed areas with zebra stripes");
5452  RNA_def_property_range(prop, 0, 110);
5454 
5455  prop = RNA_def_property(srna, "proxy_render_size", PROP_ENUM, PROP_NONE);
5456  RNA_def_property_enum_sdna(prop, NULL, "render_size");
5457  RNA_def_property_enum_items(prop, proxy_render_size_items);
5459  "Proxy Render Size",
5460  "Display preview using full resolution or different proxy resolutions");
5463  prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_render_size_update");
5464 
5465  prop = RNA_def_property(srna, "use_proxies", PROP_BOOLEAN, PROP_NONE);
5468  prop, "Use Proxies", "Use optimized files for faster scrubbing when available");
5470 
5471  /* grease pencil */
5472  prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE);
5473  RNA_def_property_pointer_sdna(prop, NULL, "gpd");
5474  RNA_def_property_struct_type(prop, "GreasePencil");
5476  prop, NULL, NULL, NULL, "rna_GPencil_datablocks_annotations_poll");
5478  RNA_def_property_ui_text(prop, "Grease Pencil", "Grease Pencil data for this Preview region");
5480 
5481  prop = RNA_def_property(srna, "overlay_type", PROP_ENUM, PROP_NONE);
5482  RNA_def_property_enum_sdna(prop, NULL, "overlay_type");
5483  RNA_def_property_enum_items(prop, overlay_type_items);
5484  RNA_def_property_ui_text(prop, "Overlay Type", "Overlay display method");
5486 
5487  prop = RNA_def_property(srna, "show_backdrop", PROP_BOOLEAN, PROP_NONE);
5489  RNA_def_property_ui_text(prop, "Use Backdrop", "Display result under strips");
5491 
5492  prop = RNA_def_property(srna, "show_strip_offset", PROP_BOOLEAN, PROP_NONE);
5494  RNA_def_property_ui_text(prop, "Show Offsets", "Display strip in/out offsets");
5496 
5497  prop = RNA_def_property(srna, "show_fcurves", PROP_BOOLEAN, PROP_NONE);
5499  RNA_def_property_ui_text(prop, "Show F-Curves", "Display strip opacity/volume curve");
5501 
5502  prop = RNA_def_property(srna, "show_strip_overlay", PROP_BOOLEAN, PROP_NONE);
5504  RNA_def_property_ui_text(prop, "Show Overlay", "");
5506 
5507  prop = RNA_def_property(srna, "show_strip_name", PROP_BOOLEAN, PROP_NONE);
5509  RNA_def_property_ui_text(prop, "Show Name", "");
5511 
5512  prop = RNA_def_property(srna, "show_strip_source", PROP_BOOLEAN, PROP_NONE);
5515  prop, "Show Source", "Display path to source file, or name of source datablock");
5517 
5518  prop = RNA_def_property(srna, "show_strip_duration", PROP_BOOLEAN, PROP_NONE);
5520  RNA_def_property_ui_text(prop, "Show Duration", "");
5522 
5523  prop = RNA_def_property(srna, "show_transform_preview", PROP_BOOLEAN, PROP_NONE);
5525  RNA_def_property_ui_text(prop, "Transform Preview", "Show preview of the transformed frames");
5527 }
5528 
5529 static void rna_def_space_text(BlenderRNA *brna)
5530 {
5531  StructRNA *srna;
5532  PropertyRNA *prop;
5533  FunctionRNA *func;
5534 
5535  srna = RNA_def_struct(brna, "SpaceTextEditor", "Space");
5536  RNA_def_struct_sdna(srna, "SpaceText");
5537  RNA_def_struct_ui_text(srna, "Space Text Editor", "Text editor space data");
5538 
5540 
5541  /* text */
5542  prop = RNA_def_property(srna, "text", PROP_POINTER, PROP_NONE);
5544  RNA_def_property_ui_text(prop, "Text", "Text displayed and edited in this space");
5545  RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceTextEditor_text_set", NULL, NULL);
5547 
5548  /* display */
5549  prop = RNA_def_property(srna, "show_word_wrap", PROP_BOOLEAN, PROP_NONE);
5550  RNA_def_property_boolean_sdna(prop, NULL, "wordwrap", 0);
5551  RNA_def_property_boolean_funcs(prop, NULL, "rna_SpaceTextEditor_word_wrap_set");
5553  prop, "Word Wrap", "Wrap words if there is not enough horizontal space");
5554  RNA_def_property_ui_icon(prop, ICON_WORDWRAP_ON, 0);
5556 
5557  prop = RNA_def_property(srna, "show_line_numbers", PROP_BOOLEAN, PROP_NONE);
5558  RNA_def_property_boolean_sdna(prop, NULL, "showlinenrs", 0);
5559  RNA_def_property_ui_text(prop, "Line Numbers", "Show line numbers next to the text");
5560  RNA_def_property_ui_icon(prop, ICON_LINENUMBERS_ON, 0);
5562 
5563  func = RNA_def_function(srna,
5564  "is_syntax_highlight_supported",
5565  "rna_SpaceTextEditor_text_is_syntax_highlight_supported");
5567  RNA_def_boolean(func, "is_syntax_highlight_supported", false, "", ""));
5569  "Returns True if the editor supports syntax highlighting "
5570  "for the current text datablock");
5571 
5572  prop = RNA_def_property(srna, "show_syntax_highlight", PROP_BOOLEAN, PROP_NONE);
5573  RNA_def_property_boolean_sdna(prop, NULL, "showsyntax", 0);
5574  RNA_def_property_ui_text(prop, "Syntax Highlight", "Syntax highlight for scripting");
5575  RNA_def_property_ui_icon(prop, ICON_SYNTAX_ON, 0);
5577 
5578  prop = RNA_def_property(srna, "show_line_highlight", PROP_BOOLEAN, PROP_NONE);
5579  RNA_def_property_boolean_sdna(prop, NULL, "line_hlight", 0);
5580  RNA_def_property_ui_text(prop, "Highlight Line", "Highlight the current line");
5582 
5583  prop = RNA_def_property(srna, "tab_width", PROP_INT, PROP_NONE);
5584  RNA_def_property_int_sdna(prop, NULL, "tabnumber");
5585  RNA_def_property_range(prop, 2, 8);
5586  RNA_def_property_ui_text(prop, "Tab Width", "Number of spaces to display tabs with");
5587  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TEXT, "rna_SpaceTextEditor_updateEdited");
5588 
5589  prop = RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE);
5590  RNA_def_property_int_sdna(prop, NULL, "lheight");
5591  RNA_def_property_range(prop, 8, 32);
5592  RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text");
5594 
5595  prop = RNA_def_property(srna, "show_margin", PROP_BOOLEAN, PROP_NONE);
5597  RNA_def_property_ui_text(prop, "Show Margin", "Show right margin");
5599 
5600  prop = RNA_def_property(srna, "margin_column", PROP_INT, PROP_NONE);
5601  RNA_def_property_int_sdna(prop, NULL, "margin_column");
5602  RNA_def_property_range(prop, 0, 1024);
5603  RNA_def_property_ui_text(prop, "Margin Column", "Column number to show right margin at");
5605 
5606  prop = RNA_def_property(srna, "top", PROP_INT, PROP_NONE);
5607  RNA_def_property_int_sdna(prop, NULL, "top");
5608  RNA_def_property_range(prop, 0, INT_MAX);
5609  RNA_def_property_ui_text(prop, "Top Line", "Top line visible");
5611 
5612  prop = RNA_def_property(srna, "visible_lines", PROP_INT, PROP_NONE);
5614  RNA_def_property_int_sdna(prop, NULL, "runtime.viewlines");
5616  prop, "Visible Lines", "Amount of lines that can be visible in current editor");
5617 
5618  /* functionality options */
5619  prop = RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
5620  RNA_def_property_boolean_sdna(prop, NULL, "overwrite", 1);
5622  prop, "Overwrite", "Overwrite characters when typing rather than inserting them");
5624 
5625  prop = RNA_def_property(srna, "use_live_edit", PROP_BOOLEAN, PROP_NONE);
5626  RNA_def_property_boolean_sdna(prop, NULL, "live_edit", 1);
5627  RNA_def_property_ui_text(prop, "Live Edit", "Run python while editing");
5629 
5630  /* find */
5631  prop = RNA_def_property(srna, "use_find_all", PROP_BOOLEAN, PROP_NONE);
5634  prop, "Find All", "Search in all text data-blocks, instead of only the active one");
5636 
5637  prop = RNA_def_property(srna, "use_find_wrap", PROP_BOOLEAN, PROP_NONE);
5640  prop, "Find Wrap", "Search again from the start of the file when reaching the end");
5642 
5643  prop = RNA_def_property(srna, "use_match_case", PROP_BOOLEAN, PROP_NONE);
5646  prop, "Match Case", "Search string is sensitive to uppercase and lowercase letters");
5648 
5649  prop = RNA_def_property(srna, "find_text", PROP_STRING, PROP_NONE);
5650  RNA_def_property_string_sdna(prop, NULL, "findstr");
5651  RNA_def_property_ui_text(prop, "Find Text", "Text to search for with the find tool");
5653 
5654  prop = RNA_def_property(srna, "replace_text", PROP_STRING, PROP_NONE);
5655  RNA_def_property_string_sdna(prop, NULL, "replacestr");
5657  prop, "Replace Text", "Text to replace selected text with using the replace tool");
5659 
5660  RNA_api_space_text(srna);
5661 }
5662 
5664 {
5665  StructRNA *srna;
5666  PropertyRNA *prop;
5667 
5668  srna = RNA_def_struct(brna, "SpaceDopeSheetEditor", "Space");
5669  RNA_def_struct_sdna(srna, "SpaceAction");
5670  RNA_def_struct_ui_text(srna, "Space Dope Sheet Editor", "Dope Sheet space data");
5671 
5673 
5674  /* data */
5675  prop = RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
5678  prop, NULL, "rna_SpaceDopeSheetEditor_action_set", NULL, "rna_Action_actedit_assign_poll");
5679  RNA_def_property_ui_text(prop, "Action", "Action displayed and edited in this space");
5682  prop, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, "rna_SpaceDopeSheetEditor_action_update");
5683 
5684  /* mode (hidden in the UI, see 'ui_mode') */
5685  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
5686  RNA_def_property_enum_sdna(prop, NULL, "mode");
5688  RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
5691  prop, NC_SPACE | ND_SPACE_DOPESHEET, "rna_SpaceDopeSheetEditor_mode_update");
5692 
5693  prop = RNA_def_property(srna, "ui_mode", PROP_ENUM, PROP_NONE);
5694  RNA_def_property_enum_sdna(prop, NULL, "mode");
5696  RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
5699  prop, NC_SPACE | ND_SPACE_DOPESHEET, "rna_SpaceDopeSheetEditor_mode_update");
5700 
5701  /* display */
5702  prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
5704  RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
5706 
5707  prop = RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
5709  RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels");
5711 
5712  prop = RNA_def_property(srna, "show_pose_markers", PROP_BOOLEAN, PROP_NONE);
5715  "Show Pose Markers",
5716  "Show markers belonging to the active action instead of Scene markers "
5717  "(Action and Shape Key Editors only)");
5719 
5720  prop = RNA_def_property(srna, "show_interpolation", PROP_BOOLEAN, PROP_NONE);
5723  "Show Handles and Interpolation",
5724  "Display keyframe handle types and non-bezier interpolation modes");
5726 
5727  prop = RNA_def_property(srna, "show_extremes", PROP_BOOLEAN, PROP_NONE);
5730  "Show Curve Extremes",
5731  "Mark keyframes where the key value flow changes direction, based on "
5732  "comparison with adjacent keys");
5734 
5735  prop = RNA_def_property(srna, "show_markers", PROP_BOOLEAN, PROP_NONE);
5738  prop,
5739  "Show Markers",
5740  "If any exists, show markers in a separate row at the bottom of the editor");
5742 
5743  /* editing */
5744  prop = RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE);
5746  RNA_def_property_ui_text(prop, "Auto-Merge Keyframes", "Automatically merge nearby keyframes");
5748 
5749  prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
5752  prop,
5753  "Realtime Updates",
5754  "When transforming keyframes, changes to the animation data are flushed to other views");
5756 
5757  prop = RNA_def_property(srna, "use_marker_sync", PROP_BOOLEAN, PROP_NONE);
5759  RNA_def_property_ui_text(prop, "Sync Markers", "Sync Markers with keyframe edits");
5760 
5761  /* dopesheet */
5762  prop = RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
5763  RNA_def_property_struct_type(prop, "DopeSheet");
5764  RNA_def_property_pointer_sdna(prop, NULL, "ads");
5765  RNA_def_property_ui_text(prop, "Dope Sheet", "Settings for filtering animation data");
5766 
5767  /* autosnap */
5768  prop = RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE);
5769  RNA_def_property_enum_sdna(prop, NULL, "autosnap");
5772  prop, "Auto Snap", "Automatic time snapping settings for transformations");
5774 
5775  /* displaying cache status */
5776  prop = RNA_def_property(srna, "show_cache", PROP_BOOLEAN, PROP_NONE);
5777  RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_DISPLAY);
5778  RNA_def_property_ui_text(prop, "Show Cache", "Show the status of cached frames in the timeline");
5780 
5781  prop = RNA_def_property(srna, "cache_softbody", PROP_BOOLEAN, PROP_NONE);
5782  RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_SOFTBODY);
5783  RNA_def_property_ui_text(prop, "Softbody", "Show the active object's softbody point cache");
5785 
5786  prop = RNA_def_property(srna, "cache_particles", PROP_BOOLEAN, PROP_NONE);
5787  RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_PARTICLES);
5788  RNA_def_property_ui_text(prop, "Particles", "Show the active object's particle point cache");
5790 
5791  prop = RNA_def_property(srna, "cache_cloth", PROP_BOOLEAN, PROP_NONE);
5792  RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_CLOTH);
5793  RNA_def_property_ui_text(prop, "Cloth", "Show the active object's cloth point cache");
5795 
5796  prop = RNA_def_property(srna, "cache_smoke", PROP_BOOLEAN, PROP_NONE);
5797  RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_SMOKE);
5798  RNA_def_property_ui_text(prop, "Smoke", "Show the active object's smoke cache");
5800 
5801  prop = RNA_def_property(srna, "cache_dynamicpaint", PROP_BOOLEAN, PROP_NONE);
5803  RNA_def_property_ui_text(prop, "Dynamic Paint", "Show the active object's Dynamic Paint cache");
5805 
5806  prop = RNA_def_property(srna, "cache_rigidbody", PROP_BOOLEAN, PROP_NONE);
5807  RNA_def_property_boolean_sdna(prop, NULL, "cache_display", TIME_CACHE_RIGIDBODY);
5808  RNA_def_property_ui_text(prop, "Rigid Body", "Show the active object's Rigid Body cache");
5810 }
5811 
5813 {
5814  StructRNA *srna;
5815  PropertyRNA *prop;
5816 
5817  /* this is basically the same as the one for the 3D-View, but with some entries omitted */
5818  static const EnumPropertyItem gpivot_items[] = {
5820  "BOUNDING_BOX_CENTER",
5821  ICON_PIVOT_BOUNDBOX,
5822  "Bounding Box Center",
5823  ""},
5824  {V3D_AROUND_CURSOR, "CURSOR", ICON_PIVOT_CURSOR, "2D Cursor", ""},
5826  "INDIVIDUAL_ORIGINS",
5827  ICON_PIVOT_INDIVIDUAL,
5828  "Individual Centers",
5829  ""},
5830  /*{V3D_AROUND_CENTER_MEDIAN, "MEDIAN_POINT", 0, "Median Point", ""}, */
5831  /*{V3D_AROUND_ACTIVE, "ACTIVE_ELEMENT", 0, "Active Element", ""}, */
5832  {0, NULL, 0, NULL, NULL},
5833  };
5834 
5835  srna = RNA_def_struct(brna, "SpaceGraphEditor", "Space");
5836  RNA_def_struct_sdna(srna, "SpaceGraph");
5837  RNA_def_struct_ui_text(srna, "Space Graph Editor", "Graph Editor space data");
5838 
5840 
5841  /* mode */
5842  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
5843  RNA_def_property_enum_sdna(prop, NULL, "mode");
5845  RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
5848  prop, NC_SPACE | ND_SPACE_GRAPH, "rna_SpaceGraphEditor_display_mode_update");
5849 
5850  /* display */
5851  prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
5853  RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
5855 
5856  prop = RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
5858  RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels");
5860 
5861  prop = RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
5863  RNA_def_property_ui_text(prop, "Show Handles", "Show handles of Bezier control points");
5865 
5866  prop = RNA_def_property(srna, "use_only_selected_curves_handles", PROP_BOOLEAN, PROP_NONE);
5869  "Only Selected Curve Keyframes",
5870  "Only keyframes of selected F-Curves are visible and editable");
5872 
5873  prop = RNA_def_property(srna, "use_only_selected_keyframe_handles", PROP_BOOLEAN, PROP_NONE);
5876  prop, "Only Selected Keyframes Handles", "Only show and edit handles of selected keyframes");
5878 
5879  prop = RNA_def_property(srna, "use_beauty_drawing", PROP_BOOLEAN, PROP_NONE);
5882  "Use High Quality Display",
5883  "Display F-Curves using Anti-Aliasing and other fancy effects "
5884  "(disable for better performance)");
5886 
5887  prop = RNA_def_property(srna, "show_markers", PROP_BOOLEAN, PROP_NONE);
5890  prop,
5891  "Show Markers",
5892  "If any exists, show markers in a separate row at the bottom of the editor");
5894 
5895  prop = RNA_def_property(srna, "show_extrapolation", PROP_BOOLEAN, PROP_NONE);
5897  RNA_def_property_ui_text(prop, "Show Extrapolation", "");
5899 
5900  /* editing */
5901  prop = RNA_def_property(srna, "use_auto_merge_keyframes", PROP_BOOLEAN, PROP_NONE);
5903  RNA_def_property_ui_text(prop, "AutoMerge Keyframes", "Automatically merge nearby keyframes");
5905 
5906  prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
5909  prop,
5910  "Realtime Updates",
5911  "When transforming keyframes, changes to the animation data are flushed to other views");
5913 
5914  /* cursor */
5915  prop = RNA_def_property(srna, "show_cursor", PROP_BOOLEAN, PROP_NONE);
5917  RNA_def_property_ui_text(prop, "Show Cursor", "Show 2D cursor");
5919 
5920  prop = RNA_def_property(srna, "cursor_position_x", PROP_FLOAT, PROP_NONE);
5921  RNA_def_property_float_sdna(prop, NULL, "cursorTime");
5923  prop, "Cursor X-Value", "Graph Editor 2D-Value cursor - X-Value component");
5925 
5926  prop = RNA_def_property(srna, "cursor_position_y", PROP_FLOAT, PROP_NONE);
5927  RNA_def_property_float_sdna(prop, NULL, "cursorVal");
5929  prop, "Cursor Y-Value", "Graph Editor 2D-Value cursor - Y-Value component");
5931 
5932  prop = RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
5933  RNA_def_property_enum_sdna(prop, NULL, "around");
5934  RNA_def_property_enum_items(prop, gpivot_items);
5935  RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling");
5937 
5938  /* Dope-sheet. */
5939  prop = RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
5940  RNA_def_property_struct_type(prop, "DopeSheet");
5941  RNA_def_property_pointer_sdna(prop, NULL, "ads");
5942  RNA_def_property_ui_text(prop, "Dope Sheet", "Settings for filtering animation data");
5943 
5944  /* Auto-snap. */
5945  prop = RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE);
5946  RNA_def_property_enum_sdna(prop, NULL, "autosnap");
5949  prop, "Auto Snap", "Automatic time snapping settings for transformations");
5951 
5952  /* Read-only state info. */
5953  prop = RNA_def_property(srna, "has_ghost_curves", PROP_BOOLEAN, PROP_NONE);
5954  RNA_def_property_boolean_funcs(prop, "rna_SpaceGraphEditor_has_ghost_curves_get", NULL);
5957  prop, "Has Ghost Curves", "Graph Editor instance has some ghost curves stored");
5958 
5959  /* Normalize curves. */
5960  prop = RNA_def_property(srna, "use_normalization", PROP_BOOLEAN, PROP_NONE);
5963  "Use Normalization",
5964  "Display curves in normalized range from -1 to 1, "
5965  "for easier editing of multiple curves with different ranges");
5967 
5968  prop = RNA_def_property(srna, "use_auto_normalization", PROP_BOOLEAN, PROP_NONE);
5971  "Auto Normalization",
5972  "Automatically recalculate curve normalization on every curve edit");
5974 }
5975 
5976 static void rna_def_space_nla(BlenderRNA *brna)
5977 {
5978  StructRNA *srna;
5979  PropertyRNA *prop;
5980 
5981  srna = RNA_def_struct(brna, "SpaceNLA", "Space");
5982  RNA_def_struct_sdna(srna, "SpaceNla");
5983  RNA_def_struct_ui_text(srna, "Space Nla Editor", "NLA editor space data");
5984 
5986 
5987  /* display */
5988  prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
5990  RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
5992 
5993  prop = RNA_def_property(srna, "show_strip_curves", PROP_BOOLEAN, PROP_NONE);
5995  RNA_def_property_ui_text(prop, "Show Control F-Curves", "Show influence F-Curves on strips");
5997 
5998  prop = RNA_def_property(srna, "show_local_markers", PROP_BOOLEAN, PROP_NONE);
6001  prop,
6002  "Show Local Markers",
6003  "Show action-local markers on the strips, useful when synchronizing timing across strips");
6005 
6006  prop = RNA_def_property(srna, "show_markers", PROP_BOOLEAN, PROP_NONE);
6009  prop,
6010  "Show Markers",
6011  "If any exists, show markers in a separate row at the bottom of the editor");
6013 
6014  /* editing */
6015  prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE);
6018  prop,
6019  "Realtime Updates",
6020  "When transforming strips, changes to the animation data are flushed to other views");
6022 
6023  /* dopesheet */
6024  prop = RNA_def_property(srna, "dopesheet", PROP_POINTER, PROP_NONE);
6025  RNA_def_property_struct_type(prop, "DopeSheet");
6026  RNA_def_property_pointer_sdna(prop, NULL, "ads");
6027  RNA_def_property_ui_text(prop, "Dope Sheet", "Settings for filtering animation data");
6028 
6029  /* autosnap */
6030  prop = RNA_def_property(srna, "auto_snap", PROP_ENUM, PROP_NONE);
6031  RNA_def_property_enum_sdna(prop, NULL, "autosnap");
6034  prop, "Auto Snap", "Automatic time snapping settings for transformations");
6036 }
6037 
6039 {
6040  static const EnumPropertyItem console_line_type_items[] = {
6041  {CONSOLE_LINE_OUTPUT, "OUTPUT", 0, "Output", ""},
6042  {CONSOLE_LINE_INPUT, "INPUT", 0, "Input", ""},
6043  {CONSOLE_LINE_INFO, "INFO", 0, "Info", ""},
6044  {CONSOLE_LINE_ERROR, "ERROR", 0, "Error", ""},
6045  {0, NULL, 0, NULL, NULL},
6046  };
6047 
6048  StructRNA *srna;
6049  PropertyRNA *prop;
6050 
6051  srna = RNA_def_struct(brna, "ConsoleLine", NULL);
6052  RNA_def_struct_ui_text(srna, "Console Input", "Input line for the interactive console");
6053 
6054  prop = RNA_def_property(srna, "body", PROP_STRING, PROP_NONE);
6056  prop, "rna_ConsoleLine_body_get", "rna_ConsoleLine_body_length", "rna_ConsoleLine_body_set");
6057  RNA_def_property_ui_text(prop, "Line", "Text in the line");
6060 
6061  prop = RNA_def_property(
6062  srna, "current_character", PROP_INT, PROP_NONE); /* copied from text editor */
6063  RNA_def_property_int_sdna(prop, NULL, "cursor");
6064  RNA_def_property_int_funcs(prop, NULL, NULL, "rna_ConsoleLine_cursor_index_range");
6066 
6067  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
6068  RNA_def_property_enum_sdna(prop, NULL, "type");
6069  RNA_def_property_enum_items(prop, console_line_type_items);
6070  RNA_def_property_ui_text(prop, "Type", "Console line type when used in scrollback");
6071 }
6072 
6074 {
6075  StructRNA *srna;
6076  PropertyRNA *prop;
6077 
6078  srna = RNA_def_struct(brna, "SpaceConsole", "Space");
6079  RNA_def_struct_sdna(srna, "SpaceConsole");
6080  RNA_def_struct_ui_text(srna, "Space Console", "Interactive python console");
6081 
6082  /* display */
6083  prop = RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE); /* copied from text editor */
6084  RNA_def_property_int_sdna(prop, NULL, "lheight");
6085  RNA_def_property_range(prop, 8, 32);
6086  RNA_def_property_ui_text(prop, "Font Size", "Font size to use for displaying the text");
6087  RNA_def_property_update(prop, 0, "rna_SpaceConsole_rect_update");
6088 
6089  prop = RNA_def_property(
6090  srna, "select_start", PROP_INT, PROP_UNSIGNED); /* copied from text editor */
6091  RNA_def_property_int_sdna(prop, NULL, "sel_start");
6093 
6094  prop = RNA_def_property(
6095  srna, "select_end", PROP_INT, PROP_UNSIGNED); /* copied from text editor */
6096  RNA_def_property_int_sdna(prop, NULL, "sel_end");
6098 
6099  prop = RNA_def_property(srna, "prompt", PROP_STRING, PROP_NONE);
6100  RNA_def_property_ui_text(prop, "Prompt", "Command line prompt");
6101 
6102  prop = RNA_def_property(srna, "language", PROP_STRING, PROP_NONE);
6103  RNA_def_property_ui_text(prop, "Language", "Command line prompt language");
6104 
6105  prop = RNA_def_property(srna, "history", PROP_COLLECTION, PROP_NONE);
6106  RNA_def_property_collection_sdna(prop, NULL, "history", NULL);
6107  RNA_def_property_struct_type(prop, "ConsoleLine");
6108  RNA_def_property_ui_text(prop, "History", "Command history");
6109 
6110  prop = RNA_def_property(srna, "scrollback", PROP_COLLECTION, PROP_NONE);
6111  RNA_def_property_collection_sdna(prop, NULL, "scrollback", NULL);
6112  RNA_def_property_struct_type(prop, "ConsoleLine");
6113  RNA_def_property_ui_text(prop, "Output", "Command output");
6114 }
6115 
6116 /* Filter for datablock types in link/append. */
6118 {
6119  struct IDFilterBoolean {
6120  /* 64 bit, so we can't use bitflag enum. */
6121  const uint64_t flag;
6122  const char *identifier;
6123  const int icon;
6124  const char *name;
6125  const char *description;
6126  };
6127 
6128  static const struct IDFilterBoolean booleans[] = {
6129  /* Datablocks */
6130  {FILTER_ID_AC, "filter_action", ICON_ANIM_DATA, "Actions", "Show Action data-blocks"},
6131  {FILTER_ID_AR,
6132  "filter_armature",
6133  ICON_ARMATURE_DATA,
6134  "Armatures",
6135  "Show Armature data-blocks"},
6136  {FILTER_ID_BR, "filter_brush", ICON_BRUSH_DATA, "Brushes", "Show Brushes data-blocks"},
6137  {FILTER_ID_CA, "filter_camera", ICON_CAMERA_DATA, "Cameras", "Show Camera data-blocks"},
6138  {FILTER_ID_CF, "filter_cachefile", ICON_FILE, "Cache Files", "Show Cache File data-blocks"},
6139  {FILTER_ID_CU, "filter_curve", ICON_CURVE_DATA, "Curves", "Show Curve data-blocks"},
6140  {FILTER_ID_GD,
6141  "filter_grease_pencil",
6142  ICON_GREASEPENCIL,
6143  "Grease Pencil",
6144  "Show Grease pencil data-blocks"},
6145  {FILTER_ID_GR,
6146  "filter_group",
6147  ICON_OUTLINER_COLLECTION,
6148  "Collections",
6149  "Show Collection data-blocks"},
6150  {FILTER_ID_HA, "filter_hair", ICON_HAIR_DATA, "Hairs", "Show/hide Hair data-blocks"},
6151  {FILTER_ID_IM, "filter_image", ICON_IMAGE_DATA, "Images", "Show Image data-blocks"},
6152  {FILTER_ID_LA, "filter_light", ICON_LIGHT_DATA, "Lights", "Show Light data-blocks"},
6153  {FILTER_ID_LP,
6154  "filter_light_probe",
6155  ICON_OUTLINER_DATA_LIGHTPROBE,
6156  "Light Probes",
6157  "Show Light Probe data-blocks"},
6158  {FILTER_ID_LS,
6159  "filter_linestyle",
6160  ICON_LINE_DATA,
6161  "Freestyle Linestyles",
6162  "Show Freestyle's Line Style data-blocks"},
6163  {FILTER_ID_LT, "filter_lattice", ICON_LATTICE_DATA, "Lattices", "Show Lattice data-blocks"},
6164  {FILTER_ID_MA,
6165  "filter_material",
6166  ICON_MATERIAL_DATA,
6167  "Materials",
6168  "Show Material data-blocks"},
6169  {FILTER_ID_MB, "filter_metaball", ICON_META_DATA, "Metaballs", "Show Metaball data-blocks"},
6170  {FILTER_ID_MC,
6171  "filter_movie_clip",
6172  ICON_TRACKER_DATA,
6173  "Movie Clips",
6174  "Show Movie Clip data-blocks"},
6175  {FILTER_ID_ME, "filter_mesh", ICON_MESH_DATA, "Meshes", "Show Mesh data-blocks"},
6176  {FILTER_ID_MSK, "filter_mask", ICON_MOD_MASK, "Masks", "Show Mask data-blocks"},
6177  {FILTER_ID_NT,
6178  "filter_node_tree",
6179  ICON_NODETREE,
6180  "Node Trees",
6181  "Show Node Tree data-blocks"},
6182  {FILTER_ID_OB, "filter_object", ICON_OBJECT_DATA, "Objects", "Show Object data-blocks"},
6183  {FILTER_ID_PA,
6184  "filter_particle_settings",
6185  ICON_PARTICLE_DATA,
6186  "Particles Settings",
6187  "Show Particle Settings data-blocks"},
6188  {FILTER_ID_PAL, "filter_palette", ICON_COLOR, "Palettes", "Show Palette data-blocks"},
6189  {FILTER_ID_PC,
6190  "filter_paint_curve",
6191  ICON_CURVE_BEZCURVE,
6192  "Paint Curves",
6193  "Show Paint Curve data-blocks"},
6194  {FILTER_ID_PT,
6195  "filter_pointcloud",
6196  ICON_POINTCLOUD_DATA,
6197  "Point Clouds",
6198  "Show/hide Point Cloud data-blocks"},
6199  {FILTER_ID_SCE, "filter_scene", ICON_SCENE_DATA, "Scenes", "Show Scene data-blocks"},
6200  {FILTER_ID_SIM,
6201  "filter_simulation",
6202  ICON_PHYSICS,
6203  "Simulations",
6204  "Show Simulation data-blocks"}, /* TODO: Use correct icon. */
6205  {FILTER_ID_SPK, "filter_speaker", ICON_SPEAKER, "Speakers", "Show Speaker data-blocks"},
6206  {FILTER_ID_SO, "filter_sound", ICON_SOUND, "Sounds", "Show Sound data-blocks"},
6207  {FILTER_ID_TE, "filter_texture", ICON_TEXTURE_DATA, "Textures", "Show Texture data-blocks"},
6208  {FILTER_ID_TXT, "filter_text", ICON_TEXT, "Texts", "Show Text data-blocks"},
6209  {FILTER_ID_VF, "filter_font", ICON_FONT_DATA, "Fonts", "Show Font data-blocks"},
6210  {FILTER_ID_VO, "filter_volume", ICON_VOLUME_DATA, "Volumes", "Show/hide Volume data-blocks"},
6211  {FILTER_ID_WO, "filter_world", ICON_WORLD_DATA, "Worlds", "Show World data-blocks"},
6212  {FILTER_ID_WS,
6213  "filter_work_space",
6214  ICON_WORKSPACE,
6215  "Workspaces",
6216  "Show workspace data-blocks"},
6217 
6218  /* Categories */
6219  {FILTER_ID_SCE, "category_scene", ICON_SCENE_DATA, "Scenes", "Show scenes"},
6220  {FILTER_ID_AC, "category_animation", ICON_ANIM_DATA, "Animations", "Show animation data"},
6222  "category_object",
6223  ICON_OUTLINER_COLLECTION,
6224  "Objects & Collections",
6225  "Show objects and collections"},
6228  "category_geometry",
6229  ICON_NODETREE,
6230  "Geometry",
6231  "Show meshes, curves, lattice, armatures and metaballs data"},
6233  "category_shading",
6234  ICON_MATERIAL_DATA,
6235  "Shading",
6236  "Show materials, nodetrees, textures and Freestyle's linestyles"},
6238  "category_image",
6239  ICON_IMAGE_DATA,
6240  "Images & Sounds",
6241  "Show images, movie clips, sounds and masks"},
6243  "category_environment",
6244  ICON_WORLD_DATA,
6245  "Environment",
6246  "Show worlds, lights, cameras and speakers"},
6249  "category_misc",
6250  ICON_GREASEPENCIL,
6251  "Miscellaneous",
6252  "Show other data types"},
6253 
6254  {0, NULL, 0, NULL, NULL}};
6255 
6256  StructRNA *srna = RNA_def_struct(brna, "FileSelectIDFilter", NULL);
6257  RNA_def_struct_sdna(srna, "FileSelectParams");
6258  RNA_def_struct_nested(brna, srna, "FileSelectParams");
6260  srna, "File Select ID Filter", "Which ID types to show/hide, when browsing a library");
6261 
6262  for (int i = 0; booleans[i].identifier; i++) {
6263  PropertyRNA *prop = RNA_def_property(srna, booleans[i].identifier, PROP_BOOLEAN, PROP_NONE);
6264  RNA_def_property_boolean_sdna(prop, NULL, "filter_id", booleans[i].flag);
6265  RNA_def_property_ui_text(prop, booleans[i].name, booleans[i].description);
6266  RNA_def_property_ui_icon(prop, booleans[i].icon, 0);
6268  }
6269 }
6270 
6272 {
6273  PropertyRNA *prop;
6274  StructRNA *srna = RNA_def_struct(brna, "FileSelectEntry", NULL);
6275  RNA_def_struct_sdna(srna, "FileDirEntry");
6276  RNA_def_struct_ui_text(srna, "File Select Entry", "A file viewable in the File Browser");
6277 
6278  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
6280  "rna_FileBrowser_FileSelectEntry_name_get",
6281  "rna_FileBrowser_FileSelectEntry_name_length",
6282  NULL);
6283  RNA_def_property_ui_text(prop, "Name", "");
6285  RNA_def_struct_name_property(srna, prop);
6286 
6287  prop = RNA_def_int(
6288  srna,
6289  "preview_icon_id",
6290  0,
6291  INT_MIN,
6292  INT_MAX,
6293  "Icon ID",
6294  "Unique integer identifying the preview of this file as an icon (zero means invalid)",
6295  INT_MIN,
6296  INT_MAX);
6299  prop, "rna_FileBrowser_FileSelectEntry_preview_icon_id_get", NULL, NULL);
6300 
6301  prop = RNA_def_property(srna, "asset_data", PROP_POINTER, PROP_NONE);
6302  RNA_def_property_struct_type(prop, "AssetMetaData");
6304  prop, "rna_FileBrowser_FileSelectEntry_asset_data_get", NULL, NULL, NULL);
6306  prop, "Asset Data", "Asset data, valid if the file represents an asset");
6307 }
6308 
6310 {
6311  StructRNA *srna;
6312  PropertyRNA *prop;
6313 
6314  static const EnumPropertyItem file_display_items[] = {
6316  "LIST_VERTICAL",
6317  ICON_LONGDISPLAY,
6318  "Vertical List",
6319  "Display files as a vertical list"},
6321  "LIST_HORIZONTAL",
6322  ICON_SHORTDISPLAY,
6323  "Horizontal List",
6324  "Display files as a horizontal list"},
6325  {FILE_IMGDISPLAY, "THUMBNAIL", ICON_IMGDISPLAY, "Thumbnails", "Display files as thumbnails"},
6326  {0, NULL, 0, NULL, NULL},
6327  };
6328 
6329  static const EnumPropertyItem display_size_items[] = {
6330  {64, "TINY", 0, "Tiny", ""},
6331  {96, "SMALL", 0, "Small", ""},
6332  {128, "NORMAL", 0, "Regular", ""},
6333  {192, "LARGE", 0, "Large", ""},
6334  {0, NULL, 0, NULL, NULL},
6335  };
6336 
6337  srna = RNA_def_struct(brna, "FileSelectParams", NULL);
6338  RNA_def_struct_path_func(srna, "rna_FileSelectParams_path");
6339  RNA_def_struct_ui_text(srna, "File Select Parameters", "File Select Parameters");
6340 
6341  prop = RNA_def_property(srna, "title", PROP_STRING, PROP_NONE);
6342  RNA_def_property_string_sdna(prop, NULL, "title");
6343  RNA_def_property_ui_text(prop, "Title", "Title for the file browser");
6345 
6346  /* Use BYTESTRING rather than DIRPATH as subtype so UI code doesn't add OT_directory_browse
6347  * button when displaying this prop in the file browser (it would just open a file browser). That
6348  * should be the only effective difference between the two. */
6349  prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_BYTESTRING);
6350  RNA_def_property_string_sdna(prop, NULL, "dir");
6351  RNA_def_property_ui_text(prop, "Directory", "Directory displayed in the file browser");
6353 
6354  prop = RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
6355  RNA_def_property_string_sdna(prop, NULL, "file");
6356  RNA_def_property_ui_text(prop, "File Name", "Active file in the file browser");
6357  RNA_def_property_editable_func(prop, "rna_FileSelectParams_filename_editable");
6359 
6360  prop = RNA_def_property(srna, "use_library_browsing", PROP_BOOLEAN, PROP_NONE);
6362  prop, "Library Browser", "Whether we may browse blender files' content or not");
6364  RNA_def_property_boolean_funcs(prop, "rna_FileSelectParams_use_lib_get", NULL);
6365 
6366  prop = RNA_def_property(srna, "display_type", PROP_ENUM, PROP_NONE);
6367  RNA_def_property_enum_sdna(prop, NULL, "display");
6368  RNA_def_property_enum_items(prop, file_display_items);
6369  RNA_def_property_ui_text(prop, "Display Mode", "Display mode for the file list");
6371 
6372  prop = RNA_def_property(srna, "recursion_level", PROP_ENUM, PROP_NONE);
6374  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_FileSelectParams_recursion_level_itemf");
6375  RNA_def_property_ui_text(prop, "Recursion", "Numbers of dirtree levels to show simultaneously");
6377 
6378  prop = RNA_def_property(srna, "show_details_size", PROP_BOOLEAN, PROP_NONE);
6379  RNA_def_property_boolean_sdna(prop, NULL, "details_flags", FILE_DETAILS_SIZE);
6380  RNA_def_property_ui_text(prop, "File Size", "Show a column listing the size of each file");
6382 
6383  prop = RNA_def_property(srna, "show_details_datetime", PROP_BOOLEAN, PROP_NONE);
6384  RNA_def_property_boolean_sdna(prop, NULL, "details_flags", FILE_DETAILS_DATETIME);
6386  prop,
6387  "File Modification Date",
6388  "Show a column listing the date and time of modification for each file");
6390 
6391  prop = RNA_def_property(srna, "use_filter", PROP_BOOLEAN, PROP_NONE);
6393  RNA_def_property_ui_text(prop, "Filter Files", "Enable filtering of files");
6395 
6396  prop = RNA_def_property(srna, "show_hidden", PROP_BOOLEAN, PROP_NONE);
6398  RNA_def_property_ui_text(prop, "Show Hidden", "Show hidden dot files");
6400 
6401  prop = RNA_def_property(srna, "sort_method", PROP_ENUM, PROP_NONE);
6402  RNA_def_property_enum_sdna(prop, NULL, "sort");
6404  RNA_def_property_ui_text(prop, "Sort", "");
6406 
6407  prop = RNA_def_property(srna, "use_sort_invert", PROP_BOOLEAN, PROP_NONE);
6410  prop, "Reverse Sorting", "Sort items descending, from highest value to lowest");
6412 
6413  prop = RNA_def_property(srna, "use_filter_image", PROP_BOOLEAN, PROP_NONE);
6415  RNA_def_property_ui_text(prop, "Filter Images", "Show image files");
6416  RNA_def_property_ui_icon(prop, ICON_FILE_IMAGE, 0);
6418 
6419  prop = RNA_def_property(srna, "use_filter_blender", PROP_BOOLEAN, PROP_NONE);
6421  RNA_def_property_ui_text(prop, "Filter Blender", "Show .blend files");
6422  RNA_def_property_ui_icon(prop, ICON_FILE_BLEND, 0);
6424 
6425  prop = RNA_def_property(srna, "use_filter_backup", PROP_BOOLEAN, PROP_NONE);
6428  prop, "Filter Blender Backup Files", "Show .blend1, .blend2, etc. files");
6429  RNA_def_property_ui_icon(prop, ICON_FILE_BACKUP, 0);
6431 
6432  prop = RNA_def_property(srna, "use_filter_movie", PROP_BOOLEAN, PROP_NONE);
6434  RNA_def_property_ui_text(prop, "Filter Movies", "Show movie files");
6435  RNA_def_property_ui_icon(prop, ICON_FILE_MOVIE, 0);
6437 
6438  prop = RNA_def_property(srna, "use_filter_script", PROP_BOOLEAN, PROP_NONE);
6440  RNA_def_property_ui_text(prop, "Filter Script", "Show script files");
6441  RNA_def_property_ui_icon(prop, ICON_FILE_SCRIPT, 0);
6443 
6444  prop = RNA_def_property(srna, "use_filter_font", PROP_BOOLEAN, PROP_NONE);
6446  RNA_def_property_ui_text(prop, "Filter Fonts", "Show font files");
6447  RNA_def_property_ui_icon(prop, ICON_FILE_FONT, 0);
6449 
6450  prop = RNA_def_property(srna, "use_filter_sound", PROP_BOOLEAN, PROP_NONE);
6452  RNA_def_property_ui_text(prop, "Filter Sound", "Show sound files");
6453  RNA_def_property_ui_icon(prop, ICON_FILE_SOUND, 0);
6455 
6456  prop = RNA_def_property(srna, "use_filter_text", PROP_BOOLEAN, PROP_NONE);
6458  RNA_def_property_ui_text(prop, "Filter Text", "Show text files");
6459  RNA_def_property_ui_icon(prop, ICON_FILE_TEXT, 0);
6461 
6462  prop = RNA_def_property(srna, "use_filter_volume", PROP_BOOLEAN, PROP_NONE);
6464  RNA_def_property_ui_text(prop, "Filter Volume", "Show 3D volume files");
6465  RNA_def_property_ui_icon(prop, ICON_FILE_VOLUME, 0);
6467 
6468  prop = RNA_def_property(srna, "use_filter_folder", PROP_BOOLEAN, PROP_NONE);
6470  RNA_def_property_ui_text(prop, "Filter Folder", "Show folders");
6471  RNA_def_property_ui_icon(prop, ICON_FILE_FOLDER, 0);
6473 
6474  prop = RNA_def_property(srna, "use_filter_blendid", PROP_BOOLEAN, PROP_NONE);
6477  prop, "Filter Blender IDs", "Show .blend files items (objects, materials, etc.)");
6478  RNA_def_property_ui_icon(prop, ICON_BLENDER, 0);
6480 
6481  prop = RNA_def_property(srna, "use_filter_asset_only", PROP_BOOLEAN, PROP_NONE);
6484  prop, "Only Assets", "Hide .blend files items that are not data-blocks with asset metadata");
6486 
6487  prop = RNA_def_property(srna, "filter_id", PROP_POINTER, PROP_NONE);
6489  RNA_def_property_struct_type(prop, "FileSelectIDFilter");
6490  RNA_def_property_pointer_funcs(prop, "rna_FileSelectParams_filter_id_get", NULL, NULL, NULL);
6492  prop, "Filter ID Types", "Which ID types to show/hide, when browsing a library");
6493 
6494  prop = RNA_def_property(srna, "filter_glob", PROP_STRING, PROP_NONE);
6495  RNA_def_property_string_sdna(prop, NULL, "filter_glob");
6497  "Extension Filter",
6498  "UNIX shell-like filename patterns matching, supports wildcards ('*') "
6499  "and list of patterns separated by ';'");
6500  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_FileSelectPrams_filter_glob_set");
6502 
6503  prop = RNA_def_property(srna, "filter_search", PROP_STRING, PROP_NONE);
6504  RNA_def_property_string_sdna(prop, NULL, "filter_search");
6505  RNA_def_property_ui_text(prop, "Name Filter", "Filter by name, supports '*' wildcard");
6508 
6509  prop = RNA_def_property(srna, "display_size", PROP_ENUM, PROP_NONE);
6510  RNA_def_property_enum_sdna(prop, NULL, "thumbnail_size");
6511  RNA_def_property_enum_items(prop, display_size_items);
6513  "Display Size",
6514  "Change the size of the display (width of columns or thumbnails size)");
6516 }
6517 
6519 {
6520  StructRNA *srna;
6521  PropertyRNA *prop;
6522 
6523  /* XXX copied from rna_def_fileselect_idfilter. */
6524  static const EnumPropertyItem asset_category_items[] = {
6525  {FILTER_ID_SCE, "SCENES", ICON_SCENE_DATA, "Scenes", "Show scenes"},
6526  {FILTER_ID_AC, "ANIMATIONS", ICON_ANIM_DATA, "Animations", "Show animation data"},
6528  "OBJECTS_AND_COLLECTIONS",
6529  ICON_GROUP,
6530  "Objects & Collections",
6531  "Show objects and collections"},
6533  /* XXX avoid warning */
6534  // | FILTER_ID_HA | FILTER_ID_PT | FILTER_ID_VO
6535  ,
6536  "GEOMETRY",
6537  ICON_MESH_DATA,
6538  "Geometry",
6539  "Show meshes, curves, lattice, armatures and metaballs data"},
6541  "SHADING",
6542  ICON_MATERIAL_DATA,
6543  "Shading",
6544  "Show materials, nodetrees, textures and Freestyle's linestyles"},
6546  "IMAGES_AND_SOUNDS",
6547  ICON_IMAGE_DATA,
6548  "Images & Sounds",
6549  "Show images, movie clips, sounds and masks"},
6551  "ENVIRONMENTS",
6552  ICON_WORLD_DATA,
6553  "Environment",
6554  "Show worlds, lights, cameras and speakers"},
6557  "MISC",
6558  ICON_GREASEPENCIL,
6559  "Miscellaneous",
6560  "Show other data types"},
6561  {0, NULL, 0, NULL, NULL},
6562  };
6563 
6564  srna = RNA_def_struct(brna, "FileAssetSelectParams", "FileSelectParams");
6566  srna, "Asset Select Parameters", "Settings for the file selection in Asset Browser mode");
6567 
6568  prop = RNA_def_property(srna, "asset_library", PROP_ENUM, PROP_NONE);
6571  "rna_FileAssetSelectParams_asset_library_get",
6572  "rna_FileAssetSelectParams_asset_library_set",
6573  "rna_FileAssetSelectParams_asset_library_itemf");
6574  RNA_def_property_ui_text(prop, "Asset Library", "");
6576 
6577  prop = RNA_def_property(srna, "asset_category", PROP_ENUM, PROP_NONE);
6578  RNA_def_property_enum_items(prop, asset_category_items);
6580  "rna_FileAssetSelectParams_asset_category_get",
6581  "rna_FileAssetSelectParams_asset_category_set",
6582  NULL);
6583  RNA_def_property_ui_text(prop, "Asset Category", "Determine which kind of assets to display");
6585 }
6586 
6588 {
6589  StructRNA *srna;
6590  PropertyRNA *prop;
6591 
6592  srna = RNA_def_struct(brna, "FileBrowserFSMenuEntry", NULL);
6593  RNA_def_struct_sdna(srna, "FSMenuEntry");
6594  RNA_def_struct_ui_text(srna, "File Select Parameters", "File Select Parameters");
6595 
6596  prop = RNA_def_property(srna, "path", PROP_STRING, PROP_FILEPATH);
6598  "rna_FileBrowser_FSMenuEntry_path_get",
6599  "rna_FileBrowser_FSMenuEntry_path_length",
6600  "rna_FileBrowser_FSMenuEntry_path_set");
6601  RNA_def_property_ui_text(prop, "Path", "");
6602 
6603  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
6605  "rna_FileBrowser_FSMenuEntry_name_get",
6606  "rna_FileBrowser_FSMenuEntry_name_length",
6607  "rna_FileBrowser_FSMenuEntry_name_set");
6608  RNA_def_property_editable_func(prop, "rna_FileBrowser_FSMenuEntry_name_get_editable");
6609  RNA_def_property_ui_text(prop, "Name", "");
6610  RNA_def_struct_name_property(srna, prop);
6611 
6612  prop = RNA_def_property(srna, "icon", PROP_INT, PROP_NONE);
6614  prop, "rna_FileBrowser_FSMenuEntry_icon_get", "rna_FileBrowser_FSMenuEntry_icon_set", NULL);
6615  RNA_def_property_ui_text(prop, "Icon", "");
6616 
6617  prop = RNA_def_property(srna, "use_save", PROP_BOOLEAN, PROP_NONE);
6618  RNA_def_property_boolean_funcs(prop, "rna_FileBrowser_FSMenuEntry_use_save_get", NULL);
6620  prop, "Save", "Whether this path is saved in bookmarks, or generated from OS");
6622 
6623  prop = RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
6624  RNA_def_property_boolean_funcs(prop, "rna_FileBrowser_FSMenuEntry_is_valid_get", NULL);
6625  RNA_def_property_ui_text(prop, "Valid", "Whether this path is currently reachable");
6627 }
6628 
6630 {
6631  StructRNA *srna;
6632  PropertyRNA *prop;
6633 
6634  srna = RNA_def_struct(brna, "SpaceFileBrowser", "Space");
6635  RNA_def_struct_sdna(srna, "SpaceFile");
6636  RNA_def_struct_ui_text(srna, "Space File Browser", "File browser space data");
6637 
6639 
6640  prop = RNA_def_property(srna, "browse_mode", PROP_ENUM, PROP_NONE);
6643  prop,
6644  "Browsing Mode",
6645  "Type of the File Editor view (regular file browsing or asset browsing)");
6646  RNA_def_property_update(prop, 0, "rna_SpaceFileBrowser_browse_mode_update");
6647 
6648  prop = RNA_def_property(srna, "params", PROP_POINTER, PROP_NONE);
6649  RNA_def_property_struct_type(prop, "FileSelectParams");
6651  prop, "rna_FileBrowser_params_get", NULL, "rna_FileBrowser_params_typef", NULL);
6653  prop, "Filebrowser Parameter", "Parameters and Settings for the Filebrowser");
6654 
6655  prop = RNA_def_property(srna, "active_operator", PROP_POINTER, PROP_NONE);
6656  RNA_def_property_pointer_sdna(prop, NULL, "op");
6657  RNA_def_property_ui_text(prop, "Active Operator", "");
6658 
6659  /* keep this for compatibility with existing presets,
6660  * not exposed in c++ api because of keyword conflict */
6661  prop = RNA_def_property(srna, "operator", PROP_POINTER, PROP_NONE);
6662  RNA_def_property_pointer_sdna(prop, NULL, "op");
6663  RNA_def_property_ui_text(prop, "Active Operator", "");
6664 
6665  /* bookmarks, recent files etc. */
6666  prop = RNA_def_collection(srna,
6667  "system_folders",
6668  "FileBrowserFSMenuEntry",
6669  "System Folders",
6670  "System's folders (usually root, available hard drives, etc)");
6672  "rna_FileBrowser_FSMenuSystem_data_begin",
6673  "rna_FileBrowser_FSMenu_next",
6674  "rna_FileBrowser_FSMenu_end",
6675  "rna_FileBrowser_FSMenu_get",
6676  "rna_FileBrowser_FSMenuSystem_data_length",
6677  NULL,
6678  NULL,
6679  NULL);
6681 
6682  prop = RNA_def_int(srna,
6683  "system_folders_active",
6684  -1,
6685  -1,
6686  INT_MAX,
6687  "Active System Folder",
6688  "Index of active system folder (-1 if none)",
6689  -1,
6690  INT_MAX);
6691  RNA_def_property_int_sdna(prop, NULL, "systemnr");
6693  "rna_FileBrowser_FSMenuSystem_active_get",
6694  "rna_FileBrowser_FSMenuSystem_active_set",
6695  "rna_FileBrowser_FSMenuSystem_active_range");
6698  prop, NC_SPACE | ND_SPACE_FILE_PARAMS, "rna_FileBrowser_FSMenu_active_update");
6699 
6700  prop = RNA_def_collection(srna,
6701  "system_bookmarks",
6702  "FileBrowserFSMenuEntry",
6703  "System Bookmarks",
6704  "System's bookmarks");
6706  "rna_FileBrowser_FSMenuSystemBookmark_data_begin",
6707  "rna_FileBrowser_FSMenu_next",
6708  "rna_FileBrowser_FSMenu_end",
6709  "rna_FileBrowser_FSMenu_get",
6710  "rna_FileBrowser_FSMenuSystemBookmark_data_length",
6711  NULL,
6712  NULL,
6713  NULL);
6715 
6716  prop = RNA_def_int(srna,
6717  "system_bookmarks_active",
6718  -1,
6719  -1,
6720  INT_MAX,
6721  "Active System Bookmark",
6722  "Index of active system bookmark (-1 if none)",
6723  -1,
6724  INT_MAX);
6725  RNA_def_property_int_sdna(prop, NULL, "system_bookmarknr");
6727  "rna_FileBrowser_FSMenuSystemBookmark_active_get",
6728  "rna_FileBrowser_FSMenuSystemBookmark_active_set",
6729  "rna_FileBrowser_FSMenuSystemBookmark_active_range");
6732  prop, NC_SPACE | ND_SPACE_FILE_PARAMS, "rna_FileBrowser_FSMenu_active_update");
6733 
6734  prop = RNA_def_collection(
6735  srna, "bookmarks", "FileBrowserFSMenuEntry", "Bookmarks", "User's bookmarks");
6737  "rna_FileBrowser_FSMenuBookmark_data_begin",
6738  "rna_FileBrowser_FSMenu_next",
6739  "rna_FileBrowser_FSMenu_end",
6740  "rna_FileBrowser_FSMenu_get",
6741  "rna_FileBrowser_FSMenuBookmark_data_length",
6742  NULL,
6743  NULL,
6744  NULL);
6746 
6747  prop = RNA_def_int(srna,
6748  "bookmarks_active",
6749  -1,
6750  -1,
6751  INT_MAX,
6752  "Active Bookmark",
6753  "Index of active bookmark (-1 if none)",
6754  -1,
6755  INT_MAX);
6756  RNA_def_property_int_sdna(prop, NULL, "bookmarknr");
6758  "rna_FileBrowser_FSMenuBookmark_active_get",
6759  "rna_FileBrowser_FSMenuBookmark_active_set",
6760  "rna_FileBrowser_FSMenuBookmark_active_range");
6763  prop, NC_SPACE | ND_SPACE_FILE_PARAMS, "rna_FileBrowser_FSMenu_active_update");
6764 
6765  prop = RNA_def_collection(
6766  srna, "recent_folders", "FileBrowserFSMenuEntry", "Recent Folders", "");
6768  "rna_FileBrowser_FSMenuRecent_data_begin",
6769  "rna_FileBrowser_FSMenu_next",
6770  "rna_FileBrowser_FSMenu_end",
6771  "rna_FileBrowser_FSMenu_get",
6772  "rna_FileBrowser_FSMenuRecent_data_length",
6773  NULL,
6774  NULL,
6775  NULL);
6777 
6778  prop = RNA_def_int(srna,
6779  "recent_folders_active",
6780  -1,
6781  -1,
6782  INT_MAX,
6783  "Active Recent Folder",
6784  "Index of active recent folder (-1 if none)",
6785  -1,
6786  INT_MAX);
6787  RNA_def_property_int_sdna(prop, NULL, "recentnr");
6789  "rna_FileBrowser_FSMenuRecent_active_get",
6790  "rna_FileBrowser_FSMenuRecent_active_set",
6791  "rna_FileBrowser_FSMenuRecent_active_range");
6794  prop, NC_SPACE | ND_SPACE_FILE_PARAMS, "rna_FileBrowser_FSMenu_active_update");
6795 
6797 }
6798 
6799 static void rna_def_space_info(BlenderRNA *brna)
6800 {
6801  StructRNA *srna;
6802  PropertyRNA *prop;
6803 
6804  srna = RNA_def_struct(brna, "SpaceInfo", "Space");
6805  RNA_def_struct_sdna(srna, "SpaceInfo");
6806  RNA_def_struct_ui_text(srna, "Space Info", "Info space data");
6807 
6808  /* reporting display */
6809  prop = RNA_def_property(srna, "show_report_debug", PROP_BOOLEAN, PROP_NONE);
6811  RNA_def_property_ui_text(prop, "Show Debug", "Display debug reporting info");
6813 
6814  prop = RNA_def_property(srna, "show_report_info", PROP_BOOLEAN, PROP_NONE);
6815  RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_INFO);
6816  RNA_def_property_ui_text(prop, "Show Info", "Display general information");
6818 
6819  prop = RNA_def_property(srna, "show_report_operator", PROP_BOOLEAN, PROP_NONE);
6820  RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_OP);
6821  RNA_def_property_ui_text(prop, "Show Operator", "Display the operator log");
6823 
6824  prop = RNA_def_property(srna, "show_report_warning", PROP_BOOLEAN, PROP_NONE);
6825  RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_WARN);
6826  RNA_def_property_ui_text(prop, "Show Warn", "Display warnings");
6828 
6829  prop = RNA_def_property(srna, "show_report_error", PROP_BOOLEAN, PROP_NONE);
6830  RNA_def_property_boolean_sdna(prop, NULL, "rpt_mask", INFO_RPT_ERR);
6831  RNA_def_property_ui_text(prop, "Show Error", "Display error text");
6833 }
6834 
6836 {
6837  static const EnumPropertyItem filter_type_items[] = {
6838  {0, "NAME", 0, "Name", "Filter based on the operator name"},
6839  {1, "KEY", 0, "Key-Binding", "Filter based on key bindings"},
6840  {0, NULL, 0, NULL, NULL},
6841  };
6842 
6843  StructRNA *srna;
6844  PropertyRNA *prop;
6845 
6846  srna = RNA_def_struct(brna, "SpacePreferences", "Space");
6847  RNA_def_struct_sdna(srna, "SpaceUserPref");
6848  RNA_def_struct_ui_text(srna, "Space Preferences", "Blender preferences space data");
6849 
6850  prop = RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE);
6851  RNA_def_property_enum_sdna(prop, NULL, "filter_type");
6852  RNA_def_property_enum_items(prop, filter_type_items);
6853  RNA_def_property_ui_text(prop, "Filter Type", "Filter method");
6855 
6856  prop = RNA_def_property(srna, "filter_text", PROP_STRING, PROP_NONE);
6857  RNA_def_property_string_sdna(prop, NULL, "filter");
6859  RNA_def_property_ui_text(prop, "Filter", "Search term for filtering in the UI");
6860 }
6861 
6863 {
6864  StructRNA *srna;
6865  PropertyRNA *prop;
6866 
6867  srna = RNA_def_struct(brna, "NodeTreePath", NULL);
6868  RNA_def_struct_sdna(srna, "bNodeTreePath");
6869  RNA_def_struct_ui_text(srna, "Node Tree Path", "Element of the node space tree path");
6870 
6871  prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
6872  RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
6874  RNA_def_property_ui_text(prop, "Node Tree", "Base node tree from context");
6875 }
6876 
6878 {
6879  StructRNA *srna;
6880  PropertyRNA *prop, *parm;
6881  FunctionRNA *func;
6882 
6883  RNA_def_property_srna(cprop, "SpaceNodeEditorPath");
6884  srna = RNA_def_struct(brna, "SpaceNodeEditorPath", NULL);
6885  RNA_def_struct_sdna(srna, "SpaceNode");
6886  RNA_def_struct_ui_text(srna, "Space Node Editor Path", "History of node trees in the editor");
6887 
6888  prop = RNA_def_property(srna, "to_string", PROP_STRING, PROP_NONE);
6890  prop, "rna_SpaceNodeEditor_path_get", "rna_SpaceNodeEditor_path_length", NULL);
6892  RNA_def_struct_ui_text(srna, "Path", "Get the node tree path as a string");
6893 
6894  func = RNA_def_function(srna, "clear", "rna_SpaceNodeEditor_path_clear");
6895  RNA_def_function_ui_description(func, "Reset the node tree path");
6897 
6898  func = RNA_def_function(srna, "start", "rna_SpaceNodeEditor_path_start");
6899  RNA_def_function_ui_description(func, "Set the root node tree");
6901  parm = RNA_def_pointer(func, "node_tree", "NodeTree", "Node Tree", "");
6903 
6904  func = RNA_def_function(srna, "append", "rna_SpaceNodeEditor_path_append");
6905  RNA_def_function_ui_description(func, "Append a node group tree to the path");
6907  parm = RNA_def_pointer(
6908  func, "node_tree", "NodeTree", "Node Tree", "Node tree to append to the node editor path");
6910  parm = RNA_def_pointer(func, "node", "Node", "Node", "Group node linking to this node tree");
6912 
6913  func = RNA_def_function(srna, "pop", "rna_SpaceNodeEditor_path_pop");
6914  RNA_def_function_ui_description(func, "Remove the last node tree from the path");
6916 }
6917 
6918 static void rna_def_space_node(BlenderRNA *brna)
6919 {
6920  StructRNA *srna;
6921  PropertyRNA *prop;
6922 
6923  static const EnumPropertyItem texture_id_type_items[] = {
6924  {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World"},
6925  {SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, "Brush", "Edit texture nodes from Brush"},
6926 # ifdef WITH_FREESTYLE
6928  "LINESTYLE",
6929  ICON_LINE_DATA,
6930  "Line Style",
6931  "Edit texture nodes from Line Style"},
6932 # endif
6933  {0, NULL, 0, NULL, NULL},
6934  };
6935 
6936  static const EnumPropertyItem shader_type_items[] = {
6937  {SNODE_SHADER_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit shader nodes from Object"},
6938  {SNODE_SHADER_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit shader nodes from World"},
6939 # ifdef WITH_FREESTYLE
6941  "LINESTYLE",
6942  ICON_LINE_DATA,
6943  "Line Style",
6944  "Edit shader nodes from Line Style"},
6945 # endif
6946  {0, NULL, 0, NULL, NULL},
6947  };
6948 
6949  static const EnumPropertyItem backdrop_channels_items[] = {
6950  {SNODE_USE_ALPHA,
6951  "COLOR_ALPHA",
6952  ICON_IMAGE_RGB_ALPHA,
6953  "Color and Alpha",
6954  "Display image with RGB colors and alpha transparency"},
6955  {0, "COLOR", ICON_IMAGE_RGB, "Color", "Display image with RGB colors"},
6956  {SNODE_SHOW_ALPHA, "ALPHA", ICON_IMAGE_ALPHA, "Alpha", "Display alpha transparency channel"},
6957  {SNODE_SHOW_R, "RED", ICON_COLOR_RED, "Red", ""},
6958  {SNODE_SHOW_G, "GREEN", ICON_COLOR_GREEN, "Green", ""},
6959  {SNODE_SHOW_B, "BLUE", ICON_COLOR_BLUE, "Blue", ""},
6960  {0, NULL, 0, NULL, NULL},
6961  };
6962 
6963  static const EnumPropertyItem insert_ofs_dir_items[] = {
6964  {SNODE_INSERTOFS_DIR_RIGHT, "RIGHT", 0, "Right"},
6965  {SNODE_INSERTOFS_DIR_LEFT, "LEFT", 0, "Left"},
6966  {0, NULL, 0, NULL, NULL},
6967  };
6968 
6969  static const EnumPropertyItem dummy_items[] = {
6970  {0, "DUMMY", 0, "", ""},
6971  {0, NULL, 0, NULL, NULL},
6972  };
6973 
6974  srna = RNA_def_struct(brna, "SpaceNodeEditor", "Space");
6975  RNA_def_struct_sdna(srna, "SpaceNode");
6976  RNA_def_struct_ui_text(srna, "Space Node Editor", "Node editor space data");
6977 
6979 
6980  prop = RNA_def_property(srna, "tree_type", PROP_ENUM, PROP_NONE);
6981  RNA_def_property_enum_items(prop, dummy_items);
6983  "rna_SpaceNodeEditor_tree_type_get",
6984  "rna_SpaceNodeEditor_tree_type_set",
6985  "rna_SpaceNodeEditor_tree_type_itemf");
6986  RNA_def_property_ui_text(prop, "Tree Type", "Node tree type to display and edit");
6988 
6989  prop = RNA_def_property(srna, "texture_type", PROP_ENUM, PROP_NONE);
6990  RNA_def_property_enum_sdna(prop, NULL, "texfrom");
6991  RNA_def_property_enum_items(prop, texture_id_type_items);
6992  RNA_def_property_ui_text(prop, "Texture Type", "Type of data to take texture from");
6994 
6995  prop = RNA_def_property(srna, "shader_type", PROP_ENUM, PROP_NONE);
6996  RNA_def_property_enum_sdna(prop, NULL, "shaderfrom");
6997  RNA_def_property_enum_items(prop, shader_type_items);
6998  RNA_def_property_ui_text(prop, "Shader Type", "Type of data to take shader from");
7000 
7001  prop = RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
7003  RNA_def_property_ui_text(prop, "ID", "Data-block whose nodes are being edited");
7004 
7005  prop = RNA_def_property(srna, "id_from", PROP_POINTER, PROP_NONE);
7006  RNA_def_property_pointer_sdna(prop, NULL, "from");
7009  prop, "ID From", "Data-block from which the edited data-block is linked");
7010 
7011  prop = RNA_def_property(srna, "path", PROP_COLLECTION, PROP_NONE);
7012  RNA_def_property_collection_sdna(prop, NULL, "treepath", NULL);
7013  RNA_def_property_struct_type(prop, "NodeTreePath");
7015  prop, "Node Tree Path", "Path from the data-block to the currently edited node tree");
7016  rna_def_space_node_path_api(brna, prop);
7017 
7018  prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
7020  prop, NULL, "rna_SpaceNodeEditor_node_tree_set", NULL, "rna_SpaceNodeEditor_node_tree_poll");
7021  RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
7023  RNA_def_property_ui_text(prop, "Node Tree", "Base node tree from context");
7024  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, "rna_SpaceNodeEditor_node_tree_update");
7025 
7026  prop = RNA_def_property(srna, "edit_tree", PROP_POINTER, PROP_NONE);
7027  RNA_def_property_pointer_sdna(prop, NULL, "edittree");
7029  RNA_def_property_ui_text(prop, "Edit Tree", "Node tree being displayed and edited");
7030 
7031  prop = RNA_def_property(srna, "pin", PROP_BOOLEAN, PROP_NONE);
7033  RNA_def_property_ui_text(prop, "Pinned", "Use the pinned node tree");
7034  RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1);
7036 
7037  prop = RNA_def_property(srna, "show_backdrop", PROP_BOOLEAN, PROP_NONE);
7040  prop, "Backdrop", "Use active Viewer Node output as backdrop for compositing nodes");
7042  prop, NC_SPACE | ND_SPACE_NODE_VIEW, "rna_SpaceNodeEditor_show_backdrop_update");
7043 
7044  prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE);
7046  RNA_def_property_ui_text(prop, "Show Annotation", "Show annotations for this view");
7048 
7049  prop = RNA_def_property(srna, "use_auto_render", PROP_BOOLEAN, PROP_NONE);
7052  prop, "Auto Render", "Re-render and composite changed layers on 3D edits");
7054 
7055  prop = RNA_def_property(srna, "backdrop_zoom", PROP_FLOAT, PROP_NONE);
7056  RNA_def_property_float_sdna(prop, NULL, "zoom");
7057  RNA_def_property_float_default(prop, 1.0f);
7058  RNA_def_property_range(prop, 0.01f, FLT_MAX);
7059  RNA_def_property_ui_range(prop, 0.01, 100, 1, 2);
7060  RNA_def_property_ui_text(prop, "Backdrop Zoom", "Backdrop zoom factor");
7062 
7063  prop = RNA_def_property(srna, "backdrop_offset", PROP_FLOAT, PROP_NONE);
7064  RNA_def_property_float_sdna(prop, NULL, "xof");
7065  RNA_def_property_array(prop, 2);
7066  RNA_def_property_ui_text(prop, "Backdrop Offset", "Backdrop offset");
7068 
7069  prop = RNA_def_property(srna, "backdrop_channels", PROP_ENUM, PROP_NONE);
7071  RNA_def_property_enum_items(prop, backdrop_channels_items);
7072  RNA_def_property_ui_text(prop, "Display Channels", "Channels of the image to draw");
7074  /* the mx/my "cursor" in the node editor is used only by operators to store the mouse position */
7075  prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ);
7076  RNA_def_property_array(prop, 2);
7078  "rna_SpaceNodeEditor_cursor_location_get",
7079  "rna_SpaceNodeEditor_cursor_location_set",
7080  NULL);
7081  RNA_def_property_ui_text(prop, "Cursor Location", "Location for adding new nodes");
7083 
7084  /* insert offset (called "Auto-offset" in UI) */
7085  prop = RNA_def_property(srna, "use_insert_offset", PROP_BOOLEAN, PROP_NONE);
7088  "Auto-offset",
7089  "Automatically offset the following or previous nodes in a "
7090  "chain when inserting a new node");
7091  RNA_def_property_ui_icon(prop, ICON_NODE_INSERT_ON, 1);
7093 
7094  prop = RNA_def_property(srna, "insert_offset_direction", PROP_ENUM, PROP_NONE);
7095  RNA_def_property_enum_bitflag_sdna(prop, NULL, "insert_ofs_dir");
7096  RNA_def_property_enum_items(prop, insert_ofs_dir_items);
7098  prop, "Auto-offset Direction", "Direction to offset nodes on insertion");
7100 
7101  RNA_api_space_node(srna);
7102 }
7103 
7104 static void rna_def_space_clip(BlenderRNA *brna)
7105 {
7106  StructRNA *srna;
7107  PropertyRNA *prop;
7108 
7109  static const EnumPropertyItem view_items[] = {
7110  {SC_VIEW_CLIP, "CLIP", ICON_SEQUENCE, "Clip", "Show editing clip preview"},
7111  {SC_VIEW_GRAPH, "GRAPH", ICON_GRAPH, "Graph", "Show graph view for active element"},
7113  "DOPESHEET",
7114  ICON_ACTION,
7115  "Dopesheet",
7116  "Dopesheet view for tracking data"},
7117  {0, NULL, 0, NULL, NULL},
7118  };
7119 
7120  static const EnumPropertyItem annotation_source_items[] = {
7122  "CLIP",
7123  0,
7124  "Clip",
7125  "Show annotation data-block which belongs to movie clip"},
7127  "TRACK",
7128  0,
7129  "Track",
7130  "Show annotation data-block which belongs to active track"},
7131  {0, NULL, 0, NULL, NULL},
7132  };
7133 
7134  static const EnumPropertyItem pivot_items[] = {
7136  "BOUNDING_BOX_CENTER",
7137  ICON_PIVOT_BOUNDBOX,
7138  "Bounding Box Center",
7139  "Pivot around bounding box center of selected object(s)"},
7140  {V3D_AROUND_CURSOR, "CURSOR", ICON_PIVOT_CURSOR, "2D Cursor", "Pivot around the 2D cursor"},
7142  "INDIVIDUAL_ORIGINS",
7143  ICON_PIVOT_INDIVIDUAL,
7144  "Individual Origins",
7145  "Pivot around each object's own origin"},
7147  "MEDIAN_POINT",
7148  ICON_PIVOT_MEDIAN,
7149  "Median Point",
7150  "Pivot around the median point of selected objects"},
7151  {0, NULL, 0, NULL, NULL},
7152  };
7153 
7154  srna = RNA_def_struct(brna, "SpaceClipEditor", "Space");
7155  RNA_def_struct_sdna(srna, "SpaceClip");
7156  RNA_def_struct_ui_text(srna, "Space Clip Editor", "Clip editor space data");
7157 
7159  srna, (1 << RGN_TYPE_TOOLS) | (1 << RGN_TYPE_UI) | (1 << RGN_TYPE_HUD));
7160 
7161  /* movieclip */
7162  prop = RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
7164  RNA_def_property_ui_text(prop, "Movie Clip", "Movie clip displayed and edited in this space");
7165  RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceClipEditor_clip_set", NULL, NULL);
7167 
7168  /* clip user */
7169  prop = RNA_def_property(srna, "clip_user", PROP_POINTER, PROP_NONE);
7171  RNA_def_property_struct_type(prop, "MovieClipUser");
7172  RNA_def_property_pointer_sdna(prop, NULL, "user");
7174  prop, "Movie Clip User", "Parameters defining which frame of the movie clip is displayed");
7176 
7177  /* mask */
7178  rna_def_space_mask_info(srna, NC_SPACE | ND_SPACE_CLIP, "rna_SpaceClipEditor_mask_set");
7179 
7180  /* mode */
7181  prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
7182  RNA_def_property_enum_sdna(prop, NULL, "mode");
7184  RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
7185  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, "rna_SpaceClipEditor_clip_mode_update");
7186 
7187  /* view */
7188  prop = RNA_def_property(srna, "view", PROP_ENUM, PROP_NONE);
7189  RNA_def_property_enum_sdna(prop, NULL, "view");
7190  RNA_def_property_enum_items(prop, view_items);
7191  RNA_def_property_ui_text(prop, "View", "Type of the clip editor view");
7193  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, "rna_SpaceClipEditor_view_type_update");
7194 
7195  /* show pattern */
7196  prop = RNA_def_property(srna, "show_marker_pattern", PROP_BOOLEAN, PROP_NONE);
7197  RNA_def_property_ui_text(prop, "Show Marker Pattern", "Show pattern boundbox for markers");
7200 
7201  /* show search */
7202  prop = RNA_def_property(srna, "show_marker_search", PROP_BOOLEAN, PROP_NONE);
7203  RNA_def_property_ui_text(prop, "Show Marker Search", "Show search boundbox for markers");
7206 
7207  /* lock to selection */
7208  prop = RNA_def_property(srna, "lock_selection", PROP_BOOLEAN, PROP_NONE);
7210  prop, "Lock to Selection", "Lock viewport to selected markers during playback");
7213  prop, NC_SPACE | ND_SPACE_CLIP, "rna_SpaceClipEditor_lock_selection_update");
7214 
7215  /* lock to time cursor */
7216  prop = RNA_def_property(srna, "lock_time_cursor", PROP_BOOLEAN, PROP_NONE);
7218  prop, "Lock to Time Cursor", "Lock curves view to time cursor during playback and tracking");
7221 
7222  /* show markers paths */
7223  prop = RNA_def_property(srna, "show_track_path", PROP_BOOLEAN, PROP_NONE);
7225  RNA_def_property_ui_text(prop, "Show Track Path", "Show path of how track moves");
7227 
7228  /* path length */
7229  prop = RNA_def_property(srna, "path_length", PROP_INT, PROP_NONE);
7230  RNA_def_property_int_sdna(prop, NULL, "path_length");
7231  RNA_def_property_range(prop, 0, INT_MAX);
7232  RNA_def_property_ui_text(prop, "Path Length", "Length of displaying path, in frames");
7234 
7235  /* show tiny markers */
7236  prop = RNA_def_property(srna, "show_tiny_markers", PROP_BOOLEAN, PROP_NONE);
7237  RNA_def_property_ui_text(prop, "Show Tiny Markers", "Show markers in a more compact manner");
7240 
7241  /* show bundles */
7242  prop = RNA_def_property(srna, "show_bundles", PROP_BOOLEAN, PROP_NONE);
7243  RNA_def_property_ui_text(prop, "Show Bundles", "Show projection of 3D markers into footage");
7246 
7247  /* mute footage */
7248  prop = RNA_def_property(srna, "use_mute_footage", PROP_BOOLEAN, PROP_NONE);
7249  RNA_def_property_ui_text(prop, "Mute Footage", "Mute footage and show black background instead");
7252 
7253  /* hide disabled */
7254  prop = RNA_def_property(srna, "show_disabled", PROP_BOOLEAN, PROP_NONE);
7255  RNA_def_property_ui_text(prop, "Show Disabled", "Show disabled tracks from the footage");
7258 
7259  prop = RNA_def_property(srna, "show_metadata", PROP_BOOLEAN, PROP_NONE);
7261  RNA_def_property_ui_text(prop, "Show Metadata", "Show metadata of clip");
7263 
7264  /* scopes */
7265  prop = RNA_def_property(srna, "scopes", PROP_POINTER, PROP_NONE);
7266  RNA_def_property_pointer_sdna(prop, NULL, "scopes");
7267  RNA_def_property_struct_type(prop, "MovieClipScopes");
7268  RNA_def_property_ui_text(prop, "Scopes", "Scopes to visualize movie clip statistics");
7269 
7270  /* show names */
7271  prop = RNA_def_property(srna, "show_names", PROP_BOOLEAN, PROP_NONE);
7273  RNA_def_property_ui_text(prop, "Show Names", "Show track names and status");
7275 
7276  /* show grid */
7277  prop = RNA_def_property(srna, "show_grid", PROP_BOOLEAN, PROP_NONE);
7279  RNA_def_property_ui_text(prop, "Show Grid", "Show grid showing lens distortion");
7281 
7282  /* show stable */
7283  prop = RNA_def_property(srna, "show_stable", PROP_BOOLEAN, PROP_NONE);
7286  prop, "Show Stable", "Show stable footage in editor (if stabilization is enabled)");
7288 
7289  /* manual calibration */
7290  prop = RNA_def_property(srna, "use_manual_calibration", PROP_BOOLEAN, PROP_NONE);
7292  RNA_def_property_ui_text(prop, "Manual Calibration", "Use manual calibration helpers");
7294 
7295  /* show annotation */
7296  prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE);
7298  RNA_def_property_ui_text(prop, "Show Annotation", "Show annotations for this view");
7300 
7301  /* show filters */
7302  prop = RNA_def_property(srna, "show_filters", PROP_BOOLEAN, PROP_NONE);
7304  RNA_def_property_ui_text(prop, "Show Filters", "Show filters for graph editor");
7306 
7307  /* show graph_frames */
7308  prop = RNA_def_property(srna, "show_graph_frames", PROP_BOOLEAN, PROP_NONE);
7311  prop,
7312  "Show Frames",
7313  "Show curve for per-frame average error (camera motion should be solved first)");
7315 
7316  /* show graph tracks motion */
7317  prop = RNA_def_property(srna, "show_graph_tracks_motion", PROP_BOOLEAN, PROP_NONE);
7320  prop,
7321  "Show Tracks Motion",
7322  "Display the speed curves (in \"x\" direction red, in \"y\" direction green) "
7323  "for the selected tracks");
7325 
7326  /* show graph tracks motion */
7327  prop = RNA_def_property(srna, "show_graph_tracks_error", PROP_BOOLEAN, PROP_NONE);
7330  prop, "Show Tracks Error", "Display the reprojection error curve for selected tracks");
7332 
7333  /* show_only_selected */
7334  prop = RNA_def_property(srna, "show_graph_only_selected", PROP_BOOLEAN, PROP_NONE);
7337  prop, "Only Show Selected", "Only include channels relating to selected objects and data");
7338  RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, 0);
7340 
7341  /* show_hidden */
7342  prop = RNA_def_property(srna, "show_graph_hidden", PROP_BOOLEAN, PROP_NONE);
7345  prop, "Display Hidden", "Include channels from objects/bone that aren't visible");
7346  RNA_def_property_ui_icon(prop, ICON_GHOST_ENABLED, 0);
7348 
7349  /* ** channels ** */
7350 
7351  /* show_red_channel */
7352  prop = RNA_def_property(srna, "show_red_channel", PROP_BOOLEAN, PROP_NONE);
7354  RNA_def_property_ui_text(prop, "Show Red Channel", "Show red channel in the frame");
7356 
7357  /* show_green_channel */
7358  prop = RNA_def_property(srna, "show_green_channel", PROP_BOOLEAN, PROP_NONE);
7360  RNA_def_property_ui_text(prop, "Show Green Channel", "Show green channel in the frame");
7362 
7363  /* show_blue_channel */
7364  prop = RNA_def_property(srna, "show_blue_channel", PROP_BOOLEAN, PROP_NONE);
7366  RNA_def_property_ui_text(prop, "Show Blue Channel", "Show blue channel in the frame");
7368 
7369  /* preview_grayscale */
7370  prop = RNA_def_property(srna, "use_grayscale_preview", PROP_BOOLEAN, PROP_NONE);
7372  RNA_def_property_ui_text(prop, "Grayscale", "Display frame in grayscale mode");
7374 
7375  /* timeline */
7376  prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE);
7378  RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames");
7380 
7381  /* grease pencil source */
7382  prop = RNA_def_property(srna, "annotation_source", PROP_ENUM, PROP_NONE);
7383  RNA_def_property_enum_sdna(prop, NULL, "gpencil_src");
7384  RNA_def_property_enum_items(prop, annotation_source_items);
7385  RNA_def_property_ui_text(prop, "Annotation Source", "Where the annotation comes from");
7388 
7389  /* pivot point */
7390  prop = RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE);
7391  RNA_def_property_enum_sdna(prop, NULL, "around");
7392  RNA_def_property_enum_items(prop, pivot_items);
7393  RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling");
7395 }
7396 
7398  {SPREADSHEET_CONTEXT_OBJECT, "OBJECT", ICON_NONE, "Object", ""},
7399  {SPREADSHEET_CONTEXT_MODIFIER, "MODIFIER", ICON_NONE, "Modifier", ""},
7400  {SPREADSHEET_CONTEXT_NODE, "NODE", ICON_NONE, "Node", ""},
7401  {0, NULL, 0, NULL, NULL},
7402 };
7403 
7405 {
7406  StructRNA *srna;
7407  PropertyRNA *prop;
7408 
7409  srna = RNA_def_struct(brna, "SpreadsheetContext", NULL);
7410  RNA_def_struct_ui_text(srna, "Spreadsheet Context", "Element of spreadsheet context path");
7411  RNA_def_struct_refine_func(srna, "rna_spreadsheet_context_refine");
7412 
7413  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
7415  RNA_def_property_ui_text(prop, "Type", "Type of the context");
7417 }
7418 
7420 {
7421  StructRNA *srna;
7422  PropertyRNA *prop;
7423 
7424  srna = RNA_def_struct(brna, "SpreadsheetContextObject", "SpreadsheetContext");
7425 
7426  prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
7427  RNA_def_property_struct_type(prop, "Object");
7429  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, "rna_spreadsheet_context_update");
7430 }
7431 
7433 {
7434  StructRNA *srna;
7435  PropertyRNA *prop;
7436 
7437  srna = RNA_def_struct(brna, "SpreadsheetContextModifier", "SpreadsheetContext");
7438 
7439  prop = RNA_def_property(srna, "modifier_name", PROP_STRING, PROP_NONE);
7440  RNA_def_property_ui_text(prop, "Modifier Name", "");
7441  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, "rna_spreadsheet_context_update");
7442 }
7443 
7445 {
7446  StructRNA *srna;
7447  PropertyRNA *prop;
7448 
7449  srna = RNA_def_struct(brna, "SpreadsheetContextNode", "SpreadsheetContext");
7450 
7451  prop = RNA_def_property(srna, "node_name", PROP_STRING, PROP_NONE);
7452  RNA_def_property_ui_text(prop, "Node Name", "");
7453  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, "rna_spreadsheet_context_update");
7454 }
7455 
7457 {
7458  StructRNA *srna;
7459  PropertyRNA *parm;
7460  FunctionRNA *func;
7461 
7462  RNA_def_property_srna(cprop, "SpreadsheetContextPath");
7463  srna = RNA_def_struct(brna, "SpreadsheetContextPath", NULL);
7464  RNA_def_struct_sdna(srna, "SpaceSpreadsheet");
7465 
7466  func = RNA_def_function(srna, "append", "rna_SpaceSpreadsheet_context_path_append");
7467  RNA_def_function_ui_description(func, "Append a context path element");
7468  parm = RNA_def_property(func, "type", PROP_ENUM, PROP_NONE);
7471  parm = RNA_def_pointer(
7472  func, "context", "SpreadsheetContext", "", "Newly created context path element");
7473  RNA_def_function_return(func, parm);
7474 
7475  func = RNA_def_function(srna, "clear", "rna_SpaceSpreadsheet_context_path_clear");
7476  RNA_def_function_ui_description(func, "Clear entire context path");
7477 }
7478 
7480 {
7481  PropertyRNA *prop, *parm;
7482  StructRNA *srna;
7483  FunctionRNA *func;
7484 
7485  static const EnumPropertyItem geometry_component_type_items[] = {
7487  "MESH",
7488  ICON_MESH_DATA,
7489  "Mesh",
7490  "Mesh component containing point, corner, edge and face data"},
7492  "POINTCLOUD",
7493  ICON_POINTCLOUD_DATA,
7494  "Point Cloud",
7495  "Point cloud component containing only point data"},
7497  "INSTANCES",
7498  ICON_EMPTY_AXIS,
7499  "Instances",
7500  "Instances of objects or collections"},
7501  {0, NULL, 0, NULL, NULL},
7502  };
7503 
7504  static const EnumPropertyItem object_eval_state_items[] = {
7506  "EVALUATED",
7507  ICON_NONE,
7508  "Evaluated",
7509  "Use data from fully or partially evaluated object"},
7511  "ORIGINAL",
7512  ICON_NONE,
7513  "Original",
7514  "Use data from original object without any modifiers applied"},
7515  {0, NULL, 0, NULL, NULL},
7516  };
7517 
7522 
7523  srna = RNA_def_struct(brna, "SpaceSpreadsheet", "Space");
7524  RNA_def_struct_ui_text(srna, "Space Spreadsheet", "Spreadsheet space data");
7525 
7527 
7528  prop = RNA_def_property(srna, "is_pinned", PROP_BOOLEAN, PROP_NONE);
7530  RNA_def_property_ui_text(prop, "Is Pinned", "Context path is pinned");
7532 
7533  prop = RNA_def_property(srna, "display_context_path_collapsed", PROP_BOOLEAN, PROP_NONE);
7535  RNA_def_property_ui_text(prop, "Display Context Path Collapsed", "");
7537 
7538  prop = RNA_def_property(srna, "context_path", PROP_COLLECTION, PROP_NONE);
7539  RNA_def_property_struct_type(prop, "SpreadsheetContext");
7540  RNA_def_property_ui_text(prop, "Context Path", "Context path to the data being displayed");
7542 
7543  prop = RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE);
7546  prop, "Show Only Selected", "Only include rows that correspond to selected elements");
7548 
7549  prop = RNA_def_property(srna, "geometry_component_type", PROP_ENUM, PROP_NONE);
7550  RNA_def_property_enum_items(prop, geometry_component_type_items);
7552  prop, "Geometry Component", "Part of the geometry to display data from");
7555  "rna_SpaceSpreadsheet_geometry_component_type_update");
7556 
7557  prop = RNA_def_property(srna, "attribute_domain", PROP_ENUM, PROP_NONE);
7559  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceSpreadsheet_attribute_domain_itemf");
7560  RNA_def_property_ui_text(prop, "Attribute Domain", "Attribute domain to display");
7562 
7563  prop = RNA_def_property(srna, "object_eval_state", PROP_ENUM, PROP_NONE);
7564  RNA_def_property_enum_items(prop, object_eval_state_items);
7565  RNA_def_property_ui_text(prop, "Object Evaluation State", "");
7567 
7568  func = RNA_def_function(
7569  srna, "set_geometry_node_context", "rna_spreadsheet_set_geometry_node_context");
7571  func, "Update context_path to point to a specific node in a node editor");
7572  parm = RNA_def_pointer(
7573  func, "node_editor", "SpaceNodeEditor", "", "Editor to take the context from");
7575  parm = RNA_def_pointer(func, "node", "Node", "", "");
7577 }
7578 
7580 {
7581  rna_def_space(brna);
7582  rna_def_space_image(brna);
7584  rna_def_space_text(brna);
7589  rna_def_filemenu_entry(brna);
7591  rna_def_space_outliner(brna);
7592  rna_def_space_view3d(brna);
7595  rna_def_space_graph(brna);
7596  rna_def_space_nla(brna);
7597  rna_def_space_console(brna);
7598  rna_def_console_line(brna);
7599  rna_def_space_info(brna);
7600  rna_def_space_userpref(brna);
7601  rna_def_node_tree_path(brna);
7602  rna_def_space_node(brna);
7603  rna_def_space_clip(brna);
7605 }
7606 
7607 #endif
bool BKE_animdata_set_action(struct ReportList *reports, struct ID *id, struct bAction *act)
Definition: anim_data.c:150
struct AnimData * BKE_animdata_add_id(struct ID *id)
Definition: anim_data.c:113
Generic geometry attributes built on CustomData.
@ ATTR_DOMAIN_POINT
Definition: BKE_attribute.h:43
@ ATTR_DOMAIN_FACE
Definition: BKE_attribute.h:46
@ ATTR_DOMAIN_CORNER
Definition: BKE_attribute.h:45
@ ATTR_DOMAIN_EDGE
Definition: BKE_attribute.h:44
struct ScrArea * CTX_wm_area(const bContext *C)
Definition: context.c:714
struct Scene * CTX_data_scene(const bContext *C)
Definition: context.c:1034
struct wmWindowManager * CTX_wm_manager(const bContext *C)
Definition: context.c:689
struct ViewLayer * CTX_data_view_layer(const bContext *C)
Definition: context.c:1044
struct ARegion * CTX_wm_region(const bContext *C)
Definition: context.c:725
struct Main * CTX_data_main(const bContext *C)
Definition: context.c:1018
GeometryComponentType
@ GEO_COMPONENT_TYPE_MESH
@ GEO_COMPONENT_TYPE_POINT_CLOUD
@ GEO_COMPONENT_TYPE_INSTANCES
#define G_MAIN
Definition: BKE_global.h:232
struct IDProperty * IDP_New(const char type, const IDPropertyTemplate *val, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition: idprop.c:907
void BKE_image_multiview_index(struct Image *ima, struct ImageUser *iuser)
Definition: image.c:3846
struct RenderPass * BKE_image_multilayer_index(struct RenderResult *rr, struct ImageUser *iuser)
Definition: image.c:3813
void BKE_image_init_imageuser(struct Image *ima, struct ImageUser *iuser)
Definition: image.c:3459
struct Key * BKE_key_from_object(const struct Object *ob)
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:2113
bool BKE_id_is_in_global_main(struct ID *id)
Definition: lib_id.c:2287
#define MOVIECLIP_PREVIEW_GRAYSCALE
#define MOVIECLIP_DISABLE_BLUE
#define MOVIECLIP_DISABLE_RED
#define MOVIECLIP_DISABLE_GREEN
bool BKE_nla_action_stash(struct AnimData *adt, const bool is_liboverride)
Definition: nla.c:1883
void BKE_nla_tweakmode_exit(struct AnimData *adt)
Definition: nla.c:2148
struct bUserAssetLibrary * BKE_preferences_asset_library_find_from_index(const struct UserDef *userdef, int index) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT
void BKE_reportf(ReportList *reports, ReportType 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 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:1499
@ STUDIOLIGHT_INTERNAL
@ STUDIOLIGHT_TYPE_MATCAP
@ STUDIOLIGHT_TYPE_WORLD
@ STUDIOLIGHT_TYPE_STUDIO
@ STUDIOLIGHT_EXTERNAL_FILE
struct ListBase * BKE_studiolight_listbase(void)
Definition: studiolight.c:1510
struct StudioLight * BKE_studiolight_find(const char *name, int flag)
Definition: studiolight.c:1483
#define STUDIOLIGHT_FLAG_ALL
#define BLI_assert_unreachable()
Definition: BLI_assert.h:96
#define BLI_assert(a)
Definition: BLI_assert.h:58
struct GSet GSet
Definition: BLI_ghash.h:189
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:1125
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp)
Definition: BLI_ghash.c:1253
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
Definition: BLI_listbase.h:124
#define LISTBASE_FOREACH(type, var, list)
Definition: BLI_listbase.h:172
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:110
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_findstringindex(const struct ListBase *listbase, const char *id, const int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define M_PI
Definition: BLI_math_base.h:38
bool invert_m4_m4(float R[4][4], const float A[4][4])
Definition: math_matrix.c:1278
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:1541
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
Definition: string.c:70
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
Definition: string.c:108
#define ARRAY_SIZE(arr)
#define UNUSED_VARS(...)
#define UNUSED(x)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define ELEM(...)
#define STREQ(a, b)
#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:722
#define FILTER_ID_MC
Definition: DNA_ID.h:718
#define FILTER_ID_SPK
Definition: DNA_ID.h:726
#define FILTER_ID_CF
Definition: DNA_ID.h:733
@ ID_RECALC_TRANSFORM
Definition: DNA_ID.h:599
@ ID_RECALC_ANIMATION
Definition: DNA_ID.h:614
@ ID_RECALC_GEOMETRY
Definition: DNA_ID.h:611
@ ID_RECALC_BASE_FLAGS
Definition: DNA_ID.h:641
#define FILTER_ID_AC
Definition: DNA_ID.h:705
#define FILTER_ID_MA
Definition: DNA_ID.h:716
#define FILTER_ID_CA
Definition: DNA_ID.h:708
#define FILTER_ID_SO
Definition: DNA_ID.h:727
#define FILTER_ID_PT
Definition: DNA_ID.h:737
#define FILTER_ID_BR
Definition: DNA_ID.h:707
#define FILTER_ID_WS
Definition: DNA_ID.h:734
#define FILTER_ID_MB
Definition: DNA_ID.h:717
#define FILTER_ID_VF
Definition: DNA_ID.h:730
#define FILTER_ID_LA
Definition: DNA_ID.h:713
@ IDP_GROUP
Definition: DNA_ID.h:101
#define FILTER_ID_GR
Definition: DNA_ID.h:711
#define FILTER_ID_TE
Definition: DNA_ID.h:728
#define FILTER_ID_LT
Definition: DNA_ID.h:715
#define FILTER_ID_LS
Definition: DNA_ID.h:714
#define FILTER_ID_PA
Definition: DNA_ID.h:732
#define FILTER_ID_ME
Definition: DNA_ID.h:719
#define FILTER_ID_AR
Definition: DNA_ID.h:706
#define FILTER_ID_SIM
Definition: DNA_ID.h:739
#define FILTER_ID_MSK
Definition: DNA_ID.h:720
#define FILTER_ID_GD
Definition: DNA_ID.h:710
#define FILTER_ID_HA
Definition: DNA_ID.h:736
#define FILTER_ID_PC
Definition: DNA_ID.h:724
#define ID_IS_OVERRIDE_LIBRARY(_id)
Definition: DNA_ID.h:445
#define FILTER_ID_PAL
Definition: DNA_ID.h:723
#define FILTER_ID_IM
Definition: DNA_ID.h:712
#define FILTER_ID_SCE
Definition: DNA_ID.h:725
#define FILTER_ID_CU
Definition: DNA_ID.h:709
#define FILTER_ID_LP
Definition: DNA_ID.h:735
#define FILTER_ID_VO
Definition: DNA_ID.h:738
#define FILTER_ID_WO
Definition: DNA_ID.h:731
#define FILTER_ID_NT
Definition: DNA_ID.h:721
#define FILTER_ID_TXT
Definition: DNA_ID.h:729
@ ID_TE
Definition: DNA_ID_enums.h:64
@ ID_LA
Definition: DNA_ID_enums.h:67
@ ID_KE
Definition: DNA_ID_enums.h:70
@ ID_SCE
Definition: DNA_ID_enums.h:57
@ ID_WO
Definition: DNA_ID_enums.h:71
@ ID_MA
Definition: DNA_ID_enums.h:63
@ ID_SCR
Definition: DNA_ID_enums.h:72
@ ID_OB
Definition: DNA_ID_enums.h:59
@ 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 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_SMOOTH
#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_SPEAKER
@ OB_LATTICE
@ OB_MBALL
@ OB_EMPTY
@ OB_SURF
@ OB_CAMERA
@ OB_FONT
@ OB_ARMATURE
@ OB_LAMP
@ OB_MESH
@ OB_POINTCLOUD
@ OB_HAIR
@ OB_VOLUME
@ OB_CURVE
@ OB_GPENCIL
@ OB_LIGHTPROBE
#define OBEDIT_FROM_VIEW_LAYER(view_layer)
#define OBACT(_view_layer)
@ SCE_VIEWS_FORMAT_MULTIVIEW
@ SCE_EEVEE_BLOOM_ENABLED
@ STEREO_LEFT_ID
@ STEREO_RIGHT_ID
@ RGN_ALIGN_NONE
@ RGN_ALIGN_QSPLIT
@ 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
#define MAXSEQ
@ SEQ_TYPE_MOVIE
@ 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
@ SEQ_DRAW_OVERLAY_CURRENT
@ SEQ_DRAW_OVERLAY_REFERENCE
@ SEQ_DRAW_OVERLAY_RECT
@ FILE_SORT_ALPHA
@ FILE_SORT_TIME
@ FILE_SORT_EXTENSION
@ FILE_SORT_SIZE
@ SI_OVERLAY_SHOW_OVERLAYS
@ 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
@ SI_UVDT_BLACK
@ SI_UVDT_DASH
@ SI_UVDT_WHITE
@ SI_UVDT_OUTLINE
@ SC_VIEW_GRAPH
@ SC_VIEW_CLIP
@ SC_VIEW_DOPESHEET
@ 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
@ SI_STICKY_VERTEX
@ SI_STICKY_LOC
@ SI_STICKY_DISABLE
@ 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_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_LIB_OVERRIDE
@ 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_OB_OTHERS
@ SO_FILTER_NO_OB_EMPTY
@ SO_FILTER_NO_COLLECTION
@ SO_FILTER_NO_OB_ARMATURE
@ SPREADSHEET_FILTER_SELECTED_ONLY
@ SNLA_DRAWTIME
@ SNLA_NOSTRIPCURVES
@ SNLA_NOLOCALMARKERS
@ SNLA_SHOW_MARKERS
@ SNLA_NOREALTIMEUPDATES
@ SNODE_INSERTOFS_DIR_RIGHT
@ SNODE_INSERTOFS_DIR_LEFT
@ SO_SYNC_SELECT
@ SO_MODE_COLUMN
@ SO_SKIP_SORT_ALPHA
@ SEQ_DRAW_TRANSFORM_PREVIEW
@ SEQ_DRAW_BACKDROP
@ SEQ_DRAW_OFFSET_EXT
@ 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
@ SPREADSHEET_OBJECT_EVAL_STATE_EVALUATED
@ SPREADSHEET_OBJECT_EVAL_STATE_ORIGINAL
@ FILE_ASSET_LIBRARY_LOCAL
@ FILE_ASSET_LIBRARY_CUSTOM
@ 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_SHOW_GPENCIL
@ SEQ_USE_ALPHA
@ SEQ_SHOW_STRIP_DURATION
@ SEQ_SHOW_FCURVES
@ SEQ_MARKER_TRANS
@ SEQ_USE_PROXIES
@ SEQ_SHOW_STRIP_NAME
@ SEQ_DRAW_COLOR_SEPARATED
@ SEQ_ZOOM_TO_FIT
@ SEQ_SHOW_METADATA
@ SEQ_ALL_WAVEFORMS
@ SEQ_NO_WAVEFORMS
@ SEQ_SHOW_STRIP_SOURCE
@ SEQ_SHOW_SAFE_MARGINS
@ SEQ_SHOW_SAFE_CENTER
@ SEQ_SHOW_STRIP_OVERLAY
@ SC_GPENCIL_SRC_CLIP
@ SC_GPENCIL_SRC_TRACK
@ SI_PIXEL_SNAP_CORNER
@ SI_PIXEL_SNAP_CENTER
@ SI_PIXEL_SNAP_DISABLED
@ 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
@ V2D_VIEWSYNC_SCREEN_TIME
@ 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
#define V3D_SHOW_ANNOTATION
#define RV3D_VIEW_IS_AXIS(view)
#define V3D_GP_FADE_OBJECTS
#define RV3D_CAMZOOM_MAX
#define V3D_LOCK_CAMERA
@ V3D_AROUND_CENTER_BOUNDS
@ V3D_AROUND_CURSOR
@ V3D_AROUND_CENTER_MEDIAN
@ V3D_AROUND_LOCAL_ORIGINS
@ 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_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
@ V3D_OVERLAY_WPAINT_CONTOURS
@ V3D_GIZMO_SHOW_LIGHT_LOOK_AT
@ V3D_GIZMO_SHOW_LIGHT_SIZE
@ V3D_OVERLAY_PAINT_WIRE
#define V3D_SHOW_ORTHO_GRID
#define V3D_S3D_DISPCAMERAS
@ V3D_SHADING_CAVITY_BOTH
@ V3D_SHADING_CAVITY_SSAO
@ V3D_SHADING_CAVITY_CURVATURE
#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
#define RV3D_CLIPPING
@ V3D_GIZMO_SHOW_EMPTY_FORCE_FIELD
@ V3D_GIZMO_SHOW_EMPTY_IMAGE
#define V3D_SHOW_BUNDLENAME
#define V3D_GP_SHOW_MATERIAL_NAME
#define V3D_XR_SESSION_MIRROR
#define V3D_SHOW_CAMERAPATH
#define V3D_SHOW_Z
#define V3D_SHOW_RECONSTRUCTION
#define V3D_RENDER_BORDER
@ RV3D_LOCK_ROTATION
@ RV3D_BOXVIEW
@ RV3D_BOXCLIP
@ V3D_GIZMO_SHOW_CAMERA_DOF_DIST
@ V3D_GIZMO_SHOW_CAMERA_LENS
#define V3D_SHOW_Y
#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
@ V3D_GIZMO_SHOW_OBJECT_ROTATE
@ V3D_GIZMO_SHOW_OBJECT_SCALE
@ V3D_GIZMO_SHOW_OBJECT_TRANSLATE
#define V3D_GP_SHOW_GRID
#define RV3D_CAMZOOM_MIN
@ CURVE_HANDLE_NONE
@ CURVE_HANDLE_ALL
@ CURVE_HANDLE_SELECTED
#define V3D_GP_FADE_NOACTIVE_GPENCIL
@ 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_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
#define V3D_SHOW_FLOOR
#define RV3D_ORTHO
#define V3D_S3D_DISPPLANE
#define V3D_GP_SHOW_MULTIEDIT_LINES
@ V3D_GIZMO_HIDE_TOOL
@ V3D_GIZMO_HIDE
@ V3D_GIZMO_HIDE_NAVIGATE
@ V3D_GIZMO_HIDE_CONTEXT
void ED_drivers_editor_init(struct bContext *C, struct ScrArea *area)
Definition: graph_utils.c:55
const char * ED_buttons_search_string_get(struct SpaceProperties *sbuts)
void ED_buttons_search_string_set(struct SpaceProperties *sbuts, const char *value)
bool ED_buttons_tab_has_search_result(struct SpaceProperties *sbuts, const int index)
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:638
void ED_space_clip_set_clip(struct bContext *C, struct bScreen *screen, struct SpaceClip *sc, struct MovieClip *clip)
Definition: clip_editor.c:577
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:78
int ED_file_icon(const struct FileDirEntry *file)
char * ED_fsmenu_entry_get_path(struct FSMenuEntry *fsentry)
Definition: fsmenu.c:258
void ED_fsmenu_entry_set_icon(struct FSMenuEntry *fsentry, const int icon)
Definition: fsmenu.c:285
void ED_file_change_dir_ex(struct bContext *C, struct bScreen *screen, struct ScrArea *area)
Definition: filesel.c:1049
struct FSMenuEntry * ED_fsmenu_get_category(struct FSMenu *fsmenu, FSMenuCategory category)
Definition: fsmenu.c:86
void ED_fsmenu_entry_set_path(struct FSMenuEntry *fsentry, const char *path)
Definition: fsmenu.c:263
int ED_fsmenu_get_nentries(struct FSMenu *fsmenu, FSMenuCategory category)
Definition: fsmenu.c:234
char * ED_fsmenu_entry_get_name(struct FSMenuEntry *fsentry)
Definition: fsmenu.c:307
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:246
int ED_fsmenu_entry_get_icon(struct FSMenuEntry *fsentry)
Definition: fsmenu.c:280
void ED_fsmenu_entry_set_name(struct FSMenuEntry *fsentry, const char *name)
Definition: fsmenu.c:321
void ED_space_image_release_buffer(struct SpaceImage *sima, struct ImBuf *ibuf, void *lock)
Definition: image_edit.c:171
void ED_space_image_set_mask(struct bContext *C, struct SpaceImage *sima, struct Mask *mask)
Definition: image_edit.c:127
bool ED_space_image_check_show_maskedit(struct SpaceImage *sima, struct Object *obedit)
Definition: image_edit.c:484
bool ED_space_image_show_paint(struct SpaceImage *sima)
Definition: image_edit.c:451
void ED_space_image_scopes_update(const struct bContext *C, struct SpaceImage *sima, struct ImBuf *ibuf, bool use_view_settings)
Definition: image_edit.c:416
void ED_space_image_paint_update(struct Main *bmain, struct wmWindowManager *wm, struct Scene *scene)
Definition: paint_image.c:807
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 Object *obedit, struct Image *ima, bool automatic)
Definition: image_edit.c:60
bool ED_space_image_show_uvedit(struct SpaceImage *sima, struct Object *obedit)
Definition: image_edit.c:460
bool ED_space_image_show_render(struct SpaceImage *sima)
Definition: image_edit.c:446
int ED_space_image_get_display_channel_mask(struct ImBuf *ibuf)
Definition: image_edit.c:179
void ED_space_image_get_size(struct SpaceImage *sima, int *r_width, int *r_height)
Definition: image_edit.c:215
struct ImBuf * ED_space_image_acquire_buffer(struct SpaceImage *sima, void **r_lock, int tile)
Definition: image_edit.c:139
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.c:59
void ED_node_set_tree_type(struct SpaceNode *snode, struct bNodeTreeType *typeinfo)
Definition: node_edit.c:439
void ED_node_tree_push(struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *gnode)
Definition: space_node.c:100
int ED_node_tree_path_length(struct SpaceNode *snode)
Definition: space_node.c:174
void ED_node_cursor_location_set(struct SpaceNode *snode, const float value[2])
Definition: space_node.c:611
void ED_node_tree_path_get(struct SpaceNode *snode, char *value)
Definition: space_node.c:187
void ED_node_cursor_location_get(const struct SpaceNode *snode, float value[2])
void ED_node_tree_pop(struct SpaceNode *snode)
Definition: space_node.c:135
void ED_area_tag_redraw(ScrArea *area)
Definition: area.c:745
void ED_region_visibility_change_update(struct bContext *C, struct ScrArea *area, struct ARegion *region)
Definition: area.c:2032
void ED_region_visibility_change_update_animated(struct bContext *C, struct ScrArea *area, struct ARegion *region)
Definition: screen_ops.c:5170
void ED_region_toggle_hidden(struct bContext *C, struct ARegion *region)
Definition: area.c:2059
Scene * ED_screen_scene_find(const struct bScreen *screen, const struct wmWindowManager *wm)
void ED_region_tag_redraw(struct ARegion *region)
Definition: area.c:667
void ED_area_tag_refresh(ScrArea *area)
Definition: area.c:774
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)
struct ID * ED_spreadsheet_get_current_id(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_update_tag(struct SpaceSpreadsheet *sspreadsheet)
void ED_spreadsheet_set_geometry_node_context(struct SpaceSpreadsheet *sspreadsheet, struct SpaceNode *snode, struct bNode *node)
bool ED_text_is_syntax_highlight_supported(struct Text *text)
Definition: text_format.c:230
void ED_text_scroll_to_cursor(struct SpaceText *st, struct ARegion *region, bool center)
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:1637
void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *area)
Definition: space_view3d.c:248
void ED_view3d_quadview_update(struct ScrArea *area, struct ARegion *region, bool do_clip)
Definition: view3d_utils.c:939
_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
_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
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
StructRNA RNA_SpacePreferences
StructRNA RNA_SpreadsheetContextNode
StructRNA RNA_SpaceView3D
StructRNA RNA_SpreadsheetContextObject
StructRNA RNA_FileAssetSelectParams
StructRNA RNA_SpaceUVEditor
StructRNA RNA_SpaceInfo
StructRNA RNA_SpaceProperties
StructRNA RNA_SpaceImageEditor
StructRNA RNA_Space
StructRNA RNA_View3DOverlay
StructRNA RNA_SpaceNLA
StructRNA RNA_StudioLight
StructRNA RNA_SpaceTextEditor
StructRNA RNA_SpaceNodeEditor
StructRNA RNA_AssetMetaData
StructRNA RNA_SpaceSequenceEditor
StructRNA RNA_SpaceOutliner
StructRNA RNA_SpaceClipEditor
StructRNA RNA_ID
StructRNA RNA_SpaceSpreadsheet
StructRNA RNA_SpaceDopeSheetEditor
StructRNA RNA_SpaceFileBrowser
StructRNA RNA_FileBrowserFSMenuEntry
StructRNA RNA_SpreadsheetContextModifier
StructRNA RNA_SpaceImageOverlay
StructRNA RNA_FileSelectParams
StructRNA RNA_SpaceConsole
StructRNA * ID_code_to_RNA_type(short idcode)
StructRNA RNA_SpaceGraphEditor
#define RNA_MAX_ARRAY_DIMENSION
Definition: RNA_define.h:42
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:339
@ PARM_REQUIRED
Definition: RNA_types.h:337
@ FUNC_USE_CONTEXT
Definition: RNA_types.h:577
@ PROP_FLOAT
Definition: RNA_types.h:75
@ PROP_BOOLEAN
Definition: RNA_types.h:73
@ PROP_ENUM
Definition: RNA_types.h:77
@ PROP_INT
Definition: RNA_types.h:74
@ PROP_STRING
Definition: RNA_types.h:76
@ PROP_POINTER
Definition: RNA_types.h:78
@ PROP_COLLECTION
Definition: RNA_types.h:79
@ PROP_UNIT_CAMERA
Definition: RNA_types.h:93
#define RNA_TRANSLATION_PREC_DEFAULT
Definition: RNA_types.h:104
@ PROP_DYNAMIC
Definition: RNA_types.h:275
@ PROP_CONTEXT_UPDATE
Definition: RNA_types.h:254
@ PROP_ANIMATABLE
Definition: RNA_types.h:188
@ PROP_NEVER_UNLINK
Definition: RNA_types.h:232
@ PROP_EDITABLE
Definition: RNA_types.h:175
@ PROP_NEVER_NULL
Definition: RNA_types.h:225
@ PROP_TEXTEDIT_UPDATE
Definition: RNA_types.h:195
@ PROP_HIDDEN
Definition: RNA_types.h:202
@ PROP_ID_REFCOUNT
Definition: RNA_types.h:212
@ PROP_MATRIX
Definition: RNA_types.h:144
@ PROP_XYZ
Definition: RNA_types.h:148
@ PROP_DISTANCE
Definition: RNA_types.h:135
@ PROP_BYTESTRING
Definition: RNA_types.h:120
@ PROP_FILENAME
Definition: RNA_types.h:118
@ PROP_COLOR
Definition: RNA_types.h:139
@ PROP_ANGLE
Definition: RNA_types.h:132
@ PROP_NONE
Definition: RNA_types.h:113
@ PROP_FACTOR
Definition: RNA_types.h:131
@ PROP_TRANSLATION
Definition: RNA_types.h:140
@ PROP_UNSIGNED
Definition: RNA_types.h:129
@ PROP_QUATERNION
Definition: RNA_types.h:146
@ PROP_FILEPATH
Definition: RNA_types.h:116
#define C
Definition: RandGen.cpp:39
#define UI_DPI_FAC
Definition: UI_interface.h:309
bool UI_view2d_area_supports_sync(struct ScrArea *area)
Definition: view2d.c:869
#define V2D_LOCK_SET
Definition: UI_view2d.h:82
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.c:876
#define NC_WORLD
Definition: WM_types.h:288
#define ND_SHADING
Definition: WM_types.h:377
#define ND_SPACE_SEQUENCER
Definition: WM_types.h:430
#define NC_WINDOW
Definition: WM_types.h:277
#define NC_NODE
Definition: WM_types.h:295
#define NC_GEOM
Definition: WM_types.h:294
#define ND_DATA
Definition: WM_types.h:408
#define ND_SPACE_DOPESHEET
Definition: WM_types.h:428
#define NC_ANIMATION
Definition: WM_types.h:289
#define ND_SPACE_NLA
Definition: WM_types.h:429
#define ND_SPACE_NODE
Definition: WM_types.h:421
#define ND_DISPLAY
Definition: WM_types.h:391
#define NC_MOVIECLIP
Definition: WM_types.h:298
#define ND_SPACE_PROPERTIES
Definition: WM_types.h:424
#define NC_SCENE
Definition: WM_types.h:279
#define ND_SPACE_NODE_VIEW
Definition: WM_types.h:431
#define ND_NODES
Definition: WM_types.h:336
#define ND_TOOLSETTINGS
Definition: WM_types.h:349
#define ND_SPACE_IMAGE
Definition: WM_types.h:417
#define NA_EDITED
Definition: WM_types.h:462
#define ND_SPACE_GRAPH
Definition: WM_types.h:427
#define NC_TEXT
Definition: WM_types.h:287
#define NC_MATERIAL
Definition: WM_types.h:281
#define NC_LAMP
Definition: WM_types.h:283
#define NC_IMAGE
Definition: WM_types.h:285
#define ND_SPACE_CLIP
Definition: WM_types.h:433
#define ND_SPACE_INFO_REPORT
Definition: WM_types.h:415
#define ND_SPACE_TIME
Definition: WM_types.h:426
#define NC_GPENCIL
Definition: WM_types.h:300
#define NC_TEXTURE
Definition: WM_types.h:282
#define ND_SPACE_TEXT
Definition: WM_types.h:425
#define ND_SPACE_SPREADSHEET
Definition: WM_types.h:435
#define ND_SPACE_VIEW3D
Definition: WM_types.h:423
#define ND_KEYFRAME
Definition: WM_types.h:394
#define NS_VIEW3D_SHADING
Definition: WM_types.h:455
#define ND_SPACE_CONSOLE
Definition: WM_types.h:414
#define ND_SPACE_FILE_PARAMS
Definition: WM_types.h:418
#define NC_SPACE
Definition: WM_types.h:293
#define ND_SPACE_OUTLINER
Definition: WM_types.h:422
#define ND_SPACE_FILE_LIST
Definition: WM_types.h:419
unsigned int U
Definition: btGjkEpa3.h:78
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btQuadWord.h:119
SIMD_FORCE_INLINE btScalar length(const btQuaternion &q)
Return the length of a quaternion.
Definition: btQuaternion.h:895
struct RenderResult * rr
OperationNode * node
Scene scene
bool is_valid
bNodeTree * ntree
RenderEngineType * RE_engines_find(const char *idname)
Definition: engine.c:108
void SEQ_cache_cleanup(Scene *scene)
Definition: image_cache.c:1251
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
#define GS(x)
Definition: iris.c:241
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:41
void *(* MEM_mallocN)(size_t len, const char *str)
Definition: mallocn.c:47
int main(int argc, char **argv)
Definition: msgfmt.c:457
static void area(int d1, int d2, int e1, int e2, float weights[2])
int SEQ_rendersize_to_proxysize(int render_size)
Definition: proxy.c:84
bool SEQ_proxy_rebuild_context(Main *bmain, Depsgraph *depsgraph, Scene *scene, Sequence *seq, struct GSet *file_list, ListBase *queue)
Definition: proxy.c:410
ProxyJob * ED_seq_proxy_job_get(const bContext *C, wmJob *wm_job)
Definition: proxy_job.c:94
struct wmJob * ED_seq_proxy_wm_job_get(const bContext *C)
Definition: proxy_job.c:111
const EnumPropertyItem rna_enum_id_type_items[]
Definition: rna_ID.c:46
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
Definition: rna_access.c:146
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb, IteratorSkipFunc skip)
Definition: rna_access.c:4823
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
Definition: rna_access.c:196
void * rna_iterator_listbase_get(CollectionPropertyIterator *iter)
Definition: rna_access.c:4855
const EnumPropertyItem rna_enum_attribute_domain_items[]
Definition: rna_attribute.c:52
void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
Definition: rna_define.c:4448
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
Definition: rna_define.c:1167
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2762
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
Definition: rna_define.c:1212
void RNA_define_animate_sdna(bool animate)
Definition: rna_define.c:766
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3481
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
Definition: rna_define.c:4159
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
Definition: rna_define.c:2257
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1555
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
Definition: rna_define.c:3312
void RNA_def_property_float_default(PropertyRNA *prop, float value)
Definition: rna_define.c:2042
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
Definition: rna_define.c:4302
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
Definition: rna_define.c:2127
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
Definition: rna_define.c:3153
void RNA_define_verify_sdna(bool verify)
Definition: rna_define.c:751
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
Definition: rna_define.c:1676
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2717
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
Definition: rna_define.c:1684
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
Definition: rna_define.c:4262
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
Definition: rna_define.c:3462
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
Definition: rna_define.c:3408
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
Definition: rna_define.c:1259
void RNA_def_property_boolean_default(PropertyRNA *prop, bool value)
Definition: rna_define.c:1957
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
Definition: rna_define.c:2971
void RNA_def_property_dynamic_array_funcs(PropertyRNA *prop, const char *getlength)
Definition: rna_define.c:2953
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
Definition: rna_define.c:1629
void RNA_def_property_int_default(PropertyRNA *prop, int value)
Definition: rna_define.c:1998
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
Definition: rna_define.c:1892
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
Definition: rna_define.c:1067
void RNA_def_property_array(PropertyRNA *prop, int length)
Definition: rna_define.c:1568
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
Definition: rna_define.c:1757
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
Definition: rna_define.c:1792
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
Definition: rna_define.c:2791
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
Definition: rna_define.c:4337
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
Definition: rna_define.c:2927
const int rna_matrix_dimsize_4x4[]
Definition: rna_define.c:1626
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
Definition: rna_define.c:3251
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
Definition: rna_define.c:2877
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
Definition: rna_define.c:1279
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2691
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
Definition: rna_define.c:4470
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
Definition: rna_define.c:1122
void RNA_def_function_flag(FunctionRNA *func, int flag)
Definition: rna_define.c:4332
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1517
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
Definition: rna_define.c:3373
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
Definition: rna_define.c:1047
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2623
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
Definition: rna_define.c:4416
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
Definition: rna_define.c:3055
void RNA_def_struct_idprops_func(StructRNA *srna, const char *idproperties)
Definition: rna_define.c:1179
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
Definition: rna_define.c:2870
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1512
void RNA_enum_item_add_separator(EnumPropertyItem **items, int *totitem)
Definition: rna_define.c:4442
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
Definition: rna_define.c:3585
PropertyRNA * RNA_def_collection(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
Definition: rna_define.c:4194
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2515
void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item, int value)
Definition: rna_define.c:4455
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
Definition: rna_define.c:1706
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2364
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
Definition: rna_define.c:2348
void RNA_def_struct_nested(BlenderRNA *brna, StructRNA *srna, const char *structname)
Definition: rna_define.c:1138
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1547
void RNA_api_space_node(struct StructRNA *srna)
Definition: rna_space_api.c:85
void RNA_api_space_filebrowser(struct StructRNA *srna)
void RNA_api_region_view3d(struct StructRNA *srna)
Definition: rna_space_api.c:76
void RNA_api_space_text(struct StructRNA *srna)
const EnumPropertyItem DummyRNA_NULL_items[]
Definition: rna_rna.c:40
const EnumPropertyItem rna_enum_transform_pivot_items_full[]
Definition: rna_scene.c:552
static void rna_def_space_userpref(BlenderRNA *brna)
Definition: rna_space.c:6835
static void rna_def_space_view3d_overlay(BlenderRNA *brna)
Definition: rna_space.c:3994
static const EnumPropertyItem rna_enum_viewport_lighting_items[]
Definition: rna_space.c:397
#define SACT_ITEM_MASK
Definition: rna_space.c:213
const EnumPropertyItem rna_enum_space_type_items[]
Definition: rna_space.c:72
static const EnumPropertyItem rna_enum_view3dshading_render_pass_type_items[]
Definition: rna_space.c:419
static const EnumPropertyItem stereo3d_camera_items[]
Definition: rna_space.c:312
static void rna_def_space_node_path_api(BlenderRNA *brna, PropertyRNA *cprop)
Definition: rna_space.c:6877
static void rna_def_space_spreadsheet_context(BlenderRNA *brna)
Definition: rna_space.c:7404
static const EnumPropertyItem rna_enum_studio_light_items[]
Definition: rna_space.c:414
static void rna_def_space_graph(BlenderRNA *brna)
Definition: rna_space.c:5812
static void rna_def_fileselect_entry(BlenderRNA *brna)
Definition: rna_space.c:6271
const EnumPropertyItem rna_enum_shading_type_items[]
Definition: rna_space.c:385
const EnumPropertyItem rna_enum_space_sequencer_view_type_items[]
Definition: rna_space.c:177
#define SI_ITEM_MASK
Definition: rna_space.c:274
static void rna_def_space_filebrowser(BlenderRNA *brna)
Definition: rna_space.c:6629
static void rna_def_space_sequencer(BlenderRNA *brna)
Definition: rna_space.c:5288
#define SACT_ITEM_CACHEFILE
Definition: rna_space.c:217
static void rna_def_fileselect_params(BlenderRNA *brna)
Definition: rna_space.c:6309
#define DEF_SHOW_REGION_PROPERTY(identifier, label, description)
#define SACT_ITEM_SHAPEKEY
Definition: rna_space.c:203
static void rna_def_space_view3d(BlenderRNA *brna)
Definition: rna_space.c:4499
static const EnumPropertyItem fileselectparams_recursion_level_items[]
Definition: rna_space.c:485
static const EnumPropertyItem autosnap_items[]
Definition: rna_space.c:371
#define SI_ITEM_VIEW(identifier, name, icon)
Definition: rna_space.c:262
static void rna_def_space_properties(BlenderRNA *brna)
Definition: rna_space.c:5008
#define SACT_ITEM_DOPESHEET
Definition: rna_space.c:190
static void rna_def_filemenu_entry(BlenderRNA *brna)
Definition: rna_space.c:6587
static EnumPropertyItem rna_enum_space_action_ui_mode_items[]
Definition: rna_space.c:236
static void rna_def_space_spreadsheet_context_node(BlenderRNA *brna)
Definition: rna_space.c:7444
static const EnumPropertyItem rna_enum_shading_color_type_items[]
Definition: rna_space.c:404
#define SI_ITEM_PAINT
Definition: rna_space.c:270
static void rna_def_space_spreadsheet_context_path(BlenderRNA *brna, PropertyRNA *cprop)
Definition: rna_space.c:7456
const EnumPropertyItem rna_enum_space_image_mode_items[]
Definition: rna_space.c:294
static const EnumPropertyItem rna_enum_space_image_mode_ui_items[]
Definition: rna_space.c:287
static void rna_def_space_text(BlenderRNA *brna)
Definition: rna_space.c:5529
static void rna_def_space(BlenderRNA *brna)
Definition: rna_space.c:3223
static const EnumPropertyItem stereo3d_eye_items[]
Definition: rna_space.c:344
static const EnumPropertyItem buttons_context_items[]
Definition: rna_space.c:455
static void rna_def_space_nla(BlenderRNA *brna)
Definition: rna_space.c:5976
static void rna_def_space_info(BlenderRNA *brna)
Definition: rna_space.c:6799
static void rna_def_space_clip(BlenderRNA *brna)
Definition: rna_space.c:7104
static void rna_def_space_outliner(BlenderRNA *brna)
Definition: rna_space.c:3441
void RNA_def_space(BlenderRNA *brna)
Definition: rna_space.c:7579
static void rna_def_space_image(BlenderRNA *brna)
Definition: rna_space.c:5110
static void rna_def_space_dopesheet(BlenderRNA *brna)
Definition: rna_space.c:5663
static void rna_def_fileselect_idfilter(BlenderRNA *brna)
Definition: rna_space.c:6117
static const EnumPropertyItem rna_enum_curve_display_handle_items[]
Definition: rna_space.c:498
#define SACT_ITEM_ACTION
Definition: rna_space.c:198
const EnumPropertyItem rna_enum_space_file_browse_mode_items[]
Definition: rna_space.c:184
const EnumPropertyItem rna_enum_clip_editor_mode_items[]
Definition: rna_space.c:447
#define SACT_ITEM_GPENCIL
Definition: rna_space.c:208
#define SACT_ITEM_TIMELINE
Definition: rna_space.c:194
#define V3D_S3D_CAMERA_LEFT
Definition: rna_space.c:305
static EnumPropertyItem rna_enum_space_action_mode_all_items[]
Definition: rna_space.c:226
static void rna_def_space_generic_show_region_toggles(StructRNA *srna, int region_type_mask)
Definition: rna_space.c:3180
const EnumPropertyItem rna_enum_space_image_mode_all_items[]
Definition: rna_space.c:279
const EnumPropertyItem rna_enum_space_graph_mode_items[]
Definition: rna_space.c:167
static void rna_def_fileselect_asset_params(BlenderRNA *brna)
Definition: rna_space.c:6518
static const EnumPropertyItem dt_uv_items[]
Definition: rna_space.c:3172
#define V3D_S3D_CAMERA_RIGHT
Definition: rna_space.c:306
const EnumPropertyItem rna_enum_fileselect_params_sort_items[]
Definition: rna_space.c:327
static void rna_def_space_spreadsheet(BlenderRNA *brna)
Definition: rna_space.c:7479
static const EnumPropertyItem spreadsheet_context_type_items[]
Definition: rna_space.c:7397
static void rna_def_space_image_overlay(BlenderRNA *brna)
Definition: rna_space.c:5093
static void rna_def_space_spreadsheet_context_object(BlenderRNA *brna)
Definition: rna_space.c:7419
#define SI_ITEM_UV
Definition: rna_space.c:266
static void rna_def_node_tree_path(BlenderRNA *brna)
Definition: rna_space.c:6862
static void rna_def_space_mask_info(StructRNA *srna, int noteflag, const char *mask_set_func)
Definition: rna_space.c:3253
static const EnumPropertyItem display_channels_items[]
Definition: rna_space.c:351
#define V3D_S3D_CAMERA_S3D
Definition: rna_space.c:307
static void rna_def_space_node(BlenderRNA *brna)
Definition: rna_space.c:6918
const EnumPropertyItem rna_enum_space_action_mode_items[]
Definition: rna_space.c:248
static void rna_def_space_image_uv(BlenderRNA *brna)
Definition: rna_space.c:3302
static void rna_def_console_line(BlenderRNA *brna)
Definition: rna_space.c:6038
static void rna_def_space_spreadsheet_context_modifier(BlenderRNA *brna)
Definition: rna_space.c:7432
static void rna_def_space_view3d_shading(BlenderRNA *brna)
Definition: rna_space.c:3678
static void rna_def_space_console(BlenderRNA *brna)
Definition: rna_space.c:6073
const char * RE_engine_id_BLENDER_WORKBENCH
Definition: scene.c:1743
struct SELECTID_Context context
Definition: select_engine.c:47
ListBase * SEQ_active_seqbase_get(const Editing *ed)
Definition: sequencer.c:350
Editing * SEQ_editing_get(Scene *scene, bool alloc)
Definition: sequencer.c:232
static void seq_build_proxy(bContext *C, Sequence *seq)
#define min(a, b)
Definition: sort.c:51
unsigned __int64 uint64_t
Definition: stdint.h:93
void * regiondata
struct ARegion * prev
struct ARegion * next
short alignment
bAction * action
union CollectionPropertyIterator::@1099 internal
ListBaseIterator listbase
Definition: RNA_types.h:394
const char * identifier
Definition: RNA_types.h:446
const char * name
Definition: RNA_types.h:450
const char * description
Definition: RNA_types.h:452
Definition: fsmenu.c:68
struct AssetMetaData * asset_data
Definition: DNA_ID.h:273
int us
Definition: DNA_ID.h:293
char name[66]
Definition: DNA_ID.h:283
ID id
Definition: DNA_key_types.h:79
struct AnimData * adt
Definition: DNA_key_types.h:81
struct Link * link
Definition: RNA_types.h:355
void * last
Definition: DNA_listBase.h:47
void * first
Definition: DNA_listBase.h:47
Definition: BKE_main.h:116
ListBase wm
Definition: BKE_main.h:175
ListBase objects
Definition: BKE_main.h:148
struct AnimData * adt
struct StructRNA * type
Definition: RNA_types.h:51
void * data
Definition: RNA_types.h:52
struct ID * owner_id
Definition: RNA_types.h:50
Scene * scene
Definition: clip_ops.c:1182
struct ListBase queue
Definition: SEQ_proxy.h:60
struct Main * main
Definition: clip_ops.c:1183
struct Depsgraph * depsgraph
Definition: SEQ_proxy.h:58
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
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
struct bUserAssetLibrary * next
PBVHNode * data
Definition: pbvh.c:897
Definition: wm_jobs.c:73
float max
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
#define G(x, y, z)
uint len
void WM_main_add_notifier(unsigned int type, void *reference)
PointerRNA * ptr
Definition: wm_files.c:3157
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
Definition: wm_jobs.c:450
bool WM_jobs_is_running(wmJob *wm_job)
Definition: wm_jobs.c:325
Scene * WM_windows_scene_get_from_screen(const wmWindowManager *wm, const bScreen *screen)
Definition: wm_window.c:2217
ViewLayer * WM_windows_view_layer_get_from_screen(const wmWindowManager *wm, const bScreen *screen)
Definition: wm_window.c:2228
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)
Definition: wm_window.c:2286
void WM_windows_scene_data_sync(const ListBase *win_lb, Scene *scene)
Definition: wm_window.c:2208
bool WM_xr_session_exists(const wmXrData *xr)
Definition: wm_xr_session.c:99