General

(return to Python)

    Answers in this category:

    1. Where can I learn how to program Python?
    2. Can you do scripting in Blender?
    3. My old python scripts don't work anymore!

    1 - Where can I learn how to program Python?

    Contributed by B@rt.

    First of all, pay a visit to https://www.python.org This is the general description of the language.

    Next, take a look at https://www.blender.nl/python - this page describes how Blender uses Python in the Game and Modeling/Animation sections.

    (top)

    2 - Can you do scripting in Blender?

    Contributed by B@rt.

    Blender uses Python as it's scripting language. You can learn more about Python @

    https://www.python.org

    and more about how Blender uses Python @

    https://www.blender.nl/python

    (top)

    3 - My old python scripts don't work anymore!

    Contributed by Zycho.

    With the release of Blender Creator 2.14 the API module previous to version 2.04 is available again under its old name 'Blender'. Most of the old scripts should run without changes. Documentation for this module can be found here:

    https://www.blender.nl/support/complete/scripting/index.php

    The Blender module has been extended by some features:
    Blender.Image module (read access to loaded images)
    Texture Face (per-face-UV) support
    Module search directory field in the User Settings
    Module import from text buffer (must have extension .py)

    The API module of version 2.10-2.12 still exists for compatibility, Mesh access though is broken and can crash Blender.

    Scripts using this API will have to be adapted by replacing

    import Blender

    with

    import Blender210

    In future releases, this API's syntax will live on top of the previous API. It is not recommended to write major applications using the Blender210 syntax. Documentation for this module can be found here:

    https://www.blender.nl/python/

    For examples, look at the demofiles for Blender Creator 2.14:

    https://www.blender.nl/download/

    uvtexture.blend example to animate textures, import from textbuffer
    uvtexture2.blend demonstrate setting of face flags/images
    docbrowser.blend Documentation browser of the modules

    (top)


    This Blender FAQ was generated on September 24, 2001, 8:40 am. For the most recent version and for searching the tutorial database, please visit the on-line version at https://helium.homeip.net/support