text:
Making Textured Surface Emit Light
In cycles render, I would like to make a textured surface emit light while the texture is still showing. Tried various methods (some suggested here) but haven't really found a solution. The ideal resolution would be if I could make the surface emit light but not lighting itself (so the texture remains visible). Is something like that possible?
This is what I have:

You can add texture to the emission shader too. Just plug it in the color shocket.

https://blender.stackexchange.com/questions/58272/making-an-emission-shader-emit-a-different-colour-of-light-than-the-colour-assig/58280#58280

You can mix your texture with Emission Shader through Light Path > Is Camera Ray.
This way you can have basically two shaders at once.
You can change Emission Color and plug base color texture to it.

oh yes of course  ;)

This has done it; yours is the correct answer. Thank you!

So what have you tried so far? Have you tried to duplicate your object, give the copy a higher Emission Strength and make it invisible to the camera?

Create a copy of your object and duplicate its material.
Scale the copy or move it above the original object.
Go in the Properties panel > Object > Display and choose Maximum Draw Type > Wire to make it easier to manipulate in Object mode.
Go in the Properties panel > Object > Cycle Settings and deactivate the Camera option to make your object invisible in Render mode.
Give this copy a higher Emission Strength so that it emits more light than the original and can enlight its environment.

I consider duplicating the object a messy hack; so, no, I have not considered it. In all honestly, if there is no elegant solution, I'd rather place a light source inside my object and make the emitting surface slightly transparent, or even place an area light right in front of it.

sure it's not perfect, it's just a quick trick that will give a good result most of the time though. About what you say, for example if you use an area light it won't project the texture all around, I thought you wanted this, so maybe putting a light source inside your object is the best (and most realistic) solution in your case...

Actually I think Cgslav has given the elegant solution  ;)

... algorithms model diffuse inter-reflection which is a very important part of global illumination

You are not understading blender node system and global illumination principles.

An important concept to understand when building node setups is that of the shader socket. The output of all surface and volume shaders is a shader, describing lighting interaction at the surface or of the volume, rather than the color of the surface.

Do not use texture as shader: use diffuse or other to simulate the physical properties of the material.
You need to iluminate textured surface by other light source, world or volume.

Self illuminated

Inderect illuminated by volume and world background for a 0.01 white


text:
During Texture Paint, Shadows and Lights Create Distorted Colors
I am trying to do some basic texture painting in Blender 2.81 but basically cannot see my base colors because shadows and lights shining make everything darker and obscured. I have included the image below to illustrate my dilemma.
What is the optimal environmental setup for texture painting where I can see the colors evenly from all angles?

You can make changes to your viewport to create a flat color response in the same place you choose matcap or solid, etc.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Unexplained Redish Tint on Transparent Texture in EEVEE
I have a transparent plane with an also transparent texture on it. My problem is that from certain angles, a reddish tint appears on the edge of the texture, and I cannot explain how it got there. Can anyone help me explain what it is and how to get rid of it?
I put every relevant information onto this screenshot:

I believe that is an issue with the actual image.

I thought so too, but checked the image and it has no red aside from the lower right part. You can actually see it on the image where I show the texture in the UV editor. Also, it renders perfectly fine in Cycles.

Add a mapping node.Texture coordinate to mapping if not then the issue maybe with EEVEE.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How to group nodes in Sverchok?
From node tree type, I can easily group nodes by easily add Frame (layout>frame). However I use Sverchok add one in which there is no such layout like node tree type at all.

@magarijn - It's a beta feature, if you have problems please contact the sverchok github issue tracker.

Select the nodes you want to group and click Create a node group .
To put nodes in a frame select them then hit Shift+P .

Just to update this question, in Sverchok, Grouping see "Monads".
https://github.com/nortikin/sverchok/pull/809
Lots of useful information at GitHub thread. Copy and paste from Sverchok Github pull request:

"Group Nodes"
codename: Monads
Similar to Blender's Shader Trees, Sverchok now how as its own implementation of Group Nodes and we use the same keyboard short cuts.
shortcut   behaviour

Ctrl+G  Group selected nodes (relink to peripheral nodes)
Shift+ Ctrl+G    Group selected nodes, but don't link peripherals
Alt + G Un-group the active Group Node
Tab    Enter or exit group

Group Nodes have not been tested by many people yet, and that is why we are presenting it to you to help us break it in new and unpredictable ways. We expect that many eyes will help us make the feature more robust. Please use the issue tracker to send us questions / bug reports.
Features

Automatic socket creation by dragging noodles to the Input / Output nodes.
The Tool Panel lets you Delete/Rename/Move/Recast (to different socket type) sockets
Old beta groups are automatically updated
Append works
Link mostly works

Known issues
Known issues are fluid and should be checked on the remaining issues thread on the issuetracker

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Fluid simulation render is distorted (video example included, Blender 2.75a)
See video sample HERE
Here's another example
This has happened on multiple projects -- this was only a test project I made. When I create a fluid simulation, bake, and render it, some of the frames render out distorted (and those frames take a much longer time for Blender to render; the others work much quicker).
My question is, why is this happening? And is there a way to fix it?
UPDATE: Seems to be related to the motion blur, exclusively in the Cycles engine. When I turn motion blur off, the distortion - both geometry distortion and shading distortion - appear to be gone. When enabled, they occur.
Running Blender 2.75a x64 on Kubuntu 15.04 x64, KDE Plasma 5.3.2, and rendered with 2x Nvidia GTX 660's via Nvidia CUDA for Linux. Latest proprietary drivers used.
Thanks!

Good question. I see two problems occurring - one with the geometry and another with the shading. Which does your question pertain to, or is it both? Also, the first video appears to be using the Blender Internal render engine, while the second is using Cycles. I just want to confirm, are you experiencing this in both render engines?

Mentalist, it's both. I haven't tested this with Blender Internal; the engine I used in the samples should have been Cycles. I discovered in other forums that this is a limitation with fluid simulation and motion blur while rendering. Blender can't render a fluid simulation with motion blur, otherwise (evidently) you end up with issues like these.

Good to know. Seems you found the answer, so why don't you go ahead an post your comment as an answer? It would help shorten the list of unanswered questions and may help others who are looking for the answer.

I discovered in other forums that this is a limitation with the fluid simulation and motion blur effect while rendering. Blender can't render a fluid simulation with motion blur, otherwise you end up with issues like these. Disabling motion blur will result in fluid rendering fine.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Pin/Parent Vertex of OBJ1 to Vertex of OBJ2
Is it possible to parent/pin the vertice of one object to the vertice of another object? Essentially parenting, but on a vertice basis instead.
For example, two cubes have a corner overlap, those two vertices are pinned together. If I move the "parent" cube, the "child" cube's corner will distort, following.
This may seem like an odd question, because you can accomplish the effect with bones, but for my application, that would produce a ton of bones to manage, along with weight painting and such.
Any help is appreciated.

if you select two objects, you can hook a vertex from the last selected (after entering edit mode) to "selected object", ie to the last object selected (to its origin). You could move the origin to a vertex in this last object... but it's not ideal
Or, you can do this, perhaps better:

from the object 1 (the one that has the vertex you wish to pin to), select the vertex and move the 3d cursor there (Shift+S > "cursor to selected")
then add a new empty, and move it to the 3d cursor (Shift+S > "selected to cursor")
then parent the empty to the object 1
then selected the empty and then the object 2 with the vertex you wish to pin to the object 1 vertex
enter edit mode, and select the object 2 vertex to be pinned
from mesh > vertices > hooks > "hook to selected object" (the empty)

if I got it well...

I know what that does, but "if I got well" what OP asks, to get what he wishes, ie to "pin" a vertex from object 2 to a vertex of object 1, I think he needs to do as I wrote above. Maybe I got it wrong though... your alternative to 1,2,3 creates the empty but the vertex is hooked to it, not viceversa... so the other object could be pinned to ? the empty ? so, not to the other vertex, as I believe he asked... the empty must "stay" where the obj 1 vertex is. SO, hooking the empty, is exactly like hooking the parented obj vertex vertex lying there.

Thanks OP & @cegaton - This will help me cut down on the number of bones I need to get my desired effect.

@Jason Ford good! btw, OP = original poster, ie, you :) https://en.wikipedia.org/wiki/Internet_forum#Thread


text:
Finding the lists of connected indices associated with disjoint mesh elements
Is there a fast way (without looping over all edges/faces/verts) using ops.mesh or bmesh to get the lists of indices associated with mesh islands as shown below? These islands are part of one mesh but are disjoint from each other.

I know how to select the boundaries by running the operator Select boundary Loop or calling bpy.ops.mesh.region_to_loop() but can't find any API calls to return the vert/edge/face indices associated with the individual islands.

did you try using vertex groups?

thanks. but vertex groups I guess is something I need to create myself, it doesn't get created automatically by blender when the mesh is split into different parts. no?

consider a re-title to this question, to "Finding the lists of connected indices associated with disjoint mesh elements". -- I think this would describe better the goal of your question.

Ok I am answering myself (If someone has another solution I will be happy to try it).
It seems that there is not direct API call in Blender that can get you the list of faces/edges in each subpart/loop of the mesh. Luckily it seems there is a very nice workaround to avoid looping through all edges of the mesh to find closed circles, and this is done by combining different mesh operators.
Check this link for full explanation and code: https://ammous88.wordpress.com/2015/03/31/blender-get-mesh-sub-groups-boundary-loops-in-python/
using bmesh:
import bpy
import bmesh

mesh_name = 'my_mesh'

bpy.ops.object.mode_set(mode='OBJECT', toggle=False) # Go to object mode
for ob in bpy.context.scene.objects:
    if ob.type == 'MESH' and ob.name == mesh_name:
        ob.select = True
bpy.ops.object.mode_set(mode='EDIT', toggle=False) # Go to edit mode
bpy.ops.mesh.select_all(action="DESELECT") # unselect everything

bm = bmesh.from_edit_mesh(bpy.data.meshes[mesh_name]) # load mesh
bm.faces.ensure_lookup_table()

loops = list()
faces = bm.faces
while faces:
        faces[0].select_set(True) # select 1st face
        bpy.ops.mesh.select_linked() # select all linked faces makes a full loop
        loops.append([f.index for f in faces if f.select])
        bpy.ops.mesh.hide(unselected=False) # hide the detected loop
        faces = [f for f in bm.faces if not f.hide] # update faces

bpy.ops.mesh.reveal() # unhide all faces
print("Mesh has {} parts".format(len(loops)))
print("The first face in the first loop/subpart is {}".format(bm.faces[loops[0][0]]))

you can add your code and some explanation in here, in case the link is dead ,and  to make this a complete answer

good point guys

@zeffii no i didn't change it maybe because you didn't have any object selected at the beginning. but anyhow I just modified so that I make sure the object is selected before we go to edit mode.

I've added full code here. I didn't add it fully in the first place because some parts of the code depend on your scene.

I've toggled into edge mode, subdivided the geometry, deselected all, switched back to object mode and run the script, but it selects all edges instead of selecting the outer borders. What am I doing wrong?

@poor, all the script does is give the face indices associated with each separate ("disjoint")  mesh island.  I think perhaps the introduction image is a little misleading

Ahh. I see  - thanks @zeffii. You are right, I misunderstood the question. Thought the issue was to select the egde loop...

I'll give an alternative answer based on your own answer.
This slightly modified version of your script assumes the active object is appropriate for the operation. something like:

with bmesh:
import bpy
import bmesh

obj = bpy.context.active_object

bpy.ops.object.mode_set(mode='EDIT', toggle=False) # Go to edit mode
bpy.ops.mesh.select_all(action="DESELECT") # unselect everything

bm = bmesh.from_edit_mesh(obj.data) # load mesh
bm.faces.ensure_lookup_table()

loops = []
faces = bm.faces

while faces:
    faces[0].select_set(True) # select 1st face
    bpy.ops.mesh.select_linked() # select all linked faces makes a full loop
    loops.append([f.index for f in faces if f.select])
    bpy.ops.mesh.hide(unselected=False) # hide the detected loop
    faces = [f for f in bm.faces if not f.hide] # update faces

bpy.ops.mesh.reveal() # unhide all faces
print("Mesh has {} parts".format(len(loops)))

print("\nThe face lists are:")
for loop in loops:
    print(loop)

The output of the script is visisble from commandline/console
Mesh has 5 parts

The face lists are:
[0, 1, 3, 7, 8, 9, 10, 11, 27, 31, 32, 33, 34, 35, 36, 40]
[2, 24, 25, 26, 28, 29, 30, 38, 39]
[4, 17, 18, 19, 20, 21, 22, 23, 41]
[5, 6, 12, 13, 14, 15, 16, 42, 43]
[37]

This corresponds with the indices, proof using index visualizer:

thanks. this is a proof for the previous answer. however it assumes that the desired object must be selected. the previous answer is more generic as it takes the mesh name as input. but this is definetly helping

@wsfax Selecting the object makes sense in terms of usability and is a common operation in blender. Not only in this case it's simply more flexible to selecting the object, instead of hard coding the mesh name value. With a slight modification you could iterate through all objects in your scene and this makes it really powerful. :)

I answered it this way to focus on the functional part of the code, the selection and checking is not the focus. I like the code though, it makes great use of the mesh operators.

@poor selecting is useful when you use the GUI. This question is more scripting oriented, i.e: for people using blender to batch tasks. that's why I found giving the mesh name as input more useful

I needed this function as well. But i found that the above answers have a serious issue with runtime when the mesh becomes big and contains many small islands. I tested the accepted answer above on a mesh with 20000 faces and about 350 Islands. My computer needed about 15 seconds to resolve the task.
I did not want the user to wait for such a long time, So i made some dumb experiments. And after some epic failures i finally found a way to get the same task done in about 0.1 seconds :)
def get_islands(ob, min_vcount=1):
    island_id    = 0
    island_map   = {}
    islands      = {}

    def merge_islands(parts):
        iterparts = iter(parts)
        first= next(iterparts)
        for part in iterparts:
            src  = islands[part]
            islands[first].update(src)
            for key in src:
                island_map[key] = first
            islands[part].clear()
        return first

    for poly in ob.data.polygons:
        parts = sorted({island_map[index] for index in poly.vertices if index in island_map})

        if len(parts) > 0:
            id = merge_islands(parts)
        else:
            id = island_id
            islands[id] = {}
            island_id  += 1

        island = islands[id]
        for vert in poly.vertices:
            island_map[vert] = id
            island[vert]=True

    return [island for island in islands.values() if len(island) >= min_vcount]

I am not sure though if this works for all cases. Also this can possibly be written much nicer. Please let me know if this is a working solution and feel free to beautify the example. Thanks

I like this version, 1 million faces, 544 islands took 5 seconds.

How to modifiy so it returns face indices ?

Is possible integrate your solution for separe island in this question? https://blender.stackexchange.com/questions/167290/is-there-a-low-level-alternative-for-bpy-ops-mesh-separate


text:
Python: Check if vertex is on camera field of view

Suppose I have the following camera perspective.
As you can see some of the Cube vertices are visible from the camera, others are not.
Is there a way from python to detect if a certain vertex is in the camera field of view or not?

related http://blender.stackexchange.com/questions/14711/does-cycles-use-a-camera-frustum-check

import bpy
import bmesh
from mathutils import Vector
from bpy_extras.object_utils import world_to_camera_view

scene = bpy.context.scene
cam = bpy.data.objects['Camera']
obj = bpy.data.objects['Cube']
mesh = obj.data
mat_world = obj.matrix_world
cs, ce = cam.data.clip_start, cam.data.clip_end

assert obj.mode == "EDIT"
bm = bmesh.from_edit_mesh(mesh)

for v in bm.verts:
    co_ndc = world_to_camera_view(scene, cam, mat_world @ v.co)
    #check wether point is inside frustum
    if (0.0 < co_ndc.x < 1.0 and
        0.0 < co_ndc.y < 1.0 and
        cs < co_ndc.z <  ce):
        v.select = True
    else:
        v.select = False

bmesh.update_edit_mesh(mesh, False, False)

I am trying to run the above code in Blender 2.8, but it throws errors.  Is an update possible?

For Blender 2.8+ replace the last line with bmesh.update_edit_mesh(mesh). Make sure the object is in Edit mode.


text:
Is there a way to render out an animation from the 3D view?
Is there a way to render a sequence of frames from the "3D view" (not the final render, but in solid mode, for example), except the screen capture?

Click the movie icon beneath the 3D View

Here is the menu venue

Pazhalasta Konechna

That's a fancy indicator arrow you got there...


text:
How to get Blender's version number from Python?
How do I go about programmatically getting the Blender version number?
Example: If I am running Blender 2.76, how would I get the version number from the python console?

Just out of curiosity, why do you want to do that with python? It seems much easier and faster to me to simply click on the splash screen.

bpy.app.version_string
Test using the python console:
>>> bpy.app.version_string
'2.83.2'

Usage within a script file:
import bpy
print(bpy.app.version_string)

which will print the actual version to the system console window:
2.83.2

bpy.app.version
If you're looking to compare version numbers, it's easier to do this using bpy.app.version which will always be a tuple of 3 ints, (major, minor, subversion), eg: (2, 76, 0)
So you can compare the version number with regular comparison.
if (2, 76, 0) > bpy.app.version:
    print("Your Blender version is too old!")

Either open up a Text Editor area or just switch the Workspace to Scripting. Create a new document with the following contents and click run script or just press AltP:
import bpy

print(bpy.app.version_string)

In the main menu bar go to Window > Toggle System Console to display the requested blender version in Blender's Console Window.

How this is different to the existing answer?

Would point out the OP asked for python console code, no print necessary. Those of us using Linux or Mac versions of blender do not have the toggle system console menu item.   Agree with @brockmann comment, this adds very little in way of new information.


text:
How to access all selected files from a file selector in Python?
I'm working on an addon that uses an ExportHelper class to implement a file import dialog.  I want the user to be able to select multiple files, but the filepath variable that is populated is just a string with one filename in it.
How can I modify my class to be able to import multiple files at once?
My current operator looks like this:
class SlideshowAddSlide(bpy.types.Operator, ExportHelper):
    bl_idname = 'slideshow.add_slide'
    filename_ext = ''
    filter_glob = bpy.props.StringProperty(
        default=types,
        options={'HIDDEN'},
    )
    def execute(self, context):
        print(self.filepath)
        return{'FINISHED'}

You can access files for any operator using the file-selector, by defining a files collection of OperatorFileListElement.
Here is a complete example of an operator that opens a file selector and prints the paths you select.
Note: you may want to test os.path.isfile(filepath) since its possible to select directories too.
import bpy

from bpy_extras.io_utils import ExportHelper
from bpy.props import (
        StringProperty,
        CollectionProperty,
        )
from bpy.types import (
        Operator,
        OperatorFileListElement,
        )

class SlideshowAddSlide(bpy.types.Operator, ExportHelper):
    bl_idname = "slideshow.add_slide"
    bl_label = "Add Slide Show"
    files = CollectionProperty(
            name="File Path",
            type=OperatorFileListElement,
            )
    directory = StringProperty(
            subtype='DIR_PATH',
            )

    filename_ext = ""

    def execute(self, context):
        import os
        directory = self.directory
        for file_elem in self.files:
            filepath = os.path.join(directory, file_elem.name)
            print(filepath)
        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.slideshow.add_slide('INVOKE_DEFAULT')

If anyone has a problem using ideasman42's Code example in blender 3.0:
The Properties have to be declared with a : instead of a = in order to work now. I have used quite some time to find that out, maybe it helps someone else.
So this would look like this:
files: CollectionProperty(
        name="File Path",
        type=OperatorFileListElement,
        )
directory: StringProperty(
        subtype='DIR_PATH',
        )


text:
How to get the UV corresponding to a vertex via the Python API?
How do I get a selected vertex and it's corresponding uv vertex?
A vertex I can get with
bpy.context.active_object.data.vertices[0]

A uv vertex I can get with
bpy.context.active_object.data.uv_layers['UVMap'].data[0]

But the index is not the same for uv and mesh vertex.

In your first line you retrieve a vertex from the active object's mesh, in the second line you retrieve the uv layer from the active object's mesh, and you don't need to add '.data[0]'. What you are refering to as the "index" of the uv map is its name itself, there is not way you will have a correlation between a mesh's vertices index and a mesh's UV_layer

As madlaina says, A vertex doesn't have a 1:1 corraspondance with UV coordinates.
However using BMesh you can loop over a vertices connected face corners (loops), and find the UV's used by a vertex.
Heres a script that prints all vertices UV's in editmode.
Both the first-uv found (which is OK if you assume all UV's attached to a vertex will be the same).
And the mean average.
import bpy
import bmesh
from mathutils import Vector

obj = bpy.context.edit_object
me = obj.data
bm = bmesh.from_edit_mesh(me)

def uv_from_vert_first(uv_layer, v):
    for l in v.link_loops:
        uv_data = l[uv_layer]
        return uv_data.uv
    return None

def uv_from_vert_average(uv_layer, v):
    uv_average = Vector((0.0, 0.0))
    total = 0.0
    for loop in v.link_loops:
        uv_average += loop[uv_layer].uv
        total += 1.0

    if total != 0.0:
        return uv_average * (1.0 / total)
    else:
        return None

# Example using the functions above
uv_layer = bm.loops.layers.uv.active

for v in bm.verts:
    uv_first = uv_from_vert_first(uv_layer, v)
    uv_average = uv_from_vert_average(uv_layer, v)
    print("Vertex: %r, uv_first=%r, uv_average=%r" % (v, uv_first, uv_average))

exactly what I was looking for. Thank you!

The thing you need to consider is that a vertex can have multiple uv-coordinates
(for example if you unwrap two faces then there are two uv coordinates for one vertex where the seams are)
The UV Coordinates are actually stored per face-loop and not per vertex.
It is a good idea to read up on this here to understand the concept better:
https://wiki.blender.org/index.php/Dev:Source/Modeling/BMesh/Design
Maybe you can give us more information, what you would like to do with the uv coordinates.

As already said, a vertex can be associated to multiple UVs. That's because, from 3D authors' point of view, UV editing is done distributing polygons (not vertices) over the texture surface.
I propose here a snippet to scan the association between polygons, vertices and UV coordinates running in Object mode (no BMesh).
import bpy
import mathutils

src_obj: bpy.types.Object = bpy.context.active_object
assert src_obj.type == 'MESH'

# get reference to mesh
src_mesh: bpy.types.Mesh = src_obj.data

# Get basic UV info
active_uv_idx: int = src_mesh.uv_layers.active_index
active_uv: bpy.types.MeshUVLoopLayer = src_mesh.uv_layers[active_uv_idx]

print(f"Info for uvlayer {active_uv_idx} '{active_uv.name}' on object {src_obj.name}")

#
# Iterate over the polygons of the mesh
for poly in src_mesh.polygons:
    assert type(poly) == bpy.types.MeshPolygon
    assert len(poly.vertices) == len(poly.loop_indices)

    # For each vertex of the polygon, and uv loop indices
    for v_idx, loop_idx in zip(poly.vertices, poly.loop_indices):
        assert type(v_idx) == int
        assert type(loop_idx) == int

        # Get the UV coords
        # U increases on width (left to right), and V increases on height (bottom to top!)
        uv_coords: mathutils.Vector = active_uv.uv[loop_idx].vector
        assert 0.0 <= uv_coords.x <= 1.0
        assert 0.0 <= uv_coords.y <= 1.0

        print(f"UV in poly {poly.index} for vertex ID {v_idx} and loop ID {loop_idx}:", uv_coords)

print("All done.")

Discretely commented and heavily typed :-)
Output will be something like:
Info for uvlayer 0 'UVMapUVshpere' on object UVSphere
UV in poly 0 for vertex ID 4 and loop ID 0: <Vector (0.7500, 0.4375)>
UV in poly 0 for vertex ID 3 and loop ID 1: <Vector (0.7500, 0.5000)>
UV in poly 0 for vertex ID 13 and loop ID 2: <Vector (0.7188, 0.5000)>
UV in poly 0 for vertex ID 14 and loop ID 3: <Vector (0.7188, 0.4375)>
UV in poly 1 for vertex ID 474 and loop ID 4: <Vector (0.7500, 0.8750)>
UV in poly 1 for vertex ID 473 and loop ID 5: <Vector (0.7500, 0.9375)>
UV in poly 1 for vertex ID 6 and loop ID 6: <Vector (0.7188, 0.9375)>
UV in poly 1 for vertex ID 7 and loop ID 7: <Vector (0.7188, 0.8750)>
UV in poly 2 for vertex ID 477 and loop ID 8: <Vector (0.7500, 0.3750)>
UV in poly 2 for vertex ID 4 and loop ID 9: <Vector (0.7500, 0.4375)>
[...]


text:
How to use icon previews from bpy.data.images?
I want to use the template_icon_view to display a set of images from bpy.data.images.
I know there is bpy.utils.preview which has a load function to load in external images. Is it possible to feed a template_icon_view with internal images?
What would be the proper approach to create an enum property with the images?

Actually, I asked that two weeks ago, here's the answer:
http://blender.stackexchange.com/questions/47504/script-custom-previews-in-a-menu

Hi Ray, yes.. I have seen this question. My problem is that this thumbnails are generate of external images. I want to use internal images that are not stored somewhere on the harddrive. The bpy.tils.preview module needs external images to generate that previews.

Data-blocks store their own previews, so you can access bpy.types.ImagePreview.icon_id
The icon_id can be passed to UI elements that take an icon value.
eg:
import bpy
for image in bpy.data.images:
    print(image.name, image.preview.icon_id)

This will print the id of already loaded icons.
One area I'd need to look into is how to generate icons from images. The interface does this automatically, but you may want to generate the images on demand (as far as I can see we don't have a direct API call to do this).

Heres a fully working example of using image previews in Blender's interface.
# Run this script and check the object properties.
import bpy

class ImagePreviewPanel(bpy.types.Panel):
    bl_label = "Image Icons"
    bl_idname = "OBJECT_PT_image_icons"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout
        for image in bpy.data.images:
            layout.label(image.name, icon_value=image.preview.icon_id)
        if not bpy.data.images:
            layout.label("No images!")

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

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

if __name__ == "__main__":
    register()

It seems I have exactly that problem. I get the icon id and the template_icon_view generates the items based on the created enum. But the icons are empty.

The icons should work in enums too, if you have issues here could be different question.

I have a question concerning the part how to generate icons from images. Is there a way to manually trigger an icon to be generated?

Unfortunately this method that I find quite obvious and right, does not always generate a preview, it probably depends on the format and size of the image. The blender itself does not seem to generate previews of such images, it seems to happen on some png images in 2k. I think it's a bug or if it's not it creates big problems.


text:
How to get Blender's temp directory via the Python API?
How do I get blenders temp folder via python (bpy).
I want to store temporary cache files while running Blender and when closing Blender I want them to be removed on exit.

Python's tempfile module.
First of all, Python has its own tempfile module, which is quite comprehensive and can likely do what you need(handles creating, temp files, directories and optionally - cleaning up when you're done).
Blender's User Preference
If you want to access the temp user preference, you can do so via.bpy.context.user_preferences.filepaths.temporary_directory
... which is initialized based on environment variables (See Environment Variables in the manual).
Blender's 'session' Temp Directory
However Blender crease a sub-directory within the temp directory, for each session, which is cleared on exit (even in the case of a crash).
And this is accessed via bpy.app.tempdir, in the case you describe, this sounds like it may be a good option.

Note that it may work well to use the tempfile module, even if you access Blender's temp directory using Blender's API.


text:
How to run a Python callback when Blender exits?
Is it possible to get a callback before Blender closes?
There are bpy.app.handlers. Unfortunately there is no handler for closing Blender.
So is there a way to to know in a script when blender is about to close?

While we could support this via bpy.app.handlers, we decided not to add this since Python already supports exit callbacks, so you can use these (outside of Blender too - for any Python script).
See Python's atexit module.
Simple example use:
def goodbye(name, adjective):
    print("Goodbye, %s, it was %s to meet you." % (name, adjective))

import atexit
atexit.register(goodbye, "Suzanne", "nice")

Note : To unregister the callback when disabling an add-on for instance, you can use :
atexit.unregister(callback)

ok. This works. But I have a problem with it. When running the script from blender this function gets registered. But when putting it into an addon I get this error:
Error: EXCEPTION_ACCESS_VIOLATION

Try find which line causes the error, This will run when Blender is shutting down - so its possible you access data which is already freed.

I know this post is very old, but I wanted to add information in case anyone finds this post because of the same problem. If you try to access your add-on's preferences during this event, you will get an access violation error. I was able to access several things from Blender, but not my own addon's preferences. In my opinion, Blender should notify add-ons of a shutdown BEFORE any data is released.

where do you use atexit.register? i tried placing it in the add-on def register but it doesn't seem to work


text:
How to get transform values that would be set from inserting visual key-frame for pose bones?
I have some bones with any number of constraints.
I want to get the visual transform matrix of that bones that takes also into account when for example a stretch to constraint modifies that bone.
So basically the output of setting keyframes with Visual LocRotScale setting.
This would be really helpfull for exporting bone data.

The page of PoseBone.matrix says

Final 4x4 matrix after constraints and drivers are applied (object space)

You can convert the matrix from object space to local space calling Object.convert_space
Edit
The comment of convert_space explicitly states that this can not be used for visual keyframing. For the simplest options with

Inherit Rotation
Inherit Scale

enabled. You can get the local transform for the bone like this

def get_mat_offset(pose_bone):
    """ calculate the (local) rest matrix of the bone
        needs to be multiplied with the parent's pose matrix
        to get the rest matrix in armature space """
    bone = pose_bone.bone
    mat_offset = bone.matrix.to_4x4()
    mat_offset.translation = bone.head.copy()
    mat_offset.translation.y += bone.parent.length
    return mat_offset

pb = obj.pose.bones['Bone.001']

if pb.parent:
    mat_offset = get_mat_offset(pb)
    mat_pose_parent = pb.parent.matrix

    mat_rest_inv = mat_pose_parent * mat_offset
    mat_rest_inv.invert()

    matrix_basis = mat_rest_inv * pb.matrix

else:
    matrix_basis = pb.bone.matrix_local.inverted() * pb.matrix

Further you can decompose the matrix calling mathutils.Matrix.decompose
loc, rot, scale = mat_basis.decompose()

This answer was incorrect. An (unvalidated) python port of blender's posing code can be found here.


text:
How to get the class type of a Blender Collection Property?
I am looking for class types of blender property objects.
I am looping over some properties in a scene and want to operate on them when they are bpy.types.CollectionProperty.
My custom property is for example stored in bpy.data.scene[0].my_custom_collection_prop
Here is some pseudo code:
for key,value in bpy.data.scene[0].items():
    prop = getattr(bpy.data.scene[0],key)
    if type(prop) == bpy.types.CollectionProperty:
        do something

type(prop) gives me <class 'bpy_prop_collection_idprop'> which is not bpy.types.CollectionProperty. So I don't know how to compare both.

Here is an example showing whats intended, it runs but doesn't find the type:
import bpy
from bpy.props import StringProperty, CollectionProperty

class MyCollectionProperty(bpy.types.PropertyGroup):
    name = StringProperty(default="")

bpy.utils.register_class(MyCollectionProperty)
bpy.types.Scene.my_collection_prop = CollectionProperty(
        type=MyCollectionProperty)

scene = bpy.data.scenes[0]
for attr in dir(scene):
    prop = getattr(scene, attr, None)
    if prop is not None:
        if type(prop) == bpy.types.CollectionProperty:
            print(prop)

ID.items() is going to give you custom-properties, which is lower level and bypasses properties created by bpy.props, I suspect you want to iterate over attributes, instead of custom-properties.
You can do this instead:
scene = bpy.data.scenes[0]
for attr in dir(scene):
    value = getattr(scene, attr)
    if type(value) == bpy.types.CollectionProperty:
        print("something", attr, value)

The example above uses Python's dir and getattr functions, you can also use a Blender specific method of introspecting properties.
scene = bpy.data.scene[0]
for attr in scene.bl_rna.properties.keys():
    value = getattr(scene, attr)
    if type(value) == bpy.types.CollectionProperty:
        print("something", attr, value)

This limits the properties to Blender's data-api, and wont include functions for example.

Here is a working example based on the example in your question:
import bpy
from bpy.props import StringProperty, CollectionProperty

class MyCollectionProperty(bpy.types.PropertyGroup):
    name = StringProperty(default="")

bpy.utils.register_class(MyCollectionProperty)
bpy.types.Scene.my_collection_prop = CollectionProperty(
        type=MyCollectionProperty)

scene = bpy.data.scenes[0]
for attr in dir(scene):
    prop = getattr(scene, attr, None)
    if isinstance(prop, bpy.types.bpy_prop_collection):
        if bpy.types.Scene.bl_rna.properties[attr].fixed_type == MyCollectionProperty.bl_rna:
            print(prop, "found")

This used Blender specific data-api introspection (bl_rna).
Note: You may want to use isinstance.

it seems type(value) == bpy.types.CollectionPropeHrrty is not the same.
Here is an example file:
https://www.dropbox.com/s/2ulhscx54oti1bq/property_type.blend?dl=0

You should writing scene = bpy.data.scene[0] with an s to scenes if you expect sth run !

Corrected the error.

Another solution which doesn't rely on knowing the collection items' type beforehand.
Get the property special dictionary construct by accessing the holder's (bpy_struct.id_data) custom properties (barely documented bl_rna.properties), and get the property by name using bpy_struct.path_from_id.
import bpy
from bpy.props import StringProperty, CollectionProperty

class MyCollectionProperty(bpy.types.PropertyGroup):
    name = StringProperty(default="")

bpy.utils.register_class(MyCollectionProperty)
bpy.types.Scene.my_collection_prop = CollectionProperty(type=MyCollectionProperty)

def get_class(collection_prop: bpy.types.CollectionProperty) -> type:
    prop = collection_prop.id_data.bl_rna.properties.get(collection_prop.path_from_id())
    return type(prop.fixed_type) if prop is not None else None

assert MyCollectionProperty == get_class(bpy.data.scenes[0].my_collection_prop)

Note this will only work if the bpy.props.CollectionProperty is a direct member of a bpy.types.ID instance. In the case where a collection property is held in a property group you can use something like :
def get_class(collection_prop: bpy.types.CollectionProperty) -> type:
    holder_path = ".".join(repr(collection_prop).split(".")[:-1])  # Get the path to the prop and remove the last element
    holder = eval(holder_path)
    prop_name = repr(collection_prop).split(".")[-1]
    return type(holder.bl_rna.properties.get(prop_name).fixed_type)

It's a bit more hacky but more extendable.

Thank you very much for your answer! :) I have a small tweak so we avoid a loop. It seems like .id_data.bl_rna.properties behaves like a dict and the following works too: return type(collection_prop.id_data.bl_rna.properties[collection_prop.path_from_id()].fixed_type) (you might want to have intermediate variables for readability)

@AlexLoss Oh right that makes sense ! Thank you I'll fix it.


text:
Rotate subdivided plane with x+y locked
I’m wrapping my head around one issue that seems pretty simple:
Cube with loop cut.
Picture: I want to rotate the top planes and keep their x/y coordinates.

I don’t want to do it with proportional editing for multiple reasons

I want to start out with a flat plane.
Additional: Is there a command to align edges/vertices between two endpoints?

Next time use more isometric view.

Use the Shear Transform from the Mesh > Transforms menu. I see you are still in 2.79. I would really recommend updating, because the Shear Tool in 2.80, which does the same thing is much more intuitive to use.

shear tool works fine, thanks.
Only thing: I have to be in iso frontview to shear along y

Or move one edge up the z-axis and the opposite one down by the same amount. Be careful not to cross the loopcut line, though. Shear tool, 2.7x at least, seems to work only along the x-axis and with faces so you need to rotate your object before.

And note that once you’ve moved them to different z-positions, you can just Scale Along Z (s z) to adjust the shear magnitude more precisely.


text:
How can I make an object appear in timeline at a certain frame?
How can I add a specific object to my timeline at a certain frame?
I want to add a flag which should float over a pre-baked water fluid simulation. I baked a drop falling into water. After frame $120$, when the distortion becomes less turbulent, I want a flag to appear on its surface with a transparent text. But how can I tell the timeline that the flag object should start appearing at frame $120$ and that it shouldn't be influenced or be seen by physics before that time?

In addition to @pinky-the-bat's answer, you can also keyframe the render. Select the flag object and go to keyframe $119$. Then in the Outliner, click the camera render icon to disable rendering and press i while hovering over that icon to create a new keyframe. Then go to frame $120$ and enable the camera render icon and press i again to create another keyframe. Now the flag object will only appear in the render output starting at frame $120$.

Select your object (your flag in this case) then go to "object properties." Click on the "visibility" tab and click on "ray visibility." Turn off the check mark next to "camera." Hover your mouse over the empty checkbox and press i on your keyboard to add a keyframe. Once that's done, scrub through your timeline and find the timestamp where you want your flag to be shown and re-check the checkbox next to "camera" then press i to add another keyframe. It will be visible in object mode, but you won't see it when you render your animation. Let me know if this helped.


text:
How can I make a black glass pass light through it?
I want to render a black colored glass and make light pass through it. But if I give the glass Nodes and Transparency Nodes it changes the color of the glass into transparently white. How can I keep the glass black and make light pass through it?
I don’t have a photo of it, but how it be done?

Reference image of desired result would be helpful.

For Cycles, that can be disabling shadow ray visibility:

You can use the light path node's camera output to control a mix shader's factor input. Then plug your glass shader into the second input and a transparent bsdf into the first input. This will make the object visible to the camera, but invisible to other surfaces, so effectively light will pass through it.

Thank You . I got the result it was very helpful


text:
Is it possible to use the startup.blend UI layout in older files?
Is there a way to open files without changing the UI layout?
Sometimes in older files the layout will be in the old 2.4x style, which can be annoying.
One way would seem to be appending everything in, but that gets tedious with having to do it over again and again for objects, materials, textures, etc.

When loading the file from the blender file browser uncheck the Load UI checkbox, which is on the left hand side in the toolbar, to ignore the layout in the file to be loaded:

Note: that this will keep the UI of the current file. It may help to reopen the startup file (Ctrl+N) to restore your default layout, and then open the file without loading the UI.
You can also go to File> User Preferences> File and uncheck the Load UI checkbox in the Save & Load section and save your user settings so that this is the default behaviour for blender when opening files:

In newer versions you need to click on the gear on the top right of the window to see the LoadUI option.

If you want to disable "Load UI" per default you can do so in the User Preferences
Ctrl + Alt + U or in the Topbar Edit >Preferences

In Blender 2.79 and earlier this was not possible.


text:
Rendering Transparent objects with the Cell Fracture addon?
Is there a way to render transparent objects that have been pre-fractured with the Cell Fracture addon?
I know you can kind of get this to work by parenting the original object to one of the shards (or simulating it by itself) and swapping the visibility of the objects when the shards fly apart:

However, It is obvious that it suddenly breaks the entire object on impact and just doesn't really look right. (the animation is slowed down at that point so it is more visible)
Is there a better way to do this?

The object switch appears to be happening one frame to soon (pre-shattering). Having some small fast moving fragments would help sell it too.

Just wondering, how did you switch the sphere to the multiple shards with animation?

@DantheMan I animated the render visibility in the outliner (right click on the camera that toggles render visibility and pick insert keyframe), so the shards were all hidden and the sphere was visible until the frame before the shards broke apart, then I switched it so the shards were visible and the sphere was hidden.

You'll probably also want to increase the bounces so that it doesn't look so dark initially

@GregZaal Yes, this was just a very quick render to illustrate the problem, though that probably would help.

Although being very late to the party, i would suggest the Fracture Modifier Build as a possible alternative. There you have a possibility to auto-hide inner faces, auto-merge the cracks (well its distance based, so its a  bit limited... means if the distance is lower than the threshold again, the face will be hidden again) and "fix" the normals of smooth, fractured meshes.
Btw this is a prefractured mesh here.
Would look like this for a very quick render of a glass sphere.

Links to builds are here
https://blenderartists.org/forum/showthread.php?343637-Custom-Build-Blender-Fracture-Modifier
or here (latest windows build): http://graphicall.org/1148

Take advantage of the node compositor and render layers. If you put the original (non-fractured) object on a separate render layer, you can smooth out the transition. Basically, the idea would be to reduce the opacity of the original object's render layer over the span of a few frames rather than use the hard swap that you currently have. Stretching that transition over more than a couple frames will make the change less apparent.
This can also be done from the VSE, but you'd need to either use separate scene strips or render the animation twice (once with the original object and once with the fractured object).


text:
BI how to use the Defocus node with images as plane
In blender internal, there's seems to be a problem when using the defocus node with images as plane.  The Z-pass doesn't see the alpha of the image.  How can I fix this?

Well, as you put, the internal render doesn't see the alpha of the image it can only see the alpha of the object and this can't be changed. This is a common limitation of the internal renderer's depth of field.
An often used workaround is to model with geometry the outline of whatever the texture is so that blender can see the alpha. For example if the texture was a leaf you would have to model the outline of the leaf before applying the texture to it. Of course, this might be time consuming for a complex texture but unfortunately that's one of the few workarounds.
An alternative method is to render the plane with the texture onto a separate render layer and manually blur it in the compositor using a standard blur node and then layer it back onto the background.


text:
Color correction in the compositor from the video editor
How can I connect clips from the timeline in the video editor to the compositor to add some nodes-color correction, rgb curves etc., to every single clip, or to all of them at once?

Second part of my answer might help you out a bit.

If you are already working on the video editor and just want to do color correction, then you can do it with an Adjustment Layer:

Press Shift + A and add Effect Strip > Adjustment Layer.
Press N to bring the Properties panel, scroll to down to the Modifiers and from the Add Strip Modifier drop down menu, you can select whatever you want this strip to do: color balance, curves, etc.

It will affect the strips below, meaning it can affect several strips (several footage clips) at the same time.

Since 2.77 you can append-copy Modifiers to other selected strips if only needed on some of all strips in your VSE. That enables some more flexibility in adjusting not all strips in a given time period but only a few of them.

You probably want to have same effects in VSE as in a compositor. You can do it through scene strips. Go to the compositor add new scene, check 'use nodes' option and connect to 'compositor' output node, then go to your VSE and add scene strip. Now you can switch back and forth between two editors and use them as you like (the only thing is that it really slow process)
More Detailed Explanation:
every time you create a new scene you create new composite
(I think 'after effects' and every other compositing software has this concept),
in your composite you have your images videos etc. you change colors apply effects and so on,
when your composite is ready you go to VSE add scene (composite), you have composited, and do your video editing.
you can import multiple scenes and every scene can have multiple images and videos, if you've worked with software like Photoshop or GIMP you are probably know how layers work, so in Blender's Compositor you can have same effect by using 'Mix' node, it sort of stacks your images, videos and 3D onto another and by choosing right blend mode you can achieve desirable effects,
you have to keep in mind though that blender uses top-to-bottom stacking order instead of bottom-to-top like Photoshop, GIMP etc. Also keep in mind to activate Compositor in 'Post Processing' panel. Oh and if you have in your VSE viewer 'Open GL Preview' enabled it will render only your 3D even though you composited it.
Advice you will hear quite often is to render each composite as image sequence first and add them in vse instead of using scene strips, performance wise it would result in a huge gain.
You also can watch this video: http://www.blendernation.com/2013/06/14/tip-caching-node-compositing-using-vse/
it sums up the whole process.

thanks orustammanapov for the suggestion, Could you please comment on how to apply the scene built in node editor to the channel in the VSE? thanks

@Fabrizio I edited my initial post, I hope it'll help, if not let me know, I'll try again.

You must remember that the VSE strips are unique to the VSE. You can load movie clips elsewhere (tracker, compositor) but they do not correspond with the VSE directly. The only way to import media from elsewhere in Blender (IIRC) to the VSE is via Scene strips or Masks. A VSE Movie clip strip is only a local, unique instance of another datablock elsewhere in Blender.
The VSE only uses local instances of external media.
The actual current solution is to define other scenes as wrappers for external media. That is a scene would be named for the camera clip or shot that it holds. This scene would have a Compositor set for grading the shot and its corresponding audio strip on its own VSE timeline.

In your master edit scene, you add the camera native strip and this Composited/color grade scene strip and Meta strip them together (making sure to sync both to start at their first frame). You would then cut with the metastrip (using a proxy of the footage if required) and at picture lock, switch to the graded scene strip.

This workaround(?) fails to provide correspondence between the edit and the source footage however, so multiple grades from alternate sections of the same source media could be an issue. This depends on length of source of course, as single short shots probably don't change much. While long screen captures or wild recordings can last hours (changing all the time).

And you must remember that this solution is useful for single shot effects, like Color Grade, Chromakeying, Masking, Blur effects and image alterations. But it won't reflect any VSE mixing effects, like dissolves or alpha overs between shots.

Related: http://blender.stackexchange.com/a/42928/2843

If you have clips in the Sequence editor and Sequencer is enabled, they will be used to render. In Render settings > Post Processing:

They will be effected by the composite nodes if Compositing and Composite nodes are enabled.
You can add clips into the compositor with the movie clip node (Add node > Input > Movie Clip)

From the manual:

In addition to modelling and animation, Blender has a fully functional
Video Sequence Editor as well as an advanced node-based editor that
also manipulates a video stream. Compositing Nodes operate equally
well on images or video streams, and can apply detailed image
manipulation on the stream.


text:
How to create a bent spring?
I found and followed a tutorial from youtube to create a spring but I found that it can't bend.
I want to create a jack in the box so I want the crown to be able to hang down to scare someone. The model doesn't have pose mode and I can't use bones to rig or weight paint it. What am I doing wrong here?

Do you have an armature selected when you try to go into Pose Mode?

You're going to have to abandon the method used in that tutorial if you want a bent spring that looks natural. Using a lattice will not preserve its volume. Just the same, using a curve deformer on the final spring will also not preserve the volume — even if you try to get smart and use nothing but curves. I tried it! It doesn't work.

Here's the 5-minute walk-through of my method:

Make an 8-sided circle.

Select one vertex. Press V to rip it from the rest of the circle. Right click or press Esc to cancel the transform. You should now have a "belt loop" that looks like a circle, but is disconnected at one point.

Select one of the ends, turn on proportional editing in the "connected" mode, and set the falloff curve to "linear".  Press G to grab, press Z to lock it in the upward direction and viola! You are now stretching your spring! (Note: you need to scroll up until the proportion is greater than the circumference of the octagon. You want the bottom point to leave the floor. This is good because it means you linearly affected all the points.)

Add an Array modifier with "Merge" turned on, and "1" unit in the Z of the Relative Offset section.

Add a Subsurf modifier with the setting at 1. This turns the octagon shape into a circle shape.

Add your bezier curve and the curve modifier to the spring. For smoothest results, I set my modifier to affect "Z". Of course make sure that the spring object and curve object share the same location and that the first point in the bezier curve is at its center point.

Fatten the line of points up with the new Skin modifier! While we could have used a Bevel on a 3D curve, this method ensures that the spring has no volume until after the deformation takes place resulting in perfectly uniform wire. Set the shading on the modifier to "smooth"

Lastly, smooth the whole thing out with one last Subsurf. I like mine at a setting of 2 or higher.

I tried this and something went wrong with the skin modifier.  I got some pinch points where it did a bad job of choosing the orientation of the squares surrounding the edges.  I was able to half-repair it by hand, but the orientations were skewed enough that it was still a bit of a problem.  If the skin modifier weren't dodgy, this method would be perfect.

Huh. It didn't used to do that, but you're right. It sure does now. Looks like we have a bug, folks.

This is still a problem in 2.79.

This works great in 2.80. We're ready for the future, y'all.

If you only want to bend it in one direction, putting a simple deform modifier after a screw modifier would probably be the easiest solution.
To be more precise: Screw modifier (360°, Scren ~5, Steps >10, Iterations >5), below it a SimpleDeform modifier set to "Bend", the angle that you want your spring to be bent and a controlling Empty that is oriented to define the bending axis (Z axis of the empty defines the rotation axis).

Note that unlike Wray Bowling's solution, this does not maintain the thickness of the spring, so it should not be used for small radiuses of the bending in comparison to the radius of the spring itself.

You can model the spring using any method, either an Array modifier or a Screw modifier and then use a curve modifier to deform and animate the spring. (Animate the both the curve and spring at once, or use hooks to move the control points of the curves)
Create a simple circle and move it away from it's origin in edit mode

Add a screw modifier

Add a curve modifier.

Note that the origin of the curve and the spring must be in the same place in order for it to follow the curve properly. You may also need to rotate the spring on the Y axis by 90 degrees depending on how you setup the spring and curve modifiers.
To animate the curve, simply create a hook (Ctrl+H) for each of the curve's control points and animate those.


text:
How to get the caption of a text object in Python?
I've got a Blender file with a lot of text objects and I want to do some scripting modifications on specific text with specific caption.
Is it possible to get the caption of a text curve in Blender?
For example, in the image below the caption that I want to find in Python is: 'This is a test'

Text mesh? If it is a text curve you can get it's content via text_curve.body. You can get the text curve either from text_curve=bpy.data.curves[text_curve_name] or from an object using it text_curve=obj.data.

Mmmh yep I've used the wrong term. Of course I use a text curve :S

Yes, you can access the text via the body attribute,
Example:
# assume active object
obj = context.object
curve_text = obj.data

print(curve_text.body)

# set a new string
curve_text.body = "This is a NEW test :)"


text:
Unwrap Faces Without Distortion
Is it possible to unwrap a series of connected faces and make them keep their proportions relative to each other for precise texture placement?
I have a wall structure that has rounded corners, and when I unwrap it, the faces do not keep their proportions relative to each other, resulting in distorted/stretched textures when applied.
There must be a way to make faces keep their relative size.
I attached an image that hopefully illustrates my problem:

I have read most of these but not all. I’ll see if I can find and answer and if so, I will delete my question.

I've found the solution in this: https://blender.stackexchange.com/questions/118273/how-to-evenly-unwrap-texture-long-extruded-objects-with-folds-and-uneven-segme (it was hard to find because it doesn't have a good title and was ranked at the bottom). Anyway, mine is clearly a duplicate. What would be the best course of action? Delete? Or add more detail and answer it, so people can find it more easily in the future than the other answer?


text:
Why Does Blender Distort UV Maps By Default?
I have a simple question: why does Blender distort UV maps by default?
To illustrate my question, here is what Blender does with a UV map of a very simple mesh of a wooden barrel:

And here is what you get with a similar mesh in (I think) Maya:

The difference is staggering: the one in Maya is nice and clean with no distortion and, more importantly, full use of the available texture real estate, while the one in Blender is distorted and with a lot of "dead space."
Why does Blender do this? How can I get a normal UV unwrapping with isles that is not distorted and uses all or most of the available texture space?
I have tried conformal UV unwrapping, but other than a slightly smaller distortion it was the same awful unwrapping.

Part of the problem is what you mean by distortion. I think you're unwrapping a barrel here, so those crescent shaped sections are because the circumference of the barrel is smaller toward its tapered ends. The unwrap is actually less distorted, but also significantly less useful for texturing and efficiency. That said, there are frequently cases where a simple and optimal unwrap is easy, but Blender still has trouble hitting it.

You are absolutely right. I was in the wrong here!

It depends on the model you have as well as the UV deployment method you have chosen, and where you have marked your seams.
The following is documentation on the general workflow of UV unwrap and its use in industry https://conceptartempire.com/uv-mapping-unwrapping/
Here is a blender tutorial on how UV works https://www.youtube.com/watch?v=Y7M-B6xnaEM
In this other tutorial you will see more advance UV workflow of blender https://www.youtube.com/watch?v=L3654VGZObg&feature=emb_title
Notably through the use of add-ons simplifying life by integrating tools to optimize the UV space(Tex tools, UV Packmaster...).

Your mesh is triangulated. You might like to select all in edit mode and do Alt J to convert it to quads. The straightening addons work on quads.


text:
Rigid body physic simulation error?
I want to create an animation with a ball that hits a lot of boxes.
The movement of ball must happen in a few fractions of a second > 5 frames:

here is my blend file v2.8, same bug in blender 2.79
https://drive.google.com/open?id=1yI7ClLijo1Ktlw_jCPS6PqY5VyZ-Gd0r
First of all, I made sure that: I checked the normals, increasing the scale of the objects, I applied all transforms for scale, position and rotation
set Origin > origin to geometry, I increasing the Steps per second and Solver Iterations in the Rigid Body World settings (I tried with the maxima 1000 and 100), I set collision shape to Mesh and tried 0.4 or 0 as margins and source to final, I increased the size of all objects
Is possible to create an animation like this in blender?

For the cylinders, set the Collision to "cylinder", And use my settings under the " Rigid Body Dynamics " For the SPHERE, set the dynamics to "animation"
Under Rigid body Dynamics,
Enable " Deactivation "
Enable "Start deactivation"

thank you, but doesn't work ...

Do you see the picture I uploaded?

This answer, although 'accepted', doesn't seem to answer the question.

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


text:
Are eevee volumetrics always going to be confined to square shapes?
Far as I can tell eevee will always render any shape with a volumetric material applied as a cube or rectangle, as opposed to say a sphere or something a bit more complex.
Is this a hard limitation? Or something that might change later.

I don't think it is a hard limitation, you can render smoke with eevee with complex geometry.


text:
weird smoothing issues
So new to Blender but semi-versed in MAX so sorry if my wordings a little off. I have a weird shading issue, I have this smoothing issue visible in the screen capture, I've tried using the smooth function in the edit>shading menu, I've also tried flipping normal and neither change anything. My modifiers are, subdivision surface and mirror modifiers. Any tips would be greatly appreciated.

So what areas are we talking about? Eyes, mouth, cheeks...? How does the topology look like? Tris, quads, ngons? Oh, so many questions...

There might be few point that you want to know:

You don't get enough subdivision times, usually not going further then 2~3 times. Ctrl1~0 within object mode can set sub-modifier.
Your mask (I guest?) topologies are not suitable for subdivide, it has some holes with special case that blender nowadays can not resolve well. See the reference: Subdivide
The smooth shading AFAICT use Gouraud Shading in the view-port fast rendering. There is fake normal in the calculating pipeline, you might confused that by another common shading: Phong Shading.

No need to worried about it since in Cycles render, it use try tracing with other method to calculate the color and normal.


text:
Can Blender use a GPU's remotely? (over a network)
I work for a mid-size company. All employees are Mac based. A colleague and myself have been tasked with modelling and rendering. We will be using Blender / Cycles. The Macs GPUs are rubbish and I would like to know if there is a method we could use to get Blender to use server-mounted GPUs?

To clarify: my colleague and I will be working on iMacs using blender to model and render. The Macs GPU is not up to the task so efficient rendering is not available using just the iMacs. How do we point Blender to recognise the GPUs on our server over the network to perform this task more efficiently?
Thanks
JK

What makes a server different from a regular desktop system in this context?

This question is a bit vague. Assuming you can run Cuda or OpenCL on these GPU's, then the answer is yes. Some render farms use GPU's on amazon's cloud for example (see renderstreet).

I would like to know how we can get Blender to work locally at our desks on these iMacs and also have Blender recognise that the rendering (every time we press F12 plus the interactive rendering (shift + Z)) must be done on the GPUs in our remote servers across our network?

This is different to your original question, it wasn't clear you wanted to remotely use a GPU from a Blender instance running locally.

To clarify: my colleague and I will be working on iMacs using blender to model and render. The Macs GPU is not up to the task so efficient rendering is not available using just the iMacs. How do we point Blender to recognise the GPUs on our server over the network to perform this task more efficiently? Thx.

No, there is currently to have a local Blender instance access a remote GPU to make use of it from Cycles. *
There is a network-rendering component to Cycles however this isn't ready for production use, and nobody is actively developing it.
Alternatives:

Use a render farm (send your files to the server).
Use a remote-desktop login to the faster system (using standard remote desktop access).

... though realistically you may be better off to get a computer that supports swapping out graphics cards.

* Probably this has done under some special conditions, however I'm not aware of this being something you can do right now with off-the-shelf software and hardware. And while rCuda exists its only free for academic use, and Cycles would need to be modified to support it.

Well, that is a bit unfortunate. As a last stab at the issue, we have four Python programmers here in the office, would they be able to relatively quickly code a solution / develop that network rendering component? I'd like your input before i go bother them!

Likely its quite a large project (C++), linked to wiki page on network rendering inline.

As stated Cycles can't currently use networked hardware for rendering, but I know about these two third party solutions. I have never tested or used them myself, so I can't really vouch for their usability or quality.
I think they are both virtualization software for Blender and Cycles that allow using remote computer's hardware to render. Not sure if they will help for your specific case but I'll leave them here anyway.

Loki Render: https://sourceforge.net/projects/loki-render/
GPU Box http://www.renegatt.com/products

Thanks guys. Loki is a standalone renderer (save file, open new app, load and render) so not quite what I'm after. GPU Box holds a bit of promise but isn't available on OS X. rCuda seems to be the closest match for my needs but way over my technical skill level; will, however, present all options to the tech guys and see what bubbles to the surface. Again, thanks very much.


text:
how to clear parent inverse without actually moving the object
In Blender, a parent-child relationship stores the relationship between the 2 objects created when parenting.
This is normally OK, but in some cases its useful to have a reset loc/rot/scale, align the child exactly with its parent.
I need to reset those extra matrices in blender object - I have an object that is perfectly aligned with it's parent, but the euler rotations values say something very different. I need a script to have this object's rotation at 0,0,0 (or, potentially other value, which expresses the real rotation offset to it's parent)

You can reset the parent inverse matrix, then apply the relationship between the original matrix and the parents onto the child object.
This script assumes you have the child selected.
import bpy
ob = bpy.context.object

# Store a copy of the objects final transformation
# so we can read from it later.
ob_matrix_orig = ob.matrix_world.copy()

# Reset parent inverse matrix.
# (relationship created when parenting)
ob.matrix_parent_inverse.identity()

# Re-apply the difference between parent/child
# (this writes directly into the loc/scale/rot) via a matrix.
ob.matrix_basis = ob.parent.matrix_world.inverted() @ ob_matrix_orig

Note, if the child has any shearing because of rotation and the parents non-uniform scaling, that will be removed, since loc/scale/rot can't represent shearing.

The matrix multiplication on the last line doesn't seem to work in Blender 2.80, seems like something changed.

Updated for  2.8x

I went ahead and implemented this as a blender plugin for both 2.79 and 2.80+, if anyone is interested. https://github.com/drewcassidy/blender-apply-parent-inverse


text:
How to re-link files which have paths that have become invalid (can't be found)?
I have a Blender project with planes with image textures on them, but the images aren't being loaded. I'm pretty sure I have the images as well, but the person who uploaded all this apparently didn't keep the original folder structure. Where can I see (or edit) the file location for the images?
Note that I'm a new user.

"external data" was the magic keyword phrase I didn't know. I found a lot of other posts, including this one: http://blender.stackexchange.com/a/3088/13484 - thx @Denis

The Info Editor tab can be dragged down revealing a console with a dump of all of the external data error messages.

To re-link missing files, open file menu, then choose External Data -> Find Missing Files, and select the folder where the image textures are located. File names have to be the same as they are in the blend file.
The files are found based on matching names, the folder is searched recursively, so you can for example point it at the base of your project path, to perform a more extensive search.

That found some of them. The Report feature there is nice, too, though it only shows one file at a time. After applying the Find Missing Files, a brief list of a bunch of a alerts popped up, but they didn't last long.
For my edification, is there also a way to individually select the images in the object hierarchy and change the file attached to the texture?

Ah, this may have answer some of my question: http://blender.stackexchange.com/a/3088/13484

@chrismo, you can drag down the file header to see all reports.


text:
How to bend only selected vertices?
I have the following problem which I do not know how to resolve by using blender.
I want to bend a bit of an object but I don't know how to achieve this result by just selecting few faces and not the entire object.
Below there is an image to explain myself better:

How can I do this?
Also, is it posible bending just by using Y/X axis blocking the Z axis ?
Thanks

The Bend Tool can be used to do what you are trying to achieve.  Select the components  you want to bend, position the 3D cursor at the point where the bend will pivot then press ShiftW

You might want to include details about position of mouse cursor relatively to 3D cursor while bending.

That's all in the linked documentation.

See this meta post. The main reason for elaborating in your answers here on SE is allowing future readers not to go through links and read what you expected them to understand. Provide them with quotes / summary of link along with it.

You can also use the
Simple Deform Modifier
The control of size and angle of the bended mesh is a good advantage.
The Bend deformation of the Modifier bends the mesh over the Z axis.
It's advisable to add a new Object and join it to the other Object after setting up and applying the Simple Deform Modifier

1. Add Edge Loops

In Edit Mode press Ctrl + R
Hover the mouse over the desired position. A pink Edge Loop appears.
Use the mouse wheel to determine the number of Edge Loops.
Confirm with LMB

2. Positioning of 3D Cursor

Select the vertices where your 'curve' should start to bend.
Press Shift + S and choose Cursor to Selected.

3. Add Empty and Simple Deform Modifier

In Object Mode press Shift + A to add an Empty at the 3D Cursor.
Select the object and go to the Modifier Tab. Add the Simple Deform Modifier.
You have the choice of four deform methods. Click on Bend.
Choose the Empty as the Origin of the deformation.
Select your desired Angle.

Now You can adjust the Empty:

Rotate to control the axis.
Translate to control the origin of deformation.
Scale to change the deform factor.

Scaling and translation on Z axes has no influence with these settings

Note:
In Your case the bended Object need the right Position and Rotation to join it with original Object. You can achieve this easily with Copy Attributes Menu Add-on

One way to accomplish this is to use Proportional Editing.
You can determine the shape by selecting a type of "Falloff from the dropdown menue (In this example I used Sharp).

Select the top vertices ,or any appropriate vertices.
Press G to grab them a circle will then appear around your cursor. The size of this circle is controlled by your mouse wheel and determines how many additional vertices are affected.
Pressing X, Y, or Z will constrain the direction to that axis.

While still using proportional editing, you can also make use of your 3D cursor location to base the origin of your rotation off of it, instead of your default location.


text:
How to use presets for operator properties?
Is there a way to use Blender's preset system for operator attributes? I. e. preset menu inside operator redo panel (F6).

You can enable presets for an operator using the PRESET option.
eg:
class SomeTool(bpy.types.Operator):
    bl_idname = "object.some_tool"
    bl_label = "Some Tool"
    bl_options = {'PRESET'}

    # - snip -

The preset directory will be set based on the operator name and created on demand.


text:
Python, OpenGL to pick geometry only defined in the script
Here is a scenario in my addon.
There are faces (triangles, quads, polygons) drawn by bgl. They may not have the corresponding Blender mesh counterparts. I'd like to click on on a bgl face and to know which bgl face was hit.
So how would you realize picking bgl faces?

Ray Casting
Currently Blender doesn't have an off-the-shelf solution for this.
Currently ray casting can be realized with the functions from mathutils.geometry:

intersect_ray_tri
tesselate_polygon

See also the template Operator Modal View3D Raycastas an example how to deal with viewport coordinates.
However there is a patch to support defining your own BVHTree you can do ray-casts against.
https://developer.blender.org/D966
As an alternative you could use a KDTree written in Python (quite a few exist).
Blender mesh as a proxy
As a workaround you could define a mesh who's only purpose is to perform ray-casts on. You can draw it wire-only:
obj_proxy.draw_type = "WIRE"

Here the obj_proxy variable refers to Blender object which mesh is used as the proxy.
OpenGL picking
You could support OpenGL selection by reading back the pixels of the buffer to see which face is under the cursor. See GL_SELECT or ARB_occlusion_query.
(Am not sure enough of OpenGL is exposed by bgl to perform occlusion queries, it may have to be extended - though this would require a custom build or submitting a patch for a future release).

Custom Blender build isn't an option for me. I am considering a proxy Blender mesh as a solution. Is it possible to change the color and opacity of a specific Blender mesh in the solid mode via python without setting a material?

Only one of the options I suggested requires additions to Blender's source. As for using a proxy mesh. You could do this - just set it to draw wire-only. You could also use material with alpha 0.0. and enable object transparency option.

@ideasman42, just to clarify your comment. I think you suggested 3 options: 1) ray casting (requires a custom build for now) 2) Blender mesh proxy (doesn't require  a custom build) 3) OpenGL (probably requires a custom build)

Ray casting doesn't require a custom build - Python is capable of doing this on its own. You just have to use an existing Python module, or write the code yourself. Eg: http://code.activestate.com/recipes/498121-python-octree-implementation/ (Though suggest using a BVH-Tree)

@ideasman42, This "OpenGL picking" solution is really interesting. Is it possible to extend the selection buffer to enclose all objects already drawn in Blender? As the cube or the monkey etc.

You can use the functions from mathutils.geometry to deal with geometry

intersect_ray_tri
tesselate_polygon

further you can use the functions from view3d_utils to deal with viewport coordinates
From the template operator_modal_view3d_raycast.py:
def main(context, event, ray_max=1000.0):
    """Run this function on left mouse, execute the ray cast"""
    # get the context arguments
    scene = context.scene
    region = context.region
    rv3d = context.region_data
    coord = event.mouse_region_x, event.mouse_region_y

    # get the ray from the viewport and mouse
    view_vector = view3d_utils.region_2d_to_vector_3d(region, rv3d, coord)
    ray_origin = view3d_utils.region_2d_to_origin_3d(region, rv3d, coord)

    ray_target = ray_origin + (view_vector * ray_max)

That means looping through all bgl triangles each time. How could the code be optimized if there are too many bgl triangles?

for static geometry you can use mathutils.kdtree

Not sure if mathutils.kdtree is the right tool here. Image a point P inside a bgl triangle. The point P is located so that the nearest bgl vertex to the point P belongs to another bgl triangle. I can't figure out how mathutils.kdtree could help here.


text:
How to have operator settings not stored for re-use?
I have an add-on that adds an object to the scene and lets you adjust some settings. Is there a way to reset the add-on for each use, so it doesn't use the previous setting on the next object created?

Enable the SKIP_SAVE option when defining the property.
eg:
some_property = BoolProperty(options={'SKIP_SAVE'})

authors: Артём Черный


text:
How to completely remove all loaded data from Blender?
I'm implementing a Blender Python script to do batch conversions.
It works like this:
for each model file found in a directory:

Import the model
Process it
Export in other format

The problem is, that after each iteration, the imported models,
textures/materials and everything are still contained in the (scene?) blender instance.

How do i completely clear everything that is loaded in Blender in each iteration?

2.79 or newer
Note, to avoid having to remove this extra data, you can start a new file with blank scene, objects..., eg:
bpy.ops.wm.read_factory_settings(use_empty=True)
Or...
bpy.ops.wm.read_homefile(use_empty=True)
Old Answer (useful for partially clearing)
This can be done by running 'Reset Factory Settings' operator (then clear the data).
The advantage with doing this is we only need to clear the default Cube, Camera & Lamp. Since 'Reset Factory Settings' will clear everything else each time (images, packed data, curves.. etc).
import bpy

def reset_blend():
    bpy.ops.wm.read_factory_settings()

    for scene in bpy.data.scenes:
        for obj in scene.objects:
            scene.objects.unlink(obj)

    # only worry about data in the startup scene
    for bpy_data_iter in (
            bpy.data.objects,
            bpy.data.meshes,
            bpy.data.lamps,
            bpy.data.cameras,
    ):
        for id_data in bpy_data_iter:
            bpy_data_iter.remove(id_data)

reset_blend()

If you wanted to you could skip calling bpy.ops.wm.read_factory_settings(), but theres a possibility some other data was loaded (curves or lattice for eg) that you don't know about. The clearing function could be extended to test for all possible data, but loading factory settings is an easier way to ensure you didn't miss some.

When I bpy.ops.wm.read_homefile(use_empty=True), I get the warning DAG zero... not allowed to happen! Then later in my script, I get Operator bpy.ops.script.python_file_run.poll() failed, context is incorrect I know that's not the most detailed report, but any ideas how read_homefile() might leave things in a strange state?

for 2.78 reset_blend() is the only one that removed everything for me

@j314erre what data is kept w/ bpy.ops.wm.read_homefile ?

@ideasman42 I'm rendering 100's of images in a loop and the rendering time would shoot up from less than 1sec to over 1min per image. Using bpy.ops.wm.open_mainfile() helped the bpy.ops.wm.memory_statistics() not grow, but the rendering time keep going up steadily. Your reset_blend() function solved the problem for me, keeping rendering time fast for 1000's of images.

ideasman42's idea to reset everything to factory settings is pretty interesting. However, if you want to keep the current settings you can remove the unlinked data blocks, if you are willing to use Blender's Python API. This way you can make sure there will never be any memory leakage what so ever. You can execute the following code after you load each object or every couple of times (say every 10 objects).
First remove the meshes/objects with the following code:
for obj in bpy.context.scene.objects:
     if obj.type == 'MESH':
         obj.select = True
     else:
         obj.select = False
 bpy.ops.object.delete()

where you can check type against any of the following values according to [this documentation][1]:
[‘MESH’, ‘CURVE’, ‘SURFACE’, ‘META’, ‘FONT’, ‘ARMATURE’, ‘LATTICE’, ‘EMPTY’, ‘CAMERA’, ‘LAMP’, ‘SPEAKER’]

Then you can execute the following code snippet to remove all the unused blocks. This way you don't have to close/open Blender or save/open a .blend file:
for block in bpy.data.meshes:
    if block.users == 0:
        bpy.data.meshes.remove(block)

for block in bpy.data.materials:
    if block.users == 0:
        bpy.data.materials.remove(block)

for block in bpy.data.textures:
    if block.users == 0:
        bpy.data.textures.remove(block)

for block in bpy.data.images:
    if block.users == 0:
        bpy.data.images.remove(block)

IMPORTANT NOTE: It looks like that there is some dependencies between some data blocks such as mesh, texture, image and materials. If you do not remove the data blocks on the highest level of the hierarchy, you will not be able to remove other data blocks or you have to take the risk and remove data blocks with users more than 0. So make sure you use the code above in the following order to remove data blocks. This way you can remove all unlinked (users == 0) data blocks:
remove meshes --> remove materials --> remove textures --> remove images
The followings also have data blocks:
bpy.data.curves
bpy.data.lamps
bpy.data.cameras

This is also relevant to how you can prevent memory leakage in Blender

No need to select anything. You can override the context: https://blender.stackexchange.com/a/27235/31447

Echo to @Amir's answer, and based on blender 2.8 update, selecting mesh should be done according to the API changes:
2.7x:
bpy.data.objects['Cube'].select = True

2.8x:
bpy.data.objects['Cube'].select_set(True)

This answer comes from:
Python: Selecting object by name in 2.8

While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference.  Link-only answers can become invalid if the linked page changes. - From Review

@RayMairlot Thanks for the comment. Added.

No need to select anything. You can override the context: https://blender.stackexchange.com/a/27235/31447

You can just reopen your blend file with open_mainfile:
bpy.ops.wm.open_mainfile(filepath=bpy.data.filepath)

That will clear-up all data created after file been saved.

This assumes you will be distributing a blend file with your batch processing tools, while it can work it seems an unnecessary step - especially when you only use for clearing contents.

@ideasman42 question does not specify requirements for working conditions, and for a quick production solution my answer is still valid.

Beware that this will clear your unsaved Python script upon execution. Just found out the hard way. :-)


text:
How do I reset the viewport lens angle?
I pressed a button and I cant seem to get back to the normal perspective view, everything looks like it's being seen from a telescope. Orthographic view is still displayed normally but perspective view looks like this.

How can I revert this?

In the View section of the N panel in 3d view, change the Lens value back to 35. it's probably at 3 or something

How did you record this hi-speed gif?

used the built-in screencast, then loaded the images as layers in GIMP, cropped an area, added some extra frame timing to the last frame, then saved as a GIF/animation.

You could try if one or more of the following shortcuts help:

ESC (cancel any actions)
Numpad 5 (switch orthogonal / perspective view)
q (quit game engine)
Numpad 1 (front view)

I don't know what your view actually is, but probably they help.

I'm am on the user perspective view, but some how the perspective view has a high focal length and i don't know where to reduce it


text:
Why are my vertices being mirrored and how do I fix it?
Bear in mind, I am quite new to blender.
I've run into a problem. I'm trying to model a head and I'm creating the vertices and faces, but when I move some vertices another one snaps to a completely unrelated position.
Here are some images highlighting the problem:

All I did in there was move the selected point a little bit back along the y axis.
Do any of you know why this is happening and how to fix it? I really need help on this.

Transformation orientation, modifiers or snapping could be the problem here or something else, a bit difficult to say going on images alone. Can you share the blend file at the time of posting this.

Do you have any modifiers on? Shrinkwrap or Mirror could cause it.

iKlsR: I'm not entirely sure where to upload that, does this site have a dedicated file sharing system? Or maybe a preferred third party?
CharlesL: Nope, no modifiers. I thought it was mirror doing it, but when I removed it there was no change.

@CustardCrusader just use a file sharing service. Dropbox etc. Also, do you by any chance have snapping enabled? Look in the bottom header for a little magnet icon. Is it red?

iKlsR: No, snapping's off, tried that too. Here's the file: https://www.dropbox.com/s/haxj89bht5f0rkp/face%20with%20reference%20glitch.blend

You have X Mirror enabled. Open the toolself with T and untick it, it's under Mesh Options. What this does is that it will try to mimic whatever you are doing on one side of your mesh on the other.

From the wiki.

The X-mirror option of the Mesh Options panel allows you edit both “sides” of your mesh in a single action. When you transform an element (vertex, edge or face), if there is its exact X-mirrored counterpart (in local space), it will be transformed accordingly, through a symmetry along the local X axis.

This didn't affect the mouth area of your model as only half of it was modeled while you had a complete eye ring.

Seems like such an insubstantial thing... Thank you so much, this place seems to have a great community.


text:
How to fill a rectangular hole with an even amount of vertices on either side?
I tried crating faces but it left missing edges. In the end I was left with all the right lines but there was no vertex in the center.

Here's a follow up image in case you're wondering what I mean. Notice how there's no vertex in the center.

tried subdividing, it didnt work. In fact it kinda made a mess. It created a vertice in the mid point of every edge, but that's all. It didn't even make any edges.

An addendum to the answers: after filling the grid, it may be necessary to flip or recalculate the normals in the newly restored part of the mesh.

If both sides have the same number of vertices, you can quickly do this by using the Grid Fill tool (CtrlF > Grid Fill) and tweaking the operator settings. A Span and Offset of 2 should do the trick.

It is recommended to use Grid Fill tool (Mesh > Faces > Grid Fill). I would like to give some further tips for it:

The initial connection pattern depends on the active vertex. In this case, you can avoid additional tweakings on Span and Offset by simly keep the "corner" vertex active before filling. See comparison below:

With non-corner vertex active:

With corner vertex active:

You can also just select a pair of connected vertices of opposite side, then fill, which can also provide a one-stop result.

All in all, the easiest way to this is: In Edge Select mode, AltRMB on any border edge, which will select the complete loop, then operate Grid Fill, which can well handle it at most time (especially for regular holes like this) regardless the active element concern.

Oh my GOSH that tidbit about the corner vertex being selected for grid fill to work properly has finally put hours of googling to and end.   Thank you for your comprehensive and concise answer.


text:
Spin duplicate gives parts - how to spin a complex part of a pipe?
I wanted to get the stretching and pulling out of the mesh with using the spin tool.
The curve tool got used first but the stretching in highly bended areas was way to much.
With spinning it seems to only spin the selected loop.
Toggling the duplicate mode on in the spin mode, it doesn´t close the gaps between the parts.
how can this get fixed?

The Bezier curve seems to ease the stretching but the optimal wished result in this case would be if there was a setting available to say that some parts of the mesh are stretchable and others are not.

I think the only way to do this array modifier + curve modifier.

Method 1:
Build the unstretch parts first, then bridge the loops among them:
.
Demo file for Method 1 is here.
PROS: Can well satisfy what you need in this particular case.
CONS: Quite a bit basic knowledge on blender is needed.

Method 2
Model stretching and unstretching units separately, then bend them individually with the same curve:

Demo file for Method 2 is here.
PROS: Relatively easy to accomplish.
CONS: Unavoidable intersections in final mesh.

This method dosn't use the spin tool, however it will produce a similar result.
1- Create a mesh using only one segment of you pipe

2- Add a curve

3- Add a array modifier to the single segment, changing the fit type to a "fit curve" and select the curve made in step 2. Then ensure the relative offset is set on the correct axies

4- Also to the single segment object add a curve modifier and make it target the same curve as the array modifier. Play around with the deformation axis until it looks as you want it.

5- You're done. Remember that you still can modify the curve shape, in order to shape the pipe how you want it.


text:
How can I use a material from one blend file in another?
I have two .blend files and each one has materials library. How can I have the both materials libraries in ONE .blend file?

See How can I reuse existing materials, objects, etc from an existing .blend?.

Please search around before asking as there is a good chance your question has been asked and answered already.


text:
Can all textures embedded at once?
Is there any function which allows to embed all used textures at once in the .blend file?
I have multiple .blend files with dozens of textures and would prefer not to do this one by one.

The function you want is located in Info > File > External Data:


text:
a quick time+poly saving trick (Remove a section of Edge Loop)
while trying to make a model low-poly I was wondering if there was a way that I could delete an edge and have blender automatically re-join the vertices! To get from the left state to the right state without taking any steps in-between

hit "X" and choose "Disolve edges"

@samd001, be more specific in the title of your question, to help others who want to do something similar, find your Question using the search feature.

@ Chebhou @zeffii

@samd001 is the problem solved

@Chebhou You should add that as an answer

To remove this edges and keep the faces , do the selection and hit X then choose Dissolve Edges  :


text:
Add-on doesn't show up in the Toolbar
I am new to Blender, I've been playing around with it for about 2 weeks now, first time with a 3D software. I've done some tutorials and there are some where I have to go to user preferences and choose an add-on, the first time I did this, it was with the sapling add-on, worked fine, however today when I went to play around with it again, I checked the box, but the add-on settings that usually showed up on the tool bar on the left side of the screen isn't there. for any add-ons. I was really hoping someone could shed some light on why this is?