Revision: 31147
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31147
Author: mindrones
Date: 2010-08-07 20:34:16 +0200 (Sat, 07 Aug 2010)
Log Message:
-----------
== docs ==
Added some docs mainly in bpy.types.UILayout.html, descriptions by Florian
Meyer (testscreenings), thanks.
Modified Paths:
--------------
trunk/blender/source/blender/makesrna/intern/rna_ui.c
trunk/blender/source/blender/makesrna/intern/rna_ui_api.c
trunk/blender/source/blender/python/intern/bpy.c
Modified: trunk/blender/source/blender/makesrna/intern/rna_ui.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_ui.c 2010-08-07
16:21:15 UTC (rev 31146)
+++ trunk/blender/source/blender/makesrna/intern/rna_ui.c 2010-08-07
18:34:16 UTC (rev 31147)
@@ -545,10 +545,11 @@
prop= RNA_def_property(srna, "operator_context", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, operator_context_items);
RNA_def_property_enum_funcs(prop, "rna_UILayout_op_context_get",
"rna_UILayout_op_context_set", NULL);
-
+
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_UILayout_enabled_get",
"rna_UILayout_enabled_set");
-
+ RNA_def_property_ui_text(prop, "Enabled", "When false, this (sub)layout
is greyed out.");
+
#if 0
prop= RNA_def_property(srna, "red_alert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_UILayout_red_alert_get",
"rna_UILayout_red_alert_set");
@@ -565,10 +566,11 @@
prop= RNA_def_property(srna, "scale_x", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_funcs(prop, "rna_UILayout_scale_x_get",
"rna_UILayout_scale_x_set", NULL);
-
+ RNA_def_property_ui_text(prop, "Scale X", "Scale factor along the X for
items in this (sub)layout.");
+
prop= RNA_def_property(srna, "scale_y", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_funcs(prop, "rna_UILayout_scale_y_get",
"rna_UILayout_scale_y_set", NULL);
-
+ RNA_def_property_ui_text(prop, "Scale Y", "Scale factor along the Y for
items in this (sub)layout.");
RNA_api_ui_layout(srna);
}
@@ -710,7 +712,7 @@
/* poll */
func= RNA_def_function(srna, "poll", NULL);
- RNA_def_function_ui_description(func, "If this method returns a
non-null output, then the menu can be drawn.");
+ RNA_def_function_ui_description(func, "If this method returns a
non-null output, then the menu can be drawn. This is a static method, hence it
is not possible to use 'self' in it.");
RNA_def_function_flag(func,
FUNC_NO_SELF|FUNC_REGISTER|FUNC_REGISTER_OPTIONAL);
RNA_def_function_return(func, RNA_def_boolean(func, "visible", 1, "",
""));
parm= RNA_def_pointer(func, "context", "Context", "", "");
Modified: trunk/blender/source/blender/makesrna/intern/rna_ui_api.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_ui_api.c 2010-08-07
16:21:15 UTC (rev 31146)
+++ trunk/blender/source/blender/makesrna/intern/rna_ui_api.c 2010-08-07
18:34:16 UTC (rev 31147)
@@ -127,11 +127,13 @@
func= RNA_def_function(srna, "row", "uiLayoutRow");
parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to
put items in.");
RNA_def_function_return(func, parm);
+ RNA_def_function_ui_description(func, "Sub-layout. Items placed in this
sublayout are placed next to each other in a row.");
RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
-
+
func= RNA_def_function(srna, "column", "uiLayoutColumn");
parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to
put items in.");
RNA_def_function_return(func, parm);
+ RNA_def_function_ui_description(func, "Sub-layout. Items placed in this
sublayout are placed under each other in a column.");
RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
func= RNA_def_function(srna, "column_flow", "uiLayoutColumnFlow");
@@ -144,7 +146,8 @@
func= RNA_def_function(srna, "box", "uiLayoutBox");
parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to
put items in.");
RNA_def_function_return(func, parm);
-
+ RNA_def_function_ui_description(func, "Sublayout. Items placed in this
sublayout are placed under each other in a column and are surrounded by a
box.");
+
/* split layout */
func= RNA_def_function(srna, "split", "uiLayoutSplit");
parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to
put items in.");
@@ -154,6 +157,7 @@
/* items */
func= RNA_def_function(srna, "prop", "rna_uiItemR");
+ RNA_def_function_ui_description(func, "Item. Exposes an RNA item and
places it into the layout.");
api_ui_item_rna_common(func);
api_ui_item_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more
detail.");
@@ -192,6 +196,7 @@
parm= RNA_def_pointer(func, "properties", "OperatorProperties", "",
"Operator properties to fill in, return when 'properties' is set to true.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
RNA_def_function_return(func, parm);
+ RNA_def_function_ui_description(func, "Item. Places a button into the
layout to call an Operator.");
/* func= RNA_def_function(srna, "operator_enum", "uiItemEnumO_string");
api_ui_item_op_common(func);
@@ -241,6 +246,7 @@
RNA_def_property_flag(parm, PROP_REQUIRED); */
func= RNA_def_function(srna, "label", "uiItemL");
+ RNA_def_function_ui_description(func, "Item. Display text in the
layout.");
api_ui_item_common(func);
func= RNA_def_function(srna, "menu", "uiItemM");
@@ -250,6 +256,7 @@
RNA_def_property_flag(parm, PROP_REQUIRED);
func= RNA_def_function(srna, "separator", "uiItemS");
+ RNA_def_function_ui_description(func, "Item. Inserts empty space into
the layout between items.");
/* context */
func= RNA_def_function(srna, "set_context_pointer",
"uiLayoutSetContextPointer");
@@ -306,6 +313,7 @@
func= RNA_def_function(srna, "template_modifier", "uiTemplateModifier");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ RNA_def_function_ui_description(func, "Layout . Generates the UI layout
for modifiers.");
parm= RNA_def_pointer(func, "data", "Modifier", "", "Modifier data.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to
put items in.");
@@ -313,6 +321,7 @@
RNA_def_boolean(func, "compact", 0, "", "Show a smaller version of the
template, split on two lines.");
func= RNA_def_function(srna, "template_constraint",
"uiTemplateConstraint");
+ RNA_def_function_ui_description(func, "Layout . Generates the UI layout
for constraints.");
parm= RNA_def_pointer(func, "data", "Constraint", "", "Constraint
data.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to
put items in.");
@@ -320,30 +329,36 @@
RNA_def_boolean(func, "compact", 0, "", "Show a smaller version of the
template, split on two lines.");
func= RNA_def_function(srna, "template_preview", "uiTemplatePreview");
+ RNA_def_function_ui_description(func, "Item. A preview window for
materials, textures, lamps, etc.");
parm= RNA_def_pointer(func, "id", "ID", "", "ID datablock.");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_pointer(func, "parent", "ID", "", "ID datablock.");
RNA_def_pointer(func, "slot", "TextureSlot", "", "Texture slot.");
func= RNA_def_function(srna, "template_curve_mapping",
"uiTemplateCurveMapping");
+ RNA_def_function_ui_description(func, "Item. A curve mapping widget
used for e.g falloff curves for lamps.");
api_ui_item_rna_common(func);
RNA_def_enum(func, "type", curve_type_items, 0, "Type", "Type of curves
to display.");
RNA_def_boolean(func, "levels", 0, "", "Show black/white levels.");
RNA_def_boolean(func, "brush", 0, "", "Show brush options.");
func= RNA_def_function(srna, "template_color_ramp",
"uiTemplateColorRamp");
+ RNA_def_function_ui_description(func, "Item. A color ramp widget.");
api_ui_item_rna_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more
detail.");
func= RNA_def_function(srna, "template_histogram",
"uiTemplateHistogram");
+ RNA_def_function_ui_description(func, "Item. A histogramm widget to
analyze imaga data.");
api_ui_item_rna_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more
detail.");
func= RNA_def_function(srna, "template_waveform", "uiTemplateWaveform");
+ RNA_def_function_ui_description(func, "Item. A waveform widget to
analyze imaga data.");
api_ui_item_rna_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more
detail.");
func= RNA_def_function(srna, "template_vectorscope",
"uiTemplateVectorscope");
+ RNA_def_function_ui_description(func, "Item. A vectorscope widget to
analyze imaga data.");
api_ui_item_rna_common(func);
RNA_def_boolean(func, "expand", 0, "", "Expand button to show more
detail.");
@@ -357,6 +372,7 @@
RNA_def_property_flag(parm, PROP_REQUIRED);
func= RNA_def_function(srna, "template_color_wheel",
"uiTemplateColorWheel");
+ RNA_def_function_ui_description(func, "Item. A color wheel widget to
pick colors.");
api_ui_item_rna_common(func);
RNA_def_boolean(func, "value_slider", 0, "", "Display the value slider
to the right of the color wheel");
RNA_def_boolean(func, "lock", 0, "", "Lock the color wheel display to
value 1.0 regardless of actual color");
@@ -374,6 +390,7 @@
RNA_def_property_flag(parm, PROP_REQUIRED);
func= RNA_def_function(srna, "template_image", "uiTemplateImage");
+ RNA_def_function_ui_description(func, "Item(s). User interface for
selecting images and their source paths.");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
parm= RNA_def_pointer(func, "image_user", "ImageUser", "", "");
@@ -381,6 +398,7 @@
RNA_def_boolean(func, "compact", 0, "", "Use more compact layout.");
func= RNA_def_function(srna, "template_list", "uiTemplateList");
+ RNA_def_function_ui_description(func, "Item. A list widget to display
data. e.g. vertexgroups.");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to
take property.");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
Modified: trunk/blender/source/blender/python/intern/bpy.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy.c 2010-08-07 16:21:15 UTC
(rev 31146)
+++ trunk/blender/source/blender/python/intern/bpy.c 2010-08-07 18:34:16 UTC
(rev 31147)
@@ -65,7 +65,7 @@
static char bpy_blend_paths_doc[] =
".. function:: blend_paths(absolute=False)\n"
"\n"
-" Returns a list of paths associated with this blend file.\n"
+" Returns a list of paths to external files referenced by the loaded .blend
file.\n"
@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs