Merged changes in the trunk up to revision 48505.
This commit is contained in:
@@ -58,12 +58,9 @@ class MeshMirrorUV(Operator):
|
||||
vcos = (v.co.to_tuple(5) for v in mesh.vertices)
|
||||
|
||||
for i, co in enumerate(vcos):
|
||||
if co[0] > 0.0:
|
||||
mirror_gt[co] = i
|
||||
elif co[0] < 0.0:
|
||||
mirror_lt[co] = i
|
||||
else:
|
||||
if co[0] >= 0.0:
|
||||
mirror_gt[co] = i
|
||||
if co[0] <= 0.0:
|
||||
mirror_lt[co] = i
|
||||
|
||||
#for i, v in enumerate(mesh.vertices):
|
||||
@@ -97,14 +94,13 @@ class MeshMirrorUV(Operator):
|
||||
puvsel[i] = (False not in
|
||||
(uv.select for uv in uv_loops[lstart:lend]))
|
||||
# Vert idx of the poly.
|
||||
vidxs[i] = tuple(sorted(l.vertex_index
|
||||
for l in loops[lstart:lend]))
|
||||
vidxs[i] = tuple(l.vertex_index for l in loops[lstart:lend])
|
||||
# As we have no poly.center yet...
|
||||
pcents[i] = tuple(map(lambda x: x / p.loop_total,
|
||||
map(sum, zip(*(verts[idx].co
|
||||
for idx in vidxs[i])))))
|
||||
# Preparing next step finding matching polys.
|
||||
mirror_pm[vidxs[i]] = i
|
||||
mirror_pm[tuple(sorted(vidxs[i]))] = i
|
||||
|
||||
for i in range(nbr_polys):
|
||||
# Find matching mirror poly.
|
||||
|
||||
@@ -32,6 +32,7 @@ class NODE_HT_header(Header):
|
||||
snode = context.space_data
|
||||
snode_id = snode.id
|
||||
id_from = snode.id_from
|
||||
toolsettings = context.tool_settings
|
||||
|
||||
row = layout.row(align=True)
|
||||
row.template_header()
|
||||
@@ -86,6 +87,13 @@ class NODE_HT_header(Header):
|
||||
|
||||
layout.separator()
|
||||
|
||||
# Snap
|
||||
row = layout.row(align=True)
|
||||
row.prop(toolsettings, "use_snap", text="")
|
||||
row.prop(toolsettings, "snap_node_element", text="", icon_only=True)
|
||||
if toolsettings.snap_node_element != 'INCREMENT':
|
||||
row.prop(toolsettings, "snap_target", text="")
|
||||
|
||||
layout.template_running_jobs()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user