Skip to main content

Questions tagged [scripting]

Questions concerning scripting in Blender using the Python programming language. Also use this tag for questions about scripting in OSL (Open Shading Language).

8 votes
2 answers
2k views

Is it possible to save certain parts of a screenshot

I'd like to reduce the time necessary to create screenshots. I want to skip reopening and cutting and saving. Instead I'd like to use a python script to determine the size of the part of the screen ...
Haunt_House's user avatar
  • 16.1k
10 votes
1 answer
1k views

Can armature/bones be edited without edit mode?

I was looking after some information about armature and bones, so I can continue my importer script. I found some nice info here; no BMesh, and simple enough for my needs as beginner, so just perfect. ...
Zéiksz's user avatar
  • 1,979
11 votes
2 answers
6k views

Is there a way to acces external .blend file's data with python script?

I'm writing an addon to parse a directory (and its sub-dirs) to write an XML file which describe the tree-structure of the assets contained in that directory. At the moment, my standalone script works ...
Polosson's user avatar
  • 6,574
19 votes
2 answers
15k views

How to create a mesh programmatically, without bmesh?

I do not want to use BMesh this time. I want to create a mesh programmatically, for this purpose I created this short script to see what I do wrong in my importer script. In this script I try to ...
Zéiksz's user avatar
  • 1,979
6 votes
1 answer
1k views

How does one obtain the file path of the current .blend in the bge?

Specifically, how does one obtain the path to the current .blend when the blender game engine is running?
Rakholl's user avatar
  • 325
7 votes
2 answers
1k views

Can I load 8bit bitmaps with Blender?

After looking at the documentation about supported file formats on wiki, I tried to use 8 bit BMP files as texture. (I know, old school, but I wanted to avoid conversions) However, the image appears ...
Zéiksz's user avatar
  • 1,979
13 votes
2 answers
7k views

How to add a "select path" input in a UI addon script?

I have to allow users of my addon to select a path via the directory browser window of blender. The path is already set in an external ".conf" file, but I need it to be customizable via blender GUI, ...
Polosson's user avatar
  • 6,574
15 votes
2 answers
9k views

How to unlink material from a mesh, with python script?

Blender 2.68a, Python 3.3 I would like to unlink material from a mesh, and even after googling a hour I don't know how to do it. I only saw scripts that work in Blender 2.5x only for this. So could ...
Zéiksz's user avatar
  • 1,979
14 votes
1 answer
5k views

How to get reference to object(s) added by an operator?

From my python script I want to add some objects to scene and process them later (add constraints etc.). If the object to be added is an Empty, I can simply write: ...
mg007's user avatar
  • 821
6 votes
2 answers
1k views

How to print a list of enumerated items in Python

Let's say I want to create a new bone constraint in a script. Blender then tells me that it wants to know which type of constraint I want to create. Can I print a list of all possible types? I know ...
Haunt_House's user avatar
  • 16.1k
4 votes
1 answer
300 views

How to do AddonPreferences using extensions_framework?

I have seen scripts taking user preference values using classes built over AddonPreferences. Is it possible to do the same using extensions_framework by Doug Hammond. Why I am asking this is I need to ...
abhilash's user avatar
  • 141
5 votes
2 answers
4k views

Manipulate BGE logic bricks through python

Is it (if at all) possible in Blender 2.6+? If not, will future versions of Blender support it? I see some old posts (this and this) saying that it is not possible. However, I found a recent post ...
mg007's user avatar
  • 821
5 votes
1 answer
1k views

Relation between BGE framerate and Action framerate

By BGE framerate I mean the rate at which True pulse is fired (and thus attached Python controller script is executed) and by Action framerate I mean the rate at which the value returned by ...
mg007's user avatar
  • 821
10 votes
1 answer
13k views

How to save an image created from python script including the alpha channel?

I have tried the following, and the resulting image file, when opened in GIMP, never contains an alpha channel, only R, G and B. ...
Hatoru Hansou's user avatar
21 votes
6 answers
16k views

How to access Render Result pixels from python script?

Render Result exists in bpy.data.images["Render Result"] but it contains no data. Also bpy.data.images["Render Result"].size[0] ...
Hatoru Hansou's user avatar

15 30 50 per page
1
425 426
427
428 429
431