Skip to main content

New answers tagged

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,088
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,088
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,327
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
2 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
1 vote

Script to rearrange vertices evenly

Here's some code I wrote, I've only tested it a little, but it seems like it works pretty good: ...
Dgc's user avatar
  • 353
0 votes

Load properties from scene in another blend file (without contents)

Go to File>Append then select the file you want the properties from. If appending the entire scene isn't appending missed objects such as lights or cameras, you can choose the camera/light folder ...
Dgc's user avatar
  • 353
5 votes

How to Print to Console When Hidden?

Instead of iterating over areas of current screen, you need to iterate over areas of all workspaces. However, one workspace can be instanced multiple times (screens), but it conveniently lists them ...
Markus von Broady's user avatar

Top 50 recent answers are included