Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/startup/bl_operators/wm.py')
-rw-r--r--release/scripts/startup/bl_operators/wm.py64
1 files changed, 51 insertions, 13 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 335a2a633cd..b54ae67a9c5 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -87,8 +87,10 @@ def context_path_validate(context, data_path):
# One of the items in the rna path is None, just ignore this
value = Ellipsis
else:
- # We have a real error in the rna path, don't ignore that
- raise
+ # Print invalid path, but don't show error to the users and fully
+ # break the UI if the operator is bound to an event like left click.
+ print("context_path_validate error: context.%s not found (invalid keymap entry?)" % data_path)
+ value = Ellipsis
return value
@@ -1147,22 +1149,26 @@ rna_property = StringProperty(
rna_min = FloatProperty(
name="Min",
+ description="Minimum value of the property",
default=-10000.0,
precision=3,
)
rna_max = FloatProperty(
name="Max",
+ description="Maximum value of the property",
default=10000.0,
precision=3,
)
rna_use_soft_limits = BoolProperty(
name="Use Soft Limits",
+ description="Limits the Property Value slider to a range, values outside the range must be inputted numerically",
)
rna_is_overridable_library = BoolProperty(
name="Is Library Overridable",
+ description="Allow the property to be overridden when the Data-Block is linked",
default=False,
)
@@ -1177,6 +1183,7 @@ rna_vector_subtype_items = (
class WM_OT_properties_edit(Operator):
+ """Edit the attributes of the property"""
bl_idname = "wm.properties_edit"
bl_label = "Edit Property"
# register only because invoke_props_popup requires.
@@ -1468,6 +1475,7 @@ class WM_OT_properties_edit(Operator):
class WM_OT_properties_add(Operator):
+ """Add your own property to the data-block"""
bl_idname = "wm.properties_add"
bl_label = "Add Property"
bl_options = {'UNDO', 'INTERNAL'}
@@ -2417,7 +2425,14 @@ class WM_MT_splash(Menu):
col = split.column()
- col.label()
+ sub = col.split(factor=0.35)
+ row = sub.row()
+ row.alignment = 'RIGHT'
+ row.label(text="Language")
+ prefs = context.preferences
+ sub.prop(prefs.view, "language", text="")
+
+ col.separator()
sub = col.split(factor=0.35)
row = sub.row()
@@ -2459,14 +2474,6 @@ class WM_MT_splash(Menu):
label = "Blender Dark"
sub.menu("USERPREF_MT_interface_theme_presets", text=label)
- # We need to make switching to a language easier first
- #sub = col.split(factor=0.35)
- #row = sub.row()
- #row.alignment = 'RIGHT'
- # row.label(text="Language:")
- #prefs = context.preferences
- #sub.prop(prefs.system, "language", text="")
-
# Keep height constant
if not has_select_mouse:
col.label()
@@ -2478,8 +2485,8 @@ class WM_MT_splash(Menu):
row = layout.row()
sub = row.row()
- if bpy.types.PREFERENCES_OT_copy_prev.poll(context):
- old_version = bpy.types.PREFERENCES_OT_copy_prev.previous_version()
+ old_version = bpy.types.PREFERENCES_OT_copy_prev.previous_version()
+ if bpy.types.PREFERENCES_OT_copy_prev.poll(context) and old_version:
sub.operator("preferences.copy_prev", text="Load %d.%d Settings" % old_version)
sub.operator("wm.save_userpref", text="Save New Settings")
else:
@@ -2550,6 +2557,36 @@ class WM_MT_splash(Menu):
layout.separator()
+class WM_MT_splash_about(Menu):
+ bl_label = "About"
+
+ def draw(self, context):
+
+ layout = self.layout
+ layout.operator_context = 'EXEC_DEFAULT'
+
+ layout.label(text="Blender is free software")
+ layout.label(text="Licensed under the GNU General Public License")
+ layout.separator()
+ layout.separator()
+
+ split = layout.split()
+ split.emboss = 'PULLDOWN_MENU'
+ split.scale_y = 1.3
+
+ col1 = split.column()
+
+ col1.operator("wm.url_open_preset", text="Release Notes", icon='URL').type = 'RELEASE_NOTES'
+ col1.operator("wm.url_open_preset", text="Credits", icon='URL').type = 'CREDITS'
+ col1.operator("wm.url_open", text="License", icon='URL').url = "https://www.blender.org/about/license/"
+
+ col2 = split.column()
+
+ col2.operator("wm.url_open_preset", text="Blender Website", icon='URL').type = 'BLENDER'
+ col2.operator("wm.url_open", text="Blender Store", icon='URL').url = "https://store.blender.org"
+ col2.operator("wm.url_open_preset", text="Development Fund", icon='FUND').type = 'FUND'
+
+
class WM_OT_drop_blend_file(Operator):
bl_idname = "wm.drop_blend_file"
bl_label = "Handle dropped .blend file"
@@ -2619,4 +2656,5 @@ classes = (
BatchRenameAction,
WM_OT_batch_rename,
WM_MT_splash,
+ WM_MT_splash_about,
)