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 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1794 prop = RNA_def_property(srna, "use_snap_align_rotation", PROP_BOOLEAN, P
ROP_NONE); | 1794 prop = RNA_def_property(srna, "use_snap_align_rotation", PROP_BOOLEAN, P
ROP_NONE); |
1795 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ROTATE); | 1795 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_ROTATE); |
1796 RNA_def_property_ui_text(prop, "Snap Align Rotation", "Align rotation wi
th the snapping target"); | 1796 RNA_def_property_ui_text(prop, "Snap Align Rotation", "Align rotation wi
th the snapping target"); |
1797 RNA_def_property_ui_icon(prop, ICON_SNAP_NORMAL, 0); | 1797 RNA_def_property_ui_icon(prop, ICON_SNAP_NORMAL, 0); |
1798 RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* head
er redraw */ | 1798 RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* head
er redraw */ |
1799 | 1799 |
1800 prop = RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE); | 1800 prop = RNA_def_property(srna, "snap_element", PROP_ENUM, PROP_NONE); |
1801 RNA_def_property_enum_sdna(prop, NULL, "snap_mode"); | 1801 RNA_def_property_enum_sdna(prop, NULL, "snap_mode"); |
1802 RNA_def_property_enum_items(prop, snap_element_items); | 1802 RNA_def_property_enum_items(prop, snap_element_items); |
1803 RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap
to"); | 1803 RNA_def_property_ui_text(prop, "Snap Element", "Type of element to snap
to"); |
1804 RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* head
er redraw */ | |
1805 ········ | |
1806 /* node editor uses own set of snap modes */ | |
1807 prop = RNA_def_property(srna, "snap_node_element", PROP_ENUM, PROP_NONE)
; | |
1808 RNA_def_property_enum_sdna(prop, NULL, "snap_node_mode"); | |
1809 RNA_def_property_enum_items(prop, snap_node_element_items); | |
1810 RNA_def_property_ui_text(prop, "Snap Node Element", "Type of element to
snap to"); | |
1811 RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* head
er redraw */ | |
1812 ········ | |
1813 /* image editor uses own set of snap modes */ | |
1814 prop = RNA_def_property(srna, "snap_uv_element", PROP_ENUM, PROP_NONE); | |
1815 RNA_def_property_enum_sdna(prop, NULL, "snap_uv_mode"); | |
1816 RNA_def_property_enum_items(prop, snap_uv_element_items); | |
1817 RNA_def_property_ui_text(prop, "Snap UV Element", "Type of element to sn
ap to"); | |
1818 RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* head
er redraw */ | |
1819 | |
1820 prop = RNA_def_property(srna, "snap_target", PROP_ENUM, PROP_NONE); | |
1821 RNA_def_property_enum_sdna(prop, NULL, "snap_target"); | |
1822 RNA_def_property_enum_items(prop, snap_target_items); | |
1823 RNA_def_property_ui_text(prop, "Snap Target", "Which part to snap onto t
he target"); | |
1824 RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* head
er redraw */ | |
1825 | |
1826 prop = RNA_def_property(srna, "use_snap_peel_object", PROP_BOOLEAN, PROP
_NONE); | |
1827 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PEEL_OBJ
ECT); | |
1828 RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as
whole when finding volume center"); | |
1829 RNA_def_property_ui_icon(prop, ICON_SNAP_PEEL_OBJECT, 0); | |
1830 RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* head
er redraw */ | |
1831 ········ | |
1832 prop = RNA_def_property(srna, "use_snap_project", PROP_BOOLEAN, PROP_NON
E); | |
1833 RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PROJECT)
; | |
1834 RNA_def_property_ui_text(prop, "Project Individual Elements", | |
1835 "Project individual elements on the surface of
other objects"); | |
1836 RNA_def_property_ui_icon(prop, ICON_RETOPO, 0); | |
1837 RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* head
er redraw */ | |
1838 | |
1839 prop = RNA_def_property(srna, "use_snap_self", PROP_BOOLEAN, PROP_NONE); | |
1840 RNA_def_property_boolean_negative_sdna(prop, NULL, "snap_flag", SCE_SNAP
_NO_SELF); | |
1841 RNA_def_property_ui_text(prop, "Project to Self", "Snap onto itself (edi
tmode)"); | |
1842 RNA_def_property_ui_icon(prop, ICON_ORTHO, 0); | |
1843 RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* head
er redraw */ | |
1844 | |
1845 /* Grease Pencil */ | |
1846 prop = RNA_def_property(srna, "use_grease_pencil_sessions", PROP_BOOLEAN
, PROP_NONE); | |
1847 RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_
PAINTSESSIONS_ON); | |
1848 RNA_def_property_ui_text(prop, "Use Sketching Sessions", | |
1849 "Allow drawing multiple strokes at a time with
Grease Pencil"); | |
1850 RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* xxx:
need toolbar to be redrawn... */ | |
1851 ········ | |
1852 /* Auto Keying */ | |
1853 prop = RNA_def_property(srna, "use_keyframe_insert_auto", PROP_BOOLEAN,
PROP_NONE); | |
1854 RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON); | |
1855 RNA_def_property_ui_text(prop, "Auto Keying", "Automatic keyframe insert
ion for Objects and Bones"); | |
1856 RNA_def_property_ui_icon(prop, ICON_REC, 0); | |
1857 ········ | |
1858 prop = RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE); | |
1859 RNA_def_property_enum_bitflag_sdna(prop, NULL, "autokey_mode"); | |
1860 RNA_def_property_enum_items(prop, auto_key_items); | |
1861 RNA_def_property_ui_text(prop, "Auto-Keying Mode", "Mode of automatic ke
yframe insertion for Objects and Bones"); | |
1862 ········ | |
1863 prop = RNA_def_property(srna, "use_record_with_nla", PROP_BOOLEAN, PROP_
NONE); | |
1864 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", ANIMRECORD_FLA
G_WITHNLA); | |
1865 RNA_def_property_ui_text(prop, "Layered", | |
1866 "Add a new NLA Track + Strip for every loop/pas
s made over the animation " | |
1867 "to allow non-destructive tweaking"); | |
1868 ········ | |
1869 prop = RNA_def_property(srna, "use_keyframe_insert_keyingset", PROP_BOOL
EAN, PROP_NONE); | |
1870 RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_O
NLYKEYINGSET); | |
1871 RNA_def_property_ui_text(prop, "Auto Keyframe Insert Keying Set", | |
1872 "Automatic keyframe insertion using active Keyi
ng Set only"); | |
1873 RNA_def_property_ui_icon(prop, ICON_KEYINGSET, 0); | |
1874 ········ | |
1875 /* UV */ | |
1876 prop = RNA_def_property(srna, "uv_select_mode", PROP_ENUM, PROP_NONE); | |
1877 RNA_def_property_enum_sdna(prop, NULL, "uv_selectmode"); | |
1878 RNA_def_property_enum_items(prop, uv_select_mode_items); | |
1879 RNA_def_property_ui_text(prop, "UV Selection Mode", "UV selection and di
splay mode"); | |
1880 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); | |
1881 | |
1882 prop = RNA_def_property(srna, "use_uv_select_sync", PROP_BOOLEAN, PROP_N
ONE); | |
1883 RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SYNC_SELECTION); | |
1884 RNA_def_property_ui_text(prop, "UV Sync Selection", "Keep UV and edit mo
de mesh selection in sync"); | |
1885 RNA_def_property_ui_icon(prop, ICON_EDIT, 0); | |
1886 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); | |
1887 | |
1888 prop = RNA_def_property(srna, "show_uv_local_view", PROP_BOOLEAN, PROP_N
ONE); | |
1889 RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SHOW_SAME_IMAGE)
; | |
1890 RNA_def_property_ui_text(prop, "UV Local View", "Draw only faces with th
e currently displayed image assigned"); | |
1891 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); | |
1892 | |
1893 /* Mesh */ | |
1894 prop = RNA_def_property(srna, "mesh_select_mode", PROP_BOOLEAN, PROP_NON
E); | |
1895 RNA_def_property_boolean_sdna(prop, NULL, "selectmode", 1); | |
1896 RNA_def_property_array(prop, 3); | |
1897 RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_editmesh_select_mo
de_set"); | |
1898 RNA_def_property_ui_text(prop, "Mesh Selection Mode", "Which mesh elemen
ts selection works on"); | |
1899 RNA_def_property_update(prop, 0, "rna_Scene_editmesh_select_mode_update"
); | |
1900 | |
1901 prop = RNA_def_property(srna, "vertex_group_weight", PROP_FLOAT, PROP_FA
CTOR); | |
1902 RNA_def_property_float_sdna(prop, NULL, "vgroup_weight"); | |
1903 RNA_def_property_ui_text(prop, "Vertex Group Weight", "Weight to assign
in vertex groups"); | |
1904 | |
1905 /* use with MESH_OT_shortest_path_pick */ | |
1906 prop = RNA_def_property(srna, "edge_path_mode", PROP_ENUM, PROP_NONE); | |
1907 RNA_def_property_enum_sdna(prop, NULL, "edge_mode"); | |
1908 RNA_def_property_enum_items(prop, edge_tag_items); | |
1909 RNA_def_property_ui_text(prop, "Edge Tag Mode", "The edge flag to tag wh
en selecting the shortest path"); | |
1910 | |
1911 prop = RNA_def_property(srna, "edge_path_live_unwrap", PROP_BOOLEAN, PRO
P_NONE); | |
1912 RNA_def_property_boolean_sdna(prop, NULL, "edge_mode_live_unwrap", 1); | |
1913 RNA_def_property_ui_text(prop, "Live Unwrap", "Changing edges seam re-ca
lculates UV unwrap"); | |
1914 | |
1915 /* etch-a-ton */ | |
1916 prop = RNA_def_property(srna, "use_bone_sketching", PROP_BOOLEAN, PROP_N
ONE); | |
1917 RNA_def_property_boolean_sdna(prop, NULL, "bone_sketching", BONE_SKETCHI
NG); | |
1918 RNA_def_property_ui_text(prop, "Use Bone Sketching", "Use sketching to c
reate and edit bones"); | |
1919 /* RNA_def_property_ui_icon(prop, ICON_EDIT, 0); */ | |
1920 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |
1921 | |
1922 prop = RNA_def_property(srna, "use_etch_quick", PROP_BOOLEAN, PROP_NONE)
; | |
1923 RNA_def_property_boolean_sdna(prop, NULL, "bone_sketching", BONE_SKETCHI
NG_QUICK); | |
1924 RNA_def_property_ui_text(prop, "Quick Sketching", "Automatically convert
and delete on stroke end"); | |
1925 | |
1926 prop = RNA_def_property(srna, "use_etch_overdraw", PROP_BOOLEAN, PROP_NO
NE); | |
1927 RNA_def_property_boolean_sdna(prop, NULL, "bone_sketching", BONE_SKETCHI
NG_ADJUST); | |
1928 RNA_def_property_ui_text(prop, "Overdraw Sketching", "Adjust strokes by
drawing near them"); | |
1929 ········ | |
1930 prop = RNA_def_property(srna, "use_etch_autoname", PROP_BOOLEAN, PROP_NO
NE); | |
1931 RNA_def_property_boolean_sdna(prop, NULL, "skgen_retarget_options", SK_R
ETARGET_AUTONAME); | |
1932 RNA_def_property_ui_text(prop, "Autoname Bones", "Automatically generate
values to replace &N and &S suffix placeholders in template names"); | |
1933 | |
1934 prop = RNA_def_property(srna, "etch_number", PROP_STRING, PROP_NONE); | |
1935 RNA_def_property_string_sdna(prop, NULL, "skgen_num_string"); | |
1936 RNA_def_property_ui_text(prop, "Number", "Text to replace &N with (e.g.
'Finger.&N' -> 'Finger.1' or 'Finger.One')"); | |
1937 | |
1938 prop = RNA_def_property(srna, "etch_side", PROP_STRING, PROP_NONE); | |
1939 RNA_def_property_string_sdna(prop, NULL, "skgen_num_string"); | |
1940 RNA_def_property_ui_text(prop, "Side", "Text to replace &S with (e.g. 'A
rm.&S' -> 'Arm.R' or 'Arm.Right')"); | |
1941 | |
1942 prop = RNA_def_property(srna, "etch_template", PROP_POINTER, PROP_NONE); | |
1943 RNA_def_property_pointer_sdna(prop, NULL, "skgen_template"); | |
1944 RNA_def_property_flag(prop, PROP_EDITABLE); | |
1945 RNA_def_property_struct_type(prop, "Object"); | |
1946 RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_skgen_etch_templat
e_set", NULL, NULL); | |
1947 RNA_def_property_ui_text(prop, "Template", "Template armature that will
be retargeted to the stroke"); | |
1948 | |
1949 prop = RNA_def_property(srna, "etch_subdivision_number", PROP_INT, PROP_
NONE); | |
1950 RNA_def_property_int_sdna(prop, NULL, "skgen_subdivision_number"); | |
1951 RNA_def_property_range(prop, 1, 255); | |
1952 RNA_def_property_ui_text(prop, "Subdivisions", "Number of bones in the s
ubdivided stroke"); | |
1953 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |
1954 | |
1955 prop = RNA_def_property(srna, "etch_adaptive_limit", PROP_FLOAT, PROP_FA
CTOR); | |
1956 RNA_def_property_float_sdna(prop, NULL, "skgen_correlation_limit"); | |
1957 RNA_def_property_range(prop, 0.00001, 1.0); | |
1958 RNA_def_property_ui_range(prop, 0.01, 1.0, 0.01, 2); | |
1959 RNA_def_property_ui_text(prop, "Limit", "Correlation threshold for numbe
r of bones in the subdivided stroke"); | |
1960 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |
1961 | |
1962 prop = RNA_def_property(srna, "etch_length_limit", PROP_FLOAT, PROP_DIST
ANCE); | |
1963 RNA_def_property_float_sdna(prop, NULL, "skgen_length_limit"); | |
1964 RNA_def_property_range(prop, 0.00001, 100000.0); | |
1965 RNA_def_property_ui_range(prop, 0.001, 100.0, 0.1, 3); | |
1966 RNA_def_property_ui_text(prop, "Length", "Maximum length of the subdivid
ed bones"); | |
1967 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |
1968 | |
1969 prop = RNA_def_property(srna, "etch_roll_mode", PROP_ENUM, PROP_NONE); | |
1970 RNA_def_property_enum_bitflag_sdna(prop, NULL, "skgen_retarget_roll"); | |
1971 RNA_def_property_enum_items(prop, retarget_roll_items); | |
1972 RNA_def_property_ui_text(prop, "Retarget roll mode", "Method used to adj
ust the roll of bones when retargeting"); | |
1973 ········ | |
1974 prop = RNA_def_property(srna, "etch_convert_mode", PROP_ENUM, PROP_NONE)
; | |
1975 RNA_def_property_enum_bitflag_sdna(prop, NULL, "bone_sketching_convert")
; | |
1976 RNA_def_property_enum_items(prop, sketch_convert_items); | |
1977 RNA_def_property_ui_text(prop, "Stroke conversion method", "Method used
to convert stroke to bones"); | |
1978 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |
1979 | |
1980 /* Unified Paint Settings */ | |
1981 prop = RNA_def_property(srna, "unified_paint_settings", PROP_POINTER, PR
OP_NONE); | |
1982 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1983 RNA_def_property_struct_type(prop, "UnifiedPaintSettings"); | |
1984 RNA_def_property_ui_text(prop, "Unified Paint Settings", NULL); | |
1985 | |
1986 /* Mesh Statistics */ | |
1987 prop = RNA_def_property(srna, "statvis", PROP_POINTER, PROP_NONE); | |
1988 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
1989 RNA_def_property_struct_type(prop, "MeshStatVis"); | |
1990 RNA_def_property_ui_text(prop, "Mesh Statistics Visualization", NULL); | |
1991 } | |
1992 | |
1993 static void rna_def_unified_paint_settings(BlenderRNA *brna) | |
1994 { | |
1995 StructRNA *srna; | |
1996 PropertyRNA *prop; | |
1997 | |
1998 srna = RNA_def_struct(brna, "UnifiedPaintSettings", NULL); | |
1999 RNA_def_struct_path_func(srna, "rna_UnifiedPaintSettings_path"); | |
2000 RNA_def_struct_ui_text(srna, "Unified Paint Settings", "Overrides for so
me of the active brush's settings"); | |
2001 | |
2002 /* high-level flags to enable or disable unified paint settings */ | |
2003 prop = RNA_def_property(srna, "use_unified_size", PROP_BOOLEAN, PROP_NON
E); | |
2004 RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_SIZE); | |
2005 RNA_def_property_ui_text(prop, "Use Unified Radius", | |
2006 "Instead of per-brush radius, the radius is sha
red across brushes"); | |
2007 | |
2008 prop = RNA_def_property(srna, "use_unified_strength", PROP_BOOLEAN, PROP
_NONE); | |
2009 RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_ALPHA); | |
2010 RNA_def_property_ui_text(prop, "Use Unified Strength", | |
2011 "Instead of per-brush strength, the strength is
shared across brushes"); | |
2012 | |
2013 prop = RNA_def_property(srna, "use_unified_weight", PROP_BOOLEAN, PROP_N
ONE); | |
2014 RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_WEIGHT); | |
2015 RNA_def_property_ui_text(prop, "Use Unified Weight", | |
2016 "Instead of per-brush weight, the weight is sha
red across brushes"); | |
2017 | |
2018 /* unified paint settings that override the equivalent settings | |
2019 * from the active brush */ | |
2020 prop = RNA_def_property(srna, "size", PROP_INT, PROP_NONE); | |
2021 RNA_def_property_int_funcs(prop, NULL, "rna_UnifiedPaintSettings_size_se
t", NULL); | |
2022 RNA_def_property_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS * 10); | |
2023 RNA_def_property_ui_range(prop, 1, MAX_BRUSH_PIXEL_RADIUS, 1, -1); | |
2024 RNA_def_property_ui_text(prop, "Radius", "Radius of the brush in pixels"
); | |
2025 RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_radius_update
"); | |
2026 | |
2027 prop = RNA_def_property(srna, "unprojected_radius", PROP_FLOAT, PROP_DIS
TANCE); | |
2028 RNA_def_property_float_funcs(prop, NULL, "rna_UnifiedPaintSettings_unpro
jected_radius_set", NULL); | |
2029 RNA_def_property_range(prop, 0.001, FLT_MAX); | |
2030 RNA_def_property_ui_range(prop, 0.001, 1, 0, -1); | |
2031 RNA_def_property_ui_text(prop, "Unprojected Radius", "Radius of brush in
Blender units"); | |
2032 RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_radius_update
"); | |
2033 | |
2034 prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR); | |
2035 RNA_def_property_float_sdna(prop, NULL, "alpha"); | |
2036 RNA_def_property_float_default(prop, 0.5f); | |
2037 RNA_def_property_range(prop, 0.0f, 10.0f); | |
2038 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3); | |
2039 RNA_def_property_ui_text(prop, "Strength", "How powerful the effect of t
he brush is when applied"); | |
2040 RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_update"); | |
2041 | |
2042 prop = RNA_def_property(srna, "weight", PROP_FLOAT, PROP_FACTOR); | |
2043 RNA_def_property_float_sdna(prop, NULL, "weight"); | |
2044 RNA_def_property_float_default(prop, 0.5f); | |
2045 RNA_def_property_range(prop, 0.0f, 1.0f); | |
2046 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 3); | |
2047 RNA_def_property_ui_text(prop, "Weight", "Weight to assign in vertex gro
ups"); | |
2048 RNA_def_property_update(prop, 0, "rna_UnifiedPaintSettings_update"); | |
2049 | |
2050 prop = RNA_def_property(srna, "use_pressure_size", PROP_BOOLEAN, PROP_NO
NE); | |
2051 RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_SI
ZE_PRESSURE); | |
2052 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | |
2053 RNA_def_property_ui_text(prop, "Size Pressure", "Enable tablet pressure
sensitivity for size"); | |
2054 | |
2055 prop = RNA_def_property(srna, "use_pressure_strength", PROP_BOOLEAN, PRO
P_NONE); | |
2056 RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_AL
PHA_PRESSURE); | |
2057 RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0); | |
2058 RNA_def_property_ui_text(prop, "Strength Pressure", "Enable tablet press
ure sensitivity for strength"); | |
2059 | |
2060 prop = RNA_def_property(srna, "use_locked_size", PROP_BOOLEAN, PROP_NONE
); | |
2061 RNA_def_property_boolean_sdna(prop, NULL, "flag", UNIFIED_PAINT_BRUSH_LO
CK_SIZE); | |
2062 RNA_def_property_ui_text(prop, "Use Blender Units", | |
2063 "When locked brush stays same size relative to
object; " | |
2064 "when unlocked brush size is given in pixels"); | |
2065 } | |
2066 | |
2067 static void rna_def_statvis(BlenderRNA *brna) | |
2068 { | |
2069 StructRNA *srna; | |
2070 PropertyRNA *prop; | |
2071 | |
2072 static EnumPropertyItem stat_type[] = { | |
2073 {SCE_STATVIS_OVERHANG, "OVERHANG", 0, "Overhang", ""}, | |
2074 {SCE_STATVIS_THICKNESS, "THICKNESS", 0, "Thickness", ""}, | |
2075 {SCE_STATVIS_INTERSECT, "INTERSECT", 0, "Intersect", ""}, | |
2076 {SCE_STATVIS_DISTORT, "DISTORT", 0, "Distortion", ""}, | |
2077 {SCE_STATVIS_SHARP, "SHARP", 0, "Sharp", ""}, | |
2078 {0, NULL, 0, NULL, NULL}}; | 1804 {0, NULL, 0, NULL, NULL}}; |
2079 | 1805 |
2080 srna = RNA_def_struct(brna, "MeshStatVis", NULL); | 1806 static EnumPropertyItem material_items[] ={ |
2081 RNA_def_struct_path_func(srna, "rna_MeshStatVis_path"); | 1807 {GAME_MAT_TEXFACE, "TEXTURE_FACE", 0, "Texture Face", "Single te
xture face materials"}, |
2082 RNA_def_struct_ui_text(srna, "Mesh Visualize Statistics", ""); | |
2083 | |
2084 prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); | |
2085 RNA_def_property_enum_items(prop, stat_type); | |
2086 RNA_def_property_ui_text(prop, "Type", "XXX"); | |
2087 RNA_def_property_update(prop, 0, "rna_EditMesh_update"); | |
2088 | |
2089 | |
2090 /* overhang */ | |
2091 prop = RNA_def_property(srna, "overhang_min", PROP_FLOAT, PROP_ANGLE); | |
2092 RNA_def_property_float_sdna(prop, NULL, "overhang_min"); | |
2093 RNA_def_property_float_default(prop, 0.5f); | |
2094 RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f)); | |
2095 RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 0.001, 3); | |
2096 RNA_def_property_ui_text(prop, "Overhang Min", "Minimum angle to display
"); | |
2097 RNA_def_property_update(prop, 0, "rna_EditMesh_update"); | |
2098 | |
2099 prop = RNA_def_property(srna, "overhang_max", PROP_FLOAT, PROP_ANGLE); | |
2100 RNA_def_property_float_sdna(prop, NULL, "overhang_max"); | |
2101 RNA_def_property_float_default(prop, 0.5f); | |
2102 RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f)); | |
2103 RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 0.001, 3); | |
2104 RNA_def_property_ui_text(prop, "Overhang Max", "Maximum angle to display
"); | |
2105 RNA_def_property_update(prop, 0, "rna_EditMesh_update"); | |
2106 | |
2107 prop = RNA_def_property(srna, "overhang_axis", PROP_ENUM, PROP_NONE); | |
2108 RNA_def_property_enum_sdna(prop, NULL, "overhang_axis"); | |
2109 RNA_def_property_enum_items(prop, object_axis_items); | |
2110 RNA_def_property_ui_text(prop, "Axis", ""); | |
2111 RNA_def_property_update(prop, 0, "rna_EditMesh_update"); | |
2112 | |
2113 | |
2114 /* thickness */ | |
2115 prop = RNA_def_property(srna, "thickness_min", PROP_FLOAT, PROP_DISTANCE
); | |
2116 RNA_def_property_float_sdna(prop, NULL, "thickness_min"); | |
2117 RNA_def_property_float_default(prop, 0.5f); | |
2118 RNA_def_property_range(prop, 0.0f, 1000.0); | |
2119 RNA_def_property_ui_range(prop, 0.0f, 100.0, 0.001, 3); | |
2120 RNA_def_property_ui_text(prop, "Thickness Min", "Minimum for measuring t
hickness"); | |
2121 RNA_def_property_update(prop, 0, "rna_EditMesh_update"); | |
2122 | |
2123 prop = RNA_def_property(srna, "thickness_max", PROP_FLOAT, PROP_DISTANCE
); | |
2124 RNA_def_property_float_sdna(prop, NULL, "thickness_max"); | |
2125 RNA_def_property_float_default(prop, 0.5f); | |
2126 RNA_def_property_range(prop, 0.0f, 1000.0); | |
2127 RNA_def_property_ui_range(prop, 0.0f, 100.0, 0.001, 3); | |
2128 RNA_def_property_ui_text(prop, "Thickness Max", "Maximum for measuring t
hickness"); | |
2129 RNA_def_property_update(prop, 0, "rna_EditMesh_update"); | |
2130 | |
2131 prop = RNA_def_property(srna, "thickness_samples", PROP_INT, PROP_UNSIGN
ED); | |
2132 RNA_def_property_int_sdna(prop, NULL, "thickness_samples"); | |
2133 RNA_def_property_range(prop, 1, 32); | |
2134 RNA_def_property_ui_text(prop, "Samples", "Number of samples to test per
face"); | |
2135 RNA_def_property_update(prop, 0, "rna_EditMesh_update"); | |
2136 | |
2137 /* distort */ | |
2138 prop = RNA_def_property(srna, "distort_min", PROP_FLOAT, PROP_ANGLE); | |
2139 RNA_def_property_float_sdna(prop, NULL, "distort_min"); | |
2140 RNA_def_property_float_default(prop, 0.5f); | |
2141 RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f)); | |
2142 RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 0.001, 3); | |
2143 RNA_def_property_ui_text(prop, "Distort Min", "Minimum angle to display"
); | |
2144 RNA_def_property_update(prop, 0, "rna_EditMesh_update"); | |
2145 | |
2146 prop = RNA_def_property(srna, "distort_max", PROP_FLOAT, PROP_ANGLE); | |
2147 RNA_def_property_float_sdna(prop, NULL, "distort_max"); | |
2148 RNA_def_property_float_default(prop, 0.5f); | |
2149 RNA_def_property_range(prop, 0.0f, DEG2RADF(180.0f)); | |
2150 RNA_def_property_ui_range(prop, 0.0f, DEG2RADF(180.0f), 0.001, 3); | |
2151 RNA_def_property_ui_text(prop, "Distort Max", "Maximum angle to display"
); | |
2152 RNA_def_property_update(prop, 0, "rna_EditMesh_update"); | |
2153 | |
2154 /* sharp */ | |
2155 prop = RNA_def_property(srna, "sharp_min", PROP_FLOAT, PROP_ANGLE); | |
2156 RNA_def_property_float_sdna(prop, NULL, "sharp_min"); | |
2157 RNA_def_property_float_default(prop, 0.5f); | |
2158 RNA_def_property_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f)); | |
2159 RNA_def_property_ui_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f), 0.0
01, 3); | |
2160 RNA_def_property_ui_text(prop, "Distort Min", "Minimum angle to display"
); | |
2161 RNA_def_property_update(prop, 0, "rna_EditMesh_update"); | |
2162 | |
2163 prop = RNA_def_property(srna, "sharp_max", PROP_FLOAT, PROP_ANGLE); | |
2164 RNA_def_property_float_sdna(prop, NULL, "sharp_max"); | |
2165 RNA_def_property_float_default(prop, 0.5f); | |
2166 RNA_def_property_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f)); | |
2167 RNA_def_property_ui_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f), 0.0
01, 3); | |
2168 RNA_def_property_ui_text(prop, "Distort Max", "Maximum angle to display"
); | |
2169 RNA_def_property_update(prop, 0, "rna_EditMesh_update"); | |
2170 } | |
2171 | |
2172 static void rna_def_unit_settings(BlenderRNA *brna) | |
2173 { | |
2174 StructRNA *srna; | |
2175 PropertyRNA *prop; | |
2176 | |
2177 static EnumPropertyItem unit_systems[] = { | |
2178 {USER_UNIT_NONE, "NONE", 0, "None", ""}, | |
2179 {USER_UNIT_METRIC, "METRIC", 0, "Metric", ""}, | |
2180 {USER_UNIT_IMPERIAL, "IMPERIAL", 0, "Imperial", ""}, | |
2181 {0, NULL, 0, NULL, NULL} | |
2182 }; | |
2183 ········ | |
2184 static EnumPropertyItem rotation_units[] = { | |
2185 {0, "DEGREES", 0, "Degrees", "Use degrees for measuring angles a
nd rotations"}, | |
2186 {USER_UNIT_ROT_RADIANS, "RADIANS", 0, "Radians", ""}, | |
2187 {0, NULL, 0, NULL, NULL} | |
2188 }; | |
2189 | |
2190 srna = RNA_def_struct(brna, "UnitSettings", NULL); | |
2191 RNA_def_struct_ui_text(srna, "Unit Settings", ""); | |
2192 | |
2193 /* Units */ | |
2194 prop = RNA_def_property(srna, "system", PROP_ENUM, PROP_NONE); | |
2195 RNA_def_property_enum_items(prop, unit_systems); | |
2196 RNA_def_property_ui_text(prop, "Unit System", "The unit system to use fo
r button display"); | |
2197 RNA_def_property_update(prop, NC_WINDOW, NULL); | |
2198 ········ | |
2199 prop = RNA_def_property(srna, "system_rotation", PROP_ENUM, PROP_NONE); | |
2200 RNA_def_property_enum_items(prop, rotation_units); | |
2201 RNA_def_property_ui_text(prop, "Rotation Units", "Unit to use for displa
ying/editing rotation values"); | |
2202 RNA_def_property_update(prop, NC_WINDOW, NULL); | |
2203 | |
2204 prop = RNA_def_property(srna, "scale_length", PROP_FLOAT, PROP_UNSIGNED)
; | |
2205 RNA_def_property_ui_text(prop, "Unit Scale", "Scale to use when converti
ng between blender units and dimensions"); | |
2206 RNA_def_property_range(prop, 0.00001, 100000.0); | |
2207 RNA_def_property_ui_range(prop, 0.001, 100.0, 0.1, 3); | |
2208 RNA_def_property_update(prop, NC_WINDOW, NULL); | |
2209 | |
2210 prop = RNA_def_property(srna, "use_separate", PROP_BOOLEAN, PROP_NONE); | |
2211 RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_UNIT_OPT_SPLIT); | |
2212 RNA_def_property_ui_text(prop, "Separate Units", "Display units in pairs
(e.g. 1m 0cm)"); | |
2213 RNA_def_property_update(prop, NC_WINDOW, NULL); | |
2214 } | |
2215 | |
2216 void rna_def_render_layer_common(StructRNA *srna, int scene) | |
2217 { | |
2218 PropertyRNA *prop; | |
2219 | |
2220 prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); | |
2221 if (scene) RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SceneRen
derLayer_name_set"); | |
2222 else RNA_def_property_string_sdna(prop, NULL, "name"); | |
2223 RNA_def_property_ui_text(prop, "Name", "Render layer name"); | |
2224 RNA_def_struct_name_property(srna, prop); | |
2225 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, N
ULL); | |
2226 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2227 | |
2228 prop = RNA_def_property(srna, "material_override", PROP_POINTER, PROP_NO
NE); | |
2229 RNA_def_property_pointer_sdna(prop, NULL, "mat_override"); | |
2230 RNA_def_property_struct_type(prop, "Material"); | |
2231 RNA_def_property_flag(prop, PROP_EDITABLE); | |
2232 RNA_def_property_ui_text(prop, "Material Override", | |
2233 "Material to override all other materials in th
is render layer"); | |
2234 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2235 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2236 | |
2237 prop = RNA_def_property(srna, "light_override", PROP_POINTER, PROP_NONE)
; | |
2238 RNA_def_property_pointer_sdna(prop, NULL, "light_override"); | |
2239 RNA_def_property_struct_type(prop, "Group"); | |
2240 RNA_def_property_flag(prop, PROP_EDITABLE); | |
2241 RNA_def_property_ui_text(prop, "Light Override", "Group to override all
other lights in this render layer"); | |
2242 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2243 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2244 | |
2245 /* layers */ | |
2246 prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER)
; | |
2247 RNA_def_property_boolean_sdna(prop, NULL, "lay", 1); | |
2248 RNA_def_property_array(prop, 20); | |
2249 RNA_def_property_ui_text(prop, "Visible Layers", "Scene layers included
in this render layer"); | |
2250 if (scene) RNA_def_property_boolean_funcs(prop, NULL, "rna_SceneRenderLa
yer_layer_set"); | |
2251 else RNA_def_property_boolean_funcs(prop, NULL, "rna_RenderLayer_layer_s
et"); | |
2252 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_Scene_glsl_update"); | |
2253 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2254 | |
2255 prop = RNA_def_property(srna, "layers_zmask", PROP_BOOLEAN, PROP_LAYER); | |
2256 RNA_def_property_boolean_sdna(prop, NULL, "lay_zmask", 1); | |
2257 RNA_def_property_array(prop, 20); | |
2258 RNA_def_property_ui_text(prop, "Zmask Layers", "Zmask scene layers for s
olid faces"); | |
2259 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_Scene_glsl_update"); | |
2260 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2261 | |
2262 prop = RNA_def_property(srna, "layers_exclude", PROP_BOOLEAN, PROP_LAYER
); | |
2263 RNA_def_property_boolean_sdna(prop, NULL, "lay_exclude", 1); | |
2264 RNA_def_property_array(prop, 20); | |
2265 RNA_def_property_ui_text(prop, "Exclude Layers", "Exclude scene layers f
rom having any influence"); | |
2266 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_Scene_glsl_update"); | |
2267 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2268 | |
2269 if (scene) { | |
2270 prop = RNA_def_property(srna, "samples", PROP_INT, PROP_UNSIGNED
); | |
2271 RNA_def_property_ui_text(prop, "Samples", "Override number of re
nder samples for this render layer, " | |
2272 "0 will use the scene
setting"); | |
2273 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL
); | |
2274 } | |
2275 | |
2276 /* layer options */ | |
2277 prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE); | |
2278 RNA_def_property_boolean_negative_sdna(prop, NULL, "layflag", SCE_LAY_DI
SABLE); | |
2279 RNA_def_property_ui_text(prop, "Enabled", "Disable or enable the render
layer"); | |
2280 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_Scene_glsl_update"); | |
2281 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2282 | |
2283 prop = RNA_def_property(srna, "use_zmask", PROP_BOOLEAN, PROP_NONE); | |
2284 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZMASK); | |
2285 RNA_def_property_ui_text(prop, "Zmask", "Only render what's in front of
the solid z values"); | |
2286 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_Scene_glsl_update"); | |
2287 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2288 | |
2289 prop = RNA_def_property(srna, "invert_zmask", PROP_BOOLEAN, PROP_NONE); | |
2290 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_NEG_ZMASK); | |
2291 RNA_def_property_ui_text(prop, "Zmask Negate", | |
2292 "For Zmask, only render what is behind solid z
values instead of in front"); | |
2293 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_Scene_glsl_update"); | |
2294 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2295 | |
2296 prop = RNA_def_property(srna, "use_all_z", PROP_BOOLEAN, PROP_NONE); | |
2297 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ALL_Z); | |
2298 RNA_def_property_ui_text(prop, "All Z", "Fill in Z values for solid face
s in invisible layers, for masking"); | |
2299 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, N
ULL); | |
2300 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2301 | |
2302 prop = RNA_def_property(srna, "use_solid", PROP_BOOLEAN, PROP_NONE); | |
2303 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SOLID); | |
2304 RNA_def_property_ui_text(prop, "Solid", "Render Solid faces in this Laye
r"); | |
2305 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, N
ULL); | |
2306 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2307 | |
2308 prop = RNA_def_property(srna, "use_halo", PROP_BOOLEAN, PROP_NONE); | |
2309 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_HALO); | |
2310 RNA_def_property_ui_text(prop, "Halo", "Render Halos in this Layer (on t
op of Solid)"); | |
2311 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, N
ULL); | |
2312 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2313 | |
2314 prop = RNA_def_property(srna, "use_ztransp", PROP_BOOLEAN, PROP_NONE); | |
2315 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_ZTRA); | |
2316 RNA_def_property_ui_text(prop, "ZTransp", "Render Z-Transparent faces in
this Layer (on top of Solid and Halos)"); | |
2317 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, N
ULL); | |
2318 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2319 | |
2320 prop = RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE); | |
2321 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_SKY); | |
2322 RNA_def_property_ui_text(prop, "Sky", "Render Sky in this Layer"); | |
2323 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_Scene_glsl_update"); | |
2324 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2325 | |
2326 prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NON
E); | |
2327 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_EDGE); | |
2328 RNA_def_property_ui_text(prop, "Edge", "Render Edge-enhance in this Laye
r (only works for Solid faces)"); | |
2329 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, N
ULL); | |
2330 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2331 | |
2332 prop = RNA_def_property(srna, "use_strand", PROP_BOOLEAN, PROP_NONE); | |
2333 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_STRAND); | |
2334 RNA_def_property_ui_text(prop, "Strand", "Render Strands in this Layer")
; | |
2335 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, N
ULL); | |
2336 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2337 | |
2338 prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE); | |
2339 RNA_def_property_boolean_sdna(prop, NULL, "layflag", SCE_LAY_FRS); | |
2340 RNA_def_property_ui_text(prop, "Freestyle", "Render stylized strokes in
this Layer"); | |
2341 if (scene) | |
2342 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL
); | |
2343 else | |
2344 RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2345 | |
2346 /* passes */ | |
2347 prop = RNA_def_property(srna, "use_pass_combined", PROP_BOOLEAN, PROP_NO
NE); | |
2348 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_COMBINED)
; | |
2349 RNA_def_property_ui_text(prop, "Combined", "Deliver full combined RGBA b
uffer"); | |
2350 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2351 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2352 | |
2353 prop = RNA_def_property(srna, "use_pass_z", PROP_BOOLEAN, PROP_NONE); | |
2354 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_Z); | |
2355 RNA_def_property_ui_text(prop, "Z", "Deliver Z values pass"); | |
2356 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2357 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2358 ········ | |
2359 prop = RNA_def_property(srna, "use_pass_vector", PROP_BOOLEAN, PROP_NONE
); | |
2360 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_VECTOR); | |
2361 RNA_def_property_ui_text(prop, "Vector", "Deliver speed vector pass"); | |
2362 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2363 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2364 | |
2365 prop = RNA_def_property(srna, "use_pass_normal", PROP_BOOLEAN, PROP_NONE
); | |
2366 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_NORMAL); | |
2367 RNA_def_property_ui_text(prop, "Normal", "Deliver normal pass"); | |
2368 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2369 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2370 | |
2371 prop = RNA_def_property(srna, "use_pass_uv", PROP_BOOLEAN, PROP_NONE); | |
2372 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_UV); | |
2373 RNA_def_property_ui_text(prop, "UV", "Deliver texture UV pass"); | |
2374 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2375 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2376 | |
2377 prop = RNA_def_property(srna, "use_pass_mist", PROP_BOOLEAN, PROP_NONE); | |
2378 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_MIST); | |
2379 RNA_def_property_ui_text(prop, "Mist", "Deliver mist factor pass (0.0-1.
0)"); | |
2380 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2381 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2382 | |
2383 prop = RNA_def_property(srna, "use_pass_object_index", PROP_BOOLEAN, PRO
P_NONE); | |
2384 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXOB); | |
2385 RNA_def_property_ui_text(prop, "Object Index", "Deliver object index pas
s"); | |
2386 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2387 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2388 | |
2389 prop = RNA_def_property(srna, "use_pass_material_index", PROP_BOOLEAN, P
ROP_NONE); | |
2390 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDEXMA); | |
2391 RNA_def_property_ui_text(prop, "Material Index", "Deliver material index
pass"); | |
2392 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2393 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2394 | |
2395 prop = RNA_def_property(srna, "use_pass_color", PROP_BOOLEAN, PROP_NONE)
; | |
2396 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_RGBA); | |
2397 RNA_def_property_ui_text(prop, "Color", "Deliver shade-less color pass")
; | |
2398 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2399 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2400 | |
2401 prop = RNA_def_property(srna, "use_pass_diffuse", PROP_BOOLEAN, PROP_NON
E); | |
2402 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE); | |
2403 RNA_def_property_ui_text(prop, "Diffuse", "Deliver diffuse pass"); | |
2404 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2405 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2406 | |
2407 prop = RNA_def_property(srna, "use_pass_specular", PROP_BOOLEAN, PROP_NO
NE); | |
2408 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SPEC); | |
2409 RNA_def_property_ui_text(prop, "Specular", "Deliver specular pass"); | |
2410 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2411 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2412 | |
2413 prop = RNA_def_property(srna, "use_pass_shadow", PROP_BOOLEAN, PROP_NONE
); | |
2414 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SHADOW); | |
2415 RNA_def_property_ui_text(prop, "Shadow", "Deliver shadow pass"); | |
2416 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2417 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2418 | |
2419 prop = RNA_def_property(srna, "use_pass_ambient_occlusion", PROP_BOOLEAN
, PROP_NONE); | |
2420 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_AO); | |
2421 RNA_def_property_ui_text(prop, "AO", "Deliver AO pass"); | |
2422 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2423 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2424 ········ | |
2425 prop = RNA_def_property(srna, "use_pass_reflection", PROP_BOOLEAN, PROP_
NONE); | |
2426 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFLECT); | |
2427 RNA_def_property_ui_text(prop, "Reflection", "Deliver raytraced reflecti
on pass"); | |
2428 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2429 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2430 | |
2431 prop = RNA_def_property(srna, "use_pass_refraction", PROP_BOOLEAN, PROP_
NONE); | |
2432 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_REFRACT); | |
2433 RNA_def_property_ui_text(prop, "Refraction", "Deliver raytraced refracti
on pass"); | |
2434 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2435 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2436 | |
2437 prop = RNA_def_property(srna, "use_pass_emit", PROP_BOOLEAN, PROP_NONE); | |
2438 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_EMIT); | |
2439 RNA_def_property_ui_text(prop, "Emit", "Deliver emission pass"); | |
2440 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2441 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2442 | |
2443 prop = RNA_def_property(srna, "use_pass_environment", PROP_BOOLEAN, PROP
_NONE); | |
2444 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_ENVIRONME
NT); | |
2445 RNA_def_property_ui_text(prop, "Environment", "Deliver environment light
ing pass"); | |
2446 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2447 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2448 | |
2449 prop = RNA_def_property(srna, "use_pass_indirect", PROP_BOOLEAN, PROP_NO
NE); | |
2450 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_INDIRECT)
; | |
2451 RNA_def_property_ui_text(prop, "Indirect", "Deliver indirect lighting pa
ss"); | |
2452 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2453 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2454 | |
2455 prop = RNA_def_property(srna, "exclude_specular", PROP_BOOLEAN, PROP_NON
E); | |
2456 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SPEC); | |
2457 RNA_def_property_ui_text(prop, "Specular Exclude", "Exclude specular pas
s from combined"); | |
2458 RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | |
2459 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2460 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2461 | |
2462 prop = RNA_def_property(srna, "exclude_shadow", PROP_BOOLEAN, PROP_NONE)
; | |
2463 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_SHADOW); | |
2464 RNA_def_property_ui_text(prop, "Shadow Exclude", "Exclude shadow pass fr
om combined"); | |
2465 RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | |
2466 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2467 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2468 | |
2469 prop = RNA_def_property(srna, "exclude_ambient_occlusion", PROP_BOOLEAN,
PROP_NONE); | |
2470 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_AO); | |
2471 RNA_def_property_ui_text(prop, "AO Exclude", "Exclude AO pass from combi
ned"); | |
2472 RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | |
2473 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2474 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2475 ········ | |
2476 prop = RNA_def_property(srna, "exclude_reflection", PROP_BOOLEAN, PROP_N
ONE); | |
2477 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFLECT); | |
2478 RNA_def_property_ui_text(prop, "Reflection Exclude", "Exclude raytraced
reflection pass from combined"); | |
2479 RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | |
2480 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2481 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2482 | |
2483 prop = RNA_def_property(srna, "exclude_refraction", PROP_BOOLEAN, PROP_N
ONE); | |
2484 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_REFRACT); | |
2485 RNA_def_property_ui_text(prop, "Refraction Exclude", "Exclude raytraced
refraction pass from combined"); | |
2486 RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | |
2487 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2488 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2489 | |
2490 prop = RNA_def_property(srna, "exclude_emit", PROP_BOOLEAN, PROP_NONE); | |
2491 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_EMIT); | |
2492 RNA_def_property_ui_text(prop, "Emit Exclude", "Exclude emission pass fr
om combined"); | |
2493 RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | |
2494 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2495 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2496 | |
2497 prop = RNA_def_property(srna, "exclude_environment", PROP_BOOLEAN, PROP_
NONE); | |
2498 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_ENVIRONME
NT); | |
2499 RNA_def_property_ui_text(prop, "Environment Exclude", "Exclude environme
nt pass from combined"); | |
2500 RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | |
2501 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2502 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2503 | |
2504 prop = RNA_def_property(srna, "exclude_indirect", PROP_BOOLEAN, PROP_NON
E); | |
2505 RNA_def_property_boolean_sdna(prop, NULL, "pass_xor", SCE_PASS_INDIRECT)
; | |
2506 RNA_def_property_ui_text(prop, "Indirect Exclude", "Exclude indirect pas
s from combined"); | |
2507 RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, 1); | |
2508 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2509 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2510 | |
2511 prop = RNA_def_property(srna, "use_pass_diffuse_direct", PROP_BOOLEAN, P
ROP_NONE); | |
2512 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_D
IRECT); | |
2513 RNA_def_property_ui_text(prop, "Diffuse Direct", "Deliver diffuse direct
pass"); | |
2514 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2515 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2516 | |
2517 prop = RNA_def_property(srna, "use_pass_diffuse_indirect", PROP_BOOLEAN,
PROP_NONE); | |
2518 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_I
NDIRECT); | |
2519 RNA_def_property_ui_text(prop, "Diffuse Indirect", "Deliver diffuse indi
rect pass"); | |
2520 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2521 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2522 | |
2523 prop = RNA_def_property(srna, "use_pass_diffuse_color", PROP_BOOLEAN, PR
OP_NONE); | |
2524 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_DIFFUSE_C
OLOR); | |
2525 RNA_def_property_ui_text(prop, "Diffuse Color", "Deliver diffuse color p
ass"); | |
2526 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2527 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2528 | |
2529 prop = RNA_def_property(srna, "use_pass_glossy_direct", PROP_BOOLEAN, PR
OP_NONE); | |
2530 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_DI
RECT); | |
2531 RNA_def_property_ui_text(prop, "Glossy Direct", "Deliver glossy direct p
ass"); | |
2532 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2533 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2534 | |
2535 prop = RNA_def_property(srna, "use_pass_glossy_indirect", PROP_BOOLEAN,
PROP_NONE); | |
2536 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_IN
DIRECT); | |
2537 RNA_def_property_ui_text(prop, "Glossy Indirect", "Deliver glossy indire
ct pass"); | |
2538 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2539 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2540 | |
2541 prop = RNA_def_property(srna, "use_pass_glossy_color", PROP_BOOLEAN, PRO
P_NONE); | |
2542 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_GLOSSY_CO
LOR); | |
2543 RNA_def_property_ui_text(prop, "Glossy Color", "Deliver glossy color pas
s"); | |
2544 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2545 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2546 | |
2547 prop = RNA_def_property(srna, "use_pass_transmission_direct", PROP_BOOLE
AN, PROP_NONE); | |
2548 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_DI
RECT); | |
2549 RNA_def_property_ui_text(prop, "Transmission Direct", "Deliver transmiss
ion direct pass"); | |
2550 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2551 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2552 | |
2553 prop = RNA_def_property(srna, "use_pass_transmission_indirect", PROP_BOO
LEAN, PROP_NONE); | |
2554 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_IN
DIRECT); | |
2555 RNA_def_property_ui_text(prop, "Transmission Indirect", "Deliver transmi
ssion indirect pass"); | |
2556 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2557 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2558 | |
2559 prop = RNA_def_property(srna, "use_pass_transmission_color", PROP_BOOLEA
N, PROP_NONE); | |
2560 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_TRANSM_CO
LOR); | |
2561 RNA_def_property_ui_text(prop, "Transmission Color", "Deliver transmissi
on color pass"); | |
2562 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2563 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2564 ········ | |
2565 prop = RNA_def_property(srna, "use_pass_subsurface_direct", PROP_BOOLEAN
, PROP_NONE); | |
2566 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SUBSURFAC
E_DIRECT); | |
2567 RNA_def_property_ui_text(prop, "Subsurface Direct", "Deliver subsurface
direct pass"); | |
2568 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2569 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2570 | |
2571 prop = RNA_def_property(srna, "use_pass_subsurface_indirect", PROP_BOOLE
AN, PROP_NONE); | |
2572 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SUBSURFAC
E_INDIRECT); | |
2573 RNA_def_property_ui_text(prop, "Subsurface Indirect", "Deliver subsurfac
e indirect pass"); | |
2574 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2575 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2576 | |
2577 prop = RNA_def_property(srna, "use_pass_subsurface_color", PROP_BOOLEAN,
PROP_NONE); | |
2578 RNA_def_property_boolean_sdna(prop, NULL, "passflag", SCE_PASS_SUBSURFAC
E_COLOR); | |
2579 RNA_def_property_ui_text(prop, "Subsurface Color", "Deliver subsurface c
olor pass"); | |
2580 if (scene) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "
rna_SceneRenderLayer_pass_update"); | |
2581 else RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
2582 } | |
2583 | |
2584 static void rna_def_freestyle_linesets(BlenderRNA *brna, PropertyRNA *cprop) | |
2585 { | |
2586 StructRNA *srna; | |
2587 PropertyRNA *prop; | |
2588 | |
2589 RNA_def_property_srna(cprop, "Linesets"); | |
2590 srna = RNA_def_struct(brna, "Linesets", NULL); | |
2591 RNA_def_struct_sdna(srna, "FreestyleSettings"); | |
2592 RNA_def_struct_ui_text(srna, "Line Sets", "Line sets for associating lin
es and style parameters"); | |
2593 | |
2594 prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | |
2595 RNA_def_property_struct_type(prop, "FreestyleLineSet"); | |
2596 RNA_def_property_pointer_funcs(prop, "rna_FreestyleSettings_active_lines
et_get", NULL, NULL, NULL); | |
2597 RNA_def_property_ui_text(prop, "Active Line Set", "Active line set being
displayed"); | |
2598 RNA_def_property_update(prop, NC_SCENE, NULL); | |
2599 | |
2600 prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED); | |
2601 RNA_def_property_int_funcs(prop, "rna_FreestyleSettings_active_lineset_i
ndex_get", | |
2602 "rna_FreestyleSettings_active_lineset_index_s
et", | |
2603 "rna_FreestyleSettings_active_lineset_index_r
ange"); | |
2604 RNA_def_property_ui_text(prop, "Active Line Set Index", "Index of active
line set slot"); | |
2605 RNA_def_property_update(prop, NC_SCENE, NULL); | |
2606 } | |
2607 | |
2608 static void rna_def_freestyle_settings(BlenderRNA *brna) | |
2609 { | |
2610 StructRNA *srna; | |
2611 PropertyRNA *prop; | |
2612 | |
2613 static EnumPropertyItem edge_type_negation_items[] = { | |
2614 {0, "INCLUSIVE", 0, "Inclusive", "Select feature edges satisfyin
g the given edge type conditions"}, | |
2615 {FREESTYLE_LINESET_FE_NOT, "EXCLUSIVE", 0, "Exclusive", | |
2616 "Select feature edges not satisfying
the given edge type conditions"}, | |
2617 {0, NULL, 0, NULL, NULL} | |
2618 }; | |
2619 | |
2620 static EnumPropertyItem edge_type_combination_items[] = { | |
2621 {0, "OR", 0, "Logical OR", "Combine feature edge type conditions
by logical OR (logical disjunction)"}, | |
2622 {FREESTYLE_LINESET_FE_AND, "AND", 0, "Logical AND", | |
2623 "Combine feature edge type conditions
by logical AND (logical conjunction)"}, | |
2624 {0, NULL, 0, NULL, NULL} | |
2625 }; | |
2626 | |
2627 static EnumPropertyItem group_negation_items[] = { | |
2628 {0, "INCLUSIVE", 0, "Inclusive", "Select feature edges belonging
to some object in the group"}, | |
2629 {FREESTYLE_LINESET_GR_NOT, "EXCLUSIVE", 0, "Exclusive", | |
2630 "Select feature edges not belonging t
o any object in the group"}, | |
2631 {0, NULL, 0, NULL, NULL} | |
2632 }; | |
2633 | |
2634 static EnumPropertyItem face_mark_negation_items[] = { | |
2635 {0, "INCLUSIVE", 0, "Inclusive", "Select feature edges satisfyin
g the given face mark conditions"}, | |
2636 {FREESTYLE_LINESET_FM_NOT, "EXCLUSIVE", 0, "Exclusive", | |
2637 "Select feature edges not satisfying
the given face mark conditions"}, | |
2638 {0, NULL, 0, NULL, NULL} | |
2639 }; | |
2640 | |
2641 static EnumPropertyItem face_mark_condition_items[] = { | |
2642 {0, "ONE", 0, "One Face", "Select feature edges if one of faces
on the right and left has a face mark"}, | |
2643 {FREESTYLE_LINESET_FM_BOTH, "BOTH", 0, "Both Faces", | |
2644 "Select feature edges if both faces
on the right and left faces have a face mark"}, | |
2645 {0, NULL, 0, NULL, NULL} | |
2646 }; | |
2647 | |
2648 static EnumPropertyItem freestyle_ui_mode_items[] = { | |
2649 {FREESTYLE_CONTROL_SCRIPT_MODE, "SCRIPT", 0, "Python Scripting M
ode", | |
2650 "Advanced mode for using style m
odules in Python"}, | |
2651 {FREESTYLE_CONTROL_EDITOR_MODE, "EDITOR", 0, "Parameter Editor M
ode", | |
2652 "Basic mode for interactive styl
e parameter editing"}, | |
2653 {0, NULL, 0, NULL, NULL} | |
2654 }; | |
2655 | |
2656 static EnumPropertyItem visibility_items[] = { | |
2657 {FREESTYLE_QI_VISIBLE, "VISIBLE", 0, "Visible", "Select visible
feature edges"}, | |
2658 {FREESTYLE_QI_HIDDEN, "HIDDEN", 0, "Hidden", "Select hidden feat
ure edges"}, | |
2659 {FREESTYLE_QI_RANGE, "RANGE", 0, "QI Range", | |
2660 "Select feature edges within a range of qua
ntitative invisibility (QI) values"}, | |
2661 {0, NULL, 0, NULL, NULL} | |
2662 }; | |
2663 | |
2664 static EnumPropertyItem freestyle_raycasting_algorithm_items[] = { | |
2665 {FREESTYLE_ALGO_REGULAR, "REGULAR", 0, "Normal Ray Casting", "Co
nsider all FEdges in each ViewEdge"}, | |
2666 {FREESTYLE_ALGO_FAST, "FAST", 0, "Fast Ray Casting", "Sample som
e FEdges in each ViewEdge"}, | |
2667 {FREESTYLE_ALGO_VERYFAST, "VERYFAST", 0, "Very Fast Ray Casting"
, | |
2668 "Sample one FEdge in each ViewEdge; do
not save list of occluders"}, | |
2669 {FREESTYLE_ALGO_CULLED_ADAPTIVE_TRADITIONAL, "CULLEDADAPTIVETRAD
ITIONAL", 0, | |
2670 "Culled Traditional
Visibility Detection", | |
2671 "Culled adaptive gr
id with heuristic density and " | |
2672 "traditional QI cal
culation"}, | |
2673 {FREESTYLE_ALGO_ADAPTIVE_TRADITIONAL, "ADAPTIVETRADITIONAL", 0,
"Unculled Traditional Visibility Detection", | |
2674 "Adaptive grid with heuris
tic density and traditional QI calculation"}, | |
2675 {FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE, "CULLEDADAPTIVECUMUL
ATIVE", 0, | |
2676 "Culled Cumulative V
isibility Detection", | |
2677 "Culled adaptive gri
d with heuristic density and " | |
2678 "cumulative QI calcu
lation"}, | |
2679 {FREESTYLE_ALGO_ADAPTIVE_CUMULATIVE, "ADAPTIVECUMULATIVE", 0, "U
nculled Cumulative Visibility Detection", | |
2680 "Adaptive grid with heurist
ic density and cumulative QI calculation"}, | |
2681 {0, NULL, 0, NULL, NULL} | |
2682 }; | |
2683 | |
2684 | |
2685 /* FreestyleLineSet */ | |
2686 | |
2687 srna = RNA_def_struct(brna, "FreestyleLineSet", NULL); | |
2688 RNA_def_struct_ui_text(srna, "Freestyle Line Set", "Line set for associa
ting lines and style parameters"); | |
2689 | |
2690 /* access to line style settings is redirected through functions | |
2691 * to allow proper id-buttons functionality | |
2692 */ | |
2693 prop = RNA_def_property(srna, "linestyle", PROP_POINTER, PROP_NONE); | |
2694 RNA_def_property_struct_type(prop, "FreestyleLineStyle"); | |
2695 RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL); | |
2696 RNA_def_property_pointer_funcs(prop, "rna_FreestyleLineSet_linestyle_get
", | |
2697 "rna_FreestyleLineSet_linestyle_set", NUL
L, NULL); | |
2698 RNA_def_property_ui_text(prop, "Line Style", "Line style settings"); | |
2699 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2700 | |
2701 prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); | |
2702 RNA_def_property_string_sdna(prop, NULL, "name"); | |
2703 RNA_def_property_ui_text(prop, "Line Set Name", "Line set name"); | |
2704 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2705 RNA_def_struct_name_property(srna, prop); | |
2706 | |
2707 prop = RNA_def_property(srna, "show_render", PROP_BOOLEAN, PROP_NONE); | |
2708 RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_LINESET_ENA
BLED); | |
2709 RNA_def_property_ui_text(prop, "Render", "Enable or disable this line se
t during stroke rendering"); | |
2710 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2711 | |
2712 prop = RNA_def_property(srna, "select_by_visibility", PROP_BOOLEAN, PROP
_NONE); | |
2713 RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_VIS
IBILITY); | |
2714 RNA_def_property_ui_text(prop, "Selection by Visibility", "Select featur
e edges based on visibility"); | |
2715 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2716 | |
2717 prop = RNA_def_property(srna, "select_by_edge_types", PROP_BOOLEAN, PROP
_NONE); | |
2718 RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_EDG
E_TYPES); | |
2719 RNA_def_property_ui_text(prop, "Selection by Edge Types", "Select featur
e edges based on edge types"); | |
2720 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2721 | |
2722 prop = RNA_def_property(srna, "select_by_group", PROP_BOOLEAN, PROP_NONE
); | |
2723 RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_GRO
UP); | |
2724 RNA_def_property_ui_text(prop, "Selection by Group", "Select feature edg
es based on a group of objects"); | |
2725 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2726 | |
2727 prop = RNA_def_property(srna, "select_by_image_border", PROP_BOOLEAN, PR
OP_NONE); | |
2728 RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_IMA
GE_BORDER); | |
2729 RNA_def_property_ui_text(prop, "Selection by Image Border", | |
2730 "Select feature edges by image border (less mem
ory consumption)"); | |
2731 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2732 | |
2733 prop = RNA_def_property(srna, "select_by_face_marks", PROP_BOOLEAN, PROP
_NONE); | |
2734 RNA_def_property_boolean_sdna(prop, NULL, "selection", FREESTYLE_SEL_FAC
E_MARK); | |
2735 RNA_def_property_ui_text(prop, "Selection by Face Marks", "Select featur
e edges by face marks"); | |
2736 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2737 | |
2738 prop = RNA_def_property(srna, "edge_type_negation", PROP_ENUM, PROP_NONE
); | |
2739 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags"); | |
2740 RNA_def_property_enum_items(prop, edge_type_negation_items); | |
2741 RNA_def_property_ui_text(prop, "Edge Type Negation", | |
2742 "Set the negation operation for conditions on f
eature edge types"); | |
2743 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2744 | |
2745 prop = RNA_def_property(srna, "edge_type_combination", PROP_ENUM, PROP_N
ONE); | |
2746 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags"); | |
2747 RNA_def_property_enum_items(prop, edge_type_combination_items); | |
2748 RNA_def_property_ui_text(prop, "Edge Type Combination", | |
2749 "Set the combination operation for conditions o
n feature edge types"); | |
2750 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2751 | |
2752 prop = RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE); | |
2753 RNA_def_property_pointer_sdna(prop, NULL, "group"); | |
2754 RNA_def_property_struct_type(prop, "Group"); | |
2755 RNA_def_property_flag(prop, PROP_EDITABLE); | |
2756 RNA_def_property_ui_text(prop, "Group", "A group of objects based on whi
ch feature edges are selected"); | |
2757 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2758 | |
2759 prop = RNA_def_property(srna, "group_negation", PROP_ENUM, PROP_NONE); | |
2760 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags"); | |
2761 RNA_def_property_enum_items(prop, group_negation_items); | |
2762 RNA_def_property_ui_text(prop, "Group Negation", | |
2763 "Set the negation operation for conditions on f
eature edge types"); | |
2764 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2765 | |
2766 prop = RNA_def_property(srna, "face_mark_negation", PROP_ENUM, PROP_NONE
); | |
2767 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags"); | |
2768 RNA_def_property_enum_items(prop, face_mark_negation_items); | |
2769 RNA_def_property_ui_text(prop, "Face Mark Negation", | |
2770 "Set the negation operation for the condition o
n face marks"); | |
2771 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2772 | |
2773 prop = RNA_def_property(srna, "face_mark_condition", PROP_ENUM, PROP_NON
E); | |
2774 RNA_def_property_enum_bitflag_sdna(prop, NULL, "flags"); | |
2775 RNA_def_property_enum_items(prop, face_mark_condition_items); | |
2776 RNA_def_property_ui_text(prop, "Face Mark Condition", "Set a feature edg
e selection condition on face marks"); | |
2777 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2778 | |
2779 prop = RNA_def_property(srna, "select_silhouette", PROP_BOOLEAN, PROP_NO
NE); | |
2780 RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_SIL
HOUETTE); | |
2781 RNA_def_property_ui_text(prop, "Silhouette", "Select silhouette edges"); | |
2782 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2783 | |
2784 prop = RNA_def_property(srna, "select_border", PROP_BOOLEAN, PROP_NONE); | |
2785 RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_BOR
DER); | |
2786 RNA_def_property_ui_text(prop, "Border", "Select border edges"); | |
2787 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2788 | |
2789 prop = RNA_def_property(srna, "select_crease", PROP_BOOLEAN, PROP_NONE); | |
2790 RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_CRE
ASE); | |
2791 RNA_def_property_ui_text(prop, "Crease", "Select crease edges"); | |
2792 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2793 | |
2794 prop = RNA_def_property(srna, "select_ridge_valley", PROP_BOOLEAN, PROP_
NONE); | |
2795 RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_RID
GE_VALLEY); | |
2796 RNA_def_property_ui_text(prop, "Ridge & Valley", "Select ridges and vall
eys"); | |
2797 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2798 | |
2799 prop = RNA_def_property(srna, "select_suggestive_contour", PROP_BOOLEAN,
PROP_NONE); | |
2800 RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_SUG
GESTIVE_CONTOUR); | |
2801 RNA_def_property_ui_text(prop, "Suggestive Contour", "Select suggestive
contours"); | |
2802 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2803 | |
2804 prop = RNA_def_property(srna, "select_material_boundary", PROP_BOOLEAN,
PROP_NONE); | |
2805 RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_MAT
ERIAL_BOUNDARY); | |
2806 RNA_def_property_ui_text(prop, "Material Boundary", "Select edges at mat
erial boundaries"); | |
2807 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2808 | |
2809 prop = RNA_def_property(srna, "select_contour", PROP_BOOLEAN, PROP_NONE)
; | |
2810 RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_CON
TOUR); | |
2811 RNA_def_property_ui_text(prop, "Contour", "Select contours"); | |
2812 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2813 | |
2814 prop = RNA_def_property(srna, "select_external_contour", PROP_BOOLEAN, P
ROP_NONE); | |
2815 RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_EXT
ERNAL_CONTOUR); | |
2816 RNA_def_property_ui_text(prop, "External Contour", "Select external cont
ours"); | |
2817 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2818 | |
2819 prop = RNA_def_property(srna, "select_edge_mark", PROP_BOOLEAN, PROP_NON
E); | |
2820 RNA_def_property_boolean_sdna(prop, NULL, "edge_types", FREESTYLE_FE_EDG
E_MARK); | |
2821 RNA_def_property_ui_text(prop, "Edge Mark", "Select edge marks"); | |
2822 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2823 | |
2824 prop = RNA_def_property(srna, "exclude_silhouette", PROP_BOOLEAN, PROP_N
ONE); | |
2825 RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYL
E_FE_SILHOUETTE); | |
2826 RNA_def_property_ui_text(prop, "Silhouette", "Exclude silhouette edges")
; | |
2827 RNA_def_property_ui_icon(prop, ICON_X, 0); | |
2828 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2829 | |
2830 prop = RNA_def_property(srna, "exclude_border", PROP_BOOLEAN, PROP_NONE)
; | |
2831 RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYL
E_FE_BORDER); | |
2832 RNA_def_property_ui_text(prop, "Border", "Exclude border edges"); | |
2833 RNA_def_property_ui_icon(prop, ICON_X, 0); | |
2834 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2835 | |
2836 prop = RNA_def_property(srna, "exclude_crease", PROP_BOOLEAN, PROP_NONE)
; | |
2837 RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYL
E_FE_CREASE); | |
2838 RNA_def_property_ui_text(prop, "Crease", "Exclude crease edges"); | |
2839 RNA_def_property_ui_icon(prop, ICON_X, 0); | |
2840 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2841 | |
2842 prop = RNA_def_property(srna, "exclude_ridge_valley", PROP_BOOLEAN, PROP
_NONE); | |
2843 RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYL
E_FE_RIDGE_VALLEY); | |
2844 RNA_def_property_ui_text(prop, "Ridge & Valley", "Exclude ridges and val
leys"); | |
2845 RNA_def_property_ui_icon(prop, ICON_X, 0); | |
2846 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2847 | |
2848 prop = RNA_def_property(srna, "exclude_suggestive_contour", PROP_BOOLEAN
, PROP_NONE); | |
2849 RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYL
E_FE_SUGGESTIVE_CONTOUR); | |
2850 RNA_def_property_ui_text(prop, "Suggestive Contour", "Exclude suggestive
contours"); | |
2851 RNA_def_property_ui_icon(prop, ICON_X, 0); | |
2852 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2853 | |
2854 prop = RNA_def_property(srna, "exclude_material_boundary", PROP_BOOLEAN,
PROP_NONE); | |
2855 RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYL
E_FE_MATERIAL_BOUNDARY); | |
2856 RNA_def_property_ui_text(prop, "Material Boundary", "Exclude edges at ma
terial boundaries"); | |
2857 RNA_def_property_ui_icon(prop, ICON_X, 0); | |
2858 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2859 | |
2860 prop = RNA_def_property(srna, "exclude_contour", PROP_BOOLEAN, PROP_NONE
); | |
2861 RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYL
E_FE_CONTOUR); | |
2862 RNA_def_property_ui_text(prop, "Contour", "Exclude contours"); | |
2863 RNA_def_property_ui_icon(prop, ICON_X, 0); | |
2864 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2865 | |
2866 prop = RNA_def_property(srna, "exclude_external_contour", PROP_BOOLEAN,
PROP_NONE); | |
2867 RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYL
E_FE_EXTERNAL_CONTOUR); | |
2868 RNA_def_property_ui_text(prop, "External Contour", "Exclude external con
tours"); | |
2869 RNA_def_property_ui_icon(prop, ICON_X, 0); | |
2870 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2871 | |
2872 prop = RNA_def_property(srna, "exclude_edge_mark", PROP_BOOLEAN, PROP_NO
NE); | |
2873 RNA_def_property_boolean_sdna(prop, NULL, "exclude_edge_types", FREESTYL
E_FE_EDGE_MARK); | |
2874 RNA_def_property_ui_text(prop, "Edge Mark", "Exclude edge marks"); | |
2875 RNA_def_property_ui_icon(prop, ICON_X, 0); | |
2876 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2877 | |
2878 prop = RNA_def_property(srna, "visibility", PROP_ENUM, PROP_NONE); | |
2879 RNA_def_property_enum_sdna(prop, NULL, "qi"); | |
2880 RNA_def_property_enum_items(prop, visibility_items); | |
2881 RNA_def_property_ui_text(prop, "Visibility", "Determine how to use visib
ility for feature edge selection"); | |
2882 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2883 | |
2884 prop = RNA_def_property(srna, "qi_start", PROP_INT, PROP_UNSIGNED); | |
2885 RNA_def_property_int_sdna(prop, NULL, "qi_start"); | |
2886 RNA_def_property_range(prop, 0, INT_MAX); | |
2887 RNA_def_property_ui_text(prop, "Start", "First QI value of the QI range"
); | |
2888 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2889 | |
2890 prop = RNA_def_property(srna, "qi_end", PROP_INT, PROP_UNSIGNED); | |
2891 RNA_def_property_int_sdna(prop, NULL, "qi_end"); | |
2892 RNA_def_property_range(prop, 0, INT_MAX); | |
2893 RNA_def_property_ui_text(prop, "End", "Last QI value of the QI range"); | |
2894 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2895 | |
2896 /* FreestyleModuleSettings */ | |
2897 | |
2898 srna = RNA_def_struct(brna, "FreestyleModuleSettings", NULL); | |
2899 RNA_def_struct_sdna(srna, "FreestyleModuleConfig"); | |
2900 RNA_def_struct_ui_text(srna, "Freestyle Module", "Style module configura
tion for specifying a style module"); | |
2901 | |
2902 prop = RNA_def_property(srna, "script", PROP_POINTER, PROP_NONE); | |
2903 RNA_def_property_struct_type(prop, "Text"); | |
2904 RNA_def_property_flag(prop, PROP_EDITABLE); | |
2905 RNA_def_property_ui_text(prop, "Style Module", "Python script to define
a style module"); | |
2906 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2907 | |
2908 prop = RNA_def_property(srna, "use", PROP_BOOLEAN, PROP_NONE); | |
2909 RNA_def_property_boolean_sdna(prop, NULL, "is_displayed", 1); | |
2910 RNA_def_property_ui_text(prop, "Use", "Enable or disable this style modu
le during stroke rendering"); | |
2911 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2912 | |
2913 /* FreestyleSettings */ | |
2914 | |
2915 srna = RNA_def_struct(brna, "FreestyleSettings", NULL); | |
2916 RNA_def_struct_sdna(srna, "FreestyleConfig"); | |
2917 RNA_def_struct_nested(brna, srna, "SceneRenderLayer"); | |
2918 RNA_def_struct_ui_text(srna, "Freestyle Settings", "Freestyle settings f
or a SceneRenderLayer datablock"); | |
2919 | |
2920 prop = RNA_def_property(srna, "modules", PROP_COLLECTION, PROP_NONE); | |
2921 RNA_def_property_collection_sdna(prop, NULL, "modules", NULL); | |
2922 RNA_def_property_struct_type(prop, "FreestyleModuleSettings"); | |
2923 RNA_def_property_ui_text(prop, "Style modules", "A list of style modules
(to be applied from top to bottom)"); | |
2924 | |
2925 prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); | |
2926 RNA_def_property_enum_sdna(prop, NULL, "mode"); | |
2927 RNA_def_property_enum_items(prop, freestyle_ui_mode_items); | |
2928 RNA_def_property_ui_text(prop, "Control Mode", "Select the Freestyle con
trol mode"); | |
2929 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2930 | |
2931 prop = RNA_def_property(srna, "raycasting_algorithm", PROP_ENUM, PROP_NO
NE); | |
2932 RNA_def_property_enum_sdna(prop, NULL, "raycasting_algorithm"); | |
2933 RNA_def_property_enum_items(prop, freestyle_raycasting_algorithm_items); | |
2934 RNA_def_property_ui_text(prop, "Raycasting Algorithm", "Select the Frees
tyle raycasting algorithm"); | |
2935 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2936 | |
2937 prop = RNA_def_property(srna, "use_culling", PROP_BOOLEAN, PROP_NONE); | |
2938 RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_CULLING); | |
2939 RNA_def_property_ui_text(prop, "Culling", "If enabled, out-of-view edges
are ignored"); | |
2940 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2941 | |
2942 prop = RNA_def_property(srna, "use_suggestive_contours", PROP_BOOLEAN, P
ROP_NONE); | |
2943 RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_SUGGESTIVE_
CONTOURS_FLAG); | |
2944 RNA_def_property_ui_text(prop, "Suggestive Contours", "Enable suggestive
contours"); | |
2945 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2946 | |
2947 prop = RNA_def_property(srna, "use_ridges_and_valleys", PROP_BOOLEAN, PR
OP_NONE); | |
2948 RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_RIDGES_AND_
VALLEYS_FLAG); | |
2949 RNA_def_property_ui_text(prop, "Ridges and Valleys", "Enable ridges and
valleys"); | |
2950 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2951 | |
2952 prop = RNA_def_property(srna, "use_material_boundaries", PROP_BOOLEAN, P
ROP_NONE); | |
2953 RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_MATERIAL_BO
UNDARIES_FLAG); | |
2954 RNA_def_property_ui_text(prop, "Material Boundaries", "Enable material b
oundaries"); | |
2955 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2956 | |
2957 prop = RNA_def_property(srna, "use_smoothness", PROP_BOOLEAN, PROP_NONE)
; | |
2958 RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_FACE_SMOOTH
NESS_FLAG); | |
2959 RNA_def_property_ui_text(prop, "Face Smoothness", "Take face smoothness
into account in view map calculation"); | |
2960 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2961 | |
2962 prop = RNA_def_property(srna, "use_advanced_options", PROP_BOOLEAN, PROP
_NONE); | |
2963 RNA_def_property_boolean_sdna(prop, NULL, "flags", FREESTYLE_ADVANCED_OP
TIONS_FLAG); | |
2964 RNA_def_property_ui_text(prop, "Advanced Options", | |
2965 "Enable advanced edge detection options (sphere
radius and Kr derivative epsilon)"); | |
2966 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2967 | |
2968 prop = RNA_def_property(srna, "sphere_radius", PROP_FLOAT, PROP_NONE); | |
2969 RNA_def_property_float_sdna(prop, NULL, "sphere_radius"); | |
2970 RNA_def_property_range(prop, 0.0, 1000.0); | |
2971 RNA_def_property_ui_text(prop, "Sphere Radius", "Sphere radius for compu
ting curvatures"); | |
2972 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2973 | |
2974 prop = RNA_def_property(srna, "kr_derivative_epsilon", PROP_FLOAT, PROP_
NONE); | |
2975 RNA_def_property_float_sdna(prop, NULL, "dkr_epsilon"); | |
2976 RNA_def_property_range(prop, -1000.0, 1000.0); | |
2977 RNA_def_property_ui_text(prop, "Kr Derivative Epsilon", "Kr derivative e
psilon for computing suggestive contours"); | |
2978 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2979 | |
2980 prop = RNA_def_property(srna, "crease_angle", PROP_FLOAT, PROP_ANGLE); | |
2981 RNA_def_property_float_sdna(prop, NULL, "crease_angle"); | |
2982 RNA_def_property_range(prop, 0.0, DEG2RAD(180.0)); | |
2983 RNA_def_property_ui_text(prop, "Crease Angle", "Angular threshold for de
tecting crease edges"); | |
2984 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
2985 | |
2986 prop = RNA_def_property(srna, "linesets", PROP_COLLECTION, PROP_NONE); | |
2987 RNA_def_property_collection_sdna(prop, NULL, "linesets", NULL); | |
2988 RNA_def_property_struct_type(prop, "FreestyleLineSet"); | |
2989 RNA_def_property_ui_text(prop, "Line Sets", ""); | |
2990 rna_def_freestyle_linesets(brna, prop); | |
2991 } | |
2992 | |
2993 static void rna_def_scene_game_recast_data(BlenderRNA *brna) | |
2994 { | |
2995 StructRNA *srna; | |
2996 PropertyRNA *prop; | |
2997 | |
2998 srna = RNA_def_struct(brna, "SceneGameRecastData", NULL); | |
2999 RNA_def_struct_sdna(srna, "RecastData"); | |
3000 RNA_def_struct_nested(brna, srna, "Scene"); | |
3001 RNA_def_struct_ui_text(srna, "Recast Data", "Recast data for a Game data
block"); | |
3002 | |
3003 prop = RNA_def_property(srna, "cell_size", PROP_FLOAT, PROP_NONE); | |
3004 RNA_def_property_float_sdna(prop, NULL, "cellsize"); | |
3005 RNA_def_property_ui_range(prop, 0.1, 1, 1, 2); | |
3006 RNA_def_property_ui_text(prop, "Cell Size", "Rasterized cell size"); | |
3007 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3008 | |
3009 prop = RNA_def_property(srna, "cell_height", PROP_FLOAT, PROP_NONE); | |
3010 RNA_def_property_float_sdna(prop, NULL, "cellheight"); | |
3011 RNA_def_property_ui_range(prop, 0.1, 1, 1, 2); | |
3012 RNA_def_property_ui_text(prop, "Cell Height", "Rasterized cell height"); | |
3013 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3014 | |
3015 prop = RNA_def_property(srna, "agent_height", PROP_FLOAT, PROP_NONE); | |
3016 RNA_def_property_float_sdna(prop, NULL, "agentheight"); | |
3017 RNA_def_property_ui_range(prop, 0.1, 5, 1, 2); | |
3018 RNA_def_property_ui_text(prop, "Agent Height", "Minimum height where the
agent can still walk"); | |
3019 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3020 | |
3021 prop = RNA_def_property(srna, "agent_radius", PROP_FLOAT, PROP_NONE); | |
3022 RNA_def_property_float_sdna(prop, NULL, "agentradius"); | |
3023 RNA_def_property_ui_range(prop, 0.1, 5, 1, 2); | |
3024 RNA_def_property_ui_text(prop, "Agent Radius", "Radius of the agent"); | |
3025 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3026 | |
3027 prop = RNA_def_property(srna, "climb_max", PROP_FLOAT, PROP_NONE); | |
3028 RNA_def_property_float_sdna(prop, NULL, "agentmaxclimb"); | |
3029 RNA_def_property_ui_range(prop, 0.1, 5, 1, 2); | |
3030 RNA_def_property_ui_text(prop, "Max Climb", "Maximum height between grid
cells the agent can climb"); | |
3031 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3032 | |
3033 prop = RNA_def_property(srna, "slope_max", PROP_FLOAT, PROP_ANGLE); | |
3034 RNA_def_property_float_sdna(prop, NULL, "agentmaxslope"); | |
3035 RNA_def_property_range(prop, 0, M_PI / 2); | |
3036 RNA_def_property_ui_text(prop, "Max Slope", "Maximum walkable slope angl
e"); | |
3037 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3038 | |
3039 | |
3040 prop = RNA_def_property(srna, "region_min_size", PROP_FLOAT, PROP_NONE); | |
3041 RNA_def_property_float_sdna(prop, NULL, "regionminsize"); | |
3042 RNA_def_property_ui_range(prop, 0, 150, 1, 2); | |
3043 RNA_def_property_ui_text(prop, "Min Region Size", "Minimum regions size
(smaller regions will be deleted)"); | |
3044 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3045 | |
3046 prop = RNA_def_property(srna, "region_merge_size", PROP_FLOAT, PROP_NONE
); | |
3047 RNA_def_property_float_sdna(prop, NULL, "regionmergesize"); | |
3048 RNA_def_property_ui_range(prop, 0, 150, 1, 2); | |
3049 RNA_def_property_ui_text(prop, "Merged Region Size", "Minimum regions si
ze (smaller regions will be merged)"); | |
3050 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3051 | |
3052 prop = RNA_def_property(srna, "edge_max_len", PROP_FLOAT, PROP_NONE); | |
3053 RNA_def_property_float_sdna(prop, NULL, "edgemaxlen"); | |
3054 RNA_def_property_ui_range(prop, 0, 50, 1, 2); | |
3055 RNA_def_property_ui_text(prop, "Max Edge Length", "Maximum contour edge
length"); | |
3056 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3057 | |
3058 prop = RNA_def_property(srna, "edge_max_error", PROP_FLOAT, PROP_NONE); | |
3059 RNA_def_property_float_sdna(prop, NULL, "edgemaxerror"); | |
3060 RNA_def_property_ui_range(prop, 0.1, 3.0, 1, 2); | |
3061 RNA_def_property_ui_text(prop, "Max Edge Error", "Maximum distance error
from contour to cells"); | |
3062 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3063 | |
3064 prop = RNA_def_property(srna, "verts_per_poly", PROP_INT, PROP_NONE); | |
3065 RNA_def_property_int_sdna(prop, NULL, "vertsperpoly"); | |
3066 RNA_def_property_ui_range(prop, 3, 12, 1, -1); | |
3067 RNA_def_property_ui_text(prop, "Verts Per Poly", "Max number of vertices
per polygon"); | |
3068 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3069 | |
3070 prop = RNA_def_property(srna, "sample_dist", PROP_FLOAT, PROP_NONE); | |
3071 RNA_def_property_float_sdna(prop, NULL, "detailsampledist"); | |
3072 RNA_def_property_ui_range(prop, 0.0, 16.0, 1, 2); | |
3073 RNA_def_property_ui_text(prop, "Sample Distance", "Detail mesh sample sp
acing"); | |
3074 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3075 | |
3076 prop = RNA_def_property(srna, "sample_max_error", PROP_FLOAT, PROP_NONE)
; | |
3077 RNA_def_property_float_sdna(prop, NULL, "detailsamplemaxerror"); | |
3078 RNA_def_property_ui_range(prop, 0.0, 16.0, 1, 2); | |
3079 RNA_def_property_ui_text(prop, "Max Sample Error", "Detail mesh simplifi
cation max sample error"); | |
3080 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3081 } | |
3082 | |
3083 static void rna_def_scene_game_data(BlenderRNA *brna) | |
3084 { | |
3085 StructRNA *srna; | |
3086 PropertyRNA *prop; | |
3087 | |
3088 static EnumPropertyItem aasamples_items[] = { | |
3089 {0, "SAMPLES_0", 0, "Off", ""}, | |
3090 {2, "SAMPLES_2", 0, "2x", ""}, | |
3091 {4, "SAMPLES_4", 0, "4x", ""}, | |
3092 {8, "SAMPLES_8", 0, "8x", ""}, | |
3093 {16, "SAMPLES_16", 0, "16x", ""}, | |
3094 {0, NULL, 0, NULL, NULL} | |
3095 }; | |
3096 | |
3097 static EnumPropertyItem framing_types_items[] = { | |
3098 {SCE_GAMEFRAMING_BARS, "LETTERBOX", 0, "Letterbox", | |
3099 "Show the entire viewport in the display
window, using bar horizontally or vertically"}, | |
3100 {SCE_GAMEFRAMING_EXTEND, "EXTEND", 0, "Extend", | |
3101 "Show the entire viewport in the displa
y window, viewing more horizontally " | |
3102 "or vertically"}, | |
3103 {SCE_GAMEFRAMING_SCALE, "SCALE", 0, "Scale", "Stretch or squeeze
the viewport to fill the display window"}, | |
3104 {0, NULL, 0, NULL, NULL} | |
3105 }; | |
3106 | |
3107 static EnumPropertyItem dome_modes_items[] = { | |
3108 {DOME_FISHEYE, "FISHEYE", 0, "Fisheye", ""}, | |
3109 {DOME_TRUNCATED_FRONT, "TRUNCATED_FRONT", 0, "Front-Truncated",
""}, | |
3110 {DOME_TRUNCATED_REAR, "TRUNCATED_REAR", 0, "Rear-Truncated", ""}
, | |
3111 {DOME_ENVMAP, "ENVMAP", 0, "Cube Map", ""}, | |
3112 {DOME_PANORAM_SPH, "PANORAM_SPH", 0, "Spherical Panoramic", ""}, | |
3113 {0, NULL, 0, NULL, NULL} | |
3114 }; | |
3115 ················ | |
3116 static EnumPropertyItem stereo_modes_items[] = { | |
3117 {STEREO_QUADBUFFERED, "QUADBUFFERED", 0, "Quad-Buffer", ""}, | |
3118 {STEREO_ABOVEBELOW, "ABOVEBELOW", 0, "Above-Below", ""}, | |
3119 {STEREO_INTERLACED, "INTERLACED", 0, "Interlaced", ""}, | |
3120 {STEREO_ANAGLYPH, "ANAGLYPH", 0, "Anaglyph", ""}, | |
3121 {STEREO_SIDEBYSIDE, "SIDEBYSIDE", 0, "Side-by-side", ""}, | |
3122 {STEREO_VINTERLACE, "VINTERLACE", 0, "Vinterlace", ""}, | |
3123 {0, NULL, 0, NULL, NULL} | |
3124 }; | |
3125 ················ | |
3126 static EnumPropertyItem stereo_items[] = { | |
3127 {STEREO_NOSTEREO, "NONE", 0, "None", "Disable Stereo and Dome en
vironments"}, | |
3128 {STEREO_ENABLED, "STEREO", 0, "Stereo", "Enable Stereo environme
nt"}, | |
3129 {STEREO_DOME, "DOME", 0, "Dome", "Enable Dome environment"}, | |
3130 {0, NULL, 0, NULL, NULL} | |
3131 }; | |
3132 | |
3133 static EnumPropertyItem physics_engine_items[] = { | |
3134 {WOPHY_NONE, "NONE", 0, "None", "Don't use a physics engine"}, | |
3135 {WOPHY_BULLET, "BULLET", 0, "Bullet", "Use the Bullet physics en
gine"}, | |
3136 {0, NULL, 0, NULL, NULL} | |
3137 }; | |
3138 | |
3139 static EnumPropertyItem material_items[] = { | |
3140 {GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitex
ture materials"}, | 1808 {GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitex
ture materials"}, |
3141 {GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shad
ers"}, | 1809 {GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shad
ers"}, |
3142 {0, NULL, 0, NULL, NULL} | |
3143 }; | |
3144 | |
3145 static EnumPropertyItem obstacle_simulation_items[] = { | |
3146 {OBSTSIMULATION_NONE, "NONE", 0, "None", ""}, | |
3147 {OBSTSIMULATION_TOI_rays, "RVO_RAYS", 0, "RVO (rays)", ""}, | |
3148 {OBSTSIMULATION_TOI_cells, "RVO_CELLS", 0, "RVO (cells)", ""}, | |
3149 {0, NULL, 0, NULL, NULL} | |
3150 }; | |
3151 | |
3152 static EnumPropertyItem vsync_items[] = { | |
3153 {VSYNC_OFF, "OFF", 0, "Off", "Disable vsync"}, | |
3154 {VSYNC_ON, "ON", 0, "On", "Enable vsync"}, | |
3155 {VSYNC_ADAPTIVE, "ADAPTIVE", 0, "Adaptive", "Enable adaptive vsy
nc (if supported)"}, | |
3156 {0, NULL, 0, NULL, NULL} | |
3157 }; | |
3158 | |
3159 static EnumPropertyItem storage_items[] = { | |
3160 {RAS_STORE_AUTO, "AUTO", 0, "Auto Select", "Choose the best supp
orted mode"}, | |
3161 {RAS_STORE_IMMEDIATE, "IMMEDIATE", 0, "Immediate Mode", "Slowest
performance, requires OpenGL (any version)"}, | |
3162 {RAS_STORE_VA, "VERTEX_ARRAY", 0, "Vertex Arrays", "Better perfo
rmance, requires at least OpenGL 1.1"}, | |
3163 #if 0 /* XXX VBOS are currently disabled since they cannot beat vertex array wi
th display lists in performance. */ | |
3164 {RAS_STORE_VBO, "VERTEX_BUFFER_OBJECT", 0, "Vertex Buffer Object
s", | |
3165 "Best performance, requires at least OpenGL 1.4"
},· | |
3166 #endif | |
3167 {0, NULL, 0, NULL, NULL}}; | 1810 {0, NULL, 0, NULL, NULL}}; |
3168 | |
3169 srna = RNA_def_struct(brna, "SceneGameData", NULL); | |
3170 RNA_def_struct_sdna(srna, "GameData"); | |
3171 RNA_def_struct_nested(brna, srna, "Scene"); | |
3172 RNA_def_struct_ui_text(srna, "Game Data", "Game data for a Scene datablo
ck"); | |
3173 ········ | |
3174 prop = RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE); | |
3175 RNA_def_property_int_sdna(prop, NULL, "xplay"); | |
3176 RNA_def_property_range(prop, 4, 10000); | |
3177 RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pix
els in the screen"); | |
3178 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3179 ········ | |
3180 prop = RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE); | |
3181 RNA_def_property_int_sdna(prop, NULL, "yplay"); | |
3182 RNA_def_property_range(prop, 4, 10000); | |
3183 RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixel
s in the screen"); | |
3184 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3185 | |
3186 prop = RNA_def_property(srna, "vsync", PROP_ENUM, PROP_NONE); | |
3187 RNA_def_property_enum_sdna(prop, NULL, "vsync"); | |
3188 RNA_def_property_enum_items(prop, vsync_items); | |
3189 RNA_def_property_ui_text(prop, "Vsync", "Change vsync settings"); | |
3190 ········ | |
3191 prop = RNA_def_property(srna, "samples", PROP_ENUM, PROP_NONE); | |
3192 RNA_def_property_enum_sdna(prop, NULL, "aasamples"); | |
3193 RNA_def_property_enum_items(prop, aasamples_items); | |
3194 RNA_def_property_ui_text(prop, "AA Samples", "The number of AA Samples t
o use for MSAA"); | |
3195 ········ | |
3196 prop = RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED); | |
3197 RNA_def_property_int_sdna(prop, NULL, "depth"); | |
3198 RNA_def_property_range(prop, 8, 32); | |
3199 RNA_def_property_ui_text(prop, "Bits", "Display bit depth of full screen
display"); | |
3200 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3201 | |
3202 prop = RNA_def_property(srna, "exit_key", PROP_ENUM, PROP_NONE); | |
3203 RNA_def_property_enum_sdna(prop, NULL, "exitkey"); | |
3204 RNA_def_property_enum_items(prop, event_type_items); | |
3205 RNA_def_property_enum_funcs(prop, NULL, "rna_GameSettings_exit_key_set",
NULL); | |
3206 RNA_def_property_ui_text(prop, "Exit Key", "The key that exits the Game
Engine"); | |
3207 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3208 ········ | |
3209 prop = RNA_def_property(srna, "raster_storage", PROP_ENUM, PROP_NONE); | |
3210 RNA_def_property_enum_sdna(prop, NULL, "raster_storage"); | |
3211 RNA_def_property_enum_items(prop, storage_items); | |
3212 RNA_def_property_ui_text(prop, "Storage", "Set the storage mode used by
the rasterizer"); | |
3213 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3214 ········ | |
3215 /* Do we need it here ? (since we already have it in World */ | |
3216 prop = RNA_def_property(srna, "frequency", PROP_INT, PROP_NONE); | |
3217 RNA_def_property_int_sdna(prop, NULL, "freqplay"); | |
3218 RNA_def_property_range(prop, 4, 2000); | |
3219 RNA_def_property_ui_text(prop, "Freq", "Display clock frequency of fulls
creen display"); | |
3220 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3221 ········ | |
3222 prop = RNA_def_property(srna, "show_fullscreen", PROP_BOOLEAN, PROP_NONE
); | |
3223 RNA_def_property_boolean_sdna(prop, NULL, "playerflag", GAME_PLAYER_FULL
SCREEN); | |
3224 RNA_def_property_ui_text(prop, "Fullscreen", "Start player in a new full
screen display"); | |
3225 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3226 | |
3227 prop = RNA_def_property(srna, "use_desktop", PROP_BOOLEAN, PROP_NONE); | |
3228 RNA_def_property_boolean_sdna(prop, NULL, "playerflag", GAME_PLAYER_DESK
TOP_RESOLUTION); | |
3229 RNA_def_property_ui_text(prop, "Desktop", "Use the current desktop resol
ution in fullscreen mode"); | |
3230 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3231 | |
3232 /* Framing */ | |
3233 prop = RNA_def_property(srna, "frame_type", PROP_ENUM, PROP_NONE); | |
3234 RNA_def_property_enum_sdna(prop, NULL, "framing.type"); | |
3235 RNA_def_property_enum_items(prop, framing_types_items); | |
3236 RNA_def_property_ui_text(prop, "Framing Types", "Select the type of Fram
ing you want"); | |
3237 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3238 | |
3239 prop = RNA_def_property(srna, "frame_color", PROP_FLOAT, PROP_COLOR); | |
3240 RNA_def_property_float_sdna(prop, NULL, "framing.col"); | |
3241 RNA_def_property_range(prop, 0.0f, 1.0f); | |
3242 RNA_def_property_array(prop, 3); | |
3243 RNA_def_property_ui_text(prop, "Framing Color", "Set color of the bars")
; | |
3244 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3245 ········ | |
3246 /* Stereo */ | |
3247 prop = RNA_def_property(srna, "stereo", PROP_ENUM, PROP_NONE); | |
3248 RNA_def_property_enum_sdna(prop, NULL, "stereoflag"); | |
3249 RNA_def_property_enum_items(prop, stereo_items); | |
3250 RNA_def_property_ui_text(prop, "Stereo Options", ""); | |
3251 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3252 | |
3253 prop = RNA_def_property(srna, "stereo_mode", PROP_ENUM, PROP_NONE); | |
3254 RNA_def_property_enum_sdna(prop, NULL, "stereomode"); | |
3255 RNA_def_property_enum_items(prop, stereo_modes_items); | |
3256 RNA_def_property_ui_text(prop, "Stereo Mode", "Stereographic techniques"
); | |
3257 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3258 | |
3259 prop = RNA_def_property(srna, "stereo_eye_separation", PROP_FLOAT, PROP_
NONE); | |
3260 RNA_def_property_float_sdna(prop, NULL, "eyeseparation"); | |
3261 RNA_def_property_range(prop, 0.01, 5.0); | |
3262 RNA_def_property_ui_text(prop, "Eye Separation", | |
3263 "Set the distance between the eyes - the camera
focal distance/30 should be fine"); | |
3264 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3265 ········ | |
3266 /* Dome */ | |
3267 prop = RNA_def_property(srna, "dome_mode", PROP_ENUM, PROP_NONE); | |
3268 RNA_def_property_enum_sdna(prop, NULL, "dome.mode"); | |
3269 RNA_def_property_enum_items(prop, dome_modes_items); | |
3270 RNA_def_property_ui_text(prop, "Dome Mode", "Dome physical configuration
s"); | |
3271 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3272 ········ | |
3273 prop = RNA_def_property(srna, "dome_tessellation", PROP_INT, PROP_NONE); | |
3274 RNA_def_property_int_sdna(prop, NULL, "dome.res"); | |
3275 RNA_def_property_ui_range(prop, 1, 8, 1, 1); | |
3276 RNA_def_property_ui_text(prop, "Tessellation", "Tessellation level - che
ck the generated mesh in wireframe mode"); | |
3277 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3278 ········ | |
3279 prop = RNA_def_property(srna, "dome_buffer_resolution", PROP_FLOAT, PROP
_NONE); | |
3280 RNA_def_property_float_sdna(prop, NULL, "dome.resbuf"); | |
3281 RNA_def_property_ui_range(prop, 0.1, 1.0, 0.1, 2); | |
3282 RNA_def_property_ui_text(prop, "Buffer Resolution", "Buffer Resolution -
decrease it to increase speed"); | |
3283 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3284 ········ | |
3285 prop = RNA_def_property(srna, "dome_angle", PROP_INT, PROP_NONE); | |
3286 RNA_def_property_int_sdna(prop, NULL, "dome.angle"); | |
3287 RNA_def_property_ui_range(prop, 90, 250, 1, 1); | |
3288 RNA_def_property_ui_text(prop, "Angle", "Field of View of the Dome - it
only works in mode Fisheye and Truncated"); | |
3289 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3290 ········ | |
3291 prop = RNA_def_property(srna, "dome_tilt", PROP_INT, PROP_NONE); | |
3292 RNA_def_property_int_sdna(prop, NULL, "dome.tilt"); | |
3293 RNA_def_property_ui_range(prop, -180, 180, 1, 1); | |
3294 RNA_def_property_ui_text(prop, "Tilt", "Camera rotation in horizontal ax
is"); | |
3295 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3296 ········ | |
3297 prop = RNA_def_property(srna, "dome_text", PROP_POINTER, PROP_NONE); | |
3298 RNA_def_property_pointer_sdna(prop, NULL, "dome.warptext"); | |
3299 RNA_def_property_struct_type(prop, "Text"); | |
3300 RNA_def_property_flag(prop, PROP_EDITABLE); | |
3301 RNA_def_property_ui_text(prop, "Warp Data", "Custom Warp Mesh data file"
); | |
3302 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3303 ········ | |
3304 /* physics */ | |
3305 prop = RNA_def_property(srna, "physics_engine", PROP_ENUM, PROP_NONE); | |
3306 RNA_def_property_enum_sdna(prop, NULL, "physicsEngine"); | |
3307 RNA_def_property_enum_items(prop, physics_engine_items); | |
3308 RNA_def_property_ui_text(prop, "Physics Engine", "Physics engine used fo
r physics simulation in the game engine"); | |
3309 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3310 | |
3311 prop = RNA_def_property(srna, "physics_gravity", PROP_FLOAT, PROP_ACCELE
RATION); | |
3312 RNA_def_property_float_sdna(prop, NULL, "gravity"); | |
3313 RNA_def_property_ui_range(prop, 0.0, 25.0, 1, 2); | |
3314 RNA_def_property_range(prop, 0.0, 10000.0); | |
3315 RNA_def_property_ui_text(prop, "Physics Gravity", | |
3316 "Gravitational constant used for physics simula
tion in the game engine"); | |
3317 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3318 | |
3319 prop = RNA_def_property(srna, "occlusion_culling_resolution", PROP_INT,
PROP_NONE); | |
3320 RNA_def_property_int_sdna(prop, NULL, "occlusionRes"); | |
3321 RNA_def_property_range(prop, 128.0, 1024.0); | |
3322 RNA_def_property_ui_text(prop, "Occlusion Resolution", | |
3323 "Size of the occlusion buffer in pixel, use hig
her value for better precision (slower)"); | |
3324 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3325 | |
3326 prop = RNA_def_property(srna, "fps", PROP_INT, PROP_NONE); | |
3327 RNA_def_property_int_sdna(prop, NULL, "ticrate"); | |
3328 RNA_def_property_ui_range(prop, 1, 60, 1, 1); | |
3329 RNA_def_property_range(prop, 1, 10000); | |
3330 RNA_def_property_ui_text(prop, "Frames Per Second", | |
3331 "Nominal number of game frames per second " | |
3332 "(physics fixed timestep = 1/fps, independently
of actual frame rate)"); | |
3333 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3334 | |
3335 prop = RNA_def_property(srna, "logic_step_max", PROP_INT, PROP_NONE); | |
3336 RNA_def_property_int_sdna(prop, NULL, "maxlogicstep"); | |
3337 RNA_def_property_ui_range(prop, 1, 5, 1, 1); | |
3338 RNA_def_property_range(prop, 1, 5); | |
3339 RNA_def_property_ui_text(prop, "Max Logic Steps", | |
3340 "Maximum number of logic frame per game frame i
f graphics slows down the game, " | |
3341 "higher value allows better synchronization wit
h physics"); | |
3342 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3343 | |
3344 prop = RNA_def_property(srna, "physics_step_max", PROP_INT, PROP_NONE); | |
3345 RNA_def_property_int_sdna(prop, NULL, "maxphystep"); | |
3346 RNA_def_property_ui_range(prop, 1, 5, 1, 1); | |
3347 RNA_def_property_range(prop, 1, 5); | |
3348 RNA_def_property_ui_text(prop, "Max Physics Steps", | |
3349 "Maximum number of physics step per game frame
if graphics slows down the game, " | |
3350 "higher value allows physics to keep up with re
altime"); | |
3351 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3352 | |
3353 prop = RNA_def_property(srna, "physics_step_sub", PROP_INT, PROP_NONE); | |
3354 RNA_def_property_int_sdna(prop, NULL, "physubstep"); | |
3355 RNA_def_property_range(prop, 1, 50); | |
3356 RNA_def_property_ui_range(prop, 1, 5, 1, 1); | |
3357 RNA_def_property_ui_text(prop, "Physics Sub Steps", | |
3358 "Number of simulation substep per physic timest
ep, " | |
3359 "higher value give better physics precision"); | |
3360 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3361 | |
3362 prop = RNA_def_property(srna, "deactivation_linear_threshold", PROP_FLOA
T, PROP_NONE); | |
3363 RNA_def_property_float_sdna(prop, NULL, "lineardeactthreshold"); | |
3364 RNA_def_property_ui_range(prop, 0.001, 10000.0, 2, 3); | |
3365 RNA_def_property_range(prop, 0.001, 10000.0); | |
3366 RNA_def_property_ui_text(prop, "Deactivation Linear Threshold", | |
3367 "Linear velocity that an object must be below b
efore the deactivation timer can start"); | |
3368 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3369 | |
3370 prop = RNA_def_property(srna, "deactivation_angular_threshold", PROP_FLO
AT, PROP_NONE); | |
3371 RNA_def_property_float_sdna(prop, NULL, "angulardeactthreshold"); | |
3372 RNA_def_property_ui_range(prop, 0.001, 10000.0, 2, 3); | |
3373 RNA_def_property_range(prop, 0.001, 10000.0); | |
3374 RNA_def_property_ui_text(prop, "Deactivation Angular Threshold", | |
3375 "Angular velocity that an object must be below
before the deactivation timer can start"); | |
3376 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3377 | |
3378 prop = RNA_def_property(srna, "deactivation_time", PROP_FLOAT, PROP_NONE
); | |
3379 RNA_def_property_float_sdna(prop, NULL, "deactivationtime"); | |
3380 RNA_def_property_ui_range(prop, 0.0, 60.0, 1, 1); | |
3381 RNA_def_property_range(prop, 0.0, 60.0); | |
3382 RNA_def_property_ui_text(prop, "Deactivation Time", | |
3383 "Amount of time (in seconds) after which object
s with a velocity less than the given " | |
3384 "threshold will deactivate (0.0 means no deacti
vation)"); | |
3385 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3386 | |
3387 /* mode */ | |
3388 /* not used *//* deprecated !!!!!!!!!!!!! */ | |
3389 prop = RNA_def_property(srna, "use_occlusion_culling", PROP_BOOLEAN, PRO
P_NONE); | |
3390 RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_DBVT_CULLING); | |
3391 RNA_def_property_ui_text(prop, "DBVT Culling", | |
3392 "Use optimized Bullet DBVT tree for view frustu
m and occlusion culling (more efficient, " | |
3393 "but it can waste unnecessary CPU if the scene
doesn't have occluder objects)"); | |
3394 ········ | |
3395 /* not used *//* deprecated !!!!!!!!!!!!! */ | |
3396 prop = RNA_def_property(srna, "use_activity_culling", PROP_BOOLEAN, PROP
_NONE); | |
3397 RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_ACTIVITY_CULLING); | |
3398 RNA_def_property_ui_text(prop, "Activity Culling", "Activity culling is
enabled"); | |
3399 | |
3400 /* not used *//* deprecated !!!!!!!!!!!!! */ | |
3401 prop = RNA_def_property(srna, "activity_culling_box_radius", PROP_FLOAT,
PROP_NONE); | |
3402 RNA_def_property_float_sdna(prop, NULL, "activityBoxRadius"); | |
3403 RNA_def_property_range(prop, 0.0, 1000.0); | |
3404 RNA_def_property_ui_text(prop, "Box Radius", | |
3405 "Radius of the activity bubble, in Manhattan le
ngth " | |
3406 "(objects outside the box are activity-culled)"
); | |
3407 | |
3408 /* booleans */ | |
3409 prop = RNA_def_property(srna, "show_debug_properties", PROP_BOOLEAN, PRO
P_NONE); | |
3410 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_DEBUG_PROPS)
; | |
3411 RNA_def_property_ui_text(prop, "Show Debug Properties", | |
3412 "Show properties marked for debugging while the
game runs"); | |
3413 | |
3414 prop = RNA_def_property(srna, "show_framerate_profile", PROP_BOOLEAN, PR
OP_NONE); | |
3415 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_FRAMERATE); | |
3416 RNA_def_property_ui_text(prop, "Show Framerate and Profile", | |
3417 "Show framerate and profiling information while
the game runs"); | |
3418 | |
3419 prop = RNA_def_property(srna, "show_physics_visualization", PROP_BOOLEAN
, PROP_NONE); | |
3420 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_PHYSICS); | |
3421 RNA_def_property_ui_text(prop, "Show Physics Visualization", | |
3422 "Show a visualization of physics bounds and int
eractions"); | |
3423 | |
3424 prop = RNA_def_property(srna, "show_mouse", PROP_BOOLEAN, PROP_NONE); | |
3425 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_MOUSE); | |
3426 RNA_def_property_ui_text(prop, "Show Mouse", "Start player with a visibl
e mouse cursor"); | |
3427 | |
3428 prop = RNA_def_property(srna, "use_frame_rate", PROP_BOOLEAN, PROP_NONE)
; | |
3429 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_ENABLE_A
LL_FRAMES); | |
3430 RNA_def_property_ui_text(prop, "Use Frame Rate", | |
3431 "Respect the frame rate rather than rendering a
s many frames as possible"); | |
3432 | |
3433 prop = RNA_def_property(srna, "use_display_lists", PROP_BOOLEAN, PROP_NO
NE); | |
3434 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_DISPLAY_LISTS); | |
3435 RNA_def_property_ui_text(prop, "Display Lists", | |
3436 "Use display lists to speed up rendering by kee
ping geometry on the GPU"); | |
3437 | |
3438 prop = RNA_def_property(srna, "use_deprecation_warnings", PROP_BOOLEAN,
PROP_NONE); | |
3439 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_IGNORE_D
EPRECATION_WARNINGS); | |
3440 RNA_def_property_ui_text(prop, "Deprecation Warnings", | |
3441 "Print warnings when using deprecated features
in the python API"); | |
3442 | |
3443 prop = RNA_def_property(srna, "use_animation_record", PROP_BOOLEAN, PROP
_NONE); | |
3444 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_ENABLE_ANIMATION_
RECORD); | |
3445 RNA_def_property_ui_text(prop, "Record Animation", "Record animation to
F-Curves"); | |
3446 | |
3447 prop = RNA_def_property(srna, "use_auto_start", PROP_BOOLEAN, PROP_NONE)
; | |
3448 RNA_def_property_boolean_funcs(prop, "rna_GameSettings_auto_start_get",
"rna_GameSettings_auto_start_set"); | |
3449 RNA_def_property_ui_text(prop, "Auto Start", "Automatically start game a
t load time"); | |
3450 | |
3451 prop = RNA_def_property(srna, "use_restrict_animation_updates", PROP_BOO
LEAN, PROP_NONE); | |
3452 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_RESTRICT_ANIM_UPD
ATES); | |
3453 RNA_def_property_ui_text(prop, "Restrict Animation Updates", | |
3454 "Restrict the number of animation updates to th
e animation FPS (this is " | |
3455 "better for performance, but can cause issues w
ith smooth playback)"); | |
3456 ········ | |
3457 /* materials */ | |
3458 prop = RNA_def_property(srna, "material_mode", PROP_ENUM, PROP_NONE); | |
3459 RNA_def_property_enum_sdna(prop, NULL, "matmode"); | |
3460 RNA_def_property_enum_items(prop, material_items); | |
3461 RNA_def_property_ui_text(prop, "Material Mode", "Material mode to use fo
r rendering"); | |
3462 RNA_def_property_update(prop, NC_SCENE | NA_EDITED, NULL); | |
3463 | |
3464 prop = RNA_def_property(srna, "use_glsl_lights", PROP_BOOLEAN, PROP_NONE
); | |
3465 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_
LIGHTS); | |
3466 RNA_def_property_ui_text(prop, "GLSL Lights", "Use lights for GLSL rende
ring"); | |
3467 RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_upda
te"); | |
3468 | |
3469 prop = RNA_def_property(srna, "use_glsl_shaders", PROP_BOOLEAN, PROP_NON
E); | |
3470 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_
SHADERS); | |
3471 RNA_def_property_ui_text(prop, "GLSL Shaders", "Use shaders for GLSL ren
dering"); | |
3472 RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_upda
te"); | |
3473 | |
3474 prop = RNA_def_property(srna, "use_glsl_shadows", PROP_BOOLEAN, PROP_NON
E); | |
3475 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_
SHADOWS); | |
3476 RNA_def_property_ui_text(prop, "GLSL Shadows", "Use shadows for GLSL ren
dering"); | |
3477 RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_upda
te"); | |
3478 | |
3479 prop = RNA_def_property(srna, "use_glsl_ramps", PROP_BOOLEAN, PROP_NONE)
; | |
3480 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_
RAMPS); | |
3481 RNA_def_property_ui_text(prop, "GLSL Ramps", "Use ramps for GLSL renderi
ng"); | |
3482 RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_upda
te"); | |
3483 | |
3484 prop = RNA_def_property(srna, "use_glsl_nodes", PROP_BOOLEAN, PROP_NONE)
; | |
3485 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_
NODES); | |
3486 RNA_def_property_ui_text(prop, "GLSL Nodes", "Use nodes for GLSL renderi
ng"); | |
3487 RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_upda
te"); | |
3488 | |
3489 prop = RNA_def_property(srna, "use_glsl_color_management", PROP_BOOLEAN,
PROP_NONE); | |
3490 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_
COLOR_MANAGEMENT); | |
3491 RNA_def_property_ui_text(prop, "GLSL Color Management", "Use color manag
ement for GLSL rendering"); | |
3492 RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_upda
te"); | |
3493 | |
3494 prop = RNA_def_property(srna, "use_glsl_extra_textures", PROP_BOOLEAN, P
ROP_NONE); | |
3495 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_
EXTRA_TEX); | |
3496 RNA_def_property_ui_text(prop, "GLSL Extra Textures", | |
3497 "Use extra textures like normal or specular map
s for GLSL rendering"); | |
3498 RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_upda
te"); | |
3499 | |
3500 prop = RNA_def_property(srna, "use_material_caching", PROP_BOOLEAN, PROP
_NONE); | |
3501 RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_NO_MATER
IAL_CACHING); | |
3502 RNA_def_property_ui_text(prop, "Use Material Caching", | |
3503 "Cache materials in the converter (this is fast
er, but can cause problems with older " | |
3504 "Singletexture and Multitexture games)"); | |
3505 | |
3506 /* obstacle simulation */ | |
3507 prop = RNA_def_property(srna, "obstacle_simulation", PROP_ENUM, PROP_NON
E); | |
3508 RNA_def_property_enum_sdna(prop, NULL, "obstacleSimulation"); | |
3509 RNA_def_property_enum_items(prop, obstacle_simulation_items); | |
3510 RNA_def_property_ui_text(prop, "Obstacle simulation", "Simulation used f
or obstacle avoidance in the game engine"); | |
3511 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3512 | |
3513 prop = RNA_def_property(srna, "level_height", PROP_FLOAT, PROP_ACCELERAT
ION); | |
3514 RNA_def_property_float_sdna(prop, NULL, "levelHeight"); | |
3515 RNA_def_property_range(prop, 0.0f, 200.0f); | |
3516 RNA_def_property_ui_text(prop, "Level height", | |
3517 "Max difference in heights of obstacles to enab
le their interaction"); | |
3518 RNA_def_property_update(prop, NC_SCENE, NULL); | |
3519 | |
3520 prop = RNA_def_property(srna, "show_obstacle_simulation", PROP_BOOLEAN,
PROP_NONE); | |
3521 RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_OBSTACLE_SIM
ULATION); | |
3522 RNA_def_property_ui_text(prop, "Visualization", "Enable debug visualizat
ion for obstacle simulation"); | |
3523 | |
3524 /* Recast Settings */ | |
3525 prop = RNA_def_property(srna, "recast_data", PROP_POINTER, PROP_NONE); | |
3526 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
3527 RNA_def_property_pointer_sdna(prop, NULL, "recastData"); | |
3528 RNA_def_property_struct_type(prop, "SceneGameRecastData"); | |
3529 RNA_def_property_ui_text(prop, "Recast Data", ""); | |
3530 | |
3531 /* Nestled Data */ | |
3532 rna_def_scene_game_recast_data(brna); | |
3533 } | |
3534 | |
3535 static void rna_def_scene_render_layer(BlenderRNA *brna) | |
3536 { | |
3537 StructRNA *srna; | |
3538 PropertyRNA *prop; | |
3539 | |
3540 srna = RNA_def_struct(brna, "SceneRenderLayer", NULL); | |
3541 RNA_def_struct_ui_text(srna, "Scene Render Layer", "Render layer"); | |
3542 RNA_def_struct_ui_icon(srna, ICON_RENDERLAYERS); | |
3543 RNA_def_struct_path_func(srna, "rna_SceneRenderLayer_path"); | |
3544 | |
3545 rna_def_render_layer_common(srna, 1); | |
3546 | |
3547 /* Freestyle */ | |
3548 rna_def_freestyle_settings(brna); | |
3549 | |
3550 prop = RNA_def_property(srna, "freestyle_settings", PROP_POINTER, PROP_N
ONE); | |
3551 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
3552 RNA_def_property_pointer_sdna(prop, NULL, "freestyleConfig"); | |
3553 RNA_def_property_struct_type(prop, "FreestyleSettings"); | |
3554 RNA_def_property_ui_text(prop, "Freestyle Settings", ""); | |
3555 } | |
3556 | |
3557 /* Render Layers */ | |
3558 static void rna_def_render_layers(BlenderRNA *brna, PropertyRNA *cprop) | |
3559 { | |
3560 StructRNA *srna; | |
3561 PropertyRNA *prop; | |
3562 | |
3563 FunctionRNA *func; | |
3564 PropertyRNA *parm; | |
3565 | |
3566 RNA_def_property_srna(cprop, "RenderLayers"); | |
3567 srna = RNA_def_struct(brna, "RenderLayers", NULL); | |
3568 RNA_def_struct_sdna(srna, "RenderData"); | |
3569 RNA_def_struct_ui_text(srna, "Render Layers", "Collection of render laye
rs"); | |
3570 | |
3571 prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED); | |
3572 RNA_def_property_int_sdna(prop, NULL, "actlay"); | |
3573 RNA_def_property_int_funcs(prop, "rna_RenderSettings_active_layer_index_
get", | |
3574 "rna_RenderSettings_active_layer_index_set", | |
3575 "rna_RenderSettings_active_layer_index_range"
); | |
3576 RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in re
nder layer array"); | |
3577 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_g
lsl_update"); | |
3578 ········ | |
3579 prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | |
3580 RNA_def_property_struct_type(prop, "SceneRenderLayer"); | |
3581 RNA_def_property_pointer_funcs(prop, "rna_RenderSettings_active_layer_ge
t", | |
3582 "rna_RenderSettings_active_layer_set", NU
LL, NULL); | |
3583 RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL); | |
3584 RNA_def_property_ui_text(prop, "Active Render Layer", "Active Render Lay
er"); | |
3585 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_g
lsl_update"); | |
3586 | |
3587 func = RNA_def_function(srna, "new", "rna_RenderLayer_new"); | |
3588 RNA_def_function_ui_description(func, "Add a render layer to scene"); | |
3589 RNA_def_function_flag(func, FUNC_USE_SELF_ID); | |
3590 parm = RNA_def_string(func, "name", "RenderLayer", 0, "", "New name for
the render layer (not unique)"); | |
3591 RNA_def_property_flag(parm, PROP_REQUIRED); | |
3592 parm = RNA_def_pointer(func, "result", "SceneRenderLayer", "", "Newly cr
eated render layer"); | |
3593 RNA_def_function_return(func, parm); | |
3594 | |
3595 func = RNA_def_function(srna, "remove", "rna_RenderLayer_remove"); | |
3596 RNA_def_function_ui_description(func, "Remove a render layer"); | |
3597 RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_REPORTS | FUNC_USE_
SELF_ID); | |
3598 parm = RNA_def_pointer(func, "layer", "SceneRenderLayer", "", "Render la
yer to remove"); | |
3599 RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPT
R); | |
3600 RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); | |
3601 } | |
3602 | |
3603 /* use for render output and image save operator, | |
3604 * note: there are some cases where the members act differently when this is | |
3605 * used from a scene, video formats can only be selected for render output | |
3606 * for example, this is checked by seeing if the ptr->id.data is a Scene id */ | |
3607 | |
3608 static void rna_def_scene_image_format_data(BlenderRNA *brna) | |
3609 { | |
3610 #ifdef WITH_OPENEXR | |
3611 static EnumPropertyItem exr_codec_items[] = { | |
3612 {R_IMF_EXR_CODEC_NONE, "NONE", 0, "None", ""}, | |
3613 {R_IMF_EXR_CODEC_PXR24, "PXR24", 0, "Pxr24 (lossy)", ""}, | |
3614 {R_IMF_EXR_CODEC_ZIP, "ZIP", 0, "ZIP (lossless)", ""}, | |
3615 {R_IMF_EXR_CODEC_PIZ, "PIZ", 0, "PIZ (lossless)", ""}, | |
3616 {R_IMF_EXR_CODEC_RLE, "RLE", 0, "RLE (lossless)", ""}, | |
3617 {0, NULL, 0, NULL, NULL} | |
3618 }; | |
3619 #endif | |
3620 | |
3621 #ifdef WITH_OPENJPEG | |
3622 static EnumPropertyItem jp2_codec_items[] = { | |
3623 {R_IMF_JP2_CODEC_JP2, "JP2", 0, "JP2", ""}, | |
3624 {R_IMF_JP2_CODEC_J2K, "J2K", 0, "J2K", ""}, | |
3625 {0, NULL, 0, NULL, NULL} | |
3626 }; | |
3627 #endif | |
3628 | |
3629 StructRNA *srna; | |
3630 PropertyRNA *prop; | |
3631 | |
3632 srna = RNA_def_struct(brna, "ImageFormatSettings", NULL); | |
3633 RNA_def_struct_sdna(srna, "ImageFormatData"); | |
3634 RNA_def_struct_nested(brna, srna, "Scene"); | |
3635 /* RNA_def_struct_path_func(srna, "rna_RenderSettings_path"); *//* no n
eed for the path, its not animated! */ | |
3636 RNA_def_struct_ui_text(srna, "Image Format", "Settings for image formats
"); | |
3637 | |
3638 prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE); | |
3639 RNA_def_property_enum_sdna(prop, NULL, "imtype"); | |
3640 RNA_def_property_enum_items(prop, image_type_items); | |
3641 RNA_def_property_enum_funcs(prop, NULL, "rna_ImageFormatSettings_file_fo
rmat_set", | |
3642 "rna_ImageFormatSettings_file_format_itemf")
; | |
3643 RNA_def_property_ui_text(prop, "File Format", "File format to save the r
endered images as"); | |
3644 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3645 | |
3646 prop = RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE); | |
3647 RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes"); | |
3648 RNA_def_property_enum_items(prop, image_color_mode_items); | |
3649 RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_c
olor_mode_itemf"); | |
3650 RNA_def_property_ui_text(prop, "Color Mode", | |
3651 "Choose BW for saving grayscale images, RGB for
saving red, green and blue channels, " | |
3652 "and RGBA for saving red, green, blue and alpha
channels"); | |
3653 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3654 | |
3655 prop = RNA_def_property(srna, "color_depth", PROP_ENUM, PROP_NONE); | |
3656 RNA_def_property_enum_bitflag_sdna(prop, NULL, "depth"); | |
3657 RNA_def_property_enum_items(prop, image_color_depth_items); | |
3658 RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_c
olor_depth_itemf"); | |
3659 RNA_def_property_ui_text(prop, "Color Depth", "Bit depth per channel"); | |
3660 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3661 | |
3662 /* was 'file_quality' */ | |
3663 prop = RNA_def_property(srna, "quality", PROP_INT, PROP_PERCENTAGE); | |
3664 RNA_def_property_int_sdna(prop, NULL, "quality"); | |
3665 RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */ | |
3666 RNA_def_property_ui_text(prop, "Quality", "Quality for image formats tha
t support lossy compression"); | |
3667 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3668 | |
3669 /* was shared with file_quality */ | |
3670 prop = RNA_def_property(srna, "compression", PROP_INT, PROP_PERCENTAGE); | |
3671 RNA_def_property_int_sdna(prop, NULL, "compress"); | |
3672 RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */ | |
3673 RNA_def_property_ui_text(prop, "Compression", "Compression level for for
mats that support lossless compression"); | |
3674 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3675 | |
3676 /* flag */ | |
3677 prop = RNA_def_property(srna, "use_zbuffer", PROP_BOOLEAN, PROP_NONE); | |
3678 RNA_def_property_boolean_sdna(prop, NULL, "flag", R_IMF_FLAG_ZBUF); | |
3679 RNA_def_property_ui_text(prop, "Z Buffer", "Save the z-depth per pixel (
32 bit unsigned int z-buffer)"); | |
3680 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3681 | |
3682 prop = RNA_def_property(srna, "use_preview", PROP_BOOLEAN, PROP_NONE); | |
3683 RNA_def_property_boolean_sdna(prop, NULL, "flag", R_IMF_FLAG_PREVIEW_JPG
); | |
3684 RNA_def_property_ui_text(prop, "Preview", "When rendering animations, sa
ve JPG preview images in same directory"); | |
3685 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3686 | |
3687 /* format specific */ | |
3688 | |
3689 #ifdef WITH_OPENEXR | |
3690 /* OpenEXR */ | |
3691 | |
3692 prop = RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE); | |
3693 RNA_def_property_enum_sdna(prop, NULL, "exr_codec"); | |
3694 RNA_def_property_enum_items(prop, exr_codec_items); | |
3695 RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR"); | |
3696 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3697 | |
3698 #endif | |
3699 | |
3700 #ifdef WITH_OPENJPEG | |
3701 /* Jpeg 2000 */ | |
3702 prop = RNA_def_property(srna, "use_jpeg2k_ycc", PROP_BOOLEAN, PROP_NONE)
; | |
3703 RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_YCC
); | |
3704 RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chromi
nance channels instead of RGB colors"); | |
3705 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3706 | |
3707 prop = RNA_def_property(srna, "use_jpeg2k_cinema_preset", PROP_BOOLEAN,
PROP_NONE); | |
3708 RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_CIN
E_PRESET); | |
3709 RNA_def_property_ui_text(prop, "Cinema", "Use Openjpeg Cinema Preset"); | |
3710 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3711 | |
3712 prop = RNA_def_property(srna, "use_jpeg2k_cinema_48", PROP_BOOLEAN, PROP
_NONE); | |
3713 RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_CIN
E_48); | |
3714 RNA_def_property_ui_text(prop, "Cinema (48)", "Use Openjpeg Cinema Prese
t (48fps)"); | |
3715 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3716 | |
3717 prop = RNA_def_property(srna, "jpeg2k_codec", PROP_ENUM, PROP_NONE); | |
3718 RNA_def_property_enum_sdna(prop, NULL, "jp2_codec"); | |
3719 RNA_def_property_enum_items(prop, jp2_codec_items); | |
3720 RNA_def_property_ui_text(prop, "Codec", "Codec settings for Jpek2000"); | |
3721 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3722 #endif | |
3723 | |
3724 /* Cineon and DPX */ | |
3725 | |
3726 prop = RNA_def_property(srna, "use_cineon_log", PROP_BOOLEAN, PROP_NONE)
; | |
3727 RNA_def_property_boolean_sdna(prop, NULL, "cineon_flag", R_IMF_CINEON_FL
AG_LOG); | |
3728 RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color spac
e"); | |
3729 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3730 | |
3731 prop = RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE); | |
3732 RNA_def_property_int_sdna(prop, NULL, "cineon_black"); | |
3733 RNA_def_property_range(prop, 0, 1024); | |
3734 RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint
"); | |
3735 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3736 | |
3737 prop = RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE); | |
3738 RNA_def_property_int_sdna(prop, NULL, "cineon_white"); | |
3739 RNA_def_property_range(prop, 0, 1024); | |
3740 RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint
"); | |
3741 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3742 | |
3743 prop = RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE); | |
3744 RNA_def_property_float_sdna(prop, NULL, "cineon_gamma"); | |
3745 RNA_def_property_range(prop, 0.0f, 10.0f); | |
3746 RNA_def_property_ui_text(prop, "G", "Log conversion gamma"); | |
3747 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3748 | |
3749 /* color management */ | |
3750 prop = RNA_def_property(srna, "view_settings", PROP_POINTER, PROP_NONE); | |
3751 RNA_def_property_pointer_sdna(prop, NULL, "view_settings"); | |
3752 RNA_def_property_struct_type(prop, "ColorManagedViewSettings"); | |
3753 RNA_def_property_ui_text(prop, "View Settings", "Color management settin
gs applied on image before saving"); | |
3754 | |
3755 prop = RNA_def_property(srna, "display_settings", PROP_POINTER, PROP_NON
E); | |
3756 RNA_def_property_pointer_sdna(prop, NULL, "display_settings"); | |
3757 RNA_def_property_struct_type(prop, "ColorManagedDisplaySettings"); | |
3758 RNA_def_property_ui_text(prop, "Display Settings", "Settings of device s
aved image would be displayed on"); | |
3759 } | |
3760 | |
3761 static void rna_def_scene_ffmpeg_settings(BlenderRNA *brna) | |
3762 { | |
3763 StructRNA *srna; | |
3764 PropertyRNA *prop; | |
3765 | |
3766 #ifdef WITH_FFMPEG | |
3767 static EnumPropertyItem ffmpeg_format_items[] = { | |
3768 {FFMPEG_MPEG1, "MPEG1", 0, "MPEG-1", ""}, | |
3769 {FFMPEG_MPEG2, "MPEG2", 0, "MPEG-2", ""}, | |
3770 {FFMPEG_MPEG4, "MPEG4", 0, "MPEG-4", ""}, | |
3771 {FFMPEG_AVI, "AVI", 0, "AVI", ""}, | |
3772 {FFMPEG_MOV, "QUICKTIME", 0, "Quicktime", ""}, | |
3773 {FFMPEG_DV, "DV", 0, "DV", ""}, | |
3774 {FFMPEG_H264, "H264", 0, "H.264", ""}, | |
3775 {FFMPEG_XVID, "XVID", 0, "Xvid", ""}, | |
3776 {FFMPEG_OGG, "OGG", 0, "Ogg", ""}, | |
3777 {FFMPEG_MKV, "MKV", 0, "Matroska", ""}, | |
3778 {FFMPEG_FLV, "FLASH", 0, "Flash", ""}, | |
3779 {0, NULL, 0, NULL, NULL} | |
3780 }; | |
3781 | |
3782 static EnumPropertyItem ffmpeg_codec_items[] = { | |
3783 {CODEC_ID_NONE, "NONE", 0, "None", ""}, | |
3784 {CODEC_ID_MPEG1VIDEO, "MPEG1", 0, "MPEG-1", ""}, | |
3785 {CODEC_ID_MPEG2VIDEO, "MPEG2", 0, "MPEG-2", ""}, | |
3786 {CODEC_ID_MPEG4, "MPEG4", 0, "MPEG-4(divx)", ""}, | |
3787 {CODEC_ID_HUFFYUV, "HUFFYUV", 0, "HuffYUV", ""}, | |
3788 {CODEC_ID_DVVIDEO, "DV", 0, "DV", ""}, | |
3789 {CODEC_ID_H264, "H264", 0, "H.264", ""}, | |
3790 {CODEC_ID_THEORA, "THEORA", 0, "Theora", ""}, | |
3791 {CODEC_ID_FLV1, "FLASH", 0, "Flash Video", ""}, | |
3792 {CODEC_ID_FFV1, "FFV1", 0, "FFmpeg video codec #1", ""}, | |
3793 {CODEC_ID_QTRLE, "QTRLE", 0, "QT rle / QT Animation", ""}, | |
3794 {CODEC_ID_DNXHD, "DNXHD", 0, "DNxHD", ""}, | |
3795 {CODEC_ID_PNG, "PNG", 0, "PNG", ""}, | |
3796 {0, NULL, 0, NULL, NULL} | |
3797 }; | |
3798 | |
3799 static EnumPropertyItem ffmpeg_audio_codec_items[] = { | |
3800 {CODEC_ID_NONE, "NONE", 0, "None", ""}, | |
3801 {CODEC_ID_MP2, "MP2", 0, "MP2", ""}, | |
3802 {CODEC_ID_MP3, "MP3", 0, "MP3", ""}, | |
3803 {CODEC_ID_AC3, "AC3", 0, "AC3", ""}, | |
3804 {CODEC_ID_AAC, "AAC", 0, "AAC", ""}, | |
3805 {CODEC_ID_VORBIS, "VORBIS", 0, "Vorbis", ""}, | |
3806 {CODEC_ID_FLAC, "FLAC", 0, "FLAC", ""}, | |
3807 {CODEC_ID_PCM_S16LE, "PCM", 0, "PCM", ""}, | |
3808 {0, NULL, 0, NULL, NULL} | |
3809 }; | |
3810 #endif | |
3811 | |
3812 static EnumPropertyItem audio_channel_items[] = { | |
3813 {1, "MONO", 0, "Mono", "Set audio channels to mono"}, | |
3814 {2, "STEREO", 0, "Stereo", "Set audio channels to stereo"}, | |
3815 {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 chann
els"}, | |
3816 {6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1
surround sound"}, | |
3817 {8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1
surround sound"}, | |
3818 {0, NULL, 0, NULL, NULL} | |
3819 }; | |
3820 | |
3821 srna = RNA_def_struct(brna, "FFmpegSettings", NULL); | |
3822 RNA_def_struct_sdna(srna, "FFMpegCodecData"); | |
3823 RNA_def_struct_ui_text(srna, "FFmpeg Settings", "FFmpeg related settings
for the scene"); | |
3824 | |
3825 #ifdef WITH_FFMPEG | |
3826 prop = RNA_def_property(srna, "format", PROP_ENUM, PROP_NONE); | |
3827 RNA_def_property_enum_bitflag_sdna(prop, NULL, "type"); | |
3828 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3829 RNA_def_property_enum_items(prop, ffmpeg_format_items); | |
3830 RNA_def_property_ui_text(prop, "Format", "Output file format"); | |
3831 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegS
ettings_codec_settings_update"); | |
3832 | |
3833 prop = RNA_def_property(srna, "codec", PROP_ENUM, PROP_NONE); | |
3834 RNA_def_property_enum_bitflag_sdna(prop, NULL, "codec"); | |
3835 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3836 RNA_def_property_enum_items(prop, ffmpeg_codec_items); | |
3837 RNA_def_property_ui_text(prop, "Codec", "FFmpeg codec to use"); | |
3838 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_FFmpegS
ettings_codec_settings_update"); | |
3839 | |
3840 prop = RNA_def_property(srna, "video_bitrate", PROP_INT, PROP_NONE); | |
3841 RNA_def_property_int_sdna(prop, NULL, "video_bitrate"); | |
3842 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3843 RNA_def_property_ui_text(prop, "Bitrate", "Video bitrate (kb/s)"); | |
3844 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3845 | |
3846 prop = RNA_def_property(srna, "minrate", PROP_INT, PROP_NONE); | |
3847 RNA_def_property_int_sdna(prop, NULL, "rc_min_rate"); | |
3848 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3849 RNA_def_property_ui_text(prop, "Min Rate", "Rate control: min rate (kb/s
)"); | |
3850 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3851 | |
3852 prop = RNA_def_property(srna, "maxrate", PROP_INT, PROP_NONE); | |
3853 RNA_def_property_int_sdna(prop, NULL, "rc_max_rate"); | |
3854 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3855 RNA_def_property_ui_text(prop, "Max Rate", "Rate control: max rate (kb/s
)"); | |
3856 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3857 | |
3858 prop = RNA_def_property(srna, "muxrate", PROP_INT, PROP_NONE); | |
3859 RNA_def_property_int_sdna(prop, NULL, "mux_rate"); | |
3860 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3861 RNA_def_property_range(prop, 0, 100000000); | |
3862 RNA_def_property_ui_text(prop, "Mux Rate", "Mux rate (bits/s(!))"); | |
3863 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3864 | |
3865 prop = RNA_def_property(srna, "gopsize", PROP_INT, PROP_NONE); | |
3866 RNA_def_property_int_sdna(prop, NULL, "gop_size"); | |
3867 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3868 RNA_def_property_range(prop, 0, 100); | |
3869 RNA_def_property_ui_text(prop, "GOP Size", "Distance between key frames"
); | |
3870 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3871 | |
3872 prop = RNA_def_property(srna, "buffersize", PROP_INT, PROP_NONE); | |
3873 RNA_def_property_int_sdna(prop, NULL, "rc_buffer_size"); | |
3874 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3875 RNA_def_property_range(prop, 0, 2000); | |
3876 RNA_def_property_ui_text(prop, "Buffersize", "Rate control: buffer size
(kb)"); | |
3877 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3878 | |
3879 prop = RNA_def_property(srna, "packetsize", PROP_INT, PROP_NONE); | |
3880 RNA_def_property_int_sdna(prop, NULL, "mux_packet_size"); | |
3881 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3882 RNA_def_property_range(prop, 0, 16384); | |
3883 RNA_def_property_ui_text(prop, "Mux Packet Size", "Mux packet size (byte
)"); | |
3884 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3885 | |
3886 prop = RNA_def_property(srna, "use_autosplit", PROP_BOOLEAN, PROP_NONE); | |
3887 RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_AUTOSPLIT_OUTP
UT); | |
3888 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3889 RNA_def_property_ui_text(prop, "Autosplit Output", "Autosplit output at
2GB boundary"); | |
3890 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3891 | |
3892 prop = RNA_def_property(srna, "use_lossless_output", PROP_BOOLEAN, PROP_
NONE); | |
3893 RNA_def_property_boolean_sdna(prop, NULL, "flags", FFMPEG_LOSSLESS_OUTPU
T); | |
3894 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3895 RNA_def_property_boolean_funcs(prop, NULL, "rna_FFmpegSettings_lossless_
output_set"); | |
3896 RNA_def_property_ui_text(prop, "Lossless Output", "Use lossless output f
or video streams"); | |
3897 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3898 | |
3899 /* FFMPEG Audio*/ | |
3900 prop = RNA_def_property(srna, "audio_codec", PROP_ENUM, PROP_NONE); | |
3901 RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio_codec"); | |
3902 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3903 RNA_def_property_enum_items(prop, ffmpeg_audio_codec_items); | |
3904 RNA_def_property_ui_text(prop, "Audio Codec", "FFmpeg audio codec to use
"); | |
3905 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3906 | |
3907 prop = RNA_def_property(srna, "audio_bitrate", PROP_INT, PROP_NONE); | |
3908 RNA_def_property_int_sdna(prop, NULL, "audio_bitrate"); | |
3909 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3910 RNA_def_property_range(prop, 32, 384); | |
3911 RNA_def_property_ui_text(prop, "Bitrate", "Audio bitrate (kb/s)"); | |
3912 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3913 | |
3914 prop = RNA_def_property(srna, "audio_volume", PROP_FLOAT, PROP_NONE); | |
3915 RNA_def_property_float_sdna(prop, NULL, "audio_volume"); | |
3916 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3917 RNA_def_property_range(prop, 0.0f, 1.0f); | |
3918 RNA_def_property_ui_text(prop, "Volume", "Audio volume"); | |
3919 RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_SOUND); | |
3920 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3921 #endif | |
3922 | |
3923 /* the following two "ffmpeg" settings are general audio settings */ | |
3924 prop = RNA_def_property(srna, "audio_mixrate", PROP_INT, PROP_NONE); | |
3925 RNA_def_property_int_sdna(prop, NULL, "audio_mixrate"); | |
3926 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3927 RNA_def_property_range(prop, 8000, 192000); | |
3928 RNA_def_property_ui_text(prop, "Samplerate", "Audio samplerate(samples/s
)"); | |
3929 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3930 | |
3931 prop = RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE); | |
3932 RNA_def_property_enum_sdna(prop, NULL, "audio_channels"); | |
3933 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
3934 RNA_def_property_enum_items(prop, audio_channel_items); | |
3935 RNA_def_property_ui_text(prop, "Audio Channels", "Audio channel count"); | |
3936 } | |
3937 | |
3938 #ifdef WITH_QUICKTIME | |
3939 static void rna_def_scene_quicktime_settings(BlenderRNA *brna) | |
3940 { | |
3941 StructRNA *srna; | |
3942 PropertyRNA *prop; | |
3943 | |
3944 static EnumPropertyItem quicktime_codec_type_items[] = { | |
3945 {0, "codec", 0, "codec", ""}, | |
3946 {0, NULL, 0, NULL, NULL} | |
3947 }; | |
3948 | |
3949 static EnumPropertyItem quicktime_audio_samplerate_items[] = { | |
3950 {22050, "22050", 0, "22kHz", ""}, | |
3951 {44100, "44100", 0, "44.1kHz", ""}, | |
3952 {48000, "48000", 0, "48kHz", ""}, | |
3953 {88200, "88200", 0, "88.2kHz", ""}, | |
3954 {96000, "96000", 0, "96kHz", ""}, | |
3955 {192000, "192000", 0, "192kHz", ""}, | |
3956 {0, NULL, 0, NULL, NULL} | |
3957 }; | |
3958 | |
3959 static EnumPropertyItem quicktime_audio_bitdepth_items[] = { | |
3960 {AUD_FORMAT_U8, "8BIT", 0, "8bit", ""}, | |
3961 {AUD_FORMAT_S16, "16BIT", 0, "16bit", ""}, | |
3962 {AUD_FORMAT_S24, "24BIT", 0, "24bit", ""}, | |
3963 {AUD_FORMAT_S32, "32BIT", 0, "32bit", ""}, | |
3964 {AUD_FORMAT_FLOAT32, "FLOAT32", 0, "float32", ""}, | |
3965 {AUD_FORMAT_FLOAT64, "FLOAT64", 0, "float64", ""}, | |
3966 {0, NULL, 0, NULL, NULL} | |
3967 }; | |
3968 | |
3969 static EnumPropertyItem quicktime_audio_bitrate_items[] = { | |
3970 {64000, "64000", 0, "64kbps", ""}, | |
3971 {112000, "112000", 0, "112kpbs", ""}, | |
3972 {128000, "128000", 0, "128kbps", ""}, | |
3973 {192000, "192000", 0, "192kbps", ""}, | |
3974 {256000, "256000", 0, "256kbps", ""}, | |
3975 {320000, "320000", 0, "320kbps", ""}, | |
3976 {0, NULL, 0, NULL, NULL} | |
3977 }; | |
3978 | |
3979 /* QuickTime */ | |
3980 srna = RNA_def_struct(brna, "QuickTimeSettings", NULL); | |
3981 RNA_def_struct_sdna(srna, "QuicktimeCodecSettings"); | |
3982 RNA_def_struct_ui_text(srna, "QuickTime Settings", "QuickTime related se
ttings for the scene"); | |
3983 | |
3984 prop = RNA_def_property(srna, "codec_type", PROP_ENUM, PROP_NONE); | |
3985 RNA_def_property_enum_bitflag_sdna(prop, NULL, "codecType"); | |
3986 RNA_def_property_enum_items(prop, quicktime_codec_type_items); | |
3987 RNA_def_property_enum_funcs(prop, "rna_RenderSettings_qtcodecsettings_co
decType_get", | |
3988 "rna_RenderSettings_qtcodecsettings_codecTyp
e_set", | |
3989 "rna_RenderSettings_qtcodecsettings_codecTyp
e_itemf"); | |
3990 RNA_def_property_ui_text(prop, "Codec", "QuickTime codec type"); | |
3991 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3992 | |
3993 prop = RNA_def_property(srna, "codec_spatial_quality", PROP_INT, PROP_PE
RCENTAGE); | |
3994 RNA_def_property_int_sdna(prop, NULL, "codecSpatialQuality"); | |
3995 RNA_def_property_range(prop, 0, 100); | |
3996 RNA_def_property_ui_text(prop, "Spatial quality", "Intra-frame spatial q
uality level"); | |
3997 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
3998 | |
3999 prop = RNA_def_property(srna, "audiocodec_type", PROP_ENUM, PROP_NONE); | |
4000 RNA_def_property_enum_bitflag_sdna(prop, NULL, "audiocodecType"); | |
4001 RNA_def_property_enum_items(prop, quicktime_codec_type_items); | |
4002 RNA_def_property_enum_funcs(prop, "rna_RenderSettings_qtcodecsettings_au
diocodecType_get", | |
4003 "rna_RenderSettings_qtcodecsettings_audiocod
ecType_set", | |
4004 "rna_RenderSettings_qtcodecsettings_audiocod
ecType_itemf"); | |
4005 RNA_def_property_ui_text(prop, "Audio Codec", "QuickTime audio codec typ
e"); | |
4006 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4007 | |
4008 prop = RNA_def_property(srna, "audio_samplerate", PROP_ENUM, PROP_NONE); | |
4009 RNA_def_property_enum_bitflag_sdna(prop, NULL, "audioSampleRate"); | |
4010 RNA_def_property_enum_items(prop, quicktime_audio_samplerate_items); | |
4011 RNA_def_property_ui_text(prop, "Smp Rate", "Sample Rate"); | |
4012 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4013 | |
4014 prop = RNA_def_property(srna, "audio_bitdepth", PROP_ENUM, PROP_NONE); | |
4015 RNA_def_property_enum_bitflag_sdna(prop, NULL, "audioBitDepth"); | |
4016 RNA_def_property_enum_items(prop, quicktime_audio_bitdepth_items); | |
4017 RNA_def_property_ui_text(prop, "Bit Depth", "Bit Depth"); | |
4018 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4019 | |
4020 prop = RNA_def_property(srna, "audio_resampling_hq", PROP_BOOLEAN, PROP_
NONE); | |
4021 RNA_def_property_boolean_negative_sdna(prop, NULL, "audioCodecFlags", QT
AUDIO_FLAG_RESAMPLE_NOHQ); | |
4022 RNA_def_property_ui_text(prop, "HQ", "Use High Quality resampling algori
thm"); | |
4023 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4024 | |
4025 prop = RNA_def_property(srna, "audio_codec_isvbr", PROP_BOOLEAN, PROP_NO
NE); | |
4026 RNA_def_property_boolean_negative_sdna(prop, NULL, "audioCodecFlags", QT
AUDIO_FLAG_CODEC_ISCBR); | |
4027 RNA_def_property_ui_text(prop, "VBR", "Use Variable Bit Rate compression
(improves quality at same bitrate)"); | |
4028 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4029 | |
4030 prop = RNA_def_property(srna, "audio_bitrate", PROP_ENUM, PROP_NONE); | |
4031 RNA_def_property_enum_bitflag_sdna(prop, NULL, "audioBitRate"); | |
4032 RNA_def_property_enum_items(prop, quicktime_audio_bitrate_items); | |
4033 RNA_def_property_ui_text(prop, "Bitrate", "Compressed audio bitrate"); | |
4034 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4035 } | |
4036 #endif | |
4037 | |
4038 static void rna_def_scene_render_data(BlenderRNA *brna) | |
4039 { | |
4040 StructRNA *srna; | |
4041 PropertyRNA *prop; | |
4042 ········ | |
4043 static EnumPropertyItem pixel_filter_items[] = { | |
4044 {R_FILTER_BOX, "BOX", 0, "Box", "Use a box filter for anti-alias
ing"}, | |
4045 {R_FILTER_TENT, "TENT", 0, "Tent", "Use a tent filter for anti-a
liasing"}, | |
4046 {R_FILTER_QUAD, "QUADRATIC", 0, "Quadratic", "Use a quadratic fi
lter for anti-aliasing"}, | |
4047 {R_FILTER_CUBIC, "CUBIC", 0, "Cubic", "Use a cubic filter for an
ti-aliasing"}, | |
4048 {R_FILTER_CATROM, "CATMULLROM", 0, "Catmull-Rom", "Use a Catmull
-Rom filter for anti-aliasing"}, | |
4049 {R_FILTER_GAUSS, "GAUSSIAN", 0, "Gaussian", "Use a Gaussian filt
er for anti-aliasing"}, | |
4050 {R_FILTER_MITCH, "MITCHELL", 0, "Mitchell-Netravali", "Use a Mit
chell-Netravali filter for anti-aliasing"}, | |
4051 {0, NULL, 0, NULL, NULL} | |
4052 }; | |
4053 ················ | |
4054 static EnumPropertyItem alpha_mode_items[] = { | |
4055 {R_ADDSKY, "SKY", 0, "Sky", "Transparent pixels are filled with
sky color"}, | |
4056 {R_ALPHAPREMUL, "TRANSPARENT", 0, "Transparent", "World backgrou
nd is transparent with premultiplied alpha"}, | |
4057 {0, NULL, 0, NULL, NULL} | |
4058 }; | |
4059 | |
4060 static EnumPropertyItem display_mode_items[] = { | |
4061 {R_OUTPUT_SCREEN, "SCREEN", 0, "Full Screen", "Images are render
ed in full Screen"}, | |
4062 {R_OUTPUT_AREA, "AREA", 0, "Image Editor", "Images are rendered
in Image Editor"}, | |
4063 {R_OUTPUT_WINDOW, "WINDOW", 0, "New Window", "Images are rendere
d in new Window"}, | |
4064 {R_OUTPUT_NONE, "NONE", 0, "Keep UI", "Images are rendered witho
ut forcing UI changes"}, | |
4065 {0, NULL, 0, NULL, NULL} | |
4066 }; | |
4067 ········ | |
4068 /* Bake */ | |
4069 static EnumPropertyItem bake_mode_items[] = { | |
4070 {RE_BAKE_ALL, "FULL", 0, "Full Render", "Bake everything"}, | |
4071 {RE_BAKE_AO, "AO", 0, "Ambient Occlusion", "Bake ambient occlusi
on"}, | |
4072 {RE_BAKE_SHADOW, "SHADOW", 0, "Shadow", "Bake shadows"}, | |
4073 {RE_BAKE_NORMALS, "NORMALS", 0, "Normals", "Bake normals"}, | |
4074 {RE_BAKE_TEXTURE, "TEXTURE", 0, "Textures", "Bake textures"}, | |
4075 {RE_BAKE_DISPLACEMENT, "DISPLACEMENT", 0, "Displacement", "Bake
displacement"}, | |
4076 {RE_BAKE_DERIVATIVE, "DERIVATIVE", 0, "Derivative", "Bake deriva
tive map"}, | |
4077 {RE_BAKE_VERTEX_COLORS, "VERTEX_COLORS", 0, "Vertex Colors", "Ba
ke vertex colors"}, | |
4078 {RE_BAKE_EMIT, "EMIT", 0, "Emission", "Bake Emit values (glow)"}
, | |
4079 {RE_BAKE_ALPHA, "ALPHA", 0, "Alpha", "Bake Alpha values (transpa
rency)"}, | |
4080 {RE_BAKE_MIRROR_INTENSITY, "MIRROR_INTENSITY", 0, "Mirror Intens
ity", "Bake Mirror values"}, | |
4081 {RE_BAKE_MIRROR_COLOR, "MIRROR_COLOR", 0, "Mirror Colors", "Bake
Mirror colors"}, | |
4082 {RE_BAKE_SPEC_INTENSITY, "SPEC_INTENSITY", 0, "Specular Intensit
y", "Bake Specular values"}, | |
4083 {RE_BAKE_SPEC_COLOR, "SPEC_COLOR", 0, "Specular Colors", "Bake S
pecular colors"}, | |
4084 {0, NULL, 0, NULL, NULL} | |
4085 }; | |
4086 | |
4087 static EnumPropertyItem bake_normal_space_items[] = { | |
4088 {R_BAKE_SPACE_CAMERA, "CAMERA", 0, "Camera", "Bake the normals i
n camera space"}, | |
4089 {R_BAKE_SPACE_WORLD, "WORLD", 0, "World", "Bake the normals in w
orld space"}, | |
4090 {R_BAKE_SPACE_OBJECT, "OBJECT", 0, "Object", "Bake the normals i
n object space"}, | |
4091 {R_BAKE_SPACE_TANGENT, "TANGENT", 0, "Tangent", "Bake the normal
s in tangent space"}, | |
4092 {0, NULL, 0, NULL, NULL} | |
4093 }; | |
4094 | |
4095 static EnumPropertyItem bake_qyad_split_items[] = { | |
4096 {0, "AUTO", 0, "Automatic", "Split quads to give the least disto
rtion while baking"}, | |
4097 {1, "FIXED", 0, "Fixed", "Split quads predictably (0,1,2) (0,2,3
)"}, | |
4098 {2, "FIXED_ALT", 0, "Fixed Alternate", "Split quads predictably
(1,2,3) (1,3,0)"}, | |
4099 {0, NULL, 0, NULL, NULL} | |
4100 }; | |
4101 ········ | |
4102 static EnumPropertyItem octree_resolution_items[] = { | |
4103 {64, "64", 0, "64", ""}, | |
4104 {128, "128", 0, "128", ""}, | |
4105 {256, "256", 0, "256", ""}, | |
4106 {512, "512", 0, "512", ""}, | |
4107 {0, NULL, 0, NULL, NULL} | |
4108 }; | |
4109 | |
4110 static EnumPropertyItem raytrace_structure_items[] = { | |
4111 {R_RAYSTRUCTURE_AUTO, "AUTO", 0, "Auto", "Automatically select a
cceleration structure"}, | |
4112 {R_RAYSTRUCTURE_OCTREE, "OCTREE", 0, "Octree", "Use old Octree s
tructure"}, | |
4113 {R_RAYSTRUCTURE_BLIBVH, "BLIBVH", 0, "BLI BVH", "Use BLI K-Dop B
VH.c"}, | |
4114 {R_RAYSTRUCTURE_VBVH, "VBVH", 0, "vBVH", "Use vBVH"}, | |
4115 {R_RAYSTRUCTURE_SIMD_SVBVH, "SIMD_SVBVH", 0, "SIMD SVBVH", "Use
SIMD SVBVH"}, | |
4116 {R_RAYSTRUCTURE_SIMD_QBVH, "SIMD_QBVH", 0, "SIMD QBVH", "Use SIM
D QBVH"}, | |
4117 {0, NULL, 0, NULL, NULL} | |
4118 }; | |
4119 | |
4120 static EnumPropertyItem fixed_oversample_items[] = { | |
4121 {5, "5", 0, "5", ""}, | |
4122 {8, "8", 0, "8", ""}, | |
4123 {11, "11", 0, "11", ""}, | |
4124 {16, "16", 0, "16", ""}, | |
4125 {0, NULL, 0, NULL, NULL} | |
4126 }; | |
4127 ················ | |
4128 static EnumPropertyItem field_order_items[] = { | |
4129 {0, "EVEN_FIRST", 0, "Upper First", "Upper field first"}, | |
4130 {R_ODDFIELD, "ODD_FIRST", 0, "Lower First", "Lower field first"}
, | |
4131 {0, NULL, 0, NULL, NULL} | |
4132 }; | |
4133 ················ | |
4134 static EnumPropertyItem threads_mode_items[] = { | |
4135 {0, "AUTO", 0, "Auto-detect", "Automatically determine the numbe
r of threads, based on CPUs"}, | |
4136 {R_FIXED_THREADS, "FIXED", 0, "Fixed", "Manually determine the n
umber of threads"}, | |
4137 {0, NULL, 0, NULL, NULL} | |
4138 }; | |
4139 | |
4140 static EnumPropertyItem engine_items[] = { | |
4141 {0, "BLENDER_RENDER", 0, "Blender Render", "Use the Blender inte
rnal rendering engine for rendering"}, | |
4142 {0, NULL, 0, NULL, NULL} | |
4143 }; | |
4144 | |
4145 static EnumPropertyItem freestyle_thickness_items[] = { | |
4146 {R_LINE_THICKNESS_ABSOLUTE, "ABSOLUTE", 0, "Absolute", "Specify
unit line thickness in pixels"}, | |
4147 {R_LINE_THICKNESS_RELATIVE, "RELATIVE", 0, "Relative", | |
4148 "Unit line thickness is scaled by th
e proportion of the present vertical image " | |
4149 "resolution to 480 pixels"}, | |
4150 {0, NULL, 0, NULL, NULL}}; | |
4151 | |
4152 rna_def_scene_ffmpeg_settings(brna); | |
4153 #ifdef WITH_QUICKTIME | |
4154 rna_def_scene_quicktime_settings(brna); | |
4155 #endif | |
4156 | |
4157 srna = RNA_def_struct(brna, "RenderSettings", NULL); | |
4158 RNA_def_struct_sdna(srna, "RenderData"); | |
4159 RNA_def_struct_nested(brna, srna, "Scene"); | |
4160 RNA_def_struct_path_func(srna, "rna_RenderSettings_path"); | |
4161 RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Sc
ene datablock"); | |
4162 | |
4163 /* Render Data */ | |
4164 prop = RNA_def_property(srna, "image_settings", PROP_POINTER, PROP_NONE)
; | |
4165 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
4166 RNA_def_property_pointer_sdna(prop, NULL, "im_format"); | |
4167 RNA_def_property_struct_type(prop, "ImageFormatSettings"); | |
4168 RNA_def_property_ui_text(prop, "Image Format", ""); | |
4169 | |
4170 prop = RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE); | |
4171 RNA_def_property_int_sdna(prop, NULL, "xsch"); | |
4172 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4173 RNA_def_property_range(prop, 4, 65536); | |
4174 RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pix
els in the rendered image"); | |
4175 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCa
mera_update"); | |
4176 ········ | |
4177 prop = RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE); | |
4178 RNA_def_property_int_sdna(prop, NULL, "ysch"); | |
4179 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4180 RNA_def_property_range(prop, 4, 65536); | |
4181 RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixel
s in the rendered image"); | |
4182 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCa
mera_update"); | |
4183 ········ | |
4184 prop = RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PE
RCENTAGE); | |
4185 RNA_def_property_int_sdna(prop, NULL, "size"); | |
4186 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4187 RNA_def_property_range(prop, 1, SHRT_MAX); | |
4188 RNA_def_property_ui_range(prop, 1, 100, 10, 1); | |
4189 RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for ren
der resolution"); | |
4190 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4191 ········ | |
4192 prop = RNA_def_property(srna, "tile_x", PROP_INT, PROP_NONE); | |
4193 RNA_def_property_int_sdna(prop, NULL, "tilex"); | |
4194 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4195 RNA_def_property_range(prop, 8, 65536); | |
4196 RNA_def_property_ui_text(prop, "Tile X", "Horizontal tile size to use wh
ile rendering"); | |
4197 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4198 ········ | |
4199 prop = RNA_def_property(srna, "tile_y", PROP_INT, PROP_NONE); | |
4200 RNA_def_property_int_sdna(prop, NULL, "tiley"); | |
4201 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4202 RNA_def_property_range(prop, 8, 65536); | |
4203 RNA_def_property_ui_text(prop, "Tile Y", "Vertical tile size to use whil
e rendering"); | |
4204 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4205 ········ | |
4206 prop = RNA_def_property(srna, "pixel_aspect_x", PROP_FLOAT, PROP_NONE); | |
4207 RNA_def_property_float_sdna(prop, NULL, "xasp"); | |
4208 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4209 RNA_def_property_range(prop, 1.0f, 200.0f); | |
4210 RNA_def_property_ui_text(prop, "Pixel Aspect X", | |
4211 "Horizontal aspect ratio - for anamorphic or no
n-square pixel output"); | |
4212 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCa
mera_update"); | |
4213 ········ | |
4214 prop = RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE); | |
4215 RNA_def_property_float_sdna(prop, NULL, "yasp"); | |
4216 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4217 RNA_def_property_range(prop, 1.0f, 200.0f); | |
4218 RNA_def_property_ui_text(prop, "Pixel Aspect Y", | |
4219 "Vertical aspect ratio - for anamorphic or non-
square pixel output"); | |
4220 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_SceneCa
mera_update"); | |
4221 | |
4222 #ifdef WITH_QUICKTIME | |
4223 prop = RNA_def_property(srna, "quicktime", PROP_POINTER, PROP_NONE); | |
4224 RNA_def_property_struct_type(prop, "QuickTimeSettings"); | |
4225 RNA_def_property_pointer_sdna(prop, NULL, "qtcodecsettings"); | |
4226 RNA_def_property_flag(prop, PROP_NEVER_UNLINK); | |
4227 RNA_def_property_ui_text(prop, "QuickTime Settings", "QuickTime related
settings for the scene"); | |
4228 #endif | |
4229 | |
4230 prop = RNA_def_property(srna, "ffmpeg", PROP_POINTER, PROP_NONE); | |
4231 RNA_def_property_struct_type(prop, "FFmpegSettings"); | |
4232 RNA_def_property_pointer_sdna(prop, NULL, "ffcodecdata"); | |
4233 RNA_def_property_flag(prop, PROP_NEVER_UNLINK); | |
4234 RNA_def_property_ui_text(prop, "FFmpeg Settings", "FFmpeg related settin
gs for the scene"); | |
4235 | |
4236 prop = RNA_def_property(srna, "fps", PROP_INT, PROP_NONE); | |
4237 RNA_def_property_int_sdna(prop, NULL, "frs_sec"); | |
4238 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4239 RNA_def_property_range(prop, 1, 120); | |
4240 RNA_def_property_ui_text(prop, "FPS", "Framerate, expressed in frames pe
r second"); | |
4241 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_f
ps_update"); | |
4242 ········ | |
4243 prop = RNA_def_property(srna, "fps_base", PROP_FLOAT, PROP_NONE); | |
4244 RNA_def_property_float_sdna(prop, NULL, "frs_sec_base"); | |
4245 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4246 RNA_def_property_range(prop, 0.1f, 120.0f); | |
4247 RNA_def_property_ui_text(prop, "FPS Base", "Framerate base"); | |
4248 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_f
ps_update"); | |
4249 ········ | |
4250 /* frame mapping */ | |
4251 prop = RNA_def_property(srna, "frame_map_old", PROP_INT, PROP_NONE); | |
4252 RNA_def_property_int_sdna(prop, NULL, "framapto"); | |
4253 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4254 RNA_def_property_range(prop, 1, 900); | |
4255 RNA_def_property_ui_text(prop, "Frame Map Old", "Old mapping value in fr
ames"); | |
4256 RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_framelen_u
pdate"); | |
4257 ········ | |
4258 prop = RNA_def_property(srna, "frame_map_new", PROP_INT, PROP_NONE); | |
4259 RNA_def_property_int_sdna(prop, NULL, "images"); | |
4260 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4261 RNA_def_property_range(prop, 1, 900); | |
4262 RNA_def_property_ui_text(prop, "Frame Map New", "How many frames the Map
Old will last"); | |
4263 RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_framelen_u
pdate"); | |
4264 | |
4265 ········ | |
4266 prop = RNA_def_property(srna, "dither_intensity", PROP_FLOAT, PROP_NONE)
; | |
4267 RNA_def_property_float_sdna(prop, NULL, "dither_intensity"); | |
4268 RNA_def_property_range(prop, 0.0f, 2.0f); | |
4269 RNA_def_property_ui_text(prop, "Dither Intensity", | |
4270 "Amount of dithering noise added to the rendere
d image to break up banding"); | |
4271 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4272 ········ | |
4273 prop = RNA_def_property(srna, "pixel_filter_type", PROP_ENUM, PROP_NONE)
; | |
4274 RNA_def_property_enum_sdna(prop, NULL, "filtertype"); | |
4275 RNA_def_property_enum_items(prop, pixel_filter_items); | |
4276 RNA_def_property_ui_text(prop, "Pixel Filter", "Reconstruction filter us
ed for combining anti-aliasing samples"); | |
4277 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4278 ········ | |
4279 prop = RNA_def_property(srna, "filter_size", PROP_FLOAT, PROP_NONE); | |
4280 RNA_def_property_float_sdna(prop, NULL, "gauss"); | |
4281 RNA_def_property_range(prop, 0.5f, 1.5f); | |
4282 RNA_def_property_ui_text(prop, "Filter Size", "Pixel width over which th
e reconstruction filter combines samples"); | |
4283 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4284 ········ | |
4285 prop = RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE); | |
4286 RNA_def_property_enum_sdna(prop, NULL, "alphamode"); | |
4287 RNA_def_property_enum_items(prop, alpha_mode_items); | |
4288 RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha in
formation in the RGBA pixels"); | |
4289 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4290 ········ | |
4291 prop = RNA_def_property(srna, "octree_resolution", PROP_ENUM, PROP_NONE)
; | |
4292 RNA_def_property_enum_sdna(prop, NULL, "ocres"); | |
4293 RNA_def_property_enum_items(prop, octree_resolution_items); | |
4294 RNA_def_property_ui_text(prop, "Octree Resolution", | |
4295 "Resolution of raytrace accelerator, use higher
resolutions for larger scenes"); | |
4296 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4297 | |
4298 prop = RNA_def_property(srna, "raytrace_method", PROP_ENUM, PROP_NONE); | |
4299 RNA_def_property_enum_sdna(prop, NULL, "raytrace_structure"); | |
4300 RNA_def_property_enum_items(prop, raytrace_structure_items); | |
4301 RNA_def_property_ui_text(prop, "Raytrace Acceleration Structure", "Type
of raytrace accelerator structure"); | |
4302 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4303 | |
4304 prop = RNA_def_property(srna, "use_instances", PROP_BOOLEAN, PROP_NONE); | |
4305 RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE
_USE_INSTANCES); | |
4306 RNA_def_property_ui_text(prop, "Use Instances", | |
4307 "Instance support leads to effective memory red
uction when using duplicates"); | |
4308 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4309 | |
4310 prop = RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NON
E); | |
4311 RNA_def_property_boolean_sdna(prop, NULL, "raytrace_options", R_RAYTRACE
_USE_LOCAL_COORDS); | |
4312 RNA_def_property_ui_text(prop, "Use Local Coords", | |
4313 "Vertex coordinates are stored locally on each
primitive " | |
4314 "(increases memory usage, but may have impact o
n speed)"); | |
4315 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4316 | |
4317 prop = RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NON
E); | |
4318 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_OSA); | |
4319 RNA_def_property_ui_text(prop, "Anti-Aliasing", | |
4320 "Render and combine multiple samples per pixel
to prevent jagged edges"); | |
4321 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4322 ········ | |
4323 prop = RNA_def_property(srna, "antialiasing_samples", PROP_ENUM, PROP_NO
NE); | |
4324 RNA_def_property_enum_sdna(prop, NULL, "osa"); | |
4325 RNA_def_property_enum_items(prop, fixed_oversample_items); | |
4326 RNA_def_property_ui_text(prop, "Anti-Aliasing Samples", "Amount of anti-
aliasing samples per pixel"); | |
4327 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4328 ········ | |
4329 prop = RNA_def_property(srna, "use_fields", PROP_BOOLEAN, PROP_NONE); | |
4330 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDS); | |
4331 RNA_def_property_ui_text(prop, "Fields", "Render image to two fields per
frame, for interlaced TV output"); | |
4332 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4333 ········ | |
4334 prop = RNA_def_property(srna, "field_order", PROP_ENUM, PROP_NONE); | |
4335 RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode"); | |
4336 RNA_def_property_enum_items(prop, field_order_items); | |
4337 RNA_def_property_ui_text(prop, "Field Order", | |
4338 "Order of video fields (select which lines get
rendered first, " | |
4339 "to create smooth motion for TV output)"); | |
4340 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4341 ········ | |
4342 prop = RNA_def_property(srna, "use_fields_still", PROP_BOOLEAN, PROP_NON
E); | |
4343 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_FIELDSTILL); | |
4344 RNA_def_property_ui_text(prop, "Fields Still", "Disable the time differe
nce between fields"); | |
4345 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4346 ········ | |
4347 /* rendering features */ | |
4348 prop = RNA_def_property(srna, "use_shadows", PROP_BOOLEAN, PROP_NONE); | |
4349 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW); | |
4350 RNA_def_property_ui_text(prop, "Shadows", "Calculate shadows while rende
ring"); | |
4351 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4352 ········ | |
4353 prop = RNA_def_property(srna, "use_envmaps", PROP_BOOLEAN, PROP_NONE); | |
4354 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_ENVMAP); | |
4355 RNA_def_property_ui_text(prop, "Environment Maps", "Calculate environmen
t maps while rendering"); | |
4356 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4357 ········ | |
4358 prop = RNA_def_property(srna, "use_sss", PROP_BOOLEAN, PROP_NONE); | |
4359 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SSS); | |
4360 RNA_def_property_ui_text(prop, "Subsurface Scattering", "Calculate sub-s
urface scattering in materials rendering"); | |
4361 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4362 ········ | |
4363 prop = RNA_def_property(srna, "use_raytrace", PROP_BOOLEAN, PROP_NONE); | |
4364 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_RAYTRACE); | |
4365 RNA_def_property_ui_text(prop, "Raytracing", | |
4366 "Pre-calculate the raytrace accelerator and ren
der raytracing effects"); | |
4367 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4368 ········ | |
4369 prop = RNA_def_property(srna, "use_textures", PROP_BOOLEAN, PROP_NONE); | |
4370 RNA_def_property_boolean_negative_sdna(prop, NULL, "scemode", R_NO_TEX); | |
4371 RNA_def_property_ui_text(prop, "Textures", "Use textures to affect mater
ial properties"); | |
4372 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4373 ········ | |
4374 prop = RNA_def_property(srna, "use_edge_enhance", PROP_BOOLEAN, PROP_NON
E); | |
4375 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE); | |
4376 RNA_def_property_ui_text(prop, "Edge", "Create a toon outline around the
edges of geometry"); | |
4377 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4378 ········ | |
4379 prop = RNA_def_property(srna, "edge_threshold", PROP_INT, PROP_NONE); | |
4380 RNA_def_property_int_sdna(prop, NULL, "edgeint"); | |
4381 RNA_def_property_range(prop, 0, 255); | |
4382 RNA_def_property_ui_text(prop, "Edge Threshold", "Threshold for drawing
outlines on geometry edges"); | |
4383 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4384 ········ | |
4385 prop = RNA_def_property(srna, "edge_color", PROP_FLOAT, PROP_COLOR); | |
4386 RNA_def_property_float_sdna(prop, NULL, "edgeR"); | |
4387 RNA_def_property_array(prop, 3); | |
4388 RNA_def_property_ui_text(prop, "Edge Color", "Edge color"); | |
4389 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4390 ········ | |
4391 prop = RNA_def_property(srna, "use_freestyle", PROP_BOOLEAN, PROP_NONE); | |
4392 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_EDGE_FRS); | |
4393 RNA_def_property_ui_text(prop, "Edge", "Draw stylized strokes using Free
style"); | |
4394 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4395 | |
4396 /* threads */ | |
4397 prop = RNA_def_property(srna, "threads", PROP_INT, PROP_NONE); | |
4398 RNA_def_property_int_sdna(prop, NULL, "threads"); | |
4399 RNA_def_property_range(prop, 1, BLENDER_MAX_THREADS); | |
4400 RNA_def_property_int_funcs(prop, "rna_RenderSettings_threads_get", NULL,
NULL); | |
4401 RNA_def_property_ui_text(prop, "Threads", | |
4402 "Number of CPU threads to use simultaneously wh
ile rendering " | |
4403 "(for multi-core/CPU systems)"); | |
4404 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4405 ········ | |
4406 prop = RNA_def_property(srna, "threads_mode", PROP_ENUM, PROP_NONE); | |
4407 RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode"); | |
4408 RNA_def_property_enum_items(prop, threads_mode_items); | |
4409 RNA_def_property_enum_funcs(prop, "rna_RenderSettings_threads_mode_get",
NULL, NULL); | |
4410 RNA_def_property_ui_text(prop, "Threads Mode", "Determine the amount of
render threads used"); | |
4411 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4412 ········ | |
4413 /* motion blur */ | |
4414 prop = RNA_def_property(srna, "use_motion_blur", PROP_BOOLEAN, PROP_NONE
); | |
4415 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR); | |
4416 RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scen
e motion blur"); | |
4417 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4418 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_g
lsl_update"); | |
4419 ········ | |
4420 prop = RNA_def_property(srna, "motion_blur_samples", PROP_INT, PROP_NONE
); | |
4421 RNA_def_property_int_sdna(prop, NULL, "mblur_samples"); | |
4422 RNA_def_property_range(prop, 1, 32); | |
4423 RNA_def_property_ui_text(prop, "Motion Samples", "Number of scene sample
s to take with motion blur"); | |
4424 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4425 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_g
lsl_update"); | |
4426 ········ | |
4427 prop = RNA_def_property(srna, "motion_blur_shutter", PROP_FLOAT, PROP_UN
SIGNED); | |
4428 RNA_def_property_float_sdna(prop, NULL, "blurfac"); | |
4429 RNA_def_property_ui_range(prop, 0.01f, 2.0f, 1, 2); | |
4430 RNA_def_property_ui_text(prop, "Shutter", "Time taken in frames between
shutter open and close"); | |
4431 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4432 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_g
lsl_update"); | |
4433 ········ | |
4434 /* border */ | |
4435 prop = RNA_def_property(srna, "use_border", PROP_BOOLEAN, PROP_NONE); | |
4436 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_BORDER); | |
4437 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4438 RNA_def_property_ui_text(prop, "Border", | |
4439 "Render a user-defined border region, within th
e frame size " | |
4440 "(note that this disables save_buffers and full
_sample)"); | |
4441 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4442 | |
4443 ········ | |
4444 ········ | |
4445 prop = RNA_def_property(srna, "border_min_x", PROP_FLOAT, PROP_NONE); | |
4446 RNA_def_property_float_sdna(prop, NULL, "border.xmin"); | |
4447 RNA_def_property_range(prop, 0.0f, 1.0f); | |
4448 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4449 RNA_def_property_ui_text(prop, "Border Minimum X", "Minimum X value to f
or the render border"); | |
4450 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4451 | |
4452 prop = RNA_def_property(srna, "border_min_y", PROP_FLOAT, PROP_NONE); | |
4453 RNA_def_property_float_sdna(prop, NULL, "border.ymin"); | |
4454 RNA_def_property_range(prop, 0.0f, 1.0f); | |
4455 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4456 RNA_def_property_ui_text(prop, "Border Minimum Y", "Minimum Y value for
the render border"); | |
4457 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4458 | |
4459 prop = RNA_def_property(srna, "border_max_x", PROP_FLOAT, PROP_NONE); | |
4460 RNA_def_property_float_sdna(prop, NULL, "border.xmax"); | |
4461 RNA_def_property_range(prop, 0.0f, 1.0f); | |
4462 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4463 RNA_def_property_ui_text(prop, "Border Maximum X", "Maximum X value for
the render border"); | |
4464 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4465 | |
4466 prop = RNA_def_property(srna, "border_max_y", PROP_FLOAT, PROP_NONE); | |
4467 RNA_def_property_float_sdna(prop, NULL, "border.ymax"); | |
4468 RNA_def_property_range(prop, 0.0f, 1.0f); | |
4469 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4470 RNA_def_property_ui_text(prop, "Border Maximum Y", "Maximum Y value for
the render border"); | |
4471 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4472 ········ | |
4473 prop = RNA_def_property(srna, "use_crop_to_border", PROP_BOOLEAN, PROP_N
ONE); | |
4474 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_CROP); | |
4475 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4476 RNA_def_property_ui_text(prop, "Crop to Border", "Crop the rendered fram
e to the defined border size"); | |
4477 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4478 ········ | |
4479 prop = RNA_def_property(srna, "use_placeholder", PROP_BOOLEAN, PROP_NONE
); | |
4480 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_TOUCH); | |
4481 RNA_def_property_ui_text(prop, "Placeholders", | |
4482 "Create empty placeholder files while rendering
frames (similar to Unix 'touch')"); | |
4483 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4484 ········ | |
4485 prop = RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE); | |
4486 RNA_def_property_boolean_negative_sdna(prop, NULL, "mode", R_NO_OVERWRIT
E); | |
4487 RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing files wh
ile rendering"); | |
4488 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4489 ········ | |
4490 prop = RNA_def_property(srna, "use_compositing", PROP_BOOLEAN, PROP_NONE
); | |
4491 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOCOMP); | |
4492 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4493 RNA_def_property_ui_text(prop, "Compositing", | |
4494 "Process the render result through the composit
ing pipeline, " | |
4495 "if compositing nodes are enabled"); | |
4496 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4497 ········ | |
4498 prop = RNA_def_property(srna, "use_sequencer", PROP_BOOLEAN, PROP_NONE); | |
4499 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_DOSEQ); | |
4500 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4501 RNA_def_property_ui_text(prop, "Sequencer", | |
4502 "Process the render (and composited) result thr
ough the video sequence " | |
4503 "editor pipeline, if sequencer strips exist"); | |
4504 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4505 ········ | |
4506 prop = RNA_def_property(srna, "use_file_extension", PROP_BOOLEAN, PROP_N
ONE); | |
4507 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXTENSION); | |
4508 RNA_def_property_ui_text(prop, "File Extensions", | |
4509 "Add the file format extensions to the rendered
file name (eg: filename + .jpg)"); | |
4510 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4511 | |
4512 #if 0 /* moved */ | |
4513 prop = RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE); | |
4514 RNA_def_property_enum_sdna(prop, NULL, "imtype"); | |
4515 RNA_def_property_enum_items(prop, image_type_items); | |
4516 RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_file_format_
set", NULL); | |
4517 RNA_def_property_ui_text(prop, "File Format", "File format to save the r
endered images as"); | |
4518 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4519 #endif | |
4520 | |
4521 prop = RNA_def_property(srna, "file_extension", PROP_STRING, PROP_NONE); | |
4522 RNA_def_property_string_funcs(prop, "rna_SceneRender_file_ext_get", "rna
_SceneRender_file_ext_length", NULL); | |
4523 RNA_def_property_ui_text(prop, "Extension", "The file extension used for
saving renders"); | |
4524 RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
4525 | |
4526 prop = RNA_def_property(srna, "is_movie_format", PROP_BOOLEAN, PROP_NONE
); | |
4527 RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_is_movie_fomat_
get", NULL); | |
4528 RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
4529 RNA_def_property_ui_text(prop, "Movie Format", "When true the format is
a movie"); | |
4530 | |
4531 prop = RNA_def_property(srna, "use_free_image_textures", PROP_BOOLEAN, P
ROP_NONE); | |
4532 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE); | |
4533 RNA_def_property_ui_text(prop, "Free Image Textures", | |
4534 "Free all image textures from memory after rend
er, to save memory before compositing"); | |
4535 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4536 | |
4537 prop = RNA_def_property(srna, "use_free_unused_nodes", PROP_BOOLEAN, PRO
P_NONE); | |
4538 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_COMP_FREE); | |
4539 RNA_def_property_ui_text(prop, "Free Unused Nodes", | |
4540 "Free Nodes that are not used while compositing
, to save memory"); | |
4541 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4542 | |
4543 prop = RNA_def_property(srna, "use_save_buffers", PROP_BOOLEAN, PROP_NON
E); | |
4544 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE); | |
4545 RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_save_buffers_ge
t", NULL); | |
4546 RNA_def_property_ui_text(prop, "Save Buffers", | |
4547 "Save tiles for all RenderLayers and SceneNodes
to files in the temp directory " | |
4548 "(saves memory, required for Full Sample)"); | |
4549 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4550 ········ | |
4551 prop = RNA_def_property(srna, "use_full_sample", PROP_BOOLEAN, PROP_NONE
); | |
4552 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FULL_SAMPLE); | |
4553 RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_full_sample_get
", NULL); | |
4554 RNA_def_property_ui_text(prop, "Full Sample", | |
4555 "Save for every anti-aliasing sample the entire
RenderLayer results " | |
4556 "(this solves anti-aliasing issues with composi
ting)"); | |
4557 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4558 | |
4559 prop = RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE); | |
4560 RNA_def_property_enum_bitflag_sdna(prop, NULL, "displaymode"); | |
4561 RNA_def_property_enum_items(prop, display_mode_items); | |
4562 RNA_def_property_ui_text(prop, "Display", "Select where rendered images
will be displayed"); | |
4563 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4564 ········ | |
4565 prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH); | |
4566 RNA_def_property_string_sdna(prop, NULL, "pic"); | |
4567 RNA_def_property_ui_text(prop, "Output Path", | |
4568 "Directory/name to save animations, # character
s defines the position " | |
4569 "and length of frame numbers"); | |
4570 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4571 | |
4572 /* Bake */ | |
4573 ········ | |
4574 prop = RNA_def_property(srna, "bake_type", PROP_ENUM, PROP_NONE); | |
4575 RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_mode"); | |
4576 RNA_def_property_enum_items(prop, bake_mode_items); | |
4577 RNA_def_property_ui_text(prop, "Bake Mode", "Choose shading information
to bake into the image"); | |
4578 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4579 | |
4580 prop = RNA_def_property(srna, "bake_normal_space", PROP_ENUM, PROP_NONE)
; | |
4581 RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_normal_space"); | |
4582 RNA_def_property_enum_items(prop, bake_normal_space_items); | |
4583 RNA_def_property_ui_text(prop, "Normal Space", "Choose normal space for
baking"); | |
4584 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4585 | |
4586 prop = RNA_def_property(srna, "bake_quad_split", PROP_ENUM, PROP_NONE); | |
4587 RNA_def_property_enum_items(prop, bake_qyad_split_items); | |
4588 RNA_def_property_ui_text(prop, "Quad Split", "Choose the method used to
split a quad into 2 triangles for baking"); | |
4589 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4590 | |
4591 prop = RNA_def_property(srna, "bake_aa_mode", PROP_ENUM, PROP_NONE); | |
4592 RNA_def_property_enum_bitflag_sdna(prop, NULL, "bake_osa"); | |
4593 RNA_def_property_enum_items(prop, fixed_oversample_items); | |
4594 RNA_def_property_ui_text(prop, "Anti-Aliasing Level", ""); | |
4595 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4596 | |
4597 prop = RNA_def_property(srna, "use_bake_selected_to_active", PROP_BOOLEA
N, PROP_NONE); | |
4598 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_TO_ACTIVE)
; | |
4599 RNA_def_property_ui_text(prop, "Selected to Active", | |
4600 "Bake shading on the surface of selected object
s to the active object"); | |
4601 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4602 | |
4603 prop = RNA_def_property(srna, "use_bake_normalize", PROP_BOOLEAN, PROP_N
ONE); | |
4604 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_NORMALIZE)
; | |
4605 RNA_def_property_ui_text(prop, "Normalized", | |
4606 "With displacement normalize to the distance, w
ith ambient occlusion " | |
4607 "normalize without using material settings"); | |
4608 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4609 | |
4610 prop = RNA_def_property(srna, "use_bake_clear", PROP_BOOLEAN, PROP_NONE)
; | |
4611 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_CLEAR); | |
4612 RNA_def_property_ui_text(prop, "Clear", "Clear Images before baking"); | |
4613 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4614 | |
4615 prop = RNA_def_property(srna, "use_bake_antialiasing", PROP_BOOLEAN, PRO
P_NONE); | |
4616 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_OSA); | |
4617 RNA_def_property_ui_text(prop, "Anti-Aliasing", "Enables Anti-aliasing")
; | |
4618 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4619 | |
4620 prop = RNA_def_property(srna, "bake_margin", PROP_INT, PROP_NONE); | |
4621 RNA_def_property_int_sdna(prop, NULL, "bake_filter"); | |
4622 RNA_def_property_range(prop, 0, 64); | |
4623 RNA_def_property_ui_text(prop, "Margin", | |
4624 "Amount of pixels to extend the baked result wi
th, as post process filter"); | |
4625 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4626 | |
4627 prop = RNA_def_property(srna, "bake_distance", PROP_FLOAT, PROP_NONE); | |
4628 RNA_def_property_float_sdna(prop, NULL, "bake_maxdist"); | |
4629 RNA_def_property_range(prop, 0.0, 1000.0); | |
4630 RNA_def_property_ui_text(prop, "Distance", | |
4631 "Maximum distance from active object to other o
bject (in blender units)"); | |
4632 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4633 | |
4634 prop = RNA_def_property(srna, "bake_bias", PROP_FLOAT, PROP_NONE); | |
4635 RNA_def_property_float_sdna(prop, NULL, "bake_biasdist"); | |
4636 RNA_def_property_range(prop, 0.0, 1000.0); | |
4637 RNA_def_property_ui_text(prop, "Bias", "Bias towards faces further away
from the object (in blender units)"); | |
4638 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4639 | |
4640 prop = RNA_def_property(srna, "use_bake_multires", PROP_BOOLEAN, PROP_NO
NE); | |
4641 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_MULTIRES); | |
4642 RNA_def_property_ui_text(prop, "Bake from Multires", "Bake directly from
multires object"); | |
4643 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4644 | |
4645 prop = RNA_def_property(srna, "use_bake_lores_mesh", PROP_BOOLEAN, PROP_
NONE); | |
4646 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_LORES_MESH
); | |
4647 RNA_def_property_ui_text(prop, "Low Resolution Mesh", | |
4648 "Calculate heights against unsubdivided low res
olution mesh"); | |
4649 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4650 | |
4651 prop = RNA_def_property(srna, "bake_samples", PROP_INT, PROP_NONE); | |
4652 RNA_def_property_int_sdna(prop, NULL, "bake_samples"); | |
4653 RNA_def_property_range(prop, 64, 1024); | |
4654 RNA_def_property_int_default(prop, 256); | |
4655 RNA_def_property_ui_text(prop, "Samples", "Number of samples used for am
bient occlusion baking from multires"); | |
4656 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4657 | |
4658 prop = RNA_def_property(srna, "use_bake_to_vertex_color", PROP_BOOLEAN,
PROP_NONE); | |
4659 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_VCOL); | |
4660 RNA_def_property_ui_text(prop, "Bake to Vertex Color", | |
4661 "Bake to vertex colors instead of to a UV-mappe
d image"); | |
4662 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4663 | |
4664 prop = RNA_def_property(srna, "use_bake_user_scale", PROP_BOOLEAN, PROP_
NONE); | |
4665 RNA_def_property_boolean_sdna(prop, NULL, "bake_flag", R_BAKE_USERSCALE)
; | |
4666 RNA_def_property_ui_text(prop, "User scale", "Use a user scale for the d
erivative map"); | |
4667 | |
4668 prop = RNA_def_property(srna, "bake_user_scale", PROP_FLOAT, PROP_NONE); | |
4669 RNA_def_property_float_sdna(prop, NULL, "bake_user_scale"); | |
4670 RNA_def_property_range(prop, 0.0, 1000.0); | |
4671 RNA_def_property_ui_text(prop, "Scale", | |
4672 "Instead of automatically normalizing to 0..1,
" | |
4673 "apply a user scale to the derivative map"); | |
4674 | |
4675 /* stamp */ | |
4676 ········ | |
4677 prop = RNA_def_property(srna, "use_stamp_time", PROP_BOOLEAN, PROP_NONE)
; | |
4678 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_TIME); | |
4679 RNA_def_property_ui_text(prop, "Stamp Time", | |
4680 "Include the rendered frame timecode as HH:MM:S
S.FF in image metadata"); | |
4681 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4682 ········ | |
4683 prop = RNA_def_property(srna, "use_stamp_date", PROP_BOOLEAN, PROP_NONE)
; | |
4684 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DATE); | |
4685 RNA_def_property_ui_text(prop, "Stamp Date", "Include the current date i
n image metadata"); | |
4686 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4687 ········ | |
4688 prop = RNA_def_property(srna, "use_stamp_frame", PROP_BOOLEAN, PROP_NONE
); | |
4689 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FRAME); | |
4690 RNA_def_property_ui_text(prop, "Stamp Frame", "Include the frame number
in image metadata"); | |
4691 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4692 ········ | |
4693 prop = RNA_def_property(srna, "use_stamp_camera", PROP_BOOLEAN, PROP_NON
E); | |
4694 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERA); | |
4695 RNA_def_property_ui_text(prop, "Stamp Camera", "Include the name of the
active camera in image metadata"); | |
4696 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4697 | |
4698 prop = RNA_def_property(srna, "use_stamp_lens", PROP_BOOLEAN, PROP_NONE)
; | |
4699 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_CAMERALENS); | |
4700 RNA_def_property_ui_text(prop, "Stamp Lens", "Include the active camera'
s lens in image metadata"); | |
4701 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4702 ········ | |
4703 prop = RNA_def_property(srna, "use_stamp_scene", PROP_BOOLEAN, PROP_NONE
); | |
4704 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SCENE); | |
4705 RNA_def_property_ui_text(prop, "Stamp Scene", "Include the name of the a
ctive scene in image metadata"); | |
4706 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4707 ········ | |
4708 prop = RNA_def_property(srna, "use_stamp_note", PROP_BOOLEAN, PROP_NONE)
; | |
4709 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_NOTE); | |
4710 RNA_def_property_ui_text(prop, "Stamp Note", "Include a custom note in i
mage metadata"); | |
4711 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4712 ········ | |
4713 prop = RNA_def_property(srna, "use_stamp_marker", PROP_BOOLEAN, PROP_NON
E); | |
4714 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_MARKER); | |
4715 RNA_def_property_ui_text(prop, "Stamp Marker", "Include the name of the
last marker in image metadata"); | |
4716 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4717 ········ | |
4718 prop = RNA_def_property(srna, "use_stamp_filename", PROP_BOOLEAN, PROP_N
ONE); | |
4719 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_FILENAME); | |
4720 RNA_def_property_ui_text(prop, "Stamp Filename", "Include the .blend fil
ename in image metadata"); | |
4721 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4722 ········ | |
4723 prop = RNA_def_property(srna, "use_stamp_sequencer_strip", PROP_BOOLEAN,
PROP_NONE); | |
4724 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_SEQSTRIP); | |
4725 RNA_def_property_ui_text(prop, "Stamp Sequence Strip", | |
4726 "Include the name of the foreground sequence st
rip in image metadata"); | |
4727 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4728 | |
4729 prop = RNA_def_property(srna, "use_stamp_render_time", PROP_BOOLEAN, PRO
P_NONE); | |
4730 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_RENDERTIME); | |
4731 RNA_def_property_ui_text(prop, "Stamp Render Time", "Include the render
time in image metadata"); | |
4732 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4733 ········ | |
4734 prop = RNA_def_property(srna, "stamp_note_text", PROP_STRING, PROP_NONE)
; | |
4735 RNA_def_property_string_sdna(prop, NULL, "stamp_udata"); | |
4736 RNA_def_property_ui_text(prop, "Stamp Note Text", "Custom text to appear
in the stamp note"); | |
4737 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4738 | |
4739 prop = RNA_def_property(srna, "use_stamp", PROP_BOOLEAN, PROP_NONE); | |
4740 RNA_def_property_boolean_sdna(prop, NULL, "stamp", R_STAMP_DRAW); | |
4741 RNA_def_property_ui_text(prop, "Render Stamp", "Render the stamp info te
xt in the rendered image"); | |
4742 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4743 ········ | |
4744 prop = RNA_def_property(srna, "stamp_font_size", PROP_INT, PROP_NONE); | |
4745 RNA_def_property_int_sdna(prop, NULL, "stamp_font_id"); | |
4746 RNA_def_property_range(prop, 8, 64); | |
4747 RNA_def_property_ui_text(prop, "Font Size", "Size of the font used when
rendering stamp text"); | |
4748 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4749 | |
4750 prop = RNA_def_property(srna, "stamp_foreground", PROP_FLOAT, PROP_COLOR
); | |
4751 RNA_def_property_float_sdna(prop, NULL, "fg_stamp"); | |
4752 RNA_def_property_array(prop, 4); | |
4753 RNA_def_property_range(prop, 0.0, 1.0); | |
4754 RNA_def_property_ui_text(prop, "Text Color", "Color to use for stamp tex
t"); | |
4755 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4756 ········ | |
4757 prop = RNA_def_property(srna, "stamp_background", PROP_FLOAT, PROP_COLOR
); | |
4758 RNA_def_property_float_sdna(prop, NULL, "bg_stamp"); | |
4759 RNA_def_property_array(prop, 4); | |
4760 RNA_def_property_range(prop, 0.0, 1.0); | |
4761 RNA_def_property_ui_text(prop, "Background", "Color to use behind stamp
text"); | |
4762 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4763 | |
4764 /* sequencer draw options */ | |
4765 | |
4766 prop = RNA_def_property(srna, "use_sequencer_gl_preview", PROP_BOOLEAN,
PROP_NONE); | |
4767 RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_GL_PREV); | |
4768 RNA_def_property_ui_text(prop, "Sequencer OpenGL", ""); | |
4769 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SceneSequenc
er_update"); | |
4770 | |
4771 #if 0 /* see R_SEQ_GL_REND comment */ | |
4772 prop = RNA_def_property(srna, "use_sequencer_gl_render", PROP_BOOLEAN, P
ROP_NONE); | |
4773 RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_GL_REND); | |
4774 RNA_def_property_ui_text(prop, "Sequencer OpenGL", ""); | |
4775 #endif | |
4776 | |
4777 prop = RNA_def_property(srna, "sequencer_gl_preview", PROP_ENUM, PROP_NO
NE); | |
4778 RNA_def_property_enum_sdna(prop, NULL, "seq_prev_type"); | |
4779 RNA_def_property_enum_items(prop, viewport_shade_items); | |
4780 RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to d
raw in the sequencer view"); | |
4781 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SceneSequenc
er_update"); | |
4782 | |
4783 prop = RNA_def_property(srna, "sequencer_gl_render", PROP_ENUM, PROP_NON
E); | |
4784 RNA_def_property_enum_sdna(prop, NULL, "seq_rend_type"); | |
4785 RNA_def_property_enum_items(prop, viewport_shade_items); | |
4786 RNA_def_property_ui_text(prop, "Sequencer Preview Shading", "Method to d
raw in the sequencer view"); | |
4787 | |
4788 prop = RNA_def_property(srna, "use_sequencer_gl_textured_solid", PROP_BO
OLEAN, PROP_NONE); | |
4789 RNA_def_property_boolean_sdna(prop, NULL, "seq_flag", R_SEQ_SOLID_TEX); | |
4790 RNA_def_property_ui_text(prop, "Textured Solid", "Draw face-assigned tex
tures in solid draw method"); | |
4791 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SceneSequenc
er_update"); | |
4792 | |
4793 /* layers */ | |
4794 prop = RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE); | |
4795 RNA_def_property_collection_sdna(prop, NULL, "layers", NULL); | |
4796 RNA_def_property_struct_type(prop, "SceneRenderLayer"); | |
4797 RNA_def_property_ui_text(prop, "Render Layers", ""); | |
4798 rna_def_render_layers(brna, prop); | |
4799 | |
4800 | |
4801 prop = RNA_def_property(srna, "use_single_layer", PROP_BOOLEAN, PROP_NON
E); | |
4802 RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER); | |
4803 RNA_def_property_ui_text(prop, "Single Layer", "Only render the active l
ayer"); | |
4804 RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1); | |
4805 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
4806 | |
4807 /* engine */ | |
4808 prop = RNA_def_property(srna, "engine", PROP_ENUM, PROP_NONE); | |
4809 RNA_def_property_enum_items(prop, engine_items); | |
4810 RNA_def_property_enum_funcs(prop, "rna_RenderSettings_engine_get", "rna_
RenderSettings_engine_set", | |
4811 "rna_RenderSettings_engine_itemf"); | |
4812 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
4813 RNA_def_property_ui_text(prop, "Engine", "Engine to use for rendering"); | |
4814 RNA_def_property_update(prop, NC_WINDOW, "rna_RenderSettings_engine_upda
te"); | |
4815 | |
4816 prop = RNA_def_property(srna, "has_multiple_engines", PROP_BOOLEAN, PROP
_NONE); | |
4817 RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_multiple_engine
s_get", NULL); | |
4818 RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
4819 RNA_def_property_ui_text(prop, "Multiple Engines", "More than one render
ing engine is available"); | |
4820 | |
4821 prop = RNA_def_property(srna, "use_shading_nodes", PROP_BOOLEAN, PROP_NO
NE); | |
4822 RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_use_shading_nod
es_get", NULL); | |
4823 RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
4824 RNA_def_property_ui_text(prop, "Use Shading Nodes", "Active render engin
e uses new shading nodes system"); | |
4825 | |
4826 prop = RNA_def_property(srna, "use_game_engine", PROP_BOOLEAN, PROP_NONE
); | |
4827 RNA_def_property_boolean_funcs(prop, "rna_RenderSettings_use_game_engine
_get", NULL); | |
4828 RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |
4829 RNA_def_property_ui_text(prop, "Use Game Engine", "Current rendering eng
ine is a game engine"); | |
4830 | |
4831 /* simplify */ | |
4832 prop = RNA_def_property(srna, "use_simplify", PROP_BOOLEAN, PROP_NONE); | |
4833 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SIMPLIFY); | |
4834 RNA_def_property_ui_text(prop, "Use Simplify", "Enable simplification of
scene for quicker preview renders"); | |
4835 RNA_def_property_update(prop, 0, "rna_Scene_use_simplify_update"); | |
4836 | |
4837 prop = RNA_def_property(srna, "simplify_subdivision", PROP_INT, PROP_UNS
IGNED); | |
4838 RNA_def_property_int_sdna(prop, NULL, "simplify_subsurf"); | |
4839 RNA_def_property_ui_range(prop, 0, 6, 1, -1); | |
4840 RNA_def_property_ui_text(prop, "Simplify Subdivision", "Global maximum s
ubdivision level"); | |
4841 RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); | |
4842 | |
4843 prop = RNA_def_property(srna, "simplify_child_particles", PROP_FLOAT, PR
OP_FACTOR); | |
4844 RNA_def_property_float_sdna(prop, NULL, "simplify_particles"); | |
4845 RNA_def_property_ui_text(prop, "Simplify Child Particles", "Global child
particles percentage"); | |
4846 RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); | |
4847 | |
4848 prop = RNA_def_property(srna, "simplify_shadow_samples", PROP_INT, PROP_
UNSIGNED); | |
4849 RNA_def_property_int_sdna(prop, NULL, "simplify_shadowsamples"); | |
4850 RNA_def_property_ui_range(prop, 1, 16, 1, -1); | |
4851 RNA_def_property_ui_text(prop, "Simplify Shadow Samples", "Global maximu
m shadow samples"); | |
4852 RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); | |
4853 | |
4854 prop = RNA_def_property(srna, "simplify_ao_sss", PROP_FLOAT, PROP_FACTOR
); | |
4855 RNA_def_property_float_sdna(prop, NULL, "simplify_aosss"); | |
4856 RNA_def_property_ui_text(prop, "Simplify AO and SSS", "Global approximat
e AO and SSS quality factor"); | |
4857 RNA_def_property_update(prop, 0, "rna_Scene_simplify_update"); | |
4858 | |
4859 prop = RNA_def_property(srna, "use_simplify_triangulate", PROP_BOOLEAN,
PROP_NONE); | |
4860 RNA_def_property_boolean_sdna(prop, NULL, "simplify_flag", R_SIMPLE_NO_T
RIANGULATE); | |
4861 RNA_def_property_ui_text(prop, "Skip Quad to Triangles", "Disable non-pl
anar quads being triangulated"); | |
4862 | |
4863 /* persistent data */ | |
4864 prop = RNA_def_property(srna, "use_persistent_data", PROP_BOOLEAN, PROP_
NONE); | |
4865 RNA_def_property_boolean_sdna(prop, NULL, "mode", R_PERSISTENT_DATA); | |
4866 RNA_def_property_ui_text(prop, "Persistent Data", "Keep render data arou
nd for faster re-renders"); | |
4867 RNA_def_property_update(prop, 0, "rna_Scene_use_persistent_data_update")
; | |
4868 | |
4869 /* Freestyle line thickness options */ | |
4870 prop = RNA_def_property(srna, "line_thickness_mode", PROP_ENUM, PROP_NON
E); | |
4871 RNA_def_property_enum_sdna(prop, NULL, "line_thickness_mode"); | |
4872 RNA_def_property_enum_items(prop, freestyle_thickness_items); | |
4873 RNA_def_property_ui_text(prop, "Line Thickness Mode", "Line thickness mo
de for Freestyle line drawing"); | |
4874 | |
4875 prop = RNA_def_property(srna, "line_thickness", PROP_FLOAT, PROP_NONE); | |
4876 RNA_def_property_float_sdna(prop, NULL, "unit_line_thickness"); | |
4877 RNA_def_property_range(prop, 0.f, 10000.f); | |
4878 RNA_def_property_ui_text(prop, "Line Thickness", "Line thickness in pixe
ls"); | |
4879 | |
4880 /* Scene API */ | |
4881 RNA_api_scene_render(srna); | |
4882 } | |
4883 | |
4884 /* scene.objects */ | |
4885 static void rna_def_scene_objects(BlenderRNA *brna, PropertyRNA *cprop) | |
4886 { | |
4887 StructRNA *srna; | |
4888 PropertyRNA *prop; | |
4889 | |
4890 FunctionRNA *func; | |
4891 PropertyRNA *parm; | |
4892 ········ | |
4893 RNA_def_property_srna(cprop, "SceneObjects"); | |
4894 srna = RNA_def_struct(brna, "SceneObjects", NULL); | |
4895 RNA_def_struct_sdna(srna, "Scene"); | |
4896 RNA_def_struct_ui_text(srna, "Scene Objects", "Collection of scene objec
ts"); | |
4897 | |
4898 func = RNA_def_function(srna, "link", "rna_Scene_object_link"); | |
4899 RNA_def_function_ui_description(func, "Link object to scene, run scene.u
pdate() after"); | |
4900 RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS); | |
4901 parm = RNA_def_pointer(func, "object", "Object", "", "Object to add to s
cene"); | |
4902 RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); | |
4903 parm = RNA_def_pointer(func, "base", "ObjectBase", "", "The newly create
d base"); | |
4904 RNA_def_function_return(func, parm); | |
4905 | |
4906 func = RNA_def_function(srna, "unlink", "rna_Scene_object_unlink"); | |
4907 RNA_def_function_ui_description(func, "Unlink object from scene"); | |
4908 RNA_def_function_flag(func, FUNC_USE_REPORTS); | |
4909 parm = RNA_def_pointer(func, "object", "Object", "", "Object to remove f
rom scene"); | |
4910 RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL); | |
4911 | |
4912 prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | |
4913 RNA_def_property_struct_type(prop, "Object"); | |
4914 RNA_def_property_pointer_funcs(prop, "rna_Scene_active_object_get", "rna
_Scene_active_object_set", NULL, NULL); | |
4915 RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); | |
4916 RNA_def_property_ui_text(prop, "Active Object", "Active object for this
scene"); | |
4917 /* Could call: ED_base_object_activate(C, scene->basact); | |
4918 * but would be a bad level call and it seems the notifier is enough */ | |
4919 RNA_def_property_update(prop, NC_SCENE | ND_OB_ACTIVE, NULL); | |
4920 } | |
4921 | |
4922 | |
4923 /* scene.bases.* */ | |
4924 static void rna_def_scene_bases(BlenderRNA *brna, PropertyRNA *cprop) | |
4925 { | |
4926 StructRNA *srna; | |
4927 PropertyRNA *prop; | |
4928 | |
4929 /* FunctionRNA *func; */ | |
4930 /* PropertyRNA *parm; */ | |
4931 | |
4932 RNA_def_property_srna(cprop, "SceneBases"); | |
4933 srna = RNA_def_struct(brna, "SceneBases", NULL); | |
4934 RNA_def_struct_sdna(srna, "Scene"); | |
4935 RNA_def_struct_ui_text(srna, "Scene Bases", "Collection of scene bases")
; | |
4936 | |
4937 prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | |
4938 RNA_def_property_struct_type(prop, "ObjectBase"); | |
4939 RNA_def_property_pointer_sdna(prop, NULL, "basact"); | |
4940 RNA_def_property_flag(prop, PROP_EDITABLE); | |
4941 RNA_def_property_ui_text(prop, "Active Base", "Active object base in the
scene"); | |
4942 RNA_def_property_update(prop, NC_SCENE | ND_OB_ACTIVE, NULL); | |
4943 } | |
4944 | |
4945 /* scene.timeline_markers */ | |
4946 static void rna_def_timeline_markers(BlenderRNA *brna, PropertyRNA *cprop) | |
4947 { | |
4948 StructRNA *srna; | |
4949 | |
4950 FunctionRNA *func; | |
4951 PropertyRNA *parm; | |
4952 | |
4953 RNA_def_property_srna(cprop, "TimelineMarkers"); | |
4954 srna = RNA_def_struct(brna, "TimelineMarkers", NULL); | |
4955 RNA_def_struct_sdna(srna, "Scene"); | |
4956 RNA_def_struct_ui_text(srna, "Timeline Markers", "Collection of timeline
markers"); | |
4957 | |
4958 func = RNA_def_function(srna, "new", "rna_TimeLine_add"); | |
4959 RNA_def_function_ui_description(func, "Add a keyframe to the curve"); | |
4960 parm = RNA_def_string(func, "name", "Marker", 0, "", "New name for the m
arker (not unique)"); | |
4961 RNA_def_property_flag(parm, PROP_REQUIRED); | |
4962 | |
4963 parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Newly crea
ted timeline marker"); | |
4964 RNA_def_function_return(func, parm); | |
4965 | |
4966 | |
4967 func = RNA_def_function(srna, "remove", "rna_TimeLine_remove"); | |
4968 RNA_def_function_ui_description(func, "Remove a timeline marker"); | |
4969 RNA_def_function_flag(func, FUNC_USE_REPORTS); | |
4970 parm = RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline m
arker to remove"); | |
4971 RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPT
R); | |
4972 RNA_def_property_clear_flag(parm, PROP_THICK_WRAP); | |
4973 | |
4974 func = RNA_def_function(srna, "clear", "rna_TimeLine_clear"); | |
4975 RNA_def_function_ui_description(func, "Remove all timeline markers"); | |
4976 } | |
4977 | |
4978 /* scene.keying_sets */ | |
4979 static void rna_def_scene_keying_sets(BlenderRNA *brna, PropertyRNA *cprop) | |
4980 { | |
4981 StructRNA *srna; | |
4982 PropertyRNA *prop; | |
4983 | |
4984 FunctionRNA *func; | |
4985 PropertyRNA *parm; | |
4986 | |
4987 RNA_def_property_srna(cprop, "KeyingSets"); | |
4988 srna = RNA_def_struct(brna, "KeyingSets", NULL); | |
4989 RNA_def_struct_sdna(srna, "Scene"); | |
4990 RNA_def_struct_ui_text(srna, "Keying Sets", "Scene keying sets"); | |
4991 | |
4992 /* Add Keying Set */ | |
4993 func = RNA_def_function(srna, "new", "rna_Scene_keying_set_new"); | |
4994 RNA_def_function_ui_description(func, "Add a new Keying Set to Scene"); | |
4995 RNA_def_function_flag(func, FUNC_USE_REPORTS); | |
4996 /* name */ | |
4997 RNA_def_string(func, "idname", "KeyingSet", 64, "IDName", "Internal iden
tifier of Keying Set"); | |
4998 RNA_def_string(func, "name", "KeyingSet", 64, "Name", "User visible name
of Keying Set"); | |
4999 | |
5000 /* returns the new KeyingSet */ | |
5001 parm = RNA_def_pointer(func, "keyingset", "KeyingSet", "", "Newly create
d Keying Set"); | |
5002 RNA_def_function_return(func, parm); | |
5003 | |
5004 prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | |
5005 RNA_def_property_struct_type(prop, "KeyingSet"); | |
5006 RNA_def_property_flag(prop, PROP_EDITABLE); | |
5007 RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", | |
5008 "rna_Scene_active_keying_set_set", NULL,
NULL); | |
5009 RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set u
sed to insert/delete keyframes"); | |
5010 RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL); | |
5011 ········ | |
5012 prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE); | |
5013 RNA_def_property_int_sdna(prop, NULL, "active_keyingset"); | |
5014 RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get"
, | |
5015 "rna_Scene_active_keying_set_index_set", NULL
); | |
5016 RNA_def_property_ui_text(prop, "Active Keying Set Index", | |
5017 "Current Keying Set index (negative for 'builti
n' and positive for 'absolute')"); | |
5018 RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL); | |
5019 } | |
5020 | |
5021 static void rna_def_scene_keying_sets_all(BlenderRNA *brna, PropertyRNA *cprop) | |
5022 { | |
5023 StructRNA *srna; | |
5024 PropertyRNA *prop; | |
5025 ········ | |
5026 RNA_def_property_srna(cprop, "KeyingSetsAll"); | |
5027 srna = RNA_def_struct(brna, "KeyingSetsAll", NULL); | |
5028 RNA_def_struct_sdna(srna, "Scene"); | |
5029 RNA_def_struct_ui_text(srna, "Keying Sets All", "All available keying se
ts"); | |
5030 ········ | |
5031 /* NOTE: no add/remove available here, without screwing up this amalgama
ted list... */ | |
5032 ········ | |
5033 prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE); | |
5034 RNA_def_property_struct_type(prop, "KeyingSet"); | |
5035 RNA_def_property_flag(prop, PROP_EDITABLE); | |
5036 RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", | |
5037 "rna_Scene_active_keying_set_set", NULL,
NULL); | |
5038 RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set u
sed to insert/delete keyframes"); | |
5039 RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL); | |
5040 ········ | |
5041 prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE); | |
5042 RNA_def_property_int_sdna(prop, NULL, "active_keyingset"); | |
5043 RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get"
, | |
5044 "rna_Scene_active_keying_set_index_set", NULL
); | |
5045 RNA_def_property_ui_text(prop, "Active Keying Set Index", | |
5046 "Current Keying Set index (negative for 'builti
n' and positive for 'absolute')"); | |
5047 RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL); | |
5048 } | |
5049 | |
5050 /* Runtime property, used to remember uv indices, used only in UV stitch for now
. | |
5051 */ | |
5052 static void rna_def_selected_uv_element(BlenderRNA *brna) | |
5053 { | |
5054 StructRNA *srna; | |
5055 PropertyRNA *prop; | |
5056 | |
5057 srna = RNA_def_struct(brna, "SelectedUvElement", "PropertyGroup"); | |
5058 RNA_def_struct_ui_text(srna, "Selected UV Element", ""); | |
5059 | |
5060 /* store the index to the UV element selected */ | |
5061 prop = RNA_def_property(srna, "element_index", PROP_INT, PROP_UNSIGNED); | |
5062 RNA_def_property_flag(prop, PROP_IDPROPERTY); | |
5063 RNA_def_property_ui_text(prop, "Element Index", ""); | |
5064 | |
5065 prop = RNA_def_property(srna, "face_index", PROP_INT, PROP_UNSIGNED); | |
5066 RNA_def_property_flag(prop, PROP_IDPROPERTY); | |
5067 RNA_def_property_ui_text(prop, "Face Index", ""); | |
5068 } | |
5069 | |
5070 | |
5071 | |
5072 void RNA_def_scene(BlenderRNA *brna) | |
5073 { | |
5074 StructRNA *srna; | |
5075 PropertyRNA *prop; | |
5076 | |
5077 FunctionRNA *func; | |
5078 PropertyRNA *parm; | |
5079 ········ | |
5080 static EnumPropertyItem audio_distance_model_items[] = { | |
5081 {0, "NONE", 0, "None", "No distance attenuation"}, | |
5082 {1, "INVERSE", 0, "Inverse", "Inverse distance model"}, | |
5083 {2, "INVERSE_CLAMPED", 0, "Inverse Clamped", "Inverse distance m
odel with clamping"}, | |
5084 {3, "LINEAR", 0, "Linear", "Linear distance model"}, | |
5085 {4, "LINEAR_CLAMPED", 0, "Linear Clamped", "Linear distance mode
l with clamping"}, | |
5086 {5, "EXPONENT", 0, "Exponent", "Exponent distance model"}, | |
5087 {6, "EXPONENT_CLAMPED", 0, "Exponent Clamped", "Exponent distanc
e model with clamping"}, | |
5088 {0, NULL, 0, NULL, NULL} | |
5089 }; | |
5090 | |
5091 static EnumPropertyItem sync_mode_items[] = { | |
5092 {0, "NONE", 0, "No Sync", "Do not sync, play every frame"}, | |
5093 {SCE_FRAME_DROP, "FRAME_DROP", 0, "Frame Dropping", "Drop frames
if playback is too slow"}, | |
5094 {AUDIO_SYNC, "AUDIO_SYNC", 0, "AV-sync", "Sync to audio playback
, dropping frames"}, | |
5095 {0, NULL, 0, NULL, NULL} | |
5096 }; | |
5097 | |
5098 /* Struct definition */ | |
5099 srna = RNA_def_struct(brna, "Scene", "ID"); | |
5100 RNA_def_struct_ui_text(srna, "Scene", | |
5101 "Scene data block, consisting in objects and defi
ning time and render related settings"); | |
5102 RNA_def_struct_ui_icon(srna, ICON_SCENE_DATA); | |
5103 RNA_def_struct_clear_flag(srna, STRUCT_ID_REFCOUNT); | |
5104 ········ | |
5105 /* Global Settings */ | |
5106 prop = RNA_def_property(srna, "camera", PROP_POINTER, PROP_NONE); | |
5107 RNA_def_property_flag(prop, PROP_EDITABLE); | |
5108 RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Camera_objec
t_poll"); | |
5109 RNA_def_property_ui_text(prop, "Camera", "Active camera, used for render
ing the scene"); | |
5110 RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_view3d_up
date"); | |
5111 | |
5112 prop = RNA_def_property(srna, "background_set", PROP_POINTER, PROP_NONE)
; | |
5113 RNA_def_property_pointer_sdna(prop, NULL, "set"); | |
5114 RNA_def_property_struct_type(prop, "Scene"); | |
5115 RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK); | |
5116 RNA_def_property_pointer_funcs(prop, NULL, "rna_Scene_set_set", NULL, NU
LL); | |
5117 RNA_def_property_ui_text(prop, "Background Scene", "Background set scene
"); | |
5118 RNA_def_property_update(prop, NC_SCENE | NA_EDITED, "rna_Scene_glsl_upda
te"); | |
5119 | |
5120 prop = RNA_def_property(srna, "world", PROP_POINTER, PROP_NONE); | |
5121 RNA_def_property_flag(prop, PROP_EDITABLE); | |
5122 RNA_def_property_ui_text(prop, "World", "World used for rendering the sc
ene"); | |
5123 RNA_def_property_update(prop, NC_SCENE | ND_WORLD, "rna_Scene_glsl_updat
e"); | |
5124 | |
5125 prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ_LE
NGTH); | |
5126 RNA_def_property_float_sdna(prop, NULL, "cursor"); | |
5127 RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location"); | |
5128 RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4); | |
5129 RNA_def_property_update(prop, NC_WINDOW, NULL); | |
5130 ········ | |
5131 /* Bases/Objects */ | |
5132 prop = RNA_def_property(srna, "object_bases", PROP_COLLECTION, PROP_NONE
); | |
5133 RNA_def_property_collection_sdna(prop, NULL, "base", NULL); | |
5134 RNA_def_property_struct_type(prop, "ObjectBase"); | |
5135 RNA_def_property_ui_text(prop, "Bases", ""); | |
5136 RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NU
LL, | |
5137 "rna_Scene_object_bases_lookup_string"
, NULL); | |
5138 rna_def_scene_bases(brna, prop); | |
5139 | |
5140 prop = RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE); | |
5141 RNA_def_property_collection_sdna(prop, NULL, "base", NULL); | |
5142 RNA_def_property_struct_type(prop, "Object"); | |
5143 RNA_def_property_ui_text(prop, "Objects", ""); | |
5144 RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_Scene_obj
ects_get", NULL, NULL, NULL, NULL); | |
5145 rna_def_scene_objects(brna, prop); | |
5146 | |
5147 /* Layers */ | |
5148 prop = RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_LAYER_MEMBER)
; | |
5149 /* this seems to be too much trouble with depsgraph updates/etc. current
ly (20110420) */ | |
5150 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
5151 RNA_def_property_boolean_sdna(prop, NULL, "lay", 1); | |
5152 RNA_def_property_array(prop, 20); | |
5153 RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_layer_set"); | |
5154 RNA_def_property_ui_text(prop, "Layers", "Visible layers - Shift-Click t
o select multiple layers"); | |
5155 RNA_def_property_update(prop, NC_SCENE | ND_LAYER, "rna_Scene_layer_upda
te"); | |
5156 | |
5157 /* active layer */ | |
5158 prop = RNA_def_property(srna, "active_layer", PROP_INT, PROP_NONE); | |
5159 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE); | |
5160 RNA_def_property_int_funcs(prop, "rna_Scene_active_layer_get", NULL, NUL
L); | |
5161 RNA_def_property_ui_text(prop, "Active Layer", "Active scene layer index
"); | |
5162 | |
5163 /* Frame Range Stuff */ | |
5164 prop = RNA_def_property(srna, "frame_current", PROP_INT, PROP_TIME); | |
5165 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
5166 RNA_def_property_int_sdna(prop, NULL, "r.cfra"); | |
5167 RNA_def_property_range(prop, MINAFRAME, MAXFRAME); | |
5168 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_frame_current_set", NU
LL); | |
5169 RNA_def_property_ui_text(prop, "Current Frame", | |
5170 "Current Frame, to update animation data from p
ython frame_set() instead"); | |
5171 RNA_def_property_update(prop, NC_SCENE | ND_FRAME, "rna_Scene_frame_upda
te"); | |
5172 ········ | |
5173 prop = RNA_def_property(srna, "frame_subframe", PROP_FLOAT, PROP_TIME); | |
5174 RNA_def_property_float_sdna(prop, NULL, "r.subframe"); | |
5175 RNA_def_property_ui_text(prop, "Current Sub-Frame", ""); | |
5176 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE); | |
5177 ········ | |
5178 prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME); | |
5179 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
5180 RNA_def_property_int_sdna(prop, NULL, "r.sfra"); | |
5181 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL
); | |
5182 RNA_def_property_range(prop, MINFRAME, MAXFRAME); | |
5183 RNA_def_property_ui_text(prop, "Start Frame", "First frame of the playba
ck/rendering range"); | |
5184 RNA_def_property_update(prop, NC_SCENE | ND_FRAME_RANGE, NULL); | |
5185 ········ | |
5186 prop = RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME); | |
5187 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
5188 RNA_def_property_int_sdna(prop, NULL, "r.efra"); | |
5189 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL); | |
5190 RNA_def_property_range(prop, MINFRAME, MAXFRAME); | |
5191 RNA_def_property_ui_text(prop, "End Frame", "Final frame of the playback
/rendering range"); | |
5192 RNA_def_property_update(prop, NC_SCENE | ND_FRAME_RANGE, NULL); | |
5193 ········ | |
5194 prop = RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME); | |
5195 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
5196 RNA_def_property_int_sdna(prop, NULL, "r.frame_step"); | |
5197 RNA_def_property_range(prop, 0, MAXFRAME); | |
5198 RNA_def_property_ui_range(prop, 1, 100, 1, -1); | |
5199 RNA_def_property_ui_text(prop, "Frame Step", | |
5200 "Number of frames to skip forward while renderi
ng/playing back each frame"); | |
5201 RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL); | |
5202 ········ | |
5203 prop = RNA_def_property(srna, "frame_current_final", PROP_FLOAT, PROP_TI
ME); | |
5204 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE | PROP_EDITABLE); | |
5205 RNA_def_property_range(prop, MINAFRAME, MAXFRAME); | |
5206 RNA_def_property_float_funcs(prop, "rna_Scene_frame_current_final_get",
NULL, NULL); | |
5207 RNA_def_property_ui_text(prop, "Current Frame Final", | |
5208 "Current frame with subframe and time remapping
applied"); | |
5209 | |
5210 prop = RNA_def_property(srna, "lock_frame_selection_to_range", PROP_BOOL
EAN, PROP_NONE); | |
5211 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
5212 RNA_def_property_boolean_sdna(prop, NULL, "r.flag", SCER_LOCK_FRAME_SELE
CTION); | |
5213 RNA_def_property_ui_text(prop, "Lock Frame Selection", | |
5214 "Don't allow frame to be selected with mouse ou
tside of frame range"); | |
5215 RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL); | |
5216 RNA_def_property_ui_icon(prop, ICON_LOCKED, 0); | |
5217 | |
5218 /* Preview Range (frame-range for UI playback) */ | |
5219 prop = RNA_def_property(srna, "use_preview_range", PROP_BOOLEAN, PROP_NO
NE); | |
5220 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
5221 RNA_def_property_boolean_sdna(prop, NULL, "r.flag", SCER_PRV_RANGE); | |
5222 RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_preview_range_
set"); | |
5223 RNA_def_property_ui_text(prop, "Use Preview Range", | |
5224 "Use an alternative start/end frame for UI play
back, " | |
5225 "rather than the scene start/end frame"); | |
5226 RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL); | |
5227 RNA_def_property_ui_icon(prop, ICON_PREVIEW_RANGE, 0); | |
5228 ········ | |
5229 prop = RNA_def_property(srna, "frame_preview_start", PROP_INT, PROP_TIME
); | |
5230 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
5231 RNA_def_property_int_sdna(prop, NULL, "r.psfra"); | |
5232 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_start_fr
ame_set", NULL); | |
5233 RNA_def_property_ui_text(prop, "Preview Range Start Frame", "Alternative
start frame for UI playback"); | |
5234 RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL); | |
5235 ········ | |
5236 prop = RNA_def_property(srna, "frame_preview_end", PROP_INT, PROP_TIME); | |
5237 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
5238 RNA_def_property_int_sdna(prop, NULL, "r.pefra"); | |
5239 RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_end_fram
e_set", NULL); | |
5240 RNA_def_property_ui_text(prop, "Preview Range End Frame", "Alternative e
nd frame for UI playback"); | |
5241 RNA_def_property_update(prop, NC_SCENE | ND_FRAME, NULL); | |
5242 ········ | |
5243 /* Stamp */ | |
5244 prop = RNA_def_property(srna, "use_stamp_note", PROP_STRING, PROP_NONE); | |
5245 RNA_def_property_string_sdna(prop, NULL, "r.stamp_udata"); | |
5246 RNA_def_property_ui_text(prop, "Stamp Note", "User defined note for the
render stamping"); | |
5247 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); | |
5248 ········ | |
5249 /* Animation Data (for Scene) */ | |
5250 rna_def_animdata_common(srna); | |
5251 ········ | |
5252 /* Readonly Properties */ | |
5253 prop = RNA_def_property(srna, "is_nla_tweakmode", PROP_BOOLEAN, PROP_NON
E); | |
5254 RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_NLA_EDIT_ON); | |
5255 RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* DO NOT MAKE THIS ED
ITABLE, OR NLA EDITOR BREAKS */ | |
5256 RNA_def_property_ui_text(prop, "NLA TweakMode", | |
5257 "Whether there is any action referenced by NLA
being edited (strictly read-only)"); | |
5258 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_GRAPH, NULL); | |
5259 ········ | |
5260 /* Frame dropping flag for playback and sync enum */ | |
5261 prop = RNA_def_property(srna, "use_frame_drop", PROP_BOOLEAN, PROP_NONE)
; | |
5262 RNA_def_property_boolean_sdna(prop, NULL, "flag", SCE_FRAME_DROP); | |
5263 RNA_def_property_ui_text(prop, "Frame Dropping", "Play back dropping fra
mes if frame display is too slow"); | |
5264 RNA_def_property_update(prop, NC_SCENE, NULL); | |
5265 | |
5266 prop = RNA_def_property(srna, "sync_mode", PROP_ENUM, PROP_NONE); | |
5267 RNA_def_property_enum_funcs(prop, "rna_Scene_sync_mode_get", "rna_Scene_
sync_mode_set", NULL); | |
5268 RNA_def_property_enum_items(prop, sync_mode_items); | |
5269 RNA_def_property_ui_text(prop, "Sync Mode", "How to sync playback"); | |
5270 RNA_def_property_update(prop, NC_SCENE, NULL); | |
5271 | |
5272 | |
5273 /* Nodes (Compositing) */ | |
5274 prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE); | |
5275 RNA_def_property_pointer_sdna(prop, NULL, "nodetree"); | |
5276 RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree"); | |
5277 | |
5278 prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE); | |
5279 RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1); | |
5280 RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); | |
5281 RNA_def_property_ui_text(prop, "Use Nodes", "Enable the compositing node
tree"); | |
5282 RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, "rna_Scene_u
se_nodes_update"); | |
5283 ········ | |
5284 /* Sequencer */ | |
5285 prop = RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE
); | |
5286 RNA_def_property_pointer_sdna(prop, NULL, "ed"); | |
5287 RNA_def_property_struct_type(prop, "SequenceEditor"); | |
5288 RNA_def_property_ui_text(prop, "Sequence Editor", ""); | |
5289 ········ | |
5290 func = RNA_def_function(srna, "sequence_editor_create", "BKE_sequencer_e
diting_ensure"); | |
5291 RNA_def_function_ui_description(func, "Ensure sequence editor is valid i
n this scene"); | |
5292 parm = RNA_def_pointer(func, "sequence_editor", "SequenceEditor", "", "N
ew sequence editor data or NULL"); | |
5293 RNA_def_function_return(func, parm); | |
5294 | |
5295 func = RNA_def_function(srna, "sequence_editor_clear", "BKE_sequencer_ed
iting_free"); | |
5296 RNA_def_function_ui_description(func, "Clear sequence editor in this sce
ne"); | |
5297 | |
5298 /* Keying Sets */ | |
5299 prop = RNA_def_property(srna, "keying_sets", PROP_COLLECTION, PROP_NONE)
; | |
5300 RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL); | |
5301 RNA_def_property_struct_type(prop, "KeyingSet"); | |
5302 RNA_def_property_ui_text(prop, "Absolute Keying Sets", "Absolute Keying
Sets for this Scene"); | |
5303 RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL); | |
5304 rna_def_scene_keying_sets(brna, prop); | |
5305 ········ | |
5306 prop = RNA_def_property(srna, "keying_sets_all", PROP_COLLECTION, PROP_N
ONE); | |
5307 RNA_def_property_collection_funcs(prop, "rna_Scene_all_keyingsets_begin"
, "rna_Scene_all_keyingsets_next", | |
5308 "rna_iterator_listbase_end", "rna_iter
ator_listbase_get", | |
5309 NULL, NULL, NULL, NULL); | |
5310 RNA_def_property_struct_type(prop, "KeyingSet"); | |
5311 RNA_def_property_ui_text(prop, "All Keying Sets", | |
5312 "All Keying Sets available for use (Builtins an
d Absolute Keying Sets for this Scene)"); | |
5313 RNA_def_property_update(prop, NC_SCENE | ND_KEYINGSET, NULL); | |
5314 rna_def_scene_keying_sets_all(brna, prop); | |
5315 ········ | |
5316 /* Rigid Body Simulation */ | |
5317 prop = RNA_def_property(srna, "rigidbody_world", PROP_POINTER, PROP_NONE
); | |
5318 RNA_def_property_pointer_sdna(prop, NULL, "rigidbody_world"); | |
5319 RNA_def_property_struct_type(prop, "RigidBodyWorld"); | |
5320 RNA_def_property_ui_text(prop, "Rigid Body World", ""); | |
5321 RNA_def_property_update(prop, NC_SCENE, NULL); | |
5322 ········ | |
5323 /* Tool Settings */ | |
5324 prop = RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE); | |
5325 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
5326 RNA_def_property_pointer_sdna(prop, NULL, "toolsettings"); | |
5327 RNA_def_property_struct_type(prop, "ToolSettings"); | |
5328 RNA_def_property_ui_text(prop, "Tool Settings", ""); | |
5329 | |
5330 /* Unit Settings */ | |
5331 prop = RNA_def_property(srna, "unit_settings", PROP_POINTER, PROP_NONE); | |
5332 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
5333 RNA_def_property_pointer_sdna(prop, NULL, "unit"); | |
5334 RNA_def_property_struct_type(prop, "UnitSettings"); | |
5335 RNA_def_property_ui_text(prop, "Unit Settings", "Unit editing settings")
; | |
5336 | |
5337 /* Physics Settings */ | |
5338 prop = RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION); | |
5339 RNA_def_property_float_sdna(prop, NULL, "physics_settings.gravity"); | |
5340 RNA_def_property_array(prop, 3); | |
5341 RNA_def_property_range(prop, -200.0f, 200.0f); | |
5342 RNA_def_property_ui_text(prop, "Gravity", "Constant acceleration in a gi
ven direction"); | |
5343 RNA_def_property_update(prop, 0, "rna_Physics_update"); | |
5344 | |
5345 prop = RNA_def_property(srna, "use_gravity", PROP_BOOLEAN, PROP_NONE); | |
5346 RNA_def_property_boolean_sdna(prop, NULL, "physics_settings.flag", PHYS_
GLOBAL_GRAVITY); | |
5347 RNA_def_property_ui_text(prop, "Global Gravity", "Use global gravity for
all dynamics"); | |
5348 RNA_def_property_update(prop, 0, "rna_Physics_update"); | |
5349 ········ | |
5350 /* Render Data */ | |
5351 prop = RNA_def_property(srna, "render", PROP_POINTER, PROP_NONE); | |
5352 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
5353 RNA_def_property_pointer_sdna(prop, NULL, "r"); | |
5354 RNA_def_property_struct_type(prop, "RenderSettings"); | |
5355 RNA_def_property_ui_text(prop, "Render Data", ""); | |
5356 ········ | |
5357 /* Markers */ | |
5358 prop = RNA_def_property(srna, "timeline_markers", PROP_COLLECTION, PROP_
NONE); | |
5359 RNA_def_property_collection_sdna(prop, NULL, "markers", NULL); | |
5360 RNA_def_property_struct_type(prop, "TimelineMarker"); | |
5361 RNA_def_property_ui_text(prop, "Timeline Markers", "Markers used in all
timelines for the current scene"); | |
5362 rna_def_timeline_markers(brna, prop); | |
5363 | |
5364 /* Audio Settings */ | |
5365 prop = RNA_def_property(srna, "use_audio", PROP_BOOLEAN, PROP_NONE); | |
5366 RNA_def_property_boolean_funcs(prop, "rna_Scene_use_audio_get", "rna_Sce
ne_use_audio_set"); | |
5367 RNA_def_property_ui_text(prop, "Audio Muted", "Play back of audio from S
equence Editor will be muted"); | |
5368 RNA_def_property_update(prop, NC_SCENE, NULL); | |
5369 | |
5370 prop = RNA_def_property(srna, "use_audio_sync", PROP_BOOLEAN, PROP_NONE)
; | |
5371 RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC); | |
5372 RNA_def_property_ui_text(prop, "Audio Sync", | |
5373 "Play back and sync with audio clock, dropping
frames if frame display is too slow"); | |
5374 RNA_def_property_update(prop, NC_SCENE, NULL); | |
5375 | |
5376 prop = RNA_def_property(srna, "use_audio_scrub", PROP_BOOLEAN, PROP_NONE
); | |
5377 RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SCRUB); | |
5378 RNA_def_property_ui_text(prop, "Audio Scrubbing", "Play audio from Seque
nce Editor while scrubbing"); | |
5379 RNA_def_property_update(prop, NC_SCENE, NULL); | |
5380 | |
5381 prop = RNA_def_property(srna, "audio_doppler_speed", PROP_FLOAT, PROP_NO
NE); | |
5382 RNA_def_property_float_sdna(prop, NULL, "audio.speed_of_sound"); | |
5383 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
5384 RNA_def_property_range(prop, 0.01f, FLT_MAX); | |
5385 RNA_def_property_ui_text(prop, "Speed of Sound", "Speed of sound for Dop
pler effect calculation"); | |
5386 RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update"); | |
5387 | |
5388 prop = RNA_def_property(srna, "audio_doppler_factor", PROP_FLOAT, PROP_N
ONE); | |
5389 RNA_def_property_float_sdna(prop, NULL, "audio.doppler_factor"); | |
5390 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
5391 RNA_def_property_range(prop, 0.0, FLT_MAX); | |
5392 RNA_def_property_ui_text(prop, "Doppler Factor", "Pitch factor for Doppl
er effect calculation"); | |
5393 RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update"); | |
5394 | |
5395 prop = RNA_def_property(srna, "audio_distance_model", PROP_ENUM, PROP_NO
NE); | |
5396 RNA_def_property_enum_bitflag_sdna(prop, NULL, "audio.distance_model"); | |
5397 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | |
5398 RNA_def_property_enum_items(prop, audio_distance_model_items); | |
5399 RNA_def_property_ui_text(prop, "Distance Model", "Distance model for dis
tance attenuation calculation"); | |
5400 RNA_def_property_update(prop, NC_SCENE, "rna_Scene_listener_update"); | |
5401 | |
5402 prop = RNA_def_property(srna, "audio_volume", PROP_FLOAT, PROP_NONE); | |
5403 RNA_def_property_float_sdna(prop, NULL, "audio.volume"); | |
5404 RNA_def_property_range(prop, 0.0f, 1.0f); | |
5405 RNA_def_property_ui_text(prop, "Volume", "Audio volume"); | |
5406 RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_SOUND); | |
5407 RNA_def_property_update(prop, NC_SCENE, NULL); | |
5408 RNA_def_property_float_funcs(prop, NULL, "rna_Scene_volume_set", NULL); | |
5409 | |
5410 /* Game Settings */ | |
5411 prop = RNA_def_property(srna, "game_settings", PROP_POINTER, PROP_NONE); | |
5412 RNA_def_property_flag(prop, PROP_NEVER_NULL); | |
5413 RNA_def_property_pointer_sdna(prop, NULL, "gm"); | |
5414 RNA_def_property_struct_type(prop, "SceneGameData"); | |
5415 RNA_def_property_ui_text(prop, "Game Data", ""); | |
5416 | |
5417 /* Statistics */ | |
5418 func = RNA_def_function(srna, "statistics", "ED_info_stats_string"); | |
5419 prop = RNA_def_string(func, "statistics", "", 0, "Statistics", ""); | |
5420 RNA_def_function_return(func, prop); | |
5421 ········ | |
5422 /* Grease Pencil */ | |
5423 prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); | |
5424 RNA_def_property_pointer_sdna(prop, NULL, "gpd"); | |
5425 RNA_def_property_flag(prop, PROP_EDITABLE); | |
5426 RNA_def_property_struct_type(prop, "GreasePencil"); | |
5427 RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil data
block"); | |
5428 RNA_def_property_update(prop, NC_SCENE, NULL); | |
5429 ········ | |
5430 /* Transform Orientations */ | |
5431 prop = RNA_def_property(srna, "orientations", PROP_COLLECTION, PROP_NONE
); | |
5432 RNA_def_property_collection_sdna(prop, NULL, "transform_spaces", NULL); | |
5433 RNA_def_property_struct_type(prop, "TransformOrientation"); | |
5434 RNA_def_property_ui_text(prop, "Transform Orientations", ""); | |
5435 | |
5436 /* active MovieClip */ | |
5437 prop = RNA_def_property(srna, "active_clip", PROP_POINTER, PROP_NONE); | |
5438 RNA_def_property_pointer_sdna(prop, NULL, "clip"); | |
5439 RNA_def_property_flag(prop, PROP_EDITABLE); | |
5440 RNA_def_property_struct_type(prop, "MovieClip"); | |
5441 RNA_def_property_ui_text(prop, "Active Movie Clip", "Active movie clip u
sed for constraints and viewport drawing"); | |
5442 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |
5443 | |
5444 /* color management */ | |
5445 prop = RNA_def_property(srna, "view_settings", PROP_POINTER, PROP_NONE); | |
5446 RNA_def_property_pointer_sdna(prop, NULL, "view_settings"); | |
5447 RNA_def_property_struct_type(prop, "ColorManagedViewSettings"); | |
5448 RNA_def_property_ui_text(prop, "View Settings", "Color management settin
gs applied on image before saving"); | |
5449 | |
5450 prop = RNA_def_property(srna, "display_settings", PROP_POINTER, PROP_NON
E); | |
5451 RNA_def_property_pointer_sdna(prop, NULL, "display_settings"); | |
5452 RNA_def_property_struct_type(prop, "ColorManagedDisplaySettings"); | |
5453 RNA_def_property_ui_text(prop, "Display Settings", "Settings of device s
aved image would be displayed on"); | |
5454 | |
5455 prop = RNA_def_property(srna, "sequencer_colorspace_settings", PROP_POIN
TER, PROP_NONE); | |
5456 RNA_def_property_pointer_sdna(prop, NULL, "sequencer_colorspace_settings
"); | |
5457 RNA_def_property_struct_type(prop, "ColorManagedSequencerColorspaceSetti
ngs"); | |
5458 RNA_def_property_ui_text(prop, "Sequencer Color Space Settings", "Settin
gs of color space sequencer is working in"); | |
5459 | |
5460 /* Nestled Data */ | |
5461 /* *** Non-Animated *** */ | |
5462 RNA_define_animate_sdna(false); | |
5463 rna_def_tool_settings(brna); | |
5464 rna_def_unified_paint_settings(brna); | |
5465 rna_def_statvis(brna); | |
5466 rna_def_unit_settings(brna); | |
5467 rna_def_scene_image_format_data(brna); | |
5468 rna_def_scene_game_data(brna); | |
5469 rna_def_transform_orientation(brna); | |
5470 rna_def_selected_uv_element(brna); | |
5471 RNA_define_animate_sdna(true); | |
5472 /* *** Animated *** */ | |
5473 rna_def_scene_render_data(brna); | |
5474 rna_def_scene_render_layer(brna); | |
5475 ········ | |
5476 /* Scene API */ | |
5477 RNA_api_scene(srna); | |
5478 } | |
5479 | |
5480 #endif | |
LEFT | RIGHT |