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 47

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

3 votes

Tracing a monochrome image into a 3D, extruded object with a script

I haven't seen any automated raster to curve tools for Blender specifically. If it comes, it will probably be an addon. From experience the result of automated tracing on logos, or exact shapes with …
zeffii's user avatar
  • 39.9k
0 votes
Accepted

Cycles image texture node is writen in python or c?

Implemented in C, see: The whole tree: tree/HEAD:/source/blender/nodes/shader/nodes The Mapping node: HEAD:/source/blender/nodes/shader/nodes/node_shader_mapping.c The image texture node: HEAD:/sour …
zeffii's user avatar
  • 39.9k
1 vote
Accepted

Reloading Scripts Behavior

Is the reload scripts command (default F8), only reloading the base script folder built-in with the Blender install Any addon that you have currently enabled (usually saved in User Settings …
zeffii's user avatar
  • 39.9k
3 votes
Accepted

How to tell if an add on is present. Using Python

import addon_utils addon_name = 'some_addon' success = addon_utils.enable('some_addon') if success: print("enabled", success.bl_info['name']) else: print(addon_name, "is not found") addon_ …
zeffii's user avatar
  • 39.9k
3 votes

Delete parent object hierarchy in code

Your own solution probably works fine in your case, but the general case where the hierarchy is a bit more nested (children of children) might still deserve a solution. perhaps something recursive: …
zeffii's user avatar
  • 39.9k
2 votes
Accepted

How do you programatically set grid scale?

import bpy for area in bpy.data.screens["Scripting"].areas: if area.type == 'VIEW_3D': for space in area.spaces: if space.type == 'VIEW_3D': space.overlay.grid_scale …
zeffii's user avatar
  • 39.9k
1 vote
Accepted

How to delay execution of execute() function in an Addon?

Normally you can let Blender's layout system draw the properties, but when you want to have an action button on an Operator UI, you have to specify the whole interface. You might even consider writing …
zeffii's user avatar
  • 39.9k
6 votes
Accepted

Default size for empty

Directly after you add an Empty press F6 to get the Add Empty Operator parameters. The Radius parameter will set the visual size of the current Empty and all new Empties that you add afterwards du …
zeffii's user avatar
  • 39.9k
21 votes
Accepted

How to create a mesh programmatically, without bmesh?

Your importer script might be easier to write using from_pydata, it will certainly look cleaner. quads verts = [ (1.0, 1.0, -1.0), (1.0, -1.0, -1.0), (-1.0, -1.0, -1.0), (-1.0, 1.0, -1 …
zeffii's user avatar
  • 39.9k
5 votes
Accepted

Midi driven animation in blender 2.6

MIDI to IPO/Drivers possibly: https://github.com/kwnetzwelt/midi_to_ipo (for blender 2.5 onwards) It imports MIDI (per track) and converts it to IPO/drivers and comes with a well written getting start …
zeffii's user avatar
  • 39.9k
4 votes

What programming languages can I use in Blender?

Blender 2.5 and above use python 3 but latest versions of Blender 2.6x utilize python 3.3 as the main scripting language. See the Blender API documentation. …
3 votes
Accepted

AttributeError: __exit__ error on custom operator

focus on the code around the error: import bpy files = ['/home/zeffii/GL_fillet.mpeg', '/home/zeffii/GL_fillet2.mpeg'] for filepath in files: with bpy.data.movieclips.load(filepath) as (data_fr …
zeffii's user avatar
  • 39.9k
5 votes
Accepted

Random object color via python

Yep, you are assigning all new random colours to the first object. def get_random_color(): ''' generate rgb using a list comprehension ''' r, g, b = [random.random() for i in range(3)] re …
zeffii's user avatar
  • 39.9k
4 votes

How to tell which objects are using a Bezier Circle as bevel object?

I think something like this might work, but for your own sanity run this only a copy of your scene, or a small representative version of your scene. Just in case: This finds the bevel_object if t …
zeffii's user avatar
  • 39.9k
1 vote
Accepted

How can I update a menu via an operator?

Hopefully this is concise and shows how to work with the callback and the custom PropertyGroup. A subtle detail is that each property in the group must have a name (never undefined or None). See Prope …
zeffii's user avatar
  • 39.9k

1
2 3 4 5
11
15 30 50 per page