Blender  V3.3
rna_userdef.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #include <limits.h>
8 #include <stdlib.h>
9 
10 #include "DNA_brush_types.h"
11 #include "DNA_curve_types.h"
12 #include "DNA_scene_types.h"
13 #include "DNA_space_types.h"
14 #include "DNA_userdef_types.h"
15 #include "DNA_view3d_types.h"
16 
17 #include "BLI_math_base.h"
18 #include "BLI_math_rotation.h"
19 #include "BLI_utildefines.h"
20 
21 #include "BLT_translation.h"
22 
23 #include "BKE_addon.h"
24 #include "BKE_appdir.h"
25 #include "BKE_sound.h"
26 #include "BKE_studiolight.h"
27 
28 #include "RNA_access.h"
29 #include "RNA_define.h"
30 #include "RNA_enum_types.h"
31 
32 #include "UI_interface_icons.h"
33 
34 #include "rna_internal.h"
35 
36 #include "WM_api.h"
37 #include "WM_types.h"
38 
39 #include "BLT_lang.h"
40 
42  {USER_SECTION_INTERFACE, "INTERFACE", 0, "Interface", ""},
43  {USER_SECTION_THEME, "THEMES", 0, "Themes", ""},
44  {USER_SECTION_VIEWPORT, "VIEWPORT", 0, "Viewport", ""},
45  {USER_SECTION_LIGHT, "LIGHTS", 0, "Lights", ""},
46  {USER_SECTION_EDITING, "EDITING", 0, "Editing", ""},
47  {USER_SECTION_ANIMATION, "ANIMATION", 0, "Animation", ""},
49  {USER_SECTION_ADDONS, "ADDONS", 0, "Add-ons", ""},
50 #if 0 /* def WITH_USERDEF_WORKSPACES */
52  {USER_SECTION_WORKSPACE_CONFIG, "WORKSPACE_CONFIG", 0, "Configuration File", ""},
53  {USER_SECTION_WORKSPACE_ADDONS, "WORKSPACE_ADDONS", 0, "Add-on Overrides", ""},
54  {USER_SECTION_WORKSPACE_KEYMAPS, "WORKSPACE_KEYMAPS", 0, "Keymap Overrides", ""},
55 #endif
57  {USER_SECTION_INPUT, "INPUT", 0, "Input", ""},
58  {USER_SECTION_NAVIGATION, "NAVIGATION", 0, "Navigation", ""},
59  {USER_SECTION_KEYMAP, "KEYMAP", 0, "Keymap", ""},
61  {USER_SECTION_SYSTEM, "SYSTEM", 0, "System", ""},
62  {USER_SECTION_SAVE_LOAD, "SAVE_LOAD", 0, "Save & Load", ""},
63  {USER_SECTION_FILE_PATHS, "FILE_PATHS", 0, "File Paths", ""},
65  {USER_SECTION_EXPERIMENTAL, "EXPERIMENTAL", 0, "Experimental", ""},
66  {0, NULL, 0, NULL, NULL},
67 };
68 
70  {0, "None", 0, "None", "No device - there will be no audio output"},
71  {0, NULL, 0, NULL, NULL},
72 };
73 
76  "WALK",
77  0,
78  "Walk",
79  "Interactively walk or free navigate around the scene"},
80  {VIEW_NAVIGATION_FLY, "FLY", 0, "Fly", "Use fly dynamics to navigate the scene"},
81  {0, NULL, 0, NULL, NULL},
82 };
83 
84 #if defined(WITH_INTERNATIONAL) || !defined(RNA_RUNTIME)
86  {0,
87  "DEFAULT",
88  0,
89  "Automatic (Automatic)",
90  "Automatically choose system's defined language if available, or fall-back to English"},
91  {0, NULL, 0, NULL, NULL},
92 };
93 #endif
94 
96  {STUDIOLIGHT_TYPE_STUDIO, "STUDIO", 0, "Studio", ""},
97  {STUDIOLIGHT_TYPE_WORLD, "WORLD", 0, "World", ""},
98  {STUDIOLIGHT_TYPE_MATCAP, "MATCAP", 0, "MatCap", ""},
99  {0, NULL, 0, NULL, NULL},
100 };
101 
104  "OFF",
105  0,
106  "No Anti-Aliasing",
107  "Scene will be rendering without any anti-aliasing"},
109  "FXAA",
110  0,
111  "Single Pass Anti-Aliasing",
112  "Scene will be rendered using a single pass anti-aliasing method (FXAA)"},
114  "5",
115  0,
116  "5 Samples",
117  "Scene will be rendered using 5 anti-aliasing samples"},
119  "8",
120  0,
121  "8 Samples",
122  "Scene will be rendered using 8 anti-aliasing samples"},
124  "11",
125  0,
126  "11 Samples",
127  "Scene will be rendered using 11 anti-aliasing samples"},
129  "16",
130  0,
131  "16 Samples",
132  "Scene will be rendered using 16 anti-aliasing samples"},
134  "32",
135  0,
136  "32 Samples",
137  "Scene will be rendered using 32 anti-aliasing samples"},
138  {0, NULL, 0, NULL, NULL},
139 };
140 
141 #ifdef RNA_RUNTIME
142 
143 # include "BLI_math_vector.h"
144 
145 # include "DNA_object_types.h"
146 # include "DNA_screen_types.h"
147 
148 # include "BKE_blender.h"
149 # include "BKE_global.h"
150 # include "BKE_idprop.h"
151 # include "BKE_image.h"
152 # include "BKE_main.h"
153 # include "BKE_mesh_runtime.h"
154 # include "BKE_object.h"
155 # include "BKE_paint.h"
156 # include "BKE_pbvh.h"
157 # include "BKE_preferences.h"
158 # include "BKE_screen.h"
159 
160 # include "DEG_depsgraph.h"
161 
162 # include "GPU_capabilities.h"
163 # include "GPU_select.h"
164 # include "GPU_texture.h"
165 
166 # include "BLF_api.h"
167 
168 # include "BLI_path_util.h"
169 
170 # include "MEM_CacheLimiterC-Api.h"
171 # include "MEM_guardedalloc.h"
172 
173 # include "UI_interface.h"
174 
175 # ifdef WITH_SDL_DYNLOAD
176 # include "sdlew.h"
177 # endif
178 
179 static void rna_userdef_version_get(PointerRNA *ptr, int *value)
180 {
181  UserDef *userdef = (UserDef *)ptr->data;
182  value[0] = userdef->versionfile / 100;
183  value[1] = userdef->versionfile % 100;
184  value[2] = userdef->subversionfile;
185 }
186 
188 # define USERDEF_TAG_DIRTY rna_userdef_is_dirty_update_impl()
189 
191 {
192  /* We can't use 'ptr->data' because this update function
193  * is used for themes and other nested data. */
194  if (U.runtime.is_dirty == false) {
195  U.runtime.is_dirty = true;
197  }
198 }
199 
201  Scene *UNUSED(scene),
203 {
204  /* WARNING: never use 'ptr' unless its type is checked. */
206 }
207 
209 static void rna_userdef_ui_update(Main *UNUSED(bmain),
210  Scene *UNUSED(scene),
212 {
214 }
215 
216 static void rna_userdef_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
217 {
219  USERDEF_TAG_DIRTY;
220 }
221 
222 static void rna_userdef_theme_update(Main *bmain, Scene *scene, PointerRNA *ptr)
223 {
224  /* Recreate gizmos when changing themes. */
225  WM_reinit_gizmomap_all(bmain);
226 
227  rna_userdef_update(bmain, scene, ptr);
228 }
229 
230 static void rna_userdef_theme_text_style_update(Main *bmain, Scene *scene, PointerRNA *ptr)
231 {
232  const uiStyle *style = UI_style_get();
234 
235  rna_userdef_update(bmain, scene, ptr);
236 }
237 
238 static void rna_userdef_gizmo_update(Main *bmain, Scene *scene, PointerRNA *ptr)
239 {
240  WM_reinit_gizmomap_all(bmain);
241 
242  rna_userdef_update(bmain, scene, ptr);
243 }
244 
245 static void rna_userdef_theme_update_icons(Main *bmain, Scene *scene, PointerRNA *ptr)
246 {
247  if (!G.background) {
249  }
250  rna_userdef_theme_update(bmain, scene, ptr);
251 }
252 
253 /* also used by buffer swap switching */
254 static void rna_userdef_dpi_update(Main *UNUSED(bmain),
255  Scene *UNUSED(scene),
257 {
258  /* font's are stored at each DPI level, without this we can easy load 100's of fonts */
259  BLF_cache_clear();
260 
261  WM_main_add_notifier(NC_WINDOW, NULL); /* full redraw */
262  WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); /* refresh region sizes */
263  USERDEF_TAG_DIRTY;
264 }
265 
266 static void rna_userdef_screen_update(Main *UNUSED(bmain),
267  Scene *UNUSED(scene),
269 {
271  WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); /* refresh region sizes */
272  USERDEF_TAG_DIRTY;
273 }
274 
275 static void rna_userdef_screen_update_header_default(Main *bmain, Scene *scene, PointerRNA *ptr)
276 {
277  if (U.uiflag & USER_HEADER_FROM_PREF) {
278  for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
280  }
281  rna_userdef_screen_update(bmain, scene, ptr);
282  }
283  USERDEF_TAG_DIRTY;
284 }
285 
286 static void rna_userdef_font_update(Main *UNUSED(bmain),
287  Scene *UNUSED(scene),
289 {
290  BLF_cache_clear();
291  UI_reinit_font();
292 }
293 
294 static void rna_userdef_language_update(Main *UNUSED(bmain),
295  Scene *UNUSED(scene),
297 {
299 
300  const char *uilng = BLT_lang_get();
301  if (STREQ(uilng, "en_US")) {
303  }
304  else {
306  }
307 
308  USERDEF_TAG_DIRTY;
309 }
310 
311 static void rna_userdef_asset_library_name_set(PointerRNA *ptr, const char *value)
312 {
315 }
316 
317 static void rna_userdef_asset_library_path_set(PointerRNA *ptr, const char *value)
318 {
321 }
322 
323 static void rna_userdef_script_autoexec_update(Main *UNUSED(bmain),
324  Scene *UNUSED(scene),
325  PointerRNA *ptr)
326 {
327  UserDef *userdef = (UserDef *)ptr->data;
328  if (userdef->flag & USER_SCRIPT_AUTOEXEC_DISABLE) {
330  }
331  else {
333  }
334 
335  USERDEF_TAG_DIRTY;
336 }
337 
338 static void rna_userdef_load_ui_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
339 {
340  UserDef *userdef = (UserDef *)ptr->data;
341  if (userdef->flag & USER_FILENOUI) {
342  G.fileflags |= G_FILE_NO_UI;
343  }
344  else {
345  G.fileflags &= ~G_FILE_NO_UI;
346  }
347 
348  USERDEF_TAG_DIRTY;
349 }
350 
351 static void rna_userdef_anisotropic_update(Main *bmain, Scene *scene, PointerRNA *ptr)
352 {
354  rna_userdef_update(bmain, scene, ptr);
355 }
356 
357 static void rna_userdef_gl_texture_limit_update(Main *bmain, Scene *scene, PointerRNA *ptr)
358 {
360  rna_userdef_update(bmain, scene, ptr);
361 }
362 
363 static void rna_userdef_undo_steps_set(PointerRNA *ptr, int value)
364 {
365  UserDef *userdef = (UserDef *)ptr->data;
366 
367  /* Do not allow 1 undo steps, useless and breaks undo/redo process (see T42531). */
368  userdef->undosteps = (value == 1) ? 2 : value;
369 }
370 
371 static int rna_userdef_autokeymode_get(PointerRNA *ptr)
372 {
373  UserDef *userdef = (UserDef *)ptr->data;
374  short retval = userdef->autokey_mode;
375 
376  if (!(userdef->autokey_mode & AUTOKEY_ON)) {
377  retval |= AUTOKEY_ON;
378  }
379 
380  return retval;
381 }
382 
383 static void rna_userdef_autokeymode_set(PointerRNA *ptr, int value)
384 {
385  UserDef *userdef = (UserDef *)ptr->data;
386 
387  if (value == AUTOKEY_MODE_NORMAL) {
390  }
391  else if (value == AUTOKEY_MODE_EDITKEYS) {
394  }
395 }
396 
397 static void rna_userdef_anim_update(Main *UNUSED(bmain),
398  Scene *UNUSED(scene),
400 {
403  USERDEF_TAG_DIRTY;
404 }
405 
406 static void rna_userdef_input_devices(Main *UNUSED(bmain),
407  Scene *UNUSED(scene),
409 {
411  USERDEF_TAG_DIRTY;
412 }
413 
414 # ifdef WITH_INPUT_NDOF
415 static void rna_userdef_ndof_deadzone_update(Main *UNUSED(bmain),
416  Scene *UNUSED(scene),
417  PointerRNA *ptr)
418 {
419  UserDef *userdef = ptr->data;
420  WM_ndof_deadzone_set(userdef->ndof_deadzone);
421  USERDEF_TAG_DIRTY;
422 }
423 # endif
424 
425 static void rna_userdef_keyconfig_reload_update(bContext *C,
426  Main *UNUSED(bmain),
427  Scene *UNUSED(scene),
429 {
431  USERDEF_TAG_DIRTY;
432 }
433 
434 static void rna_userdef_timecode_style_set(PointerRNA *ptr, int value)
435 {
436  UserDef *userdef = (UserDef *)ptr->data;
437  int required_size = userdef->v2d_min_gridsize;
438 
439  /* Set the time-code style. */
440  userdef->timecode_style = value;
441 
442  /* Adjust the v2d grid-size if needed so that time-codes don't overlap
443  * NOTE: most of these have been hand-picked to avoid overlaps while still keeping
444  * things from getting too blown out. */
445  switch (value) {
448  /* 35 is great most of the time, but not that great for full-blown */
449  required_size = 35;
450  break;
452  required_size = 50;
453  break;
455  /* the granddaddy! */
456  required_size = 65;
457  break;
459  required_size = 45;
460  break;
461  }
462 
463  if (U.v2d_min_gridsize < required_size) {
464  U.v2d_min_gridsize = required_size;
465  }
466 }
467 
468 static int rna_UserDef_mouse_emulate_3_button_modifier_get(PointerRNA *ptr)
469 {
470 # if !defined(WIN32)
471  UserDef *userdef = ptr->data;
472  return userdef->mouse_emulate_3_button_modifier;
473 # else
474  UNUSED_VARS(ptr);
475  return USER_EMU_MMB_MOD_ALT;
476 # endif
477 }
478 
479 static const EnumPropertyItem *rna_UseDef_active_section_itemf(bContext *UNUSED(C),
480  PointerRNA *ptr,
481  PropertyRNA *UNUSED(prop),
482  bool *r_free)
483 {
484  UserDef *userdef = ptr->data;
485 
486  if ((userdef->flag & USER_DEVELOPER_UI) != 0) {
487  *r_free = false;
489  }
490 
491  EnumPropertyItem *items = NULL;
492  int totitem = 0;
493 
495  it++) {
496  if (it->value == USER_SECTION_EXPERIMENTAL) {
497  continue;
498  }
499  RNA_enum_item_add(&items, &totitem, it);
500  }
501 
502  RNA_enum_item_end(&items, &totitem);
503 
504  *r_free = true;
505  return items;
506 }
507 
508 static PointerRNA rna_UserDef_view_get(PointerRNA *ptr)
509 {
510  return rna_pointer_inherit_refine(ptr, &RNA_PreferencesView, ptr->data);
511 }
512 
513 static PointerRNA rna_UserDef_edit_get(PointerRNA *ptr)
514 {
515  return rna_pointer_inherit_refine(ptr, &RNA_PreferencesEdit, ptr->data);
516 }
517 
518 static PointerRNA rna_UserDef_input_get(PointerRNA *ptr)
519 {
520  return rna_pointer_inherit_refine(ptr, &RNA_PreferencesInput, ptr->data);
521 }
522 
523 static PointerRNA rna_UserDef_keymap_get(PointerRNA *ptr)
524 {
525  return rna_pointer_inherit_refine(ptr, &RNA_PreferencesKeymap, ptr->data);
526 }
527 
528 static PointerRNA rna_UserDef_filepaths_get(PointerRNA *ptr)
529 {
530  return rna_pointer_inherit_refine(ptr, &RNA_PreferencesFilePaths, ptr->data);
531 }
532 
533 static PointerRNA rna_UserDef_system_get(PointerRNA *ptr)
534 {
535  return rna_pointer_inherit_refine(ptr, &RNA_PreferencesSystem, ptr->data);
536 }
537 
538 static PointerRNA rna_UserDef_apps_get(PointerRNA *ptr)
539 {
540  return rna_pointer_inherit_refine(ptr, &RNA_PreferencesApps, ptr->data);
541 }
542 
543 /* Reevaluate objects with a subsurf modifier as the last in their modifiers stacks. */
544 static void rna_UserDef_subdivision_update(Main *bmain, Scene *scene, PointerRNA *ptr)
545 {
546  Object *ob;
547 
548  for (ob = bmain->objects.first; ob; ob = ob->id.next) {
551  }
552  }
553 
554  rna_userdef_update(bmain, scene, ptr);
555 }
556 
557 static void rna_UserDef_audio_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
558 {
559  BKE_sound_init(bmain);
560  USERDEF_TAG_DIRTY;
561 }
562 
563 static void rna_Userdef_memcache_update(Main *UNUSED(bmain),
564  Scene *UNUSED(scene),
566 {
567  MEM_CacheLimiter_set_maximum(((size_t)U.memcachelimit) * 1024 * 1024);
568  USERDEF_TAG_DIRTY;
569 }
570 
571 static void rna_Userdef_disk_cache_dir_update(Main *UNUSED(bmain),
572  Scene *UNUSED(scene),
574 {
575  if (U.sequencer_disk_cache_dir[0] != '\0') {
576  BLI_path_abs(U.sequencer_disk_cache_dir, BKE_main_blendfile_path_from_global());
577  BLI_path_slash_ensure(U.sequencer_disk_cache_dir);
578  BLI_path_make_safe(U.sequencer_disk_cache_dir);
579  }
580 
581  USERDEF_TAG_DIRTY;
582 }
583 
584 static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRNA *ptr)
585 {
586  Object *ob;
587 
588  for (ob = bmain->objects.first; ob; ob = ob->id.next) {
589  if (ob->mode & OB_MODE_WEIGHT_PAINT) {
591  }
592  }
593 
594  rna_userdef_update(bmain, scene, ptr);
595 }
596 
597 static void rna_UserDef_viewport_lights_update(Main *bmain, Scene *scene, PointerRNA *ptr)
598 {
599  /* If all lights are off gpu_draw resets them all, see: T27627,
600  * so disallow them all to be disabled. */
601  if (U.light_param[0].flag == 0 && U.light_param[1].flag == 0 && U.light_param[2].flag == 0 &&
602  U.light_param[3].flag == 0) {
603  SolidLight *light = ptr->data;
604  light->flag |= 1;
605  }
606 
608  rna_userdef_update(bmain, scene, ptr);
609 }
610 
611 static void rna_userdef_autosave_update(Main *bmain, Scene *scene, PointerRNA *ptr)
612 {
613  wmWindowManager *wm = bmain->wm.first;
614 
615  if (wm) {
617  }
618  rna_userdef_update(bmain, scene, ptr);
619 }
620 
621 # define RNA_USERDEF_EXPERIMENTAL_BOOLEAN_GET(member) \
622  static bool rna_userdef_experimental_##member##_get(PointerRNA *ptr) \
623  { \
624  UserDef *userdef = POINTER_OFFSET(ptr->data, -offsetof(UserDef, experimental)); \
625  return USER_EXPERIMENTAL_TEST(userdef, member); \
626  }
627 
628 static bAddon *rna_userdef_addon_new(void)
629 {
630  ListBase *addons_list = &U.addons;
631  bAddon *addon = BKE_addon_new();
632  BLI_addtail(addons_list, addon);
633  USERDEF_TAG_DIRTY;
634  return addon;
635 }
636 
637 static void rna_userdef_addon_remove(ReportList *reports, PointerRNA *addon_ptr)
638 {
639  ListBase *addons_list = &U.addons;
640  bAddon *addon = addon_ptr->data;
641  if (BLI_findindex(addons_list, addon) == -1) {
642  BKE_report(reports, RPT_ERROR, "Add-on is no longer valid");
643  return;
644  }
645  BLI_remlink(addons_list, addon);
646  BKE_addon_free(addon);
647  RNA_POINTER_INVALIDATE(addon_ptr);
648  USERDEF_TAG_DIRTY;
649 }
650 
651 static bPathCompare *rna_userdef_pathcompare_new(void)
652 {
653  bPathCompare *path_cmp = MEM_callocN(sizeof(bPathCompare), "bPathCompare");
654  BLI_addtail(&U.autoexec_paths, path_cmp);
655  USERDEF_TAG_DIRTY;
656  return path_cmp;
657 }
658 
659 static void rna_userdef_pathcompare_remove(ReportList *reports, PointerRNA *path_cmp_ptr)
660 {
661  bPathCompare *path_cmp = path_cmp_ptr->data;
662  if (BLI_findindex(&U.autoexec_paths, path_cmp) == -1) {
663  BKE_report(reports, RPT_ERROR, "Excluded path is no longer valid");
664  return;
665  }
666 
667  BLI_freelinkN(&U.autoexec_paths, path_cmp);
668  RNA_POINTER_INVALIDATE(path_cmp_ptr);
669  USERDEF_TAG_DIRTY;
670 }
671 
672 static void rna_userdef_temp_update(Main *UNUSED(bmain),
673  Scene *UNUSED(scene),
675 {
676  BKE_tempdir_init(U.tempdir);
677  USERDEF_TAG_DIRTY;
678 }
679 
680 static void rna_userdef_text_update(Main *UNUSED(bmain),
681  Scene *UNUSED(scene),
683 {
684  BLF_cache_clear();
685  UI_reinit_font();
687  USERDEF_TAG_DIRTY;
688 }
689 
690 static PointerRNA rna_Theme_space_generic_get(PointerRNA *ptr)
691 {
692  return rna_pointer_inherit_refine(ptr, &RNA_ThemeSpaceGeneric, ptr->data);
693 }
694 
695 static PointerRNA rna_Theme_gradient_colors_get(PointerRNA *ptr)
696 {
697  return rna_pointer_inherit_refine(ptr, &RNA_ThemeGradientColors, ptr->data);
698 }
699 
700 static PointerRNA rna_Theme_space_gradient_get(PointerRNA *ptr)
701 {
702  return rna_pointer_inherit_refine(ptr, &RNA_ThemeSpaceGradient, ptr->data);
703 }
704 
705 static PointerRNA rna_Theme_space_list_generic_get(PointerRNA *ptr)
706 {
707  return rna_pointer_inherit_refine(ptr, &RNA_ThemeSpaceListGeneric, ptr->data);
708 }
709 
710 static const EnumPropertyItem *rna_userdef_audio_device_itemf(bContext *UNUSED(C),
712  PropertyRNA *UNUSED(prop),
713  bool *r_free)
714 {
715  int index = 0;
716  int totitem = 0;
717  EnumPropertyItem *item = NULL;
718 
719  int i;
720 
722 
723  for (i = 0; names[i]; i++) {
724  EnumPropertyItem new_item = {i, names[i], 0, names[i], names[i]};
725  RNA_enum_item_add(&item, &totitem, &new_item);
726  }
727 
728 # if !defined(NDEBUG) || !defined(WITH_AUDASPACE)
729  if (i == 0) {
730  EnumPropertyItem new_item = {i, "SOUND_NONE", 0, "No Sound", ""};
731  RNA_enum_item_add(&item, &totitem, &new_item);
732  }
733 # endif
734 
735  /* may be unused */
737 
738  RNA_enum_item_end(&item, &totitem);
739  *r_free = true;
740 
741  return item;
742 }
743 
744 # ifdef WITH_INTERNATIONAL
745 static const EnumPropertyItem *rna_lang_enum_properties_itemf(bContext *UNUSED(C),
747  PropertyRNA *UNUSED(prop),
748  bool *UNUSED(r_free))
749 {
751  if (items == NULL) {
753  }
754  return items;
755 }
756 # endif
757 
758 static IDProperty **rna_AddonPref_idprops(PointerRNA *ptr)
759 {
760  return (IDProperty **)&ptr->data;
761 }
762 
763 static PointerRNA rna_Addon_preferences_get(PointerRNA *ptr)
764 {
765  bAddon *addon = (bAddon *)ptr->data;
766  bAddonPrefType *apt = BKE_addon_pref_type_find(addon->module, true);
767  if (apt) {
768  if (addon->prop == NULL) {
769  IDPropertyTemplate val = {0};
770  addon->prop = IDP_New(IDP_GROUP, &val, addon->module); /* name is unimportant. */
771  }
772  return rna_pointer_inherit_refine(ptr, apt->rna_ext.srna, addon->prop);
773  }
774  else {
775  return PointerRNA_NULL;
776  }
777 }
778 
779 static void rna_AddonPref_unregister(Main *UNUSED(bmain), StructRNA *type)
780 {
782 
783  if (!apt) {
784  return;
785  }
786 
787  RNA_struct_free_extension(type, &apt->rna_ext);
789 
791 
792  /* update while blender is running */
794 }
795 
796 static StructRNA *rna_AddonPref_register(Main *bmain,
797  ReportList *reports,
798  void *data,
799  const char *identifier,
800  StructValidateFunc validate,
801  StructCallbackFunc call,
803 {
804  bAddonPrefType *apt, dummy_apt = {{'\0'}};
805  bAddon dummy_addon = {NULL};
806  PointerRNA dummy_ptr;
807  // int have_function[1];
808 
809  /* Setup dummy add-on preference and it's type to store static properties in. */
810  RNA_pointer_create(NULL, &RNA_AddonPreferences, &dummy_addon, &dummy_ptr);
811 
812  /* validate the python class */
813  if (validate(&dummy_ptr, data, NULL /* have_function */) != 0) {
814  return NULL;
815  }
816 
817  BLI_strncpy(dummy_apt.idname, dummy_addon.module, sizeof(dummy_apt.idname));
818  if (strlen(identifier) >= sizeof(dummy_apt.idname)) {
819  BKE_reportf(reports,
820  RPT_ERROR,
821  "Registering add-on preferences class: '%s' is too long, maximum length is %d",
822  identifier,
823  (int)sizeof(dummy_apt.idname));
824  return NULL;
825  }
826 
827  /* Check if we have registered this add-on preference type before, and remove it. */
828  apt = BKE_addon_pref_type_find(dummy_addon.module, true);
829  if (apt && apt->rna_ext.srna) {
830  rna_AddonPref_unregister(bmain, apt->rna_ext.srna);
831  }
832 
833  /* Create a new add-on preference type. */
834  apt = MEM_mallocN(sizeof(bAddonPrefType), "addonpreftype");
835  memcpy(apt, &dummy_apt, sizeof(dummy_apt));
837 
838  apt->rna_ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, identifier, &RNA_AddonPreferences);
839  apt->rna_ext.data = data;
840  apt->rna_ext.call = call;
841  apt->rna_ext.free = free;
842  RNA_struct_blender_type_set(apt->rna_ext.srna, apt);
843 
844  // apt->draw = (have_function[0]) ? header_draw : NULL;
845 
846  /* update while blender is running */
848 
849  return apt->rna_ext.srna;
850 }
851 
852 /* placeholder, doesn't do anything useful yet */
853 static StructRNA *rna_AddonPref_refine(PointerRNA *ptr)
854 {
855  return (ptr->type) ? ptr->type : &RNA_AddonPreferences;
856 }
857 
858 static float rna_ThemeUI_roundness_get(PointerRNA *ptr)
859 {
860  /* Remap from relative radius to 0..1 range. */
862  return tui->roundness * 2.0f;
863 }
864 
865 static void rna_ThemeUI_roundness_set(PointerRNA *ptr, float value)
866 {
868  tui->roundness = value * 0.5f;
869 }
870 
871 /* Studio Light */
872 static void rna_UserDef_studiolight_begin(CollectionPropertyIterator *iter,
874 {
876 }
877 
878 static void rna_StudioLights_refresh(UserDef *UNUSED(userdef))
879 {
881 }
882 
883 static void rna_StudioLights_remove(UserDef *UNUSED(userdef), StudioLight *studio_light)
884 {
885  BKE_studiolight_remove(studio_light);
886 }
887 
888 static StudioLight *rna_StudioLights_load(UserDef *UNUSED(userdef), const char *path, int type)
889 {
890  return BKE_studiolight_load(path, type);
891 }
892 
893 /* TODO: Make it accept arguments. */
894 static StudioLight *rna_StudioLights_new(UserDef *userdef, const char *name)
895 {
896  return BKE_studiolight_create(name, userdef->light_param, userdef->light_ambient);
897 }
898 
899 /* StudioLight.name */
900 static void rna_UserDef_studiolight_name_get(PointerRNA *ptr, char *value)
901 {
902  StudioLight *sl = (StudioLight *)ptr->data;
903  BLI_strncpy(value, sl->name, FILE_MAXFILE);
904 }
905 
906 static int rna_UserDef_studiolight_name_length(PointerRNA *ptr)
907 {
908  StudioLight *sl = (StudioLight *)ptr->data;
909  return strlen(sl->name);
910 }
911 
912 /* StudioLight.path */
913 static void rna_UserDef_studiolight_path_get(PointerRNA *ptr, char *value)
914 {
915  StudioLight *sl = (StudioLight *)ptr->data;
916  BLI_strncpy(value, sl->path, FILE_MAX);
917 }
918 
919 static int rna_UserDef_studiolight_path_length(PointerRNA *ptr)
920 {
921  StudioLight *sl = (StudioLight *)ptr->data;
922  return strlen(sl->path);
923 }
924 
925 /* StudioLight.path_irr_cache */
926 static void rna_UserDef_studiolight_path_irr_cache_get(PointerRNA *ptr, char *value)
927 {
928  StudioLight *sl = (StudioLight *)ptr->data;
929  if (sl->path_irr_cache) {
930  BLI_strncpy(value, sl->path_irr_cache, FILE_MAX);
931  }
932  else {
933  value[0] = '\0';
934  }
935 }
936 
937 static int rna_UserDef_studiolight_path_irr_cache_length(PointerRNA *ptr)
938 {
939  StudioLight *sl = (StudioLight *)ptr->data;
940  if (sl->path_irr_cache) {
941  return strlen(sl->path_irr_cache);
942  }
943  return 0;
944 }
945 
946 /* StudioLight.path_sh_cache */
947 static void rna_UserDef_studiolight_path_sh_cache_get(PointerRNA *ptr, char *value)
948 {
949  StudioLight *sl = (StudioLight *)ptr->data;
950  if (sl->path_sh_cache) {
951  BLI_strncpy(value, sl->path_sh_cache, FILE_MAX);
952  }
953  else {
954  value[0] = '\0';
955  }
956 }
957 
958 static int rna_UserDef_studiolight_path_sh_cache_length(PointerRNA *ptr)
959 {
960  StudioLight *sl = (StudioLight *)ptr->data;
961  if (sl->path_sh_cache) {
962  return strlen(sl->path_sh_cache);
963  }
964  return 0;
965 }
966 
967 /* StudioLight.index */
968 static int rna_UserDef_studiolight_index_get(PointerRNA *ptr)
969 {
970  StudioLight *sl = (StudioLight *)ptr->data;
971  return sl->index;
972 }
973 
974 /* StudioLight.is_user_defined */
975 static bool rna_UserDef_studiolight_is_user_defined_get(PointerRNA *ptr)
976 {
977  StudioLight *sl = (StudioLight *)ptr->data;
978  return (sl->flag & STUDIOLIGHT_USER_DEFINED) != 0;
979 }
980 
981 /* StudioLight.is_user_defined */
982 static bool rna_UserDef_studiolight_has_specular_highlight_pass_get(PointerRNA *ptr)
983 {
984  StudioLight *sl = (StudioLight *)ptr->data;
986 }
987 
988 /* StudioLight.type */
989 
990 static int rna_UserDef_studiolight_type_get(PointerRNA *ptr)
991 {
992  StudioLight *sl = (StudioLight *)ptr->data;
993  return sl->flag & STUDIOLIGHT_FLAG_ORIENTATIONS;
994 }
995 
996 static void rna_UserDef_studiolight_spherical_harmonics_coefficients_get(PointerRNA *ptr,
997  float *values)
998 {
999  StudioLight *sl = (StudioLight *)ptr->data;
1000  float *value = values;
1001  for (int i = 0; i < STUDIOLIGHT_SH_EFFECTIVE_COEFS_LEN; i++) {
1002  copy_v3_v3(value, sl->spherical_harmonics_coefs[i]);
1003  value += 3;
1004  }
1005 }
1006 
1007 /* StudioLight.solid_lights */
1008 
1009 static void rna_UserDef_studiolight_solid_lights_begin(CollectionPropertyIterator *iter,
1010  PointerRNA *ptr)
1011 {
1012  StudioLight *sl = (StudioLight *)ptr->data;
1013  rna_iterator_array_begin(iter, sl->light, sizeof(*sl->light), ARRAY_SIZE(sl->light), 0, NULL);
1014 }
1015 
1016 static int rna_UserDef_studiolight_solid_lights_length(PointerRNA *UNUSED(ptr))
1017 {
1018  return ARRAY_SIZE(((StudioLight *)NULL)->light);
1019 }
1020 
1021 /* StudioLight.light_ambient */
1022 
1023 static void rna_UserDef_studiolight_light_ambient_get(PointerRNA *ptr, float *values)
1024 {
1025  StudioLight *sl = (StudioLight *)ptr->data;
1026  copy_v3_v3(values, sl->light_ambient);
1027 }
1028 
1029 int rna_show_statusbar_vram_editable(struct PointerRNA *UNUSED(ptr), const char **UNUSED(r_info))
1030 {
1031  return GPU_mem_stats_supported() ? PROP_EDITABLE : 0;
1032 }
1033 
1034 #else
1035 
1036 # define USERDEF_TAG_DIRTY_PROPERTY_UPDATE_ENABLE \
1037  RNA_define_fallback_property_update(0, "rna_userdef_is_dirty_update")
1038 
1039 # define USERDEF_TAG_DIRTY_PROPERTY_UPDATE_DISABLE RNA_define_fallback_property_update(0, NULL)
1040 
1041 /* TODO(sergey): This technically belongs to blenlib, but we don't link
1042  * makesrna against it.
1043  */
1044 
1045 /* Get maximum addressable memory in megabytes, */
1046 static size_t max_memory_in_megabytes(void)
1047 {
1048  /* Maximum addressable bytes on this platform. */
1049  const size_t limit_bytes = (((size_t)1) << (sizeof(size_t[8]) - 1));
1050  /* Convert it to megabytes and return. */
1051  return (limit_bytes >> 20);
1052 }
1053 
1054 /* Same as above, but clipped to int capacity. */
1056 {
1057  const size_t limit_megabytes = max_memory_in_megabytes();
1058  /* NOTE: The result will fit into integer. */
1059  return (int)min_zz(limit_megabytes, (size_t)INT_MAX);
1060 }
1061 
1063 {
1064  StructRNA *srna;
1065  PropertyRNA *prop;
1066 
1067  srna = RNA_def_struct(brna, "ThemeFontStyle", NULL);
1068  RNA_def_struct_sdna(srna, "uiFontStyle");
1070  RNA_def_struct_ui_text(srna, "Font Style", "Theme settings for Font");
1071 
1072  prop = RNA_def_property(srna, "points", PROP_FLOAT, PROP_UNSIGNED);
1073  RNA_def_property_range(prop, 6.0f, 32.0f);
1074  RNA_def_property_ui_range(prop, 8.0f, 20.0f, 10.0f, 1);
1075  RNA_def_property_ui_text(prop, "Points", "Font size in points");
1076  RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
1077 
1078  prop = RNA_def_property(srna, "shadow", PROP_INT, PROP_PIXEL);
1079  RNA_def_property_range(prop, 0, 5);
1080  RNA_def_property_ui_text(prop, "Shadow Size", "Shadow size (0, 3 and 5 supported)");
1081  RNA_def_property_update(prop, 0, "rna_userdef_theme_text_style_update");
1082 
1083  prop = RNA_def_property(srna, "shadow_offset_x", PROP_INT, PROP_PIXEL);
1084  RNA_def_property_int_sdna(prop, NULL, "shadx");
1085  RNA_def_property_range(prop, -10, 10);
1086  RNA_def_property_ui_text(prop, "Shadow X Offset", "Shadow offset in pixels");
1087  RNA_def_property_update(prop, 0, "rna_userdef_theme_text_style_update");
1088 
1089  prop = RNA_def_property(srna, "shadow_offset_y", PROP_INT, PROP_PIXEL);
1090  RNA_def_property_int_sdna(prop, NULL, "shady");
1091  RNA_def_property_range(prop, -10, 10);
1092  RNA_def_property_ui_text(prop, "Shadow Y Offset", "Shadow offset in pixels");
1093  RNA_def_property_update(prop, 0, "rna_userdef_theme_text_style_update");
1094 
1095  prop = RNA_def_property(srna, "shadow_alpha", PROP_FLOAT, PROP_FACTOR);
1096  RNA_def_property_float_sdna(prop, NULL, "shadowalpha");
1097  RNA_def_property_range(prop, 0.0f, 1.0f);
1098  RNA_def_property_ui_text(prop, "Shadow Alpha", "");
1099  RNA_def_property_update(prop, 0, "rna_userdef_theme_text_style_update");
1100 
1101  prop = RNA_def_property(srna, "shadow_value", PROP_FLOAT, PROP_FACTOR);
1102  RNA_def_property_float_sdna(prop, NULL, "shadowcolor");
1103  RNA_def_property_range(prop, 0.0f, 1.0f);
1104  RNA_def_property_ui_text(prop, "Shadow Brightness", "Shadow color in gray value");
1105  RNA_def_property_update(prop, 0, "rna_userdef_theme_text_style_update");
1106 }
1107 
1109 {
1110  StructRNA *srna;
1111  PropertyRNA *prop;
1112 
1114 
1115  srna = RNA_def_struct(brna, "ThemeStyle", NULL);
1116  RNA_def_struct_sdna(srna, "uiStyle");
1118  RNA_def_struct_ui_text(srna, "Style", "Theme settings for style sets");
1119 
1120  prop = RNA_def_property(srna, "panel_title", PROP_POINTER, PROP_NONE);
1122  RNA_def_property_pointer_sdna(prop, NULL, "paneltitle");
1123  RNA_def_property_struct_type(prop, "ThemeFontStyle");
1124  RNA_def_property_ui_text(prop, "Panel Title Font", "");
1125  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1126 
1127  prop = RNA_def_property(srna, "widget_label", PROP_POINTER, PROP_NONE);
1129  RNA_def_property_pointer_sdna(prop, NULL, "widgetlabel");
1130  RNA_def_property_struct_type(prop, "ThemeFontStyle");
1131  RNA_def_property_ui_text(prop, "Widget Label Style", "");
1132  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1133 
1134  prop = RNA_def_property(srna, "widget", PROP_POINTER, PROP_NONE);
1136  RNA_def_property_pointer_sdna(prop, NULL, "widget");
1137  RNA_def_property_struct_type(prop, "ThemeFontStyle");
1138  RNA_def_property_ui_text(prop, "Widget Style", "");
1139  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1140 }
1141 
1143 {
1144  StructRNA *srna;
1145  PropertyRNA *prop;
1146 
1147  srna = RNA_def_struct(brna, "ThemeWidgetColors", NULL);
1148  RNA_def_struct_sdna(srna, "uiWidgetColors");
1150  RNA_def_struct_ui_text(srna, "Theme Widget Color Set", "Theme settings for widget color sets");
1151 
1152  prop = RNA_def_property(srna, "outline", PROP_FLOAT, PROP_COLOR_GAMMA);
1153  RNA_def_property_array(prop, 3);
1154  RNA_def_property_ui_text(prop, "Outline", "");
1155  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1156 
1157  prop = RNA_def_property(srna, "inner", PROP_FLOAT, PROP_COLOR_GAMMA);
1158  RNA_def_property_array(prop, 4);
1159  RNA_def_property_ui_text(prop, "Inner", "");
1160  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1161 
1162  prop = RNA_def_property(srna, "inner_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
1163  RNA_def_property_array(prop, 4);
1164  RNA_def_property_ui_text(prop, "Inner Selected", "");
1165  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1166 
1167  prop = RNA_def_property(srna, "item", PROP_FLOAT, PROP_COLOR_GAMMA);
1168  RNA_def_property_array(prop, 4);
1169  RNA_def_property_ui_text(prop, "Item", "");
1170  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1171 
1172  prop = RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR_GAMMA);
1173  RNA_def_property_array(prop, 3);
1174  RNA_def_property_ui_text(prop, "Text", "");
1175  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1176 
1177  prop = RNA_def_property(srna, "text_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
1178  RNA_def_property_array(prop, 3);
1179  RNA_def_property_ui_text(prop, "Text Selected", "");
1180  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1181 
1182  prop = RNA_def_property(srna, "show_shaded", PROP_BOOLEAN, PROP_NONE);
1183  RNA_def_property_boolean_sdna(prop, NULL, "shaded", 1);
1184  RNA_def_property_ui_text(prop, "Shaded", "");
1185  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1186 
1187  prop = RNA_def_property(srna, "shadetop", PROP_INT, PROP_NONE);
1188  RNA_def_property_range(prop, -100, 100);
1189  RNA_def_property_ui_text(prop, "Shade Top", "");
1190  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1191 
1192  prop = RNA_def_property(srna, "shadedown", PROP_INT, PROP_NONE);
1193  RNA_def_property_range(prop, -100, 100);
1194  RNA_def_property_ui_text(prop, "Shade Down", "");
1195  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1196 
1197  prop = RNA_def_property(srna, "roundness", PROP_FLOAT, PROP_FACTOR);
1199  prop, "rna_ThemeUI_roundness_get", "rna_ThemeUI_roundness_set", NULL);
1200  RNA_def_property_ui_text(prop, "Roundness", "Amount of edge rounding");
1201  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1202 }
1203 
1205 {
1206  StructRNA *srna;
1207  PropertyRNA *prop;
1208 
1209  srna = RNA_def_struct(brna, "ThemeWidgetStateColors", NULL);
1210  RNA_def_struct_sdna(srna, "uiWidgetStateColors");
1213  srna, "Theme Widget State Color", "Theme settings for widget state colors");
1214 
1215  prop = RNA_def_property(srna, "inner_anim", PROP_FLOAT, PROP_COLOR_GAMMA);
1216  RNA_def_property_array(prop, 3);
1217  RNA_def_property_ui_text(prop, "Animated", "");
1218  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1219 
1220  prop = RNA_def_property(srna, "inner_anim_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
1221  RNA_def_property_array(prop, 3);
1222  RNA_def_property_ui_text(prop, "Animated Selected", "");
1223  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1224 
1225  prop = RNA_def_property(srna, "inner_key", PROP_FLOAT, PROP_COLOR_GAMMA);
1226  RNA_def_property_array(prop, 3);
1227  RNA_def_property_ui_text(prop, "Keyframe", "");
1228  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1229 
1230  prop = RNA_def_property(srna, "inner_key_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
1231  RNA_def_property_array(prop, 3);
1232  RNA_def_property_ui_text(prop, "Keyframe Selected", "");
1233  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1234 
1235  prop = RNA_def_property(srna, "inner_driven", PROP_FLOAT, PROP_COLOR_GAMMA);
1236  RNA_def_property_array(prop, 3);
1237  RNA_def_property_ui_text(prop, "Driven", "");
1238  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1239 
1240  prop = RNA_def_property(srna, "inner_driven_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
1241  RNA_def_property_array(prop, 3);
1242  RNA_def_property_ui_text(prop, "Driven Selected", "");
1243  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1244 
1245  prop = RNA_def_property(srna, "inner_overridden", PROP_FLOAT, PROP_COLOR_GAMMA);
1246  RNA_def_property_array(prop, 3);
1247  RNA_def_property_ui_text(prop, "Overridden", "");
1248  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1249 
1250  prop = RNA_def_property(srna, "inner_overridden_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
1251  RNA_def_property_array(prop, 3);
1252  RNA_def_property_ui_text(prop, "Overridden Selected", "");
1253  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1254 
1255  prop = RNA_def_property(srna, "inner_changed", PROP_FLOAT, PROP_COLOR_GAMMA);
1256  RNA_def_property_array(prop, 3);
1257  RNA_def_property_ui_text(prop, "Changed", "");
1258  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1259 
1260  prop = RNA_def_property(srna, "inner_changed_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
1261  RNA_def_property_array(prop, 3);
1262  RNA_def_property_ui_text(prop, "Changed Selected", "");
1263  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1264 
1265  prop = RNA_def_property(srna, "blend", PROP_FLOAT, PROP_FACTOR);
1266  RNA_def_property_ui_text(prop, "Blend", "");
1267  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1268 }
1269 
1271 {
1272  StructRNA *srna;
1273  PropertyRNA *prop;
1274 
1275  srna = RNA_def_struct(brna, "ThemePanelColors", NULL);
1276  RNA_def_struct_sdna(srna, "uiPanelColors");
1278  RNA_def_struct_ui_text(srna, "Theme Panel Color", "Theme settings for panel colors");
1279 
1280  prop = RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR_GAMMA);
1281  RNA_def_property_ui_text(prop, "Header", "");
1282  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1283 
1284  prop = RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR_GAMMA);
1285  RNA_def_property_ui_text(prop, "Background", "");
1286  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1287 
1288  prop = RNA_def_property(srna, "sub_back", PROP_FLOAT, PROP_COLOR_GAMMA);
1289  RNA_def_property_ui_text(prop, "Sub Background", "");
1290  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1291 }
1292 
1295  "SINGLE_COLOR",
1296  0,
1297  "Single Color",
1298  "Use a solid color as viewport background"},
1300  "LINEAR",
1301  0,
1302  "Linear Gradient",
1303  "Use a screen space vertical linear gradient as viewport background"},
1305  "RADIAL",
1306  0,
1307  "Vignette",
1308  "Use a radial gradient as viewport background"},
1309  {0, NULL, 0, NULL, NULL},
1310 };
1311 
1313 {
1314  /* Fake struct, keep this for compatible theme presets. */
1315  StructRNA *srna;
1316  PropertyRNA *prop;
1317 
1318  srna = RNA_def_struct(brna, "ThemeGradientColors", NULL);
1319  RNA_def_struct_sdna(srna, "ThemeSpace");
1322  srna, "Theme Background Color", "Theme settings for background colors and gradient");
1323 
1324  prop = RNA_def_property(srna, "background_type", PROP_ENUM, PROP_NONE);
1325  RNA_def_property_enum_sdna(prop, NULL, "background_type");
1327  RNA_def_property_ui_text(prop, "Background Type", "Type of background in the 3D viewport");
1328  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1329 
1330  prop = RNA_def_property(srna, "high_gradient", PROP_FLOAT, PROP_COLOR_GAMMA);
1331  RNA_def_property_float_sdna(prop, NULL, "back");
1332  RNA_def_property_array(prop, 3);
1333  RNA_def_property_ui_text(prop, "Gradient High/Off", "");
1334  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1335 
1336  prop = RNA_def_property(srna, "gradient", PROP_FLOAT, PROP_COLOR_GAMMA);
1337  RNA_def_property_float_sdna(prop, NULL, "back_grad");
1338  RNA_def_property_array(prop, 3);
1339  RNA_def_property_ui_text(prop, "Gradient Low", "");
1340  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1341 }
1342 
1344 {
1345  StructRNA *srna;
1346  PropertyRNA *prop;
1347 
1352 
1353  srna = RNA_def_struct(brna, "ThemeUserInterface", NULL);
1354  RNA_def_struct_sdna(srna, "ThemeUI");
1357  srna, "Theme User Interface", "Theme settings for user interface elements");
1358 
1359  prop = RNA_def_property(srna, "wcol_regular", PROP_POINTER, PROP_NONE);
1361  RNA_def_property_ui_text(prop, "Regular Widget Colors", "");
1362  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1363 
1364  prop = RNA_def_property(srna, "wcol_tool", PROP_POINTER, PROP_NONE);
1366  RNA_def_property_ui_text(prop, "Tool Widget Colors", "");
1367  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1368 
1369  prop = RNA_def_property(srna, "wcol_toolbar_item", PROP_POINTER, PROP_NONE);
1371  RNA_def_property_ui_text(prop, "Toolbar Item Widget Colors", "");
1372  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1373 
1374  prop = RNA_def_property(srna, "wcol_radio", PROP_POINTER, PROP_NONE);
1376  RNA_def_property_ui_text(prop, "Radio Widget Colors", "");
1377  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1378 
1379  prop = RNA_def_property(srna, "wcol_text", PROP_POINTER, PROP_NONE);
1381  RNA_def_property_ui_text(prop, "Text Widget Colors", "");
1382  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1383 
1384  prop = RNA_def_property(srna, "wcol_option", PROP_POINTER, PROP_NONE);
1386  RNA_def_property_ui_text(prop, "Option Widget Colors", "");
1387  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1388 
1389  prop = RNA_def_property(srna, "wcol_toggle", PROP_POINTER, PROP_NONE);
1391  RNA_def_property_ui_text(prop, "Toggle Widget Colors", "");
1392  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1393 
1394  prop = RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NONE);
1396  RNA_def_property_ui_text(prop, "Number Widget Colors", "");
1397  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1398 
1399  prop = RNA_def_property(srna, "wcol_numslider", PROP_POINTER, PROP_NONE);
1401  RNA_def_property_ui_text(prop, "Slider Widget Colors", "");
1402  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1403 
1404  prop = RNA_def_property(srna, "wcol_box", PROP_POINTER, PROP_NONE);
1406  RNA_def_property_ui_text(prop, "Box Backdrop Colors", "");
1407  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1408 
1409  prop = RNA_def_property(srna, "wcol_menu", PROP_POINTER, PROP_NONE);
1411  RNA_def_property_ui_text(prop, "Menu Widget Colors", "");
1412  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1413 
1414  prop = RNA_def_property(srna, "wcol_pulldown", PROP_POINTER, PROP_NONE);
1416  RNA_def_property_ui_text(prop, "Pulldown Widget Colors", "");
1417  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1418 
1419  prop = RNA_def_property(srna, "wcol_menu_back", PROP_POINTER, PROP_NONE);
1421  RNA_def_property_ui_text(prop, "Menu Backdrop Colors", "");
1422  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1423 
1424  prop = RNA_def_property(srna, "wcol_pie_menu", PROP_POINTER, PROP_NONE);
1426  RNA_def_property_ui_text(prop, "Pie Menu Colors", "");
1427  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1428 
1429  prop = RNA_def_property(srna, "wcol_tooltip", PROP_POINTER, PROP_NONE);
1431  RNA_def_property_ui_text(prop, "Tooltip Colors", "");
1432  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1433 
1434  prop = RNA_def_property(srna, "wcol_menu_item", PROP_POINTER, PROP_NONE);
1436  RNA_def_property_ui_text(prop, "Menu Item Colors", "");
1437  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1438 
1439  prop = RNA_def_property(srna, "wcol_scroll", PROP_POINTER, PROP_NONE);
1441  RNA_def_property_ui_text(prop, "Scroll Widget Colors", "");
1442  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1443 
1444  prop = RNA_def_property(srna, "wcol_progress", PROP_POINTER, PROP_NONE);
1446  RNA_def_property_ui_text(prop, "Progress Bar Widget Colors", "");
1447  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1448 
1449  prop = RNA_def_property(srna, "wcol_list_item", PROP_POINTER, PROP_NONE);
1451  RNA_def_property_ui_text(prop, "List Item Colors", "");
1452  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1453 
1454  prop = RNA_def_property(srna, "wcol_view_item", PROP_POINTER, PROP_NONE);
1456  RNA_def_property_ui_text(prop, "Data-View Item Colors", "");
1457  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1458 
1459  prop = RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NONE);
1461  RNA_def_property_ui_text(prop, "State Colors", "");
1462  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1463 
1464  prop = RNA_def_property(srna, "wcol_tab", PROP_POINTER, PROP_NONE);
1466  RNA_def_property_ui_text(prop, "Tab Colors", "");
1467  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1468 
1469  prop = RNA_def_property(srna, "menu_shadow_fac", PROP_FLOAT, PROP_FACTOR);
1470  RNA_def_property_ui_text(prop, "Menu Shadow Strength", "Blending factor for menu shadows");
1471  RNA_def_property_range(prop, 0.01f, 1.0f);
1472  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1473 
1474  prop = RNA_def_property(srna, "menu_shadow_width", PROP_INT, PROP_PIXEL);
1476  prop, "Menu Shadow Width", "Width of menu shadows, set to zero to disable");
1477  RNA_def_property_range(prop, 0.0f, 24.0f);
1478  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1479 
1480  prop = RNA_def_property(srna, "icon_alpha", PROP_FLOAT, PROP_FACTOR);
1482  prop, "Icon Alpha", "Transparency of icons in the interface, to reduce contrast");
1483  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1484 
1485  prop = RNA_def_property(srna, "icon_saturation", PROP_FLOAT, PROP_FACTOR);
1486  RNA_def_property_ui_text(prop, "Icon Saturation", "Saturation of icons in the interface");
1487  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1488 
1489  prop = RNA_def_property(srna, "widget_emboss", PROP_FLOAT, PROP_COLOR_GAMMA);
1490  RNA_def_property_float_sdna(prop, NULL, "widget_emboss");
1491  RNA_def_property_array(prop, 4);
1493  prop, "Widget Emboss", "Color of the 1px shadow line underlying widgets");
1494  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1495 
1496  prop = RNA_def_property(srna, "editor_outline", PROP_FLOAT, PROP_COLOR_GAMMA);
1497  RNA_def_property_float_sdna(prop, NULL, "editor_outline");
1498  RNA_def_property_array(prop, 3);
1500  prop, "Editor Outline", "Color of the outline of the editors and their round corners");
1501  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1502 
1503  prop = RNA_def_property(srna, "widget_text_cursor", PROP_FLOAT, PROP_COLOR_GAMMA);
1504  RNA_def_property_float_sdna(prop, NULL, "widget_text_cursor");
1505  RNA_def_property_array(prop, 3);
1507  prop, "Text Cursor", "Color of the interface widgets text insertion cursor (caret)");
1508  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1509 
1510  prop = RNA_def_property(srna, "panel_roundness", PROP_FLOAT, PROP_FACTOR);
1512  prop, "Panel Roundness", "Roundness of the corners of panels and sub-panels");
1513  RNA_def_property_range(prop, 0.0f, 1.0f);
1514  RNA_def_property_float_default(prop, 0.4f);
1515  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1516 
1517  /* Transparent Grid */
1518  prop = RNA_def_property(srna, "transparent_checker_primary", PROP_FLOAT, PROP_COLOR_GAMMA);
1519  RNA_def_property_float_sdna(prop, NULL, "transparent_checker_primary");
1520  RNA_def_property_array(prop, 3);
1522  prop, "Primary Color", "Primary color of checkerboard pattern indicating transparent areas");
1523  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1524 
1525  prop = RNA_def_property(srna, "transparent_checker_secondary", PROP_FLOAT, PROP_COLOR_GAMMA);
1526  RNA_def_property_float_sdna(prop, NULL, "transparent_checker_secondary");
1527  RNA_def_property_array(prop, 3);
1529  "Secondary Color",
1530  "Secondary color of checkerboard pattern indicating transparent areas");
1531  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1532 
1533  prop = RNA_def_property(srna, "transparent_checker_size", PROP_INT, PROP_PIXEL);
1535  prop, "Checkerboard Size", "Size of checkerboard pattern indicating transparent areas");
1536  RNA_def_property_range(prop, 2, 48);
1537  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1538 
1539  /* axis */
1540  prop = RNA_def_property(srna, "axis_x", PROP_FLOAT, PROP_COLOR_GAMMA);
1541  RNA_def_property_float_sdna(prop, NULL, "xaxis");
1542  RNA_def_property_array(prop, 3);
1543  RNA_def_property_ui_text(prop, "X Axis", "");
1544  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1545 
1546  prop = RNA_def_property(srna, "axis_y", PROP_FLOAT, PROP_COLOR_GAMMA);
1547  RNA_def_property_float_sdna(prop, NULL, "yaxis");
1548  RNA_def_property_array(prop, 3);
1549  RNA_def_property_ui_text(prop, "Y Axis", "");
1550  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1551 
1552  prop = RNA_def_property(srna, "axis_z", PROP_FLOAT, PROP_COLOR_GAMMA);
1553  RNA_def_property_float_sdna(prop, NULL, "zaxis");
1554  RNA_def_property_array(prop, 3);
1555  RNA_def_property_ui_text(prop, "Z Axis", "");
1556  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1557 
1558  /* Generic gizmo colors. */
1559  prop = RNA_def_property(srna, "gizmo_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
1560  RNA_def_property_float_sdna(prop, NULL, "gizmo_hi");
1561  RNA_def_property_array(prop, 3);
1562  RNA_def_property_ui_text(prop, "Gizmo Highlight", "");
1563  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1564 
1565  prop = RNA_def_property(srna, "gizmo_primary", PROP_FLOAT, PROP_COLOR_GAMMA);
1566  RNA_def_property_float_sdna(prop, NULL, "gizmo_primary");
1567  RNA_def_property_array(prop, 3);
1568  RNA_def_property_ui_text(prop, "Gizmo Primary", "");
1569  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1570 
1571  prop = RNA_def_property(srna, "gizmo_secondary", PROP_FLOAT, PROP_COLOR_GAMMA);
1572  RNA_def_property_float_sdna(prop, NULL, "gizmo_secondary");
1573  RNA_def_property_array(prop, 3);
1574  RNA_def_property_ui_text(prop, "Gizmo Secondary", "");
1575  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1576 
1577  prop = RNA_def_property(srna, "gizmo_view_align", PROP_FLOAT, PROP_COLOR_GAMMA);
1578  RNA_def_property_float_sdna(prop, NULL, "gizmo_view_align");
1579  RNA_def_property_array(prop, 3);
1580  RNA_def_property_ui_text(prop, "Gizmo View Align", "");
1581  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1582 
1583  prop = RNA_def_property(srna, "gizmo_a", PROP_FLOAT, PROP_COLOR_GAMMA);
1584  RNA_def_property_float_sdna(prop, NULL, "gizmo_a");
1585  RNA_def_property_array(prop, 3);
1586  RNA_def_property_ui_text(prop, "Gizmo A", "");
1587  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1588 
1589  prop = RNA_def_property(srna, "gizmo_b", PROP_FLOAT, PROP_COLOR_GAMMA);
1590  RNA_def_property_float_sdna(prop, NULL, "gizmo_b");
1591  RNA_def_property_array(prop, 3);
1592  RNA_def_property_ui_text(prop, "Gizmo B", "");
1593  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1594 
1595  /* Icon colors. */
1596  prop = RNA_def_property(srna, "icon_scene", PROP_FLOAT, PROP_COLOR_GAMMA);
1597  RNA_def_property_float_sdna(prop, NULL, "icon_scene");
1598  RNA_def_property_array(prop, 4);
1599  RNA_def_property_ui_text(prop, "Scene", "");
1600  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1601 
1602  prop = RNA_def_property(srna, "icon_collection", PROP_FLOAT, PROP_COLOR_GAMMA);
1603  RNA_def_property_float_sdna(prop, NULL, "icon_collection");
1604  RNA_def_property_array(prop, 4);
1605  RNA_def_property_ui_text(prop, "Collection", "");
1606  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1607 
1608  prop = RNA_def_property(srna, "icon_object", PROP_FLOAT, PROP_COLOR_GAMMA);
1609  RNA_def_property_float_sdna(prop, NULL, "icon_object");
1610  RNA_def_property_array(prop, 4);
1611  RNA_def_property_ui_text(prop, "Object", "");
1612  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1613 
1614  prop = RNA_def_property(srna, "icon_object_data", PROP_FLOAT, PROP_COLOR_GAMMA);
1615  RNA_def_property_float_sdna(prop, NULL, "icon_object_data");
1616  RNA_def_property_array(prop, 4);
1617  RNA_def_property_ui_text(prop, "Object Data", "");
1618  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1619 
1620  prop = RNA_def_property(srna, "icon_modifier", PROP_FLOAT, PROP_COLOR_GAMMA);
1621  RNA_def_property_float_sdna(prop, NULL, "icon_modifier");
1622  RNA_def_property_array(prop, 4);
1623  RNA_def_property_ui_text(prop, "Modifier", "");
1624  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1625 
1626  prop = RNA_def_property(srna, "icon_shading", PROP_FLOAT, PROP_COLOR_GAMMA);
1627  RNA_def_property_float_sdna(prop, NULL, "icon_shading");
1628  RNA_def_property_array(prop, 4);
1629  RNA_def_property_ui_text(prop, "Shading", "");
1630  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1631 
1632  prop = RNA_def_property(srna, "icon_folder", PROP_FLOAT, PROP_COLOR_GAMMA);
1633  RNA_def_property_float_sdna(prop, NULL, "icon_folder");
1634  RNA_def_property_array(prop, 4);
1635  RNA_def_property_ui_text(prop, "File Folders", "Color of folders in the file browser");
1636  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1637 
1638  prop = RNA_def_property(srna, "icon_border_intensity", PROP_FLOAT, PROP_FACTOR);
1639  RNA_def_property_float_sdna(prop, NULL, "icon_border_intensity");
1641  prop, "Icon Border", "Control the intensity of the border around themes icons");
1642  RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 2);
1643  RNA_def_property_update(prop, 0, "rna_userdef_theme_update_icons");
1644 }
1645 
1647 {
1648  PropertyRNA *prop;
1649 
1650  prop = RNA_def_property(srna, "title", PROP_FLOAT, PROP_COLOR_GAMMA);
1651  RNA_def_property_array(prop, 3);
1652  RNA_def_property_ui_text(prop, "Title", "");
1653  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1654 
1655  prop = RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR_GAMMA);
1656  RNA_def_property_array(prop, 3);
1657  RNA_def_property_ui_text(prop, "Text", "");
1658  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1659 
1660  prop = RNA_def_property(srna, "text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
1661  RNA_def_property_array(prop, 3);
1662  RNA_def_property_ui_text(prop, "Text Highlight", "");
1663  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1664 
1665  /* header */
1666  prop = RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR_GAMMA);
1667  RNA_def_property_array(prop, 4);
1668  RNA_def_property_ui_text(prop, "Header", "");
1669  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1670 
1671  prop = RNA_def_property(srna, "header_text", PROP_FLOAT, PROP_COLOR_GAMMA);
1672  RNA_def_property_array(prop, 3);
1673  RNA_def_property_ui_text(prop, "Header Text", "");
1674  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1675 
1676  prop = RNA_def_property(srna, "header_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
1677  RNA_def_property_array(prop, 3);
1678  RNA_def_property_ui_text(prop, "Header Text Highlight", "");
1679  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1680 
1681  /* panel settings */
1682  prop = RNA_def_property(srna, "panelcolors", PROP_POINTER, PROP_NONE);
1684  RNA_def_property_ui_text(prop, "Panel Colors", "");
1685  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1686 
1687  /* buttons */
1688  /* if (! ELEM(spacetype, SPACE_PROPERTIES, SPACE_OUTLINER)) { */
1689  prop = RNA_def_property(srna, "button", PROP_FLOAT, PROP_COLOR_GAMMA);
1690  RNA_def_property_array(prop, 4);
1691  RNA_def_property_ui_text(prop, "Region Background", "");
1692  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1693 
1694  prop = RNA_def_property(srna, "button_title", PROP_FLOAT, PROP_COLOR_GAMMA);
1695  RNA_def_property_array(prop, 3);
1696  RNA_def_property_ui_text(prop, "Region Text Titles", "");
1697  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1698 
1699  prop = RNA_def_property(srna, "button_text", PROP_FLOAT, PROP_COLOR_GAMMA);
1700  RNA_def_property_array(prop, 3);
1701  RNA_def_property_ui_text(prop, "Region Text", "");
1702  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1703 
1704  prop = RNA_def_property(srna, "button_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
1705  RNA_def_property_array(prop, 3);
1706  RNA_def_property_ui_text(prop, "Region Text Highlight", "");
1707  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1708 
1709  prop = RNA_def_property(srna, "navigation_bar", PROP_FLOAT, PROP_COLOR_GAMMA);
1710  RNA_def_property_array(prop, 4);
1711  RNA_def_property_ui_text(prop, "Navigation Bar Background", "");
1712  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1713 
1714  prop = RNA_def_property(srna, "execution_buts", PROP_FLOAT, PROP_COLOR_GAMMA);
1715  RNA_def_property_array(prop, 4);
1716  RNA_def_property_ui_text(prop, "Execution Region Background", "");
1717  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1718 
1719  /* tabs */
1720  prop = RNA_def_property(srna, "tab_active", PROP_FLOAT, PROP_COLOR_GAMMA);
1721  RNA_def_property_array(prop, 3);
1722  RNA_def_property_ui_text(prop, "Tab Active", "");
1723  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1724 
1725  prop = RNA_def_property(srna, "tab_inactive", PROP_FLOAT, PROP_COLOR_GAMMA);
1726  RNA_def_property_array(prop, 3);
1727  RNA_def_property_ui_text(prop, "Tab Inactive", "");
1728  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1729 
1730  prop = RNA_def_property(srna, "tab_back", PROP_FLOAT, PROP_COLOR_GAMMA);
1731  RNA_def_property_array(prop, 4);
1732  RNA_def_property_ui_text(prop, "Tab Background", "");
1733  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1734 
1735  prop = RNA_def_property(srna, "tab_outline", PROP_FLOAT, PROP_COLOR_GAMMA);
1736  RNA_def_property_array(prop, 3);
1737  RNA_def_property_ui_text(prop, "Tab Outline", "");
1738  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1739 
1740  /* } */
1741 }
1742 
1744 {
1745  StructRNA *srna;
1746  PropertyRNA *prop;
1747 
1748  srna = RNA_def_struct(brna, "ThemeSpaceGradient", NULL);
1749  RNA_def_struct_sdna(srna, "ThemeSpace");
1750  RNA_def_struct_ui_text(srna, "Theme Space Settings", "");
1751 
1752  /* gradient/background settings */
1753  prop = RNA_def_property(srna, "gradients", PROP_POINTER, PROP_NONE);
1755  RNA_def_property_struct_type(prop, "ThemeGradientColors");
1756  RNA_def_property_pointer_funcs(prop, "rna_Theme_gradient_colors_get", NULL, NULL, NULL);
1757  RNA_def_property_ui_text(prop, "Gradient Colors", "");
1758  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1759 
1761 }
1762 
1764 {
1765  StructRNA *srna;
1766  PropertyRNA *prop;
1767 
1768  srna = RNA_def_struct(brna, "ThemeSpaceGeneric", NULL);
1769  RNA_def_struct_sdna(srna, "ThemeSpace");
1770  RNA_def_struct_ui_text(srna, "Theme Space Settings", "");
1771 
1772  prop = RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR_GAMMA);
1773  RNA_def_property_array(prop, 3);
1774  RNA_def_property_ui_text(prop, "Window Background", "");
1775  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1776 
1778 }
1779 
1780 /* list / channels */
1782 {
1783  StructRNA *srna;
1784  PropertyRNA *prop;
1785 
1786  srna = RNA_def_struct(brna, "ThemeSpaceListGeneric", NULL);
1787  RNA_def_struct_sdna(srna, "ThemeSpace");
1788  RNA_def_struct_ui_text(srna, "Theme Space List Settings", "");
1789 
1790  prop = RNA_def_property(srna, "list", PROP_FLOAT, PROP_COLOR_GAMMA);
1791  RNA_def_property_array(prop, 3);
1792  RNA_def_property_ui_text(prop, "Source List", "");
1793  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1794 
1795  prop = RNA_def_property(srna, "list_title", PROP_FLOAT, PROP_COLOR_GAMMA);
1796  RNA_def_property_array(prop, 3);
1797  RNA_def_property_ui_text(prop, "Source List Title", "");
1798  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1799 
1800  prop = RNA_def_property(srna, "list_text", PROP_FLOAT, PROP_COLOR_GAMMA);
1801  RNA_def_property_array(prop, 3);
1802  RNA_def_property_ui_text(prop, "Source List Text", "");
1803  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1804 
1805  prop = RNA_def_property(srna, "list_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
1806  RNA_def_property_array(prop, 3);
1807  RNA_def_property_ui_text(prop, "Source List Text Highlight", "");
1808  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1809 }
1810 
1812 {
1813  PropertyRNA *prop;
1814 
1815  prop = RNA_def_property(srna, "space", PROP_POINTER, PROP_NONE);
1817  RNA_def_property_struct_type(prop, "ThemeSpaceGeneric");
1818  RNA_def_property_pointer_funcs(prop, "rna_Theme_space_generic_get", NULL, NULL, NULL);
1819  RNA_def_property_ui_text(prop, "Theme Space", "Settings for space");
1820 }
1821 
1823 {
1824  PropertyRNA *prop;
1825 
1826  prop = RNA_def_property(srna, "space", PROP_POINTER, PROP_NONE);
1828  RNA_def_property_struct_type(prop, "ThemeSpaceGradient");
1829  RNA_def_property_pointer_funcs(prop, "rna_Theme_space_gradient_get", NULL, NULL, NULL);
1830  RNA_def_property_ui_text(prop, "Theme Space", "Settings for space");
1831 }
1832 
1834 {
1835  PropertyRNA *prop;
1836 
1837  prop = RNA_def_property(srna, "space_list", PROP_POINTER, PROP_NONE);
1839  RNA_def_property_struct_type(prop, "ThemeSpaceListGeneric");
1840  RNA_def_property_pointer_funcs(prop, "rna_Theme_space_list_generic_get", NULL, NULL, NULL);
1841  RNA_def_property_ui_text(prop, "Theme Space List", "Settings for space list");
1842 }
1843 
1845 {
1846  PropertyRNA *prop;
1847 
1848  prop = RNA_def_property(srna, "vertex", PROP_FLOAT, PROP_COLOR_GAMMA);
1849  RNA_def_property_array(prop, 3);
1850  RNA_def_property_ui_text(prop, "Vertex", "");
1851  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1852 
1853  prop = RNA_def_property(srna, "vertex_select", PROP_FLOAT, PROP_COLOR_GAMMA);
1854  RNA_def_property_array(prop, 3);
1855  RNA_def_property_ui_text(prop, "Vertex Select", "");
1856  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1857 
1858  prop = RNA_def_property(srna, "vertex_active", PROP_FLOAT, PROP_COLOR_GAMMA);
1859  RNA_def_property_array(prop, 3);
1860  RNA_def_property_ui_text(prop, "Active Vertex", "");
1861  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1862 
1863  prop = RNA_def_property(srna, "vertex_size", PROP_INT, PROP_PIXEL);
1864  RNA_def_property_range(prop, 1, 32);
1865  RNA_def_property_ui_text(prop, "Vertex Size", "");
1866  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1867 
1868  prop = RNA_def_property(srna, "vertex_bevel", PROP_FLOAT, PROP_COLOR_GAMMA);
1869  RNA_def_property_array(prop, 3);
1870  RNA_def_property_ui_text(prop, "Vertex Bevel", "");
1871  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1872 
1873  prop = RNA_def_property(srna, "vertex_unreferenced", PROP_FLOAT, PROP_COLOR_GAMMA);
1874  RNA_def_property_array(prop, 3);
1875  RNA_def_property_ui_text(prop, "Vertex Group Unreferenced", "");
1876  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1877 }
1878 
1880 {
1881  PropertyRNA *prop;
1882 
1883  prop = RNA_def_property(srna, "edge_select", PROP_FLOAT, PROP_COLOR_GAMMA);
1884  RNA_def_property_array(prop, 3);
1885  RNA_def_property_ui_text(prop, "Edge Select", "");
1886  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1887 
1888  prop = RNA_def_property(srna, "edge_seam", PROP_FLOAT, PROP_COLOR_GAMMA);
1889  RNA_def_property_array(prop, 3);
1890  RNA_def_property_ui_text(prop, "Edge Seam", "");
1891  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1892 
1893  prop = RNA_def_property(srna, "edge_sharp", PROP_FLOAT, PROP_COLOR_GAMMA);
1894  RNA_def_property_array(prop, 3);
1895  RNA_def_property_ui_text(prop, "Edge Sharp", "");
1896  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1897 
1898  prop = RNA_def_property(srna, "edge_crease", PROP_FLOAT, PROP_COLOR_GAMMA);
1899  RNA_def_property_array(prop, 3);
1900  RNA_def_property_ui_text(prop, "Edge Crease", "");
1901  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1902 
1903  prop = RNA_def_property(srna, "edge_bevel", PROP_FLOAT, PROP_COLOR_GAMMA);
1904  RNA_def_property_array(prop, 3);
1905  RNA_def_property_ui_text(prop, "Edge Bevel", "");
1906  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1907 
1908  prop = RNA_def_property(srna, "edge_facesel", PROP_FLOAT, PROP_COLOR_GAMMA);
1909  RNA_def_property_array(prop, 3);
1910  RNA_def_property_ui_text(prop, "Edge UV Face Select", "");
1911  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1912 
1913  prop = RNA_def_property(srna, "freestyle_edge_mark", PROP_FLOAT, PROP_COLOR_GAMMA);
1914  RNA_def_property_array(prop, 3);
1915  RNA_def_property_ui_text(prop, "Freestyle Edge Mark", "");
1916  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1917 }
1918 
1920 {
1921  PropertyRNA *prop;
1922 
1923  prop = RNA_def_property(srna, "face", PROP_FLOAT, PROP_COLOR_GAMMA);
1924  RNA_def_property_array(prop, 4);
1925  RNA_def_property_ui_text(prop, "Face", "");
1926  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1927 
1928  prop = RNA_def_property(srna, "face_select", PROP_FLOAT, PROP_COLOR_GAMMA);
1929  RNA_def_property_array(prop, 4);
1930  RNA_def_property_ui_text(prop, "Face Selected", "");
1931  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1932 
1933  prop = RNA_def_property(srna, "face_dot", PROP_FLOAT, PROP_COLOR_GAMMA);
1934  RNA_def_property_array(prop, 3);
1935  RNA_def_property_ui_text(prop, "Face Dot Selected", "");
1936  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1937 
1938  prop = RNA_def_property(srna, "facedot_size", PROP_INT, PROP_PIXEL);
1939  RNA_def_property_range(prop, 1, 10);
1940  RNA_def_property_ui_text(prop, "Face Dot Size", "");
1941  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1942 
1943  prop = RNA_def_property(srna, "freestyle_face_mark", PROP_FLOAT, PROP_COLOR_GAMMA);
1944  RNA_def_property_array(prop, 4);
1945  RNA_def_property_ui_text(prop, "Freestyle Face Mark", "");
1946  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1947 
1948  prop = RNA_def_property(srna, "face_back", PROP_FLOAT, PROP_COLOR_GAMMA);
1949  RNA_def_property_array(prop, 4);
1950  RNA_def_property_ui_text(prop, "Face Orientation Back", "");
1951  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1952 
1953  prop = RNA_def_property(srna, "face_front", PROP_FLOAT, PROP_COLOR_GAMMA);
1954  RNA_def_property_array(prop, 4);
1955  RNA_def_property_ui_text(prop, "Face Orientation Front", "");
1956  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1957 }
1958 
1960 {
1961  PropertyRNA *prop;
1962 
1963  prop = RNA_def_property(srna, "paint_curve_handle", PROP_FLOAT, PROP_COLOR_GAMMA);
1964  RNA_def_property_array(prop, 4);
1965  RNA_def_property_ui_text(prop, "Paint Curve Handle", "");
1966  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1967 
1968  prop = RNA_def_property(srna, "paint_curve_pivot", PROP_FLOAT, PROP_COLOR_GAMMA);
1969  RNA_def_property_array(prop, 4);
1970  RNA_def_property_ui_text(prop, "Paint Curve Pivot", "");
1971  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1972 }
1973 
1975  StructRNA *srna, bool incl_nurbs, bool incl_lastsel, bool incl_vector, bool incl_verthandle)
1976 {
1977  PropertyRNA *prop;
1978 
1979  if (incl_nurbs) {
1980  prop = RNA_def_property(srna, "nurb_uline", PROP_FLOAT, PROP_COLOR_GAMMA);
1981  RNA_def_property_float_sdna(prop, NULL, "nurb_uline");
1982  RNA_def_property_array(prop, 3);
1983  RNA_def_property_ui_text(prop, "NURBS U Lines", "");
1984  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1985 
1986  prop = RNA_def_property(srna, "nurb_vline", PROP_FLOAT, PROP_COLOR_GAMMA);
1987  RNA_def_property_float_sdna(prop, NULL, "nurb_vline");
1988  RNA_def_property_array(prop, 3);
1989  RNA_def_property_ui_text(prop, "NURBS V Lines", "");
1990  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1991 
1992  prop = RNA_def_property(srna, "nurb_sel_uline", PROP_FLOAT, PROP_COLOR_GAMMA);
1993  RNA_def_property_float_sdna(prop, NULL, "nurb_sel_uline");
1994  RNA_def_property_array(prop, 3);
1995  RNA_def_property_ui_text(prop, "NURBS Active U Lines", "");
1996  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
1997 
1998  prop = RNA_def_property(srna, "nurb_sel_vline", PROP_FLOAT, PROP_COLOR_GAMMA);
1999  RNA_def_property_float_sdna(prop, NULL, "nurb_sel_vline");
2000  RNA_def_property_array(prop, 3);
2001  RNA_def_property_ui_text(prop, "NURBS Active V Lines", "");
2002  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2003 
2004  prop = RNA_def_property(srna, "act_spline", PROP_FLOAT, PROP_COLOR_GAMMA);
2005  RNA_def_property_float_sdna(prop, NULL, "act_spline");
2006  RNA_def_property_array(prop, 3);
2007  RNA_def_property_ui_text(prop, "Active Spline", "");
2008  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2009  }
2010 
2011  prop = RNA_def_property(srna, "handle_free", PROP_FLOAT, PROP_COLOR_GAMMA);
2012  RNA_def_property_float_sdna(prop, NULL, "handle_free");
2013  RNA_def_property_array(prop, 3);
2014  RNA_def_property_ui_text(prop, "Free Handle", "");
2015  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2016 
2017  prop = RNA_def_property(srna, "handle_auto", PROP_FLOAT, PROP_COLOR_GAMMA);
2018  RNA_def_property_float_sdna(prop, NULL, "handle_auto");
2019  RNA_def_property_array(prop, 3);
2020  RNA_def_property_ui_text(prop, "Auto Handle", "");
2021  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2022 
2023  if (incl_vector) {
2024  prop = RNA_def_property(srna, "handle_vect", PROP_FLOAT, PROP_COLOR_GAMMA);
2025  RNA_def_property_float_sdna(prop, NULL, "handle_vect");
2026  RNA_def_property_array(prop, 3);
2027  RNA_def_property_ui_text(prop, "Vector Handle", "");
2028  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2029 
2030  prop = RNA_def_property(srna, "handle_sel_vect", PROP_FLOAT, PROP_COLOR_GAMMA);
2031  RNA_def_property_float_sdna(prop, NULL, "handle_sel_vect");
2032  RNA_def_property_array(prop, 3);
2033  RNA_def_property_ui_text(prop, "Vector Handle Selected", "");
2034  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2035  }
2036 
2037  prop = RNA_def_property(srna, "handle_align", PROP_FLOAT, PROP_COLOR_GAMMA);
2038  RNA_def_property_float_sdna(prop, NULL, "handle_align");
2039  RNA_def_property_array(prop, 3);
2040  RNA_def_property_ui_text(prop, "Align Handle", "");
2041  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2042 
2043  prop = RNA_def_property(srna, "handle_sel_free", PROP_FLOAT, PROP_COLOR_GAMMA);
2044  RNA_def_property_float_sdna(prop, NULL, "handle_sel_free");
2045  RNA_def_property_array(prop, 3);
2046  RNA_def_property_ui_text(prop, "Free Handle Selected", "");
2047  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2048 
2049  prop = RNA_def_property(srna, "handle_sel_auto", PROP_FLOAT, PROP_COLOR_GAMMA);
2050  RNA_def_property_float_sdna(prop, NULL, "handle_sel_auto");
2051  RNA_def_property_array(prop, 3);
2052  RNA_def_property_ui_text(prop, "Auto Handle Selected", "");
2053  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2054 
2055  prop = RNA_def_property(srna, "handle_sel_align", PROP_FLOAT, PROP_COLOR_GAMMA);
2056  RNA_def_property_float_sdna(prop, NULL, "handle_sel_align");
2057  RNA_def_property_array(prop, 3);
2058  RNA_def_property_ui_text(prop, "Align Handle Selected", "");
2059  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2060 
2061  if (!incl_nurbs) {
2062  /* assume that when nurbs are off, this is for 2D (i.e. anim) editors */
2063  prop = RNA_def_property(srna, "handle_auto_clamped", PROP_FLOAT, PROP_COLOR_GAMMA);
2064  RNA_def_property_float_sdna(prop, NULL, "handle_auto_clamped");
2065  RNA_def_property_array(prop, 3);
2066  RNA_def_property_ui_text(prop, "Auto-Clamped Handle", "");
2067  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2068 
2069  prop = RNA_def_property(srna, "handle_sel_auto_clamped", PROP_FLOAT, PROP_COLOR_GAMMA);
2070  RNA_def_property_float_sdna(prop, NULL, "handle_sel_auto_clamped");
2071  RNA_def_property_array(prop, 3);
2072  RNA_def_property_ui_text(prop, "Auto-Clamped Handle Selected", "");
2073  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2074  }
2075 
2076  if (incl_lastsel) {
2077  prop = RNA_def_property(srna, "lastsel_point", PROP_FLOAT, PROP_COLOR_GAMMA);
2078  RNA_def_property_float_sdna(prop, NULL, "lastsel_point");
2079  RNA_def_property_array(prop, 3);
2080  RNA_def_property_ui_text(prop, "Last Selected Point", "");
2081  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2082  }
2083 
2084  if (incl_verthandle) {
2085  prop = RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR_GAMMA);
2086  RNA_def_property_array(prop, 3);
2087  RNA_def_property_ui_text(prop, "Handle Vertex", "");
2088  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2089 
2090  prop = RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_COLOR_GAMMA);
2091  RNA_def_property_array(prop, 3);
2092  RNA_def_property_ui_text(prop, "Handle Vertex Select", "");
2093  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2094 
2095  prop = RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_PIXEL);
2096  RNA_def_property_range(prop, 1, 100);
2097  RNA_def_property_ui_text(prop, "Handle Vertex Size", "");
2098  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2099  }
2100 }
2101 
2103 {
2104  PropertyRNA *prop;
2105 
2106  prop = RNA_def_property(srna, "gp_vertex", PROP_FLOAT, PROP_COLOR_GAMMA);
2107  RNA_def_property_array(prop, 3);
2108  RNA_def_property_ui_text(prop, "Grease Pencil Vertex", "");
2109  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2110 
2111  prop = RNA_def_property(srna, "gp_vertex_select", PROP_FLOAT, PROP_COLOR_GAMMA);
2112  RNA_def_property_array(prop, 3);
2113  RNA_def_property_ui_text(prop, "Grease Pencil Vertex Select", "");
2114  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2115 
2116  prop = RNA_def_property(srna, "gp_vertex_size", PROP_INT, PROP_PIXEL);
2117  RNA_def_property_range(prop, 1, 10);
2118  RNA_def_property_ui_text(prop, "Grease Pencil Vertex Size", "");
2119  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2120 }
2121 
2123 {
2124  StructRNA *srna;
2125  PropertyRNA *prop;
2126 
2127  /* space_view3d */
2128 
2129  srna = RNA_def_struct(brna, "ThemeView3D", NULL);
2130  RNA_def_struct_sdna(srna, "ThemeSpace");
2132  RNA_def_struct_ui_text(srna, "Theme 3D Viewport", "Theme settings for the 3D viewport");
2133 
2135 
2136  /* General Viewport options */
2137 
2138  prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
2139  RNA_def_property_array(prop, 4);
2140  RNA_def_property_ui_text(prop, "Grid", "");
2141  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2142 
2143  prop = RNA_def_property(srna, "clipping_border_3d", PROP_FLOAT, PROP_COLOR_GAMMA);
2144  RNA_def_property_array(prop, 4);
2145  RNA_def_property_ui_text(prop, "Clipping Border", "");
2146  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2147 
2148  prop = RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR_GAMMA);
2149  RNA_def_property_array(prop, 3);
2150  RNA_def_property_ui_text(prop, "Wire", "");
2151  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2152 
2153  prop = RNA_def_property(srna, "wire_edit", PROP_FLOAT, PROP_COLOR_GAMMA);
2154  RNA_def_property_array(prop, 3);
2156  prop, "Wire Edit", "Color for wireframe when in edit mode, but edge selection is active");
2157  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2158 
2159  /* Grease Pencil */
2160 
2162 
2163  prop = RNA_def_property(srna, "text_grease_pencil", PROP_FLOAT, PROP_COLOR_GAMMA);
2164  RNA_def_property_float_sdna(prop, NULL, "time_gp_keyframe");
2165  RNA_def_property_array(prop, 3);
2167  prop, "Grease Pencil Keyframe", "Color for indicating Grease Pencil keyframes");
2168  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2169 
2170  /* Object specific options */
2171 
2172  prop = RNA_def_property(srna, "object_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
2173  RNA_def_property_float_sdna(prop, NULL, "select");
2174  RNA_def_property_array(prop, 3);
2175  RNA_def_property_ui_text(prop, "Object Selected", "");
2176  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2177 
2178  prop = RNA_def_property(srna, "object_active", PROP_FLOAT, PROP_COLOR_GAMMA);
2179  RNA_def_property_float_sdna(prop, NULL, "active");
2180  RNA_def_property_array(prop, 3);
2181  RNA_def_property_ui_text(prop, "Active Object", "");
2182  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2183 
2184  prop = RNA_def_property(srna, "text_keyframe", PROP_FLOAT, PROP_COLOR_GAMMA);
2185  RNA_def_property_float_sdna(prop, NULL, "time_keyframe");
2186  RNA_def_property_array(prop, 3);
2187  RNA_def_property_ui_text(prop, "Object Keyframe", "Color for indicating object keyframes");
2188  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2189 
2190  /* Object type options */
2191 
2192  prop = RNA_def_property(srna, "camera", PROP_FLOAT, PROP_COLOR_GAMMA);
2193  RNA_def_property_array(prop, 3);
2194  RNA_def_property_ui_text(prop, "Camera", "");
2195  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2196 
2197  prop = RNA_def_property(srna, "empty", PROP_FLOAT, PROP_COLOR_GAMMA);
2198  RNA_def_property_array(prop, 3);
2199  RNA_def_property_ui_text(prop, "Empty", "");
2200  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2201 
2202  prop = RNA_def_property(srna, "light", PROP_FLOAT, PROP_COLOR_GAMMA);
2203  RNA_def_property_float_sdna(prop, NULL, "lamp");
2204  RNA_def_property_array(prop, 4);
2205  RNA_def_property_ui_text(prop, "Light", "");
2207  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2208 
2209  prop = RNA_def_property(srna, "speaker", PROP_FLOAT, PROP_COLOR_GAMMA);
2210  RNA_def_property_array(prop, 3);
2211  RNA_def_property_ui_text(prop, "Speaker", "");
2212  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2213 
2214  /* Mesh Object specific */
2215 
2219 
2220  /* Mesh Object specific curves. */
2221 
2222  rna_def_userdef_theme_spaces_curves(srna, true, true, true, false);
2223 
2224  prop = RNA_def_property(srna, "extra_edge_len", PROP_FLOAT, PROP_COLOR_GAMMA);
2225  RNA_def_property_array(prop, 3);
2226  RNA_def_property_ui_text(prop, "Edge Length Text", "");
2227  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2228 
2229  prop = RNA_def_property(srna, "extra_edge_angle", PROP_FLOAT, PROP_COLOR_GAMMA);
2230  RNA_def_property_array(prop, 3);
2231  RNA_def_property_ui_text(prop, "Edge Angle Text", "");
2232  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2233 
2234  prop = RNA_def_property(srna, "extra_face_angle", PROP_FLOAT, PROP_COLOR_GAMMA);
2235  RNA_def_property_array(prop, 3);
2236  RNA_def_property_ui_text(prop, "Face Angle Text", "");
2237  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2238 
2239  prop = RNA_def_property(srna, "extra_face_area", PROP_FLOAT, PROP_COLOR_GAMMA);
2240  RNA_def_property_array(prop, 3);
2241  RNA_def_property_ui_text(prop, "Face Area Text", "");
2242  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2243 
2244  prop = RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR_GAMMA);
2245  RNA_def_property_array(prop, 4);
2246  RNA_def_property_ui_text(prop, "Active Vertex/Edge/Face", "");
2247  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2248 
2249  prop = RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR_GAMMA);
2250  RNA_def_property_array(prop, 3);
2251  RNA_def_property_ui_text(prop, "Face Normal", "");
2252  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2253 
2254  prop = RNA_def_property(srna, "vertex_normal", PROP_FLOAT, PROP_COLOR_GAMMA);
2255  RNA_def_property_array(prop, 3);
2256  RNA_def_property_ui_text(prop, "Vertex Normal", "");
2257  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2258 
2259  prop = RNA_def_property(srna, "split_normal", PROP_FLOAT, PROP_COLOR_GAMMA);
2260  RNA_def_property_float_sdna(prop, NULL, "loop_normal");
2261  RNA_def_property_array(prop, 3);
2262  RNA_def_property_ui_text(prop, "Split Normal", "");
2263  RNA_def_property_update(prop, 0, "rna_userdef_update");
2264 
2265  /* Armature Object specific. */
2266 
2267  prop = RNA_def_property(srna, "bone_pose", PROP_FLOAT, PROP_COLOR_GAMMA);
2268  RNA_def_property_array(prop, 3);
2269  RNA_def_property_ui_text(prop, "Bone Pose", "");
2270  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2271 
2272  prop = RNA_def_property(srna, "bone_pose_active", PROP_FLOAT, PROP_COLOR_GAMMA);
2273  RNA_def_property_array(prop, 3);
2274  RNA_def_property_ui_text(prop, "Bone Pose Active", "");
2275  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2276 
2277  prop = RNA_def_property(srna, "bone_solid", PROP_FLOAT, PROP_COLOR_GAMMA);
2278  RNA_def_property_array(prop, 3);
2279  RNA_def_property_ui_text(prop, "Bone Solid", "");
2280  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2281 
2282  prop = RNA_def_property(srna, "bone_locked_weight", PROP_FLOAT, PROP_COLOR_GAMMA);
2283  RNA_def_property_array(prop, 4);
2285  prop,
2286  "Bone Locked Weight",
2287  "Shade for bones corresponding to a locked weight group during painting");
2288  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2289 
2290  /* misc */
2291 
2292  prop = RNA_def_property(srna, "bundle_solid", PROP_FLOAT, PROP_COLOR_GAMMA);
2293  RNA_def_property_float_sdna(prop, NULL, "bundle_solid");
2294  RNA_def_property_array(prop, 3);
2295  RNA_def_property_ui_text(prop, "Bundle Solid", "");
2296  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2297 
2298  prop = RNA_def_property(srna, "camera_path", PROP_FLOAT, PROP_COLOR_GAMMA);
2299  RNA_def_property_float_sdna(prop, NULL, "camera_path");
2300  RNA_def_property_array(prop, 3);
2301  RNA_def_property_ui_text(prop, "Camera Path", "");
2302  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2303 
2304  prop = RNA_def_property(srna, "skin_root", PROP_FLOAT, PROP_COLOR_GAMMA);
2305  RNA_def_property_array(prop, 3);
2306  RNA_def_property_ui_text(prop, "Skin Root", "");
2307  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2308 
2309  prop = RNA_def_property(srna, "view_overlay", PROP_FLOAT, PROP_COLOR_GAMMA);
2310  RNA_def_property_array(prop, 3);
2311  RNA_def_property_ui_text(prop, "View Overlay", "");
2312  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2313 
2314  prop = RNA_def_property(srna, "transform", PROP_FLOAT, PROP_COLOR_GAMMA);
2315  RNA_def_property_array(prop, 3);
2316  RNA_def_property_ui_text(prop, "Transform", "");
2317  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2318 
2319  prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
2320  RNA_def_property_float_sdna(prop, NULL, "cframe");
2321  RNA_def_property_array(prop, 3);
2322  RNA_def_property_ui_text(prop, "Current Frame", "");
2323  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2324 
2326 
2327  prop = RNA_def_property(srna, "outline_width", PROP_INT, PROP_PIXEL);
2328  RNA_def_property_range(prop, 1, 5);
2329  RNA_def_property_ui_text(prop, "Outline Width", "");
2330  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2331 
2332  prop = RNA_def_property(srna, "object_origin_size", PROP_INT, PROP_PIXEL);
2333  RNA_def_property_int_sdna(prop, NULL, "obcenter_dia");
2334  RNA_def_property_range(prop, 4, 10);
2336  prop, "Object Origin Size", "Diameter in pixels for object/light origin display");
2337  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2338 }
2339 
2341 {
2342  StructRNA *srna;
2343  PropertyRNA *prop;
2344 
2345  /* space_graph */
2346  srna = RNA_def_struct(brna, "ThemeGraphEditor", NULL);
2347  RNA_def_struct_sdna(srna, "ThemeSpace");
2349  RNA_def_struct_ui_text(srna, "Theme Graph Editor", "Theme settings for the graph editor");
2350 
2353 
2354  prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
2355  RNA_def_property_array(prop, 3);
2356  RNA_def_property_ui_text(prop, "Grid", "");
2357  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2358 
2359  prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
2360  RNA_def_property_float_sdna(prop, NULL, "cframe");
2361  RNA_def_property_array(prop, 3);
2362  RNA_def_property_ui_text(prop, "Current Frame", "");
2363  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2364 
2365  prop = RNA_def_property(srna, "time_scrub_background", PROP_FLOAT, PROP_COLOR_GAMMA);
2366  RNA_def_property_array(prop, 4);
2367  RNA_def_property_ui_text(prop, "Scrubbing/Markers Region", "");
2368  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2369 
2370  prop = RNA_def_property(srna, "time_marker_line", PROP_FLOAT, PROP_COLOR_GAMMA);
2371  RNA_def_property_array(prop, 4);
2372  RNA_def_property_ui_text(prop, "Marker Line", "");
2373  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2374 
2375  prop = RNA_def_property(srna, "time_marker_line_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
2376  RNA_def_property_array(prop, 4);
2377  RNA_def_property_ui_text(prop, "Marker Line Selected", "");
2378  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2379 
2380  prop = RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
2381  RNA_def_property_float_sdna(prop, NULL, "shade1");
2382  RNA_def_property_array(prop, 3);
2383  RNA_def_property_ui_text(prop, "Window Sliders", "");
2384  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2385 
2386  prop = RNA_def_property(srna, "channels_region", PROP_FLOAT, PROP_COLOR_GAMMA);
2387  RNA_def_property_float_sdna(prop, NULL, "shade2");
2388  RNA_def_property_array(prop, 3);
2389  RNA_def_property_ui_text(prop, "Channels Region", "");
2390  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2391 
2392  prop = RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR_GAMMA);
2393  RNA_def_property_float_sdna(prop, NULL, "ds_channel");
2394  RNA_def_property_array(prop, 3);
2395  RNA_def_property_ui_text(prop, "Dope Sheet Channel", "");
2396  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2397 
2398  prop = RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR_GAMMA);
2399  RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
2400  RNA_def_property_array(prop, 3);
2401  RNA_def_property_ui_text(prop, "Dope Sheet Sub-channel", "");
2402  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2403 
2404  prop = RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR_GAMMA);
2405  RNA_def_property_float_sdna(prop, NULL, "group");
2406  RNA_def_property_array(prop, 3);
2407  RNA_def_property_ui_text(prop, "Channel Group", "");
2408  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2409 
2410  prop = RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR_GAMMA);
2411  RNA_def_property_float_sdna(prop, NULL, "group_active");
2412  RNA_def_property_array(prop, 3);
2413  RNA_def_property_ui_text(prop, "Active Channel Group", "");
2414  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2415 
2416  prop = RNA_def_property(srna, "preview_range", PROP_FLOAT, PROP_COLOR_GAMMA);
2417  RNA_def_property_float_sdna(prop, NULL, "anim_preview_range");
2418  RNA_def_property_array(prop, 4);
2419  RNA_def_property_ui_text(prop, "Preview Range", "Color of preview range overlay");
2420  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2421 
2423  rna_def_userdef_theme_spaces_curves(srna, false, true, true, true);
2424 }
2425 
2427 {
2428  StructRNA *srna;
2429  PropertyRNA *prop;
2430 
2431  /* space_file */
2432 
2433  srna = RNA_def_struct(brna, "ThemeFileBrowser", NULL);
2434  RNA_def_struct_sdna(srna, "ThemeSpace");
2436  RNA_def_struct_ui_text(srna, "Theme File Browser", "Theme settings for the File Browser");
2437 
2439 
2440  prop = RNA_def_property(srna, "selected_file", PROP_FLOAT, PROP_COLOR_GAMMA);
2441  RNA_def_property_float_sdna(prop, NULL, "hilite");
2442  RNA_def_property_array(prop, 3);
2443  RNA_def_property_ui_text(prop, "Selected File", "");
2444  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2445 
2446  prop = RNA_def_property(srna, "row_alternate", PROP_FLOAT, PROP_COLOR_GAMMA);
2447  RNA_def_property_array(prop, 4);
2448  RNA_def_property_ui_text(prop, "Alternate Rows", "Overlay color on every other row");
2449  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2450 }
2451 
2453 {
2454  StructRNA *srna;
2455  PropertyRNA *prop;
2456 
2457  /* space_outliner */
2458 
2459  srna = RNA_def_struct(brna, "ThemeOutliner", NULL);
2460  RNA_def_struct_sdna(srna, "ThemeSpace");
2462  RNA_def_struct_ui_text(srna, "Theme Outliner", "Theme settings for the Outliner");
2463 
2465 
2466  prop = RNA_def_property(srna, "match", PROP_FLOAT, PROP_COLOR_GAMMA);
2467  RNA_def_property_array(prop, 3);
2468  RNA_def_property_ui_text(prop, "Filter Match", "");
2469  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2470 
2471  prop = RNA_def_property(srna, "selected_highlight", PROP_FLOAT, PROP_COLOR_GAMMA);
2472  RNA_def_property_array(prop, 3);
2473  RNA_def_property_ui_text(prop, "Selected Highlight", "");
2474  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2475 
2476  prop = RNA_def_property(srna, "active", PROP_FLOAT, PROP_COLOR_GAMMA);
2477  RNA_def_property_array(prop, 3);
2478  RNA_def_property_ui_text(prop, "Active Highlight", "");
2479  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2480 
2481  prop = RNA_def_property(srna, "selected_object", PROP_FLOAT, PROP_COLOR_GAMMA);
2482  RNA_def_property_array(prop, 3);
2483  RNA_def_property_ui_text(prop, "Selected Objects", "");
2484  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2485 
2486  prop = RNA_def_property(srna, "active_object", PROP_FLOAT, PROP_COLOR_GAMMA);
2487  RNA_def_property_array(prop, 3);
2488  RNA_def_property_ui_text(prop, "Active Object", "");
2489  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2490 
2491  prop = RNA_def_property(srna, "edited_object", PROP_FLOAT, PROP_COLOR_GAMMA);
2492  RNA_def_property_array(prop, 4);
2493  RNA_def_property_ui_text(prop, "Edited Object", "");
2494  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2495 
2496  prop = RNA_def_property(srna, "row_alternate", PROP_FLOAT, PROP_COLOR_GAMMA);
2497  RNA_def_property_array(prop, 4);
2498  RNA_def_property_ui_text(prop, "Alternate Rows", "Overlay color on every other row");
2499  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2500 }
2501 
2503 {
2504  StructRNA *srna;
2505 
2506  /* space_userpref */
2507 
2508  srna = RNA_def_struct(brna, "ThemePreferences", NULL);
2509  RNA_def_struct_sdna(srna, "ThemeSpace");
2511  RNA_def_struct_ui_text(srna, "Theme Preferences", "Theme settings for the Blender Preferences");
2512 
2514 }
2515 
2517 {
2518  StructRNA *srna;
2519  PropertyRNA *prop;
2520 
2521  /* space_console */
2522 
2523  srna = RNA_def_struct(brna, "ThemeConsole", NULL);
2524  RNA_def_struct_sdna(srna, "ThemeSpace");
2526  RNA_def_struct_ui_text(srna, "Theme Console", "Theme settings for the Console");
2527 
2529 
2530  prop = RNA_def_property(srna, "line_output", PROP_FLOAT, PROP_COLOR_GAMMA);
2531  RNA_def_property_float_sdna(prop, NULL, "console_output");
2532  RNA_def_property_array(prop, 3);
2533  RNA_def_property_ui_text(prop, "Line Output", "");
2534  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2535 
2536  prop = RNA_def_property(srna, "line_input", PROP_FLOAT, PROP_COLOR_GAMMA);
2537  RNA_def_property_float_sdna(prop, NULL, "console_input");
2538  RNA_def_property_array(prop, 3);
2539  RNA_def_property_ui_text(prop, "Line Input", "");
2540  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2541 
2542  prop = RNA_def_property(srna, "line_info", PROP_FLOAT, PROP_COLOR_GAMMA);
2543  RNA_def_property_float_sdna(prop, NULL, "console_info");
2544  RNA_def_property_array(prop, 3);
2545  RNA_def_property_ui_text(prop, "Line Info", "");
2546  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2547 
2548  prop = RNA_def_property(srna, "line_error", PROP_FLOAT, PROP_COLOR_GAMMA);
2549  RNA_def_property_float_sdna(prop, NULL, "console_error");
2550  RNA_def_property_array(prop, 3);
2551  RNA_def_property_ui_text(prop, "Line Error", "");
2552  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2553 
2554  prop = RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR_GAMMA);
2555  RNA_def_property_float_sdna(prop, NULL, "console_cursor");
2556  RNA_def_property_array(prop, 3);
2557  RNA_def_property_ui_text(prop, "Cursor", "");
2558  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2559 
2560  prop = RNA_def_property(srna, "select", PROP_FLOAT, PROP_COLOR_GAMMA);
2561  RNA_def_property_float_sdna(prop, NULL, "console_select");
2562  RNA_def_property_array(prop, 4);
2563  RNA_def_property_ui_text(prop, "Selection", "");
2564  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2565 }
2566 
2568 {
2569  StructRNA *srna;
2570  PropertyRNA *prop;
2571 
2572  /* space_info */
2573 
2574  srna = RNA_def_struct(brna, "ThemeInfo", NULL);
2575  RNA_def_struct_sdna(srna, "ThemeSpace");
2577  RNA_def_struct_ui_text(srna, "Theme Info", "Theme settings for Info");
2578 
2580 
2581  prop = RNA_def_property(srna, "info_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
2582  RNA_def_property_array(prop, 3);
2583  RNA_def_property_ui_text(prop, "Selected Line Background", "Background color of selected line");
2584  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2585 
2586  prop = RNA_def_property(srna, "info_selected_text", PROP_FLOAT, PROP_COLOR_GAMMA);
2587  RNA_def_property_array(prop, 3);
2588  RNA_def_property_ui_text(prop, "Selected Line Text Color", "Text color of selected line");
2589  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2590 
2591  prop = RNA_def_property(srna, "info_error", PROP_FLOAT, PROP_COLOR_GAMMA);
2592  RNA_def_property_array(prop, 4);
2593  RNA_def_property_ui_text(prop, "Error Icon Background", "Background color of Error icon");
2594  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2595 
2596  prop = RNA_def_property(srna, "info_error_text", PROP_FLOAT, PROP_COLOR_GAMMA);
2597  RNA_def_property_array(prop, 3);
2598  RNA_def_property_ui_text(prop, "Error Icon Foreground", "Foreground color of Error icon");
2599  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2600 
2601  prop = RNA_def_property(srna, "info_warning", PROP_FLOAT, PROP_COLOR_GAMMA);
2602  RNA_def_property_array(prop, 4);
2603  RNA_def_property_ui_text(prop, "Warning Icon Background", "Background color of Warning icon");
2604  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2605 
2606  prop = RNA_def_property(srna, "info_warning_text", PROP_FLOAT, PROP_COLOR_GAMMA);
2607  RNA_def_property_array(prop, 3);
2608  RNA_def_property_ui_text(prop, "Warning Icon Foreground", "Foreground color of Warning icon");
2609  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2610 
2611  prop = RNA_def_property(srna, "info_info", PROP_FLOAT, PROP_COLOR_GAMMA);
2612  RNA_def_property_array(prop, 4);
2613  RNA_def_property_ui_text(prop, "Info Icon Background", "Background color of Info icon");
2614  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2615 
2616  prop = RNA_def_property(srna, "info_info_text", PROP_FLOAT, PROP_COLOR_GAMMA);
2617  RNA_def_property_array(prop, 3);
2618  RNA_def_property_ui_text(prop, "Info Icon Foreground", "Foreground color of Info icon");
2619  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2620 
2621  prop = RNA_def_property(srna, "info_debug", PROP_FLOAT, PROP_COLOR_GAMMA);
2622  RNA_def_property_array(prop, 4);
2623  RNA_def_property_ui_text(prop, "Debug Icon Background", "Background color of Debug icon");
2624  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2625 
2626  prop = RNA_def_property(srna, "info_debug_text", PROP_FLOAT, PROP_COLOR_GAMMA);
2627  RNA_def_property_array(prop, 3);
2628  RNA_def_property_ui_text(prop, "Debug Icon Foreground", "Foreground color of Debug icon");
2629  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2630 
2631  prop = RNA_def_property(srna, "info_property", PROP_FLOAT, PROP_COLOR_GAMMA);
2632  RNA_def_property_array(prop, 4);
2633  RNA_def_property_ui_text(prop, "Property Icon Background", "Background color of Property icon");
2634  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2635 
2636  prop = RNA_def_property(srna, "info_property_text", PROP_FLOAT, PROP_COLOR_GAMMA);
2637  RNA_def_property_array(prop, 3);
2638  RNA_def_property_ui_text(prop, "Property Icon Foreground", "Foreground color of Property icon");
2639  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2640 
2641  prop = RNA_def_property(srna, "info_operator", PROP_FLOAT, PROP_COLOR_GAMMA);
2642  RNA_def_property_array(prop, 4);
2643  RNA_def_property_ui_text(prop, "Operator Icon Background", "Background color of Operator icon");
2644  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2645 
2646  prop = RNA_def_property(srna, "info_operator_text", PROP_FLOAT, PROP_COLOR_GAMMA);
2647  RNA_def_property_array(prop, 3);
2648  RNA_def_property_ui_text(prop, "Operator Icon Foreground", "Foreground color of Operator icon");
2649  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2650 }
2651 
2653 {
2654  StructRNA *srna;
2655  PropertyRNA *prop;
2656 
2657  /* space_text */
2658 
2659  srna = RNA_def_struct(brna, "ThemeTextEditor", NULL);
2660  RNA_def_struct_sdna(srna, "ThemeSpace");
2662  RNA_def_struct_ui_text(srna, "Theme Text Editor", "Theme settings for the Text Editor");
2663 
2665 
2666  prop = RNA_def_property(srna, "line_numbers", PROP_FLOAT, PROP_COLOR_GAMMA);
2667  RNA_def_property_float_sdna(prop, NULL, "line_numbers");
2668  RNA_def_property_array(prop, 3);
2669  RNA_def_property_ui_text(prop, "Line Numbers", "");
2670  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2671 
2672  prop = RNA_def_property(srna, "line_numbers_background", PROP_FLOAT, PROP_COLOR_GAMMA);
2673  RNA_def_property_float_sdna(prop, NULL, "grid");
2674  RNA_def_property_array(prop, 3);
2675  RNA_def_property_ui_text(prop, "Line Numbers Background", "");
2676  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2677 
2678  /* no longer used */
2679 # if 0
2680  prop = RNA_def_property(srna, "scroll_bar", PROP_FLOAT, PROP_COLOR_GAMMA);
2681  RNA_def_property_float_sdna(prop, NULL, "shade1");
2682  RNA_def_property_array(prop, 3);
2683  RNA_def_property_ui_text(prop, "Scroll Bar", "");
2684  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2685 # endif
2686 
2687  prop = RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR_GAMMA);
2688  RNA_def_property_float_sdna(prop, NULL, "shade2");
2689  RNA_def_property_array(prop, 3);
2690  RNA_def_property_ui_text(prop, "Selected Text", "");
2691  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2692 
2693  prop = RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR_GAMMA);
2694  RNA_def_property_float_sdna(prop, NULL, "hilite");
2695  RNA_def_property_array(prop, 3);
2696  RNA_def_property_ui_text(prop, "Cursor", "");
2697  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2698 
2699  prop = RNA_def_property(srna, "syntax_builtin", PROP_FLOAT, PROP_COLOR_GAMMA);
2700  RNA_def_property_float_sdna(prop, NULL, "syntaxb");
2701  RNA_def_property_array(prop, 3);
2702  RNA_def_property_ui_text(prop, "Syntax Built-In", "");
2703  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2704 
2705  prop = RNA_def_property(srna, "syntax_symbols", PROP_FLOAT, PROP_COLOR_GAMMA);
2706  RNA_def_property_float_sdna(prop, NULL, "syntaxs");
2707  RNA_def_property_array(prop, 3);
2708  RNA_def_property_ui_text(prop, "Syntax Symbols", "");
2709  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2710 
2711  prop = RNA_def_property(srna, "syntax_special", PROP_FLOAT, PROP_COLOR_GAMMA);
2712  RNA_def_property_float_sdna(prop, NULL, "syntaxv");
2713  RNA_def_property_array(prop, 3);
2714  RNA_def_property_ui_text(prop, "Syntax Special", "");
2715  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2716 
2717  prop = RNA_def_property(srna, "syntax_preprocessor", PROP_FLOAT, PROP_COLOR_GAMMA);
2718  RNA_def_property_float_sdna(prop, NULL, "syntaxd");
2719  RNA_def_property_array(prop, 3);
2720  RNA_def_property_ui_text(prop, "Syntax Preprocessor", "");
2721  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2722 
2723  prop = RNA_def_property(srna, "syntax_reserved", PROP_FLOAT, PROP_COLOR_GAMMA);
2724  RNA_def_property_float_sdna(prop, NULL, "syntaxr");
2725  RNA_def_property_array(prop, 3);
2726  RNA_def_property_ui_text(prop, "Syntax Reserved", "");
2727  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2728 
2729  prop = RNA_def_property(srna, "syntax_comment", PROP_FLOAT, PROP_COLOR_GAMMA);
2730  RNA_def_property_float_sdna(prop, NULL, "syntaxc");
2731  RNA_def_property_array(prop, 3);
2732  RNA_def_property_ui_text(prop, "Syntax Comment", "");
2733  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2734 
2735  prop = RNA_def_property(srna, "syntax_string", PROP_FLOAT, PROP_COLOR_GAMMA);
2736  RNA_def_property_float_sdna(prop, NULL, "syntaxl");
2737  RNA_def_property_array(prop, 3);
2738  RNA_def_property_ui_text(prop, "Syntax String", "");
2739  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2740 
2741  prop = RNA_def_property(srna, "syntax_numbers", PROP_FLOAT, PROP_COLOR_GAMMA);
2742  RNA_def_property_float_sdna(prop, NULL, "syntaxn");
2743  RNA_def_property_array(prop, 3);
2744  RNA_def_property_ui_text(prop, "Syntax Numbers", "");
2745  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2746 }
2747 
2749 {
2750  StructRNA *srna;
2751  PropertyRNA *prop;
2752 
2753  /* space_node */
2754 
2755  srna = RNA_def_struct(brna, "ThemeNodeEditor", NULL);
2756  RNA_def_struct_sdna(srna, "ThemeSpace");
2758  RNA_def_struct_ui_text(srna, "Theme Node Editor", "Theme settings for the Node Editor");
2759 
2762 
2763  prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
2764  RNA_def_property_array(prop, 3);
2765  RNA_def_property_ui_text(prop, "Grid", "");
2766  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2767 
2768  prop = RNA_def_property(srna, "node_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
2769  RNA_def_property_float_sdna(prop, NULL, "select");
2770  RNA_def_property_array(prop, 3);
2771  RNA_def_property_ui_text(prop, "Node Selected", "");
2772  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2773 
2774  prop = RNA_def_property(srna, "node_active", PROP_FLOAT, PROP_COLOR_GAMMA);
2775  RNA_def_property_float_sdna(prop, NULL, "active");
2776  RNA_def_property_array(prop, 3);
2777  RNA_def_property_ui_text(prop, "Active Node", "");
2778  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2779 
2780  prop = RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR_GAMMA);
2781  RNA_def_property_float_sdna(prop, NULL, "wire");
2782  RNA_def_property_array(prop, 3);
2783  RNA_def_property_ui_text(prop, "Wires", "");
2784  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2785 
2786  prop = RNA_def_property(srna, "wire_inner", PROP_FLOAT, PROP_COLOR_GAMMA);
2787  RNA_def_property_float_sdna(prop, NULL, "syntaxr");
2788  RNA_def_property_array(prop, 3);
2789  RNA_def_property_ui_text(prop, "Wire Color", "");
2790  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2791 
2792  prop = RNA_def_property(srna, "wire_select", PROP_FLOAT, PROP_COLOR_GAMMA);
2793  RNA_def_property_float_sdna(prop, NULL, "edge_select");
2794  RNA_def_property_array(prop, 4);
2795  RNA_def_property_ui_text(prop, "Wire Select", "");
2796  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2797 
2798  prop = RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR_GAMMA);
2799  RNA_def_property_float_sdna(prop, NULL, "shade2");
2800  RNA_def_property_array(prop, 3);
2801  RNA_def_property_ui_text(prop, "Selected Text", "");
2802  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2803 
2804  prop = RNA_def_property(srna, "node_backdrop", PROP_FLOAT, PROP_COLOR_GAMMA);
2805  RNA_def_property_float_sdna(prop, NULL, "syntaxl");
2806  RNA_def_property_array(prop, 4);
2807  RNA_def_property_ui_text(prop, "Node Backdrop", "");
2808  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2809 
2810  prop = RNA_def_property(srna, "converter_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2811  RNA_def_property_float_sdna(prop, NULL, "syntaxv");
2812  RNA_def_property_array(prop, 3);
2813  RNA_def_property_ui_text(prop, "Converter Node", "");
2814  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2815 
2816  prop = RNA_def_property(srna, "color_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2817  RNA_def_property_float_sdna(prop, NULL, "syntaxb");
2818  RNA_def_property_array(prop, 3);
2819  RNA_def_property_ui_text(prop, "Color Node", "");
2820  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2821 
2822  prop = RNA_def_property(srna, "group_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2823  RNA_def_property_float_sdna(prop, NULL, "syntaxc");
2824  RNA_def_property_array(prop, 3);
2825  RNA_def_property_ui_text(prop, "Group Node", "");
2826  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2827 
2828  prop = RNA_def_property(srna, "group_socket_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2829  RNA_def_property_float_sdna(prop, NULL, "console_output");
2830  RNA_def_property_array(prop, 3);
2831  RNA_def_property_ui_text(prop, "Group Socket Node", "");
2832  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2833 
2834  prop = RNA_def_property(srna, "frame_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2835  RNA_def_property_float_sdna(prop, NULL, "movie");
2836  RNA_def_property_array(prop, 4);
2837  RNA_def_property_ui_text(prop, "Frame Node", "");
2838  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2839 
2840  prop = RNA_def_property(srna, "matte_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2841  RNA_def_property_float_sdna(prop, NULL, "syntaxs");
2842  RNA_def_property_array(prop, 3);
2843  RNA_def_property_ui_text(prop, "Matte Node", "");
2844  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2845 
2846  prop = RNA_def_property(srna, "distor_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2847  RNA_def_property_float_sdna(prop, NULL, "syntaxd");
2848  RNA_def_property_array(prop, 3);
2849  RNA_def_property_ui_text(prop, "Distort Node", "");
2850  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2851 
2852  prop = RNA_def_property(srna, "noodle_curving", PROP_INT, PROP_NONE);
2853  RNA_def_property_int_sdna(prop, NULL, "noodle_curving");
2855  RNA_def_property_range(prop, 0, 10);
2856  RNA_def_property_ui_text(prop, "Noodle Curving", "Curving of the noodle");
2857  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2858 
2859  prop = RNA_def_property(srna, "grid_levels", PROP_INT, PROP_NONE);
2860  RNA_def_property_int_sdna(prop, NULL, "grid_levels");
2862  RNA_def_property_range(prop, 0, 3);
2864  prop, "Grid Levels", "Number of subdivisions for the dot grid displayed in the background");
2865  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2866 
2867  prop = RNA_def_property(srna, "dash_alpha", PROP_FLOAT, PROP_FACTOR);
2868  RNA_def_property_range(prop, 0.0f, 1.0f);
2869  RNA_def_property_float_default(prop, 0.5f);
2870  RNA_def_property_ui_text(prop, "Dashed Lines Opacity", "Opacity for the dashed lines in wires");
2871  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2872 
2873  prop = RNA_def_property(srna, "input_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2874  RNA_def_property_float_sdna(prop, NULL, "syntaxn");
2875  RNA_def_property_array(prop, 3);
2876  RNA_def_property_ui_text(prop, "Input Node", "");
2877  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2878 
2879  prop = RNA_def_property(srna, "output_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2880  RNA_def_property_float_sdna(prop, NULL, "nodeclass_output");
2881  RNA_def_property_array(prop, 3);
2882  RNA_def_property_ui_text(prop, "Output Node", "");
2883  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2884 
2885  prop = RNA_def_property(srna, "filter_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2886  RNA_def_property_float_sdna(prop, NULL, "nodeclass_filter");
2887  RNA_def_property_array(prop, 3);
2888  RNA_def_property_ui_text(prop, "Filter Node", "");
2889  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2890 
2891  prop = RNA_def_property(srna, "vector_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2892  RNA_def_property_float_sdna(prop, NULL, "nodeclass_vector");
2893  RNA_def_property_array(prop, 3);
2894  RNA_def_property_ui_text(prop, "Vector Node", "");
2895  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2896 
2897  prop = RNA_def_property(srna, "texture_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2898  RNA_def_property_float_sdna(prop, NULL, "nodeclass_texture");
2899  RNA_def_property_array(prop, 3);
2900  RNA_def_property_ui_text(prop, "Texture Node", "");
2901  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2902 
2903  prop = RNA_def_property(srna, "shader_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2904  RNA_def_property_float_sdna(prop, NULL, "nodeclass_shader");
2905  RNA_def_property_array(prop, 3);
2906  RNA_def_property_ui_text(prop, "Shader Node", "");
2907  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2908 
2909  prop = RNA_def_property(srna, "script_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2910  RNA_def_property_float_sdna(prop, NULL, "nodeclass_script");
2911  RNA_def_property_array(prop, 3);
2912  RNA_def_property_ui_text(prop, "Script Node", "");
2913  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2914 
2915  prop = RNA_def_property(srna, "pattern_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2916  RNA_def_property_float_sdna(prop, NULL, "nodeclass_pattern");
2917  RNA_def_property_array(prop, 3);
2918  RNA_def_property_ui_text(prop, "Pattern Node", "");
2919  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2920 
2921  prop = RNA_def_property(srna, "layout_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2922  RNA_def_property_float_sdna(prop, NULL, "nodeclass_layout");
2923  RNA_def_property_array(prop, 3);
2924  RNA_def_property_ui_text(prop, "Layout Node", "");
2925  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2926 
2927  prop = RNA_def_property(srna, "geometry_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2928  RNA_def_property_float_sdna(prop, NULL, "nodeclass_geometry");
2929  RNA_def_property_array(prop, 3);
2930  RNA_def_property_ui_text(prop, "Geometry Node", "");
2931  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2932 
2933  prop = RNA_def_property(srna, "attribute_node", PROP_FLOAT, PROP_COLOR_GAMMA);
2934  RNA_def_property_float_sdna(prop, NULL, "nodeclass_attribute");
2935  RNA_def_property_array(prop, 3);
2936  RNA_def_property_ui_text(prop, "Attribute Node", "");
2937  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2938 }
2939 
2941 {
2942  StructRNA *srna;
2943  PropertyRNA *prop;
2944 
2945  /* space_buts */
2946 
2947  srna = RNA_def_struct(brna, "ThemeProperties", NULL);
2948  RNA_def_struct_sdna(srna, "ThemeSpace");
2950  RNA_def_struct_ui_text(srna, "Theme Properties", "Theme settings for the Properties");
2951 
2952  prop = RNA_def_property(srna, "match", PROP_FLOAT, PROP_COLOR_GAMMA);
2953  RNA_def_property_array(prop, 3);
2954  RNA_def_property_ui_text(prop, "Search Match", "");
2955  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2956 
2957  prop = RNA_def_property(srna, "active_modifier", PROP_FLOAT, PROP_COLOR_GAMMA);
2958  RNA_def_property_float_sdna(prop, NULL, "active");
2959  RNA_def_property_array(prop, 4);
2960  RNA_def_property_ui_text(prop, "Active Modifier Outline", "");
2961  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2962 
2964 }
2965 
2967 {
2968  StructRNA *srna;
2969  PropertyRNA *prop;
2970 
2971  /* space_image */
2972 
2973  srna = RNA_def_struct(brna, "ThemeImageEditor", NULL);
2974  RNA_def_struct_sdna(srna, "ThemeSpace");
2976  RNA_def_struct_ui_text(srna, "Theme Image Editor", "Theme settings for the Image Editor");
2977 
2979 
2980  prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
2981  RNA_def_property_array(prop, 4);
2982  RNA_def_property_ui_text(prop, "Grid", "");
2983  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2984 
2987 
2988  prop = RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR_GAMMA);
2989  RNA_def_property_array(prop, 4);
2990  RNA_def_property_ui_text(prop, "Active Vertex/Edge/Face", "");
2991  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2992 
2993  prop = RNA_def_property(srna, "wire_edit", PROP_FLOAT, PROP_COLOR_GAMMA);
2994  RNA_def_property_array(prop, 3);
2995  RNA_def_property_ui_text(prop, "Wire Edit", "");
2996  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
2997 
2998  prop = RNA_def_property(srna, "edge_select", PROP_FLOAT, PROP_COLOR_GAMMA);
2999  RNA_def_property_array(prop, 3);
3000  RNA_def_property_ui_text(prop, "Edge Select", "");
3001  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3002 
3003  prop = RNA_def_property(srna, "scope_back", PROP_FLOAT, PROP_COLOR_GAMMA);
3004  RNA_def_property_float_sdna(prop, NULL, "preview_back");
3005  RNA_def_property_array(prop, 4);
3006  RNA_def_property_ui_text(prop, "Scope Region Background", "");
3007  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3008 
3009  prop = RNA_def_property(srna, "preview_stitch_face", PROP_FLOAT, PROP_COLOR_GAMMA);
3010  RNA_def_property_float_sdna(prop, NULL, "preview_stitch_face");
3011  RNA_def_property_array(prop, 4);
3012  RNA_def_property_ui_text(prop, "Stitch Preview Face", "");
3013  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3014 
3015  prop = RNA_def_property(srna, "preview_stitch_edge", PROP_FLOAT, PROP_COLOR_GAMMA);
3016  RNA_def_property_float_sdna(prop, NULL, "preview_stitch_edge");
3017  RNA_def_property_array(prop, 4);
3018  RNA_def_property_ui_text(prop, "Stitch Preview Edge", "");
3019  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3020 
3021  prop = RNA_def_property(srna, "preview_stitch_vert", PROP_FLOAT, PROP_COLOR_GAMMA);
3022  RNA_def_property_float_sdna(prop, NULL, "preview_stitch_vert");
3023  RNA_def_property_array(prop, 4);
3024  RNA_def_property_ui_text(prop, "Stitch Preview Vertex", "");
3025  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3026 
3027  prop = RNA_def_property(srna, "preview_stitch_stitchable", PROP_FLOAT, PROP_COLOR_GAMMA);
3028  RNA_def_property_float_sdna(prop, NULL, "preview_stitch_stitchable");
3029  RNA_def_property_array(prop, 4);
3030  RNA_def_property_ui_text(prop, "Stitch Preview Stitchable", "");
3031  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3032 
3033  prop = RNA_def_property(srna, "preview_stitch_unstitchable", PROP_FLOAT, PROP_COLOR_GAMMA);
3034  RNA_def_property_float_sdna(prop, NULL, "preview_stitch_unstitchable");
3035  RNA_def_property_array(prop, 4);
3036  RNA_def_property_ui_text(prop, "Stitch Preview Unstitchable", "");
3037  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3038 
3039  prop = RNA_def_property(srna, "preview_stitch_active", PROP_FLOAT, PROP_COLOR_GAMMA);
3040  RNA_def_property_float_sdna(prop, NULL, "preview_stitch_active");
3041  RNA_def_property_array(prop, 4);
3042  RNA_def_property_ui_text(prop, "Stitch Preview Active Island", "");
3043  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3044 
3045  prop = RNA_def_property(srna, "uv_shadow", PROP_FLOAT, PROP_COLOR_GAMMA);
3046  RNA_def_property_float_sdna(prop, NULL, "uv_shadow");
3047  RNA_def_property_array(prop, 4);
3048  RNA_def_property_ui_text(prop, "Texture Paint/Modifier UVs", "");
3049  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3050 
3051  prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
3052  RNA_def_property_float_sdna(prop, NULL, "cframe");
3053  RNA_def_property_array(prop, 3);
3054  RNA_def_property_ui_text(prop, "Current Frame", "");
3055  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3056 
3057  prop = RNA_def_property(srna, "metadatabg", PROP_FLOAT, PROP_COLOR_GAMMA);
3058  RNA_def_property_float_sdna(prop, NULL, "metadatabg");
3059  RNA_def_property_array(prop, 3);
3060  RNA_def_property_ui_text(prop, "Metadata Background", "");
3061  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3062 
3063  prop = RNA_def_property(srna, "metadatatext", PROP_FLOAT, PROP_COLOR_GAMMA);
3064  RNA_def_property_float_sdna(prop, NULL, "metadatatext");
3065  RNA_def_property_array(prop, 3);
3066  RNA_def_property_ui_text(prop, "Metadata Text", "");
3067  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3068 
3069  rna_def_userdef_theme_spaces_curves(srna, false, false, false, true);
3070 
3072 }
3073 
3075 {
3076  StructRNA *srna;
3077  PropertyRNA *prop;
3078 
3079  /* space_seq */
3080 
3081  srna = RNA_def_struct(brna, "ThemeSequenceEditor", NULL);
3082  RNA_def_struct_sdna(srna, "ThemeSpace");
3084  RNA_def_struct_ui_text(srna, "Theme Sequence Editor", "Theme settings for the Sequence Editor");
3085 
3088 
3089  prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
3090  RNA_def_property_array(prop, 3);
3091  RNA_def_property_ui_text(prop, "Grid", "");
3092  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3093 
3094  prop = RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
3095  RNA_def_property_float_sdna(prop, NULL, "shade1");
3096  RNA_def_property_array(prop, 3);
3097  RNA_def_property_ui_text(prop, "Window Sliders", "");
3098  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3099 
3100  prop = RNA_def_property(srna, "movie_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
3101  RNA_def_property_float_sdna(prop, NULL, "movie");
3102  RNA_def_property_array(prop, 3);
3103  RNA_def_property_ui_text(prop, "Movie Strip", "");
3104  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3105 
3106  prop = RNA_def_property(srna, "movieclip_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
3107  RNA_def_property_float_sdna(prop, NULL, "movieclip");
3108  RNA_def_property_array(prop, 3);
3109  RNA_def_property_ui_text(prop, "Clip Strip", "");
3110  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3111 
3112  prop = RNA_def_property(srna, "image_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
3113  RNA_def_property_float_sdna(prop, NULL, "image");
3114  RNA_def_property_array(prop, 3);
3115  RNA_def_property_ui_text(prop, "Image Strip", "");
3116  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3117 
3118  prop = RNA_def_property(srna, "scene_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
3119  RNA_def_property_float_sdna(prop, NULL, "scene");
3120  RNA_def_property_array(prop, 3);
3121  RNA_def_property_ui_text(prop, "Scene Strip", "");
3122  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3123 
3124  prop = RNA_def_property(srna, "audio_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
3125  RNA_def_property_float_sdna(prop, NULL, "audio");
3126  RNA_def_property_array(prop, 3);
3127  RNA_def_property_ui_text(prop, "Audio Strip", "");
3128  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3129 
3130  prop = RNA_def_property(srna, "effect_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
3131  RNA_def_property_float_sdna(prop, NULL, "effect");
3132  RNA_def_property_array(prop, 3);
3133  RNA_def_property_ui_text(prop, "Effect Strip", "");
3134  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3135 
3136  prop = RNA_def_property(srna, "color_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
3137  RNA_def_property_array(prop, 3);
3138  RNA_def_property_ui_text(prop, "Color Strip", "");
3139  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3140 
3141  prop = RNA_def_property(srna, "meta_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
3142  RNA_def_property_float_sdna(prop, NULL, "meta");
3143  RNA_def_property_array(prop, 3);
3144  RNA_def_property_ui_text(prop, "Meta Strip", "");
3145  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3146 
3147  prop = RNA_def_property(srna, "mask_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
3148  RNA_def_property_float_sdna(prop, NULL, "mask");
3149  RNA_def_property_array(prop, 3);
3150  RNA_def_property_ui_text(prop, "Mask Strip", "");
3151  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3152 
3153  prop = RNA_def_property(srna, "text_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
3154  RNA_def_property_array(prop, 3);
3155  RNA_def_property_ui_text(prop, "Text Strip", "");
3156  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3157 
3158  prop = RNA_def_property(srna, "active_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
3159  RNA_def_property_array(prop, 3);
3160  RNA_def_property_ui_text(prop, "Active Strip", "");
3161  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3162 
3163  prop = RNA_def_property(srna, "selected_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
3164  RNA_def_property_array(prop, 3);
3165  RNA_def_property_ui_text(prop, "Selected Strips", "");
3166  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3167 
3168  prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
3169  RNA_def_property_float_sdna(prop, NULL, "cframe");
3170  RNA_def_property_array(prop, 3);
3171  RNA_def_property_ui_text(prop, "Current Frame", "");
3172  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3173 
3174  prop = RNA_def_property(srna, "time_scrub_background", PROP_FLOAT, PROP_COLOR_GAMMA);
3175  RNA_def_property_array(prop, 4);
3176  RNA_def_property_ui_text(prop, "Scrubbing/Markers Region", "");
3177  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3178 
3179  prop = RNA_def_property(srna, "time_marker_line", PROP_FLOAT, PROP_COLOR_GAMMA);
3180  RNA_def_property_array(prop, 4);
3181  RNA_def_property_ui_text(prop, "Marker Line", "");
3182  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3183 
3184  prop = RNA_def_property(srna, "time_marker_line_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3185  RNA_def_property_array(prop, 4);
3186  RNA_def_property_ui_text(prop, "Marker Line Selected", "");
3187  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3188 
3189  prop = RNA_def_property(srna, "keyframe", PROP_FLOAT, PROP_COLOR_GAMMA);
3190  RNA_def_property_float_sdna(prop, NULL, "vertex_select");
3191  RNA_def_property_array(prop, 3);
3192  RNA_def_property_ui_text(prop, "Keyframe", "");
3193  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3194 
3195  prop = RNA_def_property(srna, "draw_action", PROP_FLOAT, PROP_COLOR_GAMMA);
3196  RNA_def_property_float_sdna(prop, NULL, "bone_pose");
3197  RNA_def_property_array(prop, 3);
3198  RNA_def_property_ui_text(prop, "Draw Action", "");
3199  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3200 
3201  prop = RNA_def_property(srna, "preview_back", PROP_FLOAT, PROP_COLOR_GAMMA);
3202  RNA_def_property_float_sdna(prop, NULL, "preview_back");
3203  RNA_def_property_array(prop, 3);
3204  RNA_def_property_ui_text(prop, "Preview Background", "");
3205  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3206 
3207  prop = RNA_def_property(srna, "metadatabg", PROP_FLOAT, PROP_COLOR_GAMMA);
3208  RNA_def_property_float_sdna(prop, NULL, "metadatabg");
3209  RNA_def_property_array(prop, 3);
3210  RNA_def_property_ui_text(prop, "Metadata Background", "");
3211  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3212 
3213  prop = RNA_def_property(srna, "metadatatext", PROP_FLOAT, PROP_COLOR_GAMMA);
3214  RNA_def_property_float_sdna(prop, NULL, "metadatatext");
3215  RNA_def_property_array(prop, 3);
3216  RNA_def_property_ui_text(prop, "Metadata Text", "");
3217  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3218 
3219  prop = RNA_def_property(srna, "preview_range", PROP_FLOAT, PROP_COLOR_GAMMA);
3220  RNA_def_property_float_sdna(prop, NULL, "anim_preview_range");
3221  RNA_def_property_array(prop, 4);
3222  RNA_def_property_ui_text(prop, "Preview Range", "Color of preview range overlay");
3223  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3224 
3225  prop = RNA_def_property(srna, "row_alternate", PROP_FLOAT, PROP_COLOR_GAMMA);
3226  RNA_def_property_array(prop, 4);
3227  RNA_def_property_ui_text(prop, "Alternate Rows", "Overlay color on every other row");
3228  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3229 }
3230 
3232 {
3233  StructRNA *srna;
3234  PropertyRNA *prop;
3235 
3236  /* space_action */
3237 
3238  srna = RNA_def_struct(brna, "ThemeDopeSheet", NULL);
3239  RNA_def_struct_sdna(srna, "ThemeSpace");
3241  RNA_def_struct_ui_text(srna, "Theme Dope Sheet", "Theme settings for the Dope Sheet");
3242 
3245 
3246  prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
3247  RNA_def_property_array(prop, 3);
3248  RNA_def_property_ui_text(prop, "Grid", "");
3249  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3250 
3251  prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
3252  RNA_def_property_float_sdna(prop, NULL, "cframe");
3253  RNA_def_property_array(prop, 3);
3254  RNA_def_property_ui_text(prop, "Current Frame", "");
3255  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3256 
3257  prop = RNA_def_property(srna, "time_scrub_background", PROP_FLOAT, PROP_COLOR_GAMMA);
3258  RNA_def_property_array(prop, 4);
3259  RNA_def_property_ui_text(prop, "Scrubbing/Markers Region", "");
3260  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3261 
3262  prop = RNA_def_property(srna, "time_marker_line", PROP_FLOAT, PROP_COLOR_GAMMA);
3263  RNA_def_property_array(prop, 4);
3264  RNA_def_property_ui_text(prop, "Marker Line", "");
3265  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3266 
3267  prop = RNA_def_property(srna, "time_marker_line_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3268  RNA_def_property_array(prop, 4);
3269  RNA_def_property_ui_text(prop, "Marker Line Selected", "");
3270  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3271 
3272  prop = RNA_def_property(srna, "value_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
3273  RNA_def_property_float_sdna(prop, NULL, "face");
3274  RNA_def_property_array(prop, 3);
3275  RNA_def_property_ui_text(prop, "Value Sliders", "");
3276  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3277 
3278  prop = RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
3279  RNA_def_property_float_sdna(prop, NULL, "shade1");
3280  RNA_def_property_array(prop, 3);
3281  RNA_def_property_ui_text(prop, "View Sliders", "");
3282  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3283 
3284  prop = RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR_GAMMA);
3285  RNA_def_property_float_sdna(prop, NULL, "ds_channel");
3286  RNA_def_property_array(prop, 4);
3287  RNA_def_property_ui_text(prop, "Dope Sheet Channel", "");
3288  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3289 
3290  prop = RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR_GAMMA);
3291  RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
3292  RNA_def_property_array(prop, 4);
3293  RNA_def_property_ui_text(prop, "Dope Sheet Sub-channel", "");
3294  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3295 
3296  prop = RNA_def_property(srna, "channels", PROP_FLOAT, PROP_COLOR_GAMMA);
3297  RNA_def_property_float_sdna(prop, NULL, "shade2");
3298  RNA_def_property_array(prop, 4);
3299  RNA_def_property_ui_text(prop, "Channels", "");
3300  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3301 
3302  prop = RNA_def_property(srna, "channels_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3303  RNA_def_property_float_sdna(prop, NULL, "hilite");
3304  RNA_def_property_array(prop, 4);
3305  RNA_def_property_ui_text(prop, "Channels Selected", "");
3306  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3307 
3308  prop = RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR_GAMMA);
3309  RNA_def_property_float_sdna(prop, NULL, "group");
3310  RNA_def_property_array(prop, 4);
3311  RNA_def_property_ui_text(prop, "Channel Group", "");
3312  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3313 
3314  prop = RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR_GAMMA);
3315  RNA_def_property_float_sdna(prop, NULL, "group_active");
3316  RNA_def_property_array(prop, 4);
3317  RNA_def_property_ui_text(prop, "Active Channel Group", "");
3318  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3319 
3320  prop = RNA_def_property(srna, "long_key", PROP_FLOAT, PROP_COLOR_GAMMA);
3321  RNA_def_property_float_sdna(prop, NULL, "strip");
3322  RNA_def_property_array(prop, 4);
3323  RNA_def_property_ui_text(prop, "Long Key", "");
3324  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3325 
3326  prop = RNA_def_property(srna, "long_key_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3327  RNA_def_property_float_sdna(prop, NULL, "strip_select");
3328  RNA_def_property_array(prop, 4);
3329  RNA_def_property_ui_text(prop, "Long Key Selected", "");
3330  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3331 
3332  prop = RNA_def_property(srna, "keyframe", PROP_FLOAT, PROP_COLOR_GAMMA);
3333  RNA_def_property_float_sdna(prop, NULL, "keytype_keyframe");
3334  RNA_def_property_array(prop, 3);
3335  RNA_def_property_ui_text(prop, "Keyframe", "Color of Keyframe");
3336  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3337 
3338  prop = RNA_def_property(srna, "keyframe_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3339  RNA_def_property_float_sdna(prop, NULL, "keytype_keyframe_select");
3340  RNA_def_property_array(prop, 3);
3341  RNA_def_property_ui_text(prop, "Keyframe Selected", "Color of selected keyframe");
3342  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3343 
3344  prop = RNA_def_property(srna, "keyframe_extreme", PROP_FLOAT, PROP_COLOR_GAMMA);
3345  RNA_def_property_float_sdna(prop, NULL, "keytype_extreme");
3346  RNA_def_property_array(prop, 3);
3347  RNA_def_property_ui_text(prop, "Extreme Keyframe", "Color of extreme keyframe");
3348  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3349 
3350  prop = RNA_def_property(srna, "keyframe_extreme_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3351  RNA_def_property_float_sdna(prop, NULL, "keytype_extreme_select");
3352  RNA_def_property_array(prop, 3);
3354  prop, "Extreme Keyframe Selected", "Color of selected extreme keyframe");
3355  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3356 
3357  prop = RNA_def_property(srna, "keyframe_breakdown", PROP_FLOAT, PROP_COLOR_GAMMA);
3358  RNA_def_property_float_sdna(prop, NULL, "keytype_breakdown");
3359  RNA_def_property_array(prop, 3);
3360  RNA_def_property_ui_text(prop, "Breakdown Keyframe", "Color of breakdown keyframe");
3361  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3362 
3363  prop = RNA_def_property(srna, "keyframe_breakdown_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3364  RNA_def_property_float_sdna(prop, NULL, "keytype_breakdown_select");
3365  RNA_def_property_array(prop, 3);
3367  prop, "Breakdown Keyframe Selected", "Color of selected breakdown keyframe");
3368  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3369 
3370  prop = RNA_def_property(srna, "keyframe_jitter", PROP_FLOAT, PROP_COLOR_GAMMA);
3371  RNA_def_property_float_sdna(prop, NULL, "keytype_jitter");
3372  RNA_def_property_array(prop, 3);
3373  RNA_def_property_ui_text(prop, "Jitter Keyframe", "Color of jitter keyframe");
3374  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3375 
3376  prop = RNA_def_property(srna, "keyframe_jitter_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3377  RNA_def_property_float_sdna(prop, NULL, "keytype_jitter_select");
3378  RNA_def_property_array(prop, 3);
3379  RNA_def_property_ui_text(prop, "Jitter Keyframe Selected", "Color of selected jitter keyframe");
3380  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3381 
3382  prop = RNA_def_property(srna, "keyframe_movehold", PROP_FLOAT, PROP_COLOR_GAMMA);
3383  RNA_def_property_float_sdna(prop, NULL, "keytype_movehold");
3384  RNA_def_property_array(prop, 3);
3385  RNA_def_property_ui_text(prop, "Moving Hold Keyframe", "Color of moving hold keyframe");
3386  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3387 
3388  prop = RNA_def_property(srna, "keyframe_movehold_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3389  RNA_def_property_float_sdna(prop, NULL, "keytype_movehold_select");
3390  RNA_def_property_array(prop, 3);
3392  prop, "Moving Hold Keyframe Selected", "Color of selected moving hold keyframe");
3393  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3394 
3395  prop = RNA_def_property(srna, "keyframe_border", PROP_FLOAT, PROP_COLOR_GAMMA);
3396  RNA_def_property_float_sdna(prop, NULL, "keyborder");
3397  RNA_def_property_array(prop, 4);
3398  RNA_def_property_ui_text(prop, "Keyframe Border", "Color of keyframe border");
3399  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3400 
3401  prop = RNA_def_property(srna, "keyframe_border_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3402  RNA_def_property_float_sdna(prop, NULL, "keyborder_select");
3403  RNA_def_property_array(prop, 4);
3404  RNA_def_property_ui_text(prop, "Keyframe Border Selected", "Color of selected keyframe border");
3405  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3406 
3407  prop = RNA_def_property(srna, "keyframe_scale_factor", PROP_FLOAT, PROP_NONE);
3408  RNA_def_property_float_sdna(prop, NULL, "keyframe_scale_fac");
3409  RNA_def_property_float_default(prop, 1.0f);
3411  prop, "Keyframe Scale Factor", "Scale factor for adjusting the height of keyframes");
3412  /* NOTE: These limits prevent buttons overlapping (min), and excessive size... (max). */
3413  RNA_def_property_range(prop, 0.8f, 5.0f);
3414  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_DOPESHEET, "rna_userdef_theme_update");
3415 
3416  prop = RNA_def_property(srna, "summary", PROP_FLOAT, PROP_COLOR_GAMMA);
3417  RNA_def_property_float_sdna(prop, NULL, "anim_active");
3418  RNA_def_property_array(prop, 4);
3419  RNA_def_property_ui_text(prop, "Summary", "Color of summary channel");
3420  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3421 
3422  prop = RNA_def_property(srna, "preview_range", PROP_FLOAT, PROP_COLOR_GAMMA);
3423  RNA_def_property_float_sdna(prop, NULL, "anim_preview_range");
3424  RNA_def_property_array(prop, 4);
3425  RNA_def_property_ui_text(prop, "Preview Range", "Color of preview range overlay");
3426  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3427 
3428  prop = RNA_def_property(srna, "interpolation_line", PROP_FLOAT, PROP_COLOR_GAMMA);
3429  RNA_def_property_float_sdna(prop, NULL, "ds_ipoline");
3430  RNA_def_property_array(prop, 4);
3432  prop, "Interpolation Line", "Color of lines showing non-bezier interpolation modes");
3433  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3434 }
3435 
3437 {
3438  StructRNA *srna;
3439  PropertyRNA *prop;
3440 
3441  /* space_nla */
3442  srna = RNA_def_struct(brna, "ThemeNLAEditor", NULL);
3443  RNA_def_struct_sdna(srna, "ThemeSpace");
3445  RNA_def_struct_ui_text(srna, "Theme Nonlinear Animation", "Theme settings for the NLA Editor");
3446 
3449 
3450  prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
3451  RNA_def_property_array(prop, 3);
3452  RNA_def_property_ui_text(prop, "Grid", "");
3453  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3454 
3455  prop = RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
3456  RNA_def_property_float_sdna(prop, NULL, "shade1");
3457  RNA_def_property_array(prop, 3);
3458  RNA_def_property_ui_text(prop, "View Sliders", "");
3459  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3460 
3461  prop = RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR_GAMMA);
3462  RNA_def_property_float_sdna(prop, NULL, "ds_channel");
3463  RNA_def_property_array(prop, 3);
3464  RNA_def_property_ui_text(prop, "Channel", "Nonlinear Animation Channel");
3465  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3466 
3467  prop = RNA_def_property(srna, "nla_track", PROP_FLOAT, PROP_COLOR_GAMMA);
3468  RNA_def_property_float_sdna(prop, NULL, "nla_track");
3469  RNA_def_property_array(prop, 3);
3470  RNA_def_property_ui_text(prop, "Track", "Nonlinear Animation Track");
3471  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3472 
3473  prop = RNA_def_property(srna, "active_action", PROP_FLOAT, PROP_COLOR_GAMMA);
3474  RNA_def_property_float_sdna(prop, NULL, "anim_active");
3475  RNA_def_property_array(prop, 4);
3476  RNA_def_property_ui_text(prop, "Active Action", "Animation data-block has active action");
3477  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3478 
3479  prop = RNA_def_property(srna, "active_action_unset", PROP_FLOAT, PROP_COLOR_GAMMA);
3480  RNA_def_property_float_sdna(prop, NULL, "anim_non_active");
3481  RNA_def_property_array(prop, 4);
3483  prop, "No Active Action", "Animation data-block doesn't have active action");
3484  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3485 
3486  prop = RNA_def_property(srna, "preview_range", PROP_FLOAT, PROP_COLOR_GAMMA);
3487  RNA_def_property_float_sdna(prop, NULL, "anim_preview_range");
3488  RNA_def_property_array(prop, 4);
3489  RNA_def_property_ui_text(prop, "Preview Range", "Color of preview range overlay");
3490  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3491 
3492  prop = RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR_GAMMA);
3493  RNA_def_property_float_sdna(prop, NULL, "strip");
3494  RNA_def_property_array(prop, 3);
3495  RNA_def_property_ui_text(prop, "Strips", "Unselected Action-Clip Strip");
3496  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3497 
3498  prop = RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3499  RNA_def_property_float_sdna(prop, NULL, "strip_select");
3500  RNA_def_property_array(prop, 3);
3501  RNA_def_property_ui_text(prop, "Strips Selected", "Selected Action-Clip Strip");
3502  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3503 
3504  prop = RNA_def_property(srna, "transition_strips", PROP_FLOAT, PROP_COLOR_GAMMA);
3505  RNA_def_property_float_sdna(prop, NULL, "nla_transition");
3506  RNA_def_property_array(prop, 3);
3507  RNA_def_property_ui_text(prop, "Transitions", "Unselected Transition Strip");
3508  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3509 
3510  prop = RNA_def_property(srna, "transition_strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3511  RNA_def_property_float_sdna(prop, NULL, "nla_transition_sel");
3512  RNA_def_property_array(prop, 3);
3513  RNA_def_property_ui_text(prop, "Transitions Selected", "Selected Transition Strip");
3514  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3515 
3516  prop = RNA_def_property(srna, "meta_strips", PROP_FLOAT, PROP_COLOR_GAMMA);
3517  RNA_def_property_float_sdna(prop, NULL, "nla_meta");
3518  RNA_def_property_array(prop, 3);
3520  prop, "Meta Strips", "Unselected Meta Strip (for grouping related strips)");
3521  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3522 
3523  prop = RNA_def_property(srna, "meta_strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3524  RNA_def_property_float_sdna(prop, NULL, "nla_meta_sel");
3525  RNA_def_property_array(prop, 3);
3527  prop, "Meta Strips Selected", "Selected Meta Strip (for grouping related strips)");
3528  RNA_def_property_update(prop, 0, "rna_userdef_update");
3529 
3530  prop = RNA_def_property(srna, "sound_strips", PROP_FLOAT, PROP_COLOR_GAMMA);
3531  RNA_def_property_float_sdna(prop, NULL, "nla_sound");
3532  RNA_def_property_array(prop, 3);
3534  prop, "Sound Strips", "Unselected Sound Strip (for timing speaker sounds)");
3535  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3536 
3537  prop = RNA_def_property(srna, "sound_strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3538  RNA_def_property_float_sdna(prop, NULL, "nla_sound_sel");
3539  RNA_def_property_array(prop, 3);
3541  prop, "Sound Strips Selected", "Selected Sound Strip (for timing speaker sounds)");
3542  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3543 
3544  prop = RNA_def_property(srna, "tweak", PROP_FLOAT, PROP_COLOR_GAMMA);
3545  RNA_def_property_float_sdna(prop, NULL, "nla_tweaking");
3546  RNA_def_property_array(prop, 3);
3547  RNA_def_property_ui_text(prop, "Tweak", "Color for strip/action being \"tweaked\" or edited");
3548  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3549 
3550  prop = RNA_def_property(srna, "tweak_duplicate", PROP_FLOAT, PROP_COLOR_GAMMA);
3551  RNA_def_property_float_sdna(prop, NULL, "nla_tweakdupli");
3552  RNA_def_property_array(prop, 3);
3554  prop,
3555  "Tweak Duplicate Flag",
3556  "Warning/error indicator color for strips referencing the strip being tweaked");
3557  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3558 
3559  prop = RNA_def_property(srna, "keyframe_border", PROP_FLOAT, PROP_COLOR_GAMMA);
3560  RNA_def_property_float_sdna(prop, NULL, "keyborder");
3561  RNA_def_property_array(prop, 4);
3562  RNA_def_property_ui_text(prop, "Keyframe Border", "Color of keyframe border");
3563  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3564 
3565  prop = RNA_def_property(srna, "keyframe_border_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3566  RNA_def_property_float_sdna(prop, NULL, "keyborder_select");
3567  RNA_def_property_array(prop, 4);
3568  RNA_def_property_ui_text(prop, "Keyframe Border Selected", "Color of selected keyframe border");
3569  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3570 
3571  prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
3572  RNA_def_property_float_sdna(prop, NULL, "cframe");
3573  RNA_def_property_array(prop, 3);
3574  RNA_def_property_ui_text(prop, "Current Frame", "");
3575  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3576 
3577  prop = RNA_def_property(srna, "time_scrub_background", PROP_FLOAT, PROP_COLOR_GAMMA);
3578  RNA_def_property_array(prop, 4);
3579  RNA_def_property_ui_text(prop, "Scrubbing/Markers Region", "");
3580  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3581 
3582  prop = RNA_def_property(srna, "time_marker_line", PROP_FLOAT, PROP_COLOR_GAMMA);
3583  RNA_def_property_array(prop, 4);
3584  RNA_def_property_ui_text(prop, "Marker Line", "");
3585  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3586 
3587  prop = RNA_def_property(srna, "time_marker_line_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3588  RNA_def_property_array(prop, 4);
3589  RNA_def_property_ui_text(prop, "Marker Line Selected", "");
3590  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3591 }
3592 
3594 {
3595  StructRNA *srna;
3596  PropertyRNA *prop;
3597 
3598  srna = RNA_def_struct(brna, "ThemeBoneColorSet", NULL);
3599  RNA_def_struct_sdna(srna, "ThemeWireColor");
3601  RNA_def_struct_ui_text(srna, "Theme Bone Color Set", "Theme settings for bone color sets");
3602 
3603  prop = RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR_GAMMA);
3604  RNA_def_property_float_sdna(prop, NULL, "solid");
3605  RNA_def_property_array(prop, 3);
3606  RNA_def_property_ui_text(prop, "Regular", "Color used for the surface of bones");
3607  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3608 
3609  prop = RNA_def_property(srna, "select", PROP_FLOAT, PROP_COLOR_GAMMA);
3610  RNA_def_property_float_sdna(prop, NULL, "select");
3611  RNA_def_property_array(prop, 3);
3612  RNA_def_property_ui_text(prop, "Select", "Color used for selected bones");
3613  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3614 
3615  prop = RNA_def_property(srna, "active", PROP_FLOAT, PROP_COLOR_GAMMA);
3616  RNA_def_property_array(prop, 3);
3617  RNA_def_property_ui_text(prop, "Active", "Color used for active bones");
3618  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3619 
3620  prop = RNA_def_property(srna, "show_colored_constraints", PROP_BOOLEAN, PROP_NONE);
3623  prop, "Colored Constraints", "Allow the use of colors indicating constraints/keyed status");
3624  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3625 }
3626 
3628 {
3629  StructRNA *srna;
3630  PropertyRNA *prop;
3631 
3632  srna = RNA_def_struct(brna, "ThemeCollectionColor", NULL);
3633  RNA_def_struct_sdna(srna, "ThemeCollectionColor");
3635  RNA_def_struct_ui_text(srna, "Theme Collection Color", "Theme settings for collection colors");
3636 
3637  prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
3638  RNA_def_property_float_sdna(prop, NULL, "color");
3639  RNA_def_property_array(prop, 3);
3640  RNA_def_property_ui_text(prop, "Color", "Collection Color Tag");
3641  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3642 }
3643 
3645 {
3646  StructRNA *srna;
3647  PropertyRNA *prop;
3648 
3649  srna = RNA_def_struct(brna, "ThemeStripColor", NULL);
3650  RNA_def_struct_sdna(srna, "ThemeStripColor");
3652  RNA_def_struct_ui_text(srna, "Theme Strip Color", "Theme settings for strip colors");
3653 
3654  prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
3655  RNA_def_property_float_sdna(prop, NULL, "color");
3656  RNA_def_property_array(prop, 3);
3657  RNA_def_property_ui_text(prop, "Color", "Strip Color");
3658  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3659 }
3660 
3662 {
3663  StructRNA *srna;
3664  PropertyRNA *prop;
3665 
3666  /* space_clip */
3667 
3668  srna = RNA_def_struct(brna, "ThemeClipEditor", NULL);
3669  RNA_def_struct_sdna(srna, "ThemeSpace");
3671  RNA_def_struct_ui_text(srna, "Theme Clip Editor", "Theme settings for the Movie Clip Editor");
3672 
3675 
3676  prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
3677  RNA_def_property_array(prop, 4);
3678  RNA_def_property_ui_text(prop, "Grid", "");
3679  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3680 
3681  prop = RNA_def_property(srna, "marker_outline", PROP_FLOAT, PROP_COLOR_GAMMA);
3682  RNA_def_property_float_sdna(prop, NULL, "marker_outline");
3683  RNA_def_property_array(prop, 3);
3684  RNA_def_property_ui_text(prop, "Marker Outline", "Color of marker's outline");
3685  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3686 
3687  prop = RNA_def_property(srna, "marker", PROP_FLOAT, PROP_COLOR_GAMMA);
3688  RNA_def_property_float_sdna(prop, NULL, "marker");
3689  RNA_def_property_array(prop, 3);
3690  RNA_def_property_ui_text(prop, "Marker", "Color of marker");
3691  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3692 
3693  prop = RNA_def_property(srna, "active_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
3694  RNA_def_property_float_sdna(prop, NULL, "act_marker");
3695  RNA_def_property_array(prop, 3);
3696  RNA_def_property_ui_text(prop, "Active Marker", "Color of active marker");
3697  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3698 
3699  prop = RNA_def_property(srna, "selected_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
3700  RNA_def_property_float_sdna(prop, NULL, "sel_marker");
3701  RNA_def_property_array(prop, 3);
3702  RNA_def_property_ui_text(prop, "Selected Marker", "Color of selected marker");
3703  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3704 
3705  prop = RNA_def_property(srna, "disabled_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
3706  RNA_def_property_float_sdna(prop, NULL, "dis_marker");
3707  RNA_def_property_array(prop, 3);
3708  RNA_def_property_ui_text(prop, "Disabled Marker", "Color of disabled marker");
3709  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3710 
3711  prop = RNA_def_property(srna, "locked_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
3712  RNA_def_property_float_sdna(prop, NULL, "lock_marker");
3713  RNA_def_property_array(prop, 3);
3714  RNA_def_property_ui_text(prop, "Locked Marker", "Color of locked marker");
3715  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3716 
3717  prop = RNA_def_property(srna, "path_before", PROP_FLOAT, PROP_COLOR_GAMMA);
3718  RNA_def_property_float_sdna(prop, NULL, "path_before");
3719  RNA_def_property_array(prop, 3);
3720  RNA_def_property_ui_text(prop, "Path Before", "Color of path before current frame");
3721  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3722 
3723  prop = RNA_def_property(srna, "path_after", PROP_FLOAT, PROP_COLOR_GAMMA);
3724  RNA_def_property_float_sdna(prop, NULL, "path_after");
3725  RNA_def_property_array(prop, 3);
3726  RNA_def_property_ui_text(prop, "Path After", "Color of path after current frame");
3727  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3728 
3729  prop = RNA_def_property(srna, "path_keyframe_before", PROP_FLOAT, PROP_COLOR_GAMMA);
3730  RNA_def_property_array(prop, 3);
3731  RNA_def_property_ui_text(prop, "Path Before", "Color of path before current frame");
3732  RNA_def_property_update(prop, 0, "rna_userdef_update");
3733 
3734  prop = RNA_def_property(srna, "path_keyframe_after", PROP_FLOAT, PROP_COLOR_GAMMA);
3735  RNA_def_property_array(prop, 3);
3736  RNA_def_property_ui_text(prop, "Path After", "Color of path after current frame");
3737  RNA_def_property_update(prop, 0, "rna_userdef_update");
3738 
3739  prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
3740  RNA_def_property_float_sdna(prop, NULL, "cframe");
3741  RNA_def_property_array(prop, 3);
3742  RNA_def_property_ui_text(prop, "Current Frame", "");
3743  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3744 
3745  prop = RNA_def_property(srna, "time_scrub_background", PROP_FLOAT, PROP_COLOR_GAMMA);
3746  RNA_def_property_array(prop, 4);
3747  RNA_def_property_ui_text(prop, "Scrubbing/Markers Region", "");
3748  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3749 
3750  prop = RNA_def_property(srna, "time_marker_line", PROP_FLOAT, PROP_COLOR_GAMMA);
3751  RNA_def_property_array(prop, 4);
3752  RNA_def_property_ui_text(prop, "Marker Line", "");
3753  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3754 
3755  prop = RNA_def_property(srna, "time_marker_line_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3756  RNA_def_property_array(prop, 4);
3757  RNA_def_property_ui_text(prop, "Marker Line Selected", "");
3758  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3759 
3760  prop = RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR_GAMMA);
3761  RNA_def_property_float_sdna(prop, NULL, "strip");
3762  RNA_def_property_array(prop, 3);
3763  RNA_def_property_ui_text(prop, "Strips", "");
3764  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3765 
3766  prop = RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
3767  RNA_def_property_float_sdna(prop, NULL, "strip_select");
3768  RNA_def_property_array(prop, 3);
3769  RNA_def_property_ui_text(prop, "Strips Selected", "");
3770  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3771 
3772  prop = RNA_def_property(srna, "metadatabg", PROP_FLOAT, PROP_COLOR_GAMMA);
3773  RNA_def_property_float_sdna(prop, NULL, "metadatabg");
3774  RNA_def_property_array(prop, 3);
3775  RNA_def_property_ui_text(prop, "Metadata Background", "");
3776  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3777 
3778  prop = RNA_def_property(srna, "metadatatext", PROP_FLOAT, PROP_COLOR_GAMMA);
3779  RNA_def_property_float_sdna(prop, NULL, "metadatatext");
3780  RNA_def_property_array(prop, 3);
3781  RNA_def_property_ui_text(prop, "Metadata Text", "");
3782  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3783 
3784  rna_def_userdef_theme_spaces_curves(srna, false, false, false, true);
3785 }
3786 
3788 {
3789  StructRNA *srna;
3790 
3791  /* space_topbar */
3792 
3793  srna = RNA_def_struct(brna, "ThemeTopBar", NULL);
3794  RNA_def_struct_sdna(srna, "ThemeSpace");
3796  RNA_def_struct_ui_text(srna, "Theme Top Bar", "Theme settings for the Top Bar");
3797 
3799 }
3800 
3802 {
3803  StructRNA *srna;
3804 
3805  /* space_statusbar */
3806 
3807  srna = RNA_def_struct(brna, "ThemeStatusBar", NULL);
3808  RNA_def_struct_sdna(srna, "ThemeSpace");
3810  RNA_def_struct_ui_text(srna, "Theme Status Bar", "Theme settings for the Status Bar");
3811 
3813 }
3814 
3816 {
3817  StructRNA *srna;
3818  PropertyRNA *prop;
3819 
3820  /* space_spreadsheet */
3821 
3822  srna = RNA_def_struct(brna, "ThemeSpreadsheet", NULL);
3823  RNA_def_struct_sdna(srna, "ThemeSpace");
3825  RNA_def_struct_ui_text(srna, "Theme Spreadsheet", "Theme settings for the Spreadsheet");
3826 
3827  prop = RNA_def_property(srna, "row_alternate", PROP_FLOAT, PROP_COLOR_GAMMA);
3828  RNA_def_property_array(prop, 4);
3829  RNA_def_property_ui_text(prop, "Alternate Rows", "Overlay color on every other row");
3830  RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
3831 
3834 }
3835 
3837 {
3838  StructRNA *srna;
3839  PropertyRNA *prop;
3840 
3841  static const EnumPropertyItem active_theme_area[] = {
3842  {0, "USER_INTERFACE", ICON_WORKSPACE, "User Interface", ""},
3843  {19, "STYLE", ICON_FONTPREVIEW, "Text Style", ""},
3844  {18, "BONE_COLOR_SETS", ICON_COLOR, "Bone Color Sets", ""},
3845  {1, "VIEW_3D", ICON_VIEW3D, "3D Viewport", ""},
3846  {3, "GRAPH_EDITOR", ICON_GRAPH, "Graph Editor", ""},
3847  {4, "DOPESHEET_EDITOR", ICON_ACTION, "Dope Sheet", ""},
3848  {5, "NLA_EDITOR", ICON_NLA, "Nonlinear Animation", ""},
3849  {6, "IMAGE_EDITOR", ICON_IMAGE, "UV/Image Editor", ""},
3850  {7, "SEQUENCE_EDITOR", ICON_SEQUENCE, "Video Sequencer", ""},
3851  {8, "TEXT_EDITOR", ICON_TEXT, "Text Editor", ""},
3852  {9, "NODE_EDITOR", ICON_NODETREE, "Node Editor", ""},
3853  {11, "PROPERTIES", ICON_PROPERTIES, "Properties", ""},
3854  {12, "OUTLINER", ICON_OUTLINER, "Outliner", ""},
3855  {14, "PREFERENCES", ICON_PREFERENCES, "Preferences", ""},
3856  {15, "INFO", ICON_INFO, "Info", ""},
3857  {16, "FILE_BROWSER", ICON_FILEBROWSER, "File Browser", ""},
3858  {17, "CONSOLE", ICON_CONSOLE, "Python Console", ""},
3859  {20, "CLIP_EDITOR", ICON_TRACKER, "Movie Clip Editor", ""},
3860  {21, "TOPBAR", ICON_TOPBAR, "Top Bar", ""},
3861  {22, "STATUSBAR", ICON_STATUSBAR, "Status Bar", ""},
3862  {23, "SPREADSHEET", ICON_SPREADSHEET, "Spreadsheet"},
3863  {0, NULL, 0, NULL, NULL},
3864  };
3865 
3866  srna = RNA_def_struct(brna, "Theme", NULL);
3867  RNA_def_struct_sdna(srna, "bTheme");
3869  RNA_def_struct_ui_text(srna, "Theme", "User interface styling and color settings");
3870 
3871  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
3872  RNA_def_property_ui_text(prop, "Name", "Name of the theme");
3873  RNA_def_struct_name_property(srna, prop);
3874  /* XXX: for now putting this in presets is silly - its just Default */
3876 
3877  prop = RNA_def_property(srna, "theme_area", PROP_ENUM, PROP_NONE);
3878  RNA_def_property_enum_sdna(prop, NULL, "active_theme_area");
3880  RNA_def_property_enum_items(prop, active_theme_area);
3881  RNA_def_property_ui_text(prop, "Active Theme Area", "");
3882 
3883  prop = RNA_def_property(srna, "user_interface", PROP_POINTER, PROP_NONE);
3885  RNA_def_property_pointer_sdna(prop, NULL, "tui");
3886  RNA_def_property_struct_type(prop, "ThemeUserInterface");
3887  RNA_def_property_ui_text(prop, "User Interface", "");
3888 
3889  /* Space Types */
3890  prop = RNA_def_property(srna, "view_3d", PROP_POINTER, PROP_NONE);
3892  RNA_def_property_pointer_sdna(prop, NULL, "space_view3d");
3893  RNA_def_property_struct_type(prop, "ThemeView3D");
3894  RNA_def_property_ui_text(prop, "3D Viewport", "");
3895 
3896  prop = RNA_def_property(srna, "graph_editor", PROP_POINTER, PROP_NONE);
3898  RNA_def_property_pointer_sdna(prop, NULL, "space_graph");
3899  RNA_def_property_struct_type(prop, "ThemeGraphEditor");
3900  RNA_def_property_ui_text(prop, "Graph Editor", "");
3901 
3902  prop = RNA_def_property(srna, "file_browser", PROP_POINTER, PROP_NONE);
3904  RNA_def_property_pointer_sdna(prop, NULL, "space_file");
3905  RNA_def_property_struct_type(prop, "ThemeFileBrowser");
3906  RNA_def_property_ui_text(prop, "File Browser", "");
3907 
3908  prop = RNA_def_property(srna, "nla_editor", PROP_POINTER, PROP_NONE);
3910  RNA_def_property_pointer_sdna(prop, NULL, "space_nla");
3911  RNA_def_property_struct_type(prop, "ThemeNLAEditor");
3912  RNA_def_property_ui_text(prop, "Nonlinear Animation", "");
3913 
3914  prop = RNA_def_property(srna, "dopesheet_editor", PROP_POINTER, PROP_NONE);
3916  RNA_def_property_pointer_sdna(prop, NULL, "space_action");
3917  RNA_def_property_struct_type(prop, "ThemeDopeSheet");
3918  RNA_def_property_ui_text(prop, "Dope Sheet", "");
3919 
3920  prop = RNA_def_property(srna, "image_editor", PROP_POINTER, PROP_NONE);
3922  RNA_def_property_pointer_sdna(prop, NULL, "space_image");
3923  RNA_def_property_struct_type(prop, "ThemeImageEditor");
3924  RNA_def_property_ui_text(prop, "Image Editor", "");
3925 
3926  prop = RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
3928  RNA_def_property_pointer_sdna(prop, NULL, "space_sequencer");
3929  RNA_def_property_struct_type(prop, "ThemeSequenceEditor");
3930  RNA_def_property_ui_text(prop, "Sequence Editor", "");
3931 
3932  prop = RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
3934  RNA_def_property_pointer_sdna(prop, NULL, "space_properties");
3935  RNA_def_property_struct_type(prop, "ThemeProperties");
3936  RNA_def_property_ui_text(prop, "Properties", "");
3937 
3938  prop = RNA_def_property(srna, "text_editor", PROP_POINTER, PROP_NONE);
3940  RNA_def_property_pointer_sdna(prop, NULL, "space_text");
3941  RNA_def_property_struct_type(prop, "ThemeTextEditor");
3942  RNA_def_property_ui_text(prop, "Text Editor", "");
3943 
3944  prop = RNA_def_property(srna, "node_editor", PROP_POINTER, PROP_NONE);
3946  RNA_def_property_pointer_sdna(prop, NULL, "space_node");
3947  RNA_def_property_struct_type(prop, "ThemeNodeEditor");
3948  RNA_def_property_ui_text(prop, "Node Editor", "");
3949 
3950  prop = RNA_def_property(srna, "outliner", PROP_POINTER, PROP_NONE);
3952  RNA_def_property_pointer_sdna(prop, NULL, "space_outliner");
3953  RNA_def_property_struct_type(prop, "ThemeOutliner");
3954  RNA_def_property_ui_text(prop, "Outliner", "");
3955 
3956  prop = RNA_def_property(srna, "info", PROP_POINTER, PROP_NONE);
3958  RNA_def_property_pointer_sdna(prop, NULL, "space_info");
3959  RNA_def_property_struct_type(prop, "ThemeInfo");
3960  RNA_def_property_ui_text(prop, "Info", "");
3961 
3962  prop = RNA_def_property(srna, "preferences", PROP_POINTER, PROP_NONE);
3964  RNA_def_property_pointer_sdna(prop, NULL, "space_preferences");
3965  RNA_def_property_struct_type(prop, "ThemePreferences");
3966  RNA_def_property_ui_text(prop, "Preferences", "");
3967 
3968  prop = RNA_def_property(srna, "console", PROP_POINTER, PROP_NONE);
3970  RNA_def_property_pointer_sdna(prop, NULL, "space_console");
3971  RNA_def_property_struct_type(prop, "ThemeConsole");
3972  RNA_def_property_ui_text(prop, "Console", "");
3973 
3974  prop = RNA_def_property(srna, "clip_editor", PROP_POINTER, PROP_NONE);
3976  RNA_def_property_pointer_sdna(prop, NULL, "space_clip");
3977  RNA_def_property_struct_type(prop, "ThemeClipEditor");
3978  RNA_def_property_ui_text(prop, "Clip Editor", "");
3979 
3980  prop = RNA_def_property(srna, "topbar", PROP_POINTER, PROP_NONE);
3982  RNA_def_property_pointer_sdna(prop, NULL, "space_topbar");
3983  RNA_def_property_struct_type(prop, "ThemeTopBar");
3984  RNA_def_property_ui_text(prop, "Top Bar", "");
3985 
3986  prop = RNA_def_property(srna, "statusbar", PROP_POINTER, PROP_NONE);
3988  RNA_def_property_pointer_sdna(prop, NULL, "space_statusbar");
3989  RNA_def_property_struct_type(prop, "ThemeStatusBar");
3990  RNA_def_property_ui_text(prop, "Status Bar", "");
3991 
3992  prop = RNA_def_property(srna, "spreadsheet", PROP_POINTER, PROP_NONE);
3994  RNA_def_property_pointer_sdna(prop, NULL, "space_spreadsheet");
3995  RNA_def_property_struct_type(prop, "ThemeSpreadsheet");
3996  RNA_def_property_ui_text(prop, "Spreadsheet", "");
3997  /* end space types */
3998 
3999  prop = RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_NONE);
4001  RNA_def_property_collection_sdna(prop, NULL, "tarm", "");
4002  RNA_def_property_struct_type(prop, "ThemeBoneColorSet");
4003  RNA_def_property_ui_text(prop, "Bone Color Sets", "");
4004 
4005  prop = RNA_def_property(srna, "collection_color", PROP_COLLECTION, PROP_NONE);
4007  RNA_def_property_collection_sdna(prop, NULL, "collection_color", "");
4008  RNA_def_property_struct_type(prop, "ThemeCollectionColor");
4009  RNA_def_property_ui_text(prop, "Collection Color", "");
4010 
4011  prop = RNA_def_property(srna, "strip_color", PROP_COLLECTION, PROP_NONE);
4013  RNA_def_property_collection_sdna(prop, NULL, "strip_color", "");
4014  RNA_def_property_struct_type(prop, "ThemeStripColor");
4015  RNA_def_property_ui_text(prop, "Strip Color", "");
4016 }
4017 
4019 {
4020  StructRNA *srna;
4021  PropertyRNA *prop;
4022 
4023  srna = RNA_def_struct(brna, "Addon", NULL);
4024  RNA_def_struct_sdna(srna, "bAddon");
4026  RNA_def_struct_ui_text(srna, "Add-on", "Python add-ons to be loaded automatically");
4027 
4028  prop = RNA_def_property(srna, "module", PROP_STRING, PROP_NONE);
4029  RNA_def_property_ui_text(prop, "Module", "Module name");
4030  RNA_def_struct_name_property(srna, prop);
4031 
4032  /* Collection active property */
4033  prop = RNA_def_property(srna, "preferences", PROP_POINTER, PROP_NONE);
4034  RNA_def_property_struct_type(prop, "AddonPreferences");
4035  RNA_def_property_pointer_funcs(prop, "rna_Addon_preferences_get", NULL, NULL, NULL);
4036 }
4037 
4039 {
4040  StructRNA *srna;
4041  FunctionRNA *func;
4042  PropertyRNA *parm;
4043 
4044  srna = RNA_def_struct(brna, "StudioLights", NULL);
4045  RNA_def_struct_sdna(srna, "UserDef");
4046  RNA_def_struct_ui_text(srna, "Studio Lights", "Collection of studio lights");
4047 
4048  func = RNA_def_function(srna, "load", "rna_StudioLights_load");
4049  RNA_def_function_ui_description(func, "Load studiolight from file");
4050  parm = RNA_def_string(
4051  func, "path", NULL, 0, "File Path", "File path where the studio light file can be found");
4053  parm = RNA_def_enum(func,
4054  "type",
4057  "Type",
4058  "The type for the new studio light");
4060  parm = RNA_def_pointer(func, "studio_light", "StudioLight", "", "Newly created StudioLight");
4061  RNA_def_function_return(func, parm);
4062 
4063  func = RNA_def_function(srna, "new", "rna_StudioLights_new");
4064  RNA_def_function_ui_description(func, "Create studiolight from default lighting");
4065  parm = RNA_def_string(
4066  func,
4067  "path",
4068  NULL,
4069  0,
4070  "Path",
4071  "Path to the file that will contain the lighting info (without extension)");
4073  parm = RNA_def_pointer(func, "studio_light", "StudioLight", "", "Newly created StudioLight");
4074  RNA_def_function_return(func, parm);
4075 
4076  func = RNA_def_function(srna, "remove", "rna_StudioLights_remove");
4077  RNA_def_function_ui_description(func, "Remove a studio light");
4078  parm = RNA_def_pointer(func, "studio_light", "StudioLight", "", "The studio light to remove");
4080 
4081  func = RNA_def_function(srna, "refresh", "rna_StudioLights_refresh");
4082  RNA_def_function_ui_description(func, "Refresh Studio Lights from disk");
4083 }
4084 
4086 {
4087  StructRNA *srna;
4088  PropertyRNA *prop;
4089 
4090  RNA_define_verify_sdna(false);
4091  srna = RNA_def_struct(brna, "StudioLight", NULL);
4093  RNA_def_struct_ui_text(srna, "Studio Light", "Studio light");
4094 
4095  prop = RNA_def_property(srna, "index", PROP_INT, PROP_NONE);
4096  RNA_def_property_int_funcs(prop, "rna_UserDef_studiolight_index_get", NULL, NULL);
4098  RNA_def_property_ui_text(prop, "Index", "");
4099 
4100  prop = RNA_def_property(srna, "is_user_defined", PROP_BOOLEAN, PROP_NONE);
4101  RNA_def_property_boolean_funcs(prop, "rna_UserDef_studiolight_is_user_defined_get", NULL);
4103  RNA_def_property_ui_text(prop, "User Defined", "");
4104 
4105  prop = RNA_def_property(srna, "has_specular_highlight_pass", PROP_BOOLEAN, PROP_NONE);
4107  prop, "rna_UserDef_studiolight_has_specular_highlight_pass_get", NULL);
4110  prop,
4111  "Has Specular Highlight",
4112  "Studio light image file has separate \"diffuse\" and \"specular\" passes");
4113 
4114  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
4116  RNA_def_property_enum_funcs(prop, "rna_UserDef_studiolight_type_get", NULL, NULL);
4118  RNA_def_property_ui_text(prop, "Type", "");
4119 
4120  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
4122  prop, "rna_UserDef_studiolight_name_get", "rna_UserDef_studiolight_name_length", NULL);
4123  RNA_def_property_ui_text(prop, "Name", "");
4125  RNA_def_struct_name_property(srna, prop);
4126 
4127  prop = RNA_def_property(srna, "path", PROP_STRING, PROP_DIRPATH);
4129  prop, "rna_UserDef_studiolight_path_get", "rna_UserDef_studiolight_path_length", NULL);
4130  RNA_def_property_ui_text(prop, "Path", "");
4132 
4133  prop = RNA_def_property(srna, "solid_lights", PROP_COLLECTION, PROP_NONE);
4134  RNA_def_property_collection_sdna(prop, NULL, "light_param", "");
4135  RNA_def_property_struct_type(prop, "UserSolidLight");
4137  "rna_UserDef_studiolight_solid_lights_begin",
4138  "rna_iterator_array_next",
4139  "rna_iterator_array_end",
4140  "rna_iterator_array_get",
4141  "rna_UserDef_studiolight_solid_lights_length",
4142  NULL,
4143  NULL,
4144  NULL);
4146  prop, "Solid Lights", "Lights user to display objects in solid draw mode");
4148 
4149  prop = RNA_def_property(srna, "light_ambient", PROP_FLOAT, PROP_COLOR);
4150  RNA_def_property_array(prop, 3);
4151  RNA_def_property_float_funcs(prop, "rna_UserDef_studiolight_light_ambient_get", NULL, NULL);
4153  prop, "Ambient Color", "Color of the ambient light that uniformly lit the scene");
4155 
4156  prop = RNA_def_property(srna, "path_irr_cache", PROP_STRING, PROP_DIRPATH);
4158  "rna_UserDef_studiolight_path_irr_cache_get",
4159  "rna_UserDef_studiolight_path_irr_cache_length",
4160  NULL);
4162  prop, "Irradiance Cache Path", "Path where the irradiance cache is stored");
4164 
4165  prop = RNA_def_property(srna, "path_sh_cache", PROP_STRING, PROP_DIRPATH);
4167  "rna_UserDef_studiolight_path_sh_cache_get",
4168  "rna_UserDef_studiolight_path_sh_cache_length",
4169  NULL);
4171  prop, "SH Cache Path", "Path where the spherical harmonics cache is stored");
4173 
4174  const int spherical_harmonics_dim[] = {STUDIOLIGHT_SH_EFFECTIVE_COEFS_LEN, 3};
4175  prop = RNA_def_property(srna, "spherical_harmonics_coefficients", PROP_FLOAT, PROP_COLOR);
4176  RNA_def_property_multi_array(prop, 2, spherical_harmonics_dim);
4179  prop, "rna_UserDef_studiolight_spherical_harmonics_coefficients_get", NULL, NULL);
4180 
4181  RNA_define_verify_sdna(true);
4182 }
4183 
4185 {
4186  StructRNA *srna;
4187  PropertyRNA *prop;
4188 
4189  srna = RNA_def_struct(brna, "PathCompare", NULL);
4190  RNA_def_struct_sdna(srna, "bPathCompare");
4192  RNA_def_struct_ui_text(srna, "Path Compare", "Match paths against this value");
4193 
4194  prop = RNA_def_property(srna, "path", PROP_STRING, PROP_DIRPATH);
4195  RNA_def_property_ui_text(prop, "Path", "");
4196  RNA_def_struct_name_property(srna, prop);
4197 
4198  prop = RNA_def_property(srna, "use_glob", PROP_BOOLEAN, PROP_NONE);
4200  RNA_def_property_ui_text(prop, "Use Wildcard", "Enable wildcard globbing");
4201 }
4202 
4204 {
4205  StructRNA *srna;
4206  PropertyRNA *prop;
4207 
4208  srna = RNA_def_struct(brna, "AddonPreferences", NULL);
4209  RNA_def_struct_ui_text(srna, "Add-on Preferences", "");
4210  RNA_def_struct_sdna(srna, "bAddon"); /* WARNING: only a bAddon during registration */
4211 
4212  RNA_def_struct_refine_func(srna, "rna_AddonPref_refine");
4213  RNA_def_struct_register_funcs(srna, "rna_AddonPref_register", "rna_AddonPref_unregister", NULL);
4214  RNA_def_struct_idprops_func(srna, "rna_AddonPref_idprops");
4215  RNA_def_struct_flag(srna, STRUCT_NO_DATABLOCK_IDPROPERTIES); /* Mandatory! */
4216 
4218 
4219  /* registration */
4221  prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
4222  RNA_def_property_string_sdna(prop, NULL, "module");
4225 
4227 }
4228 
4230 {
4231 
4234 
4238 
4260  rna_def_userdef_themes(brna);
4261 }
4262 
4264 {
4265  StructRNA *srna;
4266  PropertyRNA *prop;
4267  static float default_dir[3] = {0.0f, 0.0f, 1.0f};
4268  static float default_col[3] = {0.8f, 0.8f, 0.8f};
4269 
4270  srna = RNA_def_struct(brna, "UserSolidLight", NULL);
4271  RNA_def_struct_sdna(srna, "SolidLight");
4274  srna, "Solid Light", "Light used for Studio lighting in solid shading mode");
4275 
4276  prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
4277  RNA_def_property_boolean_sdna(prop, NULL, "flag", 1);
4279  RNA_def_property_ui_text(prop, "Enabled", "Enable this light in solid shading mode");
4280  RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
4281 
4282  prop = RNA_def_property(srna, "smooth", PROP_FLOAT, PROP_FACTOR);
4283  RNA_def_property_float_sdna(prop, NULL, "smooth");
4284  RNA_def_property_float_default(prop, 0.5f);
4285  RNA_def_property_range(prop, 0.0f, 1.0f);
4286  RNA_def_property_ui_text(prop, "Smooth", "Smooth the lighting from this light");
4287  RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
4288 
4289  prop = RNA_def_property(srna, "direction", PROP_FLOAT, PROP_DIRECTION);
4290  RNA_def_property_float_sdna(prop, NULL, "vec");
4291  RNA_def_property_array(prop, 3);
4292  RNA_def_property_float_array_default(prop, default_dir);
4293  RNA_def_property_ui_text(prop, "Direction", "Direction that the light is shining");
4294  RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
4295 
4296  prop = RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR);
4297  RNA_def_property_float_sdna(prop, NULL, "spec");
4298  RNA_def_property_array(prop, 3);
4299  RNA_def_property_float_array_default(prop, default_col);
4300  RNA_def_property_ui_text(prop, "Specular Color", "Color of the light's specular highlight");
4301  RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
4302 
4303  prop = RNA_def_property(srna, "diffuse_color", PROP_FLOAT, PROP_COLOR);
4304  RNA_def_property_float_sdna(prop, NULL, "col");
4305  RNA_def_property_array(prop, 3);
4306  RNA_def_property_float_array_default(prop, default_col);
4307  RNA_def_property_ui_text(prop, "Diffuse Color", "Color of the light's diffuse highlight");
4308  RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
4309 }
4310 
4312 {
4313  StructRNA *srna;
4314  PropertyRNA *prop;
4315 
4316  srna = RNA_def_struct(brna, "WalkNavigation", NULL);
4317  RNA_def_struct_sdna(srna, "WalkNavigation");
4319  RNA_def_struct_ui_text(srna, "Walk Navigation", "Walk navigation settings");
4320 
4321  prop = RNA_def_property(srna, "mouse_speed", PROP_FLOAT, PROP_NONE);
4322  RNA_def_property_range(prop, 0.01f, 10.0f);
4324  prop,
4325  "Mouse Sensitivity",
4326  "Speed factor for when looking around, high values mean faster mouse movement");
4327 
4328  prop = RNA_def_property(srna, "walk_speed", PROP_FLOAT, PROP_VELOCITY);
4329  RNA_def_property_range(prop, 0.01f, 100.0f);
4330  RNA_def_property_ui_text(prop, "Walk Speed", "Base speed for walking and flying");
4331 
4332  prop = RNA_def_property(srna, "walk_speed_factor", PROP_FLOAT, PROP_NONE);
4333  RNA_def_property_range(prop, 0.01f, 10.0f);
4335  prop, "Speed Factor", "Multiplication factor when using the fast or slow modifiers");
4336 
4337  prop = RNA_def_property(srna, "view_height", PROP_FLOAT, PROP_UNIT_LENGTH);
4338  RNA_def_property_ui_range(prop, 0.1f, 10.0f, 0.1, 2);
4339  RNA_def_property_range(prop, 0.0f, 1000.0f);
4340  RNA_def_property_ui_text(prop, "View Height", "View distance from the floor when walking");
4341 
4342  prop = RNA_def_property(srna, "jump_height", PROP_FLOAT, PROP_UNIT_LENGTH);
4343  RNA_def_property_ui_range(prop, 0.1f, 10.0f, 0.1, 2);
4344  RNA_def_property_range(prop, 0.1f, 100.0f);
4345  RNA_def_property_ui_text(prop, "Jump Height", "Maximum height of a jump");
4346 
4347  prop = RNA_def_property(srna, "teleport_time", PROP_FLOAT, PROP_NONE);
4348  RNA_def_property_range(prop, 0.0f, 10.0f);
4350  prop, "Teleport Duration", "Interval of time warp when teleporting in navigation mode");
4351 
4352  prop = RNA_def_property(srna, "use_gravity", PROP_BOOLEAN, PROP_BOOLEAN);
4354  RNA_def_property_ui_text(prop, "Gravity", "Walk with gravity, or free navigate");
4355 
4356  prop = RNA_def_property(srna, "use_mouse_reverse", PROP_BOOLEAN, PROP_BOOLEAN);
4358  RNA_def_property_ui_text(prop, "Reverse Mouse", "Reverse the vertical movement of the mouse");
4359 }
4360 
4362 {
4363  static const EnumPropertyItem timecode_styles[] = {
4365  "MINIMAL",
4366  0,
4367  "Minimal Info",
4368  "Most compact representation, uses '+' as separator for sub-second frame numbers, "
4369  "with left and right truncation of the timecode as necessary"},
4371  "SMPTE",
4372  0,
4373  "SMPTE (Full)",
4374  "Full SMPTE timecode (format is HH:MM:SS:FF)"},
4376  "SMPTE_COMPACT",
4377  0,
4378  "SMPTE (Compact)",
4379  "SMPTE timecode showing minutes, seconds, and frames only - "
4380  "hours are also shown if necessary, but not by default"},
4382  "MILLISECONDS",
4383  0,
4384  "Compact with Milliseconds",
4385  "Similar to SMPTE (Compact), except that instead of frames, "
4386  "milliseconds are shown instead"},
4388  "SECONDS_ONLY",
4389  0,
4390  "Only Seconds",
4391  "Direct conversion of frame numbers to seconds"},
4392  {0, NULL, 0, NULL, NULL},
4393  };
4394 
4395  static const EnumPropertyItem color_picker_types[] = {
4397  "CIRCLE_HSV",
4398  0,
4399  "Circle (HSV)",
4400  "A circular Hue/Saturation color wheel, with "
4401  "Value slider"},
4403  "CIRCLE_HSL",
4404  0,
4405  "Circle (HSL)",
4406  "A circular Hue/Saturation color wheel, with "
4407  "Lightness slider"},
4409  "SQUARE_SV",
4410  0,
4411  "Square (SV + H)",
4412  "A square showing Saturation/Value, with Hue slider"},
4414  "SQUARE_HS",
4415  0,
4416  "Square (HS + V)",
4417  "A square showing Hue/Saturation, with Value slider"},
4419  "SQUARE_HV",
4420  0,
4421  "Square (HV + S)",
4422  "A square showing Hue/Value, with Saturation slider"},
4423  {0, NULL, 0, NULL, NULL},
4424  };
4425 
4426  static const EnumPropertyItem zoom_frame_modes[] = {
4427  {ZOOM_FRAME_MODE_KEEP_RANGE, "KEEP_RANGE", 0, "Keep Range", ""},
4428  {ZOOM_FRAME_MODE_SECONDS, "SECONDS", 0, "Seconds", ""},
4429  {ZOOM_FRAME_MODE_KEYFRAMES, "KEYFRAMES", 0, "Keyframes", ""},
4430  {0, NULL, 0, NULL, NULL},
4431  };
4432 
4433  static const EnumPropertyItem line_width[] = {
4434  {-1, "THIN", 0, "Thin", "Thinner lines than the default"},
4435  {0, "AUTO", 0, "Default", "Automatic line width based on UI scale"},
4436  {1, "THICK", 0, "Thick", "Thicker lines than the default"},
4437  {0, NULL, 0, NULL, NULL},
4438  };
4439 
4440  static const EnumPropertyItem render_display_types[] = {
4442  "NONE",
4443  0,
4444  "Keep User Interface",
4445  "Images are rendered without changing the user interface"},
4447  "SCREEN",
4448  0,
4449  "Maximized Area",
4450  "Images are rendered in a maximized Image Editor"},
4452  "AREA",
4453  0,
4454  "Image Editor",
4455  "Images are rendered in an Image Editor"},
4457  "WINDOW",
4458  0,
4459  "New Window",
4460  "Images are rendered in a new window"},
4461  {0, NULL, 0, NULL, NULL},
4462  };
4463  static const EnumPropertyItem temp_space_display_types[] = {
4465  "SCREEN", /* Could be FULLSCREEN, but keeping it consistent with render_display_types */
4466  0,
4467  "Maximized Area",
4468  "Open the temporary editor in a maximized screen"},
4470  "WINDOW",
4471  0,
4472  "New Window",
4473  "Open the temporary editor in a new window"},
4474  {0, NULL, 0, NULL, NULL},
4475  };
4476 
4477  PropertyRNA *prop;
4478  StructRNA *srna;
4479 
4480  srna = RNA_def_struct(brna, "PreferencesView", NULL);
4481  RNA_def_struct_sdna(srna, "UserDef");
4482  RNA_def_struct_nested(brna, srna, "Preferences");
4484  RNA_def_struct_ui_text(srna, "View & Controls", "Preferences related to viewing data");
4485 
4486  /* View. */
4487  prop = RNA_def_property(srna, "ui_scale", PROP_FLOAT, PROP_NONE);
4489  prop, "UI Scale", "Changes the size of the fonts and widgets in the interface");
4490  RNA_def_property_range(prop, 0.25f, 4.0f);
4491  RNA_def_property_ui_range(prop, 0.5f, 2.0f, 1, 2);
4492  RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
4493 
4494  prop = RNA_def_property(srna, "ui_line_width", PROP_ENUM, PROP_NONE);
4495  RNA_def_property_enum_items(prop, line_width);
4497  prop,
4498  "UI Line Width",
4499  "Changes the thickness of widget outlines, lines and dots in the interface");
4500  RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
4501 
4502  /* display */
4503  prop = RNA_def_property(srna, "show_tooltips", PROP_BOOLEAN, PROP_NONE);
4506  prop, "Tooltips", "Display tooltips (when disabled, hold Alt to force display)");
4507 
4508  prop = RNA_def_property(srna, "show_tooltips_python", PROP_BOOLEAN, PROP_NONE);
4510  RNA_def_property_ui_text(prop, "Python Tooltips", "Show Python references in tooltips");
4511 
4512  prop = RNA_def_property(srna, "show_developer_ui", PROP_BOOLEAN, PROP_NONE);
4515  prop,
4516  "Developer Extras",
4517  "Show options for developers (edit source in context menu, geometry indices)");
4518  RNA_def_property_update(prop, 0, "rna_userdef_update");
4519 
4520  prop = RNA_def_property(srna, "show_object_info", PROP_BOOLEAN, PROP_NONE);
4523  "Display Object Info",
4524  "Include the name of the active object and the current frame number in "
4525  "the text info overlay");
4526  RNA_def_property_update(prop, 0, "rna_userdef_update");
4527 
4528  prop = RNA_def_property(srna, "show_view_name", PROP_BOOLEAN, PROP_NONE);
4531  "Display View Name",
4532  "Include the name of the view orientation in the text info overlay");
4533  RNA_def_property_update(prop, 0, "rna_userdef_update");
4534 
4535  prop = RNA_def_property(srna, "show_splash", PROP_BOOLEAN, PROP_NONE);
4537  RNA_def_property_ui_text(prop, "Show Splash", "Display splash screen on startup");
4538 
4539  prop = RNA_def_property(srna, "show_playback_fps", PROP_BOOLEAN, PROP_NONE);
4542  "Display Playback Frame Rate (FPS)",
4543  "Include the number of frames displayed per second in the text info "
4544  "overlay while animation is played back");
4545  RNA_def_property_update(prop, 0, "rna_userdef_update");
4546 
4548  prop = RNA_def_property(srna, "show_addons_enabled_only", PROP_BOOLEAN, PROP_NONE);
4550  prop, NULL, "space_data.flag", USER_SPACEDATA_ADDONS_SHOW_ONLY_ENABLED);
4552  "Enabled Add-ons Only",
4553  "Only show enabled add-ons. Un-check to see all installed add-ons");
4555 
4556  static const EnumPropertyItem factor_display_items[] = {
4557  {USER_FACTOR_AS_FACTOR, "FACTOR", 0, "Factor", "Display factors as values between 0 and 1"},
4558  {USER_FACTOR_AS_PERCENTAGE, "PERCENTAGE", 0, "Percentage", "Display factors as percentages"},
4559  {0, NULL, 0, NULL, NULL},
4560  };
4561 
4562  prop = RNA_def_property(srna, "factor_display_type", PROP_ENUM, PROP_NONE);
4563  RNA_def_property_enum_items(prop, factor_display_items);
4564  RNA_def_property_ui_text(prop, "Factor Display Type", "How factor values are displayed");
4565  RNA_def_property_update(prop, 0, "rna_userdef_update");
4566 
4567  /* Weight Paint */
4568 
4569  prop = RNA_def_property(srna, "use_weight_color_range", PROP_BOOLEAN, PROP_NONE);
4572  prop,
4573  "Use Weight Color Range",
4574  "Enable color range used for weight visualization in weight painting mode");
4575  RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
4576 
4577  prop = RNA_def_property(srna, "weight_color_range", PROP_POINTER, PROP_NONE);
4579  RNA_def_property_pointer_sdna(prop, NULL, "coba_weight");
4580  RNA_def_property_struct_type(prop, "ColorRamp");
4582  "Weight Color Range",
4583  "Color range used for weight visualization in weight painting mode");
4584  RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
4585 
4586  prop = RNA_def_property(srna, "show_navigate_ui", PROP_BOOLEAN, PROP_NONE);
4589  prop,
4590  "Navigation Controls",
4591  "Show navigation controls in 2D and 3D views which do not have scroll bars");
4592  RNA_def_property_update(prop, 0, "rna_userdef_gizmo_update");
4593 
4594  /* menus */
4595  prop = RNA_def_property(srna, "use_mouse_over_open", PROP_BOOLEAN, PROP_NONE);
4598  prop,
4599  "Open on Mouse Over",
4600  "Open menu buttons and pulldowns automatically when the mouse is hovering");
4601 
4602  prop = RNA_def_property(srna, "open_toplevel_delay", PROP_INT, PROP_NONE);
4603  RNA_def_property_int_sdna(prop, NULL, "menuthreshold1");
4604  RNA_def_property_range(prop, 1, 40);
4606  prop,
4607  "Top Level Menu Open Delay",
4608  "Time delay in 1/10 seconds before automatically opening top level menus");
4609 
4610  prop = RNA_def_property(srna, "open_sublevel_delay", PROP_INT, PROP_NONE);
4611  RNA_def_property_int_sdna(prop, NULL, "menuthreshold2");
4612  RNA_def_property_range(prop, 1, 40);
4614  prop,
4615  "Sub Level Menu Open Delay",
4616  "Time delay in 1/10 seconds before automatically opening sub level menus");
4617 
4618  prop = RNA_def_property(srna, "color_picker_type", PROP_ENUM, PROP_NONE);
4619  RNA_def_property_enum_items(prop, color_picker_types);
4620  RNA_def_property_enum_sdna(prop, NULL, "color_picker_type");
4622  prop, "Color Picker Type", "Different styles of displaying the color picker widget");
4623  RNA_def_property_update(prop, 0, "rna_userdef_update");
4624 
4625  /* pie menus */
4626  prop = RNA_def_property(srna, "pie_initial_timeout", PROP_INT, PROP_NONE);
4627  RNA_def_property_range(prop, 0, 1000);
4629  prop,
4630  "Recenter Timeout",
4631  "Pie menus will use the initial mouse position as center for this amount of time "
4632  "(in 1/100ths of sec)");
4633 
4634  prop = RNA_def_property(srna, "pie_tap_timeout", PROP_INT, PROP_NONE);
4635  RNA_def_property_range(prop, 0, 1000);
4637  "Tap Key Timeout",
4638  "Pie menu button held longer than this will dismiss menu on release."
4639  "(in 1/100ths of sec)");
4640 
4641  prop = RNA_def_property(srna, "pie_animation_timeout", PROP_INT, PROP_NONE);
4642  RNA_def_property_range(prop, 0, 1000);
4644  prop,
4645  "Animation Timeout",
4646  "Time needed to fully animate the pie to unfolded state (in 1/100ths of sec)");
4647 
4648  prop = RNA_def_property(srna, "pie_menu_radius", PROP_INT, PROP_PIXEL);
4649  RNA_def_property_range(prop, 0, 1000);
4650  RNA_def_property_ui_text(prop, "Radius", "Pie menu size in pixels");
4651 
4652  prop = RNA_def_property(srna, "pie_menu_threshold", PROP_INT, PROP_PIXEL);
4653  RNA_def_property_range(prop, 0, 1000);
4655  prop, "Threshold", "Distance from center needed before a selection can be made");
4656 
4657  prop = RNA_def_property(srna, "pie_menu_confirm", PROP_INT, PROP_PIXEL);
4658  RNA_def_property_range(prop, 0, 1000);
4660  "Confirm Threshold",
4661  "Distance threshold after which selection is made (zero to disable)");
4662 
4663  prop = RNA_def_property(srna, "use_save_prompt", PROP_BOOLEAN, PROP_NONE);
4666  prop, "Save Prompt", "Ask for confirmation when quitting with unsaved changes");
4667 
4668  prop = RNA_def_property(srna, "show_column_layout", PROP_BOOLEAN, PROP_NONE);
4670  RNA_def_property_ui_text(prop, "Toolbox Column Layout", "Use a column layout for toolbox");
4671 
4672  prop = RNA_def_property(srna, "use_directional_menus", PROP_BOOLEAN, PROP_NONE);
4675  "Contents Follow Opening Direction",
4676  "Otherwise menus, etc will always be top to bottom, left to right, "
4677  "no matter opening direction");
4678 
4679  static const EnumPropertyItem header_align_items[] = {
4680  {0, "NONE", 0, "Keep Existing", "Keep existing header alignment"},
4681  {USER_HEADER_FROM_PREF, "TOP", 0, "Top", "Top aligned on load"},
4683  "BOTTOM",
4684  0,
4685  "Bottom",
4686  "Bottom align on load (except for property editors)"},
4687  {0, NULL, 0, NULL, NULL},
4688  };
4689  prop = RNA_def_property(srna, "header_align", PROP_ENUM, PROP_NONE);
4690  RNA_def_property_enum_items(prop, header_align_items);
4691  RNA_def_property_enum_bitflag_sdna(prop, NULL, "uiflag");
4692  RNA_def_property_ui_text(prop, "Header Position", "Default header position for new space-types");
4693  RNA_def_property_update(prop, 0, "rna_userdef_screen_update_header_default");
4694 
4695  prop = RNA_def_property(srna, "render_display_type", PROP_ENUM, PROP_NONE);
4696  RNA_def_property_enum_items(prop, render_display_types);
4698  prop, "Render Display Type", "Default location where rendered images will be displayed in");
4699 
4700  prop = RNA_def_property(srna, "filebrowser_display_type", PROP_ENUM, PROP_NONE);
4701  RNA_def_property_enum_items(prop, temp_space_display_types);
4703  "File Browser Display Type",
4704  "Default location where the File Editor will be displayed in");
4705 
4706  static const EnumPropertyItem text_hinting_items[] = {
4707  {0, "AUTO", 0, "Auto", ""},
4708  {USER_TEXT_HINTING_NONE, "NONE", 0, "None", ""},
4709  {USER_TEXT_HINTING_SLIGHT, "SLIGHT", 0, "Slight", ""},
4710  {USER_TEXT_HINTING_FULL, "FULL", 0, "Full", ""},
4711  {0, NULL, 0, NULL, NULL},
4712  };
4713 
4714  /* mini axis */
4715  static const EnumPropertyItem mini_axis_type_items[] = {
4716  {USER_MINI_AXIS_TYPE_NONE, "NONE", 0, "Off", ""},
4717  {USER_MINI_AXIS_TYPE_MINIMAL, "MINIMAL", 0, "Simple Axis", ""},
4718  {USER_MINI_AXIS_TYPE_GIZMO, "GIZMO", 0, "Interactive Navigation", ""},
4719  {0, NULL, 0, NULL, NULL},
4720  };
4721 
4722  prop = RNA_def_property(srna, "mini_axis_type", PROP_ENUM, PROP_NONE);
4723  RNA_def_property_enum_items(prop, mini_axis_type_items);
4725  prop,
4726  "Mini Axes Type",
4727  "Show a small rotating 3D axes in the top right corner of the 3D viewport");
4728  RNA_def_property_update(prop, 0, "rna_userdef_gizmo_update");
4729 
4730  prop = RNA_def_property(srna, "mini_axis_size", PROP_INT, PROP_PIXEL);
4731  RNA_def_property_int_sdna(prop, NULL, "rvisize");
4732  RNA_def_property_range(prop, 10, 64);
4733  RNA_def_property_ui_text(prop, "Mini Axes Size", "The axes icon's size");
4734  RNA_def_property_update(prop, 0, "rna_userdef_gizmo_update");
4735 
4736  prop = RNA_def_property(srna, "mini_axis_brightness", PROP_INT, PROP_NONE);
4737  RNA_def_property_int_sdna(prop, NULL, "rvibright");
4738  RNA_def_property_range(prop, 0, 10);
4739  RNA_def_property_ui_text(prop, "Mini Axes Brightness", "Brightness of the icon");
4740  RNA_def_property_update(prop, 0, "rna_userdef_update");
4741 
4742  prop = RNA_def_property(srna, "smooth_view", PROP_INT, PROP_NONE);
4743  RNA_def_property_int_sdna(prop, NULL, "smooth_viewtx");
4744  RNA_def_property_range(prop, 0, 1000);
4746  prop, "Smooth View", "Time to animate the view in milliseconds, zero to disable");
4747 
4748  prop = RNA_def_property(srna, "rotation_angle", PROP_FLOAT, PROP_NONE);
4749  RNA_def_property_float_sdna(prop, NULL, "pad_rot_angle");
4750  RNA_def_property_range(prop, 0, 90);
4752  prop, "Rotation Angle", "Rotation step for numerical pad keys (2 4 6 8)");
4753 
4754  /* 3D transform widget */
4755  prop = RNA_def_property(srna, "show_gizmo", PROP_BOOLEAN, PROP_NONE);
4756  RNA_def_property_boolean_sdna(prop, NULL, "gizmo_flag", USER_GIZMO_DRAW);
4757  RNA_def_property_ui_text(prop, "Gizmos", "Use transform gizmos by default");
4758  RNA_def_property_update(prop, 0, "rna_userdef_update");
4759 
4760  prop = RNA_def_property(srna, "gizmo_size", PROP_INT, PROP_PIXEL);
4761  RNA_def_property_int_sdna(prop, NULL, "gizmo_size");
4762  RNA_def_property_range(prop, 10, 200);
4763  RNA_def_property_ui_text(prop, "Gizmo Size", "Diameter of the gizmo");
4764  RNA_def_property_update(prop, 0, "rna_userdef_update");
4765 
4766  prop = RNA_def_property(srna, "gizmo_size_navigate_v3d", PROP_INT, PROP_PIXEL);
4767  RNA_def_property_range(prop, 30, 200);
4768  RNA_def_property_ui_text(prop, "Navigate Gizmo Size", "The Navigate Gizmo size");
4769  RNA_def_property_update(prop, 0, "rna_userdef_gizmo_update");
4770 
4771  /* Lookdev */
4772  prop = RNA_def_property(srna, "lookdev_sphere_size", PROP_INT, PROP_PIXEL);
4773  RNA_def_property_int_sdna(prop, NULL, "lookdev_sphere_size");
4774  RNA_def_property_range(prop, 50, 400);
4775  RNA_def_property_ui_text(prop, "HDRI Preview Size", "Diameter of the HDRI preview spheres");
4776  RNA_def_property_update(prop, 0, "rna_userdef_update");
4777 
4778  /* View2D Grid Displays */
4779  prop = RNA_def_property(srna, "view2d_grid_spacing_min", PROP_INT, PROP_PIXEL);
4780  RNA_def_property_int_sdna(prop, NULL, "v2d_min_gridsize");
4782  prop, 1, 500); /* XXX: perhaps the lower range should only go down to 5? */
4784  "2D View Minimum Grid Spacing",
4785  "Minimum number of pixels between each gridline in 2D Viewports");
4786  RNA_def_property_update(prop, 0, "rna_userdef_update");
4787 
4788  /* TODO: add a setter for this, so that we can bump up the minimum size as necessary... */
4789  prop = RNA_def_property(srna, "timecode_style", PROP_ENUM, PROP_NONE);
4790  RNA_def_property_enum_items(prop, timecode_styles);
4791  RNA_def_property_enum_sdna(prop, NULL, "timecode_style");
4792  RNA_def_property_enum_funcs(prop, NULL, "rna_userdef_timecode_style_set", NULL);
4794  prop,
4795  "TimeCode Style",
4796  "Format of Time Codes displayed when not displaying timing in terms of frames");
4797  RNA_def_property_update(prop, 0, "rna_userdef_update");
4798 
4799  prop = RNA_def_property(srna, "view_frame_type", PROP_ENUM, PROP_NONE);
4800  RNA_def_property_enum_items(prop, zoom_frame_modes);
4801  RNA_def_property_enum_sdna(prop, NULL, "view_frame_type");
4803  prop, "Zoom to Frame Type", "How zooming to frame focuses around current frame");
4804 
4805  prop = RNA_def_property(srna, "view_frame_keyframes", PROP_INT, PROP_NONE);
4806  RNA_def_property_range(prop, 1, 500);
4807  RNA_def_property_ui_text(prop, "Zoom Keyframes", "Keyframes around cursor that we zoom around");
4808 
4809  prop = RNA_def_property(srna, "view_frame_seconds", PROP_FLOAT, PROP_TIME);
4810  RNA_def_property_range(prop, 0.0, 10000.0);
4811  RNA_def_property_ui_text(prop, "Zoom Seconds", "Seconds around cursor that we zoom around");
4812 
4813  /* Text. */
4814 
4815  prop = RNA_def_property(srna, "use_text_antialiasing", PROP_BOOLEAN, PROP_NONE);
4818  prop, "Text Anti-Aliasing", "Smooth jagged edges of user interface text");
4819  RNA_def_property_update(prop, 0, "rna_userdef_text_update");
4820 
4821  prop = RNA_def_property(srna, "text_hinting", PROP_ENUM, PROP_NONE);
4822  RNA_def_property_enum_bitflag_sdna(prop, NULL, "text_render");
4823  RNA_def_property_enum_items(prop, text_hinting_items);
4825  prop, "Text Hinting", "Method for making user interface text render sharp");
4826  RNA_def_property_update(prop, 0, "rna_userdef_text_update");
4827 
4828  prop = RNA_def_property(srna, "font_path_ui", PROP_STRING, PROP_FILEPATH);
4829  RNA_def_property_string_sdna(prop, NULL, "font_path_ui");
4830  RNA_def_property_ui_text(prop, "Interface Font", "Path to interface font");
4831  RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_font_update");
4832 
4833  prop = RNA_def_property(srna, "font_path_ui_mono", PROP_STRING, PROP_FILEPATH);
4834  RNA_def_property_string_sdna(prop, NULL, "font_path_ui_mono");
4835  RNA_def_property_ui_text(prop, "Monospaced Font", "Path to interface monospaced Font");
4836  RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_font_update");
4837 
4838  /* Language. */
4839 
4840  prop = RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE);
4842 # ifdef WITH_INTERNATIONAL
4843  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_lang_enum_properties_itemf");
4844 # endif
4845  RNA_def_property_ui_text(prop, "Language", "Language used for translation");
4846  RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update");
4847 
4848  prop = RNA_def_property(srna, "use_translate_tooltips", PROP_BOOLEAN, PROP_NONE);
4851  "Translate Tooltips",
4852  "Translate the descriptions when hovering UI elements (recommended)");
4853  RNA_def_property_update(prop, 0, "rna_userdef_update");
4854 
4855  prop = RNA_def_property(srna, "use_translate_interface", PROP_BOOLEAN, PROP_NONE);
4856  RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_IFACE);
4858  prop,
4859  "Translate Interface",
4860  "Translate all labels in menus, buttons and panels "
4861  "(note that this might make it hard to follow tutorials or the manual)");
4862  RNA_def_property_update(prop, 0, "rna_userdef_update");
4863 
4864  prop = RNA_def_property(srna, "use_translate_new_dataname", PROP_BOOLEAN, PROP_NONE);
4867  "Translate New Names",
4868  "Translate the names of new data-blocks (objects, materials...)");
4869  RNA_def_property_update(prop, 0, "rna_userdef_update");
4870 
4871  /* Status-bar. */
4872 
4873  prop = RNA_def_property(srna, "show_statusbar_memory", PROP_BOOLEAN, PROP_NONE);
4874  RNA_def_property_boolean_sdna(prop, NULL, "statusbar_flag", STATUSBAR_SHOW_MEMORY);
4875  RNA_def_property_ui_text(prop, "Show Memory", "Show Blender memory usage");
4876  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO, "rna_userdef_update");
4877 
4878  prop = RNA_def_property(srna, "show_statusbar_vram", PROP_BOOLEAN, PROP_NONE);
4879  RNA_def_property_boolean_sdna(prop, NULL, "statusbar_flag", STATUSBAR_SHOW_VRAM);
4880  RNA_def_property_ui_text(prop, "Show VRAM", "Show GPU video memory usage");
4881  RNA_def_property_editable_func(prop, "rna_show_statusbar_vram_editable");
4882  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO, "rna_userdef_update");
4883 
4884  prop = RNA_def_property(srna, "show_statusbar_version", PROP_BOOLEAN, PROP_NONE);
4885  RNA_def_property_boolean_sdna(prop, NULL, "statusbar_flag", STATUSBAR_SHOW_VERSION);
4886  RNA_def_property_ui_text(prop, "Show Version", "Show Blender version string");
4887  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO, "rna_userdef_update");
4888 
4889  prop = RNA_def_property(srna, "show_statusbar_stats", PROP_BOOLEAN, PROP_NONE);
4890  RNA_def_property_boolean_sdna(prop, NULL, "statusbar_flag", STATUSBAR_SHOW_STATS);
4891  RNA_def_property_ui_text(prop, "Show Statistics", "Show scene statistics");
4892  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_INFO, "rna_userdef_update");
4893 }
4894 
4896 {
4897  PropertyRNA *prop;
4898  StructRNA *srna;
4899 
4900  static const EnumPropertyItem auto_key_modes[] = {
4901  {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add/Replace", ""},
4902  {AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
4903  {0, NULL, 0, NULL, NULL},
4904  };
4905 
4906  static const EnumPropertyItem material_link_items[] = {
4907  {0,
4908  "OBDATA",
4909  0,
4910  "Object Data",
4911  "Toggle whether the material is linked to object data or the object block"},
4912  {USER_MAT_ON_OB,
4913  "OBJECT",
4914  0,
4915  "Object",
4916  "Toggle whether the material is linked to object data or the object block"},
4917  {0, NULL, 0, NULL, NULL},
4918  };
4919 
4920  static const EnumPropertyItem object_align_items[] = {
4921  {0, "WORLD", 0, "World", "Align newly added objects to the world coordinate system"},
4923  "VIEW",
4924  0,
4925  "View",
4926  "Align newly added objects to the active 3D view orientation"},
4928  "CURSOR",
4929  0,
4930  "3D Cursor",
4931  "Align newly added objects to the 3D Cursor's rotation"},
4932  {0, NULL, 0, NULL, NULL},
4933  };
4934 
4935  srna = RNA_def_struct(brna, "PreferencesEdit", NULL);
4936  RNA_def_struct_sdna(srna, "UserDef");
4937  RNA_def_struct_nested(brna, srna, "Preferences");
4939  RNA_def_struct_ui_text(srna, "Edit Methods", "Settings for interacting with Blender data");
4940 
4941  /* Edit Methods */
4942 
4943  prop = RNA_def_property(srna, "material_link", PROP_ENUM, PROP_NONE);
4945  RNA_def_property_enum_items(prop, material_link_items);
4947  prop,
4948  "Material Link To",
4949  "Toggle whether the material is linked to object data or the object block");
4950 
4951  prop = RNA_def_property(srna, "object_align", PROP_ENUM, PROP_NONE);
4953  RNA_def_property_enum_items(prop, object_align_items);
4955  prop, "Align Object To", "The default alignment for objects added from a 3D viewport menu");
4956 
4957  prop = RNA_def_property(srna, "use_enter_edit_mode", PROP_BOOLEAN, PROP_NONE);
4960  prop, "Enter Edit Mode", "Enter edit mode automatically after adding a new object");
4961 
4962  prop = RNA_def_property(srna, "collection_instance_empty_size", PROP_FLOAT, PROP_NONE);
4963  RNA_def_property_range(prop, 0.001f, FLT_MAX);
4965  "Collection Instance Empty Size",
4966  "Display size of the empty when new collection instances are created");
4967 
4968  /* Text Editor */
4969 
4970  prop = RNA_def_property(srna, "use_text_edit_auto_close", PROP_BOOLEAN, PROP_NONE);
4973  prop,
4974  "Auto Close Character Pairs",
4975  "Automatically close relevant character pairs when typing in the text editor");
4977 
4978  /* Undo */
4979 
4980  prop = RNA_def_property(srna, "undo_steps", PROP_INT, PROP_NONE);
4981  RNA_def_property_int_sdna(prop, NULL, "undosteps");
4982  RNA_def_property_range(prop, 0, 256);
4983  RNA_def_property_int_funcs(prop, NULL, "rna_userdef_undo_steps_set", NULL);
4985  prop, "Undo Steps", "Number of undo steps available (smaller values conserve memory)");
4986 
4987  prop = RNA_def_property(srna, "undo_memory_limit", PROP_INT, PROP_NONE);
4988  RNA_def_property_int_sdna(prop, NULL, "undomemory");
4991  prop, "Undo Memory Size", "Maximum memory usage in megabytes (0 means unlimited)");
4992 
4993  prop = RNA_def_property(srna, "use_global_undo", PROP_BOOLEAN, PROP_NONE);
4996  prop,
4997  "Global Undo",
4998  "Global undo works by keeping a full copy of the file itself in memory, "
4999  "so takes extra memory");
5000 
5001  /* auto keyframing */
5002  prop = RNA_def_property(srna, "use_auto_keying", PROP_BOOLEAN, PROP_NONE);
5003  RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
5005  "Auto Keying Enable",
5006  "Automatic keyframe insertion for Objects and Bones "
5007  "(default setting used for new Scenes)");
5008 
5009  prop = RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
5010  RNA_def_property_enum_items(prop, auto_key_modes);
5012  prop, "rna_userdef_autokeymode_get", "rna_userdef_autokeymode_set", NULL);
5014  "Auto Keying Mode",
5015  "Mode of automatic keyframe insertion for Objects and Bones "
5016  "(default setting used for new Scenes)");
5017 
5018  prop = RNA_def_property(srna, "use_keyframe_insert_available", PROP_BOOLEAN, PROP_NONE);
5021  "Auto Keyframe Insert Available",
5022  "Automatic keyframe insertion in available F-Curves");
5023 
5024  prop = RNA_def_property(srna, "use_auto_keying_warning", PROP_BOOLEAN, PROP_NONE);
5027  prop,
5028  "Show Auto Keying Warning",
5029  "Show warning indicators when transforming objects and bones if auto keying is enabled");
5030 
5031  /* keyframing settings */
5032  prop = RNA_def_property(srna, "use_keyframe_insert_needed", PROP_BOOLEAN, PROP_NONE);
5035  prop, "Keyframe Insert Needed", "Keyframe insertion only when keyframe needed");
5036 
5037  prop = RNA_def_property(srna, "use_visual_keying", PROP_BOOLEAN, PROP_NONE);
5040  prop, "Visual Keying", "Use Visual keying automatically for constrained objects");
5041 
5042  prop = RNA_def_property(srna, "use_insertkey_xyz_to_rgb", PROP_BOOLEAN, PROP_NONE);
5045  prop,
5046  "New F-Curve Colors - XYZ to RGB",
5047  "Color for newly added transformation F-Curves (Location, Rotation, Scale) "
5048  "and also Color is based on the transform axis");
5049 
5050  prop = RNA_def_property(srna, "use_anim_channel_group_colors", PROP_BOOLEAN, PROP_NONE);
5053  prop,
5054  "Channel Group Colors",
5055  "Use animation channel group colors; generally this is used to show bone group colors");
5056  RNA_def_property_update(prop, 0, "rna_userdef_anim_update");
5057 
5058  prop = RNA_def_property(srna, "fcurve_new_auto_smoothing", PROP_ENUM, PROP_NONE);
5060  RNA_def_property_enum_sdna(prop, NULL, "auto_smoothing_new");
5062  "New Curve Smoothing Mode",
5063  "Auto Handle Smoothing mode used for newly added F-Curves");
5064 
5065  prop = RNA_def_property(srna, "keyframe_new_interpolation_type", PROP_ENUM, PROP_NONE);
5067  RNA_def_property_enum_sdna(prop, NULL, "ipo_new");
5069  "New Interpolation Type",
5070  "Interpolation mode used for first keyframe on newly added F-Curves "
5071  "(subsequent keyframes take interpolation from preceding keyframe)");
5073 
5074  prop = RNA_def_property(srna, "keyframe_new_handle_type", PROP_ENUM, PROP_NONE);
5076  RNA_def_property_enum_sdna(prop, NULL, "keyhandles_new");
5077  RNA_def_property_ui_text(prop, "New Handles Type", "Handle type for handles of new keyframes");
5078 
5079  /* frame numbers */
5080  prop = RNA_def_property(srna, "use_negative_frames", PROP_BOOLEAN, PROP_NONE);
5083  "Allow Negative Frames",
5084  "Current frame number can be manually set to a negative value");
5085 
5086  /* fcurve opacity */
5087  prop = RNA_def_property(srna, "fcurve_unselected_alpha", PROP_FLOAT, PROP_FACTOR);
5088  RNA_def_property_float_sdna(prop, NULL, "fcu_inactive_alpha");
5089  RNA_def_property_range(prop, 0.001f, 1.0f);
5091  "Unselected F-Curve Opacity",
5092  "The opacity of unselected F-Curves against the "
5093  "background of the Graph Editor");
5095 
5096  /* grease pencil */
5097  prop = RNA_def_property(srna, "grease_pencil_manhattan_distance", PROP_INT, PROP_PIXEL);
5098  RNA_def_property_int_sdna(prop, NULL, "gp_manhattandist");
5099  RNA_def_property_range(prop, 0, 100);
5101  "Grease Pencil Manhattan Distance",
5102  "Pixels moved by mouse per axis when drawing stroke");
5103 
5104  prop = RNA_def_property(srna, "grease_pencil_euclidean_distance", PROP_INT, PROP_PIXEL);
5105  RNA_def_property_int_sdna(prop, NULL, "gp_euclideandist");
5106  RNA_def_property_range(prop, 0, 100);
5108  "Grease Pencil Euclidean Distance",
5109  "Distance moved by mouse when drawing stroke to include");
5110 
5111  prop = RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, PROP_PIXEL);
5112  RNA_def_property_int_sdna(prop, NULL, "gp_eraser");
5113  RNA_def_property_range(prop, 1, 500);
5114  RNA_def_property_ui_text(prop, "Grease Pencil Eraser Radius", "Radius of eraser 'brush'");
5115 
5116  prop = RNA_def_property(srna, "grease_pencil_default_color", PROP_FLOAT, PROP_COLOR_GAMMA);
5117  RNA_def_property_float_sdna(prop, NULL, "gpencil_new_layer_col");
5118  RNA_def_property_array(prop, 4);
5119  RNA_def_property_ui_text(prop, "Annotation Default Color", "Color of new annotation layers");
5120 
5121  /* sculpt and paint */
5122 
5123  prop = RNA_def_property(srna, "sculpt_paint_overlay_color", PROP_FLOAT, PROP_COLOR_GAMMA);
5124  RNA_def_property_float_sdna(prop, NULL, "sculpt_paint_overlay_col");
5125  RNA_def_property_array(prop, 3);
5126  RNA_def_property_ui_text(prop, "Sculpt/Paint Overlay Color", "Color of texture overlay");
5127 
5128  /* duplication linking */
5129  prop = RNA_def_property(srna, "use_duplicate_mesh", PROP_BOOLEAN, PROP_NONE);
5132  prop, "Duplicate Mesh", "Causes mesh data to be duplicated with the object");
5133 
5134  prop = RNA_def_property(srna, "use_duplicate_surface", PROP_BOOLEAN, PROP_NONE);
5137  prop, "Duplicate Surface", "Causes surface data to be duplicated with the object");
5138 
5139  prop = RNA_def_property(srna, "use_duplicate_curve", PROP_BOOLEAN, PROP_NONE);
5142  prop, "Duplicate Curve", "Causes curve data to be duplicated with the object");
5143 
5144  prop = RNA_def_property(srna, "use_duplicate_lattice", PROP_BOOLEAN, PROP_NONE);
5147  prop, "Duplicate Lattice", "Causes lattice data to be duplicated with the object");
5148 
5149  prop = RNA_def_property(srna, "use_duplicate_text", PROP_BOOLEAN, PROP_NONE);
5152  prop, "Duplicate Text", "Causes text data to be duplicated with the object");
5153 
5154  prop = RNA_def_property(srna, "use_duplicate_metaball", PROP_BOOLEAN, PROP_NONE);
5157  prop, "Duplicate Metaball", "Causes metaball data to be duplicated with the object");
5158 
5159  prop = RNA_def_property(srna, "use_duplicate_armature", PROP_BOOLEAN, PROP_NONE);
5160  RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ARM);
5162  prop, "Duplicate Armature", "Causes armature data to be duplicated with the object");
5163 
5164  prop = RNA_def_property(srna, "use_duplicate_camera", PROP_BOOLEAN, PROP_NONE);
5167  prop, "Duplicate Camera", "Causes camera data to be duplicated with the object");
5168 
5169  prop = RNA_def_property(srna, "use_duplicate_speaker", PROP_BOOLEAN, PROP_NONE);
5172  prop, "Duplicate Speaker", "Causes speaker data to be duplicated with the object");
5173 
5174  prop = RNA_def_property(srna, "use_duplicate_light", PROP_BOOLEAN, PROP_NONE);
5177  prop, "Duplicate Light", "Causes light data to be duplicated with the object");
5178 
5179  prop = RNA_def_property(srna, "use_duplicate_material", PROP_BOOLEAN, PROP_NONE);
5180  RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MAT);
5182  prop, "Duplicate Material", "Causes material data to be duplicated with the object");
5183 
5184  /* Not implemented, keep because this is useful functionality. */
5185 # if 0
5186  prop = RNA_def_property(srna, "use_duplicate_texture", PROP_BOOLEAN, PROP_NONE);
5187  RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_TEX);
5189  prop, "Duplicate Texture", "Causes texture data to be duplicated with the object");
5190 
5191  prop = RNA_def_property(srna, "use_duplicate_fcurve", PROP_BOOLEAN, PROP_NONE);
5192  RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_FCURVE);
5194  prop, "Duplicate F-Curve", "Causes F-Curve data to be duplicated with the object");
5195 # endif
5196 
5197  prop = RNA_def_property(srna, "use_duplicate_action", PROP_BOOLEAN, PROP_NONE);
5198  RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ACT);
5200  prop, "Duplicate Action", "Causes actions to be duplicated with the data-blocks");
5201 
5202  prop = RNA_def_property(srna, "use_duplicate_particle", PROP_BOOLEAN, PROP_NONE);
5205  prop, "Duplicate Particle", "Causes particle systems to be duplicated with the object");
5206 
5207  prop = RNA_def_property(srna, "use_duplicate_lightprobe", PROP_BOOLEAN, PROP_NONE);
5210  prop, "Duplicate Light Probe", "Causes light probe data to be duplicated with the object");
5211 
5212  prop = RNA_def_property(srna, "use_duplicate_grease_pencil", PROP_BOOLEAN, PROP_NONE);
5215  prop, "Duplicate GPencil", "Causes grease pencil data to be duplicated with the object");
5216 
5217  prop = RNA_def_property(srna, "use_duplicate_curves", PROP_BOOLEAN, PROP_NONE);
5220  prop, "Duplicate Curves", "Causes curves data to be duplicated with the object");
5221 
5222  prop = RNA_def_property(srna, "use_duplicate_pointcloud", PROP_BOOLEAN, PROP_NONE);
5225  prop, "Duplicate Point Cloud", "Causes point cloud data to be duplicated with the object");
5226 
5227  prop = RNA_def_property(srna, "use_duplicate_volume", PROP_BOOLEAN, PROP_NONE);
5230  prop, "Duplicate Volume", "Causes volume data to be duplicated with the object");
5231 
5232  /* Currently only used for insert offset (aka auto-offset),
5233  * maybe also be useful for later stuff though. */
5234  prop = RNA_def_property(srna, "node_margin", PROP_INT, PROP_PIXEL);
5235  RNA_def_property_int_sdna(prop, NULL, "node_margin");
5237  prop, "Auto-offset Margin", "Minimum distance between nodes for Auto-offsetting nodes");
5238  RNA_def_property_update(prop, 0, "rna_userdef_update");
5239 
5240  /* cursor */
5241  prop = RNA_def_property(srna, "use_cursor_lock_adjust", PROP_BOOLEAN, PROP_NONE);
5244  prop,
5245  "Cursor Lock Adjust",
5246  "Place the cursor without 'jumping' to the new location (when lock-to-cursor is used)");
5247 
5248  prop = RNA_def_property(srna, "use_mouse_depth_cursor", PROP_BOOLEAN, PROP_NONE);
5251  prop, "Cursor Surface Project", "Use the surface depth for cursor placement");
5252 }
5253 
5255 {
5256  PropertyRNA *prop;
5257  StructRNA *srna;
5258 
5259  static const EnumPropertyItem gl_texture_clamp_items[] = {
5260  {0, "CLAMP_OFF", 0, "Off", ""},
5261  {8192, "CLAMP_8192", 0, "8192", ""},
5262  {4096, "CLAMP_4096", 0, "4096", ""},
5263  {2048, "CLAMP_2048", 0, "2048", ""},
5264  {1024, "CLAMP_1024", 0, "1024", ""},
5265  {512, "CLAMP_512", 0, "512", ""},
5266  {256, "CLAMP_256", 0, "256", ""},
5267  {128, "CLAMP_128", 0, "128", ""},
5268  {0, NULL, 0, NULL, NULL},
5269  };
5270 
5271  static const EnumPropertyItem anisotropic_items[] = {
5272  {1, "FILTER_0", 0, "Off", ""},
5273  {2, "FILTER_2", 0, "2x", ""},
5274  {4, "FILTER_4", 0, "4x", ""},
5275  {8, "FILTER_8", 0, "8x", ""},
5276  {16, "FILTER_16", 0, "16x", ""},
5277  {0, NULL, 0, NULL, NULL},
5278  };
5279 
5280  static const EnumPropertyItem audio_mixing_samples_items[] = {
5281  {256, "SAMPLES_256", 0, "256 Samples", "Set audio mixing buffer size to 256 samples"},
5282  {512, "SAMPLES_512", 0, "512 Samples", "Set audio mixing buffer size to 512 samples"},
5283  {1024, "SAMPLES_1024", 0, "1024 Samples", "Set audio mixing buffer size to 1024 samples"},
5284  {2048, "SAMPLES_2048", 0, "2048 Samples", "Set audio mixing buffer size to 2048 samples"},
5285  {4096, "SAMPLES_4096", 0, "4096 Samples", "Set audio mixing buffer size to 4096 samples"},
5286  {8192, "SAMPLES_8192", 0, "8192 Samples", "Set audio mixing buffer size to 8192 samples"},
5287  {16384,
5288  "SAMPLES_16384",
5289  0,
5290  "16384 Samples",
5291  "Set audio mixing buffer size to 16384 samples"},
5292  {32768,
5293  "SAMPLES_32768",
5294  0,
5295  "32768 Samples",
5296  "Set audio mixing buffer size to 32768 samples"},
5297  {0, NULL, 0, NULL, NULL},
5298  };
5299 
5300  static const EnumPropertyItem audio_rate_items[] = {
5301 # if 0
5302  {8000, "RATE_8000", 0, "8 kHz", "Set audio sampling rate to 8000 samples per second"},
5303  {11025, "RATE_11025", 0, "11.025 kHz", "Set audio sampling rate to 11025 samples per second"},
5304  {16000, "RATE_16000", 0, "16 kHz", "Set audio sampling rate to 16000 samples per second"},
5305  {22050, "RATE_22050", 0, "22.05 kHz", "Set audio sampling rate to 22050 samples per second"},
5306  {32000, "RATE_32000", 0, "32 kHz", "Set audio sampling rate to 32000 samples per second"},
5307 # endif
5308  {44100, "RATE_44100", 0, "44.1 kHz", "Set audio sampling rate to 44100 samples per second"},
5309  {48000, "RATE_48000", 0, "48 kHz", "Set audio sampling rate to 48000 samples per second"},
5310 # if 0
5311  {88200, "RATE_88200", 0, "88.2 kHz", "Set audio sampling rate to 88200 samples per second"},
5312 # endif
5313  {96000, "RATE_96000", 0, "96 kHz", "Set audio sampling rate to 96000 samples per second"},
5314  {192000, "RATE_192000", 0, "192 kHz", "Set audio sampling rate to 192000 samples per second"},
5315  {0, NULL, 0, NULL, NULL},
5316  };
5317 
5318  static const EnumPropertyItem audio_format_items[] = {
5319  {0x01, "U8", 0, "8-bit Unsigned", "Set audio sample format to 8-bit unsigned integer"},
5320  {0x12, "S16", 0, "16-bit Signed", "Set audio sample format to 16-bit signed integer"},
5321  {0x13, "S24", 0, "24-bit Signed", "Set audio sample format to 24-bit signed integer"},
5322  {0x14, "S32", 0, "32-bit Signed", "Set audio sample format to 32-bit signed integer"},
5323  {0x24, "FLOAT", 0, "32-bit Float", "Set audio sample format to 32-bit float"},
5324  {0x28, "DOUBLE", 0, "64-bit Float", "Set audio sample format to 64-bit float"},
5325  {0, NULL, 0, NULL, NULL},
5326  };
5327 
5328  static const EnumPropertyItem audio_channel_items[] = {
5329  {1, "MONO", 0, "Mono", "Set audio channels to mono"},
5330  {2, "STEREO", 0, "Stereo", "Set audio channels to stereo"},
5331  {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"},
5332  {6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound"},
5333  {8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound"},
5334  {0, NULL, 0, NULL, NULL},
5335  };
5336 
5337  static const EnumPropertyItem image_draw_methods[] = {
5339  "AUTO",
5340  0,
5341  "Automatic",
5342  "Automatically choose method based on GPU and image"},
5344  "2DTEXTURE",
5345  0,
5346  "2D Texture",
5347  "Use CPU for display transform and display image with 2D texture"},
5349  "GLSL",
5350  0,
5351  "GLSL",
5352  "Use GLSL shaders for display transform and display image with 2D texture"},
5353  {0, NULL, 0, NULL, NULL},
5354  };
5355 
5356  static const EnumPropertyItem seq_disk_cache_compression_levels[] = {
5358  "NONE",
5359  0,
5360  "None",
5361  "Requires fast storage, but uses minimum CPU resources"},
5363  "LOW",
5364  0,
5365  "Low",
5366  "Doesn't require fast storage and uses less CPU resources"},
5368  "HIGH",
5369  0,
5370  "High",
5371  "Works on slower storage devices and uses most CPU resources"},
5372  {0, NULL, 0, NULL, NULL},
5373  };
5374 
5375  static const EnumPropertyItem seq_proxy_setup_options[] = {
5376  {USER_SEQ_PROXY_SETUP_MANUAL, "MANUAL", 0, "Manual", "Set up proxies manually"},
5378  "AUTOMATIC",
5379  0,
5380  "Automatic",
5381  "Build proxies for added movie and image strips in each preview size"},
5382  {0, NULL, 0, NULL, NULL},
5383  };
5384 
5385  srna = RNA_def_struct(brna, "PreferencesSystem", NULL);
5386  RNA_def_struct_sdna(srna, "UserDef");
5387  RNA_def_struct_nested(brna, srna, "Preferences");
5389  RNA_def_struct_ui_text(srna, "System & OpenGL", "Graphics driver and operating system settings");
5390 
5391  /* UI settings. */
5392 
5393  prop = RNA_def_property(srna, "ui_scale", PROP_FLOAT, PROP_NONE);
5395  RNA_def_property_float_sdna(prop, NULL, "dpi_fac");
5397  prop,
5398  "UI Scale",
5399  "Size multiplier to use when displaying custom user interface elements, so that "
5400  "they are scaled correctly on screens with different DPI. This value is based "
5401  "on operating system DPI settings and Blender display scale");
5402 
5403  prop = RNA_def_property(srna, "ui_line_width", PROP_FLOAT, PROP_NONE);
5405  RNA_def_property_float_sdna(prop, NULL, "pixelsize");
5407  prop,
5408  "UI Line Width",
5409  "Suggested line thickness and point size in pixels, for add-ons displaying custom "
5410  "user interface elements, based on operating system settings and Blender UI scale");
5411 
5412  prop = RNA_def_property(srna, "dpi", PROP_INT, PROP_NONE);
5414 
5415  prop = RNA_def_property(srna, "pixel_size", PROP_FLOAT, PROP_NONE);
5417  RNA_def_property_float_sdna(prop, NULL, "pixelsize");
5418 
5419  /* Memory */
5420 
5421  prop = RNA_def_property(srna, "memory_cache_limit", PROP_INT, PROP_NONE);
5422  RNA_def_property_int_sdna(prop, NULL, "memcachelimit");
5424  RNA_def_property_ui_text(prop, "Memory Cache Limit", "Memory cache limit (in megabytes)");
5425  RNA_def_property_update(prop, 0, "rna_Userdef_memcache_update");
5426 
5427  /* Sequencer disk cache */
5428 
5429  prop = RNA_def_property(srna, "use_sequencer_disk_cache", PROP_BOOLEAN, PROP_NONE);
5431  prop, NULL, "sequencer_disk_cache_flag", SEQ_CACHE_DISK_CACHE_ENABLE);
5432  RNA_def_property_ui_text(prop, "Use Disk Cache", "Store cached images to disk");
5433 
5434  prop = RNA_def_property(srna, "sequencer_disk_cache_dir", PROP_STRING, PROP_DIRPATH);
5435  RNA_def_property_string_sdna(prop, NULL, "sequencer_disk_cache_dir");
5436  RNA_def_property_update(prop, 0, "rna_Userdef_disk_cache_dir_update");
5437  RNA_def_property_ui_text(prop, "Disk Cache Directory", "Override default directory");
5438 
5439  prop = RNA_def_property(srna, "sequencer_disk_cache_size_limit", PROP_INT, PROP_NONE);
5440  RNA_def_property_int_sdna(prop, NULL, "sequencer_disk_cache_size_limit");
5441  RNA_def_property_range(prop, 0, INT_MAX);
5442  RNA_def_property_ui_text(prop, "Disk Cache Limit", "Disk cache limit (in gigabytes)");
5443 
5444  prop = RNA_def_property(srna, "sequencer_disk_cache_compression", PROP_ENUM, PROP_NONE);
5445  RNA_def_property_enum_items(prop, seq_disk_cache_compression_levels);
5446  RNA_def_property_enum_sdna(prop, NULL, "sequencer_disk_cache_compression");
5448  prop,
5449  "Disk Cache Compression Level",
5450  "Smaller compression will result in larger files, but less decoding overhead");
5451 
5452  /* Sequencer proxy setup */
5453 
5454  prop = RNA_def_property(srna, "sequencer_proxy_setup", PROP_ENUM, PROP_NONE);
5455  RNA_def_property_enum_items(prop, seq_proxy_setup_options);
5456  RNA_def_property_enum_sdna(prop, NULL, "sequencer_proxy_setup");
5457  RNA_def_property_ui_text(prop, "Proxy Setup", "When and how proxies are created");
5458 
5459  prop = RNA_def_property(srna, "scrollback", PROP_INT, PROP_UNSIGNED);
5460  RNA_def_property_int_sdna(prop, NULL, "scrollback");
5461  RNA_def_property_range(prop, 32, 32768);
5463  prop, "Scrollback", "Maximum number of lines to store for the console buffer");
5464 
5465  /* OpenGL */
5466 
5467  /* Viewport anti-aliasing */
5468  prop = RNA_def_property(srna, "use_overlay_smooth_wire", PROP_BOOLEAN, PROP_NONE);
5471  prop, "Overlay Smooth Wires", "Enable overlay smooth wires, reducing aliasing");
5472  RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
5473 
5474  prop = RNA_def_property(srna, "use_edit_mode_smooth_wire", PROP_BOOLEAN, PROP_NONE);
5476  prop, NULL, "gpu_flag", USER_GPU_FLAG_NO_EDIT_MODE_SMOOTH_WIRE);
5478  prop,
5479  "Edit Mode Smooth Wires",
5480  "Enable edit mode edge smoothing, reducing aliasing (requires restart)");
5481  RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
5482 
5483  prop = RNA_def_property(srna, "use_region_overlap", PROP_BOOLEAN, PROP_NONE);
5486  prop, "Region Overlap", "Display tool/property regions over the main region");
5487  RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
5488 
5489  prop = RNA_def_property(srna, "viewport_aa", PROP_ENUM, PROP_NONE);
5492  prop, "Viewport Anti-Aliasing", "Method of anti-aliasing in 3d viewport");
5494  RNA_def_property_update(prop, 0, "rna_userdef_update");
5495 
5496  prop = RNA_def_property(srna, "solid_lights", PROP_COLLECTION, PROP_NONE);
5497  RNA_def_property_collection_sdna(prop, NULL, "light_param", "");
5498  RNA_def_property_struct_type(prop, "UserSolidLight");
5500  prop, "Solid Lights", "Lights used to display objects in solid shading mode");
5501 
5502  prop = RNA_def_property(srna, "light_ambient", PROP_FLOAT, PROP_COLOR);
5503  RNA_def_property_float_sdna(prop, NULL, "light_ambient");
5504  RNA_def_property_array(prop, 3);
5506  prop, "Ambient Color", "Color of the ambient light that uniformly lit the scene");
5507  RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
5508 
5509  prop = RNA_def_property(srna, "use_studio_light_edit", PROP_BOOLEAN, PROP_NONE);
5510  RNA_def_property_boolean_sdna(prop, NULL, "edit_studio_light", 1);
5512  prop, "Edit Studio Light", "View the result of the studio light editor in the viewport");
5513  RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
5514 
5515  prop = RNA_def_property(srna, "gl_clip_alpha", PROP_FLOAT, PROP_FACTOR);
5516  RNA_def_property_float_sdna(prop, NULL, "glalphaclip");
5517  RNA_def_property_range(prop, 0.0f, 1.0f);
5519  prop, "Clip Alpha", "Clip alpha below this threshold in the 3D textured view");
5520  RNA_def_property_update(prop, 0, "rna_userdef_update");
5521 
5522  /* Textures */
5523 
5524  prop = RNA_def_property(srna, "image_draw_method", PROP_ENUM, PROP_NONE);
5525  RNA_def_property_enum_items(prop, image_draw_methods);
5526  RNA_def_property_enum_sdna(prop, NULL, "image_draw_method");
5528  prop, "Image Display Method", "Method used for displaying images on the screen");
5529  RNA_def_property_update(prop, 0, "rna_userdef_update");
5530 
5531  prop = RNA_def_property(srna, "anisotropic_filter", PROP_ENUM, PROP_NONE);
5532  RNA_def_property_enum_sdna(prop, NULL, "anisotropic_filter");
5533  RNA_def_property_enum_items(prop, anisotropic_items);
5535  RNA_def_property_ui_text(prop, "Anisotropic Filtering", "Quality of anisotropic filtering");
5536  RNA_def_property_update(prop, 0, "rna_userdef_anisotropic_update");
5537 
5538  prop = RNA_def_property(srna, "gl_texture_limit", PROP_ENUM, PROP_NONE);
5539  RNA_def_property_enum_sdna(prop, NULL, "glreslimit");
5540  RNA_def_property_enum_items(prop, gl_texture_clamp_items);
5542  prop, "GL Texture Limit", "Limit the texture size to save graphics memory");
5543  RNA_def_property_update(prop, 0, "rna_userdef_gl_texture_limit_update");
5544 
5545  prop = RNA_def_property(srna, "texture_time_out", PROP_INT, PROP_NONE);
5546  RNA_def_property_int_sdna(prop, NULL, "textimeout");
5547  RNA_def_property_range(prop, 0, 3600);
5549  prop,
5550  "Texture Time Out",
5551  "Time since last access of a GL texture in seconds after which it is freed "
5552  "(set to 0 to keep textures allocated)");
5553 
5554  prop = RNA_def_property(srna, "texture_collection_rate", PROP_INT, PROP_NONE);
5555  RNA_def_property_int_sdna(prop, NULL, "texcollectrate");
5556  RNA_def_property_range(prop, 1, 3600);
5558  prop,
5559  "Texture Collection Rate",
5560  "Number of seconds between each run of the GL texture garbage collector");
5561 
5562  prop = RNA_def_property(srna, "vbo_time_out", PROP_INT, PROP_NONE);
5563  RNA_def_property_int_sdna(prop, NULL, "vbotimeout");
5564  RNA_def_property_range(prop, 0, 3600);
5566  prop,
5567  "VBO Time Out",
5568  "Time since last access of a GL Vertex buffer object in seconds after which it is freed "
5569  "(set to 0 to keep vbo allocated)");
5570 
5571  prop = RNA_def_property(srna, "vbo_collection_rate", PROP_INT, PROP_NONE);
5572  RNA_def_property_int_sdna(prop, NULL, "vbocollectrate");
5573  RNA_def_property_range(prop, 1, 3600);
5575  prop,
5576  "VBO Collection Rate",
5577  "Number of seconds between each run of the GL Vertex buffer object garbage collector");
5578 
5579  /* Select */
5580 
5581  prop = RNA_def_property(srna, "use_select_pick_depth", PROP_BOOLEAN, PROP_NONE);
5584  "GPU Depth Picking",
5585  "When making a selection in 3D View, use the GPU depth buffer to "
5586  "ensure the frontmost object is selected first");
5587 
5588  /* GPU subdivision evaluation. */
5589 
5590  prop = RNA_def_property(srna, "use_gpu_subdivision", PROP_BOOLEAN, PROP_NONE);
5593  "GPU Subdivision",
5594  "Enable GPU acceleration for evaluating the last subdivision surface "
5595  "modifiers in the stack");
5596  RNA_def_property_update(prop, 0, "rna_UserDef_subdivision_update");
5597 
5598  /* Audio */
5599 
5600  prop = RNA_def_property(srna, "audio_mixing_buffer", PROP_ENUM, PROP_NONE);
5601  RNA_def_property_enum_sdna(prop, NULL, "mixbufsize");
5602  RNA_def_property_enum_items(prop, audio_mixing_samples_items);
5604  prop, "Audio Mixing Buffer", "Number of samples used by the audio mixing buffer");
5605  RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
5606 
5607  prop = RNA_def_property(srna, "audio_device", PROP_ENUM, PROP_NONE);
5608  RNA_def_property_enum_sdna(prop, NULL, "audiodevice");
5610  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_userdef_audio_device_itemf");
5611  RNA_def_property_ui_text(prop, "Audio Device", "Audio output device");
5612  RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
5613 
5614  prop = RNA_def_property(srna, "audio_sample_rate", PROP_ENUM, PROP_NONE);
5615  RNA_def_property_enum_sdna(prop, NULL, "audiorate");
5616  RNA_def_property_enum_items(prop, audio_rate_items);
5617  RNA_def_property_ui_text(prop, "Audio Sample Rate", "Audio sample rate");
5618  RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
5619 
5620  prop = RNA_def_property(srna, "audio_sample_format", PROP_ENUM, PROP_NONE);
5621  RNA_def_property_enum_sdna(prop, NULL, "audioformat");
5622  RNA_def_property_enum_items(prop, audio_format_items);
5623  RNA_def_property_ui_text(prop, "Audio Sample Format", "Audio sample format");
5624  RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
5625 
5626  prop = RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE);
5627  RNA_def_property_enum_sdna(prop, NULL, "audiochannels");
5628  RNA_def_property_enum_items(prop, audio_channel_items);
5629  RNA_def_property_ui_text(prop, "Audio Channels", "Audio channel count");
5630  RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
5631 
5632 # ifdef WITH_CYCLES
5633  prop = RNA_def_property(srna, "legacy_compute_device_type", PROP_INT, PROP_NONE);
5634  RNA_def_property_int_sdna(prop, NULL, "compute_device_type");
5637  RNA_def_property_ui_text(prop, "Legacy Compute Device Type", "For backwards compatibility only");
5638 # endif
5639 }
5640 
5642 {
5643  PropertyRNA *prop;
5644  StructRNA *srna;
5645 
5646  static const EnumPropertyItem view_rotation_items[] = {
5647  {0, "TURNTABLE", 0, "Turntable", "Turntable keeps the Z-axis upright while orbiting"},
5648  {USER_TRACKBALL,
5649  "TRACKBALL",
5650  0,
5651  "Trackball",
5652  "Trackball allows you to tumble your view at any angle"},
5653  {0, NULL, 0, NULL, NULL},
5654  };
5655 
5656 # ifdef WITH_INPUT_NDOF
5657  static const EnumPropertyItem ndof_view_navigation_items[] = {
5658  {0, "FREE", 0, "Free", "Use full 6 degrees of freedom by default"},
5659  {NDOF_MODE_ORBIT, "ORBIT", 0, "Orbit", "Orbit about the view center by default"},
5660  {0, NULL, 0, NULL, NULL},
5661  };
5662 
5663  static const EnumPropertyItem ndof_view_rotation_items[] = {
5664  {NDOF_TURNTABLE,
5665  "TURNTABLE",
5666  0,
5667  "Turntable",
5668  "Use turntable style rotation in the viewport"},
5669  {0, "TRACKBALL", 0, "Trackball", "Use trackball style rotation in the viewport"},
5670  {0, NULL, 0, NULL, NULL},
5671  };
5672 # endif /* WITH_INPUT_NDOF */
5673 
5674  static const EnumPropertyItem tablet_api[] = {
5676  "AUTOMATIC",
5677  0,
5678  "Automatic",
5679  "Automatically choose Wintab or Windows Ink depending on the device"},
5681  "WINDOWS_INK",
5682  0,
5683  "Windows Ink",
5684  "Use native Windows Ink API, for modern tablet and pen devices. Requires Windows 8 or "
5685  "newer"},
5687  "WINTAB",
5688  0,
5689  "Wintab",
5690  "Use Wintab driver for older tablets and Windows versions"},
5691  {0, NULL, 0, NULL, NULL},
5692  };
5693 
5694  static const EnumPropertyItem view_zoom_styles[] = {
5696  "CONTINUE",
5697  0,
5698  "Continue",
5699  "Continuous zooming. The zoom direction and speed depends on how far along the set Zoom "
5700  "Axis the mouse has moved"},
5701  {USER_ZOOM_DOLLY,
5702  "DOLLY",
5703  0,
5704  "Dolly",
5705  "Zoom in and out based on mouse movement along the set Zoom Axis"},
5706  {USER_ZOOM_SCALE,
5707  "SCALE",
5708  0,
5709  "Scale",
5710  "Zoom in and out as if you are scaling the view, mouse movements relative to center"},
5711  {0, NULL, 0, NULL, NULL},
5712  };
5713 
5714  static const EnumPropertyItem view_zoom_axes[] = {
5715  {0, "VERTICAL", 0, "Vertical", "Zoom in and out based on vertical mouse movement"},
5716  {USER_ZOOM_HORIZ,
5717  "HORIZONTAL",
5718  0,
5719  "Horizontal",
5720  "Zoom in and out based on horizontal mouse movement"},
5721  {0, NULL, 0, NULL, NULL},
5722  };
5723 
5724  srna = RNA_def_struct(brna, "PreferencesInput", NULL);
5725  RNA_def_struct_sdna(srna, "UserDef");
5726  RNA_def_struct_nested(brna, srna, "Preferences");
5728  RNA_def_struct_ui_text(srna, "Input", "Settings for input devices");
5729 
5730  prop = RNA_def_property(srna, "view_zoom_method", PROP_ENUM, PROP_NONE);
5731  RNA_def_property_enum_sdna(prop, NULL, "viewzoom");
5732  RNA_def_property_enum_items(prop, view_zoom_styles);
5733  RNA_def_property_ui_text(prop, "Zoom Style", "Which style to use for viewport scaling");
5734 
5735  prop = RNA_def_property(srna, "view_zoom_axis", PROP_ENUM, PROP_NONE);
5736  RNA_def_property_enum_bitflag_sdna(prop, NULL, "uiflag");
5737  RNA_def_property_enum_items(prop, view_zoom_axes);
5738  RNA_def_property_ui_text(prop, "Zoom Axis", "Axis of mouse movement to zoom in or out on");
5739 
5740  prop = RNA_def_property(srna, "use_multitouch_gestures", PROP_BOOLEAN, PROP_NONE);
5743  prop,
5744  "Multitouch Gestures",
5745  "Use multitouch gestures for navigation with touchpad, instead of scroll wheel emulation");
5746  RNA_def_property_update(prop, 0, "rna_userdef_input_devices");
5747 
5748  prop = RNA_def_property(srna, "invert_mouse_zoom", PROP_BOOLEAN, PROP_NONE);
5751  prop, "Invert Zoom Direction", "Invert the axis of mouse movement for zooming");
5752 
5753  prop = RNA_def_property(srna, "use_mouse_depth_navigate", PROP_BOOLEAN, PROP_NONE);
5756  prop,
5757  "Auto Depth",
5758  "Use the depth under the mouse to improve view pan/rotate/zoom functionality");
5759 
5760  /* view zoom */
5761  prop = RNA_def_property(srna, "use_zoom_to_mouse", PROP_BOOLEAN, PROP_NONE);
5764  "Zoom to Mouse Position",
5765  "Zoom in towards the mouse pointer's position in the 3D view, "
5766  "rather than the 2D window center");
5767 
5768  /* view rotation */
5769  prop = RNA_def_property(srna, "use_auto_perspective", PROP_BOOLEAN, PROP_NONE);
5772  prop,
5773  "Auto Perspective",
5774  "Automatically switch between orthographic and perspective when changing "
5775  "from top/front/side views");
5776 
5777  prop = RNA_def_property(srna, "use_rotate_around_active", PROP_BOOLEAN, PROP_NONE);
5779  RNA_def_property_ui_text(prop, "Orbit Around Selection", "Use selection as the pivot point");
5780 
5781  prop = RNA_def_property(srna, "view_rotate_method", PROP_ENUM, PROP_NONE);
5783  RNA_def_property_enum_items(prop, view_rotation_items);
5784  RNA_def_property_ui_text(prop, "Orbit Method", "Orbit method in the viewport");
5785 
5786  prop = RNA_def_property(srna, "use_mouse_continuous", PROP_BOOLEAN, PROP_NONE);
5789  prop,
5790  "Continuous Grab",
5791  "Let the mouse wrap around the view boundaries so mouse movements are not limited by the "
5792  "screen size (used by transform, dragging of UI controls, etc.)");
5793 
5794  prop = RNA_def_property(srna, "use_drag_immediately", PROP_BOOLEAN, PROP_NONE);
5797  "Release Confirms",
5798  "Moving things with a mouse drag confirms when releasing the button");
5799 
5800  prop = RNA_def_property(srna, "use_numeric_input_advanced", PROP_BOOLEAN, PROP_NONE);
5803  "Default to Advanced Numeric Input",
5804  "When entering numbers while transforming, "
5805  "default to advanced mode for full math expression evaluation");
5806 
5807  /* View Navigation */
5808  prop = RNA_def_property(srna, "navigation_mode", PROP_ENUM, PROP_NONE);
5809  RNA_def_property_enum_sdna(prop, NULL, "navigation_mode");
5811  RNA_def_property_ui_text(prop, "View Navigation", "Which method to use for viewport navigation");
5812 
5813  prop = RNA_def_property(srna, "walk_navigation", PROP_POINTER, PROP_NONE);
5814  RNA_def_property_pointer_sdna(prop, NULL, "walk_navigation");
5816  RNA_def_property_struct_type(prop, "WalkNavigation");
5817  RNA_def_property_ui_text(prop, "Walk Navigation", "Settings for walk navigation mode");
5818 
5819  prop = RNA_def_property(srna, "view_rotate_sensitivity_turntable", PROP_FLOAT, PROP_ANGLE);
5820  RNA_def_property_range(prop, DEG2RADF(0.001f), DEG2RADF(15.0f));
5821  RNA_def_property_ui_range(prop, DEG2RADF(0.001f), DEG2RADF(15.0f), 1.0f, 2);
5823  "Orbit Sensitivity",
5824  "Rotation amount per pixel to control how fast the viewport orbits");
5825 
5826  prop = RNA_def_property(srna, "view_rotate_sensitivity_trackball", PROP_FLOAT, PROP_FACTOR);
5827  RNA_def_property_range(prop, 0.1f, 10.0f);
5828  RNA_def_property_ui_range(prop, 0.1f, 2.0f, 0.01f, 2);
5829  RNA_def_property_ui_text(prop, "Orbit Sensitivity", "Scale trackball orbit sensitivity");
5830 
5831  /* Click-drag threshold for tablet & mouse. */
5832  prop = RNA_def_property(srna, "drag_threshold_mouse", PROP_INT, PROP_PIXEL);
5833  RNA_def_property_range(prop, 1, 255);
5835  "Mouse Drag Threshold",
5836  "Number of pixels to drag before a drag event is triggered "
5837  "for mouse/track-pad input "
5838  "(otherwise click events are detected)");
5839 
5840  prop = RNA_def_property(srna, "drag_threshold_tablet", PROP_INT, PROP_PIXEL);
5841  RNA_def_property_range(prop, 1, 255);
5843  "Tablet Drag Threshold",
5844  "Number of pixels to drag before a drag event is triggered "
5845  "for tablet input "
5846  "(otherwise click events are detected)");
5847 
5848  prop = RNA_def_property(srna, "drag_threshold", PROP_INT, PROP_PIXEL);
5849  RNA_def_property_range(prop, 1, 255);
5851  "Drag Threshold",
5852  "Number of pixels to drag before a drag event is triggered "
5853  "for keyboard and other non mouse/tablet input "
5854  "(otherwise click events are detected)");
5855 
5856  prop = RNA_def_property(srna, "move_threshold", PROP_INT, PROP_PIXEL);
5857  RNA_def_property_range(prop, 0, 255);
5858  RNA_def_property_ui_range(prop, 0, 10, 1, -1);
5860  "Motion Threshold",
5861  "Number of pixels to before the cursor is considered to have moved "
5862  "(used for cycling selected items on successive clicks)");
5863 
5864  /* tablet pressure curve */
5865  prop = RNA_def_property(srna, "pressure_threshold_max", PROP_FLOAT, PROP_FACTOR);
5866  RNA_def_property_range(prop, 0.0f, 1.0f);
5867  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.01f, 3);
5869  prop, "Max Threshold", "Raw input pressure value that is interpreted as 100% by Blender");
5870 
5871  prop = RNA_def_property(srna, "pressure_softness", PROP_FLOAT, PROP_FACTOR);
5872  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
5873  RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1f, 2);
5875  prop, "Softness", "Adjusts softness of the low pressure response onset using a gamma curve");
5876 
5877  prop = RNA_def_property(srna, "tablet_api", PROP_ENUM, PROP_NONE);
5878  RNA_def_property_enum_items(prop, tablet_api);
5880  "Tablet API",
5881  "Select the tablet API to use for pressure sensitivity (may require "
5882  "restarting Blender for changes to take effect)");
5883  RNA_def_property_update(prop, 0, "rna_userdef_input_devices");
5884 
5885 # ifdef WITH_INPUT_NDOF
5886  /* 3D mouse settings */
5887  /* global options */
5888  prop = RNA_def_property(srna, "ndof_sensitivity", PROP_FLOAT, PROP_NONE);
5889  RNA_def_property_range(prop, 0.01f, 40.0f);
5890  RNA_def_property_ui_text(prop, "Sensitivity", "Overall sensitivity of the 3D Mouse for panning");
5891 
5892  prop = RNA_def_property(srna, "ndof_orbit_sensitivity", PROP_FLOAT, PROP_NONE);
5893  RNA_def_property_range(prop, 0.01f, 40.0f);
5895  prop, "Orbit Sensitivity", "Overall sensitivity of the 3D Mouse for orbiting");
5896 
5897  prop = RNA_def_property(srna, "ndof_deadzone", PROP_FLOAT, PROP_FACTOR);
5898  RNA_def_property_range(prop, 0.0f, 1.0f);
5900  prop, "Deadzone", "Threshold of initial movement needed from the device's rest position");
5901  RNA_def_property_update(prop, 0, "rna_userdef_ndof_deadzone_update");
5902 
5903  prop = RNA_def_property(srna, "ndof_pan_yz_swap_axis", PROP_BOOLEAN, PROP_NONE);
5906  prop, "Y/Z Swap Axis", "Pan using up/down on the device (otherwise forward/backward)");
5907 
5908  prop = RNA_def_property(srna, "ndof_zoom_invert", PROP_BOOLEAN, PROP_NONE);
5910  RNA_def_property_ui_text(prop, "Invert Zoom", "Zoom using opposite direction");
5911 
5912  /* 3D view */
5913  prop = RNA_def_property(srna, "ndof_show_guide", PROP_BOOLEAN, PROP_NONE);
5914  RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_SHOW_GUIDE);
5915 
5916  /* TODO: update description when fly-mode visuals are in place
5917  * ("projected position in fly mode"). */
5919  prop, "Show Navigation Guide", "Display the center and axis during rotation");
5920 
5921  /* 3D view */
5922  prop = RNA_def_property(srna, "ndof_view_navigate_method", PROP_ENUM, PROP_NONE);
5923  RNA_def_property_enum_bitflag_sdna(prop, NULL, "ndof_flag");
5924  RNA_def_property_enum_items(prop, ndof_view_navigation_items);
5925  RNA_def_property_ui_text(prop, "NDOF View Navigate", "Navigation style in the viewport");
5926 
5927  prop = RNA_def_property(srna, "ndof_view_rotate_method", PROP_ENUM, PROP_NONE);
5928  RNA_def_property_enum_bitflag_sdna(prop, NULL, "ndof_flag");
5929  RNA_def_property_enum_items(prop, ndof_view_rotation_items);
5930  RNA_def_property_ui_text(prop, "NDOF View Rotation", "Rotation style in the viewport");
5931 
5932  /* 3D view: yaw */
5933  prop = RNA_def_property(srna, "ndof_rotx_invert_axis", PROP_BOOLEAN, PROP_NONE);
5935  RNA_def_property_ui_text(prop, "Invert Pitch (X) Axis", "");
5936 
5937  /* 3D view: pitch */
5938  prop = RNA_def_property(srna, "ndof_roty_invert_axis", PROP_BOOLEAN, PROP_NONE);
5940  RNA_def_property_ui_text(prop, "Invert Yaw (Y) Axis", "");
5941 
5942  /* 3D view: roll */
5943  prop = RNA_def_property(srna, "ndof_rotz_invert_axis", PROP_BOOLEAN, PROP_NONE);
5945  RNA_def_property_ui_text(prop, "Invert Roll (Z) Axis", "");
5946 
5947  /* 3D view: pan x */
5948  prop = RNA_def_property(srna, "ndof_panx_invert_axis", PROP_BOOLEAN, PROP_NONE);
5950  RNA_def_property_ui_text(prop, "Invert X Axis", "");
5951 
5952  /* 3D view: pan y */
5953  prop = RNA_def_property(srna, "ndof_pany_invert_axis", PROP_BOOLEAN, PROP_NONE);
5955  RNA_def_property_ui_text(prop, "Invert Y Axis", "");
5956 
5957  /* 3D view: pan z */
5958  prop = RNA_def_property(srna, "ndof_panz_invert_axis", PROP_BOOLEAN, PROP_NONE);
5960  RNA_def_property_ui_text(prop, "Invert Z Axis", "");
5961 
5962  /* 3D view: fly */
5963  prop = RNA_def_property(srna, "ndof_lock_horizon", PROP_BOOLEAN, PROP_NONE);
5965  RNA_def_property_ui_text(prop, "Lock Horizon", "Keep horizon level while flying with 3D Mouse");
5966 
5967  prop = RNA_def_property(srna, "ndof_fly_helicopter", PROP_BOOLEAN, PROP_NONE);
5970  "Helicopter Mode",
5971  "Device up/down directly controls the Z position of the 3D viewport");
5972 
5973  prop = RNA_def_property(srna, "ndof_lock_camera_pan_zoom", PROP_BOOLEAN, PROP_NONE);
5976  prop,
5977  "Lock Camera Pan/Zoom",
5978  "Pan/zoom the camera view instead of leaving the camera view when orbiting");
5979 
5980  /* let Python know whether NDOF is enabled */
5981  prop = RNA_def_boolean(srna, "use_ndof", true, "", "");
5982 # else
5983  prop = RNA_def_boolean(srna, "use_ndof", false, "", "");
5984 # endif /* WITH_INPUT_NDOF */
5987 
5988  prop = RNA_def_property(srna, "mouse_double_click_time", PROP_INT, PROP_NONE);
5989  RNA_def_property_int_sdna(prop, NULL, "dbl_click_time");
5990  RNA_def_property_range(prop, 1, 1000);
5991  RNA_def_property_ui_text(prop, "Double Click Timeout", "Time/delay (in ms) for a double click");
5992 
5993  prop = RNA_def_property(srna, "use_mouse_emulate_3_button", PROP_BOOLEAN, PROP_NONE);
5996  prop, "Emulate 3 Button Mouse", "Emulate Middle Mouse with Alt+Left Mouse");
5998  RNA_def_property_update(prop, 0, "rna_userdef_keyconfig_reload_update");
5999 
6000  static const EnumPropertyItem mouse_emulate_3_button_modifier[] = {
6001  {USER_EMU_MMB_MOD_ALT, "ALT", 0, "Alt", ""},
6002  {USER_EMU_MMB_MOD_OSKEY, "OSKEY", 0, "OS-Key", ""},
6003  {0, NULL, 0, NULL, NULL},
6004  };
6005 
6006  prop = RNA_def_property(srna, "mouse_emulate_3_button_modifier", PROP_ENUM, PROP_NONE);
6007  /* Only needed because of WIN32 inability to support the option. */
6008  RNA_def_property_enum_funcs(prop, "rna_UserDef_mouse_emulate_3_button_modifier_get", NULL, NULL);
6009  RNA_def_property_enum_items(prop, mouse_emulate_3_button_modifier);
6011  prop, "Emulate 3 Button Modifier", "Hold this modifier to emulate the middle mouse button");
6013  RNA_def_property_update(prop, 0, "rna_userdef_keyconfig_reload_update");
6014 
6015  prop = RNA_def_property(srna, "use_emulate_numpad", PROP_BOOLEAN, PROP_NONE);
6018  prop, "Emulate Numpad", "Main 1 to 0 keys act as the numpad ones (useful for laptops)");
6019 
6020  prop = RNA_def_property(srna, "invert_zoom_wheel", PROP_BOOLEAN, PROP_NONE);
6022  RNA_def_property_ui_text(prop, "Wheel Invert Zoom", "Swap the Mouse Wheel zoom direction");
6023 }
6024 
6026 {
6027  PropertyRNA *prop;
6028 
6029  StructRNA *srna = RNA_def_struct(brna, "PreferencesKeymap", NULL);
6030  RNA_def_struct_sdna(srna, "UserDef");
6031  RNA_def_struct_nested(brna, srna, "Preferences");
6033  RNA_def_struct_ui_text(srna, "Keymap", "Shortcut setup for keyboards and other input devices");
6034 
6035  prop = RNA_def_property(srna, "show_ui_keyconfig", PROP_BOOLEAN, PROP_NONE);
6037  prop, NULL, "space_data.flag", USER_SPACEDATA_INPUT_HIDE_UI_KEYCONFIG);
6038  RNA_def_property_ui_text(prop, "Show UI Key-Config", "");
6039 
6040  prop = RNA_def_property(srna, "active_keyconfig", PROP_STRING, PROP_DIRPATH);
6041  RNA_def_property_string_sdna(prop, NULL, "keyconfigstr");
6042  RNA_def_property_ui_text(prop, "Key Config", "The name of the active key configuration");
6043 }
6044 
6046 {
6047  StructRNA *srna;
6048  PropertyRNA *prop;
6049 
6050  srna = RNA_def_struct(brna, "UserAssetLibrary", NULL);
6051  RNA_def_struct_sdna(srna, "bUserAssetLibrary");
6054  srna, "Asset Library", "Settings to define a reusable library for Asset Browsers to use");
6055 
6056  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
6058  prop, "Name", "Identifier (not necessarily unique) for the asset library");
6059  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_userdef_asset_library_name_set");
6060  RNA_def_struct_name_property(srna, prop);
6061  RNA_def_property_update(prop, 0, "rna_userdef_update");
6062 
6063  prop = RNA_def_property(srna, "path", PROP_STRING, PROP_DIRPATH);
6065  prop, "Path", "Path to a directory with .blend files to use as an asset library");
6066  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_userdef_asset_library_path_set");
6067  RNA_def_property_update(prop, 0, "rna_userdef_update");
6068 }
6069 
6071 {
6072  PropertyRNA *prop;
6073  StructRNA *srna;
6074 
6075  static const EnumPropertyItem anim_player_presets[] = {
6076  {0, "INTERNAL", 0, "Internal", "Built-in animation player"},
6077  {2, "DJV", 0, "DJV", "Open source frame player"},
6078  {3, "FRAMECYCLER", 0, "FrameCycler", "Frame player from IRIDAS"},
6079  {4, "RV", 0, "RV", "Frame player from Tweak Software"},
6080  {5, "MPLAYER", 0, "MPlayer", "Media player for video and PNG/JPEG/SGI image sequences"},
6081  {50, "CUSTOM", 0, "Custom", "Custom animation player executable path"},
6082  {0, NULL, 0, NULL, NULL},
6083  };
6084 
6085  static const EnumPropertyItem preview_type_items[] = {
6086  {USER_FILE_PREVIEW_NONE, "NONE", 0, "None", "Do not create blend previews"},
6087  {USER_FILE_PREVIEW_AUTO, "AUTO", 0, "Auto", "Automatically select best preview type"},
6088  {USER_FILE_PREVIEW_SCREENSHOT, "SCREENSHOT", 0, "Screenshot", "Capture the entire window"},
6089  {USER_FILE_PREVIEW_CAMERA, "CAMERA", 0, "Camera View", "Workbench render of scene"},
6090  {0, NULL, 0, NULL, NULL},
6091  };
6092 
6093  srna = RNA_def_struct(brna, "PreferencesFilePaths", NULL);
6094  RNA_def_struct_sdna(srna, "UserDef");
6095  RNA_def_struct_nested(brna, srna, "Preferences");
6097  RNA_def_struct_ui_text(srna, "File Paths", "Default paths for external files");
6098 
6099  prop = RNA_def_property(srna, "show_hidden_files_datablocks", PROP_BOOLEAN, PROP_NONE);
6102  "Show Hidden Files/Data-Blocks",
6103  "Show files and data-blocks that are normally hidden");
6104 
6105  prop = RNA_def_property(srna, "use_filter_files", PROP_BOOLEAN, PROP_NONE);
6107  RNA_def_property_ui_text(prop, "Filter Files", "Enable filtering of files in the File Browser");
6108 
6109  prop = RNA_def_property(srna, "show_recent_locations", PROP_BOOLEAN, PROP_NONE);
6112  prop, "Show Recent Locations", "Show Recent locations list in the File Browser");
6113 
6114  prop = RNA_def_property(srna, "show_system_bookmarks", PROP_BOOLEAN, PROP_NONE);
6117  prop, "Show System Locations", "Show System locations list in the File Browser");
6118 
6119  prop = RNA_def_property(srna, "use_relative_paths", PROP_BOOLEAN, PROP_NONE);
6122  prop,
6123  "Relative Paths",
6124  "Default relative path option for the file selector, when no path is defined yet");
6125 
6126  prop = RNA_def_property(srna, "use_file_compression", PROP_BOOLEAN, PROP_NONE);
6129  prop, "Compress File", "Enable file compression when saving .blend files");
6130 
6131  prop = RNA_def_property(srna, "use_load_ui", PROP_BOOLEAN, PROP_NONE);
6133  RNA_def_property_ui_text(prop, "Load UI", "Load user interface setup when loading .blend files");
6134  RNA_def_property_update(prop, 0, "rna_userdef_load_ui_update");
6135 
6136  prop = RNA_def_property(srna, "use_scripts_auto_execute", PROP_BOOLEAN, PROP_NONE);
6139  "Auto Run Python Scripts",
6140  "Allow any .blend file to run scripts automatically "
6141  "(unsafe with blend files from an untrusted source)");
6142  RNA_def_property_update(prop, 0, "rna_userdef_script_autoexec_update");
6143 
6144  prop = RNA_def_property(srna, "use_tabs_as_spaces", PROP_BOOLEAN, PROP_NONE);
6147  prop,
6148  "Tabs as Spaces",
6149  "Automatically convert all new tabs into spaces for new and loaded text files");
6150 
6151  /* Directories. */
6152 
6153  prop = RNA_def_property(srna, "font_directory", PROP_STRING, PROP_DIRPATH);
6154  RNA_def_property_string_sdna(prop, NULL, "fontdir");
6156  prop, "Fonts Directory", "The default directory to search for loading fonts");
6157 
6158  prop = RNA_def_property(srna, "texture_directory", PROP_STRING, PROP_DIRPATH);
6159  RNA_def_property_string_sdna(prop, NULL, "textudir");
6161  prop, "Textures Directory", "The default directory to search for textures");
6162 
6163  prop = RNA_def_property(srna, "render_output_directory", PROP_STRING, PROP_DIRPATH);
6164  RNA_def_property_string_sdna(prop, NULL, "renderdir");
6166  "Render Output Directory",
6167  "The default directory for rendering output, for new scenes");
6168 
6169  prop = RNA_def_property(srna, "script_directory", PROP_STRING, PROP_DIRPATH);
6170  RNA_def_property_string_sdna(prop, NULL, "pythondir");
6172  prop,
6173  "Python Scripts Directory",
6174  "Alternate script path, matching the default layout with subdirectories: "
6175  "startup, add-ons, modules, and presets (requires restart)");
6176  /* TODO: editing should reset sys.path! */
6177 
6178  prop = RNA_def_property(srna, "i18n_branches_directory", PROP_STRING, PROP_DIRPATH);
6179  RNA_def_property_string_sdna(prop, NULL, "i18ndir");
6181  prop,
6182  "Translation Branches Directory",
6183  "The path to the '/branches' directory of your local svn-translation copy, "
6184  "to allow translating from the UI");
6185 
6186  prop = RNA_def_property(srna, "sound_directory", PROP_STRING, PROP_DIRPATH);
6187  RNA_def_property_string_sdna(prop, NULL, "sounddir");
6188  RNA_def_property_ui_text(prop, "Sounds Directory", "The default directory to search for sounds");
6189 
6190  prop = RNA_def_property(srna, "temporary_directory", PROP_STRING, PROP_DIRPATH);
6191  RNA_def_property_string_sdna(prop, NULL, "tempdir");
6193  prop, "Temporary Directory", "The directory for storing temporary save files");
6194  RNA_def_property_update(prop, 0, "rna_userdef_temp_update");
6195 
6196  prop = RNA_def_property(srna, "render_cache_directory", PROP_STRING, PROP_DIRPATH);
6197  RNA_def_property_string_sdna(prop, NULL, "render_cachedir");
6198  RNA_def_property_ui_text(prop, "Render Cache Path", "Where to cache raw render results");
6199 
6200  prop = RNA_def_property(srna, "image_editor", PROP_STRING, PROP_FILEPATH);
6201  RNA_def_property_string_sdna(prop, NULL, "image_editor");
6202  RNA_def_property_ui_text(prop, "Image Editor", "Path to an image editor");
6203 
6204  prop = RNA_def_property(srna, "animation_player", PROP_STRING, PROP_FILEPATH);
6205  RNA_def_property_string_sdna(prop, NULL, "anim_player");
6207  prop, "Animation Player", "Path to a custom animation/frame sequence player");
6208 
6209  prop = RNA_def_property(srna, "animation_player_preset", PROP_ENUM, PROP_NONE);
6210  RNA_def_property_enum_sdna(prop, NULL, "anim_player_preset");
6211  RNA_def_property_enum_items(prop, anim_player_presets);
6213  prop, "Animation Player Preset", "Preset configs for external animation players");
6214 
6215  /* Autosave. */
6216 
6217  prop = RNA_def_property(srna, "save_version", PROP_INT, PROP_NONE);
6218  RNA_def_property_int_sdna(prop, NULL, "versions");
6219  RNA_def_property_range(prop, 0, 32);
6221  prop,
6222  "Save Versions",
6223  "The number of old versions to maintain in the current directory, when manually saving");
6224 
6225  prop = RNA_def_property(srna, "use_auto_save_temporary_files", PROP_BOOLEAN, PROP_NONE);
6228  "Auto Save Temporary Files",
6229  "Automatic saving of temporary files in temp directory, "
6230  "uses process ID.\n"
6231  "Warning: Sculpt and edit mode data won't be saved");
6232  RNA_def_property_update(prop, 0, "rna_userdef_autosave_update");
6233 
6234  prop = RNA_def_property(srna, "auto_save_time", PROP_INT, PROP_NONE);
6235  RNA_def_property_int_sdna(prop, NULL, "savetime");
6236  RNA_def_property_range(prop, 1, 60);
6238  prop, "Auto Save Time", "The time (in minutes) to wait between automatic temporary saves");
6239  RNA_def_property_update(prop, 0, "rna_userdef_autosave_update");
6240 
6241  prop = RNA_def_property(srna, "recent_files", PROP_INT, PROP_NONE);
6242  RNA_def_property_range(prop, 0, 30);
6244  prop, "Recent Files", "Maximum number of recently opened files to remember");
6245 
6246  prop = RNA_def_property(srna, "file_preview_type", PROP_ENUM, PROP_NONE);
6247  RNA_def_property_enum_items(prop, preview_type_items);
6248  RNA_def_property_ui_text(prop, "File Preview Type", "What type of blend preview to create");
6249 
6251 
6252  prop = RNA_def_property(srna, "asset_libraries", PROP_COLLECTION, PROP_NONE);
6253  RNA_def_property_struct_type(prop, "UserAssetLibrary");
6254  RNA_def_property_ui_text(prop, "Asset Libraries", "");
6255 }
6256 
6258 {
6259  PropertyRNA *prop;
6260  StructRNA *srna;
6261 
6262  srna = RNA_def_struct(brna, "PreferencesApps", NULL);
6263  RNA_def_struct_sdna(srna, "UserDef");
6264  RNA_def_struct_nested(brna, srna, "Preferences");
6266  RNA_def_struct_ui_text(srna, "Apps", "Preferences that work only for apps");
6267 
6268  prop = RNA_def_property(srna, "show_corner_split", PROP_BOOLEAN, PROP_NONE);
6271  prop, "Corner Splitting", "Split and join editors by dragging from corners");
6272  RNA_def_property_update(prop, 0, "rna_userdef_screen_update");
6273 
6274  prop = RNA_def_property(srna, "show_edge_resize", PROP_BOOLEAN, PROP_NONE);
6276  RNA_def_property_ui_text(prop, "Edge Resize", "Resize editors by dragging from the edges");
6277  RNA_def_property_update(prop, 0, "rna_userdef_screen_update");
6278 
6279  prop = RNA_def_property(srna, "show_regions_visibility_toggle", PROP_BOOLEAN, PROP_NONE);
6282  prop, "Regions Visibility Toggle", "Header and side bars visibility toggles");
6283  RNA_def_property_update(prop, 0, "rna_userdef_screen_update");
6284 }
6285 
6287 {
6288  StructRNA *srna;
6289  PropertyRNA *prop;
6290 
6291  srna = RNA_def_struct(brna, "PreferencesExperimental", NULL);
6292  RNA_def_struct_sdna(srna, "UserDef_Experimental");
6293  RNA_def_struct_nested(brna, srna, "Preferences");
6295  RNA_def_struct_ui_text(srna, "Experimental", "Experimental features");
6296 
6297  prop = RNA_def_property(srna, "use_undo_legacy", PROP_BOOLEAN, PROP_NONE);
6298  RNA_def_property_boolean_sdna(prop, NULL, "use_undo_legacy", 1);
6300  prop,
6301  "Undo Legacy",
6302  "Use legacy undo (slower than the new default one, but may be more stable in some cases)");
6303 
6304  prop = RNA_def_property(srna, "override_auto_resync", PROP_BOOLEAN, PROP_NONE);
6305  RNA_def_property_boolean_negative_sdna(prop, NULL, "no_override_auto_resync", 1);
6307  prop,
6308  "Override Auto Resync",
6309  "Enable library overrides automatic resync detection and process on file load. Disable when "
6310  "dealing with older .blend files that need manual Resync (Enforce) handling");
6311 
6312  prop = RNA_def_property(srna, "use_new_point_cloud_type", PROP_BOOLEAN, PROP_NONE);
6313  RNA_def_property_boolean_sdna(prop, NULL, "use_new_point_cloud_type", 1);
6315  prop, "New Point Cloud Type", "Enable the new point cloud type in the ui");
6316 
6317  prop = RNA_def_property(srna, "use_full_frame_compositor", PROP_BOOLEAN, PROP_NONE);
6318  RNA_def_property_boolean_sdna(prop, NULL, "use_full_frame_compositor", 1);
6320  "Full Frame Compositor",
6321  "Enable compositor full frame execution mode option (no tiling, "
6322  "reduces execution time and memory usage)");
6323  RNA_def_property_update(prop, 0, "rna_userdef_update");
6324 
6325  prop = RNA_def_property(srna, "use_new_curves_tools", PROP_BOOLEAN, PROP_NONE);
6326  RNA_def_property_boolean_sdna(prop, NULL, "use_new_curves_tools", 1);
6328  prop, "New Curves Tools", "Enable additional features for the new curves data block");
6329 
6330  prop = RNA_def_property(srna, "use_cycles_debug", PROP_BOOLEAN, PROP_NONE);
6331  RNA_def_property_boolean_sdna(prop, NULL, "use_cycles_debug", 1);
6332  RNA_def_property_ui_text(prop, "Cycles Debug", "Enable Cycles debugging options for developers");
6333  RNA_def_property_update(prop, 0, "rna_userdef_update");
6334 
6335  prop = RNA_def_property(srna, "use_sculpt_tools_tilt", PROP_BOOLEAN, PROP_NONE);
6336  RNA_def_property_boolean_sdna(prop, NULL, "use_sculpt_tools_tilt", 1);
6338  prop, "Sculpt Mode Tilt Support", "Support for pen tablet tilt events in Sculpt Mode");
6339 
6340  prop = RNA_def_property(srna, "use_sculpt_texture_paint", PROP_BOOLEAN, PROP_NONE);
6341  RNA_def_property_boolean_sdna(prop, NULL, "use_sculpt_texture_paint", 1);
6342  RNA_def_property_ui_text(prop, "Sculpt Texture Paint", "Use texture painting in Sculpt Mode");
6343 
6344  prop = RNA_def_property(srna, "use_draw_manager_acquire_lock", PROP_BOOLEAN, PROP_NONE);
6345  RNA_def_property_boolean_sdna(prop, NULL, "use_draw_manager_acquire_lock", 1);
6347  prop, "Draw Manager Locking", "Don't lock UI during background rendering");
6348 
6349  prop = RNA_def_property(srna, "use_extended_asset_browser", PROP_BOOLEAN, PROP_NONE);
6351  "Extended Asset Browser",
6352  "Enable Asset Browser editor and operators to manage regular "
6353  "data-blocks as assets, not just poses");
6354  RNA_def_property_update(prop, 0, "rna_userdef_ui_update");
6355 
6356  prop = RNA_def_property(srna, "show_asset_debug_info", PROP_BOOLEAN, PROP_NONE);
6358  "Asset Debug Info",
6359  "Enable some extra fields in the Asset Browser to aid in debugging");
6360  RNA_def_property_update(prop, 0, "rna_userdef_ui_update");
6361 
6362  prop = RNA_def_property(srna, "use_asset_indexing", PROP_BOOLEAN, PROP_NONE);
6363  RNA_def_property_boolean_negative_sdna(prop, NULL, "no_asset_indexing", 1);
6365  "Asset Indexing",
6366  "Disabling the asset indexer forces every asset library refresh to "
6367  "completely reread assets from disk");
6368  RNA_def_property_update(prop, 0, "rna_userdef_ui_update");
6369 
6370  prop = RNA_def_property(srna, "use_override_templates", PROP_BOOLEAN, PROP_NONE);
6371  RNA_def_property_boolean_sdna(prop, NULL, "use_override_templates", 1);
6373  prop, "Override Templates", "Enable library override template in the python API");
6374 
6375  prop = RNA_def_property(srna, "enable_eevee_next", PROP_BOOLEAN, PROP_NONE);
6376  RNA_def_property_boolean_sdna(prop, NULL, "enable_eevee_next", 1);
6377  RNA_def_property_ui_text(prop, "EEVEE Next", "Enable the new EEVEE codebase, requires restart");
6378 }
6379 
6381 {
6382  StructRNA *srna;
6383  FunctionRNA *func;
6384  PropertyRNA *parm;
6385 
6386  RNA_def_property_srna(cprop, "Addons");
6387  srna = RNA_def_struct(brna, "Addons", NULL);
6389  RNA_def_struct_ui_text(srna, "User Add-ons", "Collection of add-ons");
6390 
6391  func = RNA_def_function(srna, "new", "rna_userdef_addon_new");
6393  RNA_def_function_ui_description(func, "Add a new add-on");
6394  /* return type */
6395  parm = RNA_def_pointer(func, "addon", "Addon", "", "Add-on data");
6396  RNA_def_function_return(func, parm);
6397 
6398  func = RNA_def_function(srna, "remove", "rna_userdef_addon_remove");
6400  RNA_def_function_ui_description(func, "Remove add-on");
6401  parm = RNA_def_pointer(func, "addon", "Addon", "", "Add-on to remove");
6404 }
6405 
6407 {
6408  StructRNA *srna;
6409  FunctionRNA *func;
6410  PropertyRNA *parm;
6411 
6412  RNA_def_property_srna(cprop, "PathCompareCollection");
6413  srna = RNA_def_struct(brna, "PathCompareCollection", NULL);
6415  RNA_def_struct_ui_text(srna, "Paths Compare", "Collection of paths");
6416 
6417  func = RNA_def_function(srna, "new", "rna_userdef_pathcompare_new");
6419  RNA_def_function_ui_description(func, "Add a new path");
6420  /* return type */
6421  parm = RNA_def_pointer(func, "pathcmp", "PathCompare", "", "");
6422  RNA_def_function_return(func, parm);
6423 
6424  func = RNA_def_function(srna, "remove", "rna_userdef_pathcompare_remove");
6426  RNA_def_function_ui_description(func, "Remove path");
6427  parm = RNA_def_pointer(func, "pathcmp", "PathCompare", "", "");
6430 }
6431 
6433 {
6435 
6436  StructRNA *srna;
6437  PropertyRNA *prop;
6438 
6442 
6443  srna = RNA_def_struct(brna, "Preferences", NULL);
6444  RNA_def_struct_sdna(srna, "UserDef");
6446  RNA_def_struct_ui_text(srna, "Preferences", "Global preferences");
6447 
6448  prop = RNA_def_property(srna, "active_section", PROP_ENUM, PROP_NONE);
6449  RNA_def_property_enum_sdna(prop, NULL, "space_data.section_active");
6451  RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_UseDef_active_section_itemf");
6453  prop, "Active Section", "Active section of the preferences shown in the user interface");
6454  RNA_def_property_update(prop, 0, "rna_userdef_ui_update");
6455 
6456  /* don't expose this directly via the UI, modify via an operator */
6457  prop = RNA_def_property(srna, "app_template", PROP_STRING, PROP_NONE);
6458  RNA_def_property_string_sdna(prop, NULL, "app_template");
6459  RNA_def_property_ui_text(prop, "Application Template", "");
6460 
6461  prop = RNA_def_property(srna, "themes", PROP_COLLECTION, PROP_NONE);
6462  RNA_def_property_collection_sdna(prop, NULL, "themes", NULL);
6463  RNA_def_property_struct_type(prop, "Theme");
6464  RNA_def_property_ui_text(prop, "Themes", "");
6465 
6466  prop = RNA_def_property(srna, "ui_styles", PROP_COLLECTION, PROP_NONE);
6467  RNA_def_property_collection_sdna(prop, NULL, "uistyles", NULL);
6468  RNA_def_property_struct_type(prop, "ThemeStyle");
6469  RNA_def_property_ui_text(prop, "Styles", "");
6470 
6471  prop = RNA_def_property(srna, "addons", PROP_COLLECTION, PROP_NONE);
6472  RNA_def_property_collection_sdna(prop, NULL, "addons", NULL);
6473  RNA_def_property_struct_type(prop, "Addon");
6474  RNA_def_property_ui_text(prop, "Add-on", "");
6476 
6477  prop = RNA_def_property(srna, "autoexec_paths", PROP_COLLECTION, PROP_NONE);
6478  RNA_def_property_collection_sdna(prop, NULL, "autoexec_paths", NULL);
6479  RNA_def_property_struct_type(prop, "PathCompare");
6480  RNA_def_property_ui_text(prop, "Auto-Execution Paths", "");
6482 
6483  /* nested structs */
6484  prop = RNA_def_property(srna, "view", PROP_POINTER, PROP_NONE);
6486  RNA_def_property_struct_type(prop, "PreferencesView");
6487  RNA_def_property_pointer_funcs(prop, "rna_UserDef_view_get", NULL, NULL, NULL);
6488  RNA_def_property_ui_text(prop, "View & Controls", "Preferences related to viewing data");
6489 
6490  prop = RNA_def_property(srna, "edit", PROP_POINTER, PROP_NONE);
6492  RNA_def_property_struct_type(prop, "PreferencesEdit");
6493  RNA_def_property_pointer_funcs(prop, "rna_UserDef_edit_get", NULL, NULL, NULL);
6494  RNA_def_property_ui_text(prop, "Edit Methods", "Settings for interacting with Blender data");
6495 
6496  prop = RNA_def_property(srna, "inputs", PROP_POINTER, PROP_NONE);
6498  RNA_def_property_struct_type(prop, "PreferencesInput");
6499  RNA_def_property_pointer_funcs(prop, "rna_UserDef_input_get", NULL, NULL, NULL);
6500  RNA_def_property_ui_text(prop, "Inputs", "Settings for input devices");
6501 
6502  prop = RNA_def_property(srna, "keymap", PROP_POINTER, PROP_NONE);
6504  RNA_def_property_struct_type(prop, "PreferencesKeymap");
6505  RNA_def_property_pointer_funcs(prop, "rna_UserDef_keymap_get", NULL, NULL, NULL);
6506  RNA_def_property_ui_text(prop, "Keymap", "Shortcut setup for keyboards and other input devices");
6507 
6508  prop = RNA_def_property(srna, "filepaths", PROP_POINTER, PROP_NONE);
6510  RNA_def_property_struct_type(prop, "PreferencesFilePaths");
6511  RNA_def_property_pointer_funcs(prop, "rna_UserDef_filepaths_get", NULL, NULL, NULL);
6512  RNA_def_property_ui_text(prop, "File Paths", "Default paths for external files");
6513 
6514  prop = RNA_def_property(srna, "system", PROP_POINTER, PROP_NONE);
6516  RNA_def_property_struct_type(prop, "PreferencesSystem");
6517  RNA_def_property_pointer_funcs(prop, "rna_UserDef_system_get", NULL, NULL, NULL);
6519  prop, "System & OpenGL", "Graphics driver and operating system settings");
6520 
6521  prop = RNA_def_property(srna, "apps", PROP_POINTER, PROP_NONE);
6523  RNA_def_property_struct_type(prop, "PreferencesApps");
6524  RNA_def_property_pointer_funcs(prop, "rna_UserDef_apps_get", NULL, NULL, NULL);
6525  RNA_def_property_ui_text(prop, "Apps", "Preferences that work only for apps");
6526 
6527  prop = RNA_def_property(srna, "experimental", PROP_POINTER, PROP_NONE);
6529  RNA_def_property_struct_type(prop, "PreferencesExperimental");
6531  prop,
6532  "Experimental",
6533  "Settings for features that are still early in their development stage");
6534 
6535  prop = RNA_def_int_vector(srna,
6536  "version",
6537  3,
6538  NULL,
6539  0,
6540  INT_MAX,
6541  "Version",
6542  "Version of Blender the userpref.blend was saved with",
6543  0,
6544  INT_MAX);
6545  RNA_def_property_int_funcs(prop, "rna_userdef_version_get", NULL, NULL);
6548 
6549  /* StudioLight Collection */
6550  prop = RNA_def_property(srna, "studio_lights", PROP_COLLECTION, PROP_NONE);
6551  RNA_def_property_struct_type(prop, "StudioLight");
6552  RNA_def_property_srna(prop, "StudioLights");
6554  "rna_UserDef_studiolight_begin",
6555  "rna_iterator_listbase_next",
6556  "rna_iterator_listbase_end",
6557  "rna_iterator_listbase_get",
6558  NULL,
6559  NULL,
6560  NULL,
6561  NULL);
6562  RNA_def_property_ui_text(prop, "Studio Lights", "");
6563 
6564  /* Preferences Flags */
6565  prop = RNA_def_property(srna, "use_preferences_save", PROP_BOOLEAN, PROP_NONE);
6568  "Save on Exit",
6569  "Save preferences on exit when modified "
6570  "(unless factory settings have been loaded)");
6571 
6572  prop = RNA_def_property(srna, "is_dirty", PROP_BOOLEAN, PROP_NONE);
6573  RNA_def_property_boolean_sdna(prop, NULL, "runtime.is_dirty", 0);
6574  RNA_def_property_ui_text(prop, "Dirty", "Preferences have changed");
6575  RNA_def_property_update(prop, 0, "rna_userdef_ui_update");
6576 
6577  rna_def_userdef_view(brna);
6578  rna_def_userdef_edit(brna);
6579  rna_def_userdef_input(brna);
6580  rna_def_userdef_keymap(brna);
6582  rna_def_userdef_system(brna);
6583  rna_def_userdef_addon(brna);
6588  rna_def_userdef_apps(brna);
6590 
6592 }
6593 
6594 #endif
bAddonPrefType * BKE_addon_pref_type_find(const char *idname, bool quiet)
Definition: addon.c:82
struct bAddonPrefType bAddonPrefType
Definition: BKE_addon.h:25
void BKE_addon_pref_type_add(bAddonPrefType *apt)
Definition: addon.c:105
struct bAddon * BKE_addon_new(void)
Definition: addon.c:33
void BKE_addon_pref_type_remove(const bAddonPrefType *apt)
Definition: addon.c:110
void BKE_addon_free(struct bAddon *addon)
Definition: addon.c:66
void BKE_tempdir_init(const char *userdir)
Definition: appdir.c:1133
Blender util stuff.
@ G_FILE_NO_UI
Definition: BKE_global.h:213
@ G_FLAG_SCRIPT_AUTOEXEC
Definition: BKE_global.h:154
struct IDProperty * IDP_New(char type, const IDPropertyTemplate *val, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition: idprop.c:887
void BKE_image_free_all_gputextures(struct Main *bmain)
Definition: image_gpu.cc:521
const char * BKE_main_blendfile_path_from_global(void)
Definition: main.c:562
General operations, lookup, etc. for blender objects.
struct SubsurfModifierData * BKE_object_get_last_subsurf_modifier(const struct Object *ob)
A BVH for high poly meshes.
void BKE_preferences_asset_library_path_set(struct bUserAssetLibrary *library, const char *path) ATTR_NONNULL()
Definition: preferences.c:69
void BKE_preferences_asset_library_name_set(struct UserDef *userdef, struct bUserAssetLibrary *library, const char *name) ATTR_NONNULL()
Definition: preferences.c:56
void BKE_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
Definition: report.c:83
void BKE_screen_header_alignment_reset(struct bScreen *screen)
Definition: screen.c:1047
char ** BKE_sound_get_device_names(void)
void BKE_sound_init(struct Main *main)
void BKE_studiolight_remove(StudioLight *sl)
Definition: studiolight.c:1557
@ STUDIOLIGHT_USER_DEFINED
@ STUDIOLIGHT_TYPE_MATCAP
@ STUDIOLIGHT_TYPE_WORLD
@ STUDIOLIGHT_SPECULAR_HIGHLIGHT_PASS
@ STUDIOLIGHT_TYPE_STUDIO
struct ListBase * BKE_studiolight_listbase(void)
Definition: studiolight.c:1489
StudioLight * BKE_studiolight_load(const char *path, int type)
Definition: studiolight.c:1565
StudioLight * BKE_studiolight_create(const char *path, const SolidLight light[4], const float light_ambient[3])
Definition: studiolight.c:1571
#define STUDIOLIGHT_FLAG_ORIENTATIONS
#define STUDIOLIGHT_SH_EFFECTIVE_COEFS_LEN
void BKE_studiolight_refresh(void)
Definition: studiolight.c:1604
void BLF_cache_clear(void)
Definition: blf.c:83
void BLF_default_size(float size)
Definition: blf_default.c:32
void BLI_kdtree_nd_() free(KDTree *tree)
Definition: kdtree_impl.h:102
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:239
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:80
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:100
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE size_t min_zz(size_t a, size_t b)
#define DEG2RADF(_deg)
MINLINE void copy_v3_v3(float r[3], const float a[3])
bool BLI_path_make_safe(char *path) ATTR_NONNULL(1)
Definition: path_util.c:314
#define FILE_MAXFILE
#define FILE_MAX
int BLI_path_slash_ensure(char *string) ATTR_NONNULL()
Definition: path_util.c:1780
bool BLI_path_abs(char *path, const char *basepath) ATTR_NONNULL()
Definition: path_util.c:897
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
Definition: string.c:64
#define ARRAY_SIZE(arr)
#define UNUSED_VARS(...)
#define UNUSED(x)
#define STREQ(a, b)
const char * BLT_lang_get(void)
Definition: blt_lang.c:269
struct EnumPropertyItem * BLT_lang_RNA_enum_properties(void)
Definition: blt_lang.c:170
void BLT_lang_set(const char *)
Definition: blt_lang.c:238
#define BLT_I18NCONTEXT_ID_ACTION
#define BLT_I18NCONTEXT_ID_LIGHT
void DEG_id_tag_update(struct ID *id, int flag)
@ IDP_GROUP
Definition: DNA_ID.h:141
@ ID_RECALC_GEOMETRY
Definition: DNA_ID.h:791
@ OB_MODE_WEIGHT_PAINT
Object is a sort of wrapper for general info.
@ SCE_DISPLAY_AA_OFF
@ SCE_DISPLAY_AA_SAMPLES_32
@ SCE_DISPLAY_AA_SAMPLES_8
@ SCE_DISPLAY_AA_SAMPLES_11
@ SCE_DISPLAY_AA_SAMPLES_5
@ SCE_DISPLAY_AA_SAMPLES_16
@ SCE_DISPLAY_AA_FXAA
@ SEQ_CACHE_DISK_CACHE_ENABLE
@ USER_DUP_MAT
@ USER_DUP_SURF
@ USER_DUP_LIGHTPROBE
@ USER_DUP_MBALL
@ USER_DUP_CURVE
@ USER_DUP_CAMERA
@ USER_DUP_VOLUME
@ USER_DUP_SPEAKER
@ USER_DUP_PSYS
@ USER_DUP_GPENCIL
@ USER_DUP_CURVES
@ USER_DUP_LAMP
@ USER_DUP_ARM
@ USER_DUP_MESH
@ USER_DUP_ACT
@ USER_DUP_POINTCLOUD
@ USER_DUP_FONT
@ USER_DUP_LATTICE
@ VIEW_NAVIGATION_FLY
@ VIEW_NAVIGATION_WALK
@ USER_TR_NEWDATANAME
@ USER_TR_TOOLTIPS
@ USER_TR_IFACE
@ USER_DEPTH_CURSOR
@ USER_SHOW_VIEWPORTNAME
@ USER_DRAWVIEWINFO
@ USER_ORBIT_SELECTION
@ USER_HIDE_DOT
@ USER_AUTOPERSP
@ USER_SHOW_FPS
@ USER_LOCK_CURSOR_ADJUST
@ USER_MENUOPENAUTO
@ USER_SPLASH_DISABLE
@ USER_SHOW_GIZMO_NAVIGATE
@ USER_HIDE_SYSTEM_BOOKMARKS
@ USER_ZOOM_INVERT
@ USER_HEADER_FROM_PREF
@ USER_FILTERFILEEXTS
@ USER_SAVE_PROMPT
@ USER_HEADER_BOTTOM
@ USER_CONTINUOUS_MOUSE
@ USER_ZOOM_TO_MOUSEPOS
@ USER_WHEELZOOMDIR
@ USER_GLOBALUNDO
@ USER_DEPTH_NAVIGATE
@ USER_PLAINMENUS
@ USER_HIDE_RECENT
@ USER_NO_MULTITOUCH_GESTURES
@ USER_MENUFIXEDORDER
@ USER_ZOOM_HORIZ
@ IMAGE_DRAW_METHOD_AUTO
@ IMAGE_DRAW_METHOD_GLSL
@ IMAGE_DRAW_METHOD_2DTEXTURE
@ USER_TABLET_NATIVE
@ USER_TABLET_AUTOMATIC
@ USER_TABLET_WINTAB
@ TH_WIRECOLOR_CONSTCOLS
@ USER_GPU_FLAG_SUBDIVISION_EVALUATION
@ USER_GPU_FLAG_OVERLAY_SMOOTH_WIRE
@ USER_GPU_FLAG_NO_EDIT_MODE_SMOOTH_WIRE
@ USER_GPU_FLAG_NO_DEPT_PICK
@ USER_WALK_MOUSE_REVERSE
@ USER_WALK_GRAVITY
@ USER_EMU_MMB_MOD_OSKEY
@ USER_EMU_MMB_MOD_ALT
@ USER_FACTOR_AS_FACTOR
@ USER_FACTOR_AS_PERCENTAGE
@ USER_SEQ_PROXY_SETUP_AUTOMATIC
@ USER_SEQ_PROXY_SETUP_MANUAL
@ USER_CP_SQUARE_SV
@ USER_CP_CIRCLE_HSL
@ USER_CP_SQUARE_HS
@ USER_CP_SQUARE_HV
@ USER_CP_CIRCLE_HSV
@ USER_ADD_VIEWALIGNED
@ USER_TXT_TABSTOSPACES_DISABLE
@ USER_ADD_CURSORALIGNED
@ USER_RELEASECONFIRM
@ USER_RELPATHS
@ USER_TOOLTIPS
@ USER_FILENOUI
@ USER_NONEGFRAMES
@ USER_ADD_EDITMODE
@ USER_TRACKBALL
@ USER_FILECOMPRESS
@ USER_SCRIPT_AUTOEXEC_DISABLE
@ USER_NONUMPAD
@ USER_TOOLTIPS_PYTHON
@ USER_AUTOSAVE
@ USER_FLAG_NUMINPUT_ADVANCED
@ USER_CUSTOM_RANGE
@ USER_DEVELOPER_UI
@ USER_TWOBUTTONMOUSE
@ USER_MAT_ON_OB
@ STATUSBAR_SHOW_STATS
@ STATUSBAR_SHOW_MEMORY
@ STATUSBAR_SHOW_VRAM
@ STATUSBAR_SHOW_VERSION
@ USER_ZOOM_SCALE
@ USER_ZOOM_CONTINUE
@ USER_ZOOM_DOLLY
@ USER_ANIM_SHOW_CHANNEL_GROUP_COLORS
@ USER_REGION_OVERLAP
@ USER_RENDER_DISPLAY_AREA
@ USER_RENDER_DISPLAY_NONE
@ USER_RENDER_DISPLAY_SCREEN
@ USER_RENDER_DISPLAY_WINDOW
@ USER_SPACEDATA_ADDONS_SHOW_ONLY_ENABLED
@ USER_SPACEDATA_INPUT_HIDE_UI_KEYCONFIG
@ USER_FILE_PREVIEW_NONE
@ USER_FILE_PREVIEW_CAMERA
@ USER_FILE_PREVIEW_SCREENSHOT
@ USER_FILE_PREVIEW_AUTO
@ NDOF_ROTX_INVERT_AXIS
@ NDOF_MODE_ORBIT
@ NDOF_ZOOM_INVERT
@ NDOF_LOCK_HORIZON
@ NDOF_SHOW_GUIDE
@ NDOF_TURNTABLE
@ NDOF_PANX_INVERT_AXIS
@ NDOF_PANY_INVERT_AXIS
@ NDOF_ROTY_INVERT_AXIS
@ NDOF_CAMERA_PAN_ZOOM
@ NDOF_FLY_HELICOPTER
@ NDOF_PAN_YZ_SWAP_AXIS
@ NDOF_PANZ_INVERT_AXIS
@ NDOF_ROTZ_INVERT_AXIS
@ AUTOKEY_FLAG_INSERTNEEDED
@ AUTOKEY_FLAG_INSERTAVAIL
@ AUTOKEY_FLAG_NOWARNING
@ AUTOKEY_FLAG_XYZ2RGB
@ AUTOKEY_FLAG_AUTOMATKEY
@ USER_PATHCMP_GLOB
@ USER_TEXT_HINTING_SLIGHT
@ USER_TEXT_HINTING_FULL
@ USER_TEXT_DISABLE_AA
@ USER_TEXT_HINTING_NONE
@ USER_MINI_AXIS_TYPE_GIZMO
@ USER_MINI_AXIS_TYPE_MINIMAL
@ USER_MINI_AXIS_TYPE_NONE
@ AUTOKEY_MODE_NORMAL
@ AUTOKEY_MODE_EDITKEYS
@ AUTOKEY_ON
@ USER_GIZMO_DRAW
@ ZOOM_FRAME_MODE_SECONDS
@ ZOOM_FRAME_MODE_KEYFRAMES
@ ZOOM_FRAME_MODE_KEEP_RANGE
@ USER_TIMECODE_SMPTE_FULL
@ USER_TIMECODE_SECONDS_ONLY
@ USER_TIMECODE_MINIMAL
@ USER_TIMECODE_MILLISECONDS
@ USER_TIMECODE_SMPTE_MSF
@ TH_BACKGROUND_GRADIENT_RADIAL
@ TH_BACKGROUND_SINGLE_COLOR
@ TH_BACKGROUND_GRADIENT_LINEAR
@ USER_TEXT_EDIT_AUTO_CLOSE
@ USER_SECTION_EDITING
@ USER_SECTION_KEYMAP
@ USER_SECTION_THEME
@ USER_SECTION_ADDONS
@ USER_SECTION_EXPERIMENTAL
@ USER_SECTION_LIGHT
@ USER_SECTION_NAVIGATION
@ USER_SECTION_VIEWPORT
@ USER_SECTION_ANIMATION
@ USER_SECTION_INTERFACE
@ USER_SECTION_SAVE_LOAD
@ USER_SECTION_INPUT
@ USER_SECTION_FILE_PATHS
@ USER_SECTION_SYSTEM
@ USER_PREF_FLAG_SAVE
@ USER_SEQ_DISK_CACHE_COMPRESSION_HIGH
@ USER_SEQ_DISK_CACHE_COMPRESSION_LOW
@ USER_SEQ_DISK_CACHE_COMPRESSION_NONE
@ USER_TEMP_SPACE_DISPLAY_FULLSCREEN
@ USER_TEMP_SPACE_DISPLAY_WINDOW
@ USER_APP_HIDE_REGION_TOGGLE
@ USER_APP_LOCK_CORNER_SPLIT
@ USER_APP_LOCK_EDGE_RESIZE
bool GPU_mem_stats_supported(void)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
void GPU_samplers_update(void)
Definition: gpu_texture.cc:702
void MEM_CacheLimiter_set_maximum(size_t m)
Read Guarded memory(de)allocation.
#define RNA_POINTER_INVALIDATE(ptr)
Definition: RNA_access.h:744
@ PARM_RNAPTR
Definition: RNA_types.h:354
@ PARM_REQUIRED
Definition: RNA_types.h:352
void(* StructFreeFunc)(void *data)
Definition: RNA_types.h:737
int(* StructValidateFunc)(struct PointerRNA *ptr, void *data, int *have_function)
Definition: RNA_types.h:732
@ FUNC_USE_REPORTS
Definition: RNA_types.h:663
@ FUNC_NO_SELF
Definition: RNA_types.h:656
@ STRUCT_NO_DATABLOCK_IDPROPERTIES
Definition: RNA_types.h:717
@ STRUCT_UNDO
Definition: RNA_types.h:708
int(* StructCallbackFunc)(struct bContext *C, struct PointerRNA *ptr, struct FunctionRNA *func, ParameterList *list)
Definition: RNA_types.h:733
@ PROP_FLOAT
Definition: RNA_types.h:61
@ PROP_BOOLEAN
Definition: RNA_types.h:59
@ PROP_ENUM
Definition: RNA_types.h:63
@ PROP_INT
Definition: RNA_types.h:60
@ PROP_STRING
Definition: RNA_types.h:62
@ PROP_POINTER
Definition: RNA_types.h:64
@ PROP_COLLECTION
Definition: RNA_types.h:65
#define RNA_ENUM_ITEM_SEPR
Definition: RNA_types.h:483
@ PROP_UNIT_LENGTH
Definition: RNA_types.h:71
@ PROP_THICK_WRAP
Definition: RNA_types.h:285
@ PROP_CONTEXT_UPDATE
Definition: RNA_types.h:269
@ PROP_ANIMATABLE
Definition: RNA_types.h:202
@ PROP_EDITABLE
Definition: RNA_types.h:189
@ PROP_NEVER_NULL
Definition: RNA_types.h:239
@ PROP_REGISTER
Definition: RNA_types.h:273
@ PROP_SKIP_SAVE
Definition: RNA_types.h:218
@ PROP_HIDDEN
Definition: RNA_types.h:216
@ PROP_IDPROPERTY
Definition: RNA_types.h:288
@ PROP_TIME
Definition: RNA_types.h:146
@ PROP_DIRECTION
Definition: RNA_types.h:155
@ PROP_COLOR
Definition: RNA_types.h:153
@ PROP_PIXEL
Definition: RNA_types.h:141
@ PROP_ANGLE
Definition: RNA_types.h:145
@ PROP_NONE
Definition: RNA_types.h:126
@ PROP_DIRPATH
Definition: RNA_types.h:130
@ PROP_FACTOR
Definition: RNA_types.h:144
@ PROP_COLOR_GAMMA
Definition: RNA_types.h:165
@ PROP_UNSIGNED
Definition: RNA_types.h:142
@ PROP_FILEPATH
Definition: RNA_types.h:129
@ PROP_VELOCITY
Definition: RNA_types.h:156
#define C
Definition: RandGen.cpp:25
const struct uiStyle * UI_style_get(void)
void UI_reinit_font(void)
Definition: interface.cc:6782
void UI_icons_reload_internal_textures(void)
#define NC_WINDOW
Definition: WM_types.h:325
#define ND_SPACE_INFO
Definition: WM_types.h:464
#define ND_SPACE_DOPESHEET
Definition: WM_types.h:476
#define NC_SCREEN
Definition: WM_types.h:327
#define NA_EDITED
Definition: WM_types.h:523
#define ND_SPACE_GRAPH
Definition: WM_types.h:475
#define NS_VIEW3D_GPU
Definition: WM_types.h:515
#define ND_SPACE_TEXT
Definition: WM_types.h:473
#define ND_SPACE_VIEW3D
Definition: WM_types.h:471
#define NC_SPACE
Definition: WM_types.h:342
return(oflags[bm->toolflag_index].f &oflag) !=0
unsigned int U
Definition: btGjkEpa3.h:78
Scene scene
static char ** names
Definition: makesdna.c:65
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:31
void *(* MEM_mallocN)(size_t len, const char *str)
Definition: mallocn.c:33
#define G(x, y, z)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
Definition: rna_access.c:136
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type)
Definition: rna_access.c:902
const PointerRNA PointerRNA_NULL
Definition: rna_access.c:61
void * RNA_struct_blender_type_get(StructRNA *srna)
Definition: rna_access.c:897
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb, IteratorSkipFunc skip)
Definition: rna_access.c:4729
void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int itemsize, int length, bool free_ptr, IteratorSkipFunc skip)
Definition: rna_access.c:4781
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
Definition: rna_access.c:186
const EnumPropertyItem rna_enum_beztriple_interpolation_mode_items[]
Definition: rna_curve.c:68
const EnumPropertyItem rna_enum_keyframe_handle_type_items[]
Definition: rna_curve.c:39
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
Definition: rna_define.c:1148
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2740
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3493
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
Definition: rna_define.c:4170
void RNA_def_struct_flag(StructRNA *srna, int flag)
Definition: rna_define.c:1133
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
Definition: rna_define.c:2236
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1526
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
Definition: rna_define.c:3285
void RNA_def_property_float_default(PropertyRNA *prop, float value)
Definition: rna_define.c:2022
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
Definition: rna_define.c:4312
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
Definition: rna_define.c:2106
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
Definition: rna_define.c:3126
void RNA_define_verify_sdna(bool verify)
Definition: rna_define.c:737
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
Definition: rna_define.c:1645
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2695
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
Definition: rna_define.c:4273
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
Definition: rna_define.c:3474
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
Definition: rna_define.c:3420
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
Definition: rna_define.c:1237
void RNA_def_property_boolean_default(PropertyRNA *prop, bool value)
Definition: rna_define.c:1937
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
Definition: rna_define.c:2944
void RNA_def_struct_register_funcs(StructRNA *srna, const char *reg, const char *unreg, const char *instance)
Definition: rna_define.c:1172
void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int length[])
Definition: rna_define.c:1598
void RNA_def_property_int_default(PropertyRNA *prop, int value)
Definition: rna_define.c:1978
StructRNA * RNA_def_struct_ptr(BlenderRNA *brna, const char *identifier, StructRNA *srnafrom)
Definition: rna_define.c:900
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
Definition: rna_define.c:1872
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
Definition: rna_define.c:1048
void RNA_def_struct_clear_flag(StructRNA *srna, int flag)
Definition: rna_define.c:1138
void RNA_def_property_array(PropertyRNA *prop, int length)
Definition: rna_define.c:1539
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
Definition: rna_define.c:1737
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
Definition: rna_define.c:1772
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
Definition: rna_define.c:2769
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
Definition: rna_define.c:4347
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
Definition: rna_define.c:2900
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
Definition: rna_define.c:3224
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
Definition: rna_define.c:2855
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
Definition: rna_define.c:1257
PropertyRNA * RNA_def_int_vector(StructOrFunctionRNA *cont_, const char *identifier, int len, const int *default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
Definition: rna_define.c:3623
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2669
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem)
Definition: rna_define.c:4487
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
Definition: rna_define.c:1103
void RNA_def_function_flag(FunctionRNA *func, int flag)
Definition: rna_define.c:4342
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1495
void RNA_struct_free_extension(StructRNA *srna, ExtensionRNA *rna_ext)
Definition: rna_define.c:762
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
Definition: rna_define.c:3385
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
Definition: rna_define.c:1028
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2601
void RNA_enum_item_add(EnumPropertyItem **items, int *totitem, const EnumPropertyItem *item)
Definition: rna_define.c:4436
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
Definition: rna_define.c:3028
void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
Definition: rna_define.c:777
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3687
void RNA_def_struct_idprops_func(StructRNA *srna, const char *idproperties)
Definition: rna_define.c:1160
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
Definition: rna_define.c:2848
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1490
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2493
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
Definition: rna_define.c:1664
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3783
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2343
void RNA_def_property_float_array_default(PropertyRNA *prop, const float *array)
Definition: rna_define.c:2043
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
Definition: rna_define.c:2327
void RNA_def_struct_nested(BlenderRNA *brna, StructRNA *srna, const char *structname)
Definition: rna_define.c:1119
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1518
const EnumPropertyItem rna_enum_fcurve_auto_smoothing_items[]
Definition: rna_fcurve.c:65
void rna_userdef_is_dirty_update(struct Main *bmain, struct Scene *scene, struct PointerRNA *ptr)
void rna_userdef_is_dirty_update_impl(void)
BlenderRNA BLENDER_RNA
static void rna_def_userdef_theme_space_list_generic(BlenderRNA *brna)
Definition: rna_userdef.c:1781
static void rna_def_userdef_theme_space_common(StructRNA *srna)
Definition: rna_userdef.c:1646
static void rna_def_userdef_theme_spaces_vertex(StructRNA *srna)
Definition: rna_userdef.c:1844
static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna)
Definition: rna_userdef.c:2452
static void rna_def_userdef_theme_space_userpref(BlenderRNA *brna)
Definition: rna_userdef.c:2502
static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
Definition: rna_userdef.c:2426
#define USERDEF_TAG_DIRTY_PROPERTY_UPDATE_DISABLE
Definition: rna_userdef.c:1039
const EnumPropertyItem rna_enum_preference_section_items[]
Definition: rna_userdef.c:41
static void rna_def_userdef_theme_ui_panel(BlenderRNA *brna)
Definition: rna_userdef.c:1270
static void rna_def_userdef_theme_spaces_paint_curves(StructRNA *srna)
Definition: rna_userdef.c:1959
static void rna_def_userdef_edit(BlenderRNA *brna)
Definition: rna_userdef.c:4895
static void rna_def_userdef_theme_spaces_curves(StructRNA *srna, bool incl_nurbs, bool incl_lastsel, bool incl_vector, bool incl_verthandle)
Definition: rna_userdef.c:1974
static void rna_def_userdef_theme_space_info(BlenderRNA *brna)
Definition: rna_userdef.c:2567
static void rna_def_userdef_theme_strip_color(BlenderRNA *brna)
Definition: rna_userdef.c:3644
static void rna_def_userdef_theme_spaces_list_main(StructRNA *srna)
Definition: rna_userdef.c:1833
static void rna_def_userdef_filepaths_asset_library(BlenderRNA *brna)
Definition: rna_userdef.c:6045
static void rna_def_userdef_view(BlenderRNA *brna)
Definition: rna_userdef.c:4361
static void rna_def_userdef_theme_space_spreadsheet(BlenderRNA *brna)
Definition: rna_userdef.c:3815
static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
Definition: rna_userdef.c:1062
static void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop)
Definition: rna_userdef.c:6380
static void rna_def_userdef_studiolight(BlenderRNA *brna)
Definition: rna_userdef.c:4085
static int max_memory_in_megabytes_int(void)
Definition: rna_userdef.c:1055
static void rna_def_userdef_addon_pref(BlenderRNA *brna)
Definition: rna_userdef.c:4203
static void rna_def_userdef_pathcompare(BlenderRNA *brna)
Definition: rna_userdef.c:4184
static void rna_def_userdef_theme_spaces_edge(StructRNA *srna)
Definition: rna_userdef.c:1879
static const EnumPropertyItem rna_enum_userdef_viewport_aa_items[]
Definition: rna_userdef.c:102
static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
Definition: rna_userdef.c:2748
static void rna_def_userdef_theme_spaces_main(StructRNA *srna)
Definition: rna_userdef.c:1811
static void rna_def_userdef_theme_space_text(BlenderRNA *brna)
Definition: rna_userdef.c:2652
static void rna_def_userdef_theme_spaces_gpencil(StructRNA *srna)
Definition: rna_userdef.c:2102
static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
Definition: rna_userdef.c:1108
static void rna_def_userdef_input(BlenderRNA *brna)
Definition: rna_userdef.c:5641
static void rna_def_userdef_theme_space_buts(BlenderRNA *brna)
Definition: rna_userdef.c:2940
static void rna_def_userdef_filepaths(BlenderRNA *brna)
Definition: rna_userdef.c:6070
static const EnumPropertyItem audio_device_items[]
Definition: rna_userdef.c:69
#define USERDEF_TAG_DIRTY_PROPERTY_UPDATE_ENABLE
Definition: rna_userdef.c:1036
static void rna_def_userdef_autoexec_path_collection(BlenderRNA *brna, PropertyRNA *cprop)
Definition: rna_userdef.c:6406
static void rna_def_userdef_walk_navigation(BlenderRNA *brna)
Definition: rna_userdef.c:4311
static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
Definition: rna_userdef.c:3074
static void rna_def_userdef_themes(BlenderRNA *brna)
Definition: rna_userdef.c:3836
static void rna_def_userdef_theme_collection_color(BlenderRNA *brna)
Definition: rna_userdef.c:3627
static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
Definition: rna_userdef.c:2966
static void rna_def_userdef_theme_ui_wcol(BlenderRNA *brna)
Definition: rna_userdef.c:1142
static void rna_def_userdef_apps(BlenderRNA *brna)
Definition: rna_userdef.c:6257
static void rna_def_userdef_theme_space_gradient(BlenderRNA *brna)
Definition: rna_userdef.c:1743
static void rna_def_userdef_theme_space_topbar(BlenderRNA *brna)
Definition: rna_userdef.c:3787
static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
Definition: rna_userdef.c:1204
static void rna_def_userdef_solidlight(BlenderRNA *brna)
Definition: rna_userdef.c:4263
static void rna_def_userdef_theme_colorset(BlenderRNA *brna)
Definition: rna_userdef.c:3593
static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
Definition: rna_userdef.c:3231
static const EnumPropertyItem rna_enum_userdef_theme_background_types_items[]
Definition: rna_userdef.c:1293
static void rna_def_userdef_theme_ui_gradient(BlenderRNA *brna)
Definition: rna_userdef.c:1312
static void rna_def_userdef_studiolights(BlenderRNA *brna)
Definition: rna_userdef.c:4038
static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
Definition: rna_userdef.c:2122
static void rna_def_userdef_theme_space_generic(BlenderRNA *brna)
Definition: rna_userdef.c:1763
void RNA_def_userdef(BlenderRNA *brna)
Definition: rna_userdef.c:6432
static void rna_def_userdef_dothemes(BlenderRNA *brna)
Definition: rna_userdef.c:4229
static void rna_def_userdef_theme_space_clip(BlenderRNA *brna)
Definition: rna_userdef.c:3661
static void rna_def_userdef_keymap(BlenderRNA *brna)
Definition: rna_userdef.c:6025
static void rna_def_userdef_system(BlenderRNA *brna)
Definition: rna_userdef.c:5254
const EnumPropertyItem rna_enum_navigation_mode_items[]
Definition: rna_userdef.c:74
static void rna_def_userdef_experimental(BlenderRNA *brna)
Definition: rna_userdef.c:6286
static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
Definition: rna_userdef.c:3436
static void rna_def_userdef_theme_space_console(BlenderRNA *brna)
Definition: rna_userdef.c:2516
static size_t max_memory_in_megabytes(void)
Definition: rna_userdef.c:1046
static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
Definition: rna_userdef.c:2340
static void rna_def_userdef_theme_ui(BlenderRNA *brna)
Definition: rna_userdef.c:1343
static const EnumPropertyItem rna_enum_language_default_items[]
Definition: rna_userdef.c:85
static void rna_def_userdef_addon(BlenderRNA *brna)
Definition: rna_userdef.c:4018
static void rna_def_userdef_theme_spaces_gradient(StructRNA *srna)
Definition: rna_userdef.c:1822
static void rna_def_userdef_theme_spaces_face(StructRNA *srna)
Definition: rna_userdef.c:1919
static const EnumPropertyItem rna_enum_studio_light_type_items[]
Definition: rna_userdef.c:95
static void rna_def_userdef_theme_space_statusbar(BlenderRNA *brna)
Definition: rna_userdef.c:3801
const char * identifier
Definition: RNA_types.h:461
void * next
Definition: DNA_ID.h:369
void * first
Definition: DNA_listBase.h:31
Definition: BKE_main.h:121
ListBase wm
Definition: BKE_main.h:197
ListBase screens
Definition: BKE_main.h:183
ListBase objects
Definition: BKE_main.h:170
struct StructRNA * type
Definition: RNA_types.h:37
void * data
Definition: RNA_types.h:38
SolidLight light[STUDIOLIGHT_MAX_LIGHT]
char path[FILE_MAX]
float spherical_harmonics_coefs[STUDIOLIGHT_SH_EFFECTIVE_COEFS_LEN][3]
char * path_sh_cache
char name[FILE_MAXFILE]
char * path_irr_cache
float light_ambient[3]
short autokey_mode
float light_ambient[3]
char mouse_emulate_3_button_modifier
short v2d_min_gridsize
struct SolidLight light_param[4]
short timecode_style
float ndof_deadzone
IDProperty * prop
char module[64]
uiFontStyle widgetlabel
static FT_Library library
void WM_keyconfig_reload(bContext *C)
Definition: wm.c:424
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_file_autosave_init(wmWindowManager *wm)
Definition: wm_files.c:1984
PointerRNA * ptr
Definition: wm_files.c:3480
void WM_reinit_gizmomap_all(Main *bmain)
void WM_init_input_devices(void)
Definition: wm_window.c:2034