Hi everyone,
and firstly thankyou in advance!
I decided that it was finally time i learnt some simple scripting in blender.
I have no other experience, and found the wiki rather confusing.
from what I picked up, i got an idea of the basic structure of scripting, and how to explain things to the computer.
The best way to learn, i decided would be to try and make a simple script and learn my way through it. it is a simple code designed to remove uneeded verticies along a straight line (kind of like decimate), I will add the third dimension when i feel i can, but for now it’s just 2d. so far I have planned out what i think it will look like [just how it will work essentially]:
#get all the locations
location of vertex 1x = ax
location of vertex 1y = ay
location of vertex 2x = bx
location of vertex 2y = by
location of vertex 3x = cx
location of vertex 3y = cy
#if the percentage increase of the two values is the same, delete the middle vertex and connect the two remaining verticies
if {(bx/cx) = (ax/bx)} and {(by/cy) = (ay/by)}
if
true:{
delete vertex 2
select vertex 1
select vertex 3
make face
goto [next bit]
}
else:{
goto [next bit]
}
but that’s only the start
my queries were:
- how can I make this into a real script? I’m still not familiar with the categories that each of these commands would come under, how to word my commands.
2.I know commands like “bpy.data.objects” and using them to move objects, but i could do with a big list of them all, where can i get this?
It’s quite frustrating, as I know what I want to do, hence the commands, but I can’t even start to put it into a script!
thank you everyone, these really are my first blind footsteps, and in the meantime, i’ll keep reading things and try to make sense of them.