Can anyone tell me what scripts do and what they are for

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
Flurp89
Posts: 0
Joined: Mon Feb 07, 2005 7:54 pm
Contact:

Can anyone tell me what scripts do and what they are for

Post by Flurp89 »

I am only a beginner to blender, i found a great tutorial on most of blenders features but it did not have anything on how to use scripts for the game engine, i can sort of use the game engine but at only a very beginnners level, could any one tell me what the scripts do and how to use them? please! :wink:

Vek
Posts: 0
Joined: Wed Nov 24, 2004 7:42 am

Post by Vek »

Scripts for blender are written in python, the programming language. They are just text files.

Scripts can have a GUI (buttons, etc), and do things when you click on the buttons.
For example, construct objects, modify meshes, move things around, change materials, basically, edit the data, animations, whatever.

Scripts can also have no gui, and simply run once. Scripts formatted in a certain way and placed in a folder automatically appear on the menu and can be activated by choosing them from the menu.

Scripts can also be linked to a single object, ("scriptlink"), and automatically run whenever something happens to that object, such as whenever the next frame occurs.

Scripts can also render stuff using OpenGL, and respond to mouse and keyboard.

Its pretty versatile compared to just about any other 3D package out there.

As for how to write scripts, you can start here

http://www.blender.org/modules/document ... 11087.html

And then go to

http://www.blender.org/modules/document ... index.html

to find out all the things you can do with the script, and

http://www.python.org/

to download python, which you will need installed to write your own scripts.

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri »

Vek wrote:Its pretty versatile compared to just about any other 3D package out there.
Yes it's almost as good as MEL.

theeth
Posts: 500
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Post by theeth »

joeri wrote:
Vek wrote:Its pretty versatile compared to just about any other 3D package out there.
Yes it's almost as good as MEL.
I do hope you're kidding. While the API is not as good, Python being a real programming language puts it miles ahead of MEL in the versatility departement.

Martin
Life is what happens to you when you're busy making other plans.
- John Lennon

joeri
Posts: 96
Joined: Fri Jan 10, 2003 6:41 pm
Contact:

Post by joeri »

theeth wrote:
joeri wrote:
Vek wrote:Its pretty versatile compared to just about any other 3D package out there.
Yes it's almost as good as MEL.
I do hope you're kidding. While the API is not as good, Python being a real programming language puts it miles ahead of MEL in the versatility departement.

Martin
At least MEL gives access to ALL parts of Maya. Better even; Maya = MEL.
Not only can I access ALL data but also ALL functions and ALL commands.
That's all I want from a scripting language inside a 3d package.

So no, I'm not kidding.
Unless Vek is saying that a program language is more versatile in programming then a 3d package, but that's just a silly statement to make, so I assumed he did not meant that.
From a "in 3d app scripting language" point of view the blender one is pretty weak. Even max has a better one.

And another thing: Maybe python is TO versatile. MEL is easy to understand for none programmers, making it easier to use for artists that are not programmers, and that's the largest user group of the app.

This all sounds like I'm not happy with python in blender, that's not true, I think python in blender is a good thing. It needs a little more work. But what doesn't?

theeth
Posts: 500
Joined: Wed Oct 16, 2002 5:47 am
Location: Montreal
Contact:

Post by theeth »

Python as a language is more versatile than MEL with access to countless external libraries. What you're talking about is integration, not versatility.

Semantics, I know...

Martin
Life is what happens to you when you're busy making other plans.
- John Lennon

Vek
Posts: 0
Joined: Wed Nov 24, 2004 7:42 am

Post by Vek »

I just meant that you do have access to a lot of the program, through Python, and the number of areas you can access is increasing whenever a new build is released, perhaps eventually all areas will be covered.

I think the Python advantage is that there are countless external libraries that can be used too, with python - all of the zip/unzip, image handling, physics libraries, opengl, math libraries, etc etc, that aren't made for blender specifically, but are made for python - can be used in your scripts.

Perhaps MEL can do the same - I mean, perhaps there are ZIP, JPEG, ODE, database handling, device capture, rendering libraries for it. But I know there are for Python.

Post Reply