diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 22 | ||||
-rw-r--r-- | source/blender/python/intern/bpy.c | 2 |
3 files changed, 28 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 9ace62996ea..e13483bf87a 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -545,10 +545,11 @@ static void rna_def_ui_layout(BlenderRNA *brna) 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 @@ static void rna_def_ui_layout(BlenderRNA *brna) 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 @@ static void rna_def_menu(BlenderRNA *brna) /* 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", "", ""); diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 1c751433e31..032aa731e0f 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -127,11 +127,13 @@ void RNA_api_ui_layout(StructRNA *srna) 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 @@ void RNA_api_ui_layout(StructRNA *srna) 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 @@ void RNA_api_ui_layout(StructRNA *srna) /* 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 @@ void RNA_api_ui_layout(StructRNA *srna) 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 @@ void RNA_api_ui_layout(StructRNA *srna) 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 @@ void RNA_api_ui_layout(StructRNA *srna) 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 @@ void RNA_api_ui_layout(StructRNA *srna) 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 @@ void RNA_api_ui_layout(StructRNA *srna) 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 @@ void RNA_api_ui_layout(StructRNA *srna) 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 @@ void RNA_api_ui_layout(StructRNA *srna) 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 @@ void RNA_api_ui_layout(StructRNA *srna) 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 @@ void RNA_api_ui_layout(StructRNA *srna) 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); diff --git a/source/blender/python/intern/bpy.c b/source/blender/python/intern/bpy.c index 7933c2a1bc7..7ca1b365c6f 100644 --- a/source/blender/python/intern/bpy.c +++ b/source/blender/python/intern/bpy.c @@ -65,7 +65,7 @@ PyObject *bpy_script_paths(PyObject *self) 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" "\n" " :arg absolute: When true the paths returned are made absolute.\n" " :type absolute: boolean\n" |