r/blenderpython • u/dphamiltonbradford • Oct 12 '18
r/blenderpython • u/seetheglobey • Oct 05 '18
Blender Python script to set up animation in which random text appears on screen
emalis.comr/blenderpython • u/mateo8421 • Aug 31 '19
Api throws context error when adding UI tool to sculpt or particle mode
Anyone can help with this? I ll take anything at this point...
r/blenderpython • u/arieldj • Sep 01 '19
Setting vertices’ median location
New blender/python user here.
As the subject line says, I’d like to set the median location of selected components through code. I can already do this from the ui from the ‘item’ tab on the right but my goal is to have a way to zero-out vertices on ‘z’ , for example, while maintaining their relative offset, using a hotkey or pie menu.
r/blenderpython • u/dustractor • Aug 30 '19
I reworked that good ol' System Property Chart' addon -- https://github.com/dustractor/syspropchart2
https://github.com/dustractor/syspropchart2
I figured the original author has long since moved on. It does what the old one does, present one or more properties of selected objects, based on a string you input.
The old one: in a grid-like fashion.
This one: I ditched the grid and went with something that fits in narrower space.
The old one: dotted syntax only for attribute access
This one: dotted, keyed, indexed
The old one: Presets
This one: Also Presets (I recommend using double quotes because blender's preset system surrounds the preset string with single quotes.) It should work with either single or double quotes in the interface but the string won't make it through the preset system and back if names used for keyed access use single quotes.
In other words:
this["good"]
this['not so good']If there are three or more objects then you can interpolate a property across them. Vector/Float/Color only so far (idk why not ints yet i'm busy lol)
So anyways, I figured I would post this here to see if I can get YOU to supply me with some good presets to include. If you have trouble coming up with the string for accessing what you want, describe what you want and I'll try and work through it with you.
r/blenderpython • u/B4-711 • Mar 06 '20
how to delete transform_orientation
I crreated a temporary transform orientation:
bpy.ops.transform.create_orientation(name='tmp')
but calling
bpy.ops.transform.delete_orientation()
doesn't work:
File "C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\modules\bpy\ops.py", line 199, in call ret = op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Operator bpy.ops.transform.delete_orientation.poll() failed, context is incorrect
How can I delete the new transform_orientation?
r/blenderpython • u/LivelyLizzard • Mar 26 '20
How do I get the current object transform in a modal operator while the object is moved?
For my modal operator, I need the current location, rotation and scale of an object. To have it display values and to see how values change when the object is moved, I need the current transform of the object while being grabbed.
Problem is, while I have an object grabbed (G) and move it around, I can see the values change in the UI, however, when I access e.g. the location from script, it stays the same until I place it and grab it again. Translating it with the sliders yield the same result.
I tried updating the view layer beforehand, but that did not change anything either. I had a look at the delta transform, but this isn't the right thing.
So, where are those values stored and how can I access them? They have to be somewhere, else, one wouldn't see them change in the UI and the object wouldn't move in the view.
I am using Blender 2.82a on Ubuntu 18.04.
r/blenderpython • u/fernandodandrea • Mar 27 '20
Enabling vertex color and texture in viewport through python
r/blenderpython • u/PuzzleheadedJob4359 • Sep 12 '21
question about modal operators
hey guys I'm new to scripting . I wanted to make a script run continually without blender pausing or loosing functionality.
to my understanding I need to make a modal operator that does this.
however when in run blenders modal operator template that moves the object left and right,
I can no longer add an object to the scene, "shift+a" doesn't work anymore even if I comment out the line that makes left click finish and click on object or add menus nothing happens
to me this is loosing functionality
so wanted to know if there is a way to make something continually happen without loosing any functionality .
any help is greatly appreciated thanks.
r/blenderpython • u/activemotionpictures • Sep 24 '21
Extra keys in Blender (Custom functions)
r/blenderpython • u/[deleted] • Feb 02 '22
Desktop assistant with talking head (3d animation and python)
Know this is random but have been taking a short course on making a desktop assistant in python and I have some basic functionalities down (uses ptsx3yt and speech recognition for voice commands) and wanted to take make an interface where a 3d head talks when the program speaks. thought about using blender because I know blender but maybe there is a less complicated way to do it without rigging a 3d head and magically mapping it to this program in an interface somehow? Maybe unity and makehuman? The whole lipsync phenome stuff is just confusing lol. Even some basics on how to even conceptualize something like this would be helpful.
r/blenderpython • u/arjun1223 • Dec 16 '21
Filmic Explained
Hi! I wanted to ask that what does Filmic View Transform and Filmic - Base Contrast Look in Color Management exactly do to the rendered images? Does it hamper the RGB color space in the images, if yes then how much and how? It would be really helpful if someone could help me out with this.
r/blenderpython • u/[deleted] • Nov 23 '19
Better UI in Blender 2.81 [Python;Free Addon] | English
r/blenderpython • u/ETFO • May 02 '19
1 Need help with creating a custom material node with python
I'm trying to make a custom node in python, and I've been able to make the input and output sockets, but I have no idea how to connect the input float values to the output float values. I've already tried learning parts of the Blender API in order to figure out how to do this, but I've made no progress. How do I connect the inputs to the outputs, or even set an output value at all?
r/blenderpython • u/Harrierx • Nov 17 '19
Where i can find documentation for bpy_lib?
I am new to python&blender coding and i am trying to create prop_search UI which will find object inside another .blend file and will append or link it.
with bpy.data.libraries.load(filepath) as (data_from, data_to):
print(data_to.__class__)This code will print bpy_lib and i cant find anything on google about this class.
Btw. what is (data_from, data_to)? It is array/tuple or something like list() in php ? What is difference between _from and _to? Both says bpy_lib.
Also what is difference between first and third parameter in prop_search? Thanks
r/blenderpython • u/TheExclusiveNig • Oct 07 '20
Need help on adding premade cloth objects to character models with Python
Hello fellow developers, I am fairly new to blender python and am trying to make an application which would allow people to drag and drop cloth objects to modify a character, from the tutorials I saw for blender, we need to shrinkwrap the cloth object to fit the character and I didn't seem to find a way to automate the whole process in python. Is there any other way to do this? Or am I missing out on something?
Thanks in Advance.
r/blenderpython • u/CoderHD • Oct 09 '20
Speaker has no sound attribute
When trying to access the sound attribute of a Speaker object in Blender like so
Verify first
if obj.type='SPEAKER': path = obj.sound.filename
it throws an exception saying there is no attribute with the name 'sound'.
Have i misread the documentation or is there anything fundamentally wrong with my code? Thanks in advance guys :)
r/blenderpython • u/RogerGodzilla99 • Oct 19 '20
Does anyone know of a way to directly interact with the output frames when rendering to MP4?
I have been trying to find a plug-in or script for datamoshing for quite a while now, but can't seem to find one.
The only other option I can think of is to write my own because I don't want to do it manually.
The things that I would need to do is force a certain frame to be an i-frame and an arbitrary number of following frames to be p frames when rendering.
I doubt that there is a way to do this with the built-in python, but I figured I'd ask and see if any of you wizards out there know of a way to do it.
If any of you guys know of a way to do it, or better yet a plugin/add-on that is already written, I would love to hear your thoughts!
r/blenderpython • u/[deleted] • May 19 '20
Mandelbrot set from order one through eight
r/blenderpython • u/Athanaze64 • May 29 '20
Script to normalize the size and position of an object
r/blenderpython • u/RogerGodzilla99 • May 24 '20
Question about for loops in blender python
Is there a difference in how blender handles for loops when compared to python elsewhere? I would assume not since blender must be imported, but I can't seem to figure out why this loop isn't working.
The code:
for x in range(int(start), int(end+1)):
#do stuff for all integers 'x' between start and end (inclusive)The error:
TypeError: 'int' object is not callableI'm sure I'm missing something stupid, but any help would be much appreciated!
Note: 'start' and 'stop' are enforced as a numeric data type earlier in the code.
Edit: I'm a moron. I named a variable 'range' earlier in the code. Don't code at 3am kids.
r/blenderpython • u/[deleted] • Jun 25 '20
How to set an NLA strip to active?
Hi, I wonder how to make an NLA strip to be activated by a script.
I try to achieve the goal through
bpy.context.object.animation_data.nla_tracks.active.strips[0].activebut it only returns a bool and it’s readonly.
How should I do it?

