From BlenderWiki

Jump to: navigation, search
Blender3D FreeTip.gif
IMPORTANT! Do not update this page!
We have moved the Blender User Manual to a new location. Please do not update this page, as it will be locked soon.


Page status (reviewing guidelines)

Partial page
Proposed fixes: none

Introduction

Since we are working with new and improving Python API, if you have something that needs to be answered, please add it here. We will find answers from dev's if we do not know them and provide an answer here.

Geometry

How can I generate a mesh object using the API?

Download this code example Script_GeneratePyramidMesh.py and run it from the Text Window.

How do I apply a modifier using the API?

 bpy.ops.object.convert(target='MESH', keep_original=False)

All the modifiers in the stack will be applied.

In case you just want to apply only the subsurf modifier and leave others alone, and create a new mesh (Old mesh will retain all its modifiers), the following code shows one way of doing it.

 for modifier in bpy.context.object.modifiers:
     if modifier.type != 'SUBSURF':
         modifier.show_render=True
 bpy.ops.object.convert(target='MESH', '''keep_original=True''')

How do I get the world coordinates of a control vertex of a BezierCurve?

wmtx = bpy.context.active_object.matrix_world
 
localCoord = bpy.context.active_object.data.splines[0].bezier_points[1].co
 
worldCoord = wmtx * localCoord

Manual-Part20-scripting-faq-CV-in-world-coords.png

More info...

How do I select/deselect the control points of a Curve

Method 1

Manual-Part20-scripting-faq-select-curve-control-point-method-1.png

curve = bpy.context.selected_objects[0]
 
curve.data.splines[0].bezier_points[0].select_control_point = True
curve.data.splines[0].bezier_points[2].select_control_point = True

Method 2

Manual-Part20-scripting-faq-select-curve-control-point-method-2.png

bpy.context.active_object.data.splines[0].bezier_points[0].select_control_point = True

More info...

Materials

How to link a mesh/object to a material?

TODO

Customization

How do I automate custom hotkeys?



Blender3D FreeTip.gif
This is the old manual!
For the current 2.7x manual see http://www.blender.org/manual/


User Manual

World and Ambient Effects

World

Introduction
World Background

Ambient Effects

Mist
Stars (2.69)

Extending Blender

Introduction

Introduction

Python Scripting

Python Scripting in Blender
Using Add-Ons
Quick Python Tutorial
Interactive Console
The Text Editor
Frequently Asked Questions
Scripting Security
References

Available Scripts

Script Catalog



Game Engine

Introduction

Introduction to the Game Engine
Game Logic Screen Layout

Logic

Logic Properties and States
The Logic Editor

Sensors

Introduction to Sensors
Sensor Editing
Common Options
-Actuator Sensor
-Always Sensor
-Collision Sensor
-Delay Sensor
-Joystick Sensor
-Keyboard Sensor
-Message Sensor
-Mouse Sensor
-Near Sensor
-Property Sensor
-Radar Sensor
-Random Sensor
-Ray Sensor
-Touch Sensor

Controllers

Introduction
Controller Editing
-AND Controller
-OR Controller
-NAND Controller
-NOR Controller
-XOR Controller
-XNOR Controller
-Expression Controller
-Python Controller

Actuators

Introduction
Actuator Editing
Common Options
-2D Filters Actuator
-Action Actuator
-Camera Actuator
-Constraint Actuator
-Edit Object Actuator
-Game Actuator
-Message Actuator
-Motion Actuator
-Parent Actuator
-Property Actuator
-Random Actuator
-Scene Actuator
-Sound Actuator
-State Actuator
-Steering Actuator
-Visibility Actuator

Game Properties

Introduction
Property Editing

Game States

Introduction

Camera

Introduction
Camera Editing
Stereo Camera
Dome Camera

World

Introduction

Physics

Introduction
Material Physics
No Collision Object
Static Object
Dynamic Object
Rigid Body Object
Soft Body Object
Vehicle Controller
Sensor Object
Occluder Object

Path Finding

Navigation Mesh Modifier

Game Performance

Introduction
System
Display
Framerate and Profile
Level of Detail

Python API

Introduction
Bullet physics
VideoTexture

Deploying

Standalone Player
Licensing of Blender Game

Android Support

Android Game development