2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * Contributor(s): Blender Foundation (2008).
20 * ***** END GPL LICENSE BLOCK *****
23 /** \file blender/makesrna/intern/rna_userdef.c
29 #include "DNA_curve_types.h"
30 #include "DNA_space_types.h"
31 #include "DNA_userdef_types.h"
32 #include "DNA_brush_types.h"
33 #include "DNA_view3d_types.h"
34 #include "DNA_scene_types.h"
36 #include "BLI_utildefines.h"
38 #include "BKE_sound.h"
39 #include "BKE_addon.h"
41 #include "RNA_access.h"
42 #include "RNA_define.h"
43 #include "RNA_enum_types.h"
45 #include "rna_internal.h"
50 #include "BLF_translation.h"
53 static EnumPropertyItem compute_device_type_items[] = {
54 {USER_COMPUTE_DEVICE_NONE, "NONE", 0, "None", "Don't use compute device"},
55 {USER_COMPUTE_DEVICE_CUDA, "CUDA", 0, "CUDA", "Use CUDA for GPU acceleration"},
56 {USER_COMPUTE_DEVICE_OPENCL, "OPENCL", 0, "OpenCL", "Use OpenCL for GPU acceleration"},
57 { 0, NULL, 0, NULL, NULL}
63 #include "DNA_object_types.h"
64 #include "DNA_screen_types.h"
66 #include "BKE_blender.h"
67 #include "BKE_DerivedMesh.h"
68 #include "BKE_depsgraph.h"
69 #include "BKE_global.h"
71 #include "BKE_idprop.h"
77 #include "MEM_guardedalloc.h"
78 #include "MEM_CacheLimiterC-Api.h"
80 #include "UI_interface.h"
84 #include "BKE_addon.h"
86 static void rna_userdef_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
88 WM_main_add_notifier(NC_WINDOW, NULL);
91 /* also used by buffer swap switching */
92 static void rna_userdef_dpi_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
95 WM_main_add_notifier(NC_WINDOW, NULL); /* full redraw */
96 WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); /* refresh region sizes */
99 static void rna_userdef_language_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
106 static void rna_userdef_show_manipulator_update(Main *bmain, Scene *scene, PointerRNA *ptr)
108 UserDef *userdef = (UserDef *)ptr->data;
110 /* lame, loop over all views and set */
115 /* from scene copy to the other views */
116 for (sc = bmain->screen.first; sc; sc = sc->id.next) {
117 for (sa = sc->areabase.first; sa; sa = sa->next) {
118 for (sl = sa->spacedata.first; sl; sl = sl->next) {
119 if (sl->spacetype == SPACE_VIEW3D) {
120 View3D *v3d = (View3D *)sl;
121 if (userdef->tw_flag & V3D_USE_MANIPULATOR)
122 v3d->twflag |= V3D_USE_MANIPULATOR;
124 v3d->twflag &= ~V3D_USE_MANIPULATOR;
130 rna_userdef_update(bmain, scene, ptr);
134 static void rna_userdef_script_autoexec_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
136 UserDef *userdef = (UserDef *)ptr->data;
137 if (userdef->flag & USER_SCRIPT_AUTOEXEC_DISABLE) G.f &= ~G_SCRIPT_AUTOEXEC;
138 else G.f |= G_SCRIPT_AUTOEXEC;
141 static void rna_userdef_mipmap_update(Main *bmain, Scene *scene, PointerRNA *ptr)
143 GPU_set_mipmap(!(U.gameflags & USER_DISABLE_MIPMAP));
144 rna_userdef_update(bmain, scene, ptr);
147 static void rna_userdef_anisotropic_update(Main *bmain, Scene *scene, PointerRNA *ptr)
149 GPU_set_anisotropic(U.anisotropic_filter);
150 rna_userdef_update(bmain, scene, ptr);
153 static void rna_userdef_gl_gpu_mipmaps(Main *bmain, Scene *scene, PointerRNA *ptr)
155 GPU_set_gpu_mipmapping(U.use_gpu_mipmap);
156 rna_userdef_update(bmain, scene, ptr);
159 static void rna_userdef_gl_texture_limit_update(Main *bmain, Scene *scene, PointerRNA *ptr)
162 rna_userdef_update(bmain, scene, ptr);
165 static void rna_userdef_gl_use_16bit_textures(Main *bmain, Scene *scene, PointerRNA *ptr)
168 rna_userdef_update(bmain, scene, ptr);
171 static void rna_userdef_select_mouse_set(PointerRNA *ptr, int value)
173 UserDef *userdef = (UserDef *)ptr->data;
176 userdef->flag |= USER_LMOUSESELECT;
177 userdef->flag &= ~USER_TWOBUTTONMOUSE;
180 userdef->flag &= ~USER_LMOUSESELECT;
183 static int rna_userdef_autokeymode_get(PointerRNA *ptr)
185 UserDef *userdef = (UserDef *)ptr->data;
186 short retval = userdef->autokey_mode;
188 if (!(userdef->autokey_mode & AUTOKEY_ON))
189 retval |= AUTOKEY_ON;
194 static void rna_userdef_autokeymode_set(PointerRNA *ptr, int value)
196 UserDef *userdef = (UserDef *)ptr->data;
198 if (value == AUTOKEY_MODE_NORMAL) {
199 userdef->autokey_mode |= (AUTOKEY_MODE_NORMAL - AUTOKEY_ON);
200 userdef->autokey_mode &= ~(AUTOKEY_MODE_EDITKEYS - AUTOKEY_ON);
202 else if (value == AUTOKEY_MODE_EDITKEYS) {
203 userdef->autokey_mode |= (AUTOKEY_MODE_EDITKEYS - AUTOKEY_ON);
204 userdef->autokey_mode &= ~(AUTOKEY_MODE_NORMAL - AUTOKEY_ON);
208 static void rna_userdef_timecode_style_set(PointerRNA *ptr, int value)
210 UserDef *userdef = (UserDef *)ptr->data;
211 int required_size = userdef->v2d_min_gridsize;
213 /* set the timecode style */
214 userdef->timecode_style = value;
216 /* adjust the v2d gridsize if needed so that timecodes don't overlap
217 * NOTE: most of these have been hand-picked to avoid overlaps while still keeping
218 * things from getting too blown out
221 case USER_TIMECODE_MINIMAL:
222 case USER_TIMECODE_SECONDS_ONLY:
223 /* 35 is great most of the time, but not that great for full-blown */
226 case USER_TIMECODE_SMPTE_MSF:
229 case USER_TIMECODE_SMPTE_FULL:
230 /* the granddaddy! */
233 case USER_TIMECODE_MILLISECONDS:
238 if (U.v2d_min_gridsize < required_size)
239 U.v2d_min_gridsize = required_size;
242 static PointerRNA rna_UserDef_view_get(PointerRNA *ptr)
244 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesView, ptr->data);
247 static PointerRNA rna_UserDef_edit_get(PointerRNA *ptr)
249 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesEdit, ptr->data);
252 static PointerRNA rna_UserDef_input_get(PointerRNA *ptr)
254 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesInput, ptr->data);
257 static PointerRNA rna_UserDef_filepaths_get(PointerRNA *ptr)
259 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesFilePaths, ptr->data);
262 static PointerRNA rna_UserDef_system_get(PointerRNA *ptr)
264 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesSystem, ptr->data);
267 static void rna_UserDef_audio_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
272 static void rna_Userdef_memcache_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
274 MEM_CacheLimiter_set_maximum(((size_t) U.memcachelimit) * 1024 * 1024);
277 static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRNA *ptr)
281 bTheme *btheme = UI_GetTheme();
282 vDM_ColorBand_store((U.flag & USER_CUSTOM_RANGE) ? (&U.coba_weight) : NULL, btheme->tv3d.vertex_unreferenced);
284 for (ob = bmain->object.first; ob; ob = ob->id.next) {
285 if (ob->mode & OB_MODE_WEIGHT_PAINT)
286 DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
289 rna_userdef_update(bmain, scene, ptr);
292 static void rna_UserDef_viewport_lights_update(Main *bmain, Scene *scene, PointerRNA *ptr)
294 /* if all lights are off gpu_draw resets them all, [#27627]
295 * so disallow them all to be disabled */
296 if (U.light[0].flag == 0 && U.light[1].flag == 0 && U.light[2].flag == 0) {
297 SolidLight *light = ptr->data;
301 WM_main_add_notifier(NC_SPACE | ND_SPACE_VIEW3D | NS_VIEW3D_GPU, NULL);
302 rna_userdef_update(bmain, scene, ptr);
305 static void rna_userdef_autosave_update(Main *bmain, Scene *scene, PointerRNA *ptr)
307 wmWindowManager *wm = bmain->wm.first;
310 WM_autosave_init(wm);
311 rna_userdef_update(bmain, scene, ptr);
314 static bAddon *rna_userdef_addon_new(void)
316 bAddon *bext = MEM_callocN(sizeof(bAddon), "bAddon");
317 BLI_addtail(&U.addons, bext);
321 static void rna_userdef_addon_remove(ReportList *reports, PointerRNA *bext_ptr)
323 bAddon *bext = bext_ptr->data;
324 if (BLI_findindex(&U.addons, bext) == -1) {
325 BKE_report(reports, RPT_ERROR, "Addon is no longer valid");
330 IDP_FreeProperty(bext->prop);
331 MEM_freeN(bext->prop);
334 BLI_freelinkN(&U.addons, bext);
335 RNA_POINTER_INVALIDATE(bext_ptr);
338 static void rna_userdef_temp_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
340 BLI_init_temporary_dir(U.tempdir);
343 static void rna_userdef_text_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
346 WM_main_add_notifier(NC_WINDOW, NULL);
349 static PointerRNA rna_Theme_space_generic_get(PointerRNA *ptr)
351 return rna_pointer_inherit_refine(ptr, &RNA_ThemeSpaceGeneric, ptr->data);
354 static PointerRNA rna_Theme_space_gradient_get(PointerRNA *ptr)
356 return rna_pointer_inherit_refine(ptr, &RNA_ThemeSpaceGradient, ptr->data);
359 static PointerRNA rna_Theme_space_list_generic_get(PointerRNA *ptr)
361 return rna_pointer_inherit_refine(ptr, &RNA_ThemeSpaceListGeneric, ptr->data);
366 static EnumPropertyItem *rna_userdef_compute_device_type_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
367 PropertyRNA *UNUSED(prop), int *free)
369 EnumPropertyItem *item = NULL;
372 /* add supported device types */
373 RNA_enum_items_add_value(&item, &totitem, compute_device_type_items, USER_COMPUTE_DEVICE_NONE);
374 if (CCL_compute_device_list(0))
375 RNA_enum_items_add_value(&item, &totitem, compute_device_type_items, USER_COMPUTE_DEVICE_CUDA);
376 if (CCL_compute_device_list(1))
377 RNA_enum_items_add_value(&item, &totitem, compute_device_type_items, USER_COMPUTE_DEVICE_OPENCL);
379 RNA_enum_item_end(&item, &totitem);
385 static int rna_userdef_compute_device_get(PointerRNA *UNUSED(ptr))
387 if (U.compute_device_type == USER_COMPUTE_DEVICE_NONE)
390 return U.compute_device_id;
393 static EnumPropertyItem *rna_userdef_compute_device_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
394 PropertyRNA *UNUSED(prop), int *free)
396 EnumPropertyItem tmp = {0, "", 0, "", ""};
397 EnumPropertyItem *item = NULL;
400 if (U.compute_device_type == USER_COMPUTE_DEVICE_NONE) {
401 /* only add a single CPU device */
404 tmp.identifier = "CPU";
405 RNA_enum_item_add(&item, &totitem, &tmp);
408 /* get device list from cycles. it would be good to make this generic
409 * once we have more subsystems using opencl, for now this is easiest */
410 int opencl = (U.compute_device_type == USER_COMPUTE_DEVICE_OPENCL);
411 CCLDeviceInfo *devices = CCL_compute_device_list(opencl);
415 for (a = 0; devices[a].identifier[0]; a++) {
416 tmp.value = devices[a].value;
417 tmp.identifier = devices[a].identifier;
418 tmp.name = devices[a].name;
419 RNA_enum_item_add(&item, &totitem, &tmp);
425 tmp.identifier = "CPU";
426 RNA_enum_item_add(&item, &totitem, &tmp);
430 RNA_enum_item_end(&item, &totitem);
437 #ifdef WITH_INTERNATIONAL
438 static EnumPropertyItem *rna_lang_enum_properties_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr),
439 PropertyRNA *UNUSED(prop), int *free)
441 *free = 0; /* These items are handled by BLF code! */
442 return BLF_RNA_lang_enum_properties();
446 static IDProperty *rna_AddonPref_idprops(PointerRNA *ptr, bool create)
448 if (create && !ptr->data) {
449 IDPropertyTemplate val = {0};
450 ptr->data = IDP_New(IDP_GROUP, &val, "RNA_AddonPreferences group");
456 static PointerRNA rna_Addon_preferences_get(PointerRNA *ptr)
458 bAddon *addon = (bAddon *)ptr->data;
459 bAddonPrefType *apt = BKE_addon_pref_type_find(addon->module, TRUE);
461 if (addon->prop == NULL) {
462 IDPropertyTemplate val = {0};
463 addon->prop = IDP_New(IDP_GROUP, &val, addon->module); /* name is unimportant */
465 return rna_pointer_inherit_refine(ptr, apt->ext.srna, addon->prop);
468 return PointerRNA_NULL;
472 static void rna_AddonPref_unregister(Main *UNUSED(bmain), StructRNA *type)
474 bAddonPrefType *apt = RNA_struct_blender_type_get(type);
479 RNA_struct_free_extension(type, &apt->ext);
481 BKE_addon_pref_type_remove(apt);
482 RNA_struct_free(&BLENDER_RNA, type);
484 /* update while blender is running */
485 WM_main_add_notifier(NC_WINDOW, NULL);
488 static StructRNA *rna_AddonPref_register(Main *bmain, ReportList *reports, void *data, const char *identifier,
489 StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
491 bAddonPrefType *apt, dummyapt = {{'\0'}};
492 bAddon dummyaddon = {NULL};
494 // int have_function[1];
496 /* setup dummy header & header type to store static properties in */
497 RNA_pointer_create(NULL, &RNA_AddonPreferences, &dummyaddon, &dummyhtr);
499 /* validate the python class */
500 if (validate(&dummyhtr, data, NULL /* have_function */ ) != 0)
503 BLI_strncpy(dummyapt.idname, dummyaddon.module, sizeof(dummyapt.idname));
504 if (strlen(identifier) >= sizeof(dummyapt.idname)) {
505 BKE_reportf(reports, RPT_ERROR, "Registering addon-prefs class: '%s' is too long, maximum length is %d",
506 identifier, (int)sizeof(dummyapt.idname));
510 /* check if we have registered this header type before, and remove it */
511 apt = BKE_addon_pref_type_find(dummyaddon.module, TRUE);
514 rna_AddonPref_unregister(bmain, apt->ext.srna);
518 /* create a new header type */
519 apt = MEM_mallocN(sizeof(bAddonPrefType), "addonpreftype");
520 memcpy(apt, &dummyapt, sizeof(dummyapt));
521 BKE_addon_pref_type_add(apt);
523 apt->ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, identifier, &RNA_AddonPreferences);
524 apt->ext.data = data;
525 apt->ext.call = call;
526 apt->ext.free = free;
527 RNA_struct_blender_type_set(apt->ext.srna, apt);
529 // apt->draw = (have_function[0]) ? header_draw : NULL;
531 /* update while blender is running */
532 WM_main_add_notifier(NC_WINDOW, NULL);
534 return apt->ext.srna;
537 /* placeholder, doesn't do anything useful yet */
538 static StructRNA *rna_AddonPref_refine(PointerRNA *ptr)
540 return (ptr->type) ? ptr->type : &RNA_AddonPreferences;
545 static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
550 static EnumPropertyItem font_kerning_style[] = {
551 {0, "UNFITTED", 0, "Unfitted", "Use scaled but un-grid-fitted kerning distances"},
552 {1, "FITTED", 0, "Fitted", "Use scaled and grid-fitted kerning distances"},
553 {0, NULL, 0, NULL, NULL}
556 srna = RNA_def_struct(brna, "ThemeFontStyle", NULL);
557 RNA_def_struct_sdna(srna, "uiFontStyle");
558 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
559 RNA_def_struct_ui_text(srna, "Font Style", "Theme settings for Font");
561 prop = RNA_def_property(srna, "points", PROP_INT, PROP_NONE);
562 RNA_def_property_range(prop, 6, 48);
563 RNA_def_property_ui_text(prop, "Points", "");
564 RNA_def_property_update(prop, 0, "rna_userdef_update");
566 prop = RNA_def_property(srna, "font_kerning_style", PROP_ENUM, PROP_NONE);
567 RNA_def_property_enum_sdna(prop, NULL, "kerning");
568 RNA_def_property_enum_items(prop, font_kerning_style);
569 RNA_def_property_ui_text(prop, "Kerning Style", "Which style to use for font kerning");
570 RNA_def_property_update(prop, 0, "rna_userdef_update");
572 prop = RNA_def_property(srna, "shadow", PROP_INT, PROP_NONE);
573 RNA_def_property_range(prop, 0, 5);
574 RNA_def_property_ui_text(prop, "Shadow Size", "Shadow size in pixels (0, 3 and 5 supported)");
575 RNA_def_property_update(prop, 0, "rna_userdef_update");
577 prop = RNA_def_property(srna, "shadow_offset_x", PROP_INT, PROP_NONE);
578 RNA_def_property_int_sdna(prop, NULL, "shadx");
579 RNA_def_property_range(prop, -10, 10);
580 RNA_def_property_ui_text(prop, "Shadow X Offset", "Shadow offset in pixels");
581 RNA_def_property_update(prop, 0, "rna_userdef_update");
583 prop = RNA_def_property(srna, "shadow_offset_y", PROP_INT, PROP_NONE);
584 RNA_def_property_int_sdna(prop, NULL, "shady");
585 RNA_def_property_range(prop, -10, 10);
586 RNA_def_property_ui_text(prop, "Shadow Y Offset", "Shadow offset in pixels");
587 RNA_def_property_update(prop, 0, "rna_userdef_update");
589 prop = RNA_def_property(srna, "shadowalpha", PROP_FLOAT, PROP_NONE);
590 RNA_def_property_range(prop, 0.0f, 1.0f);
591 RNA_def_property_ui_text(prop, "Shadow Alpha", "");
592 RNA_def_property_update(prop, 0, "rna_userdef_update");
594 prop = RNA_def_property(srna, "shadowcolor", PROP_FLOAT, PROP_NONE);
595 RNA_def_property_range(prop, 0.0f, 1.0f);
596 RNA_def_property_ui_text(prop, "Shadow Brightness", "Shadow color in gray value");
597 RNA_def_property_update(prop, 0, "rna_userdef_update");
600 static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
605 rna_def_userdef_theme_ui_font_style(brna);
607 srna = RNA_def_struct(brna, "ThemeStyle", NULL);
608 RNA_def_struct_sdna(srna, "uiStyle");
609 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
610 RNA_def_struct_ui_text(srna, "Style", "Theme settings for style sets");
613 prop = RNA_def_property(srna, "panel_title", PROP_POINTER, PROP_NONE);
614 RNA_def_property_flag(prop, PROP_NEVER_NULL);
615 RNA_def_property_pointer_sdna(prop, NULL, "paneltitle");
616 RNA_def_property_struct_type(prop, "ThemeFontStyle");
617 RNA_def_property_ui_text(prop, "Panel Title Font", "");
618 RNA_def_property_update(prop, 0, "rna_userdef_update");
620 prop = RNA_def_property(srna, "widget_label", PROP_POINTER, PROP_NONE);
621 RNA_def_property_flag(prop, PROP_NEVER_NULL);
622 RNA_def_property_pointer_sdna(prop, NULL, "widgetlabel");
623 RNA_def_property_struct_type(prop, "ThemeFontStyle");
624 RNA_def_property_ui_text(prop, "Widget Label Style", "");
625 RNA_def_property_update(prop, 0, "rna_userdef_update");
627 prop = RNA_def_property(srna, "widget", PROP_POINTER, PROP_NONE);
628 RNA_def_property_flag(prop, PROP_NEVER_NULL);
629 RNA_def_property_pointer_sdna(prop, NULL, "widget");
630 RNA_def_property_struct_type(prop, "ThemeFontStyle");
631 RNA_def_property_ui_text(prop, "Widget Style", "");
632 RNA_def_property_update(prop, 0, "rna_userdef_update");
636 static void rna_def_userdef_theme_ui_wcol(BlenderRNA *brna)
641 srna = RNA_def_struct(brna, "ThemeWidgetColors", NULL);
642 RNA_def_struct_sdna(srna, "uiWidgetColors");
643 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
644 RNA_def_struct_ui_text(srna, "Theme Widget Color Set", "Theme settings for widget color sets");
646 prop = RNA_def_property(srna, "outline", PROP_FLOAT, PROP_COLOR_GAMMA);
647 RNA_def_property_array(prop, 3);
648 RNA_def_property_ui_text(prop, "Outline", "");
649 RNA_def_property_update(prop, 0, "rna_userdef_update");
651 prop = RNA_def_property(srna, "inner", PROP_FLOAT, PROP_COLOR_GAMMA);
652 RNA_def_property_array(prop, 4);
653 RNA_def_property_ui_text(prop, "Inner", "");
654 RNA_def_property_update(prop, 0, "rna_userdef_update");
656 prop = RNA_def_property(srna, "inner_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
657 RNA_def_property_array(prop, 4);
658 RNA_def_property_ui_text(prop, "Inner Selected", "");
659 RNA_def_property_update(prop, 0, "rna_userdef_update");
661 prop = RNA_def_property(srna, "item", PROP_FLOAT, PROP_COLOR_GAMMA);
662 RNA_def_property_array(prop, 4);
663 RNA_def_property_ui_text(prop, "Item", "");
664 RNA_def_property_update(prop, 0, "rna_userdef_update");
666 prop = RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR_GAMMA);
667 RNA_def_property_array(prop, 3);
668 RNA_def_property_ui_text(prop, "Text", "");
669 RNA_def_property_update(prop, 0, "rna_userdef_update");
671 prop = RNA_def_property(srna, "text_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
672 RNA_def_property_array(prop, 3);
673 RNA_def_property_ui_text(prop, "Text Selected", "");
674 RNA_def_property_update(prop, 0, "rna_userdef_update");
676 prop = RNA_def_property(srna, "show_shaded", PROP_BOOLEAN, PROP_NONE);
677 RNA_def_property_boolean_sdna(prop, NULL, "shaded", 1);
678 RNA_def_property_ui_text(prop, "Shaded", "");
679 RNA_def_property_update(prop, 0, "rna_userdef_update");
681 prop = RNA_def_property(srna, "shadetop", PROP_INT, PROP_NONE);
682 RNA_def_property_range(prop, -100, 100);
683 RNA_def_property_ui_text(prop, "Shade Top", "");
684 RNA_def_property_update(prop, 0, "rna_userdef_update");
686 prop = RNA_def_property(srna, "shadedown", PROP_INT, PROP_NONE);
687 RNA_def_property_range(prop, -100, 100);
688 RNA_def_property_ui_text(prop, "Shade Down", "");
689 RNA_def_property_update(prop, 0, "rna_userdef_update");
692 static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
697 srna = RNA_def_struct(brna, "ThemeWidgetStateColors", NULL);
698 RNA_def_struct_sdna(srna, "uiWidgetStateColors");
699 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
700 RNA_def_struct_ui_text(srna, "Theme Widget State Color", "Theme settings for widget state colors");
702 prop = RNA_def_property(srna, "inner_anim", PROP_FLOAT, PROP_COLOR_GAMMA);
703 RNA_def_property_array(prop, 3);
704 RNA_def_property_ui_text(prop, "Animated", "");
705 RNA_def_property_update(prop, 0, "rna_userdef_update");
707 prop = RNA_def_property(srna, "inner_anim_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
708 RNA_def_property_array(prop, 3);
709 RNA_def_property_ui_text(prop, "Animated Selected", "");
710 RNA_def_property_update(prop, 0, "rna_userdef_update");
712 prop = RNA_def_property(srna, "inner_key", PROP_FLOAT, PROP_COLOR_GAMMA);
713 RNA_def_property_array(prop, 3);
714 RNA_def_property_ui_text(prop, "Keyframe", "");
715 RNA_def_property_update(prop, 0, "rna_userdef_update");
717 prop = RNA_def_property(srna, "inner_key_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
718 RNA_def_property_array(prop, 3);
719 RNA_def_property_ui_text(prop, "Keyframe Selected", "");
720 RNA_def_property_update(prop, 0, "rna_userdef_update");
722 prop = RNA_def_property(srna, "inner_driven", PROP_FLOAT, PROP_COLOR_GAMMA);
723 RNA_def_property_array(prop, 3);
724 RNA_def_property_ui_text(prop, "Driven", "");
725 RNA_def_property_update(prop, 0, "rna_userdef_update");
727 prop = RNA_def_property(srna, "inner_driven_sel", PROP_FLOAT, PROP_COLOR_GAMMA);
728 RNA_def_property_array(prop, 3);
729 RNA_def_property_ui_text(prop, "Driven Selected", "");
730 RNA_def_property_update(prop, 0, "rna_userdef_update");
732 prop = RNA_def_property(srna, "blend", PROP_FLOAT, PROP_FACTOR);
733 RNA_def_property_ui_text(prop, "Blend", "");
734 RNA_def_property_update(prop, 0, "rna_userdef_update");
737 static void rna_def_userdef_theme_ui_panel(BlenderRNA *brna)
742 srna = RNA_def_struct(brna, "ThemePanelColors", NULL);
743 RNA_def_struct_sdna(srna, "uiPanelColors");
744 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
745 RNA_def_struct_ui_text(srna, "Theme Panel Color", "Theme settings for panel colors");
747 prop = RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR_GAMMA);
748 RNA_def_property_ui_text(prop, "Header", "");
749 RNA_def_property_update(prop, 0, "rna_userdef_update");
751 prop = RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR_GAMMA);
752 RNA_def_property_ui_text(prop, "Background", "");
753 RNA_def_property_update(prop, 0, "rna_userdef_update");
755 prop = RNA_def_property(srna, "show_header", PROP_BOOLEAN, PROP_NONE);
756 RNA_def_property_ui_text(prop, "Show Header", "");
757 RNA_def_property_update(prop, 0, "rna_userdef_update");
759 prop = RNA_def_property(srna, "show_back", PROP_BOOLEAN, PROP_NONE);
760 RNA_def_property_ui_text(prop, "Show Background", "");
761 RNA_def_property_update(prop, 0, "rna_userdef_update");
764 static void rna_def_userdef_theme_ui_gradient(BlenderRNA *brna)
769 srna = RNA_def_struct(brna, "ThemeGradientColors", NULL);
770 RNA_def_struct_sdna(srna, "uiGradientColors");
771 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
772 RNA_def_struct_ui_text(srna, "Theme Background Color", "Theme settings for background colors and gradient");
774 prop = RNA_def_property(srna, "show_grad", PROP_BOOLEAN, PROP_NONE);
775 RNA_def_property_ui_text(prop, "Use Gradient",
776 "Do a gradient for the background of the viewport working area");
777 RNA_def_property_update(prop, 0, "rna_userdef_update");
779 prop = RNA_def_property(srna, "gradient", PROP_FLOAT, PROP_COLOR_GAMMA);
780 RNA_def_property_array(prop, 3);
781 RNA_def_property_ui_text(prop, "Gradient Low", "");
782 RNA_def_property_update(prop, 0, "rna_userdef_update");
784 prop = RNA_def_property(srna, "high_gradient", PROP_FLOAT, PROP_COLOR_GAMMA);
785 RNA_def_property_array(prop, 3);
786 RNA_def_property_ui_text(prop, "Gradient High/Off", "");
787 RNA_def_property_update(prop, 0, "rna_userdef_update");
790 static void rna_def_userdef_theme_ui(BlenderRNA *brna)
795 rna_def_userdef_theme_ui_wcol(brna);
796 rna_def_userdef_theme_ui_wcol_state(brna);
797 rna_def_userdef_theme_ui_panel(brna);
798 rna_def_userdef_theme_ui_gradient(brna);
800 srna = RNA_def_struct(brna, "ThemeUserInterface", NULL);
801 RNA_def_struct_sdna(srna, "ThemeUI");
802 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
803 RNA_def_struct_ui_text(srna, "Theme User Interface", "Theme settings for user interface elements");
805 prop = RNA_def_property(srna, "wcol_regular", PROP_POINTER, PROP_NONE);
806 RNA_def_property_flag(prop, PROP_NEVER_NULL);
807 RNA_def_property_ui_text(prop, "Regular Widget Colors", "");
808 RNA_def_property_update(prop, 0, "rna_userdef_update");
810 prop = RNA_def_property(srna, "wcol_tool", PROP_POINTER, PROP_NONE);
811 RNA_def_property_flag(prop, PROP_NEVER_NULL);
812 RNA_def_property_ui_text(prop, "Tool Widget Colors", "");
813 RNA_def_property_update(prop, 0, "rna_userdef_update");
815 prop = RNA_def_property(srna, "wcol_radio", PROP_POINTER, PROP_NONE);
816 RNA_def_property_flag(prop, PROP_NEVER_NULL);
817 RNA_def_property_ui_text(prop, "Radio Widget Colors", "");
818 RNA_def_property_update(prop, 0, "rna_userdef_update");
820 prop = RNA_def_property(srna, "wcol_text", PROP_POINTER, PROP_NONE);
821 RNA_def_property_flag(prop, PROP_NEVER_NULL);
822 RNA_def_property_ui_text(prop, "Text Widget Colors", "");
823 RNA_def_property_update(prop, 0, "rna_userdef_update");
825 prop = RNA_def_property(srna, "wcol_option", PROP_POINTER, PROP_NONE);
826 RNA_def_property_flag(prop, PROP_NEVER_NULL);
827 RNA_def_property_ui_text(prop, "Option Widget Colors", "");
828 RNA_def_property_update(prop, 0, "rna_userdef_update");
830 prop = RNA_def_property(srna, "wcol_toggle", PROP_POINTER, PROP_NONE);
831 RNA_def_property_flag(prop, PROP_NEVER_NULL);
832 RNA_def_property_ui_text(prop, "Toggle Widget Colors", "");
833 RNA_def_property_update(prop, 0, "rna_userdef_update");
835 prop = RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NONE);
836 RNA_def_property_flag(prop, PROP_NEVER_NULL);
837 RNA_def_property_ui_text(prop, "Number Widget Colors", "");
838 RNA_def_property_update(prop, 0, "rna_userdef_update");
840 prop = RNA_def_property(srna, "wcol_numslider", PROP_POINTER, PROP_NONE);
841 RNA_def_property_flag(prop, PROP_NEVER_NULL);
842 RNA_def_property_ui_text(prop, "Slider Widget Colors", "");
843 RNA_def_property_update(prop, 0, "rna_userdef_update");
845 prop = RNA_def_property(srna, "wcol_box", PROP_POINTER, PROP_NONE);
846 RNA_def_property_flag(prop, PROP_NEVER_NULL);
847 RNA_def_property_ui_text(prop, "Box Backdrop Colors", "");
848 RNA_def_property_update(prop, 0, "rna_userdef_update");
850 prop = RNA_def_property(srna, "wcol_menu", PROP_POINTER, PROP_NONE);
851 RNA_def_property_flag(prop, PROP_NEVER_NULL);
852 RNA_def_property_ui_text(prop, "Menu Widget Colors", "");
853 RNA_def_property_update(prop, 0, "rna_userdef_update");
855 prop = RNA_def_property(srna, "wcol_pulldown", PROP_POINTER, PROP_NONE);
856 RNA_def_property_flag(prop, PROP_NEVER_NULL);
857 RNA_def_property_ui_text(prop, "Pulldown Widget Colors", "");
858 RNA_def_property_update(prop, 0, "rna_userdef_update");
860 prop = RNA_def_property(srna, "wcol_menu_back", PROP_POINTER, PROP_NONE);
861 RNA_def_property_flag(prop, PROP_NEVER_NULL);
862 RNA_def_property_ui_text(prop, "Menu Backdrop Colors", "");
863 RNA_def_property_update(prop, 0, "rna_userdef_update");
864 prop = RNA_def_property(srna, "wcol_tooltip", PROP_POINTER, PROP_NONE);
865 RNA_def_property_flag(prop, PROP_NEVER_NULL);
866 RNA_def_property_ui_text(prop, "Tooltip Colors", "");
867 RNA_def_property_update(prop, 0, "rna_userdef_update");
869 prop = RNA_def_property(srna, "wcol_menu_item", PROP_POINTER, PROP_NONE);
870 RNA_def_property_flag(prop, PROP_NEVER_NULL);
871 RNA_def_property_ui_text(prop, "Menu Item Colors", "");
872 RNA_def_property_update(prop, 0, "rna_userdef_update");
874 prop = RNA_def_property(srna, "wcol_scroll", PROP_POINTER, PROP_NONE);
875 RNA_def_property_flag(prop, PROP_NEVER_NULL);
876 RNA_def_property_ui_text(prop, "Scroll Widget Colors", "");
877 RNA_def_property_update(prop, 0, "rna_userdef_update");
879 prop = RNA_def_property(srna, "wcol_progress", PROP_POINTER, PROP_NONE);
880 RNA_def_property_flag(prop, PROP_NEVER_NULL);
881 RNA_def_property_ui_text(prop, "Progress Bar Widget Colors", "");
882 RNA_def_property_update(prop, 0, "rna_userdef_update");
884 prop = RNA_def_property(srna, "wcol_list_item", PROP_POINTER, PROP_NONE);
885 RNA_def_property_flag(prop, PROP_NEVER_NULL);
886 RNA_def_property_ui_text(prop, "List Item Colors", "");
887 RNA_def_property_update(prop, 0, "rna_userdef_update");
889 prop = RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NONE);
890 RNA_def_property_flag(prop, PROP_NEVER_NULL);
891 RNA_def_property_ui_text(prop, "State Colors", "");
892 RNA_def_property_update(prop, 0, "rna_userdef_update");
894 prop = RNA_def_property(srna, "menu_shadow_fac", PROP_FLOAT, PROP_FACTOR);
895 RNA_def_property_ui_text(prop, "Menu Shadow Strength", "Blending factor for menu shadows");
896 RNA_def_property_range(prop, 0.01f, 1.0f);
897 RNA_def_property_update(prop, 0, "rna_userdef_update");
899 prop = RNA_def_property(srna, "menu_shadow_width", PROP_INT, PROP_NONE);
900 RNA_def_property_ui_text(prop, "Menu Shadow Width", "Width of menu shadows in standard pixels, set to zero to disable it");
901 RNA_def_property_range(prop, 0.0f, 24.0f);
902 RNA_def_property_update(prop, 0, "rna_userdef_update");
904 prop = RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH);
905 RNA_def_property_string_sdna(prop, NULL, "iconfile");
906 RNA_def_property_ui_text(prop, "Icon File", "");
907 RNA_def_property_update(prop, 0, "rna_userdef_update");
909 prop = RNA_def_property(srna, "icon_alpha", PROP_FLOAT, PROP_FACTOR);
910 RNA_def_property_ui_text(prop, "Icon Alpha", "Transparency of icons in the interface, to reduce contrast");
911 RNA_def_property_update(prop, 0, "rna_userdef_update");
914 prop = RNA_def_property(srna, "axis_x", PROP_FLOAT, PROP_COLOR_GAMMA);
915 RNA_def_property_float_sdna(prop, NULL, "xaxis");
916 RNA_def_property_array(prop, 3);
917 RNA_def_property_ui_text(prop, "X Axis", "");
918 RNA_def_property_update(prop, 0, "rna_userdef_update");
920 prop = RNA_def_property(srna, "axis_y", PROP_FLOAT, PROP_COLOR_GAMMA);
921 RNA_def_property_float_sdna(prop, NULL, "yaxis");
922 RNA_def_property_array(prop, 3);
923 RNA_def_property_ui_text(prop, "Y Axis", "");
924 RNA_def_property_update(prop, 0, "rna_userdef_update");
926 prop = RNA_def_property(srna, "axis_z", PROP_FLOAT, PROP_COLOR_GAMMA);
927 RNA_def_property_float_sdna(prop, NULL, "zaxis");
928 RNA_def_property_array(prop, 3);
929 RNA_def_property_ui_text(prop, "Z Axis", "");
930 RNA_def_property_update(prop, 0, "rna_userdef_update");
933 static void rna_def_userdef_theme_space_generic(BlenderRNA *brna)
938 srna = RNA_def_struct(brna, "ThemeSpaceGeneric", NULL);
939 RNA_def_struct_sdna(srna, "ThemeSpace");
940 RNA_def_struct_ui_text(srna, "Theme Space Settings", "");
943 prop = RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR_GAMMA);
944 RNA_def_property_array(prop, 3);
945 RNA_def_property_ui_text(prop, "Window Background", "");
946 RNA_def_property_update(prop, 0, "rna_userdef_update");
948 prop = RNA_def_property(srna, "title", PROP_FLOAT, PROP_COLOR_GAMMA);
949 RNA_def_property_array(prop, 3);
950 RNA_def_property_ui_text(prop, "Title", "");
951 RNA_def_property_update(prop, 0, "rna_userdef_update");
953 prop = RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR_GAMMA);
954 RNA_def_property_array(prop, 3);
955 RNA_def_property_ui_text(prop, "Text", "");
956 RNA_def_property_update(prop, 0, "rna_userdef_update");
958 prop = RNA_def_property(srna, "text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
959 RNA_def_property_array(prop, 3);
960 RNA_def_property_ui_text(prop, "Text Highlight", "");
961 RNA_def_property_update(prop, 0, "rna_userdef_update");
964 prop = RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR_GAMMA);
965 RNA_def_property_array(prop, 3);
966 RNA_def_property_ui_text(prop, "Header", "");
967 RNA_def_property_update(prop, 0, "rna_userdef_update");
969 prop = RNA_def_property(srna, "header_text", PROP_FLOAT, PROP_COLOR_GAMMA);
970 RNA_def_property_array(prop, 3);
971 RNA_def_property_ui_text(prop, "Header Text", "");
972 RNA_def_property_update(prop, 0, "rna_userdef_update");
974 prop = RNA_def_property(srna, "header_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
975 RNA_def_property_array(prop, 3);
976 RNA_def_property_ui_text(prop, "Header Text Highlight", "");
977 RNA_def_property_update(prop, 0, "rna_userdef_update");
980 prop = RNA_def_property(srna, "panelcolors", PROP_POINTER, PROP_NONE);
981 RNA_def_property_flag(prop, PROP_NEVER_NULL);
982 RNA_def_property_ui_text(prop, "Panel Colors", "");
983 RNA_def_property_update(prop, 0, "rna_userdef_update");
986 /* if (! ELEM(spacetype, SPACE_BUTS, SPACE_OUTLINER)) { */
987 prop = RNA_def_property(srna, "button", PROP_FLOAT, PROP_COLOR_GAMMA);
988 RNA_def_property_array(prop, 4);
989 RNA_def_property_ui_text(prop, "Region Background", "");
990 RNA_def_property_update(prop, 0, "rna_userdef_update");
992 prop = RNA_def_property(srna, "button_title", PROP_FLOAT, PROP_COLOR_GAMMA);
993 RNA_def_property_array(prop, 3);
994 RNA_def_property_ui_text(prop, "Region Text Titles", "");
995 RNA_def_property_update(prop, 0, "rna_userdef_update");
997 prop = RNA_def_property(srna, "button_text", PROP_FLOAT, PROP_COLOR_GAMMA);
998 RNA_def_property_array(prop, 3);
999 RNA_def_property_ui_text(prop, "Region Text", "");
1000 RNA_def_property_update(prop, 0, "rna_userdef_update");
1002 prop = RNA_def_property(srna, "button_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
1003 RNA_def_property_array(prop, 3);
1004 RNA_def_property_ui_text(prop, "Region Text Highlight", "");
1005 RNA_def_property_update(prop, 0, "rna_userdef_update");
1009 static void rna_def_userdef_theme_space_gradient(BlenderRNA *brna)
1014 srna = RNA_def_struct(brna, "ThemeSpaceGradient", NULL);
1015 RNA_def_struct_sdna(srna, "ThemeSpace");
1016 RNA_def_struct_ui_text(srna, "Theme Space Settings", "");
1019 prop = RNA_def_property(srna, "title", PROP_FLOAT, PROP_COLOR_GAMMA);
1020 RNA_def_property_array(prop, 3);
1021 RNA_def_property_ui_text(prop, "Title", "");
1022 RNA_def_property_update(prop, 0, "rna_userdef_update");
1024 prop = RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR_GAMMA);
1025 RNA_def_property_array(prop, 3);
1026 RNA_def_property_ui_text(prop, "Text", "");
1027 RNA_def_property_update(prop, 0, "rna_userdef_update");
1029 prop = RNA_def_property(srna, "text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
1030 RNA_def_property_array(prop, 3);
1031 RNA_def_property_ui_text(prop, "Text Highlight", "");
1032 RNA_def_property_update(prop, 0, "rna_userdef_update");
1035 prop = RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR_GAMMA);
1036 RNA_def_property_array(prop, 3);
1037 RNA_def_property_ui_text(prop, "Header", "");
1038 RNA_def_property_update(prop, 0, "rna_userdef_update");
1040 prop = RNA_def_property(srna, "header_text", PROP_FLOAT, PROP_COLOR_GAMMA);
1041 RNA_def_property_array(prop, 3);
1042 RNA_def_property_ui_text(prop, "Header Text", "");
1043 RNA_def_property_update(prop, 0, "rna_userdef_update");
1045 prop = RNA_def_property(srna, "header_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
1046 RNA_def_property_array(prop, 3);
1047 RNA_def_property_ui_text(prop, "Header Text Highlight", "");
1048 RNA_def_property_update(prop, 0, "rna_userdef_update");
1050 /* panel settings */
1051 prop = RNA_def_property(srna, "panelcolors", PROP_POINTER, PROP_NONE);
1052 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1053 RNA_def_property_ui_text(prop, "Panel Colors", "");
1054 RNA_def_property_update(prop, 0, "rna_userdef_update");
1056 /* gradient/background settings */
1057 prop = RNA_def_property(srna, "gradients", PROP_POINTER, PROP_NONE);
1058 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1059 RNA_def_property_ui_text(prop, "Gradient Colors", "");
1060 RNA_def_property_update(prop, 0, "rna_userdef_update");
1063 /* if (! ELEM(spacetype, SPACE_BUTS, SPACE_OUTLINER)) { */
1064 prop = RNA_def_property(srna, "button", PROP_FLOAT, PROP_COLOR_GAMMA);
1065 RNA_def_property_array(prop, 4);
1066 RNA_def_property_ui_text(prop, "Region Background", "");
1067 RNA_def_property_update(prop, 0, "rna_userdef_update");
1069 prop = RNA_def_property(srna, "button_title", PROP_FLOAT, PROP_COLOR_GAMMA);
1070 RNA_def_property_array(prop, 3);
1071 RNA_def_property_ui_text(prop, "Region Text Titles", "");
1072 RNA_def_property_update(prop, 0, "rna_userdef_update");
1074 prop = RNA_def_property(srna, "button_text", PROP_FLOAT, PROP_COLOR_GAMMA);
1075 RNA_def_property_array(prop, 3);
1076 RNA_def_property_ui_text(prop, "Region Text", "");
1077 RNA_def_property_update(prop, 0, "rna_userdef_update");
1079 prop = RNA_def_property(srna, "button_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
1080 RNA_def_property_array(prop, 3);
1081 RNA_def_property_ui_text(prop, "Region Text Highlight", "");
1082 RNA_def_property_update(prop, 0, "rna_userdef_update");
1086 /* list / channels */
1087 static void rna_def_userdef_theme_space_list_generic(BlenderRNA *brna)
1092 srna = RNA_def_struct(brna, "ThemeSpaceListGeneric", NULL);
1093 RNA_def_struct_sdna(srna, "ThemeSpace");
1094 RNA_def_struct_ui_text(srna, "Theme Space List Settings", "");
1096 prop = RNA_def_property(srna, "list", PROP_FLOAT, PROP_COLOR_GAMMA);
1097 RNA_def_property_array(prop, 3);
1098 RNA_def_property_ui_text(prop, "Source List", "");
1099 RNA_def_property_update(prop, 0, "rna_userdef_update");
1101 prop = RNA_def_property(srna, "list_title", PROP_FLOAT, PROP_COLOR_GAMMA);
1102 RNA_def_property_array(prop, 3);
1103 RNA_def_property_ui_text(prop, "Source List Title", "");
1104 RNA_def_property_update(prop, 0, "rna_userdef_update");
1106 prop = RNA_def_property(srna, "list_text", PROP_FLOAT, PROP_COLOR_GAMMA);
1107 RNA_def_property_array(prop, 3);
1108 RNA_def_property_ui_text(prop, "Source List Text", "");
1109 RNA_def_property_update(prop, 0, "rna_userdef_update");
1111 prop = RNA_def_property(srna, "list_text_hi", PROP_FLOAT, PROP_COLOR_GAMMA);
1112 RNA_def_property_array(prop, 3);
1113 RNA_def_property_ui_text(prop, "Source List Text Highlight", "");
1114 RNA_def_property_update(prop, 0, "rna_userdef_update");
1117 static void rna_def_userdef_theme_spaces_main(StructRNA *srna)
1121 prop = RNA_def_property(srna, "space", PROP_POINTER, PROP_NONE);
1122 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1123 RNA_def_property_struct_type(prop, "ThemeSpaceGeneric");
1124 RNA_def_property_pointer_funcs(prop, "rna_Theme_space_generic_get", NULL, NULL, NULL);
1125 RNA_def_property_ui_text(prop, "Theme Space", "Settings for space");
1128 static void rna_def_userdef_theme_spaces_gradient(StructRNA *srna)
1132 prop = RNA_def_property(srna, "space", PROP_POINTER, PROP_NONE);
1133 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1134 RNA_def_property_struct_type(prop, "ThemeSpaceGradient");
1135 RNA_def_property_pointer_funcs(prop, "rna_Theme_space_gradient_get", NULL, NULL, NULL);
1136 RNA_def_property_ui_text(prop, "Theme Space", "Settings for space");
1139 static void rna_def_userdef_theme_spaces_list_main(StructRNA *srna)
1143 prop = RNA_def_property(srna, "space_list", PROP_POINTER, PROP_NONE);
1144 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1145 RNA_def_property_struct_type(prop, "ThemeSpaceListGeneric");
1146 RNA_def_property_pointer_funcs(prop, "rna_Theme_space_list_generic_get", NULL, NULL, NULL);
1147 RNA_def_property_ui_text(prop, "Theme Space List", "Settings for space list");
1150 static void rna_def_userdef_theme_spaces_vertex(StructRNA *srna)
1154 prop = RNA_def_property(srna, "vertex", PROP_FLOAT, PROP_COLOR_GAMMA);
1155 RNA_def_property_array(prop, 3);
1156 RNA_def_property_ui_text(prop, "Vertex", "");
1157 RNA_def_property_update(prop, 0, "rna_userdef_update");
1159 prop = RNA_def_property(srna, "vertex_select", PROP_FLOAT, PROP_COLOR_GAMMA);
1160 RNA_def_property_array(prop, 3);
1161 RNA_def_property_ui_text(prop, "Vertex Select", "");
1162 RNA_def_property_update(prop, 0, "rna_userdef_update");
1164 prop = RNA_def_property(srna, "vertex_size", PROP_INT, PROP_NONE);
1165 RNA_def_property_range(prop, 1, 10);
1166 RNA_def_property_ui_text(prop, "Vertex Size", "");
1167 RNA_def_property_update(prop, 0, "rna_userdef_update");
1169 prop = RNA_def_property(srna, "vertex_unreferenced", PROP_FLOAT, PROP_COLOR_GAMMA);
1170 RNA_def_property_array(prop, 3);
1171 RNA_def_property_ui_text(prop, "Vertex Group Unreferenced", "");
1172 RNA_def_property_update(prop, 0, "rna_userdef_update");
1175 static void rna_def_userdef_theme_spaces_edge(StructRNA *srna)
1179 prop = RNA_def_property(srna, "edge_select", PROP_FLOAT, PROP_COLOR_GAMMA);
1180 RNA_def_property_array(prop, 3);
1181 RNA_def_property_ui_text(prop, "Edge Select", "");
1182 RNA_def_property_update(prop, 0, "rna_userdef_update");
1184 prop = RNA_def_property(srna, "edge_seam", PROP_FLOAT, PROP_COLOR_GAMMA);
1185 RNA_def_property_array(prop, 3);
1186 RNA_def_property_ui_text(prop, "Edge Seam", "");
1187 RNA_def_property_update(prop, 0, "rna_userdef_update");
1189 prop = RNA_def_property(srna, "edge_sharp", PROP_FLOAT, PROP_COLOR_GAMMA);
1190 RNA_def_property_array(prop, 3);
1191 RNA_def_property_ui_text(prop, "Edge Sharp", "");
1192 RNA_def_property_update(prop, 0, "rna_userdef_update");
1194 prop = RNA_def_property(srna, "edge_crease", PROP_FLOAT, PROP_COLOR_GAMMA);
1195 RNA_def_property_array(prop, 3);
1196 RNA_def_property_ui_text(prop, "Edge Crease", "");
1197 RNA_def_property_update(prop, 0, "rna_userdef_update");
1199 prop = RNA_def_property(srna, "edge_facesel", PROP_FLOAT, PROP_COLOR_GAMMA);
1200 RNA_def_property_array(prop, 3);
1201 RNA_def_property_ui_text(prop, "Edge UV Face Select", "");
1202 RNA_def_property_update(prop, 0, "rna_userdef_update");
1205 static void rna_def_userdef_theme_spaces_face(StructRNA *srna)
1209 prop = RNA_def_property(srna, "face", PROP_FLOAT, PROP_COLOR_GAMMA);
1210 RNA_def_property_array(prop, 4);
1211 RNA_def_property_ui_text(prop, "Face", "");
1212 RNA_def_property_update(prop, 0, "rna_userdef_update");
1214 prop = RNA_def_property(srna, "face_select", PROP_FLOAT, PROP_COLOR_GAMMA);
1215 RNA_def_property_array(prop, 4);
1216 RNA_def_property_ui_text(prop, "Face Selected", "");
1217 RNA_def_property_update(prop, 0, "rna_userdef_update");
1219 prop = RNA_def_property(srna, "face_dot", PROP_FLOAT, PROP_COLOR_GAMMA);
1220 RNA_def_property_array(prop, 3);
1221 RNA_def_property_ui_text(prop, "Face Dot Selected", "");
1222 RNA_def_property_update(prop, 0, "rna_userdef_update");
1224 prop = RNA_def_property(srna, "facedot_size", PROP_INT, PROP_NONE);
1225 RNA_def_property_range(prop, 1, 10);
1226 RNA_def_property_ui_text(prop, "Face Dot Size", "");
1227 RNA_def_property_update(prop, 0, "rna_userdef_update");
1230 static void rna_def_userdef_theme_spaces_curves(StructRNA *srna, short incl_nurbs)
1235 prop = RNA_def_property(srna, "nurb_uline", PROP_FLOAT, PROP_COLOR_GAMMA);
1236 RNA_def_property_float_sdna(prop, NULL, "nurb_uline");
1237 RNA_def_property_array(prop, 3);
1238 RNA_def_property_ui_text(prop, "NURBS U-lines", "");
1239 RNA_def_property_update(prop, 0, "rna_userdef_update");
1241 prop = RNA_def_property(srna, "nurb_vline", PROP_FLOAT, PROP_COLOR_GAMMA);
1242 RNA_def_property_float_sdna(prop, NULL, "nurb_vline");
1243 RNA_def_property_array(prop, 3);
1244 RNA_def_property_ui_text(prop, "NURBS V-lines", "");
1245 RNA_def_property_update(prop, 0, "rna_userdef_update");
1247 prop = RNA_def_property(srna, "nurb_sel_uline", PROP_FLOAT, PROP_COLOR_GAMMA);
1248 RNA_def_property_float_sdna(prop, NULL, "nurb_sel_uline");
1249 RNA_def_property_array(prop, 3);
1250 RNA_def_property_ui_text(prop, "NURBS active U-lines", "");
1251 RNA_def_property_update(prop, 0, "rna_userdef_update");
1253 prop = RNA_def_property(srna, "nurb_sel_vline", PROP_FLOAT, PROP_COLOR_GAMMA);
1254 RNA_def_property_float_sdna(prop, NULL, "nurb_sel_vline");
1255 RNA_def_property_array(prop, 3);
1256 RNA_def_property_ui_text(prop, "NURBS active V-lines", "");
1257 RNA_def_property_update(prop, 0, "rna_userdef_update");
1259 prop = RNA_def_property(srna, "act_spline", PROP_FLOAT, PROP_COLOR_GAMMA);
1260 RNA_def_property_float_sdna(prop, NULL, "act_spline");
1261 RNA_def_property_array(prop, 3);
1262 RNA_def_property_ui_text(prop, "Active spline", "");
1263 RNA_def_property_update(prop, 0, "rna_userdef_update");
1266 prop = RNA_def_property(srna, "handle_free", PROP_FLOAT, PROP_COLOR_GAMMA);
1267 RNA_def_property_float_sdna(prop, NULL, "handle_free");
1268 RNA_def_property_array(prop, 3);
1269 RNA_def_property_ui_text(prop, "Free handle color", "");
1270 RNA_def_property_update(prop, 0, "rna_userdef_update");
1272 prop = RNA_def_property(srna, "handle_auto", PROP_FLOAT, PROP_COLOR_GAMMA);
1273 RNA_def_property_float_sdna(prop, NULL, "handle_auto");
1274 RNA_def_property_array(prop, 3);
1275 RNA_def_property_ui_text(prop, "Auto handle color", "");
1276 RNA_def_property_update(prop, 0, "rna_userdef_update");
1278 prop = RNA_def_property(srna, "handle_vect", PROP_FLOAT, PROP_COLOR_GAMMA);
1279 RNA_def_property_float_sdna(prop, NULL, "handle_vect");
1280 RNA_def_property_array(prop, 3);
1281 RNA_def_property_ui_text(prop, "Vector handle color", "");
1282 RNA_def_property_update(prop, 0, "rna_userdef_update");
1284 prop = RNA_def_property(srna, "handle_align", PROP_FLOAT, PROP_COLOR_GAMMA);
1285 RNA_def_property_float_sdna(prop, NULL, "handle_align");
1286 RNA_def_property_array(prop, 3);
1287 RNA_def_property_ui_text(prop, "Align handle color", "");
1288 RNA_def_property_update(prop, 0, "rna_userdef_update");
1290 prop = RNA_def_property(srna, "handle_sel_free", PROP_FLOAT, PROP_COLOR_GAMMA);
1291 RNA_def_property_float_sdna(prop, NULL, "handle_sel_free");
1292 RNA_def_property_array(prop, 3);
1293 RNA_def_property_ui_text(prop, "Free handle selected color", "");
1294 RNA_def_property_update(prop, 0, "rna_userdef_update");
1296 prop = RNA_def_property(srna, "handle_sel_auto", PROP_FLOAT, PROP_COLOR_GAMMA);
1297 RNA_def_property_float_sdna(prop, NULL, "handle_sel_auto");
1298 RNA_def_property_array(prop, 3);
1299 RNA_def_property_ui_text(prop, "Auto handle selected color", "");
1300 RNA_def_property_update(prop, 0, "rna_userdef_update");
1302 prop = RNA_def_property(srna, "handle_sel_vect", PROP_FLOAT, PROP_COLOR_GAMMA);
1303 RNA_def_property_float_sdna(prop, NULL, "handle_sel_vect");
1304 RNA_def_property_array(prop, 3);
1305 RNA_def_property_ui_text(prop, "Vector handle selected color", "");
1306 RNA_def_property_update(prop, 0, "rna_userdef_update");
1308 prop = RNA_def_property(srna, "handle_sel_align", PROP_FLOAT, PROP_COLOR_GAMMA);
1309 RNA_def_property_float_sdna(prop, NULL, "handle_sel_align");
1310 RNA_def_property_array(prop, 3);
1311 RNA_def_property_ui_text(prop, "Align handle selected color", "");
1312 RNA_def_property_update(prop, 0, "rna_userdef_update");
1314 if (incl_nurbs == 0) {
1315 /* assume that when nurbs are off, this is for 2D (i.e. anim) editors */
1316 prop = RNA_def_property(srna, "handle_auto_clamped", PROP_FLOAT, PROP_COLOR_GAMMA);
1317 RNA_def_property_float_sdna(prop, NULL, "handle_auto_clamped");
1318 RNA_def_property_array(prop, 3);
1319 RNA_def_property_ui_text(prop, "Auto-Clamped handle color", "");
1320 RNA_def_property_update(prop, 0, "rna_userdef_update");
1322 prop = RNA_def_property(srna, "handle_sel_auto_clamped", PROP_FLOAT, PROP_COLOR_GAMMA);
1323 RNA_def_property_float_sdna(prop, NULL, "handle_sel_auto_clamped");
1324 RNA_def_property_array(prop, 3);
1325 RNA_def_property_ui_text(prop, "Auto-Clamped handle selected color", "");
1326 RNA_def_property_update(prop, 0, "rna_userdef_update");
1329 prop = RNA_def_property(srna, "lastsel_point", PROP_FLOAT, PROP_COLOR_GAMMA);
1330 RNA_def_property_float_sdna(prop, NULL, "lastsel_point");
1331 RNA_def_property_array(prop, 3);
1332 RNA_def_property_ui_text(prop, "Last selected point", "");
1333 RNA_def_property_update(prop, 0, "rna_userdef_update");
1336 static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
1343 srna = RNA_def_struct(brna, "ThemeView3D", NULL);
1344 RNA_def_struct_sdna(srna, "ThemeSpace");
1345 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
1346 RNA_def_struct_ui_text(srna, "Theme 3D View", "Theme settings for the 3D View");
1348 rna_def_userdef_theme_spaces_gradient(srna);
1350 prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
1351 RNA_def_property_array(prop, 3);
1352 RNA_def_property_ui_text(prop, "Grid", "");
1353 RNA_def_property_update(prop, 0, "rna_userdef_update");
1355 prop = RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR_GAMMA);
1356 RNA_def_property_array(prop, 3);
1357 RNA_def_property_ui_text(prop, "Wire", "");
1358 RNA_def_property_update(prop, 0, "rna_userdef_update");
1360 prop = RNA_def_property(srna, "lamp", PROP_FLOAT, PROP_COLOR_GAMMA);
1361 RNA_def_property_array(prop, 4);
1362 RNA_def_property_ui_text(prop, "Lamp", "");
1363 RNA_def_property_update(prop, 0, "rna_userdef_update");
1365 prop = RNA_def_property(srna, "speaker", PROP_FLOAT, PROP_COLOR_GAMMA);
1366 RNA_def_property_array(prop, 3);
1367 RNA_def_property_ui_text(prop, "Speaker", "");
1368 RNA_def_property_update(prop, 0, "rna_userdef_update");
1370 prop = RNA_def_property(srna, "camera", PROP_FLOAT, PROP_COLOR_GAMMA);
1371 RNA_def_property_array(prop, 3);
1372 RNA_def_property_ui_text(prop, "Camera", "");
1373 RNA_def_property_update(prop, 0, "rna_userdef_update");
1375 prop = RNA_def_property(srna, "empty", PROP_FLOAT, PROP_COLOR_GAMMA);
1376 RNA_def_property_array(prop, 3);
1377 RNA_def_property_ui_text(prop, "Empty", "");
1378 RNA_def_property_update(prop, 0, "rna_userdef_update");
1380 prop = RNA_def_property(srna, "object_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
1381 RNA_def_property_float_sdna(prop, NULL, "select");
1382 RNA_def_property_array(prop, 3);
1383 RNA_def_property_ui_text(prop, "Object Selected", "");
1384 RNA_def_property_update(prop, 0, "rna_userdef_update");
1386 prop = RNA_def_property(srna, "object_active", PROP_FLOAT, PROP_COLOR_GAMMA);
1387 RNA_def_property_float_sdna(prop, NULL, "active");
1388 RNA_def_property_array(prop, 3);
1389 RNA_def_property_ui_text(prop, "Active Object", "");
1390 RNA_def_property_update(prop, 0, "rna_userdef_update");
1392 prop = RNA_def_property(srna, "object_grouped", PROP_FLOAT, PROP_COLOR_GAMMA);
1393 RNA_def_property_float_sdna(prop, NULL, "group");
1394 RNA_def_property_array(prop, 3);
1395 RNA_def_property_ui_text(prop, "Object Grouped", "");
1396 RNA_def_property_update(prop, 0, "rna_userdef_update");
1398 prop = RNA_def_property(srna, "object_grouped_active", PROP_FLOAT, PROP_COLOR_GAMMA);
1399 RNA_def_property_float_sdna(prop, NULL, "group_active");
1400 RNA_def_property_array(prop, 3);
1401 RNA_def_property_ui_text(prop, "Object Grouped Active", "");
1402 RNA_def_property_update(prop, 0, "rna_userdef_update");
1404 prop = RNA_def_property(srna, "transform", PROP_FLOAT, PROP_COLOR_GAMMA);
1405 RNA_def_property_array(prop, 3);
1406 RNA_def_property_ui_text(prop, "Transform", "");
1407 RNA_def_property_update(prop, 0, "rna_userdef_update");
1409 rna_def_userdef_theme_spaces_vertex(srna);
1410 rna_def_userdef_theme_spaces_edge(srna);
1411 rna_def_userdef_theme_spaces_face(srna);
1412 rna_def_userdef_theme_spaces_curves(srna, 1);
1414 prop = RNA_def_property(srna, "extra_edge_len", PROP_FLOAT, PROP_COLOR_GAMMA);
1415 RNA_def_property_array(prop, 3);
1416 RNA_def_property_ui_text(prop, "Edge Length Text", "");
1417 RNA_def_property_update(prop, 0, "rna_userdef_update");
1419 prop = RNA_def_property(srna, "extra_face_angle", PROP_FLOAT, PROP_COLOR_GAMMA);
1420 RNA_def_property_array(prop, 3);
1421 RNA_def_property_ui_text(prop, "Face Angle Text", "");
1422 RNA_def_property_update(prop, 0, "rna_userdef_update");
1424 prop = RNA_def_property(srna, "extra_face_area", PROP_FLOAT, PROP_COLOR_GAMMA);
1425 RNA_def_property_array(prop, 3);
1426 RNA_def_property_ui_text(prop, "Face Area Text", "");
1427 RNA_def_property_update(prop, 0, "rna_userdef_update");
1429 prop = RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR_GAMMA);
1430 RNA_def_property_array(prop, 4);
1431 RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", "");
1432 RNA_def_property_update(prop, 0, "rna_userdef_update");
1434 prop = RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR_GAMMA);
1435 RNA_def_property_array(prop, 3);
1436 RNA_def_property_ui_text(prop, "Face Normal", "");
1437 RNA_def_property_update(prop, 0, "rna_userdef_update");
1439 prop = RNA_def_property(srna, "vertex_normal", PROP_FLOAT, PROP_COLOR_GAMMA);
1440 RNA_def_property_array(prop, 3);
1441 RNA_def_property_ui_text(prop, "Vertex Normal", "");
1442 RNA_def_property_update(prop, 0, "rna_userdef_update");
1444 prop = RNA_def_property(srna, "bone_solid", PROP_FLOAT, PROP_COLOR_GAMMA);
1445 RNA_def_property_array(prop, 3);
1446 RNA_def_property_ui_text(prop, "Bone Solid", "");
1447 RNA_def_property_update(prop, 0, "rna_userdef_update");
1449 prop = RNA_def_property(srna, "bone_pose", PROP_FLOAT, PROP_COLOR_GAMMA);
1450 RNA_def_property_array(prop, 3);
1451 RNA_def_property_ui_text(prop, "Bone Pose", "");
1452 RNA_def_property_update(prop, 0, "rna_userdef_update");
1454 prop = RNA_def_property(srna, "bone_pose_active", PROP_FLOAT, PROP_COLOR_GAMMA);
1455 RNA_def_property_array(prop, 3);
1456 RNA_def_property_ui_text(prop, "Bone Pose Active", "");
1457 RNA_def_property_update(prop, 0, "rna_userdef_update");
1459 prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
1460 RNA_def_property_float_sdna(prop, NULL, "cframe");
1461 RNA_def_property_array(prop, 3);
1462 RNA_def_property_ui_text(prop, "Current Frame", "");
1463 RNA_def_property_update(prop, 0, "rna_userdef_update");
1465 prop = RNA_def_property(srna, "outline_width", PROP_INT, PROP_NONE);
1466 RNA_def_property_range(prop, 1, 5);
1467 RNA_def_property_ui_text(prop, "Outline Width", "");
1468 RNA_def_property_update(prop, 0, "rna_userdef_update");
1470 prop = RNA_def_property(srna, "bundle_solid", PROP_FLOAT, PROP_COLOR_GAMMA);
1471 RNA_def_property_float_sdna(prop, NULL, "bundle_solid");
1472 RNA_def_property_array(prop, 3);
1473 RNA_def_property_ui_text(prop, "Bundle Solid", "");
1474 RNA_def_property_update(prop, 0, "rna_userdef_update");
1476 prop = RNA_def_property(srna, "camera_path", PROP_FLOAT, PROP_COLOR_GAMMA);
1477 RNA_def_property_float_sdna(prop, NULL, "camera_path");
1478 RNA_def_property_array(prop, 3);
1479 RNA_def_property_ui_text(prop, "Camera Path", "");
1480 RNA_def_property_update(prop, 0, "rna_userdef_update");
1482 prop = RNA_def_property(srna, "skin_root", PROP_FLOAT, PROP_COLOR_GAMMA);
1483 RNA_def_property_array(prop, 3);
1484 RNA_def_property_ui_text(prop, "Skin Root", "");
1485 RNA_def_property_update(prop, 0, "rna_userdef_update");
1489 static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
1496 srna = RNA_def_struct(brna, "ThemeGraphEditor", NULL);
1497 RNA_def_struct_sdna(srna, "ThemeSpace");
1498 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
1499 RNA_def_struct_ui_text(srna, "Theme Graph Editor", "Theme settings for the graph editor");
1501 rna_def_userdef_theme_spaces_main(srna);
1502 rna_def_userdef_theme_spaces_list_main(srna);
1504 prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
1505 RNA_def_property_array(prop, 3);
1506 RNA_def_property_ui_text(prop, "Grid", "");
1507 RNA_def_property_update(prop, 0, "rna_userdef_update");
1509 prop = RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
1510 RNA_def_property_float_sdna(prop, NULL, "shade1");
1511 RNA_def_property_array(prop, 3);
1512 RNA_def_property_ui_text(prop, "Window Sliders", "");
1513 RNA_def_property_update(prop, 0, "rna_userdef_update");
1515 prop = RNA_def_property(srna, "channels_region", PROP_FLOAT, PROP_COLOR_GAMMA);
1516 RNA_def_property_float_sdna(prop, NULL, "shade2");
1517 RNA_def_property_array(prop, 3);
1518 RNA_def_property_ui_text(prop, "Channels Region", "");
1519 RNA_def_property_update(prop, 0, "rna_userdef_update");
1521 rna_def_userdef_theme_spaces_vertex(srna);
1522 rna_def_userdef_theme_spaces_curves(srna, 0);
1524 prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
1525 RNA_def_property_float_sdna(prop, NULL, "cframe");
1526 RNA_def_property_array(prop, 3);
1527 RNA_def_property_ui_text(prop, "Current Frame", "");
1528 RNA_def_property_update(prop, 0, "rna_userdef_update");
1530 prop = RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR_GAMMA);
1531 RNA_def_property_array(prop, 3);
1532 RNA_def_property_ui_text(prop, "Handle Vertex", "");
1533 RNA_def_property_update(prop, 0, "rna_userdef_update");
1535 prop = RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_COLOR_GAMMA);
1536 RNA_def_property_array(prop, 3);
1537 RNA_def_property_ui_text(prop, "Handle Vertex Select", "");
1538 RNA_def_property_update(prop, 0, "rna_userdef_update");
1540 prop = RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_NONE);
1541 RNA_def_property_range(prop, 0, 255);
1542 RNA_def_property_ui_text(prop, "Handle Vertex Size", "");
1543 RNA_def_property_update(prop, 0, "rna_userdef_update");
1545 prop = RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR_GAMMA);
1546 RNA_def_property_float_sdna(prop, NULL, "group");
1547 RNA_def_property_array(prop, 3);
1548 RNA_def_property_ui_text(prop, "Channel Group", "");
1549 RNA_def_property_update(prop, 0, "rna_userdef_update");
1551 prop = RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR_GAMMA);
1552 RNA_def_property_float_sdna(prop, NULL, "group_active");
1553 RNA_def_property_array(prop, 3);
1554 RNA_def_property_ui_text(prop, "Active Channel Group", "");
1555 RNA_def_property_update(prop, 0, "rna_userdef_update");
1557 prop = RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR_GAMMA);
1558 RNA_def_property_float_sdna(prop, NULL, "ds_channel");
1559 RNA_def_property_array(prop, 3);
1560 RNA_def_property_ui_text(prop, "DopeSheet Channel", "");
1561 RNA_def_property_update(prop, 0, "rna_userdef_update");
1563 prop = RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR_GAMMA);
1564 RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
1565 RNA_def_property_array(prop, 3);
1566 RNA_def_property_ui_text(prop, "DopeSheet Sub-Channel", "");
1567 RNA_def_property_update(prop, 0, "rna_userdef_update");
1570 static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
1577 srna = RNA_def_struct(brna, "ThemeFileBrowser", NULL);
1578 RNA_def_struct_sdna(srna, "ThemeSpace");
1579 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
1580 RNA_def_struct_ui_text(srna, "Theme File Browser", "Theme settings for the File Browser");
1582 rna_def_userdef_theme_spaces_main(srna);
1583 rna_def_userdef_theme_spaces_list_main(srna);
1585 prop = RNA_def_property(srna, "selected_file", PROP_FLOAT, PROP_COLOR_GAMMA);
1586 RNA_def_property_float_sdna(prop, NULL, "hilite");
1587 RNA_def_property_array(prop, 3);
1588 RNA_def_property_ui_text(prop, "Selected File", "");
1589 RNA_def_property_update(prop, 0, "rna_userdef_update");
1591 prop = RNA_def_property(srna, "scrollbar", PROP_FLOAT, PROP_COLOR_GAMMA);
1592 RNA_def_property_float_sdna(prop, NULL, "shade1");
1593 RNA_def_property_array(prop, 3);
1594 RNA_def_property_ui_text(prop, "Scrollbar", "");
1595 RNA_def_property_update(prop, 0, "rna_userdef_update");
1597 prop = RNA_def_property(srna, "scroll_handle", PROP_FLOAT, PROP_COLOR_GAMMA);
1598 RNA_def_property_float_sdna(prop, NULL, "shade2");
1599 RNA_def_property_array(prop, 3);
1600 RNA_def_property_ui_text(prop, "Scroll Handle", "");
1601 RNA_def_property_update(prop, 0, "rna_userdef_update");
1603 prop = RNA_def_property(srna, "active_file", PROP_FLOAT, PROP_COLOR_GAMMA);
1604 RNA_def_property_float_sdna(prop, NULL, "active");
1605 RNA_def_property_array(prop, 3);
1606 RNA_def_property_ui_text(prop, "Active File", "");
1607 RNA_def_property_update(prop, 0, "rna_userdef_update");
1609 prop = RNA_def_property(srna, "active_file_text", PROP_FLOAT, PROP_COLOR_GAMMA);
1610 RNA_def_property_float_sdna(prop, NULL, "grid");
1611 RNA_def_property_array(prop, 3);
1612 RNA_def_property_ui_text(prop, "Active File Text", "");
1613 RNA_def_property_update(prop, 0, "rna_userdef_update");
1616 static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna)
1621 /* space_outliner */
1623 srna = RNA_def_struct(brna, "ThemeOutliner", NULL);
1624 RNA_def_struct_sdna(srna, "ThemeSpace");
1625 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
1626 RNA_def_struct_ui_text(srna, "Theme Outliner", "Theme settings for the Outliner");
1628 rna_def_userdef_theme_spaces_main(srna);
1630 prop = RNA_def_property(srna, "match", PROP_FLOAT, PROP_COLOR_GAMMA);
1631 RNA_def_property_array(prop, 3);
1632 RNA_def_property_ui_text(prop, "Filter Match", "");
1633 RNA_def_property_update(prop, 0, "rna_userdef_update");
1635 prop = RNA_def_property(srna, "selected_highlight", PROP_FLOAT, PROP_COLOR_GAMMA);
1636 RNA_def_property_array(prop, 3);
1637 RNA_def_property_ui_text(prop, "Selected Highlight", "");
1638 RNA_def_property_update(prop, 0, "rna_userdef_update");
1641 static void rna_def_userdef_theme_space_userpref(BlenderRNA *brna)
1645 /* space_userpref */
1647 srna = RNA_def_struct(brna, "ThemeUserPreferences", NULL);
1648 RNA_def_struct_sdna(srna, "ThemeSpace");
1649 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
1650 RNA_def_struct_ui_text(srna, "Theme User Preferences", "Theme settings for the User Preferences");
1652 rna_def_userdef_theme_spaces_main(srna);
1655 static void rna_def_userdef_theme_space_console(BlenderRNA *brna)
1662 srna = RNA_def_struct(brna, "ThemeConsole", NULL);
1663 RNA_def_struct_sdna(srna, "ThemeSpace");
1664 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
1665 RNA_def_struct_ui_text(srna, "Theme Console", "Theme settings for the Console");
1667 rna_def_userdef_theme_spaces_main(srna);
1669 prop = RNA_def_property(srna, "line_output", PROP_FLOAT, PROP_COLOR_GAMMA);
1670 RNA_def_property_float_sdna(prop, NULL, "console_output");
1671 RNA_def_property_array(prop, 3);
1672 RNA_def_property_ui_text(prop, "Line Output", "");
1673 RNA_def_property_update(prop, 0, "rna_userdef_update");
1675 prop = RNA_def_property(srna, "line_input", PROP_FLOAT, PROP_COLOR_GAMMA);
1676 RNA_def_property_float_sdna(prop, NULL, "console_input");
1677 RNA_def_property_array(prop, 3);
1678 RNA_def_property_ui_text(prop, "Line Input", "");
1679 RNA_def_property_update(prop, 0, "rna_userdef_update");
1681 prop = RNA_def_property(srna, "line_info", PROP_FLOAT, PROP_COLOR_GAMMA);
1682 RNA_def_property_float_sdna(prop, NULL, "console_info");
1683 RNA_def_property_array(prop, 3);
1684 RNA_def_property_ui_text(prop, "Line Info", "");
1685 RNA_def_property_update(prop, 0, "rna_userdef_update");
1687 prop = RNA_def_property(srna, "line_error", PROP_FLOAT, PROP_COLOR_GAMMA);
1688 RNA_def_property_float_sdna(prop, NULL, "console_error");
1689 RNA_def_property_array(prop, 3);
1690 RNA_def_property_ui_text(prop, "Line Error", "");
1691 RNA_def_property_update(prop, 0, "rna_userdef_update");
1693 prop = RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR_GAMMA);
1694 RNA_def_property_float_sdna(prop, NULL, "console_cursor");
1695 RNA_def_property_array(prop, 3);
1696 RNA_def_property_ui_text(prop, "Cursor", "");
1697 RNA_def_property_update(prop, 0, "rna_userdef_update");
1699 prop = RNA_def_property(srna, "select", PROP_FLOAT, PROP_COLOR_GAMMA);
1700 RNA_def_property_float_sdna(prop, NULL, "console_select");
1701 RNA_def_property_array(prop, 4);
1702 RNA_def_property_ui_text(prop, "Selection", "");
1703 RNA_def_property_update(prop, 0, "rna_userdef_update");
1707 static void rna_def_userdef_theme_space_info(BlenderRNA *brna)
1713 srna = RNA_def_struct(brna, "ThemeInfo", NULL);
1714 RNA_def_struct_sdna(srna, "ThemeSpace");
1715 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
1716 RNA_def_struct_ui_text(srna, "Theme Info", "Theme settings for Info");
1718 rna_def_userdef_theme_spaces_main(srna);
1722 static void rna_def_userdef_theme_space_text(BlenderRNA *brna)
1729 srna = RNA_def_struct(brna, "ThemeTextEditor", NULL);
1730 RNA_def_struct_sdna(srna, "ThemeSpace");
1731 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
1732 RNA_def_struct_ui_text(srna, "Theme Text Editor", "Theme settings for the Text Editor");
1734 rna_def_userdef_theme_spaces_main(srna);
1736 prop = RNA_def_property(srna, "line_numbers_background", PROP_FLOAT, PROP_COLOR_GAMMA);
1737 RNA_def_property_float_sdna(prop, NULL, "grid");
1738 RNA_def_property_array(prop, 3);
1739 RNA_def_property_ui_text(prop, "Line Numbers Background", "");
1740 RNA_def_property_update(prop, 0, "rna_userdef_update");
1742 /* no longer used */
1744 prop = RNA_def_property(srna, "scroll_bar", PROP_FLOAT, PROP_COLOR_GAMMA);
1745 RNA_def_property_float_sdna(prop, NULL, "shade1");
1746 RNA_def_property_array(prop, 3);
1747 RNA_def_property_ui_text(prop, "Scroll Bar", "");
1748 RNA_def_property_update(prop, 0, "rna_userdef_update");
1751 prop = RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR_GAMMA);
1752 RNA_def_property_float_sdna(prop, NULL, "shade2");
1753 RNA_def_property_array(prop, 3);
1754 RNA_def_property_ui_text(prop, "Selected Text", "");
1755 RNA_def_property_update(prop, 0, "rna_userdef_update");
1757 prop = RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR_GAMMA);
1758 RNA_def_property_float_sdna(prop, NULL, "hilite");
1759 RNA_def_property_array(prop, 3);
1760 RNA_def_property_ui_text(prop, "Cursor", "");
1761 RNA_def_property_update(prop, 0, "rna_userdef_update");
1763 prop = RNA_def_property(srna, "syntax_builtin", PROP_FLOAT, PROP_COLOR_GAMMA);
1764 RNA_def_property_float_sdna(prop, NULL, "syntaxb");
1765 RNA_def_property_array(prop, 3);
1766 RNA_def_property_ui_text(prop, "Syntax Built-in", "");
1767 RNA_def_property_update(prop, 0, "rna_userdef_update");
1769 prop = RNA_def_property(srna, "syntax_symbols", PROP_FLOAT, PROP_COLOR_GAMMA);
1770 RNA_def_property_float_sdna(prop, NULL, "syntaxs");
1771 RNA_def_property_array(prop, 3);
1772 RNA_def_property_ui_text(prop, "Syntax Symbols", "");
1773 RNA_def_property_update(prop, 0, "rna_userdef_update");
1775 prop = RNA_def_property(srna, "syntax_special", PROP_FLOAT, PROP_COLOR_GAMMA);
1776 RNA_def_property_float_sdna(prop, NULL, "syntaxv");
1777 RNA_def_property_array(prop, 3);
1778 RNA_def_property_ui_text(prop, "Syntax Special", "");
1779 RNA_def_property_update(prop, 0, "rna_userdef_update");
1781 prop = RNA_def_property(srna, "syntax_preprocessor", PROP_FLOAT, PROP_COLOR_GAMMA);
1782 RNA_def_property_float_sdna(prop, NULL, "syntaxd");
1783 RNA_def_property_array(prop, 3);
1784 RNA_def_property_ui_text(prop, "Syntax PreProcessor", "");
1785 RNA_def_property_update(prop, 0, "rna_userdef_update");
1787 prop = RNA_def_property(srna, "syntax_reserved", PROP_FLOAT, PROP_COLOR_GAMMA);
1788 RNA_def_property_float_sdna(prop, NULL, "syntaxr");
1789 RNA_def_property_array(prop, 3);
1790 RNA_def_property_ui_text(prop, "Syntax Reserved", "");
1791 RNA_def_property_update(prop, 0, "rna_userdef_update");
1793 prop = RNA_def_property(srna, "syntax_comment", PROP_FLOAT, PROP_COLOR_GAMMA);
1794 RNA_def_property_float_sdna(prop, NULL, "syntaxc");
1795 RNA_def_property_array(prop, 3);
1796 RNA_def_property_ui_text(prop, "Syntax Comment", "");
1797 RNA_def_property_update(prop, 0, "rna_userdef_update");
1799 prop = RNA_def_property(srna, "syntax_string", PROP_FLOAT, PROP_COLOR_GAMMA);
1800 RNA_def_property_float_sdna(prop, NULL, "syntaxl");
1801 RNA_def_property_array(prop, 3);
1802 RNA_def_property_ui_text(prop, "Syntax String", "");
1803 RNA_def_property_update(prop, 0, "rna_userdef_update");
1805 prop = RNA_def_property(srna, "syntax_numbers", PROP_FLOAT, PROP_COLOR_GAMMA);
1806 RNA_def_property_float_sdna(prop, NULL, "syntaxn");
1807 RNA_def_property_array(prop, 3);
1808 RNA_def_property_ui_text(prop, "Syntax Numbers", "");
1809 RNA_def_property_update(prop, 0, "rna_userdef_update");
1812 static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
1819 srna = RNA_def_struct(brna, "ThemeNodeEditor", NULL);
1820 RNA_def_struct_sdna(srna, "ThemeSpace");
1821 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
1822 RNA_def_struct_ui_text(srna, "Theme Node Editor", "Theme settings for the Node Editor");
1824 rna_def_userdef_theme_spaces_main(srna);
1825 rna_def_userdef_theme_spaces_list_main(srna);
1827 prop = RNA_def_property(srna, "node_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
1828 RNA_def_property_float_sdna(prop, NULL, "select");
1829 RNA_def_property_array(prop, 3);
1830 RNA_def_property_ui_text(prop, "Node Selected", "");
1831 RNA_def_property_update(prop, 0, "rna_userdef_update");
1833 prop = RNA_def_property(srna, "node_active", PROP_FLOAT, PROP_COLOR_GAMMA);
1834 RNA_def_property_float_sdna(prop, NULL, "active");
1835 RNA_def_property_array(prop, 3);
1836 RNA_def_property_ui_text(prop, "Active Node", "");
1837 RNA_def_property_update(prop, 0, "rna_userdef_update");
1839 prop = RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR_GAMMA);
1840 RNA_def_property_float_sdna(prop, NULL, "wire");
1841 RNA_def_property_array(prop, 3);
1842 RNA_def_property_ui_text(prop, "Wires", "");
1843 RNA_def_property_update(prop, 0, "rna_userdef_update");
1845 prop = RNA_def_property(srna, "wire_select", PROP_FLOAT, PROP_COLOR_GAMMA);
1846 RNA_def_property_float_sdna(prop, NULL, "edge_select");
1847 RNA_def_property_array(prop, 3);
1848 RNA_def_property_ui_text(prop, "Wire Select", "");
1849 RNA_def_property_update(prop, 0, "rna_userdef_update");
1851 prop = RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR_GAMMA);
1852 RNA_def_property_float_sdna(prop, NULL, "shade2");
1853 RNA_def_property_array(prop, 3);
1854 RNA_def_property_ui_text(prop, "Selected Text", "");
1855 RNA_def_property_update(prop, 0, "rna_userdef_update");
1857 prop = RNA_def_property(srna, "node_backdrop", PROP_FLOAT, PROP_COLOR_GAMMA);
1858 RNA_def_property_float_sdna(prop, NULL, "syntaxl");
1859 RNA_def_property_array(prop, 4);
1860 RNA_def_property_ui_text(prop, "Node Backdrop", "");
1861 RNA_def_property_update(prop, 0, "rna_userdef_update");
1863 prop = RNA_def_property(srna, "in_out_node", PROP_FLOAT, PROP_COLOR_GAMMA);
1864 RNA_def_property_float_sdna(prop, NULL, "syntaxn");
1865 RNA_def_property_array(prop, 3);
1866 RNA_def_property_ui_text(prop, "In/Out Node", "");
1867 RNA_def_property_update(prop, 0, "rna_userdef_update");
1869 prop = RNA_def_property(srna, "converter_node", PROP_FLOAT, PROP_COLOR_GAMMA);
1870 RNA_def_property_float_sdna(prop, NULL, "syntaxv");
1871 RNA_def_property_array(prop, 3);
1872 RNA_def_property_ui_text(prop, "Converter Node", "");
1873 RNA_def_property_update(prop, 0, "rna_userdef_update");
1875 prop = RNA_def_property(srna, "operator_node", PROP_FLOAT, PROP_COLOR_GAMMA);
1876 RNA_def_property_float_sdna(prop, NULL, "syntaxb");
1877 RNA_def_property_array(prop, 3);
1878 RNA_def_property_ui_text(prop, "Operator Node", "");
1879 RNA_def_property_update(prop, 0, "rna_userdef_update");
1881 prop = RNA_def_property(srna, "group_node", PROP_FLOAT, PROP_COLOR_GAMMA);
1882 RNA_def_property_float_sdna(prop, NULL, "syntaxc");
1883 RNA_def_property_array(prop, 3);
1884 RNA_def_property_ui_text(prop, "Group Node", "");
1885 RNA_def_property_update(prop, 0, "rna_userdef_update");
1887 prop = RNA_def_property(srna, "frame_node", PROP_FLOAT, PROP_COLOR_GAMMA);
1888 RNA_def_property_float_sdna(prop, NULL, "movie");
1889 RNA_def_property_array(prop, 4);
1890 RNA_def_property_ui_text(prop, "Frame Node", "");
1891 RNA_def_property_update(prop, 0, "rna_userdef_update");
1893 prop = RNA_def_property(srna, "matte_node", PROP_FLOAT, PROP_COLOR_GAMMA);
1894 RNA_def_property_float_sdna(prop, NULL, "syntaxs");
1895 RNA_def_property_array(prop, 3);
1896 RNA_def_property_ui_text(prop, "Matte Node", "");
1897 RNA_def_property_update(prop, 0, "rna_userdef_update");
1899 prop = RNA_def_property(srna, "distor_node", PROP_FLOAT, PROP_COLOR_GAMMA);
1900 RNA_def_property_float_sdna(prop, NULL, "syntaxd");
1901 RNA_def_property_array(prop, 3);
1902 RNA_def_property_ui_text(prop, "Distort Node", "");
1903 RNA_def_property_update(prop, 0, "rna_userdef_update");
1905 prop = RNA_def_property(srna, "noodle_curving", PROP_INT, PROP_NONE);
1906 RNA_def_property_int_sdna(prop, NULL, "noodle_curving");
1907 RNA_def_property_int_default(prop, 5);
1908 RNA_def_property_range(prop, 0, 10);
1909 RNA_def_property_ui_text(prop, "Noodle curving", "Curving of the noodle");
1910 RNA_def_property_update(prop, 0, "rna_userdef_update");
1913 static void rna_def_userdef_theme_space_logic(BlenderRNA *brna)
1916 // PropertyRNA *prop;
1920 srna = RNA_def_struct(brna, "ThemeLogicEditor", NULL);
1921 RNA_def_struct_sdna(srna, "ThemeSpace");
1922 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
1923 RNA_def_struct_ui_text(srna, "Theme Logic Editor", "Theme settings for the Logic Editor");
1925 rna_def_userdef_theme_spaces_main(srna);
1930 static void rna_def_userdef_theme_space_buts(BlenderRNA *brna)
1933 // PropertyRNA *prop;
1937 srna = RNA_def_struct(brna, "ThemeProperties", NULL);
1938 RNA_def_struct_sdna(srna, "ThemeSpace");
1939 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
1940 RNA_def_struct_ui_text(srna, "Theme Properties", "Theme settings for the Properties");
1942 rna_def_userdef_theme_spaces_main(srna);
1946 static void rna_def_userdef_theme_space_time(BlenderRNA *brna)
1953 srna = RNA_def_struct(brna, "ThemeTimeline", NULL);
1954 RNA_def_struct_sdna(srna, "ThemeSpace");
1955 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
1956 RNA_def_struct_ui_text(srna, "Theme Timeline", "Theme settings for the Timeline");
1958 rna_def_userdef_theme_spaces_main(srna);
1960 prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
1961 RNA_def_property_array(prop, 3);
1962 RNA_def_property_ui_text(prop, "Grid", "");
1963 RNA_def_property_update(prop, 0, "rna_userdef_update");
1965 prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
1966 RNA_def_property_float_sdna(prop, NULL, "cframe");
1967 RNA_def_property_array(prop, 3);
1968 RNA_def_property_ui_text(prop, "Current Frame", "");
1969 RNA_def_property_update(prop, 0, "rna_userdef_update");
1972 static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
1979 srna = RNA_def_struct(brna, "ThemeImageEditor", NULL);
1980 RNA_def_struct_sdna(srna, "ThemeSpace");
1981 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
1982 RNA_def_struct_ui_text(srna, "Theme Image Editor", "Theme settings for the Image Editor");
1984 rna_def_userdef_theme_spaces_main(srna);
1985 rna_def_userdef_theme_spaces_vertex(srna);
1986 rna_def_userdef_theme_spaces_face(srna);
1988 prop = RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR_GAMMA);
1989 RNA_def_property_array(prop, 4);
1990 RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", "");
1991 RNA_def_property_update(prop, 0, "rna_userdef_update");
1993 prop = RNA_def_property(srna, "scope_back", PROP_FLOAT, PROP_COLOR_GAMMA);
1994 RNA_def_property_float_sdna(prop, NULL, "preview_back");
1995 RNA_def_property_array(prop, 4);
1996 RNA_def_property_ui_text(prop, "Scope region background color", "");
1997 RNA_def_property_update(prop, 0, "rna_userdef_update");
1999 prop = RNA_def_property(srna, "preview_stitch_face", PROP_FLOAT, PROP_COLOR_GAMMA);
2000 RNA_def_property_float_sdna(prop, NULL, "preview_stitch_face");
2001 RNA_def_property_array(prop, 4);
2002 RNA_def_property_ui_text(prop, "Stitch preview face color", "");
2003 RNA_def_property_update(prop, 0, "rna_userdef_update");
2005 prop = RNA_def_property(srna, "preview_stitch_edge", PROP_FLOAT, PROP_COLOR_GAMMA);
2006 RNA_def_property_float_sdna(prop, NULL, "preview_stitch_edge");
2007 RNA_def_property_array(prop, 4);
2008 RNA_def_property_ui_text(prop, "Stitch preview edge color", "");
2009 RNA_def_property_update(prop, 0, "rna_userdef_update");
2011 prop = RNA_def_property(srna, "preview_stitch_vert", PROP_FLOAT, PROP_COLOR_GAMMA);
2012 RNA_def_property_float_sdna(prop, NULL, "preview_stitch_vert");
2013 RNA_def_property_array(prop, 4);
2014 RNA_def_property_ui_text(prop, "Stitch preview vertex color", "");
2015 RNA_def_property_update(prop, 0, "rna_userdef_update");
2017 prop = RNA_def_property(srna, "preview_stitch_stitchable", PROP_FLOAT, PROP_COLOR_GAMMA);
2018 RNA_def_property_float_sdna(prop, NULL, "preview_stitch_stitchable");
2019 RNA_def_property_array(prop, 4);
2020 RNA_def_property_ui_text(prop, "Stitch preview stitchable color", "");
2021 RNA_def_property_update(prop, 0, "rna_userdef_update");
2023 prop = RNA_def_property(srna, "preview_stitch_unstitchable", PROP_FLOAT, PROP_COLOR_GAMMA);
2024 RNA_def_property_float_sdna(prop, NULL, "preview_stitch_unstitchable");
2025 RNA_def_property_array(prop, 4);
2026 RNA_def_property_ui_text(prop, "Stitch preview unstitchable color", "");
2027 RNA_def_property_update(prop, 0, "rna_userdef_update");
2029 prop = RNA_def_property(srna, "preview_stitch_active", PROP_FLOAT, PROP_COLOR_GAMMA);
2030 RNA_def_property_float_sdna(prop, NULL, "preview_stitch_active");
2031 RNA_def_property_array(prop, 4);
2032 RNA_def_property_ui_text(prop, "Stitch preview active island", "");
2033 RNA_def_property_update(prop, 0, "rna_userdef_update");
2036 static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
2043 srna = RNA_def_struct(brna, "ThemeSequenceEditor", NULL);
2044 RNA_def_struct_sdna(srna, "ThemeSpace");
2045 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
2046 RNA_def_struct_ui_text(srna, "Theme Sequence Editor", "Theme settings for the Sequence Editor");
2048 rna_def_userdef_theme_spaces_main(srna);
2050 prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
2051 RNA_def_property_array(prop, 3);
2052 RNA_def_property_ui_text(prop, "Grid", "");
2053 RNA_def_property_update(prop, 0, "rna_userdef_update");
2055 prop = RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
2056 RNA_def_property_float_sdna(prop, NULL, "shade1");
2057 RNA_def_property_array(prop, 3);
2058 RNA_def_property_ui_text(prop, "Window Sliders", "");
2059 RNA_def_property_update(prop, 0, "rna_userdef_update");
2061 prop = RNA_def_property(srna, "movie_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
2062 RNA_def_property_float_sdna(prop, NULL, "movie");
2063 RNA_def_property_array(prop, 3);
2064 RNA_def_property_ui_text(prop, "Movie Strip", "");
2065 RNA_def_property_update(prop, 0, "rna_userdef_update");
2067 prop = RNA_def_property(srna, "movieclip_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
2068 RNA_def_property_float_sdna(prop, NULL, "movieclip");
2069 RNA_def_property_array(prop, 3);
2070 RNA_def_property_ui_text(prop, "Clip Strip", "");
2071 RNA_def_property_update(prop, 0, "rna_userdef_update");
2073 prop = RNA_def_property(srna, "image_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
2074 RNA_def_property_float_sdna(prop, NULL, "image");
2075 RNA_def_property_array(prop, 3);
2076 RNA_def_property_ui_text(prop, "Image Strip", "");
2077 RNA_def_property_update(prop, 0, "rna_userdef_update");
2079 prop = RNA_def_property(srna, "scene_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
2080 RNA_def_property_float_sdna(prop, NULL, "scene");
2081 RNA_def_property_array(prop, 3);
2082 RNA_def_property_ui_text(prop, "Scene Strip", "");
2083 RNA_def_property_update(prop, 0, "rna_userdef_update");
2085 prop = RNA_def_property(srna, "audio_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
2086 RNA_def_property_float_sdna(prop, NULL, "audio");
2087 RNA_def_property_array(prop, 3);
2088 RNA_def_property_ui_text(prop, "Audio Strip", "");
2089 RNA_def_property_update(prop, 0, "rna_userdef_update");
2091 prop = RNA_def_property(srna, "effect_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
2092 RNA_def_property_float_sdna(prop, NULL, "effect");
2093 RNA_def_property_array(prop, 3);
2094 RNA_def_property_ui_text(prop, "Effect Strip", "");
2095 RNA_def_property_update(prop, 0, "rna_userdef_update");
2097 prop = RNA_def_property(srna, "transition_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
2098 RNA_def_property_float_sdna(prop, NULL, "transition");
2099 RNA_def_property_array(prop, 3);
2100 RNA_def_property_ui_text(prop, "Transition Strip", "");
2101 RNA_def_property_update(prop, 0, "rna_userdef_update");
2103 prop = RNA_def_property(srna, "meta_strip", PROP_FLOAT, PROP_COLOR_GAMMA);
2104 RNA_def_property_float_sdna(prop, NULL, "meta");
2105 RNA_def_property_array(prop, 3);
2106 RNA_def_property_ui_text(prop, "Meta Strip", "");
2107 RNA_def_property_update(prop, 0, "rna_userdef_update");
2109 prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
2110 RNA_def_property_float_sdna(prop, NULL, "cframe");
2111 RNA_def_property_array(prop, 3);
2112 RNA_def_property_ui_text(prop, "Current Frame", "");
2113 RNA_def_property_update(prop, 0, "rna_userdef_update");
2115 prop = RNA_def_property(srna, "keyframe", PROP_FLOAT, PROP_COLOR_GAMMA);
2116 RNA_def_property_float_sdna(prop, NULL, "vertex_select");
2117 RNA_def_property_array(prop, 3);
2118 RNA_def_property_ui_text(prop, "Keyframe", "");
2119 RNA_def_property_update(prop, 0, "rna_userdef_update");
2121 prop = RNA_def_property(srna, "draw_action", PROP_FLOAT, PROP_COLOR_GAMMA);
2122 RNA_def_property_float_sdna(prop, NULL, "bone_pose");
2123 RNA_def_property_array(prop, 3);
2124 RNA_def_property_ui_text(prop, "Draw Action", "");
2125 RNA_def_property_update(prop, 0, "rna_userdef_update");
2127 prop = RNA_def_property(srna, "preview_back", PROP_FLOAT, PROP_COLOR_GAMMA);
2128 RNA_def_property_float_sdna(prop, NULL, "preview_back");
2129 RNA_def_property_array(prop, 3);
2130 RNA_def_property_ui_text(prop, "Preview Background", "");
2131 RNA_def_property_update(prop, 0, "rna_userdef_update");
2134 static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
2141 srna = RNA_def_struct(brna, "ThemeDopeSheet", NULL);
2142 RNA_def_struct_sdna(srna, "ThemeSpace");
2143 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
2144 RNA_def_struct_ui_text(srna, "Theme DopeSheet", "Theme settings for the DopeSheet");
2146 rna_def_userdef_theme_spaces_main(srna);
2147 rna_def_userdef_theme_spaces_list_main(srna);
2149 prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
2150 RNA_def_property_array(prop, 3);
2151 RNA_def_property_ui_text(prop, "Grid", "");
2152 RNA_def_property_update(prop, 0, "rna_userdef_update");
2154 prop = RNA_def_property(srna, "value_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
2155 RNA_def_property_float_sdna(prop, NULL, "face");
2156 RNA_def_property_array(prop, 3);
2157 RNA_def_property_ui_text(prop, "Value Sliders", "");
2158 RNA_def_property_update(prop, 0, "rna_userdef_update");
2160 prop = RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
2161 RNA_def_property_float_sdna(prop, NULL, "shade1");
2162 RNA_def_property_array(prop, 3);
2163 RNA_def_property_ui_text(prop, "View Sliders", "");
2164 RNA_def_property_update(prop, 0, "rna_userdef_update");
2166 prop = RNA_def_property(srna, "channels", PROP_FLOAT, PROP_COLOR_GAMMA);
2167 RNA_def_property_float_sdna(prop, NULL, "shade2");
2168 RNA_def_property_array(prop, 3);
2169 RNA_def_property_ui_text(prop, "Channels", "");
2170 RNA_def_property_update(prop, 0, "rna_userdef_update");
2172 prop = RNA_def_property(srna, "channels_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
2173 RNA_def_property_float_sdna(prop, NULL, "hilite");
2174 RNA_def_property_array(prop, 3);
2175 RNA_def_property_ui_text(prop, "Channels Selected", "");
2176 RNA_def_property_update(prop, 0, "rna_userdef_update");
2178 prop = RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR_GAMMA);
2179 RNA_def_property_float_sdna(prop, NULL, "group");
2180 RNA_def_property_array(prop, 3);
2181 RNA_def_property_ui_text(prop, "Channel Group", "");
2182 RNA_def_property_update(prop, 0, "rna_userdef_update");
2184 prop = RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR_GAMMA);
2185 RNA_def_property_float_sdna(prop, NULL, "group_active");
2186 RNA_def_property_array(prop, 3);
2187 RNA_def_property_ui_text(prop, "Active Channel Group", "");
2188 RNA_def_property_update(prop, 0, "rna_userdef_update");
2190 prop = RNA_def_property(srna, "long_key", PROP_FLOAT, PROP_COLOR_GAMMA);
2191 RNA_def_property_float_sdna(prop, NULL, "strip");
2192 RNA_def_property_array(prop, 3);
2193 RNA_def_property_ui_text(prop, "Long Key", "");
2194 RNA_def_property_update(prop, 0, "rna_userdef_update");
2196 prop = RNA_def_property(srna, "long_key_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
2197 RNA_def_property_float_sdna(prop, NULL, "strip_select");
2198 RNA_def_property_array(prop, 3);
2199 RNA_def_property_ui_text(prop, "Long Key Selected", "");
2200 RNA_def_property_update(prop, 0, "rna_userdef_update");
2202 prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
2203 RNA_def_property_float_sdna(prop, NULL, "cframe");
2204 RNA_def_property_array(prop, 3);
2205 RNA_def_property_ui_text(prop, "Current Frame", "");
2206 RNA_def_property_update(prop, 0, "rna_userdef_update");
2208 prop = RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR_GAMMA);
2209 RNA_def_property_float_sdna(prop, NULL, "ds_channel");
2210 RNA_def_property_array(prop, 3);
2211 RNA_def_property_ui_text(prop, "DopeSheet Channel", "");
2212 RNA_def_property_update(prop, 0, "rna_userdef_update");
2214 prop = RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR_GAMMA);
2215 RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
2216 RNA_def_property_array(prop, 3);
2217 RNA_def_property_ui_text(prop, "DopeSheet Sub-Channel", "");
2218 RNA_def_property_update(prop, 0, "rna_userdef_update");
2220 prop = RNA_def_property(srna, "summary", PROP_FLOAT, PROP_COLOR_GAMMA);
2221 RNA_def_property_float_sdna(prop, NULL, "anim_active");
2222 RNA_def_property_array(prop, 4);
2223 RNA_def_property_ui_text(prop, "Summary", "Color of summary channel");
2224 RNA_def_property_update(prop, 0, "rna_userdef_update");
2227 static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
2234 srna = RNA_def_struct(brna, "ThemeNLAEditor", NULL);
2235 RNA_def_struct_sdna(srna, "ThemeSpace");
2236 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
2237 RNA_def_struct_ui_text(srna, "Theme NLA Editor", "Theme settings for the NLA Editor");
2239 rna_def_userdef_theme_spaces_main(srna);
2240 rna_def_userdef_theme_spaces_list_main(srna);
2242 prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
2243 RNA_def_property_array(prop, 3);
2244 RNA_def_property_ui_text(prop, "Grid", "");
2245 RNA_def_property_update(prop, 0, "rna_userdef_update");
2247 prop = RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR_GAMMA);
2248 RNA_def_property_float_sdna(prop, NULL, "shade1");
2249 RNA_def_property_array(prop, 3);
2250 RNA_def_property_ui_text(prop, "View Sliders", "");
2251 RNA_def_property_update(prop, 0, "rna_userdef_update");
2253 prop = RNA_def_property(srna, "active_action", PROP_FLOAT, PROP_COLOR_GAMMA);
2254 RNA_def_property_float_sdna(prop, NULL, "anim_active");
2255 RNA_def_property_array(prop, 4);
2256 RNA_def_property_ui_text(prop, "Active Action", "Animation data block has active action");
2257 RNA_def_property_update(prop, 0, "rna_userdef_update");
2259 prop = RNA_def_property(srna, "active_action_unset", PROP_FLOAT, PROP_COLOR_GAMMA);
2260 RNA_def_property_float_sdna(prop, NULL, "anim_non_active");
2261 RNA_def_property_array(prop, 4);
2262 RNA_def_property_ui_text(prop, "No Active Action", "Animation data block doesn't have active action");
2263 RNA_def_property_update(prop, 0, "rna_userdef_update");
2265 prop = RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR_GAMMA);
2266 RNA_def_property_float_sdna(prop, NULL, "strip");
2267 RNA_def_property_array(prop, 3);
2268 RNA_def_property_ui_text(prop, "Strips", "Action-Clip Strip - Unselected");
2269 RNA_def_property_update(prop, 0, "rna_userdef_update");
2271 prop = RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
2272 RNA_def_property_float_sdna(prop, NULL, "strip_select");
2273 RNA_def_property_array(prop, 3);
2274 RNA_def_property_ui_text(prop, "Strips Selected", "Action-Clip Strip - Selected");
2275 RNA_def_property_update(prop, 0, "rna_userdef_update");
2277 prop = RNA_def_property(srna, "transition_strips", PROP_FLOAT, PROP_COLOR_GAMMA);
2278 RNA_def_property_float_sdna(prop, NULL, "nla_transition");
2279 RNA_def_property_array(prop, 3);
2280 RNA_def_property_ui_text(prop, "Transitions", "Transition Strip - Unselected");
2281 RNA_def_property_update(prop, 0, "rna_userdef_update");
2283 prop = RNA_def_property(srna, "transition_strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
2284 RNA_def_property_float_sdna(prop, NULL, "nla_transition_sel");
2285 RNA_def_property_array(prop, 3);
2286 RNA_def_property_ui_text(prop, "Transitions Selected", "Transition Strip - Selected");
2287 RNA_def_property_update(prop, 0, "rna_userdef_update");
2289 prop = RNA_def_property(srna, "meta_strips", PROP_FLOAT, PROP_COLOR_GAMMA);
2290 RNA_def_property_float_sdna(prop, NULL, "nla_meta");
2291 RNA_def_property_array(prop, 3);
2292 RNA_def_property_ui_text(prop, "Meta Strips", "Meta Strip - Unselected (for grouping related strips)");
2293 RNA_def_property_update(prop, 0, "rna_userdef_update");
2295 prop = RNA_def_property(srna, "meta_strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
2296 RNA_def_property_float_sdna(prop, NULL, "nla_meta_sel");
2297 RNA_def_property_array(prop, 3);
2298 RNA_def_property_ui_text(prop, "Meta Strips Selected", "Meta Strip - Selected (for grouping related strips)");
2299 RNA_def_property_update(prop, 0, "rna_userdef_update");
2301 prop = RNA_def_property(srna, "sound_strips", PROP_FLOAT, PROP_COLOR_GAMMA);
2302 RNA_def_property_float_sdna(prop, NULL, "nla_sound");
2303 RNA_def_property_array(prop, 3);
2304 RNA_def_property_ui_text(prop, "Sound Strips",
2305 "Sound Strip - Unselected (for timing speaker sounds)");
2306 RNA_def_property_update(prop, 0, "rna_userdef_update");
2308 prop = RNA_def_property(srna, "sound_strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
2309 RNA_def_property_float_sdna(prop, NULL, "nla_sound_sel");
2310 RNA_def_property_array(prop, 3);
2311 RNA_def_property_ui_text(prop, "Sound Strips Selected",
2312 "Sound Strip - Selected (for timing speaker sounds)");
2313 RNA_def_property_update(prop, 0, "rna_userdef_update");
2315 prop = RNA_def_property(srna, "tweak", PROP_FLOAT, PROP_COLOR_GAMMA);
2316 RNA_def_property_float_sdna(prop, NULL, "nla_tweaking");
2317 RNA_def_property_array(prop, 3);
2318 RNA_def_property_ui_text(prop, "Tweak", "Color for strip/action being 'tweaked' or edited");
2319 RNA_def_property_update(prop, 0, "rna_userdef_update");
2321 prop = RNA_def_property(srna, "tweak_duplicate", PROP_FLOAT, PROP_COLOR_GAMMA);
2322 RNA_def_property_float_sdna(prop, NULL, "nla_tweakdupli");
2323 RNA_def_property_array(prop, 3);
2324 RNA_def_property_ui_text(prop, "Tweak Duplicate Flag",
2325 "Warning/error indicator color for strips referencing the strip being tweaked");
2326 RNA_def_property_update(prop, 0, "rna_userdef_update");
2328 prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
2329 RNA_def_property_float_sdna(prop, NULL, "cframe");
2330 RNA_def_property_array(prop, 3);
2331 RNA_def_property_ui_text(prop, "Current Frame", "");
2332 RNA_def_property_update(prop, 0, "rna_userdef_update");
2335 static void rna_def_userdef_theme_colorset(BlenderRNA *brna)
2340 srna = RNA_def_struct(brna, "ThemeBoneColorSet", NULL);
2341 RNA_def_struct_sdna(srna, "ThemeWireColor");
2342 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
2343 RNA_def_struct_ui_text(srna, "Theme Bone Color Set", "Theme settings for bone color sets");
2345 prop = RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR_GAMMA);
2346 RNA_def_property_float_sdna(prop, NULL, "solid");
2347 RNA_def_property_array(prop, 3);
2348 RNA_def_property_ui_text(prop, "Normal", "Color used for the surface of bones");
2349 RNA_def_property_update(prop, 0, "rna_userdef_update");
2351 prop = RNA_def_property(srna, "select", PROP_FLOAT, PROP_COLOR_GAMMA);
2352 RNA_def_property_float_sdna(prop, NULL, "select");
2353 RNA_def_property_array(prop, 3);
2354 RNA_def_property_ui_text(prop, "Select", "Color used for selected bones");
2355 RNA_def_property_update(prop, 0, "rna_userdef_update");
2357 prop = RNA_def_property(srna, "active", PROP_FLOAT, PROP_COLOR_GAMMA);
2358 RNA_def_property_array(prop, 3);
2359 RNA_def_property_ui_text(prop, "Active", "Color used for active bones");
2360 RNA_def_property_update(prop, 0, "rna_userdef_update");
2362 prop = RNA_def_property(srna, "show_colored_constraints", PROP_BOOLEAN, PROP_NONE);
2363 RNA_def_property_boolean_sdna(prop, NULL, "flag", TH_WIRECOLOR_CONSTCOLS);
2364 RNA_def_property_ui_text(prop, "Colored Constraints",
2365 "Allow the use of colors indicating constraints/keyed status");
2366 RNA_def_property_update(prop, 0, "rna_userdef_update");
2369 static void rna_def_userdef_theme_space_clip(BlenderRNA *brna)
2376 srna = RNA_def_struct(brna, "ThemeClipEditor", NULL);
2377 RNA_def_struct_sdna(srna, "ThemeSpace");
2378 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
2379 RNA_def_struct_ui_text(srna, "Theme Clip Editor", "Theme settings for the Movie Clip Editor");
2381 rna_def_userdef_theme_spaces_main(srna);
2382 rna_def_userdef_theme_spaces_list_main(srna);
2384 prop = RNA_def_property(srna, "marker_outline", PROP_FLOAT, PROP_COLOR_GAMMA);
2385 RNA_def_property_float_sdna(prop, NULL, "marker_outline");
2386 RNA_def_property_array(prop, 3);
2387 RNA_def_property_ui_text(prop, "Marker Outline Color", "Color of marker's outline");
2388 RNA_def_property_update(prop, 0, "rna_userdef_update");
2390 prop = RNA_def_property(srna, "marker", PROP_FLOAT, PROP_COLOR_GAMMA);
2391 RNA_def_property_float_sdna(prop, NULL, "marker");
2392 RNA_def_property_array(prop, 3);
2393 RNA_def_property_ui_text(prop, "Marker Color", "Color of marker");
2394 RNA_def_property_update(prop, 0, "rna_userdef_update");
2396 prop = RNA_def_property(srna, "active_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
2397 RNA_def_property_float_sdna(prop, NULL, "act_marker");
2398 RNA_def_property_array(prop, 3);
2399 RNA_def_property_ui_text(prop, "Active Marker", "Color of active marker");
2400 RNA_def_property_update(prop, 0, "rna_userdef_update");
2402 prop = RNA_def_property(srna, "selected_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
2403 RNA_def_property_float_sdna(prop, NULL, "sel_marker");
2404 RNA_def_property_array(prop, 3);
2405 RNA_def_property_ui_text(prop, "Selected Marker", "Color of selected marker");
2406 RNA_def_property_update(prop, 0, "rna_userdef_update");
2408 prop = RNA_def_property(srna, "disabled_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
2409 RNA_def_property_float_sdna(prop, NULL, "dis_marker");
2410 RNA_def_property_array(prop, 3);
2411 RNA_def_property_ui_text(prop, "Disabled Marker", "Color of disabled marker");
2412 RNA_def_property_update(prop, 0, "rna_userdef_update");
2414 prop = RNA_def_property(srna, "locked_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
2415 RNA_def_property_float_sdna(prop, NULL, "lock_marker");
2416 RNA_def_property_array(prop, 3);
2417 RNA_def_property_ui_text(prop, "Locked Marker", "Color of locked marker");
2418 RNA_def_property_update(prop, 0, "rna_userdef_update");
2420 prop = RNA_def_property(srna, "path_before", PROP_FLOAT, PROP_COLOR_GAMMA);
2421 RNA_def_property_float_sdna(prop, NULL, "path_before");
2422 RNA_def_property_array(prop, 3);
2423 RNA_def_property_ui_text(prop, "Path Before", "Color of path before current frame");
2424 RNA_def_property_update(prop, 0, "rna_userdef_update");
2426 prop = RNA_def_property(srna, "path_after", PROP_FLOAT, PROP_COLOR_GAMMA);
2427 RNA_def_property_float_sdna(prop, NULL, "path_after");
2428 RNA_def_property_array(prop, 3);
2429 RNA_def_property_ui_text(prop, "Path After", "Color of path after current frame");
2430 RNA_def_property_update(prop, 0, "rna_userdef_update");
2432 prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA);
2433 RNA_def_property_array(prop, 3);
2434 RNA_def_property_ui_text(prop, "Grid", "");
2435 RNA_def_property_update(prop, 0, "rna_userdef_update");
2437 prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAMMA);
2438 RNA_def_property_float_sdna(prop, NULL, "cframe");
2439 RNA_def_property_array(prop, 3);
2440 RNA_def_property_ui_text(prop, "Current Frame", "");
2441 RNA_def_property_update(prop, 0, "rna_userdef_update");
2443 prop = RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR_GAMMA);
2444 RNA_def_property_array(prop, 3);
2445 RNA_def_property_ui_text(prop, "Handle Vertex", "");
2446 RNA_def_property_update(prop, 0, "rna_userdef_update");
2448 prop = RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_COLOR_GAMMA);
2449 RNA_def_property_array(prop, 3);
2450 RNA_def_property_ui_text(prop, "Handle Vertex Select", "");
2451 RNA_def_property_update(prop, 0, "rna_userdef_update");
2453 prop = RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_NONE);
2454 RNA_def_property_range(prop, 0, 255);
2455 RNA_def_property_ui_text(prop, "Handle Vertex Size", "");
2456 RNA_def_property_update(prop, 0, "rna_userdef_update");
2458 prop = RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR_GAMMA);
2459 RNA_def_property_float_sdna(prop, NULL, "strip");
2460 RNA_def_property_array(prop, 3);
2461 RNA_def_property_ui_text(prop, "Strips", "");
2462 RNA_def_property_update(prop, 0, "rna_userdef_update");
2464 prop = RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR_GAMMA);
2465 RNA_def_property_float_sdna(prop, NULL, "strip_select");
2466 RNA_def_property_array(prop, 3);
2467 RNA_def_property_ui_text(prop, "Strips Selected", "");
2468 RNA_def_property_update(prop, 0, "rna_userdef_update");
2471 static void rna_def_userdef_themes(BlenderRNA *brna)
2476 static EnumPropertyItem active_theme_area[] = {
2477 {0, "USER_INTERFACE", ICON_UI, "User Interface", ""},
2478 {19, "STYLE", ICON_FONTPREVIEW, "Text Style", ""},
2479 {18, "BONE_COLOR_SETS", ICON_COLOR, "Bone Color Sets", ""},
2480 {1, "VIEW_3D", ICON_VIEW3D, "3D View", ""},
2481 {2, "TIMELINE", ICON_TIME, "Timeline", ""},
2482 {3, "GRAPH_EDITOR", ICON_IPO, "Graph Editor", ""},
2483 {4, "DOPESHEET_EDITOR", ICON_ACTION, "DopeSheet", ""},
2484 {5, "NLA_EDITOR", ICON_NLA, "NLA Editor", ""},
2485 {6, "IMAGE_EDITOR", ICON_IMAGE_COL, "UV/Image Editor", ""},
2486 {7, "SEQUENCE_EDITOR", ICON_SEQUENCE, "Video Sequence Editor", ""},
2487 {8, "TEXT_EDITOR", ICON_TEXT, "Text Editor", ""},
2488 {9, "NODE_EDITOR", ICON_NODETREE, "Node Editor", ""},
2489 {10, "LOGIC_EDITOR", ICON_LOGIC, "Logic Editor", ""},
2490 {11, "PROPERTIES", ICON_BUTS, "Properties", ""},
2491 {12, "OUTLINER", ICON_OOPS, "Outliner", ""},
2492 {14, "USER_PREFERENCES", ICON_PREFERENCES, "User Preferences", ""},
2493 {15, "INFO", ICON_INFO, "Info", ""},
2494 {16, "FILE_BROWSER", ICON_FILESEL, "File Browser", ""},
2495 {17, "CONSOLE", ICON_CONSOLE, "Python Console", ""},
2496 {20, "CLIP_EDITOR", ICON_CLIP, "Movie Clip Editor", ""},
2497 {0, NULL, 0, NULL, NULL}
2500 srna = RNA_def_struct(brna, "Theme", NULL);
2501 RNA_def_struct_sdna(srna, "bTheme");
2502 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
2503 RNA_def_struct_ui_text(srna, "Theme", "Theme settings defining draw style and colors in the user interface");
2505 prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
2506 RNA_def_property_ui_text(prop, "Name", "Name of the theme");
2507 RNA_def_struct_name_property(srna, prop);
2508 /* XXX: for now putting this in presets is silly - its just Default */
2509 RNA_def_property_flag(prop, PROP_SKIP_SAVE);
2511 prop = RNA_def_property(srna, "theme_area", PROP_ENUM, PROP_NONE);
2512 RNA_def_property_enum_sdna(prop, NULL, "active_theme_area");
2513 RNA_def_property_flag(prop, PROP_SKIP_SAVE);
2514 RNA_def_property_enum_items(prop, active_theme_area);
2515 RNA_def_property_ui_text(prop, "Active Theme Area", "");
2517 prop = RNA_def_property(srna, "user_interface", PROP_POINTER, PROP_NONE);
2518 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2519 RNA_def_property_pointer_sdna(prop, NULL, "tui");
2520 RNA_def_property_struct_type(prop, "ThemeUserInterface");
2521 RNA_def_property_ui_text(prop, "User Interface", "");
2523 prop = RNA_def_property(srna, "view_3d", PROP_POINTER, PROP_NONE);
2524 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2525 RNA_def_property_pointer_sdna(prop, NULL, "tv3d");
2526 RNA_def_property_struct_type(prop, "ThemeView3D");
2527 RNA_def_property_ui_text(prop, "3D View", "");
2529 prop = RNA_def_property(srna, "graph_editor", PROP_POINTER, PROP_NONE);
2530 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2531 RNA_def_property_pointer_sdna(prop, NULL, "tipo");
2532 RNA_def_property_struct_type(prop, "ThemeGraphEditor");
2533 RNA_def_property_ui_text(prop, "Graph Editor", "");
2535 prop = RNA_def_property(srna, "file_browser", PROP_POINTER, PROP_NONE);
2536 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2537 RNA_def_property_pointer_sdna(prop, NULL, "tfile");
2538 RNA_def_property_struct_type(prop, "ThemeFileBrowser");
2539 RNA_def_property_ui_text(prop, "File Browser", "");
2541 prop = RNA_def_property(srna, "nla_editor", PROP_POINTER, PROP_NONE);
2542 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2543 RNA_def_property_pointer_sdna(prop, NULL, "tnla");
2544 RNA_def_property_struct_type(prop, "ThemeNLAEditor");
2545 RNA_def_property_ui_text(prop, "NLA Editor", "");
2547 prop = RNA_def_property(srna, "dopesheet_editor", PROP_POINTER, PROP_NONE);
2548 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2549 RNA_def_property_pointer_sdna(prop, NULL, "tact");
2550 RNA_def_property_struct_type(prop, "ThemeDopeSheet");
2551 RNA_def_property_ui_text(prop, "DopeSheet", "");
2553 prop = RNA_def_property(srna, "image_editor", PROP_POINTER, PROP_NONE);
2554 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2555 RNA_def_property_pointer_sdna(prop, NULL, "tima");
2556 RNA_def_property_struct_type(prop, "ThemeImageEditor");
2557 RNA_def_property_ui_text(prop, "Image Editor", "");
2559 prop = RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
2560 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2561 RNA_def_property_pointer_sdna(prop, NULL, "tseq");
2562 RNA_def_property_struct_type(prop, "ThemeSequenceEditor");
2563 RNA_def_property_ui_text(prop, "Sequence Editor", "");
2565 prop = RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
2566 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2567 RNA_def_property_pointer_sdna(prop, NULL, "tbuts");
2568 RNA_def_property_struct_type(prop, "ThemeProperties");
2569 RNA_def_property_ui_text(prop, "Properties", "");
2571 prop = RNA_def_property(srna, "text_editor", PROP_POINTER, PROP_NONE);
2572 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2573 RNA_def_property_pointer_sdna(prop, NULL, "text");
2574 RNA_def_property_struct_type(prop, "ThemeTextEditor");
2575 RNA_def_property_ui_text(prop, "Text Editor", "");
2577 prop = RNA_def_property(srna, "timeline", PROP_POINTER, PROP_NONE);
2578 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2579 RNA_def_property_pointer_sdna(prop, NULL, "ttime");
2580 RNA_def_property_struct_type(prop, "ThemeTimeline");
2581 RNA_def_property_ui_text(prop, "Timeline", "");
2583 prop = RNA_def_property(srna, "node_editor", PROP_POINTER, PROP_NONE);
2584 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2585 RNA_def_property_pointer_sdna(prop, NULL, "tnode");
2586 RNA_def_property_struct_type(prop, "ThemeNodeEditor");
2587 RNA_def_property_ui_text(prop, "Node Editor", "");
2589 prop = RNA_def_property(srna, "logic_editor", PROP_POINTER, PROP_NONE);
2590 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2591 RNA_def_property_pointer_sdna(prop, NULL, "tlogic");
2592 RNA_def_property_struct_type(prop, "ThemeLogicEditor");
2593 RNA_def_property_ui_text(prop, "Logic Editor", "");
2595 prop = RNA_def_property(srna, "outliner", PROP_POINTER, PROP_NONE);
2596 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2597 RNA_def_property_pointer_sdna(prop, NULL, "toops");
2598 RNA_def_property_struct_type(prop, "ThemeOutliner");
2599 RNA_def_property_ui_text(prop, "Outliner", "");
2601 prop = RNA_def_property(srna, "info", PROP_POINTER, PROP_NONE);
2602 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2603 RNA_def_property_pointer_sdna(prop, NULL, "tinfo");
2604 RNA_def_property_struct_type(prop, "ThemeInfo");
2605 RNA_def_property_ui_text(prop, "Info", "");
2607 prop = RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NONE);
2608 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2609 RNA_def_property_pointer_sdna(prop, NULL, "tuserpref");
2610 RNA_def_property_struct_type(prop, "ThemeUserPreferences");
2611 RNA_def_property_ui_text(prop, "User Preferences", "");
2613 prop = RNA_def_property(srna, "console", PROP_POINTER, PROP_NONE);
2614 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2615 RNA_def_property_pointer_sdna(prop, NULL, "tconsole");
2616 RNA_def_property_struct_type(prop, "ThemeConsole");
2617 RNA_def_property_ui_text(prop, "Console", "");
2619 prop = RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_NONE);
2620 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2621 RNA_def_property_collection_sdna(prop, NULL, "tarm", "");
2622 RNA_def_property_struct_type(prop, "ThemeBoneColorSet");
2623 RNA_def_property_ui_text(prop, "Bone Color Sets", "");
2625 prop = RNA_def_property(srna, "clip_editor", PROP_POINTER, PROP_NONE);
2626 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2627 RNA_def_property_pointer_sdna(prop, NULL, "tclip");
2628 RNA_def_property_struct_type(prop, "ThemeClipEditor");
2629 RNA_def_property_ui_text(prop, "Clip Editor", "");
2632 static void rna_def_userdef_addon(BlenderRNA *brna)
2637 srna = RNA_def_struct(brna, "Addon", NULL);
2638 RNA_def_struct_sdna(srna, "bAddon");
2639 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
2640 RNA_def_struct_ui_text(srna, "Addon", "Python addons to be loaded automatically");
2642 prop = RNA_def_property(srna, "module", PROP_STRING, PROP_NONE);
2643 RNA_def_property_ui_text(prop, "Module", "Module name");
2644 RNA_def_struct_name_property(srna, prop);
2646 /* Collection active property */
2647 prop = RNA_def_property(srna, "preferences", PROP_POINTER, PROP_NONE);
2648 RNA_def_property_struct_type(prop, "AddonPreferences");
2649 RNA_def_property_pointer_funcs(prop, "rna_Addon_preferences_get", NULL, NULL, NULL);
2652 static void rna_def_userdef_addon_pref(BlenderRNA *brna)
2657 srna = RNA_def_struct(brna, "AddonPreferences", NULL);
2658 RNA_def_struct_ui_text(srna, "Addon Preferences", "");
2659 RNA_def_struct_sdna(srna, "bAddon"); /* WARNING: only a bAddon during registration */
2661 RNA_def_struct_refine_func(srna, "rna_AddonPref_refine");
2662 RNA_def_struct_register_funcs(srna, "rna_AddonPref_register", "rna_AddonPref_unregister", NULL);
2663 RNA_def_struct_idprops_func(srna, "rna_AddonPref_idprops");
2666 RNA_define_verify_sdna(0);
2667 prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
2668 RNA_def_property_string_sdna(prop, NULL, "module");
2669 RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP);
2670 RNA_define_verify_sdna(1);
2674 static void rna_def_userdef_dothemes(BlenderRNA *brna)
2677 rna_def_userdef_theme_ui_style(brna);
2678 rna_def_userdef_theme_ui(brna);
2680 rna_def_userdef_theme_space_generic(brna);
2681 rna_def_userdef_theme_space_gradient(brna);
2682 rna_def_userdef_theme_space_list_generic(brna);
2684 rna_def_userdef_theme_space_view3d(brna);
2685 rna_def_userdef_theme_space_graph(brna);
2686 rna_def_userdef_theme_space_file(brna);
2687 rna_def_userdef_theme_space_nla(brna);
2688 rna_def_userdef_theme_space_action(brna);
2689 rna_def_userdef_theme_space_image(brna);
2690 rna_def_userdef_theme_space_seq(brna);
2691 rna_def_userdef_theme_space_buts(brna);
2692 rna_def_userdef_theme_space_text(brna);
2693 rna_def_userdef_theme_space_time(brna);
2694 rna_def_userdef_theme_space_node(brna);
2695 rna_def_userdef_theme_space_outliner(brna);
2696 rna_def_userdef_theme_space_info(brna);
2697 rna_def_userdef_theme_space_userpref(brna);
2698 rna_def_userdef_theme_space_console(brna);
2699 rna_def_userdef_theme_space_logic(brna);
2700 rna_def_userdef_theme_space_clip(brna);
2701 rna_def_userdef_theme_colorset(brna);
2702 rna_def_userdef_themes(brna);
2705 static void rna_def_userdef_solidlight(BlenderRNA *brna)
2709 static float default_dir[3] = {0.f, 1.f, 0.f};
2711 srna = RNA_def_struct(brna, "UserSolidLight", NULL);
2712 RNA_def_struct_sdna(srna, "SolidLight");
2713 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
2714 RNA_def_struct_ui_text(srna, "Solid Light", "Light used for OpenGL lighting in solid draw mode");
2716 prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE);
2717 RNA_def_property_boolean_sdna(prop, NULL, "flag", 1);
2718 RNA_def_property_ui_text(prop, "Enabled", "Enable this OpenGL light in solid draw mode");
2719 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
2721 prop = RNA_def_property(srna, "direction", PROP_FLOAT, PROP_DIRECTION);
2722 RNA_def_property_float_sdna(prop, NULL, "vec");
2723 RNA_def_property_array(prop, 3);
2724 RNA_def_property_float_array_default(prop, default_dir);
2725 RNA_def_property_ui_text(prop, "Direction", "Direction that the OpenGL light is shining");
2726 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
2728 prop = RNA_def_property(srna, "diffuse_color", PROP_FLOAT, PROP_COLOR);
2729 RNA_def_property_float_sdna(prop, NULL, "col");
2730 RNA_def_property_array(prop, 3);
2731 RNA_def_property_ui_text(prop, "Diffuse Color", "Diffuse color of the OpenGL light");
2732 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
2734 prop = RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR);
2735 RNA_def_property_float_sdna(prop, NULL, "spec");
2736 RNA_def_property_array(prop, 3);
2737 RNA_def_property_ui_text(prop, "Specular Color", "Color of the light's specular highlight");
2738 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
2741 static void rna_def_userdef_view(BlenderRNA *brna)
2743 static EnumPropertyItem timecode_styles[] = {
2744 {USER_TIMECODE_MINIMAL, "MINIMAL", 0, "Minimal Info",
2745 "Most compact representation, uses '+' as separator for sub-second frame numbers, "
2746 "with left and right truncation of the timecode as necessary"},
2747 {USER_TIMECODE_SMPTE_FULL, "SMPTE", 0, "SMPTE (Full)", "Full SMPTE timecode (format is HH:MM:SS:FF)"},
2748 {USER_TIMECODE_SMPTE_MSF, "SMPTE_COMPACT", 0, "SMPTE (Compact)",
2749 "SMPTE timecode showing minutes, seconds, and frames only - "
2750 "hours are also shown if necessary, but not by default"},
2751 {USER_TIMECODE_MILLISECONDS, "MILLISECONDS", 0, "Compact with Milliseconds",
2752 "Similar to SMPTE (Compact), except that instead of frames, "
2753 "milliseconds are shown instead"},
2754 {USER_TIMECODE_SECONDS_ONLY, "SECONDS_ONLY", 0, "Only Seconds",
2755 "Direct conversion of frame numbers to seconds"},
2756 {0, NULL, 0, NULL, NULL}
2762 srna = RNA_def_struct(brna, "UserPreferencesView", NULL);
2763 RNA_def_struct_sdna(srna, "UserDef");
2764 RNA_def_struct_nested(brna, srna, "UserPreferences");
2765 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
2766 RNA_def_struct_ui_text(srna, "View & Controls", "Preferences related to viewing data");
2771 prop = RNA_def_property(srna, "show_tooltips", PROP_BOOLEAN, PROP_NONE);
2772 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TOOLTIPS);
2773 RNA_def_property_ui_text(prop, "Tooltips", "Display tooltips");
2775 prop = RNA_def_property(srna, "show_tooltips_python", PROP_BOOLEAN, PROP_NONE);
2776 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TOOLTIPS_PYTHON);
2777 RNA_def_property_ui_text(prop, "Show Python Tooltips", "Show Python references in tooltips");
2779 prop = RNA_def_property(srna, "show_object_info", PROP_BOOLEAN, PROP_NONE);
2780 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DRAWVIEWINFO);
2781 RNA_def_property_ui_text(prop, "Display Object Info", "Display objects name and frame number in 3D view");
2782 RNA_def_property_update(prop, 0, "rna_userdef_update");
2784 prop = RNA_def_property(srna, "use_global_scene", PROP_BOOLEAN, PROP_NONE);
2785 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SCENEGLOBAL);
2786 RNA_def_property_ui_text(prop, "Global Scene", "Force the current Scene to be displayed in all Screens");
2787 RNA_def_property_update(prop, 0, "rna_userdef_update");
2789 prop = RNA_def_property(srna, "show_large_cursors", PROP_BOOLEAN, PROP_NONE);
2790 RNA_def_property_boolean_sdna(prop, NULL, "curssize", 0);
2791 RNA_def_property_ui_text(prop, "Large Cursors", "Use large mouse cursors when available");
2792 RNA_def_property_update(prop, 0, "rna_userdef_update");
2794 prop = RNA_def_property(srna, "show_view_name", PROP_BOOLEAN, PROP_NONE);
2795 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_VIEWPORTNAME);
2796 RNA_def_property_ui_text(prop, "Show View Name", "Show the name of the view's direction in each 3D View");
2797 RNA_def_property_update(prop, 0, "rna_userdef_update");
2799 prop = RNA_def_property(srna, "show_splash", PROP_BOOLEAN, PROP_NONE);
2800 RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_SPLASH_DISABLE);
2801 RNA_def_property_ui_text(prop, "Show Splash", "Display splash screen on startup");
2803 prop = RNA_def_property(srna, "show_playback_fps", PROP_BOOLEAN, PROP_NONE);
2804 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_FPS);
2805 RNA_def_property_ui_text(prop, "Show Playback FPS",
2806 "Show the frames per second screen refresh rate, while animation is played back");
2807 RNA_def_property_update(prop, 0, "rna_userdef_update");
2810 prop = RNA_def_property(srna, "use_mouse_over_open", PROP_BOOLEAN, PROP_NONE);
2811 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MENUOPENAUTO);
2812 RNA_def_property_ui_text(prop, "Open On Mouse Over",
2813 "Open menu buttons and pulldowns automatically when the mouse is hovering");
2815 prop = RNA_def_property(srna, "open_toplevel_delay", PROP_INT, PROP_NONE);
2816 RNA_def_property_int_sdna(prop, NULL, "menuthreshold1");
2817 RNA_def_property_range(prop, 1, 40);
2818 RNA_def_property_ui_text(prop, "Top Level Menu Open Delay",
2819 "Time delay in 1/10 seconds before automatically opening top level menus");
2821 prop = RNA_def_property(srna, "open_sublevel_delay", PROP_INT, PROP_NONE);
2822 RNA_def_property_int_sdna(prop, NULL, "menuthreshold2");
2823 RNA_def_property_range(prop, 1, 40);
2824 RNA_def_property_ui_text(prop, "Sub Level Menu Open Delay",
2825 "Time delay in 1/10 seconds before automatically opening sub level menus");
2827 prop = RNA_def_property(srna, "use_quit_dialog", PROP_BOOLEAN, PROP_NONE);
2828 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_QUIT_PROMPT);
2829 RNA_def_property_ui_text(prop, "Prompt Quit",
2830 "Asks for confirmation when quitting through the window close button");
2832 /* Toolbox click-hold delay */
2833 prop = RNA_def_property(srna, "open_left_mouse_delay", PROP_INT, PROP_NONE);
2834 RNA_def_property_int_sdna(prop, NULL, "tb_leftmouse");
2835 RNA_def_property_range(prop, 1, 40);
2836 RNA_def_property_ui_text(prop, "Hold LMB Open Toolbox Delay",
2837 "Time in 1/10 seconds to hold the Left Mouse Button before opening the toolbox");
2839 prop = RNA_def_property(srna, "open_right_mouse_delay", PROP_INT, PROP_NONE);
2840 RNA_def_property_int_sdna(prop, NULL, "tb_rightmouse");
2841 RNA_def_property_range(prop, 1, 40);
2842 RNA_def_property_ui_text(prop, "Hold RMB Open Toolbox Delay",
2843 "Time in 1/10 seconds to hold the Right Mouse Button before opening the toolbox");
2845 prop = RNA_def_property(srna, "show_column_layout", PROP_BOOLEAN, PROP_NONE);
2846 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_PLAINMENUS);
2847 RNA_def_property_ui_text(prop, "Toolbox Column Layout", "Use a column layout for toolbox");
2849 prop = RNA_def_property(srna, "use_directional_menus", PROP_BOOLEAN, PROP_NONE);
2850 RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_MENUFIXEDORDER);
2851 RNA_def_property_ui_text(prop, "Contents Follow Opening Direction",
2852 "Otherwise menus, etc will always be top to bottom, left to right, "
2853 "no matter opening direction");
2855 prop = RNA_def_property(srna, "use_global_pivot", PROP_BOOLEAN, PROP_NONE);
2856 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCKAROUND);
2857 RNA_def_property_ui_text(prop, "Global Pivot", "Lock the same rotation/scaling pivot in all 3D Views");
2859 prop = RNA_def_property(srna, "use_mouse_depth_navigate", PROP_BOOLEAN, PROP_NONE);
2860 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZBUF_ORBIT);
2861 RNA_def_property_ui_text(prop, "Auto Depth",
2862 "Use the depth under the mouse to improve view pan/rotate/zoom functionality");
2864 prop = RNA_def_property(srna, "use_mouse_depth_cursor", PROP_BOOLEAN, PROP_NONE);
2865 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZBUF_CURSOR);
2866 RNA_def_property_ui_text(prop, "Cursor Depth",
2867 "Use the depth under the mouse when placing the cursor");
2869 prop = RNA_def_property(srna, "use_camera_lock_parent", PROP_BOOLEAN, PROP_NONE);
2870 RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_CAM_LOCK_NO_PARENT);
2871 RNA_def_property_ui_text(prop, "Camera Parent Lock",
2872 "When the camera is locked to the view and in fly mode, "
2873 "transform the parent rather than the camera");
2876 prop = RNA_def_property(srna, "use_zoom_to_mouse", PROP_BOOLEAN, PROP_NONE);
2877 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_TO_MOUSEPOS);
2878 RNA_def_property_ui_text(prop, "Zoom To Mouse Position",
2879 "Zoom in towards the mouse pointer's position in the 3D view, "
2880 "rather than the 2D window center");
2883 prop = RNA_def_property(srna, "use_auto_perspective", PROP_BOOLEAN, PROP_NONE);
2884 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_AUTOPERSP);
2885 RNA_def_property_ui_text(prop, "Auto Perspective",
2886 "Automatically switch between orthographic and perspective when changing "
2887 "from top/front/side views");
2889 prop = RNA_def_property(srna, "use_rotate_around_active", PROP_BOOLEAN, PROP_NONE);
2890 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_SELECTION);
2891 RNA_def_property_ui_text(prop, "Rotate Around Selection", "Use selection as the pivot point");
2894 prop = RNA_def_property(srna, "show_mini_axis", PROP_BOOLEAN, PROP_NONE);
2895 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_ROTVIEWICON);
2896 RNA_def_property_ui_text(prop, "Show Mini Axes",
2897 "Show a small rotating 3D axes in the bottom left corner of the 3D View");
2898 RNA_def_property_update(prop, 0, "rna_userdef_update");
2900 prop = RNA_def_property(srna, "mini_axis_size", PROP_INT, PROP_NONE);
2901 RNA_def_property_int_sdna(prop, NULL, "rvisize");
2902 RNA_def_property_range(prop, 10, 64);
2903 RNA_def_property_ui_text(prop, "Mini Axes Size", "The axes icon's size");
2904 RNA_def_property_update(prop, 0, "rna_userdef_update");
2906 prop = RNA_def_property(srna, "mini_axis_brightness", PROP_INT, PROP_NONE);
2907 RNA_def_property_int_sdna(prop, NULL, "rvibright");
2908 RNA_def_property_range(prop, 0, 10);
2909 RNA_def_property_ui_text(prop, "Mini Axes Brightness", "Brightness of the icon");
2910 RNA_def_property_update(prop, 0, "rna_userdef_update");
2912 prop = RNA_def_property(srna, "smooth_view", PROP_INT, PROP_NONE);
2913 RNA_def_property_int_sdna(prop, NULL, "smooth_viewtx");
2914 RNA_def_property_range(prop, 0, 1000);
2915 RNA_def_property_ui_text(prop, "Smooth View", "Time to animate the view in milliseconds, zero to disable");
2917 prop = RNA_def_property(srna, "rotation_angle", PROP_INT, PROP_NONE);
2918 RNA_def_property_int_sdna(prop, NULL, "pad_rot_angle");
2919 RNA_def_property_range(prop, 0, 90);
2920 RNA_def_property_ui_text(prop, "Rotation Angle", "Rotation step for numerical pad keys (2 4 6 8)");
2922 /* 3D transform widget */
2923 prop = RNA_def_property(srna, "show_manipulator", PROP_BOOLEAN, PROP_NONE);
2924 RNA_def_property_boolean_sdna(prop, NULL, "tw_flag", V3D_USE_MANIPULATOR);
2925 RNA_def_property_ui_text(prop, "Manipulator", "Use 3D transform manipulator");
2926 RNA_def_property_update(prop, 0, "rna_userdef_show_manipulator_update");
2928 prop = RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_NONE);
2929 RNA_def_property_int_sdna(prop, NULL, "tw_size");
2930 RNA_def_property_range(prop, 2, 40);
2931 RNA_def_property_int_default(prop, 15);
2932 RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of widget, in 10 pixel units");
2933 RNA_def_property_update(prop, 0, "rna_userdef_update");
2935 prop = RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_NONE);
2936 RNA_def_property_int_sdna(prop, NULL, "tw_handlesize");
2937 RNA_def_property_range(prop, 2, 40);
2938 RNA_def_property_int_default(prop, 25);
2939 RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of widget handles as percentage of widget radius");
2940 RNA_def_property_update(prop, 0, "rna_userdef_update");
2942 prop = RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_NONE);
2943 RNA_def_property_int_sdna(prop, NULL, "tw_hotspot");
2944 RNA_def_property_range(prop, 4, 40);
2945 RNA_def_property_int_default(prop, 14);
2946 RNA_def_property_ui_text(prop, "Manipulator Hotspot", "Pixel distance around the handles to accept mouse clicks");
2948 prop = RNA_def_property(srna, "object_origin_size", PROP_INT, PROP_NONE);
2949 RNA_def_property_int_sdna(prop, NULL, "obcenter_dia");
2950 RNA_def_property_range(prop, 4, 10);
2951 RNA_def_property_ui_text(prop, "Object Origin Size", "Diameter in Pixels for Object/Lamp origin display");
2952 RNA_def_property_update(prop, 0, "rna_userdef_update");
2954 /* View2D Grid Displays */
2955 prop = RNA_def_property(srna, "view2d_grid_spacing_min", PROP_INT, PROP_NONE);
2956 RNA_def_property_int_sdna(prop, NULL, "v2d_min_gridsize");
2957 RNA_def_property_range(prop, 1, 500); /* XXX: perhaps the lower range should only go down to 5? */
2958 RNA_def_property_ui_text(prop, "2D View Minimum Grid Spacing",
2959 "Minimum number of pixels between each gridline in 2D Viewports");
2960 RNA_def_property_update(prop, 0, "rna_userdef_update");
2962 /* TODO: add a setter for this, so that we can bump up the minimum size as necessary... */
2963 prop = RNA_def_property(srna, "timecode_style", PROP_ENUM, PROP_NONE);
2964 RNA_def_property_enum_items(prop, timecode_styles);
2965 RNA_def_property_enum_sdna(prop, NULL, "timecode_style");
2966 RNA_def_property_enum_funcs(prop, NULL, "rna_userdef_timecode_style_set", NULL);
2967 RNA_def_property_ui_text(prop, "TimeCode Style",
2968 "Format of Time Codes displayed when not displaying timing in terms of frames");
2969 RNA_def_property_update(prop, 0, "rna_userdef_update");
2972 static void rna_def_userdef_edit(BlenderRNA *brna)
2977 static EnumPropertyItem auto_key_modes[] = {
2978 {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add/Replace", ""},
2979 {AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
2980 {0, NULL, 0, NULL, NULL}
2983 static const EnumPropertyItem material_link_items[] = {
2984 {0, "OBDATA", 0, "ObData", "Toggle whether the material is linked to object data or the object block"},
2985 {USER_MAT_ON_OB, "OBJECT", 0, "Object",
2986 "Toggle whether the material is linked to object data or the object block"},
2987 {0, NULL, 0, NULL, NULL}
2990 static const EnumPropertyItem object_align_items[] = {
2991 {0, "WORLD", 0, "World", "Align newly added objects to the world coordinate system"},
2992 {USER_ADD_VIEWALIGNED, "VIEW", 0, "View", "Align newly added objects facing the active 3D View direction"},
2993 {0, NULL, 0, NULL, NULL}
2996 srna = RNA_def_struct(brna, "UserPreferencesEdit", NULL);
2997 RNA_def_struct_sdna(srna, "UserDef");
2998 RNA_def_struct_nested(brna, srna, "UserPreferences");
2999 RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
3000 RNA_def_struct_ui_text(srna, "Edit Methods", "Settings for interacting with Blender data");
3004 prop = RNA_def_property(srna, "material_link", PROP_ENUM, PROP_NONE);
3005 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
3006 RNA_def_property_enum_items(prop, material_link_items);
3007 RNA_def_property_ui_text(prop, "Material Link To",
3008 "Toggle whether the material is linked to object data or the object block");
3010 prop = RNA_def_property(srna, "object_align", PROP_ENUM, PROP_NONE);
3011 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
3012 RNA_def_property_enum_items(prop, object_align_items);
3013 RNA_def_property_ui_text(prop, "Align Object To",
3014 "When adding objects from a 3D View menu, either align them with that view or "
3017 prop = RNA_def_property(srna, "use_enter_edit_mode", PROP_BOOLEAN, PROP_NONE);
3018 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ADD_EDITMODE);
3019 RNA_def_property_ui_text(prop, "Enter Edit Mode", "Enter Edit Mode automatically after adding a new object");
3021 prop = RNA_def_property(srna, "use_drag_immediately", PROP_BOOLEAN, PROP_NONE);
3022 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELEASECONFIRM);
3023 RNA_def_property_ui_text(prop, "Release confirms",
3024 "Moving things with a mouse drag confirms when releasing the button");
3027 prop = RNA_def_property(srna, "undo_steps", PROP_INT, PROP_NONE);
3028 RNA_def_property_int_sdna(prop, NULL, "undosteps");
3029 RNA_def_property_range(prop, 0, 64);
3030 RNA_def_property_ui_text(prop, "Undo Steps", "Number of undo steps available (smaller values conserve memory)");
3032 prop = RNA_def_property(srna, "undo_memory_limit", PROP_INT, PROP_NONE);
3033 RNA_def_property_int_sdna(prop, NULL, "undomemory");
3034 RNA_def_property_range(prop, 0, 32767);
3035 RNA_def_property_ui_text(prop, "Undo Memory Size", "Maximum memory usage in megabytes (0 means unlimited)");
3037 prop = RNA_def_property(srna, "use_global_undo", PROP_BOOLEAN, PROP_NONE);
3038 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_GLOBALUNDO);
3039 RNA_def_property_ui_text(prop, "Global Undo",
3040 "Global undo works by keeping a full copy of the file itself in memory, "
3041 "so takes extra memory");
3043 /* auto keyframing */
3044 prop = RNA_def_property(srna, "use_auto_keying", PROP_BOOLEAN, PROP_NONE);
3045 RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
3046 RNA_def_property_ui_text(prop, "Auto Keying Enable",
3047 "Automatic keyframe insertion for Objects and Bones "
3048 "(default setting used for new Scenes)");
3049 RNA_def_property_ui_icon(prop, ICON_REC, 0);
3051 prop = RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
3052 RNA_def_property_enum_items(prop, auto_key_modes);
3053 RNA_def_property_enum_funcs(prop, "rna_userdef_autokeymode_get", "rna_userdef_autokeymode_set", NULL);
3054 RNA_def_property_ui_text(prop, "Auto Keying Mode",
3055 "Mode of automatic keyframe insertion for Objects and Bones "
3056 "(default setting used for new Scenes)");
3058 prop = RNA_def_property(srna, "use_keyframe_insert_available", PROP_BOOLEAN, PROP_NONE);
3059 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTAVAIL);
3060 RNA_def_property_ui_text(prop, "Auto Keyframe Insert Available",
3061 "Automatic keyframe insertion in available F-Curves");
3063 prop = RNA_def_property(srna, "use_auto_keying_warning", PROP_BOOLEAN, PROP_NONE);
3064 RNA_def_property_boolean_negative_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_NOWARNING);
3065 RNA_def_property_ui_text(prop, "Show Auto Keying Warning",
3066 "Show warning indicators when transforming objects and bones if auto keying is enabled");
3068 /* keyframing settings */
3069 prop = RNA_def_property(srna, "use_keyframe_insert_needed", PROP_BOOLEAN, PROP_NONE);
3070 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTNEEDED);
3071 RNA_def_property_ui_text(prop, "Keyframe Insert Needed", "Keyframe insertion only when keyframe needed");
3073 prop = RNA_def_property(srna, "use_visual_keying", PROP_BOOLEAN, PROP_NONE);
3074 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_AUTOMATKEY);
3075 RNA_def_property_ui_text(prop, "Visual Keying", "Use Visual keying automatically for constrained objects");
3077 prop = RNA_def_property(srna, "use_insertkey_xyz_to_rgb", PROP_BOOLEAN, PROP_NONE);
3078 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_XYZ2RGB);
3079 RNA_def_property_ui_text(prop, "New F-Curve Colors - XYZ to RGB",
3080 "Color for newly added transformation F-Curves (Location, Rotation, Scale) "
3081 "and also Color is based on the transform axis");
3083 prop = RNA_def_property(srna, "keyframe_new_interpolation_type", PROP_ENUM, PROP_NONE);
3084 RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items);
3085 RNA_def_property_enum_sdna(prop, NULL, "ipo_new");
3086 RNA_def_property_ui_text(prop, "New Interpolation Type",
3087 "Interpolation mode used for first keyframe on newly added F-Curves "
3088 "(subsequent keyframes take interpolation from preceding keyframe)");
3090 prop = RNA_def_property(srna, "keyframe_new_handle_type", PROP_ENUM, PROP_NONE);
3091 RNA_def_property_enum_items(prop, keyframe_handle_type_items);
3092 RNA_def_property_enum_sdna(prop, NULL, "keyhandles_new");
3093 RNA_def_property_ui_text(prop, "New Handles Type", "Handle type for handles of new keyframes");
3096 prop = RNA_def_property(srna, "use_negative_frames", PROP_BOOLEAN, PROP_NONE);
3097 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_NONEGFRAMES);
3098 RNA_def_property_ui_text(prop, "Allow Negative Frames",
3099 "Current frame number can be manually set to a negative value");
3101 /* fcurve opacity */
3102 prop = RNA_def_property(srna, "fcurve_unselected_alpha", PROP_FLOAT, PROP_FACTOR);
3103 RNA_def_property_float_sdna(prop, NULL, "fcu_inactive_alpha");
3104 RNA_def_property_range(prop, 0.001f, 1.0f);
3105 RNA_def_property_ui_text(prop, "Unselected F-Curve Visibility",
3106 "Amount that unselected F-Curves stand out from the background (Graph Editor)");
3107 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL);
3110 prop = RNA_def_property(srna, "grease_pencil_manhattan_distance", PROP_INT, PROP_NONE);
3111 RNA_def_property_int_sdna(prop, NULL, "gp_manhattendist");
3112 RNA_def_property_range(prop, 0, 100);
3113 RNA_def_property_ui_text(prop, "Grease Pencil Manhattan Distance",
3114 "Pixels moved by mouse per axis when drawing stroke");
3116 prop = RNA_def_property(srna, "grease_pencil_euclidean_distance", PROP_INT, PROP_NONE);
3117 RNA_def_property_int_sdna(prop, NULL, "gp_euclideandist");
3118 RNA_def_property_range(prop, 0, 100);
3119 RNA_def_property_ui_text(prop, "Grease Pencil Euclidean Distance",
3120 "Distance moved by mouse when drawing stroke (in pixels) to include");
3122 prop = RNA_def_property(srna, "use_grease_pencil_smooth_stroke", PROP_BOOLEAN, PROP_NONE);
3123 RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSMOOTH);
3124 RNA_def_property_ui_text(prop, "Grease Pencil Smooth Stroke", "Smooth the final stroke");
3126 prop = RNA_def_property(srna, "use_grease_pencil_simplify_stroke", PROP_BOOLEAN, PROP_NONE);
3127 RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSIMPLIFY);
3128 RNA_def_property_ui_text(prop, "Grease Pencil Simplify Stroke", "Simplify the final stroke");
3130 prop = RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, PROP_NONE);
3131 RNA_def_property_int_sdna(prop, NULL, "gp_eraser");
3132 RNA_def_property_range(prop, 0, 100);
3133 RNA_def_property_ui_text(prop, "Grease Pencil Eraser Radius", "Radius of eraser 'brush'");
3135 /* sculpt and paint */
3137 prop = RNA_def_property(srna, "sculpt_paint_overlay_color", PROP_FLOAT, PROP_COLOR_GAMMA);
3138 RNA_def_property_float_sdna(prop, NULL, "sculpt_paint_overlay_col");
3139 RNA_def_property_array(prop, 3);
3140 RNA_def_property_ui_text(prop, "Sculpt/Paint Overlay Color", "Color of texture overlay");
3142 /* duplication linking */
3143 prop = RNA_def_property(srna, "use_duplicate_mesh", PROP_BOOLEAN, PROP_NONE);
3144 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MESH);
3145 RNA_def_property_ui_text(prop, "Duplicate Mesh", "Causes mesh data to be duplicated with the object");
3147 prop = RNA_def_property(srna, "use_duplicate_surface", PROP_BOOLEAN, PROP_NONE);
3148 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_SURF);
3149 RNA_def_property_ui_text(prop, "Duplicate Surface", "Causes surface data to be duplicated with the object");
3151 prop = RNA_def_property(srna, "use_duplicate_curve", PROP_BOOLEAN, PROP_NONE);
3152 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_CURVE);
3153 RNA_def_property_ui_text(prop, "Duplicate Curve", "Causes curve data to be duplicated with the object");
3155 prop = RNA_def_property(srna, "use_duplicate_text", PROP_BOOLEAN, PROP_NONE);
3156 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_FONT);
3157 RNA_def_property_ui_text(prop, "Duplicate Text", "Causes text data to be duplicated with the object");
3159 prop = RNA_def_property(srna, "use_duplicate_metaball", PROP_BOOLEAN, PROP_NONE);
3160 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MBALL);
3161 RNA_def_property_ui_text(prop, "Duplicate Metaball", "Causes metaball data to be duplicated with the object");
3163 prop = RNA_def_property(srna, "use_duplicate_armature", PROP_BOOLEAN, PROP_NONE);
3164 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ARM);
3165 RNA_def_property_ui_text(prop, "Duplicate Armature", "Causes armature data to be duplicated with the object");
3167 prop = RNA_def_property(srna, "use_duplicate_lamp", PROP_BOOLEAN, PROP_NONE);
3168 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_LAMP);
3169 RNA_def_property_ui_text(prop, "Duplicate Lamp", "Causes lamp data to be duplicated with the object");
3171 prop = RNA_def_property(srna, "use_duplicate_material", PROP_BOOLEAN, PROP_NONE);
3172 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MAT);
3173 RNA_def_property_ui_text(prop, "Duplicate Material", "Causes material data to be duplicated with the object&