Freestyle: New line style options for sorting and chain selection.
The following two sort keys are added for sorting chains. * Projected X - Sort by the projected X value in the image coordinate system. * Projected Y - Sort by the projected Y value in the image coordinate system. A new line style option for the selection of first N chains is also added. Moreover, the chain sorting and chain selection operations are now executed in this order instead of the reverse order used previously. The UI has also changed accordingly. This functional change is backward compatible and won't result in visual differences.
This commit is contained in:
@@ -579,6 +579,20 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel,
|
||||
sub.prop(linestyle, "split_dash3", text="D3")
|
||||
sub.prop(linestyle, "split_gap3", text="G3")
|
||||
|
||||
## Sorting
|
||||
layout.prop(linestyle, "use_sorting", text="Sorting:")
|
||||
col = layout.column()
|
||||
col.active = linestyle.use_sorting
|
||||
row = col.row(align=True)
|
||||
row.prop(linestyle, "sort_key", text="")
|
||||
sub = row.row()
|
||||
sub.active = linestyle.sort_key in {'DISTANCE_FROM_CAMERA',
|
||||
'PROJECTED_X',
|
||||
'PROJECTED_Y'}
|
||||
sub.prop(linestyle, "integration_type", text="")
|
||||
row = col.row(align=True)
|
||||
row.prop(linestyle, "sort_order", expand=True)
|
||||
|
||||
## Selection
|
||||
layout.label(text="Selection:")
|
||||
split = layout.split(align=True)
|
||||
@@ -589,25 +603,18 @@ class RENDERLAYER_PT_freestyle_linestyle(RenderLayerFreestyleEditorButtonsPanel,
|
||||
sub = row.row()
|
||||
sub.active = linestyle.use_length_min
|
||||
sub.prop(linestyle, "length_min")
|
||||
# Second column
|
||||
col = split.column()
|
||||
row = col.row(align=True)
|
||||
row.prop(linestyle, "use_length_max", text="")
|
||||
sub = row.row()
|
||||
sub.active = linestyle.use_length_max
|
||||
sub.prop(linestyle, "length_max")
|
||||
|
||||
## Sorting
|
||||
layout.prop(linestyle, "use_sorting", text="Sorting:")
|
||||
col = layout.column()
|
||||
col.active = linestyle.use_sorting
|
||||
# Second column
|
||||
col = split.column()
|
||||
row = col.row(align=True)
|
||||
row.prop(linestyle, "sort_key", text="")
|
||||
row.prop(linestyle, "use_chain_count", text="")
|
||||
sub = row.row()
|
||||
sub.active = linestyle.sort_key in {'DISTANCE_FROM_CAMERA'}
|
||||
sub.prop(linestyle, "integration_type", text="")
|
||||
row = col.row(align=True)
|
||||
row.prop(linestyle, "sort_order", expand=True)
|
||||
sub.active = linestyle.use_chain_count
|
||||
sub.prop(linestyle, "chain_count")
|
||||
|
||||
## Caps
|
||||
layout.label(text="Caps:")
|
||||
|
Reference in New Issue
Block a user