Hello, everyone. I know this is getting older. After having looked at the Blender Python API, and some other sources on the internet, I have managed to come up with this method of getting the correct vertices from the correct bones - all as integers. Here's the code if anyone wants to use it. I know it's not the nicest…
You know, I've never ever written a script that didn't have an error in it, hahaha. The error is... That .group attribute is an integer index into the .vertex_groups collection of the object, not a reference to the vertex-group itself. So it should really be this: vertexGroupsExport = {group.name:[ ] for group in…
Hey, RN. Thank you! Most of my models are low polygon - generally 550 triangles or less. So, I don't think my code is too bad. I'm probably very wrong, though. But, I'll definitely keep this dictionary method in mind. I'm beginning to see why you do it this way. Not only does it take up less code - but it looks like it's…
I managed to get this. It appears to be working properly. I added arrays for bone and vertex IDs, and appended values to them. Here's my edited code: # Armature Test import bpy path = 'C:\\Users\\USER\\Desktop\\User\\Models\\LowPoly\\Model.txt' outfile = open(path, 'w') ob = bpy.context.object bone_ids = []
vert_ids = []…
@MrSquetch good to see you producing, keep going! A recommendation: looping through all vertices of a mesh should be done with extreme care, because it might be a very long loop.In your case it's a magnitude larger, looping through all vertices per each vertex group. If you want to associate a vertex group with the…