text:
How do I change actions in python
I want to copy the world positions of a first bone to a second bone then save the second bones position as a keyframe(when the first bone has a keyframe) to retroactively fix rigging errors with roll on ik bones.
I can't sample the fcurves as they are local space so instead want to iterate the actions and set the frame then grab the matrix to apply and keyframe the second bone but can't find the command to set the action.

All actions in the file are saved in bpy.data.actions
for a in bpy.data.actions:
    print(a.name)

The action associated directly with your object, the one I'd call "in the slot"
action = object.animation_data.action

To set it to another action named "anotheraction"
object.animation_data.action = bpy.data.actions.get("anotheraction")

If there is no action named anotheraction it will set it to None.  If there is no animation data on the object you will need to call
object.animation_data_create()

beforehand.
Note: can also have actions on any strip in the strips collection of an nla track in the animation_data.nla_tracks collection of your object.

Another hint for whoever is trying to set this at the armature: you set it actually at the object, not the armature.


text:
Random lines popping up with Freestile when Sketchy
When I render a simple animation with Freestyle (all default settings, except sketchy at 3 and the Bezier modifier at 50) I get this result on some frames:

There are some lines appearing out of nowhere. The model has a simple diffuse material (not rendered in passes). How can I solve this without losing the sketchy style?
Here is a succesful image:

And the blend file:
http://pasteall.org/blend/40571
Frames 21 and 24 illustrate the problem.
Thanks in advance.

It's hard to tell without seeing your scene setup. Could you show a bit more? How many objects are there? Does the "random line" appear also in render from other camera's points of view (same frame)?

Please show a successful image and a failed image minimum.

Edited the question, including the blend file and another screenshot

source: Stack Exchange

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

sort: votes


text:
Pivot point not working in Python script
I'm making a script that takes the selected object (a curve) and:

Moves the cursor to it's origin
Gets the rotation of the object
Enters edit move
Rotates all the points of the curve the amount 'n' (the rotation of the object) around the 3d cursor
Exits edit mode
Eliminates rotation of the object.

Here's the code:
import bpy

scr = bpy.context.window.screen
v3d = [area for area in scr.areas if area.type == 'VIEW_3D'][0]
v3d.spaces[0].pivot_point = 'CURSOR'

bpy.context.scene.cursor_location = bpy.context.active_object.location

n = bpy.context.object.rotation_euler[2]

bpy.ops.object.mode_set(mode='EDIT', toggle=False)

bpy.ops.curve.reveal()
bpy.ops.curve.select_all(action='SELECT')

bpy.ops.transform.rotate(value=n, axis=(0, 0, 1), constraint_axis=(False, False, True), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1)
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)
bpy.ops.object.rotation_clear()

However, it doesn't rotate around the cursor but an arbitrary point. Any ideas?
EDIT: Updated the code, still not working. Here's my blend file: http://pasteall.org/blend/40360

Have you tried bpy.context.space_data.pivot_point = 'CURSOR'

@sambler I'm getting this: AttributeError: 'SpaceConsole' object has no attribute 'pivot_point' :(

You will want to set the pivot point to use the 3D cursor. As the pivot_point is a property of SpaceView3D, you will want to find the 3DView in the current screen areas, then change it's pivot_point to CURSOR
scr = bpy.context.window.screen
v3d = [area for area in scr.areas if area.type == 'VIEW_3D'][0]
v3d.spaces[0].pivot_point = 'CURSOR'

Still not working :/

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


text:
Creating a tileable mesh
I'm trying to model a simple curtain, which will need to be tiled horizontally. How can I make sure it looks well when tiled?
Here's a video about the problem:
https://youtu.be/51uqrzNm0Q8

Edit it while you have an array modifier actually active. We will need more specifics to give a more specific answer.

Updated my question

Been trying this on and off for some time. For this particular mesh, if the shape is that simple, you can just copy the mesh, and flip it the other way, whichever axis it goes across, scale it to -1


text:
Movie editing: low FPS on preview
[SOLVED] A friend suggested me the solution. The problem was the FILE CODEC. Smartphones often use H264 codec that are awful to decode on the fly, so preview will hang even with a decent hw. Ironically, a 100 Mb video file from a smartphone (LG G3 in my case) can be heavier to decode on the fly than a 1 Gb file encoded with Xvid (wich probably isn't the best option for a video edit, but at least prevents sluggishness).

I'm stuck in this problem and I don't know if it's a software problem, hardware problem, an OS problem, a codec problem or what.
I'm managing multiple 4k files made with my LG G3.
When I start playing preview, after about ten seconds, FPS value falls down and become sluggish.
Same problem with other movie editors: tested it with OpenShot, KDEnlive et al.
Av-Sync enabled.
Frame rate specified.
Tried also to re-encode with Handbrake (thought it was a codec problem) but with no luck.
Sw details:
Blender 2.76
Lubuntu 15.04 64 bit
Installed and running all media codec of this and even the parallel universe
Hw details:
Xeon E3-1241v3 quad core 3.5
16 Gb RAM 1600
SSD
VGA MSI GTX 970 oc
... so I cannot believe it's an hw problem.
RAM, GPU and CPU sensors show me that PC is almost bored (near 3% usage, temperatures around 30°C).
Maybe the same old problem with pulseaudio?
So... what can I do?

you have to create proxy, i think to lower the resolution in the preview windows.

A friend suggested me the solution.
The problem was the FILE CODEC.
Smartphones often use H264 codec that are awful to decode on the fly, so preview will hang even with a decent hw. Ironically, a 100 Mb video file from a smartphone (LG G3 in my case) can be heavier to decode on the fly than a 1 Gb file encoded with Xvid (wich probably isn't the best option for a video edit, but at least prevents sluggishness).

Why does it happen?
There is a very simple explanation to this: to increase performance of various things (including video playback), Blender has a fixed-size cache in your RAM. Using this Blender preloads frames into quicker memory for faster playback (this is what you see for the ten first seconds.). When the cache fills, Blender starts doing the following:

Read the frame from the hard drive
Decode the frame
Push it to the cache (overwriting whatever was in the way)
Read it from the cache and draw it on screen.

This is slower because:

You are limited by the speed of your hard drive.
Decoding the frame takes time
Pushing things to the cache is an extra overhead.
The processing time used up by the above is taken away from actually playing back the video.

This explains the overall sluggishness.
How does one solve it?
You can adjust the size of the cache: in User Preferences > System > Memory Cache Limit. I personally advise using as much as you can manage. It also reduces the amount of crashes due to memory leaks (this is especially true on Windows). A bigger cache means a faster Blender in general.
Also, you can make Blender prefetch frames in the Clip Editor and Sequencer. Do this by going to User Preferences > System > Sequencer / Clip Editor. I hope this helps.
Also have a look at:

How to make VSE render faster?
http://blenderartists.org/forum/showthread.php?349186-Does-Blender-has-a-cache-size-limit-(per-frame)

[Edit]
If the codec is slow to decode, having frames cached is even more important.

Thank you, the problem was on the file codec, but I appreciated your useful tips.
Marked as solved.

Sorry to bother you, but are you sure you marked this as solved?

Sorry, I'm quite a lurker.
Thank you for your suggestion.
Fixed.

Where can I find the options you mentioned in Blender 2.78? I only have found Sequencer Memory Cache limit, but not Memory limit for Blender in general nor the prefetch frames option you mentioned.

If you make the video a proxy, it reduces the resolution of the preview so it doesn't have to render a large file size, but also keeps the original intact. This video explains how to do it.
https://www.youtube.com/watch?v=KZl1xS9Lmvw

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


text:
Blender is running too slow
First it longs about 20 min only showing the terminal window.
Then when blender starts, if i want to import a file, or save a file, it lasts another ~20 mins showing "blender (no responde)"(Blender is not responding) before doing what I asked.
My OS is Windows 7 (64 bit) and i'm running Blender in Spanish. I first downloaded the installer and installed it, then uninstalled and then downloaded the ZIP version. In both versions the result is the same.
Not long ago since I format the pc. And when i first installed Blender (about a month ago) it ran ok.
This monday was the first time i noticed that behavior...
(sorry for my english :) )

try to use the task manager to see if, when this happens, another process is using most of the available cpu so that Blender is so much slow. It could be an antivirus, or a svchost process doing something like updates in the background. How many cores have your cpu (see performance tab in task manager), and are they all 100% because of which process?

I'm voting to close this question as off-topic because it's not about how to use Blender but about figuring out why Blender is running slowly (Often this has nothing to do with Blender but the OS or some other program.

8 cores (4+4HT). No antivirus installed.
No process that consumes more than 1% of the CPU.
The CPU is at 1%-7% of use.
Anyway, now i think this is not Blender's failure because now Firefox ( ^^U ) is doing something like that.
I'm going to reinstall Windows today.
Thank you anyway.
(sorry for my english again)

good luck @BATIS !


text:
Rotate bmesh around Vector with Python
I try to rotate a bmesh around a vector as axis.
vec = vert1.co + vert2.co
rot = mathutils.Euler(vec/max(vec)).to_matrix()
bmesh.ops.rotate(bm, cent=vert2.co, matrix=rot, verts=bm.verts, space=objCT.matrix_world)

But unfortunately it rotates in a strange way. How could I fix this?

do you have some answer for this??

@batFINGER do you have some explanation to this issue??

@yhoyo I'm not sure what the q'er wants to do here. What vector are you getting by adding two (which two and why those two?) vert coordinates and dividing by max(vec) ( assume here:want a unit vector for that one vec.normalized() )   Euler(vec) is not gong to give any sensible rotation matrix, considering for a start the vec is in length units, the euler expects angles.  rot = Matrix.Rotation(angle, size, axis) might be a better idea.

Rotate bmesh vertices around a vector defined by two selected verts.
Test script, rotates 45 degrees around the vector defined by two selected verts.  Select two vertices and run script. Running 8 times should rotate the full sweep.
import bpy
import bmesh
context = bpy.context
from mathutils import Matrix
from math import radians

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

# have 2 verts selected.
v1, v2, *_ = (v for v in bm.verts if v.select)
axis = (v2.co - v1.co).normalized()
rot = Matrix.Rotation(radians(45), 4, axis)
bmesh.ops.rotate(bm, cent=v2.co, matrix=rot, verts=bm.verts)

me.update()

Note: because our rotation matrix is using an axis and both v1 and v2 are on the axis,  either (or any point on) can be used for cent property of operator .  The centre point would be calculated via v1.co + axis / 2 or (v1.co + v2.co) / 2

I am trying to do something similar but running into problems, so this is not an answer but a question about a slightly more advanced usage of this script.
I am also trying to rotate bmesh around Vector, but I only want to rotate the selected faces, not the whole mesh, around the Active Edge. Also, before that, I want to do an extrusion with 0 distance, so that the rotation kind of has a new segment. My problem is that I get this extra geometry. I read that I am supposed to delete the geometry that bmesh.ops.extrude_face_region() uses to make new geometry. I have tried that as well but blender crashes every time when I use bmesh.ops.delete(). So I have that part commented out in my script. Could anyone help me avoid the weird extra geometry when using this script. Again, this will work with copy-past into the Text Editor and Run Script, while having a mesh in Edit mode with one Active Edge.
import bpy
import bmesh
context = bpy.context
from mathutils import Matrix
from math import radians

obj = context.edit_object
me = obj.data
bm = bmesh.from_edit_mesh(me)
selected = [v for v in bm.verts if v.select]
face_sel = [f for f in bm.faces if f.select]

edge = bm.select_history.active
axis_rot = (edge.verts[0].co - edge.verts[1].co).normalized()
rot = Matrix.Rotation(radians(45), 4, axis_rot)

r = bmesh.ops.extrude_face_region(bm, geom=face_sel)

# DEL_VERTS = 1
# DEL_EDGES = 2
# DEL_ONLYFACES = 3
# DEL_EDGESFACES = 4
# DEL_FACES = 5
# DEL_ALL = 6
# DEL_ONLYTAGGED = 7

# bmesh.ops.delete(bm, geom=face_sel, context=DEL_FACES)

bmesh.ops.rotate(bm, cent=edge.verts[0].co, matrix=rot, verts=selected)

me.update()


text:
Lie object on a surface
I'm trying to lie a object on a surface for 3D printing it afterwards.
In other words, I want to find a way to automatically position a complex object the best way on a printing table. Here is a sample picture of an object:

Therefore my idea was to use the gravity aimation of blender:
ctx = bpy.context

obj = ctx.scene.objects.active
ob.select = True

bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_MASS')
obj.location = (0,0,0)
bpy.ops.object.transform_apply(location=True, rotation=True, scale=False)

bpy.ops.rigidbody.object_add()
obj.rigid_body.type = 'ACTIVE'
mod_col = obj.modifiers.new('col', 'COLLISION')
bpy.ops.object.modifier_apply(apply_as='DATA', modifier='col')

plane = bpy.ops.mesh.primitive_plane_add(radius=(obj.dimensions[0]+obj.dimensions[1]), location=(0,0,(obj.dimensions[2]/(-2))-1))
plane = bpy.context.active_object
plane.name = 'Plane'
bpy.ops.rigidbody.object_add()
plane.rigid_body.type = 'PASSIVE'
mod_col = plane.modifiers.new('col', 'COLLISION')
bpy.ops.object.modifier_apply(apply_as='DATA', modifier='col')

ctx.scene.frame_start = 0
ctx.scene.frame_end = 250

bpy.data.scenes['Scene'].gravity[2] = -50
bpy.ops.screen.animation_play()

if scene.frame_current == 249:
    bpy.ops.screen.animation_cancel(restore_frame=False)

obj = ctx.scene.objects.active
bpy.ops.object.transform_apply(location=True, rotation=True, scale=False)
bpy.ops.object.visual_transform_apply()
bpy.ops.object.anim_transforms_to_deltas()
plane.select = True

bpy.ops.object.delete()

Till now the animation won't stop at the last frame.
Is there a better way to lie the object flat and if not, how can I stop the animation at the last frame?

De facto tool for something like this is shrinkwrap modifier, but I don't know how it'll work for your case. Can you provide screenshots for clarification of what your models look like and what you're trying to do?

Thanks for your reply, I uploaded a screenshot. How could I use the shrinkwrap modifier to do this?

So you want it just want it snapped to the surface of another object? Have you looked at this?


text:
How do I restore my User Preferences>System panel?
I went to User Preferences > System panel to change my viewport anti-aliasing settings, but all I see is this column:

I'm using Blender 2.78c, on Windows 10.
Here is what I'm expecting to see, screen-capped from an older version that I have installed (2.77a):

I've tried uninstalling/reinstalling Blender and updating my graphic card drivers (Geforce GTX 980).
I've also tried Loading Factory Settings without any luck.
Edit: I just opened the info panel up and I'm seeing this error, it seems like it might be relevant:
"
Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender\2.78\scripts\startup\bl_ui\space_userpref.py", line 433, in draw
    userpref.addons['cycles'].preferences.draw_impl(col, context)
AttributeError: 'NoneType' object has no attribute 'draw_impl'
location: :-1
"
It seems switching to Cycles and making the Viewport Draw Mode as 'Rendered' causes Blender to crash.
Any help is greatly appreciated!

I was able to solve this by disabling the Cycles Render Engine in the Add-ons panel, this let me restore the System panel to how it should look.

As for getting Cycles to work again now, I'll ask another question...

If this is reproducible, I would highly recommend creating a bug report at developer.blender.org


text:
Make vertex paint affect mesh texture greyscale
I vertex painted my mesh. I then unwrapped and assigned a texture.
This is the node setup i used.

It is almost exactly what i want. But. The vertex paint is affecting the transparency of the uvmapped texture not the grey scale of it. I need this opposite.

A transparent shader converts the brightness of the input image to transparency. There is no such thing as "grey scale of a transparent shader", because the transparent shader only absorbs light (based on the color and value of it's input). To get a white feedback of the shader (independently of the background), you need to use a shader, which reflects the light based on the brightness of your attribute. To archive your objective, you have to input the factor of your attribute (your vertex paint layer) into the diffuse shader:


text:
run a text block from command line
using this command blender --help to get more help about Blender command line options, you can find this snippet

--python-text <name>
      Run the given Python script text block

So if I'm not wrong, this means that I can specify the name of text block which I would like to auto run at Blender start.
So my final command will look like this:
blender --python-text my_text_block_name scene.blend
Where "my_text_block_name" is the name of text block I wrote and save right in my blend file.
But, when I run this command, I have the following error.

Error: text block not found my_text_block_name.

What I'm doing wrong?
EDIT:
I'm using the latest official version of Blender for linux 64bit available at this moment (2.76)

Unlike most command line programs the order of the options make a difference. The thing to remember is that blender executes each option in the order they are given, almost like a mini script.
The command you used blender --python-text my_text_block_name scene.blend says run this text block then open this file.
To get your example working you want to open the blend file then execute the text block - blender scene.blend --python-text my_text_block_name
More details about Blender command
and some example of how order works.

I tested it and you're right, order matters. Do you know where to find more official info about this or this is just "user experience" :) ?

It is documented in the manual, but doesn't really give a lot more info.


text:
Gradient color in blender

I want the color of my object look like the photo above. I have tried many ways i saw in youtube but none of them worked can anyone show me how?

i made texture here but i don't know how to assign it
It actually worked in blender cycles thanks
But why when I shift to blender render I see white ??

Related answers (but using Cycles): http://blender.stackexchange.com/questions/22929/how-to-create-a-gradient-texture , http://blender.stackexchange.com/questions/36734/how-to-create-a-gradient-colour-like-on-the-picture-and-the-apply-it-on-a-mesh

In Edit Mode unwrap the mesh (select the whole mesh with A, then press U-->Project From View).

Add a new material and go to Texture header. Add a new texture, set its Type to Blend. In Blend panel click the Vertical button. You may also change the Progression type to Easing for smoother colors transition.


text:
Can Freestyle draw lines when an object is behind a transparent plane?
Can Freestyle draw lines when an object is behind a transparent plane (or any other transparent object)? The render below shows the issue, the freestyle lines that should be drawn on lower arm and hand don't get drawn.

Visibility is computate without considering textures alpha.
From the a Blender reference manual's page on the topic, one of the known limitation is:

Transparent faces are treated as opaque faces

Blender is currently (2.76b) not able to distinguish transparent surfaces from opaque surfaces, I would guess it will unlikely be able to use the alpha channel of a texture the way you planned.

A possible workaround for your particular situation may be to separate the freestyle render layer, move all the object that could occlude the freestyle lines on a separate layer and exclude it from the freestyle render layer.
Masking the layer would be the perfect option, but sadly is currently another of the known limitations:

Layer masks do not work with Freestyle.

'Suzanne in Hell'
In the image above you can see how the selected plane is on the layer 10 (the yellow dot in the layer selector), which is the same layer not highlighted in the freestyle render pass (just behind the cursor).
Next step is to hide the lines behind the "solid" texture of the plane. In this example I used the Z channel of the first render layer:

With a "Greater Than" Math node filled with an appropriate value (must be animated if the camera is moving fowanrd and backward) I isolated the part of the scene far away from the camera and used this mask as a factor form alpha mixing the layers.

Note: Z-pass is not anti-aliased; in a the previus scene this doesn't reperesent a big a problem, but, if needed, you can use in the same way the Mist pass (which is anti-aliased, but take a few more steps to be set up)

awesome answer carlo, I'll see if I can set up a composter solution, thanks!

An alternative solution was to add a 2nd scene and copy and paste the transparent plane from the original scene into it, then deleting the plane in scene 1. I also made a linked copy of the camera in scene 1 and added it to scene 2 in scene 1: 3d-view, select the camera and then click Object/Make links/
Composting nodes setup as shown below (node setup in scene 1):

Make sure not to render the sky in scene 2! (ö)

It cannot. You can set freestyle to ignore occlusion completely, but then it will draw lots of lines that you don't want as well. You could have the transparent object be on a separate layer that freestyle ignores, but this may cause other layering issues.

Thanks for the reply. I can't get it to work using multiple layers either, so I'll try composing instead....


text:
How to create a new camera that matches the active 3d-view, can it be done?
Can one add a new camera in the 3d-view that matches the current view in that viewport? Is there a quick-key shortcut?
If, for instance, you have a 3d-view port set to orthographic, the added camera would also have to be orthographic and the orthographic scaling would have to be some certain setting etc, for the camera to match whats seen in the viewport.
Can this be done when creating a new camera?

I don't know of a single hotkey to do this, but you could add a new camera and snap it to the view with [Shift]+[A] > [R], [Ctrl]+[Numpad 0], [Ctrl]+[Alt]+[Numpad 0].

@Knuckles209cp I don't think so, that question is asking about aiming a current camera at an object, this person is asking for a way to add a camera and set it to the view.

"The absolute quickest way to do this is to find a good position in the 3d viewport by navigating as normal with the mouse. Next, select the camera and use Ctrl + Alt + Numpad0 or from the 3d view header, View > Align View > Align Active Camera to View to position/point the camera in the direction you are facing in the viewport.
"

@PGmath Just [Shift]+[A] > [R], [Ctrl]+[Alt]+[Numpad 0] without the [Ctrl]+[Numpad 0] :)

Close enough for my purposes, but it would be cool if one could add a camera and not have to reposition, align and set parameters manually. Thanx for answers!


text:
Why is Blender still rendering the old image after the .blend file has been changed
The first image is the old .blend file. I'm running blender 2.76 on linux mint
The original file is the one that shows up when I type F12

This is the new file.
As you can see the  difference is in the orange (selected).
There is no video sequence file to remove as a previous answer suggeted.

Did you add a new shapekey after making the changes in edit mode?

@TLousky No shapekeys used at all

@cegaton, I sent you the .blend file in a prior question. Can't remember how I did the upload.

The question was posed by someone else.

And no, no keyframes.


text:
Is it possible to import tensorflow into blender?
I am trying to import tensorflow into blender, but I get an error when I do. It says
 RuntimeError: module compiled against API version a but this version of numpy is 9
Traceback (most recent call last):
  File "/Users/me/project/bin/Script.blend/Text", line 6, in <module>
  File "/Users/me/project/bin/TensorFlow.py", line 7, in <module>
import tensorflow
  File "/Users/me/project/lib/python3.4/site-packages/tensorflow/__init__.py", line 23, in <module>
from tensorflow.python import *
  File "/Users/me/project/lib/python3.4/site-packages/tensorflow/python/__init__.py", line 50, in <module>
from tensorflow.python.framework.framework_lib import *
  File "/Users/me/project/lib/python3.4/site-packages/tensorflow/python/framework/framework_lib.py", line 62, in <module>
from tensorflow.python.framework.ops import Graph
  File "/Users/me/project/lib/python3.4/site-packages/tensorflow/python/framework/ops.py", line 40, in <module>
from tensorflow.python.framework import versions
  File "/Users/me/project/lib/python3.4/site-packages/tensorflow/python/framework/versions.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow
  File "/Users/me/project/lib/python3.4/site-packages/tensorflow/python/pywrap_tensorflow.py", line 28, in <module>
_pywrap_tensorflow = swig_import_helper()
  File "/Users/me/project/lib/python3.4/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow', fp, pathname, description)
  File "/Applications/Blender/blender.app/Contents/Resources/2.73/python/lib/python3.4/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
SystemError: initialization of _pywrap_tensorflow raised unreported exception

How can I import it without the error? It works well outside of Blender.
I'm using Blender 2.73 and it uses my local python 3.4.2.

Can you give us a step-by-step of how you got this error?  Also, is this the entire error you received?  I tried importing it a specific way, and while the last line is the same as yours, there's a bunch of stuff preceding it too.

I got the error from putting the line "import tensorflow". I did have a bunch of stuff before it but I wasn't sure if that was part of the error.

If we see the entire error message we might be able to help you more.  For instance, the error I had started with something about the version of numpy its using.

The problem: Blender has bundled numpy with a version not compatible with your tensorflow version.
Solution: Use a blender version with a compatible bundled numpy.
I imported it on my machine successfully with Blender 2.72b with my system python  3.4.3
I use Gentoo Linux but it should not be problem. Please try Blender 2.72b

How does one check for version compatibility, to know which Blender and which TensorFlow to use? (Assuming the most recent compatible match is desired.)

if you want to solve any compatibility problems you can execute your tensorflow code outside of blender environment.
On blender you can execute your code using os library. You can read output with the standard output, formatting it with json.
import subprocess
from subprocess import STDOUT

app_path = "python3 yourdir/yourapp.py"
youroutput = subprocess.check_output(app_path, stderr=STDOUT, shell=True)

How can I execute the code outside of the environment?

It depends on the OS that you have. Using the module subprocess you can do this:
youroutput=subprocess.check_output("python3 yourdir/yourapp.py", stderr=subprocess.STDOUT, shell=True)


text:
It is possible to check if a particle is within a face?
I have a particle system and I wanted to see which face each particle was in. Is there a way to check it? I have tried to check x, y, and z coordinates separately but that would not work. Also is there a way to see which vertices a face has?
These are the faces and the particles:

I would like to check which face each particle is in so that I can find probabilities.

If a face generates a particle would you like  change the particle material based on that info?  Is the question location related? If so ..... May we ask what you will do will do if a particle is within a certain distance of a (XYZ) location ?  For example would you like to you change the material of the particle?

I would simply have the information stored and collect it for each particle.

Sometimes knowing how the information will be used in Blender allows suggestions in Blender. I respect privacy.  Perhaps an image submitted by you would help.

Using the particles location vector, and the closest_point_on_mesh method.  The particle location is  in global coords.  We can see this by moving the emitter in the UI, the particles remain in their world position and need to be re(bake)calculated.
As pointed out in https://blender.stackexchange.com/a/40979/15543 you need to put the location passed to closest_point_on_mesh into the objects local space, otherwise it will give unexpected results once the object's matrix_world is no longer the identity matrix.
The particle location is multiplied by the inverse matrix world of the emmitter object, to put it into that objects local coordinates.
I'm using a build of 2.76.4 and it appears closest_point_on_mesh has a new return value,
>>> C.object.closest_point_on_mesh((0,0,0))
(True, Vector((0.9999996423721313, -2.980232238769531e-07, 0.0)), Vector((1.0, 0.0, 3.2782557468635787e-07)), 2)

The first being success of operation, the others: location vector of closest point; normal vector; and face index.
The script below prints how many particles are closest to each face.
import bpy
context = bpy.context
obj = context.object

mwi = obj.matrix_world.inverted()

ps = obj.particle_systems.active
facelist = []
new_version = bpy.app.version == (2, 76, 4)

print("-" * 72)
print("Obj: %s Particle System: %s" % (obj.name, ps.name))
print("-" * 72)

for i, p in enumerate(ps.particles):
    v1 = p.location # global particle location
    localPos = mwi * v1  # particle in obj local space
    if new_version:
        (found, loc, norm, face_index) = obj.closest_point_on_mesh(localPos)
        if not found:
            continue
    else:
        (loc, norm, face_index) = obj.closest_point_on_mesh(localPos)

    facelist.append(face_index)

mesh = obj.data
for fi in set(facelist):
    vertstr = str([v for v in mesh.polygons[fi].vertices])
    print("face %d,  verts: %s particle count:%d" % (fi, vertstr, facelist.count(fi)))

Sample result default cube, default particle system
------------------------------------------------------------------------
Obj: Cube Particle System: ParticleSystem
------------------------------------------------------------------------
face 0,  verts: [0, 1, 2, 3] particle count:180
face 1,  verts: [4, 7, 6, 5] particle count:168
face 2,  verts: [0, 4, 5, 1] particle count:161
face 3,  verts: [1, 5, 6, 2] particle count:169
face 4,  verts: [2, 6, 7, 3] particle count:150
face 5,  verts: [4, 0, 3, 7] particle count:172

Each particle system has a list of it's particles which have a location. This location can be passed to object.closest_point_on_mesh() to find the index of the closest face. We can then get the vertex indices used to build the face.
The following will assign a material to the faces touched by a particle then print the vertex indices for each face.
import bpy

obj = bpy.context.object
obj_polys = obj.data.polygons

for pidx, ps in enumerate(obj.particle_systems):
    for p in ps.particles:
        face = obj_polys[obj.closest_point_on_mesh(p.location)[2]]
        face.material_index = pidx + 1
        print('Face',face.index,'uses verts -', end=' ')
        for vidx in face.vertices:
            # vertex is obj.data.vertices[vidx]
            print(vidx,end=' ')
        print()

This will work for hair type particle systems (not sure how to do this for a non-hair PS at the moment). Copy to a new text file, select the object that has the particle system and press "Run Script".
import bpy, bmesh

o = bpy.context.object
ps = o.particle_systems[0]

bm = bmesh.new()

bm.from_mesh( o.data )
bm.faces.ensure_lookup_table()
bm.verts.ensure_lookup_table()

for p in ps.particles:
    co = p.hair_keys[0].co
    fIdx = o.closest_point_on_mesh( co )[2]
    print( "Face Index: ", fIdx )

    print( "Face Vertices: ", [ v.index for v in bm.faces[fIdx].verts ] )


text:
Array modifier questions from a beginner
I am following a tutorial at https://www.youtube.com/watch?v=emT-CL957HE
Around 19:30, how does he turn off the array modifier for the duplicate? No matter what I do, they seem to share the same behaviour ie shadow the parent - can't figure out how he did it in the video.
Some other questions:
-What is the significance of Ctrl-L (at 18.30 and 20:00) and when is it used? I can't find any good info on the net that can provide a good example of the usage especially in the above context.
-What is the purpose of clicking Apply? Is there something that is irreversible once Apply is clicked?
Thanks in advance.

19:30 He basically duplicate the set of windows with CtrlD and then proceeded to deleting the array modifier that was copied during the duplicate fuction.
18:30 Ctrl L - It's basically a quick method to select a mesh and all it's joined elements. This is extremely useful if you have multiple sub-meshes joined together to form the main object. Sometimes you may want to select that one sub-mesh to apply a material or hide it temporarily.
Applying a modifier makes it permanent and irreversible. However you can undo it if it's still within the undo range. Usually you will want to apply modifier at the end of the modeling process.

Extra Note
Personally, I usually just hit L, this works in UV editor mode too when you want to select a UV island.

There is a difference between L and Ctrl-L, in edit mode (or uv mode in image editor) - L will select items linked to what is under the cursor while Ctrl-L will select items linked to the current selection. For completeness -  In object mode L is for "Make Local" and Ctrl-L is "Make Links". In the graph editor L will select all points on the active curve. In the node editor Shift-L will select nodes connected to the output of selected nodes.

1.) He just duplicates the object and turns off the array modifier, then rotates it 90°, duplicates it again... It has nothing to do with parenting.
2.) With CTRL+L you can make links, that means you can copy (link) e.g. all modifiers from one object to another. I think in the video he just mistyped.
3.) He needed to click apply because otherwise the error you saw in the video would happen. It's not actually an error, by joining the object with the modifier to the object without the modifier, the modifier gets lost. So he has to apply it first. Once applied the array modifier as well as all other modifiers can't be restored indeed. If you fear that, make a copy to another layer first, then apply.

No. 2 is wrong. Ctrl L "make links" only work in object mode. He invoked Ctrl L in edit mode which is different.

Thanks guys. I found the solution to (1) - I should make a duplicate first, then select the original array in Object mode and click "Apply" to the original array. I will then lose the ability to change the modifier settings to the original array. Next I select the duplicate, the modifier is still on for that duplicate and I can modify the number of copies for the duplicate. So, clicking "Apply" in this context helps me to separate the modifiers betw the original array and the duplicate.

For (3) the order of joining is important as per https://au.answers.yahoo.com/question/index?qid=20110810165839AAnZR0K but I am wondering as per Bortran's comments, whether clicking "Apply" will mean that the modifier of the first object will never be overridden.


text:
Linux x86: can't Open Blender
my x is configured to execute blender (v.2.76b) but when I try to run the executable from terminal, It gives back this error:
$ ./blender
connect failed: No such file or directory
Read new prefs: /home/user/.config/blender/2.76/config/userpref.blend
Xlib:  extension "GLX" missing on display ":0.0".
intern/ghost/intern/GHOST_WindowX11.cpp:177: X11 glXQueryVersion() failed, verify working openGL system!
initial window could not find the GLX extension
Writing: /tmp/blender.crash.txt
Segmentation fault (core dump created)

what I don't read is why it prints:

connect failed: no such file or directory

My O.S. is ubuntustudio 14.04 LTS, no blender pre-installation.
Blender downloaded from the official website.

problem of booting blender has been solved re-installing NVIDIA drivers.


text:
any way to deform normals?
These meshes need to be scaled up or moved along their normals.
ZZ works pretty well but they, obviously, go straight on their directions...
Any way to deform these normals to follow a circular path around the current 3D-cursor? or origin as well..

update:
I solved this way:

pivot to 3D-cursor
trasformation orientation to normal
extruded meshes
rotated meshes

If I understand this correctly This could be easier to achieve with the help of some modifiers.
If you model a single cog and use a mirror modifier to make it's symmetry it will simplify the process so that you only have to rotate two edges in one direction. Followe that by adding an array modifier to accomplish the whole gear it will take care of the rest.

It was not what I meant.. but It let me to a similar solution! added an update to the question! Your solution is surely a better way of creating gears! I started from extra objects: gear add-on :)


text:
How to refresh applied fonts?
I'm creating a font ad-hoc and modifying It as I need time to time..
Any way to reload the font file linked to the *.blend file so all text objects are immediately refreshed?
Now I need to reload the font file for every text object at every modification...
Is there maybe a way to apply the font to a material via nodes? (or something like [maybe a script?])

Through the interface there is currently no way to replace the file for an existing font (ideally this would be supported),however from Python you can do this.
eg, run this script:
import bpy
bpy.context.object.data.font.filepath = '//some_font.ttf'

However in 2.76 there is a bug where this won't update immediately (just fixed).
So you have to do...
import bpy
bpy.context.object.data.font.filepath = '//some_font.ttf'
bpy.context.object.data.update_tag()

You could set the file-path to its self to force reloading too.

It works! but I'm missing something basic... how to apply this to all the selected text objects and not only the active one?

ock! found out how to do that and discovered an alternative solution! ^_^ thanks for your precious work ideasman!!!!!!

@FrancescoYoshiGobbo, could you post your solution as an answer? (so anyone who finds this question can use it).

Found out an alternative solution:
Will perform this task performing a selection of all the 'font type' objects by

text object selection RMB
select grouped shiftG: Type T
change the font of the only active element
make links CTRLL: Fonts F

This update applies to all the selected text objects!


text:
any way to let 2 sub-programs to talk each other?
Can these 2 nodes, someway, talk each other? Or a sub-program is only an end stage?

I still have to fully understand the dynamic behind these cool sub-programs..
Is maybe necessary creating something that stand "on the middle"? like a script by the sub-program, don't know....

EDIT:
I'm trying to automate the position of the scotch according to the position of the picture's vertices, the way I've done yet with the pictures and the picture's paper to the vertices of a grid :)
I just miss the scotch.. I searching a way to use the vertices by the looping sub-program...
A little difficult to explain, I know ^^"

e.thing red after linking..

the 2 subprograms I'm trying to connect. I need the position of those vertexes..

subprograms can have outputs that you can plug into the next subprogram. I'm not sure what you want to archieve here..

It gives back errors when doing that.. a sub-program can't link to another sub-program, as it says in the animation node tree's tool (T) menù once these have been linked..

Two subprograms can't be in one network, that is true. But you can invoke a subprogram from another subprogram. Hard to explain now. Could maybe explain what you want to archieve?

difficult to explain too.. ^^" I added an edit to the question with more details, hope It helps..

I wonder why you need this little loop on the right. Maybe a normal Object Transforms Output node would be enouph. The Object Mesh Data node on the right outputs a list of vertices. Do you need all these locations or just one? If you'd need them all it wouldn't make sense to apply them all to the same object...

I've not performed that yet.. I need next to separate the object into 4 singularities and so align to the 4 respective vertices of the image texture. I need all the vertexes, 4 scotch for picture, 245 pictures.. And I need to move them in future, this actually works by the grid, It salved me a lot of time.. the problem here is just the scotch.. But I will probably duplicate all the planes and use then as a group and so will link to a brand new loop sub-program.. I tested and works that way but I'm searching a more dynamic way to do that (without duplicating the 245 planes and create a group)..

I left nodes with holes because I need to replicate the situation.. I'd like to proceed the way I linked as pics but It doesn't work.. :)

hm not sure if I can help you with the project here on stackexchange.. sorry.  Maybe you should ask this in the Animation Nodes thread on BlenderArtists. The question is a bit too unspecifc to answer it in a single post..

Please provide a more specific guide on what you are trying to achieve and how are you trying to achieve it.

Look at Looch's solar system animation tutorial.  I'm thinking that perhaps you could use a group and use the Group Input and Invoke Subprogram on the group as a way to feed stuff across different animation nodes networks.  See my query about this in the  on blenderartists forums AN thread. http://lollypopman.com/2016/04/02/tutorial-an-solar-system/

groups seems the answer! gonna take a test and report back ASAP!!! thanks for the precious time of all of You so far!! :]


text:
How to import many images so assign to texture_node and duplicate "n" times objects and materials?
I am searching a way to:

duplicate a selected object and It's material 244 times..
import 244 photos (image_000, image_001, ...) in the scene
assign these images to an image_texture node (included in the material previously duplicated)
every material should have a name that follows the object's one: object.000 > material.000 ...

any way to do this? maybe by script.. I tried some but cannot find a way to duplicate last operation for more than one time
bpy.ops.object.duplicate()

My actual node setup is this:

I need to replace the actual image texture with another one that follows the same rule of images and materials: 000, 001, ... (or not.. I think this way It should be simpler and clear).

EDIT 01
in response to Parkuhr's answer:
something went wrong at line 29.. what am I missing? materials has successfully been created..is maybe because objects are missing? I started a new scene without objects/orphan data

EDIT 02 - ANIMATION NODES way
I currently figured out how to duplicate objects and it's materials by animation node
but not how to

make an independent material for each of these objects
linking the images to the texture node of every single material with the same end-name %0Nd

May I ask why you are doing this?

sure.. I'm gonna create a room full of paintings hanged to a wall.

Another approach you might consider is to make a picture object that uses a single massive texture that includes all the images. Then you can duplicate the object and change just the UV map to choose which image is shown. Or maybe use 4 such variations with a map of 61 paintings on each so as to avoid overloading Blender's Viewport (it tends to crash when textures are extremely large). Might keep farther away ones at lower resolutions as well. Would this be easier for you to manage than your current workflow?

it is so much interesting! actually i found out a quicker workflow by animation nodes... I reached the 245 objects and 245 materials I was looking for.. unfortunately I still have found out a way to sequentially link the pictures, the research continues... or maybe I will finish in entering material by material and so selecting picture by picture, uhm..

You could use the import images as planes add-on from preferences->add-ons to quickly import your 244 photos as a plane with matching dimensions. The add-on lets you set basic material options for cycles and bi on import.
The created planes and materials get the same name as the image. After import, you would just need to place the planes on the correct locations in your scene.

not exactly what I was searching for but It works! :) I didn't try importing more than an image in a row by that plug-in! COOL! It just works! I keep the question alive because I'm searching a way to duplicate an existing object and it's materials (solved by animation nodes) and so to link a given picture to a given material's texture node with the same end-name of %0Nd ^^ anyway thanks for the cool reply!

Here, have a script:
import bpy

# change these to fit your files
image_path = "img_{:03d}.png"
material_name = "mat_{:03d}"
num_images = 244

# create a group
node_group = bpy.data.node_groups.new('NodeGroup', 'ShaderNodeTree')

# create group inputs
group_inputs = node_group.nodes.new('NodeGroupInput')
group_inputs.location = (-350,0)
node_group.inputs.new('NodeSocketColor','Color')

# create group outputs
group_outputs = node_group.nodes.new('NodeGroupOutput')
group_outputs.location = (300,0)
node_group.outputs.new('NodeSocketShader','BSDF')

# create diffuse shader
node_diff = node_group.nodes.new('ShaderNodeBsdfDiffuse')
node_diff.location = (100,0)

# create links
node_group.links.new(group_inputs.outputs[0], node_diff.inputs[0])
node_group.links.new(node_diff.outputs[0], group_outputs.inputs[0])

for i in range(num_images):
    # create new material
    m = bpy.data.materials.new(material_name.format(i))
    m.use_nodes = True
    m.node_tree.nodes.clear()

    # create material output
    outputNode = m.node_tree.nodes.new('ShaderNodeOutputMaterial')
    outputNode.location = (300,0)

    # create node group and link to created group
    groupNode = m.node_tree.nodes.new('ShaderNodeGroup')
    groupNode.node_tree = node_group

    # create image node
    imageNode = m.node_tree.nodes.new('ShaderNodeTexImage')
    imageNode.location = (-300,0)
    # load image and set is as active
    imageNode.image = bpy.data.images.load(image_path.format(i))

    # link nodes
    m.node_tree.links.new(imageNode.outputs['Color'], groupNode.inputs['Color'])
    m.node_tree.links.new(groupNode.outputs['BSDF'], outputNode.inputs['Surface'])

This creates 244 materials, all linked up with a node group that you can edit (so you don't have to edit all 244). Remember to put in your full or relative file path in the image_path.

something went wrong at line 29.. what am I missing? added an image to the bottom of the question.. thanks in advice!

Copying the script ino the console messes up identation. You can just copy it into the text editor and press Run script.

I've already tried.. It return me "Python script fail, look in the console for now..." this is the reason why I tried by the console but I messed up identation probably ^^" I always try with a new file, nothing changes.. maybe could be easier something like: import images as planes, as coCoK said and so assign to these images the two group nodes and the image texture one You already build using the actual script?


text:
too much light causes noise
Usually happens the opposite.. but today I have too much noise caused by too much light! (at least, I suppose It is because of that...)

I have also Volume scatter and absorption applied to a cyclinder that surround an area lamp

Here my setups:

light:

and there's also an environment texture:

It is a part of the scene where all the lights are on for a while:

any idea on how to get rid of all this noise? It occurs only when all the lights are on.. as You can see from this render (same samples)

Doubling the samples solved the problem :)

As cegaton suggested, I've increased the number of samples (doubled) and the noisy decreased so much!! :)


text:
Custom Path for Save Versions
I love the save versions feature but not lovin' these versions to be saved next to my file.. I prefer them to be saved in another hard-drive or folder as well..

I can't find a configuration to change the path of these versions.. does It exist yet or should I suggest It? :)

There's an addon written by Jonathan Stroem to allow saving the backup blend files into a subfolder. I'm sure you could easily modify it to write the file somewhere else on your system.
Config blender to save backup files in subfolder

there ya go https://pastebin.com/3yVZrZMg just change the line 42 with the folder you want to save all your back ups. This is for linux


text:
index number by vertices? in animation nodes.. is it possible?
any way to give at this node a not unique index?

I mean.. can't figure out how to assign to It more than a value.. I'd like to align group's objects to vertexes of a grid. It actually works if using a instancer but this duplicate an object many times... not a group of individual objects.

Setting the index was not necessary, solved by adding an object list I/O to the loop node :)


text:
any way to erase group data-blocks?
I linked a group and so It's objects to the scene, then saved. Changed idea and deleted. Saved and closed blender. Opened It again and still find this group data-block in the *.blend file.
any way to delete this group? It doesn't let me link one more time that group ... [yes, I changed idea one more time]

I also have this orphan data that doesn't get deleted after closing blender.. It was on the linked group. Maybe correlated?

UPDATE
I also made a piece of the imported group, proxy. but then has been deleted.

Solved by right click on the linked group and then "unlink group".
It was possible only on this tab.

You'll find that sometimes you need to save and reload the blend file a few times to get rid of orphaned data.


text:
Do "no cached" simulations give the same result in multiple computers?
If a file has no disk cache and is rendered multiple times in multiple computers.. Does the physics simulation give the same result in every computer every time? (same file and not changin' the seed)

EDIT
Rendering with GPU and then CPU on different file locations gave same result.
Rendering on sheepit renderfarm splitting the frame into 8x8 tiles and so rendering on several different computers, gave corrected and same results.

If all the properties of a physics item are the same, then yes. Physics will work the same way everytime, if there is no dynamic wind simulation in your scene or something. Its blender, not real life.

for dynamic wind You mean like keyframed at the first frame with a noise modifiers applied? thank You so far :)

Yes, something like that. An outside force that makes the simulation have a different outcome every time you start it.


text:
CPU render result differs from CUDA's one on smoke
The final result of a smoke render differs if using GPU (NVIDIA 1050 Ti) or using CPU (AMD 1300X). Any idea why?
CPU render - Volume sampling 0.1 - Volume bounces: 0

CUDA render - Volume sampling 0.1 - Volume bounces: 0

Having tests I found it out that it is something related to the volume sampling. Decreasing the value solves partially the problem for the CPU so it becomes nearly the one obtained with the GPU but... there still are enormous differences.
No settings have been touched from render to render.
CPU render - Volume sampling 0.01 - Volume bounces: 15

CUDA render - Volume sampling 0.01 - Volume bounces: 15

BLENDER VERSIONS TESTED:
LINUX:

17:2.79.b.git3.32432d91-1 from the arch's repository.
2.79b official
2.79-c9608047472 experimental official
2.80-405c6c077f6 experimental official

in the 2.8 I can't bake so can't actually test... Is maybe the smoke simulation still under development?
BLEND FILE:

Opened bug report here: https://developer.blender.org/T55765

going to add to the question the blender version. in the meantime is this: 17:2.79.b.git3.32432d91-1 from the arch's repository.

have not tested, going to take a test with the official.

it happens also with the official one.

Yeah, this looks like a bug. CPU has a more optimized volume sampling method than GPU, but you shouldn't get differences like this. I'd recommend reporting this one to Blender devs

going to take also a test with latest experimental builds, if the thing persist i will open a bug report ^^

opened bug at: https://developer.blender.org/T55765

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


text:
Rendering transparent body and opaque edges
I want to create a material for an object such that the body is semi-transparent and only the border of the object is opaque or darker. Is it possible to develop a shader for this ? Or do we have to do through only compositing?

If you want to have the edges shaded and not the faces, maybe you should consider applying a modifier to the mesh: wireframe modifier, then applying the material normally.

I don't want all the interior edges to be visible either. Just the outermost edges (borders of the object) to be dark and rest of the object to be semi-transparent.

although "the border" is a fuzzy concept in 3d meshes, blender has freestyle that can render edges in a lot of ways, but it uses "linestyles" fro them, not regular "materials" as you could define for regular rendering...

Edit: I understand that the question might actually be about the visual borders of the object (the ones usually highlighted using the freestyle pass), not the edges of the mesh.
I'll however leave my (unfitting) answer below in case somebody else is looking for a solution more similar to this.

A solution could be duplicating your object, then:

assigning a transparent material to copy #1 (the greenish material in my example)
for copy #2, using a wireframe modifier and applying the material shown in the nodes setup below, which mixes a full white transparency and a diffuse shader, using the "Transparent depth" input as a mixing factor.

As you can see, back edges are hidden in this setup. You can display them by simply using a diffuse shader (i.e. bypassing the mix shader).

Be aware that this won't work if the object is seen through another transparent object: all the wires will be hidden in this case.

Duplicating is a good idea. I'll check if something can be done like that.

A workaround solution for shading only the borders could be using only one mesh (it needs to be highly subdivided!) and a material made of a mixer shader with: {Top shader: transparent} {Bottom shader: diffuse} {Fac: Fresnel, IOR = 1.03}. This will shade only those faces that are almost perpendicular to the line of sight.

This would work under the assumption that only the faces close to borders are almost perpendicular to the line of sight right, if I understood your idea correctly?

Yes, any other topology which is not at the borders but that sharply points towards the camera would be sketched


text:
Scaling works differently in GUI and from script
I am trying to scale a group of vertices. I changed the pivot point to 3D cursor. I placed the cursor on of the corners of the square. I want to scale the vertices about this corner. When done in GUI, using the shortcut s+x (to scale along x direction) and a factor of 0.3, I get the following desired result.
When I try the same from a script, by placing the 3D cursor on the same corner and then do a bpy.ops.transform.resize(value=(0.3, 0.3, 0.3)) (or (0.3,0,0)), I get the result of what would have been if the cursor was at the centre (median) of the line as shown in the second figure.

Can someone tell why this difference?

It's a context issue and you need to Override the Context
The pivot point is a member of the 3D_VIEW space.  In code below would be area.spaces.active.pivot_point  Example of overriding the context which "fools" the operator into thinking it is being run from the 3D view, not the text editor.
import bpy
context = bpy.context
override = context.copy() # dictionary of context

for area in context.screen.areas:
    if area.type == 'VIEW_3D':
        override["area"] = area
        override["space_data"] = area.spaces.active
        override["region"] = area.regions[-1] # rule of thumb r.type == 'WINDOW'
        break

bpy.ops.transform.resize(override,
                         value=(0.3, 1, 1),
                         constraint_axis=(True, False, False))


text:
Baking image from script gives me a blank image
I am trying to bake image from the script in cycles mode. In my node structure, since I am baking in cycles engine, I am adding an extra image texture node, with image input of a newly created image (named uv_image) and I am making this uv_image texture node my active node. Now I select the object and do a bake using bpy.ops.object.bake(). Here is the code I am executing :
    uv_image = "UV_image"
    bpy.data.images.new(name=uv_image,width = 1024,height = 1024)

    mat = bpy.data.materials[material.name]

    nodes = mat.node_tree.nodes
    node = nodes.new('ShaderNodeTexImage')
    node.location = 300,0
    node.label = 'uv_image'
    node.name = 'uv_image'
    node.image = bpy.data.images[uv_image]
    uv_img = bpy.data.images[uv_image]
    node.select = True
    nodes.active = node
    for area in bpy.context.screen.areas :
        if area.type == 'IMAGE_EDITOR' :
            area.spaces.active.image = uv_img

    for ob in bpy.data.objects:
        if 'pattern' in ob.name: #object of interest has the name pattern)
            ob.select = True
            bpy.context.scene.objects.active = ob
        else:
            ob.select = False

    bpy.ops.object.bake(type='COMBINED')

The output baked image is blank when I am doing this from the script without any texture baked and it happens instantaneously. (Usually bake takes a few seconds) But when I execute the code without the bpy.ops.object.bake() statement and hit the bake button in GUI, the baked image is perfect. Another observation is that, once I bake in GUI, from then on, when I execute and bake from script, it works. So, everytime I need to bake it in GUI once to get this code working from script. It is really frustating!
EDIT 1:
By using bpy.ops.object.bake('INVOKE_DEFAULT', type='COMBINED'), I can see the texture getting baked well on the uv_image but when I tried to save the baked image through the following lines of code which follow the bake statement, I get a blank image in the destination folder. I think image is getting saved before it is getting updated with the baked texture. I tried to include image.update() before saving but that did not help.
 for image in bpy.data.images:
    if "UV_" in image.name:

        image = bpy.data.images[image.name]
        scene=bpy.context.scene
        scene.render.image_settings.file_format='JPEG'

        image_path = img_path + str(cg)+"_"+image.name+".jpg"
        image.save_render(image_path,scene)

EDIT 2:
If I add a time delay in the following way:
import time
time.sleep(60)

and I wait till the bake is complete and then save, then the image is saved after the entire bake. So, I am guessing that INVOKE_DEFAULT runs the baking in parallel without blocking the image being baked? Is this correct? Can someone help me find the documentation for INVOKE_DEFAULT along with other parameters ?

I have tried your script and it works... so there may be another contextual reason if you don't obtain the result ?

Yea, I think so too. Any idea how to get the same context from code?

No... can this help you to compare ?

Try bpy.ops.object.bake('INVOKE_DEFAULT', type='COMBINED')

Seems to work for now. Thanks! I'll run it more and update the status again in a couple of days.

Hey, I am encountering a problem. I follow the above code, then do a bake using bpy.ops.object.bake('INVOKE_DEFAULT', type='COMBINED') and then save the baked image in the script. When I run the script, the blank image is getting saved before it is getting baked. So, in GUI, the UV_image is getting baked well, but the image is saved before it is baked.

Hi ! Have you enhanced/modified your script since your last message ? It could be very usefull for my actual problem, even in this actual state (http://blender.stackexchange.com/questions/60249/batch-selected-to-active-baking) :)


text:
Backface visibility for Blender exported JSON files
When I export a model from Blender to three.js, it loads fine on the webpage. faces are visible only when I look at them from the direction of its normal and not from the other side. Is there a way to get the visibility of these faces from the back side / opposite side as well?
Edit 1:
I tried using bpy.context.object.active_material.THREE_double_sided = True and that did not work. I also added .doubleSided = true in the html. Still did not work.

In Blend4Web you can do it by disabling Backface Culling https://www.blend4web.com/doc/en/materials.html#rendering-properties

material.doubleSided = True seems obsolete.
I Found the answer here
https://stackoverflow.com/questions/25061271/three-jsonloader-double-sided-texture-png


text:
Color Restoration using Color Palette
I was recently looking at an interesting video and I came across this thing https://youtu.be/-0MD1g_5dV4?t=217 . This is a timed link which shows clicking of pictures with a color standard palette in the field. I'm assuming it is for correcting colors later on in the image.
Can someone explain a little bit in detail of how to use this color palette from the photo in correcting colors?
Can we do this using shaders and lighting within Blender?

Be more clear please. What do you want us to explain? How color correction works with using a palette?

Yes. Sorry if I wasn't clear. I want to know how color correction works using a palette


text:
Test if empty touches mesh/depth object with python
I'm doing motion capturing of facial expressions, having an empty (constrained to a track in the movie clip editor) "sliding" on a facial surface mesh (depth object). However, for some large facial movements, the empty "drops off" the depth object. I don't want to enlarge the depth object.
Here the empty "slides" on the depth object (facial mesh):

Here the empty can not be projected on the depth object and "falls off" to some standard distance:

Is there a way to test for each frame whether the empty "touches" the mesh/depth object (or not) in bpy?

Hard to understand your question. Can you add a scene or some images to show what you are trying to accomplish?

Sorry for beeing imprecise. I added some screen shots.

Could use distance from empty to its  Closest point on mesh in a frame change handler or somesuch.

Thanks to the link of batFINGER to the function closest_point_on_mesh() I wrote a function which does the trick:
def is_empty_on_mesh (empty,mesh,maxDist = .000001):

    empty = bpy.data.objects[empty]
    mesh = bpy.data.objects[mesh]

    # to compute distance via closest_point_on_mesh() the
    # objects have to be translated from global to local space
    emw = empty.matrix_world.to_translation()
    mmwi = mesh.matrix_world.inverted()

    local_pos = mmwi * emw
    (hit, loc, norm, face_index) = mesh.closest_point_on_mesh(local_pos)
    vec = mesh.matrix_world * loc

    dist = (vec - emw).length
    #print("Function Dist:",dist) # Debugging
    return(dist < maxDist)

is_empty_on_mesh(NameOfEmpty, NameOfMesh)

The function returns TRUE or FALSE, depending on the distance being smaller than .000001 (this value is somehow arbitrary).


text:
Shrinkwrap mesh onto another mesh

To model a costume inspired by the jacket bellow, I need to add the braide to it. I've tried doing so using the Shrinkwrap modifier (using the nearest surface point mode) but I have 3 issues:
1 - the braid has thickness, the Shrinkwrap modifier flattens the mesh. I thought of using a flat version of the braid then adding a solidify modifier but this would not be accurate, part of the braid goes on top  another part of the braid (like shoe laces)
2 - I have distortions. I tried adding a subdivision surface modifier which helps a bit but not entirely.
3 - the left part of the braid (the loop) shouldn't be on the jacket but rather over the edge of it, sort of "floating in the air".

Thanks for your help.

for the flat aspect, the shrinkwrap can rely on a vertex group. You can weight paint the group to influence the shrinkwrap effect.

You should take a look at this http://blender.stackexchange.com/questions/58181/need-help-with-deforming-a-mesh-over-another-mesh/58204#58204

I was just about to post the same thing as cegaton...you could also use a mesh deform if you wanted but the lattice would be faster and easier to set up.

The next version of Blender, version 2.78, currently available here https://builder.blender.org/download/ will contain major improvements to the Grease Pencil. With these, you could get a really fast starting point for your example. The new release allows you to define specific brushes for GP, and also to smooth the stroke, which is what I'm using in this example.
First, enable the options like this (note that this is only available in the release stated earlier) and draw the curve onto the mesh directly by holding down the D key and click-dragging:

The smoothing option will, as soon as you let go of the mouse, smooth out the stroke, cleaning it up and making it usable for the next step.
Then, convert the pencil drawing to a curve:

Finally, add some bevelling, subdivide the mesh, and set the smoothing option:


text:
How can I receive shadows on an image-plane and at the same time ignore incoming lights? (Cycles)
In the Image below I've placed some 'feathers' on top of each other.
They are made of image-planes with transparent backgrounds.

The problem I have is that I would like the feathers to receive shadows from other feathers. However I don't want them to catch lights (which happens on the left where I've added a strong spot-light)
The feathers on the left have these node-settings (which reflects lights and shadows, and also casts them):

And the feathers on the right have these...
(which ignore lights and shadows, but do however cast shadows on other objects)

The ideal thing would be to have the node-settings something like the feathers on the right (seen in the last picture), but that the image-plane also can receive a shadow.
Is it possible to achieve this using only the node-editor? (or do I have to use render layers?! I'm not sure how to do that either...)
If someone knows a good way to solve this, please let me know! :)


text:
Joined spin dupli objects don't rotate together
Aloha.  I am trying to create an object by joining several rows of other objects created using spin dupli.  Object moves along x y z axes as a single object, but when I try to rotate it the rings rotate independently or not at all.  I removed doubles and converted curves to meshes of individual rows before joining.  Any suggestions?

The rings look the same but are of differing circumference and number of pins so that object is cone shaped.  The pin in background is kernel object I spin dupli-d to create each ring.

If that is a single object, now, it has a single own origin point. Rotation (and scaling) happens depending on the configured pivot center mode in the 3d view (in the view header, the second icon to the right of the object/edit mode selection), it can be the active object (its own pivot point), median or individual origins of several obects, the 3d cursor or the bounding box.

Not sure what to make of this post, but I tried all the pivot modes to no change

Can you show at least a picture of that object, since it might be different from what I thought? If possible show the whole blender window, to let others spot settings, modes, etc. Otherwise post the .blend file (eg: using  http://blend-exchange.giantcowfilms.com/)

blender file is too big to upload,  sorry but I don't know how to post screenshot and can't find instructions to do so.  .

to post a screenshot, first in Blender, use CTRL + F3 to save a screenshot. Then edit the question here, and add the saved screenshot with the "image" icon or CTRL + G

Thanks.  If image doesn't help I can upload blender file to google drive for you to review

sorry, I can't download a 270Mb file... I tried something similar (with a much, much simpler result, 3 rings of spindupli cubes 35 steps x 350°)  but can't replicate. My joined "rings" of spindupli objects rotate as one object, since they really are one object... I must have misunderstood something you said.

I successfully created a similar object before by joining duplicates of a single spin dubli ring that rotated as one object.  This object is made of individually created rings using spin dupli.  Did you use duplicates of a single ring or individually created rings?

I replicated your test with cube rings successfully joining 3 rings made from individual cubes spinduplid of different circumferences and no. of steps...they all rotated together...must be something with my original object


text:
Compositing layers after blender restart
In relation to the frequent error at rendering (cuda out of memory), after rendering every layer I must restart computer (it is helping to free memory on the card - when I am rendering layers directly after oneself, an error is taking place). Unfortunately when I am rendering one layer, automatically I am losing second one. In what way I can connect them unnecessarily for rendering both suddenly?
I have GeForce GTX 970, blender 2.77

Render layers with transparency and combine them in Photoshop can be some solution, but it is really problematic with more frames (animation).


text:
Extend texture to different objects
Is there a way to extend a texture to different objects? My problem is that i have two objects and i want to scale one (in three.js) and change the position of the other. One object is upon the other and with the textures being differents the view is ruined. I must use UV Mapping.
Here is an image

Thanks!

Are you just asking how to UV map the image and use it on two different objects?

I want the same image to extend on two different objects. For example i want one texture on the object with the handle plus the object under it

ok, so you want to texture multiple objects but have them all use the same image.

Yes thats right!

Why do you not use the same material for both objects?

@parameciostudio I did this but the result is the same with the picture above

@IraklisBekiaris maybe this tutorial can help you: http://www.katsbits.com/tutorials/blender/learning-unwrapping-uvw-maps.php, expecially the screenshot at the bottom of the page

Yes thank you bro! I think this is what i was looking for, i will try to make it happen and i will send feedback

nice tutorial but he manipulates one object, i need to manipulate 2 o more

@parameciostudio You were right, i had to make one material for both objects then unwrap and then project from view. Cheers!

Select the object to unwrap, and while in edit mode press  U  to unwrap. Then, select the image you want to UV map to your objects from the list of available images (if more than one has been added to your scene), while in the UV/ image editor. Repeat for your other objects. In the attached gif, I just used a stack of cubes for simplicity, but the method should work in any case.

I do not know if i understand right what you are doing but this does not extend one texture to different objects. What i want is one texture to wrap the surfaces of my objects like it is one object!

*I am really new in blender :)


text:
New Blender not Working with Animation Nodes
I have gotten the latest version of Blender (from Thomas' PPA), but it no longer works with Animation Nodes (any version of AN, 1.5 or older).
I get the error like I do not have numpy installed, but I do have Python Numpy installed and Python 3 Numpy. (I had this problem the first time I tried activating with older AN, but I have fixed it and have Python3 Numpy (and all the rest of Python3).

Getting out some of my older versions of Blender it works as well, like the 2.77 pre-release test build. It is only with the current version (Hash:22a2853, Date: 2016-03-18) that it doesn't work.
I downloaded the latest development build and it works as well. I think it's just this official build where it doesn't work.
Anyone have any suggestions? Thanks.

Please report this on github.

They updated the Python libs, so there might be a problem. Go and report it. ;-)

Are you sure that this is the problem though, because it works fine when I'm running out of a folder from the build bot, just not when I'm running off my actual computer (since 2.77)? So should I still report it?

Are there any weird Unicode characters in your folder path from where you are running Blender or python? Some times those cause problems when finding libraries

No. I wish I could say that's the problem, but I don't see any problems like that (no extra dots before the extension either).


text:
Material Instances with Animation Nodes
How can I create a material instance with the instancer in animation nodes?
I have animation nodes creating instances of an object. I change their position based on which object they are, which works fine, because each object has its own position information.
However, I am changing the colour of the object, based on which object it is. This does not work, because it only creates an instance of the object, not the material. therefore, the colour ends up being whatever the colour of the last object was (the last value in the line to be changed to).
Here is an illustration of what I am doing.
Can anyone help?
Edit: There was an answer for this instance, but if anyone knows how to create a material instance with animation nodes, please share. Thanks!

You want to use the same material but change the color depending on the object? Or, if you are OK with separate materials that will need changing separately, just click that "9" next to the material name to make a duplicate that will be unlinked from all others.

I am looking for a way to create a "template" to easily accomplish a certain result without doing everything 9, 10, or 100 times. So pressing the "9" button for each is not really an option. I am looking for a way to "press the button" through animation nodes, just like I would make an instance of the object. If you know another way to change the colour of just one object, using animation nodes, when it is an instance of another object, that would work too. :)

If there is a inheritance system for materials in Blender, then it's well hidden. I needed something like that several times, but eventually went with duplication. Perhaps the only solution is Python scripts synchronizing several properties.

Okay, it sounds like a good solution. Unfortunately, I don't know much Python... It may be good motivation to learn more though. :)

At present the method is not to create instances of the material, but to vary vertex color per object.
Assuming cycles render, cycles allows per object info on the same material as: random, obj index or vertex color.
(For Blender Internal render, there are other methods, it allows object color etc)
Imitating your case, a basic setup looks like this:

instance the object
make sure you have "deep copy" so that each object has a different mesh, (like shiftD manual copy in blender)
color/set vertex color to set vcolor for each object
in cycles use attribute to get that color per object

(note that you don't need to create the vcol before, the node creates it or takes the first existing one)

There are other methods for this simple example. But generally it's better to vary this data than:

having to manage 100 materials only to change a color.
using object index, that may be used in other places, render layers etc
switch 2 materials only for ks for this limited case of pure switch

Also, vcol allows more variations of the color, using combine color node (hsv) to vary hue or any other complex rule.
-
Here's an example that uses object index (pass_index) as 0/1 to switch things.
But this parameter can very well be used in other places and only works with integers (0, 1, 2...100, 200...).
It is not the best. Still, you may need to use this if the object is not a mesh, but a curve or text.
(On texts there are other specific methods too, but for this simplistic switch it's ok)

Do you know of a way to get the vertex colors to show up/update in the texture viewport? I have done what you said and it worked, but now I want to use openGL render, and the vertex colors don't seem to effect it.

What "new parametr" use "Loop Input" node? I tried use "Vector" with zero succes. Thanks


text:
How to change the material (texture) in the BGE?
Example: A character is using default material, but I want after he has lost half his life, change his material to one with blood, with dirt, or if he is causing the character to change color like the Hulk, like me would you do to switch textures?

One sloppy logic-block way is to make a duplicate of your character model, put it on a hidden layer, then use the Edit Object actuator and Replace Mesh drop down option. The hidden layer character model will have your alternate material (texture included).
ad: I say sloppy because if you do this as a programmatic alternative, you're gonna have a hidden layer full of alternate materialed copies of one object. And that could wreck memory allocation as all those materials get loaded into memory.
Programmatically, if you wanna take the time, the KX_BlenderMaterial python object is a much cleaner way of swapping materials. look for the blender 2.78 or 2.79 api docs. It has an example of mixing textures, but you might be able to puzzle it out. (https://docs.blender.org/api/2.79/#) I would suggest downloading the zip so you always have it.


text:
Turning off anti-aliasing: inconsistency between 'info' window and valid python commands
I want to render an image without anti-aliasing.
Using the UI, I select the Workbench engine.
Then, under Sampling, I set Render to No Anti-Aliasing.
This displays the following commands in the info window:
bpy.context.scene.render.engine = 'BLENDER_WORKBENCH'
bpy.context.scene.render_aa = 'OFF'

When I try the same commands in the console, or in a stand-alone script, I get the following error:
AttributeError: 'Scene' object has no attribute 'render_aa'

Why is the info window lying to me?
Further, how can I turn off anti-aliasing in the Workbench engine with python?

The anti-aliasing for the Workbench engine can be turned off through:
bpy.context.scene.display.render_aa = 'OFF'

The API manual is very helpful for cases where the Python command is unclear. The render_aa property is part of the class bpy.types.SceneDisplay. Searching for this type shows that bpy.context.scene contains a reference to an object of that type.
The reason why the command is displayed incorrectly seems related to T69803. The Python tooltips are incomplete for PropertyGroups because RNA_path_full_property_py_ex()(rna_access.c) doesn't return a full path. This is also the reason why you see Python tooltips with missing parts like bpy.data.scenes["Scene"] ... render_aa for the Render anti-aliasing property in the UI.
TL;DR It's a bug.


text:
Weight painting using Auto Rig Pro on Blender 2.8
I need help with painting weights on a rig made with auto rig pro. I cant find the correct vertex groups for the bone I'm painting. There's an arm twist offset and an arm stretch vertex groups to paint on. Which of these is the arm really?
Theres an arm twist offset vertex group

Also an arm stretch vertex group

Here you can see the fk controller driving the left arm bone

So which of these is the correct vertex group to paint on? I see the fk controller for the shoulder is driving the c_arm_fk.L bone, but it doesn't show up in the list of vertex groups for the weight painting on the arm. This is my first time using auto rig pro and I'm used to rigging in Maya.

Thank you Duarte!

Hey Maito. I've created an Auto Rig Pro chatroom for discussing the addon on this site. My guess is that not many people use it, so I don't know how useful it will be. I also don't know if you will be able to join it without at least 20 reputation. If this is not the case, can someone please let me know? Because this is my current understanding, and so its what I've been telling everyone.

If I am correct, You are supposed to weight paint based on the bones that are in layer 31. It should look like this when you view it.

Artell has provided the character Mike in his manual for weight paint reference.You can check it out in here : http://lucky3d.fr/auto-rig-pro/doc/auto_rig.html#how-to-paint-the-weights
I hope this helps

Thanks so much for the tip about which layer has the bones to paint on, MercuryRising. I always found the old layer system a bit cryptic because the contents would never have any labels.


text:
Texture only applying to part of face
I'm new at blender so might be something stupid but couldn't find the answer anywhere.
I'm trying to apply a texture to only a face of an object but only part of it is applied. I'm using cycles and a simple node setup consisting of image texture passing into the diffuse. I've selected the face and UV unwrapped it. I've tried moving the face around in the UV editor and it doesn't make any difference. I've also tried re-calculating the normals but it didn't help either.
Thanks to anyone who's willing to help

Have you provided you image with texture coordinates input in the material?

Thanks for the quick response @DuarteFarrajotaRamos. I hadn't so I tried adding one but the issue still persists.

And which one did you use exactly, UV Map? Because if you are unwrapping your mesh you need to specifically use UV Map type coordinates. Also if you have more than one UV map on your mesh you need a UV Map node so you can specify which one to use.

I used UV map and I only have one UV map on my mesh.

Well then I'm out of ideas you will have to provide way more details for a proper answer, namely mesh topology, uv map, material settings, node setup, and possibly a upload demo file we can look at. Please edit your question and provide more details and screenshots.

I added some information but can't add much more as I don't have high enough reputation. Thanks for the help anyway.

Could you please provide a as simplified file as possible reproducing the problem

I've manage to reproduce the error in a way although I have UV mapped multiple times to get it so might be a different error.

Your model is full of duplicate geometry and overlapping vertex with residual zero sided faces. Those are causing the issues. Removing them will cause your model to change so you will likely have to add a lot more control loops


text:
What is this black I shaped line with serifs on my viewport?
What is this black line in my viewport and how do I get rid of it?

It doesn't seem to be an object in the outliner as this line is still there even after I hide everything on the outliner.

Can you select it in Object mode by clicking on it, and does it then show up in the Outliner? - Press '.' (period/Del key on the numpad) while hovering over the outliner to show its entry there.

I can't select it in object mode. I tried hiding everything in the outliner, but it's still there. (question edited to show this)

I think you'll need to share your file assuming it's not too large so that someone can have a look at it. If it's smaller than 30Meg you can share it via https://blend-exchange.com/ following the instructions on that page to add the link to your question.

Yeah, that's strange. It's only in the 2D Animation viewport, and if you create a new one (new 2d animation tab), it's not there.

Very odd! I suspect it must be a bug but I don't usually use Grease pencil so don't know what to expect.. You can turn off all the viewport overlays, View Object Types and Gizmos and it still appears. Also I get brief psycedelic flashes of patterns in the sequencer window here as I reduce its height at the bottom of the viewport. Suggest you report it as a bug (Help > Report a Bug in Blender) including that Blend file in the report and let the developers work that one out!

The wierdest thing is, the line is not in the viewport. If you pull the border of the outliner through it, it will be on the outliner. The line will be on the same spot on the whole workspace, even if you change the Editor type. It looks like it stays at the center of the window if you resize it.

If I pull a border (between to editors) below the line and click a few times on it, it jumps a little bit to the left. I guess this is a border element which remained on the HUD accidentaly. So bug.

I voted to close as a bug ... but if you can't replicate the bug it wouldn't be accepted as a bug either. Probably as suggested by Christopher - delete this Workspace and add a new one ... try to forget :)

It is the equivalent of the black border between editors you can drag to resize them or create new ones. It is an artifact from bugged workspace, producing leftover editor divider.
It doesn't show up if you disable Load UI from the file manager and open the file. It also doesn't show up in other workspaces if you change to Rendering or Compositing tab.
Doesn't seem to be mergeable with neighbouring areas, and "floats" above other editors in the 2D Animation workspace, "bleeding" into other editors even if you cross it with an area divider.
If you drag it it initiates a failed area resize/merge operation, and if you ⇧ Shift + Left Click on it, it creates a new blank window, much like any other border would, except for the lack of content.

How did it happen? I don't know probably a bug or unforeseen corner case. Might be worth reporting if you can provide a file.
How to get rid of it? Either get rid of the bugged workspace and create a new one by deleting it, or open the file without the Load UI option turned on in the file manager side bar, then resave the file.

Thank you very much for the gif! I was thinking it was some measuring tool or ruler or something, but it was a buggy border line XD. I appreciate your and everybody's help on this!


text:
Making Cuts from Camera to Camera
I have an animation where a cube goes from point A to B. When it reaches B, he will be out of sight from the camera.
How can I make a "cut", a.k.a., make the camera now show point B, where the cube is?
Kind of like transition from Scene 1 over to Scene 2; I don't have any scenes, though.

A way to do this is to use multiple cameras. Create multiple cameras with the views that you want. To switch the views, you have to create "Markers" in the Timeline. In the Timeline, go to the first frame of your animation. With your mouse hovering over the Timeline, press M. The creates a Marker at Frame 1. It looks like a little orange triangle:

Select the camera you want to be active. While keeping your cursor over the Timeline, press Ctrl + B to Bind the camera to the selected marker. Next, go to the frame you want to switch cameras at. Press M to add a second marker. Select your new active camera and your new marker. Press Ctrl + B in the Timeline to bind your second camera. Repeat as necessary.

One solution outlined by Jayanam is to animate the position and rotation of the camera.  The trick is that you will probably have to go into the Curves editor and switch the interpolation of the keyframes to CONSTANT, otherwise the camera will move instead of standing still with a jump at the keyframe.
Another solution is to have separate scenes.  Blender files can contain multiple scenes, each with their own camera and time line.  Because the time lines are independent, this is usually the best choice.  That way if you have to stretch out one scene, it doesn't force you to audit the other scenes to make sure their keyframes are still right.
You could also have multiple independent blender files and use linking to share meshes between them (or appending if dealing with the restrictions of a linked mesh become inconvenient).
After you have created several different scenes you can glue the rendered PNGs together in the VSE (again, in its own scene) to make the final video.


text:
How to I make two objects spiral together, such as in a binary star system?
I am trying to make a simulation of two stars colliding. I can't seem to figure out how to make them spiral together, the way stars would.

https://blender.stackexchange.com/questions/91455/i-am-trying-to-make-an-animation-of-a-double-planet-cant-seem-to-get-it-right

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.


text:
Mixamo addon not working
When I try to use the mixamo addon with my character it gives me this error message.
Python: Traceback (most recent call last):
  File "/Users/20262059/Library/Application Support/Blender/2.93/scripts/addons/Mixamo add-on for Blender/mixamo_rig.py", line 176, in execute
    _make_rig(self)
  File "/Users/20262059/Library/Application Support/Blender/2.93/scripts/addons/Mixamo add-on for Blender/mixamo_rig.py", line 1902, in _make_rig
    add_leg("Left")
  File "/Users/20262059/Library/Application Support/Blender/2.93/scripts/addons/Mixamo add-on for Blender/mixamo_rig.py", line 1122, in add_leg
    cns = c_foot_ik_pb.constraints.get(cns_name)
AttributeError: 'NoneType' object has no attribute 'constraints'

location: <unknown location>:-1

This is a character rigged on mixamo and then downloaded in default pose
The character came. out looking like this

I then tried a character from mixamo. it still did not work. it gave me this error message.
I then tried again with a character from mixamo, this time with an animation. it still had an error code this time with this error message.
  File "/Users/20262059/Library/Application Support/Blender/2.93/scripts/addons/Mixamo add-on for Blender/mixamo_rig.py", line 176, in execute
    _make_rig(self)
  File "/Users/20262059/Library/Application Support/Blender/2.93/scripts/addons/Mixamo add-on for Blender/mixamo_rig.py", line 1902, in _make_rig
    add_leg("Left")
  File "/Users/20262059/Library/Application Support/Blender/2.93/scripts/addons/Mixamo add-on for Blender/mixamo_rig.py", line 1122, in add_leg
    cns = c_foot_ik_pb.constraints.get(cns_name)
AttributeError: 'NoneType' object has no attribute 'constraints'

location: <unknown location>:-1

How do I fix this?

Some characters like Maria W above on the Mixamo site - probably created by an older version - have this issue with the Blender addon. Others like Ninja work just fine.

I had the same problem as you: weird error messages and a badly mangled armature after running the "Mixamo Rig" add-on.  It just so happens that I had a previous problem with the bone naming conventions supplied by mixamo inside blender. In short, mixamo names it's bones like "mixamorig:Hips" and "mixamorig:RightUpLeg", and blender's naming format is "Hips" and "UpLeg.R" etc.  Certain actions were not applying to certain characters such as "BigVegs" which has bone names like "newVegas:Hips", and apparently certain armature tools won't work until you rename the bones as well.  See here for more info.
This may seem like an unrelated problem, but after running the "Mixamo Rig Renamer" I was successfully able to add a control rig -- at least on ybot.  It worked on "Jasper" too, but only if I unchecked "apply animation".  YMMV.

A picture is worth a thousand words, so in the above screen shot see how after running "mixamo rig renamer", the bones on "Armature" are named "Hips", "UpLeg.R" etc. whereas on "Armature.004" (which I didn't run the renamer on, and thus has the default mixamo names) its "mixamorig:Hips" etc.  After renaming the bones to the blender standard I was then able to successfully run Mixamo's "Create Control Rig".
Yes, this is a hack -- someone really probably needs to open up a bug report on Adobe for a proper solution: but it worked for me, and maybe it will work for you too.
Even if it doesn't fix the problem for you, in my experience it's a good idea to get used to renaming the bones on mixamo imports to blender conventions anyway, since it can cause weird things to happen.  Just be careful about running "Mixamo Rig Renamer" on an existing project because it will rename all you rigs -- try it on an experimental blend file, or just make sure it didn't change anything you didn't want before saving on an existing project.

For me...Oddly Mixamo is having the same problem in Windows 10.
In Linux PoP OS 12, Everything works properly.


text:
Export fbx without duplicating vertices
Reference issue: How to stop blender from generating duplicate vertices on export?. The answer says "so turn off export of anything you don't need" - doesn't say how to do this
I have a model with 14 vertices which become 54 after export in fbx. How to disable writing any vertex data (except position) into fbx? I just need convex geometry without uv, normals or something
What I've tried so far:
Export fbx window - no such option
Python export api: https://docs.blender.org/api/current/bpy.ops.export_scene.html?highlight=bpy%20ops%20export_scene#bpy.ops.export_scene.fbx
No such option or something close to it. Its wild because e.g. OBJ export options has such stuff
Maybe there is python api to manually remove vertices data collections?

I just found out how to do this:

Use Shade Smooth in Object Mode.
Remove UVs from Properties > Object Data Properties > Remove UV map*.

Is there any other way without messing up with your geometry?


text:
How do I delete Mask data blocks in Masking tab
Blender noob coming from Houdini.
How do I delete these mask data blocks in the masking tab? They seem to keep getting created but I have no idea how to delete or clean them up.

Open up a an Outliner editor, go to Blender File context, unfold the Masks subpanel, Left click on the first entry you want to delete, SHIFT + Left click on the last entry you want to delete, Right click > Delete.

You have to set the number of users to zero by clicking the X next to the data block in the masking tab and then "clean up all data blocks" from the file menu (top right).

Why was my comment edited?

I asked for more clarification as this system seems pretty awful

I mean if you're going to edit it can it not be something useful?

You should SHIFT + Left click the X icon to set the user number to 0. Alternatively click on the shield icon to remove Fake User. The system is particular to Blender, you'll find many, many discussions about its pros and cons over the internet if you want more information about why it exists. I guess your comment has been edited because it didn't add much to your answer, which should stay concise and to the point. (Site policy). I have added an answer which may be more straightforward for your need. Cheers

Thank you Gorgious! That works. Very much appreciated.


text:
Add two Principled BSDF with alpha
I want to add two Principled BSDF in one material to one as texture 1 and principles for logo only with transparency to control roughness.

Related https://blender.stackexchange.com/questions/208639 https://blender.stackexchange.com/questions/95522 https://blender.stackexchange.com/questions/5069

If I understood your question, you have to combine two different materials into one, using the alpha channel to mix between the two shaders.
In my example I created a material for all the faces except the zone of the logo, then duplicated it, assigned the dupli version to the faces of the logo zone, then added in the dupli version a new principled shader, with the image as base color.
Then I used alpha channel to mix between the two shaders.

OMG, it's working perfectly as I want, thank you so much~


text:
How to recreate this "default-like" look with Cycles?
could somebody please help me to recreate this particular look with the cycles render engine?

I want to create this specific default-like look to present my 3D scans with all their fine details and render single images of it with a very high resolution.
It looks like a mixture between a clay-like material, sharp shadows and fine outlines.
I know, that this image was rendered with Marmoset Toolbag. I was able to get close to it with Workbench + Matcaps, but to render in high resolution I think cycles would be better?
I am very thankful for any ideas!

What makes you think that rendering in Cycles would be better for this? For the sort of look you’re going for, I would expect Workbench or Freestyle to be a better bet.

The problem I have with workbench is that when I try to render in a very high resolution (12.000 x 10.000 px) Blender always crashes (my hardware is not the best).
For rendering with Cycles I am using a render farm which doesn’t support renderings with workbench…
Do you maybe have any tipps for using workbench as a final high-res rendering engine? Or do you know a render farm which supports workbench?

@ldw.blend  Workbench is the level zero of render engines.

Meanwhile, I would say a principled BSDF set to half metallic would do the job. Will test tomorrow ITLW.

Go to "[your Blender installation
folder] \ [version]\datafiles\studiolights\matcap" and select your matcap.
make a node setup like above. (note that values in mapping node are changed)
add a sun.
from here on you can adjust the nodes and sun to mimic workbench more.

here is basic 2 matcap with sun strength to 3:

my node setup is sourced from this video: https://youtu.be/QdlBB4-uW_E

This is it! Thank you very much!