Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * The Original Code is Copyright (C) 2009 Blender Foundation. 00019 * All rights reserved. 00020 * 00021 * 00022 * Contributor(s): Blender Foundation 00023 * 00024 * ***** END GPL LICENSE BLOCK ***** 00025 */ 00026 00032 #include <stdlib.h> 00033 #include <stdio.h> 00034 00035 #include "RNA_define.h" 00036 00037 #include "UI_resources.h" 00038 00039 #ifdef RNA_RUNTIME 00040 00041 static void rna_uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, const char *name, int icon, int expand, int slider, int toggle, int icon_only, int event, int full_event, int emboss, int index) 00042 { 00043 PropertyRNA *prop= RNA_struct_find_property(ptr, propname); 00044 int flag= 0; 00045 00046 if(!prop) { 00047 RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname); 00048 return; 00049 } 00050 00051 flag |= (slider)? UI_ITEM_R_SLIDER: 0; 00052 flag |= (expand)? UI_ITEM_R_EXPAND: 0; 00053 flag |= (toggle)? UI_ITEM_R_TOGGLE: 0; 00054 flag |= (icon_only)? UI_ITEM_R_ICON_ONLY: 0; 00055 flag |= (event)? UI_ITEM_R_EVENT: 0; 00056 flag |= (full_event)? UI_ITEM_R_FULL_EVENT: 0; 00057 flag |= (emboss)? 0: UI_ITEM_R_NO_BG; 00058 00059 uiItemFullR(layout, ptr, prop, index, 0, flag, name, icon); 00060 } 00061 00062 static PointerRNA rna_uiItemO(uiLayout *layout, const char *opname, const char *name, int icon, int emboss) 00063 { 00064 int flag= UI_ITEM_O_RETURN_PROPS; 00065 flag |= (emboss)? 0: UI_ITEM_R_NO_BG; 00066 return uiItemFullO(layout, opname, name, icon, NULL, uiLayoutGetOperatorContext(layout), flag); 00067 } 00068 00069 #else 00070 00071 #define DEF_ICON_BLANK_SKIP 00072 #define DEF_ICON(name) {ICON_##name, (#name), 0, (#name), ""}, 00073 #define DEF_VICO(name) {VICO_##name, (#name), 0, (#name), ""}, 00074 static EnumPropertyItem icon_items[] = { 00075 #include "UI_icons.h" 00076 {0, NULL, 0, NULL, NULL}}; 00077 #undef DEF_ICON_BLANK_SKIP 00078 #undef DEF_ICON 00079 #undef DEF_VICO 00080 00081 static void api_ui_item_common(FunctionRNA *func) 00082 { 00083 PropertyRNA *prop; 00084 00085 RNA_def_string_translate(func, "text", "", 0, "", "Override automatic text of the item"); 00086 00087 prop= RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE); 00088 RNA_def_property_enum_items(prop, icon_items); 00089 RNA_def_property_ui_text(prop, "Icon", "Override automatic icon of the item"); 00090 00091 } 00092 00093 static void api_ui_item_op(FunctionRNA *func) 00094 { 00095 PropertyRNA *parm; 00096 parm= RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator"); 00097 RNA_def_property_flag(parm, PROP_REQUIRED); 00098 } 00099 00100 static void api_ui_item_op_common(FunctionRNA *func) 00101 { 00102 api_ui_item_op(func); 00103 api_ui_item_common(func); 00104 } 00105 00106 static void api_ui_item_rna_common(FunctionRNA *func) 00107 { 00108 PropertyRNA *parm; 00109 00110 parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); 00111 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); 00112 parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data"); 00113 RNA_def_property_flag(parm, PROP_REQUIRED); 00114 } 00115 00116 void RNA_api_ui_layout(StructRNA *srna) 00117 { 00118 FunctionRNA *func; 00119 PropertyRNA *parm; 00120 00121 static EnumPropertyItem curve_type_items[] = { 00122 {0, "NONE", 0, "None", ""}, 00123 {'v', "VECTOR", 0, "Vector", ""}, 00124 {'c', "COLOR", 0, "Color", ""}, 00125 {0, NULL, 0, NULL, NULL}}; 00126 00127 static EnumPropertyItem list_type_items[] = { 00128 {0, "DEFAULT", 0, "None", ""}, 00129 {'c', "COMPACT", 0, "Compact", ""}, 00130 {'i', "ICONS", 0, "Icons", ""}, 00131 {0, NULL, 0, NULL, NULL}}; 00132 00133 /* simple layout specifiers */ 00134 func= RNA_def_function(srna, "row", "uiLayoutRow"); 00135 parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in"); 00136 RNA_def_function_return(func, parm); 00137 RNA_def_function_ui_description(func, "Sub-layout. Items placed in this sublayout are placed next to each other in a row"); 00138 RNA_def_boolean(func, "align", 0, "", "Align buttons to each other"); 00139 00140 func= RNA_def_function(srna, "column", "uiLayoutColumn"); 00141 parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in"); 00142 RNA_def_function_return(func, parm); 00143 RNA_def_function_ui_description(func, "Sub-layout. Items placed in this sublayout are placed under each other in a column"); 00144 RNA_def_boolean(func, "align", 0, "", "Align buttons to each other"); 00145 00146 func= RNA_def_function(srna, "column_flow", "uiLayoutColumnFlow"); 00147 RNA_def_int(func, "columns", 0, 0, INT_MAX, "", "Number of columns, 0 is automatic", 0, INT_MAX); 00148 parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in"); 00149 RNA_def_function_return(func, parm); 00150 RNA_def_boolean(func, "align", 0, "", "Align buttons to each other"); 00151 00152 /* box layout */ 00153 func= RNA_def_function(srna, "box", "uiLayoutBox"); 00154 parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in"); 00155 RNA_def_function_return(func, parm); 00156 RNA_def_function_ui_description(func, "Sublayout (items placed in this sublayout are placed " 00157 "under each other in a column and are surrounded by a box)"); 00158 00159 /* split layout */ 00160 func= RNA_def_function(srna, "split", "uiLayoutSplit"); 00161 parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in"); 00162 RNA_def_function_return(func, parm); 00163 RNA_def_float(func, "percentage", 0.0f, 0.0f, 1.0f, "Percentage", "Percentage of width to split at", 0.0f, 1.0f); 00164 RNA_def_boolean(func, "align", 0, "", "Align buttons to each other"); 00165 00166 /* items */ 00167 func= RNA_def_function(srna, "prop", "rna_uiItemR"); 00168 RNA_def_function_ui_description(func, "Item. Exposes an RNA item and places it into the layout"); 00169 api_ui_item_rna_common(func); 00170 api_ui_item_common(func); 00171 RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail"); 00172 RNA_def_boolean(func, "slider", 0, "", "Use slider widget for numeric values"); 00173 RNA_def_boolean(func, "toggle", 0, "", "Use toggle widget for boolean values"); 00174 RNA_def_boolean(func, "icon_only", 0, "", "Draw only icons in buttons, no text"); 00175 RNA_def_boolean(func, "event", 0, "", "Use button to input key events"); 00176 RNA_def_boolean(func, "full_event", 0, "", "Use button to input full events including modifiers"); 00177 RNA_def_boolean(func, "emboss", 1, "", "Draw the button itself, just the icon/text"); 00178 RNA_def_int(func, "index", -1, -2, INT_MAX, "", 00179 "The index of this button, when set a single member of an array can be accessed, " 00180 "when set to -1 all array members are used", -2, INT_MAX); /* RNA_NO_INDEX == -1 */ 00181 00182 func= RNA_def_function(srna, "props_enum", "uiItemsEnumR"); 00183 api_ui_item_rna_common(func); 00184 00185 func= RNA_def_function(srna, "prop_menu_enum", "uiItemMenuEnumR"); 00186 api_ui_item_rna_common(func); 00187 api_ui_item_common(func); 00188 00189 func= RNA_def_function(srna, "prop_enum", "uiItemEnumR_string"); 00190 api_ui_item_rna_common(func); 00191 parm= RNA_def_string(func, "value", "", 0, "", "Enum property value"); 00192 RNA_def_property_flag(parm, PROP_REQUIRED); 00193 api_ui_item_common(func); 00194 00195 func= RNA_def_function(srna, "prop_search", "uiItemPointerR"); 00196 api_ui_item_rna_common(func); 00197 parm= RNA_def_pointer(func, "search_data", "AnyType", "", "Data from which to take collection to search in"); 00198 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); 00199 parm= RNA_def_string(func, "search_property", "", 0, "", "Identifier of search collection property"); 00200 RNA_def_property_flag(parm, PROP_REQUIRED); 00201 api_ui_item_common(func); 00202 00203 func= RNA_def_function(srna, "operator", "rna_uiItemO"); 00204 api_ui_item_op_common(func); 00205 RNA_def_boolean(func, "emboss", 1, "", "Draw the button itself, just the icon/text"); 00206 parm= RNA_def_pointer(func, "properties", "OperatorProperties", "", 00207 "Operator properties to fill in, return when 'properties' is set to true"); 00208 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR); 00209 RNA_def_function_return(func, parm); 00210 RNA_def_function_ui_description(func, "Item. Places a button into the layout to call an Operator"); 00211 00212 /* func= RNA_def_function(srna, "operator_enum_single", "uiItemEnumO_string"); 00213 api_ui_item_op_common(func); 00214 parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator"); 00215 RNA_def_property_flag(parm, PROP_REQUIRED); 00216 parm= RNA_def_string(func, "value", "", 0, "", "Enum property value"); 00217 RNA_def_property_flag(parm, PROP_REQUIRED); */ 00218 00219 func= RNA_def_function(srna, "operator_enum", "uiItemsEnumO"); 00220 parm= RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator"); 00221 RNA_def_property_flag(parm, PROP_REQUIRED); 00222 parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator"); 00223 RNA_def_property_flag(parm, PROP_REQUIRED); 00224 00225 func= RNA_def_function(srna, "operator_menu_enum", "uiItemMenuEnumO"); 00226 api_ui_item_op(func); /* cant use api_ui_item_op_common because property must come right after */ 00227 parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator"); 00228 RNA_def_property_flag(parm, PROP_REQUIRED); 00229 api_ui_item_common(func); 00230 00231 /* func= RNA_def_function(srna, "operator_boolean", "uiItemBooleanO"); 00232 api_ui_item_op_common(func); 00233 parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator"); 00234 RNA_def_property_flag(parm, PROP_REQUIRED); 00235 parm= RNA_def_boolean(func, "value", 0, "", "Value of the property to call the operator with"); 00236 RNA_def_property_flag(parm, PROP_REQUIRED); */ 00237 00238 /* func= RNA_def_function(srna, "operator_int", "uiItemIntO"); 00239 api_ui_item_op_common(func); 00240 parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator"); 00241 RNA_def_property_flag(parm, PROP_REQUIRED); 00242 parm= RNA_def_int(func, "value", 0, INT_MIN, INT_MAX, "", 00243 "Value of the property to call the operator with", INT_MIN, INT_MAX); 00244 RNA_def_property_flag(parm, PROP_REQUIRED); */ 00245 00246 /* func= RNA_def_function(srna, "operator_float", "uiItemFloatO"); 00247 api_ui_item_op_common(func); 00248 parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator"); 00249 RNA_def_property_flag(parm, PROP_REQUIRED); 00250 parm= RNA_def_float(func, "value", 0, -FLT_MAX, FLT_MAX, "", 00251 "Value of the property to call the operator with", -FLT_MAX, FLT_MAX); 00252 RNA_def_property_flag(parm, PROP_REQUIRED); */ 00253 00254 /* func= RNA_def_function(srna, "operator_string", "uiItemStringO"); 00255 api_ui_item_op_common(func); 00256 parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator"); 00257 RNA_def_property_flag(parm, PROP_REQUIRED); 00258 parm= RNA_def_string(func, "value", "", 0, "", "Value of the property to call the operator with"); 00259 RNA_def_property_flag(parm, PROP_REQUIRED); */ 00260 00261 func= RNA_def_function(srna, "label", "uiItemL"); 00262 RNA_def_function_ui_description(func, "Item. Display text in the layout"); 00263 api_ui_item_common(func); 00264 00265 func= RNA_def_function(srna, "menu", "uiItemM"); 00266 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00267 parm= RNA_def_string(func, "menu", "", 0, "", "Identifier of the menu"); 00268 api_ui_item_common(func); 00269 RNA_def_property_flag(parm, PROP_REQUIRED); 00270 00271 func= RNA_def_function(srna, "separator", "uiItemS"); 00272 RNA_def_function_ui_description(func, "Item. Inserts empty space into the layout between items"); 00273 00274 /* context */ 00275 func= RNA_def_function(srna, "context_pointer_set", "uiLayoutSetContextPointer"); 00276 parm= RNA_def_string(func, "name", "", 0, "Name", "Name of entry in the context"); 00277 RNA_def_property_flag(parm, PROP_REQUIRED); 00278 parm= RNA_def_pointer(func, "data", "AnyType", "", "Pointer to put in context"); 00279 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR); 00280 00281 /* templates */ 00282 func= RNA_def_function(srna, "template_header", "uiTemplateHeader"); 00283 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00284 RNA_def_boolean(func, "menus", 1, "", "The header has menus, and should show menu expander"); 00285 00286 func= RNA_def_function(srna, "template_ID", "uiTemplateID"); 00287 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00288 api_ui_item_rna_common(func); 00289 RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block"); 00290 RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a file for creating a new ID block"); 00291 RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block"); 00292 00293 func= RNA_def_function(srna, "template_ID_preview", "uiTemplateIDPreview"); 00294 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00295 api_ui_item_rna_common(func); 00296 RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block"); 00297 RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a file for creating a new ID block"); 00298 RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block"); 00299 RNA_def_int(func, "rows", 0, 0, INT_MAX, "Number of thumbnail preview rows to display", "", 0, INT_MAX); 00300 RNA_def_int(func, "cols", 0, 0, INT_MAX, "Number of thumbnail preview columns to display", "", 0, INT_MAX); 00301 00302 func= RNA_def_function(srna, "template_any_ID", "uiTemplateAnyID"); 00303 parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); 00304 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); 00305 parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data"); 00306 RNA_def_property_flag(parm, PROP_REQUIRED); 00307 parm= RNA_def_string(func, "type_property", "", 0, "", 00308 "Identifier of property in data giving the type of the ID-blocks to use"); 00309 RNA_def_property_flag(parm, PROP_REQUIRED); 00310 RNA_def_string_translate(func, "text", "", 0, "", "Custom label to display in UI"); 00311 00312 func= RNA_def_function(srna, "template_path_builder", "uiTemplatePathBuilder"); 00313 parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); 00314 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); 00315 parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data"); 00316 RNA_def_property_flag(parm, PROP_REQUIRED); 00317 parm= RNA_def_pointer(func, "root", "ID", "", "ID-block from which path is evaluated from"); 00318 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR); 00319 RNA_def_string_translate(func, "text", "", 0, "", "Custom label to display in UI"); 00320 00321 func= RNA_def_function(srna, "template_modifier", "uiTemplateModifier"); 00322 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00323 RNA_def_function_ui_description(func, "Layout . Generates the UI layout for modifiers"); 00324 parm= RNA_def_pointer(func, "data", "Modifier", "", "Modifier data"); 00325 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); 00326 parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in"); 00327 RNA_def_function_return(func, parm); 00328 00329 func= RNA_def_function(srna, "template_constraint", "uiTemplateConstraint"); 00330 RNA_def_function_ui_description(func, "Layout . Generates the UI layout for constraints"); 00331 parm= RNA_def_pointer(func, "data", "Constraint", "", "Constraint data"); 00332 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); 00333 parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in"); 00334 RNA_def_function_return(func, parm); 00335 00336 func= RNA_def_function(srna, "template_preview", "uiTemplatePreview"); 00337 RNA_def_function_ui_description(func, "Item. A preview window for materials, textures, lamps, etc."); 00338 parm= RNA_def_pointer(func, "id", "ID", "", "ID datablock"); 00339 RNA_def_property_flag(parm, PROP_REQUIRED); 00340 RNA_def_boolean(func, "show_buttons", 1, "", "Show preview buttons?"); 00341 RNA_def_pointer(func, "parent", "ID", "", "ID datablock"); 00342 RNA_def_pointer(func, "slot", "TextureSlot", "", "Texture slot"); 00343 00344 func= RNA_def_function(srna, "template_curve_mapping", "uiTemplateCurveMapping"); 00345 RNA_def_function_ui_description(func, "Item. A curve mapping widget used for e.g falloff curves for lamps"); 00346 api_ui_item_rna_common(func); 00347 RNA_def_enum(func, "type", curve_type_items, 0, "Type", "Type of curves to display"); 00348 RNA_def_boolean(func, "levels", 0, "", "Show black/white levels"); 00349 RNA_def_boolean(func, "brush", 0, "", "Show brush options"); 00350 00351 func= RNA_def_function(srna, "template_color_ramp", "uiTemplateColorRamp"); 00352 RNA_def_function_ui_description(func, "Item. A color ramp widget"); 00353 api_ui_item_rna_common(func); 00354 RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail"); 00355 00356 func= RNA_def_function(srna, "template_histogram", "uiTemplateHistogram"); 00357 RNA_def_function_ui_description(func, "Item. A histogramm widget to analyze imaga data"); 00358 api_ui_item_rna_common(func); 00359 00360 func= RNA_def_function(srna, "template_waveform", "uiTemplateWaveform"); 00361 RNA_def_function_ui_description(func, "Item. A waveform widget to analyze imaga data"); 00362 api_ui_item_rna_common(func); 00363 00364 func= RNA_def_function(srna, "template_vectorscope", "uiTemplateVectorscope"); 00365 RNA_def_function_ui_description(func, "Item. A vectorscope widget to analyze imaga data"); 00366 api_ui_item_rna_common(func); 00367 00368 func= RNA_def_function(srna, "template_layers", "uiTemplateLayers"); 00369 api_ui_item_rna_common(func); 00370 parm= RNA_def_pointer(func, "used_layers_data", "AnyType", "", "Data from which to take property"); 00371 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR); 00372 parm= RNA_def_string(func, "used_layers_property", "", 0, "", "Identifier of property in data"); 00373 RNA_def_property_flag(parm, PROP_REQUIRED); 00374 parm= RNA_def_int(func, "active_layer", 0, 0, INT_MAX, "Active Layer", "", 0, INT_MAX); 00375 RNA_def_property_flag(parm, PROP_REQUIRED); 00376 00377 func= RNA_def_function(srna, "template_color_wheel", "uiTemplateColorWheel"); 00378 RNA_def_function_ui_description(func, "Item. A color wheel widget to pick colors"); 00379 api_ui_item_rna_common(func); 00380 RNA_def_boolean(func, "value_slider", 0, "", "Display the value slider to the right of the color wheel"); 00381 RNA_def_boolean(func, "lock", 0, "", "Lock the color wheel display to value 1.0 regardless of actual color"); 00382 RNA_def_boolean(func, "lock_luminosity", 0, "", "Keep the color at its original vector length"); 00383 RNA_def_boolean(func, "cubic", 1, "", "Cubic saturation for picking values close to white"); 00384 00385 func= RNA_def_function(srna, "template_image_layers", "uiTemplateImageLayers"); 00386 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00387 parm= RNA_def_pointer(func, "image", "Image", "", ""); 00388 RNA_def_property_flag(parm, PROP_REQUIRED); 00389 parm= RNA_def_pointer(func, "image_user", "ImageUser", "", ""); 00390 RNA_def_property_flag(parm, PROP_REQUIRED); 00391 00392 func= RNA_def_function(srna, "template_image", "uiTemplateImage"); 00393 RNA_def_function_ui_description(func, "Item(s). User interface for selecting images and their source paths"); 00394 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00395 api_ui_item_rna_common(func); 00396 parm= RNA_def_pointer(func, "image_user", "ImageUser", "", ""); 00397 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); 00398 RNA_def_boolean(func, "compact", 0, "", "Use more compact layout"); 00399 00400 func= RNA_def_function(srna, "template_image_settings", "uiTemplateImageSettings"); 00401 RNA_def_function_ui_description(func, "User interface for setting image format options"); 00402 parm= RNA_def_pointer(func, "image_settings", "ImageFormatSettings", "", ""); 00403 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); 00404 00405 func= RNA_def_function(srna, "template_movieclip", "uiTemplateMovieClip"); 00406 RNA_def_function_ui_description(func, "Item(s). User interface for selecting movie clips and their source paths"); 00407 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00408 api_ui_item_rna_common(func); 00409 RNA_def_boolean(func, "compact", 0, "", "Use more compact layout"); 00410 00411 func= RNA_def_function(srna, "template_track", "uiTemplateTrack"); 00412 RNA_def_function_ui_description(func, "Item. A movie-track widget to preview tracking image."); 00413 api_ui_item_rna_common(func); 00414 00415 func= RNA_def_function(srna, "template_marker", "uiTemplateMarker"); 00416 RNA_def_function_ui_description(func, "Item. A widget to control single marker settings."); 00417 api_ui_item_rna_common(func); 00418 parm= RNA_def_pointer(func, "clip_user", "MovieClipUser", "", ""); 00419 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); 00420 parm= RNA_def_pointer(func, "track", "MovieTrackingTrack", "", ""); 00421 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); 00422 RNA_def_boolean(func, "compact", 0, "", "Use more compact layout"); 00423 00424 func= RNA_def_function(srna, "template_list", "uiTemplateList"); 00425 RNA_def_function_ui_description(func, "Item. A list widget to display data. e.g. vertexgroups"); 00426 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00427 parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); 00428 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR); 00429 parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data"); 00430 RNA_def_property_flag(parm, PROP_REQUIRED); 00431 parm= RNA_def_pointer(func, "active_data", "AnyType", "", "Data from which to take property for the active element"); 00432 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); 00433 parm= RNA_def_string(func, "active_property", "", 0, "", "Identifier of property in data, for the active element"); 00434 RNA_def_property_flag(parm, PROP_REQUIRED); 00435 RNA_def_string(func, "prop_list", "", 0, "", 00436 "Identifier of a string property in each data member, specifying which " 00437 "of its properties should have a widget displayed in its row " 00438 "(format: \"propname1:propname2:propname3:...\")"); 00439 RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Number of rows to display", 0, INT_MAX); 00440 RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Maximum number of rows to display", 0, INT_MAX); 00441 RNA_def_enum(func, "type", list_type_items, 0, "Type", "Type of list to use"); 00442 00443 func= RNA_def_function(srna, "template_running_jobs", "uiTemplateRunningJobs"); 00444 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00445 00446 RNA_def_function(srna, "template_operator_search", "uiTemplateOperatorSearch"); 00447 00448 func= RNA_def_function(srna, "template_header_3D", "uiTemplateHeader3D"); 00449 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00450 00451 func= RNA_def_function(srna, "template_edit_mode_selection", "uiTemplateEditModeSelection"); 00452 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00453 00454 func= RNA_def_function(srna, "template_reports_banner", "uiTemplateReportsBanner"); 00455 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00456 00457 func= RNA_def_function(srna, "template_node_link", "uiTemplateNodeLink"); 00458 parm= RNA_def_pointer(func, "ntree", "NodeTree", "", ""); 00459 RNA_def_property_flag(parm, PROP_REQUIRED); 00460 parm= RNA_def_pointer(func, "node", "Node", "", ""); 00461 RNA_def_property_flag(parm, PROP_REQUIRED); 00462 parm= RNA_def_pointer(func, "socket", "NodeSocket", "", ""); 00463 RNA_def_property_flag(parm, PROP_REQUIRED); 00464 00465 func= RNA_def_function(srna, "template_node_view", "uiTemplateNodeView"); 00466 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00467 parm= RNA_def_pointer(func, "ntree", "NodeTree", "", ""); 00468 RNA_def_property_flag(parm, PROP_REQUIRED); 00469 parm= RNA_def_pointer(func, "node", "Node", "", ""); 00470 RNA_def_property_flag(parm, PROP_REQUIRED); 00471 parm= RNA_def_pointer(func, "socket", "NodeSocket", "", ""); 00472 RNA_def_property_flag(parm, PROP_REQUIRED); 00473 00474 func= RNA_def_function(srna, "template_texture_user", "uiTemplateTextureUser"); 00475 RNA_def_function_flag(func, FUNC_USE_CONTEXT); 00476 00477 func= RNA_def_function(srna, "template_keymap_item_properties", "uiTemplateKeymapItemProperties"); 00478 parm= RNA_def_pointer(func, "item", "KeyMapItem", "", ""); 00479 RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); 00480 00481 func= RNA_def_function(srna, "introspect", "uiLayoutIntrospect"); 00482 parm= RNA_def_string(func, "string", "", 1024*1024, "Descr", "DESCR"); 00483 RNA_def_function_return(func, parm); 00484 } 00485 #endif 00486