Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
-1
votes
0answers
14 views

searching for Jaroslav Jerryno Novotny contact

I am trying to find contact about this Guru (Jaroslav Jerryno Novotny email). We are starting to produce some series and we would like to offer some opportunity. (Czech Republic) www.bba.studio .. so ...
0
votes
0answers
15 views

Compiling bpy module on Archlinux fails on OpenShadingLanguage linking

I am trying to compile new bpy module for our project in ArchLinux container. An year ago it worked and when we need new blender it fails on OpenShadingLanguage linking. Probably mismatch version ...
1
vote
0answers
25 views

How to get hidden selected objects using Python?

Can I get a list of the selected objects from Outliner, not from the scene? I want to create a script that unhides the objects selected in the Outliner: the problem is that if I try to grab the ...
0
votes
0answers
11 views

How to save out a materials node tree to file and then load it back in and overwrite another materials node tree?

Using python, I'm hoping to serialize a materials node tree, then unserialize it and overwrite another materials node tree. I'm trying the below, but it's returning errors 'matches no enum in '...
0
votes
0answers
16 views

Using python, how do you get the last image node downstream of the principled node's diffuse input socket?

Using python, how do you get the last image node downstream of the principled node's diffuse input socket. For example if there's an unknown number of other nodes between the texture image node and ...
4
votes
0answers
31 views
+50

How to get one UIList to control the contents of another UIList?

I have two dynamic lists. One is for strings and another one for objects. When the string changes I need the other list to show the objects assigned to the string in the first list. So I would need ...
0
votes
0answers
10 views

Can't Import an Addon that I wrote

Let me just get straight to the point! I use visual studio code to write my addon. If I open it through visual studio code, it works fine, but when I try to import it into Blender by loading the init....
0
votes
0answers
29 views

how to remove a default menu in blender using python?

I'd like to remove some toolbar from the blender interface to simplify that for a potential customer, but I'm not able to do that using python. I know that it can be set up as default saving all the ...
2
votes
1answer
17 views

Turning off anti-aliasing: inconsistency between 'info' window and valid python commands

I want to render an image without anti-aliasing. Using the UI, I select the Workbench engine. Then, under Sampling, I set Render to No Anti-Aliasing. This displays the following commands in the info ...
-1
votes
1answer
16 views

Python - writing console output to disk

Is there a way to write the console output to disk? In other words, as the system writes to the console, it also writes to a text file? I am hoping that there is a simple setting in blender rather ...
1
vote
0answers
8 views

Buttons on a custom properties dialog

I made a simply addon for myself that shows a property editor dialog. I wonder if it's possible to add several buttons on it that'd change value for Index property? ...
0
votes
2answers
19 views

Object Rotation with polar angles python

I would like to know how to rotate an object around its center point,that the angle from the z axis is theta and the XY plane rotates in angle phi via python scripting.
0
votes
1answer
19 views

how would i go about opening the save as menu using python?

I'm trying to create an add-on that executes a few steps before opening the save as menu. I am the point where I can execute the options and save the file, but I would like to open the save as menu, ...
1
vote
0answers
11 views

Question Related to Python and Camera View

I've recently been developing a rig that uses Python for UI buttons, etc. I was wondering how to make a button that would put me into a face rig camera. (something that would only be used for ...
0
votes
0answers
15 views

Runtime-only properties

What is the best option for creating Blender properties that are only needed at run-time? My scene elements contain binary data that is temporarily converted into Blender properties when a window ...
0
votes
0answers
9 views

Python function in Object to duplicate itself

Is there a python function in Object to duplicate itself with all children, modifiers, etc.? Manually, this can be done with 1. Select the object in the Outliner 2. Select Hierarchy 3. Shift+D in 3D ...
0
votes
0answers
6 views

How to make a button for `ShaderNodeCustomGroup` to select/create/load an image, like of `TexImage`?

I have a node with image property, defined like this: ...
0
votes
1answer
57 views

How can I create an advanced addon with a GUI and multiple settings for Blender 2.8x? [duplicate]

How can I create an advanced addon for Blender 2.8x that is displayed in the n menu (right panel of the viewport) with multiple settings. What are the most important GUI scripts, how to add settings, ...
0
votes
0answers
18 views

Blender Render to Cycles Render

I have a full made object in Blender 2.79b, but I put all textures in Blender Render, I need it in Cycles Render. I have tried the Python code that I found online, but it didn't work. I didn't put ...
0
votes
0answers
21 views

Where should I start in programming for Blender? [on hold]

I have quite some time since I discovered Blender but I just used it for modeling and rendering and I wish to start learning about about this software in a deeper layer. I saw Linear Algebra at ...
1
vote
0answers
36 views

How can I make a 3D model out of a set of vertices, UVs and faces using a script?

I have 1 UV .png, and 3 numpy arrays that I will describe below: Vertices: An array that has many triplet float values eg. [1.1, 2.1, 3.1] Faces: An array that has many sextuplet integer values. eg. [...
1
vote
0answers
63 views
+100

Scrollable interface?

is it possible to create a scrollable interface in blender UI ? let say in this code below ...
0
votes
0answers
33 views

Create a simple UI list procedurally?

i'm trying to implement an UI list feature in my addon, so let's take the case of creating a UI list of all 'DISPLACE' modifier, for testing purpose let's try to ...
1
vote
0answers
15 views

Batch SMD to FBX script adjustments

Pretty much I have like 100+ SMD animations I need to convert into the FBX. After googling it I've found multiple scripts for doing so, to make it simple I'il give you an excample of the shortest one ...
1
vote
0answers
18 views

Addon not correctly reloading

Disabling my addon gives this error: RuntimeError: unregister_class(...):, missing bl_rna attribute from 'RNAMeta' instance (may not be registered) and re-enabling it gives this error: ValueError: ...
0
votes
1answer
27 views

Blender Rotation [duplicate]

I have an object in blender that I am trying to rotate by importing values from a csv file. The values are in rows 4-6 of the csv file and they are in degrees so I want to use euler rotation. However, ...
0
votes
0answers
14 views

Speed up the Blender start from the CLI

I render a single frame from the CLI with Eevee. The render process takes around 2.5 seconds but the start of blender takes always around 4 seconds. If I render from the CLI can I keep Blender open? I ...
0
votes
1answer
19 views

How should I update a script to 2.8 that uses the removed 'scene_update_pre' handler?

so I'm having trouble with this script: ...
2
votes
1answer
40 views

Why this script doesn't run as expected?

I want to have a function which deselects currently selected objects, selects a passed object, runs a callback function and then restores the selection. For example in my scene I have two objects Red ...
-1
votes
0answers
17 views

Create an UI list with possibility of selecting multiples items?

hello, it it possible to create an ui list where we can have multiple item in the selection ? so in short is it possible to override it's behavior ? maybe the code of this UI list is written in ...
1
vote
1answer
34 views

Make object follow path and collide with other object

My goal is to create a two objects collision while the moving object(1) won't move in a straight line before it hits object 2. In order to make a realistic collision turning off animation's property ...
0
votes
0answers
3 views

Python error: 'AL lib: (EE) ALCmmdevPlayback_mixerProc: WaitForSingleObjectEx error: 0x102' [closed]

How do I prevent the above error from occurring? Does it stop my script? Thanks!
0
votes
1answer
17 views

Custom exporter and problems with matrix and rotation order

I'm trying to write a custom exporter for cameras from/to Blender, but I'm having some problems with rotations and rotation order. In my mind I should be able to extract euler values from the world ...
0
votes
0answers
10 views

Copy property group hierarchy (deep copy)

I apologize if this question already has an answer. I assumed it would, but can't find it. I'm trying to figure out how to copy a property group instance from one element to another. I maintain some ...
-1
votes
0answers
25 views

Create a list of objects

I have a class Layer. I want to create a list of layers and be able to assign 0, 1 or more of those layers to a Blender Object. This is similar to what happens with the materials, where you have a ...
2
votes
1answer
29 views

2D 'POST_VIEW' drawing with gpu.types.GPUShader(vertex_shader, fragment_shader)

I can use gpu.shader.from_builtin("2D_UNIFORM_COLOR") to draw a square to a view (the nodeview), and give it a single color, but I want to use a custom shader. Does ...
0
votes
0answers
19 views

I need to play all my actions

my problem is the following: I have 3500+ actions in one blend file. I want to play it all to render without going to the NLA and handling manually 3947 actions in sequence. There's a way that I can ...
1
vote
1answer
43 views

Rotate object's mesh so it matches another object's rotation

Suppose we have two cube objects: Obj1 and Obj2. Let's say Obj1's Euler rotation is Vector((0,0,0)) and Obj2's rotation is ...
2
votes
0answers
12 views

Change the default settings of File/Append operator in 2.8

I'd like to have operators's File/Append option Localize All uncheck by default. I work in a studio environment where several artists(~10) will need to do this operation on a regular basis. I've ...
0
votes
1answer
10 views

Python camera.rotation_euler problem

I cannot figure out why the following line of code throws the error "AttributeError: 'NoneType' object has no attribute 'rotation_euler'" ...
0
votes
1answer
46 views

How do I attach a few cubes via script. Blender 2.79. Pic =>

How to attach a lot of cubes to the nearest vertices of a certain object using a script? I want to attach red cubes to the nearest vertices of yellow objects using a script. Suppose red cubes belong ...
-1
votes
0answers
36 views

Make object follow path after animation turned off [duplicate]

I'm trying to make an object follow a path which is quite a simple task but the problem is that in some point during the animation I want to turn the animation off to achieve physical collision. ...
0
votes
1answer
19 views

Script to get the type (hold, breakdown, extreme) of active key

I need a python script to check if the current keyframe in the timeline is of the 'Extreme' type. How do I go about this?
0
votes
0answers
17 views

Clamp object to curve path

I'm trying to make two objects collision with complex movement. The movement curve was created and what was left is just to animate the moving object (cube). This is the scene's setup: plane --> ...
0
votes
0answers
4 views

Dublicated `ShaderNodeCustomGroup` uses the same node tree

I'm implementing procedural nodes addon with custom nodes. (For Blender-2.81) Some of them should use unique nodetree, because it can change reflecting some properties. I use class variable ...
0
votes
0answers
12 views

Assigning an object a Vertex Parent through Python script is throwing an error

This is an error that only occurs within the script. I can't replicate directly through the UI, which also makes it difficult to try and discern what may be causing it. The code here is grabbing a ...
0
votes
2answers
52 views

Blender 2.8 Python : How Do I Find My Material Output Node (and assign displacement)

I am attempting to create a displacement node with an attached image, and connect that to the Main Material Output Node. I feel I understand how to create and connect these pieces (mostly) fine now. ...
0
votes
1answer
24 views

Creating path curve using python script

I'm using the following script to create path curve: ...
-1
votes
0answers
17 views

Blender addon module doesnt shown in sys.modules

I am trying to develop an addon that uses some classes from another addon. For that, I am trying to retrieve the python module of the dependency and instantiated the classes like this: ...
0
votes
0answers
11 views

Add Shading and textures through Python Script Blender 2.8

I am exporting a character from iclone to blender in alembic format following the tutorial : https://www.youtube.com/watch?v=OkbzAUJgi34 I have the mesh and the textures separately in alembic format ...