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).
6,648 questions
2
votes
2
answers
40
views
How to automatically refresh or reload Import CSV node data?
I am experimenting with the Import CSV node in Blender. I have Blender open alongside a text editor where I edit my CSV file, and I would like an easy way for the new data to update automatically in ...
0
votes
0
answers
45
views
How to access brush in Blender sculpt mode using python script
In Blender, I define a tool in sculpt mode and set a timer: if the tool is activated, the draw brush will be accessed. But when I click leftmouse, it is binded with tweak operator, I want to know why &...
3
votes
1
answer
177
views
How to determine using Python whether the mouse pointer is hovering over the viewport navigation gizmos?
In top-right part of 3D Viewport, the Navigation Gizmo has multiple components:
Axis gizmo
View gizmos
I have a custom operator which meant to be executed only when mouse pointer is above VIEW_3D <...
2
votes
1
answer
79
views
Determine the name of the shader property under the mouse pointer
In Blender, in the Material tab, there are different properties such as Base Color (1), Metallic (2), etc.
I need to find a way to determine which property the mouse pointer is currently hovering over....
1
vote
1
answer
65
views
Video fps incorrect in Blender API new_movie() strip
I have an MP4 file that I want to add as a new video strip to the Video Sequencer Editor using an addon or a script. The following Blender API code adds the video, but the playback speed becomes ...
0
votes
0
answers
41
views
How to model Table Base with Geometry Node?
I want a base. that maintain some parameters, but also updates based on total table length and width.
So if table width is 1000mm (sorry for the metric folks)
I want the width of the base 600mm
and if ...
1
vote
1
answer
44
views
Z position of curve resets to zero when edited
I have some code that generates a curve:
...
3
votes
1
answer
138
views
How exactly do ActionSlots work?
I'm trying to work with action slots through python scripts and I need to understand how they work, really.
The docs say action slots allow an action to animate multiple objects--so far so good. I can ...
0
votes
1
answer
43
views
Unable to match performance of geometry shader with Vulkan back end
I am writing an addon that creates textures using Blender's gpu api.
I want to be able to distribute thousands of 2D cards with textures on them and have controls ...
0
votes
1
answer
62
views
Creating a new image texture using python scripting
How to create a new image texture using python scripting ?
I tried this :
...
0
votes
0
answers
37
views
Smoothen the sharp edges on the high model after a subtraction by a boolean
I need someone who can help me with finding out a solution how I can make sharp edges to smooth after subtracting an object from a high model scanned by 3D scanner.
I don’t want to sculpt those edges ...
0
votes
4
answers
76
views
How can I make a tapered cylinder given 2 points and 2 radii?
If I have two lists, each containing an x, y, z, and a radius at that point, how can I make a tapered cylinder connecting the two points, with the radius of the cylinder equal to the specified radius ...
0
votes
1
answer
62
views
Baking operation through script repeatedly updates image of same mesh | Optimization
I am running baking operation for blender through python script but its taking a lot of time due to update image operations running for same mesh. (total time 23 mins)
I need to optimize the process ...
0
votes
0
answers
35
views
Shrinkwrap not projecting onto corners
I am trying to project a plane onto an object I made but the shrink wrap isn't attaching to the right spots and end up clipping through the model. The object and the plane have the same dimensions.
...
2
votes
1
answer
50
views
Add keyframe to an Action via script?
I'm trying to import models from a video game into Blender. The tools I have to dump the models gives me a rigged-but-unanimated FBX as the main model, and a second file in a custom format that ...
-3
votes
1
answer
68
views
How to select an object via a variable?
I want to know how to pass an object as a variable to a function.
...
1
vote
1
answer
55
views
How to prevent newly created objects from being added to a specific collection in Blender even if that collection is selected?
I’m working with Blender and have a particular workflow where I want to make sure that newly created objects are NOT automatically added to a certain target collection, even when that collection is ...
3
votes
1
answer
120
views
Modal Operator Does Not Receive Middlemouse Release Event In 3D View
I’m encountering an issue while developing a modal operator in Blender where the Middlemouse release event is never received. The operator detects the press event correctly but never gets the release ...
0
votes
1
answer
88
views
How to force UI redraw in context.window_manager.invoke_popup() for real-time progress updates?
I'm creating a popup UI using context.window_manager.invoke_popup() to display real-time progress while downloading content from a remote server.
However, the popup only updates when there's mouse ...
0
votes
0
answers
23
views
Motion tracking with python API from script
I've been trying to create a script to allow me track the camera in a video in blender.
The reason for this is such that I can later add a 3d model in the video. I want to do all of this with scripts. ...
1
vote
1
answer
53
views
Some objects in a collection are None
I have a collection of objects; I want to render one of them at a time quickly and easily. I wrote a script, and I've pasted below what I currently have:
...
0
votes
1
answer
49
views
How to access 3D Viewport Text Info overlay using Python?
Is it possible to retrieve this text using Python? Reconstructing it is not an option. The reason is that I need to know whether a Viewer node is active, and this information is not exposed in the ...
0
votes
0
answers
35
views
Script to convert After Effects Camera rotation to Blender
I have After Effects ExtendScript (.jsx file that I exported from Google Earth Studio) with camera movement and camera rotation animation. In After Effects camera works correctly, but when I'm trying ...
0
votes
0
answers
50
views
Base Color not being captured in baked textures, using procedural textures
I am trying to bake procedural textures. The base colour always bakes as black. All other textures (roughness, metallic, AO and normal) seem to be fine. Strangely even diffuse texture bake worked fine....
1
vote
1
answer
21
views
Independently controls the enabled property of multiple buttons arranged horizontally on same row in a panel
I used UILayout.column_flow(...) and UILayout.operator(...) to arrange buttons horizontally in a panel.
These buttons need to ...