Strongly recommend using bmesh instead of bpy.ops.mesh whenever you can.
Here is my understanding of the script needed. Extrudes the individual selected vertices randomly a number of repeats.
The operators return dictionary has the newly created vertices and edges.
from mathutils import Vector
from random import uniform
In order to check if a mesh is watertight, we can test that the mesh is 2-manifold and no boundary edges exist .
The following definitions are loosely based on the quoted sources, some terminology and explanations were adjusted. This may not be up to standard for a scientific publication.
Definition: 2-manifold  :
Each edge is incident to one or ...
You can use a single line python expression as a driver, like an if-else statement.
1 if (bpy.context.scene.frame_current == 1) else 0
The reason this fails, would be if python scripts have been disabled. You get this dialog after entering a python expression when python scripts are disabled. Click on "Allow Execution".
If you dismissed the dialog, ...
In Blender, the way selection works is a bit different. You can't really have something "selected" when it's hidden in the viewport.
You can hide an object with H, but to unhide, you generally either undo or alt-H to unhide all hidden objects. To have the same shortcut key do both an action and its opposite is pretty uncommon in Blender. The only thing I ...
In 2.79 can use the to mesh method.
>>> me = C.object.to_mesh(
Object.to_mesh(scene, apply_modifiers, settings, calc_tessface=True, calc_undeformed=False)
Create a Mesh data-block with modifiers applied
>>> me = C.object.to_mesh()
To create a mesh with the modifiers applied, instead of using modifier apply ...
Loop the materials collection
Loop over the material collection. Need only do this once per material, rather than for each object that uses the material.
Search for links from tex node to bsdf and from color to alpha socket, if found unlink old, make a new link, and print the image name.
for m in bpy.data.materials:
if not m.use_nodes:
Some blender basics
The console is a great place to figure stuff out
where C = bpy.context and D = bpy.data for our convenience.
Vector((2.0000009536743164, 2.0000009536743164, 2.0))
The height of an ...
Look in NodeTree.animation_data
Python console code. Loop thru materials that use nodes and have animation data, if so loop the drivers collection.
In simple example below find the couple of simple drivers including a driver on a value node with expression "frame" (the current frame)
The drivers datapath gives the node name and the index of the socket.
Thanks to all for the input. I am answering my own question.
I wanted to have in my AddOn a way to choose a folder containing some input files. It turns out that it was very easy using bpy.props StringProperty as panel property:
name = "Path",
description = "Path to the folder containing the files to import",