text:
How to input location of selected Vertex using keyboard only
Anyone with sufficient mouse and chair miles will confirm that learning the keyboard short-cuts for frequently used operations vastly speeds up a workflow.
Today I realized that there are things I use the mouse for that should be doable solely from a keyboard context. One of these things is moving a selected vertex using the Transform toolbar.
My question is: How to enter a new coordinate for an existing selected vertex without using the mouse or the transform toolbar? Preferably absolute Global / absolute Local .
Another reason why absolute entry would be welcome
Another example, but this affects multiple selected vertices, is setting the X component of a bunch of vertices to be locally some absolute value. Especially useful when a mirror modifier needs the center vertices to line up nicely and their median X is not 0. Now the way is to S ,X to restrict the axis, then numeric 0 to unify them (sets them all to the median of their x component), then mouse over to the transform panel and set the median x to 0.

There is a patch that can make this very natural and easy..

that might be worthy of posting it as an answer.

ok, I have used it a bit, will do.

Could you explain the task you are doing that requires entering absolute locations? - I have done quite a lot of modeling to blueprints and never needed this.

You never use the transform panel to set a vertex with the xyz fields? Maybe it's just my old AutoCAD ways..

@ideasman42 only wondering if there was a shortcut I didn't know about, i modified the original text to avoid misleading how often I set verts manually.

probably makes more sense to give as example to set the z component of multiple vertices to one absolute shared value in one go (useful for mirroring geometry).

@zeffii, could you update your question with a more complete example (even 2-3 example usage of this feature would be good).

@ideasman42 ok done,

SHIFT + S and U Cursor to Center
SHIFT + S and T Selection to Cursor
G 1.5 Tab - 1 Tab 1.2 Enter

First step can be skipped when the 3D cursor is already at the center.

this is a fine answer, let's see if it can be done without the cursor steps.

@zeffii: Without the cursor step.

There was a patch submitted last year (been trying to get someone to look at it) that can make this happen very naturally as it builds on the existing functionality we get from using GSR with simple intuitive arithmetic.

This patch adds the ability to perform basic math operations when
  providing numerical input to a transform (i.e. Grab, Scale, Rotate)
  operation.
The supported operations include:

Addition (+)
Subtraction (-)
Multiplication (*)
Division (/)
Power (^)

It works on a left-to-right basis, updating the result whenever a new
  operation is started and using that value as the starting point for
  the next. This means that it is irrespective of any math operation
  precedence rules, but this felt way more intuitive.
Because these operations require the use of the - and / keys, the
  sign switching and number inversion hotkeys have been moved to
  Shift- and shift/
  respectfully.
A quick example: G, Y, 5, // Moving 5 units across the y-axis
+, 2, ., 5, // Moving (5 + 2.5 = ) 7.5 units across the y-axis
/, // The result of the previous operation is now the starting point
  for next operation
3, // Moving (7.5 / 3 =) 2.5 units across the
  y-axis
Shift- // Switch sign, moving -2.5 units across the y-axis

I think this shows that the current way is a little crufty.

@zeffii Hence the need for it! It's brilliant and very precise, been trying to get someone to look at it.

but something like G m x_val <tab> y_val <tab> z_val for global and G M x_val <tab> y_val <tab> z_val for local to 'move' a vertex to new absolute coordinates..is a dream.

Chromoly did interesting work allowing kb input to be evaluated while running his scripts, in effect creating a localized console.

While using key shortcuts is valuable, Im not sure why you would want to enter absolute coords?
If you set absolute location you can only do this one point at a time, so Im not sure why you would want to do that.
The times I have a list of positions I need to enter I would write a small Python script rather then type them in by hand.
The typical blender workflow for this would be...

Manually enter the location of the 3D cursor then snap to it.
Select the point then use the transform panel to set the exact position.

Transform using x/y/z key bindings and entering in values is not absolute, but its efficient and most users would do this.
So while this isn't optimal, I'd like to know what you do that makes this such an important feature.
Note that if you for some reason have a workflow that requires this (but isn't useful enough to be added into Blender by default), it's not so hard to write an addon to do this and assign it a key shortcut.

Add a Vertex (Ctrl-left click), and set the vertex location to origin:
type ShiftS + U (Cursor to Center), then
type ShiftS + T (Selection to Cursor)
Press G to enter grab mode. Enter movement in x direction with 0-9 decimal point . and negative -, Tab enter y value (like the x value), Tab enter z value (like the x value).
Alternatively, you can limit the transform on a axis by pressing x, y or z in grab mode. Or Shift and x, y, z to limit on the other axis .

sorry, i've updated the question to be a little bit more precise


text:
disappearing skin_vertices after assigning new mesh to object
This has me stumped.
import bpy

meshes = bpy.data.meshes
objects = bpy.data.objects
scene = bpy.context.scene

def new_mesh(name):
    verts = [(3, 3, -3), (3, -3, -3), (-3, -3, -3)]
    edges = [(0, 1),(1,2),(2,0)]
    mesh_data = meshes.new(name)
    mesh_data.from_pydata(verts, edges, [])
    mesh_data.update()
    return mesh_data

mesh = new_mesh('some_mesh')
obj = objects.new('example_obj', mesh)
scene.objects.link(obj)
obj.modifiers.new(type='SKIN', name='sv_skin')

print(len(obj.data.skin_vertices))

# now switch the mesh to a new one.
obj.data = new_mesh('some_other_mesh')

print(len(obj.data.skin_vertices))

This snippet demonstrates a problem I'm having. Once i've added a Skin Modifier to the object, and then change the mesh data by assigning a new mesh to .data, then skin_vertices seems to be empty.
Yes there are workarounds.
@stacker below points out that I can remove and add the modifier to make skin_vertices again. This is a solution I use already, but it results in a lot of extra code to make sure other modifiers stay in the right place. In viewer_skin.py (linked to) I am hardcoding the modifiers, but you should imagine that I don't want to make any assumptions about which modifiers are on that stack at all (except for the skin modifier)
I'm trying to not use bpy.ops.object.modifier_(move_up, move_down, add) because that requires an active object.

They will be created when you add a skin modifier: bpy.ops.object.modifier_add(type='SKIN')

wouldn't it work if you remove and add the skin-modifier after changing the mesh?

@stacker, yes! That's the workaround I use at moment. i'll further clarify the question to explain why that isn't optimal.

When scripting updates to obj.data there currently (Jan 2016) does not seem to be a way to refresh data.skin_vertices without removing and adding the modifier.
For example if the "SKIN" modifier is named "sv_skin"
    # if modifier present, remove
    if 'sv_skin' in obj.modifiers:
        sk = obj.modifiers['sv_skin']
        obj.modifiers.remove(sk)

    # make new modifier and get reference to it.
    a = obj.modifiers.new(type='SKIN', name='sv_skin')

If you have a few other items on that object's modifier stack then there's a bit more bookkeeping to do.
Here's an example of a working scripted update to generate a lattice mesh with a skin modifier in Sverchok.

The code: https://gist.github.com/zeffii/e556ebcb33737a3fd58b
  <-- includes the script, but does require Sverchok.

source: Stack Exchange

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

sort: votes


text:
How do I copy the vertices, edges, and faces of one mesh into another?
I have a handful of mesh objects and I'd like to display one of them per frame. Thus far, I've been switching out entire mesh objects like this:
myObject.data = meshes[frame_number]

Unfortunately, the object's shader is tied to each mesh, so when I change the mesh, the shader disappears.
I know that I can use myMesh.from_pydata() to edit the actual mesh, but I'm not quite sure how to get the vertices, edges, and faces out of a mesh and copy them into another. I tried this, but got an error:
#gives an error:
myMesh.from_pydata(otherMesh.vertices, otherMesh.edges, otherMesh.polygons)

Any ideas on how I can swap meshes but retain the object's shader?

Answered the why does from_pydata give an error part of your question.  Can you elaborate on the shader?

One way is, as you are doing, Swapping the mesh
ob1.data = mesh # assign mesh to ob1
ob1.data = mesh.copy() # assign a copy of the mesh to ob1

how to use another meshes verts, edges and polygons to pass to the mesh.from_pydata method.
cone = context.object # some other object
mymesh = bpy.data.meshes.new("mymesh")
vertices = [v.co for v in cone.data.vertices]
faces = [[v for v in p.vertices] for p in cone.data.polygons]
# let faces take care of edges
mymesh.from_pydata(vertices=vertices, edges=[], faces=faces)
# could make edges
edges = [[v for v in e.vertices] for e in cone.data.edges]

Using from_pydata isn't going to fix the shader issue.

This worked for a brand-new mesh. Why doesn't this work for an existing mesh? I got the error: Traceback (most recent call last):
File "<blender_console>", line 1, in
File "C:\Program Files\Blender Foundation\Blender\2.77\scripts\modules\bpy_types.py", line 417, in from_pydata
self.vertices.foreach_set("co", vertices_flat)
RuntimeError: internal error setting the array

It's designed to use on a new mesh, otherwise the indices won't match between verts and edges / faces, passed to method and those already existing in mesh.  If you want to replace with a new mesh via from_pydata you will need to clear the old one first.

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


text:
COLLADA export doesn't preserve animation for all bones
I'm trying to rig and animate a character for use in an OpenGL-based program. I found a simple character model on TF3DM and rigged him by following the excellent character rigging tutorial from BlenderGuru. I can export the animation to the COLLADA format and load that file into my software. Most of the animation comes through, except for a few small details like the bending of his toes. His toes seem to be stuck in their initial state, with his left foot flat and his right foot bent.
Here his right foot is bent properly while his left foot remains flat:

Here, his right foot is still bent. The leg has moved properly, but the foot hasn't bent like it should have:

This behavior happens in more than one program, including when I export as COLLADA then import it back into Blender. With a simpler model (an elongated cube with only two bones), it exports just fine.
UPDATE: Here's a screenshot of the model when I export from Blender, open a new scene, and import the model. Some of the bones are tiny. Not sure why:

Does this sound like a problem with the COLLADA exporter? Or is it more likely to be a problem with my rig? (Would it be helpful to upload my .blend/.dae file somehow?)

I figured out the first problem. Based on suggestions from this BlenderArtists thread and this extremely helpful Wildfire Games article, I figured out that I needed to bake the animation with the 'visual keying' box selected. To access this, I selected the skeleton, then navigated to Bake Action (Pose > Animation > Bake Action...) and checked the 'Visual Keying', 'Clear Constraints', and 'Clear Parents' boxes. These options also take care of rigs that include inverse kinematics.
As the Wildfire Games article suggested, try to avoid unchecking 'inherit rotation' on any bone, as it will not export properly.
(As for the tiny bones problem, I have no idea what's going on there)


text:
How do I get the selected object during bpy.app.handlers.frame_change_pre callback while rendering?
I would like to import an OBJ file, find its mesh object, and get its name. I'd like to do this during the bpy.app.handlers.frame_change_pre callback function. I have the following code, which is not working:
directoryPath = "C:\some\path\to\my\directory"
def load_mesh(dummy):
    frameNumber = bpy.scene.frame_current
    filePath = os.path.join(directoryPath, "someFile_" + frameNumber + ".obj")

    # import the file
    bpy.ops.import_scene.obj(filepath = filePath)

    # get the recently-imported and hopefully-selected object
    currentMesh = bpy.context.selected_objects[0]

    meshName = currentMesh.name_full

# add my callback function
bpy.app.handlers.frame_change_pre.append(load_mesh)

When I render an animation (Ctrl+F12), it's able to load the .OBJ file, but when I try to access bpy.context.selected_objects[0], I get the error AttributeError: 'Context' object has no attribute 'selected_objects' By contrast, this code works fine if I simply play the animation in the timeline.
I did a little investigation to see what attributes bpy.context has access to. It looks like it can access everything in the Global Context (including collection and scene) as well as bl_rna, copy, evaluated_depsgraph_get, and rna_type.
How do I get a list of selected objects from within a render_pre handler callback function? Or just the object that was just imported?
Blender 2.82

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


text:
editing a pose bone's custom property in python
I created a custom property prop for pose_bone which will get built with a rig in a script:
bpy.types.PoseBone.NewProp = bpy.props.IntProperty(name="New Property", default=0, min=0, max=0)
pose_bone.NewProp = 0

Now I am trying to write a tool that adds things to the pose bone and will need to modify the property's max value each time something is added.
pose_bone.id_properties_ui("NewProp").update(max=5)
pose_bone.id_properties_ui("NewProp").as_dict()

{'subtype': 'NONE', 'min': -2147483648, 'max': 5, 'soft_min':
-2147483648, 'soft_max': 2, 'step': 1, 'default': 0}

So I can see in the property's dictionary that max is now 5, but when I try to set the property to 5 using either code or the UI, it stays at 0 still. Is there a step I'm missing or am I taking the wrong approach here? Ideally I'd like my script to query properties and update the max by one each time. I have all the logic written out, but it just seems like changing it in code doesn't work, or I'm missing a refresh step.

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


text:
How to handle modal operator events in a single loop?
When writing a modal operator, handling each event runs the 'modal()' callback which handles a single event.
While this makes sense, its not always convenient compared to a simple loop that consumes events (local variables need to be stored in the operator and restored every time, and you can't use flow control (break/continue) - for example).
Is there a way to handle events for a modal operator in a Python loop?
psudo-code example:
def modal_loop():
    for event in modal_events():
        # handle event
        if event.type == 'ESC':
            return {'CANCELLED'}

        if other_test:
            break
    return {'FINISHED'}

Note, this question is a little contrived. Since it should be possible using some of Python's coroutines, posting here since its probably a useful reference for others too.

Yes, Python's coroutines can be used make the operators callbacks interact with a generator.
Here's an example of a generic re-usable operator mix-in class, and an example usage.
See modal_iter function for an example of how (invoke, execute, modal, cancel) can be handled from within a single generator.
import bpy
from bpy.types import Operator

# -----------------------------
# Generic Modal Iterator Mix-In

class ModalIterOperator:
    """ Defines Operator callbacks (invoke, execute, modal, cancel).
        Sub-classes only need to define `modal_iter` generator.
    """

    def invoke(self, context, event):
        self._iter = iter(self.modal_iter(context))
        self._iter.send(None)
        result = self._iter.send(event)

        if 'RUNNING_MODAL' in result:
            wm = context.window_manager
            wm.modal_handler_add(self)
        return result

    def execute(self, context):
        return self.invoke(context, None)

    def modal(self, context, event):
        return self._iter.send(event)

    def cancel(self, context):
        self._iter.send(None)

# ----------------------------------
# Example of ModalIterOperator Usage

class MyIterTest(Operator, ModalIterOperator):
    bl_idname = "wm.my_modal_iter_operator"
    bl_label = "My Modal Iter Operator"

    # -------------------------------------------
    # Entire modal operator in a single function!

    def modal_iter(self, context):

        event = yield

        if event is not None:
            # -------------------------------------
            # Section typically handled by invoke()

            print("Operator.invoke(..., event=%r)" % event.type)

            # Check we would typically do inside invoke()
            # to see if we want to exit, or continue and run modal()
            if event.type == 'ESC':
                yield {'CANCELLED'}
                return
        else:
            # --------------------------------------
            # Section typically handled by execute()

            print("Operator.execute()")

            # We may want to cancel the operator here too.
            if 0:
                yield {'CANCELLED'}
                return

        # ------------------------------------
        # Section typically handled by modal()
        event = yield {'RUNNING_MODAL'}

        while event is not None:
            print("Operator.modal(..., event=%r)" % event.type)

            if event.type in {'RIGHTMOUSE', 'ESC'}:
                yield {'CANCELLED'}
                return

            # ------------------------------------
            # Main modal operator logic goes here!
            # ------------------------------------

            event = yield {'RUNNING_MODAL'}

        # cancel may be initiated externally
        if event is None:
            # -------------------------------------
            # Section typically handled by cancel()
            print("Operator.cancel()")
            yield  # --> None, since we're closed externally
            return

        yield {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.wm.my_modal_iter_operator('INVOKE_DEFAULT')

Notes:

None of the return's in modal_iter are needed, since the way the generator is used these points will never be passed anyway. I've added them in so as to be clear whats happening and so any accidental iteration past yield {'CANCELLED'} will raise a StopIteration exception, which intentionally isn't handled.
This code example may seem overly verbose, this is done for completeness.In practice you may not need all of the callbacks (cancel or execute for eg).
This article was used in writing the example above.

Nice one.  I'm going to have to read up on https://docs.python.org/3/library/functions.html#iter.

While the referenced article is focused on using python 3.5, this example will work fine on older versions of blender as well (2.50+) not just 2.77.

I'm not quite sure, what the reasoning is? What is the advantage? Speed? I'm not solid on coroutiines so I'm sorry if I miss something obvious. It looks interesting, but for me, the goal is unclear.

The advantage is that you don't need to store and load state for each modal call, instead, all variables persist. As well as the ability to use more flow control to manage state in a more Pythonic way.

@ideasman42 would this solution work for my issue here https://blender.stackexchange.com/questions/220073/stall-code-execution-until-modal-operator-is-finished or it not really relevant?


text:
How to tell which function is causing errors from bpy.app.handlers?
Some add-ons can add their own handlers which may cause errors or even crash.
How to tell which functions are causing problems?
Asking on behalf of this report.

You can write functions which intercept the existing functions and print out information, eg:
Given the following test example:
import bpy
def test_handler_a(scene):
    print("  Some Pre Handler", scene)
bpy.app.handlers.frame_change_pre.append(test_handler_a)

def test_handler_b(scene):
    print("  Some Post Handler", scene)
bpy.app.handlers.frame_change_post.append(test_handler_b)

This script sets up intercepting functions that print out all handlers that run:
import bpy
import sys

def intercept(fn, *args):
    print("Intercepting:", fn)
    sys.stdout.flush()

    fn(*args)

    print("... done")
    sys.stdout.flush()

for attr in dir(bpy.app.handlers):
    if attr.startswith("_"):
        continue

    handler_list = getattr(bpy.app.handlers, attr)
    if not isinstance(handler_list, list):
        continue
    if not handler_list:
        continue

    print("Intercept Setup:", attr)

    handler_list[:] = [lambda *args: intercept(fn, *args) for fn in handler_list]


text:
Using Blender for plotting graphs?
While gnuplot is serviceable and matplotlib is a popular choice for Python developers, I wanted to use Python for plotting some simple graphs (matplotlib had some issues installing on my system, with one of its dependencies).
While I could spend time to fix the issues with matplotlib, my needs are quite basic and something Blender could be made to do without much trouble.
Are there some existing solutions to setup Blender for real-time, graph plotting?(which could be interesting to adjust input variables with real-time feedback for example).

While I admit that this question is within the scope of Blender Stack Exchange, I think the  person most apt to be able to answer would be someone working in Mathematics, who might be more likely to be found on Mathematics stack Exchange, or perhaps on the Computer Graphics stack exchange site. Also, you might find help installing Pycairo on the stackoverflow site.

Since asking this question, I've made a small (single script) plotting utility.
This could be made into an add-on however I find it useful as-is.

(Updated, tested to work in versions 3.6 .. 4.0).
Usage:

Paste this script into a text-block named blend_plot.py and press "Run Script".

Running the script will create a blend_plot_func.py text-block containing an initial plotting template (if you don't have one already). eg:
  def plot(x, **kw):
      return x

You could change this to, for example:
  def plot(x, **kw):
      return 1 - ((1 - x) ** 2)

Playback animation (a curve object will be automatically created if you don't have one active already).

You can duplicate the object and move it around, only visible objects are handled, so hiding or moving to disabled layers can avoid extra computations.

If you want to change blend_plot.py (curve resolution for eg). Simply edit the values and run the script again.

You may want to turn your scene's FPS down, anywhere from 5 to 15 FPS (to reduce CPU usage).

Some benefits of this method:

Easy to view and change parameters for multiple plots at once (overlay or side-by-side, objects can be moved around since the script only updates object-data).
Easy drag values with real-time updates as well as using Blender's animation system.

Other details can be found in the code header.
# All in one plotting utility.
#
# - Uses a frame-change handler
#  (play back animation for real-time updates as you type)
# - Expects module `blend_plot_func.py`, to have a function called `plot`
#   which takes and returns a float and keyword arguments,
#   which are taken from custom properties.
# - Will update all objects in the scene
#   (supports multiple plots at the same time).
# - Scene and Object custom properties,
#   are passed to the plot function as keyword arguments.
#   (Scene properties are like `global` variables,
#   Object properties can be different for every object).

# Curve resolution
RESOLUTION = 320
# Range to show
RANGE = -1.0, 2.0
# RANGE = 0.0, 1.0

# Framing
MIN = 0.0, 0.0
MAX = 1.0, 1.0

PLOT_MODULE = "blend_plot_func"
PLOT_TEMPLATE = """
# Plot module template
from math import *

def plot(x, **kw):
    return x
"""

# End constants
# -------------

import bpy
from importlib import reload
from math import isfinite

def reinit_curve(context, curve):
    """ Initialize or re-initialize curve data.
    """
    curve.splines.clear()

    curve.fill_mode = 'NONE'

    # plot spline
    spline = curve.splines.new(type='POLY')
    spline.points.add(RESOLUTION)

    # frame spline
    spline = curve.splines.new(type='POLY')
    spline.points.add(3)
    spline.points[0].co.xy = MIN[0], MIN[1]
    spline.points[1].co.xy = MIN[0], MAX[1]
    spline.points[2].co.xy = MAX[0], MAX[1]
    spline.points[3].co.xy = MAX[0], MIN[1]
    spline.use_cyclic_u = True

def init_object(context):
    """ Call when we have no active plot-curve.
    """
    curve = bpy.data.curves.new(name="Plot Curve", type='CURVE')
    reinit_curve(context, curve)

    obj = bpy.data.objects.new(name="Plot Curve", object_data=curve)
    collection = context.scene.collection
    collection.objects.link(obj)
    obj.select_set(True)

    context.view_layer.objects.active = obj

    return obj

def plot_callback_object(scene, obj, plot_cb, kw):
    from bpy import context

    curve = obj.data
    points = curve.splines[0].points if curve.splines else ()

    # re-initialize curve if we change settings
    if len(points) != RESOLUTION:
        reinit_curve(context, curve)
        points = curve.splines[0].points
    # print(kw)

    i_last = float(RESOLUTION - 1)

    span = RANGE[1] - RANGE[0]

    for i, p in enumerate(points):
        x = i / i_last
        x = (x * span + RANGE[0])
        try:
            y = plot_cb(x, **kw)
            if not isfinite(y):
                y = -1.0
        except Exception as ex:
            print(str(ex))
            y = -1.0

        p.co.xy = x, y

def plot_callback(scene):
    """ Runs on frame change, updates all objects in the scene.
    """
    try:
        plot_module = bpy.data.texts[PLOT_MODULE + ".py"].as_module()
    except ImportError as ex:
        # Create a new text block if this is the first execution.
        text_name = PLOT_MODULE + ".py"
        text = bpy.data.texts.get(text_name)
        if text is None:
            text = bpy.data.texts.new(name=text_name)
            text.from_string(PLOT_TEMPLATE)
        else:
            raise ex

    plot_cb = plot_module.plot

    from bpy import context
    obj = context.active_object
    if obj is None:
        obj = init_object(context)

    # use my keywords for all!
    kw_global = dict(scene.items())

    for obj in context.visible_objects:
        if obj.type == 'CURVE':
            kw_local = dict(obj.items())
            kw_copy = kw_global.copy()
            kw_copy.update(kw_local)
            plot_callback_object(context, obj, plot_cb, kw_copy)

bpy.app.handlers.frame_change_pre[:] = [plot_callback]

By rendering it in freestyle I think you could make very pretty graphs actually.

Hi, how do you make this work in Blender 2.8? Run script doesn't do anything and trying to run a plot also does nothing? Thank you!

@richard-griffiths updated for Blender 3.6.

@ideasman42 in case you find it useful I'm been working on a plotting library for blender called blender-plots, see my answer here for a 1d example https://blender.stackexchange.com/a/266920/150141 :)

I run this little guy in 3.2 like blender --python blend_plot.py or clip/paste as usage and nothing happens. Errors in console or stdout? Nope. Default cube, cam and point light. Nothing in dope sheet. I do fd -e py | grep -i plot around blender install and blend_plot.py path and see no template drop. I didn't study it.

Tested to work in v3.6 and 4.0 (probably all versions in between), try a newer Blender version.


text:
How to fix non-utf8 names when loading old blend files?
When loading old files, it's possible the names aren't utf-8 compliant.
Meaning Python won't be able to modify them. See: T23197
Besides using a hex editor, is there a way to fix names from very old blend files so they are utf-8 compliant?

It's possible to get strings in Python as bytes, which allows to re-encode them into utf-8:
Eg:
import bpy
for m in bpy.data.materials:
    name_as_bytes = m.path_resolve("name", False).as_bytes()
    name_as_utf8 = name_as_bytes.decode('utf8', 'surrogateescape')
    m.name = name_as_utf8

To run this on your entire file:
import bpy

def id_iter():
    type_iter = type(bpy.data.objects)

    for attr in dir(bpy.data):
        data_iter = getattr(bpy.data, attr, None)
        if type(data_iter) == type_iter:
            for id_data in data_iter:
                if id_data.library is None:
                    yield id_data

def wash_name(id_data)
    name_as_bytes = id_data.path_resolve("name", False).as_bytes()
    name_as_utf8 = name_as_bytes.decode('utf8', 'surrogateescape')
    id_data.name = name_as_utf8

for id_data in id_iter():
    wash_name(id_data)

Ideally loading old files will always work. In this case it's not done because its a big change for a relatively rare problem.


text:
Render Videos From Marker Ranges?
Id like to be able to use markers to render multiple video files.
This would be handy when binding markers to camera switches so each camera gets its own video file, is this possible?

Had a request for this, thought it worth making an SE question

This isn't possible out-of the box, but it can be done with a script:
This isn't an addon, just paste the script into the text editor and run it, you may want to change the variables at the top.
# frames to use before and after
FRAMES_PAD = 0
# real render 3d scene or GL preview?
USE_OPENGL = True
# handle marker switching cameras
USE_MARKER_CAMERAS = True

import bpy
from bpy import context

wm = context.window_manager
scene = context.scene
# store original output
filepath_orig = scene.render.filepath
frame_range = scene.frame_start, scene.frame_end

markers = sorted(scene.timeline_markers, key=lambda m: m.frame)

# progress in cursor (countdown)
wm.progress_begin(0, len(markers) - 1)
scene.frame_start = 1

if USE_MARKER_CAMERAS:
    markers_camera = [m.camera for m in markers]

    def markers_cameras_restore():
        for m, c in zip(markers, markers_camera):
            m.camera = c

    def markers_cameras_disable():
        for m in markers:
            m.camera = None

for i in range(1, len(markers)):
    m_start = markers[i - 1]
    m_end = markers[i]

    # just in case
    if m_start.frame == m_end.frame:
        continue

    scene.frame_end = m_end.frame + FRAMES_PAD
    scene.frame_start = m_start.frame - FRAMES_PAD
    scene.render.filepath = filepath_orig + "_######_" + m_start.name

    if USE_MARKER_CAMERAS:
        markers_cameras_restore()
        scene.frame_set(scene.frame_start)
        if m_start.camera:
            scene.camera = m_start.camera
        markers_cameras_disable()

    wm.progress_update(len(markers) - (i + 1))

    if USE_OPENGL:
        bpy.ops.render.opengl(animation=True)
    else:
        bpy.ops.render.render(animation=True)

# restore original values
scene.render.filepath = filepath_orig
scene.frame_start, scene.frame_end = frame_range

if USE_MARKER_CAMERAS:
    markers_cameras_restore()

wm.progress_end()

Great one. You made my day!! Thanks a lot for this.


text:
Can the compositor be used to batch process images?
There are tools to batch process images already of course, (such as ImageMagick), but this isn't as flexible as Blender's compositor since they typically perform linear operations and don't have the control you get with a node-tree.
Is there some way to take point Blender at a directory of images (for example), and batch process them (using an existing compositor setup).

Yes, one not so elegant (no scripting :) but easy way to go about this would be to just use the Movie Clip node and point it to the directory with the images, pass it as input to your node group/compositor setup and render it out as an animation of stills or output each separately using the File Output node.
The only con or drawback to this approach is that the images need to be in a sequence for Blender to iterate through them.. img_001, img_002 ... img_00n or so you can scrub through in the clip editor or timeline but otherwise it should work as desired.

You could setup a blend file with the composite nodes setup as desired, ensuring you start from an image input node and finish with a composite node, then script setting the input and output image names.

import bpy, os

# configure input and oupt dirs
inputDir = '/tmp/input'
outputDir = '/tmp/output'
# ensure this points to the input image node - name can vary
inputNode = bpy.context.scene.node_tree.nodes['Image']

inputImages = os.listdir(inputDir)
bpy.context.scene.render.resolution_percentage = 100

for i in inputImages:
    inputNode.image.filepath = os.path.join(inputDir,i)
    bpy.context.scene.render.resolution_x = inputNode.image.size[0]
    bpy.context.scene.render.resolution_y = inputNode.image.size[1]
    bpy.context.scene.render.filepath = os.path.join(outputDir,i)
    bpy.ops.render.render(write_still=True)

I have just written a script to batch process images from the compositor.
Example use:
batch_compo.py --blend=compo.blend --input="./img_src/*.png" --output="./img_dst"

Its a single script, but linking to the repository which includes a readme.
See: https://gitlab.com/ideasman42/batch-compo


text:
Can I add a horizontal marker to the Graph Editor?
I would like to add a horizontal marker to the Graph Editor. I'm going to animate an integer value which represents an index into an array of meshes. I want to have a visual reference of the size of the array so that I can quickly position keyframes based on it. I imagine that the horizontal marker would look something like this:

It looks like vertical markers are already supported? Is there a built-in solution for adding a horizontal marker? Or can I use Python to add one?

Hi. Can you explain why you need this? Understanding why you need this might allow us to suggest alternative solutions.

@RayMairlot I'm going to animate an integer value which represents an index into an array of meshes. I want to have a visual reference of the size of the array so that I can quickly position keyframes based on it.


text:
Is it possible to auto-rotate UV Islands?
Is it possible to auto-rotate UV Islands with Python? For example I selected all islands and want to rotate them according to their width and length.
I need to:

get all selected islands.
get their width and height.
rotate an island by 90 degrees.

Explanation:

How do I do it with python?
Thanks.

In your example image, which islands would be selected for rotation? All of them? The two on the right? The one on the left? It's unclear why you want to rotate them.

All islands should be selected and rotated according to  their proportions.

So let's take the image you provided as an example. In that example, which of the three UV islands would need to be rotated? And by how many degrees should they be rotated?

@Rebellion has been implementing such a feature. It seems he has almost done it.
http://blenderartists.org/forum/showthread.php?340206-Add-On-UV-Align-Distribute

@Rebellion has implemented such a feature. http://blenderartists.org/forum/showthread.php?340206-Add-On-UV-Align-Distribute http://www.youtube.com/watch?v=clgrf0DUvso


text:
For 4.2 Using F key to fill or connect the vertices or edges from two circle meshes?
I'm following a soda modelling tutorial but encounter a problem when I tried to click F key to on two selected vertices or edges it will only fill inside of the circle mesh, can you help me with this problem?

OK, so you told us what it does and that it's a problem, but you haven't actually said what you want to do. What is it that you want to do? If you want to connect the selected vertices, it only works on a mesh of a single object. You have 2 objects selected, so the vertices belong to 2 different objects. Merge the objects in object mode (ctrl+j), then try again. Is that what you want?

"OK, so you told us what it does and that it's a problem, but you haven't actually said what you want to do. What is it that you want to do? " I wanted to connect the vertices like adding edge to the selected vertices.  "it only works on a mesh of a single object. You have 2 objects selected, so the vertices belong to 2 different objects. Merge the objects in object mode (ctrl+j), then try again. Is that what you want?" I did that and actually work, I guess its not simple by clicking F key on selected two vertices or edges :(

Two objects have 2 different meshes that are stored separately, geometry between them cannot be connected while they are separate, that's just how it works. The ability to enter edit mode of multiple objects at the same time is actually a feature that wasn't always there. It brings a lot of convenience, but simply cannot work with all operations, because they must remain separate objects. This actually makes a lot of sense.

Thank you for the explanation.


text:
Grooves or Rings on a Jig
I hope you're all doing well.
I'm currently modeling this very intricate design that has a round plate in the center. This round plate it's supposed to have 5 grooves/rings of 1mm in width and about 4mm in depth, akin to a bullseye. There is also a cross of the same width and depth that cuts through all 5 rings, merging at the 5th ring. I've attached an image of what I'm trying to describe as a visual aid.
To say that I am having an extremely difficult time would be an understament. Could any of you smarter folks share some of your knowledge with this?
Thank you all in advanced.
Much obliged,
Eldritch

Use your image as reference image, create a circle (the more vertices the rounder it will be), extrude it inwards several times so that it matches the image:

Fill the center, join the vertices (J):

Select all these edges:

Bevel (CtrlB), you can precisely set the Width in the Operator Box:

Extrude up the whole mesh, again you can precisely set the move:

Select the edges and extrude up again:

The OP mentions depth. Shouldn't your last operation be going the other way on the Z axis? That is if I haven't misunderstood something :)

oh ok maybe, but it is still the same kind of operation

Wicked. I couldn:t have asked for a better explanation. Thank you very much for taking time to break it down the way you did. I just tried it and it did exactly what I needed. Is tricks like these that make learning Blender so much fun.
Much obliged!

No worries on the inversed direction. I managed to figure it out. Thank you!


text:
Trim sheet alignment issue
(1st picture) The trim sheets do not align correctly when I apply them. I figured that it was probably because of the bisect in the mirror modifier settings. I tried to uncheck bisect X and the problem was fixed (2nd picture). However, the other texture where I used a mirror got messed up instead when the bisect X was unchecked (3rd and 4th picture).  How do I fix the trim sheet and not ruin the other one? Your help will be much appreciated. Thank you!
By the way, I am following the tutorial from BlenderBros, which uses trim sheets provided in the course. I am also using HardOps and meshmachine

I'm sorry, but first of all I do not understand your setup. Is there a specific reason you put two Mirror modifiers on the object that seem to have the exact same settings? Let's say you model half an object on the +X side, then the mirroring on the X axis makes it a complete model by mirroring the +X mesh to the -X side. But then a second Mirror modifier now mirrors the -X mesh to the +X side where the original geometry already exists, and the original geometry on +X is mirrored to -X once again. I cannot tell without checking your model, but maybe this messes up your textures?

I tried deleting the other mirror but the same thing happens.

Deleting might not help, but I do not see any reason why it has to be there so it is redundant I think. I guess you have to upload your file at https://blend-exchange.com and follow the instructions there to edit it into your question, because just from looking at it we get no information about how you have set it up, the shader with the texture, the UVs etc. and we can only wildly guess. The fact that disabling the Bisect option changes something would lead me to think that the option itself is not the problem, it is only showing that there are some issues in the mesh or UVs that causes it.


text:
Tubular wireframe with modifiers
How would I go to make the bottom object look like the top with modifiers? When applying a wireframe + bevel modifier, there is a inner curve which makes it not have a tubular or pipe like appearance.


text:
How to Fix Overlapping Meshes When Instancing an instance in Blender
I was trying to create a Corinthian Order, and when I was making the mini columns surrounding the large column, which also has leaves around it, I encountered an issue. My process was to create one half of the small leaf, mirror it, and then instance it around the mini column. Finally, I instanced it again around the large column. However, overlapping meshes appeared on the instanced object (the first instance).


text:
Stencil Stamp not showing up
I am trying to use texture stencil, but sometimes the stencil stamp of texture that I want to paint doesn't appear, and I can not find it. Perhaps the position of stencil stamp is elsewhere. How can I reset the position to see it again? I am using Blender 2.69.
Blender file (go to left upper window in blender: texture draw).

Two steps would help to solve what happened in your case:

Set the Alpha percentage of Overlay to some non-zero-percent value;
Press Reset Transform button right behind the texture selector.

As shown below.

Btw, your texture stencil is on the upperleft corner of the 3D Viewport, which can be seen if you maximize the 3D view.
Shortcut tips when working with texture stencil and texture mask stencil:

For Texture Stencil:

RMB: Stencil translation
CtrlRMB: Stencil rotation
ShiftRMB: Stencil scale (Allow constraining on X/Y axis)

For Texture Mask Stencil:

AltRMB: Stencil translation
AltCtrlRMB: Stencil rotation
AltShiftRMB: Stencil scale (Allow constraining on X/Y axis)

Thank you very much. I didn't realize that the alpha was zero. I cannot remember that i set it to zero. If i use RMB x or y, then the stencil image is flickering, but scaling is working. Can i avoid flickering?

I haven't met such flickering issue yet, but X/Y constraint only works with scale, currently.

+1. 'Reset Transform' seems to be the solution when the brush stencil has been moved out of the limit of the view, and you don't remember its current position.

If you are in version 2.8 or higher, in Texture Paint mode with the Draw tool enabled, it is necessary to activate the Cursor option in Sidebar > Tool > Brush Settings > Cursor so that the Stencil appears in the viewport when the mouse is over the model.
But don't forget that in order to use the Stencil, you must first load a texture in Sidebar > Tool > Brush Settings > Texture and change the Mapping to Stencil. Click the Reset Transformation button if necessary.
If the Stencil does not appear in Image Paint, make sure that the 3D Viewport is in Texture Paint mode.

Thanks, it works great

Just discovered that when blender file is moved but brush textures are not, texture thumbs are still displayed on the brush reel but stencil overlay is missing. Took me a while to figure out what is going on so thought I'll share.


text:
How can I flatten a cube on the Z axis and make the sides protrude outwards?
I am wondering how to make a cube squish like a sphere on the Z axis. It will be an animated cube, so it needs to squish like a real sphere.

Are you asking specifically about how to do it in Blender, or about animation in general?

How does a sphere squish?

I am asking how to make it squish like a sphere in blender. If you went into blender, brought out a cube and squished it down on the Z axis, you will see that the results are different than a sphere. My question is how can I make it squish like a sphere in blender.

If you go into the scale manipulatior and scale a sphere down on the z axis it will squish like a bouncy ball would squish. That is the effect I am trying to acheive.

@JoshuaSlink something like this? http://i.imgur.com/u1enUND.gif

Yes! Thank you! Could you show me how to do that?

You can quickly achieve this with a Simple Deform modifier set to Stretch and using a negative Deform factor.

A more efficient way could be to make a simple one bone rig and use some shapekeys but this works.

Thank you. I just have a few questions about it. If you could just give me the steps that would be great.

@JoshuaSlink The steps are in the answer ;). Just add a cube, subdivide it a couple times, add the modifier to the cube, set it to Stretch as seen in the image and use a negative deform factor, you can then keyframe this and adjust the influence etc.

When I use the negative deform factor, it does not look like yours at all. Do you know why?

@JoshuaSlink You need to subdivide the cube so it has geometry to deform. Here is a study blend file.

Thanks very helpful. But how did you animate with the modifier?

@JoshuaSlink See Can modifiers such as “Subdivision” and “Array” be “animated”?.

Could you give me the steps on how to animate it?


text:
How do I find the users of a datablock using the Python API?
Given a datablock foo, how do I determine which other datablocks are referencing it? foo.users will tell me how many references there are, but do I have to loop through every other datablock in the file to find those references? If so, can anyone recommend a reasonably generic way of doing this given the different interfaces of various datablock types?
For my specific application I'm trying to find and delete (or modify) datablocks with names matching a pattern. I'm mostly interested in node groups and images, which seem to acquire hidden users more easily than other objects, but this type of functionality seems generally useful.

There is no way, internally Blender also doesn't store this data for easy access.
However some data types have convenience properties added to them to access some of the users.

Object.users_scene
Object.users_group
Object.children

Are handy in many cases, but specific to object types.

This is further complicated by the fact that you can't assume the same type of user for a particular datablock (e.g. an image could be used by both a texture as well as a compositor node).


text:
Working with larger .stl wireframe files
I'm trying to use an .stl file that imports as a tightly bound wire mesh that it difficult to work with.
My computer lags or the file seems too big for color/texture/etc. Is there a way to reduce the file or to change a setting to be able to work with larger files like this or am I doomed?
Trying to use a 3d scan of a mouth/teeth for numerous videos. Having something realistic and proportional will serve me well.
So, that is why I am trying to work with these larger files scans.

See also: http://blender.stackexchange.com/questions/474/is-it-possible-to-automatically-simplify-geometry-in-blender-without-losing-obje/475#475

You can reduce the mesh density in Blender by using a Decimate or Remesh modifier: create the modifier, change the settings until the mesh is as detailed as you need it, and then apply it. Don't forget to apply it or your mesh will still be very dense in edit mode.
If your mesh is too large for Blender to load at all, you could try using Meshlab, which is also free and open source and works nicely with .stl files. This video shows how to decimate a mesh using Meshlab.


text:
Blend mode equations including factor/influence
I have been looking for the equations used for all the blend modes.
In the Blender wiki
there are descriptions, but no equations.
In Wikipedia there are equations, but there are more than one possible equation for few blend modes (ie soft light).
I don't know which equation blender uses.
I also read this, however the Influence/factor not available on the equations.
It would be much appreciated if the list of equations used in blend modes with factor/influence is made available. Please point me to the right direction if it already exists. Many thanks.

They might not all be simple formulas. The full algorithm definitions are here (C++).

Could you request specific blend modes for which you would like equations?

I'm looking for all the algorithms for blend modes. From the link you provide, I have tackled the non RGB to HSV to RGB ones. Now I need equations for these: HUE, SAT, VALUE, LINEAR, SOFT, COLOR blend modes.


text:
Duplicate along path with uniform spacing
I'm trying to create tank tracks and I've followed the steps outlined in the answer of this question How can I duplicate a mesh along a curve?
As long as the curve is somewhat straight the tracks align quite perfectly, but as soon as there is bend in the tracks, the connector thingy of the tracks do not want to align (red arrow in image)
I've tried moving the pivot of the individual track but I didn't improve the situation much..
How can I make sure that all my tracks align even if there's a curve in the path they follow?

There are generally three possibilities to cause such problem in this particular case:

The resolution of the curve path, which is the least possible factor here;
It seems that you are using Dupliface, it will also be curved by the Curve modifier see Figure 1;
The edge of per panel should better coincide with the joint, in order to minimize the disjoint look. See Figure 2.

I think the most accurate way is to use rigid body constraints, but that would be way too complicated comparing to this way. Hope it helps.

I don't quite understand how you do this. Do you have an extra "panel" object that you use to dupliface? @Hummlas used a dupliframes, if I understand correctly. I don't get how you set the distance of the objects so that they overlap.

I must confess that I didn't quite under stand either, and yes I used dupliframes.
regarding step 2: I do not use a Curve modifier and regarding step 3: when you say "edge per panel" do you mean the mesh origin? in that case moving it away from the center only seem to make the alignments worse.

@Hummlas Then would you like to upload the .blend file for better analysis?

@Hummlas There is no accurate way to do this just by using Duplications, because you need two hinges for each belt section, which is beyond the capability of Duplications. My suggestion is that you can either use Dupliface and follow my 3rd point, or use rigid body dynamics to do it accurately.

@LeonCheung ok, I was afraid of that, I think I'll just live with the poor alignment for now and if I need to close-ups of the tracks I'll look into body dynamics, thanks for the help :)


text:
Fake reflections in Cycles, redux
In the Fake reflections in Cycles question, there is an example of a simple shader set up. I tried it, the image is displayed in my Preview (Blender 2.73a). The rendered object shows reflection but no image. Why is my image not showing in the new version of Blender?
Jonathan Williamson has an example of how to do this on cgcookie (http://cgcookie.com/archive/tip-faking-reflections/), but it's dated 2010 so the Blender version is different - using Blender Render, not Cycles.

Is it possible you could add some screenshots of the setup and result?

Simple as I can make it. I'm a novice so this could be a noob mistake, or simply a misunderstanding. Link demo here: https://dl.dropboxusercontent.com/u/3504807/FakeReflectionFolder.zip

It seems to be working for me..

Here: http://www.pasteall.org/pic/85428. I noticed you were in orthographic view, which would prevent you from seeing more than a single point on the texture at once (see http://blender.stackexchange.com/q/14219/599). Try switching to perspective view (Numpad 5) and see if that helps.

Due to the way reflection coordinates work scaling is a bit non-trivial. You might be better off using a 2D plane with the logo texture, positioned so that the mirror reflects it

To reply here as well just in case others are looking for the same thing, you can achieve the same fake reflection effect with the following node setup:


text:
Create a face vertex by vertex
Whats the best way to create a face for the 4 selected vertices?

Select the vertices in vertex mode, press F to make a face. Does that work in this situation?

What do you mean by "best" way in this case? What isn't fine about pressing F to fill a face?

@JeffLange thank you, your suggestion work. The problem I was having the that I dindt merged the vertices before.

https://blender.meta.stackexchange.com/questions/2387/can-a-punishment-be-implemented-for-using-the-word-vertice-in-a-q-a?s=1|21.4960


text:
How do you rotate an object so that a particular face is parallel to the ground?
How would I make the face of an object parallel to the ground? I could just eyeball it and use the rotate tool, but it probably wouldn't be perfectly flat. Is there a way I could possibly snap the face of the object I want level to the top of a block (making it parallel with the block) and then delete the block?

do you want to rotate the whole object or only some faces?

The whole object..

Not sure if there is a more efficient way to do this but the method I most frequently use is through an auxiliary empty object used to snap to the surface.

Add a Plain Axis Empty to your scene
Activate Snapping and Align rotation with the Snapping Target
Align the empty with the part of the surface that is to become the base
Now you will have to manually copy the three axis rotation from the empty to the object inverting them. That means if your empty's rotation is 10,50,30 you will have to paste in your target object -10,-50,-30
Apply the rotation to your object

Adjust it accordingly to fix the orientation by rotating 180º in needed axis.

Side note: It is usually helpful if your "flat face" that is meant to be aligned to the ground is slightly subdivided, so there's a few extra vertex for Blender to snap to.

Once the empty is 'stuck' to the face, you can parent your object with the empty. Then, simply clear the rotation (alt R). This avoid to copy/paste the rotation values. Then on the object, alt+P and clear and keep transform

Nice one, hadn't though of that. Good tip, thanks!

I had a similar problem. I had created and edited a number of objects, then realized I had flipped things around before starting, so the X and Y axes were not going in the normally accepted directions. I selected everything and pressed R and rotated them around the Z axis. I watched the info/dialog box on the lower left and stopped when it said I had rotated 180°. I applied the rotation transforms, then I saved and exported some STL files for printing - then I saw objects I had to turn on their back to print were not slicing properly. (Cont'd)

I've since found that Blender has a bad habit of rounding off numbers without any indication it's doing so. This has caused me trouble several times until I knew this. With the rotation, it turns out I was off by -0.194118°. I found that by using the process in this answer and that gave me the numbers so I could fix it to the exact rotation I needed. I tested by exporting some objects and slicing. No issues at all. I'm adding this because it's a similar issue, but a rather different problem so I hope this helps someone in the same fix I'm in when they need an answer.

Here's a quicker way I've came up with after reading Duarte's answer:

Create a new flat plane

Set rotation of your object to 0.

Enable snapping to face

Start editing mesh of your object. Select a face of faces by which you want to align.

Move them to a face you want to align them to

Enable Proportional editing, set it to Constant, and set Proportional size to a big value. That won't take into the account our snapping configuration, so...

Move it to that plane again!

You can use any object as a target for this method (e.g snapping text to a side of a dodecahedron), and it does not require you to copy any values.

If you don't mind installing an addon, Zaloopok made some personal tools which include a button called 'put on' that does exactly what you expect. You can find the help here and watch a video of the "put on" in action here.

The 'mesh align plus' can do this sort of operations much much easier than the built-in tools: https://github.com/egtwobits/mesh_mesh_align_plus/ . I also use Blender to touch up STLs for 3d printing.

A very simple way is to rotate the whole object by hand until it's close to parallel, then select all the vertices (in edit mode) that sould be parallel to the ground, and scale them to 0 relative to the Z axis.

That could be considered "cheating". This is for 3D printing purposes I think, so doing that will alter the shape of the object and yield uneven joints that won't properly fit together once the object is assembled together

yes, it depends by the use you need


text:
Why are some textures disappearing in the game engine?
I have a mesh that I am texturing for the game engine and everything was fine until the last setups I've done; Some of my textures don't appear anymore. What strikes me is that the colors are correct so pictures are taken into consideration but not displayed correctly.

Is it a UV problem? Can't I use more than two UV layers on my object?
How do I include the blend file in this post?

you can use a service such as blend exchange to upload your blend.

Yes, currently Blender Game Engine has real problems with multiple UVs. Especially if you're using noeds(you don't seem to do though). However, UPBGE is coming along with some fixes, expect them to be there soon. Oh, and you can mark your answer as answered if it is your solution. That way you'll earn additional reputation;)

So instead of using multiple UV layers for scaling the textures i used the 'size' option in the 'mapping' panel. It runs faster...


text:
EXCEPTION_ACCESS_VIOLATION after mesh update
I have latest Blender v2.76b x64. I have a edited PSKX importer, the 2.69MB pskx file import working, but when i try a 2.82MB pskx file or 2.79MB pskx file, Blender crash on:
me_ob = bpy.data.meshes.new(objName)
#... adding vertices, meshes etc.
me_ob.update() #Error: EXCEPTION_ACCESS_VIOLATION, line 760

Sample files with code: https://marekkraus.sk/BlenderScript.zip


text:
Mirror modifier distort ambient occlusion texture on mirror axis
My ambient occlusion texture appears to be black at the centre of the mirror. Clipping at the centre is correct. What might be the problem?

I noticed that this problem goes away when subdivision surface modifier is used. But since I want low poly I don't want to use any such modifiers.

I think your problem is not the mirror modifier but the Subdivision Surface modifier.
It has a checkbox Subdivide UVs which is enabled by default.
If it was enabled during baking it can create this kind of black seams if you

delete the subsurf modifier
do not display the subsurf modifier
lower the subdivision level
or disable Subdivide UVs afterwards

I guess you want a low poly character with smooth AO, so you probably deleted the subsurf modifier. In this case you should just deactivate Subdivide UVs during baking.

Thank You. It was indeed the subdivision surface modifier issue.


text:
How to expand a hamburger menu
In my Image Editor there is a "hamburger menu" (the icon with three horizontal lines in a stack) that I customized in Blender 2.79 or earlier on a computer with a smaller display. Now I've decided I want to get rid of the hamburger and keep those menu items expanded instead (so that I can see the asterisk that appears by Image* when an image file has been modified since last saved).

Maybe this type of collapsed hamburger menu is not used anymore in recent versions of Blender. I'm not sure. I don't see an option in the menu to expand it again.
How do I revert this part of the menu to the default view? I don't want to load factory settings just to revert this one part of the interface.

Right click on it, and in Header, check "Show Menus".

Thank you!  It had been so long, I couldn't remember how I collapsed it to begin with!


text:
Unable to close multiple areas using bpy in blender 4.2.2 LTS
I am building a blender "app" that is meant to be used by people not familiar with blender. They will run a pre-written python script to add some objects to a blender scene and then visualize them in 3D rendered view. Since this only requires the VIEW_3D, I would like to close other areas that are open by default.
The following code used to work smoothly pre-4.2.2LTS
import bpy

# Close properties, dopesheet and outliner
# Default open areas: ['PROPERTIES', 'OUTLINER', 'DOPESHEET_EDITOR', 'VIEW_3D']
to_close = []
for area_type in ['PROPERTIES', 'OUTLINER', 'DOPESHEET_EDITOR']:
    to_close.append([a for a in bpy.context.window.screen.areas if a.type == area_type][-1])

override = bpy.context.copy()

for area in to_close:
    override['area'] = area
    with bpy.context.temp_override(**override): bpy.ops.screen.area_close()

# Switch to rendered view upon launch
main_area = [a for a in bpy.context.window.screen.areas if a.type == 'VIEW_3D'][0]
main_space = [s for s in main_area.spaces if s.type == 'VIEW_3D'][0]
main_space.shading.type = 'RENDERED'

but now it throws an error
Traceback (most recent call last):
  File "/.../script.py", line 17, in <module>
    main_area = [a for a in bpy.context.window.screen.areas if a.type == 'VIEW_3D'][0]
                            ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'screen'

As I understand it, temp_override(**override) is like temporarily changing context to override, doing whatever we wanted to do there, and then coming back to the context before override = bpy.context.copy(). However, I found that print(bpy.context.copy()) gave very different outputs before and after ...area_close(), which is confusing.
I have also tried adding the window and region attributes to the override, but it had no effect. I have gone through the documentation and have googled about this a fair bit. All sources seem to indicate that the above code should just work, unless I am missing something extremely silly.
Note that switching the order of main_area = ... and ...area_close() is not an option because I need to use bpy.context later and I face similar problems if the context doesn't return back to what it was before ...area_close().
In summary, I am looking for a direct fix to the above code, or a way to make bpy.context "point" to VIEW_3D after ...area_close() using some indirect means.


text:
Texture Paint not working or being weird
I'm not sure what I did but I keep having this issue where I'm unable to paint with my brush or the color is really light. I don't think its an opacity or blending mode issue. I'm new to blender so I don't know what I can do to fix it.
The really light line is the issue, it used to look like the other lines. Has this happened to anyone else?

hello could you please pack your image (File > External Data > Pack Resources) and share your file? https://blend-exchange.com/

Welcome! Do you have the time to append the object into a new file and test it to see if the same issue is present away from the current file? Can you turn pressure off and still get the darker line there in the middle of the hammer, or does it come back to the lighter value?

In the left area (where the texture image is show), you need to go to paint mode.

Unfortunately that didn't change anything :(


text:
Tracing a monochrome image into a 3D, extruded object with a script
Say I want to automate making extruded-text or a 3d logo from an image.
An answer that uses extruding a monochrome image of the ubuntu logo to an arbitrary number of units with a python script taking only the number of units and the monochrome image as a starting point will receive extra this was awesome re-posts from me.
This could be useful for lots of things.

This question and title should be worded less confusingly, by the sounds of it you want to trace an image into an extruded shape, Thats a very common task for spinning logo's, but i had to read through your question twice to figure this is what you wanted.

@ideasman42 - does that title edit make it instantly obvious?  feel free to suggest an edit.  if it sounds like english and doesn't change the meaning, i'll happily accept it.

I accidentally voted to close this. never mind that vote

Blender doesn't have image tracing built-in, and without some tracing algorithm that outlines the shape, you're unlikely to get very nice results.
so suggest...

Open the image in a vector image editor (such as Inkscape)
trace the image (most vector editors have auto-trace)
save the vector as an SVG
import the SVG into Blender
use the curve bevel setting, or convert the curve to a mesh and extrude that.

If you want to automate this, you would have to automate converting the image into a vector outside blender, using something like Potrace, once you have an SVG you can automate loading and extruding it.

Inkscape can also automatically trace a raster image, with varying results - it's worth investigating.

@zeffii, yep - infact I meant to say auto-trace. tracing by hand is fine but you can also do that in blender.

This approach seems imminently scriptable in python given platform lock.  Thinking about turning it in to a plug-in for blender.  I just didn't want to re-create work that was already done.

I haven't seen any automated raster to curve tools for Blender specifically. If it comes, it will probably be an addon.
From experience the result of automated tracing on logos, or exact shapes with transitions between curve and corners, is rarely acceptable to closer scrutiny. Invariably they need to be corrected (and optimized). People provide on-line services where you send them a raster image and they send a vector version back.
Blender has OK curve/spline tools to do tracing by hand, I've done this plenty of times. Staying in Blender has the added bonus that keyboard short-cuts are familiar. Filling the spline is also easy and so is extruding. Here's an interesting thread on BlenderArtists where VickyM72 practised on various logos to get a better appreciation of the curve tools.
Many prominent logos are already available as vector (svg, ps, etc..) if you fill their name into a search engine.

A while I wanted to make models and quickly learned about Manually Tracing (Via Background Images, X-Ray Objects in Properties > Object > Display & Add Cube then Grab Vertics to where Image's Edges bends & Change Camera to do Front & Side).

Today @ 5:39a, I was making a Mod Request of the Saint's Angel for SR4 and discovered a bit of a faster & simpler way to do it.
I want to insert the Fleur De Lis at the end of a Tail

In Object MOde Imported the .PNG as "Image as Plane"
Press K for Knife and click on each point

Once done I can L for island Select the Outer Part & Delete > A for Select all > Use E to Extrude along an XYZ Axis or Shift XYZ for 2 Axis
----Con: Knife Tools's Dots get in the way & this is on 2D


text:
Extrude along an edge loop by vertex
I have two mesh objects.
I want to extrude one object in such a way that it traces another object.
I could have sworn I'd seen this done in a tutorial once, but I can't remember how and can't find it via googling or other Stack Exchange posts.

In the image, I've extruded once along the edge and once continuing away from the loop. I'd like to have each extrusion match the vertices of the loop in both position and rotation.
I looked at the possible duplicate, and it's based on both objects being curves. I was able to convert the loop to a curve, but not the circle quarter. I'm not sure why. And trying to recreate it as a curve opened another can of worms I'm too inexperienced to deal with.

possible duplicate of Extrude along path

I'm not dealing with curves. But maybe I should...

The second object shouldn't need to be a curve.. Given that the second object is simply a quarter of a circle, you probably don't even need the second object. Try setting the fill to back and increasing the bevel width and resolution: http://pasteall.org/pic/79117
Also note that the edge loop can probably be easily converted to a curve with Alt C

@gandalf3 Awesome technique! Thanks! I needed to also set Shape to 2D and Modification Offset to -.2 to get the exact shape I wanted. But it worked. I'd still like to know if it can be done the way I asked though. Edit: also, I just realized that it's not as precise as if I used meshes...

Maybe another way you could use bezier curves, modify your curve until you get your desire form and transform it into mesh, so you can extrude after that.


text:
How can I import models from Anim8or into Blender?
I am using Blender since I never liked the camera angle in Anim8or. I recently picked up Blender and would like to use the wireframe model I had previously made.
I have searched for a way to move models from Anim8or to Blender but nothing so far. Is there a workflow for this or something that I am missing?

Transferring data is just a matter of finding a format that both programs can use. Some formats have better support for some features than others (like materials, animations, and armatures).
It would appear that Anim8or can export in 3DS and OBJ - both can be imported into Blender, menu File -> Import -> 3D Studio (.3ds) or menu File -> Import -> Wavefront (.obj).
Both import addons should be enabled in Blender by default, but if they aren't, open the User Preferences and look under addons to enable them.
I would export in both formats and see which one gives a better result in Blender. I would also expect that the mesh would transfer OK, but then expect to do some manual work to re-make the textures in Blender.

Sounds like this will work, I must have an older version of anim8or or I am blind because I don't remember seeing that as a save as option.

I Trying But It's Not Working I Really Am But This Is So Hard


text:
How to link/append with a Python script?
I want to append an element from another Blend file by a script. I found the Blender operator bpy.ops.wm.append which should do what I want. However, the API documentation is a bit unclear:
filepath  – File Path, Path to file
directory – Directory, Directory of the file
filename  – File Name, Name of the file

So what exactly is expected here?

After trying out the interface for a while, i finally found the values that seem to satisfy the API. Here is a code snippet:
blendfile = "D:/path/to/the/repository.blend"
section   = "\\Action\\"
object    = "myaction"

filepath  = blendfile + section + object
directory = blendfile + section
filename  = object

bpy.ops.wm.append(
    filepath=filepath,
    filename=filename,
    directory=directory)

Hint: The directroy string must be terminated with a trailing "\\". If you do not do that, then you always get an error "not a library". I also found that you only need to supply filename and directory, which makes some sense:
bpy.ops.wm.append(filename=filename, directory=directory) # works

However this does not work, no idea why:
bpy.ops.wm.append(filepath=filepath) # does not work (why that?)

Is there a way to append multiple objects at once?
I tried giving filename as '*', '', without filename argument. But nothing seems to work.

Just a small addition. I am using this in Blender 2.76b. section = "/Action/" works for me while "\Action\". The latter does not throw any error but just doesn't append anything

@anurag Yes, we can append multiple objects at once. You need to group them together in the source blender file, append the group in the new Blender file and then unlink the group.

+1 for (filename=filename, directory=directory) # works and (filepath=filepath) # does not work (why that?)


text:
How can I truly randomize the rotation of instances that are chained?
Simply, I would like to do this procedural circuit board wire, but with Geometry Nodes:

The point being, ideally I would just increase an integer and new objects would appear at the end of the chain, rotated in -45, 0 or 45 degree angles, preferably 0 mostly (but that I can handle).
I tried multiple setups, but this is beyond me. The so-called random value seems to always be the same for all the objects, not truly random :(
How can I do it?

Since the distance between the points should always be the same, and no loops are available in GN, this will not be easy, I fear. Let's see.

Thanks! I tried the mesh line option, but hmm, still quite far from what I'm aiming for

@quellenform ah, actually, the distance between the points don't have to be the same necessarily, if it can look like the example above somewhat

Here we go!
This answer shows exactly the solution to the concern you outlined:

First create a line with the desired number of subdivisions.
Then create a random angle of $-45°$, $0°$, or $+45°$ per index and capture it with the Capture Attribute node
Next, add the coordinates resulting from the sum of the direction vectors point by point using the node Accumulate Field and set the positions of the individual points of your line.

The advantage of this solution is that the distance between the points is always the same as shown in the picture.

And here is another alternative, where you can influence the probability of an angle change:

Here is the blend file (Updated!):

Great! I'll try this immediately!

Thanks to your question and looking for a solution, I came up with another solution to another problem: Geometry nodes line of touching circles

Try to create an array of lines which are rotated -45,0,45. All at 0,0,0 and then place them end to end using the Accumulate fields node.

Shall be tried immediately! Haven't used Accumulate fields node at all, but I know what it's for, so let's see :) Thank you!

This is closer, but still quite far from what I'm aiming for
AH, but with Lukas' method above I managed to do this, when altered the 'map range' node a bit and added a 'Fillet Curve' node :) Now it looks more like a circuit board wire, yay.


text:
How do you shrink one end of a detailed spiral tube?
Im making a trunk of a Bonsai tree and im trying to shrink the end of the trunk smoothly. (Blue lines) Its not as simple as selecting one side and pressing s + y/x/z. As there is many polygons I also cant just select some and manually shrink them to size as it looks choppy. (Can be seen towards the base of the trunk). Any help would be great.

Hello what does it give if you enable the Proportional Editing option with the Linear fallof, and scale down?

If you model your trunk as a curve-bevel of a Bezier curve path, at least initially, then options become available to you, some of which are shown here:

You can adjust the resolution per-segment of the path, and the interpolation method between control-points, of the tilt (twist) and radius.
Rotations, scales, and positions of the control-points and their handles can be tweaked, to avoid sharp transitions and self-intersections.

Alt S will control the radius at selected control-points, and Ctrl T will control the tilt.


text:
How to flatten a face to avoid distortion (make an ngon planar)
I created a kind of procedural modeled ground (rocks desert like), with some decimate modifiers to have a really crazy topology.
The result is nice, except for some ngons faces that contains some weird normals, due to the elevation difference of several vertices:

How to avoid this? My first guess is to "flatten the face, but I can't figure out the way to do this operation.
I must specify that the face is not perpendicular to the Z axis, so a zero-Z-scaling (S Z 0) won't work here.

This question doesn't state if you mean to flatten a single face - or many.

Update, this is now included in Blender 2.75, http://blender.stackexchange.com/a/32276/55

For a very complete answer, see a duplicate question here https://blender.stackexchange.com/a/46268/52815

You can scale along the normal.
Set the Transform orientation to Normal in 3D view > Header:

Then press SZZ0.

so useful! I have spent hundreds of hours in Blender without knowing that was possible.

Since version 2.76 there is a flatten faces tool:

Mesh -> Cleanup -> Make Planar Faces

You can also use the flatten tool. This tool is part of an add-on that comes bundeled with blender. It is called "Loop Tools"

You can invoke it by going to the loops tools in the specials menu, W -> Loop Tools -> Flatten.

You can enable it in the user preferences:

Ctrl Alt U
go to the Addon Tab
Search for "Loop Tools"
Enable it by ticking the checkmark

This one works to flatten any surface even on angles, while the others above this post only seem to work when directly on the ground. Maybe I couldn't figure out the others but this one solved my issue and is great for cleaning a messy mesh while retaining rotations. Thanks for the tip!

A  simpler approach to the first answer would be, go to Object Properties -> Scale. And change the x y z value to 0 according to your needs.


text:
Why is it important to apply transformation to an objects data?
I've watched several tutorials and very often they applied the location, rotation or scale to the object when they transformed it in Object Mode. They always said it is important, but why?

Could you link to the tutorial(s) in question? The answer depends on what the object will be doing later on (e.g. a physics sim).

This is one of the tutorials: http://www.youtube.com/watch?v=zu6zbf7tdoU; for example at 01:30 and 12:10

For a rigid body physics simulation extreme unapplied scale transforms can cause very noticeable strange results, such as unnaturally fast or slow rotations depending on if the object is scaled up or down:

From the wiki:

If dynamic scaling is not needed, rigid body objects should have the scale applied by using the "Apply Scale" operator.

Unapplied rotation tends to make the simulation more unstable:

Ok thanks. So it is only needed for Physics?

@BlenderShark No, there are other cases too, e.g. exporting. Though most exporter scripts should have an option to do this for you.

@gandalf3 How do you apply scale and rotation? As far as I see in these simulations, the objects seem to have the same rotation and scale. I think I'm not sure what scale and rotation means in this context.

@Amir Ctrl+A. Each object has a scale, rotation, and position by which the underlying mesh data is transformed before being displayed. Applying a given component permanently transforms the mesh data and resets the object transformation to 0.

@gandalf3 I see. Thank you. Here's how people can do it via Python: 1) select your object so that bpy.context.scene.objects.active points to it 2) bpy.ops.object.transform_apply(location = False, scale = True, rotation = True)

Short answer: it depends.
Applying transformation can be important but it mostly comes down to what you do intend to do with the objects.
Looking at this from a simplistic viewpoint, ideally it wouldn't matter and everything would work just fine even when scaled/rotated.
A good rule of thumb is:

Apply rotation and scale to your models unless you have a reason not to.

Transformation is split up into translation/rotation/scale, generalizing on Blender's support:

rotated objects (well supported)
translated objects (well supported)
scaled objects (well supported)
non-uniform scaled objects
negative scaled objects

The last 2 can cause issues with modifiers, constraints and some tools. Even though for basic operations it works fine, there's rarely a good reason to have negative scale.
Considerations:

Most modifiers are applied before scale. So the effect of a bevel or solidify could be squashed with non-uniform scale. Armature and hook modifiers are an exception to this rule.
Negative scale will flip the object's normals (when an odd number of axes is flipped).
Most edit mode tools such as smooth-subdivide won't take non-uniform scale into account.
Rotation and scale can cause problems with armatures, especially when exporting to different formats.
Rigid body physics doesn't support scaled objects well (this could be seen as a bug, nevertheless as it stands it's not working well).
Scale applied after parenting will be applied to children, if you have complex parent/child setups - it's less trouble if you only scale objects when necessary.
Extreme scale values >1000.0 or <0.0001 (a large object scaled down or a small object scaled up) can cause floating point math precision issues when in edit mode, also for other calculations.

Areas scaled/transformed objects are fine:

Static scenery (maybe you want to have different sized rocks). Objects which don't move or interact with other objects via modifiers, constraints etc.
When it's intentional - an object stretches (animate scale with a bouncing ball).

I wouldn't recommend applying rotation as a general rule. Often it is useful to ALT+D (link duplicate) an object, clear it's rotation with ALT+R and modify it in it's original state.

@itmuckel the statement has the qualifier - "Unless you have a good reason not to" - if your using linked duplicates that are rotated, then that's a good reason.

It is also important to apply scale when doing UV unwrapping. When you scale an object in object mode the UV unwrap does not see the scale, it will unwrap the mesh as if you had not scaled it.
Scale not applied

Scale applied

This is very helpful. If you use the checker pattern to check your uv unwrap and see bad results it can sometimes be that you need to apply the transform. I'm not sure but I would guess you should do it to everything you uv unwrap

I guess, my issue about the Array modifier of a rotated object is a helpful example. Here are the pictures of what I had, what I needed to get by adding an Array modifier and what I actually got:

Duane Dibbley provided a nice explanation: if the scaling/rotating is not applied, the Array doesn't only applies rotation with respect to the pivot (Empty), but also applies previous non-applied scaling and rotating!

I also found that if you are far into your project and don't want everything to go crazy when you apply your transforms, applying transforms to delta works well.
I was nearly done my character and forgot to apply transforms, but every time I applied them something broke, my shader, my eyelids rotations, etc. Applying to delta applied the transforms, but kept most things from breaking.
You can do so by pressing Ctrl + A > All Transforms to Deltas

Applying transforms to delta is also an alternative solution and keeps things from breaking!


text:
How can you make the mesh in a 3D view a bit transparent?
I'm modelling with a reference image as a background image, but I can't see it through the mesh. How can I make it a bit transparent in the 3D view so I can see the image?
NOTE: I'm doing this in Cycles.

You want to set your background image like this:

Set it to front and give it some opacity.
Transparent mesh you can only make in Blender Internal in GLSL shaded viewport by setting the material Z Transparency Alpha or by giving it a transparent texture.

In what panel is this? I cannot find

@MicroMachine 3D view > Properties panel (N) > Background Images

authors: Николай Евстратов


text:
How to add a group into a node tree with Python
How do I add an already created node group into a node tree?
I have found that this works:
group = node_tree.nodes.new("ShaderNodeGroup")
group.node_tree = other_group.node_tree

But it creates a copy of other_group instead of just referencing it. So how would I go about just straight adding it to the node tree?

After adding the new node group node you can assign the node_group data type to the node_tree:
group = node_tree.nodes.new("ShaderNodeGroup")
group.node_tree = bpy.data.node_groups['OldNodeGroupName']

The only way I know is with operator with overwritten context. That means you will have to have a Node Editor window somewhere open:
context_copy = bpy.context.copy()
context_copy['area'] = next(area for area in bpy.context.screen.areas if area.type=='NODE_EDITOR')
bpy.ops.node.add_node(context_copy,
                      type="ShaderNodeGroup",
                      settings=[{"name":"node_tree", "value":"bpy.data.node_groups['GROUP']"}])

I can't believe there wouldn't be a way to do this otherwise, if no one else answers with something different then I will accept this. Thanks


text:
Getting an object lined up with the x, y, or z axis again
I got a model from SketchUp, and imported it into Blender to modify it. It was just half the figure, meant in the end to be mirrored to have it be completed, and when I initially imported it into Blender it was lined up perfectly so that both the nose and tail were nicely aligned at x axis 0.
Through the course of working on it however I must have accidentally rotated it off center. I want to duplicate the left side so that I can mirror it and then merge these two halves, but I need to have that center loop of the figure uniformly on x axis 0. How do I get it squared up again?! See how it's been tilted off center?

Andy, since Jerryno's answer solved your problem, please mark it as the "Accepted Answer".

Close the shape with ngon:

Add Empty to the scene, enable snapping, set to face, enable align orientation and snap the empty to the ngon:

Parent the mesh to the empty: Select mesh, select empty, Ctrl+P
Reset the rotation of empty with Alt+R
Clear parent (Alt+P) and Keep the transform. Now your mesh is aligned with world coords.
Delete Empty, delete ngon, rotate mesh to the axis you want.

Why create a ngon, step 1 and 6 aren't necessary, can snap to edge.

@iKlsR what if the seam isn't completely flat? Best would be to add also step 7: scale the seam to 0.

That did it. Thanks for the very descriptive response.


text:
Applying numeric input attribute changes on multiple objects at the same time
I have ten cubes selected. I would like to change their rotation using numeric input, using the edit boxes on the panel that opens when you press N. However, only one cube's parameter is changed.
Same is true for location, scale, location/rotation/scale lock, etc.
Why is the change by the numeric entry not being set on each selected objects? And how to achieve my intended result?

There is a new way to do this. It works for numbers, booleans and even enum properties. Watch here what to do!

The Transform in the N panel only reflects the active object. If you want to set the  value to all selected objects, you can also try the following:

Select those objects;
Setting the value as you want;
Keep those objects selected, right click on the value input field, select "Copy to Selected".

Is there any way to apply only one value to all the selected objects? For example, only the x rotation and not the y or z?

@HowToBlend https://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.75/UI#Multi-Selection_Buttons Here is a Multi-Selection Buttons feature newer than this answer. Though it might not meet your needs, it is worthy checking. I cannot find an easy solution for that. :( Maybe devs can. A good way is to answer a new answer to draw more attention. Good luck.

Thanks. I might try and bring it up on rightclickselect.com but I'm not sure how much demand there is for it. In the meantime I've got around it by assigning keyframes to the properties I don't want to change, then copy to selected will only apply to those which are not keyed. Except, that has obvious limits.

@HowToBlend Just talk about if you want to align multiple things frequently: You may want to look at the Animation Nodes addon, I call it "Blender LEGO", because you can create some useful "tools" by playing with it. e.g. For your specific question, try this.

@HowToBlend Thanks to Bastien Montagne, now we have Copy Single to Selected feature in master trunk now, you can try it by downloading the latest daily build. Bastien certainly deserve our tokens there. :)

Oh man, that is so awesome. Props to you for mentioning it too! I love this community for exactly this reason. Cheers.

Blender will only affect the currently selected or the last selected object, you cannot mass transform objects like that by default using the transform panel in the Toolshelf. If you look in the panel you will see that you are operating only on one object, the one that shows under Item.

However, there are several ways to do this:

You can just set the pivot point to Individual Origins and you can transform multiple objects at once by selecting them all and using GSR to rotate, scale or move respectively. Provided the objects all have their centers correct this should work properly. It's not exactly numeric but you can still transform in units by choosing the axes and  typing the precise number after.

Another way is to use repeat last on the other objects by pressing ShiftR after transforming an object. This only works for one action, the last performed one so make a transform you want on one object, select the other objects one by one and run Repeat Last.

You could also use an Array modifier. You can transform the initial object any way you wish and have the others update and the modifier also has position offsets.

Tested on 3.1:
Press Alt before clicking, checking a box, or pressing Enter and this will apply to all selected objects.

This doesn't work consistently though if you use Alt to emulate the 3rd mouse button, as Alt + click will stupidly try to orbit the camera around the UI element.
If you don't fear wasting our planet resources, then there are videos to explain it too.

I frequently see this suggested (e.g. "Alt+Enter") but it rarely works for me in 3.x or 4.x. Copy to Selected however works well.


text:
How to mix shaders depending on the direction normals are facing?
How to make a gradual transition between two shaders, depending on the normal of the surface against the angle of the view.
The use case is I want to make bubbles of a white, somewhat opaque, liquid. When passing through the center (from the camera) it will pass through minimal liquid so it is most transparent there. When a ray passes near the rim it will pass through maximum liquid and be most opaque there.
I will just mix a transparent and opaque material. If the normal faces the camera, select the transparent material. If the normal is perpendicular to the camera, select the opaque material.
I have tried fresnel but it is meant for items refracting light.
I have tried the normal node but can't get it to work. I think that if I just use this correctly, this is the right way.
I have tried taking the normal of the object, normalize it and dot-product with the camera normal (normalized). It gives the result below. It is in the right ballpark, but not correct. Nevermind that it is black.

If I reverse the shaders I will get something like a puff of smoke, gradually becoming transparent at the edges.

What's wrong with fresnal? Does it end up affecting the glass/refraction shader or something?

It's not gradual. It is abrupt.

Try using the Layer weight node with the Facing value as a mix factor:

The Layer weight node gives a map based on the angle of the surface to the camera:

When used to mix a diffuse and a transparent shader:

Blending:
The Blend value controls the blending between angles:
With a low Blend value:

With a high Blend value:

As mentioned by CharlesL you could further control the blending with a Color Ramp node:


text:
Python context error NameError: name 'context' is not defined
The following is a script that is supposed to access UV info but it fails right away in both Object and Edit modes.  I fist tried using Bl-2.69.8, then 2.69 then 2.68 and it happens the same every time.  I've also tried adding bpy. to the beginning of context but the result is the same.
Can anyone clear this up?

Should be bpy.context, it's probably treating context as a unique val which is not defined.

What you're looking for is bpy.context, so the first line should be:
obj = bpy.context.active_object

It refers to the bpy module being imported in the first line.
You can also use this at the beginning of your scripts:
import bpy
from bpy import context

The entire script should look like this:
import bpy
import bmesh

ob = bpy.context.object
me = ob.data
bm = bmesh.from_edit_mesh(me)

uv_layer = bm.loops.layers.uv.verify()
bm.faces.layers.tex.verify()

for f in bm.faces:
    for l in f.loops:
        luv = l[uv_layer]
        if luv.select:
            luv.uv = l.vert.co.xy

bmesh.update_edit_mesh(me)

@MarcClintDion bpy, not .bpy. Dot not preceded by identifier (accessor), or succeeded by number (floating point), is syntax error.


text:
How to randomly (with a checkered pattern) select a number of faces in a mesh?
I have an isosphere with 4k polygon. How do I delete only 2000 random polygons but not deleting adjacent of deleted polygon?
EDIT -- clarification
Imagine a chessboard, let say white = stay, black = to be deleted. The minimum distance between 2 nearest black is white (which is same distance of black). As @DavidS. puts it, "checkered pattern selection"
However, out of 4k, I'd like to delete half of it.

What do you mean by but not deleting adjacent of deleted polygon? If you want to remove half of the polys, with that condition, wouldn't it be a checker pattern selection you really need?

@DavidS. I'd like to delete faces randomly, but not the selected polygon cannot be next to each other. "Checkered pattern selection" is the shortest distance between polygons that needs to be deleted. Good you brought up there.

You could try the Checker Deselect operator, select everything, then run it from Select menu.

Go to the icosphere's Edit mode with Face selection, execute Select > Random, set Percent to 50%:

It won't select exactly 50% of the faces, but close enough that only a few additional manual (de)selection is needed. Then execute Delete X > Only Faces.
You can see exactly how many faces were selected by looking at the Info view header
Non-Adjacent Selection
I use this occasion to learn BMesh, and come up with this script:
import bpy
import bmesh

obj = bpy.context.object
prev_mode = obj.mode
bpy.ops.object.mode_set(mode='OBJECT')
bm = bmesh.new()
bm.from_mesh(obj.data)

bm.faces[0].select = True
selected_edges = list(bm.faces[0].edges)
for face in bm.faces:
    sl = [(edge in selected_edges) for edge in face.edges]
    if any(sl):
        continue
    selected_edges.extend(face.edges)

    face.select = True
print('*' * 10)

bm.to_mesh(obj.data)
bpy.ops.object.mode_set(mode=prev_mode)

Unlike Checker Deselect mentioned by @CoDEmanX, it only selects less than half of the faces in an icosphere. I think those strips can't be selected without breaking the non-adjacency requirement:

More than 4 years with Blender, I never knew this! Superb! But I wonder, if there is a way to avoid manually de-selecting face. 500 polys I can handle, but dealing with 2k/4k, might take up my whole lunch break.

@ikel: In several test runs, Select Random never settles at exactly the stated percentage. For 5-subdiv icosphere (5120 faces) it always select on average 50 faces more (or less). I didn't realize you have extra requirement; not-so-random selection would require a bit of scripting, I suppose.

I understand with percentage of selection, it can never be exact, but I can live with that. I just clarified my requirement this morning after receiving a comment from DavidS.