Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 88305

Python is an interactive, object-oriented programming language. In Blender, it is used as a general-purpose scripting language and to create add-ons to extend Blender's functionality.

2 votes
1 answer
5k views

Set light color from python script

I would like to specify the color of a light that I add using a python script launched from the command line: blender --python script.py The script: import bpy bpy.ops.object.light_add(type='AREA' … I noted a few weird thing: The current online documentation of blender python api says here that the color of a light is a "float array of 3 items", but I get en error if I don't give 4 values. …
T.L's user avatar
  • 143
2 votes
1 answer
865 views

read_factory_settings makes all other operators call fail in a python script ran at startup

I want to read a ply mesh at blender startup using a python script given in the command line: blender --python load_ply.py. … True) bpy.ops.import_mesh.ply(filepath='mesh.ply') It works fine until I use bpy.ops.wm.read_factory_settings(use_empty=True) to clear the scene before the import, which gives the following error: Python
T.L's user avatar
  • 143