| 1 | # Script to place markers on selected surfaces at each surface vertex.
|
|---|
| 2 |
|
|---|
| 3 | # Get selected surfaces.
|
|---|
| 4 | import Surface as S
|
|---|
| 5 | plist = S.selected_surface_pieces()
|
|---|
| 6 |
|
|---|
| 7 | # Create a new marker set.
|
|---|
| 8 | import VolumePath as VP
|
|---|
| 9 | if len(plist) > 0:
|
|---|
| 10 | mset = VP.Marker_Set('Markers %s' % plist[0].model.name)
|
|---|
| 11 |
|
|---|
| 12 | # Place markers on each surface vertex.
|
|---|
| 13 | rgba = (.6,.8,.7,1) # Color (red, green, blue, opacity)
|
|---|
| 14 | radius = 1 # Radius of marker sphere
|
|---|
| 15 | for p in plist:
|
|---|
| 16 | vertices, triangles = p.geometry
|
|---|
| 17 | for xyz in vertices:
|
|---|
| 18 | m = mset.place_marker(xyz, rgba, radius)
|
|---|