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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
10 views

Merging keyframes from separate actions for 2 armatures with API

I'm honestly out of ideas with this one. Basically I have 2 armatures, each one of them has it's own action. In the end I want to still have those 2 armatures separated but only one action to drive ...
0 votes
0 answers
14 views

PointerProperty with ShapeKey

In the docs it's stated that PointerProperties must be derived from ID or ID Property Group. ShapeKeys are not derived from these and so cannot have ...
  • 290
0 votes
0 answers
17 views

Blender rig problem

Trying to add automatic bone weight to my rig. Blender stops responding and i have to quit it. When i open the file it says “for security reasons automatic execution of python scripts in this file was ...
  • 1
2 votes
1 answer
121 views

knife intersect cut with python scripting?

I want to cut some holes in a shape with a python script in Blender (3.3) I have some images here illustrating a simplified version of what I want to do, to remove the cylinder shape from the cube, ...
1 vote
0 answers
38 views

Geometry Nodes / Python - Every face to rotate around one of its edge like a hinge

Now that there are these nodes in Blender 3.4 Beta... ...is it possible to do this with Geometry Nodes or Python to happen automatically for all the faces? Maybe with the help of this script, what I ...
0 votes
1 answer
29 views

Is there a way to select all the vertex of an object which are on negative x/y axis using python?

I am looking for a python script to select all the vertices on negative side of axis. I want to add these to a vertex group so I can use them in my code. Any help is appreciated.
0 votes
0 answers
53 views

How can I access named custom instance attributes generated wtih Geometry Nodes in Python?

I have a question. How can I access named custom instance attributes generated with Geometry Nodes in Python? What I did: I set up named custom instance attribute with Geometry Nodes, named "...
0 votes
0 answers
11 views

Why other parts of body joints exist in face controller?

I have downloaded a .vrm model from vroidhub and imported it to blender using an add-on then exported as .dae file. I want to ...
  • 101
0 votes
0 answers
28 views

How to add scrollbar in my nested panel and add delete button?

So i have created this custom panel (thanks to people from this community who helps me out tho )which shows list of objects based on the category i have selected from the dropdown ,i want the list in ...
0 votes
1 answer
29 views

How to copy over material settings to another material assigned to object faces?

I'm working with a complicated scenario that requires me to programmatically swap multiple materials in and out of an object at a time. This object has multiple materials applied to different faces of ...
1 vote
0 answers
30 views

Error with Blender-OMSI-Exporter : 'Object' object is not iterable

I'm trying to export each selected object, but it tells me that objects cannot be iterated. ...
0 votes
0 answers
17 views

Render finished script

I'm looking to write a script to print a message when the render is done. ...
0 votes
1 answer
40 views

Sort objects in order as they appear in the outliner

I have a collection of objects named 'test0', 'test2'...'test999'. When copying these objects between different Blender scenes/windows sometimes the internal collection order gets messed up and ...
1 vote
1 answer
20 views

How to apply a modifier one by one on all selected objects in blender in Python

I am new to python and blender and working on multiple objects. Is there a way to apply same modifier to each and every selected object at once?
0 votes
1 answer
17 views

Different behavior of bpy.ops.object.shape_key_transfer() different inside blender python console and outside independent python script

Greetings to our awesome community. I'm having one doubt in my python script that copy all the shapekeys from source mesh to destination mesh. The below script is working perfectly when running inside ...
2 votes
1 answer
22 views

How to select all the object with same vertex count as the object selected in blender in Python

I am working on multiple files. Is there any way to select all the objects in the with exact same vertex count of the active objects.
1 vote
1 answer
52 views

How can I put bone's head on the place where two bones crossed

I need to move a bone like these pictures. There are two long bones,and in edit mode I need to put the small bone's head exactly on the place where two long bones crossed. I tried to use edge snap ...
  • 173
0 votes
0 answers
24 views

How do I select multiple bones in pose mode using python?

I cant seem to find any documentation on pose mode bone selection.
  • 1
1 vote
1 answer
24 views

Python GreasePencilGrid Usage

I was going through the Blender Python Documentation and i came across the class bpy.types.GreasePencilGrid. I am not sure how to use it. Can someone please help?
  • 185
-1 votes
0 answers
31 views

1 model and 4000 textures (Automatic processing)

I am quite new in Blender and they redirected me from stackoverflow here so I can get an answer to my question. I have one 3D model and 4000 textures for it. Is it possible that with python (or some ...
  • 99
1 vote
2 answers
86 views

how to insert frame to update materials

I have a project where i would like to store frames of my scene in which there are several objects that move and change material from frame to frame. In a loop, i have been able to make the objects ...
0 votes
0 answers
12 views

Rotate UV face by 90 degrees Python script

I thought this would be straight forward. I'm trying to rotate a UV face around by 90 degrees to match up with the black rectangle via a script. Blender records the action as ...
0 votes
1 answer
15 views

Override animation when rendering via script

I have a simple script like this: ...
  • 367
0 votes
0 answers
12 views

Snapping to face in python

I’m trying to make work the snapping to face in python but no luck so far. Can you please help me? I have two objects where I want one to snap to another with face snapping. I have done this manually ...
1 vote
1 answer
47 views

How to create a dropdown consisting of object types and display data accordingly the type i have selected?

I am trying to create a basic crud tool in blender and my requirements are create a dropdown on top of the panel and once i select one of the types from the dropdown it shows data below accordingly. ...
0 votes
1 answer
32 views

How can I reference the f-curves of a bone in Python?

I'm trying to automate calibration of mocap data, matching it to rig bone locations. As part of this project, I need to use Python to scan bone animation f-curves for minimum and maximum values. I ...
0 votes
1 answer
20 views

python undo without bpy.ops?

I'm making multiple changes to an object and rendering like this: ...
  • 367
2 votes
1 answer
106 views

How to orient planes around a circle so that they point towards the center using Python?

I have Planes already positioned on the circle and parented with the circle. I'd like to orient them all with the -Z axis pointing towards the center of the circle like in the pictures I posted. I ...
  • 1,038
0 votes
0 answers
28 views

Find global rotation values of two points using python

I have a pipe object, which is defined by two points. I need to calculate what is the global rotation of that pipe because I want to rotate another object with the same rotation. Because I'm ...
0 votes
0 answers
15 views

Text Embossing Script

First off, I'm very new to Blender. What I need to do is emboss text on an object in multiple places. I've figured out the rather involved process of embossing text in a single place, but I need to ...
0 votes
0 answers
42 views

Interpolate curves to get coons patch

I am trying to get a coons patch. I have generated 4 curves as shown below: I am trying to make a mesh surface joining opposite curves and one plane surface joining the corner points. Using these I ...
0 votes
0 answers
12 views

coordinates for object vertices/edges after transform

I'm trying to get the position of some edges connecting to a couple of vertices, that was transformed with the following: ...
0 votes
0 answers
13 views

Blender Python : How to disable fcurves on given axis

I have a cube with sound baked to fcurves on it to modify its scale. It works but using script I want to apply scale modification only on the Z axis (or disable the X and Y axis in the fcurves). What ...
  • 25
1 vote
0 answers
25 views

Why is one end of bezier curve at the origin? [duplicate]

I am trying to create a coon's patch in blender using scripting. So far, I have made the 4 bezier curves I need to make by reading the coordinates from a text file. Each curve has a start point, end ...
0 votes
0 answers
18 views

Possible to edit point cache data for cloth simulation using python?

Is it possible to manually edit the baked positions of points in a cloth simulation point cache using python? I found this: For most simulations the point cache can be stored either in memory (...
  • 152
4 votes
3 answers
171 views

How to calculate the total UV area used?

I'm trying to find the total UV area used relative to the image bounds - i.e. a percentage/ratio of used space vs. available space. I know you can use ...
  • 10.5k
0 votes
0 answers
26 views

Re-recording fingers flex sensors

I have data from flex sensor on ring and pinky fingers and I want to record them into an already animated character, I tried to record through .keyframe_insert but ...
0 votes
0 answers
12 views

Python script not iterating through all objects in collections

I've written a script in order to create simplified versions of objects which I will later import into Unity to form a Level Of Detail group (LOD). The script is supposed to perform the following ...
  • 13
0 votes
1 answer
25 views

Can I make tools in blender which opens as a separate window?

Rather than my tools attached to either sidebar or properties i want just a panel which consists of all the tools and then once i click on the name of the tool , it open separately in a different ...
1 vote
1 answer
31 views

Access Face Maps using python script

I'm trying to access faces assigned to face maps groups. However, I couldn't find any relevant example of how to do it. I need to get information about the face included in a certain face map. Is it ...
3 votes
1 answer
71 views

Is there a way to change Grease Pencil brush settings with Python?

I'm trying to change a lot of a brush's properties with the click of one button, like the smoothing, simplify, etc. A command like ...
0 votes
1 answer
53 views

How do I change this add-on so it will automatically iterate over all diffuse textures in a.blend file

** It is a simple add-on that I paid the guy off fiver to make for me, and it's supposed just select all the diffuse image texture nodes in the file (the ones plugged into the principled BDSF base ...
0 votes
1 answer
16 views

Change elevations of a Slab or Rectangle using python in blender

How do you create a slab (30x40x1) with different elevations every 5'? I am not a programmer nor do I know python. I managed to write the following but I know there has to be a better simpler way to ...
0 votes
1 answer
32 views

How can I use Python to automate setting bones to be driven by empties?

I have about 30 control bones of a rig that I want to animate using mocap tracker empties. I will be doing this many times for many models and each time, I need to set and calibrate the drivers for ...
0 votes
0 answers
13 views

Assigning material from Asset Browser using Python

I've created several materials, mark them as asset and group them in a catalog. How do I iterate and assign these material from asset browser to an active object using Python? Later on I would like to ...
  • 1
0 votes
1 answer
19 views

Change the custom property value by pressing a key

I have a rigid body car that I want to control by pressing the appropriate buttons (as in video games). I'm not very good at programming, and I don't have many ideas how to implement it. The car is ...
0 votes
0 answers
17 views

Import 3d Data with information attached

I'm creating 3d Data in another software that I then want to import to Blender. The data contains additional information like "name", "usage", "timestamp" and so on. Is ...
  • 13
0 votes
1 answer
43 views

Blender 3.3.0 Python access to selected nodes in the shader editor

I would like to create a simple script that will change the values in selected "Value" nodes, but I cannot find information on how to access the list of selected nodes in the active material....
  • 59
0 votes
2 answers
55 views

Dissolving Faces of a Mesh while keeping the Material intact

Hi I'm relatively new to blender, and I'm currently working with massive landscape meshes, and I am working on a script to help cleanup some of the foliage on the map. I currently am trying to flatten/...
1 vote
0 answers
14 views

Programmatically collapse selected collection

Related to How to hide/show Collections levels with python? I'm writing an addon that generates nested collections. I would like to collapse its root collection. Shift + Left arrow shortcut ...
  • 11