LEFT | RIGHT |
1 /* | 1 /* |
2 * $Id$ | |
3 * | |
4 * ***** BEGIN GPL LICENSE BLOCK ***** | 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
5 * | 3 * |
6 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
8 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
9 * of the License, or (at your option) any later version. | 7 * of the License, or (at your option) any later version. |
10 * | 8 * |
11 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
15 * | 13 * |
16 * You should have received a copy of the GNU General Public License | 14 * 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, | 15 * along with this program; if not, write to the Free Software Foundation, |
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
19 * | 17 * |
20 * Contributor(s): Blender Foundation (2008). | 18 * Contributor(s): Blender Foundation (2008). |
21 * | 19 * |
22 * ***** END GPL LICENSE BLOCK ***** | 20 * ***** END GPL LICENSE BLOCK ***** |
23 */ | 21 */ |
24 | 22 |
25 /** \file blender/makesrna/intern/rna_userdef.c | 23 /** \file blender/makesrna/intern/rna_userdef.c |
26 * \ingroup RNA | 24 * \ingroup RNA |
27 */ | 25 */ |
28 | 26 |
29 | |
30 #include <stdlib.h> | 27 #include <stdlib.h> |
31 | |
32 #include "RNA_define.h" | |
33 #include "RNA_enum_types.h" | |
34 | |
35 #include "rna_internal.h" | |
36 | 28 |
37 #include "DNA_curve_types.h" | 29 #include "DNA_curve_types.h" |
38 #include "DNA_space_types.h" | 30 #include "DNA_space_types.h" |
39 #include "DNA_userdef_types.h" | 31 #include "DNA_userdef_types.h" |
40 #include "DNA_brush_types.h" | 32 #include "DNA_brush_types.h" |
41 #include "DNA_view3d_types.h" | 33 #include "DNA_view3d_types.h" |
| 34 #include "DNA_scene_types.h" |
| 35 |
| 36 #include "BLI_utildefines.h" |
| 37 |
| 38 #include "BKE_sound.h" |
| 39 #include "BKE_addon.h" |
| 40 |
| 41 #include "RNA_access.h" |
| 42 #include "RNA_define.h" |
| 43 #include "RNA_enum_types.h" |
| 44 |
| 45 #include "rna_internal.h" |
42 | 46 |
43 #include "WM_api.h" | 47 #include "WM_api.h" |
44 #include "WM_types.h" | 48 #include "WM_types.h" |
45 | 49 |
46 #include "BLI_utildefines.h" | |
47 #include "BLF_translation.h" | 50 #include "BLF_translation.h" |
48 | 51 |
49 #include "BKE_sound.h" | 52 #ifdef WITH_CYCLES |
| 53 static EnumPropertyItem compute_device_type_items[] = { |
| 54 » {USER_COMPUTE_DEVICE_NONE, "NONE", 0, "None", "Don't use compute device"
}, |
| 55 » {USER_COMPUTE_DEVICE_CUDA, "CUDA", 0, "CUDA", "Use CUDA for GPU accelera
tion"}, |
| 56 » {USER_COMPUTE_DEVICE_OPENCL, "OPENCL", 0, "OpenCL", "Use OpenCL for GPU
acceleration"}, |
| 57 » { 0, NULL, 0, NULL, NULL} |
| 58 }; |
| 59 #endif |
| 60 |
| 61 static EnumPropertyItem audio_device_items[] = { |
| 62 » {0, "NONE", 0, "None", "Null device - there will be no audio output"}, |
| 63 #ifdef WITH_SDL |
| 64 » {1, "SDL", 0, "SDL", "SDL device - simple direct media layer, recommende
d for sequencer usage"}, |
| 65 #endif |
| 66 #ifdef WITH_OPENAL |
| 67 » {2, "OPENAL", 0, "OpenAL", "OpenAL device - supports 3D audio, recommend
ed for game engine usage"}, |
| 68 #endif |
| 69 #ifdef WITH_JACK |
| 70 » {3, "JACK", 0, "Jack", "JACK - Audio Connection Kit, recommended for pro
audio users"}, |
| 71 #endif |
| 72 » {0, NULL, 0, NULL, NULL} |
| 73 }; |
50 | 74 |
51 #ifdef RNA_RUNTIME | 75 #ifdef RNA_RUNTIME |
52 | 76 |
53 #include "DNA_object_types.h" | 77 #include "DNA_object_types.h" |
54 #include "DNA_screen_types.h" | 78 #include "DNA_screen_types.h" |
55 | 79 |
| 80 #include "BKE_blender.h" |
56 #include "BKE_DerivedMesh.h" | 81 #include "BKE_DerivedMesh.h" |
57 #include "BKE_depsgraph.h" | 82 #include "BKE_depsgraph.h" |
58 #include "BKE_global.h" | 83 #include "BKE_global.h" |
59 #include "BKE_main.h" | 84 #include "BKE_main.h" |
| 85 #include "BKE_idprop.h" |
60 | 86 |
61 #include "GPU_draw.h" | 87 #include "GPU_draw.h" |
62 | 88 |
63 #include "BLF_api.h" | 89 #include "BLF_api.h" |
64 | 90 |
65 #include "MEM_guardedalloc.h" | 91 #include "MEM_guardedalloc.h" |
66 #include "MEM_CacheLimiterC-Api.h" | 92 #include "MEM_CacheLimiterC-Api.h" |
67 | 93 |
68 #include "UI_interface.h" | 94 #include "UI_interface.h" |
69 | 95 |
| 96 #include "CCL_api.h" |
| 97 |
| 98 #include "BKE_addon.h" |
| 99 |
70 static void rna_userdef_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe
rRNA *UNUSED(ptr)) | 100 static void rna_userdef_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe
rRNA *UNUSED(ptr)) |
71 { | 101 { |
72 WM_main_add_notifier(NC_WINDOW, NULL); | 102 WM_main_add_notifier(NC_WINDOW, NULL); |
73 } | 103 } |
74 | 104 |
| 105 /* also used by buffer swap switching */ |
75 static void rna_userdef_dpi_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po
interRNA *UNUSED(ptr)) | 106 static void rna_userdef_dpi_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po
interRNA *UNUSED(ptr)) |
76 { | 107 { |
77 » U.widget_unit = (U.dpi * 20 + 36)/72; | 108 » BKE_userdef_state(); |
78 » WM_main_add_notifier(NC_WINDOW, NULL);» » /* full redraw */ | 109 » WM_main_add_notifier(NC_WINDOW, NULL); /* full redraw */ |
79 » WM_main_add_notifier(NC_SCREEN|NA_EDITED, NULL);» /* refresh regio
n sizes */ | 110 » WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); /* refresh region
sizes */ |
80 } | 111 } |
81 | 112 |
82 static void rna_userdef_language_update(Main *UNUSED(bmain), Scene *UNUSED(scene
), PointerRNA *UNUSED(ptr)) | 113 static void rna_userdef_language_update(Main *UNUSED(bmain), Scene *UNUSED(scene
), PointerRNA *UNUSED(ptr)) |
83 { | 114 { |
84 BLF_cache_clear(); | 115 BLF_cache_clear(); |
85 BLF_lang_set(NULL); | 116 BLF_lang_set(NULL); |
86 UI_reinit_font(); | 117 UI_reinit_font(); |
87 } | 118 } |
88 | 119 |
89 static void rna_userdef_show_manipulator_update(Main *bmain, Scene *scene, Point
erRNA *ptr) | 120 static void rna_userdef_show_manipulator_update(Main *bmain, Scene *scene, Point
erRNA *ptr) |
90 { | 121 { |
91 UserDef *userdef = (UserDef *)ptr->data; | 122 UserDef *userdef = (UserDef *)ptr->data; |
92 | 123 |
93 /* lame, loop over all views and set */ | 124 /* lame, loop over all views and set */ |
94 bScreen *sc; | 125 bScreen *sc; |
95 ScrArea *sa; | 126 ScrArea *sa; |
96 SpaceLink *sl; | 127 SpaceLink *sl; |
97 | 128 |
98 /* from scene copy to the other views */ | 129 /* from scene copy to the other views */ |
99 » for(sc=bmain->screen.first; sc; sc=sc->id.next) { | 130 » for (sc = bmain->screen.first; sc; sc = sc->id.next) { |
100 » » for(sa=sc->areabase.first; sa; sa=sa->next) { | 131 » » for (sa = sc->areabase.first; sa; sa = sa->next) { |
101 » » » for(sl=sa->spacedata.first; sl; sl=sl->next) { | 132 » » » for (sl = sa->spacedata.first; sl; sl = sl->next) { |
102 » » » » if(sl->spacetype==SPACE_VIEW3D) { | 133 » » » » if (sl->spacetype == SPACE_VIEW3D) { |
103 » » » » » View3D *v3d= (View3D *)sl; | 134 » » » » » View3D *v3d = (View3D *)sl; |
104 » » » » » if(userdef->tw_flag & V3D_USE_MANIPULATO
R) | 135 » » » » » if (userdef->tw_flag & V3D_USE_MANIPULAT
OR) |
105 v3d->twflag |= V3D_USE_MANIPULAT
OR; | 136 v3d->twflag |= V3D_USE_MANIPULAT
OR; |
106 else | 137 else |
107 v3d->twflag &= ~V3D_USE_MANIPULA
TOR; | 138 v3d->twflag &= ~V3D_USE_MANIPULA
TOR; |
108 } | 139 } |
109 } | 140 } |
110 } | 141 } |
111 } | 142 } |
112 ········ | 143 ········ |
113 rna_userdef_update(bmain, scene, ptr); | 144 rna_userdef_update(bmain, scene, ptr); |
114 } | 145 } |
115 | 146 |
116 | 147 |
117 static void rna_userdef_script_autoexec_update(Main *UNUSED(bmain), Scene *UNUSE
D(scene), PointerRNA *ptr) | 148 static void rna_userdef_script_autoexec_update(Main *UNUSED(bmain), Scene *UNUSE
D(scene), PointerRNA *ptr) |
118 { | 149 { |
119 » UserDef *userdef = (UserDef*)ptr->data; | 150 » UserDef *userdef = (UserDef *)ptr->data; |
120 » if (userdef->flag & USER_SCRIPT_AUTOEXEC_DISABLE)» G.f &= ~G_SCRIPT
_AUTOEXEC; | 151 » if (userdef->flag & USER_SCRIPT_AUTOEXEC_DISABLE) G.f &= ~G_SCRIPT_AUTOE
XEC; |
121 » else» » » » » » » » »
» » » G.f |= G_SCRIPT_AUTOEXEC; | 152 » else G.f |= G_SCRIPT_AUTOEXEC; |
| 153 } |
| 154 |
| 155 static void rna_userdef_load_ui_update(Main *UNUSED(bmain), Scene *UNUSED(scene)
, PointerRNA *ptr) |
| 156 { |
| 157 » UserDef *userdef = (UserDef *)ptr->data; |
| 158 » if (userdef->flag & USER_FILENOUI) G.fileflags |= G_FILE_NO_UI; |
| 159 » else G.fileflags &= ~G_FILE_NO_UI; |
122 } | 160 } |
123 | 161 |
124 static void rna_userdef_mipmap_update(Main *bmain, Scene *scene, PointerRNA *ptr
) | 162 static void rna_userdef_mipmap_update(Main *bmain, Scene *scene, PointerRNA *ptr
) |
125 { | 163 { |
126 GPU_set_mipmap(!(U.gameflags & USER_DISABLE_MIPMAP)); | 164 GPU_set_mipmap(!(U.gameflags & USER_DISABLE_MIPMAP)); |
127 rna_userdef_update(bmain, scene, ptr); | 165 rna_userdef_update(bmain, scene, ptr); |
128 } | 166 } |
129 | 167 |
130 static void rna_userdef_anisotropic_update(Main *bmain, Scene *scene, PointerRNA
*ptr) | 168 static void rna_userdef_anisotropic_update(Main *bmain, Scene *scene, PointerRNA
*ptr) |
131 { | 169 { |
132 GPU_set_anisotropic(U.anisotropic_filter); | 170 GPU_set_anisotropic(U.anisotropic_filter); |
133 rna_userdef_update(bmain, scene, ptr); | 171 rna_userdef_update(bmain, scene, ptr); |
134 } | 172 } |
135 | 173 |
| 174 static void rna_userdef_gl_gpu_mipmaps(Main *bmain, Scene *scene, PointerRNA *pt
r) |
| 175 { |
| 176 GPU_set_gpu_mipmapping(U.use_gpu_mipmap); |
| 177 rna_userdef_update(bmain, scene, ptr); |
| 178 } |
| 179 |
136 static void rna_userdef_gl_texture_limit_update(Main *bmain, Scene *scene, Point
erRNA *ptr) | 180 static void rna_userdef_gl_texture_limit_update(Main *bmain, Scene *scene, Point
erRNA *ptr) |
137 { | 181 { |
138 GPU_free_images(); | 182 GPU_free_images(); |
139 rna_userdef_update(bmain, scene, ptr); | 183 rna_userdef_update(bmain, scene, ptr); |
140 } | 184 } |
141 | 185 |
142 static void rna_userdef_select_mouse_set(PointerRNA *ptr,int value) | 186 static void rna_userdef_gl_use_16bit_textures(Main *bmain, Scene *scene, Pointer
RNA *ptr) |
143 { | 187 { |
144 » UserDef *userdef = (UserDef*)ptr->data; | 188 » GPU_free_images(); |
145 | 189 » rna_userdef_update(bmain, scene, ptr); |
146 » if(value) { | 190 } |
| 191 |
| 192 static void rna_userdef_select_mouse_set(PointerRNA *ptr, int value) |
| 193 { |
| 194 » UserDef *userdef = (UserDef *)ptr->data; |
| 195 |
| 196 » if (value) { |
147 userdef->flag |= USER_LMOUSESELECT; | 197 userdef->flag |= USER_LMOUSESELECT; |
148 userdef->flag &= ~USER_TWOBUTTONMOUSE; | 198 userdef->flag &= ~USER_TWOBUTTONMOUSE; |
149 } | 199 } |
150 else | 200 else |
151 userdef->flag &= ~USER_LMOUSESELECT; | 201 userdef->flag &= ~USER_LMOUSESELECT; |
152 } | 202 } |
153 | 203 |
154 static int rna_userdef_autokeymode_get(PointerRNA *ptr) | 204 static int rna_userdef_autokeymode_get(PointerRNA *ptr) |
155 { | 205 { |
156 » UserDef *userdef = (UserDef*)ptr->data; | 206 » UserDef *userdef = (UserDef *)ptr->data; |
157 short retval = userdef->autokey_mode; | 207 short retval = userdef->autokey_mode; |
158 ········ | 208 ········ |
159 » if(!(userdef->autokey_mode & AUTOKEY_ON)) | 209 » if (!(userdef->autokey_mode & AUTOKEY_ON)) |
160 retval |= AUTOKEY_ON; | 210 retval |= AUTOKEY_ON; |
161 | 211 |
162 return retval; | 212 return retval; |
163 } | 213 } |
164 | 214 |
165 static void rna_userdef_autokeymode_set(PointerRNA *ptr,int value) | 215 static void rna_userdef_autokeymode_set(PointerRNA *ptr, int value) |
166 { | 216 { |
167 » UserDef *userdef = (UserDef*)ptr->data; | 217 » UserDef *userdef = (UserDef *)ptr->data; |
168 | 218 |
169 » if(value == AUTOKEY_MODE_NORMAL) { | 219 » if (value == AUTOKEY_MODE_NORMAL) { |
170 userdef->autokey_mode |= (AUTOKEY_MODE_NORMAL - AUTOKEY_ON); | 220 userdef->autokey_mode |= (AUTOKEY_MODE_NORMAL - AUTOKEY_ON); |
171 userdef->autokey_mode &= ~(AUTOKEY_MODE_EDITKEYS - AUTOKEY_ON); | 221 userdef->autokey_mode &= ~(AUTOKEY_MODE_EDITKEYS - AUTOKEY_ON); |
172 } | 222 } |
173 » else if(value == AUTOKEY_MODE_EDITKEYS) { | 223 » else if (value == AUTOKEY_MODE_EDITKEYS) { |
174 userdef->autokey_mode |= (AUTOKEY_MODE_EDITKEYS - AUTOKEY_ON); | 224 userdef->autokey_mode |= (AUTOKEY_MODE_EDITKEYS - AUTOKEY_ON); |
175 userdef->autokey_mode &= ~(AUTOKEY_MODE_NORMAL - AUTOKEY_ON); | 225 userdef->autokey_mode &= ~(AUTOKEY_MODE_NORMAL - AUTOKEY_ON); |
176 } | 226 } |
177 } | 227 } |
178 | 228 |
179 static void rna_userdef_timecode_style_set(PointerRNA *ptr, int value) | 229 static void rna_userdef_timecode_style_set(PointerRNA *ptr, int value) |
180 { | 230 { |
181 » UserDef *userdef = (UserDef*)ptr->data; | 231 » UserDef *userdef = (UserDef *)ptr->data; |
182 int required_size = userdef->v2d_min_gridsize; | 232 int required_size = userdef->v2d_min_gridsize; |
183 ········ | 233 ········ |
184 /* set the timecode style */ | 234 /* set the timecode style */ |
185 » userdef->timecode_style= value; | 235 » userdef->timecode_style = value; |
186 »······· | 236 »······· |
187 » /* adjust the v2d gridsize if needed so that timecodes don't overlap | 237 » /* adjust the v2d gridsize if needed so that timecodes don't overlap |
188 * NOTE: most of these have been hand-picked to avoid overlaps while sti
ll keeping | 238 * NOTE: most of these have been hand-picked to avoid overlaps while sti
ll keeping |
189 * things from getting too blown out | 239 * things from getting too blown out |
190 */ | 240 */ |
191 switch (value) { | 241 switch (value) { |
192 case USER_TIMECODE_MINIMAL: | 242 case USER_TIMECODE_MINIMAL: |
193 case USER_TIMECODE_SECONDS_ONLY: | 243 case USER_TIMECODE_SECONDS_ONLY: |
194 /* 35 is great most of the time, but not that great for
full-blown */ | 244 /* 35 is great most of the time, but not that great for
full-blown */ |
195 » » » required_size= 35; | 245 » » » required_size = 35; |
196 break; | 246 break; |
197 case USER_TIMECODE_SMPTE_MSF: | 247 case USER_TIMECODE_SMPTE_MSF: |
198 » » » required_size= 50; | 248 » » » required_size = 50; |
199 break; | 249 break; |
200 case USER_TIMECODE_SMPTE_FULL: | 250 case USER_TIMECODE_SMPTE_FULL: |
201 /* the granddaddy! */ | 251 /* the granddaddy! */ |
202 » » » required_size= 65; | 252 » » » required_size = 65; |
203 break; | 253 break; |
204 case USER_TIMECODE_MILLISECONDS: | 254 case USER_TIMECODE_MILLISECONDS: |
205 » » » required_size= 45; | 255 » » » required_size = 45; |
206 break; | 256 break; |
207 } | 257 } |
208 ········ | 258 ········ |
209 if (U.v2d_min_gridsize < required_size) | 259 if (U.v2d_min_gridsize < required_size) |
210 » » U.v2d_min_gridsize= required_size; | 260 » » U.v2d_min_gridsize = required_size; |
211 } | 261 } |
212 | 262 |
213 static PointerRNA rna_UserDef_view_get(PointerRNA *ptr) | 263 static PointerRNA rna_UserDef_view_get(PointerRNA *ptr) |
214 { | 264 { |
215 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesView, ptr->da
ta); | 265 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesView, ptr->da
ta); |
216 } | 266 } |
217 | 267 |
218 static PointerRNA rna_UserDef_edit_get(PointerRNA *ptr) | 268 static PointerRNA rna_UserDef_edit_get(PointerRNA *ptr) |
219 { | 269 { |
220 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesEdit, ptr->da
ta); | 270 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesEdit, ptr->da
ta); |
(...skipping 14 matching lines...) Expand all Loading... |
235 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesSystem, ptr->
data); | 285 return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesSystem, ptr->
data); |
236 } | 286 } |
237 | 287 |
238 static void rna_UserDef_audio_update(Main *bmain, Scene *UNUSED(scene), PointerR
NA *UNUSED(ptr)) | 288 static void rna_UserDef_audio_update(Main *bmain, Scene *UNUSED(scene), PointerR
NA *UNUSED(ptr)) |
239 { | 289 { |
240 sound_init(bmain); | 290 sound_init(bmain); |
241 } | 291 } |
242 | 292 |
243 static void rna_Userdef_memcache_update(Main *UNUSED(bmain), Scene *UNUSED(scene
), PointerRNA *UNUSED(ptr)) | 293 static void rna_Userdef_memcache_update(Main *UNUSED(bmain), Scene *UNUSED(scene
), PointerRNA *UNUSED(ptr)) |
244 { | 294 { |
245 » MEM_CacheLimiter_set_maximum(U.memcachelimit * 1024 * 1024); | 295 » MEM_CacheLimiter_set_maximum(((size_t) U.memcachelimit) * 1024 * 1024); |
246 } | 296 } |
247 | 297 |
248 static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRN
A *ptr) | 298 static void rna_UserDef_weight_color_update(Main *bmain, Scene *scene, PointerRN
A *ptr) |
249 { | 299 { |
250 Object *ob; | 300 Object *ob; |
251 | 301 |
252 » vDM_ColorBand_store((U.flag & USER_CUSTOM_RANGE) ? (&U.coba_weight):NULL
); | 302 » bTheme *btheme = UI_GetTheme(); |
253 | 303 » vDM_ColorBand_store((U.flag & USER_CUSTOM_RANGE) ? (&U.coba_weight) : NU
LL, btheme->tv3d.vertex_unreferenced); |
254 » for(ob= bmain->object.first; ob; ob= ob->id.next) { | 304 |
255 » » if(ob->mode & OB_MODE_WEIGHT_PAINT) | 305 » for (ob = bmain->object.first; ob; ob = ob->id.next) { |
| 306 » » if (ob->mode & OB_MODE_WEIGHT_PAINT) |
256 DAG_id_tag_update(&ob->id, OB_RECALC_DATA); | 307 DAG_id_tag_update(&ob->id, OB_RECALC_DATA); |
257 } | 308 } |
258 | 309 |
259 rna_userdef_update(bmain, scene, ptr); | 310 rna_userdef_update(bmain, scene, ptr); |
260 } | 311 } |
261 | 312 |
262 static void rna_UserDef_viewport_lights_update(Main *bmain, Scene *scene, Pointe
rRNA *ptr) | 313 static void rna_UserDef_viewport_lights_update(Main *bmain, Scene *scene, Pointe
rRNA *ptr) |
263 { | 314 { |
264 /* if all lights are off gpu_draw resets them all, [#27627] | 315 /* if all lights are off gpu_draw resets them all, [#27627] |
265 * so disallow them all to be disabled */ | 316 * so disallow them all to be disabled */ |
266 » if(U.light[0].flag==0 && U.light[1].flag==0 && U.light[2].flag==0) { | 317 » if (U.light[0].flag == 0 && U.light[1].flag == 0 && U.light[2].flag == 0
) { |
267 » » SolidLight *light= ptr->data; | 318 » » SolidLight *light = ptr->data; |
268 light->flag |= 1; | 319 light->flag |= 1; |
269 } | 320 } |
270 | 321 |
271 » WM_main_add_notifier(NC_SPACE|ND_SPACE_VIEW3D|NS_VIEW3D_GPU, NULL); | 322 » WM_main_add_notifier(NC_SPACE | ND_SPACE_VIEW3D | NS_VIEW3D_GPU, NULL); |
272 rna_userdef_update(bmain, scene, ptr); | 323 rna_userdef_update(bmain, scene, ptr); |
273 } | 324 } |
274 | 325 |
275 static void rna_userdef_autosave_update(Main *bmain, Scene *scene, PointerRNA *p
tr) | 326 static void rna_userdef_autosave_update(Main *bmain, Scene *scene, PointerRNA *p
tr) |
276 { | 327 { |
277 » wmWindowManager *wm= bmain->wm.first; | 328 » wmWindowManager *wm = bmain->wm.first; |
278 | 329 |
279 » if(wm) | 330 » if (wm) |
280 WM_autosave_init(wm); | 331 WM_autosave_init(wm); |
281 rna_userdef_update(bmain, scene, ptr); | 332 rna_userdef_update(bmain, scene, ptr); |
282 } | 333 } |
283 | 334 |
284 static bAddon *rna_userdef_addon_new(void) | 335 static bAddon *rna_userdef_addon_new(void) |
285 { | 336 { |
286 » bAddon *bext= MEM_callocN(sizeof(bAddon), "bAddon"); | 337 » bAddon *bext = MEM_callocN(sizeof(bAddon), "bAddon"); |
287 BLI_addtail(&U.addons, bext); | 338 BLI_addtail(&U.addons, bext); |
288 return bext; | 339 return bext; |
289 } | 340 } |
290 | 341 |
291 static void rna_userdef_addon_remove(bAddon *bext) | 342 static void rna_userdef_addon_remove(ReportList *reports, PointerRNA *path_cmp_p
tr) |
292 { | 343 { |
| 344 » bAddon *bext = path_cmp_ptr->data; |
| 345 » if (BLI_findindex(&U.addons, bext) == -1) { |
| 346 » » BKE_report(reports, RPT_ERROR, "Addon is no longer valid"); |
| 347 » » return; |
| 348 » } |
| 349 |
| 350 » if (bext->prop) { |
| 351 » » IDP_FreeProperty(bext->prop); |
| 352 » » MEM_freeN(bext->prop); |
| 353 » } |
| 354 |
293 BLI_freelinkN(&U.addons, bext); | 355 BLI_freelinkN(&U.addons, bext); |
| 356 RNA_POINTER_INVALIDATE(path_cmp_ptr); |
| 357 } |
| 358 |
| 359 static bPathCompare *rna_userdef_pathcompare_new(void) |
| 360 { |
| 361 bPathCompare *path_cmp = MEM_callocN(sizeof(bPathCompare), "bPathCompare
"); |
| 362 BLI_addtail(&U.autoexec_paths, path_cmp); |
| 363 return path_cmp; |
| 364 } |
| 365 |
| 366 static void rna_userdef_pathcompare_remove(ReportList *reports, PointerRNA *path
_cmp_ptr) |
| 367 { |
| 368 bPathCompare *path_cmp = path_cmp_ptr->data; |
| 369 if (BLI_findindex(&U.autoexec_paths, path_cmp) == -1) { |
| 370 BKE_report(reports, RPT_ERROR, "Excluded path is no longer valid
"); |
| 371 return; |
| 372 } |
| 373 |
| 374 BLI_freelinkN(&U.autoexec_paths, path_cmp); |
| 375 RNA_POINTER_INVALIDATE(path_cmp_ptr); |
294 } | 376 } |
295 | 377 |
296 static void rna_userdef_temp_update(Main *UNUSED(bmain), Scene *UNUSED(scene), P
ointerRNA *UNUSED(ptr)) | 378 static void rna_userdef_temp_update(Main *UNUSED(bmain), Scene *UNUSED(scene), P
ointerRNA *UNUSED(ptr)) |
297 { | 379 { |
298 » extern char btempdir[]; | 380 » BLI_init_temporary_dir(U.tempdir); |
299 » BLI_where_is_temp(btempdir, FILE_MAX, 1); | |
300 } | 381 } |
301 | 382 |
302 static void rna_userdef_text_update(Main *UNUSED(bmain), Scene *UNUSED(scene), P
ointerRNA *UNUSED(ptr)) | 383 static void rna_userdef_text_update(Main *UNUSED(bmain), Scene *UNUSED(scene), P
ointerRNA *UNUSED(ptr)) |
303 { | 384 { |
304 BLF_cache_clear(); | 385 BLF_cache_clear(); |
305 WM_main_add_notifier(NC_WINDOW, NULL); | 386 WM_main_add_notifier(NC_WINDOW, NULL); |
306 } | 387 } |
307 | 388 |
| 389 static PointerRNA rna_Theme_space_generic_get(PointerRNA *ptr) |
| 390 { |
| 391 return rna_pointer_inherit_refine(ptr, &RNA_ThemeSpaceGeneric, ptr->data
); |
| 392 } |
| 393 |
| 394 static PointerRNA rna_Theme_space_gradient_get(PointerRNA *ptr) |
| 395 { |
| 396 return rna_pointer_inherit_refine(ptr, &RNA_ThemeSpaceGradient, ptr->dat
a); |
| 397 } |
| 398 |
| 399 static PointerRNA rna_Theme_space_list_generic_get(PointerRNA *ptr) |
| 400 { |
| 401 return rna_pointer_inherit_refine(ptr, &RNA_ThemeSpaceListGeneric, ptr->
data); |
| 402 } |
| 403 |
| 404 |
| 405 #ifdef WITH_CYCLES |
| 406 static EnumPropertyItem *rna_userdef_compute_device_type_itemf(bContext *UNUSED(
C), PointerRNA *UNUSED(ptr), |
| 407 PropertyRNA *UNUS
ED(prop), int *free) |
| 408 { |
| 409 EnumPropertyItem *item = NULL; |
| 410 int totitem = 0; |
| 411 |
| 412 /* add supported device types */ |
| 413 RNA_enum_items_add_value(&item, &totitem, compute_device_type_items, USE
R_COMPUTE_DEVICE_NONE); |
| 414 if (CCL_compute_device_list(0)) |
| 415 RNA_enum_items_add_value(&item, &totitem, compute_device_type_it
ems, USER_COMPUTE_DEVICE_CUDA); |
| 416 if (CCL_compute_device_list(1)) |
| 417 RNA_enum_items_add_value(&item, &totitem, compute_device_type_it
ems, USER_COMPUTE_DEVICE_OPENCL); |
| 418 |
| 419 RNA_enum_item_end(&item, &totitem); |
| 420 *free = 1; |
| 421 |
| 422 return item; |
| 423 } |
| 424 |
| 425 static int rna_userdef_compute_device_get(PointerRNA *UNUSED(ptr)) |
| 426 { |
| 427 if (U.compute_device_type == USER_COMPUTE_DEVICE_NONE) |
| 428 return 0; |
| 429 |
| 430 return U.compute_device_id; |
| 431 } |
| 432 |
| 433 static EnumPropertyItem *rna_userdef_compute_device_itemf(bContext *UNUSED(C), P
ointerRNA *UNUSED(ptr), |
| 434 PropertyRNA *UNUSED(pr
op), int *free) |
| 435 { |
| 436 EnumPropertyItem tmp = {0, "", 0, "", ""}; |
| 437 EnumPropertyItem *item = NULL; |
| 438 int totitem = 0; |
| 439 ········ |
| 440 if (U.compute_device_type == USER_COMPUTE_DEVICE_NONE) { |
| 441 /* only add a single CPU device */ |
| 442 tmp.value = 0; |
| 443 tmp.name = "CPU"; |
| 444 tmp.identifier = "CPU"; |
| 445 RNA_enum_item_add(&item, &totitem, &tmp); |
| 446 } |
| 447 else { |
| 448 /* get device list from cycles. it would be good to make this ge
neric |
| 449 * once we have more subsystems using opencl, for now this is ea
siest */ |
| 450 int opencl = (U.compute_device_type == USER_COMPUTE_DEVICE_OPENC
L); |
| 451 CCLDeviceInfo *devices = CCL_compute_device_list(opencl); |
| 452 int a; |
| 453 |
| 454 if (devices) { |
| 455 for (a = 0; devices[a].identifier[0]; a++) { |
| 456 tmp.value = devices[a].value; |
| 457 tmp.identifier = devices[a].identifier; |
| 458 tmp.name = devices[a].name; |
| 459 RNA_enum_item_add(&item, &totitem, &tmp); |
| 460 } |
| 461 } |
| 462 else { |
| 463 tmp.value = 0; |
| 464 tmp.name = "CPU"; |
| 465 tmp.identifier = "CPU"; |
| 466 RNA_enum_item_add(&item, &totitem, &tmp); |
| 467 } |
| 468 } |
| 469 |
| 470 RNA_enum_item_end(&item, &totitem); |
| 471 *free = 1; |
| 472 |
| 473 return item; |
| 474 } |
| 475 #endif |
| 476 |
| 477 static EnumPropertyItem *rna_userdef_audio_device_itemf(bContext *UNUSED(C), Poi
nterRNA *UNUSED(ptr), |
| 478 PropertyRNA *UNUSED(prop
), int *free) |
| 479 { |
| 480 #ifdef WITH_JACK |
| 481 int jack_supported = sound_is_jack_supported(); |
| 482 |
| 483 if (jack_supported) { |
| 484 return audio_device_items; |
| 485 } |
| 486 else { |
| 487 int index = 0; |
| 488 int totitem = 0; |
| 489 EnumPropertyItem *item = NULL; |
| 490 |
| 491 /* NONE */ |
| 492 RNA_enum_item_add(&item, &totitem, &audio_device_items[index++])
; |
| 493 |
| 494 #ifdef WITH_SDL |
| 495 RNA_enum_item_add(&item, &totitem, &audio_device_items[index++])
; |
| 496 #endif |
| 497 |
| 498 #ifdef WITH_OPENAL |
| 499 RNA_enum_item_add(&item, &totitem, &audio_device_items[index++])
; |
| 500 #endif |
| 501 |
| 502 RNA_enum_item_end(&item, &totitem); |
| 503 *free = 1; |
| 504 |
| 505 return item; |
| 506 } |
| 507 #else |
| 508 (void)free; |
| 509 return audio_device_items; |
| 510 #endif |
| 511 } |
| 512 |
| 513 #ifdef WITH_INTERNATIONAL |
| 514 static EnumPropertyItem *rna_lang_enum_properties_itemf(bContext *UNUSED(C), Poi
nterRNA *UNUSED(ptr), |
| 515 PropertyRNA *UNUSED(prop
), int *free) |
| 516 { |
| 517 *free = 0; /* These items are handled by BLF code! */ |
| 518 return BLF_RNA_lang_enum_properties(); |
| 519 } |
| 520 #endif |
| 521 |
| 522 static IDProperty *rna_AddonPref_idprops(PointerRNA *ptr, bool create) |
| 523 { |
| 524 if (create && !ptr->data) { |
| 525 IDPropertyTemplate val = {0}; |
| 526 ptr->data = IDP_New(IDP_GROUP, &val, "RNA_AddonPreferences group
"); |
| 527 } |
| 528 |
| 529 return ptr->data; |
| 530 } |
| 531 |
| 532 static PointerRNA rna_Addon_preferences_get(PointerRNA *ptr) |
| 533 { |
| 534 bAddon *addon = (bAddon *)ptr->data; |
| 535 bAddonPrefType *apt = BKE_addon_pref_type_find(addon->module, TRUE); |
| 536 if (apt) { |
| 537 if (addon->prop == NULL) { |
| 538 IDPropertyTemplate val = {0}; |
| 539 addon->prop = IDP_New(IDP_GROUP, &val, addon->module); /
* name is unimportant */ |
| 540 } |
| 541 return rna_pointer_inherit_refine(ptr, apt->ext.srna, addon->pro
p); |
| 542 } |
| 543 else { |
| 544 return PointerRNA_NULL; |
| 545 } |
| 546 } |
| 547 |
| 548 static void rna_AddonPref_unregister(Main *UNUSED(bmain), StructRNA *type) |
| 549 { |
| 550 bAddonPrefType *apt = RNA_struct_blender_type_get(type); |
| 551 |
| 552 if (!apt) |
| 553 return; |
| 554 |
| 555 RNA_struct_free_extension(type, &apt->ext); |
| 556 |
| 557 BKE_addon_pref_type_remove(apt); |
| 558 RNA_struct_free(&BLENDER_RNA, type); |
| 559 |
| 560 /* update while blender is running */ |
| 561 WM_main_add_notifier(NC_WINDOW, NULL); |
| 562 } |
| 563 |
| 564 static StructRNA *rna_AddonPref_register(Main *bmain, ReportList *reports, void
*data, const char *identifier, |
| 565 StructValidateFunc validate, StructCall
backFunc call, StructFreeFunc free) |
| 566 { |
| 567 bAddonPrefType *apt, dummyapt = {{'\0'}}; |
| 568 bAddon dummyaddon = {NULL}; |
| 569 PointerRNA dummyhtr; |
| 570 // int have_function[1]; |
| 571 |
| 572 /* setup dummy header & header type to store static properties in */ |
| 573 RNA_pointer_create(NULL, &RNA_AddonPreferences, &dummyaddon, &dummyhtr); |
| 574 |
| 575 /* validate the python class */ |
| 576 if (validate(&dummyhtr, data, NULL /* have_function */ ) != 0) |
| 577 return NULL; |
| 578 |
| 579 BLI_strncpy(dummyapt.idname, dummyaddon.module, sizeof(dummyapt.idname))
; |
| 580 if (strlen(identifier) >= sizeof(dummyapt.idname)) { |
| 581 BKE_reportf(reports, RPT_ERROR, "Registering addon-prefs class:
'%s' is too long, maximum length is %d", |
| 582 identifier, (int)sizeof(dummyapt.idname)); |
| 583 return NULL; |
| 584 } |
| 585 |
| 586 /* check if we have registered this header type before, and remove it */ |
| 587 apt = BKE_addon_pref_type_find(dummyaddon.module, TRUE); |
| 588 if (apt) { |
| 589 if (apt->ext.srna) { |
| 590 rna_AddonPref_unregister(bmain, apt->ext.srna); |
| 591 } |
| 592 } |
| 593 |
| 594 /* create a new header type */ |
| 595 apt = MEM_mallocN(sizeof(bAddonPrefType), "addonpreftype"); |
| 596 memcpy(apt, &dummyapt, sizeof(dummyapt)); |
| 597 BKE_addon_pref_type_add(apt); |
| 598 |
| 599 apt->ext.srna = RNA_def_struct_ptr(&BLENDER_RNA, identifier, &RNA_AddonP
references); |
| 600 apt->ext.data = data; |
| 601 apt->ext.call = call; |
| 602 apt->ext.free = free; |
| 603 RNA_struct_blender_type_set(apt->ext.srna, apt); |
| 604 |
| 605 // apt->draw = (have_function[0]) ? header_draw : NULL; |
| 606 |
| 607 /* update while blender is running */ |
| 608 WM_main_add_notifier(NC_WINDOW, NULL); |
| 609 |
| 610 return apt->ext.srna; |
| 611 } |
| 612 |
| 613 /* placeholder, doesn't do anything useful yet */ |
| 614 static StructRNA *rna_AddonPref_refine(PointerRNA *ptr) |
| 615 { |
| 616 return (ptr->type) ? ptr->type : &RNA_AddonPreferences; |
| 617 } |
| 618 |
308 #else | 619 #else |
309 | 620 |
310 static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna) | 621 static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna) |
311 { | 622 { |
312 StructRNA *srna; | 623 StructRNA *srna; |
313 PropertyRNA *prop; | 624 PropertyRNA *prop; |
314 ········ | 625 ········ |
315 static EnumPropertyItem font_kerning_style[] = { | 626 static EnumPropertyItem font_kerning_style[] = { |
316 {0, "UNFITTED", 0, "Unfitted", "Use scaled but un-grid-fitted ke
rning distances"}, | 627 {0, "UNFITTED", 0, "Unfitted", "Use scaled but un-grid-fitted ke
rning distances"}, |
317 » » {1, "DEFAULT", 0, "Default", "Use scaled and grid-fitted kerning
distances"}, | 628 » » {1, "FITTED", 0, "Fitted", "Use scaled and grid-fitted kerning d
istances"}, |
318 » » {0, NULL, 0, NULL, NULL}}; | 629 » » {0, NULL, 0, NULL, NULL} |
319 | 630 » }; |
320 » srna= RNA_def_struct(brna, "ThemeFontStyle", NULL); | 631 |
| 632 » srna = RNA_def_struct(brna, "ThemeFontStyle", NULL); |
321 RNA_def_struct_sdna(srna, "uiFontStyle"); | 633 RNA_def_struct_sdna(srna, "uiFontStyle"); |
| 634 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); |
322 RNA_def_struct_ui_text(srna, "Font Style", "Theme settings for Font"); | 635 RNA_def_struct_ui_text(srna, "Font Style", "Theme settings for Font"); |
323 ········ | 636 ········ |
324 » prop= RNA_def_property(srna, "points", PROP_INT, PROP_NONE); | 637 » prop = RNA_def_property(srna, "points", PROP_INT, PROP_NONE); |
325 RNA_def_property_range(prop, 6, 48); | 638 RNA_def_property_range(prop, 6, 48); |
326 RNA_def_property_ui_text(prop, "Points", ""); | 639 RNA_def_property_ui_text(prop, "Points", ""); |
327 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 640 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
328 | 641 |
329 » prop= RNA_def_property(srna, "font_kerning_style", PROP_ENUM, PROP_NONE)
; | 642 » prop = RNA_def_property(srna, "font_kerning_style", PROP_ENUM, PROP_NONE
); |
330 RNA_def_property_enum_sdna(prop, NULL, "kerning"); | 643 RNA_def_property_enum_sdna(prop, NULL, "kerning"); |
331 RNA_def_property_enum_items(prop, font_kerning_style); | 644 RNA_def_property_enum_items(prop, font_kerning_style); |
332 RNA_def_property_ui_text(prop, "Kerning Style", "Which style to use for
font kerning"); | 645 RNA_def_property_ui_text(prop, "Kerning Style", "Which style to use for
font kerning"); |
333 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 646 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
334 | 647 |
335 » prop= RNA_def_property(srna, "shadow", PROP_INT, PROP_NONE); | 648 » prop = RNA_def_property(srna, "shadow", PROP_INT, PROP_NONE); |
336 RNA_def_property_range(prop, 0, 5); | 649 RNA_def_property_range(prop, 0, 5); |
337 RNA_def_property_ui_text(prop, "Shadow Size", "Shadow size in pixels (0,
3 and 5 supported)"); | 650 RNA_def_property_ui_text(prop, "Shadow Size", "Shadow size in pixels (0,
3 and 5 supported)"); |
338 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 651 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
339 ········ | 652 ········ |
340 » prop= RNA_def_property(srna, "shadow_offset_x", PROP_INT, PROP_NONE); | 653 » prop = RNA_def_property(srna, "shadow_offset_x", PROP_INT, PROP_NONE); |
341 RNA_def_property_int_sdna(prop, NULL, "shadx"); | 654 RNA_def_property_int_sdna(prop, NULL, "shadx"); |
342 RNA_def_property_range(prop, -10, 10); | 655 RNA_def_property_range(prop, -10, 10); |
343 RNA_def_property_ui_text(prop, "Shadow X Offset", "Shadow offset in pixe
ls"); | 656 RNA_def_property_ui_text(prop, "Shadow X Offset", "Shadow offset in pixe
ls"); |
344 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 657 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
345 ········ | 658 ········ |
346 » prop= RNA_def_property(srna, "shadow_offset_y", PROP_INT, PROP_NONE); | 659 » prop = RNA_def_property(srna, "shadow_offset_y", PROP_INT, PROP_NONE); |
347 RNA_def_property_int_sdna(prop, NULL, "shady"); | 660 RNA_def_property_int_sdna(prop, NULL, "shady"); |
348 RNA_def_property_range(prop, -10, 10); | 661 RNA_def_property_range(prop, -10, 10); |
349 RNA_def_property_ui_text(prop, "Shadow Y Offset", "Shadow offset in pixe
ls"); | 662 RNA_def_property_ui_text(prop, "Shadow Y Offset", "Shadow offset in pixe
ls"); |
350 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 663 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
351 | 664 |
352 » prop= RNA_def_property(srna, "shadowalpha", PROP_FLOAT, PROP_NONE); | 665 » prop = RNA_def_property(srna, "shadow_alpha", PROP_FLOAT, PROP_NONE); |
| 666 » RNA_def_property_float_sdna(prop, NULL, "shadowalpha"); |
353 RNA_def_property_range(prop, 0.0f, 1.0f); | 667 RNA_def_property_range(prop, 0.0f, 1.0f); |
354 RNA_def_property_ui_text(prop, "Shadow Alpha", ""); | 668 RNA_def_property_ui_text(prop, "Shadow Alpha", ""); |
355 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 669 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
356 | 670 |
357 » prop= RNA_def_property(srna, "shadowcolor", PROP_FLOAT, PROP_NONE); | 671 » prop = RNA_def_property(srna, "shadow_value", PROP_FLOAT, PROP_NONE); |
| 672 » RNA_def_property_float_sdna(prop, NULL, "shadowcolor"); |
358 RNA_def_property_range(prop, 0.0f, 1.0f); | 673 RNA_def_property_range(prop, 0.0f, 1.0f); |
359 » RNA_def_property_ui_text(prop, "Shadow Brightness", "Shadow color in gre
y value"); | 674 » RNA_def_property_ui_text(prop, "Shadow Brightness", "Shadow color in gra
y value"); |
360 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | 675 » RNA_def_property_update(prop, 0, "rna_userdef_update"); |
361 }» | 676 } |
362 | 677 |
363 static void rna_def_userdef_theme_ui_style(BlenderRNA *brna) | 678 static void rna_def_userdef_theme_ui_style(BlenderRNA *brna) |
364 { | 679 { |
365 StructRNA *srna; | 680 StructRNA *srna; |
366 PropertyRNA *prop; | 681 PropertyRNA *prop; |
367 ········ | 682 ········ |
368 rna_def_userdef_theme_ui_font_style(brna); | 683 rna_def_userdef_theme_ui_font_style(brna); |
369 ········ | 684 ········ |
370 » srna= RNA_def_struct(brna, "ThemeStyle", NULL); | 685 » srna = RNA_def_struct(brna, "ThemeStyle", NULL); |
371 RNA_def_struct_sdna(srna, "uiStyle"); | 686 RNA_def_struct_sdna(srna, "uiStyle"); |
| 687 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); |
372 RNA_def_struct_ui_text(srna, "Style", "Theme settings for style sets"); | 688 RNA_def_struct_ui_text(srna, "Style", "Theme settings for style sets"); |
373 ········ | 689 ········ |
374 » /* (not used yet) | 690 |
375 » prop= RNA_def_property(srna, "panelzoom", PROP_FLOAT, PROP_NONE); | 691 » prop = RNA_def_property(srna, "panel_title", PROP_POINTER, PROP_NONE); |
376 » RNA_def_property_range(prop, 0.5, 2.0); | |
377 » RNA_def_property_ui_text(prop, "Panel Zoom", "Default zoom level for pan
el areas"); | |
378 » */ | |
379 » prop= RNA_def_property(srna, "panel_title", PROP_POINTER, PROP_NONE); | |
380 RNA_def_property_flag(prop, PROP_NEVER_NULL); | 692 RNA_def_property_flag(prop, PROP_NEVER_NULL); |
381 RNA_def_property_pointer_sdna(prop, NULL, "paneltitle"); | 693 RNA_def_property_pointer_sdna(prop, NULL, "paneltitle"); |
382 RNA_def_property_struct_type(prop, "ThemeFontStyle"); | 694 RNA_def_property_struct_type(prop, "ThemeFontStyle"); |
383 » RNA_def_property_ui_text(prop, "Panel Style", ""); | 695 » RNA_def_property_ui_text(prop, "Panel Title Font", ""); |
384 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | 696 » RNA_def_property_update(prop, 0, "rna_userdef_update"); |
385 /*» (not used yet) | 697 |
386 » prop= RNA_def_property(srna, "group_label", PROP_POINTER, PROP_NONE); | 698 » prop = RNA_def_property(srna, "widget_label", PROP_POINTER, PROP_NONE); |
387 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
388 » RNA_def_property_pointer_sdna(prop, NULL, "grouplabel"); | |
389 » RNA_def_property_struct_type(prop, "ThemeFontStyle"); | |
390 » RNA_def_property_ui_text(prop, "Group Label Font", ""); | |
391 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
392 */»····· | |
393 » prop= RNA_def_property(srna, "widget_label", PROP_POINTER, PROP_NONE); | |
394 RNA_def_property_flag(prop, PROP_NEVER_NULL); | 699 RNA_def_property_flag(prop, PROP_NEVER_NULL); |
395 RNA_def_property_pointer_sdna(prop, NULL, "widgetlabel"); | 700 RNA_def_property_pointer_sdna(prop, NULL, "widgetlabel"); |
396 RNA_def_property_struct_type(prop, "ThemeFontStyle"); | 701 RNA_def_property_struct_type(prop, "ThemeFontStyle"); |
397 RNA_def_property_ui_text(prop, "Widget Label Style", ""); | 702 RNA_def_property_ui_text(prop, "Widget Label Style", ""); |
398 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 703 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
399 ········ | 704 ········ |
400 » prop= RNA_def_property(srna, "widget", PROP_POINTER, PROP_NONE); | 705 » prop = RNA_def_property(srna, "widget", PROP_POINTER, PROP_NONE); |
401 RNA_def_property_flag(prop, PROP_NEVER_NULL); | 706 RNA_def_property_flag(prop, PROP_NEVER_NULL); |
402 RNA_def_property_pointer_sdna(prop, NULL, "widget"); | 707 RNA_def_property_pointer_sdna(prop, NULL, "widget"); |
403 RNA_def_property_struct_type(prop, "ThemeFontStyle"); | 708 RNA_def_property_struct_type(prop, "ThemeFontStyle"); |
404 RNA_def_property_ui_text(prop, "Widget Style", ""); | 709 RNA_def_property_ui_text(prop, "Widget Style", ""); |
405 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 710 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
406 ········ | 711 ········ |
407 }» | 712 } |
408 | 713 |
409 static void rna_def_userdef_theme_ui_wcol(BlenderRNA *brna) | 714 static void rna_def_userdef_theme_ui_wcol(BlenderRNA *brna) |
410 { | 715 { |
411 StructRNA *srna; | 716 StructRNA *srna; |
412 PropertyRNA *prop; | 717 PropertyRNA *prop; |
413 ········ | 718 ········ |
414 » srna= RNA_def_struct(brna, "ThemeWidgetColors", NULL); | 719 » srna = RNA_def_struct(brna, "ThemeWidgetColors", NULL); |
415 RNA_def_struct_sdna(srna, "uiWidgetColors"); | 720 RNA_def_struct_sdna(srna, "uiWidgetColors"); |
| 721 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); |
416 RNA_def_struct_ui_text(srna, "Theme Widget Color Set", "Theme settings f
or widget color sets"); | 722 RNA_def_struct_ui_text(srna, "Theme Widget Color Set", "Theme settings f
or widget color sets"); |
417 ················ | 723 ················ |
418 » prop= RNA_def_property(srna, "outline", PROP_FLOAT, PROP_COLOR_GAMMA); | 724 » prop = RNA_def_property(srna, "outline", PROP_FLOAT, PROP_COLOR_GAMMA); |
419 RNA_def_property_array(prop, 3); | 725 RNA_def_property_array(prop, 3); |
420 RNA_def_property_ui_text(prop, "Outline", ""); | 726 RNA_def_property_ui_text(prop, "Outline", ""); |
421 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 727 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
422 ········ | 728 ········ |
423 » prop= RNA_def_property(srna, "inner", PROP_FLOAT, PROP_COLOR_GAMMA); | 729 » prop = RNA_def_property(srna, "inner", PROP_FLOAT, PROP_COLOR_GAMMA); |
424 RNA_def_property_array(prop, 4); | 730 RNA_def_property_array(prop, 4); |
425 RNA_def_property_ui_text(prop, "Inner", ""); | 731 RNA_def_property_ui_text(prop, "Inner", ""); |
426 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 732 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
427 ········ | 733 ········ |
428 » prop= RNA_def_property(srna, "inner_sel", PROP_FLOAT, PROP_COLOR_GAMMA); | 734 » prop = RNA_def_property(srna, "inner_sel", PROP_FLOAT, PROP_COLOR_GAMMA)
; |
429 RNA_def_property_array(prop, 4); | 735 RNA_def_property_array(prop, 4); |
430 RNA_def_property_ui_text(prop, "Inner Selected", ""); | 736 RNA_def_property_ui_text(prop, "Inner Selected", ""); |
431 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 737 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
432 ········ | 738 ········ |
433 » prop= RNA_def_property(srna, "item", PROP_FLOAT, PROP_COLOR_GAMMA); | 739 » prop = RNA_def_property(srna, "item", PROP_FLOAT, PROP_COLOR_GAMMA); |
434 RNA_def_property_array(prop, 4); | 740 RNA_def_property_array(prop, 4); |
435 RNA_def_property_ui_text(prop, "Item", ""); | 741 RNA_def_property_ui_text(prop, "Item", ""); |
436 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 742 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
437 ········ | 743 ········ |
438 » prop= RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR_GAMMA); | 744 » prop = RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR_GAMMA); |
439 RNA_def_property_array(prop, 3); | 745 RNA_def_property_array(prop, 3); |
440 RNA_def_property_ui_text(prop, "Text", ""); | 746 RNA_def_property_ui_text(prop, "Text", ""); |
441 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 747 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
442 ········ | 748 ········ |
443 » prop= RNA_def_property(srna, "text_sel", PROP_FLOAT, PROP_COLOR_GAMMA); | 749 » prop = RNA_def_property(srna, "text_sel", PROP_FLOAT, PROP_COLOR_GAMMA); |
444 RNA_def_property_array(prop, 3); | 750 RNA_def_property_array(prop, 3); |
445 RNA_def_property_ui_text(prop, "Text Selected", ""); | 751 RNA_def_property_ui_text(prop, "Text Selected", ""); |
446 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 752 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
447 ········ | 753 ········ |
448 » prop= RNA_def_property(srna, "show_shaded", PROP_BOOLEAN, PROP_NONE); | 754 » prop = RNA_def_property(srna, "show_shaded", PROP_BOOLEAN, PROP_NONE); |
449 RNA_def_property_boolean_sdna(prop, NULL, "shaded", 1); | 755 RNA_def_property_boolean_sdna(prop, NULL, "shaded", 1); |
450 RNA_def_property_ui_text(prop, "Shaded", ""); | 756 RNA_def_property_ui_text(prop, "Shaded", ""); |
451 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 757 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
452 ········ | 758 ········ |
453 » prop= RNA_def_property(srna, "shadetop", PROP_INT, PROP_NONE); | 759 » prop = RNA_def_property(srna, "shadetop", PROP_INT, PROP_NONE); |
454 RNA_def_property_range(prop, -100, 100); | 760 RNA_def_property_range(prop, -100, 100); |
455 RNA_def_property_ui_text(prop, "Shade Top", ""); | 761 RNA_def_property_ui_text(prop, "Shade Top", ""); |
456 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 762 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
457 ········ | 763 ········ |
458 » prop= RNA_def_property(srna, "shadedown", PROP_INT, PROP_NONE); | 764 » prop = RNA_def_property(srna, "shadedown", PROP_INT, PROP_NONE); |
459 RNA_def_property_range(prop, -100, 100); | 765 RNA_def_property_range(prop, -100, 100); |
460 RNA_def_property_ui_text(prop, "Shade Down", ""); | 766 RNA_def_property_ui_text(prop, "Shade Down", ""); |
461 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 767 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
462 } | 768 } |
463 | 769 |
464 static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna) | 770 static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna) |
465 { | 771 { |
466 StructRNA *srna; | 772 StructRNA *srna; |
467 PropertyRNA *prop; | 773 PropertyRNA *prop; |
468 ········ | 774 ········ |
469 » srna= RNA_def_struct(brna, "ThemeWidgetStateColors", NULL); | 775 » srna = RNA_def_struct(brna, "ThemeWidgetStateColors", NULL); |
470 RNA_def_struct_sdna(srna, "uiWidgetStateColors"); | 776 RNA_def_struct_sdna(srna, "uiWidgetStateColors"); |
| 777 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); |
471 RNA_def_struct_ui_text(srna, "Theme Widget State Color", "Theme settings
for widget state colors"); | 778 RNA_def_struct_ui_text(srna, "Theme Widget State Color", "Theme settings
for widget state colors"); |
472 ················ | 779 ················ |
473 » prop= RNA_def_property(srna, "inner_anim", PROP_FLOAT, PROP_COLOR_GAMMA)
; | 780 » prop = RNA_def_property(srna, "inner_anim", PROP_FLOAT, PROP_COLOR_GAMMA
); |
474 RNA_def_property_array(prop, 3); | 781 RNA_def_property_array(prop, 3); |
475 RNA_def_property_ui_text(prop, "Animated", ""); | 782 RNA_def_property_ui_text(prop, "Animated", ""); |
476 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 783 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
477 | 784 |
478 » prop= RNA_def_property(srna, "inner_anim_sel", PROP_FLOAT, PROP_COLOR_GA
MMA); | 785 » prop = RNA_def_property(srna, "inner_anim_sel", PROP_FLOAT, PROP_COLOR_G
AMMA); |
479 RNA_def_property_array(prop, 3); | 786 RNA_def_property_array(prop, 3); |
480 RNA_def_property_ui_text(prop, "Animated Selected", ""); | 787 RNA_def_property_ui_text(prop, "Animated Selected", ""); |
481 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 788 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
482 ········ | 789 ········ |
483 » prop= RNA_def_property(srna, "inner_key", PROP_FLOAT, PROP_COLOR_GAMMA); | 790 » prop = RNA_def_property(srna, "inner_key", PROP_FLOAT, PROP_COLOR_GAMMA)
; |
484 RNA_def_property_array(prop, 3); | 791 RNA_def_property_array(prop, 3); |
485 RNA_def_property_ui_text(prop, "Keyframe", ""); | 792 RNA_def_property_ui_text(prop, "Keyframe", ""); |
486 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 793 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
487 | 794 |
488 » prop= RNA_def_property(srna, "inner_key_sel", PROP_FLOAT, PROP_COLOR_GAM
MA); | 795 » prop = RNA_def_property(srna, "inner_key_sel", PROP_FLOAT, PROP_COLOR_GA
MMA); |
489 RNA_def_property_array(prop, 3); | 796 RNA_def_property_array(prop, 3); |
490 RNA_def_property_ui_text(prop, "Keyframe Selected", ""); | 797 RNA_def_property_ui_text(prop, "Keyframe Selected", ""); |
491 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 798 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
492 | 799 |
493 » prop= RNA_def_property(srna, "inner_driven", PROP_FLOAT, PROP_COLOR_GAMM
A); | 800 » prop = RNA_def_property(srna, "inner_driven", PROP_FLOAT, PROP_COLOR_GAM
MA); |
494 RNA_def_property_array(prop, 3); | 801 RNA_def_property_array(prop, 3); |
495 RNA_def_property_ui_text(prop, "Driven", ""); | 802 RNA_def_property_ui_text(prop, "Driven", ""); |
496 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 803 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
497 | 804 |
498 » prop= RNA_def_property(srna, "inner_driven_sel", PROP_FLOAT, PROP_COLOR_
GAMMA); | 805 » prop = RNA_def_property(srna, "inner_driven_sel", PROP_FLOAT, PROP_COLOR
_GAMMA); |
499 RNA_def_property_array(prop, 3); | 806 RNA_def_property_array(prop, 3); |
500 RNA_def_property_ui_text(prop, "Driven Selected", ""); | 807 RNA_def_property_ui_text(prop, "Driven Selected", ""); |
501 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 808 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
502 | 809 |
503 » prop= RNA_def_property(srna, "blend", PROP_FLOAT, PROP_FACTOR); | 810 » prop = RNA_def_property(srna, "blend", PROP_FLOAT, PROP_FACTOR); |
504 RNA_def_property_ui_text(prop, "Blend", ""); | 811 RNA_def_property_ui_text(prop, "Blend", ""); |
505 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 812 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
506 } | 813 } |
507 | 814 |
508 static void rna_def_userdef_theme_ui(BlenderRNA *brna) | 815 static void rna_def_userdef_theme_ui_panel(BlenderRNA *brna) |
509 { | 816 { |
510 StructRNA *srna; | 817 StructRNA *srna; |
511 PropertyRNA *prop; | 818 PropertyRNA *prop; |
| 819 ········ |
| 820 srna = RNA_def_struct(brna, "ThemePanelColors", NULL); |
| 821 RNA_def_struct_sdna(srna, "uiPanelColors"); |
| 822 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); |
| 823 RNA_def_struct_ui_text(srna, "Theme Panel Color", "Theme settings for pa
nel colors"); |
| 824 ················ |
| 825 prop = RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR_GAMMA); |
| 826 RNA_def_property_ui_text(prop, "Header", ""); |
| 827 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
| 828 ········ |
| 829 prop = RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR_GAMMA); |
| 830 RNA_def_property_ui_text(prop, "Background", ""); |
| 831 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
| 832 ········ |
| 833 prop = RNA_def_property(srna, "show_header", PROP_BOOLEAN, PROP_NONE); |
| 834 RNA_def_property_ui_text(prop, "Show Header", ""); |
| 835 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
| 836 |
| 837 prop = RNA_def_property(srna, "show_back", PROP_BOOLEAN, PROP_NONE); |
| 838 RNA_def_property_ui_text(prop, "Show Background", ""); |
| 839 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
| 840 } |
| 841 |
| 842 static void rna_def_userdef_theme_ui_gradient(BlenderRNA *brna) |
| 843 { |
| 844 StructRNA *srna; |
| 845 PropertyRNA *prop; |
| 846 |
| 847 srna = RNA_def_struct(brna, "ThemeGradientColors", NULL); |
| 848 RNA_def_struct_sdna(srna, "uiGradientColors"); |
| 849 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); |
| 850 RNA_def_struct_ui_text(srna, "Theme Background Color", "Theme settings f
or background colors and gradient"); |
| 851 |
| 852 prop = RNA_def_property(srna, "show_grad", PROP_BOOLEAN, PROP_NONE); |
| 853 RNA_def_property_ui_text(prop, "Use Gradient", |
| 854 "Do a gradient for the background of the viewpo
rt working area"); |
| 855 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
| 856 |
| 857 prop = RNA_def_property(srna, "gradient", PROP_FLOAT, PROP_COLOR_GAMMA); |
| 858 RNA_def_property_array(prop, 3); |
| 859 RNA_def_property_ui_text(prop, "Gradient Low", ""); |
| 860 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
| 861 |
| 862 prop = RNA_def_property(srna, "high_gradient", PROP_FLOAT, PROP_COLOR_GA
MMA); |
| 863 RNA_def_property_array(prop, 3); |
| 864 RNA_def_property_ui_text(prop, "Gradient High/Off", ""); |
| 865 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
| 866 } |
| 867 |
| 868 static void rna_def_userdef_theme_ui(BlenderRNA *brna) |
| 869 { |
| 870 StructRNA *srna; |
| 871 PropertyRNA *prop; |
512 | 872 |
513 rna_def_userdef_theme_ui_wcol(brna); | 873 rna_def_userdef_theme_ui_wcol(brna); |
514 rna_def_userdef_theme_ui_wcol_state(brna); | 874 rna_def_userdef_theme_ui_wcol_state(brna); |
515 »······· | 875 » rna_def_userdef_theme_ui_panel(brna); |
516 » srna= RNA_def_struct(brna, "ThemeUserInterface", NULL); | 876 » rna_def_userdef_theme_ui_gradient(brna); |
| 877 |
| 878 » srna = RNA_def_struct(brna, "ThemeUserInterface", NULL); |
517 RNA_def_struct_sdna(srna, "ThemeUI"); | 879 RNA_def_struct_sdna(srna, "ThemeUI"); |
| 880 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); |
518 RNA_def_struct_ui_text(srna, "Theme User Interface", "Theme settings for
user interface elements"); | 881 RNA_def_struct_ui_text(srna, "Theme User Interface", "Theme settings for
user interface elements"); |
519 | 882 |
520 » prop= RNA_def_property(srna, "wcol_regular", PROP_POINTER, PROP_NONE); | 883 » prop = RNA_def_property(srna, "wcol_regular", PROP_POINTER, PROP_NONE); |
521 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 884 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
522 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_regular"); | |
523 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | |
524 RNA_def_property_ui_text(prop, "Regular Widget Colors", ""); | 885 RNA_def_property_ui_text(prop, "Regular Widget Colors", ""); |
525 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 886 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
526 ········ | 887 ········ |
527 » prop= RNA_def_property(srna, "wcol_tool", PROP_POINTER, PROP_NONE); | 888 » prop = RNA_def_property(srna, "wcol_tool", PROP_POINTER, PROP_NONE); |
528 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 889 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
529 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_tool"); | |
530 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | |
531 RNA_def_property_ui_text(prop, "Tool Widget Colors", ""); | 890 RNA_def_property_ui_text(prop, "Tool Widget Colors", ""); |
532 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 891 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
533 ········ | 892 ········ |
534 » prop= RNA_def_property(srna, "wcol_radio", PROP_POINTER, PROP_NONE); | 893 » prop = RNA_def_property(srna, "wcol_radio", PROP_POINTER, PROP_NONE); |
535 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 894 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
536 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_radio"); | |
537 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | |
538 RNA_def_property_ui_text(prop, "Radio Widget Colors", ""); | 895 RNA_def_property_ui_text(prop, "Radio Widget Colors", ""); |
539 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 896 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
540 ········ | 897 ········ |
541 » prop= RNA_def_property(srna, "wcol_text", PROP_POINTER, PROP_NONE); | 898 » prop = RNA_def_property(srna, "wcol_text", PROP_POINTER, PROP_NONE); |
542 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 899 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
543 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_text"); | |
544 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | |
545 RNA_def_property_ui_text(prop, "Text Widget Colors", ""); | 900 RNA_def_property_ui_text(prop, "Text Widget Colors", ""); |
546 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 901 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
547 ········ | 902 ········ |
548 » prop= RNA_def_property(srna, "wcol_option", PROP_POINTER, PROP_NONE); | 903 » prop = RNA_def_property(srna, "wcol_option", PROP_POINTER, PROP_NONE); |
549 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 904 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
550 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_option"); | |
551 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | |
552 RNA_def_property_ui_text(prop, "Option Widget Colors", ""); | 905 RNA_def_property_ui_text(prop, "Option Widget Colors", ""); |
553 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 906 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
554 | 907 |
555 » prop= RNA_def_property(srna, "wcol_toggle", PROP_POINTER, PROP_NONE); | 908 » prop = RNA_def_property(srna, "wcol_toggle", PROP_POINTER, PROP_NONE); |
556 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 909 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
557 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_toggle"); | |
558 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | |
559 RNA_def_property_ui_text(prop, "Toggle Widget Colors", ""); | 910 RNA_def_property_ui_text(prop, "Toggle Widget Colors", ""); |
560 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 911 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
561 ········ | 912 ········ |
562 » prop= RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NONE); | 913 » prop = RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NONE); |
563 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 914 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
564 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_num"); | |
565 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | |
566 RNA_def_property_ui_text(prop, "Number Widget Colors", ""); | 915 RNA_def_property_ui_text(prop, "Number Widget Colors", ""); |
567 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 916 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
568 ········ | 917 ········ |
569 » prop= RNA_def_property(srna, "wcol_numslider", PROP_POINTER, PROP_NONE); | 918 » prop = RNA_def_property(srna, "wcol_numslider", PROP_POINTER, PROP_NONE)
; |
570 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 919 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
571 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_numslider"); | |
572 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | |
573 RNA_def_property_ui_text(prop, "Slider Widget Colors", ""); | 920 RNA_def_property_ui_text(prop, "Slider Widget Colors", ""); |
574 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 921 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
575 ········ | 922 ········ |
576 » prop= RNA_def_property(srna, "wcol_box", PROP_POINTER, PROP_NONE); | 923 » prop = RNA_def_property(srna, "wcol_box", PROP_POINTER, PROP_NONE); |
577 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 924 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
578 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_box"); | |
579 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | |
580 RNA_def_property_ui_text(prop, "Box Backdrop Colors", ""); | 925 RNA_def_property_ui_text(prop, "Box Backdrop Colors", ""); |
581 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 926 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
582 ········ | 927 ········ |
583 » prop= RNA_def_property(srna, "wcol_menu", PROP_POINTER, PROP_NONE); | 928 » prop = RNA_def_property(srna, "wcol_menu", PROP_POINTER, PROP_NONE); |
584 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 929 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
585 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu"); | |
586 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | |
587 RNA_def_property_ui_text(prop, "Menu Widget Colors", ""); | 930 RNA_def_property_ui_text(prop, "Menu Widget Colors", ""); |
588 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 931 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
589 ········ | 932 ········ |
590 » prop= RNA_def_property(srna, "wcol_pulldown", PROP_POINTER, PROP_NONE); | 933 » prop = RNA_def_property(srna, "wcol_pulldown", PROP_POINTER, PROP_NONE); |
591 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 934 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
592 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_pulldown"); | |
593 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | |
594 RNA_def_property_ui_text(prop, "Pulldown Widget Colors", ""); | 935 RNA_def_property_ui_text(prop, "Pulldown Widget Colors", ""); |
595 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 936 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
596 ········ | 937 ········ |
597 » prop= RNA_def_property(srna, "wcol_menu_back", PROP_POINTER, PROP_NONE); | 938 » prop = RNA_def_property(srna, "wcol_menu_back", PROP_POINTER, PROP_NONE)
; |
598 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 939 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
599 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_back"); | |
600 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | |
601 RNA_def_property_ui_text(prop, "Menu Backdrop Colors", ""); | 940 RNA_def_property_ui_text(prop, "Menu Backdrop Colors", ""); |
602 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 941 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
603 »······· | 942 » prop = RNA_def_property(srna, "wcol_tooltip", PROP_POINTER, PROP_NONE); |
604 » prop= RNA_def_property(srna, "wcol_menu_item", PROP_POINTER, PROP_NONE); | 943 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
605 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 944 » RNA_def_property_ui_text(prop, "Tooltip Colors", ""); |
606 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_item"); | 945 » RNA_def_property_update(prop, 0, "rna_userdef_update"); |
607 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | 946 »······· |
| 947 » prop = RNA_def_property(srna, "wcol_menu_item", PROP_POINTER, PROP_NONE)
; |
| 948 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
608 RNA_def_property_ui_text(prop, "Menu Item Colors", ""); | 949 RNA_def_property_ui_text(prop, "Menu Item Colors", ""); |
609 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 950 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
610 | 951 |
611 » prop= RNA_def_property(srna, "wcol_scroll", PROP_POINTER, PROP_NONE); | 952 » prop = RNA_def_property(srna, "wcol_scroll", PROP_POINTER, PROP_NONE); |
612 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 953 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
613 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_scroll"); | |
614 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | |
615 RNA_def_property_ui_text(prop, "Scroll Widget Colors", ""); | 954 RNA_def_property_ui_text(prop, "Scroll Widget Colors", ""); |
616 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 955 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
617 ········ | 956 ········ |
618 » prop= RNA_def_property(srna, "wcol_progress", PROP_POINTER, PROP_NONE); | 957 » prop = RNA_def_property(srna, "wcol_progress", PROP_POINTER, PROP_NONE); |
619 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 958 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
620 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_progress"); | |
621 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | |
622 RNA_def_property_ui_text(prop, "Progress Bar Widget Colors", ""); | 959 RNA_def_property_ui_text(prop, "Progress Bar Widget Colors", ""); |
623 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 960 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
624 | 961 |
625 » prop= RNA_def_property(srna, "wcol_list_item", PROP_POINTER, PROP_NONE); | 962 » prop = RNA_def_property(srna, "wcol_list_item", PROP_POINTER, PROP_NONE)
; |
626 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 963 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
627 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_list_item"); | |
628 » RNA_def_property_struct_type(prop, "ThemeWidgetColors"); | |
629 RNA_def_property_ui_text(prop, "List Item Colors", ""); | 964 RNA_def_property_ui_text(prop, "List Item Colors", ""); |
630 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 965 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
631 | 966 |
632 » prop= RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NONE); | 967 » prop = RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NONE); |
633 » RNA_def_property_flag(prop, PROP_NEVER_NULL); | 968 » RNA_def_property_flag(prop, PROP_NEVER_NULL); |
634 » RNA_def_property_pointer_sdna(prop, NULL, "wcol_state"); | |
635 » RNA_def_property_struct_type(prop, "ThemeWidgetStateColors"); | |
636 RNA_def_property_ui_text(prop, "State Colors", ""); | 969 RNA_def_property_ui_text(prop, "State Colors", ""); |
637 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 970 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
638 »······· | 971 |
639 » prop= RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH); | 972 » prop = RNA_def_property(srna, "menu_shadow_fac", PROP_FLOAT, PROP_FACTOR
); |
| 973 » RNA_def_property_ui_text(prop, "Menu Shadow Strength", "Blending factor
for menu shadows"); |
| 974 » RNA_def_property_range(prop, 0.01f, 1.0f); |
| 975 » RNA_def_property_update(prop, 0, "rna_userdef_update"); |
| 976 »······· |
| 977 » prop = RNA_def_property(srna, "menu_shadow_width", PROP_INT, PROP_NONE); |
| 978 » RNA_def_property_ui_text(prop, "Menu Shadow Width", "Width of menu shado
ws in standard pixels, set to zero to disable it"); |
| 979 » RNA_def_property_range(prop, 0.0f, 24.0f); |
| 980 » RNA_def_property_update(prop, 0, "rna_userdef_update"); |
| 981 »······· |
| 982 » prop = RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH); |
640 RNA_def_property_string_sdna(prop, NULL, "iconfile"); | 983 RNA_def_property_string_sdna(prop, NULL, "iconfile"); |
641 RNA_def_property_ui_text(prop, "Icon File", ""); | 984 RNA_def_property_ui_text(prop, "Icon File", ""); |
642 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 985 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
643 } | 986 |
644 | 987 prop = RNA_def_property(srna, "icon_alpha", PROP_FLOAT, PROP_FACTOR); |
645 static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype) | 988 RNA_def_property_ui_text(prop, "Icon Alpha", "Transparency of icons in t
he interface, to reduce contrast"); |
646 { | 989 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
647 PropertyRNA *prop; | 990 ········ |
648 | 991 /* axis */ |
649 /* window */ | 992 prop = RNA_def_property(srna, "axis_x", PROP_FLOAT, PROP_COLOR_GAMMA); |
650 prop= RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR_GAMMA); | 993 RNA_def_property_float_sdna(prop, NULL, "xaxis"); |
651 RNA_def_property_array(prop, 3); | 994 RNA_def_property_array(prop, 3); |
652 RNA_def_property_ui_text(prop, "Window Background", ""); | 995 RNA_def_property_ui_text(prop, "X Axis", ""); |
653 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 996 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
654 | 997 ········ |
655 prop= RNA_def_property(srna, "title", PROP_FLOAT, PROP_COLOR_GAMMA); | 998 prop = RNA_def_property(srna, "axis_y", PROP_FLOAT, PROP_COLOR_GAMMA); |
656 RNA_def_property_array(prop, 3); | 999 RNA_def_property_float_sdna(prop, NULL, "yaxis"); |
657 RNA_def_property_ui_text(prop, "Title", ""); | 1000 RNA_def_property_array(prop, 3); |
658 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 1001 RNA_def_property_ui_text(prop, "Y Axis", ""); |
659 ········ | 1002 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
660 prop= RNA_def_property(srna, "text", PROP_FLOAT, PROP_COLOR_GAMMA); | 1003 ········ |
661 RNA_def_property_array(prop, 3); | 1004 prop = RNA_def_property(srna, "axis_z", PROP_FLOAT, PROP_COLOR_GAMMA); |
662 RNA_def_property_ui_text(prop, "Text", ""); | 1005 RNA_def_property_float_sdna(prop, NULL, "zaxis"); |
663 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 1006 RNA_def_property_array(prop, 3); |
664 | 1007 RNA_def_property_ui_text(prop, "Z Axis", ""); |
665 prop= RNA_def_property(srna, "text_hi", PROP_FLOAT, PROP_COLOR_GAMMA); | 1008 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
666 RNA_def_property_array(prop, 3); | 1009 } |
667 RNA_def_property_ui_text(prop, "Text Highlight", ""); | 1010 |
668 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 1011 static void rna_def_userdef_theme_space_generic(BlenderRNA *brna) |
669 | |
670 /* header */ | |
671 prop= RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR_GAMMA); | |
672 RNA_def_property_array(prop, 3); | |
673 RNA_def_property_ui_text(prop, "Header", ""); | |
674 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
675 | |
676 prop= RNA_def_property(srna, "header_text", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
677 RNA_def_property_array(prop, 3); | |
678 RNA_def_property_ui_text(prop, "Header Text", ""); | |
679 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
680 ········ | |
681 prop= RNA_def_property(srna, "header_text_hi", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
682 RNA_def_property_array(prop, 3); | |
683 RNA_def_property_ui_text(prop, "Header Text Highlight", ""); | |
684 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
685 ········ | |
686 /* buttons */ | |
687 // if(! ELEM(spacetype, SPACE_BUTS, SPACE_OUTLINER)) { | |
688 prop= RNA_def_property(srna, "button", PROP_FLOAT, PROP_COLOR_GAMMA); | |
689 RNA_def_property_array(prop, 3); | |
690 RNA_def_property_ui_text(prop, "Region Background", ""); | |
691 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
692 ········ | |
693 prop= RNA_def_property(srna, "button_title", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
694 RNA_def_property_array(prop, 3); | |
695 RNA_def_property_ui_text(prop, "Region Text Titles", ""); | |
696 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
697 ········ | |
698 prop= RNA_def_property(srna, "button_text", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
699 RNA_def_property_array(prop, 3); | |
700 RNA_def_property_ui_text(prop, "Region Text", ""); | |
701 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
702 ········ | |
703 prop= RNA_def_property(srna, "button_text_hi", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
704 RNA_def_property_array(prop, 3); | |
705 RNA_def_property_ui_text(prop, "Region Text Highlight", ""); | |
706 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
707 // } | |
708 ········ | |
709 /* list/channels */ | |
710 if(ELEM5(spacetype, SPACE_IPO, SPACE_ACTION, SPACE_NLA, SPACE_NODE, SPAC
E_FILE)) { | |
711 prop= RNA_def_property(srna, "list", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
712 RNA_def_property_array(prop, 3); | |
713 RNA_def_property_ui_text(prop, "Source List", ""); | |
714 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
715 ················ | |
716 prop= RNA_def_property(srna, "list_title", PROP_FLOAT, PROP_COLO
R_GAMMA); | |
717 RNA_def_property_array(prop, 3); | |
718 RNA_def_property_ui_text(prop, "Source List Title", ""); | |
719 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
720 ················ | |
721 prop= RNA_def_property(srna, "list_text", PROP_FLOAT, PROP_COLOR
_GAMMA); | |
722 RNA_def_property_array(prop, 3); | |
723 RNA_def_property_ui_text(prop, "Source List Text", ""); | |
724 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
725 ················ | |
726 prop= RNA_def_property(srna, "list_text_hi", PROP_FLOAT, PROP_CO
LOR_GAMMA); | |
727 RNA_def_property_array(prop, 3); | |
728 RNA_def_property_ui_text(prop, "Source List Text Highlight", "")
; | |
729 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
730 }······· | |
731 } | |
732 | |
733 static void rna_def_userdef_theme_spaces_vertex(StructRNA *srna) | |
734 { | |
735 PropertyRNA *prop; | |
736 | |
737 prop= RNA_def_property(srna, "vertex", PROP_FLOAT, PROP_COLOR_GAMMA); | |
738 RNA_def_property_array(prop, 3); | |
739 RNA_def_property_ui_text(prop, "Vertex", ""); | |
740 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
741 | |
742 prop= RNA_def_property(srna, "vertex_select", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
743 RNA_def_property_array(prop, 3); | |
744 RNA_def_property_ui_text(prop, "Vertex Select", ""); | |
745 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
746 | |
747 prop= RNA_def_property(srna, "vertex_size", PROP_INT, PROP_NONE); | |
748 RNA_def_property_range(prop, 1, 10); | |
749 RNA_def_property_ui_text(prop, "Vertex Size", ""); | |
750 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
751 } | |
752 | |
753 static void rna_def_userdef_theme_spaces_edge(StructRNA *srna) | |
754 { | |
755 PropertyRNA *prop; | |
756 | |
757 prop= RNA_def_property(srna, "edge_select", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
758 RNA_def_property_array(prop, 3); | |
759 RNA_def_property_ui_text(prop, "Edge Select", ""); | |
760 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
761 | |
762 prop= RNA_def_property(srna, "edge_seam", PROP_FLOAT, PROP_COLOR_GAMMA); | |
763 RNA_def_property_array(prop, 3); | |
764 RNA_def_property_ui_text(prop, "Edge Seam", ""); | |
765 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
766 | |
767 prop= RNA_def_property(srna, "edge_sharp", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
768 RNA_def_property_array(prop, 3); | |
769 RNA_def_property_ui_text(prop, "Edge Sharp", ""); | |
770 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
771 ········ | |
772 prop= RNA_def_property(srna, "edge_crease", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
773 RNA_def_property_array(prop, 3); | |
774 RNA_def_property_ui_text(prop, "Edge Crease", ""); | |
775 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
776 | |
777 prop= RNA_def_property(srna, "edge_facesel", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
778 RNA_def_property_array(prop, 3); | |
779 RNA_def_property_ui_text(prop, "Edge UV Face Select", ""); | |
780 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
781 } | |
782 | |
783 static void rna_def_userdef_theme_spaces_face(StructRNA *srna) | |
784 { | |
785 PropertyRNA *prop; | |
786 | |
787 prop= RNA_def_property(srna, "face", PROP_FLOAT, PROP_COLOR_GAMMA); | |
788 RNA_def_property_array(prop, 4); | |
789 RNA_def_property_ui_text(prop, "Face", ""); | |
790 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
791 | |
792 prop= RNA_def_property(srna, "face_select", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
793 RNA_def_property_array(prop, 4); | |
794 RNA_def_property_ui_text(prop, "Face Selected", ""); | |
795 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
796 | |
797 prop= RNA_def_property(srna, "face_dot", PROP_FLOAT, PROP_COLOR_GAMMA); | |
798 RNA_def_property_array(prop, 3); | |
799 RNA_def_property_ui_text(prop, "Face Dot Selected", ""); | |
800 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
801 | |
802 prop= RNA_def_property(srna, "facedot_size", PROP_INT, PROP_NONE); | |
803 RNA_def_property_range(prop, 1, 10); | |
804 RNA_def_property_ui_text(prop, "Face Dot Size", ""); | |
805 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
806 } | |
807 | |
808 static void rna_def_userdef_theme_spaces_curves(StructRNA *srna, short incl_nurb
s) | |
809 { | |
810 PropertyRNA *prop; | |
811 ········ | |
812 if (incl_nurbs) { | |
813 prop= RNA_def_property(srna, "nurb_uline", PROP_FLOAT, PROP_COLO
R_GAMMA); | |
814 RNA_def_property_float_sdna(prop, NULL, "nurb_uline"); | |
815 RNA_def_property_array(prop, 3); | |
816 RNA_def_property_ui_text(prop, "NURBS U-lines", ""); | |
817 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
818 | |
819 prop= RNA_def_property(srna, "nurb_vline", PROP_FLOAT, PROP_COLO
R_GAMMA); | |
820 RNA_def_property_float_sdna(prop, NULL, "nurb_vline"); | |
821 RNA_def_property_array(prop, 3); | |
822 RNA_def_property_ui_text(prop, "NURBS V-lines", ""); | |
823 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
824 | |
825 prop= RNA_def_property(srna, "nurb_sel_uline", PROP_FLOAT, PROP_
COLOR_GAMMA); | |
826 RNA_def_property_float_sdna(prop, NULL, "nurb_sel_uline"); | |
827 RNA_def_property_array(prop, 3); | |
828 RNA_def_property_ui_text(prop, "NURBS active U-lines", ""); | |
829 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
830 | |
831 prop= RNA_def_property(srna, "nurb_sel_vline", PROP_FLOAT, PROP_
COLOR_GAMMA); | |
832 RNA_def_property_float_sdna(prop, NULL, "nurb_sel_vline"); | |
833 RNA_def_property_array(prop, 3); | |
834 RNA_def_property_ui_text(prop, "NURBS active V-lines", ""); | |
835 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
836 | |
837 prop= RNA_def_property(srna, "act_spline", PROP_FLOAT, PROP_COLO
R_GAMMA); | |
838 RNA_def_property_float_sdna(prop, NULL, "act_spline"); | |
839 RNA_def_property_array(prop, 3); | |
840 RNA_def_property_ui_text(prop, "Active spline", ""); | |
841 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
842 } | |
843 | |
844 prop= RNA_def_property(srna, "handle_free", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
845 RNA_def_property_float_sdna(prop, NULL, "handle_free"); | |
846 RNA_def_property_array(prop, 3); | |
847 RNA_def_property_ui_text(prop, "Free handle color", ""); | |
848 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
849 | |
850 prop= RNA_def_property(srna, "handle_auto", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
851 RNA_def_property_float_sdna(prop, NULL, "handle_auto"); | |
852 RNA_def_property_array(prop, 3); | |
853 RNA_def_property_ui_text(prop, "Auto handle color", ""); | |
854 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
855 | |
856 prop= RNA_def_property(srna, "handle_vect", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
857 RNA_def_property_float_sdna(prop, NULL, "handle_vect"); | |
858 RNA_def_property_array(prop, 3); | |
859 RNA_def_property_ui_text(prop, "Vector handle color", ""); | |
860 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
861 | |
862 prop= RNA_def_property(srna, "handle_align", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
863 RNA_def_property_float_sdna(prop, NULL, "handle_align"); | |
864 RNA_def_property_array(prop, 3); | |
865 RNA_def_property_ui_text(prop, "Align handle color", ""); | |
866 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
867 | |
868 prop= RNA_def_property(srna, "handle_sel_free", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
869 RNA_def_property_float_sdna(prop, NULL, "handle_sel_free"); | |
870 RNA_def_property_array(prop, 3); | |
871 RNA_def_property_ui_text(prop, "Free handle selected color", ""); | |
872 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
873 | |
874 prop= RNA_def_property(srna, "handle_sel_auto", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
875 RNA_def_property_float_sdna(prop, NULL, "handle_sel_auto"); | |
876 RNA_def_property_array(prop, 3); | |
877 RNA_def_property_ui_text(prop, "Auto handle selected color", ""); | |
878 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
879 | |
880 prop= RNA_def_property(srna, "handle_sel_vect", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
881 RNA_def_property_float_sdna(prop, NULL, "handle_sel_vect"); | |
882 RNA_def_property_array(prop, 3); | |
883 RNA_def_property_ui_text(prop, "Vector handle selected color", ""); | |
884 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
885 | |
886 prop= RNA_def_property(srna, "handle_sel_align", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
887 RNA_def_property_float_sdna(prop, NULL, "handle_sel_align"); | |
888 RNA_def_property_array(prop, 3); | |
889 RNA_def_property_ui_text(prop, "Align handle selected color", ""); | |
890 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
891 ········ | |
892 if (incl_nurbs == 0) { | |
893 /* assume that when nurbs are off, this is for 2D (i.e. anim) ed
itors */ | |
894 prop= RNA_def_property(srna, "handle_auto_clamped", PROP_FLOAT,
PROP_COLOR_GAMMA); | |
895 RNA_def_property_float_sdna(prop, NULL, "handle_auto_clamped"); | |
896 RNA_def_property_array(prop, 3); | |
897 RNA_def_property_ui_text(prop, "Auto-Clamped handle color", ""); | |
898 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
899 ················ | |
900 prop= RNA_def_property(srna, "handle_sel_auto_clamped", PROP_FLO
AT, PROP_COLOR_GAMMA); | |
901 RNA_def_property_float_sdna(prop, NULL, "handle_sel_auto_clamped
"); | |
902 RNA_def_property_array(prop, 3); | |
903 RNA_def_property_ui_text(prop, "Auto-Clamped handle selected col
or", ""); | |
904 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
905 } | |
906 | |
907 prop= RNA_def_property(srna, "lastsel_point", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
908 RNA_def_property_float_sdna(prop, NULL, "lastsel_point"); | |
909 RNA_def_property_array(prop, 3); | |
910 RNA_def_property_ui_text(prop, "Last selected point", ""); | |
911 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
912 } | |
913 | |
914 static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna) | |
915 { | 1012 { |
916 StructRNA *srna; | 1013 StructRNA *srna; |
917 PropertyRNA *prop; | 1014 PropertyRNA *prop; |
918 | 1015 |
919 » /* space_view3d */ | 1016 » srna = RNA_def_struct(brna, "ThemeSpaceGeneric", NULL); |
920 | |
921 » srna= RNA_def_struct(brna, "ThemeView3D", NULL); | |
922 RNA_def_struct_sdna(srna, "ThemeSpace"); | 1017 RNA_def_struct_sdna(srna, "ThemeSpace"); |
923 » RNA_def_struct_ui_text(srna, "Theme 3D View", "Theme settings for the 3D
View"); | 1018 » RNA_def_struct_ui_text(srna, "Theme Space Settings", ""); |
924 | 1019 |
925 » rna_def_userdef_theme_spaces_main(srna, SPACE_VIEW3D); | 1020 » /* window */ |
926 | 1021 » prop = RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR_GAMMA); |
927 » prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); | 1022 » RNA_def_property_array(prop, 3); |
928 » RNA_def_property_array(prop, 3); | 1023 » RNA_def_property_ui_text(prop, "Window Background", ""); |
929 » RNA_def_property_ui_text(prop, "Grid", ""); | 1024 » RNA_def_property_update(prop, 0, "rna_userdef_update"); |
930 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | 1025 |
931 | 1026 » prop = RNA_def_property(srna, "title", PROP_FLOAT, PROP_COLOR_GAMMA); |
932 » prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA); | 1027 » RNA_def_property_array(prop, 3); |
933 » RNA_def_property_array(prop, 4); | 1028 » RNA_def_property_ui_text(prop, "Title", ""); |
934 » RNA_def_property_ui_text(prop, "Panel", ""); | 1029 » RNA_def_property_update(prop, 0, "rna_userdef_update"); |
935 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
936 | |
937 » prop= RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR_GAMMA); | |
938 » RNA_def_property_array(prop, 3); | |
939 » RNA_def_property_ui_text(prop, "Wire", ""); | |
940 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
941 | |
942 » prop= RNA_def_property(srna, "lamp", PROP_FLOAT, PROP_COLOR_GAMMA); | |
943 » RNA_def_property_array(prop, 4); | |
944 » RNA_def_property_ui_text(prop, "Lamp", ""); | |
945 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
946 | |
947 » prop= RNA_def_property(srna, "speaker", PROP_FLOAT, PROP_COLOR_GAMMA); | |
948 » RNA_def_property_array(prop, 3); | |
949 » RNA_def_property_ui_text(prop, "Speaker", ""); | |
950 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
951 | |
952 » prop= RNA_def_property(srna, "object_selected", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
953 » RNA_def_property_float_sdna(prop, NULL, "select"); | |
954 » RNA_def_property_array(prop, 3); | |
955 » RNA_def_property_ui_text(prop, "Object Selected", ""); | |
956 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
957 | |
958 » prop= RNA_def_property(srna, "object_active", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
959 » RNA_def_property_float_sdna(prop, NULL, "active"); | |
960 » RNA_def_property_array(prop, 3); | |
961 » RNA_def_property_ui_text(prop, "Active Object", ""); | |
962 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
963 | |
964 » prop= RNA_def_property(srna, "object_grouped", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
965 » RNA_def_property_float_sdna(prop, NULL, "group"); | |
966 » RNA_def_property_array(prop, 3); | |
967 » RNA_def_property_ui_text(prop, "Object Grouped", ""); | |
968 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
969 | |
970 » prop= RNA_def_property(srna, "object_grouped_active", PROP_FLOAT, PROP_C
OLOR_GAMMA); | |
971 » RNA_def_property_float_sdna(prop, NULL, "group_active"); | |
972 » RNA_def_property_array(prop, 3); | |
973 » RNA_def_property_ui_text(prop, "Object Grouped Active", ""); | |
974 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
975 | |
976 » prop= RNA_def_property(srna, "transform", PROP_FLOAT, PROP_COLOR_GAMMA); | |
977 » RNA_def_property_array(prop, 3); | |
978 » RNA_def_property_ui_text(prop, "Transform", ""); | |
979 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
980 »······· | |
981 » rna_def_userdef_theme_spaces_vertex(srna); | |
982 » rna_def_userdef_theme_spaces_edge(srna); | |
983 » rna_def_userdef_theme_spaces_face(srna); | |
984 » rna_def_userdef_theme_spaces_curves(srna, 1); | |
985 | |
986 » prop= RNA_def_property(srna, "extra_edge_len", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
987 » RNA_def_property_array(prop, 3); | |
988 » RNA_def_property_ui_text(prop, "Edge Length Text", ""); | |
989 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
990 | |
991 » prop= RNA_def_property(srna, "extra_face_angle", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
992 » RNA_def_property_array(prop, 3); | |
993 » RNA_def_property_ui_text(prop, "Face Angle Text", ""); | |
994 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
995 | |
996 » prop= RNA_def_property(srna, "extra_face_area", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
997 » RNA_def_property_array(prop, 3); | |
998 » RNA_def_property_ui_text(prop, "Face Area Text", ""); | |
999 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1000 | |
1001 » prop= RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
1002 » RNA_def_property_array(prop, 4); | |
1003 » RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", ""); | |
1004 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1005 | |
1006 » prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1007 » RNA_def_property_array(prop, 3); | |
1008 » RNA_def_property_ui_text(prop, "Face Normal", ""); | |
1009 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1010 | |
1011 » prop= RNA_def_property(srna, "vertex_normal", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1012 » RNA_def_property_array(prop, 3); | |
1013 » RNA_def_property_ui_text(prop, "Vertex Normal", ""); | |
1014 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1015 | |
1016 » prop= RNA_def_property(srna, "bone_solid", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
1017 » RNA_def_property_array(prop, 3); | |
1018 » RNA_def_property_ui_text(prop, "Bone Solid", ""); | |
1019 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1020 | |
1021 » prop= RNA_def_property(srna, "bone_pose", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1022 » RNA_def_property_array(prop, 3); | |
1023 » RNA_def_property_ui_text(prop, "Bone Pose", ""); | |
1024 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1025 | |
1026 » prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1027 » RNA_def_property_float_sdna(prop, NULL, "cframe"); | |
1028 » RNA_def_property_array(prop, 3); | |
1029 » RNA_def_property_ui_text(prop, "Current Frame", ""); | |
1030 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1031 | |
1032 » prop= RNA_def_property(srna, "outline_width", PROP_INT, PROP_NONE); | |
1033 RNA_def_property_range(prop, 1, 5); | 1030 RNA_def_property_range(prop, 1, 5); |
1034 RNA_def_property_ui_text(prop, "Outline Width", ""); | 1031 RNA_def_property_ui_text(prop, "Outline Width", ""); |
1035 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 1032 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
1036 | 1033 } |
1037 » prop= RNA_def_property(srna, "bundle_solid", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1038 » RNA_def_property_float_sdna(prop, NULL, "bundle_solid"); | |
1039 » RNA_def_property_array(prop, 3); | |
1040 » RNA_def_property_ui_text(prop, "Bundle Solid", ""); | |
1041 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1042 | |
1043 » prop= RNA_def_property(srna, "camera_path", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1044 » RNA_def_property_float_sdna(prop, NULL, "camera_path"); | |
1045 » RNA_def_property_array(prop, 3); | |
1046 » RNA_def_property_ui_text(prop, "Camera Path", ""); | |
1047 » RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1048 } | |
1049 | |
1050 | 1034 |
1051 static void rna_def_userdef_theme_space_graph(BlenderRNA *brna) | 1035 static void rna_def_userdef_theme_space_graph(BlenderRNA *brna) |
1052 { | 1036 { |
1053 StructRNA *srna; | 1037 StructRNA *srna; |
1054 PropertyRNA *prop; | |
1055 | |
1056 /* space_graph */ | |
1057 | |
1058 srna= RNA_def_struct(brna, "ThemeGraphEditor", NULL); | |
1059 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1060 RNA_def_struct_ui_text(srna, "Theme Graph Editor", "Theme settings for t
he graph editor"); | |
1061 | |
1062 rna_def_userdef_theme_spaces_main(srna, SPACE_IPO); | |
1063 | |
1064 prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1065 RNA_def_property_array(prop, 3); | |
1066 RNA_def_property_ui_text(prop, "Grid", ""); | |
1067 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1068 | |
1069 prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1070 RNA_def_property_array(prop, 3); | |
1071 RNA_def_property_ui_text(prop, "Panel", ""); | |
1072 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1073 | |
1074 prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1075 RNA_def_property_float_sdna(prop, NULL, "shade1"); | |
1076 RNA_def_property_array(prop, 3); | |
1077 RNA_def_property_ui_text(prop, "Window Sliders", ""); | |
1078 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1079 | |
1080 prop= RNA_def_property(srna, "channels_region", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
1081 RNA_def_property_float_sdna(prop, NULL, "shade2"); | |
1082 RNA_def_property_array(prop, 3); | |
1083 RNA_def_property_ui_text(prop, "Channels Region", ""); | |
1084 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1085 ········ | |
1086 rna_def_userdef_theme_spaces_vertex(srna); | |
1087 rna_def_userdef_theme_spaces_curves(srna, 0); | |
1088 | |
1089 prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1090 RNA_def_property_float_sdna(prop, NULL, "cframe"); | |
1091 RNA_def_property_array(prop, 3); | |
1092 RNA_def_property_ui_text(prop, "Current Frame", ""); | |
1093 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1094 | |
1095 prop= RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1096 RNA_def_property_array(prop, 3); | |
1097 RNA_def_property_ui_text(prop, "Handle Vertex", ""); | |
1098 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1099 | |
1100 prop= RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_CO
LOR_GAMMA); | |
1101 RNA_def_property_array(prop, 3); | |
1102 RNA_def_property_ui_text(prop, "Handle Vertex Select", ""); | |
1103 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1104 | |
1105 prop= RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_NONE); | |
1106 RNA_def_property_range(prop, 0, 255); | |
1107 RNA_def_property_ui_text(prop, "Handle Vertex Size", ""); | |
1108 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1109 ········ | |
1110 prop= RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1111 RNA_def_property_float_sdna(prop, NULL, "group"); | |
1112 RNA_def_property_array(prop, 3); | |
1113 RNA_def_property_ui_text(prop, "Channel Group", ""); | |
1114 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1115 | |
1116 prop= RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_C
OLOR_GAMMA); | |
1117 RNA_def_property_float_sdna(prop, NULL, "group_active"); | |
1118 RNA_def_property_array(prop, 3); | |
1119 RNA_def_property_ui_text(prop, "Active Channel Group", ""); | |
1120 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1121 ········ | |
1122 prop= RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR
_GAMMA); | |
1123 RNA_def_property_float_sdna(prop, NULL, "ds_channel"); | |
1124 RNA_def_property_array(prop, 3); | |
1125 RNA_def_property_ui_text(prop, "DopeSheet Channel", ""); | |
1126 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1127 ········ | |
1128 prop= RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_CO
LOR_GAMMA); | |
1129 RNA_def_property_float_sdna(prop, NULL, "ds_subchannel"); | |
1130 RNA_def_property_array(prop, 3); | |
1131 RNA_def_property_ui_text(prop, "DopeSheet Sub-Channel", ""); | |
1132 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1133 } | |
1134 | |
1135 static void rna_def_userdef_theme_space_file(BlenderRNA *brna) | |
1136 { | |
1137 StructRNA *srna; | |
1138 PropertyRNA *prop; | |
1139 | |
1140 /* space_file */ | |
1141 | |
1142 srna= RNA_def_struct(brna, "ThemeFileBrowser", NULL); | |
1143 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1144 RNA_def_struct_ui_text(srna, "Theme File Browser", "Theme settings for t
he File Browser"); | |
1145 | |
1146 rna_def_userdef_theme_spaces_main(srna, SPACE_FILE); | |
1147 | |
1148 prop= RNA_def_property(srna, "selected_file", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1149 RNA_def_property_float_sdna(prop, NULL, "hilite"); | |
1150 RNA_def_property_array(prop, 3); | |
1151 RNA_def_property_ui_text(prop, "Selected File", ""); | |
1152 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1153 | |
1154 prop= RNA_def_property(srna, "tiles", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1155 RNA_def_property_float_sdna(prop, NULL, "panel"); | |
1156 RNA_def_property_array(prop, 3); | |
1157 RNA_def_property_ui_text(prop, "Tiles", ""); | |
1158 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1159 | |
1160 prop= RNA_def_property(srna, "scrollbar", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1161 RNA_def_property_float_sdna(prop, NULL, "shade1"); | |
1162 RNA_def_property_array(prop, 3); | |
1163 RNA_def_property_ui_text(prop, "Scrollbar", ""); | |
1164 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1165 | |
1166 prop= RNA_def_property(srna, "scroll_handle", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1167 RNA_def_property_float_sdna(prop, NULL, "shade2"); | |
1168 RNA_def_property_array(prop, 3); | |
1169 RNA_def_property_ui_text(prop, "Scroll Handle", ""); | |
1170 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1171 | |
1172 prop= RNA_def_property(srna, "active_file", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1173 RNA_def_property_float_sdna(prop, NULL, "active"); | |
1174 RNA_def_property_array(prop, 3); | |
1175 RNA_def_property_ui_text(prop, "Active File", ""); | |
1176 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1177 ········ | |
1178 prop= RNA_def_property(srna, "active_file_text", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
1179 RNA_def_property_float_sdna(prop, NULL, "grid"); | |
1180 RNA_def_property_array(prop, 3); | |
1181 RNA_def_property_ui_text(prop, "Active File Text", ""); | |
1182 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1183 } | |
1184 | |
1185 static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna) | |
1186 { | |
1187 StructRNA *srna; | |
1188 | |
1189 /* space_outliner */ | |
1190 | |
1191 srna= RNA_def_struct(brna, "ThemeOutliner", NULL); | |
1192 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1193 RNA_def_struct_ui_text(srna, "Theme Outliner", "Theme settings for the O
utliner"); | |
1194 | |
1195 rna_def_userdef_theme_spaces_main(srna, SPACE_OUTLINER); | |
1196 } | |
1197 | |
1198 static void rna_def_userdef_theme_space_userpref(BlenderRNA *brna) | |
1199 { | |
1200 StructRNA *srna; | |
1201 | |
1202 /* space_userpref */ | |
1203 | |
1204 srna= RNA_def_struct(brna, "ThemeUserPreferences", NULL); | |
1205 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1206 RNA_def_struct_ui_text(srna, "Theme User Preferences", "Theme settings f
or the User Preferences"); | |
1207 | |
1208 rna_def_userdef_theme_spaces_main(srna, SPACE_USERPREF); | |
1209 } | |
1210 | |
1211 static void rna_def_userdef_theme_space_console(BlenderRNA *brna) | |
1212 { | |
1213 StructRNA *srna; | |
1214 PropertyRNA *prop; | |
1215 | |
1216 /* space_console */ | |
1217 | |
1218 srna= RNA_def_struct(brna, "ThemeConsole", NULL); | |
1219 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1220 RNA_def_struct_ui_text(srna, "Theme Console", "Theme settings for the Co
nsole"); | |
1221 ········ | |
1222 rna_def_userdef_theme_spaces_main(srna, SPACE_CONSOLE); | |
1223 ········ | |
1224 prop= RNA_def_property(srna, "line_output", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1225 RNA_def_property_float_sdna(prop, NULL, "console_output"); | |
1226 RNA_def_property_array(prop, 3); | |
1227 RNA_def_property_ui_text(prop, "Line Output", ""); | |
1228 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1229 ········ | |
1230 prop= RNA_def_property(srna, "line_input", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
1231 RNA_def_property_float_sdna(prop, NULL, "console_input"); | |
1232 RNA_def_property_array(prop, 3); | |
1233 RNA_def_property_ui_text(prop, "Line Input", ""); | |
1234 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1235 ········ | |
1236 prop= RNA_def_property(srna, "line_info", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1237 RNA_def_property_float_sdna(prop, NULL, "console_info"); | |
1238 RNA_def_property_array(prop, 3); | |
1239 RNA_def_property_ui_text(prop, "Line Info", ""); | |
1240 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1241 ········ | |
1242 prop= RNA_def_property(srna, "line_error", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
1243 RNA_def_property_float_sdna(prop, NULL, "console_error"); | |
1244 RNA_def_property_array(prop, 3); | |
1245 RNA_def_property_ui_text(prop, "Line Error", ""); | |
1246 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1247 ········ | |
1248 prop= RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1249 RNA_def_property_float_sdna(prop, NULL, "console_cursor"); | |
1250 RNA_def_property_array(prop, 3); | |
1251 RNA_def_property_ui_text(prop, "Cursor", ""); | |
1252 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1253 } | |
1254 | |
1255 static void rna_def_userdef_theme_space_info(BlenderRNA *brna) | |
1256 { | |
1257 StructRNA *srna; | |
1258 | |
1259 /* space_info */ | |
1260 | |
1261 srna= RNA_def_struct(brna, "ThemeInfo", NULL); | |
1262 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1263 RNA_def_struct_ui_text(srna, "Theme Info", "Theme settings for Info"); | |
1264 | |
1265 rna_def_userdef_theme_spaces_main(srna, SPACE_INFO); | |
1266 } | |
1267 | |
1268 | |
1269 static void rna_def_userdef_theme_space_text(BlenderRNA *brna) | |
1270 { | |
1271 StructRNA *srna; | |
1272 PropertyRNA *prop; | |
1273 | |
1274 /* space_text */ | |
1275 | |
1276 srna= RNA_def_struct(brna, "ThemeTextEditor", NULL); | |
1277 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1278 RNA_def_struct_ui_text(srna, "Theme Text Editor", "Theme settings for th
e Text Editor"); | |
1279 | |
1280 rna_def_userdef_theme_spaces_main(srna, SPACE_TEXT); | |
1281 | |
1282 prop= RNA_def_property(srna, "line_numbers_background", PROP_FLOAT, PROP
_COLOR_GAMMA); | |
1283 RNA_def_property_float_sdna(prop, NULL, "grid"); | |
1284 RNA_def_property_array(prop, 3); | |
1285 RNA_def_property_ui_text(prop, "Line Numbers Background", ""); | |
1286 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1287 | |
1288 prop= RNA_def_property(srna, "scroll_bar", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
1289 RNA_def_property_float_sdna(prop, NULL, "shade1"); | |
1290 RNA_def_property_array(prop, 3); | |
1291 RNA_def_property_ui_text(prop, "Scroll Bar", ""); | |
1292 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1293 | |
1294 prop= RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1295 RNA_def_property_float_sdna(prop, NULL, "shade2"); | |
1296 RNA_def_property_array(prop, 3); | |
1297 RNA_def_property_ui_text(prop, "Selected Text", ""); | |
1298 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1299 | |
1300 prop= RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1301 RNA_def_property_float_sdna(prop, NULL, "hilite"); | |
1302 RNA_def_property_array(prop, 3); | |
1303 RNA_def_property_ui_text(prop, "Cursor", ""); | |
1304 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1305 ········ | |
1306 prop= RNA_def_property(srna, "syntax_builtin", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1307 RNA_def_property_float_sdna(prop, NULL, "syntaxb"); | |
1308 RNA_def_property_array(prop, 3); | |
1309 RNA_def_property_ui_text(prop, "Syntax Built-in", ""); | |
1310 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1311 ········ | |
1312 prop= RNA_def_property(srna, "syntax_special", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1313 RNA_def_property_float_sdna(prop, NULL, "syntaxv"); | |
1314 RNA_def_property_array(prop, 3); | |
1315 RNA_def_property_ui_text(prop, "Syntax Special", ""); | |
1316 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1317 | |
1318 prop= RNA_def_property(srna, "syntax_comment", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1319 RNA_def_property_float_sdna(prop, NULL, "syntaxc"); | |
1320 RNA_def_property_array(prop, 3); | |
1321 RNA_def_property_ui_text(prop, "Syntax Comment", ""); | |
1322 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1323 ········ | |
1324 prop= RNA_def_property(srna, "syntax_string", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1325 RNA_def_property_float_sdna(prop, NULL, "syntaxl"); | |
1326 RNA_def_property_array(prop, 3); | |
1327 RNA_def_property_ui_text(prop, "Syntax String", ""); | |
1328 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1329 | |
1330 prop= RNA_def_property(srna, "syntax_numbers", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1331 RNA_def_property_float_sdna(prop, NULL, "syntaxn"); | |
1332 RNA_def_property_array(prop, 3); | |
1333 RNA_def_property_ui_text(prop, "Syntax Numbers", ""); | |
1334 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1335 } | |
1336 | |
1337 static void rna_def_userdef_theme_space_node(BlenderRNA *brna) | |
1338 { | |
1339 StructRNA *srna; | |
1340 PropertyRNA *prop; | |
1341 | |
1342 /* space_node */ | |
1343 | |
1344 srna= RNA_def_struct(brna, "ThemeNodeEditor", NULL); | |
1345 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1346 RNA_def_struct_ui_text(srna, "Theme Node Editor", "Theme settings for th
e Node Editor"); | |
1347 | |
1348 rna_def_userdef_theme_spaces_main(srna, SPACE_NODE); | |
1349 | |
1350 prop= RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1351 RNA_def_property_float_sdna(prop, NULL, "wire"); | |
1352 RNA_def_property_array(prop, 3); | |
1353 RNA_def_property_ui_text(prop, "Wires", ""); | |
1354 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1355 | |
1356 prop= RNA_def_property(srna, "wire_select", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1357 RNA_def_property_float_sdna(prop, NULL, "edge_select"); | |
1358 RNA_def_property_array(prop, 3); | |
1359 RNA_def_property_ui_text(prop, "Wire Select", ""); | |
1360 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1361 | |
1362 prop= RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1363 RNA_def_property_float_sdna(prop, NULL, "shade2"); | |
1364 RNA_def_property_array(prop, 3); | |
1365 RNA_def_property_ui_text(prop, "Selected Text", ""); | |
1366 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1367 | |
1368 prop= RNA_def_property(srna, "node_backdrop", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1369 RNA_def_property_float_sdna(prop, NULL, "syntaxl"); | |
1370 RNA_def_property_array(prop, 4); | |
1371 RNA_def_property_ui_text(prop, "Node Backdrop", ""); | |
1372 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1373 ········ | |
1374 prop= RNA_def_property(srna, "in_out_node", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1375 RNA_def_property_float_sdna(prop, NULL, "syntaxn"); | |
1376 RNA_def_property_array(prop, 3); | |
1377 RNA_def_property_ui_text(prop, "In/Out Node", ""); | |
1378 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1379 | |
1380 prop= RNA_def_property(srna, "converter_node", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1381 RNA_def_property_float_sdna(prop, NULL, "syntaxv"); | |
1382 RNA_def_property_array(prop, 3); | |
1383 RNA_def_property_ui_text(prop, "Converter Node", ""); | |
1384 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1385 ········ | |
1386 prop= RNA_def_property(srna, "operator_node", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1387 RNA_def_property_float_sdna(prop, NULL, "syntaxb"); | |
1388 RNA_def_property_array(prop, 3); | |
1389 RNA_def_property_ui_text(prop, "Operator Node", ""); | |
1390 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1391 | |
1392 prop= RNA_def_property(srna, "group_node", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
1393 RNA_def_property_float_sdna(prop, NULL, "syntaxc"); | |
1394 RNA_def_property_array(prop, 3); | |
1395 RNA_def_property_ui_text(prop, "Group Node", ""); | |
1396 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1397 | |
1398 prop= RNA_def_property(srna, "noodle_curving", PROP_INT, PROP_NONE); | |
1399 RNA_def_property_int_sdna(prop, NULL, "noodle_curving"); | |
1400 RNA_def_property_int_default(prop, 5); | |
1401 RNA_def_property_range(prop, 0, 10); | |
1402 RNA_def_property_ui_text(prop, "Noodle curving", "Curving of the noodle"
); | |
1403 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1404 } | |
1405 | |
1406 static void rna_def_userdef_theme_space_logic(BlenderRNA *brna) | |
1407 { | |
1408 StructRNA *srna; | |
1409 PropertyRNA *prop; | |
1410 ········ | |
1411 /* space_buts */ | |
1412 ········ | |
1413 srna= RNA_def_struct(brna, "ThemeLogicEditor", NULL); | |
1414 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1415 RNA_def_struct_ui_text(srna, "Theme Logic Editor", "Theme settings for t
he Logic Editor"); | |
1416 ········ | |
1417 rna_def_userdef_theme_spaces_main(srna, SPACE_LOGIC); | |
1418 ········ | |
1419 prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1420 RNA_def_property_array(prop, 3); | |
1421 RNA_def_property_ui_text(prop, "Panel", ""); | |
1422 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1423 } | |
1424 | |
1425 | |
1426 static void rna_def_userdef_theme_space_buts(BlenderRNA *brna) | |
1427 { | |
1428 StructRNA *srna; | |
1429 PropertyRNA *prop; | |
1430 | |
1431 /* space_buts */ | |
1432 | |
1433 srna= RNA_def_struct(brna, "ThemeProperties", NULL); | |
1434 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1435 RNA_def_struct_ui_text(srna, "Theme Properties", "Theme settings for the
Properties"); | |
1436 | |
1437 rna_def_userdef_theme_spaces_main(srna, SPACE_BUTS); | |
1438 | |
1439 prop= RNA_def_property(srna, "panel", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1440 RNA_def_property_array(prop, 3); | |
1441 RNA_def_property_ui_text(prop, "Panel", ""); | |
1442 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1443 } | |
1444 | |
1445 static void rna_def_userdef_theme_space_time(BlenderRNA *brna) | |
1446 { | |
1447 StructRNA *srna; | |
1448 PropertyRNA *prop; | |
1449 | |
1450 /* space_time */ | |
1451 | |
1452 srna= RNA_def_struct(brna, "ThemeTimeline", NULL); | |
1453 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1454 RNA_def_struct_ui_text(srna, "Theme Timeline", "Theme settings for the T
imeline"); | |
1455 | |
1456 rna_def_userdef_theme_spaces_main(srna, SPACE_TIME); | |
1457 | |
1458 prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1459 RNA_def_property_array(prop, 3); | |
1460 RNA_def_property_ui_text(prop, "Grid", ""); | |
1461 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1462 | |
1463 prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1464 RNA_def_property_float_sdna(prop, NULL, "cframe"); | |
1465 RNA_def_property_array(prop, 3); | |
1466 RNA_def_property_ui_text(prop, "Current Frame", ""); | |
1467 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1468 } | |
1469 | |
1470 static void rna_def_userdef_theme_space_sound(BlenderRNA *brna) | |
1471 { | |
1472 StructRNA *srna; | |
1473 PropertyRNA *prop; | |
1474 | |
1475 /* space_sound */ | |
1476 | |
1477 srna= RNA_def_struct(brna, "ThemeAudioWindow", NULL); | |
1478 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1479 RNA_def_struct_ui_text(srna, "Theme Audio Window", "Theme settings for t
he Audio Window"); | |
1480 | |
1481 rna_def_userdef_theme_spaces_main(srna, SPACE_SOUND); | |
1482 | |
1483 prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1484 RNA_def_property_array(prop, 3); | |
1485 RNA_def_property_ui_text(prop, "Grid", ""); | |
1486 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1487 | |
1488 prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1489 RNA_def_property_float_sdna(prop, NULL, "shade1"); | |
1490 RNA_def_property_array(prop, 3); | |
1491 RNA_def_property_ui_text(prop, "Window Sliders", ""); | |
1492 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1493 | |
1494 prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1495 RNA_def_property_float_sdna(prop, NULL, "cframe"); | |
1496 RNA_def_property_array(prop, 3); | |
1497 RNA_def_property_ui_text(prop, "Current Frame", ""); | |
1498 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1499 } | |
1500 | |
1501 static void rna_def_userdef_theme_space_image(BlenderRNA *brna) | |
1502 { | |
1503 StructRNA *srna; | |
1504 PropertyRNA *prop; | |
1505 | |
1506 /* space_image */ | |
1507 | |
1508 srna= RNA_def_struct(brna, "ThemeImageEditor", NULL); | |
1509 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1510 RNA_def_struct_ui_text(srna, "Theme Image Editor", "Theme settings for t
he Image Editor"); | |
1511 | |
1512 rna_def_userdef_theme_spaces_main(srna, SPACE_IMAGE); | |
1513 rna_def_userdef_theme_spaces_vertex(srna); | |
1514 rna_def_userdef_theme_spaces_face(srna); | |
1515 | |
1516 prop= RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
1517 RNA_def_property_array(prop, 4); | |
1518 RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", ""); | |
1519 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1520 ········ | |
1521 prop= RNA_def_property(srna, "scope_back", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
1522 RNA_def_property_float_sdna(prop, NULL, "preview_back"); | |
1523 RNA_def_property_array(prop, 4); | |
1524 RNA_def_property_ui_text(prop, "Scope region background color", ""); | |
1525 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1526 } | |
1527 | |
1528 static void rna_def_userdef_theme_space_seq(BlenderRNA *brna) | |
1529 { | |
1530 StructRNA *srna; | |
1531 PropertyRNA *prop; | |
1532 | |
1533 /* space_seq */ | |
1534 | |
1535 srna= RNA_def_struct(brna, "ThemeSequenceEditor", NULL); | |
1536 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1537 RNA_def_struct_ui_text(srna, "Theme Sequence Editor", "Theme settings fo
r the Sequence Editor"); | |
1538 | |
1539 rna_def_userdef_theme_spaces_main(srna, SPACE_IMAGE); | |
1540 | |
1541 prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1542 RNA_def_property_array(prop, 3); | |
1543 RNA_def_property_ui_text(prop, "Grid", ""); | |
1544 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1545 | |
1546 prop= RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1547 RNA_def_property_float_sdna(prop, NULL, "shade1"); | |
1548 RNA_def_property_array(prop, 3); | |
1549 RNA_def_property_ui_text(prop, "Window Sliders", ""); | |
1550 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1551 | |
1552 prop= RNA_def_property(srna, "movie_strip", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1553 RNA_def_property_float_sdna(prop, NULL, "movie"); | |
1554 RNA_def_property_array(prop, 3); | |
1555 RNA_def_property_ui_text(prop, "Movie Strip", ""); | |
1556 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1557 | |
1558 prop= RNA_def_property(srna, "image_strip", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1559 RNA_def_property_float_sdna(prop, NULL, "image"); | |
1560 RNA_def_property_array(prop, 3); | |
1561 RNA_def_property_ui_text(prop, "Image Strip", ""); | |
1562 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1563 | |
1564 prop= RNA_def_property(srna, "scene_strip", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1565 RNA_def_property_float_sdna(prop, NULL, "scene"); | |
1566 RNA_def_property_array(prop, 3); | |
1567 RNA_def_property_ui_text(prop, "Scene Strip", ""); | |
1568 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1569 | |
1570 prop= RNA_def_property(srna, "audio_strip", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1571 RNA_def_property_float_sdna(prop, NULL, "audio"); | |
1572 RNA_def_property_array(prop, 3); | |
1573 RNA_def_property_ui_text(prop, "Audio Strip", ""); | |
1574 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1575 | |
1576 prop= RNA_def_property(srna, "effect_strip", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1577 RNA_def_property_float_sdna(prop, NULL, "effect"); | |
1578 RNA_def_property_array(prop, 3); | |
1579 RNA_def_property_ui_text(prop, "Effect Strip", ""); | |
1580 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1581 | |
1582 prop= RNA_def_property(srna, "plugin_strip", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1583 RNA_def_property_float_sdna(prop, NULL, "plugin"); | |
1584 RNA_def_property_array(prop, 3); | |
1585 RNA_def_property_ui_text(prop, "Plugin Strip", ""); | |
1586 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1587 | |
1588 prop= RNA_def_property(srna, "transition_strip", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
1589 RNA_def_property_float_sdna(prop, NULL, "transition"); | |
1590 RNA_def_property_array(prop, 3); | |
1591 RNA_def_property_ui_text(prop, "Transition Strip", ""); | |
1592 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1593 | |
1594 prop= RNA_def_property(srna, "meta_strip", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
1595 RNA_def_property_float_sdna(prop, NULL, "meta"); | |
1596 RNA_def_property_array(prop, 3); | |
1597 RNA_def_property_ui_text(prop, "Meta Strip", ""); | |
1598 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1599 | |
1600 prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1601 RNA_def_property_float_sdna(prop, NULL, "cframe"); | |
1602 RNA_def_property_array(prop, 3); | |
1603 RNA_def_property_ui_text(prop, "Current Frame", ""); | |
1604 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1605 | |
1606 prop= RNA_def_property(srna, "keyframe", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1607 RNA_def_property_float_sdna(prop, NULL, "vertex_select"); | |
1608 RNA_def_property_array(prop, 3); | |
1609 RNA_def_property_ui_text(prop, "Keyframe", ""); | |
1610 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1611 | |
1612 prop= RNA_def_property(srna, "draw_action", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1613 RNA_def_property_float_sdna(prop, NULL, "bone_pose"); | |
1614 RNA_def_property_array(prop, 3); | |
1615 RNA_def_property_ui_text(prop, "Draw Action", ""); | |
1616 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1617 } | |
1618 | |
1619 static void rna_def_userdef_theme_space_action(BlenderRNA *brna) | |
1620 { | |
1621 StructRNA *srna; | |
1622 PropertyRNA *prop; | |
1623 | |
1624 /* space_action */ | |
1625 | |
1626 srna= RNA_def_struct(brna, "ThemeDopeSheet", NULL); | |
1627 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1628 RNA_def_struct_ui_text(srna, "Theme DopeSheet", "Theme settings for the
DopeSheet"); | |
1629 | |
1630 rna_def_userdef_theme_spaces_main(srna, SPACE_ACTION); | |
1631 | |
1632 prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1633 RNA_def_property_array(prop, 3); | |
1634 RNA_def_property_ui_text(prop, "Grid", ""); | |
1635 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1636 | |
1637 prop= RNA_def_property(srna, "value_sliders", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1638 RNA_def_property_float_sdna(prop, NULL, "face"); | |
1639 RNA_def_property_array(prop, 3); | |
1640 RNA_def_property_ui_text(prop, "Value Sliders", ""); | |
1641 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1642 | |
1643 prop= RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1644 RNA_def_property_float_sdna(prop, NULL, "shade1"); | |
1645 RNA_def_property_array(prop, 3); | |
1646 RNA_def_property_ui_text(prop, "View Sliders", ""); | |
1647 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1648 | |
1649 prop= RNA_def_property(srna, "channels", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1650 RNA_def_property_float_sdna(prop, NULL, "shade2"); | |
1651 RNA_def_property_array(prop, 3); | |
1652 RNA_def_property_ui_text(prop, "Channels", ""); | |
1653 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1654 | |
1655 prop= RNA_def_property(srna, "channels_selected", PROP_FLOAT, PROP_COLOR
_GAMMA); | |
1656 RNA_def_property_float_sdna(prop, NULL, "hilite"); | |
1657 RNA_def_property_array(prop, 3); | |
1658 RNA_def_property_ui_text(prop, "Channels Selected", ""); | |
1659 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1660 | |
1661 prop= RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1662 RNA_def_property_float_sdna(prop, NULL, "group"); | |
1663 RNA_def_property_array(prop, 3); | |
1664 RNA_def_property_ui_text(prop, "Channel Group", ""); | |
1665 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1666 | |
1667 prop= RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_C
OLOR_GAMMA); | |
1668 RNA_def_property_float_sdna(prop, NULL, "group_active"); | |
1669 RNA_def_property_array(prop, 3); | |
1670 RNA_def_property_ui_text(prop, "Active Channel Group", ""); | |
1671 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1672 | |
1673 prop= RNA_def_property(srna, "long_key", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1674 RNA_def_property_float_sdna(prop, NULL, "strip"); | |
1675 RNA_def_property_array(prop, 3); | |
1676 RNA_def_property_ui_text(prop, "Long Key", ""); | |
1677 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1678 | |
1679 prop= RNA_def_property(srna, "long_key_selected", PROP_FLOAT, PROP_COLOR
_GAMMA); | |
1680 RNA_def_property_float_sdna(prop, NULL, "strip_select"); | |
1681 RNA_def_property_array(prop, 3); | |
1682 RNA_def_property_ui_text(prop, "Long Key Selected", ""); | |
1683 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1684 | |
1685 prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1686 RNA_def_property_float_sdna(prop, NULL, "cframe"); | |
1687 RNA_def_property_array(prop, 3); | |
1688 RNA_def_property_ui_text(prop, "Current Frame", ""); | |
1689 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1690 ········ | |
1691 prop= RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLOR
_GAMMA); | |
1692 RNA_def_property_float_sdna(prop, NULL, "ds_channel"); | |
1693 RNA_def_property_array(prop, 3); | |
1694 RNA_def_property_ui_text(prop, "DopeSheet Channel", ""); | |
1695 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1696 ········ | |
1697 prop= RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_CO
LOR_GAMMA); | |
1698 RNA_def_property_float_sdna(prop, NULL, "ds_subchannel"); | |
1699 RNA_def_property_array(prop, 3); | |
1700 RNA_def_property_ui_text(prop, "DopeSheet Sub-Channel", ""); | |
1701 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1702 } | |
1703 | |
1704 static void rna_def_userdef_theme_space_nla(BlenderRNA *brna) | |
1705 { | |
1706 StructRNA *srna; | |
1707 PropertyRNA *prop; | |
1708 | |
1709 /* space_nla */ | |
1710 | |
1711 srna= RNA_def_struct(brna, "ThemeNLAEditor", NULL); | |
1712 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1713 RNA_def_struct_ui_text(srna, "Theme NLA Editor", "Theme settings for the
NLA Editor"); | |
1714 | |
1715 rna_def_userdef_theme_spaces_main(srna, SPACE_NLA); | |
1716 | |
1717 prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1718 RNA_def_property_array(prop, 3); | |
1719 RNA_def_property_ui_text(prop, "Grid", ""); | |
1720 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1721 | |
1722 prop= RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1723 RNA_def_property_float_sdna(prop, NULL, "shade1"); | |
1724 RNA_def_property_array(prop, 3); | |
1725 RNA_def_property_ui_text(prop, "View Sliders", ""); | |
1726 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1727 ········ | |
1728 prop= RNA_def_property(srna, "bars", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1729 RNA_def_property_float_sdna(prop, NULL, "shade2"); | |
1730 RNA_def_property_array(prop, 3); | |
1731 RNA_def_property_ui_text(prop, "Bars", ""); | |
1732 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1733 | |
1734 prop= RNA_def_property(srna, "bars_selected", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1735 RNA_def_property_float_sdna(prop, NULL, "hilite"); | |
1736 RNA_def_property_array(prop, 3); | |
1737 RNA_def_property_ui_text(prop, "Bars Selected", ""); | |
1738 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1739 | |
1740 prop= RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1741 RNA_def_property_float_sdna(prop, NULL, "strip"); | |
1742 RNA_def_property_array(prop, 3); | |
1743 RNA_def_property_ui_text(prop, "Strips", ""); | |
1744 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1745 | |
1746 prop= RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
1747 RNA_def_property_float_sdna(prop, NULL, "strip_select"); | |
1748 RNA_def_property_array(prop, 3); | |
1749 RNA_def_property_ui_text(prop, "Strips Selected", ""); | |
1750 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1751 | |
1752 prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1753 RNA_def_property_float_sdna(prop, NULL, "cframe"); | |
1754 RNA_def_property_array(prop, 3); | |
1755 RNA_def_property_ui_text(prop, "Current Frame", ""); | |
1756 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1757 } | |
1758 | |
1759 static void rna_def_userdef_theme_colorset(BlenderRNA *brna) | |
1760 { | |
1761 StructRNA *srna; | |
1762 PropertyRNA *prop; | |
1763 | |
1764 srna= RNA_def_struct(brna, "ThemeBoneColorSet", NULL); | |
1765 RNA_def_struct_sdna(srna, "ThemeWireColor"); | |
1766 RNA_def_struct_ui_text(srna, "Theme Bone Color Set", "Theme settings for
bone color sets"); | |
1767 | |
1768 prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1769 RNA_def_property_float_sdna(prop, NULL, "solid"); | |
1770 RNA_def_property_array(prop, 3); | |
1771 RNA_def_property_ui_text(prop, "Normal", "Color used for the surface of
bones"); | |
1772 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1773 | |
1774 prop= RNA_def_property(srna, "select", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1775 RNA_def_property_float_sdna(prop, NULL, "select"); | |
1776 RNA_def_property_array(prop, 3); | |
1777 RNA_def_property_ui_text(prop, "Select", "Color used for selected bones"
); | |
1778 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1779 | |
1780 prop= RNA_def_property(srna, "active", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1781 RNA_def_property_array(prop, 3); | |
1782 RNA_def_property_ui_text(prop, "Active", "Color used for active bones"); | |
1783 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1784 | |
1785 prop= RNA_def_property(srna, "show_colored_constraints", PROP_BOOLEAN, P
ROP_NONE); | |
1786 RNA_def_property_boolean_sdna(prop, NULL, "flag", TH_WIRECOLOR_CONSTCOLS
); | |
1787 RNA_def_property_ui_text(prop, "Colored Constraints", "Allow the use of
colors indicating constraints/keyed status"); | |
1788 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1789 } | |
1790 | |
1791 static void rna_def_userdef_theme_space_clip(BlenderRNA *brna) | |
1792 { | |
1793 StructRNA *srna; | |
1794 PropertyRNA *prop; | |
1795 | |
1796 /* space_clip */ | |
1797 | |
1798 srna= RNA_def_struct(brna, "ThemeClipEditor", NULL); | |
1799 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1800 RNA_def_struct_ui_text(srna, "Theme Clip Editor", "Theme settings for th
e Movie Clip Editor"); | |
1801 | |
1802 rna_def_userdef_theme_spaces_main(srna, SPACE_CLIP); | |
1803 | |
1804 prop= RNA_def_property(srna, "marker_outline", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1805 RNA_def_property_float_sdna(prop, NULL, "marker_outline"); | |
1806 RNA_def_property_array(prop, 3); | |
1807 RNA_def_property_ui_text(prop, "Marker Outline Color", "Color of marker'
s outile"); | |
1808 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1809 | |
1810 prop= RNA_def_property(srna, "marker", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1811 RNA_def_property_float_sdna(prop, NULL, "marker"); | |
1812 RNA_def_property_array(prop, 3); | |
1813 RNA_def_property_ui_text(prop, "Marker Color", "Color of marker"); | |
1814 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1815 | |
1816 prop= RNA_def_property(srna, "active_marker", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1817 RNA_def_property_float_sdna(prop, NULL, "act_marker"); | |
1818 RNA_def_property_array(prop, 3); | |
1819 RNA_def_property_ui_text(prop, "Active Marker", "Color of active marker"
); | |
1820 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1821 | |
1822 prop= RNA_def_property(srna, "selected_marker", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
1823 RNA_def_property_float_sdna(prop, NULL, "sel_marker"); | |
1824 RNA_def_property_array(prop, 3); | |
1825 RNA_def_property_ui_text(prop, "Selected Marker", "Color of sleected mar
ker"); | |
1826 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1827 | |
1828 prop= RNA_def_property(srna, "disabled_marker", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
1829 RNA_def_property_float_sdna(prop, NULL, "dis_marker"); | |
1830 RNA_def_property_array(prop, 3); | |
1831 RNA_def_property_ui_text(prop, "Disabled Marker", "Color of disabled mar
ker"); | |
1832 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1833 | |
1834 prop= RNA_def_property(srna, "locked_marker", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1835 RNA_def_property_float_sdna(prop, NULL, "lock_marker"); | |
1836 RNA_def_property_array(prop, 3); | |
1837 RNA_def_property_ui_text(prop, "Locked Marker", "Color of locked marker"
); | |
1838 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1839 | |
1840 prop= RNA_def_property(srna, "path_before", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1841 RNA_def_property_float_sdna(prop, NULL, "path_before"); | |
1842 RNA_def_property_array(prop, 3); | |
1843 RNA_def_property_ui_text(prop, "Path Before", "Color of path before curr
ent frame"); | |
1844 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1845 | |
1846 prop= RNA_def_property(srna, "path_after", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
1847 RNA_def_property_float_sdna(prop, NULL, "path_after"); | |
1848 RNA_def_property_array(prop, 3); | |
1849 RNA_def_property_ui_text(prop, "Path After", "Color of path after curren
t frame"); | |
1850 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1851 | |
1852 prop= RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1853 RNA_def_property_array(prop, 3); | |
1854 RNA_def_property_ui_text(prop, "Grid", ""); | |
1855 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1856 | |
1857 prop= RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1858 RNA_def_property_float_sdna(prop, NULL, "cframe"); | |
1859 RNA_def_property_array(prop, 3); | |
1860 RNA_def_property_ui_text(prop, "Current Frame", ""); | |
1861 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1862 } | |
1863 | |
1864 static void rna_def_userdef_themes(BlenderRNA *brna) | |
1865 { | |
1866 StructRNA *srna; | |
1867 PropertyRNA *prop; | |
1868 ········ | |
1869 static EnumPropertyItem active_theme_area[] = { | |
1870 {0, "USER_INTERFACE", ICON_UI, "User Interface", ""}, | |
1871 {18, "BONE_COLOR_SETS", ICON_COLOR, "Bone Color Sets", ""}, | |
1872 {1, "VIEW_3D", ICON_VIEW3D, "3D View", ""}, | |
1873 {2, "TIMELINE", ICON_TIME, "Timeline", ""}, | |
1874 {3, "GRAPH_EDITOR", ICON_IPO, "Graph Editor", ""}, | |
1875 {4, "DOPESHEET_EDITOR", ICON_ACTION, "Dopesheet", ""}, | |
1876 {5, "NLA_EDITOR", ICON_NLA, "NLA Editor", ""}, | |
1877 {6, "IMAGE_EDITOR", ICON_IMAGE_COL, "UV/Image Editor", ""}, | |
1878 {7, "SEQUENCE_EDITOR", ICON_SEQUENCE, "Video Sequence Editor", "
"}, | |
1879 {8, "TEXT_EDITOR", ICON_TEXT, "Text Editor", ""}, | |
1880 {9, "NODE_EDITOR", ICON_NODETREE, "Node Editor", ""}, | |
1881 {10, "LOGIC_EDITOR", ICON_LOGIC, "Logic Editor", ""}, | |
1882 {11, "PROPERTIES", ICON_BUTS, "Properties", ""}, | |
1883 {12, "OUTLINER", ICON_OOPS, "Outliner", ""}, | |
1884 {14, "USER_PREFERENCES", ICON_PREFERENCES, "User Preferences", "
"}, | |
1885 {15, "INFO", ICON_INFO, "Info", ""}, | |
1886 {16, "FILE_BROWSER", ICON_FILESEL, "File Browser", ""}, | |
1887 {17, "CONSOLE", ICON_CONSOLE, "Python Console", ""}, | |
1888 {20, "CLIP_EDITOR", ICON_CLIP, "Movie Clip Editor", ""}, | |
1889 {0, NULL, 0, NULL, NULL}}; | |
1890 | |
1891 srna= RNA_def_struct(brna, "Theme", NULL); | |
1892 RNA_def_struct_sdna(srna, "bTheme"); | |
1893 RNA_def_struct_ui_text(srna, "Theme", "Theme settings defining draw styl
e and colors in the user interface"); | |
1894 | |
1895 prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); | |
1896 RNA_def_property_ui_text(prop, "Name", "Name of the theme"); | |
1897 RNA_def_struct_name_property(srna, prop); | |
1898 | |
1899 prop= RNA_def_property(srna, "theme_area", PROP_ENUM, PROP_NONE); | |
1900 RNA_def_property_enum_sdna(prop, NULL, "active_theme_area"); | |
1901 RNA_def_property_enum_items(prop, active_theme_area); | |
1902 RNA_def_property_ui_text(prop, "Active Theme Area", ""); | |
1903 | |
1904 prop= RNA_def_property(srna, "user_interface", PROP_POINTER, PROP_NONE); | |
1905 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1906 RNA_def_property_pointer_sdna(prop, NULL, "tui"); | |
1907 RNA_def_property_struct_type(prop, "ThemeUserInterface"); | |
1908 RNA_def_property_ui_text(prop, "User Interface", ""); | |
1909 | |
1910 prop= RNA_def_property(srna, "view_3d", PROP_POINTER, PROP_NONE); | |
1911 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1912 RNA_def_property_pointer_sdna(prop, NULL, "tv3d"); | |
1913 RNA_def_property_struct_type(prop, "ThemeView3D"); | |
1914 RNA_def_property_ui_text(prop, "3D View", ""); | |
1915 | |
1916 prop= RNA_def_property(srna, "graph_editor", PROP_POINTER, PROP_NONE); | |
1917 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1918 RNA_def_property_pointer_sdna(prop, NULL, "tipo"); | |
1919 RNA_def_property_struct_type(prop, "ThemeGraphEditor"); | |
1920 RNA_def_property_ui_text(prop, "Graph Editor", ""); | |
1921 | |
1922 prop= RNA_def_property(srna, "file_browser", PROP_POINTER, PROP_NONE); | |
1923 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1924 RNA_def_property_pointer_sdna(prop, NULL, "tfile"); | |
1925 RNA_def_property_struct_type(prop, "ThemeFileBrowser"); | |
1926 RNA_def_property_ui_text(prop, "File Browser", ""); | |
1927 | |
1928 prop= RNA_def_property(srna, "nla_editor", PROP_POINTER, PROP_NONE); | |
1929 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1930 RNA_def_property_pointer_sdna(prop, NULL, "tnla"); | |
1931 RNA_def_property_struct_type(prop, "ThemeNLAEditor"); | |
1932 RNA_def_property_ui_text(prop, "NLA Editor", ""); | |
1933 | |
1934 prop= RNA_def_property(srna, "dopesheet_editor", PROP_POINTER, PROP_NONE
); | |
1935 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1936 RNA_def_property_pointer_sdna(prop, NULL, "tact"); | |
1937 RNA_def_property_struct_type(prop, "ThemeDopeSheet"); | |
1938 RNA_def_property_ui_text(prop, "DopeSheet", ""); | |
1939 | |
1940 prop= RNA_def_property(srna, "image_editor", PROP_POINTER, PROP_NONE); | |
1941 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1942 RNA_def_property_pointer_sdna(prop, NULL, "tima"); | |
1943 RNA_def_property_struct_type(prop, "ThemeImageEditor"); | |
1944 RNA_def_property_ui_text(prop, "Image Editor", ""); | |
1945 | |
1946 prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE)
; | |
1947 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1948 RNA_def_property_pointer_sdna(prop, NULL, "tseq"); | |
1949 RNA_def_property_struct_type(prop, "ThemeSequenceEditor"); | |
1950 RNA_def_property_ui_text(prop, "Sequence Editor", ""); | |
1951 | |
1952 prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE); | |
1953 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1954 RNA_def_property_pointer_sdna(prop, NULL, "tbuts"); | |
1955 RNA_def_property_struct_type(prop, "ThemeProperties"); | |
1956 RNA_def_property_ui_text(prop, "Properties", ""); | |
1957 | |
1958 prop= RNA_def_property(srna, "text_editor", PROP_POINTER, PROP_NONE); | |
1959 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1960 RNA_def_property_pointer_sdna(prop, NULL, "text"); | |
1961 RNA_def_property_struct_type(prop, "ThemeTextEditor"); | |
1962 RNA_def_property_ui_text(prop, "Text Editor", ""); | |
1963 | |
1964 prop= RNA_def_property(srna, "timeline", PROP_POINTER, PROP_NONE); | |
1965 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1966 RNA_def_property_pointer_sdna(prop, NULL, "ttime"); | |
1967 RNA_def_property_struct_type(prop, "ThemeTimeline"); | |
1968 RNA_def_property_ui_text(prop, "Timeline", ""); | |
1969 | |
1970 prop= RNA_def_property(srna, "node_editor", PROP_POINTER, PROP_NONE); | |
1971 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1972 RNA_def_property_pointer_sdna(prop, NULL, "tnode"); | |
1973 RNA_def_property_struct_type(prop, "ThemeNodeEditor"); | |
1974 RNA_def_property_ui_text(prop, "Node Editor", ""); | |
1975 | |
1976 prop= RNA_def_property(srna, "logic_editor", PROP_POINTER, PROP_NONE); | |
1977 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1978 RNA_def_property_pointer_sdna(prop, NULL, "tlogic"); | |
1979 RNA_def_property_struct_type(prop, "ThemeLogicEditor"); | |
1980 RNA_def_property_ui_text(prop, "Logic Editor", ""); | |
1981 ········ | |
1982 prop= RNA_def_property(srna, "outliner", PROP_POINTER, PROP_NONE); | |
1983 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1984 RNA_def_property_pointer_sdna(prop, NULL, "toops"); | |
1985 RNA_def_property_struct_type(prop, "ThemeOutliner"); | |
1986 RNA_def_property_ui_text(prop, "Outliner", ""); | |
1987 | |
1988 prop= RNA_def_property(srna, "info", PROP_POINTER, PROP_NONE); | |
1989 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1990 RNA_def_property_pointer_sdna(prop, NULL, "tinfo"); | |
1991 RNA_def_property_struct_type(prop, "ThemeInfo"); | |
1992 RNA_def_property_ui_text(prop, "Info", ""); | |
1993 | |
1994 prop= RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NONE
); | |
1995 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1996 RNA_def_property_pointer_sdna(prop, NULL, "tuserpref"); | |
1997 RNA_def_property_struct_type(prop, "ThemeUserPreferences"); | |
1998 RNA_def_property_ui_text(prop, "User Preferences", ""); | |
1999 ········ | |
2000 prop= RNA_def_property(srna, "console", PROP_POINTER, PROP_NONE); | |
2001 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2002 RNA_def_property_pointer_sdna(prop, NULL, "tconsole"); | |
2003 RNA_def_property_struct_type(prop, "ThemeConsole"); | |
2004 RNA_def_property_ui_text(prop, "Console", ""); | |
2005 | |
2006 prop= RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_NO
NE); | |
2007 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2008 RNA_def_property_collection_sdna(prop, NULL, "tarm", ""); | |
2009 RNA_def_property_struct_type(prop, "ThemeBoneColorSet"); | |
2010 RNA_def_property_ui_text(prop, "Bone Color Sets", ""); | |
2011 | |
2012 prop= RNA_def_property(srna, "clip_editor", PROP_POINTER, PROP_NONE); | |
2013 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2014 RNA_def_property_pointer_sdna(prop, NULL, "tclip"); | |
2015 RNA_def_property_struct_type(prop, "ThemeClipEditor"); | |
2016 RNA_def_property_ui_text(prop, "Clip Editor", ""); | |
2017 } | |
2018 | |
2019 static void rna_def_userdef_addon(BlenderRNA *brna) | |
2020 { | |
2021 StructRNA *srna; | |
2022 PropertyRNA *prop; | |
2023 | |
2024 srna= RNA_def_struct(brna, "Addon", NULL); | |
2025 RNA_def_struct_sdna(srna, "bAddon"); | |
2026 RNA_def_struct_ui_text(srna, "Addon", "Python addons to be loaded automa
tically"); | |
2027 | |
2028 prop= RNA_def_property(srna, "module", PROP_STRING, PROP_NONE); | |
2029 RNA_def_property_ui_text(prop, "Module", "Module name"); | |
2030 RNA_def_struct_name_property(srna, prop); | |
2031 } | |
2032 | |
2033 | |
2034 static void rna_def_userdef_dothemes(BlenderRNA *brna) | |
2035 { | |
2036 ········ | |
2037 rna_def_userdef_theme_ui_style(brna); | |
2038 rna_def_userdef_theme_ui(brna); | |
2039 ········ | |
2040 rna_def_userdef_theme_space_view3d(brna); | |
2041 rna_def_userdef_theme_space_graph(brna); | |
2042 rna_def_userdef_theme_space_file(brna); | |
2043 rna_def_userdef_theme_space_nla(brna); | |
2044 rna_def_userdef_theme_space_action(brna); | |
2045 rna_def_userdef_theme_space_image(brna); | |
2046 rna_def_userdef_theme_space_seq(brna); | |
2047 rna_def_userdef_theme_space_buts(brna); | |
2048 rna_def_userdef_theme_space_text(brna); | |
2049 rna_def_userdef_theme_space_time(brna); | |
2050 rna_def_userdef_theme_space_node(brna); | |
2051 rna_def_userdef_theme_space_outliner(brna); | |
2052 rna_def_userdef_theme_space_info(brna); | |
2053 rna_def_userdef_theme_space_userpref(brna); | |
2054 rna_def_userdef_theme_space_console(brna); | |
2055 rna_def_userdef_theme_space_sound(brna); | |
2056 rna_def_userdef_theme_space_logic(brna); | |
2057 rna_def_userdef_theme_space_clip(brna); | |
2058 rna_def_userdef_theme_colorset(brna); | |
2059 rna_def_userdef_themes(brna); | |
2060 } | |
2061 | |
2062 static void rna_def_userdef_solidlight(BlenderRNA *brna) | |
2063 { | |
2064 StructRNA *srna; | |
2065 PropertyRNA *prop; | |
2066 static float default_dir[3] = {0.f, 1.f, 0.f}; | |
2067 | |
2068 srna= RNA_def_struct(brna, "UserSolidLight", NULL); | |
2069 RNA_def_struct_sdna(srna, "SolidLight"); | |
2070 RNA_def_struct_ui_text(srna, "Solid Light", "Light used for OpenGL light
ing in solid draw mode"); | |
2071 ········ | |
2072 prop= RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE); | |
2073 RNA_def_property_boolean_sdna(prop, NULL, "flag", 1); | |
2074 RNA_def_property_ui_text(prop, "Enabled", "Enable this OpenGL light in s
olid draw mode"); | |
2075 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update"); | |
2076 | |
2077 prop= RNA_def_property(srna, "direction", PROP_FLOAT, PROP_DIRECTION); | |
2078 RNA_def_property_float_sdna(prop, NULL, "vec"); | |
2079 RNA_def_property_array(prop, 3); | |
2080 RNA_def_property_float_array_default(prop, default_dir); | |
2081 RNA_def_property_ui_text(prop, "Direction", "Direction that the OpenGL l
ight is shining"); | |
2082 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update"); | |
2083 | |
2084 prop= RNA_def_property(srna, "diffuse_color", PROP_FLOAT, PROP_COLOR); | |
2085 RNA_def_property_float_sdna(prop, NULL, "col"); | |
2086 RNA_def_property_array(prop, 3); | |
2087 RNA_def_property_ui_text(prop, "Diffuse Color", "Diffuse color of the Op
enGL light"); | |
2088 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update"); | |
2089 | |
2090 prop= RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR); | |
2091 RNA_def_property_float_sdna(prop, NULL, "spec"); | |
2092 RNA_def_property_array(prop, 3); | |
2093 RNA_def_property_ui_text(prop, "Specular Color", "Color of the light's s
pecular highlight"); | |
2094 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update"); | |
2095 } | |
2096 | |
2097 static void rna_def_userdef_view(BlenderRNA *brna) | |
2098 { | |
2099 static EnumPropertyItem timecode_styles[] = { | |
2100 {USER_TIMECODE_MINIMAL, "MINIMAL", 0, "Minimal Info", | |
2101 "Most compact representation, uses '+' a
s separator for sub-second frame numbers, " | |
2102 "with left and right truncation of the t
imecode as necessary"}, | |
2103 {USER_TIMECODE_SMPTE_FULL, "SMPTE", 0, "SMPTE (Full)", "Full SMP
TE timecode (format is HH:MM:SS:FF)"}, | |
2104 {USER_TIMECODE_SMPTE_MSF, "SMPTE_COMPACT", 0, "SMPTE (Compact)", | |
2105 "SMPTE timecode showing minutes, secon
ds, and frames only - " | |
2106 "hours are also shown if necessary, bu
t not by default"}, | |
2107 {USER_TIMECODE_MILLISECONDS, "MILLISECONDS", 0, "Compact with Mi
lliseconds", | |
2108 "Similar to SMPTE (Compact), except
that instead of frames, " | |
2109 "milliseconds are shown instead"}, | |
2110 {USER_TIMECODE_SECONDS_ONLY, "SECONDS_ONLY", 0, "Only Seconds",
"Direct conversion of frame numbers to seconds"}, | |
2111 {0, NULL, 0, NULL, NULL}}; | |
2112 ········ | |
2113 PropertyRNA *prop; | |
2114 StructRNA *srna; | |
2115 ········ | |
2116 srna= RNA_def_struct(brna, "UserPreferencesView", NULL); | |
2117 RNA_def_struct_sdna(srna, "UserDef"); | |
2118 RNA_def_struct_nested(brna, srna, "UserPreferences"); | |
2119 RNA_def_struct_ui_text(srna, "View & Controls", "Preferences related to
viewing data"); | |
2120 | |
2121 /* View */ | |
2122 | |
2123 /* display */ | |
2124 prop= RNA_def_property(srna, "show_tooltips", PROP_BOOLEAN, PROP_NONE); | |
2125 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TOOLTIPS); | |
2126 RNA_def_property_ui_text(prop, "Tooltips", "Display tooltips"); | |
2127 | |
2128 prop= RNA_def_property(srna, "show_tooltips_python", PROP_BOOLEAN, PROP_
NONE); | |
2129 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TOOLTIPS
_PYTHON); | |
2130 RNA_def_property_ui_text(prop, "Show Python Tooltips", "Show Python refe
rences in tooltips"); | |
2131 | |
2132 prop= RNA_def_property(srna, "show_object_info", PROP_BOOLEAN, PROP_NONE
); | |
2133 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DRAWVIEWINFO); | |
2134 RNA_def_property_ui_text(prop, "Display Object Info", "Display objects n
ame and frame number in 3D view"); | |
2135 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2136 | |
2137 prop= RNA_def_property(srna, "use_global_scene", PROP_BOOLEAN, PROP_NONE
); | |
2138 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SCENEGLOBAL); | |
2139 RNA_def_property_ui_text(prop, "Global Scene", "Force the current Scene
to be displayed in all Screens"); | |
2140 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2141 | |
2142 prop= RNA_def_property(srna, "show_large_cursors", PROP_BOOLEAN, PROP_NO
NE); | |
2143 RNA_def_property_boolean_sdna(prop, NULL, "curssize", 0); | |
2144 RNA_def_property_ui_text(prop, "Large Cursors", "Use large mouse cursors
when available"); | |
2145 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2146 | |
2147 prop= RNA_def_property(srna, "show_view_name", PROP_BOOLEAN, PROP_NONE); | |
2148 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_VIEWPORTNA
ME); | |
2149 RNA_def_property_ui_text(prop, "Show View Name", "Show the name of the v
iew's direction in each 3D View"); | |
2150 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2151 | |
2152 prop= RNA_def_property(srna, "show_splash", PROP_BOOLEAN, PROP_NONE); | |
2153 RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_SPLASH
_DISABLE); | |
2154 RNA_def_property_ui_text(prop, "Show Splash", "Display splash screen on
startup"); | |
2155 | |
2156 prop= RNA_def_property(srna, "show_playback_fps", PROP_BOOLEAN, PROP_NON
E); | |
2157 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_FPS); | |
2158 RNA_def_property_ui_text(prop, "Show Playback FPS", | |
2159 "Show the frames per second screen refresh rate
, while animation is played back"); | |
2160 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2161 ········ | |
2162 /* menus */ | |
2163 prop= RNA_def_property(srna, "use_mouse_over_open", PROP_BOOLEAN, PROP_N
ONE); | |
2164 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MENUOPENAUTO); | |
2165 RNA_def_property_ui_text(prop, "Open On Mouse Over", | |
2166 "Open menu buttons and pulldowns automatically
when the mouse is hovering"); | |
2167 ········ | |
2168 prop= RNA_def_property(srna, "open_toplevel_delay", PROP_INT, PROP_NONE)
; | |
2169 RNA_def_property_int_sdna(prop, NULL, "menuthreshold1"); | |
2170 RNA_def_property_range(prop, 1, 40); | |
2171 RNA_def_property_ui_text(prop, "Top Level Menu Open Delay", | |
2172 "Time delay in 1/10 seconds before automaticall
y opening top level menus"); | |
2173 | |
2174 prop= RNA_def_property(srna, "open_sublevel_delay", PROP_INT, PROP_NONE)
; | |
2175 RNA_def_property_int_sdna(prop, NULL, "menuthreshold2"); | |
2176 RNA_def_property_range(prop, 1, 40); | |
2177 RNA_def_property_ui_text(prop, "Sub Level Menu Open Delay", | |
2178 "Time delay in 1/10 seconds before automaticall
y opening sub level menus"); | |
2179 | |
2180 /* Toolbox click-hold delay */ | |
2181 prop= RNA_def_property(srna, "open_left_mouse_delay", PROP_INT, PROP_NON
E); | |
2182 RNA_def_property_int_sdna(prop, NULL, "tb_leftmouse"); | |
2183 RNA_def_property_range(prop, 1, 40); | |
2184 RNA_def_property_ui_text(prop, "Hold LMB Open Toolbox Delay", | |
2185 "Time in 1/10 seconds to hold the Left Mouse Bu
tton before opening the toolbox"); | |
2186 | |
2187 prop= RNA_def_property(srna, "open_right_mouse_delay", PROP_INT, PROP_NO
NE); | |
2188 RNA_def_property_int_sdna(prop, NULL, "tb_rightmouse"); | |
2189 RNA_def_property_range(prop, 1, 40); | |
2190 RNA_def_property_ui_text(prop, "Hold RMB Open Toolbox Delay", | |
2191 "Time in 1/10 seconds to hold the Right Mouse B
utton before opening the toolbox"); | |
2192 | |
2193 prop= RNA_def_property(srna, "show_column_layout", PROP_BOOLEAN, PROP_NO
NE); | |
2194 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_PLAINMENUS); | |
2195 RNA_def_property_ui_text(prop, "Toolbox Column Layout", "Use a column la
yout for toolbox"); | |
2196 | |
2197 prop= RNA_def_property(srna, "use_directional_menus", PROP_BOOLEAN, PROP
_NONE); | |
2198 RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_MENUFI
XEDORDER); | |
2199 RNA_def_property_ui_text(prop, "Contents Follow Opening Direction", | |
2200 "Otherwise menus, etc will always be top to bot
tom, left to right, no matter opening direction"); | |
2201 | |
2202 prop= RNA_def_property(srna, "use_global_pivot", PROP_BOOLEAN, PROP_NONE
); | |
2203 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCKAROUND); | |
2204 RNA_def_property_ui_text(prop, "Global Pivot", "Lock the same rotation/s
caling pivot in all 3D Views"); | |
2205 | |
2206 prop= RNA_def_property(srna, "use_mouse_auto_depth", PROP_BOOLEAN, PROP_
NONE); | |
2207 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_ZBUF); | |
2208 RNA_def_property_ui_text(prop, "Auto Depth", "Use the depth under the mo
use to improve view pan/rotate/zoom functionality"); | |
2209 | |
2210 prop= RNA_def_property(srna, "use_camera_lock_parent", PROP_BOOLEAN, PRO
P_NONE); | |
2211 RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_CAM_LO
CK_NO_PARENT); | |
2212 RNA_def_property_ui_text(prop, "Camera Parent Lock", | |
2213 "When the camera is locked to the view and in f
ly mode, " | |
2214 "transform the parent rather than the camera"); | |
2215 | |
2216 /* view zoom */ | |
2217 prop= RNA_def_property(srna, "use_zoom_to_mouse", PROP_BOOLEAN, PROP_NON
E); | |
2218 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_TO_MOUSEPO
S); | |
2219 RNA_def_property_ui_text(prop, "Zoom To Mouse Position", | |
2220 "Zoom in towards the mouse pointer's position i
n the 3D view, rather than the 2D window center"); | |
2221 | |
2222 /* view rotation */ | |
2223 prop= RNA_def_property(srna, "use_auto_perspective", PROP_BOOLEAN, PROP_
NONE); | |
2224 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_AUTOPERSP); | |
2225 RNA_def_property_ui_text(prop, "Auto Perspective", | |
2226 "Automatically switch between orthographic and
perspective when changing " | |
2227 "from top/front/side views"); | |
2228 | |
2229 prop= RNA_def_property(srna, "use_rotate_around_active", PROP_BOOLEAN, P
ROP_NONE); | |
2230 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_SELECTION
); | |
2231 RNA_def_property_ui_text(prop, "Rotate Around Selection", "Use selection
as the pivot point"); | |
2232 ········ | |
2233 /* mini axis */ | |
2234 prop= RNA_def_property(srna, "show_mini_axis", PROP_BOOLEAN, PROP_NONE); | |
2235 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_ROTVIEWICO
N); | |
2236 RNA_def_property_ui_text(prop, "Show Mini Axes", "Show a small rotating
3D axes in the bottom left corner of the 3D View"); | |
2237 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2238 | |
2239 prop= RNA_def_property(srna, "mini_axis_size", PROP_INT, PROP_NONE); | |
2240 RNA_def_property_int_sdna(prop, NULL, "rvisize"); | |
2241 RNA_def_property_range(prop, 10, 64); | |
2242 RNA_def_property_ui_text(prop, "Mini Axes Size", "The axes icon's size")
; | |
2243 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2244 | |
2245 prop= RNA_def_property(srna, "mini_axis_brightness", PROP_INT, PROP_NONE
); | |
2246 RNA_def_property_int_sdna(prop, NULL, "rvibright"); | |
2247 RNA_def_property_range(prop, 0, 10); | |
2248 RNA_def_property_ui_text(prop, "Mini Axes Brightness", "Brightness of th
e icon"); | |
2249 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2250 | |
2251 prop= RNA_def_property(srna, "smooth_view", PROP_INT, PROP_NONE); | |
2252 RNA_def_property_int_sdna(prop, NULL, "smooth_viewtx"); | |
2253 RNA_def_property_range(prop, 0, 1000); | |
2254 RNA_def_property_ui_text(prop, "Smooth View", "Time to animate the view
in milliseconds, zero to disable"); | |
2255 | |
2256 prop= RNA_def_property(srna, "rotation_angle", PROP_INT, PROP_NONE); | |
2257 RNA_def_property_int_sdna(prop, NULL, "pad_rot_angle"); | |
2258 RNA_def_property_range(prop, 0, 90); | |
2259 RNA_def_property_ui_text(prop, "Rotation Angle", "Rotation step for nume
rical pad keys (2 4 6 8)"); | |
2260 | |
2261 /* 3D transform widget */ | |
2262 prop= RNA_def_property(srna, "show_manipulator", PROP_BOOLEAN, PROP_NONE
); | |
2263 RNA_def_property_boolean_sdna(prop, NULL, "tw_flag", V3D_USE_MANIPULATOR
); | |
2264 RNA_def_property_ui_text(prop, "Manipulator", "Use 3D transform manipula
tor"); | |
2265 RNA_def_property_update(prop, 0, "rna_userdef_show_manipulator_update"); | |
2266 | |
2267 prop= RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_NONE); | |
2268 RNA_def_property_int_sdna(prop, NULL, "tw_size"); | |
2269 RNA_def_property_range(prop, 2, 40); | |
2270 RNA_def_property_int_default(prop, 15); | |
2271 RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of widget,
in 10 pixel units"); | |
2272 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2273 | |
2274 prop= RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_N
ONE); | |
2275 RNA_def_property_int_sdna(prop, NULL, "tw_handlesize"); | |
2276 RNA_def_property_range(prop, 2, 40); | |
2277 RNA_def_property_int_default(prop, 25); | |
2278 RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of widge
t handles as percentage of widget radius"); | |
2279 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2280 | |
2281 prop= RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_NONE)
; | |
2282 RNA_def_property_int_sdna(prop, NULL, "tw_hotspot"); | |
2283 RNA_def_property_range(prop, 4, 40); | |
2284 RNA_def_property_int_default(prop, 14); | |
2285 RNA_def_property_ui_text(prop, "Manipulator Hotspot", "Pixel distance ar
ound the handles to accept mouse clicks"); | |
2286 | |
2287 prop= RNA_def_property(srna, "object_origin_size", PROP_INT, PROP_NONE); | |
2288 RNA_def_property_int_sdna(prop, NULL, "obcenter_dia"); | |
2289 RNA_def_property_range(prop, 4, 10); | |
2290 RNA_def_property_ui_text(prop, "Object Origin Size", "Diameter in Pixels
for Object/Lamp origin display"); | |
2291 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2292 ········ | |
2293 /* View2D Grid Displays */ | |
2294 prop= RNA_def_property(srna, "view2d_grid_spacing_min", PROP_INT, PROP_N
ONE); | |
2295 RNA_def_property_int_sdna(prop, NULL, "v2d_min_gridsize"); | |
2296 RNA_def_property_range(prop, 1, 500); // XXX: perhaps the lower range sh
ould only go down to 5? | |
2297 RNA_def_property_ui_text(prop, "2D View Minimum Grid Spacing", | |
2298 "Minimum number of pixels between each gridline
in 2D Viewports"); | |
2299 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2300 ········ | |
2301 // TODO: add a setter for this, so that we can bump up the minim
um size as necessary... | |
2302 prop= RNA_def_property(srna, "timecode_style", PROP_ENUM, PROP_NONE); | |
2303 RNA_def_property_enum_items(prop, timecode_styles); | |
2304 RNA_def_property_enum_sdna(prop, NULL, "timecode_style"); | |
2305 RNA_def_property_enum_funcs(prop, NULL, "rna_userdef_timecode_style_set"
, NULL); | |
2306 RNA_def_property_ui_text(prop, "TimeCode Style", | |
2307 "Format of Time Codes displayed when not displa
ying timing in terms of frames"); | |
2308 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2309 } | |
2310 | |
2311 static void rna_def_userdef_edit(BlenderRNA *brna) | |
2312 { | |
2313 PropertyRNA *prop; | |
2314 StructRNA *srna; | |
2315 | |
2316 static EnumPropertyItem auto_key_modes[] = { | |
2317 {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add/Replace", ""}, | |
2318 {AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""}, | |
2319 {0, NULL, 0, NULL, NULL}}; | |
2320 ················ | |
2321 static const EnumPropertyItem material_link_items[]= { | |
2322 {0, "OBDATA", 0, "ObData", "Toggle whether the material is linke
d to object data or the object block"}, | |
2323 {USER_MAT_ON_OB, "OBJECT", 0, "Object", "Toggle whether the mate
rial is linked to object data or the object block"}, | |
2324 {0, NULL, 0, NULL, NULL}}; | |
2325 ················ | |
2326 static const EnumPropertyItem object_align_items[]= { | |
2327 {0, "WORLD", 0, "World", "Align newly added objects to the world
coordinate system"}, | |
2328 {USER_ADD_VIEWALIGNED, "VIEW", 0, "View", "Align newly added obj
ects facing the active 3D View direction"}, | |
2329 {0, NULL, 0, NULL, NULL}}; | |
2330 | |
2331 srna= RNA_def_struct(brna, "UserPreferencesEdit", NULL); | |
2332 RNA_def_struct_sdna(srna, "UserDef"); | |
2333 RNA_def_struct_nested(brna, srna, "UserPreferences"); | |
2334 RNA_def_struct_ui_text(srna, "Edit Methods", "Settings for interacting w
ith Blender data"); | |
2335 ········ | |
2336 /* Edit Methods */ | |
2337 ········ | |
2338 prop= RNA_def_property(srna, "material_link", PROP_ENUM, PROP_NONE); | |
2339 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | |
2340 RNA_def_property_enum_items(prop, material_link_items); | |
2341 RNA_def_property_ui_text(prop, "Material Link To", | |
2342 "Toggle whether the material is linked to objec
t data or the object block"); | |
2343 ········ | |
2344 prop= RNA_def_property(srna, "object_align", PROP_ENUM, PROP_NONE); | |
2345 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | |
2346 RNA_def_property_enum_items(prop, object_align_items); | |
2347 RNA_def_property_ui_text(prop, "Align Object To", | |
2348 "When adding objects from a 3D View menu, eithe
r align them with that view or with the world"); | |
2349 | |
2350 prop= RNA_def_property(srna, "use_enter_edit_mode", PROP_BOOLEAN, PROP_N
ONE); | |
2351 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ADD_EDITMODE); | |
2352 RNA_def_property_ui_text(prop, "Enter Edit Mode", "Enter Edit Mode autom
atically after adding a new object"); | |
2353 | |
2354 prop= RNA_def_property(srna, "use_drag_immediately", PROP_BOOLEAN, PROP_
NONE); | |
2355 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELEASECONFIRM); | |
2356 RNA_def_property_ui_text(prop, "Release confirms", "Moving things with a
mouse drag confirms when releasing the button"); | |
2357 ········ | |
2358 /* Undo */ | |
2359 prop= RNA_def_property(srna, "undo_steps", PROP_INT, PROP_NONE); | |
2360 RNA_def_property_int_sdna(prop, NULL, "undosteps"); | |
2361 RNA_def_property_range(prop, 0, 64); | |
2362 RNA_def_property_ui_text(prop, "Undo Steps", "Number of undo steps avail
able (smaller values conserve memory)"); | |
2363 | |
2364 prop= RNA_def_property(srna, "undo_memory_limit", PROP_INT, PROP_NONE); | |
2365 RNA_def_property_int_sdna(prop, NULL, "undomemory"); | |
2366 RNA_def_property_range(prop, 0, 32767); | |
2367 RNA_def_property_ui_text(prop, "Undo Memory Size", "Maximum memory usage
in megabytes (0 means unlimited)"); | |
2368 | |
2369 prop= RNA_def_property(srna, "use_global_undo", PROP_BOOLEAN, PROP_NONE)
; | |
2370 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_GLOBALUNDO); | |
2371 RNA_def_property_ui_text(prop, "Global Undo", | |
2372 "Global undo works by keeping a full copy of th
e file itself in memory, so takes extra memory"); | |
2373 | |
2374 /* auto keyframing */··· | |
2375 prop= RNA_def_property(srna, "use_auto_keying", PROP_BOOLEAN, PROP_NONE)
; | |
2376 RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON); | |
2377 RNA_def_property_ui_text(prop, "Auto Keying Enable", | |
2378 "Automatic keyframe insertion for Objects and B
ones (default setting used for new Scenes)"); | |
2379 RNA_def_property_ui_icon(prop, ICON_REC, 0); | |
2380 | |
2381 prop= RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE); | |
2382 RNA_def_property_enum_items(prop, auto_key_modes); | |
2383 RNA_def_property_enum_funcs(prop, "rna_userdef_autokeymode_get", "rna_us
erdef_autokeymode_set", NULL); | |
2384 RNA_def_property_ui_text(prop, "Auto Keying Mode", | |
2385 "Mode of automatic keyframe insertion for Objec
ts and Bones " | |
2386 "(default setting used for new Scenes)"); | |
2387 | |
2388 prop= RNA_def_property(srna, "use_keyframe_insert_available", PROP_BOOLE
AN, PROP_NONE); | |
2389 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_I
NSERTAVAIL); | |
2390 RNA_def_property_ui_text(prop, "Auto Keyframe Insert Available", "Automa
tic keyframe insertion in available F-Curves"); | |
2391 ········ | |
2392 /* keyframing settings */ | |
2393 prop= RNA_def_property(srna, "use_keyframe_insert_needed", PROP_BOOLEAN,
PROP_NONE); | |
2394 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_I
NSERTNEEDED); | |
2395 RNA_def_property_ui_text(prop, "Keyframe Insert Needed", "Keyframe inser
tion only when keyframe needed"); | |
2396 | |
2397 prop= RNA_def_property(srna, "use_visual_keying", PROP_BOOLEAN, PROP_NON
E); | |
2398 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_A
UTOMATKEY); | |
2399 RNA_def_property_ui_text(prop, "Visual Keying", "Use Visual keying autom
atically for constrained objects"); | |
2400 ········ | |
2401 prop= RNA_def_property(srna, "use_insertkey_xyz_to_rgb", PROP_BOOLEAN, P
ROP_NONE); | |
2402 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_X
YZ2RGB); | |
2403 RNA_def_property_ui_text(prop, "New F-Curve Colors - XYZ to RGB", | |
2404 "Color for newly added transformation F-Curves
(Location, Rotation, Scale) " | |
2405 "and also Color is based on the transform axis"
); | |
2406 ········ | |
2407 prop= RNA_def_property(srna, "keyframe_new_interpolation_type", PROP_ENU
M, PROP_NONE); | |
2408 RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items); | |
2409 RNA_def_property_enum_sdna(prop, NULL, "ipo_new"); | |
2410 RNA_def_property_ui_text(prop, "New Interpolation Type", | |
2411 "Interpolation mode used for first keyframe on
newly added F-Curves " | |
2412 "(subsequent keyframes take interpolation from
preceeding keyframe)"); | |
2413 ········ | |
2414 prop= RNA_def_property(srna, "keyframe_new_handle_type", PROP_ENUM, PROP
_NONE); | |
2415 RNA_def_property_enum_items(prop, keyframe_handle_type_items); | |
2416 RNA_def_property_enum_sdna(prop, NULL, "keyhandles_new"); | |
2417 RNA_def_property_ui_text(prop, "New Handles Type", "Handle type for hand
les of new keyframes"); | |
2418 ········ | |
2419 /* frame numbers */ | |
2420 prop= RNA_def_property(srna, "use_negative_frames", PROP_BOOLEAN, PROP_N
ONE); | |
2421 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_NONEGFRA
MES); | |
2422 RNA_def_property_ui_text(prop, "Allow Negative Frames", "Current frame n
umber can be manually set to a negative value"); | |
2423 ········ | |
2424 /* grease pencil */ | |
2425 prop= RNA_def_property(srna, "grease_pencil_manhattan_distance", PROP_IN
T, PROP_NONE); | |
2426 RNA_def_property_int_sdna(prop, NULL, "gp_manhattendist"); | |
2427 RNA_def_property_range(prop, 0, 100); | |
2428 RNA_def_property_ui_text(prop, "Grease Pencil Manhattan Distance", "Pixe
ls moved by mouse per axis when drawing stroke"); | |
2429 | |
2430 prop= RNA_def_property(srna, "grease_pencil_euclidean_distance", PROP_IN
T, PROP_NONE); | |
2431 RNA_def_property_int_sdna(prop, NULL, "gp_euclideandist"); | |
2432 RNA_def_property_range(prop, 0, 100); | |
2433 RNA_def_property_ui_text(prop, "Grease Pencil Euclidean Distance", | |
2434 "Distance moved by mouse when drawing stroke (i
n pixels) to include"); | |
2435 | |
2436 prop= RNA_def_property(srna, "use_grease_pencil_smooth_stroke", PROP_BOO
LEAN, PROP_NONE); | |
2437 RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSMOO
TH); | |
2438 RNA_def_property_ui_text(prop, "Grease Pencil Smooth Stroke", "Smooth th
e final stroke"); | |
2439 | |
2440 prop= RNA_def_property(srna, "use_grease_pencil_simplify_stroke", PROP_B
OOLEAN, PROP_NONE); | |
2441 RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSIMP
LIFY); | |
2442 RNA_def_property_ui_text(prop, "Grease Pencil Simplify Stroke", "Simplif
y the final stroke"); | |
2443 | |
2444 prop= RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, PR
OP_NONE); | |
2445 RNA_def_property_int_sdna(prop, NULL, "gp_eraser"); | |
2446 RNA_def_property_range(prop, 0, 100); | |
2447 RNA_def_property_ui_text(prop, "Grease Pencil Eraser Radius", "Radius of
eraser 'brush'"); | |
2448 | |
2449 /* sculpt and paint */ | |
2450 | |
2451 prop= RNA_def_property(srna, "sculpt_paint_overlay_color", PROP_FLOAT, P
ROP_COLOR_GAMMA); | |
2452 RNA_def_property_float_sdna(prop, NULL, "sculpt_paint_overlay_col"); | |
2453 RNA_def_property_array(prop, 3); | |
2454 RNA_def_property_ui_text(prop, "Sculpt/Paint Overlay Color", "Color of t
exture overlay"); | |
2455 | |
2456 /* duplication linking */ | |
2457 prop= RNA_def_property(srna, "use_duplicate_mesh", PROP_BOOLEAN, PROP_NO
NE); | |
2458 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MESH); | |
2459 RNA_def_property_ui_text(prop, "Duplicate Mesh", "Causes mesh data to be
duplicated with the object"); | |
2460 | |
2461 prop= RNA_def_property(srna, "use_duplicate_surface", PROP_BOOLEAN, PROP
_NONE); | |
2462 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_SURF); | |
2463 RNA_def_property_ui_text(prop, "Duplicate Surface", "Causes surface data
to be duplicated with the object"); | |
2464 ········ | |
2465 prop= RNA_def_property(srna, "use_duplicate_curve", PROP_BOOLEAN, PROP_N
ONE); | |
2466 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_CURVE); | |
2467 RNA_def_property_ui_text(prop, "Duplicate Curve", "Causes curve data to
be duplicated with the object"); | |
2468 | |
2469 prop= RNA_def_property(srna, "use_duplicate_text", PROP_BOOLEAN, PROP_NO
NE); | |
2470 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_FONT); | |
2471 RNA_def_property_ui_text(prop, "Duplicate Text", "Causes text data to be
duplicated with the object"); | |
2472 | |
2473 prop= RNA_def_property(srna, "use_duplicate_metaball", PROP_BOOLEAN, PRO
P_NONE); | |
2474 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MBALL); | |
2475 RNA_def_property_ui_text(prop, "Duplicate Metaball", "Causes metaball da
ta to be duplicated with the object"); | |
2476 ········ | |
2477 prop= RNA_def_property(srna, "use_duplicate_armature", PROP_BOOLEAN, PRO
P_NONE); | |
2478 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ARM); | |
2479 RNA_def_property_ui_text(prop, "Duplicate Armature", "Causes armature da
ta to be duplicated with the object"); | |
2480 | |
2481 prop= RNA_def_property(srna, "use_duplicate_lamp", PROP_BOOLEAN, PROP_NO
NE); | |
2482 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_LAMP); | |
2483 RNA_def_property_ui_text(prop, "Duplicate Lamp", "Causes lamp data to be
duplicated with the object"); | |
2484 | |
2485 prop= RNA_def_property(srna, "use_duplicate_material", PROP_BOOLEAN, PRO
P_NONE); | |
2486 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MAT); | |
2487 RNA_def_property_ui_text(prop, "Duplicate Material", "Causes material da
ta to be duplicated with the object"); | |
2488 | |
2489 prop= RNA_def_property(srna, "use_duplicate_texture", PROP_BOOLEAN, PROP
_NONE); | |
2490 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_TEX); | |
2491 RNA_def_property_ui_text(prop, "Duplicate Texture", "Causes texture data
to be duplicated with the object"); | |
2492 ················ | |
2493 // xxx | |
2494 prop= RNA_def_property(srna, "use_duplicate_fcurve", PROP_BOOLEAN, PROP_
NONE); | |
2495 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_IPO); | |
2496 RNA_def_property_ui_text(prop, "Duplicate F-Curve", "Causes F-curve data
to be duplicated with the object"); | |
2497 // xxx | |
2498 prop= RNA_def_property(srna, "use_duplicate_action", PROP_BOOLEAN, PROP_
NONE); | |
2499 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ACT); | |
2500 RNA_def_property_ui_text(prop, "Duplicate Action", "Causes actions to be
duplicated with the object"); | |
2501 ········ | |
2502 prop= RNA_def_property(srna, "use_duplicate_particle", PROP_BOOLEAN, PRO
P_NONE); | |
2503 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_PSYS); | |
2504 RNA_def_property_ui_text(prop, "Duplicate Particle", "Causes particle sy
stems to be duplicated with the object"); | |
2505 } | |
2506 | |
2507 static void rna_def_userdef_system(BlenderRNA *brna) | |
2508 { | |
2509 PropertyRNA *prop; | |
2510 StructRNA *srna; | |
2511 | |
2512 static EnumPropertyItem gl_texture_clamp_items[] = { | |
2513 {0, "CLAMP_OFF", 0, "Off", ""}, | |
2514 {8192, "CLAMP_8192", 0, "8192", ""}, | |
2515 {4096, "CLAMP_4096", 0, "4096", ""}, | |
2516 {2048, "CLAMP_2048", 0, "2048", ""}, | |
2517 {1024, "CLAMP_1024", 0, "1024", ""}, | |
2518 {512, "CLAMP_512", 0, "512", ""}, | |
2519 {256, "CLAMP_256", 0, "256", ""}, | |
2520 {128, "CLAMP_128", 0, "128", ""}, | |
2521 {0, NULL, 0, NULL, NULL}}; | |
2522 | |
2523 static EnumPropertyItem anisotropic_items[] ={ | |
2524 {1, "FILTER_0", 0, "Off", ""}, | |
2525 {2, "FILTER_2", 0, "2x", ""}, | |
2526 {4, "FILTER_4", 0, "4x", ""}, | |
2527 {8, "FILTER_8", 0, "8x", ""}, | |
2528 {16, "FILTER_16", 0, "16x", ""}, | |
2529 {0, NULL, 0, NULL, NULL}}; | |
2530 | |
2531 static EnumPropertyItem audio_mixing_samples_items[] = { | |
2532 {256, "SAMPLES_256", 0, "256", "Set audio mixing buffer size to
256 samples"}, | |
2533 {512, "SAMPLES_512", 0, "512", "Set audio mixing buffer size to
512 samples"}, | |
2534 {1024, "SAMPLES_1024", 0, "1024", "Set audio mixing buffer size
to 1024 samples"}, | |
2535 {2048, "SAMPLES_2048", 0, "2048", "Set audio mixing buffer size
to 2048 samples"}, | |
2536 {4096, "SAMPLES_4096", 0, "4096", "Set audio mixing buffer size
to 4096 samples"}, | |
2537 {8192, "SAMPLES_8192", 0, "8192", "Set audio mixing buffer size
to 8192 samples"}, | |
2538 {16384, "SAMPLES_16384", 0, "16384", "Set audio mixing buffer si
ze to 16384 samples"}, | |
2539 {32768, "SAMPLES_32768", 0, "32768", "Set audio mixing buffer si
ze to 32768 samples"}, | |
2540 {0, NULL, 0, NULL, NULL}}; | |
2541 | |
2542 static EnumPropertyItem audio_device_items[] = { | |
2543 {0, "NONE", 0, "None", "Null device - there will be no audio out
put"}, | |
2544 #ifdef WITH_SDL | |
2545 {1, "SDL", 0, "SDL", "SDL device - simple direct media layer, re
commended for sequencer usage"}, | |
2546 #endif | |
2547 #ifdef WITH_OPENAL | |
2548 {2, "OPENAL", 0, "OpenAL", "OpenAL device - supports 3D audio, r
ecommended for game engine usage"}, | |
2549 #endif | |
2550 #ifdef WITH_JACK | |
2551 {3, "JACK", 0, "Jack", "Jack device - open source pro audio, rec
ommended for pro audio users"}, | |
2552 #endif | |
2553 {0, NULL, 0, NULL, NULL}}; | |
2554 | |
2555 static EnumPropertyItem audio_rate_items[] = { | |
2556 // {8000, "RATE_8000", 0, "8 kHz", "Set audio sampling rate to 8000
samples per second"}, | |
2557 // {11025, "RATE_11025", 0, "11.025 kHz", "Set audio sampling rate
to 11025 samples per second"}, | |
2558 // {16000, "RATE_16000", 0, "16 kHz", "Set audio sampling rate to 1
6000 samples per second"}, | |
2559 // {22050, "RATE_22050", 0, "22.05 kHz", "Set audio sampling rate t
o 22050 samples per second"}, | |
2560 // {32000, "RATE_32000", 0, "32 kHz", "Set audio sampling rate to 3
2000 samples per second"}, | |
2561 {44100, "RATE_44100", 0, "44.1 kHz", "Set audio sampling rate to
44100 samples per second"}, | |
2562 {48000, "RATE_48000", 0, "48 kHz", "Set audio sampling rate to 4
8000 samples per second"}, | |
2563 // {88200, "RATE_88200", 0, "88.2 kHz", "Set audio sampling rate to
88200 samples per second"}, | |
2564 {96000, "RATE_96000", 0, "96 kHz", "Set audio sampling rate to 9
6000 samples per second"}, | |
2565 {192000, "RATE_192000", 0, "192 kHz", "Set audio sampling rate t
o 192000 samples per second"}, | |
2566 {0, NULL, 0, NULL, NULL}}; | |
2567 | |
2568 static EnumPropertyItem audio_format_items[] = { | |
2569 {0x01, "U8", 0, "8-bit Unsigned", "Set audio sample format to 8
bit unsigned integer"}, | |
2570 {0x12, "S16", 0, "16-bit Signed", "Set audio sample format to 16
bit signed integer"}, | |
2571 {0x13, "S24", 0, "24-bit Signed", "Set audio sample format to 24
bit signed integer"}, | |
2572 {0x14, "S32", 0, "32-bit Signed", "Set audio sample format to 32
bit signed integer"}, | |
2573 {0x24, "FLOAT", 0, "32-bit Float", "Set audio sample format to 3
2 bit float"}, | |
2574 {0x28, "DOUBLE", 0, "64-bit Float", "Set audio sample format to
64 bit float"}, | |
2575 {0, NULL, 0, NULL, NULL}}; | |
2576 | |
2577 static EnumPropertyItem audio_channel_items[] = { | |
2578 {1, "MONO", 0, "Mono", "Set audio channels to mono"}, | |
2579 {2, "STEREO", 0, "Stereo", "Set audio channels to stereo"}, | |
2580 {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 chann
els"}, | |
2581 {6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1
surround sound"}, | |
2582 {8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1
surround sound"}, | |
2583 {0, NULL, 0, NULL, NULL}}; | |
2584 | |
2585 static EnumPropertyItem draw_method_items[] = { | |
2586 {USER_DRAW_AUTOMATIC, "AUTOMATIC", 0, "Automatic", "Automaticall
y set based on graphics card and driver"}, | |
2587 {USER_DRAW_TRIPLE, "TRIPLE_BUFFER", 0, "Triple Buffer", | |
2588 "Use a third buffer for minimal redraws at th
e cost of more memory"}, | |
2589 {USER_DRAW_OVERLAP, "OVERLAP", 0, "Overlap", "Redraw all overlap
ping regions, minimal memory usage but more redraws"}, | |
2590 {USER_DRAW_OVERLAP_FLIP, "OVERLAP_FLIP", 0, "Overlap Flip", | |
2591 "Redraw all overlapping regions, minima
l memory usage but more redraws " | |
2592 "(for graphics drivers that do flipping
)"}, | |
2593 {USER_DRAW_FULL, "FULL", 0, "Full", | |
2594 "Do a full redraw each time, slow, only use for
reference or when everything else fails"}, | |
2595 {0, NULL, 0, NULL, NULL}}; | |
2596 ········ | |
2597 static EnumPropertyItem color_picker_types[] = { | |
2598 {USER_CP_CIRCLE, "CIRCLE", 0, "Circle", "A circular Hue/Saturati
on color wheel, with Value slider"}, | |
2599 {USER_CP_SQUARE_SV, "SQUARE_SV", 0, "Square (SV + H)", "A square
showing Saturation/Value, with Hue slider"}, | |
2600 {USER_CP_SQUARE_HS, "SQUARE_HS", 0, "Square (HS + V)", "A square
showing Hue/Saturation, with Value slider"}, | |
2601 {USER_CP_SQUARE_HV, "SQUARE_HV", 0, "Square (HV + S)", "A square
showing Hue/Value, with Saturation slider"}, | |
2602 {0, NULL, 0, NULL, NULL}}; | |
2603 ········ | |
2604 /* hardcoded here, could become dynamic somehow */ | |
2605 /* locale according to http://www.roseindia.net/tutorials/I18N/locales-l
ist.shtml */ | |
2606 /* if you edit here, please also edit the source/blender/blenfont/intern
/blf_lang.c 's locales */ | |
2607 static EnumPropertyItem language_items[] = { | |
2608 {0, "", 0, "Nearly done", ""}, | |
2609 {0, "DEFAULT", 0, "Default (Default)", ""}, | |
2610 {1, "ENGLISH", 0, "English (English)", "en_US"}, | |
2611 {8, "FRENCH", 0, "French (Français)", "fr_FR"}, | |
2612 {9, "SPANISH", 0, "Spanish (Español)", "es_ES"}, | |
2613 {13, "SIMPLIFIED_CHINESE", 0, "Simplified Chinese (简体中文)", "zh_C
N"}, | |
2614 {0, "", 0, "In progress", ""}, | |
2615 {2, "JAPANESE", 0, "Japanese (日本語)", "ja_JP"}, | |
2616 {3, "DUTCH", 0, "Dutch (Nederlandse taal)", "nl_NL"}, | |
2617 {4, "ITALIAN", 0, "Italian (Italiano)", "it_IT"}, | |
2618 {5, "GERMAN", 0, "German (Deutsch)", "de_DE"}, | |
2619 {6, "FINNISH", 0, "Finnish (Suomi)", "fi_FI"}, | |
2620 {7, "SWEDISH", 0, "Swedish (Svenska)", "sv_SE"}, | |
2621 {10, "CATALAN", 0, "Catalan (Català)", "ca_AD"}, | |
2622 {11, "CZECH", 0, "Czech (Český)", "cs_CZ"}, | |
2623 {12, "BRAZILIAN_PORTUGUESE", 0, "Brazilian Portuguese (Português
do Brasil)", "pt_BR"}, | |
2624 {14, "TRADITIONAL_CHINESE", 0, "Traditional Chinese (繁體中文)", "zh
_TW"}, | |
2625 {15, "RUSSIAN", 0, "Russian (Русский)", "ru_RU"}, | |
2626 {16, "CROATIAN", 0, "Croatian (Hrvatski)", "hr_HR"}, | |
2627 {17, "SERBIAN", 0, "Serbian (Српском језику)", "sr_RS"}, | |
2628 {18, "UKRAINIAN", 0, "Ukrainian (Український)", "uk_UA"}, | |
2629 {19, "POLISH", 0, "Polish (Polski)", "pl_PL"}, | |
2630 {20, "ROMANIAN", 0, "Romanian (Român)", "ro_RO"}, | |
2631 /* using the utf8 flipped form of Arabic (العربية) */ | |
2632 {21, "ARABIC", 0, "Arabic (ﺔﻴﺑﺮﻌﻟﺍ)", "ar_EG"}, | |
2633 {22, "BULGARIAN", 0, "Bulgarian (Български)", "bg_BG"}, | |
2634 {23, "GREEK", 0, "Greek (Ελληνικά)", "el_GR"}, | |
2635 {24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"}, | |
2636 /*{25, "NEPALI", 0, "Nepali (नेपाली)", "ne_NP"},*/ | |
2637 /* using the utf8 flipped form of Persian (فارسی) */ | |
2638 {26, "PERSIAN", 0, "Persian (ﯽﺳﺭﺎﻓ)", "fa_PE"}, | |
2639 {0, NULL, 0, NULL, NULL}}; | |
2640 | |
2641 srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL); | |
2642 RNA_def_struct_sdna(srna, "UserDef"); | |
2643 RNA_def_struct_nested(brna, srna, "UserPreferences"); | |
2644 RNA_def_struct_ui_text(srna, "System & OpenGL", "Graphics driver and ope
rating system settings"); | |
2645 | |
2646 /* Language */ | |
2647 ········ | |
2648 prop= RNA_def_property(srna, "use_international_fonts", PROP_BOOLEAN, PR
OP_NONE); | |
2649 RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_DOTRANSLATE)
; | |
2650 RNA_def_property_ui_text(prop, "International Fonts", "Use international
fonts"); | |
2651 RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update"); | |
2652 | |
2653 prop= RNA_def_property(srna, "dpi", PROP_INT, PROP_NONE); | |
2654 RNA_def_property_int_sdna(prop, NULL, "dpi"); | |
2655 RNA_def_property_range(prop, 48, 128); | |
2656 RNA_def_property_ui_text(prop, "DPI", "Font size and resolution for disp
lay"); | |
2657 RNA_def_property_update(prop, 0, "rna_userdef_dpi_update"); | |
2658 ········ | |
2659 prop= RNA_def_property(srna, "scrollback", PROP_INT, PROP_UNSIGNED); | |
2660 RNA_def_property_int_sdna(prop, NULL, "scrollback"); | |
2661 RNA_def_property_range(prop, 32, 32768); | |
2662 RNA_def_property_ui_text(prop, "Scrollback", "Maximum number of lines to
store for the console buffer"); | |
2663 | |
2664 prop= RNA_def_property(srna, "author", PROP_STRING, PROP_NONE); | |
2665 RNA_def_property_string_sdna(prop, NULL, "author"); | |
2666 RNA_def_property_string_maxlength(prop, 80); | |
2667 RNA_def_property_ui_text(prop, "Author", "Name that will be used in expo
rted files when format supports such feature"); | |
2668 | |
2669 /* Language Selection */ | |
2670 | |
2671 prop= RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE); | |
2672 RNA_def_property_enum_items(prop, language_items); | |
2673 RNA_def_property_ui_text(prop, "Language", "Language used for translatio
n"); | |
2674 RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update"); | |
2675 | |
2676 prop= RNA_def_property(srna, "use_translate_tooltips", PROP_BOOLEAN, PRO
P_NONE); | |
2677 RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_TOOLTIPS)
; | |
2678 RNA_def_property_ui_text(prop, "Translate Tooltips", "Translate Tooltips
"); | |
2679 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2680 | |
2681 prop= RNA_def_property(srna, "use_translate_interface", PROP_BOOLEAN, PR
OP_NONE); | |
2682 RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_IFACE); | |
2683 RNA_def_property_ui_text(prop, "Translate Interface", "Translate Interfa
ce"); | |
2684 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2685 | |
2686 prop= RNA_def_property(srna, "use_textured_fonts", PROP_BOOLEAN, PROP_NO
NE); | |
2687 RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_USETEXTUREFO
NT); | |
2688 RNA_def_property_ui_text(prop, "Textured Fonts", "Use textures for drawi
ng international fonts"); | |
2689 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2690 | |
2691 /* System & OpenGL */ | |
2692 | |
2693 prop= RNA_def_property(srna, "solid_lights", PROP_COLLECTION, PROP_NONE)
; | |
2694 RNA_def_property_collection_sdna(prop, NULL, "light", ""); | |
2695 RNA_def_property_struct_type(prop, "UserSolidLight"); | |
2696 RNA_def_property_ui_text(prop, "Solid Lights", "Lights user to display o
bjects in solid draw mode"); | |
2697 | |
2698 prop= RNA_def_property(srna, "use_weight_color_range", PROP_BOOLEAN, PRO
P_NONE); | |
2699 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_CUSTOM_RANGE); | |
2700 RNA_def_property_ui_text(prop, "Use Weight Color Range", | |
2701 "Enable color range used for weight visualizati
on in weight painting mode"); | |
2702 RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update"); | |
2703 | |
2704 prop= RNA_def_property(srna, "weight_color_range", PROP_POINTER, PROP_NO
NE); | |
2705 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2706 RNA_def_property_pointer_sdna(prop, NULL, "coba_weight"); | |
2707 RNA_def_property_struct_type(prop, "ColorRamp"); | |
2708 RNA_def_property_ui_text(prop, "Weight Color Range", "Color range used f
or weight visualization in weight painting mode"); | |
2709 RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update"); | |
2710 | |
2711 prop= RNA_def_property(srna, "color_picker_type", PROP_ENUM, PROP_NONE); | |
2712 RNA_def_property_enum_items(prop, color_picker_types); | |
2713 RNA_def_property_enum_sdna(prop, NULL, "color_picker_type"); | |
2714 RNA_def_property_ui_text(prop, "Color Picker Type", "Different styles of
displaying the color picker widget"); | |
2715 ········ | |
2716 prop= RNA_def_property(srna, "use_preview_images", PROP_BOOLEAN, PROP_NO
NE); | |
2717 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ALLWINCODECS); | |
2718 RNA_def_property_ui_text(prop, "Enable All Codecs", | |
2719 "Allow user to choose any codec (Windows only,
might generate instability)"); | |
2720 | |
2721 prop= RNA_def_property(srna, "use_scripts_auto_execute", PROP_BOOLEAN, P
ROP_NONE); | |
2722 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_SCRIPT_A
UTOEXEC_DISABLE); | |
2723 RNA_def_property_ui_text(prop, "Auto Run Python Scripts", | |
2724 "Allow any .blend file to run scripts automatic
ally " | |
2725 "(unsafe with blend files from an untrusted sou
rce)"); | |
2726 RNA_def_property_update(prop, 0, "rna_userdef_script_autoexec_update"); | |
2727 | |
2728 prop= RNA_def_property(srna, "use_tabs_as_spaces", PROP_BOOLEAN, PROP_NO
NE); | |
2729 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TXT_TABS
TOSPACES_DISABLE); | |
2730 RNA_def_property_ui_text(prop, "Tabs as Spaces", | |
2731 "Automatically convert all new tabs into spaces
for new and loaded text files"); | |
2732 | |
2733 prop= RNA_def_property(srna, "prefetch_frames", PROP_INT, PROP_NONE); | |
2734 RNA_def_property_int_sdna(prop, NULL, "prefetchframes"); | |
2735 RNA_def_property_range(prop, 0, 500); | |
2736 RNA_def_property_ui_text(prop, "Prefetch Frames", "Number of frames to r
ender ahead during playback"); | |
2737 | |
2738 prop= RNA_def_property(srna, "memory_cache_limit", PROP_INT, PROP_NONE); | |
2739 RNA_def_property_int_sdna(prop, NULL, "memcachelimit"); | |
2740 RNA_def_property_range(prop, 0, (sizeof(void *) ==8)? 1024*16: 1024); /*
32 bit 2 GB, 64 bit 16 GB */ | |
2741 RNA_def_property_ui_text(prop, "Memory Cache Limit", "Memory cache limit
in sequencer (megabytes)"); | |
2742 RNA_def_property_update(prop, 0, "rna_Userdef_memcache_update"); | |
2743 | |
2744 prop= RNA_def_property(srna, "frame_server_port", PROP_INT, PROP_NONE); | |
2745 RNA_def_property_int_sdna(prop, NULL, "frameserverport"); | |
2746 RNA_def_property_range(prop, 0, 32727); | |
2747 RNA_def_property_ui_text(prop, "Frame Server Port", "Frameserver Port fo
r Frameserver Rendering"); | |
2748 | |
2749 prop= RNA_def_property(srna, "gl_clip_alpha", PROP_FLOAT, PROP_NONE); | |
2750 RNA_def_property_float_sdna(prop, NULL, "glalphaclip"); | |
2751 RNA_def_property_range(prop, 0.0f, 1.0f); | |
2752 RNA_def_property_ui_text(prop, "Clip Alpha", "Clip alpha below this thre
shold in the 3D textured view"); | |
2753 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2754 ········ | |
2755 prop= RNA_def_property(srna, "use_mipmaps", PROP_BOOLEAN, PROP_NONE); | |
2756 RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DIS
ABLE_MIPMAP); | |
2757 RNA_def_property_ui_text(prop, "Mipmaps", | |
2758 "Scale textures for the 3D View (looks nicer bu
t uses more memory and slows image reloading)"); | |
2759 RNA_def_property_update(prop, 0, "rna_userdef_mipmap_update"); | |
2760 | |
2761 prop= RNA_def_property(srna, "use_vertex_buffer_objects", PROP_BOOLEAN,
PROP_NONE); | |
2762 RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DIS
ABLE_VBO); | |
2763 RNA_def_property_ui_text(prop, "VBOs", "Use Vertex Buffer Objects (or Ve
rtex Arrays, if unsupported) for viewport rendering"); | |
2764 RNA_def_property_update(prop, NC_WINDOW, NULL); /* this isnt essential b
ut nice to check if VBO draws any differently */ | |
2765 | |
2766 prop= RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE
); | |
2767 RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DIS
ABLE_AA); | |
2768 RNA_def_property_ui_text(prop, "Anti-aliasing", "Use anti-aliasing for t
he 3D view (may impact redraw performance)"); | |
2769 | |
2770 prop= RNA_def_property(srna, "anisotropic_filter", PROP_ENUM, PROP_NONE)
; | |
2771 RNA_def_property_enum_sdna(prop, NULL, "anisotropic_filter"); | |
2772 RNA_def_property_enum_items(prop, anisotropic_items); | |
2773 RNA_def_property_enum_default(prop, 1); | |
2774 RNA_def_property_ui_text(prop, "Anisotropic Filter", | |
2775 "Quality of the anisotropic filtering (values g
reater than 1.0 enable anisotropic filtering)"); | |
2776 RNA_def_property_update(prop, 0, "rna_userdef_anisotropic_update"); | |
2777 ········ | |
2778 prop= RNA_def_property(srna, "gl_texture_limit", PROP_ENUM, PROP_NONE); | |
2779 RNA_def_property_enum_sdna(prop, NULL, "glreslimit"); | |
2780 RNA_def_property_enum_items(prop, gl_texture_clamp_items); | |
2781 RNA_def_property_ui_text(prop, "GL Texture Limit", "Limit the texture si
ze to save graphics memory"); | |
2782 RNA_def_property_update(prop, 0, "rna_userdef_gl_texture_limit_update"); | |
2783 | |
2784 prop= RNA_def_property(srna, "texture_time_out", PROP_INT, PROP_NONE); | |
2785 RNA_def_property_int_sdna(prop, NULL, "textimeout"); | |
2786 RNA_def_property_range(prop, 0, 3600); | |
2787 RNA_def_property_ui_text(prop, "Texture Time Out", | |
2788 "Time since last access of a GL texture in seco
nds after which it is freed " | |
2789 "(set to 0 to keep textures allocated)"); | |
2790 | |
2791 prop= RNA_def_property(srna, "texture_collection_rate", PROP_INT, PROP_N
ONE); | |
2792 RNA_def_property_int_sdna(prop, NULL, "texcollectrate"); | |
2793 RNA_def_property_range(prop, 1, 3600); | |
2794 RNA_def_property_ui_text(prop, "Texture Collection Rate", | |
2795 "Number of seconds between each run of the GL t
exture garbage collector"); | |
2796 | |
2797 prop= RNA_def_property(srna, "window_draw_method", PROP_ENUM, PROP_NONE)
; | |
2798 RNA_def_property_enum_sdna(prop, NULL, "wmdrawmethod"); | |
2799 RNA_def_property_enum_items(prop, draw_method_items); | |
2800 RNA_def_property_ui_text(prop, "Window Draw Method", "Drawing method use
d by the window manager"); | |
2801 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2802 | |
2803 prop= RNA_def_property(srna, "audio_mixing_buffer", PROP_ENUM, PROP_NONE
); | |
2804 RNA_def_property_enum_sdna(prop, NULL, "mixbufsize"); | |
2805 RNA_def_property_enum_items(prop, audio_mixing_samples_items); | |
2806 RNA_def_property_ui_text(prop, "Audio Mixing Buffer", "Number of samples
used by the audio mixing buffer"); | |
2807 RNA_def_property_update(prop, 0, "rna_UserDef_audio_update"); | |
2808 | |
2809 prop= RNA_def_property(srna, "audio_device", PROP_ENUM, PROP_NONE); | |
2810 RNA_def_property_enum_sdna(prop, NULL, "audiodevice"); | |
2811 RNA_def_property_enum_items(prop, audio_device_items); | |
2812 RNA_def_property_ui_text(prop, "Audio Device", "Audio output device"); | |
2813 RNA_def_property_update(prop, 0, "rna_UserDef_audio_update"); | |
2814 | |
2815 prop= RNA_def_property(srna, "audio_sample_rate", PROP_ENUM, PROP_NONE); | |
2816 RNA_def_property_enum_sdna(prop, NULL, "audiorate"); | |
2817 RNA_def_property_enum_items(prop, audio_rate_items); | |
2818 RNA_def_property_ui_text(prop, "Audio Sample Rate", "Audio sample rate")
; | |
2819 RNA_def_property_update(prop, 0, "rna_UserDef_audio_update"); | |
2820 | |
2821 prop= RNA_def_property(srna, "audio_sample_format", PROP_ENUM, PROP_NONE
); | |
2822 RNA_def_property_enum_sdna(prop, NULL, "audioformat"); | |
2823 RNA_def_property_enum_items(prop, audio_format_items); | |
2824 RNA_def_property_ui_text(prop, "Audio Sample Format", "Audio sample form
at"); | |
2825 RNA_def_property_update(prop, 0, "rna_UserDef_audio_update"); | |
2826 | |
2827 prop= RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE); | |
2828 RNA_def_property_enum_sdna(prop, NULL, "audiochannels"); | |
2829 RNA_def_property_enum_items(prop, audio_channel_items); | |
2830 RNA_def_property_ui_text(prop, "Audio Channels", "Audio channel count"); | |
2831 RNA_def_property_update(prop, 0, "rna_UserDef_audio_update"); | |
2832 | |
2833 prop= RNA_def_property(srna, "screencast_fps", PROP_INT, PROP_NONE); | |
2834 RNA_def_property_int_sdna(prop, NULL, "scrcastfps"); | |
2835 RNA_def_property_range(prop, 10, 50); | |
2836 RNA_def_property_ui_text(prop, "FPS", "Frame rate for the screencast to
be played back"); | |
2837 | |
2838 prop= RNA_def_property(srna, "screencast_wait_time", PROP_INT, PROP_NONE
); | |
2839 RNA_def_property_int_sdna(prop, NULL, "scrcastwait"); | |
2840 RNA_def_property_range(prop, 50, 1000); | |
2841 RNA_def_property_ui_text(prop, "Wait Timer (ms)", "Time in milliseconds
between each frame recorded for screencast"); | |
2842 | |
2843 prop= RNA_def_property(srna, "use_text_antialiasing", PROP_BOOLEAN, PROP
_NONE); | |
2844 RNA_def_property_boolean_negative_sdna(prop, NULL, "text_render", USER_T
EXT_DISABLE_AA); | |
2845 RNA_def_property_ui_text(prop, "Text Anti-aliasing", "Draw user interfac
e text anti-aliased"); | |
2846 RNA_def_property_update(prop, 0, "rna_userdef_text_update"); | |
2847 ········ | |
2848 #if 0 | |
2849 prop= RNA_def_property(srna, "verse_master", PROP_STRING, PROP_NONE); | |
2850 RNA_def_property_string_sdna(prop, NULL, "versemaster"); | |
2851 RNA_def_property_ui_text(prop, "Verse Master", "Verse Master-server IP")
; | |
2852 | |
2853 prop= RNA_def_property(srna, "verse_username", PROP_STRING, PROP_NONE); | |
2854 RNA_def_property_string_sdna(prop, NULL, "verseuser"); | |
2855 RNA_def_property_ui_text(prop, "Verse Username", "Verse user name"); | |
2856 #endif | |
2857 } | |
2858 | |
2859 static void rna_def_userdef_input(BlenderRNA *brna) | |
2860 { | |
2861 PropertyRNA *prop; | |
2862 StructRNA *srna; | |
2863 | |
2864 static EnumPropertyItem select_mouse_items[] = { | |
2865 {USER_LMOUSESELECT, "LEFT", 0, "Left", "Use left Mouse Button fo
r selection"}, | |
2866 {0, "RIGHT", 0, "Right", "Use Right Mouse Button for selection"}
, | |
2867 {0, NULL, 0, NULL, NULL}}; | |
2868 ················ | |
2869 static EnumPropertyItem view_rotation_items[] = { | |
2870 {0, "TURNTABLE", 0, "Turntable", "Use turntable style rotation i
n the viewport"}, | |
2871 {USER_TRACKBALL, "TRACKBALL", 0, "Trackball", "Use trackball sty
le rotation in the viewport"}, | |
2872 {0, NULL, 0, NULL, NULL}}; | |
2873 ················ | |
2874 static EnumPropertyItem view_zoom_styles[] = { | |
2875 {USER_ZOOM_CONT, "CONTINUE", 0, "Continue", "Old style zoom, con
tinues while moving mouse up or down"}, | |
2876 {USER_ZOOM_DOLLY, "DOLLY", 0, "Dolly", "Zoom in and out based on
vertical mouse movement"}, | |
2877 {USER_ZOOM_SCALE, "SCALE", 0, "Scale", "Zoom in and out like sca
ling the view, mouse movements relative to center"}, | |
2878 {0, NULL, 0, NULL, NULL}}; | |
2879 ········ | |
2880 static EnumPropertyItem view_zoom_axes[] = { | |
2881 {0, "VERTICAL", 0, "Vertical", "Zoom in and out based on vertica
l mouse movement"}, | |
2882 {USER_ZOOM_HORIZ, "HORIZONTAL", 0, "Horizontal", "Zoom in and ou
t based on horizontal mouse movement"}, | |
2883 {0, NULL, 0, NULL, NULL}}; | |
2884 ················ | |
2885 srna= RNA_def_struct(brna, "UserPreferencesInput", NULL); | |
2886 RNA_def_struct_sdna(srna, "UserDef"); | |
2887 RNA_def_struct_nested(brna, srna, "UserPreferences"); | |
2888 RNA_def_struct_ui_text(srna, "Input", "Settings for input devices"); | |
2889 ········ | |
2890 prop= RNA_def_property(srna, "select_mouse", PROP_ENUM, PROP_NONE); | |
2891 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | |
2892 RNA_def_property_enum_items(prop, select_mouse_items); | |
2893 RNA_def_property_enum_funcs(prop, NULL, "rna_userdef_select_mouse_set",
NULL); | |
2894 RNA_def_property_ui_text(prop, "Select Mouse", "Mouse button used for se
lection"); | |
2895 ········ | |
2896 prop= RNA_def_property(srna, "view_zoom_method", PROP_ENUM, PROP_NONE); | |
2897 RNA_def_property_enum_sdna(prop, NULL, "viewzoom"); | |
2898 RNA_def_property_enum_items(prop, view_zoom_styles); | |
2899 RNA_def_property_ui_text(prop, "Zoom Style", "Which style to use for vie
wport scaling"); | |
2900 ········ | |
2901 prop= RNA_def_property(srna, "view_zoom_axis", PROP_ENUM, PROP_NONE); | |
2902 RNA_def_property_enum_bitflag_sdna(prop, NULL, "uiflag"); | |
2903 RNA_def_property_enum_items(prop, view_zoom_axes); | |
2904 RNA_def_property_ui_text(prop, "Zoom Axis", "Axis of mouse movement to z
oom in or out on"); | |
2905 ········ | |
2906 prop= RNA_def_property(srna, "invert_mouse_zoom", PROP_BOOLEAN, PROP_NON
E); | |
2907 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_INVERT); | |
2908 RNA_def_property_ui_text(prop, "Invert Zoom Direction", "Invert the axis
of mouse movement for zooming"); | |
2909 ········ | |
2910 prop= RNA_def_property(srna, "view_rotate_method", PROP_ENUM, PROP_NONE)
; | |
2911 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | |
2912 RNA_def_property_enum_items(prop, view_rotation_items); | |
2913 RNA_def_property_ui_text(prop, "View Rotation", "Rotation style in the v
iewport"); | |
2914 ········ | |
2915 prop= RNA_def_property(srna, "use_mouse_continuous", PROP_BOOLEAN, PROP_
NONE); | |
2916 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_CONTINUOUS_MOUS
E); | |
2917 RNA_def_property_ui_text(prop, "Continuous Grab", | |
2918 "Allow moving the mouse outside the view on som
e manipulations (transform, ui control drag)"); | |
2919 ········ | |
2920 /* tweak tablet & mouse preset */ | |
2921 prop= RNA_def_property(srna, "drag_threshold", PROP_INT, PROP_NONE); | |
2922 RNA_def_property_int_sdna(prop, NULL, "dragthreshold"); | |
2923 RNA_def_property_range(prop, 3, 40); | |
2924 RNA_def_property_ui_text(prop, "Drag Threshold", "Amount of pixels you h
ave to drag before dragging UI items happens"); | |
2925 | |
2926 /* 3D mouse settings */ | |
2927 /* global options */ | |
2928 prop= RNA_def_property(srna, "ndof_sensitivity", PROP_FLOAT, PROP_NONE); | |
2929 RNA_def_property_range(prop, 0.25f, 4.0f); | |
2930 RNA_def_property_ui_text(prop, "Sensitivity", "Overall sensitivity of th
e 3D Mouse"); | |
2931 | |
2932 prop= RNA_def_property(srna, "ndof_zoom_updown", PROP_BOOLEAN, PROP_NONE
); | |
2933 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ZOOM_UPDOWN)
; | |
2934 RNA_def_property_ui_text(prop, "Zoom = Up/Down", "Zoom using up/down on
the device (otherwise forward/backward)"); | |
2935 | |
2936 prop= RNA_def_property(srna, "ndof_zoom_invert", PROP_BOOLEAN, PROP_NONE
); | |
2937 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ZOOM_INVERT)
; | |
2938 RNA_def_property_ui_text(prop, "Invert Zoom", "Zoom using opposite direc
tion");· | |
2939 | |
2940 /* 3D view */ | |
2941 prop= RNA_def_property(srna, "ndof_show_guide", PROP_BOOLEAN, PROP_NONE)
; | |
2942 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_SHOW_GUIDE); | |
2943 RNA_def_property_ui_text(prop, "Show Navigation Guide", "Display the cen
ter and axis during rotation"); | |
2944 /* TODO: update description when fly-mode visuals are in place ("projec
ted position in fly mode")*/ | |
2945 | |
2946 /* 3D view: orbit */ | |
2947 prop= RNA_def_property(srna, "ndof_orbit_invert_axes", PROP_BOOLEAN, PRO
P_NONE); | |
2948 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ORBIT_INVERT
_AXES); | |
2949 RNA_def_property_ui_text(prop, "Invert Axes", "Toggle between moving the
viewpoint or moving the scene being viewed"); | |
2950 /* in 3Dx docs, this is called 'object mode' vs. 'target camera mode' */ | |
2951 | |
2952 /* 3D view: roll */ | |
2953 prop= RNA_def_property(srna, "ndof_roll_invert_axis", PROP_BOOLEAN, PROP
_NONE); | |
2954 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ROLL_INVERT_
AXIS); | |
2955 RNA_def_property_ui_text(prop, "Invert roll Axis", "Invert roll axis"); | |
2956 | |
2957 /* 3D view: tilt */ | |
2958 prop= RNA_def_property(srna, "ndof_tilt_invert_axis", PROP_BOOLEAN, PROP
_NONE); | |
2959 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_TILT_INVERT_
AXIS); | |
2960 RNA_def_property_ui_text(prop, "Invert tilt Axis", "Invert tilt axis"); | |
2961 | |
2962 /* 3D view: rotate */ | |
2963 prop= RNA_def_property(srna, "ndof_rotate_invert_axis", PROP_BOOLEAN, PR
OP_NONE); | |
2964 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ROTATE_INVER
T_AXIS); | |
2965 RNA_def_property_ui_text(prop, "Invert rotation Axis", "Invert rotation
axis"); | |
2966 | |
2967 /* 3D view: pan x */ | |
2968 prop= RNA_def_property(srna, "ndof_panx_invert_axis", PROP_BOOLEAN, PROP
_NONE); | |
2969 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PANX_INVERT_
AXIS); | |
2970 RNA_def_property_ui_text(prop, "Invert x Axis", "Invert x axis"); | |
2971 | |
2972 /* 3D view: pan y */ | |
2973 prop= RNA_def_property(srna, "ndof_pany_invert_axis", PROP_BOOLEAN, PROP
_NONE); | |
2974 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PANY_INVERT_
AXIS); | |
2975 RNA_def_property_ui_text(prop, "Invert y Axis", "Invert y axis"); | |
2976 | |
2977 /* 3D view: pan z */ | |
2978 prop= RNA_def_property(srna, "ndof_panz_invert_axis", PROP_BOOLEAN, PROP
_NONE); | |
2979 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PANZ_INVERT_
AXIS); | |
2980 RNA_def_property_ui_text(prop, "Invert z Axis", "Invert z axis"); | |
2981 | |
2982 /* 3D view: fly */ | |
2983 prop= RNA_def_property(srna, "ndof_lock_horizon", PROP_BOOLEAN, PROP_NON
E); | |
2984 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_LOCK_HORIZON
); | |
2985 RNA_def_property_ui_text(prop, "Lock Horizon", "Keep horizon level while
flying with 3D Mouse"); | |
2986 | |
2987 prop= RNA_def_property(srna, "ndof_fly_helicopter", PROP_BOOLEAN, PROP_N
ONE); | |
2988 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_FLY_HELICOPT
ER); | |
2989 RNA_def_property_ui_text(prop, "Helicopter Mode", "Device up/down direct
ly controls your Z position"); | |
2990 | |
2991 | |
2992 prop= RNA_def_property(srna, "mouse_double_click_time", PROP_INT, PROP_N
ONE); | |
2993 RNA_def_property_int_sdna(prop, NULL, "dbl_click_time"); | |
2994 RNA_def_property_range(prop, 1, 1000); | |
2995 RNA_def_property_ui_text(prop, "Double Click Timeout", "Time/delay (in m
s) for a double click"); | |
2996 | |
2997 prop= RNA_def_property(srna, "use_mouse_emulate_3_button", PROP_BOOLEAN,
PROP_NONE); | |
2998 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TWOBUTTONMOUSE); | |
2999 RNA_def_property_ui_text(prop, "Emulate 3 Button Mouse", | |
3000 "Emulate Middle Mouse with Alt+Left Mouse (does
n't work with Left Mouse Select option)"); | |
3001 | |
3002 prop= RNA_def_property(srna, "use_emulate_numpad", PROP_BOOLEAN, PROP_NO
NE); | |
3003 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_NONUMPAD); | |
3004 RNA_def_property_ui_text(prop, "Emulate Numpad", "Main 1 to 0 keys act a
s the numpad ones (useful for laptops)"); | |
3005 ········ | |
3006 /* middle mouse button */ | |
3007 prop= RNA_def_property(srna, "use_mouse_mmb_paste", PROP_BOOLEAN, PROP_N
ONE); | |
3008 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MMB_PASTE); | |
3009 RNA_def_property_ui_text(prop, "Middle Mouse Paste", "In text window, pa
ste with middle mouse button instead of panning"); | |
3010 ········ | |
3011 prop= RNA_def_property(srna, "invert_zoom_wheel", PROP_BOOLEAN, PROP_NON
E); | |
3012 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_WHEELZOOMDIR); | |
3013 RNA_def_property_ui_text(prop, "Wheel Invert Zoom", "Swap the Mouse Whee
l zoom direction"); | |
3014 | |
3015 prop= RNA_def_property(srna, "wheel_scroll_lines", PROP_INT, PROP_NONE); | |
3016 RNA_def_property_int_sdna(prop, NULL, "wheellinescroll"); | |
3017 RNA_def_property_range(prop, 0, 32); | |
3018 RNA_def_property_ui_text(prop, "Wheel Scroll Lines", "Number of lines sc
rolled at a time with the mouse wheel"); | |
3019 ········ | |
3020 prop= RNA_def_property(srna, "active_keyconfig", PROP_STRING, PROP_DIRPA
TH); | |
3021 RNA_def_property_string_sdna(prop, NULL, "keyconfigstr"); | |
3022 RNA_def_property_ui_text(prop, "Key Config", "The name of the active key
configuration"); | |
3023 } | |
3024 | |
3025 static void rna_def_userdef_filepaths(BlenderRNA *brna) | |
3026 { | |
3027 PropertyRNA *prop; | |
3028 StructRNA *srna; | |
3029 ········ | |
3030 static EnumPropertyItem anim_player_presets[] = { | |
3031 //{0, "INTERNAL", 0, "Internal", "Built-in animation player"},
// doesn't work yet! | |
3032 {1, "BLENDER24", 0, "Blender 2.4", "Blender command line animati
on playback - path to Blender 2.4"}, | |
3033 {2, "DJV", 0, "Djv", "Open source frame player: http://djv.sourc
eforge.net"}, | |
3034 {3, "FRAMECYCLER", 0, "FrameCycler", "Frame player from IRIDAS"}
, | |
3035 {4, "RV", 0, "rv", "Frame player from Tweak Software"}, | |
3036 {5, "MPLAYER", 0, "MPlayer", "Media player for video & png/jpeg/
sgi image sequences"}, | |
3037 {50, "CUSTOM", 0, "Custom", "Custom animation player executable
path"}, | |
3038 {0, NULL, 0, NULL, NULL}}; | |
3039 ········ | |
3040 srna= RNA_def_struct(brna, "UserPreferencesFilePaths", NULL); | |
3041 RNA_def_struct_sdna(srna, "UserDef"); | |
3042 RNA_def_struct_nested(brna, srna, "UserPreferences"); | |
3043 RNA_def_struct_ui_text(srna, "File Paths", "Default paths for external f
iles"); | |
3044 ········ | |
3045 prop= RNA_def_property(srna, "show_hidden_files_datablocks", PROP_BOOLEA
N, PROP_NONE); | |
3046 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_DOT); | |
3047 RNA_def_property_ui_text(prop, "Hide Dot Files/Datablocks", "Hide files/
datablocks that start with a dot (.*)"); | |
3048 ········ | |
3049 prop= RNA_def_property(srna, "use_filter_files", PROP_BOOLEAN, PROP_NONE
); | |
3050 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_FILTERFILEEXTS)
; | |
3051 RNA_def_property_ui_text(prop, "Filter File Extensions", "Display only f
iles with extensions in the image select window"); | |
3052 ········ | |
3053 prop= RNA_def_property(srna, "hide_recent_locations", PROP_BOOLEAN, PROP
_NONE); | |
3054 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_RECENT); | |
3055 RNA_def_property_ui_text(prop, "Hide Recent Locations", "Hide recent loc
ations in the file selector"); | |
3056 | |
3057 prop= RNA_def_property(srna, "show_thumbnails", PROP_BOOLEAN, PROP_NONE)
; | |
3058 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_THUMBNAILS
); | |
3059 RNA_def_property_ui_text(prop, "Show Thumbnails", "Open in thumbnail vie
w for images and movies"); | |
3060 | |
3061 prop= RNA_def_property(srna, "use_relative_paths", PROP_BOOLEAN, PROP_NO
NE); | |
3062 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELPATHS); | |
3063 RNA_def_property_ui_text(prop, "Relative Paths", "Default relative path
option for the file selector"); | |
3064 ········ | |
3065 prop= RNA_def_property(srna, "use_file_compression", PROP_BOOLEAN, PROP_
NONE); | |
3066 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_FILECOMPRESS); | |
3067 RNA_def_property_ui_text(prop, "Compress File", "Enable file compression
when saving .blend files"); | |
3068 | |
3069 prop= RNA_def_property(srna, "use_load_ui", PROP_BOOLEAN, PROP_NONE); | |
3070 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_FILENOUI
); | |
3071 RNA_def_property_ui_text(prop, "Load UI", "Load user interface setup whe
n loading .blend files"); | |
3072 | |
3073 prop= RNA_def_property(srna, "font_directory", PROP_STRING, PROP_DIRPATH
); | |
3074 RNA_def_property_string_sdna(prop, NULL, "fontdir"); | |
3075 RNA_def_property_ui_text(prop, "Fonts Directory", "The default directory
to search for loading fonts"); | |
3076 | |
3077 prop= RNA_def_property(srna, "texture_directory", PROP_STRING, PROP_DIRP
ATH); | |
3078 RNA_def_property_string_sdna(prop, NULL, "textudir"); | |
3079 RNA_def_property_ui_text(prop, "Textures Directory", "The default direct
ory to search for textures"); | |
3080 | |
3081 prop= RNA_def_property(srna, "texture_plugin_directory", PROP_STRING, PR
OP_DIRPATH); | |
3082 RNA_def_property_string_sdna(prop, NULL, "plugtexdir"); | |
3083 RNA_def_property_ui_text(prop, "Texture Plugin Directory", "The default
directory to search for texture plugins"); | |
3084 | |
3085 prop= RNA_def_property(srna, "sequence_plugin_directory", PROP_STRING, P
ROP_DIRPATH); | |
3086 RNA_def_property_string_sdna(prop, NULL, "plugseqdir"); | |
3087 RNA_def_property_ui_text(prop, "Sequence Plugin Directory", "The default
directory to search for sequence plugins"); | |
3088 | |
3089 prop= RNA_def_property(srna, "render_output_directory", PROP_STRING, PRO
P_DIRPATH); | |
3090 RNA_def_property_string_sdna(prop, NULL, "renderdir"); | |
3091 RNA_def_property_ui_text(prop, "Render Output Directory", "The default d
irectory for rendering output, for new scenes"); | |
3092 | |
3093 prop= RNA_def_property(srna, "script_directory", PROP_STRING, PROP_DIRPA
TH); | |
3094 RNA_def_property_string_sdna(prop, NULL, "pythondir"); | |
3095 RNA_def_property_ui_text(prop, "Python Scripts Directory", | |
3096 "Alternate script path, matching the default la
yout with subdirs: " | |
3097 "startup, addons & modules (requires restart)")
; | |
3098 /* TODO, editing should reset sys.path! */ | |
3099 | |
3100 prop= RNA_def_property(srna, "sound_directory", PROP_STRING, PROP_DIRPAT
H); | |
3101 RNA_def_property_string_sdna(prop, NULL, "sounddir"); | |
3102 RNA_def_property_ui_text(prop, "Sounds Directory", "The default director
y to search for sounds"); | |
3103 | |
3104 prop= RNA_def_property(srna, "temporary_directory", PROP_STRING, PROP_DI
RPATH); | |
3105 RNA_def_property_string_sdna(prop, NULL, "tempdir"); | |
3106 RNA_def_property_ui_text(prop, "Temporary Directory", "The directory for
storing temporary save files"); | |
3107 RNA_def_property_update(prop, 0, "rna_userdef_temp_update"); | |
3108 | |
3109 prop= RNA_def_property(srna, "image_editor", PROP_STRING, PROP_FILEPATH)
; | |
3110 RNA_def_property_string_sdna(prop, NULL, "image_editor"); | |
3111 RNA_def_property_ui_text(prop, "Image Editor", "Path to an image editor"
); | |
3112 ········ | |
3113 prop= RNA_def_property(srna, "animation_player", PROP_STRING, PROP_FILEP
ATH); | |
3114 RNA_def_property_string_sdna(prop, NULL, "anim_player"); | |
3115 RNA_def_property_ui_text(prop, "Animation Player", "Path to a custom ani
mation/frame sequence player"); | |
3116 | |
3117 prop= RNA_def_property(srna, "animation_player_preset", PROP_ENUM, PROP_
NONE); | |
3118 RNA_def_property_enum_sdna(prop, NULL, "anim_player_preset"); | |
3119 RNA_def_property_enum_items(prop, anim_player_presets); | |
3120 RNA_def_property_ui_text(prop, "Animation Player Preset", "Preset config
s for external animation players"); | |
3121 RNA_def_property_enum_default(prop, 1); /* set default to blende
r 2.4 player until an internal one is back */ | |
3122 ········ | |
3123 /* Autosave */ | |
3124 | |
3125 prop= RNA_def_property(srna, "save_version", PROP_INT, PROP_NONE); | |
3126 RNA_def_property_int_sdna(prop, NULL, "versions"); | |
3127 RNA_def_property_range(prop, 0, 32); | |
3128 RNA_def_property_ui_text(prop, "Save Versions", | |
3129 "The number of old versions to maintain in the
current directory, when manually saving"); | |
3130 | |
3131 prop= RNA_def_property(srna, "use_auto_save_temporary_files", PROP_BOOLE
AN, PROP_NONE); | |
3132 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSAVE); | |
3133 RNA_def_property_ui_text(prop, "Auto Save Temporary Files", | |
3134 "Automatic saving of temporary files in temp di
rectory, uses process ID"); | |
3135 RNA_def_property_update(prop, 0, "rna_userdef_autosave_update"); | |
3136 | |
3137 prop= RNA_def_property(srna, "auto_save_time", PROP_INT, PROP_NONE); | |
3138 RNA_def_property_int_sdna(prop, NULL, "savetime"); | |
3139 RNA_def_property_range(prop, 1, 60); | |
3140 RNA_def_property_ui_text(prop, "Auto Save Time", "The time (in minutes)
to wait between automatic temporary saves"); | |
3141 RNA_def_property_update(prop, 0, "rna_userdef_autosave_update"); | |
3142 | |
3143 prop= RNA_def_property(srna, "recent_files", PROP_INT, PROP_NONE); | |
3144 RNA_def_property_range(prop, 0, 30); | |
3145 RNA_def_property_ui_text(prop, "Recent Files", "Maximum number of recent
ly opened files to remember"); | |
3146 | |
3147 prop= RNA_def_property(srna, "use_save_preview_images", PROP_BOOLEAN, PR
OP_NONE); | |
3148 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SAVE_PREVIEWS); | |
3149 RNA_def_property_ui_text(prop, "Save Preview Images", "Enables automatic
saving of preview images in the .blend file"); | |
3150 } | |
3151 | |
3152 void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop) | |
3153 { | |
3154 StructRNA *srna; | |
3155 FunctionRNA *func; | |
3156 PropertyRNA *parm; | |
3157 | |
3158 RNA_def_property_srna(cprop, "Addons"); | |
3159 srna= RNA_def_struct(brna, "Addons", NULL); | |
3160 RNA_def_struct_ui_text(srna, "User Addons", "Collection of addons"); | |
3161 | |
3162 func= RNA_def_function(srna, "new", "rna_userdef_addon_new"); | |
3163 RNA_def_function_flag(func, FUNC_NO_SELF); | |
3164 RNA_def_function_ui_description(func, "Add a new addon"); | |
3165 /* return type */ | |
3166 parm= RNA_def_pointer(func, "addon", "Addon", "", "Addon datablock"); | |
3167 RNA_def_function_return(func, parm); | |
3168 | |
3169 func= RNA_def_function(srna, "remove", "rna_userdef_addon_remove"); | |
3170 RNA_def_function_flag(func, FUNC_NO_SELF); | |
3171 RNA_def_function_ui_description(func, "Remove addon"); | |
3172 parm= RNA_def_pointer(func, "addon", "Addon", "", "Addon to remove"); | |
3173 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL); | |
3174 } | |
3175 | |
3176 void RNA_def_userdef(BlenderRNA *brna) | |
3177 { | |
3178 StructRNA *srna; | |
3179 PropertyRNA *prop; | |
3180 | |
3181 static EnumPropertyItem user_pref_sections[] = { | |
3182 {USER_SECTION_INTERFACE, "INTERFACE", 0, "Interface", ""}, | |
3183 {USER_SECTION_EDIT, "EDITING", 0, "Editing", ""}, | |
3184 {USER_SECTION_INPUT, "INPUT", 0, "Input", ""}, | |
3185 {USER_SECTION_ADDONS, "ADDONS", 0, "Addons", ""}, | |
3186 {USER_SECTION_THEME, "THEMES", 0, "Themes", ""}, | |
3187 {USER_SECTION_FILE, "FILES", 0, "File", ""}, | |
3188 {USER_SECTION_SYSTEM, "SYSTEM", 0, "System", ""}, | |
3189 {0, NULL, 0, NULL, NULL}}; | |
3190 | |
3191 rna_def_userdef_dothemes(brna); | |
3192 rna_def_userdef_solidlight(brna); | |
3193 | |
3194 srna= RNA_def_struct(brna, "UserPreferences", NULL); | |
3195 RNA_def_struct_sdna(srna, "UserDef"); | |
3196 RNA_def_struct_ui_text(srna, "User Preferences", "Global user preference
s"); | |
3197 | |
3198 prop= RNA_def_property(srna, "active_section", PROP_ENUM, PROP_NONE); | |
3199 RNA_def_property_enum_sdna(prop, NULL, "userpref"); | |
3200 RNA_def_property_enum_items(prop, user_pref_sections); | |
3201 RNA_def_property_ui_text(prop, "Active Section", "Active section of the
user preferences shown in the user interface"); | |
3202 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3203 | |
3204 prop= RNA_def_property(srna, "themes", PROP_COLLECTION, PROP_NONE); | |
3205 RNA_def_property_collection_sdna(prop, NULL, "themes", NULL); | |
3206 RNA_def_property_struct_type(prop, "Theme"); | |
3207 RNA_def_property_ui_text(prop, "Themes", ""); | |
3208 | |
3209 prop= RNA_def_property(srna, "ui_styles", PROP_COLLECTION, PROP_NONE); | |
3210 RNA_def_property_collection_sdna(prop, NULL, "uistyles", NULL); | |
3211 RNA_def_property_struct_type(prop, "ThemeStyle"); | |
3212 RNA_def_property_ui_text(prop, "Styles", ""); | |
3213 ········ | |
3214 prop= RNA_def_property(srna, "addons", PROP_COLLECTION, PROP_NONE); | |
3215 RNA_def_property_collection_sdna(prop, NULL, "addons", NULL); | |
3216 RNA_def_property_struct_type(prop, "Addon"); | |
3217 RNA_def_property_ui_text(prop, "Addon", ""); | |
3218 rna_def_userdef_addon_collection(brna, prop); | |
3219 | |
3220 | |
3221 /* nested structs */ | |
3222 prop= RNA_def_property(srna, "view", PROP_POINTER, PROP_NONE); | |
3223 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
3224 RNA_def_property_struct_type(prop, "UserPreferencesView"); | |
3225 RNA_def_property_pointer_funcs(prop, "rna_UserDef_view_get", NULL, NULL,
NULL); | |
3226 RNA_def_property_ui_text(prop, "View & Controls", "Preferences related t
o viewing data"); | |
3227 | |
3228 prop= RNA_def_property(srna, "edit", PROP_POINTER, PROP_NONE); | |
3229 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
3230 RNA_def_property_struct_type(prop, "UserPreferencesEdit"); | |
3231 RNA_def_property_pointer_funcs(prop, "rna_UserDef_edit_get", NULL, NULL,
NULL); | |
3232 RNA_def_property_ui_text(prop, "Edit Methods", "Settings for interacting
with Blender data"); | |
3233 ········ | |
3234 prop= RNA_def_property(srna, "inputs", PROP_POINTER, PROP_NONE); | |
3235 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
3236 RNA_def_property_struct_type(prop, "UserPreferencesInput"); | |
3237 RNA_def_property_pointer_funcs(prop, "rna_UserDef_input_get", NULL, NULL
, NULL); | |
3238 RNA_def_property_ui_text(prop, "Inputs", "Settings for input devices"); | |
3239 ········ | |
3240 prop= RNA_def_property(srna, "filepaths", PROP_POINTER, PROP_NONE); | |
3241 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
3242 RNA_def_property_struct_type(prop, "UserPreferencesFilePaths"); | |
3243 RNA_def_property_pointer_funcs(prop, "rna_UserDef_filepaths_get", NULL,
NULL, NULL); | |
3244 RNA_def_property_ui_text(prop, "File Paths", "Default paths for external
files"); | |
3245 ········ | |
3246 prop= RNA_def_property(srna, "system", PROP_POINTER, PROP_NONE); | |
3247 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
3248 RNA_def_property_struct_type(prop, "UserPreferencesSystem"); | |
3249 RNA_def_property_pointer_funcs(prop, "rna_UserDef_system_get", NULL, NUL
L, NULL); | |
3250 RNA_def_property_ui_text(prop, "System & OpenGL", "Graphics driver and o
perating system settings"); | |
3251 ········ | |
3252 rna_def_userdef_view(brna); | |
3253 rna_def_userdef_edit(brna); | |
3254 rna_def_userdef_input(brna); | |
3255 rna_def_userdef_filepaths(brna); | |
3256 rna_def_userdef_system(brna); | |
3257 rna_def_userdef_addon(brna); | |
3258 ········ | |
3259 } | |
3260 | |
3261 #endif | |
LEFT | RIGHT |