diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-10-28 00:57:14 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-10-28 00:57:14 +0400 |
commit | f0ca79bccb5e8290d02318b81aebdeb713180886 (patch) | |
tree | 06be5836fdcce2e69355326e7e6ce5985c3956f9 /release/scripts/startup/bl_ui/properties_render.py | |
parent | 510c69368b7382aa55f3fae0dac9ee6aaadee7e5 (diff) |
Extended the set of conditions for feature edge selection by edge types.
In the Parameter Editor mode, each edge type check button in the Selection
by Edge Types has now an associated toggle button to exclude the edge type
from the feature edge selection. This allows you to select, for instance,
those edges that are silhouette lines but not external contours.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_render.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_render.py | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 04d3ecb120f..e7aca0c9930 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -261,6 +261,17 @@ class RENDER_PT_freestyle_lineset(RenderButtonsPanel, Panel): return freestyle.mode == "EDITOR" and freestyle.linesets.active return False + def draw_edge_type_buttons(self, box, lineset, edge_type): + # property names + select_edge_type = "select_" + edge_type + exclude_edge_type = "exclude_" + edge_type + # draw edge type buttons + row = box.row(align=True) + row.prop(lineset, select_edge_type) + sub = row.column() + sub.prop(lineset, exclude_edge_type, text="") + sub.enabled = getattr(lineset, select_edge_type) + def draw(self, context): layout = self.layout @@ -293,17 +304,18 @@ class RENDER_PT_freestyle_lineset(RenderButtonsPanel, Panel): row = col.row() sub = row.column() - sub.prop(lineset, "select_silhouette") - sub.prop(lineset, "select_border") - sub.prop(lineset, "select_crease") - sub.prop(lineset, "select_ridge") - sub.prop(lineset, "select_valley") - sub.prop(lineset, "select_suggestive_contour") - sub.prop(lineset, "select_material_boundary") - sub.prop(lineset, "select_edge_mark") + self.draw_edge_type_buttons(sub, lineset, "silhouette") + self.draw_edge_type_buttons(sub, lineset, "border") + + self.draw_edge_type_buttons(sub, lineset, "crease") + self.draw_edge_type_buttons(sub, lineset, "ridge") + self.draw_edge_type_buttons(sub, lineset, "valley") + self.draw_edge_type_buttons(sub, lineset, "suggestive_contour") + self.draw_edge_type_buttons(sub, lineset, "material_boundary") + self.draw_edge_type_buttons(sub, lineset, "edge_mark") sub = row.column() - sub.prop(lineset, "select_contour") - sub.prop(lineset, "select_external_contour") + self.draw_edge_type_buttons(sub, lineset, "contour") + self.draw_edge_type_buttons(sub, lineset, "external_contour") col.separator() # XXX col.prop(lineset, "select_by_face_marks") |