r/blenderpython • u/emcartdigital • Mar 16 '26
Mesh Fix Addon What do you think of this add-on?
Fix common mesh problems before you export your models
r/blenderpython • u/emcartdigital • Mar 16 '26
Fix common mesh problems before you export your models
r/blenderpython • u/Sketchy_Squirrel • Apr 26 '25
Hello, I've been developing a rigging system that would allow me to rig a 2D grease pencil character with different views, making up a 360 degree turn around.
As part of this I've been trying to make a script that copies a keyframe, but I can't figure it out. Asking chat GPT they said that since updating to Grease Pencil 3, the python API is incomplete and it's impossible to copy a keyframe through code. Is this true? if so is there a work around? Any help would be greatly appreciated.
r/blenderpython • u/Ok_Reach_3152 • May 01 '25
I want to use a curve object [spiral] to read from it, what are the x,y values for given z.
I can find object, but what operation do I need to use to read the mentioned values? Which properties do I need?
I can code but I wouldn't call myself developer. I was trying to comprehend API docs starting yesterday. I can add my object, call it with data, or other methods, but I am lost in understanding of the the structure of the object. Although if I understand correctly, the key to understanding is RNA? But it is confusing, because I only know this concept from biology. Is this an analogy of function in code, blender specific, or some programming concept?
r/blenderpython • u/IndifferentMatter • Apr 09 '25
I'm exploring the possibility of my shader node groups' sockets having programmer-friendly (if user-hostile) names while showing verbose, user-friendly ones in the GUI, using standard node group socket properties and no custom layouts.
I see that there is a NodeSocket label property (not to be confused with the bl_label one) which suggests a similarity with node groups' name vs. label properties. As of Blender 4.4, it is read-only on node groups created through Blender's GUI, and defaults to an empty string.
What is the purpose of this property? Could it work as an alternate, "visible name" for a socket? And is there any stage in the creation of a node group via Python in which one could assign it an arbitrary string?
r/blenderpython • u/LalaCrowGhost • Dec 04 '25
I want to lock an objects location, rotation or scale but I dont know how to do it with python
r/blenderpython • u/abhi_physics90 • Feb 18 '26
Hello everyone,
I just made a new updated demo video for my addon Mesh Writer. I would love to hear your feedbacks and impressions about this demo video.
P.S. Mesh Writer is Vector animation, Vector art illustration and note annotations making tool for Blender.
Get on SuperHive (Blender Market) : Mesh Writer on SuperHive
Cheers.
r/blenderpython • u/Foundation_First_MW • Jul 21 '26
Well it HAS!
Say hello to the Hero Rig! (which is FREE!! Foundation First MasterWorks on Gumroad)
A.K.A. the last Rig you'll ever use, or ever want to!
Are you tired of Bone Heat Warning?
Tired of spending Hours/Days Weight Painting?
Tired of Mesh Collapsing and CandyWrapping?
Tired of Limb Flipping?
Tired of Counter Animating?
Then YOU are the Intended Audience for the Hero
Rig because Those are the problems it intends to solve!
This Product will be undergoing Continuous Ongoing Development,
maintained by us (us referring to just me right now)
and has been tested extensively, or as extensively as I can alone,
and Perfection is Not guaranteed, but if it operates even
remotely similar for you as it does for me, then I know you'll
find many reasons to find it Helpful!
This is the First Iteration of the Beta Version. Built into the UI
is a Community HUB with links to Support, Documentation,
and Bug Report/Feature Suggest options to inform me
of any issues that may arise, and a "Co-Conspirators" tab to
keep track of everyone who Suggest features, Reports Bugs,
or Supports Development in any way,
with an Identical List on the official FFMW Discord Server!
I sincerely hope you try and Enjoy the Hero Rig,
and even if it's not the best today,
let me know how to Improve it
and we can make it the Best Together!
------------------------------------------------------------
Also, since this version of the Post is for r/BlenderPython,
what might interest you to know is that its
Open Glass-Box UI Script is 60,000 lines long!
You're completely free to do with it as you please!
Just please Consider Supporting Spread the Word
so we can get some Beta Testing al up in here
to give me more work to do,
as if 12+hrs/day wasn't enough already lol
Anyway, I hope you check it out, and Good luck out there!
r/blenderpython • u/BraveMonk • Sep 09 '26
r/blenderpython • u/-dadderall- • Aug 26 '20
I think I just don't know the terminology to be able to find this solution. Here's an example of what I'd like to achieve -
Link the focal length of Camera B to the focal length of Camera A, so whenever A changes focal length, B changes as well. I can parent the two objects together, but can't figure out how to link other properties.
What am I missing here? Thanks!
r/blenderpython • u/noko12312 • Sep 04 '20
So as i havent had any experience with Python coding in Blender, i am wondering if this is possible and if so how to do it.
I essentially want to have a variable “Time” that can be key framed, and depending on that variable change multiple mix shaders from 1 to 0 or from 0 to 1 independent from one another across multiple materials. For example:
If “time” = 12, then set “mix shader 001” = 1 and “mix shader 002” = 0
But with many more mix shaders.
What i am trying to do is keyframe the switching of the background material to make a bunch of day/night cycles. I could keyframe the mix shaders manually but if i could just keyframe a time variable that controls the mix shaders it would make it much quicker and less cluttered. Pretty sure this is possible within the node editor with a ton of math nodes set to compare, but like i said if there is a less cluttered way to go about it i would want to do it that way.
Thanks!
r/blenderpython • u/Trburns • Sep 22 '20
so basically i am creating a asset pack, and i would like to create a add on that imports or appends the models into the scene. I've found a template that includes the import code, but i need to somehow connect the assets so the code knows what to import
r/blenderpython • u/noko12312 • Sep 07 '20
So for an object material you can get it using:
bpy.data.materials.get("Dark Trees.001")but this has not been working if i use:
bpy.data.materials.get("World")is there a different way you have to get the World material?
r/blenderpython • u/juancarlv • Sep 23 '20
r/blenderpython • u/-dadderall- • Aug 16 '20
I’m likely searching with the wrong terminology, but I don’t know what to search for if I don’t... know what to search for haha. Can anyone help?
To go on a bit more detail - I want to use the add on to create an import list of a variety of screws / nuts and bolts to add to scenes, as they’re a bit tedious to model or track down from old files every time.
It seems like it should be relatively simple, even at my skill level, and I’m struggling! Any help appreciated :)
r/blenderpython • u/ShaunKulesa • Sep 21 '20
I have some code that adds a premade python script then makes a linked always and python controller but how do i assign a script to it?
bl_info = {
"name": "Move X Axis",
"blender": (2, 90, 0),
"category": "Object",
}
import bpy
class ObjectMoveX(bpy.types.Operator):
"""My Object Moving Script""" # Use this as a tooltip for menu items and buttons.
bl_idname = "object.move_x" # Unique identifier for buttons and menu items to reference.
bl_label = "Move X by One" # Display name in the interface.
bl_options = {'REGISTER', 'UNDO'} # Enable undo for the operator.
def execute(self, context): # execute() is called when running the operator.
# The original script
bpy.ops.text.open(filepath='D:\\test.py')
obj = bpy.context.object
sensors = obj.game.sensors
controllers = obj.game.controllers
bpy.ops.logic.sensor_add(type="ALWAYS", object=obj.name)
bpy.ops.logic.controller_add(type="PYTHON", object=obj.name)
# Newly added logic blocks will be the last ones:
sensor = sensors[-1]
controller = controllers[-1]
sensor.link(controller)
return {'FINISHED'} # Lets Blender know the operator finished successfully.
def register():
bpy.utils.register_class(ObjectMoveX)
def unregister():
bpy.utils.unregister_class(ObjectMoveX)
# This allows you to run the script directly from Blender's Text editor
# to test the add-on without having to install it.
if __name__ == "__main__":
register()r/blenderpython • u/[deleted] • Jul 15 '21
r/blenderpython • u/mocknix • Jul 10 '21
r/blenderpython • u/inventorj • Aug 09 '21
I need help writing a Python script that modifies dimensions of primitive mesh objects using a few Raspberry Pi analog pin values.
Context: I'm prototyping a device that makes 3D printing a few basic parts super quick and easy. mockup drawing: https://docs.google.com/drawings/d/e/2PACX-1vRw1r0v2hiGI0VALE_KoquSJl7qMrdtmqKwtjPEbqG_pDkWJJHsiMIFbirs06IgjGzGZHWrqV_HzEqt/pub?w=960&h=720
User story: As an amateur machinist / hobby garage maker, I need a way to design and print simple 3D objects like bushings, washers, shims without interrupting my flow state (learning and using Blender with a computer and mouse definitely interrupts my flow).
Product: a hardware device (like a audio mixer board) that connects to my 3D printer. The device is a SOC - e.g. Raspberry Pi running Blender (this works - i've tried it) and some slicer software (I haven't tried it yet)
The interface is all hardware: a LCD screen, a few LED lights and knobs (no screen, keyboard or mouse). mockup v1: https://docs.google.com/drawings/d/e/2PACX-1vRw1r0v2hiGI0VALE_KoquSJl7qMrdtmqKwtjPEbqG_pDkWJJHsiMIFbirs06IgjGzGZHWrqV_HzEqt/pub?w=960&h=720
I need help writing a Python script that modifies objects using the hardware knob values, then exports as STL, calls a OS script that launches the slicer software and sends it to the printer.
(the final product will have a web interface where the user sets it up e.g. chooses their 3D printer)
r/blenderpython • u/[deleted] • Jul 14 '21
r/blenderpython • u/Trburns • Jun 23 '21
so basically i have two addons. on the second addon i basically copy&pasted the code from the first add on changed a few names. however whenever i install both add ons, only one addon will show up at a time. i know nothing about coding and i am basically just winging it. any help is greatly appreciated
addon one-
bl_info = {
"name": "The Countryside Nature Collection",
"description": "Nature models",
"author": "TRBRenders",
"version": (1, 0),
"blender": (2, 83, 0),
"location": "View 3D > Properties Panel",
"wiki_url": "",
"tracker_url": "",
"support": "COMMUNITY",
"category": "Add Mesh"
}
# Libraries
import bpy
import os
from bpy.props import *
from bpy.types import Panel, Operator, PropertyGroup
from bpy.utils import previews
from bpy.types import WindowManager
# Panel
class REAL_PT_trees(Panel):
bl_space_type = "VIEW_3D"
bl_context = "objectmode"
bl_region_type = "UI"
bl_label = "Nature"
bl_category = "The Countryside Nature Collection"
def draw(self, context):
scn = bpy.context.scene
layout = self.layout
settings = scn.trees
wm = context.window_manager
# Categories
col = layout.column(align=True)
row = col.row(align=True)
row.prop(settings, "category", expand=True)
# Previews
row = col.row()
row.template_icon_view(wm, "tree_previews", show_labels=True)
# Furniture name
name = bpy.data.window_managers["WinMan"].tree_previews
row = col.row(align=True)
row.alignment = 'CENTER'
row.label(text=name)
# Add Button
row = col.row(align=True)
row.scale_y = 1.5
row.operator("trees.add", icon="ADD", text="Add")
# Append
class TREES_OT_Add(Operator):
bl_idname = "trees.add"
bl_label = "Add Tree"
bl_description = "Add the selected Models"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
category = context.scene.trees.category
selected = bpy.data.window_managers["WinMan"].tree_previews
# Append tree
filepath = os.path.join(os.path.dirname(__file__), "Blends/" + category + os.sep + selected + ".blend")
with bpy.data.libraries.load(filepath) as (data_from, data_to):
data_to.objects = [name for name in data_from.objects]
for obj in data_to.objects:
context.collection.objects.link(obj)
return{'FINISHED'}
# Previews
def generate_previews(self, context):
category = context.scene.trees.category
directory = os.path.join(os.path.dirname(__file__), "Icons")
pcoll = trees_collection["main"]
if directory == pcoll.images_location:
return pcoll.tree_previews
# Generate the thumbnails
enum_items = []
for i, image in enumerate(sorted(os.listdir(directory))):
icon = pcoll.get(image)
if not icon:
filepath = os.path.join(directory, image)
thumb = pcoll.load(image, filepath, 'IMAGE')
else:
thumb = pcoll[image]
enum_items.append((image[:-4], image[:-4], "", thumb.icon_id, i))
pcoll.tree_previews = enum_items
pcoll.images_location = directory
bpy.context.window_manager['tree_previews'] = 0
return enum_items
# Properties
class TreeSettings(PropertyGroup):
category : bpy.props.EnumProperty(
name="Category",
items= [
],
description="Select a category"
)
#############################################################################################
trees_collection = {}
classes = (
REAL_PT_trees,
TREES_OT_Add,
TreeSettings
)
register, unregister = bpy.utils.register_classes_factory(classes)
# Register
def register():
for cls in classes:
bpy.utils.register_class(cls)
bpy.types.Scene.trees = bpy.props.PointerProperty(type=TreeSettings)
# Icons
WindowManager.tree_previews = EnumProperty(
name="Icons",
items=generate_previews,
description="Select Desired Models"
)
pcoll = bpy.utils.previews.new()
pcoll.images_location = ""
pcoll.tree_previews = ()
trees_collection["main"] = pcoll
# Unregister
def unregister():
for cls in classes:
bpy.utils.unregister_class(cls)
del bpy.types.Scene.trees
del WindowManager.tree_previews
for preview in trees_collection.values():
bpy.utils.previews.remove(preview)
trees_collection.clear()
if __name__ == "__main__":
register()addon two-
bl_info = {
"name": "The Coral And Creatures Collection",
"description": "Coral And Creature Models",
"author": "TRBRenders",
"version": (1, 0),
"blender": (2, 92, 0),
"location": "View 3D > Properties Panel",
"wiki_url": "",
"tracker_url": "",
"support": "COMMUNITY",
"category": "Add Mesh"
}
# Libraries
import bpy
import os
from bpy.props import *
from bpy.types import Panel, Operator, PropertyGroup
from bpy.utils import previews
from bpy.types import WindowManager
# Panel
class REAL_CT_trees(Panel):
bl_space_type = "VIEW_3D"
bl_context = "objectmode"
bl_region_type = "UI"
bl_label = "Coral And Creatures"
bl_category = "The Coral And Creatures Collection"
def draw(self, context):
scn = bpy.context.scene
layout = self.layout
settings = scn.trees
wm = context.window_manager
# Categories
col = layout.column(align=True)
row = col.row(align=True)
row.prop(settings, "category", expand=True)
# Previews
row = col.row()
row.template_icon_view(wm, "tree_previews", show_labels=True)
# Furniture name
name = bpy.data.window_managers["WinMan"].tree_previews
row = col.row(align=True)
row.alignment = 'CENTER'
row.label(text=name)
# Add Button
row = col.row(align=True)
row.scale_y = 1.5
row.operator("trees.add", icon="ADD", text="Add")
# Append
class TREES_CT_Add(Operator):
bl_idname = "trees.add"
bl_label = "Add Tree"
bl_description = "Add the selected Models"
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
category = context.scene.trees.category
selected = bpy.data.window_managers["WinMan"].tree_previews
# Append tree
filepath = os.path.join(os.path.dirname(__file__), "Blends/" + category + os.sep + selected + ".blend")
with bpy.data.libraries.load(filepath) as (data_from, data_to):
data_to.objects = [name for name in data_from.objects]
for obj in data_to.objects:
context.collection.objects.link(obj)
return{'FINISHED'}
# Previews
def generate_previews(self, context):
category = context.scene.trees.category
directory = os.path.join(os.path.dirname(__file__), "Icons")
pcoll = trees_collection["main"]
if directory == pcoll.images_location:
return pcoll.tree_previews
# Generate the thumbnails
enum_items = []
for i, image in enumerate(sorted(os.listdir(directory))):
icon = pcoll.get(image)
if not icon:
filepath = os.path.join(directory, image)
thumb = pcoll.load(image, filepath, 'IMAGE')
else:
thumb = pcoll[image]
enum_items.append((image[:-4], image[:-4], "", thumb.icon_id, i))
pcoll.tree_previews = enum_items
pcoll.images_location = directory
bpy.context.window_manager['tree_previews'] = 0
return enum_items
# Properties
class TreeSettingss(PropertyGroup):
category : bpy.props.EnumProperty(
name="Category",
items= [
],
description="Select a category"
)
#############################################################################################
trees_collection = {}
classes = (
REAL_CT_trees,
TREES_CT_Add,
TreeSettingss
)
register, unregister = bpy.utils.register_classes_factory(classes)
# Register
def register():
for cls in classes:
bpy.utils.register_class(cls)
bpy.types.Scene.trees = bpy.props.PointerProperty(type=TreeSettingss)
# Icons
WindowManager.tree_previews = EnumProperty(
name="Icons",
items=generate_previews,
description="Select Desired Models"
)
pcoll = bpy.utils.previews.new()
pcoll.images_location = ""
pcoll.tree_previews = ()
trees_collection["main"] = pcoll
# Unregister
def unregister():
for cls in classes:
bpy.utils.unregister_class(cls)
del bpy.types.Scene.trees
del WindowManager.tree_previews
for preview in trees_collection.values():
bpy.utils.previews.remove(preview)
trees_collection.clear()
if __name__ == "__main__":
register()r/blenderpython • u/mocknix • Jul 11 '21
r/blenderpython • u/Mr_Kuros • Sep 13 '24
r/blenderpython • u/thetilltrov • Oct 09 '24
r/blenderpython • u/-HuginMunin- • Sep 30 '24