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

Filter by
Sorted by
Tagged with
0 votes
0 answers
37 views

Cannot apply Geometry Nodes modifier

I'm using this script to bring point at specific coordinates to Blender. Then I would like to replace the vertices with objects via Geometry Nodes (Instance on Points node), but in the end I cannot ...
CP Hooligan's user avatar
2 votes
1 answer
53 views

Script to rearrange vertices evenly

I want to be able to run a function like Space in Loop Tools from the script editor. Only extracted functions related to ...
InamuraJIN's user avatar
0 votes
0 answers
27 views

"NO NODES!" gets thrown in the console after exporting mesh as FBX [closed]

In some cases it happens that no matter what I do with this Python script to export some mesh as FBX, Blender just throws: "NO NODES!" Some potentially related stuff: https://projects....
lsndr's user avatar
  • 1
0 votes
0 answers
25 views

Is there a program that merges convex geometry so that a mesh is represented by the fewest number of convex objects? [closed]

I need help finding a merging algorithm ,that is, one that merges any 2 adjacent pieces of geometry (basically 2 mesh objects that share an edge somewhere) that form a convex one, and do this as many ...
Clorox Beach's user avatar
0 votes
1 answer
16 views

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

I'm trying to load scene properties from a given blend file into the current one using bpy.data.libraries.load() ...
mugwortz's user avatar
5 votes
1 answer
151 views

How to Print to Console When Hidden?

I'm trying to print to the console in Blender using the following function. However, it does not work if the console is not in view (i.e. it's not part of ...
fny's user avatar
  • 153
3 votes
0 answers
34 views

How to get Named Attributes in Geometry Nodes Modifier in Python

How to get Named Attributes used in Geometry Nodes Modifier via API? I want to get a list represented by strings ...
X Y's user avatar
  • 5,963
0 votes
1 answer
20 views

How to pause function call(back) for ie intproperty value setting, which has update function?

We have ui panel with intproperty & stringproperty fields (all those below 'timezone'): ba_props.py all those properties have 'update=update_coordinates' ...
aum hren's user avatar
0 votes
1 answer
47 views

How to change exporting scale using Python?

When we export an .stl via File>Export>STL - we see a window which has a Scale variable. This one: • This variable is named ...
Yaroslav's user avatar
  • 543
1 vote
0 answers
17 views

How to make Collection sockets working in addon panel? [closed]

I can´t figure out how to enable editing collection inputs in N-panel. Thanks for any help
RobenSikk's user avatar
3 votes
2 answers
105 views

How to reload ONE particular UI script? (an alternative to 'Reload Scripts' )

My add-on edits Blender's UI scripts. To apply changes to UI - edited scripts should be reloaded. For this purpose I use bpy.ops.script.reload() It does the job, ...
Yaroslav's user avatar
  • 543
0 votes
0 answers
14 views

Continue baking after changing modifier and adding a new object

blenderers! I want to write a Python script to simulate two clothes being dropped on top of a cube. Here are the steps that I want to take: I want to drop the first cloth and simulate the physics for ...
Aslan Noorghasemi's user avatar
2 votes
0 answers
34 views

Time since last function call

зThere is an operator “A_TimeSincePriorHotkey” in the autohokey program. It returns the time elapsed since the last call of this function. With this operator it is very easy to work with double clicks ...
Andrew's user avatar
  • 51
1 vote
0 answers
19 views

How to make separate curves to have the same tangent on their points

I have individual Bezier curves that are needed to create the road. There are meshes of different lengths - these are sections of the road that can have different curvature of turns and elevation ...
Chase81's user avatar
  • 11
0 votes
1 answer
17 views

bpy.ops.transform.skin_resize script issue

I am iterating through vertices and applying `bpy.ops.transform.skin_resize" to each vertex. In the info panel, I can see that the correct value is being applied to each vertex, but in the ...
Gregory Driscoll's user avatar
1 vote
0 answers
27 views

How can I determine if the Dope Sheet menu state is expanded or closed via Python?

Is there a way I can access certain UI elements through a script in Blender? I am trying to access information within the Dope Sheet Editor. One thing I would like to achieve is to determine if a menu ...
Axel Olsson's user avatar
1 vote
1 answer
33 views

Creating a Shortcut to Toggle Wireframe and Solid Display for a Singular Mesh with a Single Key Press

I want to hotkey the display as wireframe for an individual mesh with a keystroke, and then on the next press, it will go back to solid. I've tried to create a shortcut, but all I get is the "...
MeatwadLevelSkill's user avatar
1 vote
1 answer
39 views

How can I count the number of visible objects in a rendered image?

I used to do this on blender2.78c+ubuntu20.04(cuda11.8+4090), but it will error after process around 700+ images. ...
UZS Rt's user avatar
  • 13
3 votes
1 answer
39 views

How to grey out a modifier panel UI element?

I would like to achieve a greyed-out effect similar to this: Except in the object modifiers menu: The parameter can be accessed by ...
Quisque's user avatar
  • 93
0 votes
1 answer
35 views

Blender 4.1 how to correctly use "#Frame"?

How to correctly use #Frame to rotate camera around object? Parent camera to empty. select Empty. Rotation Z: #Frame/30 Syntax ...
CountQuadula's user avatar
0 votes
1 answer
62 views

How to reload UI without restarting Blender

I'm writing addon which edits default UI. To be specific - it works with VIEW3D_MT_mesh_add The functionality I need goes beyond standard ...
Yaroslav's user avatar
  • 543
0 votes
0 answers
20 views

Modify face orientations in bulk

I wrote a script for batch change orientation. Here is a script I wrote: ...
LIN's user avatar
  • 1
0 votes
2 answers
48 views

Set Origin to a specific vertex

I need some help with my script. The main task is to move the origin to the position of a certain vertex. In theory this works quite well, but unfortunately the meshes are always moved after i run the ...
Knudsen's user avatar
  • 37
0 votes
1 answer
57 views

How can I make this script not get exponentially slower?

I'm trying to linked-duplicate an object with nested sub-objects. I've rewritten bpy.ops.duplicate_move_linked() as a function without ...
mugwortz's user avatar
2 votes
0 answers
30 views

Text in reflection

I'm new here in this blender world and I really need your help with a college project. I'm sorry if anything is written wrong as I'm using Google Translate. I am from Brazil How to create a script in ...
bbd studio's user avatar
1 vote
1 answer
31 views

How to Align Icon to the Right in Blender Panel Header using python?

I’m trying to customize a panel using python in Blender 4.1, and I want to align an icon to the right side of the panel header. (like this) I’ve tried a few approaches, but I can’t seem to get it ...
VxQtW-1's user avatar
  • 13
0 votes
0 answers
26 views

change modifiers values ​with a gizmo

I see a lot of potential in gizmos, yet there is very little info on it. For example, I want to modify the properties of the modifiers or geometry nodes of my object with a gizmo. How to do this ? ...
André Ruf's user avatar
0 votes
0 answers
19 views

How do I convert camera's rotation from Z-Up to Y-Up?

So I have this script that exports data on the location and rotation of the camera every keyframe to a json file, and this is working great but the problem is that I need to convert the rotation from ...
The Batman's user avatar
2 votes
1 answer
29 views

Print out list of Asset Browser Items including their tags

I have a giant asset browser with over 2000 items. Some of the items have tags (product numbers), but not many. I would now like to output all the names of the items and their stored tags so that I ...
Erdorano's user avatar
  • 117
2 votes
1 answer
27 views

Python way to setup the Menu Switch default value when exposed to the modifiers input

I need to setup the default value in the geometry modifiers which is from a Menu Switch node. I tried two ways, neither worked. ...
baby boss's user avatar
  • 125
0 votes
0 answers
16 views

How can I create a custom geometry node that runs a Python script? [duplicate]

I'd like to create a completely custom geometry node (not a node group) that for example, takes some input string, reverses it using a Python script, and then returns the output as a string in that ...
J S's user avatar
  • 65
0 votes
0 answers
18 views

Placing an object along an edge over another

I want to place an object along an edge over another, but keep the same angle betwen faces. My English is not good so I hope a couple pictures can show what I want. I put manually a pyramid over a ...
Víctor GV's user avatar
6 votes
1 answer
140 views

How can I get the `session_uid` used by the Bake geometry node using Python?

I need to bake a part of my node tree via the bake node for an add-on. This requires a correct session_uid to press the button with Python. I already tried ...
Quisque's user avatar
  • 93
2 votes
0 answers
32 views

How to include created Geometry Nodes in addon?

I created Geometry Nodes group that I want to include with my addon so I can use it with other projects and/or share it with someone. How can I link Geometry Nodes to my addon?
Veeran's user avatar
  • 33
0 votes
0 answers
32 views

Camera-Based Value Driver

Does anyone know how this is working: Goal: I'm trying to achieve this ability with drivers: I notice it has what I call the "feedback loop", where if you angle the object and/or angle the ...
FIndTheFix's user avatar
0 votes
0 answers
23 views

Separate selection with python

I'm trying to separate mesh in two parts with a script, I want to "cut" the mesh in a midpoint plane with bisec and than rip the vertices, this part of my script works fine, the problem is ...
Vincenzo Casillo's user avatar
1 vote
0 answers
34 views

Blender script distorts large object

I am creating coin using cylinder and adding text on it. I am using blender script and calling script via command line. Sizes of coins ar 45mm, 60mm,, 75mm, 90mm and 105mm. It is working fine for ...
Tarlok's user avatar
  • 21
1 vote
1 answer
20 views

Set up Flamenco to support multiple Blender versions?

I have some older workstations that are not supported by the latest versions of Blender, but I still use interactively. I want to send jobs from these workstations to my Flamenco/Blender "farm&...
Doug Wegscheid's user avatar
2 votes
0 answers
50 views

Change Outliner area size via python

Looking for a way to write a toggler to quickly compress and expand the Outliner to the right edge of the screen and back. It seems that "bpy.ops.screen.area_move()" operator can be used for ...
Andrew's user avatar
  • 51
1 vote
1 answer
17 views

Is there a way to create a colored text box for StringProperty in addon UI, like the overwrite warning in Blender save-as window?

To store a user setting, I managed to access a StringProperty in my addon popup window like this: But i want to add an overwrite warning as same as the blender file save window: Is there a way to do ...
Trantor's user avatar
  • 13
0 votes
1 answer
46 views

code that works in blender 3.5 but not as expected in blender 4.1

premise The code below is intended to duplicate an object and change the vertex color of the duplicated object. Select the object called "ic" and run it. Ultimately, I want to change the ...
shimiken's user avatar
1 vote
1 answer
32 views

AttributeError: 'NoneType' object has no attribute 'modifiers'

So I've been trying to add Geo Nodes modifier to a created cube through custom UI panel, even though it works as intended, Blender shows me AttributeError. How can I fix this? (I'm new to coding so ...
Veeran's user avatar
  • 33
3 votes
1 answer
48 views

How to hide/unhide objects in a particular ViewLayer?

I am trying to hide/unhide objects in a particular ViewLayer but it's hiding in the current view layer only. ...
Karan's user avatar
  • 2,399
0 votes
0 answers
32 views

How can I prevent operator from blocking Blender Interactions during execution?

I'm new to Blender Python programming, and for a personal project, I'm experimenting with creating a Blender Python addon. I aim to execute an asynchronous GET request when I select a button in a ...
kernage's user avatar
1 vote
1 answer
42 views

Scene optimization on a material level?

How can I properly optimize a scene at a material level? For example. I have 2 different versions of the same rock texture in different resolutions, 1k for the background and 8k for the foreground. ...
elistuff's user avatar
0 votes
0 answers
27 views

How can I add a FloatVectorProperty to my addon layout? [duplicate]

How to properly register a FloatVectorProperty? When I do: box.prop(self, "amb_day_color") where ...
Oleg Kivasev's user avatar
1 vote
1 answer
65 views

How to select only deformation bones?

Is there a way to select all bones from the vertex group of the mesh? I have too many overlapping bones that are very tedious to work and some are non-deformer which I wanted to hide and only work ...
Wissam Seaifan's user avatar
1 vote
1 answer
44 views

Can Particle System caches be accessed directly by Geometry Nodes?

My goal is to instantiate objects on the points of a particle system. Right now, my workflow is: tweak the parameters of the particle system export it as an Alembic cache (point cloud?) import it ...
andycepi's user avatar
2 votes
2 answers
20 views

How to read and change value of edge crease in blender 4 via python script (MeshEdge.crease property has been removed)

as MeshEdge.crease property has been removed in blender 4, how can I check and change the value of an edge crease ? I used to do this to check edge crease value and set it to 1 if the value was over 0....
cscholl's user avatar
  • 193
2 votes
1 answer
27 views

Python: canvas-flip action is merged with the next user action in undo history

I wrote a simple add-on to enable canvas flipping in Blender (for Grease Pencil) with a hotkey, as well as a menu button. All it does is multiply the camera's local X scale by -1: ...
Latin1's user avatar
  • 33

1
2 3 4 5
129