On 13/03/2015 at 02:08, xxxxxxxx wrote:
Hi all,
I want to generate some polygons with a uv-Tag.
But something is going wrong:-(
The generation of the Polygon ist ok.
But the UV-tag sems to be empty ?!?
I searched in the forum but did not find any other example.
What is my fault?
for i in xrange (0, anz_poly) :
width = size_list[i*2]
height = size_list[i*2+1]
width_halbe = width / 2
height_halbe = height / 2
obj = c4d.PolygonObject(4, 1)
p1 = c4d.Vector(width_halbe, 0, 0)
p2 = c4d.Vector(width_halbe, height, 0)
p3 = c4d.Vector(-width_halbe, height, 0)
p4 = c4d.Vector(-width_halbe, 0, 0)
obj.SetAllPoints([p1,p2,p3,p4])
obj.SetPolygon(0, c4d.CPolygon(0, 1, 2, 3))
doc.InsertObject(obj)
# Generate UV-Tag
obj.MakeTag(c4d.Tuvw)
UVWTag = obj.GetTag(c4d.Tuvw)
print UVWTag
UVWTag.SetSlow(0, p1, p2, p3, p4)
Thanks a lot