4 * ***** BEGIN GPL LICENSE BLOCK *****
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 * Contributor(s): Blender Foundation (2008).
22 * ***** END GPL LICENSE BLOCK *****
27 #include "RNA_define.h"
28 #include "RNA_types.h"
30 #include "rna_internal.h"
32 #include "DNA_curve_types.h"
33 #include "DNA_space_types.h"
34 #include "DNA_userdef_types.h"
39 #include "BKE_utildefines.h"
41 #include "BKE_sound.h"
46 #include "BKE_DerivedMesh.h"
47 #include "BKE_depsgraph.h"
48 #include "DNA_object_types.h"
49 // #include "GPU_draw.h"
51 static void rna_userdef_update(Main *bmain, Scene *scene, PointerRNA *ptr)
53 WM_main_add_notifier(NC_WINDOW, NULL);
57 static void rna_userdef_lmb_select_set(PointerRNA *ptr,int value)
59 UserDef *userdef = (UserDef*)ptr->data;
62 userdef->flag |= USER_LMOUSESELECT;
63 userdef->flag &= ~USER_TWOBUTTONMOUSE;
66 userdef->flag &= ~USER_LMOUSESELECT;
69 static void rna_userdef_rmb_select_set(PointerRNA *ptr,int value)
71 rna_userdef_lmb_select_set(ptr, !value);
75 static void rna_userdef_emulate_set(PointerRNA *ptr,int value)
77 UserDef *userdef = (UserDef*)ptr->data;
79 if(userdef->flag & USER_LMOUSESELECT)
80 userdef->flag &= ~USER_TWOBUTTONMOUSE;
82 userdef->flag ^= USER_TWOBUTTONMOUSE;
85 static int rna_userdef_autokeymode_get(PointerRNA *ptr)
87 UserDef *userdef = (UserDef*)ptr->data;
88 short retval = userdef->autokey_mode;
90 if(!(userdef->autokey_mode & AUTOKEY_ON))
96 static void rna_userdef_autokeymode_set(PointerRNA *ptr,int value)
98 UserDef *userdef = (UserDef*)ptr->data;
100 if(value == AUTOKEY_MODE_NORMAL) {
101 userdef->autokey_mode |= (AUTOKEY_MODE_NORMAL - AUTOKEY_ON);
102 userdef->autokey_mode &= ~(AUTOKEY_MODE_EDITKEYS - AUTOKEY_ON);
104 else if(value == AUTOKEY_MODE_EDITKEYS) {
105 userdef->autokey_mode |= (AUTOKEY_MODE_EDITKEYS - AUTOKEY_ON);
106 userdef->autokey_mode &= ~(AUTOKEY_MODE_NORMAL - AUTOKEY_ON);
110 static PointerRNA rna_UserDef_view_get(PointerRNA *ptr)
112 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesView, ptr->data);
115 static PointerRNA rna_UserDef_edit_get(PointerRNA *ptr)
117 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesEdit, ptr->data);
120 static PointerRNA rna_UserDef_input_get(PointerRNA *ptr)
122 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesInput, ptr->data);
125 static PointerRNA rna_UserDef_filepaths_get(PointerRNA *ptr)
127 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesFilePaths, ptr->data);
130 static PointerRNA rna_UserDef_system_get(PointerRNA *ptr)
132 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesSystem, ptr->data);
135 static void rna_UserDef_audio_update(Main *bmain, Scene *scene, PointerRNA *ptr)
140 static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRNA *ptr)
144 vDM_ColorBand_store((U.flag & USER_CUSTOM_RANGE) ? (&U.coba_weight):NULL);
146 for(ob= bmain->object.first; ob; ob= ob->id.next) {
147 if(ob->mode & OB_MODE_WEIGHT_PAINT)
148 DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
151 rna_userdef_update(bmain, scene, ptr);
154 // XXX - todo, this is not accessible from here and it only works when the userprefs are in the same window.
155 // extern int GPU_default_lights(void);
156 static void rna_UserDef_viewport_lights_update(Main *bmain, Scene *scene, PointerRNA *ptr)
158 // GPU_default_lights();
159 WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D, NULL);
160 rna_userdef_update(bmain, scene, ptr);
163 static void rna_userdef_autosave_update(Main *bmain, Scene *scene, PointerRNA *ptr)
165 wmWindowManager *wm= bmain->wm.first;
168 WM_autosave_init(wm);
169 rna_userdef_update(bmain, scene, ptr);
174 static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
179 static EnumPropertyItem font_kerning_style[] = {
180 {0, "UNFITTED", 0, "Unfitted", "Use scaled but un-grid-fitted kerning distances."},
181 {1, "DEFAULT", 0, "Default", "Use scaled and grid-fitted kerning distances."},
182 {0, NULL, 0, NULL, NULL}};
184 srna= RNA_def_struct(brna, "ThemeFontStyle", NULL);
185 RNA_def_struct_sdna(srna, "uiFontStyle");
186 RNA_def_struct_ui_text(srna, "Font Style", "Theme settings for Font.");
188 prop= RNA_def_property(srna, "points", PROP_INT, PROP_NONE);
189 RNA_def_property_range(prop, 6, 48);
190 RNA_def_property_ui_text(prop, "Points", "");
191 RNA_def_property_update(prop, 0, "rna_userdef_update");
193 prop= RNA_def_property(srna, "font_kerning_style", PROP_ENUM, PROP_NONE);
194 RNA_def_property_enum_sdna(prop, NULL, "kerning");
195 RNA_def_property_enum_items(prop, font_kerning_style);
196 RNA_def_property_ui_text(prop, "Kerning Style", "Which style to use for font kerning.");
197 RNA_def_property_update(prop, 0, "rna_userdef_update");
199 prop= RNA_def_property(srna, "shadow", PROP_INT, PROP_NONE);
200 RNA_def_property_range(prop, 0, 5);
201 RNA_def_property_ui_text(prop, "Shadow Size", "Shadow size in pixels (0, 3 and 5 supported)");
202 RNA_def_property_update(prop, 0, "rna_userdef_update");
204 prop= RNA_def_property(srna, "shadx", PROP_INT, PROP_NONE);
205 RNA_def_property_range(prop, -10, 10);
206 RNA_def_property_ui_text(prop, "Shadow X Offset", "Shadow offset in pixels");
207 RNA_def_property_update(prop, 0, "rna_userdef_update");
209 prop= RNA_def_property(srna, "shady", PROP_INT, PROP_NONE);
210 RNA_def_property_range(prop, -10, 10);
211 RNA_def_property_ui_text(prop, "Shadow Y Offset", "Shadow offset in pixels");
212 RNA_def_property_update(prop, 0, "rna_userdef_update");
214 prop= RNA_def_property(srna, "shadowalpha", PROP_FLOAT, PROP_NONE);
215 RNA_def_property_range(prop, 0.0f, 1.0f);
216 RNA_def_property_ui_text(prop, "Shadow Alpha", "");
217 RNA_def_property_update(prop, 0, "rna_userdef_update");
219 prop= RNA_def_property(srna, "shadowcolor", PROP_FLOAT, PROP_NONE);
220 RNA_def_property_range(prop, 0.0f, 1.0f);
221 RNA_def_property_ui_text(prop, "Shadow Brightness", "Shadow color in grey value");
222 RNA_def_property_update(prop, 0, "rna_userdef_update");
225 static void rna_def_userdef_theme_ui_style(BlenderRNA *brna)
230 rna_def_userdef_theme_ui_font_style(brna);
232 srna= RNA_def_struct(brna, "ThemeStyle", NULL);
233 RNA_def_struct_sdna(srna, "uiStyle");
234 RNA_def_struct_ui_text(srna, "Style", "Theme settings for style sets.");
236 prop= RNA_def_property(srna, "panelzoom", PROP_FLOAT, PROP_NONE);
237 RNA_def_property_range(prop, 0.5, 2.0);
238 RNA_def_property_ui_text(prop, "Panel Zoom", "Default zoom level for panel areas.");
240 prop= RNA_def_property(srna, "paneltitle", PROP_POINTER, PROP_NONE);
241 RNA_def_property_flag(prop, PROP_NEVER_NULL);
242 RNA_def_property_pointer_sdna(prop, NULL, "paneltitle");
243 RNA_def_property_struct_type(prop, "ThemeFontStyle");
244 RNA_def_property_ui_text(prop, "Panel Font", "");
245 RNA_def_property_update(prop, 0, "rna_userdef_update");
247 prop= RNA_def_property(srna, "grouplabel", PROP_POINTER, PROP_NONE);
248 RNA_def_property_flag(prop, PROP_NEVER_NULL);
249 RNA_def_property_pointer_sdna(prop, NULL, "grouplabel");
250 RNA_def_property_struct_type(prop, "ThemeFontStyle");
251 RNA_def_property_ui_text(prop, "Group Label Font", "");
252 RNA_def_property_update(prop, 0, "rna_userdef_update");
254 prop= RNA_def_property(srna, "widgetlabel", PROP_POINTER, PROP_NONE);
255 RNA_def_property_flag(prop, PROP_NEVER_NULL);
256 RNA_def_property_pointer_sdna(prop, NULL, "widgetlabel");
257 RNA_def_property_struct_type(prop, "ThemeFontStyle");
258 RNA_def_property_ui_text(prop, "Widget Label Font", "");
259 RNA_def_property_update(prop, 0, "rna_userdef_update");
261 prop= RNA_def_property(srna, "widget", PROP_POINTER, PROP_NONE);
262 RNA_def_property_flag(prop, PROP_NEVER_NULL);
263 RNA_def_property_pointer_sdna(prop, NULL, "widget");
264 RNA_def_property_struct_type(prop, "ThemeFontStyle");
265 RNA_def_property_ui_text(prop, "Widget Font", "");
266 RNA_def_property_update(prop, 0, "rna_userdef_update");
270 static void rna_def_userdef_theme_ui_wcol(BlenderRNA *brna)
275 srna= RNA_def_struct(brna, "ThemeWidgetColors", NULL);
276 RNA_def_struct_sdna(srna, "uiWidgetColors");
277 RNA_def_struct_ui_text(srna, "Theme Widget Color Set", "Theme settings for widget color sets.");
279 prop= RNA_def_property(srna, "outline", PROP_FLOAT, PROP_COLOR);
280 RNA_def_property_array(prop, 3);
281 RNA_def_property_ui_text(prop, "Outline", "");
282 RNA_def_property_update(prop, 0, "rna_userdef_update");
284 prop= RNA_def_property(srna, "inner", PROP_FLOAT, PROP_COLOR);
285 RNA_def_property_array(prop, 4);
286 RNA_def_property_ui_text(prop, "Inner", "");
287 RNA_def_property_update(prop, 0, "rna_userdef_update");
289 prop= RNA_def_property(srna, "inner_sel", PROP_FLOAT, PROP_COLOR);
290 RNA_def_property_array(prop, 4);
291 RNA_def_property_ui_text(prop, "Inner Selected", "");
292 RNA_def_property_update(prop, 0, "rna_userdef_update");
294 prop= RNA_def_property(srna, "item", PROP_FLOAT, PROP_COLOR);
295 RNA_def_property_array(prop, 4);
296 RNA_def_property_ui_text(prop, "Item", "");
297 RNA_def_property_update(prop, 0, "rna_userdef_update");
299 prop= RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR);
300 RNA_def_property_array(prop, 3);
301 RNA_def_property_ui_text(prop, "Text", "");
302 RNA_def_property_update(prop, 0, "rna_userdef_update");
304 prop= RNA_def_property(srna, "text_sel", PROP_FLOAT, PROP_COLOR);
305 RNA_def_property_array(prop, 3);
306 RNA_def_property_ui_text(prop, "Text Selected", "");
307 RNA_def_property_update(prop, 0, "rna_userdef_update");
309 prop= RNA_def_property(srna, "shaded", PROP_BOOLEAN, PROP_NONE);
310 RNA_def_property_boolean_sdna(prop, NULL, "shaded", 1);
311 RNA_def_property_ui_text(prop, "Shaded", "");
312 RNA_def_property_update(prop, 0, "rna_userdef_update");
314 prop= RNA_def_property(srna, "shadetop", PROP_INT, PROP_NONE);
315 RNA_def_property_range(prop, -100, 100);
316 RNA_def_property_ui_text(prop, "Shade Top", "");
317 RNA_def_property_update(prop, 0, "rna_userdef_update");
319 prop= RNA_def_property(srna, "shadedown", PROP_INT, PROP_NONE);
320 RNA_def_property_range(prop, -100, 100);
321 RNA_def_property_ui_text(prop, "Shade Down", "");
322 RNA_def_property_update(prop, 0, "rna_userdef_update");
325 static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
330 srna= RNA_def_struct(brna, "ThemeWidgetStateColors", NULL);
331 RNA_def_struct_sdna(srna, "uiWidgetStateColors");
332 RNA_def_struct_ui_text(srna, "Theme Widget State Color", "Theme settings for widget state colors.");
334 prop= RNA_def_property(srna, "inner_anim", PROP_FLOAT, PROP_COLOR);
335 RNA_def_property_array(prop, 3);
336 RNA_def_property_ui_text(prop, "Animated", "");
337 RNA_def_property_update(prop, 0, "rna_userdef_update");
339 prop= RNA_def_property(srna, "inner_anim_sel", PROP_FLOAT, PROP_COLOR);
340 RNA_def_property_array(prop, 3);
341 RNA_def_property_ui_text(prop, "Animated Selected", "");
342 RNA_def_property_update(prop, 0, "rna_userdef_update");
344 prop= RNA_def_property(srna, "inner_key", PROP_FLOAT, PROP_COLOR);
345 RNA_def_property_array(prop, 3);
346 RNA_def_property_ui_text(prop, "Keyframe", "");
347 RNA_def_property_update(prop, 0, "rna_userdef_update");
349 prop= RNA_def_property(srna, "inner_key_sel", PROP_FLOAT, PROP_COLOR);
350 RNA_def_property_array(prop, 3);
351 RNA_def_property_ui_text(prop, "Keyframe Selected", "");
352 RNA_def_property_update(prop, 0, "rna_userdef_update");
354 prop= RNA_def_property(srna, "inner_driven", PROP_FLOAT, PROP_COLOR);
355 RNA_def_property_array(prop, 3);
356 RNA_def_property_ui_text(prop, "Driven", "");
357 RNA_def_property_update(prop, 0, "rna_userdef_update");
359 prop= RNA_def_property(srna, "inner_driven_sel", PROP_FLOAT, PROP_COLOR);
360 RNA_def_property_array(prop, 3);
361 RNA_def_property_ui_text(prop, "Driven Selected", "");
362 RNA_def_property_update(prop, 0, "rna_userdef_update");
364 prop= RNA_def_property(srna, "blend", PROP_FLOAT, PROP_FACTOR);
365 RNA_def_property_ui_text(prop, "Blend", "");
366 RNA_def_property_update(prop, 0, "rna_userdef_update");
369 static void rna_def_userdef_theme_ui(BlenderRNA *brna)
374 rna_def_userdef_theme_ui_wcol(brna);
375 rna_def_userdef_theme_ui_wcol_state(brna);
377 srna= RNA_def_struct(brna, "ThemeUserInterface", NULL);
378 RNA_def_struct_sdna(srna, "ThemeUI");
379 RNA_def_struct_ui_text(srna, "Theme User Interface", "Theme settings for user interface elements.");
381 prop= RNA_def_property(srna, "wcol_regular", PROP_POINTER, PROP_NONE);
382 RNA_def_property_flag(prop, PROP_NEVER_NULL);
383 RNA_def_property_pointer_sdna(prop, NULL, "wcol_regular");
384 RNA_def_property_struct_type(prop, "ThemeWidgetColors");
385 RNA_def_property_ui_text(prop, "Regular Widget Colors", "");
386 RNA_def_property_update(prop, 0, "rna_userdef_update");
388 prop= RNA_def_property(srna, "wcol_tool", PROP_POINTER, PROP_NONE);
389 RNA_def_property_flag(prop, PROP_NEVER_NULL);
390 RNA_def_property_pointer_sdna(prop, NULL, "wcol_tool");
391 RNA_def_property_struct_type(prop, "ThemeWidgetColors");
392 RNA_def_property_ui_text(prop, "Tool Widget Colors", "");
393 RNA_def_property_update(prop, 0, "rna_userdef_update");
395 prop= RNA_def_property(srna, "wcol_radio", PROP_POINTER, PROP_NONE);
396 RNA_def_property_flag(prop, PROP_NEVER_NULL);
397 RNA_def_property_pointer_sdna(prop, NULL, "wcol_radio");
398 RNA_def_property_struct_type(prop, "ThemeWidgetColors");
399 RNA_def_property_ui_text(prop, "Radio Widget Colors", "");
400 RNA_def_property_update(prop, 0, "rna_userdef_update");
402 prop= RNA_def_property(srna, "wcol_text", PROP_POINTER, PROP_NONE);
403 RNA_def_property_flag(prop, PROP_NEVER_NULL);
404 RNA_def_property_pointer_sdna(prop, NULL, "wcol_text");
405 RNA_def_property_struct_type(prop, "ThemeWidgetColors");
406 RNA_def_property_ui_text(prop, "Text Widget Colors", "");
407 RNA_def_property_update(prop, 0, "rna_userdef_update");
409 prop= RNA_def_property(srna, "wcol_option", PROP_POINTER, PROP_NONE);
410 RNA_def_property_flag(prop, PROP_NEVER_NULL);
411 RNA_def_property_pointer_sdna(prop, NULL, "wcol_option");
412 RNA_def_property_struct_type(prop, "ThemeWidgetColors");
413 RNA_def_property_ui_text(prop, "Option Widget Colors", "");
414 RNA_def_property_update(prop, 0, "rna_userdef_update");
416 prop= RNA_def_property(srna, "wcol_toggle", PROP_POINTER, PROP_NONE);
417 RNA_def_property_flag(prop, PROP_NEVER_NULL);
418 RNA_def_property_pointer_sdna(prop, NULL, "wcol_toggle");
419 RNA_def_property_struct_type(prop, "ThemeWidgetColors");
420 RNA_def_property_ui_text(prop, "Toggle Widget Colors", "");
421 RNA_def_property_update(prop, 0, "rna_userdef_update");
423 prop= RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NONE);
424 RNA_def_property_flag(prop, PROP_NEVER_NULL);
425 RNA_def_property_pointer_sdna(prop, NULL, "wcol_num");
426 RNA_def_property_struct_type(prop, "ThemeWidgetColors");
427 RNA_def_property_ui_text(prop, "Number Widget Colors", "");
428 RNA_def_property_update(prop, 0, "rna_userdef_update");
430 prop= RNA_def_property(srna, "wcol_numslider", PROP_POINTER, PROP_NONE);
431 RNA_def_property_flag(prop, PROP_NEVER_NULL);
432 RNA_def_property_pointer_sdna(prop, NULL, "wcol_numslider");
433 RNA_def_property_struct_type(prop, "ThemeWidgetColors");
434 RNA_def_property_ui_text(prop, "Slider Widget Colors", "");
435 RNA_def_property_update(prop, 0, "rna_userdef_update");
437 prop= RNA_def_property(srna, "wcol_box", PROP_POINTER, PROP_NONE);
438 RNA_def_property_flag(prop, PROP_NEVER_NULL);
439 RNA_def_property_pointer_sdna(prop, NULL, "wcol_box");
440 RNA_def_property_struct_type(prop, "ThemeWidgetColors");
441 RNA_def_property_ui_text(prop, "Box Backdrop Colors", "");
442 RNA_def_property_update(prop, 0, "rna_userdef_update");
444 prop= RNA_def_property(srna, "wcol_menu", PROP_POINTER, PROP_NONE);
445 RNA_def_property_flag(prop, PROP_NEVER_NULL);
446 RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu");
447 RNA_def_property_struct_type(prop, "ThemeWidgetColors");
448 RNA_def_property_ui_text(prop, "Menu Widget Colors", "");
449 RNA_def_property_update(prop, 0, "rna_userdef_update");
451 prop= RNA_def_property(srna, "wcol_pulldown", PROP_POINTER, PROP_NONE);
452 RNA_def_property_flag(prop, PROP_NEVER_NULL);
453 RNA_def_property_pointer_sdna(prop, NULL, "wcol_pulldown");
454 RNA_def_property_struct_type(prop, "ThemeWidgetColors");
455 RNA_def_property_ui_text(prop, "Pulldown Widget Colors", "");
456 RNA_def_property_update(prop, 0, "rna_userdef_update");
458 prop= RNA_def_property(srna, "wcol_menu_back", PROP_POINTER, PROP_NONE);
459 RNA_def_property_flag(prop, PROP_NEVER_NULL);
460 RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_back");
461 RNA_def_property_struct_type(prop, "ThemeWidgetColors");
462 RNA_def_property_ui_text(prop, "Menu Backdrop Colors", "");
463 RNA_def_property_update(prop, 0, "rna_userdef_update");
465 prop= RNA_def_property(srna, "wcol_menu_item", PROP_POINTER, PROP_NONE);
466 RNA_def_property_flag(prop, PROP_NEVER_NULL);
467 RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_item");
468 RNA_def_property_struct_type(prop, "ThemeWidgetColors");
469 RNA_def_property_ui_text(prop, "Menu Item Colors", "");
470 RNA_def_property_update(prop, 0, "rna_userdef_update");
472 prop= RNA_def_property(srna, "wcol_scroll", PROP_POINTER, PROP_NONE);
473 RNA_def_property_flag(prop, PROP_NEVER_NULL);
474 RNA_def_property_pointer_sdna(prop, NULL, "wcol_scroll");
475 RNA_def_property_struct_type(prop, "ThemeWidgetColors");
476 RNA_def_property_ui_text(prop, "Scroll Widget Colors", "");
477 RNA_def_property_update(prop, 0, "rna_userdef_update");
479 prop= RNA_def_property(srna, "wcol_list_item", PROP_POINTER, PROP_NONE);
480 RNA_def_property_flag(prop, PROP_NEVER_NULL);
481 RNA_def_property_pointer_sdna(prop, NULL, "wcol_list_item");
482 RNA_def_property_struct_type(prop, "ThemeWidgetColors");
483 RNA_def_property_ui_text(prop, "List Item Colors", "");
484 RNA_def_property_update(prop, 0, "rna_userdef_update");
486 prop= RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NONE);
487 RNA_def_property_flag(prop, PROP_NEVER_NULL);
488 RNA_def_property_pointer_sdna(prop, NULL, "wcol_state");
489 RNA_def_property_struct_type(prop, "ThemeWidgetStateColors");
490 RNA_def_property_ui_text(prop, "State Colors", "");
491 RNA_def_property_update(prop, 0, "rna_userdef_update");
493 prop= RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH);
494 RNA_def_property_string_sdna(prop, NULL, "iconfile");
495 RNA_def_property_ui_text(prop, "Icon File", "");
496 RNA_def_property_update(prop, 0, "rna_userdef_update");
499 static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype)
504 prop= RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR);
505 RNA_def_property_array(prop, 3);
506 RNA_def_property_ui_text(prop, "Window Background", "");
507 RNA_def_property_update(prop, 0, "rna_userdef_update");
509 prop= RNA_def_property(srna, "title", PROP_FLOAT, PROP_COLOR);
510 RNA_def_property_array(prop, 3);
511 RNA_def_property_ui_text(prop, "Title", "");
512 RNA_def_property_update(prop, 0, "rna_userdef_update");
514 prop= RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR);
515 RNA_def_property_array(prop, 3);
516 RNA_def_property_ui_text(prop, "Text", "");
517 RNA_def_property_update(prop, 0, "rna_userdef_update");
519 prop= RNA_def_property(srna, "text_hi", PROP_FLOAT, PROP_COLOR);
520 RNA_def_property_array(prop, 3);
521 RNA_def_property_ui_text(prop, "Text Highlight", "");
522 RNA_def_property_update(prop, 0, "rna_userdef_update");
525 prop= RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR);
526 RNA_def_property_array(prop, 3);
527 RNA_def_property_ui_text(prop, "Header", "");
528 RNA_def_property_update(prop, 0, "rna_userdef_update");
530 prop= RNA_def_property(srna, "header_text", PROP_FLOAT, PROP_COLOR);
531 RNA_def_property_array(prop, 3);
532 RNA_def_property_ui_text(prop, "Header Text", "");
533 RNA_def_property_update(prop, 0, "rna_userdef_update");
535 prop= RNA_def_property(srna, "header_text_hi", PROP_FLOAT, PROP_COLOR);
536 RNA_def_property_array(prop, 3);
537 RNA_def_property_ui_text(prop, "Header Text Highlight", "");
538 RNA_def_property_update(prop, 0, "rna_userdef_update");
541 // if(! ELEM(spacetype, SPACE_BUTS, SPACE_OUTLINER)) {
542 prop= RNA_def_property(srna, "button", PROP_FLOAT, PROP_COLOR);
543 RNA_def_property_array(prop, 3);
544 RNA_def_property_ui_text(prop, "Region Background", "");
545 RNA_def_property_update(prop, 0, "rna_userdef_update");
547 prop= RNA_def_property(srna, "button_title", PROP_FLOAT, PROP_COLOR);
548 RNA_def_property_array(prop, 3);
549 RNA_def_property_ui_text(prop, "Region Text Titles", "");
550 RNA_def_property_update(prop, 0, "rna_userdef_update");
552 prop= RNA_def_property(srna, "button_text", PROP_FLOAT, PROP_COLOR);
553 RNA_def_property_array(prop, 3);
554 RNA_def_property_ui_text(prop, "Region Text", "");
555 RNA_def_property_update(prop, 0, "rna_userdef_update");
557 prop= RNA_def_property(srna, "button_text_hi", PROP_FLOAT, PROP_COLOR);
558 RNA_def_property_array(prop, 3);
559 RNA_def_property_ui_text(prop, "Region Text Highlight", "");
560 RNA_def_property_update(prop, 0, "rna_userdef_update");
564 if(ELEM5(spacetype, SPACE_IPO, SPACE_ACTION, SPACE_NLA, SPACE_NODE, SPACE_FILE)) {
565 prop= RNA_def_property(srna, "list", PROP_FLOAT, PROP_COLOR);
566 RNA_def_property_array(prop, 3);
567 RNA_def_property_ui_text(prop, "Source List", "");
568 RNA_def_property_update(prop, 0, "rna_userdef_update");
570 prop= RNA_def_property(srna, "list_title", PROP_FLOAT, PROP_COLOR);
571 RNA_def_property_array(prop, 3);
572 RNA_def_property_ui_text(prop, "Source List Title", "");
573 RNA_def_property_update(prop, 0, "rna_userdef_update");
575 prop= RNA_def_property(srna, "list_text", PROP_FLOAT, PROP_COLOR);
576 RNA_def_property_array(prop, 3);
577 RNA_def_property_ui_text(prop, "Source List Text", "");
578 RNA_def_property_update(prop, 0, "rna_userdef_update");
580 prop= RNA_def_property(srna, "list_text_hi", PROP_FLOAT, PROP_COLOR);
581 RNA_def_property_array(prop, 3);
582 RNA_def_property_ui_text(prop, "Source List Text Highlight", "");
583 RNA_def_property_update(prop, 0, "rna_userdef_update");
587 static void rna_def_userdef_theme_spaces_vertex(StructRNA *srna)
591 prop= RNA_def_property(srna, "vertex", PROP_FLOAT, PROP_COLOR);
592 RNA_def_property_array(prop, 3);
593 RNA_def_property_ui_text(prop, "Vertex", "");
594 RNA_def_property_update(prop, 0, "rna_userdef_update");
596 prop= RNA_def_property(srna, "vertex_select", PROP_FLOAT, PROP_COLOR);
597 RNA_def_property_array(prop, 3);
598 RNA_def_property_ui_text(prop, "Vertex Select", "");
599 RNA_def_property_update(prop, 0, "rna_userdef_update");
601 prop= RNA_def_property(srna, "vertex_size", PROP_INT, PROP_NONE);
602 RNA_def_property_range(prop, 1, 10);
603 RNA_def_property_ui_text(prop, "Vertex Size", "");
604 RNA_def_property_update(prop, 0, "rna_userdef_update");
607 static void rna_def_userdef_theme_spaces_edge(StructRNA *srna)
611 prop= RNA_def_property(srna, "edge_select", PROP_FLOAT, PROP_COLOR);
612 RNA_def_property_array(prop, 3);
613 RNA_def_property_ui_text(prop, "Edge Select", "");
614 RNA_def_property_update(prop, 0, "rna_userdef_update");
616 prop= RNA_def_property(srna, "edge_seam", PROP_FLOAT, PROP_COLOR);
617 RNA_def_property_array(prop, 3);
618 RNA_def_property_ui_text(prop, "Edge Seam", "");
619 RNA_def_property_update(prop, 0, "rna_userdef_update");
621 prop= RNA_def_property(srna, "edge_sharp", PROP_FLOAT, PROP_COLOR);
622 RNA_def_property_array(prop, 3);
623 RNA_def_property_ui_text(prop, "Edge Sharp", "");
624 RNA_def_property_update(prop, 0, "rna_userdef_update");
626 prop= RNA_def_property(srna, "edge_facesel", PROP_FLOAT, PROP_COLOR);
627 RNA_def_property_array(prop, 3);
628 RNA_def_property_ui_text(prop, "Edge UV Face Select", "");
629 RNA_def_property_update(prop, 0, "rna_userdef_update");
632 static void rna_def_userdef_theme_spaces_face(StructRNA *srna)
636 prop= RNA_def_property(srna, "face", PROP_FLOAT, PROP_COLOR);
637 RNA_def_property_array(prop, 4);
638 RNA_def_property_ui_text(prop, "Face", "");
639 RNA_def_property_update(prop, 0, "rna_userdef_update");
641 prop= RNA_def_property(srna, "face_select", PROP_FLOAT, PROP_COLOR);
642 RNA_def_property_array(prop, 4);
643 RNA_def_property_ui_text(prop, "Face Selected", "");
644 RNA_def_property_update(prop, 0, "rna_userdef_update");
646 prop= RNA_def_property(srna, "face_dot", PROP_FLOAT, PROP_COLOR);
647 RNA_def_property_array(prop, 3);
648 RNA_def_property_ui_text(prop, "Face Dot Selected", "");
649 RNA_def_property_update(prop, 0, "rna_userdef_update");
651 prop= RNA_def_property(srna, "facedot_size", PROP_INT, PROP_NONE);
652 RNA_def_property_range(prop, 1, 10);
653 RNA_def_property_ui_text(prop, "Face Dot Size", "");
654 RNA_def_property_update(prop, 0, "rna_userdef_update");
657 static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
664 srna= RNA_def_struct(brna, "ThemeView3D", NULL);
665 RNA_def_struct_sdna(srna, "ThemeSpace");
666 RNA_def_struct_ui_text(srna, "Theme 3D View", "Theme settings for the 3D View.");
668 rna_def_userdef_theme_spaces_main(srna, SPACE_VIEW3D);
670 prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
671 RNA_def_property_array(prop, 3);
672 RNA_def_property_ui_text(prop, "Grid", "");
673 RNA_def_property_update(prop, 0, "rna_userdef_update");
675 prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
676 RNA_def_property_array(prop, 4);
677 RNA_def_property_ui_text(prop, "Panel", "");
678 RNA_def_property_update(prop, 0, "rna_userdef_update");
680 prop= RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR);
681 RNA_def_property_array(prop, 3);
682 RNA_def_property_ui_text(prop, "Wire", "");
683 RNA_def_property_update(prop, 0, "rna_userdef_update");
685 prop= RNA_def_property(srna, "lamp", PROP_FLOAT, PROP_COLOR);
686 RNA_def_property_array(prop, 4);
687 RNA_def_property_ui_text(prop, "Lamp", "");
688 RNA_def_property_update(prop, 0, "rna_userdef_update");
690 prop= RNA_def_property(srna, "object_selected", PROP_FLOAT, PROP_COLOR);
691 RNA_def_property_float_sdna(prop, NULL, "select");
692 RNA_def_property_array(prop, 3);
693 RNA_def_property_ui_text(prop, "Object Selected", "");
694 RNA_def_property_update(prop, 0, "rna_userdef_update");
696 prop= RNA_def_property(srna, "object_active", PROP_FLOAT, PROP_COLOR);
697 RNA_def_property_float_sdna(prop, NULL, "active");
698 RNA_def_property_array(prop, 3);
699 RNA_def_property_ui_text(prop, "Active Object", "");
700 RNA_def_property_update(prop, 0, "rna_userdef_update");
702 prop= RNA_def_property(srna, "object_grouped", PROP_FLOAT, PROP_COLOR);
703 RNA_def_property_float_sdna(prop, NULL, "group");
704 RNA_def_property_array(prop, 3);
705 RNA_def_property_ui_text(prop, "Object Grouped", "");
706 RNA_def_property_update(prop, 0, "rna_userdef_update");
708 prop= RNA_def_property(srna, "object_grouped_active", PROP_FLOAT, PROP_COLOR);
709 RNA_def_property_float_sdna(prop, NULL, "group_active");
710 RNA_def_property_array(prop, 3);
711 RNA_def_property_ui_text(prop, "Object Grouped Active", "");
712 RNA_def_property_update(prop, 0, "rna_userdef_update");
714 prop= RNA_def_property(srna, "transform", PROP_FLOAT, PROP_COLOR);
715 RNA_def_property_array(prop, 3);
716 RNA_def_property_ui_text(prop, "Transform", "");
717 RNA_def_property_update(prop, 0, "rna_userdef_update");
719 rna_def_userdef_theme_spaces_vertex(srna);
720 rna_def_userdef_theme_spaces_edge(srna);
721 rna_def_userdef_theme_spaces_face(srna);
723 prop= RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR);
724 RNA_def_property_array(prop, 4);
725 RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", "");
726 RNA_def_property_update(prop, 0, "rna_userdef_update");
728 prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR);
729 RNA_def_property_array(prop, 3);
730 RNA_def_property_ui_text(prop, "Normal", "");
731 RNA_def_property_update(prop, 0, "rna_userdef_update");
733 prop= RNA_def_property(srna, "bone_solid", PROP_FLOAT, PROP_COLOR);
734 RNA_def_property_array(prop, 3);
735 RNA_def_property_ui_text(prop, "Bone Solid", "");
736 RNA_def_property_update(prop, 0, "rna_userdef_update");
738 prop= RNA_def_property(srna, "bone_pose", PROP_FLOAT, PROP_COLOR);
739 RNA_def_property_array(prop, 3);
740 RNA_def_property_ui_text(prop, "Bone Pose", "");
741 RNA_def_property_update(prop, 0, "rna_userdef_update");
743 prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
744 RNA_def_property_float_sdna(prop, NULL, "cframe");
745 RNA_def_property_array(prop, 3);
746 RNA_def_property_ui_text(prop, "Current Frame", "");
747 RNA_def_property_update(prop, 0, "rna_userdef_update");
750 static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
757 srna= RNA_def_struct(brna, "ThemeGraphEditor", NULL);
758 RNA_def_struct_sdna(srna, "ThemeSpace");
759 RNA_def_struct_ui_text(srna, "Theme Graph Editor", "Theme settings for the graph editor.");
761 rna_def_userdef_theme_spaces_main(srna, SPACE_IPO);
763 prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
764 RNA_def_property_array(prop, 3);
765 RNA_def_property_ui_text(prop, "Grid", "");
766 RNA_def_property_update(prop, 0, "rna_userdef_update");
768 prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
769 RNA_def_property_array(prop, 3);
770 RNA_def_property_ui_text(prop, "Panel", "");
771 RNA_def_property_update(prop, 0, "rna_userdef_update");
773 prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR);
774 RNA_def_property_float_sdna(prop, NULL, "shade1");
775 RNA_def_property_array(prop, 3);
776 RNA_def_property_ui_text(prop, "Window Sliders", "");
777 RNA_def_property_update(prop, 0, "rna_userdef_update");
779 prop= RNA_def_property(srna, "channels_region", PROP_FLOAT, PROP_COLOR);
780 RNA_def_property_float_sdna(prop, NULL, "shade2");
781 RNA_def_property_array(prop, 3);
782 RNA_def_property_ui_text(prop, "Channels Region", "");
783 RNA_def_property_update(prop, 0, "rna_userdef_update");
785 rna_def_userdef_theme_spaces_vertex(srna);
787 prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
788 RNA_def_property_float_sdna(prop, NULL, "cframe");
789 RNA_def_property_array(prop, 3);
790 RNA_def_property_ui_text(prop, "Current Frame", "");
791 RNA_def_property_update(prop, 0, "rna_userdef_update");
793 prop= RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR);
794 RNA_def_property_array(prop, 3);
795 RNA_def_property_ui_text(prop, "Handle Vertex", "");
796 RNA_def_property_update(prop, 0, "rna_userdef_update");
798 prop= RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_COLOR);
799 RNA_def_property_array(prop, 3);
800 RNA_def_property_ui_text(prop, "Handle Vertex Select", "");
801 RNA_def_property_update(prop, 0, "rna_userdef_update");
803 prop= RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_NONE);
804 RNA_def_property_range(prop, 0, 255);
805 RNA_def_property_ui_text(prop, "Handle Vertex Size", "");
806 RNA_def_property_update(prop, 0, "rna_userdef_update");
808 prop= RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR);
809 RNA_def_property_float_sdna(prop, NULL, "group");
810 RNA_def_property_array(prop, 3);
811 RNA_def_property_ui_text(prop, "Channel Group", "");
812 RNA_def_property_update(prop, 0, "rna_userdef_update");
814 prop= RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR);
815 RNA_def_property_float_sdna(prop, NULL, "group_active");
816 RNA_def_property_array(prop, 3);
817 RNA_def_property_ui_text(prop, "Active Channel Group", "");
818 RNA_def_property_update(prop, 0, "rna_userdef_update");
820 prop= RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR);
821 RNA_def_property_float_sdna(prop, NULL, "ds_channel");
822 RNA_def_property_array(prop, 3);
823 RNA_def_property_ui_text(prop, "DopeSheet Channel", "");
824 RNA_def_property_update(prop, 0, "rna_userdef_update");
826 prop= RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR);
827 RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
828 RNA_def_property_array(prop, 3);
829 RNA_def_property_ui_text(prop, "DopeSheet Sub-Channel", "");
830 RNA_def_property_update(prop, 0, "rna_userdef_update");
833 static void rna_def_userdef_theme_space_file(BlenderRNA *brna)
840 srna= RNA_def_struct(brna, "ThemeFileBrowser", NULL);
841 RNA_def_struct_sdna(srna, "ThemeSpace");
842 RNA_def_struct_ui_text(srna, "Theme File Browser", "Theme settings for the File Browser.");
844 rna_def_userdef_theme_spaces_main(srna, SPACE_FILE);
846 prop= RNA_def_property(srna, "selected_file", PROP_FLOAT, PROP_COLOR);
847 RNA_def_property_float_sdna(prop, NULL, "hilite");
848 RNA_def_property_array(prop, 3);
849 RNA_def_property_ui_text(prop, "Selected File", "");
850 RNA_def_property_update(prop, 0, "rna_userdef_update");
852 prop= RNA_def_property(srna, "tiles", PROP_FLOAT, PROP_COLOR);
853 RNA_def_property_float_sdna(prop, NULL, "panel");
854 RNA_def_property_array(prop, 3);
855 RNA_def_property_ui_text(prop, "Tiles", "");
856 RNA_def_property_update(prop, 0, "rna_userdef_update");
858 prop= RNA_def_property(srna, "scrollbar", PROP_FLOAT, PROP_COLOR);
859 RNA_def_property_float_sdna(prop, NULL, "shade1");
860 RNA_def_property_array(prop, 3);
861 RNA_def_property_ui_text(prop, "Scrollbar", "");
862 RNA_def_property_update(prop, 0, "rna_userdef_update");
864 prop= RNA_def_property(srna, "scroll_handle", PROP_FLOAT, PROP_COLOR);
865 RNA_def_property_float_sdna(prop, NULL, "shade2");
866 RNA_def_property_array(prop, 3);
867 RNA_def_property_ui_text(prop, "Scroll Handle", "");
868 RNA_def_property_update(prop, 0, "rna_userdef_update");
870 prop= RNA_def_property(srna, "active_file", PROP_FLOAT, PROP_COLOR);
871 RNA_def_property_float_sdna(prop, NULL, "active");
872 RNA_def_property_array(prop, 3);
873 RNA_def_property_ui_text(prop, "Active File", "");
874 RNA_def_property_update(prop, 0, "rna_userdef_update");
876 prop= RNA_def_property(srna, "active_file_text", PROP_FLOAT, PROP_COLOR);
877 RNA_def_property_float_sdna(prop, NULL, "grid");
878 RNA_def_property_array(prop, 3);
879 RNA_def_property_ui_text(prop, "Active File Text", "");
880 RNA_def_property_update(prop, 0, "rna_userdef_update");
883 static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna)
889 srna= RNA_def_struct(brna, "ThemeOutliner", NULL);
890 RNA_def_struct_sdna(srna, "ThemeSpace");
891 RNA_def_struct_ui_text(srna, "Theme Outliner", "Theme settings for the Outliner.");
893 rna_def_userdef_theme_spaces_main(srna, SPACE_OUTLINER);
896 static void rna_def_userdef_theme_space_userpref(BlenderRNA *brna)
902 srna= RNA_def_struct(brna, "ThemeUserPreferences", NULL);
903 RNA_def_struct_sdna(srna, "ThemeSpace");
904 RNA_def_struct_ui_text(srna, "Theme User Preferences", "Theme settings for the User Preferences.");
906 rna_def_userdef_theme_spaces_main(srna, SPACE_USERPREF);
909 static void rna_def_userdef_theme_space_info(BlenderRNA *brna)
915 srna= RNA_def_struct(brna, "ThemeInfo", NULL);
916 RNA_def_struct_sdna(srna, "ThemeSpace");
917 RNA_def_struct_ui_text(srna, "Theme Info", "Theme settings for Info.");
919 rna_def_userdef_theme_spaces_main(srna, SPACE_INFO);
923 static void rna_def_userdef_theme_space_text(BlenderRNA *brna)
930 srna= RNA_def_struct(brna, "ThemeTextEditor", NULL);
931 RNA_def_struct_sdna(srna, "ThemeSpace");
932 RNA_def_struct_ui_text(srna, "Theme Text Editor", "Theme settings for the Text Editor.");
934 rna_def_userdef_theme_spaces_main(srna, SPACE_TEXT);
936 prop= RNA_def_property(srna, "line_numbers_background", PROP_FLOAT, PROP_COLOR);
937 RNA_def_property_float_sdna(prop, NULL, "grid");
938 RNA_def_property_array(prop, 3);
939 RNA_def_property_ui_text(prop, "Line Numbers Background", "");
940 RNA_def_property_update(prop, 0, "rna_userdef_update");
942 prop= RNA_def_property(srna, "scroll_bar", PROP_FLOAT, PROP_COLOR);
943 RNA_def_property_float_sdna(prop, NULL, "shade1");
944 RNA_def_property_array(prop, 3);
945 RNA_def_property_ui_text(prop, "Scroll Bar", "");
946 RNA_def_property_update(prop, 0, "rna_userdef_update");
948 prop= RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR);
949 RNA_def_property_float_sdna(prop, NULL, "shade2");
950 RNA_def_property_array(prop, 3);
951 RNA_def_property_ui_text(prop, "Selected Text", "");
952 RNA_def_property_update(prop, 0, "rna_userdef_update");
954 prop= RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR);
955 RNA_def_property_float_sdna(prop, NULL, "hilite");
956 RNA_def_property_array(prop, 3);
957 RNA_def_property_ui_text(prop, "Cursor", "");
958 RNA_def_property_update(prop, 0, "rna_userdef_update");
960 prop= RNA_def_property(srna, "syntax_builtin", PROP_FLOAT, PROP_COLOR);
961 RNA_def_property_float_sdna(prop, NULL, "syntaxb");
962 RNA_def_property_array(prop, 3);
963 RNA_def_property_ui_text(prop, "Syntax Builtin", "");
964 RNA_def_property_update(prop, 0, "rna_userdef_update");
966 prop= RNA_def_property(srna, "syntax_special", PROP_FLOAT, PROP_COLOR);
967 RNA_def_property_float_sdna(prop, NULL, "syntaxv");
968 RNA_def_property_array(prop, 3);
969 RNA_def_property_ui_text(prop, "Syntax Special", "");
970 RNA_def_property_update(prop, 0, "rna_userdef_update");
972 prop= RNA_def_property(srna, "syntax_comment", PROP_FLOAT, PROP_COLOR);
973 RNA_def_property_float_sdna(prop, NULL, "syntaxc");
974 RNA_def_property_array(prop, 3);
975 RNA_def_property_ui_text(prop, "Syntax Comment", "");
976 RNA_def_property_update(prop, 0, "rna_userdef_update");
978 prop= RNA_def_property(srna, "syntax_string", PROP_FLOAT, PROP_COLOR);
979 RNA_def_property_float_sdna(prop, NULL, "syntaxl");
980 RNA_def_property_array(prop, 3);
981 RNA_def_property_ui_text(prop, "Syntax String", "");
982 RNA_def_property_update(prop, 0, "rna_userdef_update");
984 prop= RNA_def_property(srna, "syntax_numbers", PROP_FLOAT, PROP_COLOR);
985 RNA_def_property_float_sdna(prop, NULL, "syntaxn");
986 RNA_def_property_array(prop, 3);
987 RNA_def_property_ui_text(prop, "Syntax Numbers", "");
988 RNA_def_property_update(prop, 0, "rna_userdef_update");
991 static void rna_def_userdef_theme_space_node(BlenderRNA *brna)
998 srna= RNA_def_struct(brna, "ThemeNodeEditor", NULL);
999 RNA_def_struct_sdna(srna, "ThemeSpace");
1000 RNA_def_struct_ui_text(srna, "Theme Node Editor", "Theme settings for the Node Editor.");
1002 rna_def_userdef_theme_spaces_main(srna, SPACE_NODE);
1004 prop= RNA_def_property(srna, "wires", PROP_FLOAT, PROP_COLOR);
1005 RNA_def_property_float_sdna(prop, NULL, "wire");
1006 RNA_def_property_array(prop, 3);
1007 RNA_def_property_ui_text(prop, "Wires", "");
1008 RNA_def_property_update(prop, 0, "rna_userdef_update");
1010 prop= RNA_def_property(srna, "wire_select", PROP_FLOAT, PROP_COLOR);
1011 RNA_def_property_float_sdna(prop, NULL, "edge_select");
1012 RNA_def_property_array(prop, 3);
1013 RNA_def_property_ui_text(prop, "Wire Select", "");
1014 RNA_def_property_update(prop, 0, "rna_userdef_update");
1016 prop= RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR);
1017 RNA_def_property_float_sdna(prop, NULL, "shade2");
1018 RNA_def_property_array(prop, 3);
1019 RNA_def_property_ui_text(prop, "Selected Text", "");
1020 RNA_def_property_update(prop, 0, "rna_userdef_update");
1022 prop= RNA_def_property(srna, "node_backdrop", PROP_FLOAT, PROP_COLOR);
1023 RNA_def_property_float_sdna(prop, NULL, "syntaxl");
1024 RNA_def_property_array(prop, 4);
1025 RNA_def_property_ui_text(prop, "Node Backdrop", "");
1026 RNA_def_property_update(prop, 0, "rna_userdef_update");
1028 prop= RNA_def_property(srna, "in_out_node", PROP_FLOAT, PROP_COLOR);
1029 RNA_def_property_float_sdna(prop, NULL, "syntaxn");
1030 RNA_def_property_array(prop, 3);
1031 RNA_def_property_ui_text(prop, "In/Out Node", "");
1032 RNA_def_property_update(prop, 0, "rna_userdef_update");
1034 prop= RNA_def_property(srna, "converter_node", PROP_FLOAT, PROP_COLOR);
1035 RNA_def_property_float_sdna(prop, NULL, "syntaxv");
1036 RNA_def_property_array(prop, 3);
1037 RNA_def_property_ui_text(prop, "Converter Node", "");
1038 RNA_def_property_update(prop, 0, "rna_userdef_update");
1040 prop= RNA_def_property(srna, "operator_node", PROP_FLOAT, PROP_COLOR);
1041 RNA_def_property_float_sdna(prop, NULL, "syntaxb");
1042 RNA_def_property_array(prop, 3);
1043 RNA_def_property_ui_text(prop, "Operator Node", "");
1044 RNA_def_property_update(prop, 0, "rna_userdef_update");
1046 prop= RNA_def_property(srna, "group_node", PROP_FLOAT, PROP_COLOR);
1047 RNA_def_property_float_sdna(prop, NULL, "syntaxc");
1048 RNA_def_property_array(prop, 3);
1049 RNA_def_property_ui_text(prop, "Group Node", "");
1050 RNA_def_property_update(prop, 0, "rna_userdef_update");
1053 static void rna_def_userdef_theme_space_logic(BlenderRNA *brna)
1060 srna= RNA_def_struct(brna, "ThemeLogicEditor", NULL);
1061 RNA_def_struct_sdna(srna, "ThemeSpace");
1062 RNA_def_struct_ui_text(srna, "Theme Logic Editor", "Theme settings for the Logic Editor.");
1064 rna_def_userdef_theme_spaces_main(srna, SPACE_LOGIC);
1066 prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
1067 RNA_def_property_array(prop, 3);
1068 RNA_def_property_ui_text(prop, "Panel", "");
1069 RNA_def_property_update(prop, 0, "rna_userdef_update");
1073 static void rna_def_userdef_theme_space_buts(BlenderRNA *brna)
1080 srna= RNA_def_struct(brna, "ThemeProperties", NULL);
1081 RNA_def_struct_sdna(srna, "ThemeSpace");
1082 RNA_def_struct_ui_text(srna, "Theme Properties", "Theme settings for the Properties.");
1084 rna_def_userdef_theme_spaces_main(srna, SPACE_BUTS);
1086 prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR);
1087 RNA_def_property_array(prop, 3);
1088 RNA_def_property_ui_text(prop, "Panel", "");
1089 RNA_def_property_update(prop, 0, "rna_userdef_update");
1092 static void rna_def_userdef_theme_space_time(BlenderRNA *brna)
1099 srna= RNA_def_struct(brna, "ThemeTimeline", NULL);
1100 RNA_def_struct_sdna(srna, "ThemeSpace");
1101 RNA_def_struct_ui_text(srna, "Theme Timeline", "Theme settings for the Timeline.");
1103 rna_def_userdef_theme_spaces_main(srna, SPACE_TIME);
1105 prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
1106 RNA_def_property_array(prop, 3);
1107 RNA_def_property_ui_text(prop, "Grid", "");
1108 RNA_def_property_update(prop, 0, "rna_userdef_update");
1110 prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
1111 RNA_def_property_float_sdna(prop, NULL, "cframe");
1112 RNA_def_property_array(prop, 3);
1113 RNA_def_property_ui_text(prop, "Current Frame", "");
1114 RNA_def_property_update(prop, 0, "rna_userdef_update");
1117 static void rna_def_userdef_theme_space_sound(BlenderRNA *brna)
1124 srna= RNA_def_struct(brna, "ThemeAudioWindow", NULL);
1125 RNA_def_struct_sdna(srna, "ThemeSpace");
1126 RNA_def_struct_ui_text(srna, "Theme Audio Window", "Theme settings for the Audio Window.");
1128 rna_def_userdef_theme_spaces_main(srna, SPACE_SOUND);
1130 prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
1131 RNA_def_property_array(prop, 3);
1132 RNA_def_property_ui_text(prop, "Grid", "");
1133 RNA_def_property_update(prop, 0, "rna_userdef_update");
1135 prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR);
1136 RNA_def_property_float_sdna(prop, NULL, "shade1");
1137 RNA_def_property_array(prop, 3);
1138 RNA_def_property_ui_text(prop, "Window Sliders", "");
1139 RNA_def_property_update(prop, 0, "rna_userdef_update");
1141 prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
1142 RNA_def_property_float_sdna(prop, NULL, "cframe");
1143 RNA_def_property_array(prop, 3);
1144 RNA_def_property_ui_text(prop, "Current Frame", "");
1145 RNA_def_property_update(prop, 0, "rna_userdef_update");
1148 static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
1155 srna= RNA_def_struct(brna, "ThemeImageEditor", NULL);
1156 RNA_def_struct_sdna(srna, "ThemeSpace");
1157 RNA_def_struct_ui_text(srna, "Theme Image Editor", "Theme settings for the Image Editor.");
1159 rna_def_userdef_theme_spaces_main(srna, SPACE_IMAGE);
1160 rna_def_userdef_theme_spaces_vertex(srna);
1161 rna_def_userdef_theme_spaces_face(srna);
1163 prop= RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR);
1164 RNA_def_property_array(prop, 4);
1165 RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", "");
1166 RNA_def_property_update(prop, 0, "rna_userdef_update");
1169 static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
1176 srna= RNA_def_struct(brna, "ThemeSequenceEditor", NULL);
1177 RNA_def_struct_sdna(srna, "ThemeSpace");
1178 RNA_def_struct_ui_text(srna, "Theme Sequence Editor", "Theme settings for the Sequence Editor.");
1180 rna_def_userdef_theme_spaces_main(srna, SPACE_IMAGE);
1182 prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
1183 RNA_def_property_array(prop, 3);
1184 RNA_def_property_ui_text(prop, "Grid", "");
1185 RNA_def_property_update(prop, 0, "rna_userdef_update");
1187 prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR);
1188 RNA_def_property_float_sdna(prop, NULL, "shade1");
1189 RNA_def_property_array(prop, 3);
1190 RNA_def_property_ui_text(prop, "Window Sliders", "");
1191 RNA_def_property_update(prop, 0, "rna_userdef_update");
1193 prop= RNA_def_property(srna, "movie_strip", PROP_FLOAT, PROP_COLOR);
1194 RNA_def_property_float_sdna(prop, NULL, "movie");
1195 RNA_def_property_array(prop, 3);
1196 RNA_def_property_ui_text(prop, "Movie Strip", "");
1197 RNA_def_property_update(prop, 0, "rna_userdef_update");
1199 prop= RNA_def_property(srna, "image_strip", PROP_FLOAT, PROP_COLOR);
1200 RNA_def_property_float_sdna(prop, NULL, "image");
1201 RNA_def_property_array(prop, 3);
1202 RNA_def_property_ui_text(prop, "Image Strip", "");
1203 RNA_def_property_update(prop, 0, "rna_userdef_update");
1205 prop= RNA_def_property(srna, "scene_strip", PROP_FLOAT, PROP_COLOR);
1206 RNA_def_property_float_sdna(prop, NULL, "scene");
1207 RNA_def_property_array(prop, 3);
1208 RNA_def_property_ui_text(prop, "Scene Strip", "");
1209 RNA_def_property_update(prop, 0, "rna_userdef_update");
1211 prop= RNA_def_property(srna, "audio_strip", PROP_FLOAT, PROP_COLOR);
1212 RNA_def_property_float_sdna(prop, NULL, "audio");
1213 RNA_def_property_array(prop, 3);
1214 RNA_def_property_ui_text(prop, "Audio Strip", "");
1215 RNA_def_property_update(prop, 0, "rna_userdef_update");
1217 prop= RNA_def_property(srna, "effect_strip", PROP_FLOAT, PROP_COLOR);
1218 RNA_def_property_float_sdna(prop, NULL, "effect");
1219 RNA_def_property_array(prop, 3);
1220 RNA_def_property_ui_text(prop, "Effect Strip", "");
1221 RNA_def_property_update(prop, 0, "rna_userdef_update");
1223 prop= RNA_def_property(srna, "plugin_strip", PROP_FLOAT, PROP_COLOR);
1224 RNA_def_property_float_sdna(prop, NULL, "plugin");
1225 RNA_def_property_array(prop, 3);
1226 RNA_def_property_ui_text(prop, "Plugin Strip", "");
1227 RNA_def_property_update(prop, 0, "rna_userdef_update");
1229 prop= RNA_def_property(srna, "transition_strip", PROP_FLOAT, PROP_COLOR);
1230 RNA_def_property_float_sdna(prop, NULL, "transition");
1231 RNA_def_property_array(prop, 3);
1232 RNA_def_property_ui_text(prop, "Transition Strip", "");
1233 RNA_def_property_update(prop, 0, "rna_userdef_update");
1235 prop= RNA_def_property(srna, "meta_strip", PROP_FLOAT, PROP_COLOR);
1236 RNA_def_property_float_sdna(prop, NULL, "meta");
1237 RNA_def_property_array(prop, 3);
1238 RNA_def_property_ui_text(prop, "Meta Strip", "");
1239 RNA_def_property_update(prop, 0, "rna_userdef_update");
1241 prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
1242 RNA_def_property_float_sdna(prop, NULL, "cframe");
1243 RNA_def_property_array(prop, 3);
1244 RNA_def_property_ui_text(prop, "Current Frame", "");
1245 RNA_def_property_update(prop, 0, "rna_userdef_update");
1247 prop= RNA_def_property(srna, "keyframe", PROP_FLOAT, PROP_COLOR);
1248 RNA_def_property_float_sdna(prop, NULL, "vertex_select");
1249 RNA_def_property_array(prop, 3);
1250 RNA_def_property_ui_text(prop, "Keyframe", "");
1251 RNA_def_property_update(prop, 0, "rna_userdef_update");
1253 prop= RNA_def_property(srna, "draw_action", PROP_FLOAT, PROP_COLOR);
1254 RNA_def_property_float_sdna(prop, NULL, "bone_pose");
1255 RNA_def_property_array(prop, 3);
1256 RNA_def_property_ui_text(prop, "Draw Action", "");
1257 RNA_def_property_update(prop, 0, "rna_userdef_update");
1260 static void rna_def_userdef_theme_space_action(BlenderRNA *brna)
1267 srna= RNA_def_struct(brna, "ThemeDopeSheet", NULL);
1268 RNA_def_struct_sdna(srna, "ThemeSpace");
1269 RNA_def_struct_ui_text(srna, "Theme DopeSheet", "Theme settings for the DopeSheet.");
1271 rna_def_userdef_theme_spaces_main(srna, SPACE_ACTION);
1273 prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
1274 RNA_def_property_array(prop, 3);
1275 RNA_def_property_ui_text(prop, "Grid", "");
1276 RNA_def_property_update(prop, 0, "rna_userdef_update");
1278 prop= RNA_def_property(srna, "value_sliders", PROP_FLOAT, PROP_COLOR);
1279 RNA_def_property_float_sdna(prop, NULL, "face");
1280 RNA_def_property_array(prop, 3);
1281 RNA_def_property_ui_text(prop, "Value Sliders", "");
1282 RNA_def_property_update(prop, 0, "rna_userdef_update");
1284 prop= RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR);
1285 RNA_def_property_float_sdna(prop, NULL, "shade1");
1286 RNA_def_property_array(prop, 3);
1287 RNA_def_property_ui_text(prop, "View Sliders", "");
1288 RNA_def_property_update(prop, 0, "rna_userdef_update");
1290 prop= RNA_def_property(srna, "channels", PROP_FLOAT, PROP_COLOR);
1291 RNA_def_property_float_sdna(prop, NULL, "shade2");
1292 RNA_def_property_array(prop, 3);
1293 RNA_def_property_ui_text(prop, "Channels", "");
1294 RNA_def_property_update(prop, 0, "rna_userdef_update");
1296 prop= RNA_def_property(srna, "channels_selected", PROP_FLOAT, PROP_COLOR);
1297 RNA_def_property_float_sdna(prop, NULL, "hilite");
1298 RNA_def_property_array(prop, 3);
1299 RNA_def_property_ui_text(prop, "Channels Selected", "");
1300 RNA_def_property_update(prop, 0, "rna_userdef_update");
1302 prop= RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR);
1303 RNA_def_property_float_sdna(prop, NULL, "group");
1304 RNA_def_property_array(prop, 3);
1305 RNA_def_property_ui_text(prop, "Channel Group", "");
1306 RNA_def_property_update(prop, 0, "rna_userdef_update");
1308 prop= RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_COLOR);
1309 RNA_def_property_float_sdna(prop, NULL, "group_active");
1310 RNA_def_property_array(prop, 3);
1311 RNA_def_property_ui_text(prop, "Active Channel Group", "");
1312 RNA_def_property_update(prop, 0, "rna_userdef_update");
1314 prop= RNA_def_property(srna, "long_key", PROP_FLOAT, PROP_COLOR);
1315 RNA_def_property_float_sdna(prop, NULL, "strip");
1316 RNA_def_property_array(prop, 3);
1317 RNA_def_property_ui_text(prop, "Long Key", "");
1318 RNA_def_property_update(prop, 0, "rna_userdef_update");
1320 prop= RNA_def_property(srna, "long_key_selected", PROP_FLOAT, PROP_COLOR);
1321 RNA_def_property_float_sdna(prop, NULL, "strip_select");
1322 RNA_def_property_array(prop, 3);
1323 RNA_def_property_ui_text(prop, "Long Key Selected", "");
1324 RNA_def_property_update(prop, 0, "rna_userdef_update");
1326 prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
1327 RNA_def_property_float_sdna(prop, NULL, "cframe");
1328 RNA_def_property_array(prop, 3);
1329 RNA_def_property_ui_text(prop, "Current Frame", "");
1330 RNA_def_property_update(prop, 0, "rna_userdef_update");
1332 prop= RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR);
1333 RNA_def_property_float_sdna(prop, NULL, "ds_channel");
1334 RNA_def_property_array(prop, 3);
1335 RNA_def_property_ui_text(prop, "DopeSheet Channel", "");
1336 RNA_def_property_update(prop, 0, "rna_userdef_update");
1338 prop= RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_COLOR);
1339 RNA_def_property_float_sdna(prop, NULL, "ds_subchannel");
1340 RNA_def_property_array(prop, 3);
1341 RNA_def_property_ui_text(prop, "DopeSheet Sub-Channel", "");
1342 RNA_def_property_update(prop, 0, "rna_userdef_update");
1345 static void rna_def_userdef_theme_space_nla(BlenderRNA *brna)
1352 srna= RNA_def_struct(brna, "ThemeNLAEditor", NULL);
1353 RNA_def_struct_sdna(srna, "ThemeSpace");
1354 RNA_def_struct_ui_text(srna, "Theme NLA Editor", "Theme settings for the NLA Editor.");
1356 rna_def_userdef_theme_spaces_main(srna, SPACE_NLA);
1358 prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR);
1359 RNA_def_property_array(prop, 3);
1360 RNA_def_property_ui_text(prop, "Grid", "");
1361 RNA_def_property_update(prop, 0, "rna_userdef_update");
1363 prop= RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR);
1364 RNA_def_property_float_sdna(prop, NULL, "shade1");
1365 RNA_def_property_array(prop, 3);
1366 RNA_def_property_ui_text(prop, "View Sliders", "");
1367 RNA_def_property_update(prop, 0, "rna_userdef_update");
1369 prop= RNA_def_property(srna, "bars", PROP_FLOAT, PROP_COLOR);
1370 RNA_def_property_float_sdna(prop, NULL, "shade2");
1371 RNA_def_property_array(prop, 3);
1372 RNA_def_property_ui_text(prop, "Bars", "");
1373 RNA_def_property_update(prop, 0, "rna_userdef_update");
1375 prop= RNA_def_property(srna, "bars_selected", PROP_FLOAT, PROP_COLOR);
1376 RNA_def_property_float_sdna(prop, NULL, "hilite");
1377 RNA_def_property_array(prop, 3);
1378 RNA_def_property_ui_text(prop, "Bars Selected", "");
1379 RNA_def_property_update(prop, 0, "rna_userdef_update");
1381 prop= RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR);
1382 RNA_def_property_float_sdna(prop, NULL, "strip");
1383 RNA_def_property_array(prop, 3);
1384 RNA_def_property_ui_text(prop, "Strips", "");
1385 RNA_def_property_update(prop, 0, "rna_userdef_update");
1387 prop= RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR);
1388 RNA_def_property_float_sdna(prop, NULL, "strip_select");
1389 RNA_def_property_array(prop, 3);
1390 RNA_def_property_ui_text(prop, "Strips Selected", "");
1391 RNA_def_property_update(prop, 0, "rna_userdef_update");
1393 prop= RNA_def_property(srna, "current_frame", PROP_FLOAT, PROP_COLOR);
1394 RNA_def_property_float_sdna(prop, NULL, "cframe");
1395 RNA_def_property_array(prop, 3);
1396 RNA_def_property_ui_text(prop, "Current Frame", "");
1397 RNA_def_property_update(prop, 0, "rna_userdef_update");
1400 static void rna_def_userdef_theme_colorset(BlenderRNA *brna)
1405 srna= RNA_def_struct(brna, "ThemeBoneColorSet", NULL);
1406 RNA_def_struct_sdna(srna, "ThemeWireColor");
1407 RNA_def_struct_ui_text(srna, "Theme Bone Color Set", "Theme settings for bone color sets.");
1409 prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR);
1410 RNA_def_property_float_sdna(prop, NULL, "solid");
1411 RNA_def_property_array(prop, 3);
1412 RNA_def_property_ui_text(prop, "Normal", "Color used for the surface of bones.");
1413 RNA_def_property_update(prop, 0, "rna_userdef_update");
1415 prop= RNA_def_property(srna, "selected", PROP_FLOAT, PROP_COLOR);
1416 RNA_def_property_float_sdna(prop, NULL, "select");
1417 RNA_def_property_array(prop, 3);
1418 RNA_def_property_ui_text(prop, "Selected", "Color used for selected bones.");
1419 RNA_def_property_update(prop, 0, "rna_userdef_update");
1421 prop= RNA_def_property(srna, "active", PROP_FLOAT, PROP_COLOR);
1422 RNA_def_property_array(prop, 3);
1423 RNA_def_property_ui_text(prop, "Active", "Color used for active bones.");
1424 RNA_def_property_update(prop, 0, "rna_userdef_update");
1426 prop= RNA_def_property(srna, "colored_constraints", PROP_BOOLEAN, PROP_NONE);
1427 RNA_def_property_boolean_sdna(prop, NULL, "flag", TH_WIRECOLOR_CONSTCOLS);
1428 RNA_def_property_ui_text(prop, "Colored Constraints", "Allow the use of colors indicating constraints/keyed status.");
1429 RNA_def_property_update(prop, 0, "rna_userdef_update");
1432 static void rna_def_userdef_themes(BlenderRNA *brna)
1437 static EnumPropertyItem active_theme_group[] = {
1438 {0, "USER_INTERFACE", ICON_UI, "User Interface", ""},
1439 {1, "VIEW_3D", ICON_VIEW3D, "3D View", ""},
1440 {2, "TIMELINE", ICON_TIME, "Timeline", ""},
1441 {3, "GRAPH_EDITOR", ICON_IPO, "Graph Editor", ""},
1442 {4, "DOPESHEET_EDITOR", ICON_ACTION, "Dopesheet", ""},
1443 {5, "NLA_EDITOR", ICON_NLA, "NLA Editor", ""},
1444 {6, "IMAGE_EDITOR", ICON_IMAGE_COL, "UV/Image Editor", ""},
1445 {7, "SEQUENCE_EDITOR", ICON_SEQUENCE, "Video Sequence Editor", ""},
1446 {8, "TEXT_EDITOR", ICON_TEXT, "Text Editor", ""},
1447 {9, "NODE_EDITOR", ICON_NODETREE, "Node Editor", ""},
1448 {10, "LOGIC_EDITOR", ICON_LOGIC, "Logic Editor", ""},
1449 {11, "PROPERTIES", ICON_BUTS, "Properties", ""},
1450 {12, "OUTLINER", ICON_OOPS, "Outliner", ""},
1451 {14, "USER_PREFERENCES", ICON_PREFERENCES, "User Preferences", ""},
1452 {15, "INFO", ICON_INFO, "Info", ""},
1453 {16, "FILE_BROWSER", ICON_FILESEL, "File Browser", ""},
1454 {17, "CONSOLE", ICON_CONSOLE, "Console", ""},
1455 {0, NULL, 0, NULL, NULL}};
1457 srna= RNA_def_struct(brna, "Theme", NULL);
1458 RNA_def_struct_sdna(srna, "bTheme");
1459 RNA_def_struct_ui_text(srna, "Theme", "Theme settings defining draw style and colors in the user interface.");
1461 prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
1462 RNA_def_property_ui_text(prop, "Name", "Name of the theme.");
1463 RNA_def_struct_name_property(srna, prop);
1465 prop= RNA_def_property(srna, "active_theme", PROP_ENUM, PROP_NONE);
1466 RNA_def_property_enum_sdna(prop, NULL, "active_theme_group");
1467 RNA_def_property_enum_items(prop, active_theme_group);
1468 RNA_def_property_ui_text(prop, "Active Theme", "");
1470 prop= RNA_def_property(srna, "user_interface", PROP_POINTER, PROP_NONE);
1471 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1472 RNA_def_property_pointer_sdna(prop, NULL, "tui");
1473 RNA_def_property_struct_type(prop, "ThemeUserInterface");
1474 RNA_def_property_ui_text(prop, "User Interface", "");
1476 prop= RNA_def_property(srna, "view_3d", PROP_POINTER, PROP_NONE);
1477 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1478 RNA_def_property_pointer_sdna(prop, NULL, "tv3d");
1479 RNA_def_property_struct_type(prop, "ThemeView3D");
1480 RNA_def_property_ui_text(prop, "3D View", "");
1482 prop= RNA_def_property(srna, "graph_editor", PROP_POINTER, PROP_NONE);
1483 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1484 RNA_def_property_pointer_sdna(prop, NULL, "tipo");
1485 RNA_def_property_struct_type(prop, "ThemeGraphEditor");
1486 RNA_def_property_ui_text(prop, "Graph Editor", "");
1488 prop= RNA_def_property(srna, "file_browser", PROP_POINTER, PROP_NONE);
1489 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1490 RNA_def_property_pointer_sdna(prop, NULL, "tfile");
1491 RNA_def_property_struct_type(prop, "ThemeFileBrowser");
1492 RNA_def_property_ui_text(prop, "File Browser", "");
1494 prop= RNA_def_property(srna, "nla_editor", PROP_POINTER, PROP_NONE);
1495 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1496 RNA_def_property_pointer_sdna(prop, NULL, "tnla");
1497 RNA_def_property_struct_type(prop, "ThemeNLAEditor");
1498 RNA_def_property_ui_text(prop, "NLA Editor", "");
1500 prop= RNA_def_property(srna, "dopesheet_editor", PROP_POINTER, PROP_NONE);
1501 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1502 RNA_def_property_pointer_sdna(prop, NULL, "tact");
1503 RNA_def_property_struct_type(prop, "ThemeDopeSheet");
1504 RNA_def_property_ui_text(prop, "DopeSheet", "");
1506 prop= RNA_def_property(srna, "image_editor", PROP_POINTER, PROP_NONE);
1507 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1508 RNA_def_property_pointer_sdna(prop, NULL, "tima");
1509 RNA_def_property_struct_type(prop, "ThemeImageEditor");
1510 RNA_def_property_ui_text(prop, "Image Editor", "");
1512 prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
1513 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1514 RNA_def_property_pointer_sdna(prop, NULL, "tseq");
1515 RNA_def_property_struct_type(prop, "ThemeSequenceEditor");
1516 RNA_def_property_ui_text(prop, "Sequence Editor", "");
1518 prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
1519 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1520 RNA_def_property_pointer_sdna(prop, NULL, "tbuts");
1521 RNA_def_property_struct_type(prop, "ThemeProperties");
1522 RNA_def_property_ui_text(prop, "Properties", "");
1524 prop= RNA_def_property(srna, "text_editor", PROP_POINTER, PROP_NONE);
1525 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1526 RNA_def_property_pointer_sdna(prop, NULL, "text");
1527 RNA_def_property_struct_type(prop, "ThemeTextEditor");
1528 RNA_def_property_ui_text(prop, "Text Editor", "");
1530 prop= RNA_def_property(srna, "timeline", PROP_POINTER, PROP_NONE);
1531 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1532 RNA_def_property_pointer_sdna(prop, NULL, "ttime");
1533 RNA_def_property_struct_type(prop, "ThemeTimeline");
1534 RNA_def_property_ui_text(prop, "Timeline", "");
1536 prop= RNA_def_property(srna, "node_editor", PROP_POINTER, PROP_NONE);
1537 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1538 RNA_def_property_pointer_sdna(prop, NULL, "tnode");
1539 RNA_def_property_struct_type(prop, "ThemeNodeEditor");
1540 RNA_def_property_ui_text(prop, "Node Editor", "");
1542 prop= RNA_def_property(srna, "logic_editor", PROP_POINTER, PROP_NONE);
1543 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1544 RNA_def_property_pointer_sdna(prop, NULL, "tlogic");
1545 RNA_def_property_struct_type(prop, "ThemeLogicEditor");
1546 RNA_def_property_ui_text(prop, "Logic Editor", "");
1548 prop= RNA_def_property(srna, "outliner", PROP_POINTER, PROP_NONE);
1549 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1550 RNA_def_property_pointer_sdna(prop, NULL, "toops");
1551 RNA_def_property_struct_type(prop, "ThemeOutliner");
1552 RNA_def_property_ui_text(prop, "Outliner", "");
1554 prop= RNA_def_property(srna, "info", PROP_POINTER, PROP_NONE);
1555 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1556 RNA_def_property_pointer_sdna(prop, NULL, "tinfo");
1557 RNA_def_property_struct_type(prop, "ThemeInfo");
1558 RNA_def_property_ui_text(prop, "Info", "");
1560 prop= RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NONE);
1561 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1562 RNA_def_property_pointer_sdna(prop, NULL, "tuserpref");
1563 RNA_def_property_struct_type(prop, "ThemeUserPreferences");
1564 RNA_def_property_ui_text(prop, "User Preferences", "");
1566 prop= RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_NONE);
1567 RNA_def_property_flag(prop, PROP_NEVER_NULL);
1568 RNA_def_property_collection_sdna(prop, NULL, "tarm", "");
1569 RNA_def_property_struct_type(prop, "ThemeBoneColorSet");
1570 RNA_def_property_ui_text(prop, "Bone Color Sets", "");
1573 static void rna_def_userdef_dothemes(BlenderRNA *brna)
1576 rna_def_userdef_theme_ui_style(brna);
1577 rna_def_userdef_theme_ui(brna);
1579 rna_def_userdef_theme_space_view3d(brna);
1580 rna_def_userdef_theme_space_graph(brna);
1581 rna_def_userdef_theme_space_file(brna);
1582 rna_def_userdef_theme_space_nla(brna);
1583 rna_def_userdef_theme_space_action(brna);
1584 rna_def_userdef_theme_space_image(brna);
1585 rna_def_userdef_theme_space_seq(brna);
1586 rna_def_userdef_theme_space_buts(brna);
1587 rna_def_userdef_theme_space_text(brna);
1588 rna_def_userdef_theme_space_time(brna);
1589 rna_def_userdef_theme_space_node(brna);
1590 rna_def_userdef_theme_space_outliner(brna);
1591 rna_def_userdef_theme_space_info(brna);
1592 rna_def_userdef_theme_space_userpref(brna);
1593 rna_def_userdef_theme_space_sound(brna);
1594 rna_def_userdef_theme_space_logic(brna);
1595 rna_def_userdef_theme_colorset(brna);
1596 rna_def_userdef_themes(brna);
1599 static void rna_def_userdef_solidlight(BlenderRNA *brna)
1604 srna= RNA_def_struct(brna, "UserSolidLight", NULL);
1605 RNA_def_struct_sdna(srna, "SolidLight");
1606 RNA_def_struct_ui_text(srna, "Solid Light", "Light used for OpenGL lighting in solid draw mode.");
1608 prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
1609 RNA_def_property_boolean_sdna(prop, NULL, "flag", 1);
1610 RNA_def_property_ui_text(prop, "Enabled", "Enable this OpenGL light in solid draw mode.");
1611 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
1613 prop= RNA_def_property(srna, "direction", PROP_FLOAT, PROP_DIRECTION);
1614 RNA_def_property_float_sdna(prop, NULL, "vec");
1615 RNA_def_property_array(prop, 3);
1616 RNA_def_property_ui_text(prop, "Direction", "The direction that the OpenGL light is shining.");
1617 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
1619 prop= RNA_def_property(srna, "diffuse_color", PROP_FLOAT, PROP_COLOR);
1620 RNA_def_property_float_sdna(prop, NULL, "col");
1621 RNA_def_property_array(prop, 3);
1622 RNA_def_property_ui_text(prop, "Diffuse Color", "The diffuse color of the OpenGL light.");
1623 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
1625 prop= RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR);
1626 RNA_def_property_float_sdna(prop, NULL, "spec");
1627 RNA_def_property_array(prop, 3);
1628 RNA_def_property_ui_text(prop, "Specular Color", "The color of the lights specular highlight.");
1629 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
1632 static void rna_def_userdef_view(BlenderRNA *brna)
1637 srna= RNA_def_struct(brna, "UserPreferencesView", NULL);
1638 RNA_def_struct_sdna(srna, "UserDef");
1639 RNA_def_struct_nested(brna, srna, "UserPreferences");
1640 RNA_def_struct_ui_text(srna, "View & Controls", "Preferences related to viewing data");
1645 prop= RNA_def_property(srna, "tooltips", PROP_BOOLEAN, PROP_NONE);
1646 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TOOLTIPS);
1647 RNA_def_property_ui_text(prop, "Tooltips", "Display tooltips.");
1649 prop= RNA_def_property(srna, "display_object_info", PROP_BOOLEAN, PROP_NONE);
1650 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DRAWVIEWINFO);
1651 RNA_def_property_ui_text(prop, "Display Object Info", "Display objects name and frame number in 3d view.");
1652 RNA_def_property_update(prop, 0, "rna_userdef_update");
1654 prop= RNA_def_property(srna, "global_scene", PROP_BOOLEAN, PROP_NONE);
1655 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SCENEGLOBAL);
1656 RNA_def_property_ui_text(prop, "Global Scene", "Forces the current Scene to be displayed in all Screens.");
1657 RNA_def_property_update(prop, 0, "rna_userdef_update");
1659 prop= RNA_def_property(srna, "use_large_cursors", PROP_BOOLEAN, PROP_NONE);
1660 RNA_def_property_boolean_sdna(prop, NULL, "curssize", 0);
1661 RNA_def_property_ui_text(prop, "Large Cursors", "Use large mouse cursors when available.");
1662 RNA_def_property_update(prop, 0, "rna_userdef_update");
1664 prop= RNA_def_property(srna, "show_view_name", PROP_BOOLEAN, PROP_NONE);
1665 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_VIEWPORTNAME);
1666 RNA_def_property_ui_text(prop, "Show View Name", "Show the name of the view's direction in each 3D View.");
1667 RNA_def_property_update(prop, 0, "rna_userdef_update");
1669 prop= RNA_def_property(srna, "show_playback_fps", PROP_BOOLEAN, PROP_NONE);
1670 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_FPS);
1671 RNA_def_property_ui_text(prop, "Show Playback FPS", "Show the frames per second screen refresh rate, while animation is played back.");
1672 RNA_def_property_update(prop, 0, "rna_userdef_update");
1675 prop= RNA_def_property(srna, "open_mouse_over", PROP_BOOLEAN, PROP_NONE);
1676 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MENUOPENAUTO);
1677 RNA_def_property_ui_text(prop, "Open On Mouse Over", "Open menu buttons and pulldowns automatically when the mouse is hovering.");
1679 prop= RNA_def_property(srna, "open_toplevel_delay", PROP_INT, PROP_NONE);
1680 RNA_def_property_int_sdna(prop, NULL, "menuthreshold1");
1681 RNA_def_property_range(prop, 1, 40);
1682 RNA_def_property_ui_text(prop, "Top Level Menu Open Delay", "Time delay in 1/10 seconds before automatically opening top level menus.");
1684 prop= RNA_def_property(srna, "open_sublevel_delay", PROP_INT, PROP_NONE);
1685 RNA_def_property_int_sdna(prop, NULL, "menuthreshold2");
1686 RNA_def_property_range(prop, 1, 40);
1687 RNA_def_property_ui_text(prop, "Sub Level Menu Open Delay", "Time delay in 1/10 seconds before automatically opening sub level menus.");
1689 /* Toolbox click-hold delay */
1690 prop= RNA_def_property(srna, "open_left_mouse_delay", PROP_INT, PROP_NONE);
1691 RNA_def_property_int_sdna(prop, NULL, "tb_leftmouse");
1692 RNA_def_property_range(prop, 1, 40);
1693 RNA_def_property_ui_text(prop, "Hold LMB Open Toolbox Delay", "Time in 1/10 seconds to hold the Left Mouse Button before opening the toolbox.");
1695 prop= RNA_def_property(srna, "open_right_mouse_delay", PROP_INT, PROP_NONE);
1696 RNA_def_property_int_sdna(prop, NULL, "tb_rightmouse");
1697 RNA_def_property_range(prop, 1, 40);
1698 RNA_def_property_ui_text(prop, "Hold RMB Open Toolbox Delay", "Time in 1/10 seconds to hold the Right Mouse Button before opening the toolbox.");
1700 prop= RNA_def_property(srna, "pin_floating_panels", PROP_BOOLEAN, PROP_NONE);
1701 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_PANELPINNED);
1702 RNA_def_property_ui_text(prop, "Pin Floating Panels", "Make floating panels invoked by a hotkey (eg. N Key) open at the previous location.");
1704 prop= RNA_def_property(srna, "use_column_layout", PROP_BOOLEAN, PROP_NONE);
1705 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_PLAINMENUS);
1706 RNA_def_property_ui_text(prop, "Toolbox Column Layout", "Use a column layout for toolbox.");
1708 prop= RNA_def_property(srna, "directional_menus", PROP_BOOLEAN, PROP_NONE);
1709 RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_MENUFIXEDORDER);
1710 RNA_def_property_ui_text(prop, "Contents Follow Opening Direction", "Otherwise menus, etc will always be top to bottom, left to right, no matter opening direction.");
1712 prop= RNA_def_property(srna, "global_pivot", PROP_BOOLEAN, PROP_NONE);
1713 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCKAROUND);
1714 RNA_def_property_ui_text(prop, "Global Pivot", "Lock the same rotation/scaling pivot in all 3D Views.");
1716 prop= RNA_def_property(srna, "auto_depth", PROP_BOOLEAN, PROP_NONE);
1717 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_ZBUF);
1718 RNA_def_property_ui_text(prop, "Auto Depth", "Use the depth under the mouse to improve view pan/rotate/zoom functionality.");
1722 prop= RNA_def_property(srna, "zoom_to_mouse", PROP_BOOLEAN, PROP_NONE);
1723 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_TO_MOUSEPOS);
1724 RNA_def_property_ui_text(prop, "Zoom To Mouse Position", "Zoom in towards the mouse pointer's position in the 3D view, rather than the 2D window center.");
1728 prop= RNA_def_property(srna, "auto_perspective", PROP_BOOLEAN, PROP_NONE);
1729 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_AUTOPERSP);
1730 RNA_def_property_ui_text(prop, "Auto Perspective", "Automatically switch between orthographic and perspective when changing from top/front/side views.");
1732 prop= RNA_def_property(srna, "rotate_around_selection", PROP_BOOLEAN, PROP_NONE);
1733 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_SELECTION);
1734 RNA_def_property_ui_text(prop, "Rotate Around Selection", "Use selection as the pivot point.");
1742 prop= RNA_def_property(srna, "use_middle_mouse_paste", PROP_BOOLEAN, PROP_NONE);
1743 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MMB_PASTE);
1744 RNA_def_property_ui_text(prop, "Middle Mouse Paste", "In text window, paste with middle mouse button instead of panning.");
1746 prop= RNA_def_property(srna, "show_mini_axis", PROP_BOOLEAN, PROP_NONE);
1747 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_ROTVIEWICON);
1748 RNA_def_property_ui_text(prop, "Show Mini Axis", "Show a small rotating 3D axis in the bottom left corner of the 3D View.");
1749 RNA_def_property_update(prop, 0, "rna_userdef_update");
1751 prop= RNA_def_property(srna, "mini_axis_size", PROP_INT, PROP_NONE);
1752 RNA_def_property_int_sdna(prop, NULL, "rvisize");
1753 RNA_def_property_range(prop, 10, 64);
1754 RNA_def_property_ui_text(prop, "Mini Axis Size", "The axis icon's size.");
1755 RNA_def_property_update(prop, 0, "rna_userdef_update");
1757 prop= RNA_def_property(srna, "mini_axis_brightness", PROP_INT, PROP_NONE);
1758 RNA_def_property_int_sdna(prop, NULL, "rvibright");
1759 RNA_def_property_range(prop, 0, 10);
1760 RNA_def_property_ui_text(prop, "Mini Axis Brightness", "The brightness of the icon.");
1761 RNA_def_property_update(prop, 0, "rna_userdef_update");
1763 /* middle mouse button */
1767 prop= RNA_def_property(srna, "wheel_invert_zoom", PROP_BOOLEAN, PROP_NONE);
1768 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_WHEELZOOMDIR);
1769 RNA_def_property_ui_text(prop, "Wheel Invert Zoom", "Swap the Mouse Wheel zoom direction.");
1771 prop= RNA_def_property(srna, "wheel_scroll_lines", PROP_INT, PROP_NONE);
1772 RNA_def_property_int_sdna(prop, NULL, "wheellinescroll");
1773 RNA_def_property_range(prop, 0, 32);
1774 RNA_def_property_ui_text(prop, "Wheel Scroll Lines", "The number of lines scrolled at a time with the mouse wheel.");
1776 prop= RNA_def_property(srna, "smooth_view", PROP_INT, PROP_NONE);
1777 RNA_def_property_int_sdna(prop, NULL, "smooth_viewtx");
1778 RNA_def_property_range(prop, 0, 1000);
1779 RNA_def_property_ui_text(prop, "Smooth View", "The time to animate the view in milliseconds, zero to disable.");
1781 prop= RNA_def_property(srna, "rotation_angle", PROP_INT, PROP_NONE);
1782 RNA_def_property_int_sdna(prop, NULL, "pad_rot_angle");
1783 RNA_def_property_range(prop, 0, 90);
1784 RNA_def_property_ui_text(prop, "Rotation Angle", "The rotation step for numerical pad keys (2 4 6 8).");
1786 /* 3D transform widget */
1787 prop= RNA_def_property(srna, "use_manipulator", PROP_BOOLEAN, PROP_NONE);
1788 RNA_def_property_boolean_sdna(prop, NULL, "tw_flag", 1);
1789 RNA_def_property_ui_text(prop, "Manipulator", "Use 3d transform manipulator.");
1790 RNA_def_property_update(prop, 0, "rna_userdef_update");
1792 prop= RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_NONE);
1793 RNA_def_property_int_sdna(prop, NULL, "tw_size");
1794 RNA_def_property_range(prop, 2, 40);
1795 RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of widget, in 10 pixel units.");
1796 RNA_def_property_update(prop, 0, "rna_userdef_update");
1798 prop= RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_NONE);
1799 RNA_def_property_int_sdna(prop, NULL, "tw_handlesize");
1800 RNA_def_property_range(prop, 2, 40);
1801 RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of widget handles as percentage of widget radius.");
1802 RNA_def_property_update(prop, 0, "rna_userdef_update");
1804 prop= RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_NONE);
1805 RNA_def_property_int_sdna(prop, NULL, "tw_hotspot");
1806 RNA_def_property_range(prop, 4, 40);
1807 RNA_def_property_ui_text(prop, "Manipulator Hotspot", "Hotspot in pixels for clicking widget handles.");
1809 prop= RNA_def_property(srna, "object_origin_size", PROP_INT, PROP_NONE);
1810 RNA_def_property_int_sdna(prop, NULL, "obcenter_dia");
1811 RNA_def_property_range(prop, 4, 10);
1812 RNA_def_property_ui_text(prop, "Object Origin Size", "Diameter in Pixels for Object/Lamp origin display.");
1813 RNA_def_property_update(prop, 0, "rna_userdef_update");
1816 static void rna_def_userdef_edit(BlenderRNA *brna)
1821 static EnumPropertyItem auto_key_modes[] = {
1822 {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add/Replace", ""},
1823 {AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
1824 {0, NULL, 0, NULL, NULL}};
1826 static EnumPropertyItem new_interpolation_types[] = {
1827 {BEZT_IPO_CONST, "CONSTANT", 0, "Constant", ""},
1828 {BEZT_IPO_LIN, "LINEAR", 0, "Linear", ""},
1829 {BEZT_IPO_BEZ, "BEZIER", 0, "Bezier", ""},
1830 {0, NULL, 0, NULL, NULL}};
1832 static const EnumPropertyItem material_link_items[]= {
1833 {0, "OBDATA", 0, "ObData", "Toggle whether the material is linked to object data or the object block."},
1834 {USER_MAT_ON_OB, "OBJECT", 0, "Object", "Toggle whether the material is linked to object data or the object block."},
1835 {0, NULL, 0, NULL, NULL}};
1837 static const EnumPropertyItem object_align_items[]= {
1838 {0, "WORLD", 0, "World", "Align newly added objects facing the 3D View direction"},
1839 {USER_ADD_VIEWALIGNED, "VIEW", 0, "View", "Align newly added objects to the world coordinates"},
1840 {0, NULL, 0, NULL, NULL}};
1842 srna= RNA_def_struct(brna, "UserPreferencesEdit", NULL);
1843 RNA_def_struct_sdna(srna, "UserDef");
1844 RNA_def_struct_nested(brna, srna, "UserPreferences");
1845 RNA_def_struct_ui_text(srna, "Edit Methods", "Settings for interacting with Blender data.");
1849 prop= RNA_def_property(srna, "material_link", PROP_ENUM, PROP_NONE);
1850 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
1851 RNA_def_property_enum_items(prop, material_link_items);
1852 RNA_def_property_ui_text(prop, "Material Link To", "Toggle whether the material is linked to object data or the object block");
1854 prop= RNA_def_property(srna, "object_align", PROP_ENUM, PROP_NONE);
1855 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
1856 RNA_def_property_enum_items(prop, object_align_items);
1857 RNA_def_property_ui_text(prop, "Align Object To", "Align newly added objects facing the 3D View direction or the world coordinates");
1859 prop= RNA_def_property(srna, "enter_edit_mode", PROP_BOOLEAN, PROP_NONE);
1860 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ADD_EDITMODE);
1861 RNA_def_property_ui_text(prop, "Enter Edit Mode", "Enter Edit Mode automatically after adding a new object.");
1863 prop= RNA_def_property(srna, "drag_immediately", PROP_BOOLEAN, PROP_NONE);
1864 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_DRAGIMMEDIATE);
1865 RNA_def_property_ui_text(prop, "Drag Immediately", "Moving things with a mouse drag doesn't require a click to confirm (Best for tablet users).");
1867 prop= RNA_def_property(srna, "undo_steps", PROP_INT, PROP_NONE);
1868 RNA_def_property_int_sdna(prop, NULL, "undosteps");
1869 RNA_def_property_range(prop, 0, 64);
1870 RNA_def_property_ui_text(prop, "Undo Steps", "Number of undo steps available (smaller values conserve memory).");
1872 prop= RNA_def_property(srna, "undo_memory_limit", PROP_INT, PROP_NONE);
1873 RNA_def_property_int_sdna(prop, NULL, "undomemory");
1874 RNA_def_property_range(prop, 0, 32767);
1875 RNA_def_property_ui_text(prop, "Undo Memory Size", "Maximum memory usage in megabytes (0 means unlimited).");
1877 prop= RNA_def_property(srna, "global_undo", PROP_BOOLEAN, PROP_NONE);
1878 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_GLOBALUNDO);
1879 RNA_def_property_ui_text(prop, "Global Undo", "Global undo works by keeping a full copy of the file itself in memory, so takes extra memory.");
1882 prop= RNA_def_property(srna, "snap_translate", PROP_BOOLEAN, PROP_NONE);
1883 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOGRABGRID);
1884 RNA_def_property_ui_text(prop, "Enable Translation Snap", "Snap objects and sub-objects to grid units when moving.");
1886 prop= RNA_def_property(srna, "snap_rotate", PROP_BOOLEAN, PROP_NONE);
1887 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOROTGRID);
1888 RNA_def_property_ui_text(prop, "Enable Rotation Snap", "Snap objects and sub-objects to grid units when rotating.");
1890 prop= RNA_def_property(srna, "snap_scale", PROP_BOOLEAN, PROP_NONE);
1891 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSIZEGRID);
1892 RNA_def_property_ui_text(prop, "Enable Scaling Snap", "Snap objects and sub-objects to grid units when scaling.");
1894 prop= RNA_def_property(srna, "auto_keying_enable", PROP_BOOLEAN, PROP_NONE);
1895 RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
1896 RNA_def_property_ui_text(prop, "Auto Keying Enable", "Automatic keyframe insertion for Objects and Bones.");
1898 prop= RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
1899 RNA_def_property_enum_items(prop, auto_key_modes);
1900 RNA_def_property_enum_funcs(prop, "rna_userdef_autokeymode_get", "rna_userdef_autokeymode_set", NULL);
1901 RNA_def_property_ui_text(prop, "Auto Keying Mode", "Mode of automatic keyframe insertion for Objects and Bones.");
1903 prop= RNA_def_property(srna, "auto_keyframe_insert_available", PROP_BOOLEAN, PROP_NONE);
1904 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTAVAIL);
1905 RNA_def_property_ui_text(prop, "Auto Keyframe Insert Available", "Automatic keyframe insertion in available curves.");
1907 prop= RNA_def_property(srna, "auto_keyframe_insert_keyingset", PROP_BOOLEAN, PROP_NONE);
1908 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_ONLYKEYINGSET);
1909 RNA_def_property_ui_text(prop, "Auto Keyframe Insert Keying Set", "Automatic keyframe insertion using active Keying Set.");
1911 prop= RNA_def_property(srna, "keyframe_insert_needed", PROP_BOOLEAN, PROP_NONE);
1912 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTNEEDED);
1913 RNA_def_property_ui_text(prop, "Keyframe Insert Needed", "Keyframe insertion only when keyframe needed.");
1915 prop= RNA_def_property(srna, "use_visual_keying", PROP_BOOLEAN, PROP_NONE);
1916 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_AUTOMATKEY);
1917 RNA_def_property_ui_text(prop, "Visual Keying", "Use Visual keying automatically for constrained objects.");
1919 prop= RNA_def_property(srna, "insertkey_xyz_to_rgb", PROP_BOOLEAN, PROP_NONE);
1920 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_XYZ2RGB);
1921 RNA_def_property_ui_text(prop, "New F-Curve Colors - XYZ to RGB", "Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis.");
1923 prop= RNA_def_property(srna, "new_interpolation_type", PROP_ENUM, PROP_NONE);
1924 RNA_def_property_enum_items(prop, new_interpolation_types);
1925 RNA_def_property_enum_sdna(prop, NULL, "ipo_new");
1926 RNA_def_property_ui_text(prop, "New Interpolation Type", "");
1928 prop= RNA_def_property(srna, "grease_pencil_manhattan_distance", PROP_INT, PROP_NONE);
1929 RNA_def_property_int_sdna(prop, NULL, "gp_manhattendist");
1930 RNA_def_property_range(prop, 0, 100);
1931 RNA_def_property_ui_text(prop, "Grease Pencil Manhattan Distance", "Pixels moved by mouse per axis when drawing stroke.");
1933 prop= RNA_def_property(srna, "grease_pencil_euclidean_distance", PROP_INT, PROP_NONE);
1934 RNA_def_property_int_sdna(prop, NULL, "gp_euclideandist");
1935 RNA_def_property_range(prop, 0, 100);
1936 RNA_def_property_ui_text(prop, "Grease Pencil Euclidean Distance", "Distance moved by mouse when drawing stroke (in pixels) to include.");
1938 prop= RNA_def_property(srna, "grease_pencil_smooth_stroke", PROP_BOOLEAN, PROP_NONE);
1939 RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSMOOTH);
1940 RNA_def_property_ui_text(prop, "Grease Pencil Smooth Stroke", "Smooth the final stroke.");
1942 prop= RNA_def_property(srna, "grease_pencil_simplify_stroke", PROP_BOOLEAN, PROP_NONE);
1943 RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSIMPLIFY);
1944 RNA_def_property_ui_text(prop, "Grease Pencil Simplify Stroke", "Simplify the final stroke.");
1946 prop= RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, PROP_NONE);
1947 RNA_def_property_int_sdna(prop, NULL, "gp_eraser");
1948 RNA_def_property_range(prop, 0, 100);
1949 RNA_def_property_ui_text(prop, "Grease Pencil Eraser Radius", "Radius of eraser 'brush'.");
1951 prop= RNA_def_property(srna, "duplicate_mesh", PROP_BOOLEAN, PROP_NONE);
1952 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MESH);
1953 RNA_def_property_ui_text(prop, "Duplicate Mesh", "Causes mesh data to be duplicated with the object.");
1955 prop= RNA_def_property(srna, "duplicate_surface", PROP_BOOLEAN, PROP_NONE);
1956 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_SURF);
1957 RNA_def_property_ui_text(prop, "Duplicate Surface", "Causes surface data to be duplicated with the object.");
1959 prop= RNA_def_property(srna, "duplicate_curve", PROP_BOOLEAN, PROP_NONE);
1960 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_CURVE);
1961 RNA_def_property_ui_text(prop, "Duplicate Curve", "Causes curve data to be duplicated with the object.");
1963 prop= RNA_def_property(srna, "duplicate_text", PROP_BOOLEAN, PROP_NONE);
1964 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_FONT);
1965 RNA_def_property_ui_text(prop, "Duplicate Text", "Causes text data to be duplicated with the object.");
1967 prop= RNA_def_property(srna, "duplicate_metaball", PROP_BOOLEAN, PROP_NONE);
1968 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MBALL);
1969 RNA_def_property_ui_text(prop, "Duplicate Metaball", "Causes metaball data to be duplicated with the object.");
1971 prop= RNA_def_property(srna, "duplicate_armature", PROP_BOOLEAN, PROP_NONE);
1972 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ARM);
1973 RNA_def_property_ui_text(prop, "Duplicate Armature", "Causes armature data to be duplicated with the object.");
1975 prop= RNA_def_property(srna, "duplicate_lamp", PROP_BOOLEAN, PROP_NONE);
1976 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_LAMP);
1977 RNA_def_property_ui_text(prop, "Duplicate Lamp", "Causes lamp data to be duplicated with the object.");
1979 prop= RNA_def_property(srna, "duplicate_material", PROP_BOOLEAN, PROP_NONE);
1980 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MAT);
1981 RNA_def_property_ui_text(prop, "Duplicate Material", "Causes material data to be duplicated with the object.");
1983 prop= RNA_def_property(srna, "duplicate_texture", PROP_BOOLEAN, PROP_NONE);
1984 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_TEX);
1985 RNA_def_property_ui_text(prop, "Duplicate Texture", "Causes texture data to be duplicated with the object.");
1987 prop= RNA_def_property(srna, "duplicate_fcurve", PROP_BOOLEAN, PROP_NONE);
1988 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_IPO);
1989 RNA_def_property_ui_text(prop, "Duplicate F-Curve", "Causes F-curve data to be duplicated with the object.");
1991 prop= RNA_def_property(srna, "duplicate_action", PROP_BOOLEAN, PROP_NONE);
1992 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ACT);
1993 RNA_def_property_ui_text(prop, "Duplicate Action", "Causes actions to be duplicated with the object.");
1995 prop= RNA_def_property(srna, "duplicate_particle", PROP_BOOLEAN, PROP_NONE);
1996 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_PSYS);
1997 RNA_def_property_ui_text(prop, "Duplicate Particle", "Causes particle systems to be duplicated with the object.");
2000 static void rna_def_userdef_system(BlenderRNA *brna)
2005 static EnumPropertyItem gl_texture_clamp_items[] = {
2006 {0, "CLAMP_OFF", 0, "Off", ""},
2007 {8192, "CLAMP_8192", 0, "8192", ""},
2008 {4096, "CLAMP_4096", 0, "4096", ""},
2009 {2048, "CLAMP_2048", 0, "2048", ""},
2010 {1024, "CLAMP_1024", 0, "1024", ""},
2011 {512, "CLAMP_512", 0, "512", ""},
2012 {256, "CLAMP_256", 0, "256", ""},
2013 {128, "CLAMP_128", 0, "128", ""},
2014 {0, NULL, 0, NULL, NULL}};
2016 static EnumPropertyItem audio_mixing_samples_items[] = {
2017 {256, "SAMPLES_256", 0, "256", "Set audio mixing buffer size to 256 samples"},
2018 {512, "SAMPLES_512", 0, "512", "Set audio mixing buffer size to 512 samples"},
2019 {1024, "SAMPLES_1024", 0, "1024", "Set audio mixing buffer size to 1024 samples"},
2020 {2048, "SAMPLES_2048", 0, "2048", "Set audio mixing buffer size to 2048 samples"},
2021 {4096, "SAMPLES_4096", 0, "4096", "Set audio mixing buffer size to 4096 samples"},
2022 {8192, "SAMPLES_8192", 0, "8192", "Set audio mixing buffer size to 8192 samples"},
2023 {16384, "SAMPLES_16384", 0, "16384", "Set audio mixing buffer size to 16384 samples"},
2024 {32768, "SAMPLES_32768", 0, "32768", "Set audio mixing buffer size to 32768 samples"},
2025 {0, NULL, 0, NULL, NULL}};
2027 static EnumPropertyItem audio_device_items[] = {
2028 {0, "NONE", 0, "None", "Null device - there will be no audio output."},
2030 {1, "SDL", 0, "SDL", "SDL device - simple direct media layer, recommended for sequencer usage."},
2033 {2, "OPENAL", 0, "OpenAL", "OpenAL device - supports 3D audio, recommended for game engine usage."},
2036 {3, "JACK", 0, "Jack", "Jack device - open source pro audio, recommended for pro audio users."},
2038 {0, NULL, 0, NULL, NULL}};
2040 static EnumPropertyItem audio_rate_items[] = {
2041 // {8000, "RATE_8000", 0, "8 kHz", "Set audio sampling rate to 8000 samples per second."},
2042 // {11025, "RATE_11025", 0, "11.025 kHz", "Set audio sampling rate to 11025 samples per second."},
2043 // {16000, "RATE_16000", 0, "16 kHz", "Set audio sampling rate to 16000 samples per second."},
2044 // {22050, "RATE_22050", 0, "22.05 kHz", "Set audio sampling rate to 22050 samples per second."},
2045 // {32000, "RATE_32000", 0, "32 kHz", "Set audio sampling rate to 32000 samples per second."},
2046 {44100, "RATE_44100", 0, "44.1 kHz", "Set audio sampling rate to 44100 samples per second."},
2047 {48000, "RATE_48000", 0, "48 kHz", "Set audio sampling rate to 48000 samples per second."},
2048 // {88200, "RATE_88200", 0, "88.2 kHz", "Set audio sampling rate to 88200 samples per second."},
2049 {96000, "RATE_96000", 0, "96 kHz", "Set audio sampling rate to 96000 samples per second."},
2050 {192000, "RATE_192000", 0, "192 kHz", "Set audio sampling rate to 192000 samples per second."},
2051 {0, NULL, 0, NULL, NULL}};
2053 static EnumPropertyItem audio_format_items[] = {
2054 {0x01, "U8", 0, "8-bit Unsigned", "Set audio sample format to 8 bit unsigned integer."},
2055 {0x12, "S16", 0, "16-bit Signed", "Set audio sample format to 16 bit signed integer."},
2056 {0x13, "S24", 0, "24-bit Signed", "Set audio sample format to 24 bit signed integer."},
2057 {0x14, "S32", 0, "32-bit Signed", "Set audio sample format to 32 bit signed integer."},
2058 {0x24, "FLOAT", 0, "32-bit Float", "Set audio sample format to 32 bit float."},
2059 {0x28, "DOUBLE", 0, "64-bit Float", "Set audio sample format to 64 bit float."},
2060 {0, NULL, 0, NULL, NULL}};
2062 static EnumPropertyItem audio_channel_items[] = {
2063 {1, "MONO", 0, "Mono", "Set audio channels to mono."},
2064 {2, "STEREO", 0, "Stereo", "Set audio channels to stereo."},
2065 {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels."},
2066 {6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound."},
2067 {8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound."},
2068 {0, NULL, 0, NULL, NULL}};
2070 static EnumPropertyItem draw_method_items[] = {
2071 {USER_DRAW_TRIPLE, "TRIPLE_BUFFER", 0, "Triple Buffer", "Use a third buffer for minimal redraws at the cost of more memory."},
2072 {USER_DRAW_OVERLAP, "OVERLAP", 0, "Overlap", "Redraw all overlapping regions, minimal memory usage but more redraws."},
2073 {USER_DRAW_FULL, "FULL", 0, "Full", "Do a full redraw each time, slow, only use for reference or when all else fails."},
2074 {0, NULL, 0, NULL, NULL}};
2076 static EnumPropertyItem color_picker_types[] = {
2077 {USER_CP_CIRCLE, "CIRCLE", 0, "Circle", "A circular Hue/Saturation color wheel, with Value slider"},
2078 {USER_CP_SQUARE_SV, "SQUARE_SV", 0, "Square (SV + H)", "A square showing Saturation/Value, with Hue slider"},
2079 {USER_CP_SQUARE_HS, "SQUARE_HS", 0, "Square (HS + V)", "A square showing Hue/Saturation, with Value slider"},
2080 {USER_CP_SQUARE_HV, "SQUARE_HV", 0, "Square (HV + S)", "A square showing Hue/Value, with Saturation slider"},
2081 {0, NULL, 0, NULL, NULL}};
2083 /* hardcoded here, could become dynamic somehow */
2084 static EnumPropertyItem language_items[] = {
2085 {0, "ENGLISH", 0, "English", ""},
2086 {1, "JAPANESE", 0, "Japanese", ""},
2087 {2, "DUTCH", 0, "Dutch", ""},
2088 {3, "ITALIAN", 0, "Italian", ""},
2089 {4, "GERMAN", 0, "German", ""},
2090 {5, "FINNISH", 0, "Finnish", ""},
2091 {6, "SWEDISH", 0, "Swedish", ""},
2092 {7, "FRENCH", 0, "French", ""},
2093 {8, "SPANISH", 0, "Spanish", ""},
2094 {9, "CATALAN", 0, "Catalan", ""},
2095 {10, "CZECH", 0, "Czech", ""},
2096 {11, "BRAZILIAN_PORTUGUESE", 0, "Brazilian Portuguese", ""},
2097 {12, "SIMPLIFIED_CHINESE", 0, "Simplified Chinese", ""},
2098 {13, "RUSSIAN", 0, "Russian", ""},
2099 {14, "CROATIAN", 0, "Croatian", ""},
2100 {15, "SERBIAN", 0, "Serbian", ""},
2101 {16, "UKRAINIAN", 0, "Ukrainian", ""},
2102 {17, "POLISH", 0, "Polish", ""},
2103 {18, "ROMANIAN", 0, "Romanian", ""},
2104 {19, "ARABIC", 0, "Arabic", ""},
2105 {20, "BULGARIAN", 0, "Bulgarian", ""},
2106 {21, "GREEK", 0, "Greek", ""},
2107 {22, "KOREAN", 0, "Korean", ""},
2108 {0, NULL, 0, NULL, NULL}};
2110 srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL);
2111 RNA_def_struct_sdna(srna, "UserDef");
2112 RNA_def_struct_nested(brna, srna, "UserPreferences");
2113 RNA_def_struct_ui_text(srna, "System & OpenGL", "Graphics driver and operating system settings.");
2117 prop= RNA_def_property(srna, "international_fonts", PROP_BOOLEAN, PROP_NONE);
2118 RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_DOTRANSLATE);
2119 RNA_def_property_ui_text(prop, "International Fonts", "Use international fonts.");
2120 RNA_def_property_update(prop, 0, "rna_userdef_update");
2122 prop= RNA_def_property(srna, "dpi", PROP_INT, PROP_NONE);
2123 RNA_def_property_int_sdna(prop, NULL, "dpi");
2124 RNA_def_property_range(prop, 48, 128);
2125 RNA_def_property_ui_text(prop, "DPI", "Font size and resolution for display.");
2126 RNA_def_property_update(prop, 0, "rna_userdef_update");
2128 prop= RNA_def_property(srna, "scrollback", PROP_INT, PROP_UNSIGNED);
2129 RNA_def_property_int_sdna(prop, NULL, "scrollback");
2130 RNA_def_property_range(prop, 32, 32768);
2131 RNA_def_property_ui_text(prop, "Scrollback", "Maximum number of lines to store for the console buffer.");
2133 /* Language Selection */
2135 prop= RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE);
2136 RNA_def_property_enum_items(prop, language_items);
2137 RNA_def_property_ui_text(prop, "Language", "Language use for translation.");
2138 RNA_def_property_update(prop, 0, "rna_userdef_update");
2140 prop= RNA_def_property(srna, "translate_tooltips", PROP_BOOLEAN, PROP_NONE);
2141 RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_TOOLTIPS);
2142 RNA_def_property_ui_text(prop, "Translate Tooltips", "Translate Tooltips.");
2143 RNA_def_property_update(prop, 0, "rna_userdef_update");
2145 prop= RNA_def_property(srna, "translate_buttons", PROP_BOOLEAN, PROP_NONE);
2146 RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_BUTTONS);
2147 RNA_def_property_ui_text(prop, "Translate Buttons", "Translate button labels.");
2148 RNA_def_property_update(prop, 0, "rna_userdef_update");
2150 prop= RNA_def_property(srna, "translate_toolbox", PROP_BOOLEAN, PROP_NONE);
2151 RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_MENUS);
2152 RNA_def_property_ui_text(prop, "Translate Toolbox", "Translate toolbox menu.");
2153 RNA_def_property_update(prop, 0, "rna_userdef_update");
2155 prop= RNA_def_property(srna, "use_textured_fonts", PROP_BOOLEAN, PROP_NONE);
2156 RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_USETEXTUREFONT);
2157 RNA_def_property_ui_text(prop, "Textured Fonts", "Use textures for drawing international fonts.");
2158 RNA_def_property_update(prop, 0, "rna_userdef_update");
2160 /* System & OpenGL */
2162 prop= RNA_def_property(srna, "solid_lights", PROP_COLLECTION, PROP_NONE);
2163 RNA_def_property_collection_sdna(prop, NULL, "light", "");
2164 RNA_def_property_struct_type(prop, "UserSolidLight");
2165 RNA_def_property_ui_text(prop, "Solid Lights", "Lights user to display objects in solid draw mode.");
2167 prop= RNA_def_property(srna, "use_weight_color_range", PROP_BOOLEAN, PROP_NONE);
2168 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_CUSTOM_RANGE);
2169 RNA_def_property_ui_text(prop, "Use Weight Color Range", "Enable color range used for weight visualization in weight painting mode.");
2170 RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
2172 prop= RNA_def_property(srna, "weight_color_range", PROP_POINTER, PROP_NONE);
2173 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2174 RNA_def_property_pointer_sdna(prop, NULL, "coba_weight");
2175 RNA_def_property_struct_type(prop, "ColorRamp");
2176 RNA_def_property_ui_text(prop, "Weight Color Range", "Color range used for weight visualization in weight painting mode.");
2177 RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
2179 prop= RNA_def_property(srna, "color_picker_type", PROP_ENUM, PROP_NONE);
2180 RNA_def_property_enum_items(prop, color_picker_types);
2181 RNA_def_property_enum_sdna(prop, NULL, "color_picker_type");
2182 RNA_def_property_ui_text(prop, "Color Picker Type", "Different styles of displaying the color picker widget");
2184 prop= RNA_def_property(srna, "enable_all_codecs", PROP_BOOLEAN, PROP_NONE);
2185 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ALLWINCODECS);
2186 RNA_def_property_ui_text(prop, "Enable All Codecs", "Enables automatic saving of preview images in the .blend file (Windows only).");
2188 prop= RNA_def_property(srna, "auto_run_python_scripts", PROP_BOOLEAN, PROP_NONE);
2189 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_DONT_DOSCRIPTLINKS);
2190 RNA_def_property_ui_text(prop, "Auto Run Python Scripts", "Allow any .blend file to run scripts automatically (unsafe with blend files from an untrusted source).");
2192 prop= RNA_def_property(srna, "prefetch_frames", PROP_INT, PROP_NONE);
2193 RNA_def_property_int_sdna(prop, NULL, "prefetchframes");
2194 RNA_def_property_range(prop, 0, 500);
2195 RNA_def_property_ui_text(prop, "Prefetch Frames", "Number of frames to render ahead during playback.");
2197 prop= RNA_def_property(srna, "memory_cache_limit", PROP_INT, PROP_NONE);
2198 RNA_def_property_int_sdna(prop, NULL, "memcachelimit");
2199 RNA_def_property_range(prop, 0, (sizeof(void *) ==8)? 1024*16: 1024); /* 32 bit 2 GB, 64 bit 16 GB */
2200 RNA_def_property_ui_text(prop, "Memory Cache Limit", "Memory cache limit in sequencer (megabytes).");
2202 prop= RNA_def_property(srna, "frame_server_port", PROP_INT, PROP_NONE);
2203 RNA_def_property_int_sdna(prop, NULL, "frameserverport");
2204 RNA_def_property_range(prop, 0, 32727);
2205 RNA_def_property_ui_text(prop, "Frame Server Port", "Frameserver Port for Framserver-Rendering.");
2207 prop= RNA_def_property(srna, "game_sound", PROP_BOOLEAN, PROP_NONE);
2208 RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_SOUND);
2209 RNA_def_property_ui_text(prop, "Game Sound", "Enables sounds to be played in games.");
2211 prop= RNA_def_property(srna, "clip_alpha", PROP_FLOAT, PROP_NONE);
2212 RNA_def_property_float_sdna(prop, NULL, "glalphaclip");
2213 RNA_def_property_range(prop, 0.0f, 1.0f);
2214 RNA_def_property_ui_text(prop, "Clip Alpha", "Clip alpha below this threshold in the 3d textured view.");
2216 prop= RNA_def_property(srna, "use_mipmaps", PROP_BOOLEAN, PROP_NONE);
2217 RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_MIPMAP);
2218 RNA_def_property_ui_text(prop, "Mipmaps", "Scale textures for the 3d View (looks nicer but uses more memory and slows image reloading.)");
2220 prop= RNA_def_property(srna, "use_vbos", PROP_BOOLEAN, PROP_NONE);
2221 RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_VBO);
2222 RNA_def_property_ui_text(prop, "VBOs", "Use Vertex Buffer Objects (or Vertex Arrays, if unsupported) for viewport rendering.");
2224 prop= RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
2225 RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_AA);
2226 RNA_def_property_ui_text(prop, "Anti-aliasing", "Use anti-aliasing for the 3D view (may impact redraw performance)");
2228 prop= RNA_def_property(srna, "gl_texture_limit", PROP_ENUM, PROP_NONE);
2229 RNA_def_property_enum_sdna(prop, NULL, "glreslimit");
2230 RNA_def_property_enum_items(prop, gl_texture_clamp_items);
2231 RNA_def_property_ui_text(prop, "GL Texture Limit", "Limit the texture size to save graphics memory.");
2233 prop= RNA_def_property(srna, "texture_time_out", PROP_INT, PROP_NONE);
2234 RNA_def_property_int_sdna(prop, NULL, "textimeout");
2235 RNA_def_property_range(prop, 0, 3600);
2236 RNA_def_property_ui_text(prop, "Texture Time Out", "Time since last access of a GL texture in seconds after which it is freed. (Set to 0 to keep textures allocated.)");
2238 prop= RNA_def_property(srna, "texture_collection_rate", PROP_INT, PROP_NONE);
2239 RNA_def_property_int_sdna(prop, NULL, "texcollectrate");
2240 RNA_def_property_range(prop, 1, 3600);
2241 RNA_def_property_ui_text(prop, "Texture Collection Rate", "Number of seconds between each run of the GL texture garbage collector.");
2243 prop= RNA_def_property(srna, "window_draw_method", PROP_ENUM, PROP_NONE);
2244 RNA_def_property_enum_sdna(prop, NULL, "wmdrawmethod");
2245 RNA_def_property_enum_items(prop, draw_method_items);
2246 RNA_def_property_ui_text(prop, "Window Draw Method", "Drawing method used by the window manager.");
2248 prop= RNA_def_property(srna, "audio_mixing_buffer", PROP_ENUM, PROP_NONE);
2249 RNA_def_property_enum_sdna(prop, NULL, "mixbufsize");
2250 RNA_def_property_enum_items(prop, audio_mixing_samples_items);
2251 RNA_def_property_ui_text(prop, "Audio Mixing Buffer", "Sets the number of samples used by the audio mixing buffer.");
2252 RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
2254 prop= RNA_def_property(srna, "audio_device", PROP_ENUM, PROP_NONE);
2255 RNA_def_property_enum_sdna(prop, NULL, "audiodevice");
2256 RNA_def_property_enum_items(prop, audio_device_items);
2257 RNA_def_property_ui_text(prop, "Audio Device", "Sets the audio output device.");
2258 RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
2260 prop= RNA_def_property(srna, "audio_sample_rate", PROP_ENUM, PROP_NONE);
2261 RNA_def_property_enum_sdna(prop, NULL, "audiorate");
2262 RNA_def_property_enum_items(prop, audio_rate_items);
2263 RNA_def_property_ui_text(prop, "Audio Sample Rate", "Sets the audio sample rate.");
2264 RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
2266 prop= RNA_def_property(srna, "audio_sample_format", PROP_ENUM, PROP_NONE);
2267 RNA_def_property_enum_sdna(prop, NULL, "audioformat");
2268 RNA_def_property_enum_items(prop, audio_format_items);
2269 RNA_def_property_ui_text(prop, "Audio Sample Format", "Sets the audio sample format.");
2270 RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
2272 prop= RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE);
2273 RNA_def_property_enum_sdna(prop, NULL, "audiochannels");
2274 RNA_def_property_enum_items(prop, audio_channel_items);
2275 RNA_def_property_ui_text(prop, "Audio Channels", "Sets the audio channel count.");
2276 RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
2279 prop= RNA_def_property(srna, "verse_master", PROP_STRING, PROP_NONE);
2280 RNA_def_property_string_sdna(prop, NULL, "versemaster");
2281 RNA_def_property_ui_text(prop, "Verse Master", "The Verse Master-server IP");
2283 prop= RNA_def_property(srna, "verse_username", PROP_STRING, PROP_NONE);
2284 RNA_def_property_string_sdna(prop, NULL, "verseuser");
2285 RNA_def_property_ui_text(prop, "Verse Username", "The Verse user name");
2289 static void rna_def_userdef_input(BlenderRNA *brna)
2294 static EnumPropertyItem select_mouse_items[] = {
2295 {USER_LMOUSESELECT, "LEFT", 0, "Left", "Use left Mouse Button for selection."},
2296 {0, "RIGHT", 0, "Right", "Use Right Mouse Button for selection."},
2297 {0, NULL, 0, NULL, NULL}};
2299 static EnumPropertyItem view_rotation_items[] = {
2300 {0, "TURNTABLE", 0, "Turntable", "Use turntable style rotation in the viewport."},
2301 {USER_TRACKBALL, "TRACKBALL", 0, "Trackball", "Use trackball style rotation in the viewport."},
2302 {0, NULL, 0, NULL, NULL}};
2304 static EnumPropertyItem view_zoom_styles[] = {
2305 {USER_ZOOM_CONT, "CONTINUE", 0, "Continue", "Old style zoom, continues while moving mouse up or down."},
2306 {USER_ZOOM_DOLLY, "DOLLY", 0, "Dolly", "Zooms in and out based on vertical mouse movement."},
2307 {USER_ZOOM_SCALE, "SCALE", 0, "Scale", "Zooms in and out like scaling the view, mouse movements relative to center."},
2308 {0, NULL, 0, NULL, NULL}};
2310 static EnumPropertyItem view_zoom_axes[] = {
2311 {0, "VERTICAL", 0, "Vertical", "Zooms in and out based on vertical mouse movement."},
2312 {USER_ZOOM_DOLLY_HORIZ, "HORIZONTAL", 0, "Horizontal", "Zooms in and out based on horizontal mouse movement."},
2313 {0, NULL, 0, NULL, NULL}};
2315 srna= RNA_def_struct(brna, "UserPreferencesInput", NULL);
2316 RNA_def_struct_sdna(srna, "UserDef");
2317 RNA_def_struct_nested(brna, srna, "UserPreferences");
2318 RNA_def_struct_ui_text(srna, "Input", "Settings for input devices.");
2320 prop= RNA_def_property(srna, "select_mouse", PROP_ENUM, PROP_NONE);
2321 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
2322 RNA_def_property_enum_items(prop, select_mouse_items);
2323 RNA_def_property_ui_text(prop, "Select Mouse", "The mouse button used for selection.");
2325 prop= RNA_def_property(srna, "viewport_zoom_style", PROP_ENUM, PROP_NONE);
2326 RNA_def_property_enum_sdna(prop, NULL, "viewzoom");
2327 RNA_def_property_enum_items(prop, view_zoom_styles);
2328 RNA_def_property_ui_text(prop, "Viewport Zoom Style", "Which style to use for viewport scaling.");
2330 prop= RNA_def_property(srna, "zoom_axis", PROP_ENUM, PROP_NONE);
2331 RNA_def_property_enum_bitflag_sdna(prop, NULL, "uiflag");
2332 RNA_def_property_enum_items(prop, view_zoom_axes);
2333 RNA_def_property_ui_text(prop, "Zoom Axis", "Axis of mouse movement to zoom in or out on.");
2335 prop= RNA_def_property(srna, "invert_zoom_direction", PROP_BOOLEAN, PROP_NONE);
2336 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_INVERT);
2337 RNA_def_property_ui_text(prop, "Invert Zoom Direction", "Invert the axis of mouse movement for zooming");
2339 prop= RNA_def_property(srna, "view_rotation", PROP_ENUM, PROP_NONE);
2340 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
2341 RNA_def_property_enum_items(prop, view_rotation_items);
2342 RNA_def_property_ui_text(prop, "View Rotation", "Rotation style in the viewport.");
2344 prop= RNA_def_property(srna, "continuous_mouse", PROP_BOOLEAN, PROP_NONE);
2345 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_CONTINUOUS_MOUSE);
2346 RNA_def_property_ui_text(prop, "Continuous Grab", "Allow moving the mouse outside the view on some manipulations (transform, ui control drag).");
2348 prop= RNA_def_property(srna, "ndof_pan_speed", PROP_INT, PROP_NONE);
2349 RNA_def_property_int_sdna(prop, NULL, "ndof_pan");
2350 RNA_def_property_range(prop, 0, 200);
2351 RNA_def_property_ui_text(prop, "NDof Pan Speed", "The overall panning speed of an NDOF device, as percent of standard.");
2353 prop= RNA_def_property(srna, "ndof_rotate_speed", PROP_INT, PROP_NONE);
2354 RNA_def_property_int_sdna(prop, NULL, "ndof_rotate");
2355 RNA_def_property_range(prop, 0, 200);
2356 RNA_def_property_ui_text(prop, "NDof Rotation Speed", "The overall rotation speed of an NDOF device, as percent of standard.");
2358 prop= RNA_def_property(srna, "double_click_time", PROP_INT, PROP_NONE);
2359 RNA_def_property_int_sdna(prop, NULL, "dbl_click_time");
2360 RNA_def_property_range(prop, 1, 1000);
2361 RNA_def_property_ui_text(prop, "Double Click Timeout", "The time (in ms) for a double click.");
2363 prop= RNA_def_property(srna, "emulate_3_button_mouse", PROP_BOOLEAN, PROP_NONE);
2364 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TWOBUTTONMOUSE);
2365 RNA_def_property_boolean_funcs(prop, NULL, "rna_userdef_emulate_set");
2366 RNA_def_property_ui_text(prop, "Emulate 3 Button Mouse", "Emulates Middle Mouse with Alt+LeftMouse (doesnt work with Left Mouse Select option.)");
2368 prop= RNA_def_property(srna, "emulate_numpad", PROP_BOOLEAN, PROP_NONE);
2369 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_NONUMPAD);
2370 RNA_def_property_ui_text(prop, "Emulate Numpad", "Causes the 1 to 0 keys to act as the numpad (useful for laptops).");
2373 static void rna_def_userdef_filepaths(BlenderRNA *brna)
2378 static EnumPropertyItem anim_player_presets[] = {
2379 //{0, "INTERNAL", 0, "Internal", "Built-in animation player"}, // doesn't work yet!
2380 {1, "BLENDER24", 0, "Blender 2.4", "Blender command line animation playback - path to Blender 2.4"},
2381 {2, "DJV", 0, "Djv", "Open source frame player: http://djv.sourceforge.net"},
2382 {3, "FRAMECYCLER", 0, "FrameCycler", "Frame player from IRIDAS"},
2383 {4, "RV", 0, "rv", "Frame player from Tweak Software"},
2384 {50, "CUSTOM", 0, "Custom", "Custom animation player executable path"},
2385 {0, NULL, 0, NULL, NULL}};
2387 srna= RNA_def_struct(brna, "UserPreferencesFilePaths", NULL);
2388 RNA_def_struct_sdna(srna, "UserDef");
2389 RNA_def_struct_nested(brna, srna, "UserPreferences");
2390 RNA_def_struct_ui_text(srna, "File Paths", "Default paths for external files.");
2392 prop= RNA_def_property(srna, "hide_dot_files_datablocks", PROP_BOOLEAN, PROP_NONE);
2393 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_DOT);
2394 RNA_def_property_ui_text(prop, "Hide Dot Files/Datablocks", "Hide files/datablocks that start with a dot(.*)");
2396 prop= RNA_def_property(srna, "filter_file_extensions", PROP_BOOLEAN, PROP_NONE);
2397 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_FILTERFILEEXTS);
2398 RNA_def_property_ui_text(prop, "Filter File Extensions", "Display only files with extensions in the image select window.");
2400 prop= RNA_def_property(srna, "use_relative_paths", PROP_BOOLEAN, PROP_NONE);
2401 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELPATHS);
2402 RNA_def_property_ui_text(prop, "Relative Paths", "Default relative path option for the file selector.");
2404 prop= RNA_def_property(srna, "compress_file", PROP_BOOLEAN, PROP_NONE);
2405 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_FILECOMPRESS);
2406 RNA_def_property_ui_text(prop, "Compress File", "Enable file compression when saving .blend files.");
2408 prop= RNA_def_property(srna, "load_ui", PROP_BOOLEAN, PROP_NONE);
2409 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_FILENOUI);
2410 RNA_def_property_ui_text(prop, "Load UI", "Load user interface setup when loading .blend files.");
2412 prop= RNA_def_property(srna, "fonts_directory", PROP_STRING, PROP_DIRPATH);
2413 RNA_def_property_string_sdna(prop, NULL, "fontdir");
2414 RNA_def_property_ui_text(prop, "Fonts Directory", "The default directory to search for loading fonts.");
2416 prop= RNA_def_property(srna, "textures_directory", PROP_STRING, PROP_DIRPATH);
2417 RNA_def_property_string_sdna(prop, NULL, "textudir");
2418 RNA_def_property_ui_text(prop, "Textures Directory", "The default directory to search for textures.");
2420 prop= RNA_def_property(srna, "texture_plugin_directory", PROP_STRING, PROP_DIRPATH);
2421 RNA_def_property_string_sdna(prop, NULL, "plugtexdir");
2422 RNA_def_property_ui_text(prop, "Texture Plugin Directory", "The default directory to search for texture plugins.");
2424 prop= RNA_def_property(srna, "sequence_plugin_directory", PROP_STRING, PROP_DIRPATH);
2425 RNA_def_property_string_sdna(prop, NULL, "plugseqdir");
2426 RNA_def_property_ui_text(prop, "Sequence Plugin Directory", "The default directory to search for sequence plugins.");
2428 prop= RNA_def_property(srna, "render_output_directory", PROP_STRING, PROP_DIRPATH);
2429 RNA_def_property_string_sdna(prop, NULL, "renderdir");
2430 RNA_def_property_ui_text(prop, "Render Output Directory", "The default directory for rendering output.");
2432 prop= RNA_def_property(srna, "python_scripts_directory", PROP_STRING, PROP_DIRPATH);
2433 RNA_def_property_string_sdna(prop, NULL, "pythondir");
2434 RNA_def_property_ui_text(prop, "Python Scripts Directory", "The default directory to search for Python scripts (resets python module search path: sys.path).");
2436 prop= RNA_def_property(srna, "sounds_directory", PROP_STRING, PROP_DIRPATH);
2437 RNA_def_property_string_sdna(prop, NULL, "sounddir");
2438 RNA_def_property_ui_text(prop, "Sounds Directory", "The default directory to search for sounds.");
2440 prop= RNA_def_property(srna, "temporary_directory", PROP_STRING, PROP_DIRPATH);
2441 RNA_def_property_string_sdna(prop, NULL, "tempdir");
2442 RNA_def_property_ui_text(prop, "Temporary Directory", "The directory for storing temporary save files.");
2444 prop= RNA_def_property(srna, "animation_player", PROP_STRING, PROP_DIRPATH);
2445 RNA_def_property_string_sdna(prop, NULL, "anim_player");
2446 RNA_def_property_ui_text(prop, "Animation Player", "Path to a custom animation/frame sequence player.");
2448 prop= RNA_def_property(srna, "animation_player_preset", PROP_ENUM, PROP_NONE);
2449 RNA_def_property_enum_sdna(prop, NULL, "anim_player_preset");
2450 RNA_def_property_enum_items(prop, anim_player_presets);
2451 RNA_def_property_ui_text(prop, "Animation Player Preset", "Preset configs for external animation players");
2452 RNA_def_property_enum_default(prop, 1); /* set default to blender 2.4 player until an internal one is back */
2456 prop= RNA_def_property(srna, "save_version", PROP_INT, PROP_NONE);
2457 RNA_def_property_int_sdna(prop, NULL, "versions");
2458 RNA_def_property_range(prop, 0, 32);
2459 RNA_def_property_ui_text(prop, "Save Versions", "The number of old versions to maintain in the current directory, when manually saving.");
2461 prop= RNA_def_property(srna, "auto_save_temporary_files", PROP_BOOLEAN, PROP_NONE);
2462 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSAVE);
2463 RNA_def_property_ui_text(prop, "Auto Save Temporary Files", "Automatic saving of temporary files.");
2464 RNA_def_property_update(prop, 0, "rna_userdef_autosave_update");
2466 prop= RNA_def_property(srna, "auto_save_time", PROP_INT, PROP_NONE);
2467 RNA_def_property_int_sdna(prop, NULL, "savetime");
2468 RNA_def_property_range(prop, 1, 60);
2469 RNA_def_property_ui_text(prop, "Auto Save Time", "The time (in minutes) to wait between automatic temporary saves.");
2470 RNA_def_property_update(prop, 0, "rna_userdef_autosave_update");
2472 prop= RNA_def_property(srna, "recent_files", PROP_INT, PROP_NONE);
2473 RNA_def_property_range(prop, 0, 30);
2474 RNA_def_property_ui_text(prop, "Recent Files", "Maximum number of recently opened files to remember.");
2476 prop= RNA_def_property(srna, "save_preview_images", PROP_BOOLEAN, PROP_NONE);
2477 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SAVE_PREVIEWS);
2478 RNA_def_property_ui_text(prop, "Save Preview Images", "Enables automatic saving of preview images in the .blend file.");
2482 void RNA_def_userdef(BlenderRNA *brna)
2487 static EnumPropertyItem user_pref_sections[] = {
2488 {USER_SECTION_INTERFACE, "INTERFACE", 0, "Interface", ""},
2489 {USER_SECTION_EDIT, "EDITING", 0, "Editing", ""},
2490 {USER_SECTION_INPUT, "INPUT", 0, "Input", ""},
2491 {USER_SECTION_THEME, "THEMES", 0, "Themes", ""},
2492 {USER_SECTION_FILE, "FILES", 0, "File", ""},
2493 {USER_SECTION_SYSTEM, "SYSTEM", 0, "System", ""},
2494 {0, NULL, 0, NULL, NULL}};
2496 rna_def_userdef_dothemes(brna);
2497 rna_def_userdef_solidlight(brna);
2499 srna= RNA_def_struct(brna, "UserPreferences", NULL);
2500 RNA_def_struct_sdna(srna, "UserDef");
2501 RNA_def_struct_ui_text(srna, "User Preferences", "Global user preferences.");
2503 prop= RNA_def_property(srna, "active_section", PROP_ENUM, PROP_NONE);
2504 RNA_def_property_enum_sdna(prop, NULL, "userpref");
2505 RNA_def_property_enum_items(prop, user_pref_sections);
2506 RNA_def_property_ui_text(prop, "Active Section", "Active section of the user preferences shown in the user interface.");
2507 RNA_def_property_update(prop, 0, "rna_userdef_update");
2509 prop= RNA_def_property(srna, "themes", PROP_COLLECTION, PROP_NONE);
2510 RNA_def_property_collection_sdna(prop, NULL, "themes", NULL);
2511 RNA_def_property_struct_type(prop, "Theme");
2512 RNA_def_property_ui_text(prop, "Themes", "");
2514 prop= RNA_def_property(srna, "uistyles", PROP_COLLECTION, PROP_NONE);
2515 RNA_def_property_collection_sdna(prop, NULL, "uistyles", NULL);
2516 RNA_def_property_struct_type(prop, "ThemeStyle");
2517 RNA_def_property_ui_text(prop, "Styles", "");
2519 /* nested structs */
2520 prop= RNA_def_property(srna, "view", PROP_POINTER, PROP_NONE);
2521 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2522 RNA_def_property_struct_type(prop, "UserPreferencesView");
2523 RNA_def_property_pointer_funcs(prop, "rna_UserDef_view_get", NULL, NULL);
2524 RNA_def_property_ui_text(prop, "View & Controls", "Preferences related to viewing data.");
2526 prop= RNA_def_property(srna, "edit", PROP_POINTER, PROP_NONE);
2527 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2528 RNA_def_property_struct_type(prop, "UserPreferencesEdit");
2529 RNA_def_property_pointer_funcs(prop, "rna_UserDef_edit_get", NULL, NULL);
2530 RNA_def_property_ui_text(prop, "Edit Methods", "Settings for interacting with Blender data.");
2532 prop= RNA_def_property(srna, "inputs", PROP_POINTER, PROP_NONE);
2533 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2534 RNA_def_property_struct_type(prop, "UserPreferencesInput");
2535 RNA_def_property_pointer_funcs(prop, "rna_UserDef_input_get", NULL, NULL);
2536 RNA_def_property_ui_text(prop, "Inputs", "Settings for input devices.");
2538 prop= RNA_def_property(srna, "filepaths", PROP_POINTER, PROP_NONE);
2539 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2540 RNA_def_property_struct_type(prop, "UserPreferencesFilePaths");
2541 RNA_def_property_pointer_funcs(prop, "rna_UserDef_filepaths_get", NULL, NULL);
2542 RNA_def_property_ui_text(prop, "File Paths", "Default paths for external files.");
2544 prop= RNA_def_property(srna, "system", PROP_POINTER, PROP_NONE);
2545 RNA_def_property_flag(prop, PROP_NEVER_NULL);
2546 RNA_def_property_struct_type(prop, "UserPreferencesSystem");
2547 RNA_def_property_pointer_funcs(prop, "rna_UserDef_system_get", NULL, NULL);
2548 RNA_def_property_ui_text(prop, "System & OpenGL", "Graphics driver and operating system settings.");
2550 rna_def_userdef_view(brna);
2551 rna_def_userdef_edit(brna);
2552 rna_def_userdef_input(brna);
2553 rna_def_userdef_filepaths(brna);
2554 rna_def_userdef_system(brna);