text:
Crude hidden line removal for oscilloscope output
I am currently expermenting with some real ancient display method. Vector displays. I am using a Teensy Microprocessor (very like an Arduino but faster) and can actually display Blenders 3D Viewport as vector graphics on my scope. See: https://www.youtube.com/watch?v=l6yvyGDUoXU
I am now searching for a crude hidden line algo, but due to my limited math and cgx knowledge this is hard :-) "crude" means I tend to do it the "Elite" (game) on a C64, which uses some kind of per object line removal: https://www.youtube.com/watch?v=ltsqeUbPuEM
I think I can use the vertex normals for this? Some dotproduct of normal and view vector?
Or are there some hidden treasures inside Blender which help me? I think it would also be too slow to do real hidden line, maybe a good pythoneer can optimize it, but... :-) The code has also other issues, I did stole quite a lot from different examples. On my laptop I can output a Suzanne at 15fps. The scope is real analogue, so I can't give here exact values, at some point it starts to flicker as the teensy tries to maintain equal brightness for the lines.
# Blender2v scope/vectrex output.
# c.wartmann@gmx.net
import time
import sys
import serial

import bpy
import bpy_extras

class SerHandle(object):
    def __init__(self):
        self.sock = serial.Serial('COM12', 9600,timeout=5)
#        self.sock=None
        self.scene = bpy.context.scene
        self.cam = bpy.data.objects.get("Camera")
        if self.cam == None:
            print("No Camera")
            exit

    def __del__(self):
        # why is it not called automatically?
        print("Closing Serial!!!!!")
        self.sock.close()

    '''
     forked from https://bitbucket.org/marcusva/py-sdl2 (which has public-domain license)
     The MIT License (MIT)
     Copyright (c) 2014 Michael Hirsch
     reference: http://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm
     * I have corrected errors in the cohensutherland code and compared cohensutherland with Matlab polyxpoly() results.
     * The best way to Numba JIT this would probably be in the function calling this, to include the loop itself
       inside the jit decoration.
    '''
    #@jit
    def cohensutherland(self, xmin, ymin, xmax, ymax, x1, y1, x2, y2):
        """Clips a line to a rectangular area.
        This implements the Cohen-Sutherland line clipping algorithm.  xmin,
        ymax, xmax and ymin denote the clipping area, into which the line
        defined by x1, y1 (start point) and x2, y2 (end point) will be
        clipped.
        If the line does not intersect with the rectangular clipping area,
        four None values will be returned as tuple. Otherwise a tuple of the
        clipped line points will be returned in the form (cx1, cy1, cx2, cy2).
        """
        INSIDE,LEFT, RIGHT, LOWER, UPPER = 0,1, 2, 4, 8

        def _getclip(xa, ya):
            p = INSIDE  #default is inside

            # consider x
            if xa < xmin:
                p |= LEFT
            elif xa > xmax:
                p |= RIGHT

            # consider y
            if ya < ymin:
                p |= LOWER # bitwise OR
            elif ya > ymax:
                p |= UPPER #bitwise OR
            return p

    # check for trivially outside lines
        k1 = _getclip(x1, y1)
        k2 = _getclip(x2, y2)

    #%% examine non-trivially outside points
        #bitwise OR |
        while (k1 | k2) != 0: # if both points are inside box (0000) , ACCEPT trivial whole line in box

            # if line trivially outside window, REJECT
            if (k1 & k2) != 0: #bitwise AND &
                 return None, None, None, None

            #non-trivial case, at least one point outside window
            # this is not a bitwise or, it's the word "or"
            opt = k1 or k2 # take first non-zero point, short circuit logic
            if opt & UPPER:
                x = x1 + (x2 - x1) * (ymax - y1) / (y2 - y1)
                y = ymax
            elif opt & LOWER:
                x = x1 + (x2 - x1) * (ymin - y1) / (y2 - y1)
                y = ymin
            elif opt & RIGHT:
                y = y1 + (y2 - y1) * (xmax - x1) / (x2 - x1)
                x = xmax
            elif opt & LEFT:
                y = y1 + (y2 - y1) * (xmin - x1) / (x2 - x1)
                x = xmin
            else:
                raise RuntimeError('Undefined clipping state')
            if opt == k1:
                x1, y1 = x, y
                k1 = _getclip(x1, y1)
            elif opt == k2:
                x2, y2 = x, y
                k2 = _getclip(x2, y2)
        return x1, y1, x2, y2

    def send2v(self):
        vbytes = bytearray(4)
        for ob in bpy.context.visible_objects:
            if (ob.type in ['MESH']):
                me = ob.data
                wx = ob.location.x
                wy = ob.location.y
                mat = ob.matrix_world
                verts = ob.data.vertices
                edges = me.edges
                for ed in edges:
                    print(mat*verts[ed.vertices[0]].normal)
                    v0_2d = bpy_extras.object_utils.world_to_camera_view(
                                    self.scene, self.cam, mat*verts[ed.vertices[0]].co)
                    v1_2d = bpy_extras.object_utils.world_to_camera_view(
                                    self.scene, self.cam, mat*verts[ed.vertices[1]].co)
                    render_scale = self.scene.render.resolution_percentage / 100
                    render_size = (int(self.scene.render.resolution_x * render_scale),
                                   int(self.scene.render.resolution_y * render_scale))
                    x0=(v0_2d.x * render_size[0])
                    y0=(v0_2d.y * render_size[1])
                    x1=(v1_2d.x * render_size[0])
                    y1=(v1_2d.y * render_size[1])
                    x0,y0,x1,y1=self.cohensutherland(0,0,render_size[0]-1,
                                                         render_size[1]-1,x0,y0,x1,y1)
                    if (x0!=None):
                        v  = (1) << 30 | (0 & 63) << 24 | (round(x0) & 4095) << 12 | (round(y0) & 4095) << 0
                        vbytes.append((v >> 24) & 0xFF)
                        vbytes.append((v >> 16) & 0xFF)
                        vbytes.append((v >>  8) & 0xFF)
                        vbytes.append((v >>  0) & 0xFF)
                        v  = (1) << 30 | (1 & 63) << 24 | (round(x1) & 4095) << 12 | (round(y1) & 4095) << 0
                        vbytes.append((v >> 24) & 0xFF)
                        vbytes.append((v >> 16) & 0xFF)
                        vbytes.append((v >>  8) & 0xFF)
                        vbytes.append((v >>  0) & 0xFF)

        vbytes.append(1)
        vbytes.append(1)
        vbytes.append(1)
        vbytes.append(1)
        self.sock.write(vbytes)
#        time.sleep(0.1)

print("-------------------------------")
handle=SerHandle()
handle.send2v()
# not called automatically?
#del handle

def scene_update(context):
        objects = bpy.data.objects
        if objects.is_updated:
 #           print("update")
            handle.send2v()

bpy.app.handlers.scene_update_post.append(scene_update)

# I wonder how to stop/remove the handler?
#bpy.app.handlers.scene_update_post.remove(scene_update)

I can't seem to calculate the angle between vertex normal and the cam view correctly. I am lost, tired to get my head around some example of similar scripts but... Must me something like get vector from cam to vertex, then dot this to get a number...

I figured out a way to do hidden line removal in Blender Cycles a while back. I know nothing of Python, yet I do not believe it is necessary to resolve your issue. This is my test render with two cubes:

Defining Geometry
The geometry in this scene is actually quite simple. I added two cubes. The larger one, moving diagonally is in front of the smaller one; it's not a difference in scale.
Creating the Modifiers
For this render, we will use the Wireframe Modifier.

The Thickness is how thick the black lines will eventually be. The higher the number, the more thick. It is very important that you also set the Material Offset to 1 because even though it doesn't look like it, there is a material in the center of the cubes where the lines are not. Additionally, the Material Offset allows the wireframe to be different (black) than the 'Invisible' part. It is also important that you uncheck Replace Original. This means that the wire is added, rather than replacing the whole cube. The other check boxes have varying affects and are not needed.
Adding Materials
Materials are everything.

Begin by clicking the New button and setting the shader to Holdout. If you have done it right, the preview sphere will be totally black. We will change this to white later. The beauty of the holdout shader is it effectively punches a hole in your render the shape of your mesh. If you render now, your cubes will be totally black.
Now click the plus button on the upper right hand side of the materials panel. Leave the Diffuse BSDF and set the color to dead black. Now your object will have two materials: One a holdout, for the center, and one a black line color. Because of the Material Offset we set up earlier, the wireframe modifier will use the black material giving the appearance of a cube with none of the hidden lines showing!

Compositing
So great! If you click the render button now, you should have...two totally black cubes imposed on a grey background, which bears no resemblance to the earlier gif. This is because we still need to do some compositing. First, check Transparent under the Film section of the Properties panel.

Now if you render, you will notice that the grey background is gone, as is the inside of the cube. There is the real 'hole punching' that it does. For the nodes, go to the Compositing Screen layout found in the Info panel at the top of the screen. Select the Compositing nodes node tree type to display and edit. Also check Use Nodes. Both options are found on the bottom settings layer of the Node Editor panel, front and center in the
Compositing Screen layout. A Render Layers input and a Composite output node will appear. Move the mouse over the Node editor, key Shift+A, mouse over to Color, and select Alpha Over. This new node will follow the mouse. Drag it over on top of the line connecting the first two nodes until the line glows orange. Then left click to confirm. Make sure the line connecting the yellow Image output of the Render Layers node is connected to the bottom yellow Image input of the Alpha Over node. Check that the remaining color is pure white, the Fac is 1, the Premul is 0, and the Convert Premul checkbox is unchecked. The node setup should look like this:

If you have done everything right, you have now hidden the back lines. You can keyframe the location of the boxes if you so desire to to make them move.
Closing Thoughts
I chose to go with black and white, but you could play with the second material down to change the line color and the first material if you wanted to change the color inside the box. For a flat color, I would suggest using an Emission shader, set to the desired color. Obviously the Alpha Over color can also be changed to differ the background. If you wanted to see through to the other side of the box, you could use a Transparent BSDF set to pure white instead of the holdout. Lastly, consider this tutorial on the basics of the Wireframe Modifier and this one on the holdout shader. These are the only references I used when making this.
Hope this helps and happy Blending!

This is nice but was not the question.

I was answering based on the "Or are there some hidden treasures inside Blender which help me? I think it would also be too slow to do real hidden line, maybe a good pythoneer can optimize it, but... :-)" in your question. I am sorry if this wasn't what you were looking for.


text:
Set Label in Python Node?
So I am experimenting with python nodes. So far I am able to add a new node tree and my Nodes are doing things (adding and multiplying floats...well). One more cosmetic thing is that I don't get how to set a Label from this, I predefine values and a label:
    MyNodeCategory("OTHERNODES", "Predefined Nodes", items=[
    # the node item can have additional settings,
    # which are applied to new nodes
    # NB: settings values are stored as string expressions,
    # for this reason they should be converted to strings using repr()
    NodeItem("FloatInputNodeType",  label="Pi", settings={
        "wert": repr(math.pi),
        }),

But I have no idea how to get this into my added Nodes, the above is closely to the Custom_Nodes.py template which hints this should be possible, the settings/properties are copied ok. Then the code leaves my in the dark:
# Optional: custom label
# Explicit user label overrides this, but here we can define a label dynamically
def draw_label(self):
    return "I am a custom node"

which is not what I want :-) This of course sets the label to "I am a custom node" in the node itself but also not in the Label: field in the Node: sidebar.
Omitting the def_label uses the bl_label.

Why not just use the node.label that you can edit per each node instance in bpy.data? Are you looking to hardcode the label into the definition?

I have no idea how to get the info from the NodeItem() to the function draw_label...

By "label" what are referring to? Node has a "label"-property that is shown in the node editor property that is normally blank and can be edited by the user?

I define a label in MyNodeCategory() as in the source above. But this does NOT show up when the Node is created. There is a draw_label() function which can set the label by (i guess) self.node.label or such. But I have no idea where the label from MyNodeCategory() is gone in the way between...Does this makes sense?

Not in the slightest.

source: Stack Exchange

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

sort: votes


text:
How to add pie menu so it will load next time I start with blender
How can I add this pie menu from text editor to blender(2.78) so it will load every time. Script kiddie here so please explain in plain English.
import bpy
from bpy.types import Menu

class VIEW3D_PIE_template(Menu):
    # label is displayed at the center of the pie menu.
    bl_label = "Select Mode"
    bl_idname = "mesh.kkmodeling"

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

        pie = layout.menu_pie()
        # operator_enum will just spread all available options
        # for the type enum of the operator on the pie
        #pie.operator_enum("mesh.select_mode", "type")
        pie.operator("view3d.edit_mesh_extrude_move_normal", text="Extrude Region")
        pie.operator("view3d.edit_mesh_extrude_individual_move", text="Extrude Individual")
        pie.operator("mesh.inset", text="Inset Faces")
        pie.operator("mesh.edge_face_add")
        pie.operator("mesh.subdivide")
        pie.operator("mesh.loopcut_slide")
        pie.operator("mesh.offset_edge_loops_slide")
        pie.operator("mesh.knife_tool", text="Knife")
def register():
    bpy.utils.register_class(VIEW3D_PIE_template)

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

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

if __name__ == "__main__":
    register()

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

load py from preferences addon tab. Then activate add on.

Won't work with this code above. Please explain why, thanks!

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


text:
Importing OBJ with MTL and Image not working properly
I'm trying to import an OBJ file that has associated MTL and PNG files. There's a similar question here, but the answer is not very helpful, I just see a big blob.
These are the files that I'm trying to import. Inside the textured meshes folder there's a few different versions of the object but none seem to import correctly with the texture applied.
I also don't have access to the material and object (as well as a few other) buttons. (see the picture)

Blender 2.71

1. Check the obj file
In your case the obj is not exported correctly. Obj is a human readable file format it is easy to find the issue. You can check this by open up the file in a text editor of your choice (sublime, gedit...).
To check referenced materials go to these lines:

mtllib [external .mtl file name]
usemtl [material name]

In your case mtllib line is correct, but usemtl is missing.
# OBJ FILE
...
f 3103/18700/18700 3081/18701/18700 3119/18702/18700
f 279/18703/18703 3118/18704/18703 274/18705/18703
f 265/18706/18706 3101/18707/18706 278/18708/18706

# usemtl material name (reference to the .mtl file)
usemtl MyMaterialName

You can find the material name in the mtl file in this line: newmtl [material name]
# MTL FILE
newmtl MyMaterialName
Ka 1.000 1.000 1.000     # white
Kd 1.000 1.000 1.000     # white
Ks 0.000 0.000 0.000     # black (off)
map_Ka myMap.jpg         # ambient texture map
...

As last step check if the paths to the textures are correct:
map_Ka my-texture.jpg                           # points to texture in obj folder
map_Ka /home/user/images/my-texture.jpg         # absolute path on unix
map_Ka C:\\Users\\user\\images\\my-texture.jpg  # absolute path on windows

Make sure that the filenames of your textures are correct and there are no white spaces in the paths itself. Instead of pointing to the 'absolute path', you can also try Blenders Find Missing Files operator. For further information about all the possibilities of obj's read this wikipedia article.
2. Apply the material
If the material is not applied to the imported object you can select it here:

3. Enable textures in the viewport

If your textures are pink, see: Why are all the textures in my file pink?
To display the texture in the viewport see: How to show textures in the 3D View editor?

I'm having trouble getting this to work, I don't get the material button in the scene as you show... I only get the options shown in the picture I posted.

ok, got the button thing figured out, but after changing the material it still doesn't display the texture on the mesh. Is there some other option that I need to change?

Ok, finally, took me a while since I don't know blender very well. Your solution works great, I was just missing the step to go into the UV/Image Editor and make the changes there as well.

I changed the texture as you showed. 2) Went into edit 3) changed the image in the UI/Image editor. Then everything looked like it should. Here's a pic showing where I did these things if it's not clear. https://dl.dropboxusercontent.com/u/65115630/blender.jpeg

In general texture is applied to diffuse layer(map_Kd) rather than ambient layer(map_Ka)

Although that's correct @neckTwi, I did not mention anything about that...  linked the wikipedia article however. Such comments wasting time IMO. If you think that this additional information is relevant in this case and you are really interested in helping future visitors, then please improve my answer (by suggesting an edit) instead. Thanks

I am just checking my understanding of 3D. I have just gone through OpenGL tutorials recently. Thank you for confirming that I am right. sorry!

map_Ka what its for?

Having had this issue on multiple occasions and resolving it by manually editing the MTL file with map_Kd texture.png.
The cause ended up being that creating a Shader Node in Blender 2.8 material with Image Texture > Material Output wasn't enough for Blender to parse the flow graph for the texture details, and it was necessary to create the material like this:
Image Texture > Principled BSDF > Material Output.

Thank you. That solved my issue.

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


text:
How can I generate terrain under road?
I've this project:

I'm beginner so I don't know how can I do that, I want to edit surface to align with the road.
Like that:

Am I able to do that without editing every vertex?

.. Much easier, (as in real life,)  to start with the landscape, and conform (shrinkwrap) the road to it, than the other way around. The landscape contains full information about where the road should go.. the road can't determine the shape of the landscape where it isn't there..

The solution (if there is) could be really dependent on your actual models (both roads and terrain) and what you aim to do (in particular the wanted polycount).

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


text:
How can I edit a shape-key mid-range without drivers?
For example, the model I am working on will need shape keys for blinking, adding a shape key is simple enough but turns out when I set the key to 0.8 the eyelid is clipping through the eyeball before falling into place on 1.0 where it looks normal, so how can I edit the shape key at 0.8 so it doesn't clip? every time I try to go back on the range slider and edit all changes are added up to the maximum range and so it would affect how the shape key looks at 1.0, since the model has to be exported to work on a game engine it needs to have single shape keys to assign on certain functions.

i have same problem with round eye extruded, you can also make the eye close in the 'middle' for this case. so top lid closing half and the bottom lid closing half

Shape keys can be used to change a mesh shape with a certain amount of vertices into an other shape with more (or less) vertices. But for the sake of (my) argument lets assume it is the same amount of vertices for the start and end shape. The same way i think you are using shape keys.
In that case i believe a shape key can be seen as a recording of two location coordinates for every vertex in the mesh. (a recording like an animation keyframe). One for the start shape and one for the end shape.
I think (when the shapekey Value is changed from 0 to 1) an individual vertex moves from its starting position to its end position traveling the shortest possible distance. In other words, it moves in a straight line.
If i understand (or imagine your problem) correctly, you are essentially asking if a vertex (part of a single shapekey) can have a third coordinate location (like an animation keyframe) along the way. A third location it would be at if the Value is somewhere between 0 and 1, and that is not somewhere on the strait line between the start and end location. I'm pretty sure at the moment it can't.
Probably there is some other solution to your problem, but i think you would have to approach your problem (and possibly phrase your (new) question) differently.
Hope that gives some insight : )

Yep, that's exactly my problem here.


text:
How to stop Blender from resetting tool with Undo?
Most of the time when I undo (Ctrl+Z) Blender not only undoes an operation but also resets any tool I am using a step back or several steps back, for example, I have a locked vertex group, unlock it, do something like weight paint but make a mistake so I press Ctrl+Z and it not only undoes the painting but also locks the group and sometimes even goes to the last selection and tool I used which messes up the workflow and sometimes even deletes certain things like custom colors on a palette, resets brush settings, etc.
Is it a feature? how can I disable that so only the very last step is undone?

it's a problem in the last versions, I hope it will be corrected, you can give a thumb up to this request: https://blender.community/c/rightclickselect/Jtfbbc/

Hello :). I voted to close this question as Bug related, because it's a High Priority bug already reported here. Hope it get's fixed soon.

OK, glad to know I am not the only one with the problem.


text:
Install pip in blender 2.78 SSLError
I've just downloaded Blender 2.78 (from here). I would like to install scipy. Therefor, I want to install pip using get-pip.py. I've downloaded the file and executed it as follows:
bin/python3.5m get-pip.py

This results in the following output:
Collecting pip
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645)'),)': /simple/pip/
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645)'),)': /simple/pip/
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645)'),)': /simple/pip/
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645)'),)': /simple/pip/
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645)'),)': /simple/pip/
  Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645)'),)) - skipping
  ERROR: Could not find a version that satisfies the requirement pip (from versions: none)
ERROR: No matching distribution found for pip

There are many people with the same error message, but they get this message when they try to install a package using pip.
Using a proxy does not solve the problem.
I'm using blender in a docker with Ubuntu 4.15.0-54.58-generic 4.15.18
Does anyone of you know the error?

This is likely caused by an older version of the OpenSSL lib or misconfiguration. Seems like your script tries to create a TLS connection with the very out-dated version 1 and the pypi server refuses the connection. See the following link on different approaches how to install packages: https://blender.stackexchange.com/questions/5287/using-3rd-party-python-modules
Also, if you just installed Blender I'd either go with 2.8 or the most recent version of 2.79 depending on which UI your more comfortable with.

In the newer versions you can simply use ensurepip, as described in the link answer.

Thank you. I was able to install pip using NAS' answer.
The problem stays the same, more or less. I can not install anything, probably due to an old openssl version ( ´bin/python3.5m -c "import ssl; print(ssl.OPENSSL_VERSION)"´returns ´OpenSSL 0.9.8o 01 Jun 2010´).
´bin/pip3 install scipy -v´ raises ´SSLError(e, request=request)´ (even if I set trusted hosts)
Do you have an idea how to solve that problem?

I've checked and this is because the old python uses an out-dated version of OpenSSL. Since you can't just upgrade the entire Python used in Blender, your best bet is to install 2.79b which is compatible in the Python API. There are others ways to fix it, but none that are straight forward.

Thank you! I'll try that and let you know if that works for me.

Worked perfectly. Thanks.


text:
Animations not working in the BGE?
I have a simple character (below) that is in the middle of an animation that does not work with my logic bricks.

Here are my logic bricks. Sorry, may be hard to read (click on the image for a bigger version).

It states that when the property inMovement is set to 1, it will play a walk animation, and, on the other hand, it will not when it is set to 0. I thought that the problem would be with the parenting, but it all looked fine:

After this I thought that the animation just didn't work, but it did. This is the animation of my blocky character picture at top.
.
Everything I stated here is true, and I did not lie and/or take pictures at different times. All the screenshots were taken at one point in time, and no editing was done between them.
How do I get the animations to play (Loop Stop) based on whether the value is set to 1 or 0?

Could you post a .blend file?

I'm currently making a game myself, and what i do is connect the W A S D keyboard sensors to individual AND controllers. These each go to seperate MOTION actuators directing the speed and direction to walk in (A and D can be set to rotation). Then create an ACTION actuator with your animation in it and connect it up to the AND controllers of the W A S D sensors. You can reverse the animation for S key by duplicating the ACTION actuator and reversing the KEYFRAMES. If A and D are for rotating, don't add the action.

Thanks! That is an answer, but I already had it solved.


text:
Mirror modifier mirrors on different axis/axes from the selected one(s)
I have 2 objects a face and an ear. Mirror modifier works fine for the face. But when I use mirror modifier to duplicate the ear on X axis, it duplicates on Z axis. And when I use mirror modifier on Z axis it mirrors on X axis. How to correct the axis orientation?

Thank You. It works fine after rotation. Please write this comment in answer section. I will mark that as an answer.


text:
How to render an orthographic image with an alpha mask in cycles?
I have created a simple grass scene with materials created in cycles.

I would like to render this image with an alpha mask and without any lighting. How would I do it?

Set the camera to Orthographic view.

Then render it as a PNG with RGBA.
Under the Film tab check the check mark for transparent.

Now if you need separate black and white image for the alpha mask.
Go to the compositer. Plug the Alpha from the render layer in to the Image socket of the Composite node.


text:
How to get a object mask as part of the alpha channel?
I am trying to get the middle sphere to render as a part of the alpha for the image. In the image below where I have the test grid image at the moment it really should be transparent. How do I do that?

If you are using cycles, all you have to do is use holdout sahder node.
 Give the object that you want to have the 0 alpha a new material like this.

Then in the render tab of the properties window, under the Film section enable Transparent. You will have to save your render to a image format with a alpha channel, such as a .png.

Woah I never knew of that shader before, thanks a million David! That worked just right!

These two nodes are all you need to add a object index pass to your render's alpha.

First the ID Mask gets the right object. The the Mix node combines the render's alpha with the object index. The Object Index pass returns a black and white image, so that is just mixed, using itself as the factor with the original alpha. Last plug the new alpha in to the Alpha socket on the Composite node.


text:
How to save an image in UV/Image Editor with grease pencil strokes visible?
I made a few grease pencil strokes over an image displayed in UV/Image Editor, is there a way to save an image that includes those strokes (except making a screenshot)?
Using "Save as Image" saves only the original picture:

Just gotta say, sick render!

the render is not mine, I'm only commenting on a render made in Blender by another person :) namely pointing to the texture repetitions visible

I think screenshot is going to be the way to go. Is there some other problem with doing it that way?

The problem is, I will need it many times in the future, it's not convenient and wasteful to create screenshots of entire interface and send them back to artists with my comments.

I think in this case it would make more sence to use something link GIMP or photoshop to do the draw over, simply because they are designed for this type of thing.

I think that request is fully legit. If grease pencil can be used for animation production why not use it for simple render/texture commenting. Meanwhile this also needs a feature of text being added along the pencil.
I suggest that you create a feature request to devs. This way you contribute to Blender development.

The most obvious workaround is to not use Grease Pencil at all and use texture painting instead. The "mode" button should be switched from "View" to "Paint" and then all the paint strokes are saved with "Save as Image" option.

OpenGL will render your what you see in the viewport. To render using OpenGL, click render > OpenGL render image

I'm afraid this doesn't answer the question, because OpenGL render will render what is in viewport while the question is about exporting modified inside Blender image from UV / Image Editor.

Sorry, I happened to overlook that.

alternatively, you could add the image as a plane in the viewport. enable the addon "import images as planes" then open file > import > images as planes.

@MrZak the accepted answer didn't answer the question either, and yet...


text:
How to make easily editable text that acts as texture or normal map for another object?
I'm frequently making objects with text on them. To make those texts easily editable, I'm using "Text" objects that I glue to the surface of my target object using Shrinkwrap Modifier (as shown on the picture below).
However, problem arises, when I want some of the texts to be eg. concave. I don't want to use Boolean modifier, because it's too slow. The ideal solution would be some kind of modifier that would magically "project" my text objects onto the target surface as simple black-and-white (no shades of grey are necessary) texture, where it can be used as normal map using bump node.
Of course I could just make a black on white text in Gimp and use it as simple image texture, but that would not be easily editable from within Blender. The preferred solution would be something easily editable "on the fly" by pressing tab on the Text object and just typing new text.

Maybe you can do something with dynamic paint, such that the text volume paints on a texture. But I think you have to convert your text to a mesh for that.

Thank you, that is the closest thing to the one that I wanted to achieve. I tried dynamic paint and it works well, with very simple baking onto image texture that I can later use. The only downside is that the text has to be converted to non-editable mesh before proceeding.

I think I finally found a reasonable solution that keeps text editable on the fly without intermediate to-mesh-converting, thanks to Kamil1064 from http://polskikursblendera.pl/forum/
The secret is in shadow baking.
Steps:

switch to Blender Render
add plane
unwrap it, add new empty texture to it
position your text object slightly above plane
add sun lamp, adjust it's angle to cast light straight down (rotation x0,y0,z0)
adjust sun lamp settings to the following: Ray Shadow, Samples: 10, Soft Size: 0.010 (if you won't, you'll have jagged sharp shadow edges instead of nice antialiasing)

select your plane and bake with settings: Bake Mode: Shadow

If everything is set properly, you will have a nice, antialiased texture that you can save for later use. The best part is, it will be easily editable from within Blender, just select text object, press TAB and edit it, then press Bake again, and voila.


text:
Blender 2.73a crashes on start up
I am using windows 7 64-bit, freshly installed. I installed Blender 2.73a but after installation, when I open blender it crashes (Blender has stopped working), but Blender 2.68 works perfectly fine.
A similar question has been asked before but the solutions haven't helped.

In your question please be explicit about which solutions you have tried, and what kind of graphics card you have.

Do any of the 2.7 series work on your machine?

im using an geforce 840m in my laptop i7 with 8 gb of ram windows 7 professional Edition,
version that worked(windows 7):
2.68 and 2.70 only
all the other version won't even start up even 2.73. it shows (blender has stopped working)
Note:I was using 2.73 before when i was in windows 8.1, last month i switched to windows 7 professional since then the most recent version i can used is only the 2.70a version.. Thank you everyone

i fix it myself. i followed a solution similar to my problem, by copying the python34 folder to (2.73/python) it worked, but, everytime i press shift z (rendered  view)it crashes. I guess i'll just have to use  2.70 until someone has fix this issues in later versions, by the way thanks everyone.

If the problem is related to having a PYTHONPATH environment variable set, you can do the following so you don't have to modify your PYTHONPATH variable. I am running 2.75a and this fixed my problem.

Make a batch file somewhere like your desktop

To do so, create a blank .txt document and name it blender.bat (MAKE SURE THE EXTENSION IS .bat and not .txt)

Edit blender.bat and add the text below
set PYTHONPATH=""
cd C:\Program Files\Blender Foundation\Blender\
start blender.exe

Your blender path may be different, so make sure you find the correct path
run blender.bat

This will temporarily set the PYTHONPATH to "" (nothing) during your blender session but is restored after you close.

This suggestion resolved the issue for me on Windows 10 x64 with Blender 2.78a

Way to late but, it didn't helped. I'm getting "C++ Runtime Error"


text:
How can I change IntProperty default value?
I've got 2 properties. My first:
hT = EnumProperty(items=(('A', "None", ""),
                         ('B',"LeMans 40", ""),
                         ('C',"LeMans 45", ""),
                         ('D',"LeMans 50", ""),
                         ('E',"LeMans 60", "")),
                         default='C', name="Hardeware type")

My second:
 fW = IntProperty(name="Width",
             default=838, min=800, max=2700, description="Furniture width")

My first property is for choosing the hardware of my furniture.
Each hardware needs a minimum dimension of its furniture. So, for example, if I choose "LeMans 60", the "default" and "min" value of my second property need to change to 998.
Is it possible to do that or do I need to create a property with its own default, min and max value ?

I don't think you can do that, but a work around is to use update function for the first prop to set the value of the second and have the largest range (from min to max ) set for the second vale, and use an other update function for the second to check the state of the first and do the clipping job(to overcome  a fixed max min )

Related https://blender.stackexchange.com/questions/195459/how-can-i-change-intproperty-default-value-stored-within-propertygroup

You can't do that to an actual instance:
import bpy
bpy.types.Object.prop = bpy.props.IntProperty()

bpy.context.active_object.prop
# this evaluates what the value is and returns <class 'int'> - not subscriptable

To adjust the min max etc. you need to re-declare it:
bpy.types.Object.prop = bpy.props.IntProperty(min=100, max=300)
# note: re-declaring will change it for all the objects

Changing the default value will not change the actual value of that static property - you will need to assign it a new value in that case. But newly created objects will have this new default.
You can make it work like this:

create callback function for your hT property
have this function re-declare your fW property with new parameters based on hT value

Thanks for your answer. Finally, i think i'll create property for each furniture, more simple for me. Hope i don't need tout create too much hardeware ^^

Has Blender changed to where we have to use bpy.props.IntProperty instead of using bpy.types...?  I can only get it to work using props.  And accessing the dict via ['soft_max'] doesn't work for me either, I can only update the property by re-declaring it.

@jdk1.0 you are right, it no longer works.


text:
Display popup of sculpt brush in a pie menu
Is it possible to display directly the sculpt brush popup using a pie menu?
If I add the template_ID_preview in the pie menu I have to click on it to display the popup, but it's not exactly what I want.


text:
How do I get the children of a frame node?
I need to get the child of a frame node but it seems it is not possible "simply".
I'll have to create a function myself or have I missed something?

Instead of looking at the frame node and trying to find its children you have to look at each node and see what its parent is:
import bpy

children = []
nodes = bpy.context.scene.node_tree.nodes
frameNode = nodes['Frame']

for node in nodes:
    if node.parent == frameNode:
        children.append(node)

print(children)

This creates a list of the frame node's children.
Or the more condensed version:
import bpy

nodes = bpy.context.scene.node_tree.nodes
frameNode = nodes['Frame']
children = [node for node in nodes if node.parent == frameNode]

This is based on compositor nodes so accessing the node tree will be slightly different for materials, but the same logic will apply.

Indeed, it also works well with materials. Thank you very much.


text:
How can I have varying speeds for my Motion gamelogic actuator?
I wanted to walk and crouch walk. Walk with a faster speed and crouch walk with a slower speed. The control for the walk is W and crouch walk is C+W, but when I play the game, the crouch walk speed is the same as the walking speed. I don't want to change any of the controls, so is there any solution ?

i think that W key motion is overriding the W+C you should change the logic so the faster motion stop when you hold C

Here is one away to do it :
Instead of having a low speed for the crouch give it a negative speed this way when it is combined with faster motion it slow it down

@XavierChoo does that solve it for you ?

Somehow , i feel like an idiot after looking at this xDD !Learn a lesson ! Think another way round haha! Thanks ... and just by looking at it , i know it will work without trying. Yes , it did work.


text:
Shader Editor Problem
I want to use the shader Editor to give my objects color / color gradients but the objects doesnt react to anything I do in the shader editor.Yes, I made a check at "use Nodes"

Are you sure that you're editing the material that is assigned to the object (have you selected the object)?

yes, im sure. j

Please attach the blend file so I can see the problem.

https://www.dropbox.com/s/10g112qrdiiu7h9/sittebr.blend?dl=0

You have deactivated the nodes for several materials, which is why the settings aren't applied. Click "Use Nodes" and it works.

Nodes are deactivated in the file. Notice that "Use Nodes" is gray.

Click on "Use Nodes" to activate

Changes are now being applied.

thank you, it worked

@NeedSomeHelp You're welcome. Please mark the answer as accepted by clicking on the check mark next to it.


text:
How close can blender simulations get to reality?
can blender be used to simulate the real forces that are present in a model and can it be used to optimize model shapes? i have tried looking for examples online but found nothing that is satisfactory. to simplify my question how realistic can blender simulations get to real life?

Blender physics simulations are mostly approximations, good enough to fool your eyes in a render but not much more. I don't think they are precise or accurate enough for anything else. If you are looking for physical accuracy look else where, if just you wan't something that "looks close enough" than it is probably ok

AFAIK not very close. I think there is an old modified blender version that uses the SOFA-Framework instead of the blender physics engine and would therefore generate much more accurate physical results. However i am quite sure this doesn't exist for the current blender versions(2.79b/2.80)


text:
How can I get blender to scale based on the barycentric coordinate
My blender program is scaling towards the mouse cursor, I don't think it used to do that so I was woundering how I would make it scale to the barycentric coordinate like it used to.

just to help you out in the future, it's called the 3D cursor.  Here's how to fix this, above the timeline to the right of the dropbox where you change between solid shading, wireframe etc. there is another dropbox.  click it and choose, median point.
I hope this helps.

you just helped make teh best blend file

glad I could help :D


text:
Editing object created from bezier curve
I used a bezier curve to create an architectural moulding profile. Extruded the shape and used solidfy and made exactly what was intended. I would like to find a way to cut the shape with a knife at a 45 degree angle. Suggestions?
Thank you!!

How about the knife cut tool?

Get into a front or left/right or top, orthographic view, and use the knife tool with Z (to cut through) and C (to constrain the resulting line to a horizontal or vertical direction, or a 45 degree angle

Use the knife tool with K and press C to constrain your cut at 45 degree (or straight or vertically) If you need to cut both side of your mesh hit Z. when you are done press enter.


text:
3d Holographic Fan
Good afternoon everyone.  Quick question, I am trying to create a really simple 3d image of an existing logo for a friend's restaurant and then take said image to upload onto his 3d Fan.  I am a complete novice at this so hoping someone can tell me if Blender is the right path for this as it appears to be very robust (and free) but again, I'm a 3d novice so maybe its overkill?

Maybe ask a friend who already knows the software, unless you want to learn 3d

Blender is definitely capable of doing it. Learning the software is admittedly a steep curve, so it may be hard to justify the investment just for this one case. However if you plan on using it further afterwards for other purposes or doing it just for fun, then go right ahead


text:
Accessing a render in a remote GUI instance
I hit F12 to start a huge render just before I left work on Friday. Now the render is ready, but Blender is just sitting there consuming a lot of memory. I'd like to get the render saved to disk, so I could kill the Blender process.
Is it possible to access a render that is sitting in a Blender instance on a remote Linux machine?

e.g. is there a way to make Blender to save its render results to temp space?

After your single image render has completed, there should be an EXR file in your System Temp folder, even if Blender has not formally outputted a frame image. However this is only the case if you have enabled Save Buffers in the Render Performance panel beforehand.
Check your Blender preferences for where that folder is on your Linux system (default path is /tmp for linux). The folder may be hidden, so you may have to unhide it to see it, but there should be an EXR file there until a system reboot or the folder is cleared for some other reason.
Alternatively, if your Blender app is running in GUI mode, you could possibly Remote Desktop into your Linux machine, and just save the image out of Blender.
Failing those 2 solutions, you may be out of luck, unfortunately.


text:
Merging 2 objects, no loose parts
I would like to ask if there is a way to merge 2 objects together in a way that later it will not be separable if I hit "Separate by loose parts".
I am facing this problem when I am making a torch like object which consists of two objects, an icosphere and an elongated cube. When I do Ctrl+J to merge them, it's fine because it's only one object. But after I use the array modifier to make a lot of torches and then separate them by loose parts, I get all the icospheres and cubes separated too, not just the torches.
I have no idea how to solve this problem. I will appreciate any help.
Thanks.

Did you try to connect the meshes with at least 1 vertex?

No, I don't know how could I do that.

Do your parts of the torch have to be visually separated?

Yes, but only visually. And I have tried to merge the two objects and then in edit mode I selected one vertice of the cube and one vertice of the icosphere, but I just wasn't able to connect them with Mesh -> Vertices -> Connect.

I suppose Merge will be the appropriate one, or maybe creating an edge between the vertices?

We can avoid the separation of the two objects after hitting the Separate by loose parts in these steps:

Merge the two objects with Ctrl + J
Go to Edit Mode and select 2 vertices, one belongs to the first object and the second belongs to the second object
Merge the vertices with M

Can you add details of the steps for the solution and a screenshot so it will be crear for other people?

Corrected CTRL+M to ALT+M. Hope that was your idea. CTRL+M does nothing.

I've been dealing with this problem in 2.8 and having no luck finding fixes online. But I've just found a fix, so I hope this comment might help someone in the same position. Have a look at a plugin named "Fast Carve". It has a great set of tools similar to Adobe Illustrator's Pathfinder tools. Including a Union button.
Use this to join your 2 objects without needing to merge vertices. Hope this helps someone.


text:
select specific face by its index
How do I select a specific face within a mesh knowing its face index or vertex?
I tried without success:
bpy.data.meshes.polygons[2].select=True #where the face index=2

The line below is invalid.
bpy.data.meshes.polygons[2].select = True

bpy.data.meshes is a collection of all meshes in this .blend file, it doesn't have an attribute .polygons. You are close though, you need to reference a specific  mesh either via
mesh = bpy.data.objects['some_object_name'].data
# or
mesh = bpy.data.meshes['some_mesh_name']

Important to note here that Objects are not the same as Meshes

An Object can hold a reference to a Mesh. (or Curves, or other Types)
A Mesh only holds references to the objects that use it. (Actually, I think it only holds the count of objects that reference it.. not their names: maybe someone can correct me?)

In Object Mode
One way to select by face index is, go to Object Mode first then do
obj = bpy.context.active_object
obj.data.polygons[2].select = True

When you go back to Edit Mode you'll see the face is selected.
In Edit Mode
If you wanted to do that in Edit Mode, this might be unintuitive at first, but it involves a little more code. Blender  comes with a useful collection of templates for mesh editing. The relevant template for this question can be found in Text Editor > Templates > Python > Bmesh Simple Edit Mode.
Below is a slight modification to that template, copy it to the Text Editor and press Run.
import bpy
import bmesh

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

# notice in Bmesh polygons are called faces
bm.faces[4].select = True  # select index 4

# Show the updates in the viewport
bmesh.update_edit_mesh(me, True)

for 3.0
import bpy
import bmesh

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

# notice in Bmesh polygons are called faces
bm.faces[4].select = True  # select index 4

# Show the updates in the viewport
bmesh.update_edit_mesh(me)

yes no reference just number of users, it will be redundant to store the relation on both sides

cool,  don't recall ever really needing that information anyway.. just wondering!

Thanks, this works great,  the key is to do this in object mode.

You may need to do bm.faces.ensure_lookup_table() before bm.faces[4].select = True  # select index 4

I noticed that sometimes obj.data.polygons[0].select = True doesn't select the face. even when doing a loop for face in obj.data.polygons: face.select = True. sometimes nothing happens, nothing is selected. but the bmesh way does always work. so something's wrong with obj.data.polygons[0].select


text:
UV Unwrap/UV Skinning: Blender vs. 3DS Max
I'm starting to get annoyed by the lack of information on this subject...
Anyway, this is kinda-sorta a repeat of a previous question that was belittled into non-existence. I want to know if 'UV mapping' in Blender is exactly the same as it is in 3DS Max, and if it isn't, then how and where is it different?

Every 3D software have similar and different methods for UV mapping, I don't think this question is very useful, try to ask something more specific.

I'm being as specific as I can! The blender manual has noting on UV mapping and I want to know if it can be done in Blender, or if I have to port it over to 3DS Max before I can skin it!!! Also, @Ray Mairlot: I'll accept your edit. It's a simple yes or no, here's how it's false question!!!!! Why can't you guys think like me, is it because of my Asperger's or something?

http://www.blender.org/manual/render/blender_render/textures/mapping/uv/unwrapping.html

Please consider viewing a useful video tutorial on [Blender UV Mapping] on a video site. Youtube is one example.  This BSE site is part of the community documentation.  Blender documentation comes from many places at this moment and will probably remain that way for the next few years or more.  You will be disappointed if you expect all the good documentation to come from Blender.org.  Blender is has many features and is challenging.

@Nefer007 Your question is too broad, this site is for answers to specific questions (specific doesn't mean clear - it means for single problems). This site is not to do your research for you! There is no lack of information, there is lack of your effort to find any (videos for uv mapping everywhere, blender manual, etc.). Also please stop shouting and don't use capslock unless you are a kid - no one owns you any answers. Be kind and you will get kind response.

arrrrrrrrrrrg... that's EXACTLY the point! I want someone to be keeping everything up-to-date, removing missing file links and things like that!  http://www.blender.org/manual/rigging/skinning/objects.html is a dead page, http://www.blender.org/manual/game_engine/physics/material.html is a dead page, the demos don't exist, there aren't any walkthroughs, it's shoddy work and it's confusing me!

UV unwrapping is doing essentially the same thing no matter what software you are using, see this answer for a more detailed explanation.

@Nefer007 You are totally right that blender documentation is in terrible shape and should be fixed and be updated. If it was payed software you would be right to be angry and demand a fix. But this is opensource so it's kinda expected - nobody has time for it. If you want to invest your time to keep the documentation up to date and filled with good info I think blenderfoundation will welcome you with open arms. With paid software you get the service though.

@Nefer007  "Someone" = you and me. I've been contributing to the docs where I can, but more people are always needed

If in "exactly the same" you are talking about the process of unwrapping then no, every software you use will do it slightly differently; if, however, you mean the result of unwrapping an object, then (as far as I know and practically speaking) yes.
So I will attempt to answer your question in two parts:
Process:
The main difference in the process of UV unwrapping between 3ds Max and Blender is that in Max, unwrapping is done within a modifier; whereas in Blender it is done at the base mesh level in edit mode.
This is the only main difference I can think of at the moment.  Obviously there will be many other minor differences.  But there really isn't much that either software can do that the other can't.  It is mostly determined by ease of use and personal preference.

Result:
As I mentioned above, the result of unwrapping an object is basically the same as in 3ds Max.  I.E. every vertex on the model is assigned a UV coordinate and the coordinates are interpolated between them across the faces.


text:
Where are the Laplacian Lightning settings once the addon has been installed?
I broke down and installed the Laplacian Lightning addon, like suggested. But now I can't find where to trigger it, that is to say, actually apply it to an object like a plane.
In specific, this plane:
I don't really have any ideas on where the button might be, but then again, I only got it yesterday. Can I have some help please?

And Ray? Please, stop editing the title, they're meant to be a hook to get people to notice it.

The purpose of the title is to indicate what the body of the question will be  (which I didn't think your title did) not to 'hook' people. The purpose of this site is to not only answer questions but to provide a database of answers that might be found via google by others, in the future, which might be hard if the title is not perfectly clear.

From the addon author's website:

UI will be in >View3D>Tool Shelf>Laplacian Lightning (object mode)

Make it appear by pressing T (View>Tool shelf) while in 3d view and scroll down to the menu in the Tools tab. It is visible only in Object mode.
If this doesn't work, make sure you downloaded the proper version that match the current Blender version. See the website fore more details.

ummm.... shiitake mushrooms! sorry, umm... blender's... dying. Really. It's not letting me scroll. Something's horribly horribly wrong.

I'll mark you as answer once the issue is fixed.


text:
How can I create a portal?
I'm planning an animation in Blender to be released on my birthday.
One of the scenes features something coming out of... let's call it 'a gap in reality.' It's a humanoid shape, and it's curved.
But I wonder... Is there any way to make a "portal" object that can show an entirely different texture on the inside, or even something semi-dynamic as this Minecraft redstone hax here: https://youtu.be/xewQL6CkMWI
Is it possible for an object to create the illusion of another dimension when looked into, but if viewed from the side, seem perfectly normal?
Thanks, Nefer. (Best answer gets to be put in the credits!)

Related: http://blender.stackexchange.com/q/5146/599

Is this a bit like what you want to do? https://www.youtube.com/watch?v=Krn7CrYg4h8

@TARDISMaker: PRECISELY. Can you tell me how you did that?

Yeah, give me a few minutes.

Here's a example I made a long time ago using the same techniques.
https://www.youtube.com/watch?v=Krn7CrYg4h8
This can be done easily with some render layer trickery.
Start out by putting both of your scenes on two separate layers, and align everything so that in your first scene, the opening into the next scene is in the same place.
Then, create an object on a trash layer, and shape it in the inside of your "portal". Then, in your renderlayer settings, in the mask group, select the layer you put your "portal mask".
Then, on your first layer, using the exclude group, exclude the layer with your first enviroment in it, and then do the oposite for the other one. This is done so that lighting and shadows from one enviroment, doesn't transfer over to the other.
Than, if your camera crosses into the other world, you need to stop the first one from rendering. This can be done by animating the checkbox next to the name of the layer.
After you render everything out, you can paste the two scene together using an alpha over node in the compositor.

@Leander I'm sorry, I looks like I never got around to that. If you or someone else could fill that in for me, I would greatly appreciate it. I don't use Blender anymore so I'm not able to do it.

@Leander Thanks, I appreciate it.


text:
Is it possible to use object position as input for texture in composite nodes?
I was trying things out in composite nodes and was wondering if it's possible to use an empty as the control for offset of a texture in composite nodes.  I couldn't find another node that could provide input and when I tried to use object mapping in the texture config itself and tie it to an empty it didn't work.  Just wondering if there is another way because that could be handy.

Is your question really about composite nodes, not material nodes?

Yes. I was doing video compositing and using a texture.

You can use drivers for this

@Crantisz Thanks that does work for me. Not as convenient but it works.  If you want to create this as an answer I can accept it.


text:
Where is the torus primitive in geometry nodes?
I'm trying to add a torus primitive object in geometry nodes to use as an instance input, but Blender doesn't seem to have one within the geometry nodes context.  Is there a way to input a torus mesh procedurally within geometry nodes instead of calling a static outside object? I've searched around online and nobody seems to be asking about this.

Yes, you can add a torus by using two Curve Circle nodes and combining them with a Curve to Mesh node. The first circle is plugged into the Curve input and controls the major radius and segments (Resolution). The second circle is plugged into the Profile Curve input and controls the minor radius and segments (Resolution):

This may be a small and relatively simple answer, but you've taken just that little bit of extra time to label everything and describe usage. Appreciated. :)

Thanks Robin. Less than a day later. This is already the top online search result when searching for "blender geometry nodes where is the torus" on google. The view count here should indicate how many people had trouble figuring it out without help. Maybe the Blender team should just add the torus primitive directly in so its easier to find.


text:
Is it possible to effect the spawning direction of a particle with a normal map?
I've been unsuccessful so far in finding information on, or working out how to control the angle that a particle is emitted from using a normal map.
What I'm trying to do is create a texture or UV map and bake a normal map and use that texture to effect the normal that is used by the particle system to create the vectors of the particles.
Ideally I would like to be able to:
Emit a wave or hemisphere pattern from a plane.
Paint on a direction for particular patches of grass or hair.
Paint a set normal in order to simulate fabrics or faux fur that is manufactured with a direction. (eg, default blue is upright. various changes in colour tilt the hair direction)
Have I missed something simple or is this currently not possible?

Would manipulating the normals by geometry also be OK for you?

You could try using textured force fields and enabling Use force field for generating hair. I'm not sure if this is what you want though.

if a texture force field can use the UV map of the model and a normal texture to set the initial direction of a particle at the emission surface this would be ideal. I'll take another look at the texture force field, I've so far been unable to make them effect changes to particles.

I'm leaning towards the answer to my question being currently a no.
I've tried many combinations without the desired result, however I have found a work around!
In particle settings under Velocity are the setting Tangent and Rot (rotation). By taking sections of a model and making vertex groups you can control what angle particles in that area spawn at relative to the surface normal. However! You must use very very small amounts of both Normal (same as length) and Tangent as adding Tangent seems to wildly increase the hair length. A Normal of 0.002 and a Tangent of 0.03 is a good start. Dialing the rotation (Rot) from -1 to 1 spins the hairs direction though a full rotation.
To save time, creating the particle effect should be done first. When adding a new area, select the original hair setting and make it Single User before dialing the Rot to its desired angle.

I don't know a way to incorporate normal maps, you could achieve the effect you described by Subdividing W the plane several times. And deform it e.g. using Proportional Editing.

This way you would also be able to animate the geometry with Shape Keys

If a shape key could still effect the particles while being set to 0 on the actual model this would be a step in the right direction. I'll look in to it, thanks.

If it is something like this you would like, there is the comb tool (like combing hair).

Add a particles system, then, go from Object mode to Particle edit. Select the comb tool. Comb. Since you stated that you intended to paint the normal map, I guess this would be better.
If you want to render your particle system. You must leave Particle edit.
Also, if you need to change some of the parameters for the particle system, you must discard the combing information and comb it again. It doesn't matter, combing is fun. :-)

Thanks for the reply! Combing is amazing but in this case I would love to avoid it if possible (It also only applies to hair?). The advantages being speed, settings still available, unable to comb a uniform angle to the surface (afaik).

It sounds like you are assuming that the emitter and the visible object have to be the same.
You can have a low res mesh visible with particles coming through it that are emitted from an underlying high res mesh. You can even have several emitters hidden from view.

I just did something similar myself. Using the XYZ texture type and baking a deform. It had Mixed results, mostly it was missing a constant angle for all fur.


text:
Find a way to voronoi structure
My object is like the half ball on this picture but with a closed surface and no holes and I would like to have almost the same result as in the picture but with a closed border, and I would like to be able to have more or less holes in it and to play with its thikness without fill the holes.

Notice that my mesh is a bit complex, I already tried to apply some modifiers or to cell fracture my mesh but I didn't have the expected result..
If you have some idea, I would be grateful ! (Maybe voronoi texture node ? I have no idea of how to use it and if it could be a solution)

https://sketchesofcode.wordpress.com/2013/04/24/dual-meshes-in-blender/

Thx for this answer but it is not really what I want if I understand well your link. Indeed here you begin with a plan object. I begin with a mesh from photogrammetry, so much more complex. Plus, there is no holes at end, isn't it ?

A Similar process could be adapted to obtain a Voronoi-like pattern. Holes and thickness are easy to add at the end

I am working on a new feature that will make this process much easier, basically a new voronoi node inside the geometry nodes system: you can find it in here: branch

That can be done rapidly using Tissue addon (which is included in standard Blender distributions, I think).

Add a mesh.
Eventually use a decimate modifier to reduce amount of vertices and add some randomness
Use the "Dual mesh" button from the 'Tissue Tools' panel
Add a wireframe modifier and a subsurface modifier

And voila:

Base setting:

1 Add a mesh
2 Set wireframe display on so that you can preview the result
3 (optional) Add a decimate modifier and tune the ratio
4 Use the "dual mesh" from the "Tissue" addon options

Second step:

1 Add a wireframe modifier, tune the thickness and if needed use the 'relative thickness' option.
2 Add a subdivision surface modifier to round the result.

Refinement:
You can lead the amount of decimated vertices (using 'decimate' modifier) with a vertex group.
So if you define a vertex group, then draw on it, that will allow to choose if Voronoi cells will be larger or thinner.
Here for instance, more decimation for the head and less for the bottom part or ears:
From left to right: vertex paint, decimated result, final mesh.

To do it on part of the model only (should work on quad meshes)

Select the wanted faces (you'll need to keep this selection along the steps).
Make a base for the tesselation (a square with a hole below that fit to quad faces)

Tesselate using Tissue with a limited tesselation on selected faces

You now have the part prepared for Voronoi.

Now in the original, in edit mode, as the faces are still selected, delete this faces only (X then 'only faces').

Join the 2 meshes, and in edit mode merge vertices by distance.

Add a solidify modifier (as this mesh is flat and non manifold) and a subdivision surface modifier. You now have something like this:

Wow, thx you a lot for your answer !! What an easy way do to it and working so good !

Do you know if there is a way to do it locally ? I tried to use a boolean modifier after it but the object is non manifold, so boolean is working really bad.. So if I could do it directly on a part of my mesh, or if you have an other idea !

@art2611 no direct idea about that. By locally, you mean Voronoi holes only on a part of the mesh? Is it just for rendering (if so maybe hiding part of the model using nodes). If for 3D printing maybe using a vertex group on the wireframe modifier and superposate original and Voronoied model?

Or separate the mesh in two before Voronoi it (make the Voronoi only on the part you want).

Yes it is for 3D printing ! I already tried nodes yes but as you say it's only rendering so not a solution for what I am trying to do.
I also already tried to separate the mesh in two and applied voronoi on a part, and then the problem come when I have to superposate them, because I use Boolean modifier and it apparently doesn't work well.. Maybe there are others way to superpose ?
Finally I tried on your advice on vertex group, however, the vertex group option is only available on wireframe thikness factor, so the entire object still in wireframe !

For the Voronoid part: the group will thin more or less the wireframe modifier. If you apply it, remove doubles (merge by distance), then select and delete non manifold part that should give you a result.

There is no way to do this entirely procedurally for Blender versions without Geometry Nodes, as far as I know. You have to apply most modifiers and preform some Edit Mode operations. It is possible with Geometry Nodes as of version 3.2.

Create a base mesh with whatever starting shape you want.
Ass a Subdivision modifier set to Simple to said object
Adjust the number of subdivisions as desired to obtain a mesh density that suits your needs
Now add a Decimate modifier and turn on the Triangulate option
Adjust the ratio until you obtain a desirable pattern
Add one more Subdivision modifier set to Catmull-Clark with only one subdivision
Once satisfied with the results apply all modifiers
Now in edit mode you will have to preform a repeated sequence of actions to delete all undesirable vertex

Select one "central vertex" from the generated "cells" pattern with more than 4 connecting edges, press Shift + G to select similar and choose Amount of connecting edges option. Erase all selected with the option Dissolve Vertex
Repeat this process until you end up with "clean" voronoi cells leaving the vertex with four connecting edges for last

As last step select all "side vertex" that are only connected to two edges and dissolve them as well so you end up with "simple voronoi cells".

Now in face selection mode inset them all using the Individual option, adjust amount as desired. You can at this point optionally add a Wireframe modifier instead of insetting, if you don't care about adding a solid thickness or if different your wires will have a circular section.
Once done exit edit mode and add modifiers like Solidify to add thickness and a Subdivision modifier set to Catmull-Clark for a smooth appearance. Adjust order to achieve desired effect

These last two modifiers can be left "live" so you can control thickness and smoothness procedurally.

Thank you a lot for this really precise answer ! That's sad that there is not a way to do it procedurally.. However your proposition is really good and helped me !


text:
Automatic superposition of similar objects?
Is there a way to superpose objects automatically by shape recognition or something like that in a way to compare their shape easily ? Thank you !

Selecting objects by mesh similarity isn't a feature that Blender currently offers. Theoretically this could be implemented through an add-on.
In edit mode there are option to select similar areas on the current mesh. This is not shape recognition though.

Ok, it's not exactly the same your are right. I don't think I can create this kind of add-on for now ahah, thank you for your answer even if there is no solution !


text:
Object rename detection
my goal is to be able to detect when a child object is renamed in a way to display actual name and associated length value in every moment.
I first have a list of all name of object children.
If an object is renamed, I want to replace the ancient name in my list by the new one. However, it is not working when I rename several children.. Maybe there are others way to do it, or something I don't see in my code ? Thank you.
           for child in obj.children :
                if child.name not in bpy.types.Object.allnameList :
                    # A rename happened : Find the name to replace :
                    for w in range(len(bpy.types.Object.allnameList)):
                        if bpy.types.Object.allnameList[w] != child.name  and (bpy.types.Object.allnameList[w] not in obj.children) :
                            bpy.types.Object.allnameList[w] = child.name

Pointer property
Use a simple collection property with a name and a pointer to an object
import bpy

from bpy.props import CollectionProperty, PointerProperty

class ObjCollection(bpy.types.PropertyGroup):
    object = PointerProperty(type=bpy.types.Object)

def register():
    bpy.utils.register_class(ObjCollection)
    bpy.types.Object.foo = CollectionProperty(type=ObjCollection)

if __name__ == "__main__":
    register()

I've added the foo collection to every object... now off to the python console to test, clear the objects list
>>> C.object.foo.clear()

Load up every object in scene to context objects "foo" collection
>>> for o in C.scene.objects:
...     item = C.object.foo.add()
...     item.name = o.name
...     item.object = o
...

Rename every object in scene to "Bar"
>>> for o in C.scene.objects:
...     o.name = "Bar"
...

Iterate over context object foo
>>> for o in C.object.foo:
...     o.name, o.object.name
...
('Cube', 'Bar.001')
('Lamp', 'Bar')
('Camera', 'Bar.002')

The object formerly known as "Cube" is now known as "Bar.001" etc.
If the object has been since removed then
C.object.foo["Lamp"].object is None

We know that the lamp,  "Bar" formerly named "Lamp"  has been removed.
Please note: have defined the properties on classes eg bpy.types.Object and then deal with instances eg context.object.  In your question code it appears you have monkey patched a list onto the class bpy.types.Object (the one and only...) instead of, as shown in above,  the instances of that type (many)

Thank you a lot for your answer, it works well in the python console. However, I have no Idea why, but when I want to bring it in my addon, the 'bpy.utils.register_class(ObjCollection)' line creates errors 'type object has no attribute X'  which is habitually not there, X is an attribute I also add to bpy.types.Object in my register lines .

Added minimal register code. The answer gives an example of how to detect name changes using a pointer property. Any attempt to answer why it doesn't register in your addon is a pure guessing game on my part.   I will reiterate that monkey-patching a list onto a class,  (eg bpy.types.Foo.xxx = []).  as displayed in question code, is not (IMO) the way to go.


text:
Full screen at the application opening
I would like blender to be always opened in full screen. I don't find this option in the user preferences, but maybe it is possible directly from the code ? I am on blender 2.79. If you have any idea ! Thanks in advance!

If you save the start-up file in full screen it will start in full screen at least on win10.

So simple.. thank you for your answer !


text:
Custom hotkeys in pie menu (with out numpad)
Someone tell me how to change hotkeys in the Pie menu itself?
The idea is to work only with right hand, not to reach for us and not to take hand off the mouse.
That is, reassign numbers or replace them with letters.
Thank you in advance!

Those are hardcoded numbers automatically added to pie positions, not keymap shortcuts you can customize

Most pie menus now have a letter underlined in each option. If you press the key to call the menu, then press the underlined letter, the option will be selected without using the mouse.
However, as you can see in the screenshot below, "Only locations" doesn't have an underlined letter. This may just be a bug.

There is no such functionality in Blender currently. You can just keep the hotkey that called the menu down and drag the mouse in the direction of the option you want to chose and then release the hotkey. Or you could set the Confirm Threshold to something that is convenient to you in the preferences:

Maybe I can change the code in the plugin files? Although I could not find the necessary lines of code there, maybe I should look in the blender files?

I meant, there is no such functionality in Blender's Python API. At least as far as I know. I don't think you will find a way to change that it the add-on code. Why are other methods not suitable for you? Dragging the mouse to some direction seems to be very easy to me and even better then pressing some keyboard key, isn't it?

Personally I find holding a button and making a mouse movement harder to memorise than just pressing a key combination. Maybe I find it harder because it involves more hands, or maybe because I'm less used to it. Anyhow with Pie Menus you can usually press the underlined letter from the option while holding the pie menu key and it works one-handed.

Once you get used to it it may become muscle memory a bit easier than reaching for a more complicated keyboard hotkey. Muscle memory is great, because it uses other parts of your nervous system to do the remembering while the brain can carry on with other work. I think we do that with the keyboard keys as well, but at least I personally have to look at the keyboard to check its position, I do not ever need to do this with the mouse so I have a theory that easy modifier keys like alt, ctrl, shift... + mouse gestures(going through nested pie menus) would be the best.


text:
Making random structures
I'm a beginner of Blender, just started yesterday with some tutorials. It was a smooth start, but I feel like it's a bit far away to make a figure like can be seen below. It's a random structure. Could anyone help me to make those kind of random structures?

Please explain in detail what do you mean by random structures.

clearly he wants random nano-wrinkle patterns. No further elaboration is needed.
that is however very difficult to achieve and time consuming from my own experiences.

[Option 1]
is to do it via displacement:
Here via shader displacement and a Musgave texture. This way it stays parametric. Works only with cycles in render view/render.

If you want it to be a solid mesh to further work on here is a tutorial how to do that: https://www.youtube.com/watch?v=McALCOr39rY
[Option 2]
The other way would be from curves, but is not parametric.
Convert your pattern from an image to curve for expl. in illustrator,
then use these curves to build your mesh.
curve menue>extrude
then: convert to mesh from curves

there's actually an addon that sort of does this for you! have you tried the maze mesh selection addon? It allows you to build random structures (mazes). I use it all the time and love the thing. you will however really have to play with it to get a result like that.
Maze Mesh -->https://github.com/elfnor/mesh_maze
another option I suppose would be to build a heightmap if you're ambitious.
you can then program an image to become random like that and apply it, here's a tutorial on those:
https://johnflower.org/tutorial/make-mountains-blender-heightmaps
typically they're used for landscape but would be just as effective here.
or better yet in Blender 2.8 now there's a default tissue addon, you can use to generate hex faces to a mesh. you could do that then write a program that extrudes a face selection downwards.
on the side note a modification of this code may work after joining the cylinders and applying a boolean modifier.
    import bpy
    import random
    Max=1#max number positions.
    Min= -1
    MMax=500#max number of occurrences
    MMin=5
    A=random.randint(MMin,MMax)
    for I in range(A):
        bpy.ops.mesh.primitive_cylinder_add(radius=.1,location=(random.uniform(Min,Max),random.uniform(Min,Max),0))

I love elfnor's blog, will check out this useful addon as well


text:
How do I find the final pose matrix for every bone to send to the shader?
Hello any advice would really be appreciated.  I know there are lots of threads on this already but I have read many of them and I am still having trouble.  I want to export a simple skeletal animation to a JSON file and play it in opengl.  I am having trouble finding or calculating the correct matrix for each bone to send into the vertex shader.
I know this has been asked before but I have read a lot of threads and I am still having trouble with this.  How do I get the final matrix for every bone to send to the vertex shader?  What data do I need from blender for this?
I have tried using just the pose bone's matrix world, its parent's matrix_local times the pose bone's matrix_basis, many things but I always get a distorted model.
I'm pretty sure my vertices' bone weights and ids are working properly.  This is my vertex shader (which is working) I think I'm just sending the wrong bone transforms
This is my vertex shader (it won't let me paste code)
https://github.com/charmanderstrom/SkinnedVertexShader/blob/master/vertex_shader.glsl

As far as I know, vertex shaders require the matrix that transform the bone from rest pose to the animated pose, in model space coordinate system. Now, how to get that, no idea...

My take is pose_bone.matrix @ pose_bone.bone.matrix_local.inverted(), but I can't test it.


text:
make more than one material "shadeless" at once
i want to make all these materials shadeless. i am used to select every material and choose shadeless and this is very time consuming
i tried many time and searched but can't find the answer
can anyone help me ???!  :(

I don't think it would be possible without using scripting.

it's a real problem with the program really :(


text:
Polar Array + imported Rhino Geometry
Blender No0b
I imported some geometry from Rhino into Blender via .FBX which I would like to animate.
I can't however seem to get the array modifier to work. After playing around with it I can get a relative offset;

but no 'polar array'

Hope its something simple due to me not knowing blender so good, but is it an issue with the imported geometry?
Thanks! much appreciation.

Are you trying to do something like this?: https://blender.stackexchange.com/questions/6023/how-to-make-a-circular-array-using-offset-object-as-center

https://www.youtube.com/watch?v=bLGYsd4lEjY&t=151s good for circular arrays


text:
Problem with bone
I have my model and when I rotate some bone its works, but in some bone i have a problem with the rotation, like in the picture 3. Any solution?
Model: https://ibb.co/n7tnW8Z
Fine: https://ibb.co/xqbQJyh
Bad: https://ibb.co/x8GfmqM

Please host your images only on imgur by using the provided tools and not anywhere else. Your questions and our answers might become useless, once the link to the image breaks.

could you please share your file? fill the field with the address of this page and upload: https://blend-exchange.giantcowfilms.com/

You could use an Object Constraint - Limit Location/Limit Rotation.

It looks like you are translating instead of rotating in pic3?


text:
Mesh becomes see-through in edit mode
As illustrated in the screenshot, the geometry on the non-visible part of the mesh is visible in edit mode, even when the viewport shading mode is set to Solid.

It gets difficult to see and select geometry efficiently when this happens. I've observed that this happens when I set the units to centimeters (also in the screenshot).
Is this a bug? Is there a workaround? If this is a bug, where is the best place to report it?
You can download my .blend file here (size 7.53 MB).

For reasons I can't fully comprehend, the cause of this weird display behavior is the view clipping distance. The issue was resolved when I set the clip end to its default value of 10m.
Still not sure whether this is a bug.

This fixed it for me as well; my issue was the clip start distance … I had to up it from 0.001 to 0.01. I think this question is related.

It's not a bug, it's a feature! It's called "Limit Selection to visible", and it limits selection to the visible faces. To enable the Limiting, you have to click this button.

I tried toggling that button as well. Doesn't change how the mesh displays, and even selects non-visible (or rather shouldn't-be-visible) faces! This is not the solution to my problem.

I can't figure out what your problem is, but if you create a new file and then append your model, it will be fixed.

Appending seems to resolve the issue. Workaround found, I guess. I'll leave the question open for a while to see if anybody can determine the cause of the problem. Thanks for the help.

Traduci
@ApoorvaJ Perhaps the problem is into the file model it self: maybe something has been corrupted somewhere in it. But someonewithpc is right: his/her answer usually is the way to go to activate/deactivate such feature and it works perfectly (when everything works properly in the blender file). I use it a lot while modelling to make selections and to see through the model accordingly with modelling needs. Also, if you observe your own screenshot you will notice that such option is active as well as someonewithpc highlights in the answer.


text:
Operator doesn't work when invoked from Panel, but works when invoked using the spacebar
I have defined an operator, which is called from a button in another operator's panel. The called operator is supposed to import a ply file into the scene.
This is the relevant code:
class LoadPointCloud_Button(bpy.types.Operator):
    bl_idname = "load.pointcloud"
    bl_label = "Load Point Cloud"
    bl_options = {'UNDO'}
    bl_description = "Load the point cloud"

    def execute(self, context):
        bpy.ops.import_mesh.ply(filepath="C:\\sfmoutput\\pmvs\\models\\option-0000.ply")
        return{'FINISHED'}

The ply mesh is imported successfully when invoked by pressing the spacebar and typing "Load Point Cloud". When invoked from the panel button, nothing happens.
The System Console window says that the import was successful in both cases.

Successfully imported 'C:\sfmoutput\pmvs\models\option-0000.ply'
  in 0.554 sec

But in the latter case, nothing happens.
I tried various things including manually setting the active scene, but nothing seems to work. I couldn't find similar example code either. What's the solution to this?

There are two issues with your code, and I presume your button doesn't actually call this code, but an older version of your operator:

bl_idname = "load.pointCloud" is an invalid name, only lower-case characters are allowed. Bad naming will make the operator registration fail.
The path to your .ply file contains backslashes, but you didn't escape them. You can use a raw string (r"C:\path\to\file.ext") to avoid lots of \\.

class LoadPointCloud_Button(bpy.types.Operator):
    bl_idname = "load.pointcloud"
    bl_label = "Load Point Cloud"
    bl_description = "Load the point cloud"
    bl_options = {'UNDO'}

    def execute(self, context):
        bpy.ops.import_mesh.ply(filepath=r"C:\sfmoutput\pmvs\models\option-0000.ply")
        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

I actually changed the operator name & description in the above sample to narrow down the context. Edited it in the question. The rest of the code is identical. I will escape the backslashes, but the code currently works when called from the spacebar. So none of these are the issues that are causing the problem.

Escaped the backslashes (and edited the question). Still does not work.

Tested with 2.69 and works fine for me, no matter if invoked from panel, via py console or text editor. Consider to provide a complete test .blend.

I couldn't get back to the code for a while. Sorry for the delay, @CoDEmanX. The LoadPointCloud_Button was initially being invoked by the panel of an Operator. The problem got fixed when I changed the caller to a Panel instead. I don't know if I should close the question, because I'm not sure of the exact reason behind the weird behavior.

@ApoorvaJ I'm running into a similar problem. Could you explain your workaround in a little more detail?


text:
How do I mirror my pose for symmetry
I'm working with a face rig. When I rotate one bone in pose mode, I would like the same bone on the other side of the face to automatically rotate in symmetrical manner. Is this possible to do in Blender?

X-axis mirror will accomplish this for you. Go into edit mode, and under the options tab of the tool shelf you'll find the checkbox. See the GIF for a  visual.

Does this work in Pose mode though?


text:
Camera animation with local curves
Controlling IPO curves for camera animation is quite challenging for me. I often want to dolly the camera closer to an object but in the f-curve editor I end up needing to control two separate curves for this move (usually x and y). I have noticed that I can get a very nice single z-curve for this move if I parent the camera to another object (this makes all the curves for the child local), but here's the part I can't seem to solve:
I would like the parent object to follow the camera location, so that the pivot point for the camera rotation would always stay the same. At the moment the rotation pivot changes based on the locational relationship between the camera and the parent object. I know this creates a loop in the parent relationship and that's why I can't seem to solve it. I tried to do the parenting with two "child of" constraints so that the camera would follow only the rotation of the cube and the cube would follow only the location of the camera, but that setup doesn't update "live" but only after I move the playhead, which makes accurate editing very difficult.
Is there any way of getting to enjoy local animation curves for the camera while keeping the pivot point of it consistent?
Edit:
I attached a file which demonstrates a nice single curve for the camera dolly. This is the setup I would like to use if only there would be a way to keep the pivot point consistent:
http://we.tl/2VtpIqdKo8

Why can't you just control the rotation with the parent instead? Seems much simpler. Just think of the 2 objects combined as a camera rig. The parent object is the tripod, and the camera moving along the local z axis is the zoom lens. Additionally you could limit the movement of the camera to only local Z axis, and do all other movements with parent object. The Limit Location constraint set to Local Space works well for that.

Todd, what you described is exactly what I'm trying to do. The problem with it is that when I then "zoom" (or dolly) the camera, the distance of the camera in relation to the "tripod" changes and thus the pivot point of the rotation changes as well. The problem becomes more evident when the camera has travelled far away from the "tripod" -the arcs of rotation will be huge. This is exactly the problem I'm trying to solve!

Well you could set up a 2 empty rig, where the second empty is parented to the first. The second empty has a Limit Location so it only moves on one axis (your dolly axis). Then the camera is parented to the second empty. You can constrain the camera location completely. Then you would be able to rotate the camera directly (for small rotations), or the first empty (for large rotations). If we were to compare this to a real world camera, you probably wouldn't make large rotations with the camera if you were greatly zoomed in with the lens (I know that's different than a dolly move).

With the 2 empty rig, you could actually not have an constraints on the camera, and it could move location and rotation, but it would still be moved in and out with the dolly axis of the second empty.

I'm not sure if what you suggested solves the pivot point problem though: If I move the second empty (which is the child of the first empty), then the distance (and thus pivot point between the rotating first empty and the camera) changes again, right?

Yes, you're right it would still be connected to the base empty. I'm not sure you can do it the way you want. There's no way to change the default axis for an object to local space afaik.

I'm not after any kind of specific motion, I simply want to control the camera dolly axis with one IPO curve instead of two. This can be achieved by parenting the camera to another object and handling rotations with that object. The problem is the pivot point keeps changing when the camera is dollies further away from the parent.

I added a .blend file that shows the local axis animation setup I would like to use if the changing pivot point problem can be fixed somehow.

Any reason to don't use a "Follow Path" constraint on the camera? You would be able to control the camera travelling really accurately... And I imagine that you could parent the curve (path) to the object you shoot.

Have you tried using a rig that mimics real world cameras like the add camera rigs? http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Rigging/Add_Camera_Rigs It might be more in line with what you are looking for.

You could use the Follow Path constraint to do it the way you want.
Here is the procedure:

First, create a Bezier Curve, and place it along the object's local Z axis (in your exemple, the Cube).
Next, reset the camera position (ALT G)
Then add a Follow Path constraint to the camera, select the "BezierCurve" for the Target, and tick Follow Curve, as well as Fixed Position. Choose -Z "Forward axis" and Y for "Up axis".
Finally, parent the curve to the object.

The camera is now dependant of the position and rotation of the object (the cube), but you keep the ability to rotate the camera freely, while the animation curve is a single control: the Offset setting in the Follow Path constraint panel of the camera.
And, even better, when you reset the rotation of the camera, it should always points towards the object!
Here is the result: