On yesterday I wrote my first python script for blender which removes/replaces redundant material definitions.
It works fine and I'm happy, because it does a great job. Before I used some hours of work and now the script does it automatically in just 5 minutes.
Now I want to write a script which scales all meshes of my scene.
It's easy to do in the object mode (select all and resize).
But I need to scale the meshes directly (in edit mode), because my model exporter uses the mesh dimensions.
My problem is that I can't select/scale all meshes together in edit mode.
There is a need to scale each single mesh (in edit mode), but I have more then 1000 meshes, which is not usable for manual scaling.
I need to know how to scale a mesh (in edit mode) by the Blender API. (Blender version 2.49b)
Unfortunately I couldn't find out the right properties of the Mesh class.
(Maybe I need do it by scaling the position values of the vertices?)
Here is an example how to get access to the name, material and vertices of a mesh.
Code: Select all
myMesh = Mesh.Get() # get a random mesh # access to properties: myMesh.name myMesh.materials myMesh.verts
I searched in the web and in different scripts for more than one hour. Also in the Blender API documentation I couldn't find help.
Any idea how to scale a mesh?