Skip to main content

Questions tagged [python]

Python is an 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.

13 votes
1 answer
17k views

Get/Set coordinates for UV vertices using Python

I got this UV map, and I want to set the position coordinates for all the four vertices to x=0.5 and y=0.5 (in the center of the ...
Nils Söderman's user avatar
13 votes
1 answer
9k views

How to handle creating a node group in a script?

I am attempting to make a python script that creates a nodegroup based on some scene properties, however the group_make operator needs to be in a node editor ...
gandalf3's user avatar
  • 158k
10 votes
1 answer
4k views

Auto-run scripts security options

We have a preferences option to enable auto-run of python scripts when opening blend files. We can also add paths that are excluded from auto-running scripts. Then we have a cli options to enable or ...
sambler's user avatar
  • 55.6k
7 votes
4 answers
6k views

Python: vertex normal according to World

If i get a normal of a vertex - i'll get it in local coordinates. For example: bpy.context.object.data.vertices[0].normal If an object will have rotation or ...
mifth's user avatar
  • 2,341
5 votes
2 answers
4k views

Object creation slows over time [duplicate]

I know that this has been asked before, but the answers that others have received did not help me much. When creating objects through Python, using bpy.ops.mesh.primitive_cube_add() there is an ...
doomslug's user avatar
  • 1,819
4 votes
2 answers
2k views

Handler frame_change_pre doesn't work in render

this works in viewport but not in render. ...
user3202179's user avatar
2 votes
1 answer
2k views

Create curve from Numpy Array using Python

I have looked through previous questions on this and many other boards and I cannot seem to find a previous answer. I have a largish Numpy generated ndarray that represents a harmonograph output (...
Terela02's user avatar
2 votes
2 answers
397 views

Same Video on each face, but with different time delay?

iam looking for a way to - like the title says - i want to put the same video on each face, but with different time delay. In other words, i want to create a kind of videowall. i found THIS: ...
froggyman's user avatar
  • 503
24 votes
4 answers
28k views

Add Nodes to Material with Python

I have edited a script that creates some nodes, but the only problem is, it always created a new material. I want it to either add the nodes on the existing material, or a pre-defined material. Here ...
rioforce's user avatar
  • 2,062
19 votes
2 answers
36k views

create mesh then add vertices to it in python

I would like to create a mesh, then interactively add vertices (afterwards, possibly through a loop) to it through python. Is that possible? I can't find enough info from other answers to really get ...
Jono's user avatar
  • 193
18 votes
6 answers
20k views

Rotate objects around their origin along a global axis (scripted) without bpy.ops

I have read so much about Blender rotation in the last two hours that my head is spinning, but I can not understand how to rotate strictly in global coordinates without using ...
uhoh's user avatar
  • 2,667
18 votes
6 answers
19k views

Python - Set material to material slot

I am using the Blender Internal render engine. I have an material slot with no material assigned to it. How can I assign a material to a slot using python? This should work in edit mode as well. ...
Vader's user avatar
  • 14.8k
17 votes
3 answers
21k views

How can I get the camera's projection matrix?

As asked. I need a way to get the projection matrix of the active camera, via python. EDIT: I think this question is different from the one asked here, because getting a matrix is different from ...
Goran Milovanovic's user avatar
17 votes
4 answers
5k views

Workflow for developing add-on/script

I'm trying to figure out a good workflow for developing scripts and add-ons in Blender. Here's what I'm currently doing as I try my luck with a PyNode add-on: Open blender Create a text editor panel ...
ajwood's user avatar
  • 10.1k
17 votes
3 answers
15k views

Is it possible to use bpy.props.PointerProperty to store a pointer to an object?

If the user renames an object, the reference via string key is lost. Is it possible to store a pointer to an object in a property assigned to a class of bpy.types ...
pink vertex's user avatar
  • 9,876

15 30 50 per page
1
3 4
5
6 7
177