text:
Fatal Python Error on Startup (Not Responding)
Can someone help me? Every time I try to run blender it keeps I get the same error, I tried to install blender as a zip file, install a previous version that I know worked for me before (on the same computer as now), install blender from Steam, and search all over the internet, here is the error message:
found bundled python: C:\Program Files\Blender Foundation\Blender/2.78/python
Fatal Python error: Py_Initialize unable to load the file system codec
 File "C:\Python27\Lib\encodings\__init__.py", line 123
  raise CodecRegisteryError,\
                           ^
SyntaxError: invalid syntax

Current thread 0x00002a20 (most recent call first)

Thanks in advance for any help.

That looks like Blender is using a very old version of Python. Try taking any path in C:\Python27 off your PATH environment variable.
I'm assuming you're running Windows 10, since you clearly use Windows but don't mention which version. Right-click on "This PC", then choose "Properties". In the next screen, click "Advanced System Settings", then click on "Environment Variables". In both the box "User variables for {your name}" and "System variables" doubleclick on "Path" (or any other capitalisation) and remove anything that starts with C:\Python27.
You may want to write down the original values you removed, just so you can restore them later.

Can you help me do that? please?

I've updated the comment.

THANKS SO MUCH! Apparently I added Python as an environment variable when trying to set up a server using python for another device to connect to. I took it out of there and blender now works perfectly! thanks! Also, sorry for that question, but I already figured out how to do that! (I'm a geek in learning).

You're welcome :) Don't forget to mark this as the answer to your question.

When I was trying to use blender, I had a python path as an environment variables. Therefore, blender was unable to use it (I think), so I deleted the path and blender started working.
P.S I may be wrong, but the python path in environment variables was what causing me the problem.

If someone gives you the correct answer, please mark that answer as "accepted". Don't write your own answer too.


text:
How can I create a custom button from copied python text of completed actions such as selecting multiple objects?
In Maya, a while ago, I had a character rig with many grips that I needed to select for one action, like keying, or moving the object. I opened the python script window, then I began selecting all of the grips I wanted. I copied the script that was created after selecting each grip. Then I copied it into the script editor and created a custom shelf button. Now I had a button that allowed me to select about 20-30 grips, and move, or key them all at once. (The button selected them all.)
In blender I have been trying to figure this out. I have a simple hand rig. I need to constantly move the hand, and key it in. In order to do this, I must select all visible grips, pan out of camera view in order to find the ones off screen, select them, then move the hand, and key in each grip by selecting them individually, and pressing I followed by O.
I was wondering if there is a way for me to create a button that would select all 6 grips on the hand, and that's it. This way I could select them by pressing the custom button, saving me tons of time. Also if there was a way to create another button that would select, and key all six grips as well. I had one of those in Maya. Just wondering if Blender had any similar capabilities.

Object Groups
By default, Blender doesn't have a comparable solution how you can select the code of commands in Maya and paste them to shelf buttons.
For objects you can create a group. Select the objects and press Ctrl + G. This will create a group in the outliner. Clicking on the group in the outliner will select its objects.

Bone Groups
For bones, you can create a bone group by pressing Ctrl + G in Pose Mode. With the group selected in the Bone Group Panel of the Armature Properties, click on Select to add the bones in the group to the selection. If you want to only select the bones in this group clear the selection before hand by pressing A in the 3D view if other bones are selected.

Using these groups to creating selection sets is quite useless but fortunately, there is another way:

Bone Selection Set Add-On
Check out this add-on: Bone Selection Sets

In blender actions are performed by operators. We can use python to create custom operators that perform (almost?) any custom task that we want. An operator can be run by attaching it to a keyboard shortcut, a button within the UI or by searching for the operator by name in the search menu available by pressing space.
Different parts of blender's interface are separated into panels - which are the UI blocks that can be expanded/collapsed. We can create custom panels to display what we want and specify where we want the panel to be displayed, such as object properties, 3DView toolshelf or properties region...
By defining a custom operator and/or a custom panel you can customize any task as well as provide a custom interface to access the tasks. While you can run a python script to add these it is usually preferred to create an addon that defines each component which can be cleanly enabled and disabled. There is a tutorial in blender's python API docs on creating an addon as well as example templates within blender's text editor.
It is also common to create a custom panel that is specific to a rig, often buttons are used to show/hide parts of the rig as well as control IK/FK etc. One example is the rigify addon included with blender, it creates the following panels for the generated rig, as it is specific to the rig it uses a script that gets run when the blend file containing the rig is opened.

source: Stack Exchange

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

sort: votes


text:
Is it possible to simulate an egg?
Is it possible to simulate an egg?
Specifically, I was wondering how to handle simulating the yolk.
I was thinking fluid simulation, but it seems you can't a specify different viscosity for different parts of the fluid. (I'm not even sure if that would even be the way to go about it)
How can I achieve this?

I also want to make an egg with the white and yolk in it and use it in some physics simulation, which might involve some interaction with it as well. Given that it's been about 5 years since the question has been posted (and also the answer), I wonder if the advancements in Blender would allow one to make an egg in a better way?

Yes, you could use multiple fluid domains with different viscosity settings. The trick is to bake into different folders.

The UI allows you only to have one fluid domain therefore you need to disable the first one after baking in one folder by setting its type to none. After that you bake the second one and re-enable the first domain.
NOTE: that the domains shouldn't overlap while baking (I'm not sure about that), I tried to reproduce the steps descibed here
The yolks volume was subtracted from the egg-white using a boolean modifier.
The result needs obviously some tweaking:

It's been a while since you have done this. I wonder, are there better ways of simulating this now? Like more realistic simulations?

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

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


text:
How to make a heat distortion effect?
How can I make a heat distortion effect, like you might see around the exhaust of a jet engine?

I think this was the 5000th question :D

Simulation
Unfortunately since it's not yet possible to vary the IOR inside an object, it can't be simulated completely.
However, you can at least use a smoke simulation to distort things based on simulated airflow.

Create a fire simulation where the hot air should be. It doesn't have to be very high resolution:

Move the domain to an empty layer (e.g. layer 2), then setup a material for it with some random noise:

This will result in something like this, which we can use to distort the rest of the scene:

Create a new renderlayer and set it to mask the layer the main scene. Also set the main scene renderlayer to exclude the smoke:

Note that I set the number of samples taken for the smoke render layer to 1, and disabled the main passes (using only the emission pass).
Then setup the composite nodes:

Result:

Old tutorial fromblender guru.   http://www.blenderguru.com/tutorials/how-to-create-heat-distortion/#.VFRCLhnD_qA

There is also one over at blendercookie. https://cgcookie.com/blender/2014/04/03/creating-heat-distortion-effects-blender/

Whoop whoop! Hooray, 100k


text:
Long rectangular quads? Or neat squarish quads with tris?
For curved meshes I've often noticed that in my desperation to avoid tris, I tend to extrude the mesh in a way which creates these long rectangular quads:

In this case at least, the mesh is all quads, however the edge flow causes loopcutting to be awkward in some places:

I tried creating the same mesh with more even topology, however I found tris unavoidable. Maybe it was because I was starting with the long-quad mesh, but I also found myself using the knife tool for everything..

This makes loopcuts less necessary and easier to place in most cases, though the occasional tri does get in the way.
An annoying thing about the tris are the poles, though they aren't too noticeable in this particular case.

Both techniques seems to have their advantages and their disadvantages:

Which is considered "better", if any? Are there any better workflows for creating even topology with as few tris as possible? Or is there some trick I'm missing altogether?
Blendfile

Perhaps you could upload the blend for this piece so we can experiment with topology? Personally I'd go for a sort of mixture of both methods, but it's hard to explain without showing you.

@GregZaal Whoops, I actually did mean to put the file up, but somehow forgot.. Added :)

Topology is a weird thing. It can be done a few different ways, and there isn't always a right answer. However, a few rules to keep in mind while modeling:

Edge loops should be around defining features and edges. For example, if you have a hole in your mesh, there should be a loop around it. It makes the shape easier to change and makes creasing the mesh with more edge loops much simpler.
Try to keep a quad based mesh. If you are forced to use a triangle or n-gon, try to hide it away on a flat surface, or a hidden part of the mesh, where, when it messes with the subsurface modifier, the distortion will not be as noticeable.
Try to keep quads even sized and square. Otherwise you'll have weird stretching issues.

So, to answer your question, you want an edge loop around the bottom with squarish quads inside:

It will be easy to change the shape of your mesh and it will work nicely with the subsurface modifier.

This looks pretty much like the "long quads" example, except with some loop cuts down the middle. I guess the only problem with that is I end up with a rather lot of cuts close together at the back, where the model is narrower than the front. Should I just fudge it and try to space them out as much as possible? or is there another trick?

@gandalf3, the main point is the edgeloop around the side. It separates the flat part out (so it won't affect the shape).

I think you already know this but anyways, for loop-cuts, there is a hidden option that works well with curved and irregular geometry.
Once you've set the loop and it's in slide-mode(yellow), then you can now press the e to enter edge-parallel* mode.  This mode has 2 options that can be toggled using the f key.
f will determine which parallel edge the loop becomes aligned with.
Now there is also the SIRE outline tool which I rarely use but when its needed it's the best solution that I know of so I always have it installed.  I think it would work well as a starting place for the type of model you posted in your question.

Here's a link to the BlenderArtists thread for this addon package.http://blenderartists.org/forum/showthread.php?179375-Addon-Edge-fillet-and-other-bmesh-tools-Update-Jan-11
You can install just the individual tools that you want instead of the whole package. :)
ps.  What CharlesL did looks really good.  If adding a displace modifier to that model, the high-frequency detail will show up more evenly than it would for quads that have irregular sides and spacing.  The same would be true for multi-res sculpting.

Actually I didn't know about those shortcuts for edge slide, thanks!

I forgot to mention the (e and f)options also work for both of the edge-slide tools.  double-g or shift-v.

And also loops cuts (ctrl+r)

please do not add text in the images (bad for searching and screen readers), and even more so please do not use squiggly free hand text in images (bad for reading).

Which method is better will depend, at least in part, on how the mesh is to be used. Since some game engines, especially older ones, convert meshes to tris for rendering, meshes used for creation of game assets on these platforms engines, tris are of rather less concern. On the other hand, preparing meshes for 3D printing seems to be a "tri-phobic" (to invent a term) endeavor.
But each additional vertex in a mesh adds to rendering time, as a general principle, in the absence of any other considerations, the mesh with the largest possible faces, and thus the fewest number of vertices consistent with the desired result, would be better than one with more vertices.

All game engines and render engines convert quads (and ngons) to tris for rendering.

Why would tris be a particular concern in 3D printing? I've never printed anything before.


text:
Enabling GPU rendering for Cycles?
I want to enable GPU rendering, but there is no option in User Preferences > System:

Why is this? How can I get cycles to render using my GPU?

I'm using OpenSUSE 13.1 x64 with Nvidia official repo drivers installed. However, despite I bought an nvidia Geforce 650GT, stil have no GPU option available on Blender. What am I missing or doing wrong?

@user3305984 Without more info it's hard to say. This site isn't really designed for back and forth discussions (as will undoubtedly be the result of troubleshooting etc.), so you'll probably have better luck on a forum like BlenderArtists

Ensure GPU Support
First you should make sure that you have supported Graphics cards for GPU rendering. Currently Cycles supports:
Nvidia
CUDA or Optix on Nvidia devices
Cycles only supports CUDA GPUs with a CUDA compute ability of 3.0 or higher. To use CUDA, check to make sure your GPU is on this list of CUDA capable GPUs and has a ranking of at least 3.0.
If you are running an older NVIDIA card, ie the Geforce series, support is extremely limited and these are not officially supported, see How to enable GPU rendering on older Nvidia GPUs?
AMD
Experimental support for OpenCL devices as of 2.75 (added in B7f447). If you are using an AMD/ATI graphics card, see the OpenCL section below.
As of Blender 3.0 Cycles X was introduced, and with it rendering with OpenCL on AMD GPUs has been deprecated. If you have an AMD Radeon RX 5000 Series, AMD Radeon RX 6000 Series, or AMD Radeon Pro W6000 Series, you can use the new HIP device.
Intel
As of Blender 3.3 LTS initial support for Cycles GPU acceleration on new Intel Arc dedicated line of Graphics cards has been introduced for Windows and Linux using the new OneAPI
Install Latest Drivers
If your GPU has a CUDA compute ability greater than or equal to 3.0 and you still don't have the option to enable GPU rendering, you can check a couple more things:

Ensure you are using the proprietary drivers distributed by Nvidia and that your GPU drivers are up to date.

If you are compiling Blender from source, ensure you have the CUDA development toolkit installed.

Below are instructions for various operating systems. If you are still having issues after trying all the steps listed in this post, try asking for support on BlenderArtists.
This site is not well suited to localized troubleshooting discussions often needed to untangle unusual hardware/driver issues.
Linux
Run as root
Due to an issue with some versions of the nvidia drivers, you must run blender (or any other program which uses cuda) as root before you can use any cuda features as a normal user. See this thread for more detail.
Ubuntu-based Distributions

Open your driver manager and select the recommended driver and Apply Changes.

You can also use the terminal to install the latest stable driver.
  $ sudo apt-add-repository ppa:ubuntu-x-swat/x-updates
    $ sudo apt-get update
  $ sudo apt-get install nvidia-current

For linux Mint, Ubuntu and Debian variants (and maybe other distributions) you will need to install the package nvidia-modprobe which will detect your nvidia CUDA device and make it available for blender. Read this answer for further instructions
Debian Jesse
Please note that these instructions were put together in June 2015 on Debian Jesse. Although Debian is a very stable distribution, it isn't unlikely that this will be out of date on Debian Stretch. If you have more up to date information, please feel free to edit this.
Before we can install the drivers, we will need to install the kernel headers from the contrib nonfree repository. If this repository hasn't been added already, open /etc/apt/sources.list with nano:
$ sudo nano /etc/apt/sources.list

And add:
deb http://http.debian.net/debian/ jessie main contrib non-free

For Debian to recognize the repository, we will need to refresh the package list:
$ sudo apt-get update

Once this is done, the headers can be installed:
$ sudo apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') nvidia-kernel-dkms

With some sed magic, this will install the correct headers for your version of the kernel.
Now we need to blacklist (disable) the open source nouveau driver. To do this, we will create an Xorg configuration file:
$ sudo mkdir /etc/X11/xorg.conf.d
$ sudo echo -e 'Section "Device"\n\tIdentifier "My GPU"\n\tDriver "nvidia"\nEndSection' > /etc/X11/xorg.conf.d/20-nvidia.conf

And reboot the computer.
$ reboot

All that is required afterwards, is to install cuda:
$ sudo apt-get install nvidia-cuda-toolkit

For more in depth information, please see https://wiki.debian.org/NvidiaGraphicsDrivers (only covers the drivers, not cuda). If you are running a GTX 970 or 980 you will need a special build of cuda available here.

Arch Linux
Identifying your GPU:
From the Arch wiki:

If you don't know what GPU you have, you can find out by running:

$ lspci -k | grep -A 2 -i "VGA"

Drivers and CUDA:
For Arch Linux, installing proprietary Nvidia drivers for your GPU can be as simple as installing the nvidia package and then rebooting:
# pacman -S nvidia
# systemctl reboot

If you are compiling Blender from source, you will also need the CUDA toolkit. You can get it by installing the cuda package:
# pacman -S cuda

#Windows 7

Find out what GPU you have in the Device Manager. Go to Start -> Control Panel -> System and Security -> System -> Device Manager), then open the Display adapters tree.

To find out the architecture of your Windows installation, open a command prompt (search for cmd in the start menu) and run wmic os get osarchitecture.

Alternatively, you can get this information from a GUI by going to Start -> Control Panel -> System and Security -> System or by using the keyboard shortcut Windows KeyPause.

Go to the Nvidia Website and select your driver.

Finally, download and install the proper driver for your architecture. I am assuming you know how to use installers.

Nvidia Optimus:
If you're running Blender on a notebook with Nvidia Optimus, make sure it uses the dedicated GPU. Either configure Blender to always use the dedicated over the integrated GPU in the Nvidia Control Panel, or right-click Blender.exe (or a shortcut to Blender) and select the Nvidia GPU in the the Run with graphics processor menu:

OS X
Install the latest Nvidia Driver for you graphics card. You can download them from the Nvidia website.

Open the CUDADriver.pkg file by double clicking it.

Go through the installer.

If it installed correctly, there should be a new CUDA option in the System Preferences (the only time you need to go here is to install updates):

Finally after you have installed your drivers:

Restart your computer

Start Blender.

There should now be an option in the Blender's settings allowing you to select CUDA and your GPU:

Then select the GPU in Render settings > Render > Device:

OpenCL
As of blender 2.75, AMD HD 7xxx+ GPUs are officially supported.
Other OpenCL devices may work, and can be tested by force-enabling OpenCL with an environment variable:
CYCLES_OPENCL_SPLIT_KERNEL_TEST=1

Also see Is it possible to do OpenCL rendering on Intel processors?
##Ubuntu/Debian
On Ubuntu/debian you may need to install  ocl-icd-opencl-dev package
ArchLinux
Nvidia OpenCL
To get OpenCL working for nvidia GPUs, ensure that the opencl-nvidia package is installed:
# pacman -S opencl-nvidia

Then run blender with the environment variable set to 1:
CYCLES_OPENCL_SPLIT_KERNEL_TEST=1 blender

In the User Preferences > System there should now be an OpenCL option:

If it's selected, rendering on the GPU will now use opencl.
Note that the first time you try to render, blender will have to first compile the necessary kernels which may some time.

This was on IRC yesterday:  kaito: look how 'gandalf' is replying things http://blender.stackexchange.com/questions/7485/enabling-gpu-rendering-for-cycles
[11:15am] Severin: that's what I call an answer

@MarcClintDion This was a team answer, credit must also go to Vader, CharlesL, CoDEmanX, and catlover2 :)

maybe putting credits at the beginning of a collaboration would help clear things like that up before they happen.  It works well to do this with source code.  Seems like a good idea for documentation as well.

You are my hero. I needed CUDA support on my Mac for more than just Blender. I've been using OpenCL for modeling wave particle physics and I was under the impression that I just needed to wait for the next release of OS X to get proper CUDA drivers.

@MarcClintDion You can always check this in the revision history.

I have this nvidia: http://www.geforce.com/hardware/notebook-gpus/geforce-820m/specifications In the specifications I don't see any mention of CUDA on the specs page, but it is listed here as having 2.1 Cuda compute capability: https://developer.nvidia.com/cuda-gpus I've installed all the binaries via apt-get using the ppa:ubuntu-x-swat/x-updates. Anything left for me to do? I still don't see the CUDA option in Blender. Thanks

@Rexford It's hard to say, these sorts of problems are often very specific and require long discussions better suited to a forum to sort out. You could try asking on BlenderArtists or AskUbuntu, as these questions are considered off-topic here.

@gandalf3 Thanks. Im trying in the blender community on google plus. I think I'll have to install something related to CUDA before i can leverage that capability of the graphics card. Will keep digging.

Do NVIDIA GeForce GT610 support this and is 331.113 good driver for my GPU?

This won't solve the problem on Debian, while it might work on derivatives. If I remember how I did it correctly, I installed my driver from the terminal, and then I installed the cuda package. I'll try to propose an edit to be looked over soon.

I have all this done, http://blender.stackexchange.com/questions/31614/cuda-rendering-not-available?noredirect=1#comment48838_31614, but doesn't still work!

@AdriansNetlis In that case try asking on blenderartists. This site isn't well suited to the long trial-and-error discussions which are often needed to sort out problems like these.

well, found a fix - running a blender as root(cd /blender directory/, than sudo ./blender) and than it is aviable for ever even not root login!

@AdriansNetlis Ah, glad you got it working. That's the second suggestion in this answer though ;)

Oh... I didn't see that :D

@gandalf3 Indeed, I finally got my gpu to show and use, but the speed was crazily too low. Just 96 cuda cores? My intel struggles with rendering even better than the gt880m. Can't wait the day cycles supports Intel.

I'm having trouble getting the OpenCL render to work under OS Luna with Radeon 7750s (which should be officially supported): the GPUs simply don't show up as compute devices. I'm using the default open source drivers, do I need the closed source ones?

@JMY1000 I think so, but I wouldn't know for sure. It sounds like there might be some way to get it working on the open source drivers, maybe.

@gandalf3 i do not have that option Run with graphics processor when i right click on blender.exe only run as administrator where can i find that option. thanks

@atek Are you using optimus? If not, that step does not apply.

@gandalf3 On Xubuntu 16.04 LTS, the only thing I had to do  to get the CUDA toggle was to install nvidia-cuda-toolkit.

Take care, installer only builds for current kernel! Don't be surprised if you use new kernel, it also will not work with nvidia driver at all.

The huge answer above was solution to some of my problems for enabling GPU for Blender with NVIDIA drivers in Ubuntu or Ubuntu-based distros, but it didn't always work on some cases. So, I wrote an article for myself that has always worked since. It has a lot of the info mentioned here, but for me it's a simple straightforward way to go: Installing NVIDIA Drivers in Linux I hope it could be of help for someone in addition to this whole thread :)

So important to check that list for compatibility. My GeForce GT 525M ranks a 2.1, so there's no CUDA available for it since it is not a 3.0 or higher. I was about to try a different Linux distro! Thanks!

Also note that you need to change 2 settings to enable GPU rendering.  The obvious one is in the User Preferences, System.  You also need to set it for the blender file (scene) by clicking on the camera icon (on the left) in the Properties window and under the Render section is a setting for Device.

If this is important that might have to be included in that other much more detailed community wiki answer?

Sharing my recent experience with 2.8
If both, the CPU and the GPU are checked, in the "Preferences / System", Blender will prioritaze the CPU and the render will be slower.
When I unchecked the CPU, I only could see 1 "processing square" in the render time, but really fast, 1/6 of the old render total time.
I hope this help someone.


text:
Installing animation-nodes addon on blender 2.81
I've been trying to install and activate animation-nodes... to no avail.
Thus far its the only addon I've run into so much trouble with.
I've tried uninstalling blender 2.81, deleting any remnant files, then reinstalling blender, but it keeps giving me errors.
This is the current log message I'm getting:
Traceback (most recent call last):
  File "C:\Program Files (x86)\Steam\steamapps\common\Blender\2.81\scripts\modules\addon_utils.py", line 351, in enable
    mod = __import__(module_name)
  File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\animation_nodes\__init__.py", line 166, in <module>
    auto_load.init()
  File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\animation_nodes\auto_load.py", line 23, in init
    modules = get_all_submodules(Path(__file__).parent)
  File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\animation_nodes\auto_load.py", line 51, in get_all_submodules
    return list(iter_submodules(directory, directory.name))
  File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\animation_nodes\auto_load.py", line 55, in iter_submodules
    yield importlib.import_module("." + name, package_name)
  File "C:\Program Files (x86)\Steam\steamapps\common\Blender\2.81\python\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\animation_nodes\libs\FastNoiseSIMD\__init__.py", line 1, in <module>
    from . node_base import Noise3DNodeBase
  File "C:\Users\Admin\AppData\Roaming\Blender Foundation\Blender\2.81\scripts\addons\animation_nodes\libs\FastNoiseSIMD\node_base.py", line 6, in <module>
    from . wrapper import (
ImportError: DLL load failed: The specified module could not be found.

I'm not sure what I should to do to properly activate it.
Any help would be most appreciated since I really want to learn to use this addon.

Did you install it via .zip file or did you unpack it manually?

Did you ever found a solution? I am having the same problem

installing vc_redist.x64 from did the trick
link italic bold code

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


text:
Animating a chain in blender
I simply want to animate a chain in blender, but cant figure it out. I have imported a 3d-model of a chain, that looks as following.

I have tried different approaches. I thought it was possible to animate it by making an circle/ellipse, and then set all of the objects to follow the path, but i can't make it work. Any ideas or solutions to this problem?
Thanks for helping.

Have you managed to get this going?


text:
How to Alpha matte an object with another?
Excuse me, I have two render layers, one for Suzan, the other is for a circle, and I want to set the circle to be the alpha matte for Suzan, like the image below:

I tried to do it, but the result was not that good, here is my nodes setup:

If there is a way to do it without separating each object in a render layer, this will be great.
Thanks every one :)
Stay safe :)

Use Crytpomattes watch: https://www.youtube.com/watch?v=VBJQM-gIob8 and read: https://docs.blender.org/manual/en/latest/compositing/types/matte/cryptomatte.html

Thanks, @susu, I tried doing it with Cryptomatte, but I figured out that I can use it for hiding a part of an object, not showing it, which is my case. If you were able to do it with Cryptomatte, please let me know your setup. Thanks so much :)

If you found an answer please write it down on the answers section below, so that others with a similar question can learn from you.

All right, @susu, I will :)


text:
How add dimensions[0] of selected objects?
I need to add all the x axis dimension of the selected objects in my scene.
I try with
for i in bpy.context.selected_objects:
    dim = i.dimensions[0]
    dimX = sum(dim[:])

The sum command don't work, dim isn't a list.
How can i do that please ?

You overwrite dim and dimX in every iteration of your loop, you do not add something to a list.
If you need a list of all dimensions you can use
dim = []
for i in bpy.context.selected_objects :
    dim.append(i.dimensions[0])
dimX = sum(dim[:])

dim will then contain all dimensions and dimX will contain the sum. dim is initialized as an empty list and the loop appends the dimensions to it. Note the indentation of the last line: dimX needs to be on the same height as for, otherwise python will think that it belongs to the for loop and execute it in every iteration.
If you just want the sum of the x dimensions you can add them up into a variable that you initialized with 0 first:
dimX = 0
for i in bpy.context.selected_objects :
    dimX += i.dimensions[0]


text:
How to create Onyx material in Blender Cycles?
I am struggling to create onyx kind of material, if somebody can help me please

I have created following node graph:

i am getting such output :

Could you add the output image please? You can also add images directly to you question instead of posting links. Look for the small image icon at the top of the text editor.

I'm not experienced with cycles but share some ideas on how to approach this. You could start with a Voronoi texture to get the cellular look:

Then add a color ramp with colors occuring in the image.
The cells in your image have different sizes this means whe need to mix two Voronoi textures which different scales. The borders of the cells are not as smooth as in the Voronoi texture here some noise could help.

the upper part of the nodes (including noise) could look like:

the lower part (overlay) something like this:

Combined by mix shader:

really good shader. It seems that the fresnel is useless on a flat surface, could be a simple mix.

@bithur thanks. Yes I realized that after posting the images, manual mixing gives more control.

You could add a small amount of noise to the vector input of the voroni texture make the cell shape less circular

BAD!!! dud pasteall link! Destroy!!!!!


text:
How to use a custom tangent for anisotropic shading in BI/Blend4Web?
I'd like to create a material such as this in Blend4Web (and if it can be done in BI, chances seem good the same approach can be adapted for Blend4Web):

I've rendered the above image in cycles via a tiled tangent texture plugged into into the Tangent input of an Anisotropic shader:

Unfortunately, while BI does have a tangent shading option, I can't find a way to control the tangent direction quite so easily in BI. Is this sort of thing possible? How can it be done?
Here's the .blend with the shader for reference:

The only way (at that moment) to create anisotropic effect (with such texture like your) is to imitate it by adding fake specular over the normal map especialy baked for such material.
 Heres the example of such imitation that works in blend4web.


text:
Changing settings of the 3D view with Python
I am a beginner with python, and prompted by my previous question, I was trying to set viewport shading to Solid and View Only Render to True with python. (The goal being to get the script in that answer to work entirely from python without any need for interaction with the GUI)
however, simply typing show_only_render= True or viewport_shade= 'SOLID' in the console results in nothing happening.
From what I can understand from a lot of searching, is that the cursor needs to be in the 3D view for that object to be active.
It is suggested here to loop through all the areas to do this.
I tried doing this and setting the view to camera, shading to solid, and view only render to true.
However, what actually happens is that the view is set to camera, and the image is rendered without changing view only render to True.
Modified version of the script originally written by Adhi in my previous question, with changes suggested by Aldrik in the answer below:
import bpy
import sys                      # read argument from sys.argv
from bpy.app.handlers import persistent

@persistent
def do_render_opengl(dummy):
    for area in bpy.context.screen.areas:
      if area.type == 'VIEW_3D':
        area.spaces[0].region_3d.view_perspective = 'CAMERA'
      #if area.type == 'SpaceView3D' :
      area.spaces[0].show_only_render = True
      area.spaces[0].viewport_shade = 'SOLID'
    bpy.data.scenes[0].render.filepath="/tmp/glrender.png"
    bpy.ops.render.opengl(animation=False, write_still=True, view_context=True)
    bpy.ops.wm.quit_blender()

bpy.app.handlers.load_post.append(do_render_opengl)

Update:
I have changed the script with Aldrik's improvements, but when I run it with
blender -P gl_render.py example.blend, It returns:
File "/home/gandalf3/Blender/Opengl_render.py", line 11, in do_render_opengl
    area.spaces[0].show_only_render = True
AttributeError: 'SpaceInfo' object has no attribute 'show_only_render'

It seems that it's still not in the right context?

There's an example of changing viewport shading in: Is it possible to change viewport draw mode when navigating?.

@gandalf3: The two lines below commented conditional must be indented (within first if area.type's block). Their current state made them executed for every area type, not what you intended.

@Adhi ah, thanks. I didn't realize that VIEW_3D is SpaceView3D.. it works now :)

show_only_render and viewport_shade are attributes of the SpaceView3D. So for your usage example you'd make the following change:
-      if area.type == 'SpaceView3D' :
-        show_only_render = True
-        viewport_shade = 'SOLID'
+        area.spaces[0].show_only_render = True
+        area.spaces[0].viewport_shade = 'SOLID'

I'd use spaces.active just to make sure, but it'd be good too if first item in any collection is always the active one.

@Adhi Docs say it is so. ;)

@Aldrik though this may be the implementation it's still (IMO) semantically better to use spaces.active because that's what you logically care about - the internal representation isn't really important. It also makes it more clear what you're doing (e.g., any reader of the code would be momentarily distracted exactly as was Adhi) and thus more maintainable.


text:
Python: How to select new center vertices after using poke face?
I'm trying to select just the new vertices after using poke face, this is what I have so far, but it doesn't work if I use poke on multiple connected faces. Any ideas?
import bpy
bpy.ops.mesh.poke()
bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='VERT')
bpy.ops.mesh.select_less()

https://blender.stackexchange.com/questions/43127/how-do-i-select-specific-vertices-in-blender-using-python-script

Use bmesh.
Recommend using the bmesh module, to avoid mode toggling and other insanity.
Input the faces into the bmesh.ops.poke operator and it returns a dictionary of the newly created geometry. (faces and verts)
import bpy
import bmesh

context = bpy.context

ob = context.edit_object
me = ob.data
bm = bmesh.from_edit_mesh(me)

faces = [f for f in bm.faces if f.select]

poked = bmesh.ops.poke(
        bm,
        faces=faces,
        )

print("New verts", poked["verts"])

you might try the return value of the operator
poked = bpy.ops.mesh.poke()
verts = poked['verts']
for v in verts:
    v.select = True

You could also do select in object mode:
verts = [v.index for v in verts]
for v in verts:
    ob.data.vertices[v].select = True
ob.data.update()


text:
Mark freestyle edge to all objects in a collection with Python
I'm a new Blender user and just started trying python. I want to apply Mark freestyle edge to all objects in a collection with code instead of doing it manually.
If I have objects selected in object mode & used the code below it works:
import bpy

for obj in bpy.context.selected_objects:

    bpy.ops.object.mode_set(mode='EDIT')
    bpy.ops.mesh.select_all(action='SELECT')

    bpy.ops.mesh.mark_freestyle_edge(clear=False)

I'll like to do the same but without having to select objects first. I found this but I can't combine them into one script.
import bpy

col = bpy.data.collections.get("Collection_name")
if col:
   for obj in col.objects:
       obj.select_set(state=True)

Thanks,

I did some more research and found the solution.
import bpy

for obj in bpy.data.collections['wireframe'].all_objects: obj.select_set(True)

bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.select_all(action='SELECT')

bpy.ops.mesh.mark_freestyle_edge(clear=False)


text:
Model Object appears to be gradually offset from path constraint
Link to Video
As my model walks along the path it gradually appears to have some degree of offset where the model will depart from the curve and won't rotate the precisely along the path where the curve seems to have 'many' of the black arrows squished together which you can see in edit mode.
On further experimenting I was able to mostly solve the issue by deleting segments and enlarging the curve so there was less arrows and the remainder were more evenly spaced out.
I think part of the problem was that my mesh is fairly small so when I added the path it might have been over too small an area.
Is there a way to force it so that there is an evenly spaced out number of arrows that won't distort my path?
Actually this one might be more obvious.

Could you upload a .blend, its rather hard to tell what is going wrong from the video.

I added a .blend where I tried to recreate the problem as best as I could; as I unfortunately saved over it once it seemed like I solved it. In the file you can see how towards the end it diverges a bit. Though previously you could more easily see how it wasn't rotating right with it (or too slowly).

The issue is caused by the fact that your origin is not correctly positioned. The animation you applied to your character causes it to move away from its origin, which is why its not working:

To fix this, make your characters walking animation stationary. I would also recommend using the Follow Path Constraint, instead of parenting since it offers more control.
To fix your issue I deleted the movement track in the NLA, and added a key for the correct position to the circle bone.

The NLA you mean right? I deleted the movement track and it seems to work better, what do you mean though for adding a key for the 'correct position' for the circle/control bone? It seems to move just fine without a key.

@RaenirSalazar Yes, Oooops!!


text:
Triangles to Quads Problem

In the First-image, I fill the hole, then by default its looks triangulated

In the second image, now I want to make this into quads. So I have to do Tries to quad via Alt J lets me do this.
In the last image it did not work completely, some tries are still tries. I tried to increase or decrease the angle property. But No solution found.


text:
Can Blender be used to create a physics based game without programming?
My question is this, I want to create a dirt bike game that is more physics based then animation based.  I am brand new to the engine, and I am more of a graphic designer and not a coder, would it be possible to set physics without knowing coding?  Thanks again guys this is really awesome!

I'd suggest using Unity which is more of a real game engine. Blender plays really well with Unity as part of the asset pipeline as an added bonus.

Blender's game engine uses a node concept for "wiring" game functionality which are called logic bricks. You can get more advanced functionality with programming in Python, but the logic bricks can do what you want if you want to avoid the programming. So yes, you can create a game without programming knowledge using Blender's game engine.
The Intro to BGE on the BlenderWiki ( http://wiki.blender.org/index.php/User:Sculptorjim/Game_Engine ) is pretty detailed on how to work with BGE and logic bricks. Blendswap also has an example with physics that you could start off with: http://www.blendswap.com/blends/view/73536
I know of one person, SolarLune, that has been working with the BGE for quite a while, and he's got quite a few videos up concerning it if you want some tips and tricks. He just did a recent video on why he uses BGE:
youtube.com/watch?v=8ZJEupWdf30
Unity would require programming in C# (or Javascript).

Also, if you don't want to learn text-based code, the Unreal Engine has "Blueprints", which is a visual scripting language similar to Blender's shader nodes.


text:
How to catch backslash keypress?
I want make actions on key press in UV Editor Blender, how to catch this event?

Welcome to the site :) Your question is being flagged as low quality due to it's length. Could you add some information about what you are doing/have tried already? (Could you use an operator with a shortcut assigned?)

There is an addon tutorial that covers keymaps.
# store keymaps here to access after registration
addon_keymaps = []

def register():

    # handle the keymap
    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name='Object Mode', space_type='EMPTY')

    kmi = km.keymap_items.new(ObjectCursorArray.bl_idname, 'SPACE', 'PRESS', ctrl=True, shift=True)
    kmi.properties.total = 4

    addon_keymaps.append((km, kmi))

def unregister():

    # handle the keymap
    for km, kmi in addon_keymaps:
        km.keymap_items.remove(kmi)
    addon_keymaps.clear()

There are several addons that can be viewed as examples as well.
Material Utils is one of them -
kc = bpy.context.window_manager.keyconfigs.addon
if kc:
    km = kc.keymaps.new(name="3D View", space_type="VIEW_3D")
    kmi = km.keymap_items.new('wm.call_menu', 'Q', 'PRESS')
    kmi.properties.name = "VIEW3D_MT_master_material"


text:
How can I execute a Python script that utilizes the Blender API outside of the built-in Blender terminal?
I am trying to create a script that converts an OBJ file into an FBX file in Blender 2.78:
import sys
import bpy
from bpy.ops import *

importPath = sys.argv[0]
exportPath = sys.argv[1]

objFile = bpy.ops.import_scene.obj(filepath=importPath,
                                   axis_forward='-Z',
                                   axis_up='Y',
                                   filter_glob="*.obj;*.mtl",
                                   use_edges=True,
                                   use_smooth_groups=True,
                                   use_split_objects=True,
                                   use_split_groups=True,
                                   use_groups_as_vgroups=False,
                                   use_image_search=True,
                                   split_mode='ON',
                                   global_clamp_size=0.0)

bpy.ops.export_scene.fbx(filepath=exportPath,
                         check_existing=True,
                         axis_forward='-Z',
                         axis_up='Y',
                         filter_glob="*.fbx",
                         version='BIN7400',
                         ui_tab='MAIN',
                         use_selection=False,
                         global_scale=1.0,
                         apply_unit_scale=True,
                         bake_space_transform=False,
                         object_types={'ARMATURE', 'CAMERA', 'EMPTY', 'LAMP', 'MESH', 'OTHER'},
                         use_mesh_modifiers=True,
                         use_mesh_modifiers_render=True,
                         mesh_smooth_type='OFF',
                         use_mesh_edges=False,
                         use_tspace=False,
                         use_custom_props=False,
                         add_leaf_bones=True,
                         primary_bone_axis='Y',
                         secondary_bone_axis='X',
                         use_armature_deform_only=False,
                         armature_nodetype='NULL',
                         bake_anim=True,
                         bake_anim_use_all_bones=True,
                         bake_anim_use_nla_strips=True,
                         bake_anim_use_all_actions=True,
                         bake_anim_force_startend_keying=True,
                         bake_anim_step=1.0,
                         bake_anim_simplify_factor=1.0,
                         use_anim=True,
                         use_anim_action_all=True,
                         use_default_take=True,
                         use_anim_optimize=True,
                         anim_optimize_precision=6.0,
                         path_mode='AUTO',
                         embed_textures=False,
                         batch_mode='OFF',
                         use_batch_own_dir=True,
                         use_metadata=True)

The script reads the OBJ file from the importPath directory and then converts and exports the converted file to the exportPath directory.
I execute the script like so (from the Blender install directory):
blender --background --python C:\Path\To\Script\script.py
However, I get the error FileNotFoundError: [Errno 2] No such file or directory: 'blender'
Here is the full stack trace:
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "C:\Path\To\Script\script.py", line 8, in <module>
    objFile = bpy.ops.import_scene.obj(filepath=importPath, axis_forward='-Z', axis_up='Y', filter_glob="*.obj;*.mtl", use_edges=True, use_smooth_groups=True, use_split_objects=True, use_split_groups=True, use_groups_as_vgroups=False, use_image_search=True, split_mode='ON', global_clamp_size=0.0)
  File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\modules\bpy\ops.py", line 189, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\io_scene_obj\__init__.py", line 147, in execute
    return import_obj.load(context, **keywords)
  File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\io_scene_obj\import_obj.py", line 945, in load
    float_func = get_float_func(filepath)
  File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\addons\io_scene_obj\import_obj.py", line 866, in get_float_func
    file = open(filepath, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'blender'

What does this mean? How can I fix it?

You're reading in sys.args for the import and export paths, but not providing the paths when you run the script? It looks like you're reading the in the literal first argument which is 'blender', which is why the import/export fails as it obviously can't find the file 'blender'. Does this help: https://blender.stackexchange.com/questions/6817/how-to-pass-command-line-arguments-to-a-blender-python-script/8405#8405

Yeah, that looks like that could be the issue. I'm working on it.

@RayMairlot That was the issue; I've got the import working. However, I can't get the export working; it gives the error TypeError: Converting py args to operator properties: : keyword "use_mesh_modifiers_render" unrecognized. Do I need to pass the obj file to the export method, or does import store it in some global variable? I've copied the export method straight from the docs; Export Scene Operators

Exporting works based on the selected object(s), but I think if you're having problems with that specific command you should probably ask a new separate question as we are now veering away from the initial question of getting py args to work.


text:
Show all Collections with one button in 2.8
In 2.7, we had a button to show all the layers. In 2.8, this button is for the Pie menu. Do we still have this functionality for Collections?

Related: https://blender.stackexchange.com/questions/184966/unhide-all-collections-hotkey

In Blender 2.8 you can isolate and iterate on each one by pressing the numbers on your keyboard, this will show only the collection that you want and hide the others, if you press Ctrl + H it will give you the same result. To show all the collection again press Alt + H.

Go the the outliner. Ensure the "Viewport Visibility" eyeball icon toggle is active.
Pick any collection in the outliner. Ctrl + Left Mouse Button once on the eye to show only it. Ctrl + Left Mouse Button again to show all collections.

There is a dropdown in the Viewport header just for that:

I don't seem to have that button, it must have been removed at some point in the development of 2.80


text:
How do I make text that looks like it is made out of a ribbon?

Anyone Guide me. I am a beginner of Blender, i want to make 3d image like below one, i have created 50 of this image (except 2 ribbon curve), and i used modifier tools too. Kindly give me better tuts

Use a bezier curve following the global shape you want, then assign it a bevel object (a segment may be ok here). After that you'll probably have to adjust the twist (ctrl+T) and the weights (alt+S) of the bezier curve's control points.

Can you please send work area what you have mention, i already done. in front view is not good to seeing above one

I'm voting to close this question as off-topic because this is a tutorial request.

Guys, in my opinion, on 4 answers I gave on the last 24 hours, 3 can be considered to be an answer to a tutorial request, more or less.

It's fantastic... Tut's... Very useful

The base is to use a Bezier curve with a bevel object (which needs to be a curve too).
For the overall shape curve, add it by : ShiftA then choose 'curve' and 'Bezier'.
For the ribbon curve, add it the same way and flatten it : enter edit mode Tab, then scale it 0 along Y (as its shape is by default curved on Y) SY0.
Come back to object mode Tab.
At this step, you have two curves like this :

Now select the first one (overall shape curve) and assign it the second curve as bevel object (in the geometry part of the curve tab, as shown below) :

You can see that the ribbon curve is propagated along the overall shape curve.
But the ribbon is a bit large, so scale it down a bit : select the ribbon curve and scale it down S and move the mouse :

Now all is about extruding the overall shape curve.
Select it, enter edit mode, select an extremity vertex (control point) and type E and move the mouse.

Alternatively, you can also extrude with LMB holding the Ctrl key simultaneously.

Eventually, you may need to subdivide some parts. Same can be done selecting two control points and with W then subdivide :

With these basic operations, you can 'draw' your shape.
Last operations to know :
You will need to twist your curve CtrlT then move the mouse:

And you will need to adjust the ribbon size AltS then move the mouse:

lemon.  thank you for your timely help...


text:
Writing my first blender Addon and I am confused on these string keywords
I am currently writing my first blender addon and I have opened up one of those sample templates as a reference. I have noticed that if I want to create a button to make it appear I have to use these default string keywords. Eg. frame_start, frame_end or render.render. My question is, can I make my own custom slider or button that doesn't use these predefined string keywords?
At first, I thought these were replaceable strings but if I mistype just one letter the entire button disappears. Basically, I want to create a slider or a button that says "Number of final output images" in the box itself instead of "End Frame:" or "Start Frame: " how should I proceed?

Worth mentioning that these "strings" are attribute names. ob.foo is the equivalent of getattr(ob, "foo")  andsimilarly with  ob.foo = 3 using  setattr(ob, "foo", 3).   (also the test has_foo = hasattr(ob, "foo")  Using the attribute setters and getters is very common (and basic)  in python.  The UI elements are similar, eg layout.prop(ob, "foo").

The example "strings" that you show belong to two different categories, frame_start and frame_end are property names while render.render is an operator name. The properties will display as a number that you can edit while the operator will show as a button that will perform an action when clicked.
The strings that you use need to match an existing property or operator for them to work, an operator is identified by it's bl_idname property. You can specify a property or operator name and have a different string shown by passing a text paramater.
row.prop(scene, 'frame_start', text='adjust this here')
row.operator('render.render', text='This is my render button')

To create extra properties that are only used by your addon, you can use custom properties, which you should create in your addons register() function.
class MyPanel(bpy.types.Panel):
    ...
    def draw(self, context):
        row = self.layout.row()
        row.prop(context.scene, 'my_prop')

def register():
    bpy.types.Scene.my_prop = bpy.props.IntProperty()
    bpy.utils.register_class(MyPanel)

For operators, you can make your own and then use the bl_idname that you set in your operator class to show a button for it. If no text paramater is passed, an operators bl_label property is shown on the button.


text:
How do you store the edge locations of a cube with python?
Basically I want to find the edges for the default cube, so I can store their location, then use the locations to draw grease pencil strokes. I have been successful at figuring out how to print out the 12 edges with bmesh, but I don't know how to read the data format that bmesh has created to store the location data.
<BMEdge(0x00000263C41B0BB0), index=3, verts=(0x00000263C155E0B8/3, 0x00000263C155E080/2)>

Here is my simple script below.
import bpy, bmesh

# Store object data
me = bpy.context.object.data

# Create a new empty bmesh object
bm = bmesh.new()
# Use the method from_mesh to fill in the mesh
# with the active mesh.
bm.from_mesh(me)

# Create new grease pencil frame
# gp_layer = init_grease_pencil()
# gp_frame = gp_layer.frames.new(0)

edgeList = []
# Loop edges
for edge in bm.edges:
    print(edge)
    # prints 12 edges in the following format
    # <BMEdge(0x00000263C41B0BB0), index=3, verts=(0x00000263C155E0B8/3, 0x00000263C155E080/2)>

    # Store the edge coordinates here.
    # E.g edgeList.append([p1, p2]) where p1 and p2 are the corner vertices.

bm.to_mesh(me)
bm.free()

# TODO
# Create new grease pencil stroke.
# Loop edgeList.
# Draw stroke base on the save coordinates.

You are very close
Can create the list in one fell swoop using list comprehension.  (instead of edge_list.append(tuple(v.co for v in e.verts)) Used a tuple for vert coords as we really don't want to add or remove or sort or..
Python console code, notice don't need to print items as their repr is echoed.
>>> edge_list = [tuple(v.co for v in e.verts) for e in bm.edges]
>>> for verts in edge_list:
...     verts
...

And result on default cube
(Vector((1.0, 0.9999999403953552, -1.0)), Vector((1.0, -1.0, -1.0)))
(Vector((1.0, 0.9999999403953552, -1.0)), Vector((-0.9999996423721313, 1.0000003576278687, -1.0)))
(Vector((1.0, 0.9999999403953552, -1.0)), Vector((1.0000004768371582, 0.999999463558197, 1.0)))
(Vector((1.0, -1.0, -1.0)), Vector((-1.0000001192092896, -0.9999998211860657, -1.0)))
(Vector((1.0, -1.0, -1.0)), Vector((0.9999993443489075, -1.0000005960464478, 1.0)))
(Vector((-1.0000001192092896, -0.9999998211860657, -1.0)), Vector((-0.9999996423721313, 1.0000003576278687, -1.0)))
(Vector((-1.0000001192092896, -0.9999998211860657, -1.0)), Vector((-1.0000003576278687, -0.9999996423721313, 1.0)))
(Vector((-0.9999996423721313, 1.0000003576278687, -1.0)), Vector((-0.9999999403953552, 1.0, 1.0)))
(Vector((1.0000004768371582, 0.999999463558197, 1.0)), Vector((0.9999993443489075, -1.0000005960464478, 1.0)))
(Vector((1.0000004768371582, 0.999999463558197, 1.0)), Vector((-0.9999999403953552, 1.0, 1.0)))
(Vector((0.9999993443489075, -1.0000005960464478, 1.0)), Vector((-1.0000003576278687, -0.9999996423721313, 1.0)))
(Vector((-1.0000003576278687, -0.9999996423721313, 1.0)), Vector((-0.9999999403953552, 1.0, 1.0)))

Notice these are in local coordinates of the mesh. To convert to globals, ob is the object with mesh as data
global_vert_co = ob.matrix_world @ v.co

Thanks for the answer! Whats the difference between local and global mesh data? If you don't mind me asking?

Mesh data is always local (data is always local bones bezier knots etc)  Eg One corner of default cube is (1, 1, 1). When cube at default location (scene origin, no loc\n rotation and unit scale this is also its global coordinate. Transform the object location rotation scale and the global location will no longer match, eg move cube 1 right and the global loc of vert is (2, 1, 1) the local coord still (1, 1, 1).   If we apply location to the mesh local location will match global  again (2, 1, 1) and the object origin will be at scene origin.  See https://en.wikipedia.org/wiki/Local_coordinates


text:
Can I use the timeline to erase keyframes?
Is it possible to use the green bar in the Timeline to erase keyframes?

Is there someway to do something like erasing keyframes by scrolling over them instead of removing them one by one?

Related to this question : http://blender.stackexchange.com/questions/1037/move-keyframes-from-timeline

For 2.8 and newer:
This is now possible. Keys are shown as diamonds, like in the dope sheet. Mark them and hit X to delete them.
For 2.79 and earlier:
No; not in the timeline.
This is done in the Dope Sheet.

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

So it can't be done with the timeline? (I was thinking maybe something would be possible with auto keying)

As far as I can tell, nope. The timeline is really limited to simply viewing the keyframes. There's not much more you can do other than that.

Dope sheet link seems broken.

It is possible to delete the keyframes from the 3D view without having to have one of the animation views visible but it doesn't remove the problem of having to delete the keyframes one by one.

Move to the timeline marker to the frame that has the keyframe you want to delete.
With the cursor in the 3D view press Alt+I and choose 'Delete Keyframe'.

This will delete all keyframes on the current frame but still has to be done on every separate frame.

There is another way to erase keyframes (This method allows you to select precisely which property to delete key):

Within the timeline, move the playhead over the keyframe you want to erase.
Found the properties which are animated at this keyframe (for instance, location).
Right-click on it, and select Delete keyframes, or Delete Single Keyframe (the first will delete all 3 location property keys, and the second only the property you right-clicked on, i.e. X, Y, or Z).

If I understand correctly, you would have to do this one by one. (why not just press Alt+I?)

It is good info, but I did say in my question (maybe it was a bit vague..) that I did not want to remove keyframes one by one.

Exact. I'm confused. Well, as @CharlesL said, it's not possible :)

The given answers are ok for a few objects with keyframes, but if you have a lot of objects. Then select all objects, go in the graph editor and hit A to select all keyframes. Then X to delete all selected. All keyframes are gone in more less steps.

Go to the timeline and click the keyframe you want to delete.
Press Space on the keyboard and type 'Delete Keyframe'.
Click it twice.

This doesn't allow to delete multiple keyframes as was asked.


text:
Drag background images in 3D view?
Is there some way to set the location and scale of background images in the 3D view by dragging or using the mouse/3D cursor to align it, similar to AltMMB in Composite nodes?
Setting the location with the X and Y sliders can be quite difficult, especially since Shift seems to have no effect on those values.

For the background image offset values (same as any value), shift should make the value changes in .01 increments, alt in .005 and shift+alt in .001. These work for me even if I press the keys after starting to drag the mouse.

@sambler I never knew about Alt and Shift+Alt (perhaps because my WM was catching them :P) You are right, shift does affect it, but on most values shift seems to have a much larger effect. (adjusting by only .001 at a time)

The empty is a good workaround.
However. Some graphics cards, for example the one in an Eeepc, get slow with either background images or empties, especially when you zoom in.
Then a UV-mapped plane is the best solution. There's even an addon to create such a plane on the fly: Import Images as Planes

As you can('t) see, three of the six images are invisible unless you look from the other sides.
The advantage of a mapped plane is that it's back side is transparent. So you can have one in the front and one in the back and your model inbetween while only the background plane and your model are visible.
From Haunt's trick bag:
if you want either a plane or an empty to scale easily to size, for example to calibrate side view and front view of a reference image, use the 3D-cursor for that. Adjust the left border of your reference, put the 3D Cursor there and scale around the cursor as pivot point. The left border will stay put and the right one can be precisely adjusted.

Disable selectability and renderability for the reference objects once you're done and put them on an extra layer to easily hide them without the need to select them.

+1 I think I personally am going to use empties (my GPU does not seem to have any problems), but great tip with the 3D cursor, that will speed things up a lot.

@Haunt_House, I think you are too quick to write off empty-images, just because Eeepc has trouble, These systems are very low end when it comes to graphics hardware. I think its unnecessarily biased to answer questions differently based on bad drivers and cheap hardware, especially since doing 3D graphics on an Eeepc is pushing it past its intended use (only my opinion - but if you intend to do 3D graphics and be able to use Blenders full feature set, you likely need something more powerful, even if sometimes you can get away with less).

Who writes them off? My first sentence is,"The empty is a good workaround". Find someone else to attack and accuse. Empties are good where they are good. The onesidedness of planes has other advantages. No method here is absolute. And I didn't state anything different. @gandalf3 If you don't need a full cage and you have a good card, then an empty is totally fine. Go for it (:

@ideasman42 btw, do I understand your opinion right? Poor people that cannot afford a big machine shouldn't use Blender or at least be denied answers that suit them best? Critizing me for offering a solution to them is bad? And it's not as if I had deleted the other alternative. Fully blown projects arent the only way to use Blender, especially for people who are learning. And if you know how to make Empties onesided, please tell me. I always like to learn.

@Haunt_House I'm not attacking or accusing, its just that for general question & answer, its fair to assume that someone has a system that meets the minimum system requirements (as described on blenders web site). You are also describing empty-images as the workaround, implying that they are a inferior solution when in fact this is exactly the intended purpose they resolve.

I say empties are a workaround. I no way that implies anything about mapped planes. To state it clearly: The question was about "background images", so empties AND mapped planes are a workaround. I did not and do not assume my answer to be the better one, nor did I say that anywhere. I see it as just another additional alternative. Sorry, but I just hate when people read between the lines and instead of reading what I write. To be fair, the idea of image empties being a sort of background image never occurred to me. From that point of view, I can understand the confusion.

To the best of my knowledge, such functionality is not available out of the box. However, one other way would be to use an Empty with the Display type set to Image. Advantages are that you can move it just as you would any other object and adjust the opacity etc. Another advantage is that it displays in both Orthographic and Perspective view.

If you find it hindering you.. you can always just disable Viewport selection from the Outliner by clicking the arrow.

You could probably set up some drivers so that it copies the transforms of some object, like a regular empty. A pain to set up for sure, but an addon to do this would be fairly simple to write.

@GregZaal Or maybe some modal operator to drag the background image around directly with the mouse? (no empty)

I dont see why you would bother with drivers or modal operators, just drag the object around. - simple!

@ideasman42 I was thinking for dragging a background image, but by enabling X-Ray in Object > Display I can almost completely emulate a background image. (the only thing it can't do is make the empty render behind every object no matter what, I have to make sure it's actually moved behind everything)


text:
Set default append location?
I made a customized startup.blend with nodegroups and other assets I use a lot by appending the appropriate data blocks from other files, then pressing CtrlU.
However, now when I press ShiftF1 to append in a new file, the file browser opens in the last blendfile I appended from when I set up my default .blend.
I would like it to not open in any blendfile, just in the default directory (By default I mean the one which appears when you press CtrlO in a new file).
Is there a way to explicitly define what directory should be opened when I press ShiftF1?
I tried pressing ShiftF1, navigating to the directory I would like to default, and pressing Append, but I get the error Not a Library, obviously because I have not selected a blendfile.  Even if I save the default .blend after doing this, it will not overwrite the previously saved default location for appending.
How can I fix this?

Using a favourite folder takes "only" one more click. Could be a workaround for you.

@Gunslinger I guess that is what I will do if there is no way around, but it is still quite annoying..

See discussion on blender bug tracker: https://projects.blender.org/tracker/?func=detail&atid=498&aid=31314&group_id=9

It's possible to let it start in a certain directory from script:
bpy.ops.wm.link_append('INVOKE_AREA', directory="C:\\tmp")
Hence, it's possible to bind a key combination for that as well. You can simply edit the existing Shift+F1 binding:

Set search type to Key-Binding, search for "Shift F1", expand the entry and pick a directory.

Note that 2.68a has a bug where selecting any paths from the keymap editor can crash, This has been fixed and will be working in 2.69 (or any recent build).


text:
How to IK Rig a human arm with external controllers?

So in the above image:
Symbol   Description
S      - Shoulder
U      - Upper Arm
L      - Lower Arm
W      - Wrist
F      - Fingers
Now, I have to IK-rig it from upper arm to fingers and I was hoping for someone to explain how to go about this as I couldn't find a simple enough video to understand; I am relatively new rigging. You can just rig one of the fingers and adapt it to the rest and just explain what the differences are between rigging a finger and rigging a thumb.
If you could do so by posting screenshots, I would be grateful.

As Josh said there are many ways to rig an arm, here is one basic:

Add a Target bone and a Poletarget bone to your arm. The Target will be the arm controller, the Poletarget will determine the arm orientation.
Parent these 2 bones to the Root bone of your armature.
If don't have a Root bone yet, at least deparent these 2 bones.
Disable their Deform option in Properties panel > Bone > Deform: When you'll parent the armature these 2 bones won't deform the mesh.
Parent the Hand bone to the Target so that when you'll move the Target the Hand will also follow, which is very convenient.
Give the Lowerarm an IK constraint, choose a Length of 2 so that it will move Loweram and Upperarm only, and choose the Target bone as the Target and the Poletarget bone as the Pole Target.
If you want your Hand to stick to the Lowerarm, give it a Copy Location constraint with the Lowerarm as the Target and a Head/Tail value of 1.
For the fingers: give the second phalanx a Copy Rotation constraint with the first phalanx as the Target, and give the third phalanx a Copy Rotation constraint with the second phalanx as the Target so that when you'll rotate the first phalanx the rest of the finger will follow.

A good thing would also be to choose a B-Bone Display for your armature (in the Properties panel > Data > Display), and to segment the Upperarm and Lowerarm so that they will bend smoothly (Go in the Properties panel > Bone > Bendy Bones > Segments and give 5 segments for example). In that case, give the Lowerarm an Copy Rotation constraint with the Hand as the Target and Space > Pose Space / Pose Space: when the Hand will rotate the Lowerarm and Upperarm will follow. Also, you could limit the rotation of these bones in the Properties panel > Bone > Inverse Kinematics, but it's a bit tricky and most of the time you won't need it.

I didn't catch that last paragraph.. what do you mean by segments?

I've edited my answer: Go in the Properties panel > Bone > Bendy Bones > Segments

There are many ways of IK rigging an arm, from a simple one to lots of sofisticated mechanism.
One simple classic way is:
In edit mode:
- select the wrist bone and unparent it (Alt P, clear parent)
- select the first bone of a finger, shift select the first bone of all others 4 fingers, shift select (at last) the wirst bone, and parent them (Ctrl P, keep offset).
Select the Lower arm bone, go to bone constraints tab and add an IK constraint, setting the armature as target, the wirst bone as target bone and 2 as chain lenght.

In this way, moving the wirst bone will solidly moving all the fingers (as it's set as parent) and will IK moving Upper and lower arm by the Ik constraint.
If you set chain lenght to 3, also the shoulder bone will be affected by the IK constraint.
The only difference between the thumb and the others fingers is that a thumb has 2 phalanges, while the others 3, so generally we use 2 bones for the thumb and 3 bones for the others fingers.

Don't we have to set a pole target for the elbow like we do for the knee (saw a tutorial) and don't we have to set IK's throughout the fingers too?


text:
Texture doesn't look the same in the render as the preview render
The problem I have is that the texture I have included in my model is displayed correctly in the preview render, but it doesn't correctly work in the final render image. I am using the Cycles render engine.
The screenshots I have below explain my problem:

What is the reason for this?
How can I make this work properly. Please if you can help me with it will be a great pleasure. Thank you.

Has your model multiple UV Maps?

Are there any duplicated meshes? Looks like some kind of z-fighting to me.


text:
I need the blender 2.78a splash screen picture blend file
Is it possible to get the file for the splash screen? If yes, then how do I get the blender model of the cover picture of version 2.78a. The guy with the high tech suit made on cgstrive.com. The picture is in the link below.

The splash screen file for 2.78 (and some previous splash screens) are available on the 'demo files' page on blender.org, here:
https://www.blender.org/download/demo-files/


text:
How can I split the screen when the screen splitting widget is not visible?
I know the basics of splitting the screen/creating more of them.
While I can split the windows at the right I can't do that on the left, because those typical lines on the left lower corner are missing. Can I make them appear somehow?

Can you share the .blend file to be able to help you?

Why do you need to split the windows on the left? Unless I am misunderstanding your question, can't you just split it on the right and modify the left panel?

i can avoid spliting the left panel and use the ones on the right. I am just curious why the split lines are gone on the left panel.

i will share the file when i found out how to share files.

Find the dividing line between two windows where your cursor changes into a double arrow (horizontal or vertical).  Right-click to activate the Area options menu which has two options: Split Area, and Join Area.  You want Split Area.  Then move your cursor into the window you would like to split.
In your case, there is no divider on the bottom or left, so you'll have to use the boundary on the top (between the 3D view and the info bar) or the right.

... but now i want to close the single panel on the right; how?

Closing a single panel that borders a split set of panels is not possible in the blender UI as of 2.78.  It might be possible to frob the various panel fields in python to arrange things how you want, but I never worked up enough ambition to figure out the details.  For now, just drag the divider so far to the right that your properties panel is only 10 pixels wide.  You'll thank yourself when you want to access it later.

Try this:

Open new window by pulling the right top corner
Once you do that you should find the bottom left one in the new window
Pull the left bottom corner to close the old one which didn't have the bottom left pull option


text:
Blender Game Engine not displaying World texture
I'm trying to add an equirectangular image as a world texture in the game engine. The texture displays just fine on other objects, but I can't get anything to show up in the sky. Am I just missing a setting somewhere? I've tried everything suggested in the the other threads for game engine texture display (I think!).
Here's the file:
https://www.dropbox.com/s/g5plirpm22vqf7l/BGE-textureProblem.zip?dl=0
And here's what the camera shows when I run the game.

I don't think sky textures are supported in the game engine, but you can use a skydome instead. Here's an example .blend

Ok, right. I started there, though not with quite as much success as your file shows, and then thought the sky texture would be cleaner. Is there a projection which will map the texture on correctly without needing to unwrap? While the unwrap gets close, there are still some errors at the poles because you can't spread out the triangular faces in the uv map. I tried to play around with the projection options, but I couldn't find one that does what I want.

Presumably the answer to my follow-up question above is "no", as there's this: http://www.enigmatoots.co.uk/#!unwrapping-sphere/cvnq which shows how to fix the pole problem with a modified sphere. Thanks!

Not sure what to do now. Do I copy the above into an answer so I can tag it answered?

I can't actually find anything which says that sky textures are unsupported in the game engine, but there are a lot if things which are unsupported in the game engine..
One thing you could do instead is use a skydome, which is basically a UV sphere  with a sky texture mapped to it.

Add a UV sphere and scale it up so it covers your entire scene.
In edit mode, select everything (A) and press ⎈ Ctrl⇧ ShiftN to flip the normals.
To avoid extreme distortion around the poles, you can make infinitely small holes in the top and bottom of the sphere.
In top view (Numpad 7), select the polar vertices. Press ⎈ Ctrl⇧ ShiftB and type in a small value like .001. Press ⏎ Enter and ⌦ Delete>Faces to delete the new faces at the poles (creating holes), then press S 0 to scale the holes to infinitely small points.
Make sure the vertices are not merged when you do this, otherwise you'll be back where you started.
From side view (Numpad 1), press U> Sphere projection and enable Scale to bounds in the redo panel (F6).
Add a material to the skydome and enable Shadeless under materials > Shading:

Add your texture with UV projection:

This is working great. Thanks! A couple things I added to this to make it even better: 1) Add a subsurf modifier to the UV sphere. I had a lot of straight lines in my image which made the facets of the sphere pretty apparent. 2) Instead of leaving holes at the poles, extrude and scale the open rings into the center. Like this: http://www.enigmatoots.co.uk/#!unwrapping-sphere/cvnq.

@Trygve Nice idea, added to the answer :) Hm.. Subserf wasn't necessary for me, I couldn't see any lines even with flat shading. Make sure the sphere is shadeless.

Sorry, "lines" wasn't clear. It's not so evident on the image in the blend file above, but if the image is, for example, a grid, you can see where the image bends as it transitions from one of the sphere's surfaces to another.


text:
Meshes don't render in cycles
I started to use Blender to make Intros and stuff.
Right now I'm working on a very complex intro with animations and other stuff. Everything works pretty well except the rendering. When I hit F12 I just have my World Color but no Meshes.
By the way, I am using Cycles to render.
When I go to the "Realtime" Render view I can see the meshes and Shadows but these Meshes have the same color like the world color even when I apply some materials.

Very hard to help you without screenshots and or a blend file.

You camera must be placed and directed to render appropriately.  (User Views) and Camera View are not the same.  Press 0 zero in 3D View Mode to see camera view.  I would put this under a comment if I could.  I am new at this site.


text:
How do we integrate cycle renderer with our own app?
According to following blog post, Blender Cycle path-tracing renderer is allowed (in fact encouraged) to be used in third party application.
http://code.blender.org/index.php/2013/08/cycles-render-engine-released-with-permissive-license/
We really want to integrate Cycle in our application. But I don't know how to start and how will it work. I tried to find but I didn't find any relevant documentation. Is there Scene Description Language like PovRay has ? Or instead does it accept scene info in format like OBJ ? I mean how does it work ?

See this: http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles/Standalone "XML API - Cycles standalone has a XML API, which is used for mesh data and shader/settings import. There is no real API documentation at the moment, as the API is subject to change, but you can check the source code to get an idea"

So you're probably better off using something like LuxRender that actually has a documented scene file format unless you're willing to integrate and maintain your own cycles source-code integration

@PeterT, luxrender and cycles are quite different, but wouldn't suggest to pick a raytracer based on its scene description, You really need to weigh up a lot of pros and cons.

@ideasman42 Sure, there's a lot of factors to compare. But I would say having to maintain a component without a stable interface can be an exclusionary criterion.

@PeterT - "API is subject to change" just means theres it may change in future, in practice it doesn't mean breaking changes all the time, and even when there are breakages, just stick to a single API version and bundle it, Note that Rhyno3D is integrating Cycles. - http://www.blendernation.com/2014/05/12/developer-meeting-notes-may-11-2014/

@ideasman42 it doesn't mean things break all the time but it also means that things may break silently for you unless you read every commit message. It means that breaking changes won't necessarily be a big public announcement with a new version number. It means the maintainer isn't committed to a stable API, which has both advantages and disadvantages. I'm not saying he should immediately dismiss it, I'm saying that it's a valid reason to dismiss it.

@PeterT It makes sense.   We are newly established startup with limited resources and small team. We need to choose the component of our software wisely. While I like Cycle, I wouldn't use it if the API is stable and doesn't have good detailed documentation.
Also can you suggest any other raytracer than Luxrender ? How about Yafaray, it has nice XML documentation. Our app is related to interior visualization and is intended to be used in retail environment, so speed is very important . And not all of our customer will have graphic cards in their computers.


text:
Edit Mode Changes not showing up in Object Mode
When I made changes to my model in EDIT Mode, then swap into either Pose or Object mode, or simply click off the model. My changes go away, but when I click back on the model and go into Edit mode, the changes I made are still there.
How do I make my changes visible outside of edit mode?
The object is a mesh model imported from MakeHuman as an MHX file. I have been using this file type in blender the last few days and this issue has only recently arisen, with a new file.
I am VERY new to Blender and don't know much jargon so if you can please dumb down any solutions I would be massively appreciative!
I'm not editing the weight painting, as I am in edit mode. I am editing the actual mesh, pulling and pushing vertices, sculpting etc.

Could you explain what you changed? I guess that the mesh you edited is weight painted and parented to a bone therefore the vertices are influenced (snap back) when you switch to object or pose mode.

confused panda, the @name only works in comments.

If the answer below does not match to your situation, then providing the blend file could help to understand what your issue is. You can use http://pasteall.org/blend and post the download link in your question.

Check, if you have accidently selected a shape key (value 0) on top of your base mesh.

If your active Object is an armature
When you have an Armature in Edit mode, then you always see the Bones in Rest Pose. While when you switch to Pose Mode or Object mode, then you see the object in its current pose.
You can get out of this by resetting your pose to pose mode:

enter pose mode
Select all bones ( A )
Then type: ALT RALT SALT G to reset rotations, scales and locations of your pose bones. Or alternatively from within the 3D Viewport footer navigate to: Pose -> Clear Transform -> All

If your active Object is a Rigged Mesh
Then the object is (most probably) assigned to an Armature via the modifier Stack. In that case the Object by default gets displayed in Rest Pose when you edit the mesh. In the image below you see the object aligned to the Armature Pose when in Object mode(left side), but displayed in Rest Pose when in edit mode(right side).

However, you can force to display the effect of the Modifier in edit mode as well:

Open the Modifier Stack
In the Armature modifier set the options (see image)

Display Modifier in edit Mode
Adjust edit Cage to Modifier result (see note below)

Note: The tool tip text is from upcoming Blender 2.72 In older Blender releases the text was: Apply modifier to editing cage during edit mode

Chest that you don't have a viseme selected that isn't basis when you are making your edits, I made that error today.


text:
Create a rounded wireframe?
Is it possible to easily create a rounded wireframe mesh in blender?
The Skin modifier works well, but it's too heavy for even medium meshes; it takes several minuets with the default Suzanne.
You can create a wireframe object with CtrlF> wireframe, but each "edge" has only three faces.
I know the trick with subsurf and loopcuts, but manually adding loopcuts will be tedious for anything larger than a cube.

Update:
The Crease option works okay, but it creates these pointed corners:

Is there a way to avoid this so it looks more rounded?
For comparison here are the Loopcut and Skin techniques:

How do you use these techniques in Blender 2.8?

@AaronFranke Same place, Ctrl F > wireframe in edit mode.

Yes this is possible, the wire-frame tool has a Crease toggle, that gives a nicer result when the subsurf modifier is applied.

With Crease option enabled (right).

Note:
there is a bug in 2.68a, where this option only works if creases were already added to the mesh. Fixed in trunk (available in any builds newer than r60061 and will be in 2.69).
To workaround this you can add a crease to any edge before accessing wire tool.

Note, there is a bug in 2.68a, where this option only works if creases were already added to the mesh. Fixed in trunk (available in any new builds and 2.69), fixed 60061, http://blender.markmail.org/thread/lk6b2tuelthwyy3g.

Thanks for your answer. However, using creases creates pointed edges and corners. Is there a way to avoid these? I have update my question.

Where is this option in Blender 2.8?

This can also be done by converting to a curve:

In Tab Edit mode, A select all, Delete> Only faces.
AltC> Convert to curve from mesh
In Object Data > Shape set Fill to Full
Set the Depth and Resolution in Object Data > Geometry > Bevel

Pros: Allows good control over the shape and size of the bars, using bevel objects
Cons: Results in disconnected topology

I don't really like this technique because of the topology issues, but I thought I would add it as it provides the rounded shape I'm looking for.

How do you do this in Blender 2.8? Alt+C does not work anymore.

Here is the workflow I have discovered. It's all non-destructive so you can change things on the fly.
(I'm using 2.8 Beta, but this should work in earlier versions too.)
There are 3 modifiers you need to add to your object: Wireframe, Bevel, and Subdivision-Surface.

Go to the Modifier Panel

Add Wireframe Modifier

Set the Thickness to 0.5m or something so it's not paper thin

Add Bevel Modifier

Set Width Method to Width - this generally makes it smoother (edit: this may or may not always have the desired effect)
You can play with the other settings but I typically leave Segments to 1 or 2, and Profile to 0.5

Add Subdivision Surface Modifier

Set Subdivisions to 4 or higher

All of those modifiers can be changed as long as they're still live. If you want to make the corners sharper you can increase the number of segments on the bevel or increase the profile on the bevel.
This should work with any mesh, not just a cube, as long as it's manifold.
Hope this helps! :)

Is there a way to change the modifier's output into actual mesh data?

Yes, all you need to do is hit Apply on each modifier. Then the mesh will be editable with those changes :)


text:
Is there a way to use a MIDI controller as a sensor in the Game Engine?
I'd like to use a MIDI enabled device, in this case a mixer with knobs and faders, as a controller for the game engine, to do a live projection and change some parameters in real time.
The only things I found on the web are dealing with reading midi files (like this) and not live interaction. Someone managed to get something going with a midi-to-keyboard mapper, but that defies the point of using a MIDI device, which sends a lot more informations than a keyboard does.
Is there a way to do this, short of coding it from scratch?

BlenderArtists and Blender.org forums have a few mentions of people doing live midi input and VJ work using GE and midi controllers. It might be an idea to contact the guys in this thread and this thread and exchange ideas and come back and write up a nice answer.

There is a script extension, Blender HID Mapper, that does the following:

Create a HID Mapping script similar to the provided template and run it. Then you can control blender with your MIDI device like specified in your mapping.

Just install the most recent version of the script from this site, then write your mapping as you desire. The first link above also has a sample mapping script that you can work off of.

Excellent script. I used amidi -l to find the name of my device and I'm now watching the console output to map it. Thanks

Blender has nothing out-of-the-box to support MIDI, however people have used many different input devices with blender including OSC & MIDI.
If you are interested to use this you may be able to follow tutorials on using MIDI with Python, then just import the module from within Blender.
In short, its not specifically supported but theres nothing stopping you from using external interfaces from Python.

I accepted your answer even tho I think it sounds easier than it is. Searching around the net, there's a lot of enthusiastic talk about it and many dead links, but I couldn't find anyone who actually got a MIDI device to work as a live controller (at least in the last 5 years or so), some links would be good. Also, it looks like coding it would require a good understanding of Python and not just following tutorials.

You could try using OSC, from what I can tell this is now more popular then MIDI and used for similar purposes.

Cheers, I tried using OSC but it was adding one layer more than I could handle.


text:
Trackpad behaviour - acting like mouse (OS X Macbook)
Previously, using a trackpad with Blender on a Macbook was surprisingly easy and natural: Two-finger scrolling would smoothly rotate the view, pinching would zoom, and scrolling through controls was smooth also.
Recently, however, I have discovered that the trackpad seems to be acting like a mouse: scrolling zooms, multi-touch gestures aren't recognized, and scrolling scrolls in increments, like it does when using an old mouse-wheel.
Nosing around in the input preferences, I found that disabling the first two Scroll Up and Scroll Down controls under View2D Buttons List disables scrolling altogether, but content still moves from trackpad's inertia (without snapping to intervals, like desired). Also, disabling the last two Zoom View controls under 3D View > 3D View (Global) does the same thing. I.e., two-finger swiping in the 3D view does nothing, but inertia from the gesture rotates the 3D view like desired.
How can I restore the old trackpad behavior? It seems like Blender is not realizing I am using a trackpad, but it is treating it like a mouse.

Sorry—answered own question. Turns out to be related with the OS, not to do with Blender.
For any one else experiencing this problem, just sleep and wake the computer then relaunch Blender. Blender should now recognise trackpad input how it should. Hooray!


text:
Baking Sound to F-Curve with Python on Pre-Existing Objects
Ok, so I've been loosely following this tutorial:
http://cgcookie.com/blender/2011/06/02/building-an-audio-visualizer-in-python/
However, my model is very different and because I'm not making a simple stretchy rectangle, I modeled the mesh I want to animate, (It's still only being animated by changing the Z scale), beforehand. It's actually a series of identical meshes, but each will represent a different set of frequencies from the sound, very similar to the tutorial above. The meshes are names as follows: "Fence.000", "Fence.001", "Fence.002", ... "Fence.014".
I'd like to point out that I have programming experience in Java, PHP, HTML, and JavaScript, however this is my first time with Python. Here's my script:
import bpy;

count = 15;
lo = 0;
hi = 15000;
step = (hi - lo) / count;

for i in range(0, count):
    name = "Fence.0" + ("0" if (i < 10) else "") + str(i);
    bpy.context.scene.objects.active = bpy.data.objects[name];

    bpy.ops.anim.keyframe_insert_menu(type = "Scaling");
    bpy.context.active_object.animation_data.action.fcurves[0].lock = True;
    bpy.context.active_object.animation_data.action.fcurves[1].lock = True;

    bpy.context.area.type = "GRAPH_EDITOR";
    bpy.ops.graph.sound_bake(filepath="/Users/Andrew/Desktop/Trap.mp3", low=(step*i), high=(step*(i+1)));

    bpy.context.active_object.animation_data.action.fcurves[2].lock = True;

bpy.context.area.type = "TEXT_EDITOR";

What I'm struggling with is getting an object that exists already and setting it up in a way that the line
    bpy.ops.anim.keyframe_insert_menu(type = "Scaling");

can access it. After googling and lots of copy and paste, I've ended up with the above. However, it still complains about an error, and the error message coming out is:
Traceback (most recent call last):
  File "/Users/Andrew/Graphic Design/dancing fence.blend/Text", line 15, in <module>
  File "/Applications/Blender/Blender.app/Contents/MacOS/2.71/scripts/modules/bpy/ops.py", line 188, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: No suitable context info for active keying set

Error: Python script fail, look in the console for now...

I know to anyone experienced the above code probably looks like it was written by a 5 year old, but I would love it if someone could explain to me how blender works with python, (The documentation I've been able to find has all been worse than terrible.), and maybe even explain to me how my own code works. (Eek, that's never a good sign. :( )
Thanks.

What I'm struggling with is getting an object that exists already...

You get the objects from bpy.data.objects:
obj = bpy.data.objects[obj_name] #where obj_name is the key / object's name

#in this case
for i in range(count):
    obj = bpy.data.objects['Fence.%04d' % i] #formatted string

    #set the keyframe
    obj.keyframe_insert(data_path="scale", frame=1)

Some links:

Add keyframe to a scene property
Python tutorial and documentation
String Format Syntax
Blender Python API documenation

OK great thanks, that makes sense. I have one more error. When I run the script, (I used your way to insert the keyframe and removed mine), I get an error where I try to bake the sound into the animation, because it says me context is wrong. I did change to graph editor before I ran that line, is there something else I should do? Thanks

As @AndrewG said, baking the sound still does not work. Any Idea how to fix that?

Here's some info on baking sound: http://blender.stackexchange.com/questions/49745/sound-bake-in-command-line-script


text:
BGE mouse location in 3D space
I'm a (very new) beginner in python, and I was trying to follow this older technique for getting mouse location in 3D space in the Game Engine.
However, I can't get it to work and I don't know what could be wrong.
My question is, what did I do wrong? (Or if that is not the case, other ways to achieve this?)
Here is my blendfile

Welcome to the world of programming. When you are writing scripts the first rule is they are very picky, every word has to be an exact match(case sensitive) and punctuation needs to be in the right place.
Running blender from a terminal window can help as you will see error messages that can help you find the problems - at least the line numbers will help you focus on where python finds the error. I'd recommend you start from a terminal and use the errors to try and see how I found the following fixes.
Not sure it's a big thing but you have the same logic bricks setup for the plane as well as the lamp.
To get you started - in MouseRay.py -
Line 13 the plane after the = is a call to the Plane class above - it needs to use a capital P
Line 15 needs a : at the end
Line 17 needs () after the function name
Line 24 ray.p0 should be ray_p0
Line 27 intersect_lin_plane should be intersect_line_plane
As you see they are very small picky things but you need to specify exactly what you are referring to each time. You have a class called Plane and a variable named plane and an object called plane.004 which could be named plane. Python needs to know exactly which plane you refer to at any given time. It also highlights the need to use helpful distinct names for everything. Even if python can tell which one you are referring to given the context - can you? without spending 5 minutes ticking off what refers to what?

case sensitive doesn't apply to the whole programming world ;)

No it doesn't, but we aren't talking about the whole world - here we are only talking about using python inside blender - it is case sensitive.

I like to use a python-only approach to compute the mouseToWorld transform:
from bge import logic

def mouse2world():
    cam = logic.getCurrentScene().active_camera
    vec = cam.getScreenVect(*logic.mouse.position)
    camPos = cam.worldPosition
    projectedPos = [0,0,0]
    z = 10      # user-set depth
    projectedPos[0] = camPos[0] - vec[0] * z
    projectedPos[1] = camPos[1] - vec[1] * z
    projectedPos[2] = camPos[2] - vec[2] * z

    return projectedPos

Link to sample file