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

Questions tagged [scripting]

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
3 views

Python: Why blender ignore my conditions?

im on blender 2.8 last release ! in this code, im automatically creating a particle system for the active object, and the particles are the rest of the selection import bpy ...
1
vote
0answers
10 views

Custom script folder without editing files?

I'm trying to get Blender to launch with a custom script folder, is it possible without editing the preferences or files? I'm in a company considering making a very slow phase out of Autodesk ...
1
vote
1answer
9 views

How to shift foward actions using python

I have two sequential actions, and I want to shift them both foward. I can list the actions with bpy.data.actons, but I don't know how to modify them.
0
votes
1answer
22 views

How to change the display_channel with python?

Neither bpy.context.space_data.display_channel = 5 nor bpy.types.SpaceSequenceEditor(display_channel = 5) seems to be working?
0
votes
0answers
13 views

Is there a way to lock the topology in edit mode?

I wonder if there's a script for locking the topology of an object when you are editing so you are only allowed to do transformation operations, grab, rotate, scale, and so on, no "destructive" ...
2
votes
3answers
21 views

How to see the actual commands blender runs

I'm writing some scripts for applying textures and got into troubles. The commands showed in the info window seems to be only a part of the commands actually runs. I copied the demonstrated commands ...
0
votes
2answers
38 views
0
votes
0answers
23 views

What is the Python code related to collection actions for blender 2.8?

2.8 is new and I can't find how to: Create a new collection. Add selected object to collection "name here" . Add selected object to collection created in the same code. Could someone show me how? i ...
0
votes
0answers
12 views

blender 2.8 glRectf() not there

I'm trying to convert a 2.79 add-on to 2.80. I'm running into a problem with openGL function glRectf(). The code that's currently in the add-on draws the menu as follows ...
0
votes
0answers
14 views

2.8 Rotate multiple objects around the origin in edit mode?

for some reason the bpy.ops.transform.rotate code dont take account the pivot point, i dont understand why? and its only one part of my problem... in my code : ...
1
vote
1answer
9 views

Enable lamp 'Use Nodes' from python Console

I am new to both Blender and Python, I am trying to enable Use Nodes of a lamp from Python console. I tried the tooltip showing on the button ...
0
votes
0answers
16 views

How speed up rendering of animation recorded simultaneously from multiple point of view?

I'm rendering an animation recorded from multiple points of views and then integrating the result through the compositor. The current solution is creating multiple scenes, one from each point of view....
0
votes
2answers
36 views

How to add and use renamed Mirror modifier with Python?

In this code for 2.8, that works, I am creating a mirror modifier assigned to a cube. ...
0
votes
1answer
45 views

keeping render layers at their original resolution when composed

I wrote a script to generate a multiview render of an animation. You can see the result here Still everything is rendered at the resolution of the final image and then scaled down. This wastes a lot ...
0
votes
0answers
15 views

How to create an object from part of a mesh in the same location(like saparate) using Python in Blender?

Knowledgeable people of the internet! I’m working on a script, that at some point, using bmesh module and being in Edit Mode, creates verts and edges which are then used to generate a mesh via ...
1
vote
1answer
55 views

Blender 2.8 - Modal Operator: How to change modifier settings?

I am trying to change a the "ratio" within a "decimate" modifier with a modal operator, but cannot get the value to update (my guess is I am not passing the right value?) ...
0
votes
0answers
24 views

Cut and Seal Mesh (python script)

Following on from this thread, I would like to be able to cut a mesh into smaller objects, while sealing off the cut (with a plane) so that my particle system works as intended. Both objects created ...
0
votes
0answers
40 views

Blender 2.8 script crash on Armature select in Object mode

Okay so I'm trying to update a script I have been working on for Blender 2.8. I've gone through the API changes and that was relatively straightforward but now I'm getting crashes on my operators for ...
3
votes
1answer
57 views

creating more than 20 render layers and connect them to different scenes

I'm trying to render an animation simultaneously from 32 points of view and integrate the result in a composed animation. I followed this answer: How to create a render layer in blender python and ...
0
votes
2answers
52 views

Any chance anyone looking into evolutionary algorithms for Blender?

Something similar to Galapagos plugin in Grasshopper shown in link below: https://yazdanistudioresearch.wordpress.com/2011/08/04/evolutionary-form-finding-with-grasshopper-galapagoes/
0
votes
1answer
23 views

How to detect if a vse strip is used in conjunction with an effect strip with python?

Moving strips which are used in conjunction with an effect strips will cause errors if moved(with python) without the effect strips, and most of the effect strips can't themselves be moved because ...
1
vote
0answers
29 views

How to make a simple Format Conversion Script?

I am a newbie in Blender and have only basic knowledge of Python scripting. But I thought I could make this script on my own - but failed. My basic idea is to import the file with ...
0
votes
0answers
8 views

How do I apply a texture to each 'Part' in my model via python script

I have imported a .obj model into blender, which contains a long list of individual parts making up the model, and I wish to iterate through each part and apply the same texture to them. How do I ...
0
votes
0answers
6 views

BGE Added Armatures Won't Deform

I have a script sort of like this: " armature = scene.addObject("armature") bone = armature.channels["bone"] bone.joint_rotation = mathutils.Vector([0.0, 2.0, 0.0]) armature.update() " but the ...
0
votes
2answers
31 views

How to bind a series of commands to a custom hotkey (scripted macro)?

How would I go about creating a hotkey that would operate as follows?: With an object selected in the modeling viewport: Press Shift + D (this would be the custom shortcut to trigger what follows ,...
1
vote
1answer
28 views

Make a Blender script run an external program

I'm making a script to share data between Blender and After Effects: i created an addon in Blender which exports a .txt file in the After Effects directory (or a custom one) and I created a After ...
1
vote
1answer
23 views

How to create a checkbox in the Properties>Render tab?

sorry for the noob question, but i can't create a simple checkbox inside the render tab... Here is my code... ...
0
votes
0answers
13 views

Python - how to 'get' an object after creating it

If I create an object... circle = bpy.ops.mesh.primitive_circle_add(radius=size, view_align=False, enter_editmode=False, location=(x, y, z)) What is returned (<...
0
votes
0answers
7 views

Python: How to remove all shape keys after copying?

I am very new to python in Blender and have done some searching around and have spent a too much time for this without any result, what am I missing? Below is the code for blender 2.8 beta, which ...
1
vote
2answers
64 views

Select an object with Python in 2.8

I'm new at scripting. I know that it's a basic question but I tried everything I could and nothing works. So here's my problem: I want to create a shortcut that automatically sets up a mirror ...
0
votes
0answers
23 views

How to get to work with the image of the camera with python

I'm moving the camera around an object all with python script. Now I want to get the image from the camera and work with it (some image processing) and then save it..Etc Now I'm just rendering the ...
2
votes
0answers
14 views

Getting object has no attribute 'startFrame' when trying to export animation using a script

Hello I am trying to get a simple script to which will import an rtm file(animation file) > do a few actions > export rtm file. In my script everything works except for the last of bit code which ...
1
vote
1answer
26 views

Can't get the active_object in Operator

I try to get the active object by "bpy.context.scene.objects.active" in my operator, but I receive a error 'Context' object has no attribute 'objects', what's wrong?My scripts is as follow: ...
0
votes
0answers
10 views

is there a way to tesselate (remesh) a model based on UV map data?

what i want to achieve is reconstructing sort of a high res poly from low poly models. I can do this by hand, but that's quite tedidous. So the way I do it right now is the following: remesh the low ...
0
votes
1answer
11 views

Disappearing bone shapes with rigify (show_wire)

In the transition of 2.79 to 2.8 there are currently still some problems. The main problem I'm having is, now I can't see my wire shapes without manually selecting "show wireframe" on all of my bones. ...
0
votes
0answers
24 views

Select adjoined handle in Sequencer with python?

How do I select the adjoined handle in the Sequencer with python? I believe that the code actually should do this, but it doesn't? ...
0
votes
0answers
2 views

locking button press in blender game engine

I am trying to figure out how to lock a button press until the player interacts with a object which then unlocks the button.
1
vote
1answer
18 views

How to script blender to quit after rendering is complete Mac OS10.13

I've got a script that automatically renders and saves the render, but I'd also like to have Blender quit when the render and save is completed. Since I will be running renders overnight, I'd prefer ...
0
votes
1answer
36 views

link collections in python

As simple as it is to link a collection with another one just by drag and drop I can't manage to find the way in python. ...
0
votes
0answers
18 views

Sure UVW Panel - properities display

I am trying to adapt old Sure UVM Box add-on to Blender 2.80, but I have problem with displaying the parameters panel in 3D Viewport ( do not know how to name it ). When I run it via PieMenuEditor ...
1
vote
0answers
18 views

Garbage collection in Blender

I'm working on an iterative process for optimizing the placement of some objects. This iterative process seems to leak the memory (I use numpy matrices). I do destruct the lists and matrices after ...
0
votes
0answers
22 views

Select the active object ? with python

i just want to select this object, the suzanne with the active origin in red,'is is she active or just the last selected? i dont know the code, and i dont know also how to find this kind of code, ive ...
0
votes
0answers
30 views

“bpy.context.scene.object_bases” not working in 2.80?

The 2.8 documentation for the context override is found here: https://docs.blender.org/api/blender2.8/bpy.ops.html?highlight=object_bases ...
1
vote
1answer
20 views

How to change where you fall

i'm trying to make a gravity game where you can use keys to change the direction you fall, solving puzzles etc. so how do i change the direction you fall entirely?
0
votes
0answers
41 views

How to split object by plane via script

I have a single complex 3D object. I would like to cut this object at regular intervals along the x-axis into separate objects. This is because I want to apply a separate particle system to each piece,...
0
votes
0answers
13 views

TypeError: UILayout.prop() when trying to display custom settings in a menu

I want to make a custom menu in Blender where I can change certain custom settings (code below). ...
0
votes
0answers
21 views

How do I set the env variables properly so I can run Blender with customized paths on Windows?

I want to run a customized version of Blender on Windows. So i set these env variables in a batch file. Blender picks up the user config folder alright but it still points to default addon paths when ...
1
vote
1answer
24 views

Blender 2.80 where is the “interactive code panel” gone?

For a lack of a better term, please look at the following image. I have been trying to drag around 2.80 like a maniac, was it moved somewhere else?
7
votes
1answer
143 views

What do new bpy class naming conventions in Blender 2.80 actually mean?

What are the new class naming conventions in Blender's 2.80 Python API for add-ons? It says here: This constraint applies to the bl_idname of each class (or the ...
1
vote
1answer
55 views

Registering classes in 2.80

I would like to start developing in the new beta build environment. For that, I want to register classes the new way: https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Python_API/Addons ...