As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [python]

Python is an object-oriented programming language. In Blender, it is used as a general purpose scripting language and to create add-ons to extend Blender's functionality.

Filter by
Sorted by
Tagged with
0 votes
1 answer
58 views

How to add copy of an object from a controller without Logic Brick being present?

I mean without controller being connected to Edit Object > Add Object Brick. Furthermore, I need to add that object at a specific location, instead of putting it ...
Alex Azazel's user avatar
0 votes
0 answers
174 views

How to change contrast in a popup window?

I want to use a popup window to indicate some failure in our Addon. However i noticed that the default theme does not create enough contrast between background and text color: I found where in the ...
Gaia Clary's user avatar
  • 3,632
0 votes
1 answer
2k views

Python call of import image as plane

I am building a simple python script that creates a plane with an image (image as plane addon). I call blender by the command line : ...
johnconnor's user avatar
0 votes
0 answers
117 views

How to create vertex transition from one mesh to another using shapekeys

I have two objects imported from photogramometry scans. They have at most few milions of vertices and are triangulated. I would like to produce a mesh with added shapekey which could show morph from ...
piotao's user avatar
  • 1,367
0 votes
0 answers
106 views

How do I get bookmarks to appear in 'fileselect' panel?

I'm a newbie to both Blender and Python so I'm not sure of the terms I use. I have a number of button events that bring up the file select panel using ...
Tony Teveris's user avatar
0 votes
1 answer
1k views

Is there a python api for texture painting?

Is there a means to script texture painting (cloning) in blender. I will have three uv maps, one for front , one for side and one the unwrapped mesh. I want to clone texture from the front and the ...
sreesreenu's user avatar
0 votes
0 answers
117 views

How to export tangent data from blender with python [duplicate]

I an trying to implement normal mapping in opengl es for which i need the per vertex tangent data. Is there some means to get that from python blender api
sreesreenu's user avatar
0 votes
0 answers
519 views

How to take a screenshot of blender from within another thread in Python?

I am desperately trying to stream Blender's UI over HTTP: ...
Mörkö's user avatar
  • 1,296
0 votes
0 answers
93 views

How do I get sIBL GUI to work on Mac OS X?

I downloaded the sIBL GUI, and it works as a standalone perfectly. I watched a tutorial on how to use it in Blender at https://www.youtube.com/watch?v=o198WjOBtIE -- but in User Prefs when I attempt ...
DrStrik9's user avatar
  • 896
0 votes
1 answer
695 views

Access Audio Strips Sample data in Python for a Cross-Correlation

I want to perform an Audio Cross-Correlation in Blender (like with numpy.correlate) to align two Audio Strips. But I can't figure out how to access the Sample Data of an Audio Strip inside Blenders ...
Samoth's user avatar
  • 3,226
0 votes
1 answer
255 views

Automatic reuse same-property materials

I have many objects created by importing some .wrl files and joining several meshes toghether. The result is a set of blender objects, each with a long list of ...
alextoind's user avatar
  • 101
0 votes
0 answers
67 views

Deleting a face, if there are two ore more holes in a circumference with a defined radius at a defined angle

This is a very specific question: I created a plane. On it there are some faces deleted. I want blender to check every other, not deleted face, if there is in a specific circumference (red) at a ...
Basti's user avatar
  • 331
0 votes
0 answers
224 views

Why do scripts work when run from text editor but fail when run as an add-on

for example auto smooth set angle value fails when pie is run as an add-on but it works when run from the text editor this makes no sense to me or I cannot figure out what is wrong. here is a link ...
Claas Kuhnen's user avatar
  • 1,717
0 votes
0 answers
457 views

How to add modifier to multiple objects via pie menu?

So here is my current pie menu. It works quite well but only on one object sadly. What would be the best way to design a poll function so that based on what modifier type I select in the pie it will ...
Claas Kuhnen's user avatar
  • 1,717
0 votes
0 answers
41 views

Is it possible to decide where menu is drawn next to pie button?

I would like the menu to showup left to the pie button and not right. Is that possible? pie.menu("edge.menu2", text="Edge Menu")
Claas Kuhnen's user avatar
  • 1,717
0 votes
1 answer
868 views

Having trouble with multiple animations triggered by key presses in the game engine

I have very little Python knowledge and I'm trying to get a character to play one animation when the A key is pressed, a different animation when the D key is pressed, a different animation when the W ...
user avatar
0 votes
0 answers
44 views

When calling a Pie is it possible to do multiple LMB licks before it goes away?

for example when you include a menu with multiple options in a pie and you want to click two. After each LMB click the pie goes away, so you have to call the pie menu twice.
Claas Kuhnen's user avatar
  • 1,717
0 votes
0 answers
28 views

Calling a function on duplicating

I am wondering if it is possible to call a Python function inside a Blender when an object with a name that starts with foo_ gets duplicated? Thanks in advance.
Vlad Ovaho's user avatar
0 votes
0 answers
156 views

Why does Redo.Last command not work after executing a modeling command via Py script?

I noticed that when you write an operator lets say to extrude or crease an edge and as the last step add the code for calling the F6 Redo.Last command, everything will be executed and work besides the ...
Claas Kuhnen's user avatar
  • 1,717
0 votes
0 answers
375 views

Move 3D cursor via current active object?

You cannot really drag the 3D cursor or snap it in Blender which is not ideal. So I thought one could do this: ...
Claas Kuhnen's user avatar
  • 1,717
0 votes
0 answers
109 views

Scripting - Import, save, delete - Loop

I'm trying to create a python script in Blender, here are the steps I want to follow: I have an existing scene where I want to import a specific .blend file from ...
katsele's user avatar
  • 80
0 votes
1 answer
61 views

Can't see any indication in the 3D view , when changing mesh properties from python console [duplicate]

Im using blender 2.75 in windows , i try to change the default cube model simple property data.edge[0].bevel_weight to 1.0 but i don't see any bevel change in the ...
user63898's user avatar
  • 111
0 votes
0 answers
45 views

Reading and set the material content of a .blend

My object is saved in .blend file with the material "mat1". I apply another material for my object (without my Register file). Now I want with python, apply the material "original" (assigned in the ....
logiquefloue's user avatar
0 votes
0 answers
224 views

Issue with running blender player over ssh

I have a blender simulation which uses Blender Render and Blender Game Engine. I execute the following script(Renderer.py) from a python file(simulation.py) using "./blender -b compress.blend --python ...
St1id3r's user avatar
  • 193
0 votes
0 answers
215 views

Blender UI freezes for a few seconds after changing my custom drop-down

I've written a script that adds a dropdown to the 3D view sidebar. When I change the value in the dropdown, the Blender UI freezes for a few seconds and I can't click on anything. What am I doing ...
spiffytech's user avatar
0 votes
0 answers
147 views

Blender Game Engine: Order of vertices in a mesh

I have built some kind of random shape generator which in realtime alters the shape of a cube with 60 vertices. However I've noticed that the vertices aren't in any specific order (or are they?) so ...
Sputi's user avatar
  • 451
0 votes
0 answers
793 views

Creation of Navigation mesh object dynamically

I have a grid and at run time my application determines certain path on the grid. As shown in the image. When the path is calculated, I have list of center of all the cells, for example starting from '...
sosoup's user avatar
  • 67
0 votes
0 answers
72 views

Load vertex animation

I have a vertex animation in text form (deserialized unreal vertMesh). It is a series of units: frame # 0 (vertex#0, Vertex#1 , Vertex#2 .. Vertex#N), frame # 1 (vertex#0, Vertex#1 , Vertex#2 .. ...
Vlad Kisly's user avatar
0 votes
0 answers
1k views

How to merge two meshes together, automatically fill all holes and remove intersecting faces

I am writing a procedural mesh generator for modern low poly planets in python. The addon works like that: At first a mesh is created (cube, uvsphere, icosphere, ...). For continent creation a ...
Hamburml's user avatar
  • 937
0 votes
0 answers
841 views

stitching image slices together with python or compositor

Hi I'm creating 3d panoramic spherical renders and as far as i can tell 2.75 doesn't really support that out of the box. So I found the work around is animating the camera and creating 360, 12px ...
Brian Alvarez's user avatar
0 votes
0 answers
738 views

uv mapping moving images on a mesh with dynamic distortion correction in python

I have a series of images I want to project on to a mesh as a "movie" using a script. There is distortion that I need to compensate. I can provide a list of pixel coordinates that map to some vertices,...
uhoh's user avatar
  • 2,657
0 votes
0 answers
157 views

How to calculate rotation value of 2 connected edges corner?

I can take 2 edges bisector angle value with middle = (theta1+theta2)/2, but I don't know how to calculate rotation value that direction is always outwards from the corner. I need rotation value for ...
JuhaW's user avatar
  • 1,776
0 votes
1 answer
490 views

blender python plugin error

Can some one help me with my blender ftp code, It runs fine in the text edit but when it turn it into a plugin and run it there is an error with ...
Ashlin's user avatar
  • 3
0 votes
0 answers
37 views

change the sscene before deleting an object

How can I perform some actions before deleting an object. If I have an object that has a relation with some other objects in the scene. and the object was selected in the screen then deleted. How ...
Samer's user avatar
  • 11
0 votes
0 answers
328 views

Custom UIList, nothing happens when double clicking list item to change name [duplicate]

I am trying to use template_list with custom items but I cannot make them change values on double click. I want to change 'name' property the same way I can rename items in other lists (with double ...
theres1's user avatar
  • 179
0 votes
0 answers
152 views

collision bounds with python?

I have a plane and I want to set its collision bounds programmatically (I have some other objects in my scene and I want it to act as a floor). How do I do this? Couldn't really find anything ...
29374819's user avatar
  • 331
0 votes
0 answers
27 views

Get agent to move using commands stored in separate file? [duplicate]

I have a script that allows a cube to be moved using WASD. I'd like to avoid having to use actual keyboard input for that and thought about creating a separate file with commands like "Wkey" and such. ...
29374819's user avatar
  • 331
0 votes
0 answers
1k views

How can I draw in the 3D view with Python?

I want to write a script for blender, and I wonder how can I draw something using python in the 3D view? Like lines or triangles? I mean something like debug drawing.
piotrek's user avatar
  • 241
0 votes
0 answers
42 views

How to make an operator to access custom screen, scene, brushes, etc

I want to make an operator (to put in a menu) to be able to select custom scenes, screens, brushes, etc. I look in the info panel when I switch to one, but Blender doesn't display how it switches to ...
Mark's user avatar
  • 21
0 votes
0 answers
415 views

How to change a python script which was distributed via blender?

I am having some problems with Smart UV Project (Smart UV project creates overlapping uv-coordinates). The wiki says that Smart UV Project searches seams and uses them to unwrap the mesh (https://www....
Hamburml's user avatar
  • 937
0 votes
0 answers
179 views

Drawing relationship lines in the view between 2 objects via Python - possible?

If there are 2 objects in the scene, one has a custom property with the name of another object, is it possible to draw a colored solid or dotted line between those two in 3D/ortho view ? Looks like ...
motorsep's user avatar
  • 195
0 votes
0 answers
692 views

How to create a moving HUD?

I didn't know how to title this, but there is an effect video games generally have that I would like to achieve. If you have, for example, a turret in your vision, a healthbar will appear on it. if ...
blackhole's user avatar
  • 2,364
0 votes
0 answers
250 views

Blender game: get face orientation (stacking blocks)

I have a cube and I want to spawn another cube right on top of it. (it should work for other shapes like a pyramid, too). The tricky part is, that the first cube (or pyramid) moves randomly around. ...
Sputi's user avatar
  • 451
0 votes
1 answer
795 views

call exporter with python

I see that it's possible to call a basic exporter, like fbx, with a command like: bpy.ops.export_scene.fbx(...) But, what if I want to use any of the other ...
widgg's user avatar
  • 145
0 votes
0 answers
336 views

Game Engine - Getting depth map

Would someone let me know how I can get the depth map for each frame of my rendered animation? By depth map, I mean an image that shows the distance of each point on objects from the camera. It seems ...
Farhad's user avatar
  • 163
0 votes
0 answers
1k views

How do I add a loop to this script?

How do I add a loop to this script? ...
godolomn's user avatar
  • 417
0 votes
0 answers
33 views

Shortened properties in GE?

For some of my properties, the numbers would sometimes read something like 0.1231231230938..., which basically is absurd. Is there a way to duplicate this property ...
blackhole's user avatar
  • 2,364
0 votes
0 answers
99 views

Q: Remove materials using same image? (Python?)

I've ripped a model from within an emulator. It creates an .OBJ that has hundreds of materials using the same image with different names [Material1(image1.png.001, image1.png.002); Material2(image1....
ANGRY's user avatar
  • 1
0 votes
0 answers
73 views

Blender Game Engine, python inserting a cube at coordinates [duplicate]

First of all I am a BIG noob at blender but not at python. I want to maker some python games so I thought that blender would be great for this. I am half way through making my simple game where you ...
Andrew's user avatar
  • 101
0 votes
0 answers
102 views

Printing items too many times?

I am starting to have a lot of scripts going on at the same time, most of which go on every tick and print on every tick. When I go to the console to see what is going on, I see a ton of items ...
blackhole's user avatar
  • 2,364

1
242 243
244
245 246
248