LEFT | RIGHT |
(no file at all) | |
1 /* | 1 /* |
2 * ***** BEGIN GPL LICENSE BLOCK ***** | 2 * ***** BEGIN GPL LICENSE BLOCK ***** |
3 * | 3 * |
4 * This program is free software; you can redistribute it and/or | 4 * This program is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU General Public License | 5 * modify it under the terms of the GNU General Public License |
6 * as published by the Free Software Foundation; either version 2 | 6 * as published by the Free Software Foundation; either version 2 |
7 * of the License, or (at your option) any later version. | 7 * of the License, or (at your option) any later version. |
8 * | 8 * |
9 * 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, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 prop = RNA_def_property(srna, "list_text_hi", PROP_FLOAT, PROP_COLOR_GAM
MA); | 1189 prop = RNA_def_property(srna, "list_text_hi", PROP_FLOAT, PROP_COLOR_GAM
MA); |
1190 RNA_def_property_array(prop, 3); | 1190 RNA_def_property_array(prop, 3); |
1191 RNA_def_property_ui_text(prop, "Source List Text Highlight", ""); | 1191 RNA_def_property_ui_text(prop, "Source List Text Highlight", ""); |
1192 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 1192 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
1193 } | 1193 } |
1194 | 1194 |
1195 static void rna_def_userdef_theme_spaces_main(StructRNA *srna) | 1195 static void rna_def_userdef_theme_spaces_main(StructRNA *srna) |
1196 { | 1196 { |
1197 PropertyRNA *prop; | 1197 PropertyRNA *prop; |
1198 | 1198 |
1199 prop = RNA_def_property(srna, "space", PROP_POINTER, PROP_NONE); | |
1200 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1201 RNA_def_property_struct_type(prop, "ThemeSpaceGeneric"); | |
1202 RNA_def_property_pointer_funcs(prop, "rna_Theme_space_generic_get", NULL
, NULL, NULL); | |
1203 RNA_def_property_ui_text(prop, "Theme Space", "Settings for space"); | |
1204 } | |
1205 | |
1206 static void rna_def_userdef_theme_spaces_gradient(StructRNA *srna) | |
1207 { | |
1208 PropertyRNA *prop; | |
1209 | |
1210 prop = RNA_def_property(srna, "space", PROP_POINTER, PROP_NONE); | |
1211 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1212 RNA_def_property_struct_type(prop, "ThemeSpaceGradient"); | |
1213 RNA_def_property_pointer_funcs(prop, "rna_Theme_space_gradient_get", NUL
L, NULL, NULL); | |
1214 RNA_def_property_ui_text(prop, "Theme Space", "Settings for space"); | |
1215 } | |
1216 | |
1217 static void rna_def_userdef_theme_spaces_list_main(StructRNA *srna) | |
1218 { | |
1219 PropertyRNA *prop; | |
1220 | |
1221 prop = RNA_def_property(srna, "space_list", PROP_POINTER, PROP_NONE); | |
1222 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1223 RNA_def_property_struct_type(prop, "ThemeSpaceListGeneric"); | |
1224 RNA_def_property_pointer_funcs(prop, "rna_Theme_space_list_generic_get",
NULL, NULL, NULL); | |
1225 RNA_def_property_ui_text(prop, "Theme Space List", "Settings for space l
ist"); | |
1226 } | |
1227 | |
1228 static void rna_def_userdef_theme_spaces_vertex(StructRNA *srna) | |
1229 { | |
1230 PropertyRNA *prop; | |
1231 | |
1232 prop = RNA_def_property(srna, "vertex", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1233 RNA_def_property_array(prop, 3); | |
1234 RNA_def_property_ui_text(prop, "Vertex", ""); | |
1235 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1236 | |
1237 prop = RNA_def_property(srna, "vertex_select", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1238 RNA_def_property_array(prop, 3); | |
1239 RNA_def_property_ui_text(prop, "Vertex Select", ""); | |
1240 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1241 | |
1242 prop = RNA_def_property(srna, "vertex_size", PROP_INT, PROP_NONE); | |
1243 RNA_def_property_range(prop, 1, 10); | |
1244 RNA_def_property_ui_text(prop, "Vertex Size", ""); | |
1245 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1246 | |
1247 prop = RNA_def_property(srna, "vertex_unreferenced", PROP_FLOAT, PROP_CO
LOR_GAMMA); | |
1248 RNA_def_property_array(prop, 3); | |
1249 RNA_def_property_ui_text(prop, "Vertex Group Unreferenced", ""); | |
1250 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1251 } | |
1252 | |
1253 static void rna_def_userdef_theme_spaces_edge(StructRNA *srna) | |
1254 { | |
1255 PropertyRNA *prop; | |
1256 | |
1257 prop = RNA_def_property(srna, "edge_select", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1258 RNA_def_property_array(prop, 3); | |
1259 RNA_def_property_ui_text(prop, "Edge Select", ""); | |
1260 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1261 | |
1262 prop = RNA_def_property(srna, "edge_seam", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
1263 RNA_def_property_array(prop, 3); | |
1264 RNA_def_property_ui_text(prop, "Edge Seam", ""); | |
1265 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1266 | |
1267 prop = RNA_def_property(srna, "edge_sharp", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1268 RNA_def_property_array(prop, 3); | |
1269 RNA_def_property_ui_text(prop, "Edge Sharp", ""); | |
1270 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1271 ········ | |
1272 prop = RNA_def_property(srna, "edge_crease", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1273 RNA_def_property_array(prop, 3); | |
1274 RNA_def_property_ui_text(prop, "Edge Crease", ""); | |
1275 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1276 | |
1277 prop = RNA_def_property(srna, "edge_facesel", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1278 RNA_def_property_array(prop, 3); | |
1279 RNA_def_property_ui_text(prop, "Edge UV Face Select", ""); | |
1280 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1281 | |
1282 prop = RNA_def_property(srna, "freestyle_edge_mark", PROP_FLOAT, PROP_CO
LOR_GAMMA); | |
1283 RNA_def_property_array(prop, 3); | |
1284 RNA_def_property_ui_text(prop, "Freestyle Edge Mark", ""); | |
1285 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1286 } | |
1287 | |
1288 static void rna_def_userdef_theme_spaces_face(StructRNA *srna) | |
1289 { | |
1290 PropertyRNA *prop; | |
1291 | |
1292 prop = RNA_def_property(srna, "face", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1293 RNA_def_property_array(prop, 4); | |
1294 RNA_def_property_ui_text(prop, "Face", ""); | |
1295 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1296 | |
1297 prop = RNA_def_property(srna, "face_select", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1298 RNA_def_property_array(prop, 4); | |
1299 RNA_def_property_ui_text(prop, "Face Selected", ""); | |
1300 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1301 | |
1302 prop = RNA_def_property(srna, "face_dot", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1303 RNA_def_property_array(prop, 3); | |
1304 RNA_def_property_ui_text(prop, "Face Dot Selected", ""); | |
1305 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1306 | |
1307 prop = RNA_def_property(srna, "facedot_size", PROP_INT, PROP_NONE); | |
1308 RNA_def_property_range(prop, 1, 10); | |
1309 RNA_def_property_ui_text(prop, "Face Dot Size", ""); | |
1310 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1311 | |
1312 prop = RNA_def_property(srna, "freestyle_face_mark", PROP_FLOAT, PROP_CO
LOR_GAMMA); | |
1313 RNA_def_property_array(prop, 4); | |
1314 RNA_def_property_ui_text(prop, "Freestyle Face Mark", ""); | |
1315 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1316 } | |
1317 | |
1318 static void rna_def_userdef_theme_spaces_curves(StructRNA *srna, short incl_nurb
s) | |
1319 { | |
1320 PropertyRNA *prop; | |
1321 ········ | |
1322 if (incl_nurbs) { | |
1323 prop = RNA_def_property(srna, "nurb_uline", PROP_FLOAT, PROP_COL
OR_GAMMA); | |
1324 RNA_def_property_float_sdna(prop, NULL, "nurb_uline"); | |
1325 RNA_def_property_array(prop, 3); | |
1326 RNA_def_property_ui_text(prop, "NURBS U-lines", ""); | |
1327 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1328 | |
1329 prop = RNA_def_property(srna, "nurb_vline", PROP_FLOAT, PROP_COL
OR_GAMMA); | |
1330 RNA_def_property_float_sdna(prop, NULL, "nurb_vline"); | |
1331 RNA_def_property_array(prop, 3); | |
1332 RNA_def_property_ui_text(prop, "NURBS V-lines", ""); | |
1333 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1334 | |
1335 prop = RNA_def_property(srna, "nurb_sel_uline", PROP_FLOAT, PROP
_COLOR_GAMMA); | |
1336 RNA_def_property_float_sdna(prop, NULL, "nurb_sel_uline"); | |
1337 RNA_def_property_array(prop, 3); | |
1338 RNA_def_property_ui_text(prop, "NURBS active U-lines", ""); | |
1339 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1340 | |
1341 prop = RNA_def_property(srna, "nurb_sel_vline", PROP_FLOAT, PROP
_COLOR_GAMMA); | |
1342 RNA_def_property_float_sdna(prop, NULL, "nurb_sel_vline"); | |
1343 RNA_def_property_array(prop, 3); | |
1344 RNA_def_property_ui_text(prop, "NURBS active V-lines", ""); | |
1345 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1346 | |
1347 prop = RNA_def_property(srna, "act_spline", PROP_FLOAT, PROP_COL
OR_GAMMA); | |
1348 RNA_def_property_float_sdna(prop, NULL, "act_spline"); | |
1349 RNA_def_property_array(prop, 3); | |
1350 RNA_def_property_ui_text(prop, "Active spline", ""); | |
1351 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1352 } | |
1353 | |
1354 prop = RNA_def_property(srna, "handle_free", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1355 RNA_def_property_float_sdna(prop, NULL, "handle_free"); | |
1356 RNA_def_property_array(prop, 3); | |
1357 RNA_def_property_ui_text(prop, "Free handle color", ""); | |
1358 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1359 | |
1360 prop = RNA_def_property(srna, "handle_auto", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1361 RNA_def_property_float_sdna(prop, NULL, "handle_auto"); | |
1362 RNA_def_property_array(prop, 3); | |
1363 RNA_def_property_ui_text(prop, "Auto handle color", ""); | |
1364 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1365 | |
1366 prop = RNA_def_property(srna, "handle_vect", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1367 RNA_def_property_float_sdna(prop, NULL, "handle_vect"); | |
1368 RNA_def_property_array(prop, 3); | |
1369 RNA_def_property_ui_text(prop, "Vector handle color", ""); | |
1370 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1371 | |
1372 prop = RNA_def_property(srna, "handle_align", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1373 RNA_def_property_float_sdna(prop, NULL, "handle_align"); | |
1374 RNA_def_property_array(prop, 3); | |
1375 RNA_def_property_ui_text(prop, "Align handle color", ""); | |
1376 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1377 | |
1378 prop = RNA_def_property(srna, "handle_sel_free", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
1379 RNA_def_property_float_sdna(prop, NULL, "handle_sel_free"); | |
1380 RNA_def_property_array(prop, 3); | |
1381 RNA_def_property_ui_text(prop, "Free handle selected color", ""); | |
1382 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1383 | |
1384 prop = RNA_def_property(srna, "handle_sel_auto", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
1385 RNA_def_property_float_sdna(prop, NULL, "handle_sel_auto"); | |
1386 RNA_def_property_array(prop, 3); | |
1387 RNA_def_property_ui_text(prop, "Auto handle selected color", ""); | |
1388 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1389 | |
1390 prop = RNA_def_property(srna, "handle_sel_vect", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
1391 RNA_def_property_float_sdna(prop, NULL, "handle_sel_vect"); | |
1392 RNA_def_property_array(prop, 3); | |
1393 RNA_def_property_ui_text(prop, "Vector handle selected color", ""); | |
1394 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1395 | |
1396 prop = RNA_def_property(srna, "handle_sel_align", PROP_FLOAT, PROP_COLOR
_GAMMA); | |
1397 RNA_def_property_float_sdna(prop, NULL, "handle_sel_align"); | |
1398 RNA_def_property_array(prop, 3); | |
1399 RNA_def_property_ui_text(prop, "Align handle selected color", ""); | |
1400 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1401 ········ | |
1402 if (incl_nurbs == 0) { | |
1403 /* assume that when nurbs are off, this is for 2D (i.e. anim) ed
itors */ | |
1404 prop = RNA_def_property(srna, "handle_auto_clamped", PROP_FLOAT,
PROP_COLOR_GAMMA); | |
1405 RNA_def_property_float_sdna(prop, NULL, "handle_auto_clamped"); | |
1406 RNA_def_property_array(prop, 3); | |
1407 RNA_def_property_ui_text(prop, "Auto-Clamped handle color", ""); | |
1408 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1409 ················ | |
1410 prop = RNA_def_property(srna, "handle_sel_auto_clamped", PROP_FL
OAT, PROP_COLOR_GAMMA); | |
1411 RNA_def_property_float_sdna(prop, NULL, "handle_sel_auto_clamped
"); | |
1412 RNA_def_property_array(prop, 3); | |
1413 RNA_def_property_ui_text(prop, "Auto-Clamped handle selected col
or", ""); | |
1414 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1415 } | |
1416 | |
1417 prop = RNA_def_property(srna, "lastsel_point", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1418 RNA_def_property_float_sdna(prop, NULL, "lastsel_point"); | |
1419 RNA_def_property_array(prop, 3); | |
1420 RNA_def_property_ui_text(prop, "Last selected point", ""); | |
1421 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1422 } | |
1423 | |
1424 static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna) | |
1425 { | |
1426 StructRNA *srna; | |
1427 PropertyRNA *prop; | |
1428 | |
1429 /* space_view3d */ | |
1430 | |
1431 srna = RNA_def_struct(brna, "ThemeView3D", NULL); | |
1432 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1433 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
1434 RNA_def_struct_ui_text(srna, "Theme 3D View", "Theme settings for the 3D
View"); | |
1435 | |
1436 rna_def_userdef_theme_spaces_gradient(srna); | |
1437 | |
1438 prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1439 RNA_def_property_array(prop, 3); | |
1440 RNA_def_property_ui_text(prop, "Grid", ""); | |
1441 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1442 | |
1443 prop = RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1444 RNA_def_property_array(prop, 3); | |
1445 RNA_def_property_ui_text(prop, "Wire", ""); | |
1446 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1447 | |
1448 prop = RNA_def_property(srna, "wire_edit", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
1449 RNA_def_property_array(prop, 3); | |
1450 RNA_def_property_ui_text(prop, "Wire Edit", ""); | |
1451 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1452 | |
1453 prop = RNA_def_property(srna, "lamp", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1454 RNA_def_property_array(prop, 4); | |
1455 RNA_def_property_ui_text(prop, "Lamp", ""); | |
1456 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1457 | |
1458 prop = RNA_def_property(srna, "speaker", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1459 RNA_def_property_array(prop, 3); | |
1460 RNA_def_property_ui_text(prop, "Speaker", ""); | |
1461 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1462 ········ | |
1463 prop = RNA_def_property(srna, "camera", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1464 RNA_def_property_array(prop, 3); | |
1465 RNA_def_property_ui_text(prop, "Camera", ""); | |
1466 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1467 | |
1468 prop = RNA_def_property(srna, "empty", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1469 RNA_def_property_array(prop, 3); | |
1470 RNA_def_property_ui_text(prop, "Empty", ""); | |
1471 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1472 | |
1473 prop = RNA_def_property(srna, "object_selected", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
1474 RNA_def_property_float_sdna(prop, NULL, "select"); | |
1475 RNA_def_property_array(prop, 3); | |
1476 RNA_def_property_ui_text(prop, "Object Selected", ""); | |
1477 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1478 | |
1479 prop = RNA_def_property(srna, "object_active", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1480 RNA_def_property_float_sdna(prop, NULL, "active"); | |
1481 RNA_def_property_array(prop, 3); | |
1482 RNA_def_property_ui_text(prop, "Active Object", ""); | |
1483 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1484 | |
1485 prop = RNA_def_property(srna, "object_grouped", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
1486 RNA_def_property_float_sdna(prop, NULL, "group"); | |
1487 RNA_def_property_array(prop, 3); | |
1488 RNA_def_property_ui_text(prop, "Object Grouped", ""); | |
1489 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1490 | |
1491 prop = RNA_def_property(srna, "object_grouped_active", PROP_FLOAT, PROP_
COLOR_GAMMA); | |
1492 RNA_def_property_float_sdna(prop, NULL, "group_active"); | |
1493 RNA_def_property_array(prop, 3); | |
1494 RNA_def_property_ui_text(prop, "Object Grouped Active", ""); | |
1495 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1496 | |
1497 prop = RNA_def_property(srna, "transform", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
1498 RNA_def_property_array(prop, 3); | |
1499 RNA_def_property_ui_text(prop, "Transform", ""); | |
1500 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1501 ········ | |
1502 rna_def_userdef_theme_spaces_vertex(srna); | |
1503 rna_def_userdef_theme_spaces_edge(srna); | |
1504 rna_def_userdef_theme_spaces_face(srna); | |
1505 rna_def_userdef_theme_spaces_curves(srna, 1); | |
1506 | |
1507 prop = RNA_def_property(srna, "extra_edge_len", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
1508 RNA_def_property_array(prop, 3); | |
1509 RNA_def_property_ui_text(prop, "Edge Length Text", ""); | |
1510 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1511 | |
1512 prop = RNA_def_property(srna, "extra_edge_angle", PROP_FLOAT, PROP_COLOR
_GAMMA); | |
1513 RNA_def_property_array(prop, 3); | |
1514 RNA_def_property_ui_text(prop, "Edge Angle Text", ""); | |
1515 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1516 | |
1517 prop = RNA_def_property(srna, "extra_face_angle", PROP_FLOAT, PROP_COLOR
_GAMMA); | |
1518 RNA_def_property_array(prop, 3); | |
1519 RNA_def_property_ui_text(prop, "Face Angle Text", ""); | |
1520 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1521 | |
1522 prop = RNA_def_property(srna, "extra_face_area", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
1523 RNA_def_property_array(prop, 3); | |
1524 RNA_def_property_ui_text(prop, "Face Area Text", ""); | |
1525 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1526 | |
1527 prop = RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
1528 RNA_def_property_array(prop, 4); | |
1529 RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", ""); | |
1530 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1531 | |
1532 prop = RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1533 RNA_def_property_array(prop, 3); | |
1534 RNA_def_property_ui_text(prop, "Face Normal", ""); | |
1535 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1536 | |
1537 prop = RNA_def_property(srna, "vertex_normal", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1538 RNA_def_property_array(prop, 3); | |
1539 RNA_def_property_ui_text(prop, "Vertex Normal", ""); | |
1540 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1541 | |
1542 prop = RNA_def_property(srna, "bone_solid", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1543 RNA_def_property_array(prop, 3); | |
1544 RNA_def_property_ui_text(prop, "Bone Solid", ""); | |
1545 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1546 | |
1547 prop = RNA_def_property(srna, "bone_pose", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
1548 RNA_def_property_array(prop, 3); | |
1549 RNA_def_property_ui_text(prop, "Bone Pose", ""); | |
1550 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1551 | |
1552 prop = RNA_def_property(srna, "bone_pose_active", PROP_FLOAT, PROP_COLOR
_GAMMA); | |
1553 RNA_def_property_array(prop, 3); | |
1554 RNA_def_property_ui_text(prop, "Bone Pose Active", ""); | |
1555 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1556 | |
1557 prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1558 RNA_def_property_float_sdna(prop, NULL, "cframe"); | |
1559 RNA_def_property_array(prop, 3); | |
1560 RNA_def_property_ui_text(prop, "Current Frame", ""); | |
1561 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1562 | |
1563 prop = RNA_def_property(srna, "outline_width", PROP_INT, PROP_NONE); | |
1564 RNA_def_property_range(prop, 1, 5); | |
1565 RNA_def_property_ui_text(prop, "Outline Width", ""); | |
1566 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1567 | |
1568 prop = RNA_def_property(srna, "bundle_solid", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
1569 RNA_def_property_float_sdna(prop, NULL, "bundle_solid"); | |
1570 RNA_def_property_array(prop, 3); | |
1571 RNA_def_property_ui_text(prop, "Bundle Solid", ""); | |
1572 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1573 | |
1574 prop = RNA_def_property(srna, "camera_path", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1575 RNA_def_property_float_sdna(prop, NULL, "camera_path"); | |
1576 RNA_def_property_array(prop, 3); | 1199 RNA_def_property_array(prop, 3); |
1577 RNA_def_property_ui_text(prop, "Camera Path", ""); | 1200 RNA_def_property_ui_text(prop, "Camera Path", ""); |
1578 RNA_def_property_update(prop, 0, "rna_userdef_update"); | 1201 RNA_def_property_update(prop, 0, "rna_userdef_update"); |
1579 | 1202 } |
1580 prop = RNA_def_property(srna, "skin_root", PROP_FLOAT, PROP_COLOR_GAMMA)
; | 1203 |
1581 RNA_def_property_array(prop, 3); | 1204 |
1582 RNA_def_property_ui_text(prop, "Skin Root", ""); | |
1583 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1584 } | |
1585 | |
1586 | |
1587 static void rna_def_userdef_theme_space_graph(BlenderRNA *brna) | |
1588 { | |
1589 StructRNA *srna; | |
1590 PropertyRNA *prop; | |
1591 | |
1592 /* space_graph */ | |
1593 | |
1594 srna = RNA_def_struct(brna, "ThemeGraphEditor", NULL); | |
1595 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1596 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
1597 RNA_def_struct_ui_text(srna, "Theme Graph Editor", "Theme settings for t
he graph editor"); | |
1598 | |
1599 rna_def_userdef_theme_spaces_main(srna); | |
1600 rna_def_userdef_theme_spaces_list_main(srna); | |
1601 | |
1602 prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1603 RNA_def_property_array(prop, 3); | |
1604 RNA_def_property_ui_text(prop, "Grid", ""); | |
1605 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1606 | |
1607 prop = RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
1608 RNA_def_property_float_sdna(prop, NULL, "shade1"); | |
1609 RNA_def_property_array(prop, 3); | |
1610 RNA_def_property_ui_text(prop, "Window Sliders", ""); | |
1611 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1612 | |
1613 prop = RNA_def_property(srna, "channels_region", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
1614 RNA_def_property_float_sdna(prop, NULL, "shade2"); | |
1615 RNA_def_property_array(prop, 3); | |
1616 RNA_def_property_ui_text(prop, "Channels Region", ""); | |
1617 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1618 ········ | |
1619 rna_def_userdef_theme_spaces_vertex(srna); | |
1620 rna_def_userdef_theme_spaces_curves(srna, 0); | |
1621 | |
1622 prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1623 RNA_def_property_float_sdna(prop, NULL, "cframe"); | |
1624 RNA_def_property_array(prop, 3); | |
1625 RNA_def_property_ui_text(prop, "Current Frame", ""); | |
1626 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1627 | |
1628 prop = RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1629 RNA_def_property_array(prop, 3); | |
1630 RNA_def_property_ui_text(prop, "Handle Vertex", ""); | |
1631 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1632 | |
1633 prop = RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_C
OLOR_GAMMA); | |
1634 RNA_def_property_array(prop, 3); | |
1635 RNA_def_property_ui_text(prop, "Handle Vertex Select", ""); | |
1636 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1637 | |
1638 prop = RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_NONE)
; | |
1639 RNA_def_property_range(prop, 0, 255); | |
1640 RNA_def_property_ui_text(prop, "Handle Vertex Size", ""); | |
1641 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1642 ········ | |
1643 prop = RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1644 RNA_def_property_float_sdna(prop, NULL, "group"); | |
1645 RNA_def_property_array(prop, 3); | |
1646 RNA_def_property_ui_text(prop, "Channel Group", ""); | |
1647 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1648 | |
1649 prop = RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_
COLOR_GAMMA); | |
1650 RNA_def_property_float_sdna(prop, NULL, "group_active"); | |
1651 RNA_def_property_array(prop, 3); | |
1652 RNA_def_property_ui_text(prop, "Active Channel Group", ""); | |
1653 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1654 ········ | |
1655 prop = RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLO
R_GAMMA); | |
1656 RNA_def_property_float_sdna(prop, NULL, "ds_channel"); | |
1657 RNA_def_property_array(prop, 3); | |
1658 RNA_def_property_ui_text(prop, "Dope Sheet Channel", ""); | |
1659 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1660 ········ | |
1661 prop = RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_C
OLOR_GAMMA); | |
1662 RNA_def_property_float_sdna(prop, NULL, "ds_subchannel"); | |
1663 RNA_def_property_array(prop, 3); | |
1664 RNA_def_property_ui_text(prop, "Dope Sheet Sub-Channel", ""); | |
1665 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1666 } | |
1667 | |
1668 static void rna_def_userdef_theme_space_file(BlenderRNA *brna) | |
1669 { | |
1670 StructRNA *srna; | |
1671 PropertyRNA *prop; | |
1672 | |
1673 /* space_file */ | |
1674 | |
1675 srna = RNA_def_struct(brna, "ThemeFileBrowser", NULL); | |
1676 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1677 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
1678 RNA_def_struct_ui_text(srna, "Theme File Browser", "Theme settings for t
he File Browser"); | |
1679 | |
1680 rna_def_userdef_theme_spaces_main(srna); | |
1681 rna_def_userdef_theme_spaces_list_main(srna); | |
1682 | |
1683 prop = RNA_def_property(srna, "selected_file", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1684 RNA_def_property_float_sdna(prop, NULL, "hilite"); | |
1685 RNA_def_property_array(prop, 3); | |
1686 RNA_def_property_ui_text(prop, "Selected File", ""); | |
1687 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1688 | |
1689 prop = RNA_def_property(srna, "scrollbar", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
1690 RNA_def_property_float_sdna(prop, NULL, "shade1"); | |
1691 RNA_def_property_array(prop, 3); | |
1692 RNA_def_property_ui_text(prop, "Scrollbar", ""); | |
1693 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1694 | |
1695 prop = RNA_def_property(srna, "scroll_handle", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1696 RNA_def_property_float_sdna(prop, NULL, "shade2"); | |
1697 RNA_def_property_array(prop, 3); | |
1698 RNA_def_property_ui_text(prop, "Scroll Handle", ""); | |
1699 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1700 | |
1701 prop = RNA_def_property(srna, "active_file", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1702 RNA_def_property_float_sdna(prop, NULL, "active"); | |
1703 RNA_def_property_array(prop, 3); | |
1704 RNA_def_property_ui_text(prop, "Active File", ""); | |
1705 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1706 ········ | |
1707 prop = RNA_def_property(srna, "active_file_text", PROP_FLOAT, PROP_COLOR
_GAMMA); | |
1708 RNA_def_property_float_sdna(prop, NULL, "grid"); | |
1709 RNA_def_property_array(prop, 3); | |
1710 RNA_def_property_ui_text(prop, "Active File Text", ""); | |
1711 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1712 } | |
1713 | |
1714 static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna) | |
1715 { | |
1716 StructRNA *srna; | |
1717 PropertyRNA *prop; | |
1718 | |
1719 /* space_outliner */ | |
1720 | |
1721 srna = RNA_def_struct(brna, "ThemeOutliner", NULL); | |
1722 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1723 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
1724 RNA_def_struct_ui_text(srna, "Theme Outliner", "Theme settings for the O
utliner"); | |
1725 | |
1726 rna_def_userdef_theme_spaces_main(srna); | |
1727 | |
1728 prop = RNA_def_property(srna, "match", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1729 RNA_def_property_array(prop, 3); | |
1730 RNA_def_property_ui_text(prop, "Filter Match", ""); | |
1731 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1732 | |
1733 prop = RNA_def_property(srna, "selected_highlight", PROP_FLOAT, PROP_COL
OR_GAMMA); | |
1734 RNA_def_property_array(prop, 3); | |
1735 RNA_def_property_ui_text(prop, "Selected Highlight", ""); | |
1736 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1737 } | |
1738 | |
1739 static void rna_def_userdef_theme_space_userpref(BlenderRNA *brna) | |
1740 { | |
1741 StructRNA *srna; | |
1742 | |
1743 /* space_userpref */ | |
1744 | |
1745 srna = RNA_def_struct(brna, "ThemeUserPreferences", NULL); | |
1746 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1747 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
1748 RNA_def_struct_ui_text(srna, "Theme User Preferences", "Theme settings f
or the User Preferences"); | |
1749 | |
1750 rna_def_userdef_theme_spaces_main(srna); | |
1751 } | |
1752 | |
1753 static void rna_def_userdef_theme_space_console(BlenderRNA *brna) | |
1754 { | |
1755 StructRNA *srna; | |
1756 PropertyRNA *prop; | |
1757 | |
1758 /* space_console */ | |
1759 | |
1760 srna = RNA_def_struct(brna, "ThemeConsole", NULL); | |
1761 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1762 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
1763 RNA_def_struct_ui_text(srna, "Theme Console", "Theme settings for the Co
nsole"); | |
1764 ········ | |
1765 rna_def_userdef_theme_spaces_main(srna); | |
1766 ········ | |
1767 prop = RNA_def_property(srna, "line_output", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1768 RNA_def_property_float_sdna(prop, NULL, "console_output"); | |
1769 RNA_def_property_array(prop, 3); | |
1770 RNA_def_property_ui_text(prop, "Line Output", ""); | |
1771 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1772 ········ | |
1773 prop = RNA_def_property(srna, "line_input", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1774 RNA_def_property_float_sdna(prop, NULL, "console_input"); | |
1775 RNA_def_property_array(prop, 3); | |
1776 RNA_def_property_ui_text(prop, "Line Input", ""); | |
1777 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1778 ········ | |
1779 prop = RNA_def_property(srna, "line_info", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
1780 RNA_def_property_float_sdna(prop, NULL, "console_info"); | |
1781 RNA_def_property_array(prop, 3); | |
1782 RNA_def_property_ui_text(prop, "Line Info", ""); | |
1783 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1784 ········ | |
1785 prop = RNA_def_property(srna, "line_error", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1786 RNA_def_property_float_sdna(prop, NULL, "console_error"); | |
1787 RNA_def_property_array(prop, 3); | |
1788 RNA_def_property_ui_text(prop, "Line Error", ""); | |
1789 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1790 ········ | |
1791 prop = RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1792 RNA_def_property_float_sdna(prop, NULL, "console_cursor"); | |
1793 RNA_def_property_array(prop, 3); | |
1794 RNA_def_property_ui_text(prop, "Cursor", ""); | |
1795 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1796 | |
1797 prop = RNA_def_property(srna, "select", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1798 RNA_def_property_float_sdna(prop, NULL, "console_select"); | |
1799 RNA_def_property_array(prop, 4); | |
1800 RNA_def_property_ui_text(prop, "Selection", ""); | |
1801 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1802 | |
1803 } | |
1804 | |
1805 static void rna_def_userdef_theme_space_info(BlenderRNA *brna) | |
1806 { | |
1807 StructRNA *srna; | |
1808 | |
1809 /* space_info */ | |
1810 | |
1811 srna = RNA_def_struct(brna, "ThemeInfo", NULL); | |
1812 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1813 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
1814 RNA_def_struct_ui_text(srna, "Theme Info", "Theme settings for Info"); | |
1815 | |
1816 rna_def_userdef_theme_spaces_main(srna); | |
1817 } | |
1818 | |
1819 | |
1820 static void rna_def_userdef_theme_space_text(BlenderRNA *brna) | |
1821 { | |
1822 StructRNA *srna; | |
1823 PropertyRNA *prop; | |
1824 | |
1825 /* space_text */ | |
1826 | |
1827 srna = RNA_def_struct(brna, "ThemeTextEditor", NULL); | |
1828 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1829 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
1830 RNA_def_struct_ui_text(srna, "Theme Text Editor", "Theme settings for th
e Text Editor"); | |
1831 | |
1832 rna_def_userdef_theme_spaces_main(srna); | |
1833 | |
1834 prop = RNA_def_property(srna, "line_numbers_background", PROP_FLOAT, PRO
P_COLOR_GAMMA); | |
1835 RNA_def_property_float_sdna(prop, NULL, "grid"); | |
1836 RNA_def_property_array(prop, 3); | |
1837 RNA_def_property_ui_text(prop, "Line Numbers Background", ""); | |
1838 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1839 | |
1840 /* no longer used */ | |
1841 #if 0 | |
1842 prop = RNA_def_property(srna, "scroll_bar", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1843 RNA_def_property_float_sdna(prop, NULL, "shade1"); | |
1844 RNA_def_property_array(prop, 3); | |
1845 RNA_def_property_ui_text(prop, "Scroll Bar", ""); | |
1846 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1847 #endif | |
1848 | |
1849 prop = RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1850 RNA_def_property_float_sdna(prop, NULL, "shade2"); | |
1851 RNA_def_property_array(prop, 3); | |
1852 RNA_def_property_ui_text(prop, "Selected Text", ""); | |
1853 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1854 | |
1855 prop = RNA_def_property(srna, "cursor", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1856 RNA_def_property_float_sdna(prop, NULL, "hilite"); | |
1857 RNA_def_property_array(prop, 3); | |
1858 RNA_def_property_ui_text(prop, "Cursor", ""); | |
1859 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1860 ········ | |
1861 prop = RNA_def_property(srna, "syntax_builtin", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
1862 RNA_def_property_float_sdna(prop, NULL, "syntaxb"); | |
1863 RNA_def_property_array(prop, 3); | |
1864 RNA_def_property_ui_text(prop, "Syntax Built-in", ""); | |
1865 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1866 ········ | |
1867 prop = RNA_def_property(srna, "syntax_symbols", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
1868 RNA_def_property_float_sdna(prop, NULL, "syntaxs"); | |
1869 RNA_def_property_array(prop, 3); | |
1870 RNA_def_property_ui_text(prop, "Syntax Symbols", ""); | |
1871 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1872 | |
1873 prop = RNA_def_property(srna, "syntax_special", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
1874 RNA_def_property_float_sdna(prop, NULL, "syntaxv"); | |
1875 RNA_def_property_array(prop, 3); | |
1876 RNA_def_property_ui_text(prop, "Syntax Special", ""); | |
1877 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1878 | |
1879 prop = RNA_def_property(srna, "syntax_preprocessor", PROP_FLOAT, PROP_CO
LOR_GAMMA); | |
1880 RNA_def_property_float_sdna(prop, NULL, "syntaxd"); | |
1881 RNA_def_property_array(prop, 3); | |
1882 RNA_def_property_ui_text(prop, "Syntax PreProcessor", ""); | |
1883 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1884 | |
1885 prop = RNA_def_property(srna, "syntax_reserved", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
1886 RNA_def_property_float_sdna(prop, NULL, "syntaxr"); | |
1887 RNA_def_property_array(prop, 3); | |
1888 RNA_def_property_ui_text(prop, "Syntax Reserved", ""); | |
1889 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1890 | |
1891 prop = RNA_def_property(srna, "syntax_comment", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
1892 RNA_def_property_float_sdna(prop, NULL, "syntaxc"); | |
1893 RNA_def_property_array(prop, 3); | |
1894 RNA_def_property_ui_text(prop, "Syntax Comment", ""); | |
1895 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1896 ········ | |
1897 prop = RNA_def_property(srna, "syntax_string", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1898 RNA_def_property_float_sdna(prop, NULL, "syntaxl"); | |
1899 RNA_def_property_array(prop, 3); | |
1900 RNA_def_property_ui_text(prop, "Syntax String", ""); | |
1901 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1902 | |
1903 prop = RNA_def_property(srna, "syntax_numbers", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
1904 RNA_def_property_float_sdna(prop, NULL, "syntaxn"); | |
1905 RNA_def_property_array(prop, 3); | |
1906 RNA_def_property_ui_text(prop, "Syntax Numbers", ""); | |
1907 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1908 } | |
1909 | |
1910 static void rna_def_userdef_theme_space_node(BlenderRNA *brna) | |
1911 { | |
1912 StructRNA *srna; | |
1913 PropertyRNA *prop; | |
1914 | |
1915 /* space_node */ | |
1916 | |
1917 srna = RNA_def_struct(brna, "ThemeNodeEditor", NULL); | |
1918 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
1919 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
1920 RNA_def_struct_ui_text(srna, "Theme Node Editor", "Theme settings for th
e Node Editor"); | |
1921 | |
1922 rna_def_userdef_theme_spaces_main(srna); | |
1923 rna_def_userdef_theme_spaces_list_main(srna); | |
1924 | |
1925 prop = RNA_def_property(srna, "node_selected", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1926 RNA_def_property_float_sdna(prop, NULL, "select"); | |
1927 RNA_def_property_array(prop, 3); | |
1928 RNA_def_property_ui_text(prop, "Node Selected", ""); | |
1929 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1930 | |
1931 prop = RNA_def_property(srna, "node_active", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1932 RNA_def_property_float_sdna(prop, NULL, "active"); | |
1933 RNA_def_property_array(prop, 3); | |
1934 RNA_def_property_ui_text(prop, "Active Node", ""); | |
1935 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1936 | |
1937 prop = RNA_def_property(srna, "wire", PROP_FLOAT, PROP_COLOR_GAMMA); | |
1938 RNA_def_property_float_sdna(prop, NULL, "wire"); | |
1939 RNA_def_property_array(prop, 3); | |
1940 RNA_def_property_ui_text(prop, "Wires", ""); | |
1941 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1942 | |
1943 prop = RNA_def_property(srna, "wire_select", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1944 RNA_def_property_float_sdna(prop, NULL, "edge_select"); | |
1945 RNA_def_property_array(prop, 3); | |
1946 RNA_def_property_ui_text(prop, "Wire Select", ""); | |
1947 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1948 | |
1949 prop = RNA_def_property(srna, "selected_text", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1950 RNA_def_property_float_sdna(prop, NULL, "shade2"); | |
1951 RNA_def_property_array(prop, 3); | |
1952 RNA_def_property_ui_text(prop, "Selected Text", ""); | |
1953 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1954 | |
1955 prop = RNA_def_property(srna, "node_backdrop", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1956 RNA_def_property_float_sdna(prop, NULL, "syntaxl"); | |
1957 RNA_def_property_array(prop, 4); | |
1958 RNA_def_property_ui_text(prop, "Node Backdrop", ""); | |
1959 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1960 ········ | |
1961 prop = RNA_def_property(srna, "in_out_node", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
1962 RNA_def_property_float_sdna(prop, NULL, "syntaxn"); | |
1963 RNA_def_property_array(prop, 3); | |
1964 RNA_def_property_ui_text(prop, "In/Out Node", ""); | |
1965 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1966 | |
1967 prop = RNA_def_property(srna, "converter_node", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
1968 RNA_def_property_float_sdna(prop, NULL, "syntaxv"); | |
1969 RNA_def_property_array(prop, 3); | |
1970 RNA_def_property_ui_text(prop, "Converter Node", ""); | |
1971 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1972 ········ | |
1973 prop = RNA_def_property(srna, "operator_node", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
1974 RNA_def_property_float_sdna(prop, NULL, "syntaxb"); | |
1975 RNA_def_property_array(prop, 3); | |
1976 RNA_def_property_ui_text(prop, "Operator Node", ""); | |
1977 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1978 | |
1979 prop = RNA_def_property(srna, "group_node", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1980 RNA_def_property_float_sdna(prop, NULL, "syntaxc"); | |
1981 RNA_def_property_array(prop, 3); | |
1982 RNA_def_property_ui_text(prop, "Group Node", ""); | |
1983 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1984 | |
1985 prop = RNA_def_property(srna, "group_socket_node", PROP_FLOAT, PROP_COLO
R_GAMMA); | |
1986 RNA_def_property_float_sdna(prop, NULL, "console_output"); | |
1987 RNA_def_property_array(prop, 3); | |
1988 RNA_def_property_ui_text(prop, "Group Socket Node", ""); | |
1989 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1990 | |
1991 prop = RNA_def_property(srna, "frame_node", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1992 RNA_def_property_float_sdna(prop, NULL, "movie"); | |
1993 RNA_def_property_array(prop, 4); | |
1994 RNA_def_property_ui_text(prop, "Frame Node", ""); | |
1995 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
1996 ········ | |
1997 prop = RNA_def_property(srna, "matte_node", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
1998 RNA_def_property_float_sdna(prop, NULL, "syntaxs"); | |
1999 RNA_def_property_array(prop, 3); | |
2000 RNA_def_property_ui_text(prop, "Matte Node", ""); | |
2001 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2002 | |
2003 prop = RNA_def_property(srna, "distor_node", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
2004 RNA_def_property_float_sdna(prop, NULL, "syntaxd"); | |
2005 RNA_def_property_array(prop, 3); | |
2006 RNA_def_property_ui_text(prop, "Distort Node", ""); | |
2007 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2008 | |
2009 prop = RNA_def_property(srna, "noodle_curving", PROP_INT, PROP_NONE); | |
2010 RNA_def_property_int_sdna(prop, NULL, "noodle_curving"); | |
2011 RNA_def_property_int_default(prop, 5); | |
2012 RNA_def_property_range(prop, 0, 10); | |
2013 RNA_def_property_ui_text(prop, "Noodle curving", "Curving of the noodle"
); | |
2014 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2015 } | |
2016 | |
2017 static void rna_def_userdef_theme_space_logic(BlenderRNA *brna) | |
2018 { | |
2019 StructRNA *srna; | |
2020 // PropertyRNA *prop; | |
2021 ········ | |
2022 /* space_logic */ | |
2023 ········ | |
2024 srna = RNA_def_struct(brna, "ThemeLogicEditor", NULL); | |
2025 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
2026 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
2027 RNA_def_struct_ui_text(srna, "Theme Logic Editor", "Theme settings for t
he Logic Editor"); | |
2028 ········ | |
2029 rna_def_userdef_theme_spaces_main(srna); | |
2030 ········ | |
2031 } | |
2032 | |
2033 | |
2034 static void rna_def_userdef_theme_space_buts(BlenderRNA *brna) | |
2035 { | |
2036 StructRNA *srna; | |
2037 // PropertyRNA *prop; | |
2038 | |
2039 /* space_buts */ | |
2040 | |
2041 srna = RNA_def_struct(brna, "ThemeProperties", NULL); | |
2042 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
2043 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
2044 RNA_def_struct_ui_text(srna, "Theme Properties", "Theme settings for the
Properties"); | |
2045 | |
2046 rna_def_userdef_theme_spaces_main(srna); | |
2047 | |
2048 } | |
2049 | |
2050 static void rna_def_userdef_theme_space_time(BlenderRNA *brna) | |
2051 { | |
2052 StructRNA *srna; | |
2053 PropertyRNA *prop; | |
2054 | |
2055 /* space_time */ | |
2056 | |
2057 srna = RNA_def_struct(brna, "ThemeTimeline", NULL); | |
2058 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
2059 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
2060 RNA_def_struct_ui_text(srna, "Theme Timeline", "Theme settings for the T
imeline"); | |
2061 | |
2062 rna_def_userdef_theme_spaces_main(srna); | |
2063 | |
2064 prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2065 RNA_def_property_array(prop, 3); | |
2066 RNA_def_property_ui_text(prop, "Grid", ""); | |
2067 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2068 | |
2069 prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
2070 RNA_def_property_float_sdna(prop, NULL, "cframe"); | |
2071 RNA_def_property_array(prop, 3); | |
2072 RNA_def_property_ui_text(prop, "Current Frame", ""); | |
2073 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2074 } | |
2075 | |
2076 static void rna_def_userdef_theme_space_image(BlenderRNA *brna) | |
2077 { | |
2078 StructRNA *srna; | |
2079 PropertyRNA *prop; | |
2080 | |
2081 /* space_image */ | |
2082 | |
2083 srna = RNA_def_struct(brna, "ThemeImageEditor", NULL); | |
2084 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
2085 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
2086 RNA_def_struct_ui_text(srna, "Theme Image Editor", "Theme settings for t
he Image Editor"); | |
2087 | |
2088 rna_def_userdef_theme_spaces_main(srna); | |
2089 rna_def_userdef_theme_spaces_vertex(srna); | |
2090 rna_def_userdef_theme_spaces_face(srna); | |
2091 | |
2092 prop = RNA_def_property(srna, "editmesh_active", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
2093 RNA_def_property_array(prop, 4); | |
2094 RNA_def_property_ui_text(prop, "Active Vert/Edge/Face", ""); | |
2095 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2096 ········ | |
2097 prop = RNA_def_property(srna, "scope_back", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
2098 RNA_def_property_float_sdna(prop, NULL, "preview_back"); | |
2099 RNA_def_property_array(prop, 4); | |
2100 RNA_def_property_ui_text(prop, "Scope region background color", ""); | |
2101 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2102 | |
2103 prop = RNA_def_property(srna, "preview_stitch_face", PROP_FLOAT, PROP_CO
LOR_GAMMA); | |
2104 RNA_def_property_float_sdna(prop, NULL, "preview_stitch_face"); | |
2105 RNA_def_property_array(prop, 4); | |
2106 RNA_def_property_ui_text(prop, "Stitch preview face color", ""); | |
2107 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2108 | |
2109 prop = RNA_def_property(srna, "preview_stitch_edge", PROP_FLOAT, PROP_CO
LOR_GAMMA); | |
2110 RNA_def_property_float_sdna(prop, NULL, "preview_stitch_edge"); | |
2111 RNA_def_property_array(prop, 4); | |
2112 RNA_def_property_ui_text(prop, "Stitch preview edge color", ""); | |
2113 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2114 | |
2115 prop = RNA_def_property(srna, "preview_stitch_vert", PROP_FLOAT, PROP_CO
LOR_GAMMA); | |
2116 RNA_def_property_float_sdna(prop, NULL, "preview_stitch_vert"); | |
2117 RNA_def_property_array(prop, 4); | |
2118 RNA_def_property_ui_text(prop, "Stitch preview vertex color", ""); | |
2119 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2120 | |
2121 prop = RNA_def_property(srna, "preview_stitch_stitchable", PROP_FLOAT, P
ROP_COLOR_GAMMA); | |
2122 RNA_def_property_float_sdna(prop, NULL, "preview_stitch_stitchable"); | |
2123 RNA_def_property_array(prop, 4); | |
2124 RNA_def_property_ui_text(prop, "Stitch preview stitchable color", ""); | |
2125 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2126 | |
2127 prop = RNA_def_property(srna, "preview_stitch_unstitchable", PROP_FLOAT,
PROP_COLOR_GAMMA); | |
2128 RNA_def_property_float_sdna(prop, NULL, "preview_stitch_unstitchable"); | |
2129 RNA_def_property_array(prop, 4); | |
2130 RNA_def_property_ui_text(prop, "Stitch preview unstitchable color", ""); | |
2131 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2132 | |
2133 prop = RNA_def_property(srna, "preview_stitch_active", PROP_FLOAT, PROP_
COLOR_GAMMA); | |
2134 RNA_def_property_float_sdna(prop, NULL, "preview_stitch_active"); | |
2135 RNA_def_property_array(prop, 4); | |
2136 RNA_def_property_ui_text(prop, "Stitch preview active island", ""); | |
2137 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2138 | |
2139 prop = RNA_def_property(srna, "uv_shadow", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
2140 RNA_def_property_float_sdna(prop, NULL, "uv_shadow"); | |
2141 RNA_def_property_array(prop, 4); | |
2142 RNA_def_property_ui_text(prop, "Texture paint/Modifier UVs", ""); | |
2143 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2144 | |
2145 prop = RNA_def_property(srna, "uv_others", PROP_FLOAT, PROP_COLOR_GAMMA)
; | |
2146 RNA_def_property_float_sdna(prop, NULL, "uv_others"); | |
2147 RNA_def_property_array(prop, 4); | |
2148 RNA_def_property_ui_text(prop, "Other Object UVs", ""); | |
2149 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2150 } | |
2151 | |
2152 static void rna_def_userdef_theme_space_seq(BlenderRNA *brna) | |
2153 { | |
2154 StructRNA *srna; | |
2155 PropertyRNA *prop; | |
2156 | |
2157 /* space_seq */ | |
2158 | |
2159 srna = RNA_def_struct(brna, "ThemeSequenceEditor", NULL); | |
2160 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
2161 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
2162 RNA_def_struct_ui_text(srna, "Theme Sequence Editor", "Theme settings fo
r the Sequence Editor"); | |
2163 | |
2164 rna_def_userdef_theme_spaces_main(srna); | |
2165 | |
2166 prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2167 RNA_def_property_array(prop, 3); | |
2168 RNA_def_property_ui_text(prop, "Grid", ""); | |
2169 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2170 | |
2171 prop = RNA_def_property(srna, "window_sliders", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
2172 RNA_def_property_float_sdna(prop, NULL, "shade1"); | |
2173 RNA_def_property_array(prop, 3); | |
2174 RNA_def_property_ui_text(prop, "Window Sliders", ""); | |
2175 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2176 | |
2177 prop = RNA_def_property(srna, "movie_strip", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
2178 RNA_def_property_float_sdna(prop, NULL, "movie"); | |
2179 RNA_def_property_array(prop, 3); | |
2180 RNA_def_property_ui_text(prop, "Movie Strip", ""); | |
2181 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2182 | |
2183 prop = RNA_def_property(srna, "movieclip_strip", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
2184 RNA_def_property_float_sdna(prop, NULL, "movieclip"); | |
2185 RNA_def_property_array(prop, 3); | |
2186 RNA_def_property_ui_text(prop, "Clip Strip", ""); | |
2187 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2188 | |
2189 prop = RNA_def_property(srna, "image_strip", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
2190 RNA_def_property_float_sdna(prop, NULL, "image"); | |
2191 RNA_def_property_array(prop, 3); | |
2192 RNA_def_property_ui_text(prop, "Image Strip", ""); | |
2193 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2194 | |
2195 prop = RNA_def_property(srna, "scene_strip", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
2196 RNA_def_property_float_sdna(prop, NULL, "scene"); | |
2197 RNA_def_property_array(prop, 3); | |
2198 RNA_def_property_ui_text(prop, "Scene Strip", ""); | |
2199 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2200 | |
2201 prop = RNA_def_property(srna, "audio_strip", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
2202 RNA_def_property_float_sdna(prop, NULL, "audio"); | |
2203 RNA_def_property_array(prop, 3); | |
2204 RNA_def_property_ui_text(prop, "Audio Strip", ""); | |
2205 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2206 | |
2207 prop = RNA_def_property(srna, "effect_strip", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
2208 RNA_def_property_float_sdna(prop, NULL, "effect"); | |
2209 RNA_def_property_array(prop, 3); | |
2210 RNA_def_property_ui_text(prop, "Effect Strip", ""); | |
2211 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2212 | |
2213 prop = RNA_def_property(srna, "transition_strip", PROP_FLOAT, PROP_COLOR
_GAMMA); | |
2214 RNA_def_property_float_sdna(prop, NULL, "transition"); | |
2215 RNA_def_property_array(prop, 3); | |
2216 RNA_def_property_ui_text(prop, "Transition Strip", ""); | |
2217 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2218 | |
2219 prop = RNA_def_property(srna, "meta_strip", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
2220 RNA_def_property_float_sdna(prop, NULL, "meta"); | |
2221 RNA_def_property_array(prop, 3); | |
2222 RNA_def_property_ui_text(prop, "Meta Strip", ""); | |
2223 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2224 | |
2225 prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
2226 RNA_def_property_float_sdna(prop, NULL, "cframe"); | |
2227 RNA_def_property_array(prop, 3); | |
2228 RNA_def_property_ui_text(prop, "Current Frame", ""); | |
2229 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2230 | |
2231 prop = RNA_def_property(srna, "keyframe", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2232 RNA_def_property_float_sdna(prop, NULL, "vertex_select"); | |
2233 RNA_def_property_array(prop, 3); | |
2234 RNA_def_property_ui_text(prop, "Keyframe", ""); | |
2235 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2236 | |
2237 prop = RNA_def_property(srna, "draw_action", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
2238 RNA_def_property_float_sdna(prop, NULL, "bone_pose"); | |
2239 RNA_def_property_array(prop, 3); | |
2240 RNA_def_property_ui_text(prop, "Draw Action", ""); | |
2241 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2242 ········ | |
2243 prop = RNA_def_property(srna, "preview_back", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
2244 RNA_def_property_float_sdna(prop, NULL, "preview_back"); | |
2245 RNA_def_property_array(prop, 3); | |
2246 RNA_def_property_ui_text(prop, "Preview Background", ""); | |
2247 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2248 } | |
2249 | |
2250 static void rna_def_userdef_theme_space_action(BlenderRNA *brna) | |
2251 { | |
2252 StructRNA *srna; | |
2253 PropertyRNA *prop; | |
2254 | |
2255 /* space_action */ | |
2256 | |
2257 srna = RNA_def_struct(brna, "ThemeDopeSheet", NULL); | |
2258 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
2259 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
2260 RNA_def_struct_ui_text(srna, "Theme Dope Sheet", "Theme settings for the
Dope Sheet"); | |
2261 | |
2262 rna_def_userdef_theme_spaces_main(srna); | |
2263 rna_def_userdef_theme_spaces_list_main(srna); | |
2264 | |
2265 prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2266 RNA_def_property_array(prop, 3); | |
2267 RNA_def_property_ui_text(prop, "Grid", ""); | |
2268 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2269 | |
2270 prop = RNA_def_property(srna, "value_sliders", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
2271 RNA_def_property_float_sdna(prop, NULL, "face"); | |
2272 RNA_def_property_array(prop, 3); | |
2273 RNA_def_property_ui_text(prop, "Value Sliders", ""); | |
2274 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2275 | |
2276 prop = RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
2277 RNA_def_property_float_sdna(prop, NULL, "shade1"); | |
2278 RNA_def_property_array(prop, 3); | |
2279 RNA_def_property_ui_text(prop, "View Sliders", ""); | |
2280 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2281 | |
2282 prop = RNA_def_property(srna, "channels", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2283 RNA_def_property_float_sdna(prop, NULL, "shade2"); | |
2284 RNA_def_property_array(prop, 3); | |
2285 RNA_def_property_ui_text(prop, "Channels", ""); | |
2286 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2287 | |
2288 prop = RNA_def_property(srna, "channels_selected", PROP_FLOAT, PROP_COLO
R_GAMMA); | |
2289 RNA_def_property_float_sdna(prop, NULL, "hilite"); | |
2290 RNA_def_property_array(prop, 3); | |
2291 RNA_def_property_ui_text(prop, "Channels Selected", ""); | |
2292 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2293 | |
2294 prop = RNA_def_property(srna, "channel_group", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
2295 RNA_def_property_float_sdna(prop, NULL, "group"); | |
2296 RNA_def_property_array(prop, 3); | |
2297 RNA_def_property_ui_text(prop, "Channel Group", ""); | |
2298 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2299 | |
2300 prop = RNA_def_property(srna, "active_channels_group", PROP_FLOAT, PROP_
COLOR_GAMMA); | |
2301 RNA_def_property_float_sdna(prop, NULL, "group_active"); | |
2302 RNA_def_property_array(prop, 3); | |
2303 RNA_def_property_ui_text(prop, "Active Channel Group", ""); | |
2304 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2305 | |
2306 prop = RNA_def_property(srna, "long_key", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2307 RNA_def_property_float_sdna(prop, NULL, "strip"); | |
2308 RNA_def_property_array(prop, 3); | |
2309 RNA_def_property_ui_text(prop, "Long Key", ""); | |
2310 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2311 | |
2312 prop = RNA_def_property(srna, "long_key_selected", PROP_FLOAT, PROP_COLO
R_GAMMA); | |
2313 RNA_def_property_float_sdna(prop, NULL, "strip_select"); | |
2314 RNA_def_property_array(prop, 3); | |
2315 RNA_def_property_ui_text(prop, "Long Key Selected", ""); | |
2316 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2317 | |
2318 prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
2319 RNA_def_property_float_sdna(prop, NULL, "cframe"); | |
2320 RNA_def_property_array(prop, 3); | |
2321 RNA_def_property_ui_text(prop, "Current Frame", ""); | |
2322 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2323 ········ | |
2324 prop = RNA_def_property(srna, "dopesheet_channel", PROP_FLOAT, PROP_COLO
R_GAMMA); | |
2325 RNA_def_property_float_sdna(prop, NULL, "ds_channel"); | |
2326 RNA_def_property_array(prop, 3); | |
2327 RNA_def_property_ui_text(prop, "Dope Sheet Channel", ""); | |
2328 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2329 ········ | |
2330 prop = RNA_def_property(srna, "dopesheet_subchannel", PROP_FLOAT, PROP_C
OLOR_GAMMA); | |
2331 RNA_def_property_float_sdna(prop, NULL, "ds_subchannel"); | |
2332 RNA_def_property_array(prop, 3); | |
2333 RNA_def_property_ui_text(prop, "Dope Sheet Sub-Channel", ""); | |
2334 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2335 ········ | |
2336 prop = RNA_def_property(srna, "summary", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2337 RNA_def_property_float_sdna(prop, NULL, "anim_active"); | |
2338 RNA_def_property_array(prop, 4); | |
2339 RNA_def_property_ui_text(prop, "Summary", "Color of summary channel"); | |
2340 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2341 } | |
2342 | |
2343 static void rna_def_userdef_theme_space_nla(BlenderRNA *brna) | |
2344 { | |
2345 StructRNA *srna; | |
2346 PropertyRNA *prop; | |
2347 | |
2348 /* space_nla */ | |
2349 | |
2350 srna = RNA_def_struct(brna, "ThemeNLAEditor", NULL); | |
2351 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
2352 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
2353 RNA_def_struct_ui_text(srna, "Theme NLA Editor", "Theme settings for the
NLA Editor"); | |
2354 | |
2355 rna_def_userdef_theme_spaces_main(srna); | |
2356 rna_def_userdef_theme_spaces_list_main(srna); | |
2357 | |
2358 prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2359 RNA_def_property_array(prop, 3); | |
2360 RNA_def_property_ui_text(prop, "Grid", ""); | |
2361 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2362 | |
2363 prop = RNA_def_property(srna, "view_sliders", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
2364 RNA_def_property_float_sdna(prop, NULL, "shade1"); | |
2365 RNA_def_property_array(prop, 3); | |
2366 RNA_def_property_ui_text(prop, "View Sliders", ""); | |
2367 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2368 ········ | |
2369 prop = RNA_def_property(srna, "active_action", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
2370 RNA_def_property_float_sdna(prop, NULL, "anim_active"); | |
2371 RNA_def_property_array(prop, 4); | |
2372 RNA_def_property_ui_text(prop, "Active Action", "Animation data block ha
s active action"); | |
2373 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2374 ········ | |
2375 prop = RNA_def_property(srna, "active_action_unset", PROP_FLOAT, PROP_CO
LOR_GAMMA); | |
2376 RNA_def_property_float_sdna(prop, NULL, "anim_non_active"); | |
2377 RNA_def_property_array(prop, 4); | |
2378 RNA_def_property_ui_text(prop, "No Active Action", "Animation data block
doesn't have active action"); | |
2379 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2380 ········ | |
2381 prop = RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2382 RNA_def_property_float_sdna(prop, NULL, "strip"); | |
2383 RNA_def_property_array(prop, 3); | |
2384 RNA_def_property_ui_text(prop, "Strips", "Action-Clip Strip - Unselected
"); | |
2385 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2386 ········ | |
2387 prop = RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
2388 RNA_def_property_float_sdna(prop, NULL, "strip_select"); | |
2389 RNA_def_property_array(prop, 3); | |
2390 RNA_def_property_ui_text(prop, "Strips Selected", "Action-Clip Strip - S
elected"); | |
2391 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2392 ········ | |
2393 prop = RNA_def_property(srna, "transition_strips", PROP_FLOAT, PROP_COLO
R_GAMMA); | |
2394 RNA_def_property_float_sdna(prop, NULL, "nla_transition"); | |
2395 RNA_def_property_array(prop, 3); | |
2396 RNA_def_property_ui_text(prop, "Transitions", "Transition Strip - Unsele
cted"); | |
2397 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2398 ········ | |
2399 prop = RNA_def_property(srna, "transition_strips_selected", PROP_FLOAT,
PROP_COLOR_GAMMA); | |
2400 RNA_def_property_float_sdna(prop, NULL, "nla_transition_sel"); | |
2401 RNA_def_property_array(prop, 3); | |
2402 RNA_def_property_ui_text(prop, "Transitions Selected", "Transition Strip
- Selected"); | |
2403 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2404 ········ | |
2405 prop = RNA_def_property(srna, "meta_strips", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
2406 RNA_def_property_float_sdna(prop, NULL, "nla_meta"); | |
2407 RNA_def_property_array(prop, 3); | |
2408 RNA_def_property_ui_text(prop, "Meta Strips", "Meta Strip - Unselected (
for grouping related strips)"); | |
2409 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2410 ········ | |
2411 prop = RNA_def_property(srna, "meta_strips_selected", PROP_FLOAT, PROP_C
OLOR_GAMMA); | |
2412 RNA_def_property_float_sdna(prop, NULL, "nla_meta_sel"); | |
2413 RNA_def_property_array(prop, 3); | |
2414 RNA_def_property_ui_text(prop, "Meta Strips Selected", "Meta Strip - Sel
ected (for grouping related strips)"); | |
2415 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2416 ········ | |
2417 prop = RNA_def_property(srna, "sound_strips", PROP_FLOAT, PROP_COLOR_GAM
MA); | |
2418 RNA_def_property_float_sdna(prop, NULL, "nla_sound"); | |
2419 RNA_def_property_array(prop, 3); | |
2420 RNA_def_property_ui_text(prop, "Sound Strips",· | |
2421 "Sound Strip - Unselected (for timing speaker s
ounds)"); | |
2422 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2423 ········ | |
2424 prop = RNA_def_property(srna, "sound_strips_selected", PROP_FLOAT, PROP_
COLOR_GAMMA); | |
2425 RNA_def_property_float_sdna(prop, NULL, "nla_sound_sel"); | |
2426 RNA_def_property_array(prop, 3); | |
2427 RNA_def_property_ui_text(prop, "Sound Strips Selected",· | |
2428 "Sound Strip - Selected (for timing speaker sou
nds)"); | |
2429 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2430 ········ | |
2431 prop = RNA_def_property(srna, "tweak", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2432 RNA_def_property_float_sdna(prop, NULL, "nla_tweaking"); | |
2433 RNA_def_property_array(prop, 3); | |
2434 RNA_def_property_ui_text(prop, "Tweak", "Color for strip/action being 't
weaked' or edited"); | |
2435 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2436 ········ | |
2437 prop = RNA_def_property(srna, "tweak_duplicate", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
2438 RNA_def_property_float_sdna(prop, NULL, "nla_tweakdupli"); | |
2439 RNA_def_property_array(prop, 3); | |
2440 RNA_def_property_ui_text(prop, "Tweak Duplicate Flag",· | |
2441 "Warning/error indicator color for strips refer
encing the strip being tweaked"); | |
2442 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2443 | |
2444 prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
2445 RNA_def_property_float_sdna(prop, NULL, "cframe"); | |
2446 RNA_def_property_array(prop, 3); | |
2447 RNA_def_property_ui_text(prop, "Current Frame", ""); | |
2448 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2449 } | |
2450 | |
2451 static void rna_def_userdef_theme_colorset(BlenderRNA *brna) | |
2452 { | |
2453 StructRNA *srna; | |
2454 PropertyRNA *prop; | |
2455 | |
2456 srna = RNA_def_struct(brna, "ThemeBoneColorSet", NULL); | |
2457 RNA_def_struct_sdna(srna, "ThemeWireColor"); | |
2458 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
2459 RNA_def_struct_ui_text(srna, "Theme Bone Color Set", "Theme settings for
bone color sets"); | |
2460 | |
2461 prop = RNA_def_property(srna, "normal", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2462 RNA_def_property_float_sdna(prop, NULL, "solid"); | |
2463 RNA_def_property_array(prop, 3); | |
2464 RNA_def_property_ui_text(prop, "Normal", "Color used for the surface of
bones"); | |
2465 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2466 | |
2467 prop = RNA_def_property(srna, "select", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2468 RNA_def_property_float_sdna(prop, NULL, "select"); | |
2469 RNA_def_property_array(prop, 3); | |
2470 RNA_def_property_ui_text(prop, "Select", "Color used for selected bones"
); | |
2471 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2472 | |
2473 prop = RNA_def_property(srna, "active", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2474 RNA_def_property_array(prop, 3); | |
2475 RNA_def_property_ui_text(prop, "Active", "Color used for active bones"); | |
2476 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2477 | |
2478 prop = RNA_def_property(srna, "show_colored_constraints", PROP_BOOLEAN,
PROP_NONE); | |
2479 RNA_def_property_boolean_sdna(prop, NULL, "flag", TH_WIRECOLOR_CONSTCOLS
); | |
2480 RNA_def_property_ui_text(prop, "Colored Constraints", | |
2481 "Allow the use of colors indicating constraints
/keyed status"); | |
2482 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2483 } | |
2484 | |
2485 static void rna_def_userdef_theme_space_clip(BlenderRNA *brna) | |
2486 { | |
2487 StructRNA *srna; | |
2488 PropertyRNA *prop; | |
2489 | |
2490 /* space_clip */ | |
2491 | |
2492 srna = RNA_def_struct(brna, "ThemeClipEditor", NULL); | |
2493 RNA_def_struct_sdna(srna, "ThemeSpace"); | |
2494 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
2495 RNA_def_struct_ui_text(srna, "Theme Clip Editor", "Theme settings for th
e Movie Clip Editor"); | |
2496 | |
2497 rna_def_userdef_theme_spaces_main(srna); | |
2498 rna_def_userdef_theme_spaces_list_main(srna); | |
2499 | |
2500 prop = RNA_def_property(srna, "marker_outline", PROP_FLOAT, PROP_COLOR_G
AMMA); | |
2501 RNA_def_property_float_sdna(prop, NULL, "marker_outline"); | |
2502 RNA_def_property_array(prop, 3); | |
2503 RNA_def_property_ui_text(prop, "Marker Outline Color", "Color of marker'
s outline"); | |
2504 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2505 | |
2506 prop = RNA_def_property(srna, "marker", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2507 RNA_def_property_float_sdna(prop, NULL, "marker"); | |
2508 RNA_def_property_array(prop, 3); | |
2509 RNA_def_property_ui_text(prop, "Marker Color", "Color of marker"); | |
2510 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2511 | |
2512 prop = RNA_def_property(srna, "active_marker", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
2513 RNA_def_property_float_sdna(prop, NULL, "act_marker"); | |
2514 RNA_def_property_array(prop, 3); | |
2515 RNA_def_property_ui_text(prop, "Active Marker", "Color of active marker"
); | |
2516 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2517 | |
2518 prop = RNA_def_property(srna, "selected_marker", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
2519 RNA_def_property_float_sdna(prop, NULL, "sel_marker"); | |
2520 RNA_def_property_array(prop, 3); | |
2521 RNA_def_property_ui_text(prop, "Selected Marker", "Color of selected mar
ker"); | |
2522 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2523 | |
2524 prop = RNA_def_property(srna, "disabled_marker", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
2525 RNA_def_property_float_sdna(prop, NULL, "dis_marker"); | |
2526 RNA_def_property_array(prop, 3); | |
2527 RNA_def_property_ui_text(prop, "Disabled Marker", "Color of disabled mar
ker"); | |
2528 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2529 | |
2530 prop = RNA_def_property(srna, "locked_marker", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
2531 RNA_def_property_float_sdna(prop, NULL, "lock_marker"); | |
2532 RNA_def_property_array(prop, 3); | |
2533 RNA_def_property_ui_text(prop, "Locked Marker", "Color of locked marker"
); | |
2534 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2535 | |
2536 prop = RNA_def_property(srna, "path_before", PROP_FLOAT, PROP_COLOR_GAMM
A); | |
2537 RNA_def_property_float_sdna(prop, NULL, "path_before"); | |
2538 RNA_def_property_array(prop, 3); | |
2539 RNA_def_property_ui_text(prop, "Path Before", "Color of path before curr
ent frame"); | |
2540 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2541 | |
2542 prop = RNA_def_property(srna, "path_after", PROP_FLOAT, PROP_COLOR_GAMMA
); | |
2543 RNA_def_property_float_sdna(prop, NULL, "path_after"); | |
2544 RNA_def_property_array(prop, 3); | |
2545 RNA_def_property_ui_text(prop, "Path After", "Color of path after curren
t frame"); | |
2546 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2547 | |
2548 prop = RNA_def_property(srna, "grid", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2549 RNA_def_property_array(prop, 3); | |
2550 RNA_def_property_ui_text(prop, "Grid", ""); | |
2551 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2552 | |
2553 prop = RNA_def_property(srna, "frame_current", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
2554 RNA_def_property_float_sdna(prop, NULL, "cframe"); | |
2555 RNA_def_property_array(prop, 3); | |
2556 RNA_def_property_ui_text(prop, "Current Frame", ""); | |
2557 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2558 | |
2559 prop = RNA_def_property(srna, "handle_vertex", PROP_FLOAT, PROP_COLOR_GA
MMA); | |
2560 RNA_def_property_array(prop, 3); | |
2561 RNA_def_property_ui_text(prop, "Handle Vertex", ""); | |
2562 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2563 | |
2564 prop = RNA_def_property(srna, "handle_vertex_select", PROP_FLOAT, PROP_C
OLOR_GAMMA); | |
2565 RNA_def_property_array(prop, 3); | |
2566 RNA_def_property_ui_text(prop, "Handle Vertex Select", ""); | |
2567 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2568 | |
2569 prop = RNA_def_property(srna, "handle_vertex_size", PROP_INT, PROP_NONE)
; | |
2570 RNA_def_property_range(prop, 0, 255); | |
2571 RNA_def_property_ui_text(prop, "Handle Vertex Size", ""); | |
2572 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2573 | |
2574 prop = RNA_def_property(srna, "strips", PROP_FLOAT, PROP_COLOR_GAMMA); | |
2575 RNA_def_property_float_sdna(prop, NULL, "strip"); | |
2576 RNA_def_property_array(prop, 3); | |
2577 RNA_def_property_ui_text(prop, "Strips", ""); | |
2578 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2579 | |
2580 prop = RNA_def_property(srna, "strips_selected", PROP_FLOAT, PROP_COLOR_
GAMMA); | |
2581 RNA_def_property_float_sdna(prop, NULL, "strip_select"); | |
2582 RNA_def_property_array(prop, 3); | |
2583 RNA_def_property_ui_text(prop, "Strips Selected", ""); | |
2584 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2585 } | |
2586 | |
2587 static void rna_def_userdef_themes(BlenderRNA *brna) | |
2588 { | |
2589 StructRNA *srna; | |
2590 PropertyRNA *prop; | |
2591 ········ | |
2592 static EnumPropertyItem active_theme_area[] = { | |
2593 {0, "USER_INTERFACE", ICON_UI, "User Interface", ""}, | |
2594 {19, "STYLE", ICON_FONTPREVIEW, "Text Style", ""}, | |
2595 {18, "BONE_COLOR_SETS", ICON_COLOR, "Bone Color Sets", ""}, | |
2596 {1, "VIEW_3D", ICON_VIEW3D, "3D View", ""}, | |
2597 {2, "TIMELINE", ICON_TIME, "Timeline", ""}, | |
2598 {3, "GRAPH_EDITOR", ICON_IPO, "Graph Editor", ""}, | |
2599 {4, "DOPESHEET_EDITOR", ICON_ACTION, "Dope Sheet", ""}, | |
2600 {5, "NLA_EDITOR", ICON_NLA, "NLA Editor", ""}, | |
2601 {6, "IMAGE_EDITOR", ICON_IMAGE_COL, "UV/Image Editor", ""}, | |
2602 {7, "SEQUENCE_EDITOR", ICON_SEQUENCE, "Video Sequence Editor", "
"}, | |
2603 {8, "TEXT_EDITOR", ICON_TEXT, "Text Editor", ""}, | |
2604 {9, "NODE_EDITOR", ICON_NODETREE, "Node Editor", ""}, | |
2605 {10, "LOGIC_EDITOR", ICON_LOGIC, "Logic Editor", ""}, | |
2606 {11, "PROPERTIES", ICON_BUTS, "Properties", ""}, | |
2607 {12, "OUTLINER", ICON_OOPS, "Outliner", ""}, | |
2608 {14, "USER_PREFERENCES", ICON_PREFERENCES, "User Preferences", "
"}, | |
2609 {15, "INFO", ICON_INFO, "Info", ""}, | |
2610 {16, "FILE_BROWSER", ICON_FILESEL, "File Browser", ""}, | |
2611 {17, "CONSOLE", ICON_CONSOLE, "Python Console", ""}, | |
2612 {20, "CLIP_EDITOR", ICON_CLIP, "Movie Clip Editor", ""}, | |
2613 {0, NULL, 0, NULL, NULL} | |
2614 }; | |
2615 | |
2616 srna = RNA_def_struct(brna, "Theme", NULL); | |
2617 RNA_def_struct_sdna(srna, "bTheme"); | |
2618 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
2619 RNA_def_struct_ui_text(srna, "Theme", "Theme settings defining draw styl
e and colors in the user interface"); | |
2620 | |
2621 prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); | |
2622 RNA_def_property_ui_text(prop, "Name", "Name of the theme"); | |
2623 RNA_def_struct_name_property(srna, prop); | |
2624 /* XXX: for now putting this in presets is silly - its just Default */ | |
2625 RNA_def_property_flag(prop, PROP_SKIP_SAVE); | |
2626 | |
2627 prop = RNA_def_property(srna, "theme_area", PROP_ENUM, PROP_NONE); | |
2628 RNA_def_property_enum_sdna(prop, NULL, "active_theme_area"); | |
2629 RNA_def_property_flag(prop, PROP_SKIP_SAVE); | |
2630 RNA_def_property_enum_items(prop, active_theme_area); | |
2631 RNA_def_property_ui_text(prop, "Active Theme Area", ""); | |
2632 | |
2633 prop = RNA_def_property(srna, "user_interface", PROP_POINTER, PROP_NONE)
; | |
2634 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2635 RNA_def_property_pointer_sdna(prop, NULL, "tui"); | |
2636 RNA_def_property_struct_type(prop, "ThemeUserInterface"); | |
2637 RNA_def_property_ui_text(prop, "User Interface", ""); | |
2638 | |
2639 prop = RNA_def_property(srna, "view_3d", PROP_POINTER, PROP_NONE); | |
2640 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2641 RNA_def_property_pointer_sdna(prop, NULL, "tv3d"); | |
2642 RNA_def_property_struct_type(prop, "ThemeView3D"); | |
2643 RNA_def_property_ui_text(prop, "3D View", ""); | |
2644 | |
2645 prop = RNA_def_property(srna, "graph_editor", PROP_POINTER, PROP_NONE); | |
2646 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2647 RNA_def_property_pointer_sdna(prop, NULL, "tipo"); | |
2648 RNA_def_property_struct_type(prop, "ThemeGraphEditor"); | |
2649 RNA_def_property_ui_text(prop, "Graph Editor", ""); | |
2650 | |
2651 prop = RNA_def_property(srna, "file_browser", PROP_POINTER, PROP_NONE); | |
2652 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2653 RNA_def_property_pointer_sdna(prop, NULL, "tfile"); | |
2654 RNA_def_property_struct_type(prop, "ThemeFileBrowser"); | |
2655 RNA_def_property_ui_text(prop, "File Browser", ""); | |
2656 | |
2657 prop = RNA_def_property(srna, "nla_editor", PROP_POINTER, PROP_NONE); | |
2658 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2659 RNA_def_property_pointer_sdna(prop, NULL, "tnla"); | |
2660 RNA_def_property_struct_type(prop, "ThemeNLAEditor"); | |
2661 RNA_def_property_ui_text(prop, "NLA Editor", ""); | |
2662 | |
2663 prop = RNA_def_property(srna, "dopesheet_editor", PROP_POINTER, PROP_NON
E); | |
2664 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2665 RNA_def_property_pointer_sdna(prop, NULL, "tact"); | |
2666 RNA_def_property_struct_type(prop, "ThemeDopeSheet"); | |
2667 RNA_def_property_ui_text(prop, "Dope Sheet", ""); | |
2668 | |
2669 prop = RNA_def_property(srna, "image_editor", PROP_POINTER, PROP_NONE); | |
2670 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2671 RNA_def_property_pointer_sdna(prop, NULL, "tima"); | |
2672 RNA_def_property_struct_type(prop, "ThemeImageEditor"); | |
2673 RNA_def_property_ui_text(prop, "Image Editor", ""); | |
2674 | |
2675 prop = RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE
); | |
2676 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2677 RNA_def_property_pointer_sdna(prop, NULL, "tseq"); | |
2678 RNA_def_property_struct_type(prop, "ThemeSequenceEditor"); | |
2679 RNA_def_property_ui_text(prop, "Sequence Editor", ""); | |
2680 | |
2681 prop = RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE); | |
2682 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2683 RNA_def_property_pointer_sdna(prop, NULL, "tbuts"); | |
2684 RNA_def_property_struct_type(prop, "ThemeProperties"); | |
2685 RNA_def_property_ui_text(prop, "Properties", ""); | |
2686 | |
2687 prop = RNA_def_property(srna, "text_editor", PROP_POINTER, PROP_NONE); | |
2688 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2689 RNA_def_property_pointer_sdna(prop, NULL, "text"); | |
2690 RNA_def_property_struct_type(prop, "ThemeTextEditor"); | |
2691 RNA_def_property_ui_text(prop, "Text Editor", ""); | |
2692 | |
2693 prop = RNA_def_property(srna, "timeline", PROP_POINTER, PROP_NONE); | |
2694 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2695 RNA_def_property_pointer_sdna(prop, NULL, "ttime"); | |
2696 RNA_def_property_struct_type(prop, "ThemeTimeline"); | |
2697 RNA_def_property_ui_text(prop, "Timeline", ""); | |
2698 | |
2699 prop = RNA_def_property(srna, "node_editor", PROP_POINTER, PROP_NONE); | |
2700 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2701 RNA_def_property_pointer_sdna(prop, NULL, "tnode"); | |
2702 RNA_def_property_struct_type(prop, "ThemeNodeEditor"); | |
2703 RNA_def_property_ui_text(prop, "Node Editor", ""); | |
2704 | |
2705 prop = RNA_def_property(srna, "logic_editor", PROP_POINTER, PROP_NONE); | |
2706 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2707 RNA_def_property_pointer_sdna(prop, NULL, "tlogic"); | |
2708 RNA_def_property_struct_type(prop, "ThemeLogicEditor"); | |
2709 RNA_def_property_ui_text(prop, "Logic Editor", ""); | |
2710 ········ | |
2711 prop = RNA_def_property(srna, "outliner", PROP_POINTER, PROP_NONE); | |
2712 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2713 RNA_def_property_pointer_sdna(prop, NULL, "toops"); | |
2714 RNA_def_property_struct_type(prop, "ThemeOutliner"); | |
2715 RNA_def_property_ui_text(prop, "Outliner", ""); | |
2716 | |
2717 prop = RNA_def_property(srna, "info", PROP_POINTER, PROP_NONE); | |
2718 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2719 RNA_def_property_pointer_sdna(prop, NULL, "tinfo"); | |
2720 RNA_def_property_struct_type(prop, "ThemeInfo"); | |
2721 RNA_def_property_ui_text(prop, "Info", ""); | |
2722 | |
2723 prop = RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NON
E); | |
2724 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2725 RNA_def_property_pointer_sdna(prop, NULL, "tuserpref"); | |
2726 RNA_def_property_struct_type(prop, "ThemeUserPreferences"); | |
2727 RNA_def_property_ui_text(prop, "User Preferences", ""); | |
2728 ········ | |
2729 prop = RNA_def_property(srna, "console", PROP_POINTER, PROP_NONE); | |
2730 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2731 RNA_def_property_pointer_sdna(prop, NULL, "tconsole"); | |
2732 RNA_def_property_struct_type(prop, "ThemeConsole"); | |
2733 RNA_def_property_ui_text(prop, "Console", ""); | |
2734 | |
2735 prop = RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_N
ONE); | |
2736 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2737 RNA_def_property_collection_sdna(prop, NULL, "tarm", ""); | |
2738 RNA_def_property_struct_type(prop, "ThemeBoneColorSet"); | |
2739 RNA_def_property_ui_text(prop, "Bone Color Sets", ""); | |
2740 | |
2741 prop = RNA_def_property(srna, "clip_editor", PROP_POINTER, PROP_NONE); | |
2742 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
2743 RNA_def_property_pointer_sdna(prop, NULL, "tclip"); | |
2744 RNA_def_property_struct_type(prop, "ThemeClipEditor"); | |
2745 RNA_def_property_ui_text(prop, "Clip Editor", ""); | |
2746 } | |
2747 | |
2748 static void rna_def_userdef_addon(BlenderRNA *brna) | |
2749 { | |
2750 StructRNA *srna; | |
2751 PropertyRNA *prop; | |
2752 | |
2753 srna = RNA_def_struct(brna, "Addon", NULL); | |
2754 RNA_def_struct_sdna(srna, "bAddon"); | |
2755 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
2756 RNA_def_struct_ui_text(srna, "Addon", "Python addons to be loaded automa
tically"); | |
2757 | |
2758 prop = RNA_def_property(srna, "module", PROP_STRING, PROP_NONE); | |
2759 RNA_def_property_ui_text(prop, "Module", "Module name"); | |
2760 RNA_def_struct_name_property(srna, prop); | |
2761 | |
2762 /* Collection active property */ | |
2763 prop = RNA_def_property(srna, "preferences", PROP_POINTER, PROP_NONE); | |
2764 RNA_def_property_struct_type(prop, "AddonPreferences"); | |
2765 RNA_def_property_pointer_funcs(prop, "rna_Addon_preferences_get", NULL,
NULL, NULL); | |
2766 } | |
2767 | |
2768 static void rna_def_userdef_pathcompare(BlenderRNA *brna) | |
2769 { | |
2770 StructRNA *srna; | |
2771 PropertyRNA *prop; | |
2772 | |
2773 srna = RNA_def_struct(brna, "PathCompare", NULL); | |
2774 RNA_def_struct_sdna(srna, "bPathCompare"); | |
2775 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
2776 RNA_def_struct_ui_text(srna, "Path Compare", "Match paths against this v
alue"); | |
2777 | |
2778 prop = RNA_def_property(srna, "path", PROP_STRING, PROP_DIRPATH); | |
2779 RNA_def_property_ui_text(prop, "Path", ""); | |
2780 RNA_def_struct_name_property(srna, prop); | |
2781 | |
2782 prop = RNA_def_property(srna, "use_glob", PROP_BOOLEAN, PROP_NONE); | |
2783 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_PATHCMP_GLOB); | |
2784 RNA_def_property_ui_text(prop, "Use Wildcard", "Enable wildcard globbing
"); | |
2785 } | |
2786 | |
2787 static void rna_def_userdef_addon_pref(BlenderRNA *brna) | |
2788 { | |
2789 StructRNA *srna; | |
2790 PropertyRNA *prop; | |
2791 | |
2792 srna = RNA_def_struct(brna, "AddonPreferences", NULL); | |
2793 RNA_def_struct_ui_text(srna, "Addon Preferences", ""); | |
2794 RNA_def_struct_sdna(srna, "bAddon"); /* WARNING: only a bAddon during r
egistration */ | |
2795 | |
2796 RNA_def_struct_refine_func(srna, "rna_AddonPref_refine"); | |
2797 RNA_def_struct_register_funcs(srna, "rna_AddonPref_register", "rna_Addon
Pref_unregister", NULL); | |
2798 RNA_def_struct_idprops_func(srna, "rna_AddonPref_idprops"); | |
2799 | |
2800 /* registration */ | |
2801 RNA_define_verify_sdna(0); | |
2802 prop = RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); | |
2803 RNA_def_property_string_sdna(prop, NULL, "module"); | |
2804 RNA_def_property_flag(prop, PROP_REGISTER | PROP_NEVER_CLAMP); | |
2805 RNA_define_verify_sdna(1); | |
2806 } | |
2807 | |
2808 | |
2809 static void rna_def_userdef_dothemes(BlenderRNA *brna) | |
2810 { | |
2811 ········ | |
2812 rna_def_userdef_theme_ui_style(brna); | |
2813 rna_def_userdef_theme_ui(brna); | |
2814 | |
2815 rna_def_userdef_theme_space_generic(brna); | |
2816 rna_def_userdef_theme_space_gradient(brna); | |
2817 rna_def_userdef_theme_space_list_generic(brna); | |
2818 ········ | |
2819 rna_def_userdef_theme_space_view3d(brna); | |
2820 rna_def_userdef_theme_space_graph(brna); | |
2821 rna_def_userdef_theme_space_file(brna); | |
2822 rna_def_userdef_theme_space_nla(brna); | |
2823 rna_def_userdef_theme_space_action(brna); | |
2824 rna_def_userdef_theme_space_image(brna); | |
2825 rna_def_userdef_theme_space_seq(brna); | |
2826 rna_def_userdef_theme_space_buts(brna); | |
2827 rna_def_userdef_theme_space_text(brna); | |
2828 rna_def_userdef_theme_space_time(brna); | |
2829 rna_def_userdef_theme_space_node(brna); | |
2830 rna_def_userdef_theme_space_outliner(brna); | |
2831 rna_def_userdef_theme_space_info(brna); | |
2832 rna_def_userdef_theme_space_userpref(brna); | |
2833 rna_def_userdef_theme_space_console(brna); | |
2834 rna_def_userdef_theme_space_logic(brna); | |
2835 rna_def_userdef_theme_space_clip(brna); | |
2836 rna_def_userdef_theme_colorset(brna); | |
2837 rna_def_userdef_themes(brna); | |
2838 } | |
2839 | |
2840 static void rna_def_userdef_solidlight(BlenderRNA *brna) | |
2841 { | |
2842 StructRNA *srna; | |
2843 PropertyRNA *prop; | |
2844 static float default_dir[3] = {0.f, 1.f, 0.f}; | |
2845 | |
2846 srna = RNA_def_struct(brna, "UserSolidLight", NULL); | |
2847 RNA_def_struct_sdna(srna, "SolidLight"); | |
2848 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
2849 RNA_def_struct_ui_text(srna, "Solid Light", "Light used for OpenGL light
ing in solid draw mode"); | |
2850 ········ | |
2851 prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE); | |
2852 RNA_def_property_boolean_sdna(prop, NULL, "flag", 1); | |
2853 RNA_def_property_ui_text(prop, "Enabled", "Enable this OpenGL light in s
olid draw mode"); | |
2854 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update"); | |
2855 | |
2856 prop = RNA_def_property(srna, "direction", PROP_FLOAT, PROP_DIRECTION); | |
2857 RNA_def_property_float_sdna(prop, NULL, "vec"); | |
2858 RNA_def_property_array(prop, 3); | |
2859 RNA_def_property_float_array_default(prop, default_dir); | |
2860 RNA_def_property_ui_text(prop, "Direction", "Direction that the OpenGL l
ight is shining"); | |
2861 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update"); | |
2862 | |
2863 prop = RNA_def_property(srna, "diffuse_color", PROP_FLOAT, PROP_COLOR); | |
2864 RNA_def_property_float_sdna(prop, NULL, "col"); | |
2865 RNA_def_property_array(prop, 3); | |
2866 RNA_def_property_ui_text(prop, "Diffuse Color", "Diffuse color of the Op
enGL light"); | |
2867 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update"); | |
2868 | |
2869 prop = RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR); | |
2870 RNA_def_property_float_sdna(prop, NULL, "spec"); | |
2871 RNA_def_property_array(prop, 3); | |
2872 RNA_def_property_ui_text(prop, "Specular Color", "Color of the light's s
pecular highlight"); | |
2873 RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update"); | |
2874 } | |
2875 | |
2876 static void rna_def_userdef_view(BlenderRNA *brna) | |
2877 { | |
2878 static EnumPropertyItem timecode_styles[] = { | |
2879 {USER_TIMECODE_MINIMAL, "MINIMAL", 0, "Minimal Info", | |
2880 "Most compact representation, uses '+' a
s separator for sub-second frame numbers, " | |
2881 "with left and right truncation of the t
imecode as necessary"}, | |
2882 {USER_TIMECODE_SMPTE_FULL, "SMPTE", 0, "SMPTE (Full)", "Full SMP
TE timecode (format is HH:MM:SS:FF)"}, | |
2883 {USER_TIMECODE_SMPTE_MSF, "SMPTE_COMPACT", 0, "SMPTE (Compact)", | |
2884 "SMPTE timecode showing minutes, secon
ds, and frames only - " | |
2885 "hours are also shown if necessary, bu
t not by default"}, | |
2886 {USER_TIMECODE_MILLISECONDS, "MILLISECONDS", 0, "Compact with Mi
lliseconds", | |
2887 "Similar to SMPTE (Compact), except
that instead of frames, " | |
2888 "milliseconds are shown instead"}, | |
2889 {USER_TIMECODE_SECONDS_ONLY, "SECONDS_ONLY", 0, "Only Seconds", | |
2890 "Direct conversion of frame numbers
to seconds"}, | |
2891 {0, NULL, 0, NULL, NULL} | |
2892 }; | |
2893 ········ | |
2894 PropertyRNA *prop; | |
2895 StructRNA *srna; | |
2896 ········ | |
2897 srna = RNA_def_struct(brna, "UserPreferencesView", NULL); | |
2898 RNA_def_struct_sdna(srna, "UserDef"); | |
2899 RNA_def_struct_nested(brna, srna, "UserPreferences"); | |
2900 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
2901 RNA_def_struct_ui_text(srna, "View & Controls", "Preferences related to
viewing data"); | |
2902 | |
2903 /* View */ | |
2904 | |
2905 /* display */ | |
2906 prop = RNA_def_property(srna, "show_tooltips", PROP_BOOLEAN, PROP_NONE); | |
2907 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TOOLTIPS); | |
2908 RNA_def_property_ui_text(prop, "Tooltips", "Display tooltips"); | |
2909 | |
2910 prop = RNA_def_property(srna, "show_tooltips_python", PROP_BOOLEAN, PROP
_NONE); | |
2911 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TOOLTIPS
_PYTHON); | |
2912 RNA_def_property_ui_text(prop, "Python Tooltips", "Show Python reference
s in tooltips"); | |
2913 | |
2914 prop = RNA_def_property(srna, "show_object_info", PROP_BOOLEAN, PROP_NON
E); | |
2915 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DRAWVIEWINFO); | |
2916 RNA_def_property_ui_text(prop, "Display Object Info", "Display objects n
ame and frame number in 3D view"); | |
2917 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2918 | |
2919 prop = RNA_def_property(srna, "use_global_scene", PROP_BOOLEAN, PROP_NON
E); | |
2920 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SCENEGLOBAL); | |
2921 RNA_def_property_ui_text(prop, "Global Scene", "Force the current Scene
to be displayed in all Screens"); | |
2922 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2923 | |
2924 prop = RNA_def_property(srna, "show_large_cursors", PROP_BOOLEAN, PROP_N
ONE); | |
2925 RNA_def_property_boolean_sdna(prop, NULL, "curssize", 0); | |
2926 RNA_def_property_ui_text(prop, "Large Cursors", "Use large mouse cursors
when available"); | |
2927 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2928 | |
2929 prop = RNA_def_property(srna, "show_view_name", PROP_BOOLEAN, PROP_NONE)
; | |
2930 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_VIEWPORTNA
ME); | |
2931 RNA_def_property_ui_text(prop, "Show View Name", "Show the name of the v
iew's direction in each 3D View"); | |
2932 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2933 | |
2934 prop = RNA_def_property(srna, "show_splash", PROP_BOOLEAN, PROP_NONE); | |
2935 RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_SPLASH
_DISABLE); | |
2936 RNA_def_property_ui_text(prop, "Show Splash", "Display splash screen on
startup"); | |
2937 | |
2938 prop = RNA_def_property(srna, "show_playback_fps", PROP_BOOLEAN, PROP_NO
NE); | |
2939 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_FPS); | |
2940 RNA_def_property_ui_text(prop, "Show Playback FPS", | |
2941 "Show the frames per second screen refresh rate
, while animation is played back"); | |
2942 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
2943 ········ | |
2944 /* menus */ | |
2945 prop = RNA_def_property(srna, "use_mouse_over_open", PROP_BOOLEAN, PROP_
NONE); | |
2946 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MENUOPENAUTO); | |
2947 RNA_def_property_ui_text(prop, "Open On Mouse Over", | |
2948 "Open menu buttons and pulldowns automatically
when the mouse is hovering"); | |
2949 ········ | |
2950 prop = RNA_def_property(srna, "open_toplevel_delay", PROP_INT, PROP_NONE
); | |
2951 RNA_def_property_int_sdna(prop, NULL, "menuthreshold1"); | |
2952 RNA_def_property_range(prop, 1, 40); | |
2953 RNA_def_property_ui_text(prop, "Top Level Menu Open Delay", | |
2954 "Time delay in 1/10 seconds before automaticall
y opening top level menus"); | |
2955 | |
2956 prop = RNA_def_property(srna, "open_sublevel_delay", PROP_INT, PROP_NONE
); | |
2957 RNA_def_property_int_sdna(prop, NULL, "menuthreshold2"); | |
2958 RNA_def_property_range(prop, 1, 40); | |
2959 RNA_def_property_ui_text(prop, "Sub Level Menu Open Delay", | |
2960 "Time delay in 1/10 seconds before automaticall
y opening sub level menus"); | |
2961 | |
2962 prop = RNA_def_property(srna, "use_quit_dialog", PROP_BOOLEAN, PROP_NONE
); | |
2963 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_QUIT_PROMPT); | |
2964 RNA_def_property_ui_text(prop, "Prompt Quit", | |
2965 "Asks for confirmation when quitting through th
e window close button"); | |
2966 | |
2967 /* Toolbox click-hold delay */ | |
2968 prop = RNA_def_property(srna, "open_left_mouse_delay", PROP_INT, PROP_NO
NE); | |
2969 RNA_def_property_int_sdna(prop, NULL, "tb_leftmouse"); | |
2970 RNA_def_property_range(prop, 1, 40); | |
2971 RNA_def_property_ui_text(prop, "Hold LMB Open Toolbox Delay", | |
2972 "Time in 1/10 seconds to hold the Left Mouse Bu
tton before opening the toolbox"); | |
2973 | |
2974 prop = RNA_def_property(srna, "open_right_mouse_delay", PROP_INT, PROP_N
ONE); | |
2975 RNA_def_property_int_sdna(prop, NULL, "tb_rightmouse"); | |
2976 RNA_def_property_range(prop, 1, 40); | |
2977 RNA_def_property_ui_text(prop, "Hold RMB Open Toolbox Delay", | |
2978 "Time in 1/10 seconds to hold the Right Mouse B
utton before opening the toolbox"); | |
2979 | |
2980 prop = RNA_def_property(srna, "show_column_layout", PROP_BOOLEAN, PROP_N
ONE); | |
2981 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_PLAINMENUS); | |
2982 RNA_def_property_ui_text(prop, "Toolbox Column Layout", "Use a column la
yout for toolbox"); | |
2983 | |
2984 prop = RNA_def_property(srna, "use_directional_menus", PROP_BOOLEAN, PRO
P_NONE); | |
2985 RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_MENUFI
XEDORDER); | |
2986 RNA_def_property_ui_text(prop, "Contents Follow Opening Direction", | |
2987 "Otherwise menus, etc will always be top to bot
tom, left to right, " | |
2988 "no matter opening direction"); | |
2989 | |
2990 prop = RNA_def_property(srna, "use_global_pivot", PROP_BOOLEAN, PROP_NON
E); | |
2991 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCKAROUND); | |
2992 RNA_def_property_ui_text(prop, "Global Pivot", "Lock the same rotation/s
caling pivot in all 3D Views"); | |
2993 | |
2994 prop = RNA_def_property(srna, "use_mouse_depth_navigate", PROP_BOOLEAN,
PROP_NONE); | |
2995 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZBUF_ORBIT); | |
2996 RNA_def_property_ui_text(prop, "Auto Depth", | |
2997 "Use the depth under the mouse to improve view
pan/rotate/zoom functionality"); | |
2998 | |
2999 prop = RNA_def_property(srna, "use_mouse_depth_cursor", PROP_BOOLEAN, PR
OP_NONE); | |
3000 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZBUF_CURSOR); | |
3001 RNA_def_property_ui_text(prop, "Cursor Depth", | |
3002 "Use the depth under the mouse when placing the
cursor"); | |
3003 | |
3004 prop = RNA_def_property(srna, "use_camera_lock_parent", PROP_BOOLEAN, PR
OP_NONE); | |
3005 RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_CAM_LO
CK_NO_PARENT); | |
3006 RNA_def_property_ui_text(prop, "Camera Parent Lock", | |
3007 "When the camera is locked to the view and in f
ly mode, " | |
3008 "transform the parent rather than the camera"); | |
3009 | |
3010 /* view zoom */ | |
3011 prop = RNA_def_property(srna, "use_zoom_to_mouse", PROP_BOOLEAN, PROP_NO
NE); | |
3012 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_TO_MOUSEPO
S); | |
3013 RNA_def_property_ui_text(prop, "Zoom To Mouse Position", | |
3014 "Zoom in towards the mouse pointer's position i
n the 3D view, " | |
3015 "rather than the 2D window center"); | |
3016 | |
3017 /* view rotation */ | |
3018 prop = RNA_def_property(srna, "use_auto_perspective", PROP_BOOLEAN, PROP
_NONE); | |
3019 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_AUTOPERSP); | |
3020 RNA_def_property_ui_text(prop, "Auto Perspective", | |
3021 "Automatically switch between orthographic and
perspective when changing " | |
3022 "from top/front/side views"); | |
3023 | |
3024 prop = RNA_def_property(srna, "use_rotate_around_active", PROP_BOOLEAN,
PROP_NONE); | |
3025 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_SELECTION
); | |
3026 RNA_def_property_ui_text(prop, "Rotate Around Selection", "Use selection
as the pivot point"); | |
3027 ········ | |
3028 /* mini axis */ | |
3029 prop = RNA_def_property(srna, "show_mini_axis", PROP_BOOLEAN, PROP_NONE)
; | |
3030 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_ROTVIEWICO
N); | |
3031 RNA_def_property_ui_text(prop, "Show Mini Axes", | |
3032 "Show a small rotating 3D axes in the bottom le
ft corner of the 3D View"); | |
3033 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3034 | |
3035 prop = RNA_def_property(srna, "mini_axis_size", PROP_INT, PROP_NONE); | |
3036 RNA_def_property_int_sdna(prop, NULL, "rvisize"); | |
3037 RNA_def_property_range(prop, 10, 64); | |
3038 RNA_def_property_ui_text(prop, "Mini Axes Size", "The axes icon's size")
; | |
3039 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3040 | |
3041 prop = RNA_def_property(srna, "mini_axis_brightness", PROP_INT, PROP_NON
E); | |
3042 RNA_def_property_int_sdna(prop, NULL, "rvibright"); | |
3043 RNA_def_property_range(prop, 0, 10); | |
3044 RNA_def_property_ui_text(prop, "Mini Axes Brightness", "Brightness of th
e icon"); | |
3045 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3046 | |
3047 prop = RNA_def_property(srna, "smooth_view", PROP_INT, PROP_NONE); | |
3048 RNA_def_property_int_sdna(prop, NULL, "smooth_viewtx"); | |
3049 RNA_def_property_range(prop, 0, 1000); | |
3050 RNA_def_property_ui_text(prop, "Smooth View", "Time to animate the view
in milliseconds, zero to disable"); | |
3051 | |
3052 prop = RNA_def_property(srna, "rotation_angle", PROP_INT, PROP_NONE); | |
3053 RNA_def_property_int_sdna(prop, NULL, "pad_rot_angle"); | |
3054 RNA_def_property_range(prop, 0, 90); | |
3055 RNA_def_property_ui_text(prop, "Rotation Angle", "Rotation step for nume
rical pad keys (2 4 6 8)"); | |
3056 | |
3057 /* 3D transform widget */ | |
3058 prop = RNA_def_property(srna, "show_manipulator", PROP_BOOLEAN, PROP_NON
E); | |
3059 RNA_def_property_boolean_sdna(prop, NULL, "tw_flag", V3D_USE_MANIPULATOR
); | |
3060 RNA_def_property_ui_text(prop, "Manipulator", "Use 3D transform manipula
tor"); | |
3061 RNA_def_property_update(prop, 0, "rna_userdef_show_manipulator_update"); | |
3062 | |
3063 prop = RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_NONE); | |
3064 RNA_def_property_int_sdna(prop, NULL, "tw_size"); | |
3065 RNA_def_property_range(prop, 2, 40); | |
3066 RNA_def_property_int_default(prop, 15); | |
3067 RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of widget,
in 10 pixel units"); | |
3068 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3069 | |
3070 prop = RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_
NONE); | |
3071 RNA_def_property_int_sdna(prop, NULL, "tw_handlesize"); | |
3072 RNA_def_property_range(prop, 2, 40); | |
3073 RNA_def_property_int_default(prop, 25); | |
3074 RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of widge
t handles as percentage of widget radius"); | |
3075 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3076 | |
3077 prop = RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_NONE
); | |
3078 RNA_def_property_int_sdna(prop, NULL, "tw_hotspot"); | |
3079 RNA_def_property_range(prop, 4, 40); | |
3080 RNA_def_property_int_default(prop, 14); | |
3081 RNA_def_property_ui_text(prop, "Manipulator Hotspot", "Pixel distance ar
ound the handles to accept mouse clicks"); | |
3082 | |
3083 prop = RNA_def_property(srna, "object_origin_size", PROP_INT, PROP_NONE)
; | |
3084 RNA_def_property_int_sdna(prop, NULL, "obcenter_dia"); | |
3085 RNA_def_property_range(prop, 4, 10); | |
3086 RNA_def_property_ui_text(prop, "Object Origin Size", "Diameter in Pixels
for Object/Lamp origin display"); | |
3087 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3088 ········ | |
3089 /* View2D Grid Displays */ | |
3090 prop = RNA_def_property(srna, "view2d_grid_spacing_min", PROP_INT, PROP_
NONE); | |
3091 RNA_def_property_int_sdna(prop, NULL, "v2d_min_gridsize"); | |
3092 RNA_def_property_range(prop, 1, 500); /* XXX: perhaps the lower range sh
ould only go down to 5? */ | |
3093 RNA_def_property_ui_text(prop, "2D View Minimum Grid Spacing", | |
3094 "Minimum number of pixels between each gridline
in 2D Viewports"); | |
3095 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3096 ········ | |
3097 /* TODO: add a setter for this, so that we can bump up the minimum size
as necessary... */ | |
3098 prop = RNA_def_property(srna, "timecode_style", PROP_ENUM, PROP_NONE); | |
3099 RNA_def_property_enum_items(prop, timecode_styles); | |
3100 RNA_def_property_enum_sdna(prop, NULL, "timecode_style"); | |
3101 RNA_def_property_enum_funcs(prop, NULL, "rna_userdef_timecode_style_set"
, NULL); | |
3102 RNA_def_property_ui_text(prop, "TimeCode Style", | |
3103 "Format of Time Codes displayed when not displa
ying timing in terms of frames"); | |
3104 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3105 } | |
3106 | |
3107 static void rna_def_userdef_edit(BlenderRNA *brna) | |
3108 { | |
3109 PropertyRNA *prop; | |
3110 StructRNA *srna; | |
3111 | |
3112 static EnumPropertyItem auto_key_modes[] = { | |
3113 {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add/Replace", ""}, | |
3114 {AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""}, | |
3115 {0, NULL, 0, NULL, NULL} | |
3116 }; | |
3117 ················ | |
3118 static const EnumPropertyItem material_link_items[] = { | |
3119 {0, "OBDATA", 0, "ObData", "Toggle whether the material is linke
d to object data or the object block"}, | |
3120 {USER_MAT_ON_OB, "OBJECT", 0, "Object", | |
3121 "Toggle whether the material is linked to objec
t data or the object block"}, | |
3122 {0, NULL, 0, NULL, NULL} | |
3123 }; | |
3124 ················ | |
3125 static const EnumPropertyItem object_align_items[] = { | |
3126 {0, "WORLD", 0, "World", "Align newly added objects to the world
coordinate system"}, | |
3127 {USER_ADD_VIEWALIGNED, "VIEW", 0, "View", "Align newly added obj
ects facing the active 3D View direction"}, | |
3128 {0, NULL, 0, NULL, NULL} | |
3129 }; | |
3130 | |
3131 srna = RNA_def_struct(brna, "UserPreferencesEdit", NULL); | |
3132 RNA_def_struct_sdna(srna, "UserDef"); | |
3133 RNA_def_struct_nested(brna, srna, "UserPreferences"); | |
3134 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
3135 RNA_def_struct_ui_text(srna, "Edit Methods", "Settings for interacting w
ith Blender data"); | |
3136 ········ | |
3137 /* Edit Methods */ | |
3138 ········ | |
3139 prop = RNA_def_property(srna, "material_link", PROP_ENUM, PROP_NONE); | |
3140 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | |
3141 RNA_def_property_enum_items(prop, material_link_items); | |
3142 RNA_def_property_ui_text(prop, "Material Link To", | |
3143 "Toggle whether the material is linked to objec
t data or the object block"); | |
3144 ········ | |
3145 prop = RNA_def_property(srna, "object_align", PROP_ENUM, PROP_NONE); | |
3146 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | |
3147 RNA_def_property_enum_items(prop, object_align_items); | |
3148 RNA_def_property_ui_text(prop, "Align Object To", | |
3149 "When adding objects from a 3D View menu, eithe
r align them with that view or " | |
3150 "with the world"); | |
3151 | |
3152 prop = RNA_def_property(srna, "use_enter_edit_mode", PROP_BOOLEAN, PROP_
NONE); | |
3153 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ADD_EDITMODE); | |
3154 RNA_def_property_ui_text(prop, "Enter Edit Mode", "Enter Edit Mode autom
atically after adding a new object"); | |
3155 | |
3156 prop = RNA_def_property(srna, "use_drag_immediately", PROP_BOOLEAN, PROP
_NONE); | |
3157 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELEASECONFIRM); | |
3158 RNA_def_property_ui_text(prop, "Release confirms", | |
3159 "Moving things with a mouse drag confirms when
releasing the button"); | |
3160 ········ | |
3161 /* Undo */ | |
3162 prop = RNA_def_property(srna, "undo_steps", PROP_INT, PROP_NONE); | |
3163 RNA_def_property_int_sdna(prop, NULL, "undosteps"); | |
3164 RNA_def_property_range(prop, 0, 64); | |
3165 RNA_def_property_ui_text(prop, "Undo Steps", "Number of undo steps avail
able (smaller values conserve memory)"); | |
3166 | |
3167 prop = RNA_def_property(srna, "undo_memory_limit", PROP_INT, PROP_NONE); | |
3168 RNA_def_property_int_sdna(prop, NULL, "undomemory"); | |
3169 RNA_def_property_range(prop, 0, 32767); | |
3170 RNA_def_property_ui_text(prop, "Undo Memory Size", "Maximum memory usage
in megabytes (0 means unlimited)"); | |
3171 | |
3172 prop = RNA_def_property(srna, "use_global_undo", PROP_BOOLEAN, PROP_NONE
); | |
3173 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_GLOBALUNDO); | |
3174 RNA_def_property_ui_text(prop, "Global Undo", | |
3175 "Global undo works by keeping a full copy of th
e file itself in memory, " | |
3176 "so takes extra memory"); | |
3177 | |
3178 /* auto keyframing */ | |
3179 prop = RNA_def_property(srna, "use_auto_keying", PROP_BOOLEAN, PROP_NONE
); | |
3180 RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON); | |
3181 RNA_def_property_ui_text(prop, "Auto Keying Enable", | |
3182 "Automatic keyframe insertion for Objects and B
ones " | |
3183 "(default setting used for new Scenes)"); | |
3184 RNA_def_property_ui_icon(prop, ICON_REC, 0); | |
3185 | |
3186 prop = RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE); | |
3187 RNA_def_property_enum_items(prop, auto_key_modes); | |
3188 RNA_def_property_enum_funcs(prop, "rna_userdef_autokeymode_get", "rna_us
erdef_autokeymode_set", NULL); | |
3189 RNA_def_property_ui_text(prop, "Auto Keying Mode", | |
3190 "Mode of automatic keyframe insertion for Objec
ts and Bones " | |
3191 "(default setting used for new Scenes)"); | |
3192 | |
3193 prop = RNA_def_property(srna, "use_keyframe_insert_available", PROP_BOOL
EAN, PROP_NONE); | |
3194 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_I
NSERTAVAIL); | |
3195 RNA_def_property_ui_text(prop, "Auto Keyframe Insert Available", | |
3196 "Automatic keyframe insertion in available F-Cu
rves"); | |
3197 | |
3198 prop = RNA_def_property(srna, "use_auto_keying_warning", PROP_BOOLEAN, P
ROP_NONE); | |
3199 RNA_def_property_boolean_negative_sdna(prop, NULL, "autokey_flag", AUTOK
EY_FLAG_NOWARNING); | |
3200 RNA_def_property_ui_text(prop, "Show Auto Keying Warning", | |
3201 "Show warning indicators when transforming obje
cts and bones if auto keying is enabled"); | |
3202 ········ | |
3203 /* keyframing settings */ | |
3204 prop = RNA_def_property(srna, "use_keyframe_insert_needed", PROP_BOOLEAN
, PROP_NONE); | |
3205 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_I
NSERTNEEDED); | |
3206 RNA_def_property_ui_text(prop, "Keyframe Insert Needed", "Keyframe inser
tion only when keyframe needed"); | |
3207 | |
3208 prop = RNA_def_property(srna, "use_visual_keying", PROP_BOOLEAN, PROP_NO
NE); | |
3209 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_A
UTOMATKEY); | |
3210 RNA_def_property_ui_text(prop, "Visual Keying", "Use Visual keying autom
atically for constrained objects"); | |
3211 ········ | |
3212 prop = RNA_def_property(srna, "use_insertkey_xyz_to_rgb", PROP_BOOLEAN,
PROP_NONE); | |
3213 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_X
YZ2RGB); | |
3214 RNA_def_property_ui_text(prop, "New F-Curve Colors - XYZ to RGB", | |
3215 "Color for newly added transformation F-Curves
(Location, Rotation, Scale) " | |
3216 "and also Color is based on the transform axis"
); | |
3217 ········ | |
3218 prop = RNA_def_property(srna, "keyframe_new_interpolation_type", PROP_EN
UM, PROP_NONE); | |
3219 RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items); | |
3220 RNA_def_property_enum_sdna(prop, NULL, "ipo_new"); | |
3221 RNA_def_property_ui_text(prop, "New Interpolation Type", | |
3222 "Interpolation mode used for first keyframe on
newly added F-Curves " | |
3223 "(subsequent keyframes take interpolation from
preceding keyframe)"); | |
3224 ········ | |
3225 prop = RNA_def_property(srna, "keyframe_new_handle_type", PROP_ENUM, PRO
P_NONE); | |
3226 RNA_def_property_enum_items(prop, keyframe_handle_type_items); | |
3227 RNA_def_property_enum_sdna(prop, NULL, "keyhandles_new"); | |
3228 RNA_def_property_ui_text(prop, "New Handles Type", "Handle type for hand
les of new keyframes"); | |
3229 ········ | |
3230 /* frame numbers */ | |
3231 prop = RNA_def_property(srna, "use_negative_frames", PROP_BOOLEAN, PROP_
NONE); | |
3232 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_NONEGFRA
MES); | |
3233 RNA_def_property_ui_text(prop, "Allow Negative Frames", | |
3234 "Current frame number can be manually set to a
negative value"); | |
3235 | |
3236 /* fcurve opacity */ | |
3237 prop = RNA_def_property(srna, "fcurve_unselected_alpha", PROP_FLOAT, PRO
P_FACTOR); | |
3238 RNA_def_property_float_sdna(prop, NULL, "fcu_inactive_alpha"); | |
3239 RNA_def_property_range(prop, 0.001f, 1.0f); | |
3240 RNA_def_property_ui_text(prop, "Unselected F-Curve Visibility", | |
3241 "Amount that unselected F-Curves stand out from
the background (Graph Editor)"); | |
3242 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); | |
3243 ········ | |
3244 /* grease pencil */ | |
3245 prop = RNA_def_property(srna, "grease_pencil_manhattan_distance", PROP_I
NT, PROP_NONE); | |
3246 RNA_def_property_int_sdna(prop, NULL, "gp_manhattendist"); | |
3247 RNA_def_property_range(prop, 0, 100); | |
3248 RNA_def_property_ui_text(prop, "Grease Pencil Manhattan Distance", | |
3249 "Pixels moved by mouse per axis when drawing st
roke"); | |
3250 | |
3251 prop = RNA_def_property(srna, "grease_pencil_euclidean_distance", PROP_I
NT, PROP_NONE); | |
3252 RNA_def_property_int_sdna(prop, NULL, "gp_euclideandist"); | |
3253 RNA_def_property_range(prop, 0, 100); | |
3254 RNA_def_property_ui_text(prop, "Grease Pencil Euclidean Distance", | |
3255 "Distance moved by mouse when drawing stroke (i
n pixels) to include"); | |
3256 | |
3257 prop = RNA_def_property(srna, "use_grease_pencil_smooth_stroke", PROP_BO
OLEAN, PROP_NONE); | |
3258 RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSMOO
TH); | |
3259 RNA_def_property_ui_text(prop, "Grease Pencil Smooth Stroke", "Smooth th
e final stroke"); | |
3260 | |
3261 prop = RNA_def_property(srna, "use_grease_pencil_simplify_stroke", PROP_
BOOLEAN, PROP_NONE); | |
3262 RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSIMP
LIFY); | |
3263 RNA_def_property_ui_text(prop, "Grease Pencil Simplify Stroke", "Simplif
y the final stroke"); | |
3264 | |
3265 prop = RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, P
ROP_NONE); | |
3266 RNA_def_property_int_sdna(prop, NULL, "gp_eraser"); | |
3267 RNA_def_property_range(prop, 0, 100); | |
3268 RNA_def_property_ui_text(prop, "Grease Pencil Eraser Radius", "Radius of
eraser 'brush'"); | |
3269 ········ | |
3270 ········ | |
3271 prop = RNA_def_property(srna, "grease_pencil_default_color", PROP_FLOAT,
PROP_COLOR); | |
3272 RNA_def_property_float_sdna(prop, NULL, "gpencil_new_layer_col"); | |
3273 RNA_def_property_array(prop, 4); | |
3274 RNA_def_property_ui_text(prop, "Grease Pencil Default Color", "Color of
new Grease Pencil layers"); | |
3275 ········ | |
3276 /* sculpt and paint */ | |
3277 | |
3278 prop = RNA_def_property(srna, "sculpt_paint_overlay_color", PROP_FLOAT,
PROP_COLOR_GAMMA); | |
3279 RNA_def_property_float_sdna(prop, NULL, "sculpt_paint_overlay_col"); | |
3280 RNA_def_property_array(prop, 3); | |
3281 RNA_def_property_ui_text(prop, "Sculpt/Paint Overlay Color", "Color of t
exture overlay"); | |
3282 | |
3283 /* duplication linking */ | |
3284 prop = RNA_def_property(srna, "use_duplicate_mesh", PROP_BOOLEAN, PROP_N
ONE); | |
3285 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MESH); | |
3286 RNA_def_property_ui_text(prop, "Duplicate Mesh", "Causes mesh data to be
duplicated with the object"); | |
3287 | |
3288 prop = RNA_def_property(srna, "use_duplicate_surface", PROP_BOOLEAN, PRO
P_NONE); | |
3289 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_SURF); | |
3290 RNA_def_property_ui_text(prop, "Duplicate Surface", "Causes surface data
to be duplicated with the object"); | |
3291 ········ | |
3292 prop = RNA_def_property(srna, "use_duplicate_curve", PROP_BOOLEAN, PROP_
NONE); | |
3293 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_CURVE); | |
3294 RNA_def_property_ui_text(prop, "Duplicate Curve", "Causes curve data to
be duplicated with the object"); | |
3295 | |
3296 prop = RNA_def_property(srna, "use_duplicate_text", PROP_BOOLEAN, PROP_N
ONE); | |
3297 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_FONT); | |
3298 RNA_def_property_ui_text(prop, "Duplicate Text", "Causes text data to be
duplicated with the object"); | |
3299 | |
3300 prop = RNA_def_property(srna, "use_duplicate_metaball", PROP_BOOLEAN, PR
OP_NONE); | |
3301 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MBALL); | |
3302 RNA_def_property_ui_text(prop, "Duplicate Metaball", "Causes metaball da
ta to be duplicated with the object"); | |
3303 ········ | |
3304 prop = RNA_def_property(srna, "use_duplicate_armature", PROP_BOOLEAN, PR
OP_NONE); | |
3305 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ARM); | |
3306 RNA_def_property_ui_text(prop, "Duplicate Armature", "Causes armature da
ta to be duplicated with the object"); | |
3307 | |
3308 prop = RNA_def_property(srna, "use_duplicate_lamp", PROP_BOOLEAN, PROP_N
ONE); | |
3309 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_LAMP); | |
3310 RNA_def_property_ui_text(prop, "Duplicate Lamp", "Causes lamp data to be
duplicated with the object"); | |
3311 | |
3312 prop = RNA_def_property(srna, "use_duplicate_material", PROP_BOOLEAN, PR
OP_NONE); | |
3313 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MAT); | |
3314 RNA_def_property_ui_text(prop, "Duplicate Material", "Causes material da
ta to be duplicated with the object"); | |
3315 | |
3316 prop = RNA_def_property(srna, "use_duplicate_texture", PROP_BOOLEAN, PRO
P_NONE); | |
3317 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_TEX); | |
3318 RNA_def_property_ui_text(prop, "Duplicate Texture", "Causes texture data
to be duplicated with the object"); | |
3319 ················ | |
3320 /* xxx */ | |
3321 prop = RNA_def_property(srna, "use_duplicate_fcurve", PROP_BOOLEAN, PROP
_NONE); | |
3322 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_IPO); | |
3323 RNA_def_property_ui_text(prop, "Duplicate F-Curve", "Causes F-curve data
to be duplicated with the object"); | |
3324 /* xxx */ | |
3325 prop = RNA_def_property(srna, "use_duplicate_action", PROP_BOOLEAN, PROP
_NONE); | |
3326 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ACT); | |
3327 RNA_def_property_ui_text(prop, "Duplicate Action", "Causes actions to be
duplicated with the object"); | |
3328 ········ | |
3329 prop = RNA_def_property(srna, "use_duplicate_particle", PROP_BOOLEAN, PR
OP_NONE); | |
3330 RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_PSYS); | |
3331 RNA_def_property_ui_text(prop, "Duplicate Particle", "Causes particle sy
stems to be duplicated with the object"); | |
3332 } | |
3333 | |
3334 static void rna_def_userdef_system(BlenderRNA *brna) | |
3335 { | |
3336 PropertyRNA *prop; | |
3337 StructRNA *srna; | |
3338 | |
3339 static EnumPropertyItem gl_texture_clamp_items[] = { | |
3340 {0, "CLAMP_OFF", 0, "Off", ""}, | |
3341 {8192, "CLAMP_8192", 0, "8192", ""}, | |
3342 {4096, "CLAMP_4096", 0, "4096", ""}, | |
3343 {2048, "CLAMP_2048", 0, "2048", ""}, | |
3344 {1024, "CLAMP_1024", 0, "1024", ""}, | |
3345 {512, "CLAMP_512", 0, "512", ""}, | |
3346 {256, "CLAMP_256", 0, "256", ""}, | |
3347 {128, "CLAMP_128", 0, "128", ""}, | |
3348 {0, NULL, 0, NULL, NULL} | |
3349 }; | |
3350 | |
3351 static EnumPropertyItem anisotropic_items[] = { | |
3352 {1, "FILTER_0", 0, "Off", ""}, | |
3353 {2, "FILTER_2", 0, "2x", ""}, | |
3354 {4, "FILTER_4", 0, "4x", ""}, | |
3355 {8, "FILTER_8", 0, "8x", ""}, | |
3356 {16, "FILTER_16", 0, "16x", ""}, | |
3357 {0, NULL, 0, NULL, NULL} | |
3358 }; | |
3359 | |
3360 static EnumPropertyItem audio_mixing_samples_items[] = { | |
3361 {256, "SAMPLES_256", 0, "256", "Set audio mixing buffer size to
256 samples"}, | |
3362 {512, "SAMPLES_512", 0, "512", "Set audio mixing buffer size to
512 samples"}, | |
3363 {1024, "SAMPLES_1024", 0, "1024", "Set audio mixing buffer size
to 1024 samples"}, | |
3364 {2048, "SAMPLES_2048", 0, "2048", "Set audio mixing buffer size
to 2048 samples"}, | |
3365 {4096, "SAMPLES_4096", 0, "4096", "Set audio mixing buffer size
to 4096 samples"}, | |
3366 {8192, "SAMPLES_8192", 0, "8192", "Set audio mixing buffer size
to 8192 samples"}, | |
3367 {16384, "SAMPLES_16384", 0, "16384", "Set audio mixing buffer si
ze to 16384 samples"}, | |
3368 {32768, "SAMPLES_32768", 0, "32768", "Set audio mixing buffer si
ze to 32768 samples"}, | |
3369 {0, NULL, 0, NULL, NULL} | |
3370 }; | |
3371 | |
3372 static EnumPropertyItem audio_rate_items[] = { | |
3373 /* {8000, "RATE_8000", 0, "8 kHz", "Set audio sampling rate to 8000
samples per second"}, */ | |
3374 /* {11025, "RATE_11025", 0, "11.025 kHz", "Set audio sampling rate
to 11025 samples per second"}, */ | |
3375 /* {16000, "RATE_16000", 0, "16 kHz", "Set audio sampling rate to 1
6000 samples per second"}, */ | |
3376 /* {22050, "RATE_22050", 0, "22.05 kHz", "Set audio sampling rate t
o 22050 samples per second"}, */ | |
3377 /* {32000, "RATE_32000", 0, "32 kHz", "Set audio sampling rate to 3
2000 samples per second"}, */ | |
3378 {44100, "RATE_44100", 0, "44.1 kHz", "Set audio sampling rate to
44100 samples per second"}, | |
3379 {48000, "RATE_48000", 0, "48 kHz", "Set audio sampling rate to 4
8000 samples per second"}, | |
3380 /* {88200, "RATE_88200", 0, "88.2 kHz", "Set audio sampling rate to
88200 samples per second"}, */ | |
3381 {96000, "RATE_96000", 0, "96 kHz", "Set audio sampling rate to 9
6000 samples per second"}, | |
3382 {192000, "RATE_192000", 0, "192 kHz", "Set audio sampling rate t
o 192000 samples per second"}, | |
3383 {0, NULL, 0, NULL, NULL} | |
3384 }; | |
3385 | |
3386 static EnumPropertyItem audio_format_items[] = { | |
3387 {0x01, "U8", 0, "8-bit Unsigned", "Set audio sample format to 8
bit unsigned integer"}, | |
3388 {0x12, "S16", 0, "16-bit Signed", "Set audio sample format to 16
bit signed integer"}, | |
3389 {0x13, "S24", 0, "24-bit Signed", "Set audio sample format to 24
bit signed integer"}, | |
3390 {0x14, "S32", 0, "32-bit Signed", "Set audio sample format to 32
bit signed integer"}, | |
3391 {0x24, "FLOAT", 0, "32-bit Float", "Set audio sample format to 3
2 bit float"}, | |
3392 {0x28, "DOUBLE", 0, "64-bit Float", "Set audio sample format to
64 bit float"}, | |
3393 {0, NULL, 0, NULL, NULL} | |
3394 }; | |
3395 | |
3396 static EnumPropertyItem audio_channel_items[] = { | |
3397 {1, "MONO", 0, "Mono", "Set audio channels to mono"}, | |
3398 {2, "STEREO", 0, "Stereo", "Set audio channels to stereo"}, | |
3399 {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 chann
els"}, | |
3400 {6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1
surround sound"}, | |
3401 {8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1
surround sound"}, | |
3402 {0, NULL, 0, NULL, NULL} | |
3403 }; | |
3404 | |
3405 static EnumPropertyItem draw_method_items[] = { | |
3406 {USER_DRAW_AUTOMATIC, "AUTOMATIC", 0, "Automatic", "Automaticall
y set based on graphics card and driver"}, | |
3407 {USER_DRAW_TRIPLE, "TRIPLE_BUFFER", 0, "Triple Buffer", | |
3408 "Use a third buffer for minimal redraws at th
e cost of more memory"}, | |
3409 {USER_DRAW_OVERLAP, "OVERLAP", 0, "Overlap", | |
3410 "Redraw all overlapping regions, minimal mem
ory usage but more redraws"}, | |
3411 {USER_DRAW_OVERLAP_FLIP, "OVERLAP_FLIP", 0, "Overlap Flip", | |
3412 "Redraw all overlapping regions, minima
l memory usage but more redraws " | |
3413 "(for graphics drivers that do flipping
)"}, | |
3414 {USER_DRAW_FULL, "FULL", 0, "Full", | |
3415 "Do a full redraw each time, slow, only use for
reference or when everything else fails"}, | |
3416 {0, NULL, 0, NULL, NULL} | |
3417 }; | |
3418 ········ | |
3419 static EnumPropertyItem color_picker_types[] = { | |
3420 {USER_CP_CIRCLE, "CIRCLE", 0, "Circle", "A circular Hue/Saturati
on color wheel, with Value slider"}, | |
3421 {USER_CP_SQUARE_SV, "SQUARE_SV", 0, "Square (SV + H)", "A square
showing Saturation/Value, with Hue slider"}, | |
3422 {USER_CP_SQUARE_HS, "SQUARE_HS", 0, "Square (HS + V)", "A square
showing Hue/Saturation, with Value slider"}, | |
3423 {USER_CP_SQUARE_HV, "SQUARE_HV", 0, "Square (HV + S)", "A square
showing Hue/Value, with Saturation slider"}, | |
3424 {0, NULL, 0, NULL, NULL} | |
3425 }; | |
3426 ········ | |
3427 static EnumPropertyItem multi_sample_levels[] = { | |
3428 {USER_MULTISAMPLE_NONE, "NONE", 0, "No MultiSample", "Do not use
OpenGL MultiSample"}, | |
3429 {USER_MULTISAMPLE_2, "2", 0, "MultiSample: 2", "Use 2x OpenGL Mu
ltiSample (requires restart)"}, | |
3430 {USER_MULTISAMPLE_4, "4", 0, "MultiSample: 4", "Use 4x OpenGL Mu
ltiSample (requires restart)"}, | |
3431 {USER_MULTISAMPLE_8, "8", 0, "MultiSample: 8", "Use 8x OpenGL Mu
ltiSample (requires restart)"}, | |
3432 {USER_MULTISAMPLE_16, "16", 0, "MultiSample: 16", "Use 16x OpenG
L MultiSample (requires restart)"}, | |
3433 {0, NULL, 0, NULL, NULL} | |
3434 }; | |
3435 ········ | |
3436 static EnumPropertyItem language_items[] = { | |
3437 {0, "DEFAULT", 0, "Default (Default)", ""}, | |
3438 {0, NULL, 0, NULL, NULL} | |
3439 }; | |
3440 | |
3441 #ifdef WITH_CYCLES | |
3442 static EnumPropertyItem compute_device_items[] = { | |
3443 {0, "CPU", 0, "CPU", ""}, | |
3444 { 0, NULL, 0, NULL, NULL} | |
3445 }; | |
3446 #endif | |
3447 | |
3448 static EnumPropertyItem image_draw_methods[] = { | |
3449 {IMAGE_DRAW_METHOD_2DTEXTURE, "2DTEXTURE", 0, "2D Texture", "Use
CPU for display transform and draw image with 2D texture"}, | |
3450 {IMAGE_DRAW_METHOD_GLSL, "GLSL", 0, "GLSL", "Use GLSL shaders fo
r display transform and draw image with 2D texture"}, | |
3451 {IMAGE_DRAW_METHOD_DRAWPIXELS, "DRAWPIXELS", 0, "DrawPixels", "U
se CPU for display transform and draw image using DrawPixels"}, | |
3452 {0, NULL, 0, NULL, NULL} | |
3453 }; | |
3454 | |
3455 srna = RNA_def_struct(brna, "UserPreferencesSystem", NULL); | |
3456 RNA_def_struct_sdna(srna, "UserDef"); | |
3457 RNA_def_struct_nested(brna, srna, "UserPreferences"); | |
3458 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
3459 RNA_def_struct_ui_text(srna, "System & OpenGL", "Graphics driver and ope
rating system settings"); | |
3460 | |
3461 /* Language */ | |
3462 ········ | |
3463 prop = RNA_def_property(srna, "use_international_fonts", PROP_BOOLEAN, P
ROP_NONE); | |
3464 RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_DOTRANSLATE)
; | |
3465 RNA_def_property_ui_text(prop, "International Fonts", "Use international
fonts"); | |
3466 RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update"); | |
3467 | |
3468 prop = RNA_def_property(srna, "dpi", PROP_INT, PROP_NONE); | |
3469 RNA_def_property_int_sdna(prop, NULL, "dpi"); | |
3470 RNA_def_property_range(prop, 48, 144); | |
3471 RNA_def_property_ui_text(prop, "DPI", "Font size and resolution for disp
lay"); | |
3472 RNA_def_property_update(prop, 0, "rna_userdef_dpi_update"); | |
3473 ········ | |
3474 prop = RNA_def_property(srna, "scrollback", PROP_INT, PROP_UNSIGNED); | |
3475 RNA_def_property_int_sdna(prop, NULL, "scrollback"); | |
3476 RNA_def_property_range(prop, 32, 32768); | |
3477 RNA_def_property_ui_text(prop, "Scrollback", "Maximum number of lines to
store for the console buffer"); | |
3478 | |
3479 prop = RNA_def_property(srna, "author", PROP_STRING, PROP_NONE); | |
3480 RNA_def_property_string_sdna(prop, NULL, "author"); | |
3481 RNA_def_property_string_maxlength(prop, 80); | |
3482 RNA_def_property_ui_text(prop, "Author", | |
3483 "Name that will be used in exported files when
format supports such feature"); | |
3484 | |
3485 /* Language Selection */ | |
3486 | |
3487 prop = RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE); | |
3488 RNA_def_property_enum_items(prop, language_items); | |
3489 #ifdef WITH_INTERNATIONAL | |
3490 RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_lang_enum_properties_
itemf"); | |
3491 #endif | |
3492 RNA_def_property_ui_text(prop, "Language", "Language used for translatio
n"); | |
3493 RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update"); | |
3494 | |
3495 prop = RNA_def_property(srna, "use_translate_tooltips", PROP_BOOLEAN, PR
OP_NONE); | |
3496 RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_TOOLTIPS)
; | |
3497 RNA_def_property_ui_text(prop, "Translate Tooltips", "Translate tooltips
"); | |
3498 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3499 | |
3500 prop = RNA_def_property(srna, "use_translate_interface", PROP_BOOLEAN, P
ROP_NONE); | |
3501 RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_IFACE); | |
3502 RNA_def_property_ui_text(prop, "Translate Interface", "Translate interfa
ce"); | |
3503 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3504 | |
3505 prop = RNA_def_property(srna, "use_translate_new_dataname", PROP_BOOLEAN
, PROP_NONE); | |
3506 RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_NEWDATANA
ME); | |
3507 RNA_def_property_ui_text(prop, "Translate New Names", "Translate new dat
a names (when adding/creating some)"); | |
3508 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3509 | |
3510 prop = RNA_def_property(srna, "use_textured_fonts", PROP_BOOLEAN, PROP_N
ONE); | |
3511 RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_USETEXTUREFO
NT); | |
3512 RNA_def_property_ui_text(prop, "Textured Fonts", "Use textures for drawi
ng international fonts"); | |
3513 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3514 | |
3515 /* System & OpenGL */ | |
3516 | |
3517 prop = RNA_def_property(srna, "solid_lights", PROP_COLLECTION, PROP_NONE
); | |
3518 RNA_def_property_collection_sdna(prop, NULL, "light", ""); | |
3519 RNA_def_property_struct_type(prop, "UserSolidLight"); | |
3520 RNA_def_property_ui_text(prop, "Solid Lights", "Lights user to display o
bjects in solid draw mode"); | |
3521 | |
3522 prop = RNA_def_property(srna, "use_weight_color_range", PROP_BOOLEAN, PR
OP_NONE); | |
3523 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_CUSTOM_RANGE); | |
3524 RNA_def_property_ui_text(prop, "Use Weight Color Range", | |
3525 "Enable color range used for weight visualizati
on in weight painting mode"); | |
3526 RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update"); | |
3527 | |
3528 prop = RNA_def_property(srna, "weight_color_range", PROP_POINTER, PROP_N
ONE); | |
3529 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
3530 RNA_def_property_pointer_sdna(prop, NULL, "coba_weight"); | |
3531 RNA_def_property_struct_type(prop, "ColorRamp"); | |
3532 RNA_def_property_ui_text(prop, "Weight Color Range", | |
3533 "Color range used for weight visualization in w
eight painting mode"); | |
3534 RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update"); | |
3535 | |
3536 prop = RNA_def_property(srna, "color_picker_type", PROP_ENUM, PROP_NONE)
; | |
3537 RNA_def_property_enum_items(prop, color_picker_types); | |
3538 RNA_def_property_enum_sdna(prop, NULL, "color_picker_type"); | |
3539 RNA_def_property_ui_text(prop, "Color Picker Type", "Different styles of
displaying the color picker widget"); | |
3540 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3541 ········ | |
3542 prop = RNA_def_property(srna, "use_preview_images", PROP_BOOLEAN, PROP_N
ONE); | |
3543 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ALLWINCODECS); | |
3544 RNA_def_property_ui_text(prop, "Enable All Codecs", | |
3545 "Allow user to choose any codec (Windows only,
might generate instability)"); | |
3546 | |
3547 prop = RNA_def_property(srna, "use_scripts_auto_execute", PROP_BOOLEAN,
PROP_NONE); | |
3548 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_SCRIPT_A
UTOEXEC_DISABLE); | |
3549 RNA_def_property_ui_text(prop, "Auto Run Python Scripts", | |
3550 "Allow any .blend file to run scripts automatic
ally " | |
3551 "(unsafe with blend files from an untrusted sou
rce)"); | |
3552 RNA_def_property_update(prop, 0, "rna_userdef_script_autoexec_update"); | |
3553 | |
3554 prop = RNA_def_property(srna, "use_tabs_as_spaces", PROP_BOOLEAN, PROP_N
ONE); | |
3555 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TXT_TABS
TOSPACES_DISABLE); | |
3556 RNA_def_property_ui_text(prop, "Tabs as Spaces", | |
3557 "Automatically convert all new tabs into spaces
for new and loaded text files"); | |
3558 | |
3559 prop = RNA_def_property(srna, "prefetch_frames", PROP_INT, PROP_NONE); | |
3560 RNA_def_property_int_sdna(prop, NULL, "prefetchframes"); | |
3561 RNA_def_property_range(prop, 0, INT_MAX); | |
3562 RNA_def_property_ui_range(prop, 0, 500, 1, -1); | |
3563 RNA_def_property_ui_text(prop, "Prefetch Frames", "Number of frames to r
ender ahead during playback (sequencer only)"); | |
3564 | |
3565 prop = RNA_def_property(srna, "memory_cache_limit", PROP_INT, PROP_NONE)
; | |
3566 RNA_def_property_int_sdna(prop, NULL, "memcachelimit"); | |
3567 RNA_def_property_range(prop, 0, (sizeof(void *) == 8) ? 1024 * 32 : 1024
); /* 32 bit 2 GB, 64 bit 32 GB */ | |
3568 RNA_def_property_ui_text(prop, "Memory Cache Limit", "Memory cache limit
(in megabytes)"); | |
3569 RNA_def_property_update(prop, 0, "rna_Userdef_memcache_update"); | |
3570 | |
3571 prop = RNA_def_property(srna, "frame_server_port", PROP_INT, PROP_NONE); | |
3572 RNA_def_property_int_sdna(prop, NULL, "frameserverport"); | |
3573 RNA_def_property_range(prop, 0, 32727); | |
3574 RNA_def_property_ui_text(prop, "Frame Server Port", "Frameserver Port fo
r Frameserver Rendering"); | |
3575 | |
3576 prop = RNA_def_property(srna, "gl_clip_alpha", PROP_FLOAT, PROP_NONE); | |
3577 RNA_def_property_float_sdna(prop, NULL, "glalphaclip"); | |
3578 RNA_def_property_range(prop, 0.0f, 1.0f); | |
3579 RNA_def_property_ui_text(prop, "Clip Alpha", "Clip alpha below this thre
shold in the 3D textured view"); | |
3580 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3581 ········ | |
3582 prop = RNA_def_property(srna, "use_mipmaps", PROP_BOOLEAN, PROP_NONE); | |
3583 RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DIS
ABLE_MIPMAP); | |
3584 RNA_def_property_ui_text(prop, "Mipmaps", | |
3585 "Scale textures for the 3D View (looks nicer bu
t uses more memory and slows image " | |
3586 "reloading)"); | |
3587 RNA_def_property_update(prop, 0, "rna_userdef_mipmap_update"); | |
3588 | |
3589 prop = RNA_def_property(srna, "use_16bit_textures", PROP_BOOLEAN, PROP_N
ONE); | |
3590 RNA_def_property_boolean_sdna(prop, NULL, "use_16bit_textures", 1); | |
3591 RNA_def_property_ui_text(prop, "16 Bit Float Textures", "Use 16 bit per
component texture for float images"); | |
3592 RNA_def_property_update(prop, 0, "rna_userdef_gl_use_16bit_textures"); | |
3593 | |
3594 prop = RNA_def_property(srna, "use_gpu_mipmap", PROP_BOOLEAN, PROP_NONE)
; | |
3595 RNA_def_property_boolean_sdna(prop, NULL, "use_gpu_mipmap", 1); | |
3596 RNA_def_property_ui_text(prop, "GPU Mipmap Generation", "Generate Image
Mipmaps on the GPU"); | |
3597 RNA_def_property_update(prop, 0, "rna_userdef_gl_gpu_mipmaps"); | |
3598 | |
3599 prop = RNA_def_property(srna, "image_draw_method", PROP_ENUM, PROP_NONE)
; | |
3600 RNA_def_property_enum_items(prop, image_draw_methods); | |
3601 RNA_def_property_enum_sdna(prop, NULL, "image_draw_method"); | |
3602 RNA_def_property_ui_text(prop, "Image Draw Method", "Method used for dis
playing images on the screen"); | |
3603 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
3604 | |
3605 prop = RNA_def_property(srna, "use_vertex_buffer_objects", PROP_BOOLEAN,
PROP_NONE); | |
3606 RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DIS
ABLE_VBO); | |
3607 RNA_def_property_ui_text(prop, "VBOs", | |
3608 "Use Vertex Buffer Objects (or Vertex Arrays, i
f unsupported) for viewport rendering"); | |
3609 /* this isn't essential but nice to check if VBO draws any differently *
/ | |
3610 RNA_def_property_update(prop, NC_WINDOW, NULL); | |
3611 | |
3612 prop = RNA_def_property(srna, "anisotropic_filter", PROP_ENUM, PROP_NONE
); | |
3613 RNA_def_property_enum_sdna(prop, NULL, "anisotropic_filter"); | |
3614 RNA_def_property_enum_items(prop, anisotropic_items); | |
3615 RNA_def_property_enum_default(prop, 1); | |
3616 RNA_def_property_ui_text(prop, "Anisotropic Filter", | |
3617 "Quality of the anisotropic filtering (values g
reater than 1.0 enable anisotropic " | |
3618 "filtering)"); | |
3619 RNA_def_property_update(prop, 0, "rna_userdef_anisotropic_update"); | |
3620 ········ | |
3621 prop = RNA_def_property(srna, "gl_texture_limit", PROP_ENUM, PROP_NONE); | |
3622 RNA_def_property_enum_sdna(prop, NULL, "glreslimit"); | |
3623 RNA_def_property_enum_items(prop, gl_texture_clamp_items); | |
3624 RNA_def_property_ui_text(prop, "GL Texture Limit", "Limit the texture si
ze to save graphics memory"); | |
3625 RNA_def_property_update(prop, 0, "rna_userdef_gl_texture_limit_update"); | |
3626 | |
3627 prop = RNA_def_property(srna, "texture_time_out", PROP_INT, PROP_NONE); | |
3628 RNA_def_property_int_sdna(prop, NULL, "textimeout"); | |
3629 RNA_def_property_range(prop, 0, 3600); | |
3630 RNA_def_property_ui_text(prop, "Texture Time Out", | |
3631 "Time since last access of a GL texture in seco
nds after which it is freed " | |
3632 "(set to 0 to keep textures allocated)"); | |
3633 | |
3634 prop = RNA_def_property(srna, "texture_collection_rate", PROP_INT, PROP_
NONE); | |
3635 RNA_def_property_int_sdna(prop, NULL, "texcollectrate"); | |
3636 RNA_def_property_range(prop, 1, 3600); | |
3637 RNA_def_property_ui_text(prop, "Texture Collection Rate", | |
3638 "Number of seconds between each run of the GL t
exture garbage collector"); | |
3639 | |
3640 prop = RNA_def_property(srna, "window_draw_method", PROP_ENUM, PROP_NONE
); | |
3641 RNA_def_property_enum_sdna(prop, NULL, "wmdrawmethod"); | |
3642 RNA_def_property_enum_items(prop, draw_method_items); | |
3643 RNA_def_property_ui_text(prop, "Window Draw Method", "Drawing method use
d by the window manager"); | |
3644 RNA_def_property_update(prop, 0, "rna_userdef_dpi_update"); | |
3645 | |
3646 prop = RNA_def_property(srna, "audio_mixing_buffer", PROP_ENUM, PROP_NON
E); | |
3647 RNA_def_property_enum_sdna(prop, NULL, "mixbufsize"); | |
3648 RNA_def_property_enum_items(prop, audio_mixing_samples_items); | |
3649 RNA_def_property_ui_text(prop, "Audio Mixing Buffer", "Number of samples
used by the audio mixing buffer"); | |
3650 RNA_def_property_update(prop, 0, "rna_UserDef_audio_update"); | |
3651 | |
3652 prop = RNA_def_property(srna, "audio_device", PROP_ENUM, PROP_NONE); | |
3653 RNA_def_property_enum_sdna(prop, NULL, "audiodevice"); | |
3654 RNA_def_property_enum_items(prop, audio_device_items); | |
3655 RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_userdef_audio_device_
itemf"); | |
3656 RNA_def_property_ui_text(prop, "Audio Device", "Audio output device"); | |
3657 RNA_def_property_update(prop, 0, "rna_UserDef_audio_update"); | |
3658 | |
3659 prop = RNA_def_property(srna, "audio_sample_rate", PROP_ENUM, PROP_NONE)
; | |
3660 RNA_def_property_enum_sdna(prop, NULL, "audiorate"); | |
3661 RNA_def_property_enum_items(prop, audio_rate_items); | |
3662 RNA_def_property_ui_text(prop, "Audio Sample Rate", "Audio sample rate")
; | |
3663 RNA_def_property_update(prop, 0, "rna_UserDef_audio_update"); | |
3664 | |
3665 prop = RNA_def_property(srna, "audio_sample_format", PROP_ENUM, PROP_NON
E); | |
3666 RNA_def_property_enum_sdna(prop, NULL, "audioformat"); | |
3667 RNA_def_property_enum_items(prop, audio_format_items); | |
3668 RNA_def_property_ui_text(prop, "Audio Sample Format", "Audio sample form
at"); | |
3669 RNA_def_property_update(prop, 0, "rna_UserDef_audio_update"); | |
3670 | |
3671 prop = RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE); | |
3672 RNA_def_property_enum_sdna(prop, NULL, "audiochannels"); | |
3673 RNA_def_property_enum_items(prop, audio_channel_items); | |
3674 RNA_def_property_ui_text(prop, "Audio Channels", "Audio channel count"); | |
3675 RNA_def_property_update(prop, 0, "rna_UserDef_audio_update"); | |
3676 | |
3677 prop = RNA_def_property(srna, "screencast_fps", PROP_INT, PROP_NONE); | |
3678 RNA_def_property_int_sdna(prop, NULL, "scrcastfps"); | |
3679 RNA_def_property_range(prop, 10, 50); | |
3680 RNA_def_property_ui_text(prop, "FPS", "Frame rate for the screencast to
be played back"); | |
3681 | |
3682 prop = RNA_def_property(srna, "screencast_wait_time", PROP_INT, PROP_NON
E); | |
3683 RNA_def_property_int_sdna(prop, NULL, "scrcastwait"); | |
3684 RNA_def_property_range(prop, 50, 1000); | |
3685 RNA_def_property_ui_text(prop, "Wait Timer (ms)", | |
3686 "Time in milliseconds between each frame record
ed for screencast"); | |
3687 | |
3688 prop = RNA_def_property(srna, "use_text_antialiasing", PROP_BOOLEAN, PRO
P_NONE); | |
3689 RNA_def_property_boolean_negative_sdna(prop, NULL, "text_render", USER_T
EXT_DISABLE_AA); | |
3690 RNA_def_property_ui_text(prop, "Text Anti-aliasing", "Draw user interfac
e text anti-aliased"); | |
3691 RNA_def_property_update(prop, 0, "rna_userdef_text_update"); | |
3692 ········ | |
3693 /* Full scene anti-aliasing */ | |
3694 prop = RNA_def_property(srna, "multi_sample", PROP_ENUM, PROP_NONE); | |
3695 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ogl_multisamples"); | |
3696 RNA_def_property_enum_items(prop, multi_sample_levels); | |
3697 RNA_def_property_ui_text(prop, "MultiSample", "Enable OpenGL multi-sampl
ing, only for systems that support it, requires restart"); | |
3698 | |
3699 prop = RNA_def_property(srna, "use_region_overlap", PROP_BOOLEAN, PROP_N
ONE); | |
3700 RNA_def_property_boolean_sdna(prop, NULL, "uiflag2", USER_REGION_OVERLAP
); | |
3701 RNA_def_property_ui_text(prop, "Region Overlap", | |
3702 "Draw tool/property regions over the main regio
n, when using Triple Buffer"); | |
3703 RNA_def_property_update(prop, 0, "rna_userdef_dpi_update"); | |
3704 ········ | |
3705 #ifdef WITH_CYCLES | |
3706 prop = RNA_def_property(srna, "compute_device_type", PROP_ENUM, PROP_NON
E); | |
3707 RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT); | |
3708 RNA_def_property_enum_sdna(prop, NULL, "compute_device_type"); | |
3709 RNA_def_property_enum_items(prop, compute_device_type_items); | |
3710 RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_userdef_compute_devic
e_type_itemf"); | |
3711 RNA_def_property_ui_text(prop, "Compute Device Type", "Device to use for
computation (rendering with Cycles)"); | |
3712 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_PROPERTIES, NULL); | |
3713 | |
3714 prop = RNA_def_property(srna, "compute_device", PROP_ENUM, PROP_NONE); | |
3715 RNA_def_property_flag(prop, PROP_ENUM_NO_CONTEXT); | |
3716 RNA_def_property_enum_sdna(prop, NULL, "compute_device_id"); | |
3717 RNA_def_property_enum_items(prop, compute_device_items); | |
3718 RNA_def_property_enum_funcs(prop, "rna_userdef_compute_device_get", NULL
, "rna_userdef_compute_device_itemf"); | |
3719 RNA_def_property_ui_text(prop, "Compute Device", "Device to use for comp
utation"); | |
3720 #endif | |
3721 } | |
3722 | |
3723 static void rna_def_userdef_input(BlenderRNA *brna) | |
3724 { | |
3725 PropertyRNA *prop; | |
3726 StructRNA *srna; | |
3727 | |
3728 static EnumPropertyItem select_mouse_items[] = { | |
3729 {USER_LMOUSESELECT, "LEFT", 0, "Left", "Use left Mouse Button fo
r selection"}, | |
3730 {0, "RIGHT", 0, "Right", "Use Right Mouse Button for selection"}
, | |
3731 {0, NULL, 0, NULL, NULL} | |
3732 }; | |
3733 ················ | |
3734 static EnumPropertyItem view_rotation_items[] = { | |
3735 {0, "TURNTABLE", 0, "Turntable", "Use turntable style rotation i
n the viewport"}, | |
3736 {USER_TRACKBALL, "TRACKBALL", 0, "Trackball", "Use trackball sty
le rotation in the viewport"}, | |
3737 {0, NULL, 0, NULL, NULL} | |
3738 }; | |
3739 | |
3740 static EnumPropertyItem ndof_view_rotation_items[] = { | |
3741 {NDOF_TURNTABLE, "TURNTABLE", 0, "Turntable", "Use turntable sty
le rotation in the viewport"}, | |
3742 {0, "TRACKBALL", 0, "Trackball", "Use trackball style rotation i
n the viewport"}, | |
3743 {0, NULL, 0, NULL, NULL} | |
3744 }; | |
3745 ················ | |
3746 static EnumPropertyItem view_zoom_styles[] = { | |
3747 {USER_ZOOM_CONT, "CONTINUE", 0, "Continue", "Old style zoom, con
tinues while moving mouse up or down"}, | |
3748 {USER_ZOOM_DOLLY, "DOLLY", 0, "Dolly", "Zoom in and out based on
vertical mouse movement"}, | |
3749 {USER_ZOOM_SCALE, "SCALE", 0, "Scale", | |
3750 "Zoom in and out like scaling the view, mouse
movements relative to center"}, | |
3751 {0, NULL, 0, NULL, NULL} | |
3752 }; | |
3753 ········ | |
3754 static EnumPropertyItem view_zoom_axes[] = { | |
3755 {0, "VERTICAL", 0, "Vertical", "Zoom in and out based on vertica
l mouse movement"}, | |
3756 {USER_ZOOM_HORIZ, "HORIZONTAL", 0, "Horizontal", "Zoom in and ou
t based on horizontal mouse movement"}, | |
3757 {0, NULL, 0, NULL, NULL} | |
3758 }; | |
3759 ················ | |
3760 srna = RNA_def_struct(brna, "UserPreferencesInput", NULL); | |
3761 RNA_def_struct_sdna(srna, "UserDef"); | |
3762 RNA_def_struct_nested(brna, srna, "UserPreferences"); | |
3763 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
3764 RNA_def_struct_ui_text(srna, "Input", "Settings for input devices"); | |
3765 ········ | |
3766 prop = RNA_def_property(srna, "select_mouse", PROP_ENUM, PROP_NONE); | |
3767 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | |
3768 RNA_def_property_enum_items(prop, select_mouse_items); | |
3769 RNA_def_property_enum_funcs(prop, NULL, "rna_userdef_select_mouse_set",
NULL); | |
3770 RNA_def_property_ui_text(prop, "Select Mouse", "Mouse button used for se
lection"); | |
3771 ········ | |
3772 prop = RNA_def_property(srna, "view_zoom_method", PROP_ENUM, PROP_NONE); | |
3773 RNA_def_property_enum_sdna(prop, NULL, "viewzoom"); | |
3774 RNA_def_property_enum_items(prop, view_zoom_styles); | |
3775 RNA_def_property_ui_text(prop, "Zoom Style", "Which style to use for vie
wport scaling"); | |
3776 ········ | |
3777 prop = RNA_def_property(srna, "view_zoom_axis", PROP_ENUM, PROP_NONE); | |
3778 RNA_def_property_enum_bitflag_sdna(prop, NULL, "uiflag"); | |
3779 RNA_def_property_enum_items(prop, view_zoom_axes); | |
3780 RNA_def_property_ui_text(prop, "Zoom Axis", "Axis of mouse movement to z
oom in or out on"); | |
3781 ········ | |
3782 prop = RNA_def_property(srna, "invert_mouse_zoom", PROP_BOOLEAN, PROP_NO
NE); | |
3783 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_INVERT); | |
3784 RNA_def_property_ui_text(prop, "Invert Zoom Direction", "Invert the axis
of mouse movement for zooming"); | |
3785 ········ | |
3786 prop = RNA_def_property(srna, "view_rotate_method", PROP_ENUM, PROP_NONE
); | |
3787 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | |
3788 RNA_def_property_enum_items(prop, view_rotation_items); | |
3789 RNA_def_property_ui_text(prop, "View Rotation", "Rotation style in the v
iewport"); | |
3790 ········ | |
3791 prop = RNA_def_property(srna, "use_mouse_continuous", PROP_BOOLEAN, PROP
_NONE); | |
3792 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_CONTINUOUS_MOUS
E); | |
3793 RNA_def_property_ui_text(prop, "Continuous Grab", | |
3794 "Allow moving the mouse outside the view on som
e manipulations " | |
3795 "(transform, ui control drag)"); | |
3796 ········ | |
3797 /* tweak tablet & mouse preset */ | |
3798 prop = RNA_def_property(srna, "drag_threshold", PROP_INT, PROP_NONE); | |
3799 RNA_def_property_int_sdna(prop, NULL, "dragthreshold"); | |
3800 RNA_def_property_range(prop, 3, 40); | |
3801 RNA_def_property_ui_text(prop, "Drag Threshold", | |
3802 "Amount of pixels you have to drag before dragg
ing UI items happens"); | |
3803 | |
3804 prop = RNA_def_property(srna, "tweak_threshold", PROP_INT, PROP_NONE); | |
3805 RNA_def_property_int_sdna(prop, NULL, "tweak_threshold"); | |
3806 RNA_def_property_range(prop, 3, 1024); | |
3807 RNA_def_property_ui_text(prop, "Tweak Threshold", | |
3808 "Number of pixels you have to drag before tweak
event is triggered"); | |
3809 | |
3810 /* 3D mouse settings */ | |
3811 /* global options */ | |
3812 prop = RNA_def_property(srna, "ndof_sensitivity", PROP_FLOAT, PROP_NONE)
; | |
3813 RNA_def_property_range(prop, 0.25f, 4.0f); | |
3814 RNA_def_property_ui_text(prop, "Sensitivity", "Overall sensitivity of th
e 3D Mouse for panning"); | |
3815 ········ | |
3816 prop = RNA_def_property(srna, "ndof_orbit_sensitivity", PROP_FLOAT, PROP
_NONE); | |
3817 RNA_def_property_range(prop, 0.25f, 4.0f); | |
3818 RNA_def_property_ui_text(prop, "Orbit Sensitivity", "Overall sensitivity
of the 3D Mouse for orbiting"); | |
3819 | |
3820 prop = RNA_def_property(srna, "ndof_zoom_updown", PROP_BOOLEAN, PROP_NON
E); | |
3821 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ZOOM_UPDOWN)
; | |
3822 RNA_def_property_ui_text(prop, "Zoom = Up/Down", | |
3823 "Zoom using up/down on the device (otherwise fo
rward/backward)"); | |
3824 | |
3825 prop = RNA_def_property(srna, "ndof_zoom_invert", PROP_BOOLEAN, PROP_NON
E); | |
3826 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ZOOM_INVERT)
; | |
3827 RNA_def_property_ui_text(prop, "Invert Zoom", "Zoom using opposite direc
tion"); | |
3828 | |
3829 /* 3D view */ | |
3830 prop = RNA_def_property(srna, "ndof_show_guide", PROP_BOOLEAN, PROP_NONE
); | |
3831 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_SHOW_GUIDE); | |
3832 RNA_def_property_ui_text(prop, "Show Navigation Guide", "Display the cen
ter and axis during rotation"); | |
3833 /* TODO: update description when fly-mode visuals are in place ("projec
ted position in fly mode")*/ | |
3834 ········ | |
3835 /* 3D view */ | |
3836 prop = RNA_def_property(srna, "ndof_view_rotate_method", PROP_ENUM, PROP
_NONE); | |
3837 RNA_def_property_enum_bitflag_sdna(prop, NULL, "ndof_flag"); | |
3838 RNA_def_property_enum_items(prop, ndof_view_rotation_items); | |
3839 RNA_def_property_ui_text(prop, "NDOF View Rotation", "Rotation style in
the viewport"); | |
3840 | |
3841 /* 3D view: roll */ | |
3842 prop = RNA_def_property(srna, "ndof_roll_invert_axis", PROP_BOOLEAN, PRO
P_NONE); | |
3843 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ROLL_INVERT_
AXIS); | |
3844 RNA_def_property_ui_text(prop, "Invert roll Axis", "Invert roll axis"); | |
3845 | |
3846 /* 3D view: tilt */ | |
3847 prop = RNA_def_property(srna, "ndof_tilt_invert_axis", PROP_BOOLEAN, PRO
P_NONE); | |
3848 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_TILT_INVERT_
AXIS); | |
3849 RNA_def_property_ui_text(prop, "Invert tilt Axis", "Invert tilt axis"); | |
3850 | |
3851 /* 3D view: rotate */ | |
3852 prop = RNA_def_property(srna, "ndof_rotate_invert_axis", PROP_BOOLEAN, P
ROP_NONE); | |
3853 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ROTATE_INVER
T_AXIS); | |
3854 RNA_def_property_ui_text(prop, "Invert rotation Axis", "Invert rotation
axis"); | |
3855 | |
3856 /* 3D view: pan x */ | |
3857 prop = RNA_def_property(srna, "ndof_panx_invert_axis", PROP_BOOLEAN, PRO
P_NONE); | |
3858 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PANX_INVERT_
AXIS); | |
3859 RNA_def_property_ui_text(prop, "Invert x Axis", "Invert x axis"); | |
3860 | |
3861 /* 3D view: pan y */ | |
3862 prop = RNA_def_property(srna, "ndof_pany_invert_axis", PROP_BOOLEAN, PRO
P_NONE); | |
3863 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PANY_INVERT_
AXIS); | |
3864 RNA_def_property_ui_text(prop, "Invert y Axis", "Invert y axis"); | |
3865 | |
3866 /* 3D view: pan z */ | |
3867 prop = RNA_def_property(srna, "ndof_panz_invert_axis", PROP_BOOLEAN, PRO
P_NONE); | |
3868 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PANZ_INVERT_
AXIS); | |
3869 RNA_def_property_ui_text(prop, "Invert z Axis", "Invert z axis"); | |
3870 | |
3871 /* 3D view: fly */ | |
3872 prop = RNA_def_property(srna, "ndof_lock_horizon", PROP_BOOLEAN, PROP_NO
NE); | |
3873 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_LOCK_HORIZON
); | |
3874 RNA_def_property_ui_text(prop, "Lock Horizon", "Keep horizon level while
flying with 3D Mouse"); | |
3875 | |
3876 prop = RNA_def_property(srna, "ndof_fly_helicopter", PROP_BOOLEAN, PROP_
NONE); | |
3877 RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_FLY_HELICOPT
ER); | |
3878 RNA_def_property_ui_text(prop, "Helicopter Mode", "Device up/down direct
ly controls your Z position"); | |
3879 | |
3880 | |
3881 prop = RNA_def_property(srna, "mouse_double_click_time", PROP_INT, PROP_
NONE); | |
3882 RNA_def_property_int_sdna(prop, NULL, "dbl_click_time"); | |
3883 RNA_def_property_range(prop, 1, 1000); | |
3884 RNA_def_property_ui_text(prop, "Double Click Timeout", "Time/delay (in m
s) for a double click"); | |
3885 | |
3886 prop = RNA_def_property(srna, "use_mouse_emulate_3_button", PROP_BOOLEAN
, PROP_NONE); | |
3887 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TWOBUTTONMOUSE); | |
3888 RNA_def_property_ui_text(prop, "Emulate 3 Button Mouse", | |
3889 "Emulate Middle Mouse with Alt+Left Mouse (does
n't work with Left Mouse Select option)"); | |
3890 | |
3891 prop = RNA_def_property(srna, "use_emulate_numpad", PROP_BOOLEAN, PROP_N
ONE); | |
3892 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_NONUMPAD); | |
3893 RNA_def_property_ui_text(prop, "Emulate Numpad", "Main 1 to 0 keys act a
s the numpad ones (useful for laptops)"); | |
3894 ········ | |
3895 /* middle mouse button */ | |
3896 prop = RNA_def_property(srna, "use_mouse_mmb_paste", PROP_BOOLEAN, PROP_
NONE); | |
3897 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MMB_PASTE); | |
3898 RNA_def_property_ui_text(prop, "Middle Mouse Paste", | |
3899 "In text window, paste with middle mouse button
instead of panning"); | |
3900 ········ | |
3901 prop = RNA_def_property(srna, "invert_zoom_wheel", PROP_BOOLEAN, PROP_NO
NE); | |
3902 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_WHEELZOOMDIR); | |
3903 RNA_def_property_ui_text(prop, "Wheel Invert Zoom", "Swap the Mouse Whee
l zoom direction"); | |
3904 | |
3905 prop = RNA_def_property(srna, "wheel_scroll_lines", PROP_INT, PROP_NONE)
; | |
3906 RNA_def_property_int_sdna(prop, NULL, "wheellinescroll"); | |
3907 RNA_def_property_range(prop, 0, 32); | |
3908 RNA_def_property_ui_text(prop, "Wheel Scroll Lines", "Number of lines sc
rolled at a time with the mouse wheel"); | |
3909 ········ | |
3910 prop = RNA_def_property(srna, "use_trackpad_natural", PROP_BOOLEAN, PROP
_NONE); | |
3911 RNA_def_property_boolean_sdna(prop, NULL, "uiflag2", USER_TRACKPAD_NATUR
AL); | |
3912 RNA_def_property_ui_text(prop, "Trackpad Natural", | |
3913 "If your system uses 'natural' scrolling, this
option keeps consistent trackpad usage throughout the UI"); | |
3914 | |
3915 prop = RNA_def_property(srna, "active_keyconfig", PROP_STRING, PROP_DIRP
ATH); | |
3916 RNA_def_property_string_sdna(prop, NULL, "keyconfigstr"); | |
3917 RNA_def_property_ui_text(prop, "Key Config", "The name of the active key
configuration"); | |
3918 } | |
3919 | |
3920 static void rna_def_userdef_filepaths(BlenderRNA *brna) | |
3921 { | |
3922 PropertyRNA *prop; | |
3923 StructRNA *srna; | |
3924 ········ | |
3925 static EnumPropertyItem anim_player_presets[] = { | |
3926 {0, "INTERNAL", 0, "Internal", "Built-in animation player"}, | |
3927 {1, "BLENDER24", 0, "Blender 2.4", "Blender command line animati
on playback - path to Blender 2.4"}, | |
3928 {2, "DJV", 0, "Djv", "Open source frame player: http://djv.sourc
eforge.net"}, | |
3929 {3, "FRAMECYCLER", 0, "FrameCycler", "Frame player from IRIDAS"}
, | |
3930 {4, "RV", 0, "rv", "Frame player from Tweak Software"}, | |
3931 {5, "MPLAYER", 0, "MPlayer", "Media player for video & png/jpeg/
sgi image sequences"}, | |
3932 {50, "CUSTOM", 0, "Custom", "Custom animation player executable
path"}, | |
3933 {0, NULL, 0, NULL, NULL} | |
3934 }; | |
3935 ········ | |
3936 srna = RNA_def_struct(brna, "UserPreferencesFilePaths", NULL); | |
3937 RNA_def_struct_sdna(srna, "UserDef"); | |
3938 RNA_def_struct_nested(brna, srna, "UserPreferences"); | |
3939 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
3940 RNA_def_struct_ui_text(srna, "File Paths", "Default paths for external f
iles"); | |
3941 ········ | |
3942 prop = RNA_def_property(srna, "show_hidden_files_datablocks", PROP_BOOLE
AN, PROP_NONE); | |
3943 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_DOT); | |
3944 RNA_def_property_ui_text(prop, "Hide Dot Files/Datablocks", "Hide files/
datablocks that start with a dot (.*)"); | |
3945 ········ | |
3946 prop = RNA_def_property(srna, "use_filter_files", PROP_BOOLEAN, PROP_NON
E); | |
3947 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_FILTERFILEEXTS)
; | |
3948 RNA_def_property_ui_text(prop, "Filter File Extensions", | |
3949 "Display only files with extensions in the imag
e select window"); | |
3950 ········ | |
3951 prop = RNA_def_property(srna, "hide_recent_locations", PROP_BOOLEAN, PRO
P_NONE); | |
3952 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_RECENT); | |
3953 RNA_def_property_ui_text(prop, "Hide Recent Locations", "Hide recent loc
ations in the file selector"); | |
3954 | |
3955 prop = RNA_def_property(srna, "hide_system_bookmarks", PROP_BOOLEAN, PRO
P_NONE); | |
3956 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_SYSTEM_BOO
KMARKS); | |
3957 RNA_def_property_ui_text(prop, "Hide System Bookmarks", "Hide system boo
kmarks in the file selector"); | |
3958 | |
3959 prop = RNA_def_property(srna, "show_thumbnails", PROP_BOOLEAN, PROP_NONE
); | |
3960 RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_THUMBNAILS
); | |
3961 RNA_def_property_ui_text(prop, "Show Thumbnails", "Open in thumbnail vie
w for images and movies"); | |
3962 | |
3963 prop = RNA_def_property(srna, "use_relative_paths", PROP_BOOLEAN, PROP_N
ONE); | |
3964 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELPATHS); | |
3965 RNA_def_property_ui_text(prop, "Relative Paths", "Default relative path
option for the file selector"); | |
3966 ········ | |
3967 prop = RNA_def_property(srna, "use_file_compression", PROP_BOOLEAN, PROP
_NONE); | |
3968 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_FILECOMPRESS); | |
3969 RNA_def_property_ui_text(prop, "Compress File", "Enable file compression
when saving .blend files"); | |
3970 | |
3971 prop = RNA_def_property(srna, "use_load_ui", PROP_BOOLEAN, PROP_NONE); | |
3972 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_FILENOUI
); | |
3973 RNA_def_property_ui_text(prop, "Load UI", "Load user interface setup whe
n loading .blend files"); | |
3974 RNA_def_property_update(prop, 0, "rna_userdef_load_ui_update"); | |
3975 | |
3976 prop = RNA_def_property(srna, "font_directory", PROP_STRING, PROP_DIRPAT
H); | |
3977 RNA_def_property_string_sdna(prop, NULL, "fontdir"); | |
3978 RNA_def_property_ui_text(prop, "Fonts Directory", "The default directory
to search for loading fonts"); | |
3979 | |
3980 prop = RNA_def_property(srna, "texture_directory", PROP_STRING, PROP_DIR
PATH); | |
3981 RNA_def_property_string_sdna(prop, NULL, "textudir"); | |
3982 RNA_def_property_ui_text(prop, "Textures Directory", "The default direct
ory to search for textures"); | |
3983 | |
3984 prop = RNA_def_property(srna, "render_output_directory", PROP_STRING, PR
OP_DIRPATH); | |
3985 RNA_def_property_string_sdna(prop, NULL, "renderdir"); | |
3986 RNA_def_property_ui_text(prop, "Render Output Directory", | |
3987 "The default directory for rendering output, fo
r new scenes"); | |
3988 | |
3989 prop = RNA_def_property(srna, "script_directory", PROP_STRING, PROP_DIRP
ATH); | |
3990 RNA_def_property_string_sdna(prop, NULL, "pythondir"); | |
3991 RNA_def_property_ui_text(prop, "Python Scripts Directory", | |
3992 "Alternate script path, matching the default la
yout with subdirs: " | |
3993 "startup, addons & modules (requires restart)")
; | |
3994 /* TODO, editing should reset sys.path! */ | |
3995 | |
3996 prop = RNA_def_property(srna, "i18n_branches_directory", PROP_STRING, PR
OP_DIRPATH); | |
3997 RNA_def_property_string_sdna(prop, NULL, "i18ndir"); | |
3998 RNA_def_property_ui_text(prop, "Translation Branches Directory", | |
3999 "The path to the '/branches' directory of your
local svn-translation copy, " | |
4000 "to allow translating from the UI"); | |
4001 | |
4002 prop = RNA_def_property(srna, "sound_directory", PROP_STRING, PROP_DIRPA
TH); | |
4003 RNA_def_property_string_sdna(prop, NULL, "sounddir"); | |
4004 RNA_def_property_ui_text(prop, "Sounds Directory", "The default director
y to search for sounds"); | |
4005 | |
4006 prop = RNA_def_property(srna, "temporary_directory", PROP_STRING, PROP_D
IRPATH); | |
4007 RNA_def_property_string_sdna(prop, NULL, "tempdir"); | |
4008 RNA_def_property_ui_text(prop, "Temporary Directory", "The directory for
storing temporary save files"); | |
4009 RNA_def_property_update(prop, 0, "rna_userdef_temp_update"); | |
4010 | |
4011 prop = RNA_def_property(srna, "image_editor", PROP_STRING, PROP_FILEPATH
); | |
4012 RNA_def_property_string_sdna(prop, NULL, "image_editor"); | |
4013 RNA_def_property_ui_text(prop, "Image Editor", "Path to an image editor"
); | |
4014 ········ | |
4015 prop = RNA_def_property(srna, "animation_player", PROP_STRING, PROP_FILE
PATH); | |
4016 RNA_def_property_string_sdna(prop, NULL, "anim_player"); | |
4017 RNA_def_property_ui_text(prop, "Animation Player", "Path to a custom ani
mation/frame sequence player"); | |
4018 | |
4019 prop = RNA_def_property(srna, "animation_player_preset", PROP_ENUM, PROP
_NONE); | |
4020 RNA_def_property_enum_sdna(prop, NULL, "anim_player_preset"); | |
4021 RNA_def_property_enum_items(prop, anim_player_presets); | |
4022 RNA_def_property_ui_text(prop, "Animation Player Preset", "Preset config
s for external animation players"); | |
4023 RNA_def_property_enum_default(prop, 1); /* set default to blender 2.
4 player until an internal one is back */ | |
4024 ········ | |
4025 /* Autosave */ | |
4026 | |
4027 prop = RNA_def_property(srna, "save_version", PROP_INT, PROP_NONE); | |
4028 RNA_def_property_int_sdna(prop, NULL, "versions"); | |
4029 RNA_def_property_range(prop, 0, 32); | |
4030 RNA_def_property_ui_text(prop, "Save Versions", | |
4031 "The number of old versions to maintain in the
current directory, when manually saving"); | |
4032 | |
4033 prop = RNA_def_property(srna, "use_auto_save_temporary_files", PROP_BOOL
EAN, PROP_NONE); | |
4034 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSAVE); | |
4035 RNA_def_property_ui_text(prop, "Auto Save Temporary Files", | |
4036 "Automatic saving of temporary files in temp di
rectory, uses process ID"); | |
4037 RNA_def_property_update(prop, 0, "rna_userdef_autosave_update"); | |
4038 | |
4039 prop = RNA_def_property(srna, "auto_save_time", PROP_INT, PROP_NONE); | |
4040 RNA_def_property_int_sdna(prop, NULL, "savetime"); | |
4041 RNA_def_property_range(prop, 1, 60); | |
4042 RNA_def_property_ui_text(prop, "Auto Save Time", | |
4043 "The time (in minutes) to wait between automati
c temporary saves"); | |
4044 RNA_def_property_update(prop, 0, "rna_userdef_autosave_update"); | |
4045 | |
4046 prop = RNA_def_property(srna, "use_keep_session", PROP_BOOLEAN, PROP_NON
E); | |
4047 RNA_def_property_boolean_sdna(prop, NULL, "uiflag2", USER_KEEP_SESSION); | |
4048 RNA_def_property_ui_text(prop, "Keep Session", | |
4049 "Always load session recovery and save it after
quitting Blender"); | |
4050 ········ | |
4051 prop = RNA_def_property(srna, "recent_files", PROP_INT, PROP_NONE); | |
4052 RNA_def_property_range(prop, 0, 30); | |
4053 RNA_def_property_ui_text(prop, "Recent Files", "Maximum number of recent
ly opened files to remember"); | |
4054 | |
4055 prop = RNA_def_property(srna, "use_save_preview_images", PROP_BOOLEAN, P
ROP_NONE); | |
4056 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SAVE_PREVIEWS); | |
4057 RNA_def_property_ui_text(prop, "Save Preview Images", | |
4058 "Enables automatic saving of preview images in
the .blend file"); | |
4059 } | |
4060 | |
4061 static void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cpro
p) | |
4062 { | |
4063 StructRNA *srna; | |
4064 FunctionRNA *func; | |
4065 PropertyRNA *parm; | |
4066 | |
4067 RNA_def_property_srna(cprop, "Addons"); | |
4068 srna = RNA_def_struct(brna, "Addons", NULL); | |
4069 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
4070 RNA_def_struct_ui_text(srna, "User Addons", "Collection of addons"); | |
4071 | |
4072 func = RNA_def_function(srna, "new", "rna_userdef_addon_new"); | |
4073 RNA_def_function_flag(func, FUNC_NO_SELF); | |
4074 RNA_def_function_ui_description(func, "Add a new addon"); | |
4075 /* return type */ | |
4076 parm = RNA_def_pointer(func, "addon", "Addon", "", "Addon datablock"); | |
4077 RNA_def_function_return(func, parm); | |
4078 | |
4079 func = RNA_def_function(srna, "remove", "rna_userdef_addon_remove"); | |
4080 RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_REPORTS); | |
4081 RNA_def_function_ui_description(func, "Remove addon"); | |
4082 parm = RNA_def_pointer(func, "addon", "Addon", "", "Addon to remove"); | |
4083 RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPT
R); | |
4084 RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); | |
4085 } | |
4086 | |
4087 static void rna_def_userdef_autoexec_path_collection(BlenderRNA *brna, PropertyR
NA *cprop) | |
4088 { | |
4089 StructRNA *srna; | |
4090 FunctionRNA *func; | |
4091 PropertyRNA *parm; | |
4092 | |
4093 RNA_def_property_srna(cprop, "PathCompareCollection"); | |
4094 srna = RNA_def_struct(brna, "PathCompareCollection", NULL); | |
4095 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
4096 RNA_def_struct_ui_text(srna, "Paths Compare", "Collection of paths"); | |
4097 | |
4098 func = RNA_def_function(srna, "new", "rna_userdef_pathcompare_new"); | |
4099 RNA_def_function_flag(func, FUNC_NO_SELF); | |
4100 RNA_def_function_ui_description(func, "Add a new path"); | |
4101 /* return type */ | |
4102 parm = RNA_def_pointer(func, "pathcmp", "PathCompare", "", ""); | |
4103 RNA_def_function_return(func, parm); | |
4104 | |
4105 func = RNA_def_function(srna, "remove", "rna_userdef_pathcompare_remove"
); | |
4106 RNA_def_function_flag(func, FUNC_NO_SELF | FUNC_USE_REPORTS); | |
4107 RNA_def_function_ui_description(func, "Remove path"); | |
4108 parm = RNA_def_pointer(func, "pathcmp", "PathCompare", "", ""); | |
4109 RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPT
R); | |
4110 RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); | |
4111 } | |
4112 | |
4113 void RNA_def_userdef(BlenderRNA *brna) | |
4114 { | |
4115 StructRNA *srna; | |
4116 PropertyRNA *prop; | |
4117 | |
4118 static EnumPropertyItem user_pref_sections[] = { | |
4119 {USER_SECTION_INTERFACE, "INTERFACE", 0, "Interface", ""}, | |
4120 {USER_SECTION_EDIT, "EDITING", 0, "Editing", ""}, | |
4121 {USER_SECTION_INPUT, "INPUT", 0, "Input", ""}, | |
4122 {USER_SECTION_ADDONS, "ADDONS", 0, "Addons", ""}, | |
4123 {USER_SECTION_THEME, "THEMES", 0, "Themes", ""}, | |
4124 {USER_SECTION_FILE, "FILES", 0, "File", ""}, | |
4125 {USER_SECTION_SYSTEM, "SYSTEM", 0, "System", ""}, | |
4126 {0, NULL, 0, NULL, NULL} | |
4127 }; | |
4128 | |
4129 rna_def_userdef_dothemes(brna); | |
4130 rna_def_userdef_solidlight(brna); | |
4131 | |
4132 srna = RNA_def_struct(brna, "UserPreferences", NULL); | |
4133 RNA_def_struct_sdna(srna, "UserDef"); | |
4134 RNA_def_struct_clear_flag(srna, STRUCT_UNDO); | |
4135 RNA_def_struct_ui_text(srna, "User Preferences", "Global user preference
s"); | |
4136 | |
4137 prop = RNA_def_property(srna, "active_section", PROP_ENUM, PROP_NONE); | |
4138 RNA_def_property_enum_sdna(prop, NULL, "userpref"); | |
4139 RNA_def_property_enum_items(prop, user_pref_sections); | |
4140 RNA_def_property_ui_text(prop, "Active Section", | |
4141 "Active section of the user preferences shown i
n the user interface"); | |
4142 RNA_def_property_update(prop, 0, "rna_userdef_update"); | |
4143 | |
4144 prop = RNA_def_property(srna, "themes", PROP_COLLECTION, PROP_NONE); | |
4145 RNA_def_property_collection_sdna(prop, NULL, "themes", NULL); | |
4146 RNA_def_property_struct_type(prop, "Theme"); | |
4147 RNA_def_property_ui_text(prop, "Themes", ""); | |
4148 | |
4149 prop = RNA_def_property(srna, "ui_styles", PROP_COLLECTION, PROP_NONE); | |
4150 RNA_def_property_collection_sdna(prop, NULL, "uistyles", NULL); | |
4151 RNA_def_property_struct_type(prop, "ThemeStyle"); | |
4152 RNA_def_property_ui_text(prop, "Styles", ""); | |
4153 ········ | |
4154 prop = RNA_def_property(srna, "addons", PROP_COLLECTION, PROP_NONE); | |
4155 RNA_def_property_collection_sdna(prop, NULL, "addons", NULL); | |
4156 RNA_def_property_struct_type(prop, "Addon"); | |
4157 RNA_def_property_ui_text(prop, "Addon", ""); | |
4158 rna_def_userdef_addon_collection(brna, prop); | |
4159 | |
4160 prop = RNA_def_property(srna, "autoexec_paths", PROP_COLLECTION, PROP_NO
NE); | |
4161 RNA_def_property_collection_sdna(prop, NULL, "autoexec_paths", NULL); | |
4162 RNA_def_property_struct_type(prop, "PathCompare"); | |
4163 RNA_def_property_ui_text(prop, "Autoexec Paths", ""); | |
4164 rna_def_userdef_autoexec_path_collection(brna, prop); | |
4165 | |
4166 /* nested structs */ | |
4167 prop = RNA_def_property(srna, "view", PROP_POINTER, PROP_NONE); | |
4168 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
4169 RNA_def_property_struct_type(prop, "UserPreferencesView"); | |
4170 RNA_def_property_pointer_funcs(prop, "rna_UserDef_view_get", NULL, NULL,
NULL); | |
4171 RNA_def_property_ui_text(prop, "View & Controls", "Preferences related t
o viewing data"); | |
4172 | |
4173 prop = RNA_def_property(srna, "edit", PROP_POINTER, PROP_NONE); | |
4174 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
4175 RNA_def_property_struct_type(prop, "UserPreferencesEdit"); | |
4176 RNA_def_property_pointer_funcs(prop, "rna_UserDef_edit_get", NULL, NULL,
NULL); | |
4177 RNA_def_property_ui_text(prop, "Edit Methods", "Settings for interacting
with Blender data"); | |
4178 ········ | |
4179 prop = RNA_def_property(srna, "inputs", PROP_POINTER, PROP_NONE); | |
4180 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
4181 RNA_def_property_struct_type(prop, "UserPreferencesInput"); | |
4182 RNA_def_property_pointer_funcs(prop, "rna_UserDef_input_get", NULL, NULL
, NULL); | |
4183 RNA_def_property_ui_text(prop, "Inputs", "Settings for input devices"); | |
4184 ········ | |
4185 prop = RNA_def_property(srna, "filepaths", PROP_POINTER, PROP_NONE); | |
4186 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
4187 RNA_def_property_struct_type(prop, "UserPreferencesFilePaths"); | |
4188 RNA_def_property_pointer_funcs(prop, "rna_UserDef_filepaths_get", NULL,
NULL, NULL); | |
4189 RNA_def_property_ui_text(prop, "File Paths", "Default paths for external
files"); | |
4190 ········ | |
4191 prop = RNA_def_property(srna, "system", PROP_POINTER, PROP_NONE); | |
4192 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
4193 RNA_def_property_struct_type(prop, "UserPreferencesSystem"); | |
4194 RNA_def_property_pointer_funcs(prop, "rna_UserDef_system_get", NULL, NUL
L, NULL); | |
4195 RNA_def_property_ui_text(prop, "System & OpenGL", "Graphics driver and o
perating system settings"); | |
4196 ········ | |
4197 rna_def_userdef_view(brna); | |
4198 rna_def_userdef_edit(brna); | |
4199 rna_def_userdef_input(brna); | |
4200 rna_def_userdef_filepaths(brna); | |
4201 rna_def_userdef_system(brna); | |
4202 rna_def_userdef_addon(brna); | |
4203 rna_def_userdef_addon_pref(brna); | |
4204 rna_def_userdef_pathcompare(brna); | |
4205 ········ | |
4206 } | |
4207 | |
4208 #endif | |
LEFT | RIGHT |