Skip to main content

Unanswered Questions

5,215 questions with no upvoted or accepted answers
49 votes
1 answer
3k views

Custom trackpad pan/zoom/rotate behavior add-on

I'm trying to write an addon to customize the trackpad panning, zoomimg, and rotating gestures, but can't find a way to read the actual trackpad parameters for position and so on. The properties in ...
11 votes
1 answer
594 views

Save screenshot (bge) without writing to disk

This is a little odd but I need to save a screen-shot as an array (numpy array for eg) without writing to disk. The idea here is to create and then call the array once per frame in an external script ...
10 votes
1 answer
740 views

How can I get a list of currently running modal operators?

Here I found a working solution using ctypes which allows to find out if any modal operator is currently running. I am not good in C and don't understand how it works. But I'm sure someone does, so is ...
9 votes
1 answer
3k views

Creating custom node types for geometry nodes

is it possible to create custom nodes for the geometry node editor (NOT node groups, combining blender built-in nodes), define inputs and outputs and execute some python code in between? I couldn't ...
9 votes
0 answers
250 views

Play/animate images, spritesheets or video files in 'template_icon_view'

I want to "play" some animation in this UI space, the template_icon_view: I can load all the images I want, for example: I know that the gif format is ...
8 votes
0 answers
303 views

how to write a custom projection type?

Is it possible to create a lens shader with EEVEE/Cycles ? I'd like to have the control over the camera position and the ray direction per sample. This allows to simulate various conventional lens ...
8 votes
0 answers
892 views

Operator tooltip from layout text

The concept is to make a panel layout that emulates the workspace (screen) layout. While testing I have set all the buttons to be the Splash Screen operator. An image of how this looks for five ...
8 votes
0 answers
367 views

Blender on Windows is skipping python script. (brenda on windows)

We've been using Brenda for quite some time now for rendering architectural stills. Since our editing stations are doing nothing at night, I started making a desktop app that allows you to pick jobs ...
7 votes
1 answer
277 views

How to display an image in my custom node

I have a custom node and I want it to be able to display an image. I know that the node has a parameter show_preview and if you enable it, no image appears.
7 votes
0 answers
816 views

Scale operator icon OR make template_icon clickable

I am trying to present the user with a gallery view to select a item from the thumbnails. Ideally, they click a button, are presented with the gallery view, and with a single click choose the item. I ...
7 votes
0 answers
645 views

Update function for NodeSocket?

How do I set a callback for socket input change (value or link change) when having a custom node? I have a socket defined like: ...
7 votes
0 answers
640 views

Is there a low level alternative for bpy.ops.object.convert(target='CURVE')?

(Note: Somebody asked there nearly the same question as me and got a very nice answer. However, this was to convert an object to a mesh. I have exactly the same context as this person but I want to ...
6 votes
0 answers
475 views

How do I change the width of the Adjust Last Operation panel?

I've done this simple operator taken from templates. How can I change the width of the Adjust Last Operation panel? I tried scale_x and ...
6 votes
0 answers
718 views

Is there a low level alternative for bpy.ops.mesh.separate()?

I am dealing with a great model, I have a problem, I want to divide it by parts, but bpy.ops.mesh.separate(type = 'LOOSE') seems to have a big problem, that is not ...
6 votes
0 answers
526 views

Can I measure the UI font size with Python in order split text into multiple lines?

Is there any way to get the size of UI text, such as when using layout.label(text="message")? I'm trying to create a simple message box popup that displays ...
6 votes
1 answer
4k views

Separate alpha from color in Shader Editor

In the Shader Editor, I can create an RGB node and in there, I can set an alpha value as displayed in this screenshot: However, no color separation node in blender supports extracting that value and ...
6 votes
1 answer
2k views

How to wait for an operation - to another operator - to complete within an operator (import_scene)

Besides the point but why is this not working as a default stack is expected to work? I'm trying to get an operator to call another operator and wait for the operator's response before proceeding. ...
6 votes
0 answers
1k views

Can Blender automatically reload external script files when they are changed?

I came across this question: Is it possible to run a script from an external editor without reloading the file? Which also was asked over here in a similair format: Workflow for developing add-on/...
6 votes
0 answers
386 views

How to store rendered image as an nd array without saving the image in blender python?

After rendering using bpy.ops.render.render() to render the image. How do I store it directly to an nd array without actually saving the image and loading it back. I noticed that after rendering. ...
6 votes
1 answer
2k views

How to update compositing nodes via script?

I create some nodes in compositing via python script: ...
6 votes
0 answers
997 views

accessing Blender objects from external Python IDEs

I would like to manipulate Blender objects from Spyder (not using the internal Python editor). Basically I would like to have Blender running and Spyder running as well, and then interactively access ...
6 votes
0 answers
533 views

Does anyone have an example of template_curve_mapping?

I'm doing some test with template_curve_mapping. I have write this code: ...
6 votes
0 answers
693 views

Hide filter options in UIList

I want the UIList to not show the filter options (inkl. the plus button). I've use following flag: self.use_filter_show = False The flag disables the filters ...
5 votes
0 answers
154 views

Flat shading when using displacement or bump

When using a bump or displacement node and bump only or displacement and bump in the material settings, the shade smooth option seems to not be working. Instead the geometry starts to show, auto ...
5 votes
0 answers
766 views

How can I make the text of my panel in bold or italic? this is blender python related

Basically what I want is to make my panel header in bold and other text in my panel to be italic. For example: I want the text 'settings' with the preferences icon to be in bold. This is the code for ...
5 votes
0 answers
137 views

The documentation says frame_change_pre is NOT the ‘before the frame changes’ event. What exactly is it then?

I would have imagined that frame_change_pre is the event that happens, well, before the frame changes. Silly me! The documentation states (emphasis mine): Called ...
5 votes
1 answer
231 views

Finding which addon an operator belongs to

A recent question / answer involves what looks like an overridden operator: bpy.ops.object.align() Differing from the documented default, how do we find which ...
5 votes
0 answers
196 views

Object Picker Modal Operator?

I saw this question this morning and i'm also quite interested in a Picker modal operator, so I did tinker a bit and achieve a somewhat beginning of a working code but I encountered some problems ...
5 votes
1 answer
637 views

How can I detect a scene change from Python?

I am trying to detect when the active scene changes. Initially I tried using the message bus system to subscribe to bpy.types.Window, "scene" Like this: <...
5 votes
0 answers
322 views

Custom shader script in compositor (de-linearize depth buffer)

Some months ago I wrote a minimal opengl 2.5d game engine with pre-rendered backgrounds (such old Resident evil, Alone in the dark and Final fantasy games). Depth is managed through a grayscale image ...
5 votes
1 answer
909 views

get this gradient style in blender

I'm trying to get this gradient style: My best result are with eevee with volumetric and gradient on a metaball, but i cannot figure out how to get the gradient fill the totally of the metaballs like ...
5 votes
1 answer
116 views

How to check if the collection is selected in outliner?

How to check if a collection is selected or not in the outliner using Python? Here I've selected the following collections: "scene 1", "scene 2" and "scene 3".
5 votes
0 answers
178 views

How to access Density/Flame grid via Python in 2.82 (Mantaflow)

Does anyone know how do I access the density/flame grid for the new Mantaflow fluid simulation engine in Blender 2.82? The old path still exists: ...
5 votes
0 answers
541 views

Removing space draw callbacks after losing the handle?

A small edit of test code from GPU Shader Module (gpu) "Mesh with Random Vertex Colors" to save the handle to the driver namespace ... ...
5 votes
0 answers
2k views

Addon not correctly reloading

Disabling my addon gives this error: RuntimeError: unregister_class(...):, missing bl_rna attribute from 'RNAMeta' instance (may not be registered) and re-enabling it gives this error: ValueError: ...
5 votes
0 answers
154 views

Blender Python: Output Paragraph of Text?

Is there any built-in support for automatic line breaks when writing text to the UI, such as through the layout.label() function? For example, if I set text that ...
5 votes
0 answers
698 views

Control image texture source from outside node group

I'm working on turning a cavity node setup I found online into a node group I can append to my blender files. The setup uses several mapping nodes (that I already converted to math nodes so the ...
5 votes
0 answers
2k views

nVidia skin shader with the Principled BSDF

I've been using a skin shader primarily based on the Brecht skin shader, which is itself based on the Sum-of-Gaussians approach as seen in 14.4.7 from GPU Gems by nVidia. Its Cycles adaptation, which ...
5 votes
0 answers
652 views

PyOpenGL and VBO Indexes

Long story short, I'm trying to do a modal handler that draws using OpenGL into the viewport. Immediate mode through BGL works fine, but is dog slow. I tried using VBOs through BGL but there seems to ...
5 votes
0 answers
1k views

How to triangulate a polygon using Python?

I often meet the following problem: mapping a point on the surface of a polygon in 3D coordinates to the corresponding polygon in a UV map. To do that, the only way I've found is to: Triangulate the ...
5 votes
1 answer
342 views

"Search for unknown operator" On Start-Up After Removing Module and Shortcuts

For lack of a less drastic alternative, I created a whole module just for setting bpy.context.window.screen to a specific screen, since ...
5 votes
0 answers
249 views

How can I derive from an existing Operator in Python?

When creating a new Blender Operator, you'll derive the class from bpy.types.Operator, like this: ...
5 votes
1 answer
298 views

Cannot mix .user and .addon keyconfigs in register()

I've been messing around with keymaps lately and I've come across behavior that doesn't make much sense to me. I am searching the current keyconfig for a specific keymap item, removing it, then adding ...
5 votes
1 answer
625 views

Is possible to generate a preview material from python?

I would like to generate the preview of a list of materials. I could create a sphere and apply the material, render and save it in a loop, but what I would like is to use the internal functionality of ...
5 votes
0 answers
710 views

Adding sliders from UI to pie menu

I've seen some sliders working in pie menus but the one I'm trying to add to my pie script isn't showing up. Its the 'autosmooth normals' slider from the Object Data tab, under Normals (in the ...
5 votes
0 answers
833 views

Converting an obj sequence to a .bobj fluid sim cache?

I'm wondering if there is any way to accomplish turning an obj sequence exported from realflow into a .bobj fluid cache that I could then trick blender into loading as a native fluid sim cache. So far ...
4 votes
0 answers
29 views

translucent white resin with embeddings - material

I need to make a volumetric translucent material, possibly working in EEVEE. It is a white semi-translucent resin with objects embedded. The embedded objects are more visible near to the surface of ...
4 votes
0 answers
218 views

Migrating geometry shaders to Metal

I'm working on BlenderBIM (architecture addon for Blender) and we have a bunch of shaders to support plan annotations in viewports. Mainly it's simple shapes based of lines - lines, segment based ...
4 votes
0 answers
377 views

Drawing non-polyline smoothed lines with `gpu` module

Backstory: Since bgl module will soon to be deprecated and it's doesn't work on Metal already I was trying to move code to gpu ...
4 votes
0 answers
57 views

Python access Bevel Custom Profile handles

We can access the profile points via obj.modifiers["Bevel"].custom_profile.points[1].location But how to get the handles location at that point?

15 30 50 per page
1
2 3 4 5
105