text:
File format changes from MPEG to .DVD
I have an issue with rendering an animation. I set the file format to mpeg but when it finishes rendering the output file that it gives me is '.dvd'. How do I solve this problem?

Open up the Encoding panel and choose h264 from the Presets dropdown in order to encode it as mpg file.

@cegaton Oops misread the question... You are right MPEG-2 always results in .dvd - renaming also works here.

I prefer to use Xvid under output and Xvid also under encoding that works better for me

Here some steps that you can follow:

Set the video format to FFMPEG
Go in the Encoding drop-down just below the color settings in the bottom-left corner of the drop-down
In the Video drop-down, in the Video Codec settings, choose the H.264 settings
( I think your problem is that there might be a default setting in Blender)
Just to be safe Double-Check the Steps.
Check if there is any bug, or consult a video tutorial on how to report one

I know I'm a little late to the party, but this is more for anybody else that has this problem and stumbles upon this in the future. I am also new to blender and tried to render as an .mpeg file. I also got the .dvd file problem. Here's what I did (there may be better ways, but this is just what I came up with on the spot(it worked)). I'm using a Windows 10 computer.

https://www.youtube.com/watch?v=CC1rLDwHaY0
(shows how to change file type, pretty sure there are tutorials for any other OS you might have to do this) If this works, skip to: step 5.
If changing to mp4 doesn't work, load the original file into Movie Maker.
Add any audio you may have had when rendering.
Then follow this vid: https://www.youtube.com/watch?v=8QWbiTtaK_E (now it should show up as an mp4 file)
Now use this converter and it should be done: http://www.convertfiles.com/convert/video/MP4-to-MPEG.html

I know it's not fun, but this is how I did it for a small competition project. Hope it helps.

Howdy Anonymous.  Welcome to Blender Stack Exchange.  https://meta.stackexchange.com/questions/8231/are-answers-that-just-contain-links-elsewhere-really-good-answers  Can you please make your answer here complete?


text:
Short-cut for "cursor to selected"
Can I program a direct short-cut (keyboard) for the functions "cursor to selected" and "selection to cursor"? Couldn't find them under the User Preference/Input tab. I know they're under Shift+S, but then I still have to select from the pull-down menu, and that is too cumbersome.

Perhaps you already know this, but for pulldowns it often helps to use the menu accelerators. You can use the number row to select entries in order (1 for the top entry, 2 for the second, 3 for the third, etc.). Or you can use the letter key corresponding to the underlined letter in the entry you want. For example both Shift S 2 and Shift S T will snap the selection to the cursor.

@gandalf3♦ I answered similar question some time ago and presented the same solution (http://blender.stackexchange.com/questions/36894/how-to-assign-a-keyboard-shortcut-for-a-mesh-selection-mode). The answer got 'duplicate' status and was closed, but I think it shouldn't be (cause it shows different solution from the one that NᴏᴠɪᴄᴇIɴDɪsɢᴜɪsᴇ aka HATMAN presented). Could you please reopen it?

Bring up your snap menu with Shift+S.
Hover your mouse over 'cursor to selected', and then click on it with the RMB . You will see an option to either add or change the keyboard shortcut.
Hover your mouse over the box that appears, (it should tell you to press a key), and then press the desired shortcut one key at a time while still holding them down to create your new shortcut.
Make sure to save your new shortcut as defaults by going to user preferences by pressing Ctrl+Alt+U,  and then save user settings.

In 2.8 and later, you can add a new shortcut to Quick Favorites which will give you a small menu with the keyboard shortcut Q
Simply RMB  and select Add to Quick Favorites from the choices that appear.

Gifs may make your answers clearer. Read here how to create them: http://meta.blender.stackexchange.com/questions/963/what-is-the-process-for-creating-gifs-for-questions-and-answers

Make a user-defined keyboard shortcut.
I sacrifice the default shortcut for To Sphere (shift+alt+S) and made it bpy.ops.view3d.snap_cursor_to_selected() instead.

You don't need to sacrifice, there is "Add new..." button visible

source: Stack Exchange

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

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

sort: votes


text:
UV Texture Font
I've got a simple render of a keyboard and am wanting to add the alphas/modifiers (CTRL/SHIFT etc.) to the render.
I do the following:
-> UV Unwrap the 'tops' of my caps
-> Export the mapping to *.png, edit the *.png and add the wording, for example 'SHIFT'
-> Create an image texture (im using Cycles render)
-> Render the image
I end up with 'blurry' text:

Please see here for more info:
http://blenderartists.org/forum/showthread.php?386617-UV-Texture-Font

What is the nodes setup used, particulalry mask that you made to make letters appear ?

I'll try get the formatting right:
Color
Linear
Flat
Repeat
Single Image
UV Map
Unchecked From Dupli
UVMap

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


text:
Object colours disappear when I turn on 'Texture Solid'
I have imported a build-set roblox roblox studio into blender. It looks like this:

But when I click the textured solid, it looks like this and all of the colours in the background have dissappeared:

Is there any possible way that the colours in the background (the door & bed) still keep their colour, but also te textures are shown with it?

The colors will appear once you render the picture. I had this same problem.
Go under System Preferences > Input , and look for Emulate Keyboard (turn this on temporarily). Now exit out of that and press 0 on the keyboard. The exterior should go grey and show a frame. use Shift + F to navigate and find your desired camera angle then click Render on the side of the screen in the render settings menu.

You should switch to GLSL and try Material mode instead of Textures.
Basicly your background objects do not have any textures.
What your see in Solid mode is the color of the shader.
I'm not really used to blender render but in Cycles:
Texture Mode:
Will display the latest selected texture node / Slot.
Material Mode:
Tries to display maps mixes properly (allowing texture layering right in Blender's viewport)


text:
How can I add an 'IK Solver' constraint?
I'm just trying to do the beginners tutorial about creating a character and animation of it, it's the well known gingerbread man, but it is written for blender 2.4 and actual version is 2.73 and there are a lot of things which have changed. I have already created the model and just on the way to arrange the bones. I have weight-painted the arms and chest and now I'm in that part to get the feet working
Here is the actual tutorial page I'm working on:
 http://wiki.blender.org/index.php/Doc:2.4/Tutorials/Animation/BSoD/Character_Animation/Lower_body_armature
In pose mode I should add an 'IK Solver' but I cannot find where to add such an constraint and even when I look into the different constraints I cannot find an 'IK Solver'. So this now is the point where I don't know how to go further on, because without this I cannot do entries into that panel and so I cannot go on with finishing the armature and testing it.
Anyone knows how this is to be handled using blender 2.73?
Any help would be appreciated.
BTW sorry for my English as I'm from Austria.
Thx in before for any advice.

What you're looking for is the Inverse Kinematics (IK) Constraint you find it in the properties while in Pose Mode.

You might also be interested in a more recent version of this tutorial: http://wiki.blender.org/index.php/Doc:2.6/Manual/Your_First_Animation

Constraints
IK

Thx for your help. But I' searching for the 'IK Solver' The Gingerman already has an Inverse Kinematics added earlier in that Tutorial but now the text days that I have to add an 'IK Solver'

sorry, input was just broken the exact Text in the Tutorial is :

@JonnyPoet The UI has changed since version 2.4 there is no longer an option/constraint called IK-solver (which refers to a math-component that does the calculations for IK).

' the exact Text in the Tutorial is :     Switch to Pose mode (⇆ Tab).
Select the lower_leg.l bone.
Add an IK Solver to lower_leg.l. To do this, in the Constraints panel under the Edit buttons click the Add Constraint button and choose IK Solver. This adds a constraint to the selected bone. Note that in the Constraints panel, there are now settings for the IK Solver constraint.
The lower_leg.l IK Solver constraint.

Thx stacker for your response, but how to finish this project?

You could either try to use the updated version of the tutorial (link is in the post above) or check my answer here: http://blender.stackexchange.com/questions/24181/best-way-to-animate-a-robot-turret (it includes a downloadable .blend) If you actually need to use version 2.4 I've no idea.

You could also upload your .blend here: http://blend-exchange.giantcowfilms.com/ and link it to your question.

I have just tried what you showed in your picture. Yea to add an Inverse Kinematics was the correct way. !!! Great help!!

@JonnyPoet You could mark the post then as answered by clicking the checkmark, so other users know that it is solved.

Sorry, but I would like to sign this post as answered. but cannot find any 'checkmark to do that. Additional how can I rate the persons who helped me?

@JonnyPoet See http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work you can upvote answers as soon you get 50 reputation points.

Thx for answering all that questions. It has helped a lot


text:
Transform Rotation into location problem
I have a gear and it needs to rotate two full turns (720 degrees) to open a door which should move up for a length of three blender units. The transform works for about 180 degrees then the door falls back to the start point.
There is no difference if I'm addressing the transform Rotation Constraint to the gear or if I'm using 'the door Open Empty' and rotating that object.
Anyone know a solution?

Add driver to the location property with right-clicking:

Setup the driver like this:

Now the Empty's Z rotation controls the object location.

Thx for answering. I have tried to do what you suggested but as I'm pretty new there I run into problems.a) where to add the driver? I tried to add it to the door. So I clicked to the location property of the door (which should change its location) and added a single driver. But where to find the added driver?  The Z coordinate changes its color to pink, nothing ele I could not find the drivers properties anywhere. Additional : The door open Empty rotates  along the Y axis . So is there any change in the above code?

@JonnyPoet You can find drivers in Graph Editor > Mode: Drivers (its F-Curve normally) > open properties panel (N) > select driven channel on left, edit on right. If you want the Y axis then edit the Path for property to :rotation_euler.y

@JonnyPoet If you are new to blender it's best to watch some video-tutorials for the basics, it's harder to explain in text, easier to watch

I have already watched all the videos from Neal Hirsig chapter 1 to 12 but there is nothing about drivers and while it looks very clear in his video, in truth the Copy Rotation Constrain as well as the Transform Constrain do not work properly. But I'll look to find some videos about drivers.  BTW Does anyone know in which language this constraints are written? I want to have a look on the code, its maybe an easy small problem. IMHO Mathematical it seems to be a problem of polar coordinate quadrants calculation. I'm a C# programmer and would like to help when needed.

@JonnyPoet Constraints and also modifiers are C++, Blender itself is mix between C and C++ with addons and some UI being python. The code should be online and patchable. You can submit a patch here: https://developer.blender.org/ You can also join the blender IRC channel and ask devs if the behavior is intentional or not. I agree that blender needs to improve in lots of areas..

Thx a lot for this information. I'll have a look to get IRC connection to the developers team. BTW I have found a easy attempt now. I changed the  Transform constraint to the 'Open door Empty' object properties which is turning the gears and as a target I have  chosen the door and instead of using Y rotation transformed to Door location now I'm transforming door location into the Y rotation of the gears and this works without any troubles, But I 'll also try your suggestion, because it will be very helpful to learn more about 'how to do things' Thx a lot again

I first had to change the user preverences to allow ' auto execution. I tried your code it works great. I have changed '3180 rot / pi /  720 to 3*rot / pi / 4 and its the same because 180 / 720 = 1/4  But your formula has helped to understand the transformation  formula now


text:
Minimum number of samples for the Branched Path Tracing
If I turn on "Branched Path Tracing" in Cycles/Render Properties/Sampling, then I can set the number of diffuse, glossy, transmission, AO, mesh light, subsurface and volume samples. What bothers me is that the minimum number of samples is for each of them one, and not zero. As far as I understand it, this forces me to waste rays on things I am not interested in.
For example, if I have no subsurface and volume scattering in my scene, then I should set these values to zero, right?

EDIT WITH MORE EXPLANATION: Also note that the number of subsurf rays is multiplied with the number of AA rays (as you can see bellow the controls in the "Total Samples"), so if I have 64 primary AA rays, then (as far as I understand) I am forced to use at least 64 subsurf rays, 64 volume rays etc, which is not so little, especially because I am interested in animations. And even if I do have subsurf materials, I might want to temporarily set the subsurf rays to zero in order to better understand their contribution or to save time while doing non-final renders.

AFAIK if you don't have any SSS in your scene, it can't render any SSS samples, so you're not wasting any time.  If you want to disable all of a certain type of shader I think you'd have to manually unplug it in all your node trees.

@PGmath This sounds plausible, although I still think it would be better if we could set it to 0. BTW in Arnold you can set these settings to 0.

Cycles generates each sample type as different "images" which are then combined into the final render. Each of these passes can be made available in the render layer settings which can then be used within the compositor.
While cycles could be made to work with one or more of these passes being missing, there is no benefit to doing it. A simple scene with one sample of each pass can be rendered in less than a second. It is only when you are rendering with hundreds or thousands of samples that a pass adds any time to the render, having one sample of a type you don't use can only add less than a second to your render and the couple of MB that could be saved in memory use will not make a difference on any recent computer.
AA is Anti-Aliasing, it softens the edges to hide the jagged edges seen from sudden colour changes. 64 AA samples is high, the AA samples defines how many neighbouring pixels are used to determine the final pixel colour and as you noticed it multiplies the final sample count.
If you want to know the effect of each pass then enable them all in the render layers and mix them in the compositor where you can turn each on/off to see how they effect the final image. CGCookie has a fundamentals of compositing series that explains how to do this.

Sorry, I can't follow. If I have no subsurface materials in my scene, then the subsurf passes are black anyway, so why waste any rays on them? I don't want them to be missing, I want the black image to be calculated faster. Also note that I edited my question to explain that the minimum number of rays is actually higher than one.

About the edited answer: I know what AA is, and I might need that high number for noise-free motion blur or depth of field. And I know that there are workarounds, but it bothers me that I cannot do it the easy way. I am considering creating a bug report for Blender, but I wanted to make sure that my understanding is correct. I upvoted your answer, but I cannot accept it as long as it does not answer my question: is there any real reason for enforcing a minimum number of rays?

Path Tracing
When a camera ray hits a surface, it has a material at that position. The material is usually made of different Shaders that got mixed together. One ray will leave the surface. If you have a Mix Shader combining Diffuse and Glossy set to 0.5, there will be a 50% chance of sending a Diffuse ray and 50% chance of sending a Glossy ray. The direction the ray will take is also calculated randomly. With increased number of samples, these numbers will even out and create a smooth surface having 50% Glossy and 50% Diffuse. If the material doesn't contain a Transparent Shader, no transmission rays will be sent.
Branched Path Tracing
Let's say you have set Diffuse samples to 2 and Glossy to 4 and Transmission to 3 in your render settings. When the camera ray hits the surface, it will send out two Glossy rays (in the same random way as before) and four Diffuse rays. Their values will then be mixed together according to the Mix Shader. Since your material doesn't have a Transparent node, none of the six Transmission rays will be sent out, leaving the pass image black at that position. In the end, your Transmission Samples number won't affect render time on that specific material in a noticeable way.
Experiment
I set up a simple test scene with a Material having 50% red Diffuse and 50% white Glossy on all objects (a plane and the default cube).

With 1 sample for Diffuse, 8 for Glossy, 1 for the rest and 4 AA samples, it takes me 31 seconds to render. Setting all values except Diffuse and Glossy to 128, it renders for 32 seconds.
What would happen if we set the values to zero?
Let's say we set the amount of Transmission samples to zero. If our material is not transparent, the value can be set to any number, so setting it to zero doesn't make a difference. But what if our material contains, let's say, a Glass Shader?
Blender won't send any transmission rays but will need some values to calculate the final material color. This is the same as sending a ray and then killing it immediately. So we can assume, that the transmission ray would return a black value. The transmission pass image would remain black, as wished. The glass would probably look very ugly like some glossy mixed with black emission.
Why is 1 the minimum?
I don't know. To find out, find the developer who made this feature or worked on it and ask him. You can start your search here. Possible reasons could be (just me guessing):

Nobody thought it could be useful to someone, someday. Since having the ability to setting it to zero caused other problems (like, unexperienced users using it and getting black renders)
Technical reasons. Perhaps it is more complicated than that to handle missing passes
Time: Due to the reasons above it was not worth the effort implementing

Workaround
If you want to work around the issue and get the possibility to disable passes, I found two (relatively) simple ways. A doesn't speed up render time, but should at least be accurate if you don't use volumetrics; B speeds up rendering, but requires more work to make accurate.
A - Compositor
Easy to set up, doesn't speed up render time. See here for how to combine them. Note, that you will have to separate the volumetric pass or you'll use the volumetrics if you are using them. Further information and node group download
B - Material node groups
Create a node group per shader type that allows you to disable it by mixing it with an Emission shader. Here's the node group for a new Glass Shader:

Create a node group for each Shader you are using and use them all the time. By setting the mix factor to 0 or 1, you can enable or disable certain shaders. This will do almost the same as setting the samples count for this ray type to 0. The difference is that one works on a per ray-type basis, the other on a per-shader basis. If you want to remove only transmission rays from a Glass Shader, you'll need to create your own one using Glossy and Refraction shaders.
This method shouldn't increase render time normally because node groups and Mix nodes with fac 0 or 1 get optimized automatically during compilation. If you disable some shaders, computation will be faster because Emission Shaders are fast to compute.

Upvoted, because it is an interesting experiment, but not accepted, because I still don't understand why can't we set 0 as minimum number in order to disable a certain type of shader without messing with blending modes. But it is good to see that performance does not suffer because of the extra rays.

I still haven't an answer to your question, but I added further information and some workarounds.


text:
How can a light cone (volumetric) be setup with cycles?
I tried to reproduce the results from the Docs on volumetric lighting unfortunately the video link is broken. And I might have overlooked some related settings.
The spot light is barley visible on the ground.

Increasing the Density of the Volume Scatter Node darkens the sky texture but leads to some light cone from the car's headlight. (only 10 samples in preview).

Which settings do I need to change or should I try a different approach?
Integrator settings are default and spotlight settings were copied from the example found in the docs.
Related:

Creating volumetric lighting (crepuscular rays) in Cycles (pre 2.7)
How do I properly set up a spotlight cone? (BI only)

Related: http://blender.stackexchange.com/q/13802/599. I wouldn't use environment volumetrics. And if you are aiming for a non-photo realistic type result, I wouldn't use scattering either, maybe emission mixed with transparent based on camera ray instead.

@gandalf3 thanks, I will either try the layer method (as suggested by cegaton) or  (depending on render time) the fake cones with emitting transparent material as you suggested.

In real life these effects are caused by particles in the air such as water droplets, which reflect and scatter light. Usually these effects are only clearly visible when there is not a lot of other light sources, such as at night.
In your case it looks like you are going for a more non-photorealistic look, so you may want to give up on trying to simulate the scattering and just use an emission shader.

Add some cones to act as the light sources.
Note that they shouldn't intersect or contain non-manifold goemtry. If you want to intersect them, use a boolean modifier or a remesh modifier to make the final geometry intersection free.

Add some nodes with a horizontal gradient to fade the intensity of the emitted light out before the hard edge at the end of the cone. Note that this particular mapping setup assumes that the origin of the cone is at the point, and that the rotation is not applied.

In this example I also made it so the cone material doesn't illuminate other objects, as I wanted to do the illumination only with spot lamps to further reduce noise. The last mix shader is optional.

There are some limitations, for instance there are no volumetric shadows. But not too bad for converging in about 20 samples :)

I tried to use your nodes, but the result is bad: http://s04.radikal.ru/i177/1506/7c/a07260e49a61.png. Can you help me? What I'm doing wrong?

@Juliya That's because this is a completely faked method, which will only really work in this particular case (npr car headlights or similar). To get more complicated things like volumetric shadows you'll have to do it properly. See http://blender.stackexchange.com/q/8001/599 and http://blender.stackexchange.com/q/13802/599

@gandalf3 why not let the cone scatter and absorb, and light it externally with a spot? It might take longer, but it'll also do a better job approximating real atmospheric volumetrics.

@PythonNut It would, but as you said it would take (rather a lot) longer. For this rather stylized look it seems a little overkill (but that's up to the OP)

This is one of the few lighting based solutions I've seen that seem to actually clean up a render.

Even though this question was asked some time ago, I feel like I need to share a way I have found that simplifies this process a ton and gets the effect I feel you want.
I first created a spot lamp (in place of your headlights) and created a cube (but you can use any solid mesh).  I scaled the cube way up so that it covered up most of the spot lamp.  Then I scaled the top and bottom so that it fit the cone of light better.

Then I created a new 'page' and made it a node editor.  I then gave the cube a new material and clicked the "use nodes" button.

Next I deleted the Diffuse Shader so that just the Material Output node remained.

Finally, you add a Volume Scatter node by pressing Shift+A and searching for "volume scatter".  Once that is in, connect the Volume output on the Volume Scatter node to the Volume input on the Material Output node.

And you're done!  You can play with the density to your liking. I usually bring it down from 1 to .3 or lower.
This is a pretty big setup so I brought the brightness of the spot lamp to 200.  Unless your cars are absolutely massive, this should be more than enough to give that light cone effect.

The light near the top of the render is the spot lamp.
These are the settings that I would have if I were doing what you are/were doing: density at .08 and shape the cone around where the light actually shines so that you don't get that foggy look.

Congrats, you've just created a light cone in Cycles Render!

Nice first answer. Welcome to BSE. The only part I would change is where you go into detail about opening the node editor. That screen shot is really not needed.


text:
how to display overall dimensions for furniture

Is there a way to display a furniture design’s overall dimensions in Blender 3D for the purpose of presentation?  Please see attachment for visual.
When I import a wrl file into Blender, the furniture design consists of many parts.  The only way I know how to get the bounding box for the entire furniture is by joining all parts.  However, there seems to be no way to get the bounding box to illustrate its dimensions.  In Solidworks, the bound box can display dimensions.  Is there a similar function in Blender 3D?  Thank you very much!

In your specific case, the MeasureIt addon makes sense.
However, there are also different ways to measure stuff inside Blender UI.

Measure Tool (length and angles, set by mouse drag)
Measurement Overlay (measurement of selected geometry, like bounding boxes)

Thank you so much for your answer!  I did not know about "Edge Length" under viewport overlays.  But since the furniture designs I work with consist of many parts, "Edge Length" displays the dimensions for every single part,  enabling "Edge Length" led to an undecipherable cluster of numbers.  I will post my follow-up question where I can post photos for visual.

Looks like there is an addon called "MeasureIt Tools" that comes built in to Blender, you just need to enable it in the add-ons section of the preferences. Check this video out.
https://www.youtube.com/watch?v=R0jCdCoaRvs
Los

Thank you very much.  I will post a follow-up question with photos attached for visual.

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


text:
Matching point locations: Relative translation, preserving surrounding geometry
How can I move the tip of the pyramid so that it sits at the top of Suzanne's ear (pictured below, the noted point is highlighted)?

The objects and their origins need to stay the same.
If all of the pictured geometry were part of one object, and #1 was not a requirement, how could this be achieved? (If this were a mesh level transformation instead of an object level transformation)

Multiple objects
This can be done with a combination of transform snapping and 3D cursor snapping.

Snap the cursor the the point vertex by selecting it in edit mode (↹ Tab) and pressing ⇧ ShiftS> Cursor to selected:

Set the pivot point to 3D cursor (.)
Set the snap element to vertex and the snap target to Center in 3D view > Header:

In object mode, grab the pointer object and move it over the target vertex while holding ⎈ Ctrl:

Single mesh
If everything is in the same mesh, you don't even need to use the 3D cursor:

Select the geometry you want to move, making sure the vertex on the tip is active (last selected, appears white):

Set the snap target to Active:

Snap away by holding ⎈ Ctrl.

Note that you can also enable snapping without holding ⎈ Ctrl by clicking the magnet icon in 3D view > header, then things will snap by default and holding ⎈ Ctrl will make them not snap.


text:
Lining edges up: Make features collinear, preserving surrounding geometry
How can I make the leading edge of the left wedge collinear with (so that the edges lie within the same line) the leading edge of the right wedge (pictured below, edges highlighted)?

The objects and their origins need to stay the same.
If all of the pictured geometry were part of one object, and #1 was not a requirement, how could this be achieved? (If this were a mesh level transformation instead of an object level transformation)

Multiple objects
There are a couple ways I can think of. One way is to use custom transform orientations.

In edit mode (↹ Tab), select the edge that you want to align the object to and press ⎈ Ctrl⎇ AltSpace to create a new transform orientation.
The manipulator widget should align to the edge and you should see the selected transform orientation switch to the new custom one in 3D view > header:

In object mode, select the object you wish to align and press Align to transform orientation in 3D view > Header > Object > Transform:

Your object's local X Y and Z axes will be aligned to the active transform orientation. This is probably not exactly what you want. In your case, since you just want to adjust the rotation of the first object around the Z, set the rotation along the other two axes to 0:

Now we are closer, but still off by 90° around the Z. To fix this, just add 90:

Single mesh
You might be able to use custom transform orientations here too, but here's a different way just to mix it up:

What I did in the gif:

Snap one vertex on the transforming edge to a vertex on the target edge.
Snap the 3D cursor to the vertex which was just snapped to (⇧ ShiftS> cursor to selection)
Set the pivot to the 3D cursor (.)
Set the snapping target to edge and rotate the mesh (R) until it snaps into place.

You should be able to apply this approach to multiple objects too.


text:
How can toolbar transparency be modified?
Transparent toolbar functionality was released in 2.66, how do I enable transparent toolbars and how can I modify how transparent they are?
Seen here:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability
I would like mine to resemble the toolbars shown in the screenshot, very low opacity.

Enable Region Overlap in CtrlAltU→ User Preferences → System:

To modify the transparency of the sidebars, change the Alpha value of User Preferences → Themes → 3D view → Region background:


text:
What is the fastest way to add vertices to a curve at a specific point?
For example, in inkscape you can double click to add a new control vertex:

Is there a way to do that in Blender?
The closest thing I have found so far is CtrlLMB, but it just adds an unconnected vertex under the cursor.
Is there a way to add a connected vertex at a specific point along the curve, preferably without deforming the curve?

@cegaton Yes, but it's not very fast (it requires selecting two vertices first). Is there a faster way?

I have written a bezier splitting functions and could hack it into a modal operator. Do you still need it?

@Leander I would still be very interested in a working implementation, yes. I don't need it right now though, so don't worry about hacking it together if you don't want to ;)

I'm ok doing this, it just something I can do to contribute to the open source project.

You can script this functionality with python and install it as an addon. I have created such a script.
Curve Edit Tools
Github download link
To use the addon, press I in the Edit Mode of a curve. You'll be prompted into a modal operation where you can slide a new control point along the curve.

The original answer is below, it doesn't cover all the features of the current addon, even the point sampling will be replaced soon. The revision history shows the old addon for 2.7x.

The first step is to import some modules.

bpy Interaction with Blenders data and operations
bgl Blenders OpenGL wrapper
blf Module for font drawing
numpy as np Matrix handling, used for mathematical vector operations
mathutils Use to create the mathutils.Vector

Create a Bezier class
A Cubic Bézier is a very simple mathematical construct.
It needs four points.

first control point.
first handle (right_handle)
second handle (left_handle of second point)
second control point

$$
b(t) = \sum_{i=0}^{3} \binom{3}{i} t^i (1-t)^{3-i} b_i \\
 = (1-t)^3 b_0 + 3t(1-t)^2 b_1 + 3t^2(1-t) b_2 + t^3 b_3 \\
 = (-b_0 + 3b_1 - 3b_2 + b_3)t^3 + (3b_0 - 6b_1 + 3b_2)t^2 + (-3b_0 + 3b_1)t + b_0, \quad t \in [0,1]
$$
The De Casteljau's algorithm illustrates how points on the curve are found. The formula takes a $t$ in $[0,1]$.

To split the curve at a specific $t$, we can use the method from this answer. Since we use numpy, we can use the points as points.
class CubicBezier(object):
    def __init__(self, points):
        self.points = np.array(points).astype(np.float32)

    def at(self, t):
        pt =  1 *        (1 - t)**3 * self.points[0]
        pt += 3 * t**1 * (1 - t)**2 * self.points[1]
        pt += 3 * t**2 * (1 - t)**1 * self.points[2]
        pt += 1 * t**3              * self.points[3]
        return pt

    def split(self, t):
        p1, p2, p3, p4 = self.points

        p12 = (p2-p1)*t+p1
        p23 = (p3-p2)*t+p2
        p34 = (p4-p3)*t+p3
        p123 = (p23-p12)*t+p12
        p234 = (p34-p23)*t+p23
        p1234 = (p234-p123)*t+p123

        return [p1,p12,p123,p1234,p234,p34,p4]

Next, we need to sample the point closest to the mouse position. Using this algorithm, pick discrete samples and convert them into the 2d region

Thats basically everything from the maths side, now just wrap it in a modal operator.
Here is an example of a modal operator drawing in the 3D View.

Wow, works like a charm, and a fantastic example of how to write a modal operator! Thanks! Have a "second upvote" :)

Should be much more UV! Thanks @Leander.

Bookmarked. Exemplary. So much to learn from just one answer.

@gandalf3 The influx of imaginary internet points has motivated me to improve the addon. I have now incorporated your main point: not having to select anything, before the insert. The selection of the splines is now more complex and has its settings in the user prefs. Comment, if there are segments of code, which I should explain. I admit, the code is not at all well documented or easy to read.

@Leander Fantastic, that speeds up the workflow a lot, thanks :D

insanely cool, thanks so much!

@gandalf3 Andrew Yang has updated the addon to 2.8 and I have done some refactoring.

According to the Blender documentation for Bezier curves and NURBS curves there is no way to add a new point between two existing points without using the subdivide mechanism (selecting two or more points on the curve, W, Subdivide.
I too wish that there were.  Perhaps sometime in the future.

That seems to be still true in 3.1. It's difficult to understand why you can add a vertex/control at any position for a curve in the Graph Editor but not in the 3D view. Surprising choice.

With the last vector in the curve selected, press E for Extrude.
Blender will produce a new vector and attach itself to the cursor. You can move the new vector and left-click to place it.

You're talking about a vertex, not a vector.


text:
Rigid body cubes exploding when on floor
So I followed Andrew Price's tutorial on making a realistic floor using bump maps, displacement maps, etc. I did it, everything turned out great, until I actually played my animation.
My cubes that were sitting happily on the floor violently exploded. I realized that I had to move the cube quite a bit above the plane so it would sit nicely on it without exploding.

Here's all the nodes and stuff

Is there a way I can get the cubes to sit on the floor without exploding?
Looks pretty weird just floating in the air like that.

Is it possible you could upload your .blend?

One easy solution is to add another plane which will be use only for collisions.

Turn off the rigid body on the floor you have now.
Add a new plane, and position it so that it is at (or sightly below) the top of the bumps on your original floor.
Add passive rigid body physics to the new plane.
Disable render of the collision only plane, by unticking the camera icon for it in the Outliner.


text:
Problem with Texture Opacity
I'm a complete beginner and I'm having some problems with my textures.
If you look at the image below, you can see that the texture appears to be transparent.

What can I do to make it look like the texture in the original image?
Blend File

Hi, can you upload a .blend file please? It's hard to tell whats going on with the screenshot you provided as it doesn't even show the textures panel.

Hello! Here is the File: http://www.file-upload.net/download-10412411/Hase.blend.html , Thank you!

I need the texture also. Use "File->External Data->Pack Into .blend" to pack the texture into your .blend file and then re-upload. Thanks

Ok, thx! http://www.file-upload.net/download-10412447/Hase.blend.html
Now i even know how that works :D thx

http://i.imgur.com/4hbJ3K2.png Thats the most actual result, without "calculate" set, but it still wont look 80% like that texture

I think that part is just the shading. You could try checking shadeless in the materials tab, but that gets rid of all shading. Make sure to accept A Radish's answer. It can be really annoying when you answer a question and the person asking it says it works but doesn't accept it.

You're spreading malware 'ADWARE/MultiPlug.Gen4' use http://blend-exchange.giantcowfilms.com/ or http://pasteall.org/blend/.

If it really is a transparency problem, which I'm not sure that it is, then all you have to do is uc-check the box that says Transparency under the materials tab.
However! the real problem lies within your Fresnel shading, where you have the ramp pushed aaaalll the way over to the right. you want some breathing space between the two pushey-guys or the reflective effects are super dramatic. You might also want to change Fresnel to lambert. Fresnel has effects go further without dissipation so I think that's your problem.

That's the diffuse shading, it's what makes the black shading come so quickly. I don't think it affects the texture. I could be wrong though. I use cycles more than BI.

oops, I thought that was his specs...

he has the Ramp checked,and set the defuse to fresnel  so this could be the reason

I still think that's what it is. the way he has it is... unnatural. i'll see if I can't fix my answer.

just set the deffuse to the default values :

here is what seems the problem uncheck this option

not-way-ahead of you... I just put Fresnel in. :( sorry. should I take it out?

@ARadish No this is more of a comment than an answer :)

Hello! Thank you, i tried that now, but nearly no option has an effect on that - I Use "general" instead of UV Map, is that a problem?

Simon! it's under the materials. not the textures. you can see it in your screenshot.

Yes! http://i.imgur.com/Om8kppr.png that didn't work, though. -.- i tried nearly every option, im not in that good mood to texturing in mostly Modeling Programs, dunno why -.- :D

i guess it just hates me (Everything belonging to texturing)

I never really get it

@SimonDülpers does the edit work for you ?

http://i.imgur.com/4hbJ3K2.png

Do you know some option / have an idea to make the original texture even more Shiny & Contrastful? i dont really know what im doing there, so if changing the Lamp settings / Change render options 7 Change Materiel or Texture options make it become like the original picture, pls let me know :)

Yes, it dit, now its not milky anymore

@SimonDülpers in the material under shading set emit to >0 value (0.2)

Thx, but i did not find that :( http://i.imgur.com/xkRj1Rg.png

@SimonDülpers here it is the image

http://prntscr.com/6g2rb2

Thy, but it makes no change!

http://prntscr.com/6g2rb2

@SimonDülpers you have checked 'shadeless' where you should change the value next to it 'emit' , and a side advice 'start using cycles it's way better and simpler'

Yess! Finally :o

i set up "shadeless" to the wrong material -.- :O :D thx!!

http://prntscr.com/6g2tuc Although, it looks a bit annoying now :D But big thx! i think because of that big trial and error and your help now, i get through that texture stuff soon, i think :D

@SimonDülpers just remember to try the Cycles render engine it is much simpler ( use nodes editor for material and texture)

What is it? :o Where do i find it ? :D Sorry i came from a map editor (Valve hammer Editor), but thats 14 Years back, now :O

@SimonDülpers here is a video and another one , and you should find more just in google


text:
What add-on license when license is not written in source code?
I have a question about add-ons' licenses.
There are many add-ons' source code without license.
I would like to know what license these source codes have.
I think these codes have GPL license, but there is no information about this.
Is it possible to revise or redistribute add-on written by someone?

To begin with, an add-on you find aren't different from any other code snippet you find online. So these general Q&A's apply:

What is the “default” software license?
Reusing open-source code that doesn’t specify a license

To answer the question:
When its not explicitly stated, you can't assume anything regarding the license of code you find.
(Blender related or not).
Contact the author and ask them to either...

include a license header of the source code(convention for all Blender's code).
include LICENSE file in the source code repository.(also valid but can make tracking down the license harder if files are re-arranged or re-used between projects).

Doing so will save others this hassle in the future.

Note that even in the case where the license is open-source and compatible with Blender, you may want to know the copyright holder(s) later on, especially if this ends up being used in larger projects.

Really? I've heard that all addon code must be GNU GPL. Bundled content like textures or models can be under a separate license, but the code itself must be GNU GPL. Its the reason that paid tools like Retopoflow from CGCookie can be legally downloaded without purchase. Happy to be proved wrong though!

@AndrewPrice, this is probably too big a topic to cover in comments. if you want to go into more details it would be better to ask a separate question.

Thanks for your answer. I get it about add-ons' license. By the way, is the source code license free pasted on pasteall.org? There is a description Anyone can see/copy/use it. on http://www.pasteall.org/about.

@nutti - again. I don't think you can make any assumptions here. This question isn't really specific to Blender or Blender's code. Suggest asking at http://programmers.stackexchange.com

@AndrewPrice, in response to your comment, see: http://blender.stackexchange.com/q/47810/55

According to the Blender FAQ at the Blender Foundation Website:

Python scripts – if they use the Blender API calls – have to be
  compliant to the GNU GPL as well. We are currently reviewing this with
  Free Software Foundation though.

This practically means that if you're using the Blender API in your script or addon (whether original or borrowed from another person's code), it needs to comply to the GPL license. I.e. (as I understand the license) if you want to distribute it (whether for profit or not), you need to publish the full source code.

This is only if you distribute them with Blender, for scripts you find online without any licensing information, there is no guarantee they are GPL compatible (though in practice most are).

@ideasman42, That makes sense but is not quite how the FAQ is phrased. I assumed that if you distribute code that uses the Blender API, than at least according to the license, you're supposed to comply with GPL (even if many probably do not).

The FAQ doesn't go over possible exceptions to the rule, TBH not sure it should. If you mix licensing in a way that's incompatible with Blender, it seriously limits what you can do... going over these in detail would have to cover a lot of technical language. Though it could be prefaced with "Assuming you want to distribute this with Blender..."

Alrighty, good to know :)

I'd like to add that being GPL complaint doesn't mean it's GPL. It could be a more liberal license or even a public domain license.

A python script calling a function that was compiled from GPL code is the same thing as linking a binary program to a library that is GPL'ed. The viral nature of GPL means that the program/script that links to the GPL'ed library is also covered by the GPL as a derivative work.  As @someonewithpc says, a less restrictive license can be used, but it cannot prevent you from complying with the GPL terms. That is why they also have the LGPL to allow libraries to be released that don't infect programs that link to them.


text:
Convert selected edges to bones?
I've run into a strange project where I have to build multiple spline IKs' for a less-than-optimally posed mesh. An edges-to-bones addon or script would be ideal if such a thing exists.
I'm familiar with the basics of python in Blender but haven't gone deep enough to do it myself. How easy would it be to write a (hopefully short) script that would do something like this?

I expect the skin modifier can a create the armature that you are after.
If you only want a rig for a portion of your mesh, duplicate the mesh an delete the excess parts.
Add a skin modifier. You may want to use Mark Root in edit mode with one vertex selected at the end of your mesh, this can prevent extra bones and keep the bones facing in the same direction.
Click the Create Armature button in the skin modifier.

You can then delete the skin modifier, or the duplicate mesh if you duplicated it to start with and you are left with an armature matching the edges of your mesh. The new armature has the display set to stick which you can change to octahedral in the armature settings.

Wow, I completely forgot about this. Thank you sambler!


text:
Scrolling effect for GUI menu in BGE
So I'm making a GUI for my first person shooter type of game and I'm having trouble with making the effect for scrolling through the icons, trying to select one at a time instead of all. I basically have no idea how to do it so my question is, does anyone know how to use the mouse to scroll through the icons instead of selecting them all? I know why it selects them all I just want to know how to select them one at a time using the mouse wheel to go up and down the icons.
Here's a link to what I'm trying to make overall (https://www.youtube.com/watch?v=ALGcJVFb5oo)
but as or right now I just need help getting the icon selection part right.
You can check out the blend file here-
https://www.dropbox.com/s/p0312glj761zaei/SAO%20Ui.blend?dl=0
The only controls I have so far is when you press E it brings down the menu and when you use the wheel on the mouse it selects the icon (which is what I'm having trouble with...)

you are activating them all at the same time

I realize that its just the problem is how do i select them one at a time

one send message to the next to get active , or you'll have to do some scripting

any suggestions on how to start either of those

OK incrementing a property would be better , I'll try...

You can use a property to hold the selected circle index, then switch between them each time the mouse-wheel rotate.
the easiest way was the script, the script is attached to the first circle as follows :

the first circle has two properties selected "the index of the selected circle"  and open  "indicates whether the menu is open or not"

here is the script used in the file :
def switch_selected():
    #get this controller
    cont = bge.logic.getCurrentController()
    # the object running the script "1st cicle selected"
    owner = cont.owner
    # get this scene and a list of its objects
    scene = bge.logic.getCurrentScene()
    objects = scene.objects

    #hide all circles  to clear the previous selection ( also in case the menu is closed no circle is selected)
    objects['1st cicle selected'].visible = False
    objects['2nd Circle Selected'].visible = False
    objects['3d cicle Selected'].visible = False
    objects['4th Circle Selected'].visible = False
    objects['5th cicle Selected'].visible = False

    #check if menu is open
    if owner['open'] :
        #get the mouse wheel sensors
        mouse_up = cont.sensors["up"]
        mouse_down = cont.sensors["down"]

        #if mouse up increment index
        if mouse_down.positive :
            owner['selected'] += 1
            if owner['selected'] > 4 :
                owner['selected'] = 0
        #if mouse down decrement index
        if mouse_up.positive :
            owner['selected'] -= 1
            if owner['selected'] < 0 :
                owner['selected'] = 4

        # read the index and set the selected to be visible
        selected = owner['selected']
        if selected == 0 :
            objects['1st cicle selected'].visible = True
        elif selected == 1 :
            objects['2nd Circle Selected'].visible = True
        elif selected == 2 :
            objects['3d cicle Selected'].visible = True
        elif selected == 3 :
            objects['4th Circle Selected'].visible = True
        elif selected == 4 :
            objects['5th cicle Selected'].visible = True

switch_selected() #a call for the above function at each tick

Here is the file

Dude thank you soooo much!! I couldn't get this figured out for days!! Thanks you

@CloudyCastle71 you are welcome, and if you see that this solve your problem mark the answer as accepted ( the check mark on the left )


text:
Correctly re-combine ALL render passes?
So, there are some great tutorials around the web about isolating render passes in Cycles so that you can make changes, and then recombine all of your work as one complete image.
You'll probably have a Compositor node setup that looks something like this:

Blender's Manual used to have a schematic explaining how these can be recombined:

But not all of the pass types are explained by this deprecated schematic, as now there are more pass types (SSS, Shadow...)
What would be the "master" routing, so that if all passes are separated out they would all get recombined properly to form the complete image?
I set off on a mission to create such a routing, but realized I wasn't sure how to recombine some of the passes.

SSS works just like the 3 other "light type" sets do, so you add SSS direct and SSS indirect, multiply the result by SSS color, and sum that result with the other sets.
Shadow is not an image component per-se, since if you rendered your lamps with shadows enabled, they will already be embedded in your lighting passes. (the shadow pass already existed at the time that graphic was created, btw).
So to answer "what is the master routing?", it's just that with the SSS set tacked on the bottom, working the same way.
There are currently no volume passes, so volume shaders cannot be re-assembled in this way. What you can do, however, is use a handful of passes subtractively. For example, let's say you just need to edit glossy indirect to brighten reflections and clear some fireflies, you don't care about any of the other passes.
Rather than render EVERY pass and recombine them all, you can just render the passes you need, subtract the unaltered from the master, edit it, and add it back. For the light passes, you need to do the add+multiply to get the full lighting pass, rather than the split raw passes:

This will work with any shaders, including volumes.


text:
Around-Corners Transparency in Cycles?
Using Ray Length I can make the center of a cube hollow. But what I actually want is the inverse - for the outline to be transparent and the inside solid. At a glance it seems this would be a matter of inverting the color, but since Ray Length uses the transparency to calculate this to begin with, inverting it short-circuits the signal flow and all transparency is removed.

Things I've tried that didn't work:

Normal node
Ray Depth
OSL edge shader (very cool, but doesn't leave the center hollow)
Cycles Matcap technique
Each output of the Camera Data node
All of the above run through various combinations of Color Ramp, RGB Curves, etc.

I would really like for this to work as a Cycles material, rather than relying on compositing. I also would like to avoid solutions that involve Freestyle lines. Those approaches are good for some cases, but in this case I'd like a material that can be brought into any .blend and "just work" on its own.
Any ideas? Thanks.
2016 Feb. Edit:
Since it seems this question is still getting some attention, and because I hadn't explained what the desired end result was, I thought I should add a little more info here.
My hope with this was to achieve an effect that can be used on textures such as brick walls, so that a wall's corners have transparency in the areas between the bricks. With a bump map you can generate shading that makes the bricks appear pushed out, but when it comes to corners the lack of transparency between bricks is a dead giveaway that there is no real geometry.
I have since switched to using particle systems for bricks and I think this is a more effective approach:

While this is a solution for bricks, it is not a universal solution for getting around-corners transparency from displaced textures. Also, geometry-based solutions tend to be more computationally heavy. Subdividing the wall a million times and then throwing a displace Modifier on is not usually practical.
So what is the solution that will work for all textures? I believe RenderMan's displacement, which creates raised geometry from a shader... is the solution.
See an example of RenderMan's displacement here.
Anyway, this is the sort of effect I was after, and hoping I could fake something close by first creating a shader with transparent borders. At the time I posted this question I was not aware of RenderMan's displacement feature. And of course, it would be nice to have this in Cycles too... we will see what the future holds.

I tried. There are problems with that. 1. Unpredictable behavior when the camera/viewport is moved. 2. Cannot be made full contrast black-and-white for use as a mask. It's always too light or too dark. And there's a problem with using Ray Length too: If an object has parts of its geometry that occlude other parts, an extremely dark area shows up. I've concluded that Layer Weight / Fresnel are not good for making an "outline shader" because the appearance is so heavily influenced by the camera.

Would simply inverting the stoppers of the colour ramp be what you are looking for?

Does swapping the sockets on the mix node do what you want?  The reason that reversing the swatches on the color ramp doesn't work is because that the ray length has values greater than 1 which the color ramp is clamping to 1.  You could use an invert node after the color ramp too.

Cycles can actually do what I believe that RenderMan video is showing, namely use the displacement socket for actual displacement instead of bump mapping.  See this answer.

@PGmath Thank you for pointing this out! I had used the experimental Cycles displacement feature once, got buggy results, thought it interesting but not practical for me, and sort of forgot about it after that. But I also didn't realize that it was creating its own geometry because the mesh had several modifiers on it already, including SubSurf and maybe Displace too (this could explain the bugginess). Anyway, I clearly didn't spend enough time playing with it! I will revisit.

@Mentalist  I don't think Cycles actually creates new geometry, it just displaces the geometry that's already there.  The true displacement method just lets you use the powerful Cycles nodes to create more complicated displacement maps.  I guess I didn't watch the whole video thoroughly.  :(

@PGmath I tried it out and it is subdividing a little bit, just not nearly enough. And also is doing the buggy thing I saw it do before - disconnecting the faces, making confetti out of the mesh. There's this mysterious Dicing Rate slider that doesn't seem to have any effect. Here's a .blend

....this seems like such a simple solution that surely it's been covered and I'm just not seeing it -> Can't you just reverse the color ramp so that black and white are on the other ends?

should probably rename this question something like: "how to create true surface displacement from bump map in cycles?"

@DavidJeske Thanks for posting an answer. As you suggested, I'm going to retitle this question. I think "Around-Corners Transparency" encompasses the topics discussed here pretty well (shader-based approaches and displacement-based approaches).

True surface displacement can be achieved with tessellation and a Displace modifier.
There is also a new Experimental Cycles Displacement node, but since it isn't continuous across face boundaries, it creates gaps between faces.
Cycles - What is the expected range of values for Displacement?

Thanks, yeah it's really too bad about the gaps between faces. I hope the devs keep working on the feature and get it to a usable state. I wonder why those gaps appear when the Displace Modifier doesn't have that problem.


text:
How to export directX in py script
I am trying to make a script to export all my objects to individual .x files. However I don't know the operators for directX. Please tell me how I can fix this code so that it exports the directX files.
bpy.ops.export_scene.x(filepath=str(path + ob.name + '.x'),check_existing=True)
This worked for .obj files.

remove the ,check_existing=True

Tried that its not the problem.

what console output do you see ?

None? How do I see the output console, this is my first time writing script in python for blender.

in blender go to Window->Toggle_system_console you'll a cmd console (don't close it ) read the output in most case it will be very helpful

Wow thanks, that might be a bit helpful for like everything that I'm about to do :D

That really helped XD, I was trying to create a folder I already created earlier on in the script, now I have my script working thanks to you :D

glad to help, but you have to write an answer (steps and some script ) in here (and accept it ) so this can be more useful to others facing the same problem


text:
Change parameter for whole selection
It is common to want to change settings for many selected items at once. For some things, like scaling, it automatically affects everything you have selected. For other things, it only affects the active object. Is there a way to make it affect the entire selection?
For example, if I am changing the settings on some bones, and want to set the entire armature to not inherit rotation, I currently have to select every bone one at a time and do it manually. Is there a way to do it for the entire selection? I know I can write a script for it, but then I need to make a script for every parameter that I may want to change.
Another example would be locking/unlocking rotation/scale/location.
A way to copy parameters from the active object to the rest of the selection after making changes would work too. Rigid bodies can do this for rigid body settings, but is there a way to do it for other settings?

You can press Alt while clicking an option and it will apply that change to all of the selected items (in your case, bones) that have that option.


text:
Debugging Rig performance
I have a complex character rig. Its a Rigify rig base, but with a bunch of other stuff i've added, like a custom face rig. Somewhere in the process of building it all, the performance has gone down. Its now quite slow when attempting to pose things. The rig is slow on its own even when all armatures are disabled, so I know the problem is somewhere in the rig.
I'm trying to find out if there's any tools or debug options that can help me narrow down what part of the rig is causing the slow performance. I don't know if its one problem driver or constraint causing a big slow down, or a bunch of things contributing.
Of course, I can delete parts of it a bit at a time and see if that helps, and then narrow it down from there. But if there's some better way to approach this, I'd like to know!

To begin with, are you sure that the rig itself is a problem? I mean what if you delete everything except the armature(s)? Will it remain being hard for FPS of your scene. I've made & seen different rigs, including very complex, but I've never seen FPS going down because of Armature constraints/drivers/whatever. But OK, if the rig is the problem, I'd start with these suggestions:

cyclic dependencies: bone/object/property A somehow depends on bone/object/property B while bone/object/property B somehow depends
on bone/object/property A (constraints, drivers, parent-child
relationships - and take hierarchy into account, because it's often
quite not obvious, that 10th child of bone A depends on 12th child of
bone B & vice cersa); you can check if there any cyclic dependencies
in your file by toggling the command line, it will be shown there
along with some other helpful info: errors, missing paths, lost
drivers and so on;

action constraints: I've noticed that among all the constraints Action constraints are the hardest ones - especially when there are
100+ of them (I had even much more when made the rig with large
amount of facial emotions);

drivers with complex logic: large expressions with many variables and
modifiers can potentially slow down FPS;

driven shape keys: if you use shape keys with drivers on them, it can
really slow down the scene, I had mesh with 50+ driven shape keys and
it had been freezing my FPS like hell, and when I tried to delete
them all, FPS increased from 5 to 30;

other complex modifiers: OK, let's say there's no more Armature
modifiers and our mesh is no longer connected to its rig (well, at
least - it's no longer obviously connected); but what about other
modifiers? Lattice, Mesh Deform, Laplacian Deform and other deformers
like that can catastrophically reduce your FPS.

So, there's no scripted way to find the bottleneck of Mesh-Rig relationships, and I just tried to mention some of the approaches I use in my work.

In the case of the problem that caused me to make the original post, it was a Shrinkwrap constraint that I thought I had deleted but was left on, and was to an object with a bunch of subsurf on. It took awhile to find it. So it would have been nice if there were tools that could have told me what was taking what amount of time on the rig to resolve, or something.


text:
Multiple Render Borders in Cycles Preview
Is it possible to specify multiple disjunct render borders?

I realize that this is trivial when rendering but it would be very useful when previewing on a less-powerful computer.  I have two complex meshes on separate sides of the scene and would like to preview them both at once.

Do you mean when using cycles preview, or just set the rendering to two different places for a test render?

Using Cycles preview - edited to reflect that

best question I have seen in awhile.

Unfortunately this is not possible currently, you can only have one renderborder per 3D view.
However, you can have multiple 3D views, each with it's own renderborder:

Note that you can only have one camera renderborder which is global for all cameras, so this is only possible in viewport render.

A great workaround - this is perfectly sufficient.


text:
Can I animate a model made in ZBrush?
I'm new in game modeling and animation, and I really liked how ZBrush works, but blender is better in animation, much easier, but too difficult with modeling.
Can I animate a model made in zBrush?
If yes, how can I do it?.

Yes, you can, here is how:
Export your model from zbrush(id recommend a .obj).in blender you can open the .obj useing (File>Import>Wavefront Obj)
Now your model is ready for animation.
Note:
In zbursh it is important that you do not export a raw sculpt, since that will not work for animation in any software. Always retopoligize it.

so i dont need to retopoligize, right?

sorry, yes i need or yes i don't need?

@EnzoTiezzi, You should always retopoligize a sculpt before anaimation. sorry for being unclear.


text:
Can't use "Selection Popup Menu" Alt + Right Click (v2.76)
I read this topic: "11 Useful Blender Tricks You May Not Know"
http://www.blenderguru.com/articles/11-useful-blender-tricks-you-may-not-know/
And got trouble with number #11: Selection Popup Menu, Hotkey: Alt+Right Click
I try to Alt+Right Click on Object Mode and Edit Mode but nothing happen, did i do wrong or miss something, i use blender 2.76, please help !!

You have to have multiple objects in your scene. Sometimes the scene is so crowded, that some objects overlap each other, so you press the Alt+RMB to choose the desired one. In my case I have the main model, the bones (metarig) and the rough proxy mesh. As you can see, when I hover the cursor over object and press Alt+RMB the pop up menu appears.


text:
Does blender have the concept of instances and params?
Goal
My goal is to keep a single source of truth while allowing instances to modify a few expected parameters (a material for example).
This way I can create a small object in a separate file, and create instances of it in many different files. Each instance would allow me to override a param from its default value for the material.
If I ever need to change all objects of that type, I'd just modify the main one.
It's a bit similar to Object-Oriented Programming, but using Blender objects instead.
Unreal Engine 4 has exactly this concept that I'm looking for when it comes to materials: https://docs.unrealengine.com/latest/INT/Engine/Rendering/Materials/MaterialInstances/
Does Blender Cycles have this concept of params for materials? Does it also have the concept of instances?
Example
File: Ball.blend

Created a Sphere called Ball.
Apply a simple diffuse material. By default the color is red. Instances of Ball should be able to choose a different color, so I want to create a param called 'color' for the material.

File: Beach.blend

Shift+F1 to Link Ball into this file. Any changes made in the original Ball will be reflected here.
I want to change the color of the ball to green, so I override the param 'color' to 'green'.

I could decide later that all balls should be glossy, so I could apply this shader to the main material and all balls are now glossy while maintaining the green color for my instance since I'm expecting a parameter in the material called 'color'.

There are instances, and you can link them from other files, what we currently lack is a clean way to provide material overrides; for groups in an easy way at least; using scripting it may be doable. For individual objects libraries you can easily override materials using built-in tools. Improvements in that area are planned for the upcoming new version 2.8

You are looking for drivers. As I just saw it in another question have a look at the CGCookie flexrig - the ui part of the rig lets you change colours in the materials.

This can be accomplished with Node Groups.

Grouping nodes can simplify a node tree by allowing instancing and hiding parts of the tree. Both material and composite nodes can be grouped.
Also nested node groups are supported. I.e. a node group can be inserted or created inside another node group.

For example, creating a 'GlossyMaterial' shader group with an input for color. Node Groups can be linked/appended across files and shared between many material instances.
Further resources:

Introduction to Node Groups


text:
Display the Operator properties of an Active Add Primitive operator
is it possible to display the Operator properties of an Active Add Primitive operator in a Custom Panel
as in the following figure:

For cylinder, I have enter radius and height, ...

"Number of Cube?"  what you expect the number beside it to do, make 50 randomly placed cubes? .. or divide the cube in 50 sections per side

You can display them, but i think you will get convoluted code.
def draw(self, context):

    # ... earlier stuff.

    operators = bpy.data.window_managers["WinMan"].operators
    if operators and operators[-1].name == 'Add UV Sphere':
        this_op = operators[-1]
        col = layout.column()
        col.prop(this_op.properties, 'segments')

But you'll notice you can drag the slider, it will update the visible value but not update the actual value of the active operator.

Then dynamically populating the UI with properties:
 >>> bpy.data.window_managers["WinMan"].operators[-1].properties.items()
 ...[('size', 2.0), ('view_align', 0), ('enter_editmode', 0), ('layers', <bpy id property array [20]>), ('location', <bpy id property array [3]>), ('segments', 9)]

so..
def draw(self, context):
    obj = context.active_object
    mode_string = context.mode
    edit_object = context.edit_object

    layout = self.layout
    col = layout.column()
    col.label(text="Generate objects:")

    if mode_string == 'OBJECT':
        layout.menu("INFO_MT_add", text="Add")
    elif mode_string == 'EDIT_MESH':
        layout.menu("INFO_MT_mesh_add", text="Add")

    operators = bpy.data.window_managers["WinMan"].operators
    if operators and operators[-1].name == 'Add UV Sphere':
        this_op = operators[-1]
        col = layout.column()
        for k, v in this_op.properties.items():
            col.prop(this_op.properties, k)

Would produce this, by inspecting the items in the properties of the current operator.

But, there are fundamental problems with this. You would have to limit somehow the kind of Operators to show in this list. Right now i've limited to Add UV Sphere, if you don't do that it will show all most recent Operator properties even if they aren't a Primitive operator..
So you might construct a set of Operator names to allow..
showable = {'Add UV Sphere', 'Add Cube', ....... }
if operators and operators[-1].name in showable:
   # ... display them as shown above

And still you won't be able to tweak these props. :(
Seen as the operator has a perfectly good Operator Properties panel accessible from F6, and the panel also appears in the 'TOOLS' shelf, I'm inclined to discourage trying to do this. -- But it's an interesting thought experiment.

I do not know where I put additions
As well as for each body of his properties
For example, the cylinder diameter and its height

Then I suggest you start scripting something smaller and read the the cookbook too

how to add there lines

Where add these lines
At the beginning of the script?

Let us continue this discussion in chat.

@zeffii do you want this as a community wiki?

@David yep. Or the whole answer deleted :)


text:
python: pie menu to display the pivot center modes
I would like to create an operator that would trigger a pie menu containing the "pivot center modes" in it (median point, individual origins, 3d cursor, ...).
Now I could get started with the code below (from that topic: bpy: how do I list the "pivot center for rotation/scaling" items?
import bpy

def piebut(self, context):
    layout = self.layout
    op = layout.operator("wm.context_pie_enum")
    op.data_path = "space_data.pivot_point"

def register():
    bpy.types.VIEW3D_HT_header.prepend(piebut)

def unregister():
    bpy.types.VIEW3D_HT_header.remove(piebut)

if __name__ == "__main__":
    register()

The code above will add a button to the 3dView header, and when you press that button, it will display a pie menu with the "pivot center modes" items in it.
However, I would like to convert this to an operator, so that I can ultimately press a shortcut key to open the pie menu directly (without having to click a button).
Now I've tried this without luck:
import bpy

class LING_OT_PIEMENU_PivotCenterModes(bpy.types.Operator):
    """A pie menu to select the pivot center for rotation and scaling"""
    bl_idname = "view3d.ling_piemenu_pivot_center_modes"
    bl_label = "Pivot center for rotation/scaling"

    def execute(self, context):
        bpy.ops.wm.context_pie_enum("space_data.pivot_point" )
        return {'FINISHED'}

# just for quick testing inside the blend file
bpy.utils.register_class(LING_OT_PIEMENU_PivotCenterModes)

I've changed those lines:
layout = self.layout
op = layout.operator("wm.context_pie_enum")

to this line:
bpy.ops.wm.context_pie_enum("space_data.pivot_point" )

because layout = self.layout was returning a None type, so I thought the layout property was not available from the operator class, and so I tried to call the context_pie_enum method in a different manner, but now I've got this error:
TypeError: Calling operator "bpy.ops.wm.context_pie_enum" error, expected a string enum in ('INVOKE_DEFAULT', 'INVOKE_REGION_WIN', 'INVOKE_REGION_CHANNELS', 'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT', 'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIEW', 'EXEC_AREA', 'EXEC_SCREEN')

It already is an operator.
There is no need to create another operator to call an operator, so it can be given a shortcut.
Can add a keymap to it directly. The field to data_path ignore if appears disabled, select and type in the required RNA path from context.

shortcut set to  ⇧ Shiftz (disabled the toggle render shading)
or created via code (example)
import bpy

wm = bpy.context.window_manager
kc = wm.keyconfigs.user

km = kc.keymaps['3D View']
kmi = km.keymap_items.new('wm.context_pie_enum', 'Z', 'PRESS', shift=True)
kmi.properties.data_path = "space_data.pivot_point"

Alternatively it can be added as an expanding pie menu item in your original question code via
op = pie.operator("wm.context_pie_enum")
op.data_path = "space_data.pivot_point"

To call an operator from code, all operator properties must be passed as  keyword arguments
bpy.ops.wm.context_pie_enum(data_path="space_data.pivot_point")

The first argument of an operator call can be a string if it is one of the operator context enums, eg 'INVOKE_DEFAULT'. See error message in question for full list.  Another type of argument is a dictionary of context override members.
bpy.ops.wm.context_pie_enum('INVOKE_DEFAULT', data_path="space_data.pivot_point")
c = {"area": context.screen.areas[4]} # will need more than just area.
bpy.ops.wm.context_pie_enum(c, data_path="space_data.pivot_point")


text:
How to copy background images from one .blend to another?
I have a bunch of background images in one .blend, and I'd like to "append" (or link if that's possible) them into other .blends.
I couldn't find anything in the append tree for appending background images; I can append the just the image datablocks from the image tree, but seemingly not the background image entries.
Is there any way to copy the background image entries, not just the images themselves?

Coming up against the same thing I wrote some scripts many moons ago, with the idea of making it an addon. Only got this far, I've updated to handle clips.
Run this script in the blend file with bg images set up.  It adds a set of properties onto the images mirroring the background image settings, & also the name of the screen the 3D view is in. (Doesn't discern for multi 3d views in same screen).
import bpy

context = bpy.context
text = bpy.data.texts.get("BGImages.py")
if text is None:
    text = bpy.data.texts.new("BGImages.py")

text.clear()

spaces = [space for screen in bpy.data.screens
         for a in screen.areas if a.type == 'VIEW_3D'
         for space in a.spaces if space.type == 'VIEW_3D' if len(space.background_images)]

for s in spaces:
    text.write("#Screen: %s\n" % s.id_data.name)
    for i in s.background_images:
        text.write("#%s\n" % ("-"*72))
        for p in i.bl_rna.properties.keys():
            if p in ['rna_type', 'image_user', 'clip_user']:
                continue
            val = getattr(i, p)

            text.write("i.%s = " % p)
            text.write("%s\n" % repr(val))

            if not val:
                continue
            if i.source == 'IMAGE':
                i.image["screen"] = s.id_data.name
                if type(val).__name__ in ["bool", "str", "float", "int"]:
                    i.image[p] = val
            else:
                i.clip["screen"] = s.id_data.name
                if type(val).__name__ in ["bool", "str", "float", "int"]:
                    i.clip[p] = val

It creates a text file named BGImages.py, ( ultimately making this a script to link / append then run and import, was the idea 8^)
#Screen: Scripting
#------------------------------------------------------------------------
i.source = 'IMAGE'
i.image = bpy.data.images['getting_started.blend2.png']
i.clip = None
i.offset_x = 0.0
i.offset_y = 0.0
i.size = 10.0
i.rotation = 0.0
i.use_flip_x = False
i.use_flip_y = False
i.opacity = 0.5
i.view_axis = 'ALL'
i.show_expanded = True
i.use_camera_clip = True
i.show_background_image = True
i.show_on_foreground = False
i.draw_depth = 'BACK'
i.frame_method = 'STRETCH'

Now in your new file if you link / append the bg images  & run this script
import bpy

images = [i for i in bpy.data.images if "screen" in i.keys()]
clips = [i for i in bpy.data.movieclips if "screen" in i.keys()]
dic = {}
images.extend(clips)

for i in images:
    l = dic.setdefault(i["screen"], [])
    l.append(i)

def gonk(self, context):
    space = context.area.spaces.active
    for i in dic.setdefault(context.screen.name, []):
        print(i.name)
        bi = space.background_images.new()
        if i["source"] == 'IMAGE':
            bi.image = i
        else:
            bi.clip = i
        for k in i.keys():
            if k in ["screen", "image", "clip"]:
                continue
            setattr(bi, k, i[k])

def bgimages(self, context):
    layout = self.layout
    screen = context.screen
    l = dic.setdefault(screen.name, [])
    layout.enabled = len(l) > 0
    layout.prop(context.screen, "toggle", toggle=True, text="%s (%d)" % (screen.name, len(l)))

bpy.types.Screen.toggle = bpy.props.BoolProperty(update=gonk)
bpy.types.VIEW3D_PT_background_image.append(bgimages)

 You will see a button which tells me that two images in the Scripting screen 3DView can be added to the backround images of this 3D view in the Scripting screen of my new file.  You will need to change the screen name to match the screen name of the original file.

All the background images are stored in the Image folder. After appending select that folder, then choose the .jpg (or any other file format) you want.

Add a new background image in a Properties Shelf (click on Add Image in Background Images panel), then click on an 'image icon' and your appended image'll be available.

Yes, but this is pain when you have lots of background images which need to be added to lots of files. Just appending the images isn't enough, I'd like a way to make them background images automatically too.

Maybe you could try importing your images in the first .blend easily with the addon "import images as planes". Then save that .blend
From another .blend, you could be able to link the imported images from the first.
Though I'm not sure this fills your needs, it could work, hopefully.

The goal is to get the background image entries, just having the images doesn't help all that much


text:
How to use surface snapping on a wireframe in 2.8?
In 2.7x we can snap to the surface of an object with max draw type set to wireframe:

However, as of 81a7f6c848 this no longer works; the target object must have a solid draw type:

I like using a smooth subsurf'd "envelope" mesh to describe the general shape of an object, then snapping + shrinkwrapping bits on top of it to make details which couldn't easily be incorporated in the subsurf'd envelope mesh. While doing this, I have found having the envelope mesh in wireframe mode to be best for seeing what is going on.
Is there some way to get an equivalent behavior in 2.8, or an alternate workflow for detailing subsurf'd meshes?

Just to clarify, you are talking about vert to face snapping in edit mode right? With the target having a max draw type of wireframe. I just tested in an old (january-ish) version of 2.8 and it appears to work there. I think you may have bug.

@Sazerac Yes, vert to face in edit mode, specifically with individual element snapping on. The version I tested on was quite recent, master at fb7f157ff89d Do you have the hash of the working version?

hash is c97c76c01c1d. Although looking at your screenshot, it may just be that snapping is not enabled? The magnet looks greyed out to me.

@Sazerac Ah, I was using Ctrl (you can be sure as it does work when Suzanne is solid). In hindsight I probably should've enabled it for gif visibility..

That makes sense. At a wild guess, I suspect this is a result of a developer switching from an internal format mesh raycast to an opengl call to get the surface to snap to.

@Sazerac I've managed to find the commit which made the change; judging by the comment, it looks like it was intentional

That makes things tricky indeed. I guess snapping options probably needs another flag.


text:
What are the technical differences between F12 render and viewport preview?
What are the technical differences between F12 render and viewport preview render, if any?
This is all the documentation I could find about Cycles viewport rendering:

interactive rendering can be started by setting a 3D view editor to draw mode Rendered. The render will keep updating as material and object modifications are done.

To add to ideasman42's answer, you should note that if you're using progressive sampling, the amount of samples has two different settings, one for the viewport preview render and another for the F12 render.

The differences between render operator and viewport render are that the viewport render has:
Blender Internal

No motion blur (sampled)
No panorama camera mode
No anti-aliasing

Eevee

Uses the Viewport sampling setting
No Overscan (see Objects, shadows and reflections not rendering in EEVEE)
Unlike Cycles, motion blur is previewed (only in camera view)

Cycles

No motion blur
No tiled rendering.
Uses preview progressive samples setting.
Render layer settings will be ignored.
Pause and resume
Uses dynamic BVH by default.See Why is rendered viewport faster than rendering individual frames? and What does static/dynamic BVH do?

All

No compositing.
Modifiers and objects preview settings are used:

Object render/preview visibility options.
modifier render/preview visibility options.
subsurf preview/render resolution.
multires preview/render resolution.
curve/metaball preview/render resolution

Particle display percentage is used.
A preview can be made from any view-port, a render can only be made from a camera object.
No way to save output (except for a screenshot).

Note: I'm not sure if this list is complete, these may not be the only differences.

panorama works in the viewport for me.. (for cycles)

Perhaps include that (for cycles) it doesn't render in tiles?

IIRC, the viewport preview also doesn't do full GI (for Cycles), it does something similar to the Direct Lighting preset. Can anyone confirm?

I've even seen that at least BI ignores texture repeat, if I turn it off in the texture settings, it still repeats in the viewport, but does not in the render operator output.

@DebugErr GLSL preview and Rendering have many minor differences. GLSL preview is an approximation at best.

A preview can be made from any angle. F12 renders only works through the active camera.  Alpha channel is saved as a checkered pattern if taking a screenshot.

Also, for Cycles, F12 renders at the resolution that you give it in the Dimensions section of the Render panel. The viewport renders at the actual resolution of the camera area on your screen (for example if you zoom out in camera view with "Border" enabled it will render faster).

"No compositing" is about to change! :)

Not sure it classifies as purely technical but there are different flags that control if objects are visible in the view and in render. Hiding it in the view doesn't hide it in the render. This has bitten me more than once when I sent out preview test renders from viewport preview.
And of course the resolution is dependent on the viewport resolution when doing preview.

While correct - the question is whats different in preview-render to render-operator, in this case both use same hiding options.

The big difference is:

when use F12 Render, blender engine will render your scene using your settings(like motion blur,mist, complicated light and effects) ignoring your hardware limitation, blender engine will draw your scene(very slow ...very quick...not matter.. will draw it).

When use viewport rendering, blender is limited to hardware limitation and OpenGL abilities which blender uses it.

You can render your scene by blender engine or Viewport rendering, but to get same result, you need to use many tricks in viewport rendering mode to get same result of rendering by F12.

So:
F12: Easy Design, Slow Rendering(depends on your hardware and scene).

View port Render: Hard Design, Very fast rendering(it's big and wonderful challenge)

cute scenes BY viewport rendering

This question is asking about the differences between the F12 render and the F12-like render in the viewport (Shift Z). Not the opengl view, but the interactive render. I apologize for the confusion..


text:
Hide geometry in render?
Is there an easy way to hide only part of a mesh for rendering?
e.g. something like a "Delete" modifier, where you could delete vertices only for rendering, then remove it and get all your "deleted" geometry back.
Is there quick and simple way to do this?

To restrict parts of a mesh from rendering
You can make use of the Mask Modifier for this.

The Mask modifier allows certain parts of an object's mesh to be hidden from view (masked off), in effect making the parts of the mesh that are masked act as if they were no longer there.

This is probably the best way to go about this, any shader trick that selectively hides a mesh could cause problems depending on usage as transparent geometry is still outlined with Freestyle Line renderer for one. The mask modifier gets rid of it completely visually, but preserves physics etc.
To restrict an object from rendering
You can restrict entire objects from rendering by pressing the camera icon in the Outliner or by selecting the objects that you do want to render and using CtrlW > Restrict Render Unselected to restrict any unselected objects from rendering.
Alternatively you can exclude whole layers of objects via the render layer settings.

Based on how you use the Mask modifier, it can leave gaps in your mesh. So you might want to apply it and fill these depending on what you want..


text:
Are render passes always rendered?
It would seem that the answer at least partially no, as rendering a simple cube scene with no passes enabled takes 3 seconds, while with all passes enabled takes 9 seconds.
I always imagined that blender rendered the image and while doing so gathered all the information needed for the various passes, then only saved the passes enabled in Renderlayers > Passes.
Is this the case? If not, what does blender actually do?

I think it increases render time. But that time is probably negligible compared to the actual render time.

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

The contents of some render passes is always computed as part of rendering the combined pass. It takes little extra time to allocate the pass and store that value, however for a simple render and many passes this overhead will add up too.
For others (e.g. the Motion Vector pass) it would not normally be computed, so it will take up more time.

Render in passes or layer will always be slower than render everything in one go. The reasons why one would want to use render by passes include:

Easier to change certain things post-render, without having to re-render the entire image. (This is a huge time saver)
Easier to composite other effects in
Lower memory demand

Thanks for the useful info :) Though I was mostly hoping for information about what blender actually does and why it's slower.


text:
When "is_library_indirect" property of ID's could be set to True?
Every ID datablock in Blender has an is_library_indirect property (
https://docs.blender.org/api/2.79/bpy.types.ID.html#bpy.types.ID.is_library_indirect)
I wanna know after what user actions it could be set to True.

I have figured that out. It is set to true for objects that located in linked groups.


text:
Coordinates of corners of camera view border
How to get coordinates of corners of camera border in camera view relative to the viewport area?
After checking
import bpy
print('-----')
print()
print()
for a in bpy.context.screen.areas:
    if a.type == 'VIEW_3D':
        for s in a.spaces:
            print(s)
            for d in dir(s):
                print(d)
print('-----')

I have no idea how to find out where I can get this

Rather than using that unwieldy python script, you can explore the structure using the "Datablocks" mode of the Outliner. I'm looking around to see if I can find a way to actually get the coordinates :)

Yes, I know about Outliner, but Outliner is for datablocks, and what I wanna get is not store in datablocks at all. 100 % information =)

I'm not so sure it's possible to get it directly, you'd probably have to calculate it from the zoom and the camera's attributes...

Same thoughts, but it's too hard. Need to do a commit later.

It's something like what I wanted. Thank you, guys.<An_Ony_Moose> CoDEmanX: bpy.data.screens['Default'].areas[2].spaces[0].region_3d.perspective_matrix and bpy.data.screens['Default'].areas[2].spaces[0].region_3d.view_matrix? Maybe? (you may have to change the 2)

Now trying to get data from matrix with this http://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/

And this snippet from F2 Addon

world_pos = ob.matrix_world * vert.co.copy()
screen_pos = view3d_utils.location_3d_to_region_2d(region,
region_3d, world_pos)

You've lost me, but if you're getting anywhere that's good :)

It should be possible to convert the NDC to screen coord using the projection matrix and W according to some 3d grapgics web posts. I'm unsure if perspective_matrix is the same as projection matrix however, and no clue from where to take W. Looking at the C code that draws the orange camera border, it appears to be quite complex to calculate. The easiest way would be to expose a new RNA method like Camera.view_frame for the border in C, to be called from python. Dunno how to deal with the parameters yet (call on cam ob, pass scene and view3d area, without an actual border drawn on screen?)

Before getting the coordinates I can check area.spaces[0].region3d.view_perspective == 'CAMERA'. It works cool =)

Could you do a commit to 2.70? No matter what - through camera or viewport data =)

There are 2 things to consider here:

The camera frame. The camera frame is not as simple as you might expect since its effected by the field-of-view, aspect & x/y shift.
The 2D view pixel coords, The user can pan & zoom the view, so this also has to be calculated.

This script gets the camera bounds and prints the pixel boundaries.
import bpy

def view3d_find():
    # returns first 3d view, normally we get from context
    for area in bpy.context.window.screen.areas:
        if area.type == 'VIEW_3D':
            v3d = area.spaces[0]
            rv3d = v3d.region_3d
            for region in area.regions:
                if region.type == 'WINDOW':
                    return region, rv3d
    return None, None

def view3d_camera_border(scene):
    obj = scene.camera
    cam = obj.data

    frame = cam.view_frame(scene=scene)

    # move from object-space into world-space
    frame = [obj.matrix_world @ v for v in frame]

    # move into pixelspace
    from bpy_extras.view3d_utils import location_3d_to_region_2d
    region, rv3d = view3d_find()
    frame_px = [location_3d_to_region_2d(region, rv3d, v) for v in frame]
    return frame_px

frame_px = view3d_camera_border(bpy.context.scene)
print("Camera frame:", frame_px)

See API docs for the important functions used here:

bpy.types.Camera.view_frame
bpy_extras.view3d_utils.location_3d_to_region_2d

Thanks, that's what I actually needed! Your comment  "# move into object space" confused me. Maybe the comment should be like "moving into world space"? Because view_frame function gives the positions relatively to object space of the camera, and for getting pixelspace coordinates we must provide positions of the points in world space, don't we?

@sergey-krumas good point, done!

2.8x API changes will require a small change:
frame = cam.view_frame(scene=scene)

Thanks, updated.

Workaround example
Add a plane to the scene, to see the effect:
import bpy
from mathutils import Matrix
from bpy_extras import view3d_utils

mesh = bpy.data.objects['Plane'].data
camera = bpy.data.objects['Camera']
data = camera.data

frame = data.view_frame()
render = bpy.context.scene.render
ar = render.resolution_y / render.resolution_x

mesh.vertices[0].co = frame[0]
mesh.vertices[1].co = frame[1]
mesh.vertices[2].co = frame[3]
mesh.vertices[3].co = frame[2]

scale = Matrix.Scale(ar, 4, (0.0,1.0,0.0))
mat = camera.matrix_world

mesh.transform(mat*scale)
mesh.update()

for area in bpy.context.screen.areas:
    if area.type=='VIEW_3D':
        break

space = area.spaces[0]
region = area.regions[4]

points_on_screen = [
    view3d_utils.location_3d_to_region_2d(
        region,
        space.region_3d,
        v.co
        )
    for v in mesh.vertices
    ]

print(*points_on_screen, sep="\n")

You can apply the matrix transform directly to the vectors in camera.view_frame and use location_3d_to_region_2d to get the screen coordinates.
The plane is used for visualization.
BTW: To get the W-component you have to expand the vectors before multiplication
v = Vector((0.0, 0.0, 0.0))
v.to_4d()
# Vector((0.0, 0.0, 0.0, 1.0))

space_data.region_3d.perspective_matrix seems to be already multiplied with the view matrix. You can reverse it like this:
perspective_matrix * view_matrix.inverted()

So
ndc = [None] * 4
for i, v in enumerate(camera.view_frame()):
    ndc[i] = perspective_matrix * matrix_world * scale * v.to_4d()
    ndc[i] /= ndc[i][3]

should give you the NDC-coordinates

Awesome pink vertex! This is exactly the calculation! I turned it into a modal draw op to visulize the result without a plane, fixed a problem with aspect ration > 1.0 and added a pink vertex in each corner =D It does not take Shift Y into account however, any idea how to solve this? http://www.pasteall.org/49117/python (Run Script, spacebar menu over 3D View, "modal", switch to camera view with Numpad 0!

Shift Y screws up the scaling because (0.0,0.0) is not the center anymore. You can fix this by a translation.

center=sum(camera.view_frame(),Vector((0.0,0.0,0.0)))/4 Create a translation matrix tmat=Matrix.Translation(Vector((0.0,-center[1],0.0)) And multiply it like this tmat.inverted()*scale*tmat You can simplify this by computing it by hand and set the entry in the scale matrix directly.

Great! Integrated the manual way into my script and accounted for aspect ration > 1.0 again: http://www.pasteall.org/49139/python Note that you need to be in Camera perspective already if you want to use the get points function standalone (or it won't return the correct locations).