home.social

#bpy — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #bpy, aggregated by home.social.

  1. 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.
    codeberg.org/stib/stibs_blende
    #B3D #python #bpy

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

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

    youtube.com/watch?v=GP53gDHGiIQ

  4. #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:

    blenderartists.org/t/the-load-

    🦇

  5. #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... codeberg.org/dbat/blender-addo 🤗

    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.

    🦇

  6. #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!

  7. New release of my math formula add-on is now live: github.com/WannesMalfait/Blend . Here is a short video explaining what it is about: 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

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

  9. I just published a new release of my math formula add-on ( github.com/WannesMalfait/Blend ). I finally finished my implementation of keyword arguments and loops after almost a year (the parsing phase was already done).
    #blender #b3d #bpy #python