text:
Problems with assigning dimensions through python script
I don't know how to put this, as a bug or error in code. Anyway here is my code,
bpy.ops.mesh.primitive_circle_add(vertices=5, radius=1, location=(0, 0, 0))
bpy.ops.object.mode_set(mode = 'EDIT')
bpy.ops.mesh.select_mode(type="VERT")
bpy.ops.mesh.extrude_region_move(MESH_OT_extrude_region={"mirror":False},
TRANSFORM_OT_translate={"value":(0, 0, 30)})
bpy.ops.object.mode_set(mode = 'OBJECT')
bpy.context.object.dimensions[0] = 0.7  // Does not work
bpy.context.object.dimensions[1] = 0.7

The code as you can see creates a mesh circle and extrudes its vertices and then set its dimensions for X and Y axis as 0.7. Well the code executes fine, but the dimension for X does not change. It remains at some 1.902.. . I need help in rectifying this problem.
Note: I am using Blender 2.75.

Do you see any unwanted messages in the Console Window? convertViewVec: called in an invalid context

No unwanted messages. I don't think print statements are needed, as the values are reflected in  Number panel( " N ").But, as far as I can see the value for dimensions[0] i.e X remains 1.902. In other words, the statement "bpy.context.dimension[0] = 0.7" has no effect on my object. But the next statement "bpy.context.dimension[1] = 0.7" works i.e the value of X dimension refuses to change using python script.

The core of this question is
import bpy

bpy.ops.mesh.primitive_circle_add(vertices=5, radius=1, location=(0, 0, 0))

# this doesn't produce expected results
bpy.context.object.dimensions[0] = 0.7
bpy.context.object.dimensions[1] = 0.7

versus
import bpy

bpy.ops.mesh.primitive_circle_add(vertices=5, radius=1, location=(0, 0, 0))
# this does
dims = bpy.context.object.dimensions
bpy.context.object.dimensions = 0.7, 0.7, dims[2]

Plugged into your sample code:
import bpy

bpy.ops.mesh.primitive_circle_add(vertices=5, radius=1, location=(0, 0, 0))
obj = bpy.context.object  # might need it later

bpy.ops.object.mode_set(mode = 'EDIT')
bpy.ops.mesh.select_mode(type="VERT")
bpy.ops.mesh.extrude_region_move(MESH_OT_extrude_region={"mirror":False},
TRANSFORM_OT_translate={"value":(0, 0, 30)})
bpy.ops.object.mode_set(mode = 'OBJECT')

current_x, current_y, current_z =  obj.dimensions
obj.dimensions = [0.7, 0.7, current_z]

Why?
There is a bug report about it here https://developer.blender.org/T31760
it's a known error/limitation, and down to the property being intended to be used on the UI only.
For now either use obj.scale (with some extra manual calculation) or set the obj.dimensions all three at once (as shown).

This wasn't what I wanted. I wanted to change the dimension value and not scale value. Your code changes only the scale value.

Thanks, It works. I tried the second solution. But I didn't get any Invalid Context Error.  Anyway thanks. Any Idea why, my own code didn't work?

your example code did print messages into the output of Terminal / Command Prompt, but they are not caused by the setting of obj.dimensions.


text:
Blender freezes when attempting to import FBX files
recently I started encountering an error - when I try to import .fbx files, Blender starts to eat more and more memory which causes the computer to freeze. It worked a week ago and I'm not aware of any changes to the system - I updated graphics card drivers but that was after the issue started appearing.
The files have been exported in Maya.

Has anyone encountered this problem? Any ideas for fixing this? Should I file a bug report?
I'm using Blender 2.77a (the problem appeared in 2.77 but it worked there before) on Windows 10 on Lenovo U510. I disabled Windows updates so there wasn't this kind of change.

How large are the FBX files you're trying to import? And when you say Blender eats memory during import, I'm assuming you mean RAM. How much RAM, exactly?

What happens when you run Blender as an Administrator and then you try the import?

@Fweeb All FBX files - I even created a simple one with a few basic shapes - same thing. It eats as much as it can - I have 8 GB RAM on my work computer and it fills all the free space up (the stuff not taken up by the OS or other applications).

@Kirbinator I'll give it a shot on monday when I'll get back to work - it works fine in 2.76 on Linux Mint at home

@Kirbinator running it as admin changed nothing

Just as a test, you may also want to try exporting to FBX from Blender and then re-importing. See if the problem shows up there. Also, there are different versions of the FBX format. What version of the format are you using from Maya? You may want to try down-converting to an older version of FBX.

@Fweeb turns out that worked - I thought to try it today and it imported it flawlessly. I'll look into how to make Maya export older versions. It's still weird though - I import those files easily to Blender on my Linux machine. If nothing else works, I'll start using Linux at work as well - I'm going to make it a dualboot so I can just reboot for Maya LT.

I've just had the same problem with Blender 2.69 on Linux Mint 17. Disk thrashing so bad I couldn't even get a terminal to work long enough to get the blender pid, to kill it - after 20 mins I had to give up and do a forced reboot!! The fbx file was from here: https://www.cgtrader.com/items/177405/download-page
I think I've imported a FBX before, but I'm now scared to try again :-)

source: Stack Exchange

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

sort: votes


text:
Cropping and/or editing an UV map with multiple objects without joining them
I have this

and I'd like to stretch the contents to fill the UV map. How could I do that? Is there a way of editing a whole UV map containing multiple objects?
Thanks for the responses

You can use UV warp modifier... but you'll need to set it up for all your objects... So, I am not sure it is simpler ? Move the "to" object to move. Scale it down to scale up the UVs.

A possible solution would be using the addon MultiEdit. You can edit multiple objects at once without joining them.
Download: https://www.dropbox.com/s/9h7bqe7aza4b16p/MultiEdit_05.zip?dl=0
Blenderartist Thread: https://blenderartists.org/forum/showthread.php?339369-MultiEdit-version-5-Multiple-Objects-Editing
To install it you have to go to File -> User Preferences -> Install from File, then select the .zip and click Install from File. Then tick the checkbox to activate the addon. If you don't want to repeat this every time you start up Blender you can click Save User Settings.

After installing it you can select all the objects you want to edit and click MultiEdit enter in the tool shelf (T). Then you can scale up your UV map. When you're finished you can click on MultiEdit exit to go out of edit mode. But be careful not to go back to object mode by pressing Tab or using the drop down menu at the bottom of the 3D View. This will join your objects.

Multiedit seems to break my modifiers :/ (mirror and array) - stuff appears elsewhere

I managed to use it but only when applied (I had to do it anyway) so thank you :) It seems to reset modifiers though

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


text:
How to get Blender 2.8 windows to load on multiple monitors after closing and reopening Blender 2.8?
I have a dual display setup. I setup different windows on each, saved the default startup file.
When I reload Blender 2.8, the window for the secondary monitor appears on the primary monitor.
Is there a way to have that window for the secondary monitor permanently locked to the secondary monitor even after reloading Blender 2.8?
Thanks.

I only use Blender 2.79.  In that version one can "save as starting file" - can't you do that in 2.8 any more?  If it's not under the File menu, maybe you can do a search.
If you set up the scene as you need it, then save it as a starting file, it should reload the setup each time you open Blender.

Yes this happens by default on 2.79, saving startup file is enough. If it doesn't happen for 2.8 it is either a bug, or misconfigured startup file, or Windows itself interfering with window management. Did you turn on or off your monitor? Maybe window assigned it a different ID and Blender can no longer recognize as the same hardware

Thank you for the responses. It is interesting how this error o key happens with Blender as my numerous other apps like Cubase, DaVinci, Gimp, etc etc etc all have no issues. As for the startup file, how can I tell if it has an error in it? I have reverted back and and recreated the split to no avail.
Must be a bug. Hmmmm.
Any other thoughts?
Thanks again for the input.

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


text:
Material exact color
I am using Blender to modify some .svg icons for a UI, and I need them to be a certain plain color, with no shading. How could I go about achieving this? I am using Cycles, and if I use a Diffuse material the lighting changes the color, and if I use an Emission material it comes out much brighter. I need it to be the exact RGB values in the material.
Thanks!

Overkill. Why are you using a full 3D modelling suite to edit some SVG files, and a complex unbiased raytracing solution to obtain flat colors? Why not use say Inkscape, or any other vector editing software?

blender internal would be better if you need to do this in blender, set the material as "shadeless", and also you could need to use a "raw" setting for the scene > color management > render > view.

see this https://blender.stackexchange.com/questions/89395/is-there-a-way-to-render-to-png-as-raw-pixels-without-converting-color-space-t

Thanks! I got it in the end using blender internal. If anyone wants to submit an answer I'll accept it.


text:
Install from file is not working
I have been trying to install several addons, but when I click on the zip to install it, it doesn't show up!  I have several addons installed from a few months ago that worked, including animation nodes and sverchok, but now it doesn't work! Python isn't working on my computer as of late and needs to be reinstalled, so is that the problem?  Also, I have tried the unzipped version and the init.py file.

Related http://blender.stackexchange.com/questions/39745/addons-only-some-zips-will-install?rq=1

@batFINGER - What do you mean by using F8?

http://blender.stackexchange.com/a/2692/15543

The file you should select will be a .py file, that can be found inside the .zip file. (Use WinRAR or 7Zip to open it) if the init.py doesn't work and it's the only file in there, you could have a corrupt download. What plugin are you trying to install?
Here are the specific installation options for installing the Mitsuba render engine:
First, download this file, then follow the following instructions:

Unpack this file and move the resulting mitsuba folder into your
  Blender scripts/addons folder. After you do this, restart blender then go to user preferences, then find mitsuba in the addons tab and enable it. Then, you should be able to select
  Mitsuba as the currently active renderer (click either Cycles or Blender Render above the 3D view.
In the main scene tab, you
  will need to set the path to the main renderer executable (mitsuba.exe
  on Windows, Mitsuba.app/Contents/MacOS/mitsuba on MacOS,
  /usr/bin/mitsuba on Linux).

Then, to install the spaceship generator, go to this link and select "Clone or download" and download .ZIP
Then open the .ZIP and drag the spaceship_generator.py onto your desktop. Then, in blender, go to the addons tab and choose 'install from file'. then select the spaceship_generator.py through the dialog box. Afterwards, just enable the addon and you're good to go.

I'm trying to install the mitsuba rendering engine and the spaceship generator.

@Kaixon check my edits

I've also been having trouble with hard surface modeling for robots, weapons, etc... and I can't buy Hard Ops or Boxcutter.  Any options?

@Kaixon Glad it helped! If this solved your problem, please accept this as the answer (the green checkmark to the left). If you have more questions, feel free to create a new post and I'd be more than happy to help.

I am not a user and can't ask again for about 40 minutes, so I am also having trouble downloading MakeHuman.

@Kaixon Alright, i've been researching MakeHuman and the installation process seems a bit complicated. I will try to answer when I get home, which will be in 2-3hrs.

Okay, I'm just looking for the blender addon.  Thanks!

@Kaixon it doesn't look like it's that simple. You have to manually install programs, addons, and use 3rd party tools. (Unless i'm misinterpreting it completely)

You can also use F8 to reload scripts rather than restarting blender.

authors: Дмитрий Василенко


text:
How do i snap to an intersection of the edge when locking an axis?
What i want to do is pretty simple when using Sketchup :

But i can´t seem to do the same on Blender...

I don't know if there is a better alternative but you could try multi point snap.
Simply press A while you are snapping to create a snap point. Add multiple points to or near the location you want to snap to to increase the influence of where your vertex will snap. In this case adding a point below and above where the Y axis crosses the edge will give you a close approximation, requires some fiddling to get used to but should be useful.


text:
Script to separate shared vertices that have different UV's, normals and colors
So i'm making a model format for my Unity game, and i ran into an issue: Normals, UV maps and vertex colors in Unity are per-vertex instead of per-triangle, so i'll need a python script that automatically duplicates the vertices that have more than one UV, normal or color and rearrange the triangles accordingly. I can't do this myself yet cause i'm a beginner when it comes to Python, what i've been doing is saving each triangle separately and stitching them inside the game, but that takes AGES.
Thanks in advance :)

As you noted most data is stored per-face in blender; in the UI it is called "face corner data", the API calls it "loops".
This is fairly simple: just loop over the polygons, get all vertex data you need, pack it into hex, append the vertex to a list if it is a new one (using a dummy vertex to avoid duplicating too often due to inconsistent normals) and finally index the polygon's vertices in the vertex list to get the polygon's exported indices.
#output
mesh_vertices = []
mesh_triangles = []
#used to ignore the normals for checking equality
dummy_vertices = []

for polygon in me.polygons:
    tri=[]
    for loop_index in polygon.loop_indices:
        vertex_index = me.loops[loop_index].vertex_index
        co = me.vertices[vertex_index].co
        no = me.loops[loop_index].normal

        bfb_vertex = pack('3f',co.x, co.y, co.z)
        bfb_normal = pack('3f',no.x, no.y, no.z)
        if me.vertex_colors:
            bfb_col = pack('4B',int(me.vertex_colors[0].data[loop_index].color.b*255),
                                int(me.vertex_colors[0].data[loop_index].color.g*255),
                                int(me.vertex_colors[0].data[loop_index].color.r*255),
                                int(me.vertex_colors[1].data[loop_index].color.b*255))
        bfb_uv = b''
        for uv_layer in me.uv_layers:
            bfb_uv+= pack('2f',uv_layer.data[loop_index].uv.x, 1-uv_layer.data[loop_index].uv.y)
        #we have to add new verts also if the UV is different!
        if bfb_vertex+bfb_uv not in dummy_vertices:
            dummy_vertices.append(bfb_vertex+bfb_uv)
            mesh_vertices.append(bfb_vertex+bfb_normal+bfb_col+bfb_uv)
        bfb_vert_index = dummy_vertices.index(bfb_vertex+bfb_uv)
        tri.append(bfb_vert_index)
    mesh_triangles.append(pack('3h',*tri))

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


text:
Can't Mirror Bone Roll When X-axis Mirror is turned on, bones snap to other side & overlap
I have the left half of an armature, all properly named with prefixes. With both 3D cursor and Pivot pint in center, I mirror my armature using ctrl-m, x. I flip the names correctly. Then I invert my selection, to select the original half of the armature, and then turn on x-axis mirror. Here is a screenshot of my mirrored, and name-flipped armature:
Here, I press ctrl-r to rotate bone roll. In many youtube tutorials, this forces the mirrored side to match the original side's bone roll exactly. Unfortunately for me, all it does is snap my mirrored side over to my original side. I do not have snapping turned on, it is off. What can I do to precisely mirror both side's positions and bone rolls? Below is a screenshot of what happens when I press ctrl-r:

I cannot be the only one who's had this problem?

For anyone who's also had this problem: you need to apply scale and rotation to your armature in object mode. Once you apply these, then go into edit mode and mirror your armature. X-axis mirror should then perfectly match the bone rolls if you press ctrl-r and press enter without moving the mouse.


text:
How to make low poly water with foam effect?
There is a very cool foam effect rising on the shore in this low poly water asset made in Unity:

And here:

Is it possible to create a similar effect in Blender?  I have the water material down, I just want a cool foam effect!

Have you tried adding texture nodes ? Try adding a Musgrave texture and use a colorramp to adjust it, I'm sure it could be mapped to specific places like the shore and even animated.

https://www.youtube.com/watch?v=smArCTzxGpE

Related question - https://blender.stackexchange.com/questions/201610/is-there-a-way-to-add-foam-around-an-island


text:
How to add a vibrance value to a render in post processing
Is there a way in Blender to add vibrance?  I have a render which I'm trying to add vibrance to in Blender, not in Photoshop (which is what I've been doing, but is tedious).
I know there is a saturation node, but vibrance is usually thought to be more practical.

See https://stackoverflow.com/a/33966821/6773916 - untimately essentially anything photoshop can do can be done in Blender - though sometimes you’ll have to resort to raw maths nodes or scripting. Can you define precisely what you mean by ‘Vibrance’? Can you provide some examples?

go to compositing.
turn on show nodes.
press shift+A.
search hue.
it will come up.

"Saturation boosts all colours by the same amount whilst vibrance aims to boost the least saturated colours whilst leaving already saturated colours where they are." from: https://photo.stackexchange.com/a/9386


text:
How to add hair particles to a material in an object
I have an object with two materials, and I want the hair particles to only grow on the second material.  How do I do this?

Use a vertex group. Create a vertex group where the material is and use it for the density parameter  of the particles.

Just to be clear you can't directly assign particles to materials, not even to faces. You can only use vertex groups to control density


text:
Grainy Camera Filter Style
Low poly works can look good with grainy rendering, but turning down the samples makes the shadows looks horrible.  How do I create a grainy effect to my render? It can be in blender or post processing (in photoshop). See work below:
I want that type of effect and a solution in blender cycles.

These effects are generally achieved in post production, they are mostly render engine independent, so they should work both for Cycles or any other engine without requiring that you  re-rendering you image. You can easily tweak the effects in a flexible non destructive way without ruining your work or having to wait for a long time.
These are done through compositing, check the Blender Manual about it.
You probably want to look into the Distort type of nodes or Filter nodes.
If non satisfy your particular needs perhaps look into making it in an image editing software like GIMP or Photoshop


text:
How to make a grainy material in Blender Cycles?
How can I make a grainy/noisy looking material in Blender Cycles?  I want to have a node set up where I can create a grainy material of my choice of color, with a noise variable so that I change the level of grain shown.


text:
Solution to lots of Emission Materials Causing Noise in the Render
I'm creating a low poly space scene, and I'm using a emission material for the stars.  I knew this would be a problem  because it would create noisy renders, but I thought I would find a solution!  :)
So– is there any way to keep their brightness, but maybe not the noise it causes?  Like a option to limit the reach of their light so I don't need to take so many samples?
I appreciate all help!

An easy way would be to make the stars only visible to the camera, an inverted method of this.

Could you be more specific and add images to illustrate the problem? There are a dozen ways to reduce noise in renders.


text:
How do I exclude an object from AO in Blender Cycles?
I have a scene where black text is on a gray surface.  With AO, this makes the text are to read.  I want to eliminate AO on the gray surface so I can see the black text, but keep it in other details in the scene.
How do I achieve this effect in Blender Cycles?

How are you applying your AO at the moment?

You could render the text on a separate render layer and composit it over the main render

@RobinBetts I'm applying it through nodes!

@dixiepig Yes, this is an option I've heard, but I wanted to further pursue this topic to see if there's an another easier way!

Cycles does AO 'naturally' .. it samples the environment for bounced diffuse light, so those areas with less exposure to it (crevices, corners) will be darker, as they are in real life. So your answer will probably lie in a combination of lighting, switching shadow-casting on or off, (and AO, if necessary) for your desired effect. I think an image of your problem would really help with this one.

@RobinBetts Thanks for your comment!  Unfortunately the client requires that no work can't be posted until the illustration is released to the advertising agency.  I might make a simulation of what is going on though to get around this problem.

Yup...put up a dummy with the same materials and lighting, if you can.


text:
Blender selection in viewport suddenly slow (68 faces)
I have been working on this .blend project for a couple of week now, and suddenly, I noticed it became SUPER slow. I pinpointed that the drop in frames happens when I select a new object and try to scale it. After I try scaling the object for a couple of seconds, it seems whatever is causing the drop in frames goes away. Here is the .blend file.
I captured what I am experiencing:

Unfortunately I am unable to replicate this on my hw, what processor and GPU are you using?


text:
Can I run Blender on my universities server through SSH?
My university gave me access to the institutes mainframe via Putty for programming purposes.I dont know anything about servers or these connections but I was wondering if it was possible for me to render on it? Or even run programs if possible.

Depending on how powerful their mainframe is, and if you can get blender to work on it, you'll have some awesome processing power!

This may be tricky if you're using Blender 2.8+. Please see my question here: https://blender.stackexchange.com/questions/144083/how-to-get-blender-2-80-to-render-through-an-ssh-connection-minimal-working-ex?noredirect=1&lq=1

Yes, this is absolutely possible. With SSH, you can access the command line remotely (as SSH is Secure Shell). If you have the command line blender installed on the server, you can run a command to render a .blend file.

In some situations we want to increase the render speed, access blender remotely to render something or build scripts that use blender command line.
One advantage of using command line is that we don't need the X server (in case of Linux) and as a consequence we can render remotely by SSH or telnet.

To render an image:
blender -b file.blend -o //file -F JPEG -x 1 -f 1

To render a movie:
blender -b file.blend -x 1 -o //file -F MOVIE -s 003 -e 005 -a

From http://wiki.blender.org/index.php/Doc:2.4/Manual/Render/Command_Line
On CentOS, you would downloaded either by source, or with yum install blender. The yum method is better as it installs dependencies too. Root privileges might be necessary however. Contact administrator if you don't have them and ask him to install it. There are also pre-compiled binaries on Blender.org to eliminate the dependency issue.

I dont think command line blender is installed on that server. How can it be installed? The server runs CentOs

@Avagantamo On CentOS, install it with yum install blender (root privileges might be necessary). Or, you can get the source code at blender.org, but the package manager installs dependencies, so its better

If you don't have root permissions, you can download a pre-compiled binary archive from blender.org, which should just work™ out of the box.

There are some more ways of working via ssh remotely on a university's server (beyond the remote shell).
Those might involve:

X forwarding: Run a graphical application remotely, visual display locally. Requires X servers on both ends. That might be complicated to set up when you have a Windows machine on your end. (Maybe setting up a Linux VM or dual boot is an option?)
NX/FreeNX client: Run a graphical session remotely, stream the display. Requires NX server to be running remotely and configured to give you access. Windows client software should be available.
VNC client: Run a graphical session remotely, stream the display. Requires VNC server to be running remotely and configured to give you access. Windows client software should be available.

You might want to ask someone who knows how this works and what ways are available to you at your site and at that host specifically.


text:
Join/see UV's of different objects
I have to export an object to a game engine, and Id like to keep the different parts of it as seperate objects but while unwrapping I have a hard time knowing if they overlap. Is there anyway to see all the UV's or join them?

Just previewing other UVs
There is an option in the UV Editor which - under certain circumstances - allows to see the UVs of other objects. Those circumstances are:

both objects use the same material, the material is active, and the texture is assigned
before entering Edit Mode, both objects have been selected
the Draw other Objects option is checked in the Image Editor (see screenshot below)

Editing other UVs at the same time
Use the Texture Atlas Add-on shipped with Blender to do this. After enabling it in the Add-on manager, you'll find a panel in the Properties Editor of the Render Settings tab. Select all objects which should receive the same UV space first, and then hit the + key to add a new Atlas. Then, hit the Start Manual Unwrap button.

All objects will be joined, you can edit the UVs as if they were one. In fact, at the moment they actually are one object, so pay attention beforehand to your modifiers. When you're done, hit the Finish Manual Unwrap button to separate the objects back to their original state.


text:
Making a property change when an animation ends?
I've been trying to make a blender game in first person, so i want to change the property "step" to one after a camera animation plays, then back to 0 after the second animation plays. So I was wondering if any of you could help me?

if you need more detail look down here:
(camera is turned at 90 degrees positive local x)

The first animation has the camera swings in the negative local y axis and turns back to 0 degrees.

the next animation swings in the positive local y axis and back to 0 degrees

Property "step" type Integer

Actuator sensor
The actuator sensor can tell you when an actuator deactivates. In your case it can listen to your action actuator.
Remarks:

Ensure to evaluate the sensor status after the observed actuator gets activated. Otherwise you might trigger the next operation before the action actuator even started to play something.

Frame property
The action actuator allows you to setup a property to receive the currently played action frame. With a property sensor you can sense over that property to act according to the current frame.
Remarks:

To measure the end of an animation, you need to setup the end frame twice (at the action sensor and at the action actuator)
Frames are no integer. Any equal checks will fail. You need to perform range checks.

Frame counter / Time measurement
Establish a setup that constantly increases a property by one. This enables you to trigger actuators after certain frames.
Remarks:

There is no direct relationship between counted frames and animation
You need to be sure that the counted frame number matches what you are measuring (the duration of the animation).


text:
Multiple layers, master pivot point
I have a scene with multiple layers, even layers with sublayers(empty with layers within).
When I import this model into Unity3D the pivot point is in the original cube, even though in Blender each part has their own pivot point.
How can I modify this "master pivot point", so I can tell Unity3D where it should put the pivot point.

I have figured it out.
In object mode you can create an "Empty" and put all the other layers inside the Empty, Unity3D will use the pivot point of the Empty because it is the outermost layer.
All you have to do is position the pivot point in the Empty.


text:
How many bits per channel we have for storing vertex color data?
As in title. I want to know how precise vertex color data is in Blender.

As far as I know they are the standard 24bit RGB

Thanks for answer. Only 8 bits per channel is quite small.

If you need more detail you may use vertex groups which are float values I think.


text:
Can I dissable built-in Panels with another python script?
I created an addon that ads my own panel in 3dView Properties, it consist of selected settings from View, Display and Shading panels. Now I want to disable those panels.
I could comment them out or add poll check in space_view3d.py file but I don't want to modify interface files permanently.
Is there a way to disable panels from another python script?

Import and unregister the UI panel
Simple test script, toggles the rego of the 3DView Properties View Panel, by looking at its is_registered property.
import bpy
# import the view panel
from bl_ui.space_view3d import VIEW3D_PT_view3d_properties as VP
# toggle rego
if VP.is_registered:
    bpy.utils.unregister_class(VP)
else:
    bpy.utils.register_class(VP)

Would suggest this is done in your register / unregister methods.
IMO this is a slippery slope, if you are going to distribute your addon,  as other addons may append prepend to those panels.

Panels get displayed when their class is registered. This hapens in the \scripts\startup\bl_ui\__init__.py file:
def register():
    from bpy.utils import register_class
    for mod in _modules_loaded:
        for cls in mod.classes:
            register_class(cls)

You can unregister those classes when your addon is registered and register them back when your addon gets unregistered, but it's important it gets executed after the __init__.py code, not before it. That is usually the case, as addons are loaded after UI, but you can check with a Blender developer to be sure. This is something to be careful about.
You can also modify the space_view3d.py itself. You can do this from your addon with python too, granted you have the permission to write to the files. This can be more problematic if the user deletes the addon files and its unregister function gets never called to restore the file back. Also the write permission might be a problem.


text:
How can I get the music file to play in the final animated version?
when I animate my video the music doesn't play in the final saved version, even though it plays ok in Blender before animating. How can I fix this please?

Try enabling the audio codec located under the render tab:


text:
Blender not rendering specified dimensions
I was making a channel art photo for my YouTube channel, and everything went smoothly. But when I rendered the image it wasn't the resolution that I specified.
I wanted the image to look like this:

But the rendering came out like this:

How do I make it so it doesn't do this??

Do you have any nodes in the compositor?

Yeah I do, for the material textures

Could you provide a screenshot of your compositing node setup?

The stretched height comes from you having an 3:2 aspect ratio.
You would normally only want to adjust the aspect ratio when rendering video that is intended for older tv's with non-square pixels.
The reason you are seeing the distortion is that the uv image editor displays images in 1:1 aspect by default, you can adjust this to match your render settings in the Display panel of the UV/Image Editors properties region N.


text:
How can I add a triangular shape with the thickness of my loop cuts?
I'm trying to make a simple shape but can't seem to do it right.
It's basically a right-angle shape with edges. Hard to explain, here are the pics:

https://i.sstatic.net/JaYUc.jpg
This is where I'm stuck:

https://i.sstatic.net/S2raa.jpg
All I need to do now is add in the triangles on the sides with the thickness shown by my loop cuts.
Any ideas??

Create additional geometry and use Bridge Edge Loops to achieve the final result.

Bridging won't work from the beginning as there aren't 2 edge loops; however you can split existing faces and bridge the result. For that select edge between faces which form the base for the desired triangles. Press V to rip it and Esc to cancel moving. You have 2 edge loops now.
Switch to Face Select mode, choose both faces and execute Ctrl+E > Bridge Edge Loops. Internal faces will be deleted for you.
Remove doubles (which were made with that ripped edge) via W menu. Also in 3D View header find Select > Non-Manifold operator (switch to Vertice or Edge Select mode to use it). Edge in the corner will be selected, delete it.

Note that tris may be undesired topology (e.g. if subdividing this surface or adding more loopcuts) so use it if you know this part of model will be mostly flat and not needing further subdividing.

I would recommend the following for your workflow:
If you are planning on keeping both your angle, and your stiffeners as one mesh object, then delete your two faces that your triangular stiffener plate will be running over top of first.
To do this go into face mode, select your faces (Hold Shift to select more than one), X >> Only Faces.
Next go into Edge mode.
Next, select your two outer edges (Hold Shift to select more than one) and using W >> E(Bridge Edge Loops).
NOTE: Repeat this for both triangle loops that get created.
Next Select your triangle edge loop using Alt+Right-Click.
Next hit F to fill in the the loop.

I figured it out lol extruded a square then selected the bottom corner and pulled it back to where the 3d cursor is in my 2nd pic!


text:
Cutting a "channel" halfway into a shape?
What I mean:

How can cut this groove?
The "channel" doesn't go all the way through, probably only half way or so (Using a picture to build my model so I can't tell for sure). It's suppose to be a height adjuster like you would find on a lawnmower for the height of the blades. was wondering if I could use the boolean modifier but I didn't know if one shape has to go all the way through the other shape for the modifier to work properly.
What do you's think?


text:
See the whole HDRi image as cycles world
When I open a hdri image for a world background , I get an extremely enlarged image on the screen  , showing only a very small part of the image . What can I do to fix that problem ?

The world is large. For example if you look out of the window of your house you only see a small part of it.


text:
Is it a bad idea to edit a rig after it has been reposed?
Like the title asks, is it a bad idea to edit a rig after it has been reposed in the pose position?
It seems that doing so causes nothing but problems.

Hard to tell from your question but you might want to apply pose as rest pose before you go on and edit your rig.

I guess that means YES, it is a bad idea.
My question regards the proper procedure for dealing with a rigged object. It appears from the way Blender works that if any changes are made to the object in rest position, they will affect every pose that was created prior to that change.

It's not a bad idea per se, it's actually quite flexible compared to other things like shape keys. But I guess it depends on what exactly you want. If you've already animated everything only to afterwards find out that your rig and model need major reworking, then your workflow is probably flawed. Poses (usually?) are relative to the rest pose, thus making changes to the rest pose affects other poses as well...


text:
How Do I Use a Saved Pose at a New xyz Location?
I've created a number of poses for my rigged character. These poses were created while he was at the center of the grid in the 3D viewer. When I apply a pose anywhere else, it places him back at that location. How can I use the poses I've created at any other locations than where they were created?

In most cases, your Armature object should be the root of object hierarchy. So that means it should not be parented to anything.
Also the armature object should be without any transforms - always with origin in the center.
Instead the rig should have a Root or Master bone to transform the whole rig in pose-mode. You want to make rig positioning in the scene with this bone.
This prevents numerous problems with scene management, linking, and most importantly keeps things clean for animators - they have all the key-frames under the pose. And not some under object and some under pose.
When you do not want to store the root transform of your rig inside a pose library - delete that bone from the Action which is used to store the poses - or just delete the keyframes from the poses you don't want to store the root transform in:

Should be named PoseLib by default and you will find it in Action Editor.

Make your Armature a child from an object, In that way, the poses are always relative to the parent-object.
To do this, first select all your children, in your case select the armature. With all children selected, finally select your parent-object (In your case a simple Empty-object or similar). Press Ctrl + P to parent all selected objects (children) to the last selected object (parent).
Note: Because the armature is now a child-object, always reset the transform of the parent-object, if you add or modify an animation, otherwise the results are not clean.
Tip: If you're using it in the BGE use a rectangular or capsule as the parent in the dimensions of the character. Set 'Physics Type' to Dynamic, Rigid Body, Character or what ever is best for your purpose and more importantly set to invisible.
I hope I could help.


text:
Why Doesn't my Ambient Occlusion Texture Show Up Properly"
Okay, I just learned how to bake an AO lightmap for an object and how to blend it with another texture (thanks to the people here), and it looks just great when rendered, but for some reason the object looks almost black when I view it in the BGE. My other objects that have just one texture mapped to them look normal in the BGE. Here's an image of the object in the BGE:

Also, the AO texture shows up in Texture mode in the 3D viewer, but not the other texture that I blended it with. Here's an image to show you what I mean:

Here's an image of the object when rendered. Note that the AO is barely noticeable (another issue?):

And for posterity, here's how I have my texture nodes set up for the object:

That's how I was shown to do it. I'm just following instructions from another post. I assume the answer was given by someone who knows what they're talking about. Maybe they don't.

It looks like the second texture is connected to the wrong slot. It should either be connected to the Color 2 socket (not factor) or you should be mixing it with a dark or black color, not white.

I just tried changing the node set-up as you suggested, and there's no difference. I also changed the material from white to black, but again, no difference.

This is the node setup I would suggest:

And the 'Fac' slider will adjust the strength of the AO effect.
Things that may stop your AO/node shaders from working:

You're in multitexture mode (you must be in GLSL mode for node shaders to work)
You have node textures disabled (render settings, GLSL, the checkbox labled 'nodes')
You have unticked the 'use node shader' button for the material. I consider this most likely.


text:
Hide/remove lines in a face
How can I hide or remove these lines, but keeping it's face? Unless it's not possible yet.
EDIT: Will this also ruin beveling?

If you want to remove those edges on the front tilted face then in Vertices select mode select vertice in the center and press X > Dissolve Vertices (you can also use Limited Dissolve). Dissolving edges will remove faces because there isn't enough supporting geometry for it to join. Note that if those edges were changing surface of the face somehow these changes will be lost.

You can hide edges using Bmesh, and it won't hide the faces they're attached to. Users of Sketchup might find this handy but it isn't something you'll find very much use for as your proficiency with Blender increases. But the option is there if you need it.
To run this script you would first select the edges you want to hide, then open the TextEditor window, paste this code into it and press Run.
This example assumes we have a mesh object in Edit Mode, and you have a few edges selected.
import bpy
import bmesh

# Get the active mesh
obj = bpy.context.edit_object
me = obj.data

# Get a BMesh representation
bm = bmesh.from_edit_mesh(me)

bm.faces.active = None

# Modify the BMesh, can do anything here...
for e in bm.edges:
    if e.select:
        e.hide = True

# Show the updates in the viewport
# and recalculate n-gon tessellation.
bmesh.update_edit_mesh(me, True)

to unhide the edges you press Alt+H, while in Edit Mode

Says it failed to run it.

To remove excess edges without removing faces, you can go into edit mode, and press X>dissolve edges, or in some cases limited dissolve. Keep in mind that in some cases this may result in losing some modifications to your mesh such as beveling, but won't remove any faces.

Ir removes the face though.

@Akidus I updated my answer to include another possible solution.


text:
How do you set the rendering size?
How do you size the camera to fit the size needed on the youtube channel art? It says it's too small when I upload the image. I need to make the camera at least 2048 x 1152 pixels. It would be nice to have it at 2560 x 1440 pixels though. I tried the other questions, but it didn't make it any wider than it was before. The Y and X values under Resolution in Dimensions Under Render Settings just made the camera taller.

Related: http://blender.stackexchange.com/questions/3473/rendered-image-looks-pixelated

I tried those before and they didn't make it any wider for me.

authors: Дмитрий Демидюк


text:
Get position of joints in armature using Python
First of all, I'm using :

MakeHuman 1.2.0a3
Blender 2.7
MH Community Plugin

I've created a pretty generic model in MakeHuman with a "Game Engine" rig and I've imported it in Blender using the community plugin.
In this image, you see there are some spheres that seems to be joints between different bones. I need to get the coordinates of these joints using scripts (in Python, obviously) in order to do some operations in MatLab. I've searched the web, but between the different API versions of Blender's scripting and my lack of knowledge of Blender, I wasn't able to figure out how to do it.
Let's say, in my example below, that the selected joint is named "knee_l", how would I retrieve its coordinates using Python?

Have you found a solution to your question?


text:
How to choose which viewport to render in?
I've split the node editor into two viewports and change the second viewport to 3D view. Is there a way to choose which viewport blender will render in? Blender seems to choose randomly.

See http://blender.stackexchange.com/questions/33558/how-does-blender-decide-in-which-window-it-shows-the-render

Quite sure Blender uses the larger view.


text:
How to export single animation to GLB used in multiple objects?
I have a scene where I have three cubes, rotating at the exact same speed. I want to export this to .glb so that only one animation is packed into the .glb, to optimize the file size.

I have tried creating linked duplicates of the cubes so that they all share the same action. As you can see in this screenshot, there is only one action.

But when I export to .glb, and check the file contents using https://gltf.report/, it shows that there are three animations in the .glb file (while only having one mesh):

Is there any work around for this, or does my work just prove that .glb cannot support linked animations?

In glTF terminology, an "animation" is a unit of playback, a "channel" is a keyframe sequence within an animation targeting a single property of a single object, and a "sampler" containing "accessors" is the storage containing the channel's keyframe data.
In order to spin three boxes, you will always need to have at least three channels. Those three channels could be grouped into one animation for playback together, or separated so each can be played individually. In the screenshot above they are separate, but you can merge them by assigning each object an NLA Track of the same name in Blender — with default export settings, NLA Tracks with the same name are merged into a single animation at export.
However, whether there is one or three animations, there must still be three channels. This does not mean data is duplicated — all three channels can share the same sampler or accessors if exported efficiently. The https://gltf.report/ table shows the size of each animation, but doesn't show whether the animations share data or not.
If the animations did not share data (some exporters might not be fully optimized) you could detect and merge duplicate accessors by running this script in the https://gltf.report/ script tab —
import { dedup } from '@gltf-transform/functions';
await document.transform(dedup());


text:
Imported Scene is Very Slow – Deleted and Undoing Takes Forever
After importing a model from Google Poly (via fbx), I have a scene with

8.8k tris
4.6k faces
24k vertices

There are no modifiers active, and adding / editing / navigating are working very smoothly. However, undo, joining objects and especially deleting objects is incredibly slow (5-20 minutes per action).
I have never experienced something like this before in Blender.  How can I improve on this situation?
Also, a side note: why are the edges purple in edit mode?

The import takes quite a while but after that it works fine for fine. Not sure if the memory consumption is the issue for you.

The .fbx file does seem rather resource hungry for such a simple scene. I've downloaded the .obj version for comparsion. Counterintuitively the .obj is both smaller in file size and loads much quicker despite being a ASCII text format. The reason seems to be that in the fbx import all objects are parented to empties and every object has 25 materials assigned. This increases the scene complexity and dependency graph that has to be constructed on import. The actual geometric complexity is identical, none the less the effect is quite profound since the fbx import requires 542.9 MB of memory compared to the 44.5 MB of the .obj import. The solution would be to use the .obj instead of the .fbx file.

Scene statistics .fbx

Scene statistics .obj
The light blue edges are marked as sharp.


text:
Track Time Spent Working on a File (Blender 2.9)
I was looking for addons/methods for tracking time while working in a .blend file. I found this question already answered, but it links to a really outdated addon.
Is there anything like the following description that works for Blender 2.9?

The time spent working in the blend file is recorded, and stored in
the blend to continue from the next time it is opened.
If you stop work for longer than 30 seconds, the timer stops counting
and reverts back to the time of your last action, minimizing idle
time.

The Project Timer addon in the linked question got updates. They are a bit hidden in the comments. The latest version system_project_timer_2_8_update_4.py works for Blender 3.0.
After installing the addon, the tracked project time is displayed in the header of the Info window. Just split one window and choose editor type Info. It tracks the mouse movement and stops the time if you don't move the mouse for 30 seconds.


text:
Workflow: Clean Line Art
I know there on some talented Blender user on here, and I have been looking for methods with Blender Eevee to make clean line art like the work of @beesandbombs on Twitter:

Unfortunately, I have been stumped with the line rendering part of this:

I have been using freestyle in Eevee, and I can't seem to make the lines look, well, good. They look very pixelated and inconsistent.
Here's a close up of the reference and mine:

Here's my .blend so far (really doubt this would help anyone that can offer advice). I would appreciate any guidance on workflow for this!

There are quite a few aspects of your .blend which might defeat he clean render of Freestyle strokes.

The Geometry of your object. Maybe you created the top face by extruding edges, not faces? The inside is packed with internal faces. They all have to go, really, there's a danger of depth-errors. Just leave the outside skin.
The Material of your object. No need for Principled BSDF here.. you don't want to simulate the response of the surface to light at all. Just use an Emission, which, in EEVEE, is flat color.
The Render settings. Viewport 'Sampling' was set to 16, but Render was set to 1. With only 1 sample per pixel, there's no anti-aliasing. 16 seems to be enough.
Freestyle's Line Set settings. You were relying on the 'Visible' setting alone to determine which edges are stroked. I'm surprised that works at all. Maybe it's the internal faces. :). Instead, in this case, it would seem to be best to explicitly tell Freestyle which edges to render, by marking them as Freestyle Edges. Then  in the View Layers tab, Freestyle > Line Set panel, set Freestyle to pick up only those edges:

After that, the render's looking OK:

You can find a revised version of your file here
All credit to @beesandbombs for a lovely idea.. I couldn't resist implementing it in Geometry Nodes:


text:
Problems with Enemy AI
I am developing a simple ball game, where the sole objective is "Survive as long as you can from the enemy balls". So I gave my ball controls and set the enemy ball's AI to "path following". It seemed to work flawlessly, but now I am facing a problem where the enemy balls get stuck behind a wall and. You can understand the problem better by seeing this image,

Note: Red ball - Player, White balls - enemies
I tried to changing the game environment, set the enemy AI to "seek". But none of them worked.
So, How do I rectify this problem? Also, is there a way not to make the enemy balls come together as in the image?

I suggest to enable Visualize at the Steering Actuator. It will show you what path the object wants to go.

You may have a problem with your navigation mesh. Make sure the navmesh is going around the wall. If it isn't you can punch a hole in it in edit mode, then reset index values in the Physics tab, and set Visualize on in the actuator to make sure it works. Hope this helps! If it doesn't you may want to check the navmesh normal up direction (It's the small "N" checkbox beside the up-direction listbox.)


text:
Baking a particle system in Blender to use in Unity
I am using Blender(2.77a) and Cycles render.
I have a particle system set up in Blender which emits 3D Blood cells. Now, Unity's inbuilt particle system is different from Blender's. So exporting a particle system made in blender to unity is not possible.
But I'm in very much need for this to work. I browsed the web and came across a tutorial for baking 3DsMax particles to Unity and hoped it would work with Blender as well.
But no luck there as well. These are the steps I follow,

Set up the particle system
Save the blend file and enable Disk Cache
Click on "Bake all Dynamics"
Export as fbx and import in unity.

Where am I going wrong? Is there any other way to achieve this?

Maybe related - http://blender.stackexchange.com/questions/4956/convert-particle-system-to-animated-meshes

This is not possible.

This is not possible. Particle System simulations are not supported at all due to the fact that Unity has a completely different solution.
Unity currently imports (from blender)
all nodes with position, rotation and scale. Pivot points and Names are also imported.
Meshes with vertices, polygons, triangles, UVs, and normals.
Bones,
Skinned Meshes, and
Animations

Thanks for the answer. Guess I will have to do something else


text:
Runtime Scaling
My game requires the game area to reduce in size after a certain amount of time. That would mean scaling the object at runtime.
Is it possible to scale an object at runtime in Blender game engine?

You can certainly animate the object's scale and use the action actuator to play the animation in the game engine. However, only the display will update. the physics will still work from the original size mesh. A workaround to this would be to have (assuming your arena is a rectangular object) To have a separate object for each wall, and animate them moving toward the center. If you play the animation on each wall piece, the physics will respond to the moving objects.

I did try the action "actuator", but it doesn't seem to work.

I have a text object which has the "Timer property". It has an "Always sensor" connected to a python script for displaying this timer value. Then I created a "Property sensor" for the text object and connected it to the "Action actuator" representing the scaling inwards of the game area. But when I run the game, there is no change in the game area

Is it possible to scale an object at runtime in Blender game engine?

you can scale an object via Python with KX_GameObject.worldScale
example:
import bge

bge.logic.getCurrentController().owner.worldScale = (0.5, 0.5, 0.5)

Is it possible to scale an object at runtime in Blender game engine?

You can play an action with a scale channel.

Example implemention:


text:
Missing body parts when importing mhx in blender
I have a problem when importing an mhx file to blender. Some body parts are missing after importing the model.

But when i import it to a new blender file it works fine.

This is what is expected when you export an .mhx from MakeHuman with clothing.  You need to deselect the options that hide the body parts under clothing in MakeHuman prior to export.
MakeHuman provides those options to reduce polygons/vertices that are not intended to ever be seen in a game, render, or animation.
Likewise, when importing an .mhx model in Blender, you are given options for hiding/showing various aspects of the model.  Just make sure your "hide vertices under clothing" options are set to be disabled in both programs.

where can i find hide vertices under clothing?


text:
How to turn generated mapping to UV Map

Is it possible to turn this generated mapping into an UV Map?
If not, would it be possible to access the generated mapping by using bpy?

Generated mapping is not using UV map, its using 3D space to map the textures on the mesh.

The problem here is that UV unwrapping simply assigns U (X) and V (Y) coordinates to the mesh, the W (Z) coordinate remains at 0 across the entire mesh.  Generated coordinates are based on the 3-dimensional bounding box of the mesh.
However, you can recreate the U and V generated coordinates in a UV map.
Just go into top view (Numpad 7) and hit U > Project From View (Bounds).

This will result in the same U an V coordinates as generated mapping.
For more on texture coordinates see my explanation of texture coordinates here.

Generated coordinates are based on the 3-dimensional bounding box of the mesh. -> blender does turn them into UVs for the final OpenGL Eevee render for example. So the code to compute this should be somewhere in blender. And since with cycle with it's "Vector" input allows way more complicated mappings, it would be nice to bake these back to UVs. Is there really no way?

@E.T. Just an idea: Bake the vectors into a texture. This texture could be read by a script which could try to move the uv-vertices to the according position for a second uv-map... BE AWARE that your UV-map can only work on the vertices provided, so there MAY BE ERRORS. I sadly do not know a inbuilt version of this, nor how one would recognize places where higher resolution would be needed... However, depending on your use case, it might be enough to just create a texture with the vectors and any uv-map and use the texture to drive the uv-coordinates of your actual texture/generator/map/nodes.

Following @PGMath advice to Project From View (Bounds), you can project two UVMaps, from top and front, and combine them to produce the same exact result as the generated mapping.
Steps:

Create two UV Maps, name them "Top" and "Front":

Go to UV Editing Tab, select the "Top" UV Map:

Go into top view (Numpad 7) and hit U > Project From View (Bounds):

Go to UV Editing Tab, select the "Front" UV Map:

Go into front view (Numpad 1) and hit U > Project From View (Bounds):

Go to the Shader view. On the object's material, create two UV Map nodes, one with Top, the other with Front. Add a Separate XYZ for each one, and combine them with a Combine XYZ. Use the "Top" XY as the XY, and the "Front" Y as the Z.

The result should be exactly the same as the Generated coordinates:


text:
Getting Euler rotations for an object and exporting them
Currently I have add-on that gets rotations from an object, converts angles into a matrix and saves it in a particular format into a text file.
This is what code for that looks like:
rot = tuple(chain(*obj.matrix_world.to_3x3().normalized().transposed()))

dump += ['"rotation" "{}"'.format(" ".join(str(r) for r in rot)),]

self.write(self.filepath, "\n".join(dump))

I also need to have Euler angles written after "rotation" in the following format:
"angles" "Y Z X"
Where Y, Z and X are angles in degrees.
How would I do that, following analogy with rotation matrix ? Thanks.

Should be as simple as:
from math import degrees

"{:f} {:f} {:f}".format(*map(degrees, obj.matrix_world.to_euler()))
# '-90.224203 -10.379210 -11.433244'

to_euler() converts a matrix to an Euler object, with order XYZ (regardless of what is set for rotation_mode). The angles are given in radians, but they can be simply converted to degrees using math.degrees().

Thanks! I got this code writing angles now: '"angles" "{:f} {:f} {:f}"'.format(*map(degrees, obj.matrix_world.to_euler())), however, the order is wrong.                                                                                How do I re-arrange X Y Z to be Y Z X ?

e = tuple(map(degrees, obj.matrix_world.to_euler())) and then "{:f} {:f} {:f}".format(e[1], e[2], e[0])

So this is what worked for me (for test cases I tried anyway; with help from some folks on IRC):
rot_angles = obj.matrix_world.to_euler()
rot_angles_X = math.degrees(rot_angles[0])
rot_angles_Y = math.degrees(rot_angles[1])
rot_angles_Z = math.degrees(rot_angles[2])

'"angles" "{}"'.format(" ".join( [ str(rot_angles_Y), str(rot_angles_Z), str(rot_angles_X) ] ))

Thanks!


text:
How to invert vertex colors in Blender?
So there is no built-in functionality to invert vertex color o.O
How can I invert vertex color on an active object?

or use foreach_set
import bpy

def invert_vcols(color_layer):

    # foreach_get requires us to pass it a container (list) with
    # the same amount of elements as " len(color_layer.data)*3 "
    # 3: because each vertex color has 3 components: [r,g,b]
    components = [1.0 for n in range(len(color_layer.data)*3)]

    # this writes the current [r,g,b,r,g,b,.....] of color_layer.data
    # into the " components " variable
    color_layer.data.foreach_get("color", components)

    # this subtracts each component from 1 and overwrites " color_layer.data "
    color_layer.data.foreach_set("color", [1-c for c in components])

    bpy.ops.object.mode_set(mode='OBJECT')
    bpy.ops.object.mode_set(mode='VERTEX_PAINT')

obj = bpy.context.active_object
invert_vcols(obj.data.vertex_colors.active)

You can use foreach_set because each component of each vertex color gets inverted.

This is all that is needed, and the way I prefer to access vertex colors. It works in any mode:
import bpy

obj = bpy.context.active_object

for ipoly in range(len(obj.data.polygons)):
    for idx, ivertex in enumerate(obj.data.polygons[ipoly].loop_indices):
        ivert = obj.data.polygons[ipoly].vertices[idx]
        col = obj.data.vertex_colors.active.data[ivertex].color
        obj.data.vertex_colors.active.data[ivertex].color = tuple(1-x for x in col)

If you want UI button add it with this micro addon (save as .py file into addon folder):

bl_info = {
    "name": "Invert Vertex Colors",
    "location": "3D viewport > Header > Paint menu in Vertex Paint mode",
    "version": (0,1,0),
    "blender": (2,7,6),
    "description": "Inverts vertex colors of active paint layer",
    "author": "Jerryno",
    "category": "Paint",
}

import bpy

class InvertVertexColors(bpy.types.Operator):
    bl_idname = "paint.invert_colors"
    bl_label = "Invert Vertex Colors"
    bl_description = "Invert vertex colors of active paint layer"

    @classmethod
    def poll(self, context):
        try:
            return context.active_object is not None
        except (AttributeError, KeyError, TypeError):
            return False

    def execute(self, context):
        active = context.active_object
        for ipoly in range(len(active.data.polygons)):
            for idx, ivertex in enumerate(active.data.polygons[ipoly].loop_indices):
                ivert = active.data.polygons[ipoly].vertices[idx]
                col = active.data.vertex_colors.active.data[ivertex].color
                active.data.vertex_colors.active.data[ivertex].color = tuple(1-x for x in col)
        return{'FINISHED'}

def menu_entry(self, context):
    self.layout.operator("paint.invert_colors", icon='IMAGE_ALPHA')

def register():
    bpy.utils.register_module(__name__)
    bpy.types.VIEW3D_MT_paint_vertex.append(menu_entry)

def unregister():
    bpy.utils.unregister_module(__name__)
    bpy.types.VIEW3D_MT_paint_vertex.remove(menu_entry)

if __name__ == "__main__":
    register()

aliasing can help speed up the dot lookups of active.data.polygons and active.data.vertex_colors.active_data. I suggest this, it's always less dense to read. https://gist.github.com/zeffii/8eede8ff41d6dac47448/revisions

@zefii nice, also good it's a gist now, feel free to make it public.)

You can invert vertex colors with this script (which I found online and improved):
import bpy
import random

# get and store the object in object mode
obj = bpy.context.active_object
mesh = obj.data

# set active vertex paint layer
color_layer = mesh.vertex_colors.active

v = 0  # current vertex in loop

# iterate over the verices and invert their color
for poly in mesh.polygons:
    for idx in poly.loop_indices:
        col = [(1 - color_layer.data[v].color[i]) for i in range(3)]
        color_layer.data[v].color = col
        v += 1

# We have to refresh Vertex Paint mode to see the changes
bpy.ops.object.mode_set(mode='OBJECT')
bpy.ops.object.mode_set(mode='VERTEX_PAINT')

Just select your object, set one of the vertex colors on your object to be active, switch to Vertex Pain mode and run the script.
It would be nice if someone improved it further and added UI button :)


text:
How to Model Low Poly Nature Terrain
I can't seem to figure out how to model low poly nature terrain.  I don't know what objects to use, and what to do from there.

This is a great example.  How do I make (model) this type of terrain? Would the best workflow be to make them random generated?  Or manually modeling them using sculpt tools, etc. ?

The leaves are obviously just basic spheres. The rocks are also basic sphere but the vertices are moved around a bit in edit mode, probably with proportional editing. The tree trunks look like a cube that was scaled down then extruded a couple of times. I imagine each section of  the terrain is a subdivided plane with the vertices moved around abit in edit mode or maybe the mountain is just a copy of the tiny rock just scaled up and subdivided once.

See http://blender.stackexchange.com/questions/58398/how-do-i-create-low-poly-style-terrain

Blendernation listed a tutorial on that just a couple of days ago.

There were given a lot of general tips and ways to achieve that here - http://blender.stackexchange.com/questions/52521/low-poly-mountain-terrain. Achieving exact style may be much more complex and probably unneeded.

I think using the landscape add-on, which comes preloaded with blender, would work. Just put it on a low sub-surf with a hybridMFractal type. Finally use a tringulate modifer

Regarding the bounty that you put on the question: I guess what you want is a complete tutorial on how to do this kind of scenes. Blender Stackexchange is clearly the wrong place for tutorials that require many steps and lots of screenshots to answer the question to your satisfaction. Also please check out my answer below...

Ok, so, here we go. This will be the final result:

Beginnings
I came at this task with a systematic approach. I would grade everything by color and sculpt to pull out different colored landmasses from beneath a water surface plane (the lowest object in the scene). The cliff background, along with rocks, trees, and bushes, would come last.
Background Image
I downloaded the image from your question and imported it as a Background Image in the 3D Viewport Properties panel. I set the Display Axis to Camera, because it was the only relevant place that I would need the image. I also changed the Draw settings to Front because I would need to still see the image above my models; it's too complicated to do everything in Wireframe View.

Camera Settings
I also adjusted the Properties panel > Render tab > Dimensions dropdown settings so that the image wasn't stretched.

I keyed Numpad 0 to switch to Camera View, zoomed in, and checked 3D Viewport > Properties panel > View dropdown > Lock Camera to View.
Utilizing the background image, I aligned the ground plane and default cube to roughly the same orientation as the camera. Note how the grid, just barely peeking through the background image, appears to be on the same plane as the water.

Lighting
Sun Lamp
Since this is relatively simple, we'll knock it out now. Select the default Point lamp and go to the Properties panel > Object Data tab. Set the Lamp Type to Sun. Set the Size: value to 0. Click Use Nodes, and set the Strength: value to 3.0. Make sure the Color is Hex: value FFFECC.

HDR
For added realism, I prefer to use an HDR Image as an alternate light source.
Go to the Properties panel > World tab > Surface dropdown. Click Use Nodes. Click the dotted button next to the Color: input and choose Environment Texture.

Open an HDR Image. I am using the one from BlenderGuru's Cherry Blossom Tutorial.
Modeling
...and a bit of texturing.
The Water
I deleted the default cube to start and added a plane (Shift + A > Mesh > Plane). I scaled the plane up until I deemed fit (23.13). I then popped over to the Properties panel > Materials tab, ensured that I was in Cycles Render, and added a new material. I kept the default Diffuse BSDF shader but set the color to color of the water. To do that, I...

...went to the 3D Viewport Properties panel > Background Image dropdown.
...increased the Opacity: value to 1.
...went back to the Properties panel > Materials tab > Surface dropdown > Color Selection option.
...used the Ink Dropper to pick the water color.
...went to the Properties panel > Materials tab > Settings dropdown > Viewport Color.
...used the Ink Dropper to pick the Properties panel > Materials tab > Surface dropdown > Color.

You can do that or use Hex value BADDFE.

The Sand
...and basically steps for the dirt and the grass as well.
This is what I call the lightish brown stuff in the image (Hex: FFE1C8).
I duplicated the plane and moved it lower by keying Shift + D, then Z, then -.5. I keyed Tab to enter Edit Mode, keyed W to open the Specials menu, and selected Subdivide. I keyed T to toggle open/close the Toolshelf. Under the Subdivide dropdown, I changed the Number of Cuts to 10, the max.

I then subdivided again, but this time only used 3 cuts. I keyed Tab again to exit Edit Mode.

Next, I traveled to the Properties panel > Object modifiers tab and added a Triangulate modifier. I clicked Apply to apply the modifier.

I entered Sculpt Mode via the footer of the 3D Viewport. In the Toolshelf, I made sure that all mirroring was disabled. I, personally, enjoyed using a brush size of 17 px. and a strength of 0.5. I sculpted everywhere I saw sand. I did this until I felt content.
A gif of a bit of me sculpting:

The Dirt and the Grass
This is what I refer to the low lying green and dark brown coloring as. You will want to do the same thing as with the sand except that you will want to use a different material. Also, where materials are concerned:

Grass hex: DBE492.
Dirt hex: B18E7D.

What I've got so far (note that there were some white bars at the top and bottom of the image that I downloaded. I added these in for consistency's sake. I will include a blerb about how you can include them later. Note that the alternative is either shrinking the camera dimensions or making more scene):

The difference between the two:

Greyish-Brown Cliff
Hex: C4A888
I started by adding a Cylinder and scaling it up by a factor of 11. I then keyed Numpad 7, Numpad 5 to enter Top Orthographic View. I keyed Tab to enter Edit Mode. I keyed A to deselect everything. I keyed Z to toggle in/out of Wireframe View. I Box selected the following vertices.

I keyed X to open the Delete menu and selected Vertices. I then rotated my view and selected the top vertices.

I keyed . to switch the Pivot Point to 3D Cursor, which should be at the center of the scene. I keyed E, then S, then Shift + Z, then 2 to plateau my cliff face. I keyed Numpad 0 to revert to Camera View, A twice to select everything, and G, then Z, then 2.5 to move the cliff up. I keyed S, then X, then 2 to scale my cliff. I keyed G, then X, then -5 to move my cliff left. Lastly, I keyed Alt +  RMB while hovering over the back vertices that we extruded out of the top of the cliff to select them and G, then Z, then 4 to move it up. At this point, I have a cliff that looks like the following.

Now I subdivided it (3 cuts) and triangulated. And sculpted. After sculpting, I had something like the following. It's not totally accurate to the image, but it does look good.

Last thing for the cliff. I extruded and assigned the grass material to the same mesh for the grass at the top left of the cliff.
Background rest of the cliff
Stone hex: C3C3C3
Red Rock hex: E7A17D
There's no easy way for me to explain this, but I basically divided it up into chunks by color and made pieces out of various stretched and sculpted cylinders. This was my result:

But this was my scene. Not pretty, but effective:

Fillers
Pine Trees
Hex: 90C785
These I made by adding a cube, scaling it up, and scaling it down at the top.

Obviously I had to scale them slightly differently for each instance. Also, I did some occasional sculpting of the landscape beneath the trees to make it fit them, rather than vice-versa. After some work, I achieved this:

Rocks and Shrubs
For this, I added various low poly spheres which I triangulated and sculpted and placed around. I added no new materials, choosing to use the existing Pine tree, Greyish-Brown Cliff, and Red Rock materials. After adding these features, I achieved this:

The Trees
Tree Bark hex: 91604C
These I made through the simple system of extruding a low poly cylinder up and up. This was the trunk, for which I added yet another material, this one at a Hex value of 91604C The leaves were copies of a bush using the Pine Tree material again. How I arranged them was quite clever, if I do say so myself...and I do.

In the Properties panel > Scene tab, I turned off all Gravity.
I duplicated shrubs around the top of the tree.
I added a Force Field > Force with a Strength: value of -20 to the top of the tree.
In the 3D Viewport > Toolshelf > Physics tab, I Add Actived all of the leaves.
I Add Passived the tree.

The setup:

After simulating:

After simulating, which I had to do by separate trees, I had to click Bake to Keyframes for each leaf and set the Start: and End: values to the frame that I liked (119).
After making the trees, the last thing, I produced the a result that only needed some minor post-processing, which I'll explain next, to look like the image from the beginning.
Post-processing
I used 1000 Render Samples and 256x256 tiles because I rendered on my GPU. As a rough guide, refer to the following chart by BlenderGuru. Make your own tests to find out what is the optimal tile size for your system and scenes.

For the compositing, I used these nodes to add the top and bottom white borders:

How this works:

The two Box Mask nodes create a two white boxes (top and bottom) with a black background at the specified coordinates for the specified size.
The Color > MixRGB > Add node adds all values white (1) to the other creating two strips with a black (0) background.
This can be used as a Fac: between a chosen color (which just so happens to be white) and the rest of the image that I want to show.

Once again, the final result:

The .blend file:

ARadish's modified .blend file, in which the compositing and tree leaves were changed:

ARadish's compositing and corresponding explanation:

The compositing was meant to add sepia-ish tones to the image, and make the ambient shadows darker, and orangier. I added an AO (ambient occlusion) render pass under "Render Layers" and strung this to the blue channel of the original image. After recombining RBGA, i ran a tweaked line of the AO into the black levels of the image using RGB curves. This gives me darker shadows without changing the over all contrast of the image. A tad of color balance for sepia made the image get that softer feel.

Result from ARadish's .blend:

this is a good answer. honestly, the leaves and the compositing are terrible, i was able to do something about the leaves, but that compositing is hard to pin. kudos to you. this deserves the extra points.

@ARadish I agree with you. The leaves were terrible. I just wanted them to not be running into each other, but I did realize that they looked nothing like the original picture. Note that I mostly did the compositing to cover the ugly top and bottom of the image. I will say, if you don't mind, that telling someone that their work is terrible may not be the best approach. I'm generally good with criticism, but someone else might not be so adept. Lastly, do you mind if I add your modified .blend file to the end of the answer? And would you consider explaining to me how the compositing works?

The compositing was meant to add sepia-ish tones to the image, and make the ambient shadows darker, and orangier. I added an AO (ambient occlusion) render pass under "Render Layers" and strung this to the blue channel of the original image. After recombining RBGA, i ran a tweaked line of the AO into the black levels of the image using RGB curves. This gives me darker shadows without changing the over all contrast of the image. A tad of color balance for sepia made the image get that softer feel. still working on this tho. thanks for understanding.

@ARadish added your stuff. Thanks for the help!

This was the image I put together without your tutorial: https://s32.postimg.org/6lli8dzet/edited.png

@AlexSafayan Looks fantastic! Are you happy with my answer? Can I clarify anything?

Since Blender Stackexchange is clearly the wrong place to give full-blown tutorials about how to create whole scenes, I'll try to answer this as short as possible.
In General:
The creation of this kind of Low-Poly Scenes differs not vastly from the creation of High-Poly scenes. It's always good to start with a high polycount and reduce it with a Decimate Modifier with the "Triangulate" option checked. See  How do I create low poly style terrain
You always want to use flat instead of smooth shading on your models. This is a per-model/mesh setting, which you can activate in the toolbar (T)

Work with separate models for

the basic terrain with a basic material like sand, rock, soil... and sculpt rivers and lakes into it
hills with different materials like grass, dirt... and create roads and  paths with them.
planes with a displacement modifier for water
rocks, trees, bushes, houses, ... built out of primitives

Terrain:
You can use the ANT Landscape generator, like I already described in my terrain answer, you can also start with a simple plane.

Choose a reasonable size, subdivide it evenly into squares (using
loopcut helps) and add a multires modifier to it.
Sculpt the terrain in Sculpt Mode, slight hills for the basic shape, steep carvings for lakes, rivers, creeks...
When your base sculpt is done, add a Decimate Modifier with "collapse" and "triangulate" to your stack and reduce the Ratio until you are satisfied.

Water
Use at least one separate plane or, if you have several lakes on different altitudes separate planes for them.

adjust them so that the terrain overlaps the water plane(s).
use subdivide/loopcut to get even distribution
uv-unwrap them
add a multires modifier and a displacement modifier with a voronoi texture
add a Decimate modifier with "collapse" and "triangulate".

Mountains and Cliffs
Use separate Meshes to create them. Use Primitives like cubes and planes, loopcut them for even distribution and also use Multires modifiers

Sculpt the rough details
add a Decimate modifier with "collapse" and "triangulate"

Props like rocks, trees, buildings
Use primitives like cubes, cylinders and icospheres to create the basic shapes. Use separate meshes for different materials like treetrunks, treetops... and again use loopcuts + Multires on them. You can also join meshes with the same material.
Depending on the shape, man-made structures like houses don't necessarily need to be triangulated. It's a question of personal taste.
Materials
Depending on how "basic" your look should be you can use

simple color materials with or without specularity
also textures for more complex models with different colors, like black&white cows
specularity and translucency for glass, water, etc...

Compositing
It depends on the personal taste and which render engine you want to use. Blender Internal tends to produce harder lights and shadows by default. Since cycles allows more control over them it's much easier to adjust them to your liking.
Example
I slapped together a small demo (roughly 45 minutes) in which I used the above described technique. Some of the models like the tree trunk and the rocks were originally low-poly assets for a game.
The light setup is very basic, it's intended to show how to produce "hard" shadows in cycles. Set the the light source's size to 0 if you want to remove the rest of softness.

Instead of a simple diffuse color for the water material I chose a more glass-like shader.
I also left most of the used modifiers unassigned for you to reenact my steps.

The method I use is to create a plane with multiple subdivisions and then add a triangulate modifier.  After you add the modifier apply it and then sculpt your terrain.  You could use separate planes for different colors, but I just applied different materials to the separate parts of the plane.
Here are some renders I made using this method:

How did you created those spots?

Do you mean the grunge on the grass and mountains?  That was done in the post-processing stage.  I just overlayed a grunge texture using Photoshop.

No, I mean in the secont one

Those were also added in Photoshop.  I just found and image of the spots with a black background on google and used Photoshop to add them to the render.

Oh! Could you give me the link? I've been looking a long time for that type of images!

I think this is the one I used:  http://deko.lt/lab/tutorials/DustLight/DustLight_alpha.jpg  Just stick it in Photoshop and change the layer blending mode to Screen and it will take away the black.  The only problem is I do not know what the copyright is on the image, so don't sell anything image you make using it.  :)

Could you send me the edited image?
It's because I don't have photoshop


text:
Change Object Relative Position to Origin
Example:
I create a cube and change it's position to 0, 8, 0.
How do I make this new position its new origin?
I want to export it to Unity and manipulate the position, which is rendered very difficult because of the blender settings.

There are several ways of changing an object's origin to a specific place.

Place the 3D cursor where you want the origin of the object to be.  This can be done by either modifying it's position directly under the 3D Cursor roliout of the N toolbar in the 3D view, or by selecting something and pressing Shift+S > 3D Cursor to Selected.   Then select the object and hit CtrlShiftAlt+C > Origin to 3D Cursor.
You can set an object's origin to the world origin by applying its location with Ctrl+A > Apply Location.


text:
Wrapping flat artwork onto a sphere with no distortion to create a football
Apologies if this is a very dumb question but I don't even use blender at all but I'm hoping it will be a solution to problem I keep coming across. I get asked to design footballs so I need the ability to design flat artwork to supply factories as well as render a 3D model for an accurate visual. I must have the ability to create different panel shapes too so that all footballs aren't simply the common 32 panel ball for example.
Is this all possible with blender?

It seems that you are searching for UV unwrapping a mesh to map image onto 3d model.

Yes, you can model and texture a football in Blender with any shape you like.
The 32 panel standard ball is probably the easiest to accomplish, since there's a standard primitive (the Icosphere) that pretty much resembles it's shape.
Here is a tutorial explaining how to do it https://www.youtube.com/watch?v=AYC69tt-KMI
Other shapes can also be accomplished too, but it's process can be more or less involved depending on the complexity of the shape.
About texturing, as mentioned by Mr Zak what you need is probably UV Unwrapping, this can also be accomplished inside Blender. It is the process of "unfolding" or "flattening" an 3D geometry into a 2D shape so that an image texture can be mapped over it's surface as desired with minimal distortion.
Depending on how big your design is, or how much of the ball it covers unwrapping could be a very simple process. For a simple logo that sits only on a side of a ball a simple view-based direct projection could be enough. For designs that cover the whole ball it could be a more complex process.
Either way you could probably model a few different predefined football geometries with the most commonly used shapes, and unwrap them in the most convenient way to simplify the surface design. You could then use that UV layout as a template save it as an image or even export as vector using the SVG export addon (if you work on vector graphics design software) and reuse it whenever you need to design a ball for a specific geometry.
All you need to do then is import that layout into your graphic design application (Inkscape, GIMP, Photoshop, Illustrator, whatever) and draw over it so the parts of the design match the desired corresponding area in the ball surface.
The base 3D models can also be reused as asset libraries to easily render your designs whenever you need. You can even have a set of predefined files with your scene (grass, field, product studio, etc), material, and lighting setup all ready to render, and all you need to do is apply your new surface image texture to it and render your design. You only need to set it up once.


text:
Bmesh: how can I import custom vertex normals
I have a question concerning BMesh and custom vertex normals editing. At the moment I am writing a little blender importer for a custom data format and I am stuck with importing/manipulating custom vertex normals. I am using the bmesh module because I want to use it's functionalities before transforming the bmesh into a real mesh.
Can anyone tell me if it is possible to set the normals with bmesh? Do I need to import them with the Mesh module?
Thanks a lot in advance for any tipp!

probably related: http://blender.stackexchange.com/questions/32292/is-there-a-way-to-create-per-face-per-vertex-normals

might also have a look at this answer

thanks. I will most definately have to do it with the mesh module instead of bmesh. Bmesh just offers so much more functionality to work with...

I believe since Blender 2.74, this was made possible for the bpy Mesh type. You can use the mesh normals_split_custom_set method to do this.
In this example, I only have per-vertex normals so I create a new list with one normal corresponding to each loop.
normals2 = []
for l in mesh.loops:
    normals2.append(normals[l.vertex_index])
mesh.normals_split_custom_set(normals2)
mesh.use_auto_smooth = True

Note that auto smooth needs to be enabled for this to work.
In my case, I could have used the normals_split_custom_set_from_vertices method, and passed in normals directly.

Yes, thats what I am doing now. Thanks. I WANT to use the Bmesh module though because of it's functionalities. Vertex normals are not supported (yet) though - it turns out - and the information gets lost if you transform the mesh to bmesh.

It is probably as simple as
mesh = obj.data
bm = bmesh.new()
bm.from_mesh(mesh)

bm.verts[i].normal = [ x,y,z]

bm.to_mesh(mesh)

Thanks for your suggestion, sadly it's not that easy since I need to set the normals per face loop (one vertex can habe multiple normals, which is the whole purpose of split normals)

The few things I have read imply that blender does not fully support per-face vertex normals yet.  I don't know if it is on the roadmap.

And even setting per-vertex normals seems to be ineffective.  You can even do obj.data.vertices[0].normal = [1,0,0] and the value will be reset to default if you go in and out of edit mode.


text:
How do I create four circular copies in edit mode?
I am creating this simple windmill model for a tutorial:

I have created one blade. What is the most efficient method to create the other three spaced 90 degrees apart around the main shaft? Array modifiers only work in Object mode correct? I see two ways:

Create the blade as a separate object and in object mode use the array modifier.
Manually copy/paste 3 more versions of the blade and manually position each.

Appreciate any thoughts.

Array modifier will be harder to tune. Copy/Paste can be easy if you set your cursor as pivot point at the good location (and you can alt+D in object mode so that you can rework one blade to impact them all). Third possibility is to use duplifaces (but not so interesting as there is only 4 blades). Also you can spin the blade in edit mode.

Related - http://blender.stackexchange.com/questions/6023/how-to-make-a-circular-array-using-offset-object-as-center. I don't think Array is complex for this situation, it's just snapping cursor to somewhere around center of the tube and adding an empty.

Also - http://blender.stackexchange.com/questions/31961/how-to-distribute-objects-in-a-circular-pattern-on-a-surface-radial-array-pola and http://blender.stackexchange.com/questions/23659/how-to-use-array-to-create-circular-array-without-spiralling

In the edit mode as you have made 1 blade and you want to. Set the 3d Cursor. Make duplicate Shift+D of the 1st part and do not move it and just press r and type 90 and the 2nd blade is set same way repeat for 3rd and 4th blade .

Go to object mode, set the 3D cursor to the center of the shaft by selecting the shaft, hit CTRL + SHIFT + ALT + C and set origin at center of mass. Then, hit SHIFT + S and click cursor to selected. Now, go back to the blade, go in edit mode select everything. Set the Pivot point (button located next to 'Mode' and 'Material' buttons in the 3D view, and choose 3D cursor. Last, hit CTRL + D to duplicate, hit R and then the axis it should go around, type 90 and ENTER. Then keep hitting SHIFT + R to redo the that duplication until you have the right amount of blades.

An easy way to automate this would be with the 'Repeat Last' command, SHIFT + R

Select the faces and hit SHIFT + D to start the duplicate faces tool
Without doing anything else hit R to rotate them the desired amount manually or in this case just type 90 (you can see where you're typing in the upper left corner)
Hit ENTER to complete the command and you'll see the 'Add Duplicate' dialog box in the lower left. You can also change the angle in that dialog box now.
With the dialog box still up, hit SHIFT + R to redo the duplication + rotation as many times as necessary. You can even hold it down to repeat many times!


text:
Texture distorted on UV unwrapped face
I am not sure what I did here. I have unwrapped this face and in the UV editor you can see that it is covering the entire thatch part of the quad but there appears to be an invisible diagonal line distorting the texture:

What's going on here? There are no additional vertices on the face that I can see.

Related - http://blender.stackexchange.com/questions/3156/how-to-map-a-texture-to-a-distorted-quad

The diagonal line is caused by unproperly scaled UV coordinates for the face. Original face resembles trapeze where the bottom parallel line is longer and the top one - shorter. In order to avoid any distortions of the texture the UV map for that rectangle should also have those forms - one side shorter than the parallel one.
If scaling unchanged UV map you'll notice how it distorts:

The easiest solution would be to unwrap again in order to restore original proportions. However you can scale those edges on the map to roughly respect original ratio as well.

OK I got ya. The face was originally a trapezoid and when I reset the UV's it changed to a square. I selected that face, reset the UV and did a Smart UV Project to get the original shape back. Thanks!  http://imgur.com/a/qfDXQ


text:
Question on modelling a sword
I'm modelling my first sword for practice, and have a question regarding where the grip meets the guard:

In this model the grip geometry intersects with the guard and "goes inside" the guard:

What is the bets thing to do here? Do I just leave it the way it is or should I delete all the internal faces/vertices of the grip and join the guard and grip vertices together to make a mesh without any internal geometry? In terms of UV unwrapping the completely merged mesh would be better but it's a longer modelling process. Appreciate any advice.

Loop Tools Add on

Image above.
Top Ortho.  Four stages of Model.

Cube Scaled with Loop Cuts.
Remove N by N by 2 Sides vertices
Loop Tools add on ... Circle .. No hand editing to achieve circle.
Extrude ...indicated by arrow
Add more loop cuts and shape to suit needs

User Persp

Same model showing connectivity and extruded cylinder shape.

Shrink Wrap

Shrink Wrap and Apply.
Blender always has multiple ways to achieve goals.
2 Separate objects which can be joined or have parent child relationship
Above upper right quadrant (Front Ortho View).  Left 2 objects are not visibly connected, gap exists.  Right 2 objects are visibly connected, because  Shrinkwrap modifier has been placed on the bottom vertices of top object.  Bottom vertices are in a vertex group referenced in the Shrink Wrap Modifier.
User Persp view show details of vertices moved to Nearest Surface point.  No hand editing to move individual vertex points. Vertex Density impacts results.
You may press the [Apply] button.  You may [Join] two Meshes.

Perfect, exactly what I was looking for. Thank you!

That would depend on what you intended its use for.
If for the sake of mock up design then either option is fine. I'd recommend trying whichever you're less comfortable with if only to test your ability with blender.
If you intend to break or damage the sword at some later point, then keeping it seperate is more practical.
IF seperate - You should adjust the contours of the grip so that they match the contours of the gaurd (utilizing Edge/Vertex Selection)

(You should add the tang too(B) if that is the case)


text:
How do I create multiple UV maps for use in UE4?
I'm new to Blender and UE4, but my goal is to create a mesh in Unreal Engine that I can assign two different materials to. For example, I would unwrap three faces of a cube, assign that to the default UV map in Blender. Then create another UV map in Blender on that object and unwrap the other three faces and assign them to the second UV map I created.
Once this is done I would import the .fbx into UE4 and then be able to drag & drop two unique materials on to the cube mesh object, and each material in UE4 would only be assigned to 3 of the cube faces.
The problem I am facing is how do I "assign" the three unwrapped faces to a particular UV channel?
Is this the right way to do this?

My answer on multiple UV maps may help you.

Thanks David. I'm not sure what I am doing wrong but when I change the active UV map from the UV Maps pane like you do in your example, the UV maps don't "stick". What I mean is, for example, if I unwrap 2 faces into the first channel, then click on the second channel and unwrap 4 faces, when I click back on the first channel I see the four faces, not the two I unwrapped. I'm not sure how to "save" the unwrapped mesh into that slot. I thought it would stick when the unwrap procedure was executed but it doesn't. Using v2.77.

OK so my original assumption was incorrect. I was trying to set the mesh up so I could apply two (or more) different materials to the static mesh in UE4. I thought that I would need to create two UV maps and then somehow use those in UE4, but the answer is much simpler:

Go to Edit mode for your object in Blender
Unwrap the mesh
Add additional material slots using the '+' button
Highlight the faces on your mesh that you want assigned to this material channel and then click Assign

Do this for all faces in the mesh, assigning each face to a material slot.

Export the fbx file and import into UE4.
In UE4 you will see additional material slots allocated to your static mesh. You can then drag and drop materials from your UE4 library onto the mesh.

Additional tips:

I left the texture channels blank in Blender for each material slot as I was going to use materials (that already have textures assigned to them) that already resided in UE4. If you were to assign a texture to the material slot in Blender then that texture would be exported to UE4 inside the fbx file and appear alongside your mesh object in the Content Browser.
If a face appears missing on your mesh, it is likely that the face normal has been flipped during editing. Go back into edit mode in Blender, highlight the problem face, CTRL + F to bring up the Face menu, and Flip Normal. Re-export the fbx, right click the asset in UE4 and Re-import.

You can also display all face normals in edit mode by clicking Display Face Normals in the Mesh Display pane:

Hope this helps someone in the future.


text:
Set default UV Image Editor display mode
Is there a way to change the default display of the UV editor? What I mean is when I split the screen and go to UV/Image Editor the Render Result is the default display mode, and I have to click the X to get to the blank image:

After x-ing out:

I would like to set the default display mode to be a new, blank image. Possible?

You could try open new file, clear that Render Result in UV / Image editor window and save user prefs.

This worked perfectly and made complete sense after I read it. Thank you.

Open new file, clear that Render Result in the UV / Image editor window and save User Prefences. Note that the latter will overwrite previously saved settings so you might want to backup them first.


text:
Is there a way to limit influences-per-vertex weighting?
Apparently there is a limit on how many vertices can be influenced on skeletal meshes on Android and that limit is 4.
Is there a way to set limits for bone-vertices influence in Blender so that when I do weight painting (or better yet assigning weights automatically when parenting mesh to armature) that limit is not exceeded ?
Thanks

In weight paint mode, there are weight tools in the tools panel on left. one of them is "limit total" which corresponds to what you want. But AFAIK all this have to be done manually

According to this, you can use cleanup to set a max number of influences.
https://docs.blender.org/manual/en/latest/scene_layout/object/editing/cleanup.html


text:
How can I get particles to emit with a rotation based off of the rotation of the face it was emitted from
I'm relatively new to blender and I would like to get this hexagon model to emit rotated toward the face it was emitted from. Here's what I have,
If you are confused about something I said, I can clarify some more.

In ParticleSettings for the emitter, turn on Rotation and set Initial Rotation to Normal. In my example I also set gravity to 0, as shown, as it seems you did also.
Orient your particle object in edit mode in a way that its local y-axis points to the forward direction you like it to have. You can see its local axis by turning on Axis in Display tab of the object properties for the particle object.

You might also want to have a look over the manual section on particle rotation.

It doesn't seem to be working for me, I must be making a stupid mistake somewhere, here's a picture of my blender following what you did, and thanks a lot for putting up with me and my lack of knowledge of blender!

Sorry it didn't work for you, I hope I didn't miss anything. I can't see anything wrong in your image. I edited my answer and added my blend file so you can download it and have a look.

Ah, my problem seems to be that I had grid selected, and it doesn't work the same way with rotation. Thanks for providing the .blend file for me to look at!