When I'm working with #Blender #GeometryNodes I like to hide unnecessary clutter. Maths nodes for example take up a lot of space, and often the name of the operation is all that you need to see what they're doing, or the name of the operation and the value of the parameter. For example when adding 1 to an input using a maths Add node having it open doesn't give you more info than collapsing it and setting the name to "+1"
This is tedious to do, but it does make complicated node trees easier to parse.
So #IMadeAThing. A little script that calls the node by what it's doing and collapses it and hides un-connected inputs.
It also spots multiples and fractions of Ο€ and 𝜏 and common fractions from 1/2 to 15/16.
So far I've only done maths nodes, but I plan on working my way through the most common nodes, and adding general tidy-up functions as I go. Next on the list is Group Input nodes with only 1 output, that can just get named after the name of the output.
It's just a script that you can run from the Blender text editor at the moment. When it's not late at night I'll make it into a proper module.
If anyone has requests or suggestions, let me know.
https://codeberg.org/stib/stibs_blender_scripts/src/branch/main/nodeBeautify.py
#B3D #python #bpy
Any #bpy thing-knowers able to help me out? I'm writing a script that relies on the psd-tools module. To make sure it is loaded I do
```
python_executable = sys.executable
try:
import psd_tools
except ImportError:
subprocess.check_call([python_executable, '-m', 'ensurepip'])
subprocess.check_call([python_executable, '-m', 'pip', 'install', 'psd-tools'])
import psd_tools
```
I can see pip installing the module, but when I finally get to the import psd_tools line at the end it says that the module is not loaded.
#blender #python #psd-tools #AskFedi

Blender Conference was amazing again. I got some really nice responses to my talks as well. Here's the one on add-on development:

https://www.youtube.com/watch?v=GP53gDHGiIQ

#b3d #blender3d #bcon25 #BlenderConference #development #bpy

import bpy: modern add-on development β€” Blender Conference 2025

YouTube

#Blender #Python #Addon #BPY

I have posted a question on the Blender forums about how to start a script on load of a file, without a million NoneType errors.

If anyone is in the know:

https://blenderartists.org/t/the-load-post-handler-and-starting-an-operator-that-uses-modal/1588395

πŸ¦‡

The load_post Handler and starting an Operator that uses modal

I am trying to, on load of a blend file, start an Operator that uses modal (and tag_redraw) to draw a text label alongside every mesh in the scene. (I got the drawing code etc. from the python template β€œOperator Modal Draw”.) The problem is I don’t know how to smoothly start that process; there are NoneType errors atm. I can make it happen by just running the operator via F3 in the 3D View, but not from the load_post handler. Here is my sample code, and the errors follow: bl_info = { "name":...

Blender Artists Community

#Blender #BPY #Python #Addon

ETA: Nailed it! I have a menu item now! You can always pay me all the money to see how... Or... https://codeberg.org/dbat/blender-addon-godot-utils/src/branch/main/godot-multimesh πŸ€—

Is there any way to add a item to the Outliner context menu for Objects?

i.e. RMB on an object -> shows a menu -> I want my own entry in there to run some code on the selected object/s.

πŸ¦‡

blender-addon-godot-utils

An addon to quickly name (or unname) selected objects with Godot Import Hints.

Codeberg.org

#blender #bpy #python

How would I draw a little overlay icon on top of the items in the Outliner list?

I want to indicate visually which objects have a certain property set on them. I'm thinking of drawing a little dot or something over the item's icon.

Failing that, how can I draw said icon on top of a 3d mesh view? Like an overlay.

ETA ping @smagnusson ... gulp!

I started writing this shit as a joke, but ended up making an extension out of it.

https://projects.blender.org/pioverfour/highlighter

#b3d #bpy

highlighter

Syntax highlighting for Blender text objects

Blender Projects

I've created PyBlender - GPT for helping Blender plugin development using Python.

https://chat.openai.com/g/g-G2JpRpUAI-pyblender

#ChatGPT #GPTs #AI #Programming #Python #API #Blender #bpy

New release of my math formula add-on is now live: https://github.com/WannesMalfait/Blender-Add-ons/releases/tag/v2.0.0 . Here is a short video explaining what it is about: https://youtu.be/n807cI3hYw4 . The last release was for blender 2.93, so it was about time that I created a new release πŸ˜„

#blender #b3d #geometrynodes #bpy

Release Math Formula 2.0.0 (Blender 4+) Β· WannesMalfait/Blender-Add-ons

With the release of Blender 4.0, I think I have waited long enough to make an official release of this add-on. A lot has changed since the last (full) release of the add-on: Release Highlights Com...

GitHub
Spend some time improving the editor experience. Since the main goal of the add-on is speed up your workflow, improvements in the editor can go a long way. I added:
- Auto closing/removing of parens/braces/quotes
- Auto adding of () on function completing
- An option to set a background color (important for readability)
- A small preview of next completions after pressing TAB to complete.
#bpy #blender #b3d #python