Skip to main content

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).

6 votes
2 answers
2k views

Select vertex if vertex color is dark

I've baked AO to vertex colors and would like to use the smooth modifier only on vertices that have a vertex color darker than 0.1 (for example). How can I select vertices whose colors are below that ...
Greg Zaal's user avatar
  • 10.8k
6 votes
1 answer
2k views

Calculating acceleration or velocity of a point on a rigid body?

I have a rigid body simulation involving a solid body. It is a simple simulation with a box shape on a plane. The plane is slid out from under the box so it falls due to gravity. Due to friction ...
bob's user avatar
  • 61
3 votes
1 answer
866 views

Getting vertex weights with the vertex proximity modifier

I am trying to use the Vertex Proximity Modifier to update vertex weights and hoping to be able to read the same with Python. I have a plane and a vertex group called "all" (which includes all the ...
user1020's user avatar
13 votes
1 answer
2k views

How to prevent malicious code execution loading blend files?

Since I download from time to time example files from blogs, wikis etc. I would like to know how I can avoid execution of malicious code. Is it enough to disable the autoexec switch and see what is ...
stacker's user avatar
  • 38.7k
4 votes
1 answer
373 views

How can I customize the Render Button in the Render GUI to execute a custom script

I am trying to customize the blender GUI so that I can customize the Render button in the GUI to call a customer script as opposed to the default option. I would like to know if there is a way to ...
Deepak Mehta's user avatar
3 votes
1 answer
186 views

Timeline modal operator: how to get frame cursor to follow mouse

I'm trying to write a modal operator for the timeline, but I'm confused about how to get the current frame cursor in the timeline to follow a 'mousemove' event (and consequently, how to set the new ...
swingsoneto's user avatar
6 votes
1 answer
6k views

Blender as python module, 'Context' object has no attribute 'object'

I understand that running blender without a GUI does not provide bpy.context for the 3d View. Can anyone help me with a work around. This results in a 'Context' ...
Gordon's user avatar
  • 61
5 votes
1 answer
1k views

Is it possible to change viewport draw mode when navigating?

I'd like to write a script to automate viewport draw mode switching when navigating the viewport. Could this be done with, say, a modal operator? I haven't written any modal operators before, so ...
swingsoneto's user avatar
10 votes
1 answer
1k views

Console vs scripting python constants

Using 2.67b for python scripting I get this: while importing math, numpy on the scripting console, internal variables seem to be ...
ogeid's user avatar
  • 893
49 votes
1 answer
3k views

Custom trackpad pan/zoom/rotate behavior add-on

I'm trying to write an addon to customize the trackpad panning, zoomimg, and rotating gestures, but can't find a way to read the actual trackpad parameters for position and so on. The properties in ...
rraallvv's user avatar
  • 4,561
7 votes
2 answers
2k views

Dynamic creation of properties for export script

This time I have a question about Properties in Blender. I want the operator window of my add-on to have one BoolProperty per action defined in ...
Luis W's user avatar
  • 255
11 votes
2 answers
5k views

How do you export bones relative to parent?

I'm currently writing an exporter script. So far, I can export meshes just fine, but I've got some problems with exporting the armature. According to the python api, there are three different types ...
Exilyth's user avatar
  • 308
9 votes
1 answer
180 views

Storing preferences without having properties in every scene?

I did applink for 3dCoat app. I set Export directory manually. At present, i should set the directory in every blend scene. But i would like to set the directory path only one time and store it aways ...
mifth's user avatar
  • 2,341
19 votes
8 answers
12k views

How to stop Blender from making the CPU overheat?

Apparently my CPU or GPU overheats when Blender renders more than a few minutes. The computer suddenly powers down, taking down all running apps, email I'm writing, etc. This is almost never a ...
DarenW's user avatar
  • 3,179
8 votes
3 answers
7k views

Tracing a monochrome image into a 3D, extruded object with a script

Say I want to automate making extruded-text or a 3d logo from an image. An answer that uses extruding a monochrome image of the ubuntu logo to an arbitrary number of units with a python script ...
RobotHumans's user avatar
  • 1,047

15 30 50 per page