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).

2 votes
0 answers
18 views

How to get object evaluation time?

I want to get the time in milliseconds spent evaluating a particular object. I wrote the basic code, but it seems to me that it does not work correctly. I have code that measures the execution time of ...
Alexander's user avatar
1 vote
0 answers
18 views

Making a basic n panel template with working properties [duplicate]

I'm trying to display some different property types on a n-panel. I would like to level up from using operator buttons, but I'm having trouble figuring out how to make a panel with some properties. <...
Yank Scally's user avatar
0 votes
0 answers
14 views

How can I run code whenever any object is added? [duplicate]

When I add an object, I want to run some initialisation code on it first. How can I do that?
Yank Scally's user avatar
-1 votes
0 answers
18 views

How to access data (point_data, cell_data) written by meshio in Blender shader editor? [closed]

Conext: I have a mesh (N points, M cells) in my Python script (outside Blender). I associate to each point and to each cell a ...
Adel Redjimi's user avatar
2 votes
1 answer
31 views

How can I add a library override to a non-API custom property from a linked file with Python?

The question regards setting custom properties of a linked file via Python. Because when setting the property like ...
iclemens's user avatar
  • 117
1 vote
0 answers
36 views

Is there a way to restart a modified addon without restarting blender? [closed]

This was answered 10 Years ago. Unfortunately, it doesnt work anymore. It should be a simple console command: bpy.ops.script.reload() However, it only reloads the <...
rhavin's user avatar
  • 111
3 votes
1 answer
54 views

How can I instantiate a Simulation Zone input / output node's socket via python?

I couldn't find an interface like the node tree interface where I can add sockets using interface.new_socket(). In the documentation, the only method I found for ...
Trantor's user avatar
  • 45
2 votes
1 answer
28 views

direction perpendicular to screen

I want to create a script that squeezes a curve along the vertical direction of the screen. Currently, I am using `def get_view_direction(): ...
hutianyi's user avatar
1 vote
0 answers
38 views

Memory management batch file script not working

using the information from this exchange(When Blender crashes during rendering), I made a script that for some reason doesn't work. The script I made is just like the one in the example except for the ...
IntoThe Abyss's user avatar
4 votes
1 answer
113 views

Scripting: Separate by loose parts and get created objects

I am looking for a scripting/code/api way to do a separate by loose parts and get a list of the resulting separated objects. There doesn't seem like there is a direct way to do this? You can do ...
Christopher Pratt's user avatar
2 votes
1 answer
36 views

KeyError: 'bpy_prop_collection[key]: key "View Layer" not found' when launching blender with external script

When I execute the following code within Blender, it works well regardless of whether it's version 3.x or 4.x. However, if I try to use it by launching Blender with a specific argument to open a ...
cscholl's user avatar
  • 315
0 votes
0 answers
13 views

is it correct to set the camera intrinsics in this way?

I have a 3x3 matrix inside a calibration file that has the intrinsics of my real room inside it. We will call them fx fy cx cy. I would like to know if the code I have written is correct, as I am not ...
wiseme's user avatar
  • 1
2 votes
0 answers
25 views

Operator called by another operator does not trigger Adjust Last Operation panel

I have an Operator defined as ImportImageOperator which calls another operator ...
stib's user avatar
  • 981
-1 votes
0 answers
23 views

Script for importing an OBJ file as Shape key for blender 4.1

I have blender version 4.1 I’m trying to adapt the script for my version ...
notgrilbi's user avatar
0 votes
1 answer
18 views

How to display images in Blender on a panel

I would like to know the script to display the image data in Blender on the panel. The only way I can think of at the moment is to convert the image once into an icon. At first I tried to register the ...
mml's user avatar
  • 642

15 30 50 per page
1
2 3 4 5
431