can´t make uv and return attributes in the same execution #25854
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#25854
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
%%%This is a problem that i have with uv in python
As i sad in title we can´t make a new uv (MeshTextureFaceLayer) and return yours attributes in the same execution.
Trying this:
import bpy
obj = bpy.context.active_object
mesh = obj.data
uvtex = bpy.ops.mesh.uv_texture_add()
print(dir(uvtex))
we get the list:
['and', 'class', 'contains', 'delattr', 'doc', 'eq', '__
format__', 'ge', 'getattribute', 'gt', 'hash', 'iand', 'in
it', 'ior', 'isub', 'iter', 'ixor', 'le', 'len', '__lt
__', 'ne', 'new', 'or', 'rand', 'reduce', 'reduce_ex', '
repr', 'ror', 'rsub', 'rxor', 'setattr', 'sizeof', 'st
r', 'sub', 'subclasshook', 'xor', 'add', 'clear', 'copy', 'differe
nce', 'difference_update', 'discard', 'intersection', 'intersection_update', 'is
disjoint', 'issubset', 'issuperset', 'pop', 'remove', 'symmetric_difference', 's
ymmetric_difference_update', 'union', 'update']
but with the uv created and trying this:
import bpy
obj = bpy.context.active_object
mesh = obj.data
uvtex = mesh.uv_textures.active
print(dir(uvtex))
we get this:
['doc', 'module', 'slots', 'active', 'active_clone', 'active_render'
, 'bl_rna', 'data', 'name', 'rna_type']
As would be...
This bug is crashing the script template "uv Operator" of Trunk
Any idea?
Bye!%%%
Changed status to: 'Open'
%%%More stuff for campbell :)%%%
%%%Operators never return data like this, we have rna functions which work as you are expecting.
most collections have load/new/add functions as well as equivalents for removing.
---
import bpy
obj = bpy.context.active_object
uvlayer = obj.data.uv_textures.new()%%%
Changed status from 'Open' to: 'Archived'