diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-09-17 04:14:47 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-09-17 04:14:47 +0400 |
commit | 1934ee422a47f7dcc5e63cfff5811873798561d8 (patch) | |
tree | 52608f0324495db3a54bababc9357218528e0d8e /release/ui | |
parent | 4a15b40c37fc36a041c2d20dbcadbcf9d258c583 (diff) |
rna function api was overwriting useful errors with keyword errors.
fix some missing checks in the python interface.
Diffstat (limited to 'release/ui')
-rw-r--r-- | release/ui/buttons_data_mesh.py | 3 | ||||
-rw-r--r-- | release/ui/buttons_material.py | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/release/ui/buttons_data_mesh.py b/release/ui/buttons_data_mesh.py index 33b3960b381..8796d7a46a8 100644 --- a/release/ui/buttons_data_mesh.py +++ b/release/ui/buttons_data_mesh.py @@ -102,7 +102,8 @@ class DATA_PT_shape_keys(DataButtonsPanel): kb = ob.active_shape_key row = layout.row() - row.template_list(key, "keys", ob, "active_shape_key_index", rows=2) + if key: # XXX - looks crappy + row.template_list(key, "keys", ob, "active_shape_key_index", rows=2) col = row.column() diff --git a/release/ui/buttons_material.py b/release/ui/buttons_material.py index 9f1c216c36b..8b58c2b8953 100644 --- a/release/ui/buttons_material.py +++ b/release/ui/buttons_material.py @@ -65,8 +65,9 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel): elif mat: split.template_ID(space, "pin_id") split.itemS() - - layout.itemR(mat, "type", expand=True) + + if mat: + layout.itemR(mat, "type", expand=True) class MATERIAL_PT_shading(MaterialButtonsPanel): __label__ = "Shading" |