Is Blender programmed in python?

I always thought that Blender is programmed in python. Once there was some talk about how slow is python in 3d then I said that Blender is fast, but he said that Blender is not programmed in python. I think he meant something in the basic system of Blender. I know there’s loads of python in Blender.

Is Blender fully programmed in python or are there other languages used too?

Blender is programmed in C++

But it has pythonintegration. In other words, you can make scripts in python to automatically perform casual tasks which usually takes a lot of time and just sucks majorly, amongst other stuff too, like exporting models to various formats.

Hope that helped.

Blender is coded in 3 languages; C, C++ and Python. Python is used as an internal scripting language for Blender, the majority of the Blender code is in C and C++

Scripting languages are used to perform various tasks within host programs. They’re not used for building the programs. It’s kinda like you, your parents and food. Your parents made you and food sustains you, but without your parents having first created you, food could do nothing for you because food cannot create you. Only mom and pop can do that. Also, you cannot eat your parrents, you can only eat food (unless you’re sick and twisted, of course).
Hope that helped.

Nice analogy.

The majority and foundations of blender are written in C. Only a few other modules like the game engine, boolean system, etc are in C++.

Was there a particular reason C was used over C++?

There’s loads of programs for Linux that are made in Python.

If i remember right, they started writing blender when C++ wasnt such popular, so they used C. :slight_smile:

This is true, and I write a lot of software in Python. Python is often sneered at as only being a “scripting” language, but it is actually a fully fledge programming language.

However, C programs run a bit faster than Python programs, so for a calculation-intensive program like Blender you’d want to use C.

In this case Python is the perfect choice for Blender scripts.

Why is it called C? and Not B, or E, or perhaps M?

Why is it called C? and Not B, or E, or perhaps M?

why u call yourself Falgor, not Mangor or Pangor?[/list]

Never answer a question with another question, please.

Why is it called C? and Not B, or E, or perhaps M?

C evolved from the programming language B

C’s advantages are that it is (1) small, (2) fast, (3) universal. Even before the GCC came along, nearly every platform you can think of had a C compiler. (Of course, the GCC is nice because now they all speak the same dialect of C.)

Most other programming languages get their start in C, simply because of its universality. Tcl/Tk, Python, etc.

What Python has over C is a powerful abstraction over data. For example, dictionaries and lists are trivial to use in Python, but would require a great deal of set-up and manipulation functions in C.

Also, scripted languages like Python are embeddable, or includable, in C code. This is useful both for internal things (C program using Python’s powers on itself) and for external interfaces (like Blender’s built-in Python interpreter).

Hope this helps.

Because it isn’t the first language of programming so it is no an A, but it isn’t second to anyone so it isn’t B.
They call C for this reason.

CiaU.

oh, now I C :wink:
Well not really, but not that horrible. It might be the first letter from Crazy.

C as Complex… :smiley:

and any scripting language is also a programming language. often script languages are considered more of toying or nitting together apps, mostly as in the sense of higher abstraction. in fact though everything that you can write ( and/or compile ) and that executes a well defined ( even if non-deterministic ) set of actions on a touring machine ( so too computer ) is called a ‘program’, hence you write it in a ‘programming’ language.

python is btw a lot slower than c. i don’t know who put that myth into the world. python is an interprated language, not like c beeing a compiled language. you can though compile python code into native modules but basically python is an interprater, not an assembler.

check this out, although it’s for 2.31

http://blender3d.org/cms/Code_History.118.0.html

300,557 lines: 211,035 lines C, 88,029 C++ and 894 Python.

No, as I already noted (see the post before yours), ‘C’ is the successor to ‘B’, which is an incomplete version of ‘BCPL’.

‘A’ (current incarnation is ‘A+’) was developed in 1988, which is nearly two decades after ‘C’ was developed by dmr, and did not figure in the naming of ‘C’.

‘A-0’, developed for UNIVAC computers in 1952 and was the first computer language to have a compiler, was not a general-purpose language in the sense we think of computer languages. I doubt that it figured in a decade where more powerful paradeigms like Algol, FORTRAN, and BCPL existed.

The best kinds of scripting languages are those that ‘byte-code-compile’, like Java, Tcl, and Basic. I don’t know much about Python. Does it do that?

Even so, any scripted language can never be as fast as a language that compiles to native machine code. For many cases this does not matter, for example with GUI interfacing… However, with heavy number-crunching it is noticeable; programs like Blender would be far too slow.

The friendly way (you might even say cavelier) that scripted languages handle data often impede true compilation to machine code. Systems exist which can get around this, but in the case of Python it would be hard-pressed to introduce significant speed-ups. (IMHO)

The Wikipedia has some good articles if you’re interested:
Programming Language (A general article)
C programming language
Dennis Ritchie
List of Programming Languages