Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions concerning scripting in Blender using the Python programming language. Also use this tag for questions about scripting in OSL (Open Shading Language).

0
votes
0answers
5 views

How do I control an object in Blender Game Engine 2.79b with a class of Python code in the scripted Game Logic section?

How do I control an object in Blender Game Engine 2.79b with a class of Python code in the scripted Game Logic section? I did some research, but could not find anything except for keyboard-control ...
0
votes
0answers
12 views

Multiple Modal Timers running continuously without the delay

I am new to blender and i need to visualise linear transformations. I am using this piece of code to create a timer. ...
2
votes
0answers
25 views

Is there a way to have an object animated by keyframes (or otherwise) leave a perpetual trail behind it?

I am currently working on an orbital simulation program, and using Blender to render the paths that the various planetary bodies and satellites follow in the simulations. A feature I would like to add ...
0
votes
0answers
9 views

take a picture of a specific object with python

I've created a 2d object and applied a UV map on it. I would like to take a picture of that object using python scripting. I tried using openGL render but that takes a picture of the entire scene. I ...
0
votes
1answer
36 views

Blender scripting GPU acceleration

Is there any possible way to accelerate the python's script execution inside of blender using GPU ?
1
vote
0answers
31 views

Allow cyclic connections in custom node tree

I want to allow a cyclic connection in a custom node tree. Here is an example screenshot of a cyclic connection. From what I uderstand, the following happens: As soon as a link is inserted such that ...
2
votes
1answer
20 views

Make python script to animate vertex points of any object

I am very new to blender and python . i want to make python script which can animate the vertex point of any object (let's example bpy.data.obajects['Cube']) ...
0
votes
0answers
26 views

Scripting challenge for noob

So, I've been learning Blender from courses online at Udemy and through Youtube for a while now but I just cannot seem to make any sense of the tutorials on scripting and I have a very specific ...
0
votes
1answer
11 views

Automated Rendering of Multiple Objects

I am trying to use Blender to create a dataset to recognize Dominos for machine learning. To do this I need to be able to take the object files I have and create ~100 random images of each of them (...
2
votes
1answer
26 views

Parsing xml file with animation nodes

I've an XML which includes position and rotation information and which I need to parse it in order to use it with animation nodes. This is something I already managed to do via python scripting but as ...
1
vote
1answer
21 views

How to render animation using different text each time?

I'm beginner in Blender and I don't even know if it is possible: I have an animation which I need to render multiple times with only difference in name of person used. (Like Hello, Mark next ...
1
vote
1answer
21 views

How to use antialiasing with bgl drawn elements?

When using a draw_handler to draw bgl elements to a screen as with GL_POLYGON or GL_LINE_LOOP, are there any bgl flags which can ...
0
votes
0answers
24 views

Draw informations in 3D_view

I'm trying to script a baking in network and it works but now I'd like to print informations for the user (clients whose are connected for example) I tried to print those informations in the 3D_view ...
0
votes
0answers
30 views

Blender as Python module; link to the correct pythonXX.dll?

I am the maintainer of a blender as a python module 'bpy' on pip and github. https://github.com/TylerGubala/blenderpy I am able to build blender pretty successfully. I have wheels for multiple ...
0
votes
0answers
18 views

How get image material preview for PyQT item icon (QListWidget)?

Hello me need get a privew material image for PyQT. Thank. ...
0
votes
0answers
15 views

How to access the operator instance members?

I'm testing Blender's scripting, with this simple operator from the documentation: ...
1
vote
0answers
23 views

How to use bgl?

I want to render simple lines on the 3D viewport through a modal operator but not using glBegin/End because those commands are deprecated in opengl 3.3 and will not be avaliable on 2.8 leaving me ...
1
vote
0answers
28 views

Huge gap in UI when using columns

I want to create buttons designed like this: But as you can see, there is a huge gap after the buttons, but I don't know how to get rid of it. Here is the code I use: ...
0
votes
0answers
20 views

How Does AnimationNodes Create This GUI Item?

I'm attaching the image of one GUI element which Animation Nodes can produce in the Nodes window. This does not seem to be from "context.window_manager.invoke_props_dialog()" (sorry, I'm not very good ...
0
votes
0answers
6 views

ui previews dynamic enum error

in the ui_previews_dynamic_enum.py from the templates script i have an error, the error happen when i load the path and remove the path and replace with the same path(the path that i previously ...
1
vote
1answer
27 views

Extrude in python

As in title, I'm trying to extrude mesh via python as I have ~1.5k objects to extrude and when I do it in editor it works perfectly but when I run it via python it always go wrong. It just move face ...
0
votes
0answers
16 views

Scoring In Blender [closed]

How could I have a player in my flight simulation score points during gameplay and have those scores displayed correspondingly to the objectives attained?
0
votes
0answers
10 views

How to get a layout element's x,y location?

Is it possible to get the location of a layout element (layout.prop, column.operator etc...)?
0
votes
0answers
10 views

Copying bone names from other Armature

There's a way to copy the names from other similar Armature? I have a custom model rigged by myself and every bone has a custom name, but that skeleton is identical to the ones used in Mixamo (Same ...
0
votes
0answers
27 views

Blender and external files not working, giving error in numpy

I keep running into an issue with Blender, and files I create outside of blender that I then import into my blender file as a library. This seems like an issue with numpy, although i'm not 100 percent ...
0
votes
0answers
16 views

Is it possible to update a StringProperty on ui activation?

I'm working on some text editor tools. I need to be able to invoke a modal operator immediately after a StringProperty has been clicked via the ui (a button in the header or panel for example). This ...
0
votes
0answers
13 views

Cannot paste or run sample scripts from Blender Quickstart

I am just starting using Blender. In the Blender API Quickstart Documentation it suggests: To run the script: Highlight the above code then press Ctrl-C to copy it. Start Blender ...
0
votes
0answers
18 views

How to auto-paint on edges(corners) with a script? Detect corners like in “UV-smart project”?

I need to automatically paint a line on edges(corners that covers normals too) where normals have an angle more than %myValue%. So before I never tried something like that in Blender. Can you guys ...
2
votes
0answers
110 views

How do I create custom sub menus for MCprep Addon?

I'd like to do my own edit of an add-on so it covers everything I need, I need to create a new menu when doing Shift+A and a sub tab when selecting a mode like on the pictures below: You can ...
0
votes
0answers
4 views

Batch Mdd caches to separate files

At the studio we have a project with characters and almost 100 shots, I need to bake each piece to separate mdds (for example, character_1_eyes.mdd, character_1_body.mdd, etc.), this workflow is well ...
0
votes
1answer
16 views

Switching resolution wipes rendered layers?

If you render with the usual F12 render button, then any previously rendered layers get blanked out and re-rendered. If you are manually rendering via the button on nodes in the compositor, you can ...
0
votes
0answers
6 views

Create button and running order of execution

I am writing an add-on and I am new to coding. I want to create multiple buttons and each button execute different scripts in Blender Text. I write another script to "push the buttons" in Blender in ...
1
vote
0answers
24 views

Python: How to toggle an object visibility with a menu?

Hello everyone I was making a menu for my rig in python, so I was wondering how would I make a menu that can toggle visibility of certain objects according to the option I choose: For example, let’s ...
0
votes
0answers
11 views

Automate animation movement

Imagine you create a simple posable character. You duplicate this character a bunch of times to form a small crowd. You could animate the crowd by hand but that sounds like a lot of work. It would be ...
0
votes
1answer
21 views

How to add a datetime object as custom property to a blender object

I'm trying to add a datetime as property to an object like so: ...
2
votes
0answers
19 views

Is there an equivalent of After Effect's “valueAtTime()” for drivers?

In After Effects you are allowed to use Expressions very similar to blender's drivers. In a very simple fashion you can get a property's value based on a given time like so: ...
0
votes
0answers
19 views

Rendering with Python: Multiple layers showing render progress?

How do you render multiple layers in a script and have blender show you the render progress for each one? If you're using bpy.ops.render.render, it will show the progress if you make 'INVOKE_DEFAULT" ...
0
votes
0answers
25 views

Render layer selection when rendering via python

I'm working on a script that renders certain render layers defined in the operator. The script is supposed to make a list of currently enabled render layers, disable all of them, and then enable the ...
2
votes
1answer
37 views

How do NodeSockets determine if a link between them is possible?

I have two NodeSockets class SockA(NodeSocket) and class SockA(NodeSocket). Now when I ...
0
votes
0answers
11 views

Get list of objects from an instanced group that was made real

I am making a script that makes a Group Instance of an existing group of objects, makes it real, and then adds the objects to a new group. Making the instance, making it real, and adding a selection ...
1
vote
1answer
22 views

Is it possible to update a StringProperty as it's being typed?

I'm building some text editor tools. I would like to have live access to a string property as it's being typed. I can assign an update function within a string property but it only updates after the ...
1
vote
0answers
19 views

New OSL Closures

There’s an interesting thing about updating OSL closures in blender. As principled hair BSDF was released a new function principled_hair() appeared but I can’t see ...
3
votes
1answer
132 views

KeyError on ImagePreviewCollection

I want to refresh the Preview Collection everytime the user change the category, in order to do that, I set the generate_previews function to refresh it all the time, but it produce this error: It ...
0
votes
0answers
16 views

Pie Menu for Pivot Point

I want to build a custom piemenu wich contains the following: Proportianal Editing and Changing the Pivot point. There are already two pie menus, which does those options, but I have only one button ...
0
votes
1answer
77 views

VSE: Can you make a script to code in more filters? (add/multiply/subtract)

So specifically in blender you have 3 settings really: add/subtract/multiply. Image editors such as gimp give you these and a total of 21 setting. Are these settings in blender just a mashup of ...
0
votes
1answer
20 views

Can i access Object ID's properties using keys (like in dictionary)?

I am creating a new addon for Blender, and in that addon I need to access Object's properties like location, scale, etc. I know that I can access them through interface like: ...
2
votes
2answers
145 views

Body part recognition inside of blender using a neural net

So I'm working on a project that's turning out to be monstrously difficult. I'm trying to automate the rigging process inside of blender using the addon "Auto-rig pro". This addon has a feature called ...
0
votes
1answer
22 views

How to spin a curve to create a surface using python script?

I am new to Blender. I need to spin a curve around the z-axis to create an arbitrary surface as shown below: I have successfully implemented spinning using bmesh. It seems I have to create an object ...
0
votes
1answer
33 views

How to sort multi-user objects?

I have a list of all multi user objects per layer: ...
0
votes
1answer
46 views

Documentation for CollectionProperty (CRUD methods)

I cannot find any documentation for the existing CollectionProperty methods. Regardings properties, generally i find .../bpy.props.html helpful, but it doesn't ...