mesh.uv_textures.new() creates a MeshColorLayer #23472

Closed
opened 2010-08-24 03:27:37 +02:00 by Thomas Larsson · 3 comments
Member

%%%Moreover, even the MeshColorLayer data seem to be gone.
Blender rev 31541


import bpy
ob = bpy.context.object

uvtex = ob.data.uv_textures.new('MyUVs')
print("UvTexture", uvtex)
print(dir(uvtex.data))

vcol = ob.data.vertex_colors.new('MyColors')
print("\nVertexColor", vcol)
print(dir(vcol.data))

uv1 = uvtex.data.uv1
print(uv1)

                - Output

UvTexture <bpy_struct, MeshColorLayer("")>
['contains', 'delattr', 'doc', 'getattribute', 'getitem', 'iter', 'len', 'setattr', 'add', 'foreach_get', 'foreach_set', 'get', 'items', 'keys', 'move', 'remove', 'values']

VertexColor <bpy_struct, MeshColorLayer("")>
['contains', 'delattr', 'doc', 'getattribute', 'getitem', 'iter', 'len', 'setattr', 'add', 'foreach_get', 'foreach_set', 'get', 'items', 'keys', 'move', 'remove', 'values']
Traceback (most recent call last):

File "/home/thomas/myblends/mat.blend/uvtex.py", line 14, in <module>

AttributeError: 'bpy_prop_collection' object has no attribute 'uv1'
%%%

%%%Moreover, even the MeshColorLayer data seem to be gone. Blender rev 31541 -------------- import bpy ob = bpy.context.object uvtex = ob.data.uv_textures.new('MyUVs') print("UvTexture", uvtex) print(dir(uvtex.data)) vcol = ob.data.vertex_colors.new('MyColors') print("\nVertexColor", vcol) print(dir(vcol.data)) uv1 = uvtex.data.uv1 print(uv1) - Output UvTexture <bpy_struct, MeshColorLayer("")> ['__contains__', '__delattr__', '__doc__', '__getattribute__', '__getitem__', '__iter__', '__len__', '__setattr__', 'add', 'foreach_get', 'foreach_set', 'get', 'items', 'keys', 'move', 'remove', 'values'] VertexColor <bpy_struct, MeshColorLayer("")> ['__contains__', '__delattr__', '__doc__', '__getattribute__', '__getitem__', '__iter__', '__len__', '__setattr__', 'add', 'foreach_get', 'foreach_set', 'get', 'items', 'keys', 'move', 'remove', 'values'] Traceback (most recent call last): ``` File "/home/thomas/myblends/mat.blend/uvtex.py", line 14, in <module> ``` AttributeError: 'bpy_prop_collection' object has no attribute 'uv1' %%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'

%%%fixed on revision 31553.
there is no uv1 = uvtex.data.uv1 though. The uv is now a collection of uvs in the mesh.
I'm closing it now, but let me know if you still find it buggy.

Thanks for reporting it.%%%

%%%fixed on revision 31553. there is no uv1 = uvtex.data.uv1 though. The uv is now a collection of uvs in the mesh. I'm closing it now, but let me know if you still find it buggy. Thanks for reporting it.%%%

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#23472
No description provided.