1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
/**
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Contributor(s): Blender Foundation (2008).
*
* ***** END GPL LICENSE BLOCK *****
*/
#include <stdlib.h>
#include "RNA_define.h"
#include "RNA_types.h"
#include "rna_internal.h"
#include "DNA_radio_types.h"
#ifdef RNA_RUNTIME
#else
void RNA_def_radio(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
static EnumPropertyItem prop_drawtype_items[] = {
{RAD_WIREFRAME, "WIREFRAME", "Wireframe", "Enables Wireframe draw mode"},
{RAD_SOLID, "SOLID", "Solid", "Enables Solid draw mode"},
{RAD_GOURAUD, "GOURAUD", "Gouraud", "Enables Gouraud draw mode"},
{0, NULL, NULL, NULL}};
srna= RNA_def_struct(brna, "Radiosity", NULL);
RNA_def_struct_ui_text(srna, "Radiosity", "DOC_BROKEN");
RNA_def_struct_sdna(srna, "Radio");
/* Enums */
prop= RNA_def_property(srna, "draw_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "drawtype");
RNA_def_property_enum_items(prop, prop_drawtype_items);
RNA_def_property_ui_text(prop, "Draw Mode", "Radiosity draw modes.");
/* Number values */
prop= RNA_def_property(srna, "hemi_resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "hemires");
RNA_def_property_range(prop, 100, 1000);
RNA_def_property_ui_text(prop, "Hemi Resolution", "Sets the size of a hemicube.");
prop= RNA_def_property(srna, "max_iterations", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxiter");
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Max Iterations", "Limits the maximum number of radiosity rounds.");
prop= RNA_def_property(srna, "multiplier", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radfac");
RNA_def_property_range(prop, 0.001f, 250.0f);
RNA_def_property_ui_text(prop, "Multiplier", "Multiplies the energy values.");
prop= RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "gamma");
RNA_def_property_range(prop, 0.2f, 10.0f);
RNA_def_property_ui_text(prop, "Gamma", "Changes the contrast of the energy values.");
prop= RNA_def_property(srna, "convergence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "convergence");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Convergence", "Sets the lower threshold of unshot energy.");
prop= RNA_def_property(srna, "element_max", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "elma");
RNA_def_property_range(prop, 1, 500);
RNA_def_property_ui_text(prop, "Element Max", "Sets maximum size of an element");
prop= RNA_def_property(srna, "element_min", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "elmi");
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_text(prop, "Element Min", "Sets minimum size of an element");
prop= RNA_def_property(srna, "patch_max", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pama");
RNA_def_property_range(prop, 10, 1000);
RNA_def_property_ui_text(prop, "Patch Max", "Sets maximum size of a patch.");
prop= RNA_def_property(srna, "patch_min", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pami");
RNA_def_property_range(prop, 10, 1000);
RNA_def_property_ui_text(prop, "Patch Min", "Sets minimum size of a patch.");
prop= RNA_def_property(srna, "subshoot_patch", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "subshootp");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "SubShoot Patch", "Sets the number of times the environment is tested to detect pathes.");
prop= RNA_def_property(srna, "subshoot_element", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "subshoote");
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "SubShoot Element", "Sets the number of times the environment is tested to detect elements.");
prop= RNA_def_property(srna, "max_elements", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxnode");
RNA_def_property_range(prop, 1, 250000);
RNA_def_property_ui_text(prop, "Max Elements", "Sets the maximum allowed number of elements.");
prop= RNA_def_property(srna, "max_subdiv_shoot", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxsublamp");
RNA_def_property_range(prop, 1, 250);
RNA_def_property_ui_text(prop, "Max Subdiv Shoot", "Sets the maximum number of initial shoot patches that are evaluated");
prop= RNA_def_property(srna, "remove_doubles_limit", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "nodelim");
RNA_def_property_range(prop, 0, 50);
RNA_def_property_ui_text(prop, "Remove Doubles Limit", "Sets the range for removing doubles");
/* flag */
prop= RNA_def_property(srna, "show_limits", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", RAD_SHOWLIMITS);
RNA_def_property_ui_text(prop, "Show Limits", "Draws patch and element limits");
prop= RNA_def_property(srna, "show_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", RAD_SHOWZ);
RNA_def_property_ui_text(prop, "Show Z", "Draws limits differently");
}
#endif
|