Is there a way to select all islands on a certain UDIM tile?
Using the console, and my newly crafted search function that I posted earlier:
Then the dir function . . .
[‘class’, ‘contains’, ‘delattr’, ‘delitem’, ‘dir’, ‘doc’, ‘eq’, ‘format’, ‘ge’, ‘getattribute’, ‘getitem’, ‘gt’, ‘hash’, ‘init’, ‘init_subclass’, ‘le’, ‘lt’, ‘module’, ‘ne’, ‘new’, ‘reduce’, ‘reduce_ex’, ‘repr’, ‘setattr’, ‘setitem’, ‘sizeof’, ‘slots’, ‘str’, ‘subclasshook’, ‘as_pointer’, ‘bl_rna’, ‘bl_rna_get_subclass’, ‘bl_rna_get_subclass_py’, ‘driver_add’, ‘driver_remove’, ‘get’, ‘id_data’, ‘is_property_hidden’, ‘is_property_overridable_library’, ‘is_property_readonly’, ‘is_property_set’, ‘items’, ‘keyframe_delete’, ‘keyframe_insert’, ‘keys’, ‘path_from_id’, ‘path_resolve’, ‘pop’, ‘property_overridable_library_set’, ‘property_unset’, ‘type_recast’, ‘values’]
This might be what you are looking for but I know very little about UDIM tiles . . . evidently there is a key that is used to get one.
… method:: get(key, default=None)
Returns the value of the custom property assigned to key or default
when not found (matches Python’s dictionary function of the same name).
:arg key: The key associated with the custom property.
:type key: string
:arg default: Optional argument for the value to return if
key is not found.
:type default: Undefined
Only the :class:
bpy.types.PoseBoneclasses support custom properties.
Or… you could just type UDIM into the documentation search and get all of that information and more. I don’t mean to diminish your hard work, but it’s hard enough getting people to actually look at the API’s extensive documentation without thinking they need to run a script and do it via the console.
That said, in this case neither would actually help the OP as UDIMs are just a way of assigning textures to the UV coordinate space and the geometry itself is not aware of UDIMS at all. The only way to determine which udim an island is located on is to look at the individual UV coordinates and see if they are outside of 0,1 space. I’ll go a step further than that as say that there is no way at all to determine any information about an island since Blender has no concept of an “island” at the API level, you would need to look at individual UV coordinates and make your determination based off of that.
Likely, that capability is just not written into the source code yet.
As for the search program, I hate the API, and in my own somewhat biased opinion, the biggest problem is that it almost never provides any type of example code, to my knowledge, it does not have any good ways of globally searching it, and on top of that, it is much slower to muddle through. That does not mean that I never use it, it just means that I prefer other methods.
Thanks guys! I didn’t find any API options for such operations either. Will wait until such features are implemented.
I wouldn’t hold your breath. bmesh has been around for about 11 years now and there is no concept of “UV islands” in the api. Since UDIM has nothing to do with geometry and everything to do with images, there is very little reason to believe (and therefore hope) that such functionality will ever appear in the API.
This is one of those situations where, if you want something done, you will likely need to do it yourself.
Well, that is how a lot of it gets done, someone happens to have a need for it and decides to do it. I am like, not so good with the texturing end of things, most of my coding has involved modeling, I suppose I should try to push the envelope more.
You might try asking the guy that wrote this info on bmesh, this guy obviously could steer you in the right direction, he knows bmesh like the back of his hand. You will probably appreciate the tutorials too. https://behreajj.medium.com/shaping-models-with-bmesh-in-blender-2-9-2f4fcc889bf0
If you are looking to texture one specific area, what you could try doing is selecting the vertices that surround that area, then moving into FACE mode. I am not sure how feasible that is because as I said earlier, materials and textures are not my forté.