How to change a material texture per object?

So, I ended up with a script which clones all the materials, both cycles and blender internal (all the materials in the scene render ok in both engines). To set image id I used custom properties. The actual image id calculation seems complicated, but there are tiles in the scene which are parented to some hosts, and they all are duplicated within their respective parents, so it's much easier to handle only parents' properties instead of each child. When resetting materials back it just clears all the extra references, so blender will kill those orphans itself on save / revert.

Here is the script, in case somebody will face the same problem.

#----- scene-tools.py
'''Some tools to automate this very scene tasks.
   @author (c) LV A.S. Mechanic. Kharkov city
'''
import bpy
import glob

# base names of objects of interest
TILE_NAMES = ('tileCA','tileCB','tileCC')

IMAGE_PATH = r'//textures\img'          # blender notation
IMAGE_MASK = 'img_*.jpg'

PROP_ID_PARENT = 'host_id'             # custom property name for image Id calculation
PROP_ID_OBJECT = 'image_id'

# (Cycles)
TILE_MAT_NAME = 'tile-face'             # tile material (cycles)
TILE_MAT_SLOT = 0                       # material slot id to work with
NODE_IMG_NAME = 'ImgTex'                # image texture node name in the material
IMG_NAME = 'img_'                       # image base name

# (Blender Internal)
TILE_MAT_NAME_BI = ('tile-face-bi')     # tile material (BI)
NODE_MAT_BI = 'MatBi'                   # BI material input node name
TILE_TEX_SLOT_BI = 0                    # texture slot id within Bi matertial to work with

def get_my_tiles():
    ''' this returns a list of tuples for all the tiles in the scene.
        (0 - object; 1 - parent id; 2 - object id; 3 - real image id)
    '''
    _res = []
    scn = bpy.context.scene
    _maxs = {}   # here we store max obj_id within parent_id
    _pids = []   # parents' ids
    for obj in scn.objects:
        if (obj.type == 'MESH'):
            for _base in TILE_NAMES:
                if (obj.name.startswith(_base)):
                    # create descriptor and get everything (no real id yet)
                    try:
                        _pid = int(obj.parent[PROP_ID_PARENT])
                    except:
                        _pid = 0
                    try:
                        _oid = int(obj[PROP_ID_OBJECT])
                    except:
                        _oid = 0
                    # update maximums
                    _maxv = _maxs.get(_pid)
                    _maxs[_pid] = (_oid if _maxv == None else max(_maxv, _oid))
                    # update pids
                    if not (_pid in _pids): _pids.append(_pid)
                    # store values
                    _d = tuple((obj,_pid,_oid))
                    _res.append(_d)
                    #print('found object: {}'.format(obj.name))
                    break
    # now we calculate the real image id for each object
    # get sorted _pids
    _pids.sort()
    # replace _maxs values with start offset
    _offset = 0
    for _pid in _pids:
        _maxv = _maxs[_pid]
        _maxs[_pid] = _offset
        _offset += _maxv + 1
    # and calc real id with id offsets
    _res1 = []
    for _d in _res:
        _res1.append(_d+(_d[2]+_maxs[_d[1]],))
    '''
    print("--------------- final tiles")
    _n = 0
    for _d in _res1:
        print(_n," : (", _d[0], _d[1], _d[2], _d[3], ")")
        _n += 1
    '''
    return _res1

def error_stop(msg):
    ''' show message and exit with error '''
    raise Exception(msg)

def get_filenames(path, mask):
    ''' returns sorted list of files matching the mask in given path '''
    _path = bpy.path.abspath(path)
    #print('path: ', _path)
    _files = glob.glob(_path+"\\"+mask)
    if len(_files)>0:
        _files.sort()
    return _files

def name_with_id(name, id):
    ''' composes indexed name with a base name and an id (name.00N)'''
    return name + "." + "{:03d}".format(id)

def reset_tile_materials():
    """ Resets materials to defaults for all the tiles in the scene """
    # first find the defaults
    mat_default = bpy.data.materials[TILE_MAT_NAME]
    if (mat_default is None):
        error_stop('Material {} not found!'.format(TILE_MAT_NAME))
    mat_default_bi = bpy.data.materials[TILE_MAT_NAME_BI]
    if (mat_default_bi is None):
        error_stop('Material (Bi) {} not found!'.format(TILE_MAT_NAME_BI))
    tex_default = mat_default_bi.texture_slots[TILE_TEX_SLOT_BI].texture
    img_default = tex_default.image
    # get all the tiles
    my_tiles = get_my_tiles()
    if (len(my_tiles) == 0):
        print('Tiles not found. There is nothing to do.')
        return
    # set default material for all
    print('Setting defaults for {} found objects'.format(len(my_tiles)))
    for _d in my_tiles:
        obj = _d[0]
        # reset all possible references
        mat = obj.material_slots[TILE_MAT_SLOT].material
        mat_bi = mat.node_tree.nodes[NODE_MAT_BI].material
        tex = mat_bi.texture_slots[TILE_TEX_SLOT_BI].texture
        tex.image = img_default
        mat_bi.texture_slots[TILE_TEX_SLOT_BI].texture = tex_default
        mat.node_tree.nodes[NODE_MAT_BI].material = mat_default_bi
        mat.node_tree.nodes[NODE_IMG_NAME].image = img_default
        obj.material_slots[TILE_MAT_SLOT].material = mat_default
    print('All tile materials'' defaults set.')

def find_or_create_image(name, img_ref, filepath):
    ''' it finds the image by name. (if not found it's created by copying img_ref),
    then given path will be set as the image filepath '''
    img = bpy.data.images.get(name)
    if img == None:
        img = img_ref.copy()
        img.name = name
    img.filepath = filepath
    return img

def find_or_create_material(base_name, base_name_bi, id, mat_ref, mat_ref_bi):
    ''' it finds the material by name. (if not found ot's created by copying mat_ref),
    then the image will be set as the image material's image '''
    # image is already ok, hust find it
    img = bpy.data.images[name_with_id(IMG_NAME, id)]
    # first handle Bi material
    tex_ref = mat_ref_bi.texture_slots[TILE_TEX_SLOT_BI].texture
    # find or create a texture
    tex = bpy.data.textures.get(name_with_id(base_name_bi, id))
    if tex == None:
        tex = tex_ref.copy()
        tex.name = name_with_id(base_name_bi, id)
    # put needed image to the new texture
    tex.image = img
    # now find bi material
    mat_bi = bpy.data.materials.get(name_with_id(base_name_bi, id))
    if mat_bi == None:
        mat_bi = mat_ref_bi.copy()
        mat_bi.name = name_with_id(base_name_bi, id)
    # set new texture
    mat_bi.texture_slots[TILE_TEX_SLOT_BI].texture = tex
    # now cycles
    mat = bpy.data.materials.get(name_with_id(base_name, id))
    if mat == None:
        mat = mat_ref.copy()
        mat.name = name_with_id(base_name, id)
    node = mat.node_tree.nodes[NODE_IMG_NAME]
    node.image = bpy.data.images[name_with_id(IMG_NAME, id)]
    # and set bi material to Bi node
    node_bi = mat.node_tree.nodes[NODE_MAT_BI]
    node_bi.material = mat_bi
    return mat

def create_tile_materials():
    ''' this creates a bunch of materials for the tiles, and sets images from the img directory '''
    # first get all the image file names available
    print("Getting available images' names")
    img_files = get_filenames(IMAGE_PATH, IMAGE_MASK)
    if (len(img_files) == 0):
        error_stop('No imahes found in '+IMAGE_PATH)
    print("Found {} images to process".format(len(img_files)))
    # find all the tiles
    my_tiles = get_my_tiles()
    if (len(my_tiles) == 0):
        print('Tiles not found. There is nothing to do.')
        return
    # count images needed (with max image id)
    _max_id = 0
    for _d in my_tiles: _max_id = max(_max_id, _d[3])
    print("It's needed {} images for {} objects".format(_max_id + 1, len(my_tiles)))
    if (len(img_files) < (_max_id + 1)):
        error_stop("There is not enough images ({} of {})!".format(len(img_files), _max_id + 1))
    # create images copying from the orignial one
    ids = []
    for _d in my_tiles:
        _id = _d[3]
        if not _id in ids:
            ids.append(_id)
    ids.sort()
    # find the original image to copy
    mat_ref = bpy.data.materials[TILE_MAT_NAME]
    img_ref = mat_ref.node_tree.nodes[NODE_IMG_NAME].image
    # Bi
    mat_ref_bi = bpy.data.materials[TILE_MAT_NAME_BI]
    # actual creation
    for id in ids:
        find_or_create_image(name_with_id(IMG_NAME, id), img_ref, img_files[id])
    # and materials creation
    for id in ids:
        #base_name, base_name_bi, id, mat_ref, mat_ref_bi):
        find_or_create_material(TILE_MAT_NAME, TILE_MAT_NAME_BI, id, mat_ref, mat_ref_bi)
    # assigning materials to the objects
    for _d in my_tiles:
        obj = _d[0]
        id = _d[3]
        # cycles
        mat = bpy.data.materials[name_with_id(TILE_MAT_NAME, id)]
        obj.material_slots[TILE_MAT_SLOT].material = mat
    print("Materials created and assigned to the objects.")

class CreateTileMaterialsOperator(bpy.types.Operator):
    """Creates new materials with different images for all the tiles in the scene"""
    bl_idname = "scene.my_create_tile_materials"
    bl_label = "Create tile materials"

    def execute(self, context):
        create_tile_materials()
        return {'FINISHED'}

class ResetTileMaterialsOperator(bpy.types.Operator):
    """ Resets materials to defaults for all the tiles in the scene """
    bl_idname = "scene.my_reset_tile_materials"
    bl_label = "Reset tile materials"

    def execute(self, context):
        reset_tile_materials()
        return {'FINISHED'}

class MySceneToolsPanel(bpy.types.Panel):
    """Creates a Panel in the Scene properties window"""
    bl_label = "Scene tools"
    bl_idname = "SCENE_PT_MySceneTools"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

    def draw(self, context):
        layout = self.layout

        row = layout.row()
        row.operator("scene.my_create_tile_materials")

        row = layout.row()
        row.operator("scene.my_reset_tile_materials")

def register():
    bpy.utils.register_class(ResetTileMaterialsOperator)
    bpy.utils.register_class(CreateTileMaterialsOperator)
    bpy.utils.register_class(MySceneToolsPanel)

def unregister():
    bpy.utils.unregister_class(ResetTileMaterialsOperator)
    bpy.utils.unregister_class(CreateTileMaterialsOperator)
    bpy.utils.unregister_class(MySceneToolsPanel)

register()
#-----/scene-tools.py


Spreading micromirrors evenly across surface of a helmet model (Particle effect, procedural, instancing)

You can use the Tissue addon.

The addon will tesselate a given shape on a mesh.

Select a tile, shift select your mesh, and use 'tesselate':

From that, if you want to modify the original mesh, you can come back to the tesselation and refresh it.


Is there a workaround for error: "Could not write image: Too many open files"?

The workaroud that I have developed is as follows.

Render my scene.
View>Toggle Fullscreen Area
View>View Fit
Zoom in to a level where the pixels in the image are larger than the pixels of your display.
Take screen captures of each part of the image. (On Windows, Shipping Tool works well)
Stitch these together in an image editing software. I used Photomerge in Photoshop Elements.
Remove the border using a pixel color select tool and crop (in Photoshop Elements, the magic wand works well)
Resize your image to the original desired resolution. This is also an opportunity to touch up those nasty fireflies.
Save and share.

I hope this helps.


Why is for loop not working among the phrases listed in a line?

Semicolon cannot be used to separate 8. Compound statements — Python 3.8.6rc1 documentation. Only simple statement are allowed.
And the one-line for statement will probably confused with Comprehensions:
print(x) for x in range(20)
print(x); for x in range(20): pass

Why can't use semi-colon before for loop in Python? - Stack Overflow
bash - Python command line argument semicolon-loop error - Stack Overflow


Near/radar/ray/collision sensors refuse to work

Check the Actor option physics tab for your player so it can be detected by the Near and Radar sensors :


The orange lines say: this is an other object.
Select the upper object in object mode and see if I am right.


Problem with my rig, the feet stick to the ground

You need to select the bones called Bone.033.L and Bone.033.R and enable their Deform option (or assign these parts to the feet bones):

Actually you must have enabled the Deform option when you've parented, then you must have disabled it, it would have been better not to enable in the first place so that it was not taken into account during the parenting, IK controllers are not supposed to deform the mesh.
So it would be more logical to keep the Deform option disabled and assign this part to the foot bone.


It looks as though the resolution of your fluid simulation is too coarse. Generally, the fluid can only interact properly with the obstacles if the resolution is fine enough that the significant details of the obstacles can be detected.
The "Resolution Divisions" parameter in the domain settings gives you control over this.
The challenge is to make the number of divisions high enough that all obstacles and boundaries are correctly recognized but small enough to keep baking times and memory manageable...
The "multiple fluids"-issue you mention is only a problem if you need different fluids with different properties (e.g. honey and oil) in the same scene. As they can not really interact with each other this way, that's a somewhat advanced topic requiring quite a bit of trickery.
Fortunately, different bodies of the same fluid (as in your case) are not a problem for the simulation.


Use Python to join objects with hierarchy in outliner

If an object has no parent its parent attribute will be  None.  If it has children its len(ob.children) will be greater than 0.

Then we can select all top level obs as having no parent and children, select all their children, deselect non meshes and join

import bpy

context = bpy.context
scene = context.scene
# select scene objects that have no parent and children
obs = [o for o in scene.objects if not o.parent and len(o.children)]

for o in obs:
    # deselect all
    bpy.ops.object.select_all(action='DESELECT')
    scene.objects.active = o
    # select all children recursively
    bpy.ops.object.select_grouped(type='CHILDREN_RECURSIVE')
    # select parent too
    o.select = True
    for so in context.selected_objects:
        #deselect if not mesh
        if so.type != 'MESH':
            so.select = False
    #if there are some mesh children
    if len(context.selected_objects):
        scene.objects.active = context.selected_objects[0]
        # join them
        bpy.ops.object.join()


Problem when merging two elements with subdivision surface modifier

Your normals are flipped, select all in Edit Mode and press ShiftN.


Ray distance

You should increase your baking ray distance in order to capture the whole highpoly surface. Here's a comparison between different values (0 on the left, 0.1 on the right),

As said in the manual's page, the parameter controls

  [...] how far a point on another object can be away from the point on the active object. Only needed for Selected to Active.

Low margin settings helps us to see how some parts are missing in the image on the left. Once naked correctly dont' forget to set "non color data" and to connect to the vector socket in the shader.

Notice how the wrinkles and other detais are correctly transferred upon the low-poly mesh.


Selected item not outlined. Rotation gizmo shown instead

See on the left side of the viewport, where the toolbar is?

The one highlighted in blue is your selected tool, the scaling tool. Instead, select the very top one with the picture of the mouse. That is the selection tool, and it will give you the default behavior.


Extruding 3 circles from a uv sphere, general modeling advice

It's not clear why you're not satisfied with a subdivided cube, you can subdivide it 3 times with a Smoothness of 1:

Cut off 3 holes, make the holes circular with AltShiftS:

Extrude:


Scale & Rotate function not working in object mode

You probably enabled Transform Only Origins in the pivot point menu.
Just disable it, and everything is going to work as before :).

Click Only Origins to disable the function


Select the object in Object mode, then CtrlA > R (Apply rotation). This resets the rotation to 0° around all three axes (and thus aligns the local axes with the global axes) without rotating the object.


why are my meshes looking the way they do

It looks like overlapping faces to me, I've had this a lot of times. Try going to the tools bar in Edit Mode and look for "Remove Doubles". If it doesn't help, I don't know what to do. ¯\_(ツ)_/¯


BGE: Change Actuator's Track-to Time value using Python?

Try in Python:

cont.actuators["TrackToActuator"].time = any_value

Reference in API

Edit - example file by Mentalist (from link in comment):


resizing reference after giving specific dimensions

How about

create a plane
assign it a texture with your ref image (some UV mapping/unwrapping required to match the entire image)
Size it and use it in the background in Ortho view
repeat for front/side views with different pictures!


Problem while exporting .svg file in blender

The line that says "DLL load failed: %1 is not a valid Win32 application" gives a clue. You can find it documented at https://docs.blender.org/manual/en/dev/troubleshooting/python.html#mixed-python-libraries-dll-s

A simple fix is to delete or rename "C:\Users\\AppData\Roaming\Blender Foundation\Blender\2.79" and restart Blender. Then you will need to reinstall or re-enable all your addons.


oh ok, it's because your plane is a little bit twisted (i.e. not really flat), you should rebuilt your mesh with a clean mesh structure (quads and edge loops). If you want to let it like it is you can quickly fix the problem with a trick: select the mesh and click on Properties > Data > Normals > Auto Smooth


Problem with Mirror Modifier and allignement

I was doing the operation in the wrong order, the right one is:

Add mirror modifier
Cut the part that you want to be mirrored in 2 half
Delete the vertices of one half

I swapped the first 2 steps


How do I twist a curve (by rotating a segment)?

You're looking for the Tilt (Ctrl+T) function.


Looping through selected objects one at a time?

Essentially you need to create a list of objects based on the current selection that will not change if the selection changes.

import bpy
# store selection in list that in future will not change with selection
sel_objs = [obj for obj in bpy.context.selected_objects if obj.type == 'MESH']
bpy.ops.object.select_all(action='DESELECT')
if sel_objs:
    obj1 = sel_objs.pop()
    obj1.select = True
    bpy.context.scene.objects.active = obj1
while len(sel_objs) >= 1:
    obj2 = sel_objs.pop()
    obj2.select = True
    bpy.ops.object.join()


What is this ghost plane that appears with Multi-View Stereoscopy?

That is your convergence plane, e.g. where the L/R cameras converge. You can turn it off in the N menu under View->Stereoscopy->Plane


I just had the same isuue (and I'm a COMPLETE newbie to Blender). I just closed the program and opened it again, and then clicked "General" when the program opened again/ the window popped up. Now I've got all the options in the top left-hand corner.


This did not work the last time I tried it and I assume it still doesn't since you are asking.
The fastest way I know of to do this is to use the following script that someone posted on this site a while back for batch importing .obj files.  I modified it slightly to work with OSX but the necessary Windows code is just commented out.

import os
import bpy

# put the location to the folder where the objs are located here in this fashion
#path_to_obj_dir = os.path.join('C:\\', 'Users', 'YOUR_NAME', 'Desktop', 'OBJS') #<-WINDOWS_OS
path_to_obj_dir = bpy.path.abspath('//OBJ/')

# get list of all files in directory
file_list = sorted(os.listdir(path_to_obj_dir))

# get a list of files ending in 'obj'
obj_list = [item for item in file_list if item[-3:] == 'obj']

# loop through the strings in obj_list and add the files to the scene
for item in obj_list:
    path_to_file = os.path.join(path_to_obj_dir, item)
    bpy.ops.import_scene.obj(filepath = path_to_file)

It's supposed to look like the following.  It originally searched the directory where the .blend is but one of the changes I made has the script search for .obj files in a folder called OBJ.


Combine blender with other free programs to make films

The answer depends a little of what you want to do, but your workflow will usually be to generate video sequences in blender and the export them to the video format you need to edit them in hitfilm. You dont need to support 3D model in HitFilm since blender can export video sequences.

For an animation movie, you just render your sequence and use it as such in hitfilm.

For special effect, blender has a lot of tools that allows to integrate 3D objects in a video,camera tracking, green screen masking, ...
You will import a video in blender (a movie sequence) and add 3D item in the scene, using camera tracking to keep the orientation of the blender camera consistent with the "real life "camera used to make this sequence.
You will use masking to keep a part of your real life object to integrate it in a 3D scene.
You will use object tracking to identify the position of a real life element to attach a 3D object, like a gun to a hand.

Blender can do all of this so the choice of HitFilm won't restrict you for the 3D parts. Only for the editing/compositing part.


Yes: Go into Edit mode. Change your transform pivot type (top of screen) to Active. Select all the vertices to the left of and including the leftmost vertices of the left rectangle that is too narrow (all the vertices to the left). Now SHIFT+CLICK any one of the left-most vertices. This will make that vertex "active" (doing this again will deselect it--but you want it to be active).
You are going to scale all of those vertices along the X-axis towards that active vertex.
Type S, X, and drag the mouse a little to the left until you are satisfied with how thick the red region on the left in your image is.
This is not the only way to do what you are tying to do.  You also could have moved the cursor and used that as your transform registration point. You also could have used Proportional Editing.


is it possible to assign a filter to apply only on a specified material

Yes it is. Use material IDs to mask certain areas of the image.
I think the manual page gives you all the information and examples you need:

https://www.blender.org/manual/compositing/types/converter/id_mask.html


How do I close a object with the curve modifier applied to it?

Select one end of the curve, then the second end (holding SHIFT) and press F button. It'll connect two ends.

Now choose the merged end, select the handle and press S. Hold SHIFT to precisely match two ends of the mesh.

This may although change a shape of a curve a bit. You may use the other method, which leaves the curve's shape as it is. First select the mesh, enter the Edit Mode and enable the 'use the modifier while in edit mode' option.

Now scale the mesh along the desired axis to match its ends precisely.

You may also select the Curve, then go to the Curve Data header and check the Stretch and Bounds Clamp checkboxes in the Shape panel.


Objects with transparent texture not always show transparency in 3dview

Go to the object panel in the properties and check Transparency in Display tab for all object you want to see transparent. make sure that you have the correct object selected.


I don't have an elegant solution but it seems to work. Instead of fading a frame, I just use 8 or more strips with the same image sequence and move them each one frame to the right.

Each of the strips (except the bottom one) gets a transform strip. There I lower the opacity and move the strip a bit with the position fields.

You might need to use a gaussian blur strip, too.

It looks a bit better if the Blend type is set to 'add'


Link object from another blend file that is not positioned at origin

If you link an object, all properties of the object are in the file from wich you linked the object.(inclusive the position)If you want to keep your object movable, you can link the mesh(not the Mesh Object) of the object. Then create a new mesh-object, go to the object-Settings() of the object in the properties window and change the Mesh() to the linked Mesh.


How to "straighten" a rigged character's head

You can try rotating the bone to be straight and then use Ctrl + A and select rotation to apply the current rotation as default/rest position,


2.8

Edit Mode > Viewport Overlays > Normals.

In 2.8, the normals display settings are in the Viewport Overlays menu found in the top right of the 3D view by default, under Normals. Note that you must be in Edit Mode:


what is the easiest way to paint train railway?

If you have modeled the railway with athe combo of array+curve modifiers

I would suggest to assign materials before applying modifiers:

If you have already applied modifiers and you have a similar topology, you can select linked by pressing Ctrl+L while at least one face of each metal binaries is selected.

than assing those faces your metal material.

If you have non-linear topology, you'll have to try to mask selection using a combination of selection tools depending on your own topology:


Likely in your situation, you would want to render the dice as a foreground layer, the floor with shadow as a separate layer, and then turn on transparency in the render settings. That way you will get transparency where the black is now.

In Photoshop, you can add a background colour layer with a gradient and blend it into the floor layer easily. No need to render something simple like that.

Render Layer Settings

Please note that the blocks are on Layer 1 of the viewport and the Floor is on Layer 2. In the render layer panel, we select Scene Layers 1 and 2, and then assign Layer 1 to Render Layer 1 (named Blocks) and Layer 2 to Render Layer 2 (named Floor). Make sure the Combined pass is enabled for both layers.

Enable Transparency

In the UV Editor, select Render Result, then you'll have the option to switch between the 2 rendered layers. You can save out each layer as a PNG file (RGBA).

Output Blocks PNG (has alpha channel, though not obvious on SE page here)

Output Floor PNG

Bonus Tip
If you were finding you were re-rendering the image a lot, you could enable compositing and add File Output nodes to write the PNG's to disk as part of the render process. I can detail that process if need be.


Bad reflections on some faces in blender, good on substance painter

The problems were caused by some non-planar quads as lemon said in the comments. For some reason, the direction in which tris are generated on those specific quads is important. Maybe in the bake, they were autogenerated in the opposite direction. I think that's the case, because when I join vertices to make edges in the opposite direction of the shading, all is fixed.
The topology could be better and include some edge loops on the sides, so the non-planar quads don't even exists at all, but well, for the moment, it works!
Some pictures to improve understanding of this kinda problem. This is the model in solid and render pre-fix:

And this is post-fix:

After that, I just re-baked the lowpoly, and worked like a charm. Thanks, everyone!


How to give the "low poly" effect to a flat surface

You can bake the normals of the low poly object and use that as a texture on the plane.
With a Color Ramp you can change the colors of the normal map texture.

How to bake in Cycles


You can:

set a color of Glossy shader with values greater than 1.0 (click and type the numbers in)
add multiple Glossy shaders together with the Add node (this breaks the energy conservation and makes the object reflect more light than it receives)


As has been commented, a subdiv. approach might be:

To inset the top face of a cuboid evenly: I inset it with 'Even' checked..
Select the outside vertices and  GG slide the loop inwards
AltM merge the top vertices by distance.

CtrlR cut loop round the waist
Assign a Bevel modifier, by angle.
These are my Bevel settings, quite a common way to put in holding loops to contain  Catmull-Clark subdivision, in the right circumstances.

(You can, instead, use Bevel Weights, or introduce holding loops by hand)
Assign a Subdivision surface modifier, probably 1 level of Catmull-Clark will do

You can adjust the curvature by adjusting the one loop around the waist, (at least, to block the model out).


Problem rendering multiple smoke textures

It sounds like your materials or your textures or your caches are linked. You can check this by changing one setting for Smoke A and see if it applies for Smoke B. If so, then your issue is linking.

To get rid of the link, click the button with the number on it next to the material and texture. That should fix it.


Python, How to get pose bone to rotate with another pose bone from a different armature? Finding Rotational difference

Object.convert_space
As mentioned in previous answer there is a convenience method available on the object that converts space.
Rather than totally doing my head in by trying to make a rotation difference am going to

Convert source and target pose bone matrices to world space
Decompose them, ie get their world space location, rotation and scale parts.
Recompose the target world matrix to have rotation part of source
Convert this to pose space of target bone and set as matrix.

Test method.
import bpy
from mathutils import Matrix

def snap_rotation(source, target):
    Ms = source.id_data.convert_space(
        pose_bone=source,
        matrix=source.matrix,
        from_space='POSE',
        )
    Mt = target.id_data.convert_space(
        pose_bone=target,
        matrix=target.matrix,
        from_space='POSE',
        )

    _, q, _ = Ms.decompose()
    t, _, s = Mt.decompose()
    M = (
        Matrix.Translation(t) @
        q.to_matrix().to_4x4() @
        Matrix.Diagonal(s.to_4d())
        )
    target.matrix = target.id_data.convert_space(
        pose_bone=target,
        matrix=M,
        to_space='POSE',
        )

if __name__ == "__main__":
    context = bpy.context
    scene = context.scene
    snap_rotation(
        scene.objects["Armature"].pose.bones["Bone"],
        scene.objects["Armature.001"].pose.bones["Bone"]
    )


No you cannot, subsurf applies to the whole mesh evenly in all directions.
What you need is to learn how to use what are generally called "control loops".

Control loops are extra edges you add to your geometry to keep subdivision surface from rounding out parts of the mesh you don't want to be smooth or curved. You can add them using Ctrl + R

Also consider a simpler method using the screw modifier since you are creating a simple revolution geometry


The glitch appears to be a driver issue with Radeon GPUs, especially with recent Blender versions. It is, as of yet, unresolved.
Link to the Bug Ticket:
https://developer.blender.org/T83022


Path constraint with physics (rollercoaster)

One idea to do would be to manually animate the F-curve for the evaluation time of the curve to which your roller coaster is constrained to. You cannot manipulate the speed directly, since the F-curve is essentially a plot of distance versus time. But you can manipulate the slope at any point in this curve (slope being the speed of the object at that point on the curve). See the figure below for a reference.

The idea is to put key-frames on the F-curve at position where you expect the speed to change (like top of a hill). Then use the Beizer handle to change the slope of the curve to close to zero. Do not make it totally zero cause that would cause the roller coaster to momentarily stop and then start moving again (which is unnatural). Also note that this will automatically cause your coaster to accelerate or decelerate in the correct way, since the slope (i.e. the speed) also changes with time once you manipulate the Beizer handle.

I recently made a roller coaster and the snapshot of the F-curve is from there. I haven't found a way to do this through simulation (thinking about posting here for help). But this is the best I could do manually. You can see for yourself that at same places it still looks unnatural (e.g. at 1:30)


I am wondering the same thing too, but I found a solution in this discussion: here

After using help() or dir() in that PropertyGroup, you can find out some attributes inside this object as follow:

['__annotations__', '__dict__', '__doc__', '__module__', '__weakref__', 'bl_rna', 'name', 'rna_type' , "SOMETHING", "YOU", "DEFINED"]

Depend on what version of blender you are using, you can iterate these attributes to get what you defined.

For Blender 2.8, since the APIs forced developer to use annotation instead, you can find all attributes(as a dict) you defined in bpy.some.where.thePropertiesGroup.__annotations__ without those inherited attribute from PropertyGroup.

If you want to get those attribute, you should use built-in getattr() method as following:

for key in propsgroup.__annotations__.keys():
    the_value = getattr(propsgroup, key)


Boolean operation with script produces error which requires keyboard interrupt

From TLousky:

  (paraphrased) The variable yy is at the wrong indent level, so it never gets incremented. Thus your inner loop runs until you interrupt it.

Use a print statement within each loop to print out your counters and find out when it's failing.

I suspect that it's failing on the first loop because although bpy.data.objects['Cylinder.005'].select = True selects the object, it neither guarantees that no other objects are also selected, nor does it set the object to active.

Use bpy.context.scene.objects.active = bpy.data.objects["Cube"] to activate the object you want to work on (FYI it might not display correctly in the viewport, even when it's working correctly). Only one object can ever be 'active' at a time, so you can also look in bpy.context.scene.objects.active to find out what (if anything) is already active.

Also use bpy.context.selected_objects check to see if any other objects are selected, to make sure none of them are interfering with your boolean. (I believe there's a method that just deselects everything, so you don't have to write your own loop to set False on every object in the scene).


When Blender model is exported, it looks completely different

This is an inverted normals problem. Go into edit mode, select all, and Mesh -> Normals -> Recalculate Outside, and I hope that’ll fix it.


How to delete isolated shader nodes from script?

Remove unlinked nodes.
Re "totally isolated" nodes ie no links in no links out
Go thru all links and add the to and from nodes to the linked node set. The unlinked nodes is the difference between all nodes and linked nodes.
import bpy

context = bpy.context
ob = context.object
mat = ob.active_material
#mat = bpy.data.materials.get("Foo") # material Foo
assert (mat is not None and mat.use_nodes), "No material or not node based"
linked_nodes = set()

for link in mat.node_tree.links:
    linked_nodes.add(link.from_node)
    linked_nodes.add(link.to_node)

unlinked_nodes = set(mat.node_tree.nodes) - linked_nodes
while unlinked_nodes:
    mat.node_tree.nodes.remove(unlinked_nodes.pop())


Use Shrinkwrap > method Project / Negative / Offset 0.01

Another try to flatten is to change camera Focal Length.
Example - from original 50 to 180 mm.


How can I align my points/models rotation along the model surface

add a sphere and a cone to your scene.

add geometry node tree to your sphere

add this node tree:

adjust size of cone in edit mode

result


You can select in edit mode all the lower edge loops, extrude them and proportionally move them to the edges of the hexagon. Then use snap to edges so they adjust exactly to your sides.


Solution to this problem was to set these settings

And then when you press R(rotate) and then X > it will set rotation to global X axis but then X again and it will set to local one.


How to create a spaceship and force field transition effect

A sci-fi energy shield (force shield, force barrier VFX) is fairly easy to create with Dynamic Paint.

You just need ...

a subdivided plane that is the Canvas for the Dynamic Paint physics. Set Surface Type to Waves and tick the Open Borders checkbox. Add a Solidify modifier if you want to look at the shield from both sides.
an object (a spaceship or Suzanne) that is the Brush. Increase Waves > Factor to 2 to enhance the effect
create a shader that uses the y coordinate of the wave deformation to colorize the shield. In the material settings set Blend Mode to Alpha Blend and enable Bloom in Eevee render settings.

In Blender 2.92+ you can use a Vertex Weight Proximity modifier and Geometry Nodes to add some sparkle. Just create a vertex group ("proxy"), assign all mesh vertices to it, and use it in the Vertex Weight Proximity modifier and for the Density Attribute of the Point Distribute node in the Geometry node setup.

In the example, both objects (the plane and Suzanne) have each a Vertex Weight Proximity modifier and a set of Geometry nodes to have the little spheres on both objects when they are close together.


Limitations:

Shadows are not supported on light instances (dupli objects, group
instancing).
Only 128 active lights can be supported by Eevee in a scene.
Only 8 Shadowed sun lights can be supported at the same time.

https://docs.blender.org/manual/en/dev/render/eevee/shadows.html


Stylus-Activated Pie Menus? Tablet Mode Sculpting?

You can map one of the pen or tablet buttons in Wacom Tablet Properties to Ctrl+Tab as per this list of Blender shortcuts. Note that you can create a specific setting just for Blender.

Go to Wacom Tablet Properties
Optionally, set a specific application
Select the dropdown menu for the button you plan on changing
Select "Keystroke..."
Press Ctrl+Tab, optionally name the shortcut key, and then click on OK

(click images to enlarge)


Object-Specific, "Material Preview" Viewport Shading?

Just set colour to texture with that little dropdown arrow :)


Is it common/good practice to scale down faces in the UV Editor to fit into 1 pixel to have a normal diffuse?

Your approach is fine. If it works in tests, stick to it.

Changing (scaling down) the uv coordinates, won't affect your performance at all. If you can update the palette easily, your method has many advantages.

Make sure, you disable interpolation of the texture in your game engine. You want to keep it sharp. In Blender internal renderer (as an example), these filter setting are required, to keep the texture pixelated.

The usual is to assign different materials, with different colors to their respective faces. In Blender this is done by creating new material slots in the material properties panel and then assigning them by selecting the mesh's faces in edit mode and pressing assign with the material slot selected.This will export to most formats and engines.


How to convert many triangles to one mesh?

You have a mesh with many unconnected faces.
In edit mode select all the triangles with A A. Then press W > Remove Doubles. Or on the tool shelf T under the Tools tab press the Remove Doubles button.


Make rigid body collide with hair particles

As gandalf3 said, you can enable Collision on the rigid bodies, and set Hair Dynamics in the hair particle setting. (demo file)

You can also add Force Field to the Active rigid bodies to simulate the collision, since Hair particles react directly to force fields:


Creating bumpy glass effect on an extruded path?

To do this you must add a B&W conversion node between Bump and the Texture node as Bump node requires a greyscale image to work.


How can I connect a side with many vertices to a side with much fewer to produce a clean looking topology?

You are doing the correct thing - trying to reduce the amount of vertices on one side. That should work. The idea is to have as little of geometry as possible that would still hold the forms you need, because the fewer points and lines you have to worry about, the easier it is to work with them. You can see the opposite on the unexpected pinch where you have too much geometry so it's not that easy to smooth or correct. You have way too much unnecessary geometry there. I would delete a lot.

In this particular situation it seems you might already have too much geometry to be able to replicate the forms. It is different from the reference object and you already have so many lines and vertices that it would be difficult to move them into places.

These shapes needed to be addressed earlier in the modelling process. It might be easier to start over then to fix it. That might be frustrating, but I think everyone goes trough a lot of redoing when learning this. I certainly did. With this kind of object it may be hard to understand what the forms are, so I would start by establishing all the lines that I understand from the start(in 3d). I would only make a vertex and extrude it into lines and check the position looking from multiple sides, like from top and side views. Then I would try to connect them and this way I could add or remove points as needed while connecting the lines.  I would aim to use only as many vertices as it is needed and not one more carefully observing if the forms generated by Subsurf modifier are matching the reference. I cannot advise any further without actually modelling the thing I am afraid.


This was a bug (at the time of writing this answer), which got fixed in https://developer.blender.org/T58994
Basically the rest of the answer is redundant now, as 2.80 shows the same crease behavior as 2.79 since the bug was fixed. Automated builds will be updated starting from 24. 01. 2019.
Old answer
This is a bug still in the beta of Blender 2.8. The switch to OpenSubdiv could have caused the problem, but on the other hand, nightly builds of Blender 2.79 can also use the OpenSubdiv implementation in the SubSurf modifier, and don't show the described behavior / look. There are two bug reports available currently, see https://developer.blender.org/T58410 and https://developer.blender.org/T58994 - the latter one also providing a solution.
Potential Solutions until a fix appears
One option is to set the crease values to 0.9999 instead of 1.0. To do that, go to Edit Mode, select one creased edge, and press Shift + G. In the Upcoming Select Similar menu, choose Crease. This will select all edges you creased. Now, in the Properties Panel (N - Key), type in 0.9999 to the Mean Crease field:

A second option is the new modifier that was introduced in Blender 2.80, which allows for nice control over normals on more difficult geometry elements. A use case are extruded and beveled text objects with smooth shading turned on, but in your case this also serves as a solution.
Add the Weighted Normal modifier from the Modifier Stack / Modify section. This should immediately fix your problem, even though a warning is printed at the bottom of the modifier:

I have also increased the number of subdivisions and turned off Cavity from the Shading popover menu for clarity's sake. The warning itself might be interesting for you as well: It says that AutoSmooth should be enabled for this modifier to expose its full power. Once you do that here:

...your model should look even more refined:

But the best part is this: If you only use AutoSmooth without the Weighted Normals Modifier, you get entirely sharp edges:

So, depending on the look you're going for, choose your way to go.


What is the workflow when using Subsurf?

Looking at the sphere i see things go wrong.

Your viewport subdivision is set to 6
while your render viewport is set to 2
Normally render is set higher then viewport, so i guess you saw to many facets thus... i'm thinking why.

More is wrong, your highly subsurfing a sphere why ?.
Go te edit mode, select all faces, go to shading/UV make sure to set faces to smooth. now the most simple sphere with a subdiv of 2 or 3 is likely enough.


Obtain normal map from specific camera and transformation

In Cycles, the Normal pass can be enabled in the render by enabling the Normal pass in the Render Layer properties - however, this is in World coordinates, not Camera coordinates. To convert the Normal into Camera space we can use the Vector Transform node. This isn't possible with the actual Normal render pass but we can add an additional Render Layer and configure that to generate the "camera-space normal" render.

In order to do this we first need to create a material which will generate the normal in camera space. This can be achieved with the following nodes :

This takes the geometry Normal (in World space) and transforms it into Camera space via the Vector Transform node (notice how it's set to 'Normal' mode, with World to Camera). This then drives the Emission Shader node to generate the output.

In order to generate this as an additional pass for the whole scene we need to add a Render Layer and set its Material Override to the new material shown above - so that all objects are rendered with this material.

The output of that Render Layer will now be available in the compositor and represents the Normal In Camera Space.

This can then be repeated for both cameras (you can actually use Render Layer 'Views' set to Multi-view to render both cameras automatically).

In order to transform the result into the opposite camera space we need to apply a transform to the generated normal to rotate by the difference in angle between the cameras. For this I've made an assumption that you already know the angular difference between the cameras and that the rotation is purely in the horizontal direction of both cameras - ie, in the same way our eyes in the same horizontal plane.

For this we can simply rotate by the specified angle around the Y axis using some vector maths :

Here we're transforming the R element (x-axis) to cos(angle)*R+sin(angle)*B and the B element (z-axis) to -sin(angle)*R+cos(angle)*B - effectively a rotation matrix - and leaving G (y-axis) unchanged. Set the Value node to the angle of rotation (the angle between your cameras) - in Radians.

This can produce the following result (slightly different to the unrotated result) :

Blend file included


How can I set an IK limit on a bone's Y axis?

With no pole, locking the Y axis works, and can be seen by locking/unlocking it in pose mode.  However, what exactly it means to lock the Y axis isn't necessarily intuitive; in reality, orientations aren't sets of 3 independent axes.
There is one situation where locking the Y axis (of the first bone in the chain) will do nothing: when you are using a pole target.  In this case, the calculations used to track the pole will replace the limited Y axis rotation of the first (only) bone in the chain.
Note that pole targets aren't necessary for IK; they're an option, and there are alternative controls.
If I wanted to create an IK thigh twist bone with a pole target, here's what I'd do:

The thigh bone of the IK chain is non-deforming.  The deforming thigh twist bone is parented to it.  Note the hierarchy: the deforming (upper, non-twist) thigh bone is not parented to it.  Instead, it's parented to the hip (or whatever the IK thigh's parent is), and then acquires the proper orientation via a damped track constraint, in this case, targeting the head of the thigh twist bone.


Trouble with getting global vertex positions

A while back I created a script to create a bounding box around a selection of objects. To get the min and max values I used the following code -

minx, miny, minz = (999999.0,)*3
maxx, maxy, maxz = (-999999.0,)*3
for obj in context.selected_objects:
    for v in obj.bound_box:
        v_world = obj.matrix_world * mathutils.Vector((v[0],v[1],v[2]))

        if v_world[0] < minx:
            minx = v_world[0]
        if v_world[0] > maxx:
            maxx = v_world[0]

        if v_world[1] < miny:
            miny = v_world[1]
        if v_world[1] > maxy:
            maxy = v_world[1]

        if v_world[2] < minz:
            minz = v_world[2]
        if v_world[2] > maxz:
            maxz = v_world[2]


In my experience, this is caused by not "Packing" the image.
In the image editor, go to the image you want to pack/save and Image-> Pack as .png.
Now when you close and reopen your project your texture wont be lost because it will have been packed into the .blend file.

Hope this helps


Well, there's isn't really a magic button you can press to make your renders finish and clean up faster, but here are a few points that may help, or may not.

Hardware

The main thing that comes to mind is your hardware. If you don't have somewhat nice hardware, you aren't going to get very far.

For the built in cycles renderer, it is good to have a NVidia GPU with CUDA (if you have a nvidia card, learn to setup cuda here). This is much faster than the normal CPU rendering. Having a decent CPU is also good if you don't have a GPU

Scene

Another factor, is going to be your scene. It can really be a lot of things.

Since you said you where doing an interior, that fact that the light will be bouncing around more will slow down your render. If you have complex materials, naturally, it will slow down your render. If you have lots of lights, that can do it also.

There's really lots of stuff it can be. Without knowing more about your system and scene, it's really hard to say.

Render Settings

Another big factor to consider are your render settings. Number of light bounces, number of samples, and resolution. High light samples are commonly seen as being the source of lengthy render times, but resolution is another significant factor. For a scene I was rendering at 1920x1080, it was taking around 5 minutes per frame. I reduced the resolution to 1280x720, and it reduced the time it took to render each frame to 30 seconds. Consider reducing your resolution if where you share/use the file doesn't use or need the extra pixels.

This article should give you a few extra pointers on what you can do to speed up cycles.

And for Blender Internal, this article could help out a bit also.


Here is my solution: It requires some manual labor.
Update: Only works for Cycles
I will be saying "Ghost Effect" a lot in this answer. The image is what I mean by that.

First, locate the property titled "Position" in the Motion Blur panel. The position property defines how the Motion Blur is calculated:
Start on Frame: The Motion Blur is calculated through the current frame and the frame right after it.
Center on Frame: Calculated through frame - 1, frame, and frame + 1.
End on Frame: Calculated through frame - 1 and frame.
With these three settings, you can remove the "Ghost Effect" of motion blur with this procedure: Let's say that the cut is happening on frame and frame + 1. If you use the default Center on Frame, both frame and frame + 1 will have the ghost effect, because the Motion Blur calculates with neighboring frames. To fix this, keep it on Center on Frame, go to frame - 1, hover over the property with your mouse, and press 'i' to add a keyframe. Then, go to frame and change it to End on Frame and add a keyframe. Then, go to frame + 1 and add a keyframe on Start on Frame. Last, add a keyframe on Center on Frame for frame + 2. In total, you will need to add 4 keyframes.
Here's an explanation of what this is doing:
On frames that are not in the cut, the Motion Blur computes on Center on Frame. When it reaches the first frame of the cut, it performs on End on Frame. End on Frame computes with frame - 1 and frame, as stated above. Because the cut happens on frame and frame + 1, the Motion Blur does not reach the cut, and will eliminate the "Ghost Effect". This can also be applied to the next frames.


Can you unlink action for multiple objects at once?

If you got actions objects spread in an object hierarchy. (but they use same action)
Yes, you can modify action of them all at once by script.

for loop that object hierarchy and see if object got action element. save them in list or something like that
hard coded script or make a panel to pick the action name.
assign the action you pick to those action objects you found.


I don't think you can avoid re unwrapping.
The reason why you have the separate UV island in the head unwrap is because that is the way the UV seams are marked   at the top of the head.

To make the head a single UV island clear the unwanted seams and mark a new one along the top of the head as in the screenshot below. Then UV unwrap again.
You will have to experiment a little to have the exact seams to get the correct unwrap island shape and then scale to match (align to) what you had before.

Just a note : usually the ears of a head will need UV seams so that they will be separate islands when unwrapped.


The best way to do this is to add a fixed constraint to the object.  Simply click 2 objects then add a constraint.


Several possible technics to do that. Of course you can move each vertex manually, but here are some possibilities that can help you (between probably many others).

Edit mode and proportional editing

Mainly two situations. Your object is mirrored or not. If it is not, you can make it mirrored (removing half of it and add a mirror modifier) or use the mirror option in the tools panel on the left here :

As you start from an obj file. I think yours is not mirrored but is symmetrical.

Enter edit mode Tab
Enable proportional editing
Select a vertex (or more) and move it
Use the mouse wheel or the PgUp and PgDown keys you can play on the influence of the proportional editing mode and so move more or less the neighbors vertices

Other useful thing in edit mode 'smooth vertex' :

Sculpting

Enter sculpt mode and check that the symmetry is set (normally it is by default) :

Then use the brushes and sculpt ! I think you may prefer the following brushes 'draw', 'grab', 'smooth'... but test which is the best for you.
The F key allows you to modify the size of your brush.

Mesh deform

Mesh deform is a modifier. It can be interesting as it gives you the ability to deform a mesh using a more simple one.

To set it up, you'll need to make a close shape that bounds your model. And probably give it some cut in order to have some handling points. And stretch the cube to be relatively close to your model.
Here I use a cube with some subdivisions and set its maximum draw type to 'wire' so that you can see your model through it :

Next select your mesh, go to the modifiers panel, choose a 'mesh deform' and set the cube as deform object. Then click 'bind' (Blender will calculate a bit at this step) :

Once done, select the cube, enter edit mode and play with its geometry :


The Geometry node Normal can be used to control the profile of the light emitted by a lamp and this can be used with an image texture to give full control of the lamp output.

Consider the following nodes :

Here the Geometry Normal is passed through a Mapping node to rotate it into the desired direction before being split into its X,Y,Z components. The X and Y components are adjusted to remove the 'bending' caused by the spherical Normal coordinates (otherwise you get distortion of the image at the corners) before being passed through a second Mapping node (to adjust the aspect ratio of the image) before being passed to the Image node for the texture - simply apply your own image in the Image node.

This can produce the following result :

Replace the Image with an image of a plain square - or any other shape - for your desired result.

This method will work with the Point and Spot lamp types - but the Spot will also be limited to a circular spot (in the direction of the lamp) so the Point lamp gives more control since you can simply provide whatever image you desire. Note also that the Lamp includes a 'Size' setting - setting to affect the blurriness of the lamp - setting this to zero will produce a very sharp image (as in the above example). Setting it to larger values will produce progressively blurier projections.


So, open your applications "start" menu, search for 'window manager tweaks', under the accessibility tab you should see a drop down to change the button that grabs and moves windows.


How am I supposed to handle muscle deformation while rigging?

Unfortunately what you're asking about is a very broad and difficult topic and there isn't a very straightforward answer for Blender. I myself have done some research on it for team projects and can share what I have found.
Modeling muscle deformations is no easy task in 3D software. Large studios such as Pixar will often run complex simulations that account for elasticity and the like to create realistic forms. Blender doesn't natively support these capabilities, at least not to the extent of realism that these studios have.
There are (often expensive) add-ons available, such as X-Muscle System, which can run physical simulations for organic tissue. You could also write python scripts to do this yourself (though who knows how long that could take.) Personally I've never used either of these approaches, so I can't vouch for the benefits of either.
Even if we don't have an excess of time or money, hope is not lost. The most common approach I've seen is using shape keys, often called "Corrective Shape Keys." Here's the general idea:

Create your rig as normal. A cool trick is to not have the armature deform the mesh itself, but rather have it deform a mesh lattice/cage, which in turn deforms the mesh. This often results in smoother deformations and is used in many advanced rigging tools such as Juan Pablo Bouza's BlenRig.

Now, on the base mesh, create a shape key for each joint whose muscle deformation you want to adjust. For instance, your reference picture, you'd probably want a shape key for each knee, elbow, shoulder, and the torso.

For each shape key, bend the joint to the extreme and edit the mesh so that it looks you'd want it. This can be done in edit or sculpt mode (but don't edit the topology!)

Using Drivers, drive the factor of the shape keys with the rotation of the corresponding joint. This can be tricky to get right sometimes. With the knee for instance, you'd want the factor of the shape key to be greater when the knee is bent and around zero when in rest pose.

If you prefer video resources, this YouTube video has a good demonstration of corrective shape keys and this one is a decent introduction to using drivers.


Update the normals

Either update normals on a whole bmesh

bm.normal_update()

or on a per face basis

for f in bm.faces:
    if sometest:
        f.normal_update()


Bone Problem (not bending) - Following Animated Book Tutorial

I got it! I had to select DEF_pages_top.R then hold SHIFT click on the Armature and then CONTROL+P to connect it. That gave me the deformation I was looking for.

Thanks @moonbots for your reply!


How to create a reflective diffraction grating with cycles?

You could try a setup like this:

It's probably not physically accurate at all, but with a bit of work you can make a pretty decent looking effect.


'No Such File or Directory" Error When Working with Shared File

No such file or directory" is somewhat common when

the file needs something else to be processed by the software you are working with (missing shared library for blender, missing linked file with textures, materials...)
the file doesn't exist (or at least it doesn't exist in the given directory)
the filename or the path consists of characters that cannot be read by linux

I assume that you have already used blender on linux successfully (eg opened a local file), so the first point is not the cause of the problem.

Permissions between operating systems are not as easy as it sounds. Both Apple and Windows tend to use some "magic" in their approaches of an easy-sounding task. So it's good to verify the permissions on OS level.

Try the following: Navigate to the tiger.blend file by using either the file browser (dolphin for KDE, Nautilus for GNOME, for Ubuntu whatever they are using) or the command line and try to rename the file into tiger1.blend. If you are able to successfully rename the file then there are no permission problems on the OS level.

Last but not least Blender does not necessarily use all of the Desktop Environment's file selection methods. While KDE's dolphin is capable of browsing paths with blanks (something like //Macbook/Awesome Blender Files/tiger.blend) other file managers might not. Blender seems to process blanks in paths correctly on SMB (samba) and CIFS (common internet file system) shares but I've never tried using Mac OS as a host system. Try to use simple paths without blanks, accents, umlauts, special characters...


If it's the viewport camera, simply hit NUMPAD1, NUMPAD3 or NUMPAD7 to get into an aligend view. Alternatively use the View menu (Right, Front or Top).

If your camera object got tilted, open the properties with N, find the rotation values in the Transform panel and find the value that isn't quite 90 or 0 degrees and enter a clean value.


It looks like you have "Outline" turned on in the Viewport Shading settings.


Interruptions in Loop-cut means you need to inspect the geometry closer, often it points to faces not being joined by the edges that you think they're joined with. Some discontinuities are easy to overlook, but also easy to spot

Play close attention in Face selection mode to the locations of the dots that represent the median point of faces. If you see a dot on an edge that's a sign that you have accidentally created degenerate geometry, or if not degenerate then possibly unintended.

A side ways zoomed in view of your screenshot.

Selecting all in Edit Mode and Remove doubles can be used in most cases, except when you intentionally have vertices closer than the threshold that Remove Doubles operates on.


Automatically modify primitive based on texture

Array modifier

As long as the pattern is repeated in a Grid, you can replicate "N" times a mesh along the main axis with the Array modifier:

For your particular case, you'll have to build a mesh made by 3 cubes and stack one Array modifier for each axis, adjusting the Relative offset vector:


How to add hotkey for mouse 4th button to delete in edit mode

Open up the User Preferences, and head to the Input tab. Open the 3D View section, and inside of that the Mesh section. Now scroll to the bottom of the Mesh section and you will find an Add New button.

Now what to put in the Identifier field?

If you want the 4th mouse button to simply bring up the menu (like pressing X or Delete) then use wm.call_menu as the Identifier (top field) and put VIEW3D_MT_edit_mesh_delete in the name filed that will appear at the bottom. Yes it will be grayed out, but you can still click in it and add the text.

Or if you want to be able to directly delete, say vertices, by pressing the 4th button, then set up a shortcut like this:

Now the shortcut is calling mesh.delete directly instead of calling for the menu. Then just pick which Type you want to delete. You'll notice that I have "Ctrl" checked there. This way I can press the 4th button to open up the delete menu. Yet I still can directly delete vertices, edges, and faces by holding CtrlAltShift respectively.
You have to add more shortcut entries for each "type" you want to delete.


How to delete a material from a duplicated object? Sanity Check

I'm assuming by the behaviour of question code (pre edit) that the material_slot link is 'OBJECT' rather than 'DATA'.  Code below should work on either. Used copy() method of object and mesh to create a copy, added (1,1,1) to the location, linked to scene, made active, and removed all material slots.

import bpy
from mathutils import Vector
context = bpy.context
scene = context.scene

obj = context.active_object
obj.select = False
obj_copy = obj.copy()
obj_copy.location += Vector((1, 1, 1))
mesh_copy = obj.data.copy()
obj_copy.data = mesh_copy
scene.objects.link(obj_copy)
scene.objects.active = obj_copy
obj_copy.select = True
#loop thru and remove all
for ms in obj_copy.material_slots:
    bpy.ops.object.material_slot_remove()


In the Render Settings set the End Frame to the last frame of the animation. Both numbers are 0 right now.


In the Face Sets menu, go to Face Set from Visible. As long as everything is visible, this should clear the existing face sets.

This turns everything in one single Face Set which is not shown colored:


How to make stylized hair from curves with flat tips?

I suck with curves and don't get how they work but for now i don't
  have motivation to learn it.

This will have to change in order to understand this answer.

Create three curve object. ⇧ ShiftA > Curve > Bezier

Taper
Bevel
HairCRV

 RMB select HairCRV and go to the properties panel and to the data section. In the Geometry settings set the other curves as the Bevel and Taper object respectively.
 RMB select the taper curve and go into edit mode ↹ Tab. Manipulating the curve will increase the depth of the tapered curve hairCRV.    This is, how a sharp ending can be achieved.
The Bevel curve influences the shape of the cross section along the curve.
Position the curve. ⎈ CtrlD to duplicate, E to extrude, ⎈ CtrlT to change the tilt. ⎇ AltS to scale.

You can still change the taper or bevel curve. In the tutorial, there are multiple different bevel curve, to achieve a variety of shapes.
Don't forget to increase the resolution of the hairCRV in case of small detail along the taper curve.


To get this kind of interaction in Blender render you'll have to enable Indirect lighting with the Approximate Gather method.

From the Blender Reference Manual's page:

  Indirect Lighting only works with Approximate gather method.

The emission color of the emitting object's surface comes from the diffuse color multiplied by the emission strenght (Emit).


When I set geometry to origin my character's head gets messed up

In edit mode press TAB: select the botom faces from the foots

press Shift + S and click cursor to selected

press TAB to set object mode, then press T to show transform panel and go to set origin and click set origin to 3D cursor

Make sure you don't have another object select pressing A to select everything and deselect everything.
Finally select the object and press Shift + S and click selection to cursor(offset)


How to make mesh lights work in Blender Eevee?

Mesh lights can be used with EEVEE but they require an extra step to work: baking indirect light.

Here is a scene with a Light-type object (correctly lighting a receiver plane) and two Emission meshes (currently doing nothing)

We should add an Irradiance Volume object, and make it encompass the volume that is affected by the light that we want to capture. This object has a Resolution option that should be adjusted depending on needs: the finer the grid, the most spatially accurate the description of the light in the scene.

To finish, in the Scene properties, under Indirect Lighting, we must hit "Bake Indirect Lighting". This will compute how much diffuse light is bouncing around each one of the "dots" of the Irradiance grid.

Now the mesh lights are contributing to the lighting in the scene! Moreover, once the lighting is baked (and if the lights are not moved), objects can still be moved around and will be correctly lit by the baked light (they won't cast shadows though!):

As far as I know, the Indirect Light cache doesn't have frames so the animation of mesh lights isn't possible at the moment.

In the manual: Irradiance Volumes - Indirect Lighting Cache


You could do it this way, and by the way you could have done it without booleans. Use the knife tool (K to activate, C to cut orthogonally, Z to cut through, E to continue, Enter to validate). To delete the bad edges, select them and X > Dissolve Edges.

You could try to simplify, actually it all depends on what you're planning to do later, but as Gorgious says you'll need to keep some edges between your holes and the external edges:


How to split a Box or a Mesh with a Plane and keep both sides?

This can be done using the Bool Tool add on.  Bool Tool is included with Blender.  It needs enabling.
Step 1 Enable Bool Tool:
Step 2:  I have a Cube that i have intersected with a plane.

Step 3: Select the Plane first, hold down Shift key then Select the Cube

Step 4:  From the Properties Panel (Press N if its not visible)  go to Edit then Bool Tool

Step 5:  Use the Slice option in Either the Auto Boolean or Brush Boolean menus.
Result is a Cube cut into two sections with faces applied between the two.


How to bend and use on mesh (as shrink wrap)

To do what you want to do you could try the Mira Tools addon (demo here) or the Surface Follow addon (demo here).
But as your lamp shape is rather simple there are 2 simple tricks, Mesh Deform modifier or a second Curve modifier (as suggested by Robin Betts):

Put your ornement around your lamp.
Create a cylinder around the lamp, subdivide it several times horizontally.

Give your ornement a Mesh Deform modifier, with the cylinder as Object, click Bind.
Select the cylinder, go in Edit mode, enable the Proportional Editing option, scale and move the horizontal edge loops so that the ornement sticks to your lamp.

Second approach:

Deactivate the Array and Curve modifiers for the moment, create a new Curve modifier, put it on the top of the stack, create a curve, use it to make the ornement fit the lamp bottom profile.

Apply this modifier to make it easier, bring back the 2 other modifiers (Array and Curve).


Yes, when you have more than 1 GPU blender options are all the GPUs at once and then each single individual GPU.

This feature is on the dev's todo list for longer than 2 years.

You can check it here: https://developer.blender.org/T37717

Dec 8 2013, Brecht wrote:

  It's on my todo list to improve graphics card configuration for 2.70, to allow you to select individual cards and enable/disable them. This is not considered a bug at the moment however.


Best solution that doesn't take incredibly long to render is to use the Mist pass and composite in the fog. On the View Layers tab turn on Mist.

Then, in the compositor, turn on Use Nodes and add a Mix node between the Render Layers node and the Composite Node. Plug the Mist output into the Fac input on the mix node. The bottom slot controls your mist color, but you can also plug any other texture into this. You could for instance in another scene create a flat plane with an emission shader and a noise texture added to it and animate the texture node z position. This would look like clouds moving towards you. Then plug this animated texture into the bottom image slot the Mix shader in your main scene.

The falloff of the Mist is controlled in the Mist Pass panel in the World tab. Depth controls how far into the mist you can see. I would animate this to simulate the effect of changing fog density as you move across the landscape. Basically the thicker the cloud, the lower the depth.


As cegaton pointed out, the texture you are looking for is bundled in the blend on blendswap. The file is listed as CC0, so I can freely post it here.

It is a simple image that you could easily create in blender with a grid rendered with freestyle, and a text object in the corner. Below is the blend file fully ready to render a grid like the picture above. (wait for the render to fully finish before the freestyle line show up.)

Blend File click the "View Raw" button to download.


Pink material when using 2 x PBR (Principled BSDF) materials into a mix shader w/Eevee

I believe the limit for EEVEE is 24 textures per material. In cycles, you can get around the limitation by enabling "open shading language", but I think in eevee, you're stuck. In the end, it doesn't matter what the "theoretical" limit is - If you hit a point where adding a new texture to the graph causes it all to turn pink, you just have to find some other way around it, such as using a texture atlas.


Is there a node in Lux with a similar function as Cycles' Fresnel and Layerweight nodes?

Short answer: No.

The problem is that such a texture is only possible in a unidirectional pathtracer, but LuxCore also supports bidirectional pathtracing. I have recently investigated this and implemented the basic math operation behind Cycles' layer weight node in LuxCore, but it leads to wrong results when using the lighttracing or bidirectional engines in LuxCore (you can read more and see pictures here).

It would not be hard to implement for the pathtracing engines, but it would make materials inconsistent when switching between engines. Imagine importing some assets for your scene, rendering with bidir and seeing a lot of artifacts. So I chose not to implement it - others might have different opinions.


The width and height of the plane does not correlate with the displayed units

I finnaly found the solution : this is due to an icorrect scaling of the object. I did not act on the vertices of the mesh, but i scaled the object in edit mode.


Dissolve Mesh > delete > dissolve will delete geometry and fill in the surrounding area in a non destructive way
Rip rips apart vertices or edges V


Show custom thumbnails in file browser for folders

As far as I know, this isn't possible in Blender for now. The file browser is being revamped for one of the next versions (I think 2.81 or 2.82 if I remember correctly), so maybe it will be a thing then.


Can I match my particle density to my displacement map?

You can add a Mapping node, to better control the location/scale/rotation of your texture.

Noise texture always uses the same formula to calculate the noise.
So every instance of the noise texture looks the same.

Add a Mapping node, so you can precisely control the output.


How to change display/render order of several grease pencil objects in Blender 2.82?

Arranging them in 3D space is the only way I know of for separate grease pencil objects. e.g. to make one object display behind another just move it backwards on the y-axis.


Chamfer or bevel an edge with a smoothly varying depth, as if whittled or gouged out

What an amazingly detailed post!
Would something like this work for you?

To save too much adjustment in separate places, starting with 1/8
square tile, open on all the sides you can't see, here...
Assign Edge Bevel weights to the edges shown in shades of blue, all at 1 will do to start with...

Assign 2 Mirror modifiers, one about the Empty rotated  in Z by 45, and another in X,Y,and Z.

Assign a Bevel modifier, by width, limited by Weight, segments about 5, with a profile of about 0.15

Assign a second Bevel modifier, to hold the sharp edges under subdivision,limited by Angle, up around 80 degrees, and a Subdivision Surface modifier.

Tweak the Edge Bevel weights, and other Bevel parameters, to get the scalloped shape you want. If you can't get all the way there, you may have to apply the first Bevel modifier, and tweak that in the geometry, by hand.
Edit: Just noticed your first Bevel should probably have only 1 segment..


Can I just copy "Z location" to all the selected objects?

You can also try another way:

Switch pivot point type to Active Element, toggle Manipulate Center Points;
Select objects, keep one active, then SZ0.

UPDATE:

Thanks to Bastien Montagne (aka mont29)'s commit, you can find this feature in latest version, now only for Location, but also Rotation, Scale, Dimensions, etc:


How to activate ANOTHER object's actuator (Python)? Really!

from bge import logic

cont = logic.getCurrentController() #Camera
cube = logic.getCurrentScene().objects['Cube']
print(cube.controllers)
print(cube.actuators)
cube.controllers[0].activate(cube.actuators[0]) #AttributeError: 'SCA_ANDController' object has no attribute 'activate'
cont.activate(cube.actuators[0]) #ValueError: Motion not in this python controllers actuator list

The solution: Send a message to trigguer a message sensor to trigger the and controller to trigger the action actuator

In your script:

from bge import logic

cont = logic.getCurrentController()

cont.owner.sendMessage('anySubject')

or just:

from bge import logic

logic.sendMessage('anySubject')

Also you can connect multiple objects logic bricks take a look at blender-game-engine-logics-sensors-and-python-script


Call a modal operator from Python and keep its interactivity

Adding a node and moving a node are two different actions. You will find that the two operators invoked when adding a node are bpy.ops.node.add_node() and bpy.ops.node.translate_attach_remove_on_cancel()

Using an example from a small addon I wrote a while ago -

def execute(self, context):
    if context.active_object.type == 'ARMATURE' \
            and context.active_object.mode == 'EDIT':
        bpy.ops.armature.duplicate()
        for b in context.selected_bones:
            b.parent = None
    else:
        bpy.ops.object.duplicate()
        bpy.ops.object.parent_clear(type='CLEAR')
    return bpy.ops.transform.translate('INVOKE_DEFAULT')

you can see that the object gets duplicated, with a different operator used for armatures that are being edited, then the parent info gets cleared and the translate operator is called at the end.


How can I make link group that look like this image, and how to make that group to my local asset so i cant edit mesh, material, texture of it

What you are looking for is the append option, it's similar to link, but this options is like import the group from the original file, so you copy or import the group from the original file and you can edit it in the final file without editing the group from the original file.

However, you can't edit the textures without edit the original textures because textures aren't part of the .blend file, they are independent files from the .blend file.


How do I get a single IK bone to move up when the controller pushes against it?

The IK goal is to manage a chain of bones and bend them from point A to point B with an orientation towards point C. Here you have just one bone, you should use a damped track constraint instead, which has the simple role of pointing a bone towards another and seem to be what you need.
Then, before the damping track, you can add a Child of with only Z translation enabled. Don't forget to hit the set inverse button.


Different frames make rigid bodies act differently

The problem is the animation starts at frame_start and ends at frame_end and since end_frame = start_frame + speed the duration is always the same but shifted.
To achieve the desired effect the animation duration should get longer when frame_start gets larger, one way to do it is to set the first keyframe at 0.
so the first key frame shouldn't be the start_frame :

    # First keyframe
    scene.frame_current = 0
    bpy.ops.anim.keyframe_insert(type='Location')
    print(start_location)

if you want to start at frame_start and end at frame_end and get different results you have to change the frame_end expression :

frame_end = speed + 2*frame_start

this way the delay the start the longer the duration is , giving the cube lower speed ( less momentum )  and it will travel shorter


Suppose you sculpted this beauty out of a plane:

To make the flat area transparent you can create a node setup like this, where the transparency is controlled by the height (Z axis) of the model.

EDIT:

If you are working on an older version of blender that doesn't have the separate XYZ you can use a separate RGB node:

For finer control on the transparency use a Vector->Mapping node. By moving the Location values on the Z axis you can determine the height where the transition starts, and by moving the sliders on the color ramp you can determine how smooth the transition will be.


Is there a way I can make loop cuts of multiple (patterned) widths?

Perhaps the bvevel tool can do the job ?

1: Use the Loop Cut tool to create the required number of divisions.

2: With these new loop cuts selected use the Bevel tool to give these loop cuts the desired width.


Just in case someone gets the same problem. I've got the reason and solution.
The shading issue is caused by a very low clip start value of the viewport while beeing zoomed out. Sub-D and Solidify making it even worse.
So nothing crashed just keep the setting high enough if you want to zoom out^^


In Pose mode. the lighter blue color indicates the active bone, while the darker blue indicates a selected bone.


Glass material in eevee is not working properly

Maybe try something like this for your glass shader in EEVEE:


How to move two parenting objects together?

You have Proportional editing enabled.
When you move your object, all near objects move in the same direction.

It has nothing to do with parenting.

Disable it, and all goes back to normal.


I think you're looking for the Vertex Weight Proximity modifier. It lets you assign vertex weights based on, for example, the distance to the target object's geometry, which you can animate per usual.


Optimal way to animate dragging objects through space from a spaceship

A cloth simulation of a rope can attach the astronaut to the spaceship, then a simulation will generate the movement for the astronaut. The rope is parented to the spaceship so is it moved with it. The the astronaut is constrained to moved with the end of the rope. The animation below shows the final result.

Details

Create a rope from a cylinder by subdividing along it length. Create a vertex group at the end of the rope.
Apply a cloth simulation to the cylinder.
Parent the rope to the spaceship.
Use  the copy location constraint on astronaut and select the rope and the vertex group at the end.

Blender 2.92 file used to generate the animation. -


Well, to start off, tileable textures are easy to make with the free Krita, for example. Just press W to see your image a tiled:

Then, scale your UVs to the width of the texture:

That way you at least get the straight roads to be tiled:

For the intersections...

Image taken from here

If you make edges in the middle of the road and want to slide them with GG, you probably need to check the 'Correct UVs' in the Tools panel (press T in viewport) in order to slide only the edge and not distort the road texture:

One way is to use this kind of texture in a separate material assigned to new polygon to terminate the tiling road:

Then just rotate and move (G,X or Y to restrict the axis you're moving the UV)

For the diagonal roads, you may need to use GG and then slide back a bit and then hold down Alt and then slide forward in order to lengthen a diagonal road polygon:

The diagonal-to-straight road transition is a bit difficult to make nicely. If you don't want to be too finicky about it, maybe just go like this, select the polygons and unwrap the road again and scale it to the width of the road texture like before. Then just slide the UVs until you have a nice result:

Just ask in the comments if you have issues with these or want to know something extra :) I'll update the answer.


(Animation Nodes) How do I get an object to follow a spline without rotating along it?

You just need to apply the action and a transform output with the rotation you want.


Setting up a Sky: bpy.context.world = None

If not set scene.world is None.  Simply set it, for example to a world named "World" with scene.world = bpy.data.worlds.get("World") , or create a new one.

import bpy

scene = bpy.context.scene

if scene.world is None:
    # create a new world
    new_world = bpy.data.worlds.new("New World")
    new_world.use_sky_paper = True
    scene.world = new_world


Try rendering the scene (F12).

The white X means that there is no data to display. The per-node previews and backdrop preview should automatically fill in after the render is complete.


Some walls appear too bright while others appear fine

Examine your Lights for position and direction and specular value.  If you use a Sun Lamp and point it you can selectively illuminate a wall.  If you are using specular light direction and viewing angle must be considered.
Colors.  Make sure the walls share a material.  The materials would have a number 2 or greater if it is shared.
Examine thes normals of the wall.  Edit Mode. Key N. Mesh Display. Normals Click plane Face Icon.
More Drastic.  Create archive of file. Delete all lights.  Add back one by one to see if the asymmetry persists. Two antiparallel sunlights should achive symmetrical lighting.


How to make particles emit from an object at regular intervals without disappearing the already emitted particles

Here's a workaround that might help. If you don't want to create a particle system for each "pulse" but a single particle system doesn't allow switching emission "on" and "off", you have to kill particles in those frame ranges that you don't want them.
The lifetime of the particles should be high enough so that they are visible as long as you wish to see them. Let's say you want to emit particles between frames 10-20 and 40-50 for example.

Place a Collision object where the emitter is, set Permmeability = 0 and enable Kill Particles.
Go to frame 9, set keyframes for Permeability and Kill Particles.
Go to frame 10, set Permeability = 1 and disable Kill Particles and keyframe those values again.
Go to frame 20, set keyframes again without changing the values.
On frame 21, set Permeability = 0 and enable Kill Particles, keyframe them again.
Select all keyframes in the Timeline, Ctrl+C to copy them, then go to frame 39 and paste them with Ctrl+V
Keep pasting those keyframes wherever you want to emit particles on the Timeline.

Timeline example for Collision object:

Now here comes the problem: depending on what kind of scene you have and how and where you want the particles to emit, killing the particles normally takes (at least) one frame, so they exist for one frame and will be visible. If your scene setup allows it, you could disguise this by having the emitter hidden by another object so that those killed particles stay inside there.
If you are rendering with Cycles you can use the Age output of the Particle Info in the Shader Editor for the particle material. Plug Age into a Greater Than node to check if Age > 1. This information can be used as a Mix Factor between a Transparent Shader and the normal particle material, this makes the particles appear at an age of > 1. This is probably the best, because you can hide the Collision object and don't need another object hiding the killed particles.


How to switch Camera Defocus on 1 object to another?

You can do this by using an empty as the focus target, then animate the empty from one location to another over time.


Why does the 3D Viewport's Start Clip have no effect in Ortho view?

The reason is "when perspective is disabled only the far Clip-End is used":

  A large clipping range will allow you to see both near and far objects, but reduces the depth precision.
  To avoid this...

  increase the near clipping when working on large scenes.
  decrease the far clipping when objects are not viewed at a distance.

  When perspective is disabled only the far Clip-End is used, very high values can still give artifacts.

  This is not specific to blender, all OpenGL/DirectX graphics applications have these same limitations.

(Source: Blender Manual via Campbell Barton)


Render in Real Time? Fasten Render Times?

it depends of your gpu/workstation, gtx 1060 doesn't handle 4k well, you should try to reduce render samples , you should take a look to this tutorial made by Blender guru, aimed to get a smaller render time: click here , by the way if you want something closer to real time rendering, you can reduce samples in preview mode, then you could use rendered mode in blender

you could try:

rendered: 128

preview: 32 or 64

but be careful of it, the less samples, less quality you'll have
but you will have more shorter render times

here is another tutorial to achieve similar "real time rendering" workflow  like evee engine used in last version of blender, but instead, in the oldest versions without the brand new real time rendering engine "evee" ,

hope this can be useful for you, cheers


Why doesn't my Custom Pie Menu work after restarting Blender?

You haven't told Blender yet how to load this code on Startup. Two methods are available:

using the register checkbox you mentioned
turning your code into an Add-on

While the second method might seem more daunting in the beginning, it is the way more flexible way. The first method requires you to rename the Text data block (the tooltip of the register checkbox tells you this) to have a .py extension:

Only when the extension is .py as in the screenshot, registering is available. It then doesn't matter if the Text datablock is a part of the Blend file, or if it is an external text. You can use register and it should load and register when you open a file that contains it. However, that means every time to add that Text datablock to your file, check register, save and reload. It's not exactly nice to work like this.

The Add-on workflow is much more flexible: All you need to do with your code itself is to add an information dictionary that tells Blender hey, I'm an Add-on, offer to load me. It looks like this:

import bpy
from bpy.types import Menu

#    add relevant code to tell Blender that this is an addon
bl_info = {
    "name": "Name of your Addon",
    "author": "Your Name here",
    "version": (1, 0, 0),
    "blender": (2, 75, 0),
    "description": "a more descriptive text of what your addon does",
    "category": "User Interface"
}

This tells Blender what name the Add-on has, who wrote it, where to show it in the Add-on manager, the version of the Add-on and most important the minimum Blender version needed to run it. The rest of your code is identical to what you already had:

#    spawn an edit mode selection pie (run while object is in edit mode to get a valid output)
class VIEW3D_PIE_template(Menu):
    #    label is displayed at the center of the pie menu.
    bl_label = "Beddalls Pie Menu"
    bl_idname = "mesh.beddallpie"

    def draw(self, context):
        layout = self.layout

        pie = layout.menu_pie()
        #    operator_enum will just spread all available options
        #    for the type enum of the operator on the pie
        pie.operator_enum("mesh.select_mode", "type")
        pie.operator("mesh.noise")
        pie.operator("mesh.vertices_smooth")
        pie.operator("transform.vertex_random")

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

    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name = "Mesh")
    kmi = km.keymap_items.new("wm.call_menu_pie", "E", "PRESS", shift = True, ctrl = True).properties.name = "mesh.beddallpie"

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

if __name__ == "__main__":
    register()

    bpy.ops.wm.call_menu_pie(name = "VIEW3D_PIE_template")

When you save this file (again using a .py extension) into your Add-on folder (see the file path locations here: https://docs.blender.org/manual/en/dev/getting_started/installing/configuration/directories.html), you can - after restarting Blender - enable it in the Add-on manager:

after enabling the checkbox, make sure to also click Save User Settings to always have it enabled on startup. Now, when you continue to work on the Add-on, you can edit this .py file directly. After saving, you can hit F8 to ask Blender to reload all Add-ons, or restart Blender.


What is the difference between Spin and Spin Duplicates?

Spin tools creates a revolution surface from the selected geometry, while the Spin Duplicate operator creates a circular duplication kind of "polar array" of the selection.

Current issue I see is that apparently using the tools from the toolbar doesn't seem to automatically set the correct operator preferences, making them by default behave the same unless you manually untick the Duplicate option which seems like a bug.


You can use Proportional Editing.

Start with a default UV sphere
Move the top vertex upwards
Check ✓ Proportional editing, Falloff > Sharp and adjust to your liking


How to round decimal places of vertex positions?

This is quite easy to achieve but it won't affect Blend filesize - vertex coordinates are held as 32-bit float values. Rounding to a limited number of decimal places will not affect the number of bytes needed for each vertex. However, if you were to export the mesh to another format (eg, XML, CSV, or other human-readable format) then it could potentially reduce the size of the file considerably as you suggest.

To achieve this, open the 3D-View properties panel (N) and set the Display grid Scale to the desired precision - ie, if you wanted to round to 2 decimal places (eg, 1.23) then set it to 0.01.

Then, in Edit mode, select vertices you want to change (or all with A) press Space and type Snap Selection to Grid. This will snap the selected vertices to the grid specified in the Scale property.


Cut out shape in mesh without messing up the mesh completely!

You'll want to use custom normals. Blender has a data transfer modifier which allows you, among many other things, to copy normals from one mesh to another.

Keep your untouched mesh as the source for the normals and make a copy of it.
For the copy, add the boolean modifier or whatever you want to use to cut it.
On the copy, in the Data Tab, turn on Auto Smooth and click Add Custom Split Normals Data. We do that to allow the use of custom normals.
Add a Data Transfer modifier to the copy. Set the untouched source as the modifiers' Source Object. Turn on face corner data, and in the dropdown menu right to that, select Projected Face Interpolated.
Finally you can apply the data transfer modifier and delete the normals' source model.


How can i fade a background/object with black border?

I think that the solution for you is in this link: http://wiki.blender.org/index.php/Doc:2.4/Tutorials/Composite_Nodes/Setups/Blur_the_Background
Although I don't know why, but it doesn't work for me. I tried many combinations and ended up with this kind of method (which is experimental). I don't think that this is the proper node setup, but the result is quite fine as you can see below:

Go to Compositing Nodes window and set up the nodes as shown below. Add a Map Value node (Add-->Vector-->Map Value) and experiment with its Offset and Size values.

As I said, I don't think that this is a proper method of doing this, but I wanted to share it with you. It may work for you, but if not, please tell me in comment and I'll delete this answer.


Viewport shading option "shadow" not displaying shadow

The option works fine in 2.92. Maybe take a look at the options (little gear icon):


The colors are the same on the whole body, but there are much more hairs on the wings, thats why it looks darker. Probably the vert density isn't even on the whole mesh and that causes the uneven hair count. Try to modifiy the advenced settings.


Keep in mind that when you add a primitive (such as a cube), you can only adjust its defining dimensions immediately after creating it.

Once you add the second cube you can find the controls to adjust its dimensions at the bottom of the left hand toolbar (accessed by pressing T), or by pressing F6.  As soon as you perform another action Blender "forgets" that the added mesh was a cube and doesn't consider its geometry any different than the rest of the mesh so from then on you can only adjust it's size by manipulating the geometry directly.


Modelling problem: How to get rid of "Edgeless Edge"

It's probably the result of a highly non-coplanar face.

In that case, the edge is of one of the triangles created not by you, but by the viewport renderer in the course of giving you a shaded image.You could make the edge explicit by hitting CtrlT - 'Triangulate Faces'.


I found the Curve Object Output node has several hidden inputs including Bevel Start and Bevel End. Nice Work!


How to combine two curves for a camera animation

You will need to apply the modifier

I'm not sure what the width will do, but I think you shouldn't have it unless you need it for some sort of visual for yourself.


How to reverse camera direction tied to a path?

Create the curve.
Add the cube, create a constraint for it: Follow Path, enable "Follow Curve" and click the "Animate Path" button.
Add the camera, parent it to the cube. At the beginning of the scene, set it to point along the path. Set a Rotation keyframe for the position before the camera should 'reverse'.
Go to the frame / time when you want the camera to rotate, add a second Rotation keyframe to the camera.

Example file below:


If you are in your UV Editor, you could select a Polygon Face of any island and then hit L on your keyboard to select the island , after that you could assing a material.

Hope that helps.

Good Luck


Duplicate rotate vertices around obect origin?

There are 2 aspects to the definition of the rotation: its Orientation (the direction of the axis of rotation), and its Pivot (the location of the axis of rotation).
In the illustrated Adjust Last Operation panel, you are being offered only the Orientation. If you set the working Pivot to '3D Cursor' in the header, and, in Object mode, with your object selected, ShiftS > Cursor to Selected, the pivot should be on the object origin ('the orange dot'), and you should be good to go.
(You can bring up the Pivot options by hitting keyboard  . (period).)
This assumes one of the Orientation options you are being offered is OK. If it isn't, you may have to create a Custom Orientation for the rotation by checking the little '+' in the Header > Transform Orientation dropdown.
And here, there seems to be a bug in my recent 2.91. The panel does not offer you your Custom Orientation, along with the others.
It still works.. supposing I set my orientation from a face, then  Shift D R Z, the orientation will still be normal to the face, and  Shift D R Z Z will still revert to Global orientation.


Ok so based on your comment, I can tell you that you will need at least an always brick or sensor to activate the scripts. So you can't dodge that one.

Afterwards you can put them all in the same script, but it is not recommended cause of possible delays and cause you miss some of the good stuff blender has.