Can particles enherit constraints from their render object?

As far as I understand, no. Particles do not inherit constraints. If you want particles to stick to a moving object, make it a collision object and play around with the dampening and stick values.


UV coordinates are stored in ob.data.uv_layers.active.data[loop_index].uv since the mesh system update (NGons are supported from 2.63 on). Note that a loop index is required, not a vertex index.

UV textures are stored in ob.data.uv_textures.active.data[face_index].image.

http://www.blender.org/api/blender_python_api_2_73_release/info_gotcha.html#ngons-and-tessellation-faces

You might wanna use the tessface mesh (triangles and quads) for your export. Don't forget to triangulate quads, your original code doesn't seem to handle them at all. Here's an example:

https://code.google.com/p/blender-cod/source/browse/blender_26/export_xmodel.py#518


Yeah, i figured it was my UV, the uv had some intersecting parts, so just had to get some more seams on the mesh, funny how you figure these obvious problems out once you've spent hours trying to figure them out, just to realize your problem after posting it on a forum sigh...


Bone rotation behaviour based on hierarchy of individual bone axis like Maya

Set the gizmo to manipulate all the selected items individually:

If you want the gizmo to act on each bone's local axis, rather than global, set it here:

It will take bones roll in mind.

This is however not a very convenient way to rig fingers. The easiest is to use Rigify and create finger rigs with it:

I need to add finger rig to a model that is already rigged

The idea is to have extra controls for rough pose and also access to individual bones for fine tuning.

It can be driven through constraints or with drivers, it can behave like this:


It's hard to say what you're doing without more info, but if you are only attempting to rotate one object, make sure that you have Manipulate Center Points disabled:

Other than that, in Object Mode, simply press "R", use the mouse to rotate, then Left Click or press Enter to apply the rotation.  This toolbar on the side is for precision, after-the-fact editing.  Changing the angle will rotate the object.


Here is one approach, there are probably better ones

Turn off gravity

Add the object you want to attract objects to and give it a force field

Set the strength of the field to a negative value. and the shape to "Surface"

Make it a passive rigid body

enable rigid body collision and set bounciness to 0 and friction to 1

Add the objects you want to move and give them a rigid body type of active

If you animate this the objects will move to the body and stick.  You'll need to tune the force strength to get the speed you want.


Kirigami project: lay down low-poly buildings to paper

I'm not entirely sure I understood what you have in mind, but your description really made me think of the Export Paper Model add-on:

The add-on must be enabled (Edit > Preferences > Add-ons > Export Paper Model > ✔)

Create your mesh (or meshes) the way you'd normally do it. Blender 2.8x uses real-world measures by default: you can check in the properties menu (N) that the dimensions are the correct ones for your project (you can work on the model "cm" scale, or keep in mind a ratio, e.g. 1:125, and work at the real-world "m" scale, just make sure you then set the factor in the Paper Model add-on)

You can also use the Measure tool

Once you're happy with your mesh, you can use (N menu) > Paper > Export Paper Model. This will create a PDF with cut-and-fold paper model with the correct real world measures


Transparent Depth and Transparent Node not working

I believe the issue you're having is due to a circular dependency.  You're counting the number of Transparent Shaders the ray is passing through, but what happens when the material that that number depends on is a Transparency itself?  I believe that's why Blender creates a Null shader.

You can do something similar with a Glass Transmission Shader set to IOR of 1.0 for your "transparent window" thingy.  Disable everything but Camera in the Cycles Setting:

Then instead of Transparent Depth, just use the Transmission Depth input for your object:


Can I export game from blender to unreal?

There is no way to do that, no

You can Export the Scenes as FBX and import them, though. No game logic will be transfered.


Applying rotation, location and scale to model bones

You need the position for only loose bones. Instead of creating matrices assign the data where it belongs.

import bpy
if bpy.context.active_object.mode != 'POSE':
    bpy.ops.object.mode_set('POSE')

pbones = bpy.context.active_object.pose.bones

pbones['Spine'].location = m['position']
pbones['Spine'].scale = m['scale']

# I think your rotations are in quaternions, they are 4D
pbones['Spine'].rotation_quaternion = m['rotation']

# If not and you only use the first 3 values then:
#pbones['Spine'].rotation_mode = 'XYZ'
#pbones['Spine'].rotation_euler = m['rotation'][:3]

You can sure do this also by building the matrices, but check what your rotation data is in. You are building the rot_mat from Euler but I suspect your data being as quaternions.


Why is my Array modifier rotating my object at an offset angle?

Since the object needs to distort in order to leave no gaps, maybe a regular relative-offset array, given a Curve modifier, would suit better?

Oops.. or this, if you RX180 in edit mode..


3D Viewport Increase Selected Edge Thicknes

It's under interface settings in user preferences. See below:

Be warned, however, this also changes the thickness of the grid lines, the outline, and even the edges of some of the UI elements, so maybe enable and disable it as needed. There doesn't seem to be a way to uncouple this effect either, unfortunately.


How can I import Gerber DXF pattern into blender?

In the info bar at the top left hand of the blender program try 'file', then 'import' the find AutoCAD DXF.

try it and keep me posted.


Blender only renders one frame instead of the frames I selected

It is because you set Frame step value:

Set it back to 1

This value use to render every N-th frame, with skipping others.

Also, you have a video strip in sequencer (VSE). So blender render from sequencer instead 3d-scene

Remove this strip, or uncheck sequencer in post progressing tab:


FreeStyle Edge Mark

Animation Nodes have a node Splines From Edges that takes a list of edges and vertices an returns splines that represents those edges. All we have to do is filter the edges by whether they are marked as freestyle or not. The blender API provide access to this data through the edge.use_freestyle_mark where it returns True if the edge is marked as a freestyle and False otherwise. To generate a boolean list of this property, we can use such list comprehension:

[e.use_freestyle_mark for e in object.data.edges]

Animation Nodes have a node Mask List which returns a filtered version of the input list if for each element its corresponding element in the input boolean List is True. So we can use the Mask List node to filter our edges based on the boolean list we generated before using such a node tree:

Edge Crease

The same workflow can be used, however, the boolean list used in filtering will change to be based on an angle threshold. Let us define the angle of the edge as the angle between the normals of the two faces the edge is part of, that, of course, fails for boundary edge that is part of only a single polygon. The problem reduces to finding the indices of the two polygons that each edge is part of. The internal structure of meshes in Blender stores loops which are vertices of polygons, something that you may remember from our study in this answer. A loop also corresponds to an edge that is part of the polygon as well as share the vertex that the loop represents in the polygon, you can study this from the Design Document of the Bmesh structure. So, loops can be used to identify which edges are in each polygon, but we want the inverse of that, we want a function that takes the edge and returns the polygons, this is something that we can solve by using a simple look up table. We can get the indices of the loops through polygon.loop_indices and we can get the index of the loop edge through loop.edge_index, you can study those form the API.The implementation is nested and not direct, so take your time to understand it.

We crate a list of n empty lists where n is the number of edges in the mesh, this can be done by the list comprehension [[] for _ in range(n)]. We will append the index of the polygon to those lists indicating that the polygon is composed of that edge. We will create two loops, the first loop iterates over the polygons and gets the indices of the loops it contains through polygon.loop_indices, that loop in turn hands the indices to another loop which gets the small initially empty list at each of the loop indices and append the polygon index to it, set the new list to the generic list and reassign the generic list. Notice that the polygon index is the loop (iterator) index of the upper loop. Also notice that to get the list after we appended it, we have to enable Output option for the input list:

Now that we have computed the look up table, we can loop over it, get the polygons, compute the angle between them using the dot product or the axis quaternion, if the angle is smaller than a threshold, append True and false otherwise, note that we have to check of the edge is a boundary or not as well. the implementation is simple, if the list contains two elements (It is not boundary) AND if the dot product between the two polygon normals at the two list indices is less than cosine some angle, return True and false otherwise:

Which if we used in filtering the edges, yields:

Blend file for study and practice:

Layering Filters

Layering filters is as easy as combing the boolean lists using what ever logic you want to use, for instance, if I want to use the edge mark OR the Crease, we can add the two boolean lists (Addition is OR in boolean algebra):

Sky is the limit when it comes to Animation Nodes.

External Contour

As for External Contour, a screen space processing might be your best option. For instance, construct a signed distance field in screen space and them march a spline starting from a known edges point, or use marching squares algorithm to polygonize it, project point on the surface and convert it into a spline. I don't have enough time to research the topic further, so i will leave it to you.


How to create and design hoops net and attach ot to a hoop?

Final:

Net/Rope:

I've made the net from Bezier Curve just by extruding vertices and tweaking handles. I've added Mirror and Array modifiers at the beginning to have constant overview of my whole shape. Array count should be even to number of hooks on you rim. Also Relative Offset is a bit smaller than 1 to overlap lines, this will give fake knots on rope.

At the end you will need to add Curve modifier with selected Bezier Circle from the Rim shape.

Next add Bevel to our net:

Now you will need to scale a bit on X axis our whole Bezier Curve (net) because adding Bevel will add also a little offset to it.

When everything is looking as you want duplicate this shape and move it to another layer - just in case.

Last thing before going further is to convert Bezier Curve (net) to mesh.

Cloth:

Add Cylinder with exact same radius and height as our net/rim and some Loop Cuts.

Add Surface Deform modifier to our net select created Cylinder and hit Bind.

Scale/Move/Tweak Cylinder with Proportional Editing to get basic net shape. Our net will follow this modifications due to Surface Deform modifier.

Add Vertex Group to our Cylinder and Assign to it top Edge Loop.

Add Cloth sim to Cylinder and tweak settings. I encourage you to test different values for different cloth behavior.

Now you can hide Cylinder.

Final thoughts and blend file:

I haven't used any complicated methods, all links provided should explain every step and if not - any question should be answered here or with many tutorials around the web. Also with provided blend file you should easily figure it out.

  Remember to Apply Scale and Rotation to meshes.

Blend file:


How to copy transform orientation to object's rotation?

I've contrived some code to do the trick. Please don't laugh on the lame-code - it works. :-) Maybe somebody will find it useful.

If you want to use it, just save the the text below as the "align_to_to_inverted.py" file, and then install it as an add-on. And you will have the "Align to Transform Orientation inverted" command in your Object menu. It's tricky to insert it in the "Object > Transform", so let's let it be there =).

To use it, in the Object mode select the source object and then the target object (if you want to copy source object's rotation), and execute the command. Selction will be reset, but the target object will remain active.

If you want to align to Transform Orientation, select the only target object, and execute the command. Note that you must set some custom transform orientation. Built in orientations, like Global, View, etc, will not do.

# align_to_to_inverted.py
# The script will align active object to selected one (if there is another selected object).
# or it will use current custom Transform Orientation (if any).
# It changes object's rotation values, but leaves its orientation intact.
# (c) LIII A.S. Mechanic Kharkov

bl_info = {
    "name": "Align to Transform Orientation inverted",
    "description": "Operator to set object's rotation as another's or current custom transform orientation.",
    "location": "Object menu",
    "version": (0, 1, 1),
    "blender": (2, 76, 0),
    "support": "COMMUNITY",
    "wiki_url": "https://blender.stackexchange.com/q/110894/23172",
    "warning": "",
    "category": "Object",
    "author" : "Mechanic. Kharkov."
}

import bpy
from mathutils import * # yes, I know

class AlignToTOInverted(bpy.types.Operator):
    """Aligns active object's rotation values only to selected or TO"""
    bl_idname = "object.align_to_to_inverted"
    bl_label = "Align to Transform Orientation inverted"
    bl_options = {'REGISTER', 'UNDO'}  # Enable undo for the operator.

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):

        trg = bpy.context.active_object
        print("trg: %s" %(trg))

        #find source object
        src = None
        for o in bpy.context.selected_objects:
            if o != trg:
                src = o
                break

        if not src:

            #try to find current user Transform Orientation
            #but this will work only in 3DVIEW space.
            mco = None
            try:
                co = bpy.context.space_data.current_orientation
                if co:
                    mco = co.matrix
                    print("Using Ttansform Oientation %s" % (co.name))
                    print("matrix= %s" % (mco))
                else:
                    print("No Ttansform Oientation found")
            except:
                mco = None

            if not mco:
                self.report({'ERROR_INVALID_INPUT'},"No source object selected\nYou have to select two objects, or be in a custom Transform Orientation.")
                return {'CANCELLED'}

            # ger src natrix, and transposed
            msrc = mco
            trs = msrc.transposed()
            q = trs.to_quaternion()

        else:
            # source given as object
            print("Source object: %s" %(src))
            # ger src natrix, and transposed
            msrc = src.matrix_world
            trs = msrc.transposed()
            q = trs.to_quaternion()

        #now we rotate trg back to apply zero rotation
        mtrg = trg.matrix_world.copy().to_3x3()
        mtrg.rotate(q)
        mtrg = mtrg.to_4x4()
        trg.matrix_world *= mtrg
        #deselect all but trg object
        bpy.ops.object.select_all(action='TOGGLE')
        #select trg as active object
        trg.select = True
        bpy.context.scene.objects.active = trg
        #apply this as default rotation
        bpy.ops.object.transform_apply(location=False, rotation=True, scale=False)
        #and now rotate back to src rotation
        q = msrc.to_quaternion()
        mtrg = trg.matrix_world.to_3x3()
        mtrg.rotate(q)
        mtrg = mtrg.to_4x4()
        trg.matrix_world *= mtrg

        return {'FINISHED'}

def menu_func(self, context):
    self.layout.operator(
        AlignToTOInverted.bl_idname)

def register():
    bpy.utils.register_class(AlignToTOInverted)
    bpy.types.VIEW3D_MT_object.append(menu_func)

def unregister():
    bpy.utils.unregister_class(AlignToTOInverted)
    bpy.types.VIEW3D_MT_object.remove(menu_func)

# This allows you to run the script directly from Blender's Text editor
# to test the add-on without having to install it.
if __name__ == "__main__":
    register()

    # test call
    #bpy.ops.object.align_to_to_inverted()


How to write my add-on so that when installed it also installs dependencies (let's say: scipy or numpy-quaternion)?

Ran into the same issue and received helpful responses on devtalk. There's also another post that was helpful when installing  pip for 2.81.
2.81
import subprocess
import bpy

py_exec = bpy.app.binary_path_python
# ensure pip is installed & update
subprocess.call([str(py_exec), "-m", "ensurepip", "--user"])
subprocess.call([str(py_exec), "-m", "pip", "install", "--upgrade", "pip"])
# install dependencies using pip
# dependencies such as 'numpy' could be added to the end of this command's list
subprocess.call([str(py_exec),"-m", "pip", "install", "--user", "scipy"])

Warnings:

On Windows, Blender must be run in Administrator mode. Blender may need to restart before using the installed dependency.
Installing dependencies requires an active internet connection


How To Move Bones Back Into Original Position After Applying Shape Key

Try this

Select the armature and go back into pose mode.
Select the bones you want to reset and hit alt-r to reset rotation
and alt-g to reset position


Final rendered image is completely transparent

The reason you don't see anything when you render is because your **Active Camera** is set to something different than the camera (in this case is set as the Area light).

Select your camera, make it active and your scene will render correctly.

You can do this two different ways:

Selecting the camera in the scene section of the properties window.

Or selecting your camera in the 3D viewport and pressing CtrlNumpad 0
(or on the view menu->Cameras->Select Active object as Camera)


How do I get rid of this orange selection box?

Right Click out of it, or just do  Ctrl+ Alt+ B...


Rigid Body Sim: INTENTIONALLY breaking a chain, falling naturally...kinda

I think to have finally found what is causing that behaviour: you set a X+Y rotation lock on most chain rings...

Eg: the first one from top has free movement:

While most chain rings have X and Y rotation locked, as you can also see from the rotation manipulator:

To correct, select all chain rings, then - keeping ALT pressed - you toggle X and Y rotation locks for all selected objects.

In this way your rigid body simulation should work better...


The first gif shows that you have faces which aren't properly connected to the surrounding vertices. This can be seen because the face center is marked with a little black square.

The top face is an ngon that consists of eight vertices (marked in blue) and the center vertex isn't part of it.

In order to fix this, switch to face select mode (either by clicking on the icon or using the 3 shortcut in Blender 2.8x), select the top face and delete it (X > Faces).

Switch back to vertex select mode and select four vertices that are supposed to form a face. Press F to create a face and repeat this step with the next four vertices until you have created all four faces.

The two faces on the side are ngons as well and consist of six vertices each. The vertex you're moving in the second gif is part of both faces, but the two horizontal edges aren't.

Switch to face select mode and select both problematic faces. Then press X > Faces Only, which will remove the faces but keep the vertical edge.

Once the side faces are deleted, switch to vertex select mode, select four vertices and create a face with F. Repeat this step until you've created all four faces.


How to copy paste a node setup from one file to another

One option to help keep things organised is to create a Node Group from your setup.

Select all the nodes you want in your group
Ctrl G form a Node Group from them

Give the group a name by typing it into the field on its node. Click the shield  on the right. This will give the group a fake user, so it won't be garbage-collected and deleted when saving the source .blend, in the event that it's not being used by anything else in the file.

Now, in any other .blend, you can hit File > Append.. look up the source .blend file.. and the group will be found in the 'Node Tree' folder. Clicking it makes a local copy available under the  Shift A > Group listing in the Node Editor.

You can   Ctrl AltG un-group the node, locally.

(You can create libraries of any of the entities in a .blend file this way, to be linked or appended to other files)


Is there an easy way to make a tree in Blender?

Make a Tree with the "Sapling" Addon

If you want to make a tree in Blender, you can use the built-in addon named "Sapling".

To enable it:

Info header -> File -> User Preferences

Then:

In the search box, type Sapling
Check the checkbox at the right hand side of the addon
If you want to always have Sapling in your Add menu, then click on the Save User Settings button at the bottom of the screen:

To add a tree to your scene:
SHIFTA -> Curve -> Add Tree

Adjust all the settings:

Since quite a lot of the settings are not labeled in any obvious way, I recommend studying
tutorials on Sapling.

NOTE: You MUST set all the settings the way you want them to be before you do ANYTHING else, otherwise they cannot be changed and the tree will stay that way (i.e. it's parameters are not changeable after it is first created.)

Sapling is very versatile and can create many, many types of trees and bushes. Here are some samples:


Sounds like the job for a Voronoi texture. While not exactly the same you can approximate that pattern relatively closely.

You can either apply it at material level, as a Bump map or as material based displacement, or you can use it as geometry level with a Displacement Node.

Last option will produce actual geometry but most likely require very high levels of subdivision and hence very dense geometry.

Shader Bump Map

Material Displacement

Geometry displacement


How can I control the texturing of the pieces created by cell fracture?

I removed doubles which there was 512 and then did the cell fracturing with source limit of 6 and got desired results


Instead of using bpy.data.scenes[sceneKey], just use bpy.context.scene to access the current scene. You also don't need the parentheses around conditions (it's Python, not C or Java). More important is the string assigned to filepath, though. \r means "carriage return". Just use forward slashes, Windows can handle those too.

Alternatively you can use \\r.


Why do I get this error? Loading large text file to Blender

Some of the way there

Here is some changes to get you some of the way there.  Unfortunately I have a late version of 2.79 where the boolean modifier no longer has the solver property, so I can't be sure of result.

add and remove the cylinder once at start and end respectively.
set the cd object as active and select.
reference the modifier when added, apply by reference (name).

Edited script:

import bpy
context = bpy.context
scene = context.scene
bpy.ops.mesh.primitive_cylinder_add(
    vertices = 3000,
    radius = 0.5,
    depth = 10,
    location = (0, 0, 0)
        )
cylinder = context.object
cylinder.select = False
cd = scene.objects['ISO 10791 M1 blank cd 0.0025']
scene.objects.active = cd
cd.select = True
with open(bpy.path.abspath("//cutting position trial.txt")) as content:
    for i, line in enumerate(content):
        print(i)

        # extract tool position
        x, y, z = [float(n) for n in line.split(' ',2)]
        cylinder.location = (x, y, z + 5)
        scene.update() # may not be needed.
        # add BOOLEAN modifier
        m = cd.modifiers.new('Boolean', 'BOOLEAN')
        m.operation = 'DIFFERENCE'
        m.object = cylinder
        #m.solver = 'CARVE'

        # apply modifier
        bpy.ops.object.modifier_apply(apply_as='DATA', modifier=m.name)
bpy.data.objects.remove(cylinder)


Go to the Outliner window and type animation in the search window. Choose the object that has the action you want to delete, hover the cursor over Animation block and press RMB-->Clear Animation Data. Save your file. When you close and reopen it the action'll be no longer there.


Scale deformation when rotating imported FBX

Make sure you apply all rotation and scale to the children before parenting them, having weird scaling can produce those results.

You can do this by selecting the child in object mode and pressing Ctrl+A and selecting "Rotation and Scale".


In the VSE, the "multiply speed" value of a "Speed" effect strip can't be animated. You'll have to :

uncheck the "Stretch to input strip length" box,
check the "Use as speed" box,
set the "Speed Factor" value to 1 (so the video will be played at normal speed)
animate this value as you need:

greater than 1, playback will be faster,
between 0 and 1 the playback will be slower.

You may have to click the "Refresh Sequencer" button to see the result.

Note that the sound won't be affected by this effect strip. I don't know if you can time-remap a sound in Blender.


Increasing Emission without Increasing Brightness

Use the Light Path input node Is Camera Ray socket as the factor to your Mix Shader node

This will result in the Emission being used for everything but the Camera (so it will be used for lighting the scene) and only the Diffuse Shader will be used when viewed direct from the camera.


How to edit video with a third audio channel

You added information to your original question. It's not so important how many audio channels the video has in your scenario, you want to drop the volume of one of the audio tracks for a cough/sneeze/burp you can keyframe the volume of a track.

view the audio track as an audio waveform
set keyframes at the appropriate places. A sane volume range is between 0.0 and 1.0


Can the Properties Shelf be re-merged in 2.8?

The properties shelves can't be re-merged in Blender 2.8, but you can retain specific elements from each shelf by Shift + Left-Clicking on them and pinning them. The pinned elements will be retained through toggling the whole Properties Shelf with N.


How can I specify the position of vertices to create an object using Python?

This Code will create the mesh object with your faces.
As for the Colors you will have to decide how you want to store them.
With a different material per face?
With vertex colors?
In an image (UVMapping)?
It depends on what you want to do with your Object as to which answer is best for you.

import bpy
import bmesh

vertlist = [[(0, 0), (0, 1), (1, 1), (1, 0)],
            [(2, 2), (2, 3), (3, 3), (3, 2)]]

def create_mesh_object(context, vertlist):
    bm = bmesh.new()

    for faceverts in vertlist:
        bm_verts = []
        for vert in faceverts:
            bm_verts.append(bm.verts.new((vert[0], vert[1], 0)))
        bm.faces.new(bm_verts)

    me = bpy.data.meshes.new(name='MyMesh')
    ob = bpy.data.objects.new(name='MyObject', object_data=me)
    bm.to_mesh(ob.data)
    context.scene.objects.link(ob)

create_mesh_object(bpy.context, vertlist)


You can just turn on showing of edge length, then any selected edges will display their length next to them:

There are also the MeasureIt tools which you can find in the view tab of the right side bar for more complicated cases (You may need to enable the addon to see the tab).


The transform orientation after pressing 'g' and 'z' doesn't match 'Normal' transform orientation

First, as batFINGER says, the combination GZZ move object in local Z axis.

Second, why you said

  I want to input specific transformation values which is impossible
  with manual dragging.

Did you tried? Click and hold on the axis, and enter specific value from keyboard while you holding the mouse button.


Turning off texture smoothing in Blender Render (Exclusive to Blender Render)

Disable 'Interpolation' will make the image texture pixel-sharp.

Result:


Worked for me:

import bpy

obj  = bpy.data.objects['Cube']
mesh = obj.data
vert = mesh.vertices[0]
mat_world = obj.matrix_world

pos_world = mat_world * vert.co
pos_world.z += 0.1
vert.co = mat_world.inverted() * pos_world

If you're editing a lot of vertices then you might want to compose the matrix:

from mathutils import Vector, Matrix

vec = Vector((0.0, 0.0, 0.1))
mat_edit = mat_world.inverted() * Matrix.Translate(vec) * mat_world

vert.co = mat_edit * vert.co


Delete the upper surface of a cylinder with the api

Bmesh script.
can add primitives using bmesh.  The equivalent of add cylinder is bmesh.ops.create_cone(...) with both radii set to match.
As with the mesh operator the default for ends is NGON fill.
The top face will have a normal that is in +Z direction.
https://blender.stackexchange.com/a/96121
Test script, run in OBJECT mode.
import bpy
import bmesh

context = bpy.context

TOL = 1e-5

me = bpy.data.meshes.new("Open Cylinder")
bm = bmesh.new()
bmesh.ops.create_cone(
        bm,
        cap_ends=True,
        segments=32,
        diameter1=3,
        diameter2=3,
        depth=0.02,
        calc_uvs=True,
        )

f = next(
        (
            f for f in bm.faces
            if f.normal.angle((0, 0, 1)) < TOL
        ),
        None
        )

if f:
    bm.faces.remove(f)

bm.to_mesh(me)
ob = bpy.data.objects.new("Open Cylinder", me)
context.collection.objects.link(ob)

For the case of a TRIFAN filled end would remove the middle vert, to remove the edges and faces in one fell swoop.
Alternatively could create cylinder without faces and fill only the bottom edge loop.


How to list all scenes, objects, sensors, controllers, actuators, etc

The following code will list all loaded scenes, objects and thier sensors; controllers and actuators :

scenes = bge.logic.getSceneList()
for scene in scenes :
    print("scene : %s"%scene.name)
    for obj in scene.objects :
        print("   object : %s"%obj.name)
        for sensor in obj.sensors :
            print("      sensor : %s"%sensor.name)
        for cont in obj.controllers :
            print("      controller : %s"%cont.name)
        for actu in obj.actuators :
            print("      actuator : %s"%actu.name)


You're right. Texturing a single mesh is better.
You could also use bricks and replicate them with the Array modifier, so they are linked copies (until you apply the modifier) of the first.
But texturing remains the lightest solution, I think.


How to create a trace outline animation of an object

General idea is to use Build modifier on Curve object.

If you have a model already, you can ...

Separate Ctrl+P a few loops into a new object
Convert to Curve
and Add Build modifier

Notes:

If you want to let all curve elements be animated at the same time you have to split them into separate objects.
Usually it is better to Separate mesh loops as lowpoly without Subdivision modifier, Convert to Curve, switch curve type to Bezier with Handles > Automatic and manually adjust few end handles, so you have better control over additional curve shape adjustment. But like in this case it was easier to apply Subsurf modifier on separated mesh before Convert to Curve.
if you need more smooth animation increase curve resolution under Curve Properties

Based on TheGreens model.


Could you run some parts in the script of blender

The thing you described sounds like a cell running script system: Running part of python script - Stack Overflow
Which could found in Spyder and IPython(Jupyter) as IDE level. Blender itself doesn't support this feature for now since it's a little bit complicate. Although  you can simply define block using tag or selection code to specified some code from text editor and exec it. Which is described in Blender Tips and Tricks — Blender Python API.
Below is a simple add on (operator) which will find the first match # region # endregion block before current line and run the cell.

I do update a newer version in Github.
import bpy

_START_TAG = '# region'
_END_TAG = '# endregion'

class TEXT_OT_run_cell_script(bpy.types.Operator):
    """Run current selected cell script in python."""
    bl_idname = "text.runcell"
    bl_label = "Run current cell"

    @classmethod
    def poll(cls, context):
        return context.area.type == 'TEXT_EDITOR'

    @staticmethod
    def get_codecells_mapping(c_lines: list) -> dict:
        stack = []
        cells = {}
        for idx, line in enumerate(c_lines):
            if line.startswith(_START_TAG):
                stack.append((line[len(_START_TAG) :], idx))
            elif line.startswith(_END_TAG):
                if len(stack) == 0:
                    continue
                cell_name, idx_start = stack.pop()
                cells[idx_start] = (cell_name, idx_start, idx)
        for cell_name, idx_start in stack:
            # Fill unmatched block
            cells[idx_start] = (cell_name, idx_start, len(c_lines) - 1)
        return cells

    def execute(self, context):
        # print('EXECUTE addon')
        text_obj = context.area.spaces.active.text
        codes = text_obj.as_string()
        # print(codes)
        c_lines = codes.split('\n')
        cells = self.get_codecells_mapping(c_lines)
        # print(cells)
        if cells:
            cell_idx = -1
            idx = text_obj.current_line_index
            for i in range(idx, -1, -1):
                if c_lines[i].startswith(_START_TAG):
                    cell_idx = i
                    break
            name, start, end = cells.get(
                cell_idx,
                (text_obj.name, 0, len(c_lines) - 1)
            )
            # print((name, start, end))
            self.report({'INFO'}, f"Execute cell: [{name}]({start}:{end})")
            exec(
                compile(
                    '\n'.join(c_lines[start:end]),
                    filename=f"S-Cell-{name}",
                    mode='exec',
                )
            )
        return {'FINISHED'}

def register():
    bpy.utils.register_class(TEXT_OT_run_cell_script)

def unregister():
    bpy.utils.unregister_class(TEXT_OT_run_cell_script)

if __name__ == "__name__":
    register()

Text block:
# region Hello
a = "Hello world"
# endregion

# region print
print(a)
# endregion

# region import BPY
import bpy
# endregion

# region move obj
bpy.context.object.location.x += 0.1
# endregion

New Information
This addon manually provide a local scope to the exec function, and that local is stored in module, which give it the ability to share variable among each cell. But the global variable is ignore and pass as an empty dictionary. It might cause some strange behavior (I mean, crash) when cell code itself accessing these built in function.
Old Information
Notice that since we don't pass any local inside the execute function. These cells will use the scope that inside the operator. It will make it hard to use since the scope is not provide by user and script cells variable are not share among each other.


How to Bake a Metallic and Smoothness Map for Unity in Blender 2.91

I ended up writing a custom Unity script to convert maps generated in Blender. I will share the script below.
With regards to generating the individual maps. The Smoothness map is fairly straight forward. I generated a Roughness map, then inverted it using my script. The Metallic map is a little more of a hassle. Blender does not appear to have a bake option for it. The closest is a Glossy option, which seems to bake shadows into it. The only useful advise I found online was to copy the metallic values over to a field that you can bake out like the Roughness, then bake out the "Roughness" and call it the Metallic map. This worked for my needs. Just remember to revert the Blender file back to what it was before setting up for the metallic bake.
Here is the Unity script I wrote that will merge the individual maps into a single map and invert the maps that need inverting. Feel free to use/modify this code for your own needs:
public class TextureChannelPacker : EditorWindow
{
    private Texture2D redTexture,
                    greenTexture,
                    blueTexture,
                    alphaTexture;

    private bool redInvert,
                 greenInvert,
                 blueInvert,
                 alphaInvert;

    private channel redChannel = channel.Red,
                    greenChannel = channel.Green,
                    blueChannel = channel.Blue,
                    alphaChannel = channel.Alpha;

    private enum channel
    {
        Red,
        Green,
        Blue,
        Alpha,
        RGB
    }

    private GUILayoutOption channelLabelWidth,
                            channelTextureWidth;

    private float labelWidth = 80f;

    [MenuItem("Edit/Texture Channel Packer")]
    [MenuItem("Custom Tools/Texture Channel Packer")]
    public static void ShowWindow()
    {
        EditorWindow.GetWindow(typeof(TextureChannelPacker));
    }

    void OnGUI()
    {
        UpdateLayoutWidth();

        CreateChannelHeaderRow();
        CreateChannelRow("Red", ref redTexture, ref redChannel, ref redInvert);
        CreateChannelRow("Green", ref greenTexture, ref greenChannel, ref greenInvert);
        CreateChannelRow("Blue", ref blueTexture, ref blueChannel, ref blueInvert);
        CreateChannelRow("Alpha", ref alphaTexture, ref alphaChannel, ref alphaInvert);

        CreateSaveButton();
    }

    private void SaveToFile()
    {
        var path = EditorUtility.SaveFilePanel(
            "Save Composite Texture as PNG",
            "",
            "New Composite Texture.png",
            "png");

        Texture2D texture = CreateNewTexture2D();

        CompositeTextures(ref texture);

        if (path.Length != 0)
        {
            var pngData = texture.EncodeToPNG();
            if (pngData != null)
                File.WriteAllBytes(path, pngData);
            else
                Debug.Log("Unable to save, no texture data to save.");
        }
    }

    private bool AreTexturesReadable()
    {
        bool result = true;
        string errorText = "Please set 'Read/Write Enabled' to 'true' on the following textures:";

        if (redTexture)
            if (!redTexture.isReadable)
            {
                errorText += "\n\t" + redTexture.name.ToString();
                result = false;
            }
        if (greenTexture)
            if (!greenTexture.isReadable)
            {
                errorText += "\n\t" + greenTexture.name.ToString();
                result = false;
            }
        if (blueTexture)
            if (!blueTexture.isReadable)
            {
                errorText += "\n\t" + blueTexture.name.ToString();
                result = false;
            }
        if (alphaTexture)
            if (!alphaTexture.isReadable)
            {
                errorText += "\n\t" + alphaTexture.name.ToString();
                result = false;
            }

        if (result) return true;

        Debug.Log(errorText);
        EditorUtility.DisplayDialog("Error", errorText, "Okay");

        return false;
    }

    private void CompositeTextures(ref Texture2D compositeTexture)
    {
        float u, v;

        for (int x = 0; x < compositeTexture.width; x++)
        {
            u = (float)x / (float)compositeTexture.width;

            for(int y = 0; y < compositeTexture.height; y++)
            {
                v = (float)y / (float)compositeTexture.height;

                Color pixelColor = new Color(GetColorForChannel(redTexture, redChannel, redInvert, u, v),
                                             GetColorForChannel(greenTexture, greenChannel, greenInvert, u, v),
                                             GetColorForChannel(blueTexture, blueChannel, blueInvert, u, v),
                                             GetColorForChannel(alphaTexture, alphaChannel, alphaInvert, u, v, true));

                compositeTexture.SetPixel(x, y, pixelColor);
            }

            EditorUtility.DisplayProgressBar("Compositing Texture...",
                                             "Progress: " + Mathf.Round(u * 1000) / 10 + "%",
                                             u);
        }

        compositeTexture.Apply();
        EditorUtility.ClearProgressBar();
    }

    private float GetColorForChannel(Texture2D texture, channel textureChannel, bool invert, float u, float v, bool isAlphaChannel = false)
    {
        if (!texture)
        {
            if (isAlphaChannel)
                return 1f;
            else
                return 0f;
        }

        int x = Mathf.FloorToInt(texture.width * u),
            y = Mathf.FloorToInt(texture.height * v);

        Color color = texture.GetPixel(x, y);

        float value = 0f;

        switch(textureChannel)
        {
            case channel.Red:
                value = color.r;
                break;
            case channel.Green:
                value = color.g;
                break;
            case channel.Blue:
                value = color.b;
                break;
            case channel.Alpha:
                value = color.a;
                break;
            case channel.RGB:
                value = (color.r + color.g + color.b) / 3f; // average value of channels
                break;
        }

        if (invert) value = 1 - value;

        return Mathf.Clamp01(value);
    }

    private Texture2D CreateNewTexture2D()
    {
        Vector2Int size = new Vector2Int();

        if (redTexture != null)
        {
            if (size.x < redTexture.width) size.x = redTexture.width;
            if (size.y < redTexture.height) size.y = redTexture.height;
        }

        if (greenTexture != null)
        {
            if (size.x < greenTexture.width) size.x = greenTexture.width;
            if (size.y < greenTexture.height) size.y = greenTexture.height;
        }

        if (blueTexture != null)
        {
            if (size.x < blueTexture.width) size.x = blueTexture.width;
            if (size.y < blueTexture.height) size.y = blueTexture.height;
        }

        if (alphaTexture != null)
        {
            if (size.x < alphaTexture.width) size.x = alphaTexture.width;
            if (size.y < alphaTexture.height) size.y = alphaTexture.height;
        }

        return new Texture2D(size.x, size.y);

    }

    private bool WasATextureProvided()
    {
        bool result = redTexture ||
                      greenTexture ||
                      blueTexture ||
                      alphaTexture;

        if(!result)
        {
            Debug.LogWarning("Unable to Save. No input textures selected.");
            EditorUtility.DisplayDialog("Error", "Unable to Save. No input textures selected.", "Okay");
        }

        return result;
    }

    private void UpdateLayoutWidth()
    {
        float remainingWidth = EditorGUIUtility.currentViewWidth;

        remainingWidth -= labelWidth;
        channelLabelWidth = GUILayout.Width(labelWidth);

        remainingWidth /= 2f;
        channelTextureWidth = GUILayout.Width(remainingWidth);
    }

    private void CreateChannelHeaderRow()
    {
        EditorGUILayout.BeginHorizontal();

        EditorGUILayout.BeginVertical(channelLabelWidth);
        EditorGUILayout.LabelField("Channel", channelLabelWidth);
        EditorGUILayout.EndVertical();

        EditorGUILayout.BeginVertical(channelTextureWidth);
        EditorGUILayout.LabelField("Input Texture");
        EditorGUILayout.EndVertical();

        EditorGUILayout.BeginVertical();
        EditorGUILayout.LabelField("Settings");
        EditorGUILayout.EndVertical();

        EditorGUILayout.EndHorizontal();
    }

    private void CreateChannelRow(string label, ref Texture2D inputTexture, ref channel channel, ref bool invert)
    {

        EditorGUILayout.BeginHorizontal();

        EditorGUILayout.BeginVertical(channelLabelWidth);
        EditorGUILayout.LabelField(label, channelLabelWidth);
        EditorGUILayout.EndVertical();

        EditorGUILayout.BeginVertical(channelTextureWidth);
        inputTexture = (Texture2D)EditorGUILayout.ObjectField(inputTexture, typeof(Texture), false);
        EditorGUILayout.EndVertical();

        EditorGUILayout.BeginVertical();
        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Extract:", GUILayout.MaxWidth(60f));
        channel = (channel)EditorGUILayout.EnumPopup(channel);
        EditorGUILayout.EndHorizontal();
        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Invert:", GUILayout.MaxWidth(60f));
        invert = EditorGUILayout.Toggle(invert);
        EditorGUILayout.EndHorizontal();
        EditorGUILayout.EndVertical();
        EditorGUILayout.EndHorizontal();
    }

    private void CreateSaveButton()
    {
        EditorGUILayout.BeginHorizontal();
        GUILayout.FlexibleSpace();
        if (GUILayout.Button("Save to file"))
        {
            if (WasATextureProvided() && AreTexturesReadable())
                SaveToFile();
        }
        GUILayout.FlexibleSpace();
        EditorGUILayout.EndHorizontal();
    }
}


Shape key animation did it. For posterity, you hover over the value slider under the shape key list and hit "I" to insert a frame with that value.

Thanks Jerryno and user2511.


How do I set up a complicated rig correctly for linking? (Advanced)

Take a look at this:

Rigging question about Spline IK and having all controls on one armature

It's an example of rig structure with multiple armatures inside parented, to avoid dependency issues.

The trick is to have all the controls the animator will interact with inside one master armature, and to copy these bones with constraints to the other armatures where they do things. This way, you only need to make a proxy of this master armature when the rig is linked and everything else becomes inner workings of the rig.

This should remedy any parent breaking problems when creating proxy rigs.


Maybe there is a different approach to it, but one problem is that there is no frame at which the ball is in contact with the other rigid bodies. In frame 22 it is in front of the stack and in frame 23 it is already behind the stack. If you position the ball a bit differently that it has one or two frame inside the stack, it will have an effect.


Yes : this is an icosphere with both (and in this order) a wireframe and a subsurf modifier.

here is the sequence :

The point is : I wanted to share the wireframe modifier possibilities as I discovered it today.

Here are some other very simple possibilities, just starting from the basic shapes:


Any Video formats that render with Alpha Channel?

If you're using OSX you can use its Quicktime support:

Selecting any of the video formats in the Output panel.
In the Encoding panel change the format to Quicktime and select a codec that supports alpha (such as HuffYUV).


Obj files do not transfer vertex colors.

I have read that if you can use MeshLab. Import the OBJ, then export it to PLY. Then import it into blender.

source


Nest complementary objects quick, without having to deform,distort?

To construct the dual object, you can:

X Delete > 'Faces Only' of the original
F between selected vertices to create new edges
F selected edges to create new faces

If you already have the complementary objects, not in the right orientation or scale, maybe this answer will help?

EDIT: following commentary .. this sequence was keyed manually, forward and in reverse from a static exact fit position. I personally think 'cheating' is the easiest approach.


Average Island Scale

For this task I usually take advantage of the Average Island Scale operator available in the UVs menu. I don't know the math behind it, but the effect is to re-proportionate the uv island to the region extension of the real mesh.

Here's a basic example:

And here's an example with Suzanne UVs. I duplicated the same object, so the UV island are at the beginning overlapping, then I ran the command.


Why is 'Center cursor and View All' not centering the view to my object?

It's because Shift+C doesn't center the view, it shows all objects in the scene, kind of like Home does.

So, because you have a cube at the center, but a camera off to one side, Blender is going to show you both and the view won't be centered on the origin.

Shift+C does move the 3D cursor to the origin, though.


Cannot keyframe anymore. All movement stopped and every keyframe is the same

In the Dopesheet tracks, you've disabled the speakers icons (Do Channels Contribute to Result), it mutes all the keyframes of the track, therefore you can't see the changes you've made, so it's going to be a bit messy in your scene now that you'll reactivate it


Create a controlling empty and use as parent.

Create an empty in a useful place.  Perhaps the base.
Parent the components to the empty.  You may choose to not include any object already parented to others. Do this by selecting the children first.  Select the parent last.

Press Ctrl-p
Select from the pop up menu

Rotate the empty which should rotate all the children in unison.


Select the loopcuts (one by one) and use the edge slide CTRL + E --> edge slide. and move them to the sides. Or you can move them by pressing G two times so it will slide along the edges.


There is no other file format that will guarantee a better mesh topology, unless you import as NURBS, but Blender can not import NURBS nor handle that kind of geometric complexity.

As TLousky mentions the results you are getting are totally normal and expected when converting a bezier curve into a mesh. However I would advise to not convert the SVG curve into a mesh, unless you specifically need to and only when you need to.

Keep it as a Bezier Curve object as long as possible, it's non destructive,  will be easier to edit and maintain while being easily editable as a bezier curve handles.

Also have a look at my answer about cleanup techniques for bezier curve objects, useful both for keeping as curve or before converting to mesh for a cleaner topology.

Have in mind that converting Bezier Objects into meshes will always leave a mesh with uneven topology and lots of triangulated edges. You may later clean them up a bit by turning flat faces into NGons.

That won't improve topology nor benefit unwrapping or editing, but it may give a cleaner viewport.


You have turned off file extensions in blender, which includes not only the frame numbering but the vital ".mp4" Filename Extension. The file you rendered is an mp4 file, but it doesn't have a "label" so to speak. I recommend turning on "show filename extensions" in File Explorer to avoid confusion in the future, but to fix the issue at hand:

Turn on "file extensions" in blender for a fix to all future renders.
OR
Type ".mp4" at the end of your filename in blender as a fix to all future renders.

Plus, you can:

Rename the existing rendered file, adding ".mp4" at the end, which will save it. :D

Note: upon the renaming, the added ".mp4" change may be hidden by Explorer without the "show filename extensions" turned on, but it probably did work.


Color difference between 2 objects in Object Mode/Solid View

The left object doesn´t have average normals. I can see it because on the bottom there's a black face and there's a different color on the object.
Enter edit mode. Select all faces, press CTRL+N to average normals. Your object is now of the same color than the right one.


How to bevel only one end of a cylinder?

Using vertex groups should work. First select the top edges and add a vertex group, then click on "Assign". Then in the "Bevel" modifier set the "Limit Method" to "Vertex Group" and then select the vertex group you created.


How do I add Material Output node when it does not show up automatically?

The node editor works with three different types of nodes.

By default the node editor is configured for compositing .

Change to the Material node editor :

More info:

https://www.blender.org/manual/editors/node_editor/introduction.html#node-tree-types

https://www.blender.org/manual/editors/node_editor/editor.html


How to save and load an object position?

My reputation is too low to comment. But your link to the script is not working.

If the script is writing and reading from an external file, it should definitely be possible to modify it to also save the object position.

Try re-uploading the script.


How to fill in spaces between voronoi holes?

Check this blend here:

For geometry like this, I often use the Skin Modifier, because it can create these smooth branches automatically. But to use it, you need a mesh as a base, not a bunch of curves. So first, remove the curve profile from your geometry:

Next, use Alt + C to convert the lines to a mesh geometry:

In Edit mode, remove doubles, using a high threshold value, to merge as many vertices as possible while still maintaining the shape you created initially. I was using a merge distance of 0.1 for your scene:

next, add the skin modifier (can take a while until it is on there, and save your scene before):

Finally, go to Edit Mode, and select all vertices, then hit Ctrl + A. This activates a modal operator, when you now drag the mouse you can scale the profile up and down. Scale down until the branch thickness is what you like, and then add a Subsurf Modifier to smooth out the skinned mesh:

You can scale each point individually using the shortcut I mentioned before, so variation can be created easily. You might however get some areas with artifacts. Sometimes, marking a different vertex as the root can resolve or at least improve it:

Now play with the thickness:


I Need Sharp Edge And Have Problems With Redirecting Edge Flow

I think this topology works:

I beveled these edges and rearranged a bit all around:

Here is what it gives with the Subdivision Surface modifier:

Previous shape:


Movie recorded on phone reports inconsistent number of frames when imported to blender (Blender 2.8 vs 2.9)

42.28 is a non standard frame rate.
Phone cameras use every trick in the book to create small files by using variable frame rate and long GOP inter-frame compression, where the information for each frame depends on the information of a reference key frame.
Video encoded with such schemes cannot be imported into blender without problems.
The easiest way to deal with this is to use an external program to transcode the file into a single stable frame-rate with intraframe encoding (where all of the information for every frame is contained within the current frame).
Blender will work fine with those.


How to keep 2 or more different alternative transform?

I don't know if it has already been done, but that may have a general interested, so:

This is only for object location (not rotation or other) but is a base if you need something else.
Nothing particular to say about the code. Just a UI List with some associated operators (essentially done based on the templates)... and I'm far from a Blender UI specialist...
If details are needed, please ask in comments.

As asked in comments:
import bpy
from bpy.props import StringProperty, FloatVectorProperty, IntProperty, BoolProperty, CollectionProperty
from bpy.types import PropertyGroup, UIList, Operator, Panel
from mathutils import Vector

def keep_locations_index_changed(self, context):
    object = context.object
    index = object.keep_locations_index
    locations = object.keep_locations
    if object and index >= 0 and locations and object.keep_locations_auto:
        if index >= len(locations):
            index = len(locations) - 1
        object.location = locations[index].location

class KeepLocations(PropertyGroup):
    name: StringProperty( name="Name", description="Name", default="Untitled")
    location: FloatVectorProperty( name="Location", description="", update=keep_locations_index_changed, default=Vector())

class MY_UL_KEEPLOCATIONS(UIList):
    def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
        custom_icon = 'OBJECT_DATAMODE'
        if self.layout_type in {'DEFAULT', 'COMPACT'}:
            layout.label(text=item.name, icon = custom_icon)
        elif self.layout_type in {'GRID'}:
            layout.alignment = 'CENTER'
            layout.label(text="", icon = custom_icon)

class LIST_OT_NewItem(Operator):
    """ Add a location to the list
    """
    bl_idname = "keep_locations.new_item"
    bl_label = "Add a new location"

    @classmethod
    def poll(cls, context):
        return context.object

    def execute(self, context):
        obj_location = context.object.location
        locations = context.object.keep_locations
        index = len(locations)
        locations.add()
        locations[index].location = obj_location
        context.object.keep_locations_index = index
        return{'FINISHED'}

class LIST_OT_DeleteItem(Operator):
    """ Remove a location from the list
    """
    bl_idname = "keep_locations.delete_item"
    bl_label = "Deletes a location"

    @classmethod
    def poll(cls, context):
        return context.object and context.object.keep_locations

    def execute(self, context):
        list = context.object.keep_locations
        index = context.object.keep_locations_index
        list.remove(index)
        context.object.keep_locations_index = min(max(0, index - 1), len(list) - 1)
        return{'FINISHED'}

class LIST_OT_GetLocation(Operator):
    """ Get the object current location and assign it to the selection
    """
    bl_idname = "keep_locations.get_location"
    bl_label = "Gets a location"

    @classmethod
    def poll(cls, context):
        return context.object and context.object.keep_locations

    def execute(self, context):
        list = context.object.keep_locations
        index = context.object.keep_locations_index
        list[index].location = context.object.location
        return{'FINISHED'}

class LIST_OT_SetLocation(Operator):
    """ Set the select location as location of the object
    """
    bl_idname = "keep_locations.set_location"
    bl_label = "Sets a location"

    @classmethod
    def poll(cls, context):
        return context.object and context.object.keep_locations

    def execute(self, context):
        list = context.object.keep_locations
        index = context.object.keep_locations_index
        context.object.location = list[index].location
        return{'FINISHED'}

class KeepLocationsPanel(Panel):
    bl_label = "Keep locations"
    bl_idname = "OBJECT_PT_KEEP_LOCATIONS"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout
        object = context.object
        row = layout.row()
        row.template_list("MY_UL_KEEPLOCATIONS", "Transforms", object, "keep_locations", object, "keep_locations_index")
        row = layout.row()
        row.operator(LIST_OT_NewItem.bl_idname, text='New')
        row.operator(LIST_OT_DeleteItem.bl_idname, text='Remove')

        if object.keep_locations_index >= 0 and object.keep_locations:
            row = layout.row()
            row.prop(object, "keep_locations_auto")
            item = object.keep_locations[object.keep_locations_index]
            layout.row().prop(item, "name")
            layout.row().prop(item, "location")
            row = layout.row()
            row.operator(LIST_OT_GetLocation.bl_idname, text='Get')
            row.operator(LIST_OT_SetLocation.bl_idname, text='Set')

def register():
    bpy.utils.register_class(KeepLocations)
    bpy.utils.register_class(MY_UL_KEEPLOCATIONS)
    bpy.utils.register_class(LIST_OT_NewItem)
    bpy.utils.register_class(LIST_OT_DeleteItem)
    bpy.utils.register_class(LIST_OT_GetLocation)
    bpy.utils.register_class(LIST_OT_SetLocation)
    bpy.utils.register_class(KeepLocationsPanel)
    bpy.types.Object.keep_locations_auto = BoolProperty(name = "Auto update", description="Update the object location as soon as selected", default = False)
    bpy.types.Object.keep_locations_index = IntProperty(name = "Location", update=keep_locations_index_changed, default = 0)
    bpy.types.Object.keep_locations = CollectionProperty(type = KeepLocations)

def unregister():
    del bpy.types.Object.keep_locations_auto
    del bpy.types.Object.keep_locations
    del bpy.types.Object.keep_locations_index
    bpy.utils.unregister_class(KeepLocations)
    bpy.utils.unregister_class(MY_UL_KEEPLOCATIONS)
    bpy.utils.unregister_class(KeepLocationsPanel)
    bpy.utils.unregister_class(LIST_OT_NewItem)
    bpy.utils.unregister_class(LIST_OT_DeleteItem)
    bpy.utils.unregister_class(LIST_OT_GetLocation)
    bpy.utils.unregister_class(LIST_OT_SetLocation)

if __name__ == "__main__":
    register()


You may try to use Curve and Array modifiers starting with a simple plane instead of triangle.

Add a curve and a plane. Make sure they both have the origin points placed in the same position. Subdivide the plane many times with W-->Subdivide then give it a Curve modifier. Fit the plane to the curve.

Select diagonal vertices and connect them with J. Delete half vertices of the plane. One segment is ready!

Apply the Curve modifier and delete the curve. Snap the plane's origin point to the straight angled corner of a mesh as pictured below (Shift+Ctrl+Alt+C). Next add an Empty there.

Apply the transformations of the objects (Ctrl+A-->Rot&Scale). Add an Array modifier to the plane, change the count number as you like, uncheck the Relative Offset checkbox and check the Object Offset one. Type Empty in the window below. Select an Empty and rotate it as you like.


Overlaying an image to cover a face in a video?

You can track a point in your footage and overlay an image in the compositor.

Common practice is to blur a face, when wanting to preserve the privacy of someone in a video. I will explain this first, as it is quicker to achieve.

Bluring a moving persons face in a video

Load the video into Blenders Movie Clip Editor. Set the scene start frame, end frame and resolution.
Go to the first frame of the scene. In the Tools Tab of the Movie Clip Editor in the Track section, set the Tracking Settings to Previous Frame. Click the Add button in the Marker section, then click on the video to add a marker. The marker should be positioned on the face you want to track. Markers can be translated, rotated and scaled. G, R, S
With the marker selected, press Ctrl + T to track it.
Switch to masking mode and add a new mask.
Ctrl + click to add new masking points. Add new masking points and track the face shape, which you want to mask. To close the mask, press Alt + C. Mask points can be selected, translated, rotated and scaled as usual.
Parent the mask points to the track by selecting the track and all the mask points and press the Parent button in the Tools menu.
[Anonymously suggested: Alternately, in case you are facing issues with track selection, click each of the mask points one after another while pressing Ctrl + P after each click. This will directly parent the mask points.]

The masked points will now follow the tracking marker. The mask can be keyframe at any frame by pressing I. This may be necessary if the shape of the face changes. Mask keyframes can be viewed and edited in the Dopesheet in Mask mode. In the example, a key is used on the start and on the end frame.
In the node editor, go into Compositing mode and check Use Nodes. Add a Movie Clip node and load your clip.
If the scene size and the source movie clip size are different, connect the Image output of the Movie Clip node to a Scale node set to Render Size. Connect the Scale nodes output to a Blur node. Set the amount of blurring you want in the X, Y fields. Add a MixRGB node and connect it to the Scale and the Blur node. Add a Mask node and select the mask. Connect it to the Fac input of the MixRGB node.
Rendering the composite will blur the area, where the mask is.

Overlaying an image onto a moving persons face in a video

Do steps 1 - 3 as explained above.

In the properties panel of the Movie Clip Editor, check 2D Stabilization. Select the tracked marker and add it to the Tracks for Location.
In compositor add an Image node and load the image, which you want to lay over the face. Add a Transform node to be able to position it later. Add a Stabilize 2D node and select the video which we used in the Movie Clip Editor. Check Invert. Since the Stabilization works in the space of the movie clip, we need to bring the smiley image into the Movie Clip space. To do this, add a Set Alpha node and connect it to the Movie Clip. Set the Alpha value to 0. Add an Alpha Over node and connect it to the Set Alpha and the Transform node. Append the Stabilize 2D node after the Alpha Over. After the stabilization the smiley image follow the track in the correct space. Add an Alpha Over node and connect it to the Movie Clip node and the Stabilize 2D node.
Rendering this will overlay the smiley image ontop of the movie clip. The smiley image is matched moved with the stabilization node.


Incorrect scale when importing .Obj files

Inconsistent scale is a common annoyance when using different software.
Fortunately, you can clamp the size during import.

Clamp the imported file to a fixed size.

To illustrate different clamp results


This was changed in 2.71, now solid view is displayed with shading, and wireframe view is shadeless:


How can I (easily) create particles falling from the ground

Make particles fall off from the engine is a rather easy task.

you need to define some faces as the emitter, for example, the rocket engine. Assign the faces to a Vertex Group. Alternatively create a simple object (circle) that is used as an emitter, place it in front of the rocket engine, and parent it to the rocket. The extra object can be excluded from render (Particle Properties > Render > [_] Show Emitter).
add an Ico Sphere (very low-poly, just 1 subdivision in create popup dialog), scale it down to 1 cm. This is your particle object. Give it a material with an Emission to make it glow. Enable Bloom in Eevee
add the Particle System to the rocket and adjust a few settings:

type is Emitter, increase the Number of particles to something like 5000, and set Lifetime to 20 (or higher for a longer tail), Frame Start to 1, End to 200
set Velocity > Normal to 10 m/s to speed up the particles, and Velocity > Object Velocity to something like 0.482. This makes the tail a little "fringy"
in the section Physics > Forces give the particles some Damp, like 0.121, so they don't bounce around like crazy.
in Render set Render As to Object, set Scale to 1.0 (adjust if needed), and select the particle object (Ico Sphere) as Render > Object > Instance Object
if you have defined a vertex group for the emitting faces you can specify it under Vertex Groups > Density.

Have a good rocket launch!


You could try this way: Mix a Diffuse with a Glossy, with a Fresnel as Factor, maybe add a Subsurface Scattering to give a bit of translucency, and also a Noise to give a grainy relief to the surfaces. Change the color and the Noise Scale and Strength depending on the part.


Your Dope Sheet in Shape key editor mode. Switch it to Action Editor.


why my mesh get weird shading when I click smooth?

You can mark sharp edges then use an edge split modifier and an subdivision modifier set the edje split modifier so it splits sharp edges.This way you can add more geometry and reduce these "shadows"
Edit:The subdivision modifier goes first and also adding edge creases might help)


RIGGING in 2.79b ~ IK handles cause hands/feet to detatch from the body, alternatives? (Foot rigging)

Parent the foot to the IK controller (therefore now it's unparented from the lowerleg, as explained in your tutorials).

Give your lowerleg a IK constraint with the controller as Target:

Now to make sure that the foot sticks to the lowerleg, give the foot a Copy Location constraint, with the lowerleg as Target, a Head/Tail value of 1, and a Space setting > World Space / World Space.

file here:


How to simply find the code/script behind the volume scatter node so I can see the math?

@DuarteFarrajotaRamos 's comment turns out to have been a good suggestion - ask someone. I found the IRC channel on one of the linked pages, asked, and got the following link straight away. Exactly what I needed!

https://developer.blender.org/diffusion/B/browse/master/intern/cycles/kernel/closure/volume.h

note: it's the .h file that has the goodies I'm after, not the .c. Line 35 has the math (several lines shown here):

/* HENYEY-GREENSTEIN CLOSURE */

/* Given cosine between rays, return probability density that a photon bounces
 * to that direction. The g parameter controls how different it is from the
 * uniform sphere. g=0 uniform diffuse-like, g=1 close to sharp single ray. */
ccl_device float single_peaked_henyey_greenstein(float cos_theta, float g)
{
  return ((1.0f - g * g) / safe_powf(1.0f + g * g - 2.0f * g * cos_theta, 1.5f)) * (M_1_PI_F * 0.25f);
};

Below are some plots of the shape as a function of g, along with the python script to make the plots them. The Henyey-Greenstein dates back to 1941 in a paper analyzing astronomical scattering of dust. The distribution is not profoundly magic, but it has some roots in science and works nicely, with one parameter g from -1 through 0 to +1 reproducing backwards scattering to isotropic to forward scattering.

If you are interested, here are a number of links with a wide variety of depth and focus. Plots are below that.

http://www.oceanopticsbook.info/view/scattering/the_henyeygreenstein_phase_function

http://adsabs.harvard.edu/abs/1941ApJ....93...70H

http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1941ApJ....93...70H&data_type=PDF_HIGH&whole_paper=YES&type=PRINTER&filetype=.pdf

https://www.astro.umd.edu/~jph/HG_note.pdf

http://omlc.org/education/ece532/class3/hg.html

https://en.wikipedia.org/wiki/Monte_Carlo_method_for_photon_transport

http://articles.adsabs.harvard.edu/cgi-bin/nph-iarticle_query?1985A%26A...146...67H&defaultprint=YES&filetype=.pdf

https://www.cs.dartmouth.edu/~wjarosz/publications/dissertation/chapter4.pdf

http://web.cs.wpi.edu/~emmanuel/courses/cs563/S07/talks/Paulo_volumeScattering_wk10_p1.pdf

The function is already available in OSL. This should not be a surprise since it is so fundamental to rendering and scattering simulations of all varieties! This is from v1.7 of the Open Shading Language 1.7 Language Specification - which is outdated. A new and/or better link to 1.8 or whatever is newest is appreciated!

def pu(cos_theta, g):

    top = oneoverfourpi * (1. - g**2)
    bot = (1 + g**2 - 2*g*cos_theta)**1.5

    return top / bot

import numpy as np
import matplotlib.pyplot as plt

halfpi, pi, twopi, fourpi = [f*np.pi for f in [0.5, 1.0, 2.0, 4.0]]
oneoverfourpi = 1. / fourpi

degs, rads = 180/pi, pi/180

theta      = np.linspace(0, pi, 200)
cos_theta, sin_theta = np.cos(theta), np.sin(theta)

dtheta     = theta[1] - theta[0]

g          = np.arange(0.9, -1, -0.15)[:, None]

Pu         = pu(cos_theta, g)

plt.figure()
plt.subplot(3, 1, 1)
for thing in Pu:
    plt.plot(degs*theta, thing)

plt.subplot(3, 1, 2)
for gval, thing in zip(g, Pu):

    if np.abs(gval) < 1E-05:
        plt.plot(degs*theta, thing, '--k')
    else:
        plt.plot(degs*theta, thing)
plt.yscale('log')

plt.subplot(3, 1, 3)
for thing in Pu:
    plt.plot(degs*theta, twopi * sin_theta * dtheta * thing)
plt.show()


You cannot set the origin for empties. They're just little more than an origin and a world matrix.
For Blender 2.82 and later:
In the header of the 3D View there is a drop down labelled Options. Within you can choose that the transform shall only affect the Parents. Select the empty, press SHIFT+S and click Selection to Cursor to move it to the cursor's location. The location of the children will not be modified.

Note that the "affect only" option already exists since Blender 2.81, but the Snap transform didn't support it before commit 3ba5461af0c8b1273d3daf87d050c24a690273be.
For Blender prior to 2.82:
If you want to have the empty at the 3D cursor's location, you will have to position the empty there. It is necessary to remove the parent relationship first ALT+P and add it back afterwards CTRL+P if you don't want the parented objects to move with the empty. With the empty selected, press SHIFT+S and click Selection to Cursor to move it to the cursor's location.


There is no checkbox called "Dump framebuffer to disk", so you will have to use a script for this.

The core idea from that old forum thread is good, call bge.render.makeScreenshot() every frame with different filenames.

In the Text Editor, make a script file with a name like "screenshooter.py". That script will handle a frame counter, will make a filename based on that frame counter, and will give that filename to makeScreenshot().

from bge import render

counter = 0

def shoot():
    global counter

    filename = "bge_rendered/frame_" + str(counter).zfill(8) + ".png"
    print("Saving to " + filename)
    render.makeScreenshot(filename)

    counter += 1

In the Logic Editor make:

an Always sensor, with "Activate TRUE level triggering".
a Python controller, set to Module execution method, executing "screenshooter.shoot".
the two connected together.

In the render settings, disable "Use Frame Rate" to disable frame-skipping, otherwise there will be a lot of duplicated frames and jumps in the animation.


Blender Internal and Cycles are two different render engines, each of them has it's own materials and shaders.Objects that have BI materials will not render correctly in another render engine, that includes Cycles, so you need to reassign Cycles materials to your objects.
Your objects unwrap has nothing to do with what render engine you are using, so the good news is that you don't need to unwrap again.


How to change the Blender Console number of spaces used for indentation?

The indent is 4 spaces.

The console indent is 4 spaces.

>>> C.space_data.prompt
'>>> '

The prompt is ">>> " notice the space at the end, you are counting it as being in indent.  Can select console code and choose "Copy as script" effectively chopping length of prompt from start of each line.

Copy from image pasted here

import bpy
from bpy import data as D
from bpy import context as C
from mathutils import *
from math import *

#~ PYTHON INTERACTIVE CONSOLE 3.8.2 (default, Apr  2 2020, 03:24:36)  [GCC 7.5.0]
#~
#~ Builtin Modules:       bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bpy.utils, bgl, blf, mathutils
#~ Convenience Imports:   from mathutils import *; from math import *
#~ Convenience Variables: C = bpy.context, D = bpy.data
#~
for i in range(20):
    print(i)

Notice it copies all the console buffer and adds the imports, not just the selection.

Would be simple enough to use standard copy and chop 4 from each line of the clipboard.

>>> for line in C.window_manager.clipboard.split("\n"):
...     line[4:]
...
'for i in range(20):'
'    print(i)'

>>>


Well one way to do this is by using only creases and disabling the edge split modifier (This will work if you use the multiresolution modifier).


How can I render with RenderMan in the GPU, in Blender 2.76?

Renderman currently doesn't have GPU support:

Does Non-Commercial RenderMan support GPU's?
The current version of Non-Commercial RenderMan is a multi-threaded software application that does not use GPU's due to the current fluidity of graphics hardware and supporting software standards. However GPU's are an important aspect of the future direction of rendering that Pixar is currently researching, some of which has already demonstrated in public. As the technology matures for comprehensive production usage we will reveal more in future.

EDIT For the new Renderman 21, there is a separate Technical FAQ which adds the sentence

For the first time, RenderMan 21 introduces GPU accelerated denoising, and as GPU's mature for comprehensive production usage, we will reveal more in future.


In Edit Mode. Press T to bring up Tools Menu on the left hand side. Click on 'Option' tab and see if X-Mirror is check. Simply uncheck it.


Your CPU is too hot!

Why ?
When you ask blender to render, the CPU (and/or GPU) is used at it's maximum (100% usage at max frequency). This produces heat.

What can you do?
Check the air flow.
Global case airflow

The air has to be able to come in and out (clean the grids and case fans for dust) and through (move cables and anything that is in the path).

CPU Air Flow

Make sure the fan is turning and clean the dust in the fan and heat sink.

You can buy a bigger/better CPU fan/heat sink.
You can use watercooling if it's not enough. (technical and expensive but powerful)


'Ctrl+S' doesn't save modified textures ==> lost hours of work

You can use application handlers, specifically save_pre handler. When you're saving the file, the handler kicks in and allows to execute whatever you want before saving the file.
The following demo saves all modified images when you are hitting save, automatically:
import bpy
from bpy.app.handlers import persistent

@persistent
def save_mod_images(dummy):
    """ Save all modified images """
    if any(i.is_dirty for i in bpy.data.images):
        bpy.ops.image.save_all_modified()

@persistent
def pack_dirty_images(dummy):
    """ Pack all modified images """
    for i in bpy.data.images:
        if i.is_dirty:
            i.pack()
            print("Packed:", i.name)

bpy.app.handlers.save_pre.append(save_mod_images)
#bpy.app.handlers.save_pre.append(pack_dirty_images)

Copy-paste the script into the text editor and run it using the play button, this is going to add the handler to the current Blender session. If you'd like to pack all unsaved images when saving the file, just un-comment bpy.app.handlers.save_pre.append(pack_dirty_images).

image-data-linter.py
For simplicity, this can be easily turned into an Add-on. Add the usual bl_info dict, register and unregister functions and make sure to remove the handler when the add-on gets un-registered, further reading: How to create a custom UI?

Added both options to the Add-on preferences so they can be easily turned on or off.
# ##### BEGIN GPL LICENSE BLOCK #####
#
#  This program is free software; you can redistribute it and/or
#  modify it under the terms of the GNU General Public License
#  as published by the Free Software Foundation; either version 2
#  of the License, or (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program; if not, write to the Free Software Foundation,
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####

bl_info = {
    "name": "Image Data Linter",
    "description": "Save or pack all modified images when saving the file",
    "author": "brockmann",
    "version": (0, 0, 1),
    "blender": (2, 80, 0),
    "location": "",
    "category": "Development"
}

import bpy
from bpy.app.handlers import persistent

class ImageDataLinterPrefs(bpy.types.AddonPreferences):

    bl_idname = __name__

    save: bpy.props.BoolProperty(
        name="Save modified Images",
        description="Save modified images when saving the blend",
        default=True)

    pack: bpy.props.BoolProperty(
        name="Pack un-saved Images",
        description="Pack un-saved images when saving the blend",
        default=False)

    def draw(self, context):
        layout = self.layout
        layout.prop(self, "save", toggle=True, icon="DISK_DRIVE")
        layout.prop(self, "pack", toggle=True, icon="PACKAGE")
        layout.separator()

@persistent
def pack_dirty_images(dummy):
    if bpy.context.preferences.addons[__name__].preferences.pack:
        for i in bpy.data.images:
            if i.is_dirty:
                i.pack()
                print("Packed:", i.name)

@persistent
def save_mod_images(dummy):
    if bpy.context.preferences.addons[__name__].preferences.save:
        """ Save all modified images """
        if any(i.is_dirty for i in bpy.data.images):
            bpy.ops.image.save_all_modified()

def register():
    bpy.utils.register_class(ImageDataLinterPrefs)
    bpy.app.handlers.save_pre.append(save_mod_images)
    bpy.app.handlers.save_pre.append(pack_dirty_images)

def unregister():
    bpy.app.handlers.save_pre.remove(pack_dirty_images)
    bpy.app.handlers.save_pre.remove(save_mod_images)
    bpy.utils.unregister_class(ImageDataLinterPrefs)

if __name__ == "__main__":
    register()

Save the script as image-data-linter.py, go to the User Preferences > Add-ons > Install. Further reading: How to install an Add-on


Everything is white in texture and material mode

To Anyone who has this same problem, check your world ambient color. Mine got set to white somehow (I rarely use that tab) and after setting it to black everything went back to normal.


How to use Texture Paint on two and more different objects at the same time

This is actually a fairly simple process:

Create your two separate objects
Join them together as a single object using CTRLJ
UV unwrap them so that their UVs don't overlap
Paint your textures
Select the mesh for one object while in edit mode and press P to separate it back into another object.

You can keep a copy of the join mesh around as well if you want to go back and tweak your textures.


Try image sequence import addon. This makes animated images appear on plane. See this video link here.
https://m.youtube.com/watch?v=3UOywRFIpLM&feature=youtu.be

Updated addon link: https://github.com/vicentecarro/ImageSequenceAsPlanes

First create image sequence from a video clip. With that addon, import Image sequence and all animated images appear on plane. Subdivide the plane like a lattice. Alternatively use a knife to divide plane's face. When you move vertrice or reshape the plane, the animated image distorts, useful for morphing your way. Hope that helps.

If unsatisfied, try DragonBones, a free open source software.


It's probably not optimal but I found a method that works:

multi_user_list = []

for obj in bpy.data.objects:
    if obj.layers[0]:
        if obj.data.users > 1:
            multi_user_list.append(obj)

group_list = []
group = []

for obj in multi_user_list[:]:
    for ob in multi_user_list[:]:
        if obj.data == ob.data:

            group.append(ob.name)
            if ob in multi_user_list:
                multi_user_list.remove(ob)

    if group:
        group_list.append(group)
    group = []

print(group_list)


Advice on how to approach scene involving zooming down to atomic scale?

You will have to blend two shots together. Its most likely impossible to get the geometric level of detail at the atomic scale that will work for a macro shot. I would model the scene with the ruler, with some textures etc.

Then add some procedural textures for pits, scratches, etc. That way we can continue to zoom in without becoming pixellated.

Next model a completely different scene that is molecular in scale and have a zoom animation in both scenes that match up. Once your first scene gets close enough, start blending into the second screen. You could use the compositor, or maybe just a plane in scene 2 that has a texture of the rendered video from scene 1. As you get close in on scene 2, adjust the transparency of that image plane.

Good luck!


Create a wispy, foamy top? Like Hot Cocoa?

I made a quick render of what you described. Here I essentially have a whole lot of bubbles on the surface of a rectangle, which is basically what the froth is. You could increase the number, size, etc of the bubbles easily, my computer just can't handle more than this :)

To make the large bubbles, I made a single sphere, and colored it a semi-transparent brown color. Next I duplicated it a few times and used the random transform tool object>transform>randomize transform as seen here

Next I made one small sphere into a group and used the particle tool (great post on that here) to scatter them randomly across the surface. The post I mentioned show how to use the options to make the bubbles smaller, make more, etc.

I recognize that this doesn't look exactly like hot cocoa, but if you just color the bubbles a bit differently, adding some more white and a bit of dark brown it'll be pretty close.


Problems With Incredibly Noisy Renders In Cycles

Testing without materials attached may not be giving me the same results as you, but I have modified a couple of settings to generate this render:

I have increased your sun lighting somewhat and I added a spacey HDRI image as background, mostly so I could see what was going on inside the station. I then added a slight amount of clamping to direct and indirect. That render is at .10 and .05 respectively, I think. Smaller clamp amounts may have worked.... depends upon what you are going for.

HDRI from Blender Guru Pro Skies, not my work.

If this is moving in the direction you intend, I think some combination of clamping direct/indirect and working with the light paths -- https://www.blender.org/manual/render/cycles/optimizations/reducing_noise.html -- may get you where you want to go....

EDIT=====================

Sorry. I deleted your original file, so I downloaded again and made changes only to sun power settings and clamping to produce this:

I did not pack the space HDRI into the new blend file, as I believe it is copyright by Andrew Price in his Pro Skies.... so the second render was made without an HDRI in place.  Here's the modified file:

And just FYI: https://www.blendernation.com/2017/01/21/creating-looping-corridor/


How can I split a large face into nice even triangles?

@susu has a good suggestion in the comments which has worked well for me.

Remove the face so that we just have the outline of edges and vertices.
Subdivide some of the longer edges so that the vertices are roughly evenly spaced
Face -> Grid fill (with all vertices selected)
Face -> Triangulate faces

Result:


The instructions for installing the addon could be clearer.

The releases download page on github has several download options, the easy one is the uv_align_distribute.zip - download this and you can select the zip file after clicking Install Add-on From File... in blenders preferences.

If you download one of the other options or download the whole repo from the project page you get the whole repo and you will need to copy one folder out of it to your addon folder.

After unzipping the full repo download, copy the uv_align_distribute folder, into your addon folder, not the outer folder that will have -master or -3.0 in the name, but the inner folder that will be seen with the docs and tests folders. The best location will be in scripts/addons in your user config location. If you want to, you could copy it into the blender install with the existing addons.


It sounds like your having some sort of corruption with your binary (source). Change the settings of your import or reexporting the model should fix it.


You can set the active object with this command:
If len(bpy.context.selected_objects):
    bpy.context.view_layer.objects.active = bpy.context.selected_objects[0]

The active object is now reachable by:
active_obj = bpy.context.active_object


Why the Emission on Hair Particle System is disable?

You have to switch to Object Mode and Delete Edit, only after that, can you re-edit simulation properties again.


Use all Objects in a Group as Object input (Animation Nodes)

Lest say you have a list of n number of inputs objects, then your node tree will output n number of objects. So, you should create n number of empty objects using the Object Instancer Node, loop over the input objects and write the data of each iteration to one of the empty objects you created.

Lets use the node tree from the question you linked as a study case, the output object is a curve object, so we create 3D Curve typed empty objects using the Object Instancer Node, loop over the inputs objects and the empty objects, do what ever you want inside the loop and write the data into the empty object:

Notice that the main part of the node tree is almost left intact. It is particularly helpful to output the new objects, and since they are used as iterators, we can use the Use X as output option in the loop advanced node settings:

Had my output data be meshes, I would have choose mesh objects in the Object Instancer Node. You get the point.


Can I use Blender in a slow-motion video workflow?

You can import the movie into Blender and then export it with a different framerate using this technique:
1. Import the movie
Open up a "Video Sequence Editor" in a fresh Blender-scene. You should see something like  below:

Click on Add > Movie and select the movie you want to convert. Make sure that the Blend-option (open the panel on the right with N) is set to Replace and Start Frame is 1 (see picture).
2. Export the movie
Then you go to Render Settings:

Make sure that you have selected the correct Resolution (the one of the video) and the slider is at 100%. Set the End Frame to the same as the Length of your video (seen in the picture 1 below Start Frame). Select the correct Frame Rate (24?) and the right format (I selected AVI Raw but it can be everything you like). Hit that Animation-button or Press Strg+F12 to render.
If you have any questions, feel free to ask.


Blender 2.8 How do I fix the gloss on this mesh?

Some of the point:

You can change the strength of normal by using normal map node
The second wood of your picture seems to have a clearcoat on it, there is an attribute to do that effect too
The roughness change how light reflective

Try it your self, and most of the time you will get specular or roughness or smoothness(?) image map as well. You can use those images as input


How to get mouse position in a window with Python?

Here is a script from the blender wiki.

Go to the Invoke versus execute section for finding this code:

#----------------------------------------------------------
# File invoke.py
# from API documentation
#----------------------------------------------------------

import bpy

class SimpleMouseOperator(bpy.types.Operator):
    """ This operator shows the mouse location,
        this string is used for the tooltip and API docs
    """
    bl_idname = "wm.mouse_position"
    bl_label = "Mouse location"

    x = bpy.props.IntProperty()
    y = bpy.props.IntProperty()

    def execute(self, context):
        # rather then printing, use the report function,
        # this way the message appears in the header,
        self.report({'INFO'}, "Mouse coords are %d %d" % (self.x, self.y))
        return {'FINISHED'}

    def invoke(self, context, event):
        self.x = event.mouse_x
        self.y = event.mouse_y
        return self.execute(context)

#
#    Panel in tools region
#
class MousePanel(bpy.types.Panel):
    bl_label = "Mouse"
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOL_PROPS"

    def draw(self, context):
        self.layout.operator("wm.mouse_position")

#
#   Registration
#   Not really necessary to register the class, because this happens
#   automatically when the module is registered. OTOH, it does not hurt either.
bpy.utils.register_class(SimpleMouseOperator)
bpy.utils.register_module(__name__)

# Automatically display mouse position on startup
bpy.ops.wm.mouse_position('INVOKE_DEFAULT')

# Another test call, this time call execute() directly with pre-defined settings.
#bpy.ops.wm.mouse_position('EXEC_DEFAULT', x=20, y=66)

Now if you want to know the position of your 3D view, I made a quick research. With this you can find the area of your 3D View:

import bpy

for area in bpy.context.screen.areas:
    if area.type=='VIEW_3D':
        X= area.x
        Y= area.y
        WIDTH=area.width
        HEIGHT=area.height

        print(X,Y,WIDTH,HEIGHT)


what does pink mean when I try to append a material?

Pink means that the image texture used is not available.
Either it does not exist in the hard drive, or it is in a folder that is not accessible, or has been renamed, or it could mean that the image cannot be mapped the way it is set up on the material.
By default, Blender does not store images used as part of the file, it just uses a reference to the path in the computer where such images are saved.
If you want to save images as part of the .blend file, you need to pack them.


Absolute black shadow takes forever to render with custom shadow catcher node

I managed to fix the issue with this node set. Basically it says "just don't render this area if camera rays hit it" or something like that. I don't know I am bad at answering questions but if you have the same issue, try replicating this nodeset and maybe it will help you. It helped in my situation at least.


Cancel Gamma Correction when importing Objects

I did find a solution to my problem. It isn't the most optimal but it will sure help, if any one have the same issue.

0 . Import your object

Go to the “Scene” tab
Go to “Color Management”

In “Display” change from “sRGB” to “None”

Go to the “Render” tab
Go to “Bake”

In “Bake Mode” change from “Full Render” to “Texture”

With your mesh selected go in “Edit Mode” and Unwrap your
Object if it’s not already done. Here I use Smart UV Project to be fast.
Then Bake and save the image result with F3 or on the menu.

Go back to the “Scene” tab
Change “None” to “sRGB”

Go the “Material” tab
Remove all material except one (doesn’t really matter which one is it)

Go to the “Texture” tab, add a new texture with “Image or Movie” type
Select your Bake result image (it’s already in Blender so you don’t have import it)

You’re done. I didn’t find anything else to avoid all that process right now. It’s fine for me because I also use the baked image as an IDmap.

Note: On my viewport the material show the exact colors because I selected “Shadeless” in the Material proprieties.

Hope it will help.


Efficient empty volume rendering in Cycles

It's actually quite similar in Cycles and seems to speed up renderings as well (which indicates there is still room for optimization in Cycles volume rendering).

So with a basic setup:

You get result (~16 seconds):

Now add a Shader Mix Node and use Density as a Mix factor:

With current Cycles algorithms you can leave the second slot unconnected - it just tells Cycles to compute volume rays for areas that are masked by density with a value greater than 0.5 (screen shows the reverse of that, but it's the same if you connect Volume shader in second slot and use converter math node 'Greather than', which would be more intuitive, I guess).

Now the result of this little tweak:

Time almost halves! But there are very crisp edges - you can tweak that with changing the converter math node value to a very low number (which would tell cycles to leave out only area with density values close to zero:

And the result:

Still reasonable improvement over the original render time and nearly the same visual effect.


While the info window can be helpful, the list of commands it shows is not a complete list, some operators are intentionally filtered out because they don't relate to editing your data (panning the view for example or scrolling the text window).

One example is renaming an object, changing the name in the 3Dview properties sidebar or object properties shows in the info window but renaming in the outliner doesn't show.

With opening/reloading blend files, the info window is cleared after opening a blend file, so the open command would be cleared out. If you refer to opening text files in python, any task using basic python functions isn't going to show in the info window, a call to a bpy based function would need to be made for blender to echo it into the info window.

EDIT:
You can see most if not all of the missing actions by setting

bpy.app.debug_wm = True

Note that this will give a lot of extra entries, including zooming, typing in the console, scrolling up and down....


Is it possible to parent bones between armatures?

There's a method of constraining that works especially well with bones, and avoids unwanted offsets caused by double transforms.

go to pose mode, select the child bone, add a "copy transform" constraint, set it to Parent armature, parent bone, local space both.
The same for the others child bones.

Consider that you can even animate the influence of the constraints.

Another way is using drivers, which are more powerful (you can program curves of influence and many others complex behaviours) but more difficult to explain in a few words; search for info about them, even in this site.


If the image gets distorted and is smaller at the end than at the beginning the transparent background appears. To fix this I just added the background where there was none..


Can't do subtraction with Boolean modifier

Your mesh has to be non-manifold. I had troubles with this as well. Removing doubles it typically a good way to start achieving non-manifoldness. There are enough tutorials out there and somewhere in the documentation there's a hint, that your volume has to be non-manifold for the boolean stuff to work properly.


FBX Export is not working (KeyError: ((nan, nan), 2)

Don't use FBX format when you are able to avoid it. Its license makes it difficult to support in open source software so it is not supported well in Blender. Use alternatives like Collada, or Alembic instead when possible.


Can I use the timeline to erase keyframes?

For 2.8 and newer:

This is now possible. Keys are shown as diamonds, like in the dope sheet. Mark them and hit X to delete them.

For 2.79 and earlier:

No; not in the timeline.
This is done in the Dope Sheet.

Hit B to select with a rectangle (or any other selection
method).
Hit X to delete selected keyframes.