Skip to main content
The 2024 Developer Survey results are live! See the results

New answers tagged

1 vote

How do you reuse an operator with different variables? "Object has no attribute" error when I try

Here is an example: ...
Martynas Žiemys's user avatar
0 votes

How to lock the always on top subinterface when run a operator

Finally I thought of a way, share if you have a new one. The idea is when you start your modal, run a empty modal to all subwindow. And remove them when finished. ...
X Y's user avatar
  • 6,248
0 votes
Accepted

Add text information directly to the viewport for 5 sec

You can check if the operator is running and the handler has been added Remove the text after 5 sec or MOUSEMOVE ...
X Y's user avatar
  • 6,248
3 votes
Accepted

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

Change the value of non-api-defined library overridable custom property via Python ...
X Y's user avatar
  • 6,248
1 vote

Time since last function call

I haven't found a function like that yet. Here is a working variant using the time module. We get the current time in ms and store it in the operator attribute. ...
Andrew's user avatar
  • 83
3 votes
Accepted

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

You need to access state_items on the simulation output node: ...
Markus von Broady's user avatar
2 votes

direction perpendicular to screen

You need to simply extrude in the direction of the camera, in geometry nodes it would look this way: In Python the only tricky part is to calculate the position of the viewport camera: ...
Markus von Broady's user avatar
5 votes
Accepted

Scripting: Separate by loose parts and get created objects

Get created objects ...
X Y's user avatar
  • 6,248
3 votes
Accepted

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

Notice that the error appears before it reads the blend file. That is because your command should specify the blend file first and then the python script argument like this: ...
Harry McKenzie's user avatar
0 votes

Changing the size of the box by the user

To make objects configurable you need to write custom JavaScript code using B4W API. But I don't recommend using Blend4Web at all, since it was deprecated long ago. For a modern and much simpler ...
Alexander's user avatar
1 vote
Accepted

How to get the path to an image that the user chooses

Run a function after user selects the filepath ...
X Y's user avatar
  • 6,248
1 vote

How to display images in Blender on a panel

How to display an image image on a panel ...
mml's user avatar
  • 642
3 votes
Accepted

Control Blending Mode of the Color Mix node through the custom driver

You can use usual workflow: right-click a field and choose "Copy as a New Driver", and right-click another field and choose "Paste Driver". The value to be used is the index of the ...
Markus von Broady's user avatar
0 votes

Hard ops smart apply menu is missing

I just had to switch to Object Mode. Then the Operations > Smart Apply option is displayed.
Nra's user avatar
  • 1
1 vote

How to run custom script (via python) after use "delete object" or "rename object"

For my purposes, I'll use this for now: ...
Vincent Decc's user avatar
1 vote
Accepted

How to run custom script (via python) after use "delete object" or "rename object"

...
Jakemoyo's user avatar
  • 5,597
0 votes

TypeError: Element-wise multiplication: not supported between 'Matrix' and 'Vector'

If @ or * that doesn't solve it, make sure you have imported mathutils AFTER bpy in your python file. thus: import bpy import mathutils
Jovany González's user avatar
1 vote

I want to remove the console display that appears when reloading a script

A search in the folder of the VSCODE function with the word Reloading: in the folder \startup folder, the print function ...
mml's user avatar
  • 642
3 votes
Accepted

Automatic actions after starting addon?

Addons are first loaded in a restricted Context where no view_layer exists that's why you get thrown that error. Instead, you can execute your script within a ...
Harry McKenzie's user avatar
1 vote
Accepted

How do I get the output of the Join Strings node in python?

Right now only way to take string from geometry nodes evaluation process is to read name of geometry attributes. Exactly, with length limit.
mod nop's user avatar
  • 431
2 votes

Trouble debugging this script (loop through non-manifold verts on one mesh and find index of closest edge on a different mesh) - any tips

Here is the corrected code for line 44: location = v.co This is because BMesh/BMVert does not use the location attribute. It uses co, which stands for coordinates.
Dgc's user avatar
  • 353

Top 50 recent answers are included