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