It looks to me like you've got camera objects confused with the camera data. In the code above, you delete all camera objects in the scene, but the data for those cameras is left over. When you later reference the camera by index, you're referencing unlinked, left over camera data from those deleted objects.

You don't necessarily need to clear the left over camera data - you just need to make sure you're pointing to the correct camera data later on (using pointers, for example, rather than indexing).

In the following code, I create the camera object and data directly from the low-level API, which allows me to store pointers to those objects, and their respective data, and change the properties directly:

scn = bpy.context.scene

# create the first camera
cam1 = bpy.data.cameras.new("Camera 1")
cam1.lens = 18

# create the first camera object
cam_obj1 = bpy.data.objects.new("Camera 1", cam1)
cam_obj1.location = (9.69, -10.85, 12.388)
cam_obj1.rotation_euler = (0.6799, 0, 0.8254)
scn.collection.objects.link(cam_obj1)

# create the second camera
cam2 = bpy.data.cameras.new("Camera 2")
cam2.lens = 18

# create the second camera object
cam_obj2 = bpy.data.objects.new("Camera 2", cam2)
cam_obj2.location = (9.69, 10.85, 12.388)
cam_obj2.rotation_euler = (radians(40.6), radians(-5.5), radians(140))
scn.collection.objects.link(cam_obj2)

Also note that this code was written for Blender 2.80. If you're using 2.79 or previous, replace scn.collection.objects.link function calls with scn.objects.link.


Here's my attempt:
Use a particle hair system, using a vertex group for density, growing from the vertices of the sphere (or faces, adapt to taste).
Muck about with the scale of the end caps of the cylinder, and the number of segments of the sphere for you needs...
Anything like what you're after?

Can't work out how to throw the blend file on here so-

https://www.dropbox.com/s/z8hpfk6rpbjpvbs/SphereWithConicalHair.blend?dl=0

Cheers
Mark


Why is my footage smearing out towards the border on rendering an image?

The smearing on the edges is perfectly normal if you are undistorting. It's most notable when the lens distortion is the pichcushion type. Blender is deforming your image, and it fills the missing parts with the color of the last pixel on that row or column, since there is no other way to reconstruct the information of things outside of the image limits.

Here's an exaggerated example to illustrate the point:

Other programs do give you the option of making the edges transparent or black. Blender does not (As far as I know).

To solve the issue you do have a couple of options:

1- (The lazy and lossy option): Resize the undistorted image in the compositor so that the smearing at the edges doesn't show.

The downside is that you'll loose some information and the image might degrade with the re-scaling.

2- Work with undistorted proxies as a reference to create your 3D scene, but for the final render bring back the original (distorted) video
and distort the 3D scene to match the distortion of your lens:

You loose no information and your 3D scene will follow the distortion of your original video.


Mesh Deform is not effecting some bones on the hand of my character. (Rigify/Lattice problem)

This might be similar to what you're looking for; it uses the mesh deform modifier. I was having the same problem as you for a while.
Here's a video that helped: https://www.youtube.com/watch?v=AYzR4jY8wi4
Here's a little in-depth tutorial:

Grab your body (not the mesh deform) and create a Vertex Group and weight paint just the hands and feet (and maybe the head and/or groin for some people, wherever there’s unwanted movement created by mixing both the mesh deform and the parented body - as you can see I didn’t include the eyes bc I liked how the mesh deform deformed them).

Go to your modifiers and add an armature modifier and add your vertex group to the vertex group section. Do the same thing for the mesh deform, but also check the arrows button next to it (it inverses the chosen vertex group).

Hope this helps!!!


You could add two labels, one with the text only, and another with the icon only:

    row = layout.row()
    row.alignment = 'LEFT'
    row.label("Text")
    row.label(icon='BLENDER')


Mesh not deformed correctly and armature not attached to it even if the weight colors are good

It seems that you parented the bones to wrong objects, here you have the upper legs bone parented to the lower leg mesh.

It would be way easier to join all the objects to a single one and weight paint againt.


Small texture cannot be clipped in Material Viewport Shading, always repeats

As far as I know OpenGL viewport preview doesn't support texture clipping options, so they will always display tiling infinitely.

Also viewport material preview is quite limited, it is meant as a reference only.

They should render properly when pressing the F12 key regardless of render engine, though, except of course OpenGL renders.

Also see How do I Make a Transparency to Decal my Object? (Blender Render Only)


What is the config to attach transparent face to object

The little black square is always at the center of verts which creates the face. So if you have concave or non-flat ngons then the square won't be located on the surface, but this isn't a useful thing.


I animated curve with hook modifiers. How can i export the animated curve?

Unfortunately this does not bode well for you. The problem seems three fold:

As far as I know there are currently no addons or exporters that can export Bezier Curves out of Blender. Most exchange formats I know support mesh data only anyway, they don't even have a concept of Bezier Curve, so to the best of my knowledge, non of the provided exporter addons can even write Bezier Curve data directly without explicit conversion to mesh first.
Exporting animations is hard, few file formats support animation data because it is hard to standardize, the exceptions I know here are Collada and FBX, and perhaps some other "cache based" formats like Alembic and similar.
Even those file formats that do support animations are frequently very limited in the type of data that can be exported. Mostly rigging and armature methods are supported, and even those often encounter issues and incompatibilities. Deformation based animations, morphing, shape keys, modifiers, and/or generated data like simulations, physics, fluids, etc, including hooks, are most likely not part of the small subset of animation techniques that can be exported.

So what options do you have? Not many.

Converting (a copy) of your animated bezier curve into a mesh and exporting that instead may alleviate some of the issues, but I can't see it going very far beyond conversion, you still need to export a deformation animation and that can be troublesome.
Exporting as an SVG file There is one third party addon SVG Export Script that exports the viewport as an SVG file. There is this one particular setting called Bezier Overlay that allows exporting Bezier Curve objects as SVG paths directly.
It is obviously limited to 2D curves (because SVG is an illustration image format) and it probably doesn't support deformation animations anyway. I believe it can export animations as a sequence of independent SVG files but nothing more.
Exporting hook animation only Depending on where you are exporting to (which you never state), what you intend to do with said animation, and the capabilities of the destination software, you may be able to get away with exporting only the hook positions, and rebuild your curve elsewhere from that info.


How to selectively render part of an ocean which is inside a round object?

Try using a boolean modifier:

Create a cylinder the same size of the inside of your cup:

Add a boolean modifier and an edge-split modifier to the ocean object, with the cylinder object set as the target:

Make sure the cylinder is set to be hidden in the render, so it doesn't get in the way:


Is it possible to set a global Blender preference so that all keyframed motion is linear by default?

Yes, Its under Editing > New F-Curve defaults

You might know this but just throwing it in additionally, You can select the curve in Blender, at any two or more points and use T to change it to Linear Interpolation (LERP).


How do I randomize the movement of trees made with the sapling generator?

If you need the forest to look more realistic, you would need more animations! One animation for all the trees is simply not enough.

My suggestions:

Add at least 3-4 different animations.
Make trees swap their animations randomly (e.g. tree1 runs animation1 then animation3...)
Don't randomise the rotation because that would look fake (wind blows generally in one direction)
Also be careful with the different wind speed as if you overdo this you might get unrealistic results.
You can simulate the wind 'gust' by starting the animations on all trees (seed points) which are at a certain position (say in X) and delay the animations of the other trees based on their Y position.
To make this even more effective you can actually simulate the wind by creating a huge box or a sphere(s) and animating them, passing through the forest in a certain way. This would be a non-renderable object which would trigger the wind animations on your trees. This could be even further enhanced if you increase the wind speed based on the proximity of the tree to the sphere centre, for example.
Also don't forget that even if you nail the whole wind animation, if you only have one tree model (despite different scale/rotation), it just wont work. You need more variation, only then you can play with randomness.


Switching beetween UV sets across multiple objects

Not sure if this helps...

If it's a case of switching maps, (as opposed to images) The UV Map shader input node looks up by name. The Cube and sphere in the illustrations share a map: 'Shared UV', and each has a map: 'UV Map' of its own.

They share the material, so the switch can be made in the UV Map node.


Will blender 2.8 official realise be able to run on computer with graphics driver that is lower then OpenGL 3.3

It will not. As stated on the official page, minimum requirements demand at least a minimum supported OpenGl Version of 3.3.

A consensus was reached that this was required to allow supporting all new and upcoming features features of EEVEE viewport. This includes realistic graphics and high visual fidelity, higher viewport performance, better use of resources and take advantage of modern hardware and new graphics cards features, without many compromises for newer hardware.

Unfortunately this means dropping support for older cards and more dated hardware.

For AMD cards, versions prior to HD 2000 series (circa 2007) are no
longer supported
For NVidia cards this means cards older then the GeForce 8 series (G##8000 circa 2010) are no longer supported
For Intel integrated graphics cards you must have at least sixth generation IGP, generally on a i# 2#### processor or newer

Unfortunately if you have hardware older than the above mentioned cards, or that somehow doesn't support OpenGL 3.3 you won't be able to run version of Blender newer than 2.8#. You can try to upgrade your drivers to the newest supported version (unlikely, but some times support was later added to older cards).

You can always run versions from 2.79 and prior.


How do I cut up a 3D object into separate pieces

Cell Fracture AddOn: Cell Fracture AddOn.  I'm pretty sure this is in Blender by default, but you may need to enable it in the User Preferences, then select the object, then bring up the Toolbar on the left of the 3D Window that you have the object selected in by pressing T, select Tools/Edit pane, then select Cell Fracture.

Or Fracture Modifier build (not an AddOn or plug-in) from Dennis Fassbaenders web site: Fracture Modifier Blender Build.  Explore that site too see if it's what you need.

Or do it all manually for complete control.


Slow Performance When Changing Object Data [2.8]

Okay, I think I found the solution! The collision objects for the legs had wayyy too many vertex groups. After deleting the armature modifier, everything went back to normal speed. I cleared the vertex groups, except the ones I needed, and gave it the armature modifier again. Now everything works as it should.


Set image settings for each individual File Output Node, in the Python API

You can actually set the settings for each individual node.
Create your node:
file_output_node = tree.nodes.new('CompositorNodeOutputFile')

Then you can set your settings for this node by going into the format attribute. For example:
file_output_node.format.file_format = "PNG" # default is "PNG"
file_output_node.format.color_mode = "RGB"  # default is "BW"
file_output_node.format.color_depth = "16"  # default is 8
file_output_node.format.compression = 0     # default is 15


All right... I had the same error appearing today and I have been able to solve it. It's been pretty easy. After removing blender and installing blender from ppa:thomas-schiex/blender There were some files still around.
To make sure everything works try:

sudo apt-get purge blender
cd /usr/lib
sudo rm -r blender
sudo add-apt-repository ppa:thomas-schiex/blender
sudo apt-get update
sudo apt-get install blender

Since everything is purged AND manually removed from versions installed manually it should be fine now. Have fun  :)


Your model is showing faces and edges, called Flat Shading, while the video shows a Smooth Shaded geometry.

Go to Object Mode, look in the Tool Panel on the 3D window (left hand panel, press T if hidden) and find the Shading buttons. Press Smooth.

It will now look like the video.


First material applies but second does not

In the edit mode select the mesh with Ctrl+B Box select and then select the material (red) and click on assign material.


Is there any way to get shadow from plane without a gap in Eevee?

Adjust Bias and thickness to your needs.
If it's still renders gaps try higher res shadows.
An Example:


joining 2 parts without losing their textures

When you join two meshes together, your parent mesh will be the default material.

You need to create a second material for your second mesh and use the UV Map node under Input to tell it which UV to use.

It's a good idea you give each UV a name too.As you can see, whichever UV is highlighted is what you can see in the viewport. You can ignore that. It will render both.


Must I add a license block to all files in a multi file addon?

No, but it's good practice. All the official Blender addon files have a license block.

https://stackoverflow.com/questions/845895/putting-license-in-each-code-file


How/can you install an older version of Blender?

All release of Blender are still available for download, reaching back to the very first version of Blender for the IRIX operating system.

The files for Blender 2.78c can be found here.


How to render depth pass with alpha channel transparency in cycles?

Yes, you need to use the alpha channel as a mask since transparency is not taken into consideration in the depth pass.

This is how I have done it:

I used the node called "Set alpha".
I Plugged the depth into te "image" and the alpha pass into the "Factor"
the normalize is optional but helps to see the depth better.


If i get you correct, you are trying to move around the project using Shift+F,

If you are trying to zoom in and out, try Ctrl + MMB (Forward and backwards to zoom in and out)

Also if you want to edit specific area, press Keypad - . to zoom in to edge/ face or vertex after selecting them.

Set the clipping area of the camera to lowest-or 1mm (camera of the viewport, not in your actual camera which you use to render. Select N in you 3d space. you will get a menu on the Right*, from that look down towards middle to reach Clip options)


Yes, there is an easy way.

The view you get initially is through the camera in a white background. The dark grey is the passepartout of the camera.

One way it to click the camera icon:

or the shortcut Numpad 0 to enter the camera view.


Why is Blender rendering the wrong resolution?

Make sure the dial below the resolution fields is at 100%.


So the camera was not changing, the material was. It is hard to see because of the lack of other objects

The Point Density material was set to use Object Space instead of World Space, so it was trying to fit all the particles into the object, and would change the locations of other particles in the point density as needed.


AMD RX550 (4GB) GPU - OpenCL not available in Cycles Rendering Compute

I know this isn't the answer you're looking for (it's not one I'm happy with either), but, at the moment—even two months after you first asked…

You either need a different video card or a different OS.

OpenCL support is currently broken in the official AMD drivers for the RX 550 specifically {1}. This is still true as of the 17.30-465504 AMDGPU-PRO drivers and Ubuntu 16.04.3 (which they finally support).

While the card supports OpenCL natively and works in Windows, it is unclear when fully working (i.e. including OpenCL) Linux drivers will be released.

A comment on the AMD Community boards suggests that there is a working internal build that has been tested against the RX 550 as of August 11th, 2017. When this will be publicly released is unclear as of now. In addition to the evidence I've linked to supporting this conclusion, I've personally confirmed that the issue is specific to the RX 550 by dropping an RX 580 into a Ubuntu 16.04.3 system with identical drivers without any issue: the RX 580 shows up and works fine with OpenCL, the RX 550 continues to not be seen as an OpenCL device.

I've also personally tried the oibaf open source drivers, but have not been able to get OpenCL working on the RX 550 with them. This weekend I will give that another try using Ubuntu Zesty instead of the 16.04 LTS, now that I have an RX 580 to help act as a control comparison case.

I would suggest posting in the above linked thread or contacting AMD directly, referencing the linked comment, and asking for the internal build that is working for OpenCL on the RX 550. Otherwise the only available options seem to be either waiting for them to be released publicly, getting a different graphics card, or not using Linux with the RX 550 for now.

{1}: Supporting evidence (in addition to the thread linked in the second paragraph):

https://community.amd.com/thread/217469
https://github.com/ethereum-mining/ethminer/issues/88
https://community.amd.com/message/2804598


If Ctrl-J doesn't work, then you may have a different version of blender (perhaps the older one) which might have a different hot key assigned. You can check that out in file tab -> user preferences -> input and in 3d view, you can change the assigned hot keys.

Further you can use this video if you need : https://www.google.com/url?sa=t&source=web&rct=j&url=https://m.youtube.com/watch%3Fv%3De02O2RPe4bw&ved=2ahUKEwivi6-yv73oAhWw4nMBHQIlDlUQFjABegQICxAJ&usg=AOvVaw0nIQ87x9tRgjiycvBMiaIx

Hope it helps..


How to get rid of these triangles on my cheese?

I think the underlying triangulation of the mesh being made visible is the result of an extreme 'Distance' value in the Bump node.
The Bump node has to make an approximation of slopes from heights, by, in some way,  sampling heights of adjacent points in the map, and using the differences. It seems that if the differences are too great, and the slopes too steep, the approximation is not convincing, and exposes the underlying triangle normals, even though they are already interpolated by smooth-shading.

The illustration shows 'Distance' settings of: 1 (your setting), 0.5, 0.25, and 0.1. The last chunk shows your setting of 1, but with 1 level of Catmull-Clark Subdivision.
(The code, (at least the OSL version) points to this method of perturbing normals, given heights. What would make a really proper explanation of your artefact, rather than just a fix, would be a more serious mathematician coming along, and describing exactly why the approximation fails. If one comes along, please edit this answer!)


Changing the range of the coordinates on Blender's Viewport

My suggestion is to use the scale option.

In the image below the real world block is 480 x 480 km, scale is used to map it onto 16 x 16 blender units. Once that choice is made, divide your coordinates by

scene.unit_settings.scale_length

when importing, calculated to give you the correct dimensions in the unit of your data.


Objects follow each other on a curve path

Create your object.

Cerate a curve and shape it to the path you want the other objects to follow.

Make sure they have their origins on the same place.

Select the object and add a Follow Path constraint. Set the curve as target. Your object will move to the beginning of the curve. Then animate the offset value to make the object travel along the curve.

For several object you can use an array modifier and set the number of clones you need on the array.

Then add a curve modifier after the array modifier, selecting the curve as object. Then move the object on the X axis.


It depends.  The answer to what's the "right" way to do things depends on what you need.  Obviously, one of the components to determining what's right is how much time it takes to do-- and doing your top, triangulated mesh takes very little time.
But doing the bottom, quad only mesh is superior for several reasons, that may or may not matter for your actual use:

The base meshes, with autosmooth at 90 degrees, are fine.  There's nothing wrong with the lazier mesh.  It has a few more vertices than the quad mesh, but then, it has more detail than the quad mesh.  It's important to notice that all those triangles are planar with each other-- basically, we're using autosmooth to separate the questionable components of our triangulated mesh to a single, flat-shaded plane, so the way our normals interpolate across the triangles doesn't matter.
But with subdivision, we see that the triangles aren't subidividing in the way we probably want.  Our quad mesh is smoother than our mesh that uses triangles.
In a fully smooth shaded mesh, we can see that the normals don't change evenly.  Where we have the tightly packed triangles, the normals change rapidly.  We can see the triangles if we look for them.  Again, our quad mesh is smoother, even with fewer vertices.
In our mesh with vertex color, we can again see that the vertex color doesn't change as evenly across the triangle mesh.  Even with fewer vertices, our quad mesh interpolates these values more properly.  (Which shouldn't be surprising, given what we saw for the smooth shaded normals-- vertex color and smooth shaded normals are both interpolated the same way, as is UV or any custom vertex data.)
So if you're not subdividing, and you're not using vertex color, and you're not using smooth-shaded normals across non-planar elements, and you're not replacing your smooth shaded normals with a normal map, or maybe if you're using a material that doesn't even care about normals like emission-- then there's nothing wrong with the triangulated mesh.  So the fact that it's easier makes it better.  But if those things aren't true, then you're likely to run into rendering artifacts that you don't want with the triangulated mesh, and then the quad mesh is preferable.
Note that deformation can affect this, but it can affect this both ways-- sometimes, you'd rather have triangles for animation, and sometimes, you'd rather have quads for animation.


How do I join the vertices of two separate lines

It looks like you are trying to connect two separate objects, that won't work, you have to make it one object to be able to connect them.


How to obtain a sharp corner on smooth surface

Add another Loop between the two loops and slide it closer to the loop you want to be sharper. Use LOOP CUT tool


BGE: Path follower wait in a specific point

You can simply switch to a different state, in which you do nothing but wait to switch back to the original state.

That could look like this:

def wait(self, seconds):
    self["clock"] = 0
    sen_prop = self.sensors["Property"]
    sen_prop.min = str(seconds)
    sen_prop.max = str(seconds + 1)
    self.state = 2

And then to use it:

wait(cont.owner, 10)

The function assumes the presence of a Timer property called "clock", and a property sensor (called "Property") in state 2, connected to a state actuator that switches back to the original state.

Here's a modified version of your demo, that shows this in action: track_to_point.blend


See Blend file below...

By far the cleanest and easiest way to switch an object from one path to another is to set up your two paths with an empty to follow each.  Get those working properly before introducing your model.
Method 1

using a duplicate model for the 2nd path -  See Layers 1+10

Once the paths & empties are working right, parent the model to path 1's empty and check that it's moving as required.
Take the timeline cursor to frame 50 and slide the path's 'Evaluation slider' back and forth to position the model at the intersection of the two paths.
Keyframe the path's evaluation slot there, and also keyframe this slot with 'zero' at frame 1.
With path 1 still selected go into the Dopesheet and you'll see the two evaluation keyframes.
Select frame 50's keyframe, duplicate it with SH-D and slide that along to the right for say 20 or 25 frames.
This will force the empty & model to slow to a stop at the intersection and pause a little before moving on.
--> POINT A <--
Take the timeline cursor back to frame 50 and duplicate the model.  You'll then have two models that are precisely aligned.
At frame 50, go into the Outliner and keyframe the original model to invisible, the duplicate to visible.
(Both the eye and camera icons)
The aim being to switch to the clone at frame 50.  The original will still do it's thing but won't be seen or affect anything.
The duplicate will have inherited both animation and parentage, so these MUST first be cleared from the Outliner and using  ALT-P to clear the parent link. (choose "Keep Transformation")
With the clone clear of constraints you can then keyframe it's location & rotation where it sits.  Go back to frame 1 and keyframe them again.
From here it's only a matter of parenting the duplicate to the 2nd path's Empty and at frame 50, begin it's gentle rotation to align it with the new path.
-==============-
Many would point out it's better to use 'Child-of' Constraints' on a single model, one for each path empty and certainly you can do things that way.  An example of this method is described below and can be seen in Layer 3+10. In your own case it could well be a more practical solution if e.g. the model was very high poly.
Experience has taught me however to steer clear of redundant constraints where practical, particularly when that model is to be further animated or placed under new constraints, such as the physics engine etc.
-===============-
Method 2

acknowledgement and thanks to an as yet unlocated contributor who provided this procedure. (might be @Moonboots ?)

The 'Child-of' method -  This is in layers 3+10
Do as above down to (not lower) than "POINT A".  Your paths and respective empties should be moving as required and path 1's Evaluation slider adjusted so it's empty slows to a stop at the paths' intersection at frame 50, pauses, then continues on it's way.
From here we diverge from the duplication method...
Instead of parenting the model to Path 1's empty we instead use the "Child-of" constraint.
Move the  model to the path's empty at frame 1.
Place a Child Of Constraint on the model.  The target will be Path 1's empty.
Press 'Set Inverse' button - now the model is parented to the empty.
At frame 50 where both reach the intersection, insert a keyframe for the object (LocRot) and another for the influence slider. (still at 100%).
Move 1 frame forward
Select the model and open the Object menu at the bottom of the window, choose Object -> Apply -> Visual Transform, do not move the timeline cursor!
Keyframe the Child Of Constraint's influence to 0%
keyframe the model again. (LocRot)
You can now move the timeline.  The model is again free and unconstrained.
Still at frame 51 place a 2nd 'Child-of' constraint on the model, the target this time, Path 2's Empty.
Press the "Set Inverse" button and the model is now parented to the 2nd empty where it will follow path 2.
The model can also be rotated gently (and keyframed) to align it to the 2nd path as it begins it's trek.
Note that the 1st 'Child-of' must be above the 2nd in the constraints list.
-===============-
As can be seen in Layer 3+10, the Child-of switching does work well.  But as the contraints are always there and in my experience, can be upset by as yet unknown factors that once in play, seem irrepairable no matter what is tried and requiring a return to an earlier saved version, or a manual redo.
To date with my own projects this has never happened when cloned switch-overs are used.  Their respective constraints (if any) are local to themselves and don't interfere with their 'siblings'.
-===============-
A point that could be useful - Once a parent or path's transformations are done, (i.e. no longer moving) those constraints cease to affect the model and you can exploit this, animating freely as you wish.
The Blend file (vers 2.77a) -  Mix Layers 1 & 10 or 3 & 10 for each method.


Can I Cycles bake all diffuse lighting in one go?

We are facing a similar problem and I am currently investigating the same issue. In our automated lightmap process we use the following workaround to get the indirect and direct light information without having to bake two passes (we still bake 2 passes but one takes a split second).

Maybe this could be a solution for you:

Bake a combined map with x samples
Bake a color map with 1 sample (that is enough to get the full information)
subtract the color map from the combined map (via node setup or photoshop)
problems: if your textures/materials are too dark, you loose information due to the subtraction and overexposed black pixels

I am planning to make a feature request to combine the passes, since it takes significally longer to bake two passes rather then baking a combined pass. Maybe you would like to be a part of it?


How do I extend a Path Animation curve for a longer fly-through but keep the frame rate at 24 fps?

You want the curve to be longer, right? Sorry if I misunderstood that part :P

Providing that is the question:

Step 1: Highlight your Nurbs path by pressing right click

Step 2 Enter edit mode either by pressing TAB or by changing it in the 3D View Menu

Step 3: Select the point closest to the direction you would like to go in, then press E for extrude or hold down CTRL and click on the screen, this will add additional vertices to your path which will let the path be longer.

If you have more questions do not be afraid to ask for help :)

EDIT: This fixed @kimholder's problem

Does the Frame Rate become slower or faster when you do this? I'm not sure what you are trying to achieve, but if it is becoming slower, in my experience it was the viewport not being able to keep up. If its becoming faster, well thats just odd LOL. I think for the timing, you will need to fiddle with keyframes, if it is a visual issue because you are doing viewport playback, try viewing the scene in Solid View or Wireframe View and disable as many other objects as possible

to disable objects, under the Scene View (Top right in regular Blender view) click the eye. Another idea that might be helpful is to move objects to another render layer, to do this highlight objects that aren't as important to your scene immediately and press M, then select one of the other layers and you will see a dot appear. You can quickly access these again and move them back as you wish.


If you want to change the pivot point position, enter in Edit mode, select the vertice where you want the pivot point to be, press shift S > Cursor To Selected, go back in Object mode, then, in the bottom horizontal menu bar, in the Pivot Point dropdown menu, select 3D Cursor.


Curve animation export to unity; Exporting "rolling" curve mod animation into unity

There's a way to partially do this. It takes some tinkering.

There's a myth going around that Unity does not understand shape keys from Blender; this is not true. You'll find it under the "Blend Shapes" tag under Skinned Mesh Renderer. However, that's not everything, because the foundation of truth in that myth is that Unity does not understand Blender animations involving shape keys. You need to re-animate it from within Unity.

The additional concern is that shape keys always lerp, never slerp—that meaning, transitioning between shape A and B is done in an exclusively linear fashion. They also act in strictly Cartesian space, never spherical space (as nice as that would be). That means that for something like above, where you're "rolling up" a scroll, you'll need to break it into several parts.

I would suggest approaching something like this by breaking down the action into multiple individual segments, preferably atomic ones; for each one, develop a shape key that rolls the shape from one form to another. In Unity, you would maximize those one by one. You might have one shape key that forms the initial roll in the scroll; then another that half-rolls to the right, then another, until you have the entire scroll rolled up.

That is, have one shape key that goes from flat to flat-with-one-roll, then another that goes from flat-with-one-roll to flat-with-one-and-a-half-rolls, and continue until you reach the end. Then, in Unity, set up an animation that interpolates each Blend Shape from zero to one, then moves to the next one.

Conveniently, many of Blender's modifiers can apply themselves as shape keys.

I should also note that you'll want to add a solidify modifier to that mesh, even if at width zero. It looks like it's just a plane, and in Unity, one side will be transparent. I strongly suggest applying this after you've got the roll-up motion working, though; it should make things much easier.


Is it possible to project a 2D rendered image back to its 3D model?

Yes it is possible and called projection painting. CGMatter has tutorials on this topic that should get you started. Blender 2.8 Texture extraction projection painting (part 1) and Blender 2.8 3D Object removal projection painting (part 3)


Python script building a node tree works in command line and within django, but fails behind Apache

I realized that the blender background process did not read my blender preferences as normally it does when I launch as myself for background or for GUI:
# normally the following will spit out
Read prefs: /home/wr200m/.config/blender/2.91/config/userpref.blend

So I suppose when I sudo as any id outside of myself, blender does not know where to get my special setups. So I passed the $HOME env variable to sudo like this and voila.
$ sudo --preserve-env=HOME -u www-data /home/wr200m/software/blender-2.91.2-linux64/blender --background --python /home/wr200m/workspace/art/src/py/main/blender/blender/scene.py -- arg1 arg2
Blender 2.91.2 (hash 5be9ef417703 built 2021-01-19 16:16:34)
Read prefs: /home/wr200m/.config/blender/2.91/config/userpref.blend
found bundled python: /home/wr200m/software/blender-2.91.2-linux64/2.91/python

... SUCCESS ...

```


Is it possible to get a proper terrain-like height map?

Let's say you have a landscape like this:

Set the camera to orthographic mode, and place it so that is perpendicular to the landscape.

Adjust the Orhographic scale so that the landscape is completely viewable through the camera (You might need to adjust the render resolution size in the render settings)

Render the image.

In the compositor connect the depth socket of the render layer to a Vector->Normalize Node. (This will convert the depth information to a scale from 0 to 1).

Make sure that the Display Device in the color management section is set to None (so that the image information is not distorted using a view transform).

When importing into other software you will need to set the image to be interpreted as data, not using any color transform.

The quality of the heght map will depend on the amount of detail in the original geometry of the landscape, and of the size (in pixels) of the final image.


How to snap and align an object to the 3d cursors position and rotation?

Snap position to cursor will be find in the shift+s menu. To copy the cursor's rotation go to Object>Transform>Align to Transform Orientation and select Cursor in the pop-up menu.


Metal materials are pure gloss and if you want it painted then

1-It's metal that have been painted (like it's been sprayed with paint)
which is gloss shader mixed with a paint material using a mix shader and the Factor is an image texture made to tell blender where is gloss and where is paint

2-It's like metal that is factory painted
which is gloss with an image texture

note that metal has a colored rim light

for the best realistic result look up PBR materials

I recommend blender guru's tutorial ..2 videos that explain PBR materials the second one is about accurate metal materials but you need to see the first one


Set  the points to a collection of coords.

Needed to change to the points from a collection of bmesh.types.BMVert to a collection of 3d coordinates.

points = [v.co.copy() for v in bm_points.verts]

May still need some tests, here is the result

added some code such that if the grid is in edit mode, select the result.

import bpy
from mathutils import *
from mathutils.bvhtree import BVHTree
import bmesh

def are_inside(points, bm):
    """
    input:
        points
        - a list of vectors (can also be tuples/lists)
        bm
        - a manifold bmesh with verts and (edge/faces) for which the
          normals are calculated already. (add bm.normal_update() otherwise)
    returns:
        a list
        - a mask lists with True if the point is inside the bmesh, False otherwise
    """

    rpoints = []
    addp = rpoints.append
    bvh = BVHTree.FromBMesh(bm, epsilon=0.0001)

    # return points on polygons
    for point in points:
        fco, normal, _, _ = bvh.find_nearest(point)
        p2 = fco - Vector(point)
        v = p2.dot(normal)
        addp(not v < 0.0)  # addp(v >= 0.0) ?

    return rpoints

def test(grid, ob):
    print("test")
    mesh_points = grid.to_mesh()
    bm_points = bmesh.new()
    bm_points.from_mesh(mesh_points)
    points = [v.co.copy() for v in bm_points.verts]

    mesh = ob.data
    bm = bmesh.new()

    bm.from_mesh(ob.to_mesh())

    inside = are_inside(points, bm)
    if grid.mode == 'EDIT':
        # view the result
        bm = bmesh.from_edit_mesh(grid.data)

        for v, select in zip(bm.verts, inside):
            v.select = select
        bmesh.update_edit_mesh(grid.data)

scene = bpy.context.scene
test(scene.objects["Grid"], scene.objects["Suzanne"])

Consider using bmesh_from_object() or applying the global transform to the bmesh.  If using an edit mode bmesh and not wanting to commit changes bmesh.from_edit_mesh(me).copy() provides an unbound copy.

If only the transform needed then transforming a mesh copy with

me.transform(ob.matrix_world)

or using the operator, will provide global coordinates.

bmesh.ops.transform(bm,
        matrix=ob.matrix_world,
        verts=bm.verts)

Alternatively could put one in the object space of the other to make their coordinates equivalent.

The mesh provided from ob.to_mesh() is "not what it used to be"

How do I get a mesh data-block with modifiers and shape keys applied in Blender 2.8?

May be worth noting too that Suzanne has 3 separate parts.


Try looking at some reference images (google images is often the easiest method) to see what peppers look like.

My observations:

Very irregular shapes, usually with subtle bumps and nicks.
Most peppers seem to have rather rough reflections.
Extremely subtle color variations in the skin.
Little bits of "imperfection", such as tiny specs of dirt in crevices/around the stem

With some hastily slapped together procedural textures, I attempted to simulate these things:

For the irregular shape, I used two displace modifiers. One doing macro displacement in all directions, the other doing subtle displacement along the normals.

To get the subtle variations in color I used a noise texture. For the small nicks I used a bump map. For the rough reflections I used a much rougher glossy shader.

You'd probably be able to get more realistic results with image textures, but perhaps this will give you some ideas.

In my scene I didn't end up using SSS for the pepper, as with my lighting setup the results were indistinguishable from a diffuse shader (and SSS was much noisier). However this might not be the case in your scene, so keep in mind that thickness and inner geometry matter. Peppers are usually hollow with a core running through the middle, so a solidify modifier and a displaced cylinder in the middle should approximate that pretty well.


Face disappearing when imported to Unity (Not Normals)

Try exporting it to an FBX file, and then importing it into Unity. It worked for me, and it seems like the .blend import is broken somehow.


animation nodes random color setup not working

Found a solution but it only works in the render view.

Inside the cycles material I just had to plug the vertex color in the color on the material using the attribute node (input/attribute) and it works!!!


Not sure where you have tried to find it, but it is a compositing node.

And if not familiar with compositing i found this one for single point tracking:
http://cgi.tutsplus.com/tutorials/single-point-tracking-in-blender--cms-24286


First off, that's not ASCII; this is merely a misinterpretation of the raw data. The actual format can be figured out from Blender source files render/intern/include/voxeldata.h and render/intern/source/voxeldata.c together with blenlib/intern/voxel.c. The format is used for 3-dimensional textures.

The header is read by read_voxeldata_header(), and consists of four ints: the X, Y and Z dimensions, as well as the number of frames. There's no code to handle endianness nor size variations, so the files aren't portable across platforms. Most current platforms will store these as 32-bit little endian.

Next come the frames, in order. Each frame is also stored in raw memory format, as X*Y*Z floats; this will typically be IEEE 754 single precision (32 bit) values.

Within each frame, the order of the voxels is defined in the sampling functions. They use a macro named BLI_VOXEL_INDEX to perform the lookup, defined in blenlib/BLI_voxel.h. It shows that the order is along X axis first, then Y axis, then finally Z axis.

The raw 8-bit format is similar, but has no header, and uses only 8 bit fixed point values; the voxel value is databyte/255.0. This requires the actual dimensions of the voxel to be entered in Blender.

The image sequence format simply uses a layered group of images, along ascending Z axis. The pixel data gets averaged into a grayscale voxel texture.


"Child of" bone constraint on multiple bones, rotation issue

You can duplicate all your desired "Child " bones, and set a copy rot constraints on each of thoose duplicates, then make every original bone child of its duplicate, so that first you rotate the driver (and duplicate and its child rotate accordingly) then you can add its own rotation to every child.


Yes it will. Rendering with wwo GPUs is faster than with one. They don't have to be the same kind (as long as you are not mixing AMD and Nvidia).


I imported a blend file into unity which contained 3 animations but I can only see one

I usually animate inside unity. There you can manage the animations with the animator. Or you could try to save the animations as individual files. Some professionals save all their animations into one animations, they can separate them in unity. I hope some of these will answer your question.


How to change hair color along absolute value of hair strand length?

how to make this happen: you need Geometry node -> separate RGB -> Map Range -> ColorRamp -> output.


Bake out the ambient occlusion and shadow maps, then multiply them together in the compositor or your favourite image editor.


Do the following to help reduce vertex count:
Select an object.
In edit mode press "A" 2 or 3 times to ensure all vertices are selected.
Press "W" then remove doubles.

You can also set your subsurf so it won't render the subsurf in the viewport.

Also you could try opening it with 2.49b. It might open.


Lattice control of multiple objects without distortion

One approach would be to use vertex parenting.
Create a mesh containing triangular faces which are unambiguously closest to their corresponding cobblestones. You could create the cobblestones from the mesh before triangulation, (as I did here,)  or the other way round: create the mesh from a duplicate of the bottom faces of existing cobblestones. The mesh faces don't have to be connected to one another, in fact, it would be better if they weren't.
Give the mesh Shape-Keys for the intact and torn states:

You have to plan ahead a bit; leave yourself  a state of the mesh from which you can parent the cobbles cleanly, or parent before making the shape-keys, if doing so can create the right parenting.
If they aren't already, P make the cobbles separate objects, and, all selected,  ShiftAltX, send all their origins to their individual geometry.
From there, with the deforming mesh in a matching state, and active, with all cobbles selected too, in Object Mode, CtrlP parent the cobbles to the mesh,  using Vertex (Triangle). The Cobbles will each be parented to the closest vertex-triangle in the mesh.
You are now free to deform the mesh's shape-keys, however you choose to, and the cobbles will follow, without distortion.

Here, with some Rigid Body cut in after the initial separation:


Alpha Layer + Transparency Shader Glitch in Eevee

Your nodes are wrong (you're using Transparent Shader instead of Translucent). Here, from the tutorial you are referring to:


Mesh becomes flat when working with Fracture Modifier Branch. Is this a regular bug?

Hmm, this looks very odd indeed. Looks like something has been scaled to 0 in one direction accidently. The FM does apply the scaling when fracturing, though.(bullet cannot deal very well with scaled objects, imho).

But without the blend this is all just guessing. Could you share it here maybe, so I can take a look ?


Baking transparent decal always results in black oblique pixels

I think this is not directly possible.
Though, a workaround is to use an intermediate surface which is glass, combined with emission (as this setting darkens the surfaces).
Then, bake (transmission) from it to the target plane.

A and B are inverted from initial setting

As (poor) explanation, my hypothesis about why it works is here:

The transparent BSDF shader is given special treatment. When a ray
passes through it, light passes straight on, as if there was no
geometry there. The ray type does not change when passing through a
transparent BSDF.

And:

Note that, while semantically the ray passes through as if no geometry
was hit, rendering performance is affected as each transparency step
requires executing the shader and tracing a ray.

So (maybe), from the raycast point of view (actual or calculated baking cage) the A surface keeps the ray black whilst going through it, except for the rays it diffuses itself.
Is it a bug or unmanaged situation, I don't know.
As opposite, the glass surface receives and keeps actual rays and can transmit them.
Additionnally, we could except that a setting where A is alpha driven mix between glass and diffuse should work (in the initial A on B on C case) but it does not.
Note: edited also because I was wrong thinking changing "film" parameters was needed.


How can I save memory in cycles when I have a lot of duplicates?

Instancing
Use instanced geometry (and objects) - instanced duplicates won't consume memory.

Alt+D will link the mesh data and save memory (Shift+D will not). You can have different materials applied to objects with the same mesh (link the material to object not to mesh)
Use Dupliverts/Duplifaces or Group Instances - this links whole objects (groups). This will save the most memory.
Use linked object (groups) from another .blend (Ctrl+Alt+O) multiple times - same memory savings as previous.

Multiple Renderlayers
Divide your scene objects into multiple render layers and combine them into a single image in the compositor. This way you can defer the memory load across multiple rendering sessions.
Texture optimization
For Blender 2.78 and up: Bindless Textures are now supported on GPU, which means only limit is now VRAM and a CUDA limit of 256 textures. Cycles now has support for single-channel textures - therefore no need to pack textures.
For older Blender versions: pack your black & white textures (masks, influences, specular maps, etc.) into channels of color textures (1 color texture with alpha - tga/png - can store 4 BW textures or 1 RGB and a mask). This can save the GPU memory in texture heavy scenes significantly. Old Cycles does not use single-channel for BW.


Why do some parts of my object disappear when viewing the render viewport from certain angles?

I would start with a Principled BSDF shader, but since you are following a tutorial, try increasing the roughness to see if that helps minimize how much of the environment is being reflected.


I opened the first of the attached files, StopTablet2.blend... the Bevel Modifier was before the Boolean Modifier so I changed that. And voilà, the object was beveled. And even more after disabling Clamp Overlap.
In the second file StopTablet3.blend you've set Limit Method of the Bevel Modifier to Weight, but only the edges on the top have bevel weights assigned (you can see it by the blue color). If you give a bevel weight to the other edges you want to bevel it works, at least if you disable Clamp Overlap again. Or use a different Limit Method like you did in the other file.


What is the most effective technique for modeling?

To define what is the most effective 3d modeling technic, all the know technics should be evaluated in several factors, such as:

Time demanded
Computational cost
Quality
Practicality

And be considered for all different artists, computer configurations, type of scenarios, and even consider if the technic can be incorporated in a production pipeline among other artists. So, it is impossible to answer your question accurately.
BUT
To help you discover more about the various techniques (or styles) to do a 3D model in a DCC software such as Blender. I would suggest you watch this video from Gleb Alexandrov as a good start.

Is there a more effective way to create more complex models or do I just need to practice more?

Also, as referred to in other comments, the modeling technic depends on what you are modeling, so maybe there is a better way to modeling, maybe not. But it is very common that along the process you discover ways to speed up or improve your knowledge to do 3D models.
And about practice, I guess the only person who can answer that is your employer or your clients. Because even if you have been modeling for 10 years, there are always new technics that you actually never practice. So it depends a lot on your expectations and demands.
Do your best, enjoy the process and stay curious.


How to bake follow path constraint to animation keyframes

You should enable visual keying, as it reads in tooltip: 'Keyframe from the final transformations (with constraints applied)'


Renaming Animation Channels with a Script for dummies

No groups.
Going by screenshot.

The fcurves are not split into bone groups.

The bones have names "mixamorig:LeftShoulder" have renamed to "Shoulder.L" ie stripped out "mixamorig:" and then renamed.

Reinstated bone groups to new names. (optional)

Test script:. select rig, run script in object or pose mode. (As always back up first.)
import bpy

context = bpy.context
ob = context.object

def bonename(dp):
    #dp = fc.data_path
    if not dp.startswith("pose.bones"):
        return None
    start = dp.find('["') + 2
    end = dp.find('"]')
    return dp[start : end]

def rename(name):
    if name.startswith("mixamorig:"):
        name = name[10:]
    if name.startswith("Left"):
        name = f"{name[4:]}.L"
    elif name.startswith("Right"):
        name = f"{name[5:]}.R"
    return name
# test
x = 'pose.bones["mixamorig:RightShoulder"].location[0]'
print(rename(bonename(x)))

for pb in ob.pose.bones:
    pb.name = rename(pb.name)

action = ob.animation_data.action

for fc in action.fcurves:
    name = bonename(fc.data_path)
    if name:
        new_name = rename(name)
        fc.data_path.replace(name, new_name)
        if not fc.group:
            fc.group = (
                    action.groups.get(new_name)
                    or
                    action.groups.new(new_name)
                    )


Go to the material settings.
Disable Backface Culling to see both sides of the material faces.
Set the Alpha Blend option to Alpha Clip (recommended) or Alpha Sort to fix the overlapping faces.


Material doesnt show up in rendered view

When combining several outputs into some other inputs, you should remember what socket you use and how.

In your case, you don't see any textures in Rendered view because information from Color outputs couldn't be converted properly being plugged into Shader inputs.
And the blue color fullfilling everything in your case is the color of the environment texture (which is added by the Sky Texture node).

Instead you should mix colors, textures, etc using nodes designed for that, i.e. Color > MixRGB one. Its ouput is also of Color type, so you can continue adding some color information to the node tree.

In the very end, when you know you're done with color, plug the final Color output into the Color input of the Diffuse (or another one) shader. After that, you may combine shaders (add some Glossy or Transparent or adding new colors / textures with new Diffuse shaders or  whatever) with Mix Shader node, but there won't be any conversion between Color and Shader type.

You may want to look at meaning of the color of the nodes sockets for more info on different sockets' types.


Reference Images
Always use lots of photo references in conjunction with your blueprints when modeling an existing car. Photos can reveal much more about the car's surface than blue prints alone.

Shrinkwrap Technique
Basemesh
For trickier surfaces, it is good practice to create a "base-mesh" that is as smooth as possible before creating the final mesh. Then a final mesh can be modelled over it and shrink-wrapped to it to create a more perfect result.
A good way to create the base-mesh is to model a larger portion of the car ignoring all panel gaps and finer details. To ensure that the reflections are as smooth as possible, carefully plan the topology and keep the vertices relatively sparse. When it is finished, you will usually need to bump up the number of subdivisions to a high number, usually 3 or 4.
Pay special attention to how the reflections flow across the surface. It's important!

You would model more than just one panel for the base-mesh, typically the whole side, rear, or another large area. I only modelled a quarter panel to save time.
Final Mesh
Once the base-mesh is satisfactory, you can model final panel meshes over the top of it using the Shrinkwrap modifier to keep the pinching in check. You can now include all of the panel gaps and cutouts without constantly worrying about nasty surface quality!
To make the panel gaps nicer, you could use the Solidify modifier set to "Only Rim" to create a lip around the edge followed by a Bevel modifier set to bevel by angle.

Obviously, this isn't the quarter panel that you're modelling, but the same principles apply.

Keep Practicing!
There is no single answer. There are a million ways to model, so start modelling and watching tutorials! Develop your technique!
I can't magically place real experience and hours of modelling into someone's head!


Is Eevee ignoring motion blur on particles?

According to the documentation the object motion blur (particles as well) is not yet supported. It probably will be but we have to wait to get all the features in Eevee.

The only way is to use cycles now.


UV mapping with strange distorted texture

Your normal map is set to sphere mapping. Switch it to flat and you should be good to go. The albedo texture is fine, it's just that the normal map is so strong it makes it very hard to see.


I figured this out. Turns out, it was just a huge oversight on my part. I had simply neglected to actually CLICK the checkboxes. All plugins are functioning normally


How do I add a 3D border on all edges of a mesh?

One simple way is to duplicate the object (press Shift D, then Esc), enter edit mode, select all and press X to delete Only faces, then add a skin modifier, set the size of the quad border with the "Mean radius" X and Y values of every vertex, then add a subsurf modifier to get the resolution and roundness you need.

Afetr applying all modifiers (always starting from the upper) you can rejoin the two meshes into one single object (Ctrl J).


The material uses a displacement and will work only with Cycles rendering.
Also, the displacement scale is relatively low.
So, use Cycles and increase the displacement scale (check all parts in green below):

Additionally, you may need to add some subdivision to the object for a better rendering of this displacement.


This is a bit like asking "how do I give two files the exact same name, and put them in the exact same folder on my computer?" Just like files, separate meshes must have unique names... otherwise, neither you nor Blender knows which mesh is which.

Firstly, lets define our terms. A "Mesh" is a collection of vertices. Meshes have to live inside an "Object." An "Object" is a container for vertices. An object can contain literally any arrangement of vertices; connected, unconnected, polygons, individual points, etc. All those vertices are considered one mesh when they are inside an object, even if they aren't connected to each other. You can think of vertices a little like letters. If vertices -> letters, then polygons -> words, text -> mesh, and object -> document. (It doesn't work perfectly because you don't name your text separately from the document it's in, but Blender does do this with meshes and objects).

Each object must have a unique name, and each mesh must have a unique name. Typically, a mesh gets its first name from the object it's created in, but it doesn't have to.

To answer your question, you have two options. You can use ctrlj to join the meshes in any selected objects into one object (Blender will put them in the "active" object, and then delete the empty ones). This takes all the separate collections of vertices and puts them in the same container. This also gives them all the same mesh name... because they are all one mesh. To continue our files analogy, this method would be like cutting the text from one document and pasting at the end of another other document, and deleting the empty document. You now only have one container, but you still have the text from both documents.

Your other option is to use some other method to give unique names. Maybe it makes sense for your meshes to be in separate objects. In that case, there's likely a descriptive way to name them that will also uniquely identify them.


Rendered aspect ratio appears stretched even at 1:1

**I have figured it out. The aspect ratio in the image editor was different. I put it to 1:1 there and it fixed it.


How to create this nice colorful glass material?

I think I'm not too far with this setup (rendered with Eevee, it might be slightly different with Cycles): I've made a mix between Glass, Transparent and Glossy. It also needs Volume Scatter to give it this blurry depth:


Exporting Animations via blend files - Common Asset Duplication

For anyone else getting started with Blender >= 2.8.3, there are many animation features.
The best seems to be to use :
The dope sheet editor to capture an animation that has several objects being animated as a single animation.
The animation editor to capture multiple animations for a single character/game object ie idle1, idle2, walking.
When you import these assets into unity as fbx files, you can split the animations anyway you like, but the best I found seems to be splitting them into fbx's that contain the meshes and armatures that the animations are applied to, so have an fbx for a single game object and its animations, then one fbx with any animations that cross single objects, including again all the meshes and armatures.


How can I correct bone rotation with bpy between two Rigs which have different roll settings

For the ordinary case you might convert the pose matrix like this

import bpy

arm_src = bpy.data.objects['Armature_Source']
arm_tgt = bpy.data.objects['Armature_Target']

def mat_offset(pose_bone):
    bone = pose_bone.bone
    mat = bone.matrix.to_4x4()
    mat.translation = bone.head
    if pose_bone.parent:
        mat.translation.y += bone.parent.length
    return mat

def adjust_pose_mat(source):
    target = arm_tgt.pose.bones[source.name]

    mat = (mat_offset(target).inverted() *
           mat_offset(source) *
           source.matrix_basis)

    target.matrix_basis = mat

for pb in arm_src.pose.bones:
    adjust_pose_mat(pb)

Example Blend:


Where did the material node go in Blender 2.8?

In 2.8, nodes are the constituent parts of a material. Shaders, textures, color and all the other nodes make up a material. If you want to create a new material from the shader editor, click the "New" button at the bottom or choose from existing materials to edit.

Or you can click the material tab on the side and call up the material panel.


how to adapt a box to an object with a python script?

I found how to move the highest plan of the bounding box and position it correctly above the object :

activeob = bpy.context.selected_objects
cube = activeob[0]
bpy.context.scene.objects.active = bpy.data.objects[cube.name]
bpy.ops.object.mode_set(mode='EDIT')
mesh = bmesh.from_edit_mesh(cube.data)
ob = bpy.data.objects[cube.name]
matrix = ob.matrix_world
for v in mesh.verts:
    if v.select:
        v.co = v.co*matrix
        v.co.z += 20
        matrix_inv = matrix.inverted()
        v.co = matrix_inv*v.co


Best way to send network requests from timer modal

I ended up doing the same thing as the Blender Cloud Addon and run a requests call in a threading executor:

import asyncio
import requests
import functools

async def do_request():
    partial = functools.partial(requests.get, 'http://example.com')
    loop = asyncio.get_event_loop()
    response = await loop.run_in_executor(None, partial)
    print(response)

if __name__ == '__main__':
    loop = asyncio.get_event_loop()
    loop.run_until_complete(do_request())


Armature animation is transformed incorrectly and cannot reset to its default position

I figured it out. When I was animating I accidentally got into edit mode and pressed ALT-R (thought that I was in pose mode), which reset the roll position of the bones.
Recalculating the roll position brings the bones to the rest position when no transforms are applied.

However, the animation still has weird behavior, it might be that the recalculated roll is different to what I had when rigging the bones.
Anyway, here's my tip: RECALCULATE ROLL BEFORE ANIMATING. So if you accidentally changed the roll, you only have to recalculate the roll and not to reanimate all the animations.


OBJ import disappears behind 'screen' when zoomed out

It might be because your object is extremely large, as far as Blender is concerned. Try scaling it down, applying the scale, and see if that fixes it.


How to 'weaken' or 'strengthen' a normal map texture?

First of all, to understand how the normal directions are mapped to colours, see this excellent answer in gamedev.sa. Basically, the blue value is

B = cos(alpha) × 0.5 + 0.5

and the red and green are the corresponding

R or G = sin(alpha·(x or y)) × 0.5 + 0.5

values for both directions, with alpha being the angle away from the surface normal. You might notice that it's not immediately trivial to make it stronger or weaker, the standard transformations (saturation, contrast, brightness) on their own will not do what you want.

A quick and dirty way ...

... to strengthen the map would be to, for example, subtract 0.1 from the red and green channels and then multiply the red and green channels by a factor of 1/(1 - 2*0.1) = 1.25. The problem with this is that you can clip colors and that you end up with a normal map that is technically wrong because the normals will be longer than 1. Basically, this stretches the normal in the x and y directions. For normal maps that are far too weak because they were created from a very smooth surface, this method might work fine. Do not use it on anything where steep angles are already in the map.

Setup:
Be careful here to make sure you work in linear image coordinates without any gamma correction.

Done right

Per the formulae above, you get the angle in a range from 0 to 1 this way:

angle = 2/pi × arccos((B-0.5)×2)
angle_x = 2/pi × arcsin((R-0.5)×2)
angle_y = 2/pi × arcsin((G-0.5)×2)

We can then transform this value in a way that retains its range (for example via a gamma-node) and re-apply

B = pi/2 × cos(angle)×0.5+0.5
R = pi/2 × sin(angle_x)×0.5+0.5
G = pi/2 × sin(angle_y)×0.5+0.5

This looks something like this:

You still have to watch your image gamma.

Clipping is not a problem any more here and even strong strengthening should not create any problems. You bend the normals away from the centre while retaining their length.

Notes:

In this setup, a smaller gamma value creates a stronger normal map, while gamma = 1.0 doesn't change the map.
The values of 0.637 are actually 2/pi, while 1.570 is pi/2 (enter the values as "2/pi" etc., python will understand what you mean).
Interestingly, Doc:2.4/Bump_and_Normal suggests that Blender uses the full range of the blue channel for the range of 0.0 to 1.0, which makes the ((B-0.5)×2) and ()×0.5+0.5 transformations unnecessary for this channel. I can't find a more current reference, but I assume this is still true in the current versions. So I might have to change the second setup accordingly.


How to set origin of multiple objects at the same time?

Well I'm not sure of a good way to do this, you can try to select all your arrows, and then select the one with the correct origin, then press CTRL+L, and select "Object Data" from the list.. Unfortunately this is not ideal, as it also copies all other object data such as materials and UVs, effectively making all the arrows instances of the active one.

You can then select all the arrows again, then press U on the keyboard, and select "Objects and Data" from the list, to make all the arrows mesh data single users again, and not instanced..


How to put a Part of my Model into a New File

You can save the models in blend file and append them in a new file whenever you want using "File -> Append" (Shift+F1)


Create a sphere with multiple layers and a chunk cut out showing them

Start with a sphere and delete the faces that you don't want. Then, select the whole object in edit mode, press "E" to extrude, press "S" to scale, press "0", and then press "Enter".

You can duplicate this as many times as you want and then add a normal sphere in the middle.


Blender 2.8 Texture Paint Nodes - supported in Unity?

In general, node logic is specific to Blender and will not be supported in other software. Material and texture creating in far from standardised across technologies, and thus trying to match and support it is just about impossible. In certain cases, certain exporters may detect similar nodes and try and recreate them in the target format/application (for example in the case of fbx export, 2.8 uses the principled shader for basic material settings), however this is the exception, not the rule.

The solution for exporting generated textures to any other program is to bake them to an image file.


How to correctly separate vertex color data into the R channel on EEVEE?

This appears to have been a bug at a specific release of Blender - now unable to replicate the problem so it would appear that this has been long since fixed.


How to convert SFM models to Blender on a Mac?

I know you asked this 8 months ago. but there is a way to install windows on a mac. it will partition your hard drive. it's dual booting. this is done by an official application included in macOS, called Bootcamp assistant. you'll need a 32GB or bigger pendrive, and a copy of windows (which is provided by Apple on the app's website) I've used it a lot. macOS can interact with the partitioned windows part of the hard drive, but it's read-only. (you can only open files from the drive, or copy them to a write and read the drive and modify the copy) unfortunately, windows cant interact with mac. to switch OS hold alt when booting up the PC and you'll see two drives. "windows" and "Macintosh HD" in that order. if you don't hold alt, it automatically boots on windows. I don't know if you can change it.


Here's what I would try.

In object mode, make one copy of your original object for each separate part of the original object you want to use as a boolean operator with the original. If the object you want to boolean with itself has more than one mesh sub object, switch to edit mode, select each individual sub-object  containing portions you want to use as boolean operators, use the duplicate tool (SHFT-D) to make a copy of the sub-object, and then separate the duplicate of the sub-object into a new object using the P key, choosing the "Selection" option.

You will now have an original and one or more copies of the original, or portions of it. On one of the copies, select the parts of the mesh you want to use to operate on the original, perform the boolean operation, and then delete the copy. Repeat this for each part of the object that you want to use in a boolean operation. When completed you will have effectively used the object to perform the boolean with itself, and yet Blender will be satisfied that you are doing the operation between different objects.


it does, but it's really weak: try  setting background to grey, and disable sun rendering, to see it better, then enhance spot strength to 10.000:

here it is:


How do I stop faces extruding individually?

You have likely right clicked on the tool and accidentally selected Extrude Individually. Right click on the tool and select Extrude Region to get the desired behavior.


How to import and export blender files with textures

PROBLEM SOLVED!

This is how I did it:

Make sure the object to be exported (plant) is selected in object mode
File: Export: 3ds
I opened the scene (room.blend)
Select A twice to make sure everything is deselected
File: Import: 3ds
The object (plant) is grey
With the object selected switch to edit mode
Deselect everything again by pressing A
Hover your mouse over the parts you have created individually and press L
The selected part will be highlighted (ex. leaf)
Go to Material (On the right side of the screen)
A list of the original materials is there but they are all blank
Select the corresponding material (ex: leaf)
Go to Use Nodes/Color and select the dark grey area on the right indicated by a circle
A menu will appear: select Image Texture
Open the file with the UV map you created (ex:UV_MAP_leaf)
For colors without the UV map, I had to recreate them (ex: pot, dish)

Repeat these steps with every single part in the object and that's it!


Is there any option to change the contrast on Blender Render?

There is no option for contrast but you can change it in the node editor under
Add node -> color -> brightness/contrasts connect the scene node to the brightness/contrasts node and then to the render output node NOTE you need to click
The use nodes button first


Can one create a video from sequence of meshes that you already have using blender?

If you can get your sequence into a .MDD or .PC2 format, you can try using the Mesh Cache modifier.

If that doesn't work, you can try this addon which handles .obj sequences.

A third option is to write your own python script to toggle the visibility of each mesh so it is visible for only one frame. You can do this with a script that sets the object.hide_render property accordingly.

You can copy materials to from the active to the selected objects with CtrlL> Materials.


My eye won't track to my bone on a certain axis?

Actually your case is very simple, keep everything as is, use world space in the Track To constraint for both, the only thing you need to change is the (To: -Y) in the Track constraint. Which is the Y axis for the Bone.
Aside from that, you have some issues in the file, you have 4 armatures, each has bones, and all of them have default names, my advise is that you rename your bones, delete unused armature, this will make your work much easier, I also had to move the origin of the eye to it's bottom rather than the center so it doesn't detach from it's joint when rotates.Here's the .blend file:


how to add more control to cardboard animation

Rob was correct just needed to add more work to the splines and make sure everything was applied, transforms, rotation and scaling using Ctrl+A then apply new curve deforms and set the correct deformation axis


If you only want to turn on and off the move tool, by default is by Holding down Shift + Spacebar , G.
If you don't see anything, hover your mouse over the move tool and you will see the shortcut appear


Python module installation does not work

If you can start command prompt, and get python34 REPL, and import numpy and tables without errors, there's little reason that Blender's python console can't do the same.

Determine which python executable is used

Run this bit of code in two different locations. First from command prompt python interpreter and then from Blender's python console.

import sys
print(sys.path)
print(sys.executable)

You might notice that Blender isn't finding the same python executable. If they are different, this can explain why imports are failing. If they are the same that's a good thing. Half the battle is won!

Test your Python separately first.

On windows make sure the C:\Python34; is at the start of the PATH line, when you type in python into command prompt you'll want 3.4(.1+) to launch. (At least, I've had success with that and numpy1.8 on windows)

You should also be able to import numpy from command prompt without errors

Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:38:22) <edited>
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> # also try the other important imports, stuff must work from here too

If you get errors from this python interpreter, forget about blender and fix the errors first. Once fixed, blender too will be able to use the libraries.

If you still have the python directory inside Blender's folder now is a good time to rename it to _python.

The Blender warning when you rename/remove its own python folder

  Warning: bundled python not found and is expected on this platform.

is just that, a warning. Telling you that Blender looked in the directory where it keeps Python and couldn't find it, that's OK. It's perfectly fine to use your local Python34 installation, on windows I prefer to use it that way. Pasting around libraries into scripts/modules folder obviously didn't work, I suggest removing the files you added there to prevent them from interfering with imports.

For sverchok we found it was necessary to install Numpy 1.8 and Python3.4.1, and did a small write-up. I won't reproduce here because this is bordering on off-topic.

Forcing Blender to use your local system Python3.4.x

When Blender is forced to use the system's local python 3.4.x it hoists some paths of its own into the global namespace at runtime, to allow for importing bpy and all other blender modules. Apart from that the py3.4 runtime is entirely your system's.

If your imports are failing inside Blender, even though it uses the local python3.4, it is likely because you moved libraries into scripts/modules/.. or one of the other paths listed in sys.path. Python is going to look in the sequence given by sys.path, it iterates over the list, to find an import that matches your import statements. if Python finds anything before it hits 'C:\Python34\lib\site-packages` that will be tried first and only.

You should have a nice directory with all your python3.4 libraries like

C:\Python34\lib\site-packages\numpy
C:\Python34\lib\site-packages\scipy
# etc


I'll recommend you this:

Start with a flat geometry (in your case you can delete the extruded faces):

Notice that I only add one circle (You should lower the circle vertices number for ease of work).
In this particular case the two big figures (the big circle and the ellipse) have 32 vertices and the small one have 16 vertices.

Select 3 quarters of your geometry like this:

Erase the vertices

Then add a mirror modifier that affect the X and Y axis to get this result:

Now fill up the geometry the way you need it:

If you get this kind of effect, the darker faces (it may not happen) this is due to some normals that have been gone the wrong way, to fix this select your entire mesh by pressing A and then press Crtl + N to flip normals.

Now, get a better view angle.

Extrude on the Z axis, press e (extrude) and move your mouse until you get the desired results.

For more detailed mesh you can add two modifiers. First the Edge Modifier and then the Subsurf modifier. The order of the modifiers will impact in how your mesh looks.


How can I unlock rotation and displacement for multiple objects at once?

In Blender if you want to change the same property on multiple objects you have to press (and keep pressed) the ALT modifier key beforehand, otherwise only the active object (Yellow outline) will update.


How do I change the name of the default action created when inserting keyframe?

keyframe_insert() creates animation_data and an action if necessary, and makes it the new action of the active object.

Thus, you can simply access your object's action and change its name:

bpy.data.objects["Rig"].animation_data.action.name = "foobar"

Note that you shouldn't do this before any call to keyframe_insert(), as it would error out if there's either no animation_data or no action.

Refer to this question to learn about other approaches for animating things:

Python performance with Blender operators


How to make realistic falling snow in blender cycles

You could create a snow material using volumetrics using a material such as this :

Applying this to a Sphere produces something like this :

Create a particle system and adjust the properties to provide suitable snowfall - eg, increase Drag, Damp, Brownian in the Particle settings and possibly also add a Turbulence force - to get gently falling snowflakes and the sphere for each particle.

This can produce the following result :

Blend file :

Breaking down the volumetric material, this consists of two parts.

Firstly, a Voronoi texture is used to generate a branching structure by way of a Maths Greater Than filtering out those points greater than a specific value :

Note that the Light Path render properties in the right-hand panel have been adjusted to increase the Volume bounces. This improves the quality of the volumetric material (as light is allowed to bounce within the volume).

Secondly, the Generated coordinates are manipulated to generate a density that decreases the further the point is away from the centre. This is achieved by subtracting (0.5,0.5,0.5) from the 0.0 to 1.0 generated coordinate (so it varies from -0.5 to 0.5 with 0,0,0 being the origin), the Dot Product is used to calculate the square of the distance from the origin, the Power node takes the square root (ie d^0.5), then it's scaled by a factor of 2 so it matches the input range of the Color Ramp node. The Color Ramp values are reversed (click the double-ended arrow button) so that it reverses the range. This should produce the following :

These two parts are then combined into the final material so that the distance from the centre affects the density (so it's denser at the centre) and the 'width' of the branches (so they taper off as they get further from the centre).

Note that the Greater Than node has become a Less Than node in the final material due to the inputs being swapped over for better node layout.


Sounds strange indeed. Perhaps try this checklist:

Edit Mode> T> Options> X Mirror = Unchecked.
Alt+S, Alt+R, Alt+G to clear transforms.
Ctrl+A> Location then Rotation then Scale to apply transforms.
Ctrl+S> Cursor to Center to set your 3D Cursor to the center of the world.

If none of this fixes the issue, you may also want to try exporting and re-importing a mesh format like .obj or .dae.

I hope this helps. Good luck with your project!


To load an image from disk doesn't require bpy.ops. You could use:

bpy.data.images.load(filepath, check_existing=False)
# Load a new image into the main database

>>> bpy.data.images.load("/home/zeffii/Desktop/some_image.png")
# bpy.data.images['some_image.png']

# if an image exists by that name already, you could set the name
bpy.data.images['some_image.png.001'].name = 'some_image.png'

# check_exist=True will reuse an existing image with that name
>>> bpy.data.images.load("/home/zeffii/Desktop/some_image.png", check_existing=True)

bpy.ops.* are triggered each time you interact in some way with the UI (buttons, shortcuts..). Often the UI triggers a bpy.ops.whatever with  information about which window the event occurred in - this is important because you could have two UV image editors open, or two TextEditors (just an example). Therefor sometimes just calling the ops isn't enough, and some ops even expect a UI which isn't present in background mode.

All these ops eventually operate on lower level bpy database content. So when possible avoid bpy.ops and look through bpy.data to find a more direct route. The auto-complete function of the bpy console is great for finding methods and attributes.


Can't find how to enable IK on another user's rigged model, what's the catch?

Bones that are visible by default in this file have all transforms locked.You have to make visible armature layers, that contains controlling bones. Here is the image, that shows this.


Cycles Bake yeilding bizarre textures and wrong colors- any ideas?

You've probably moved on by now, but for anyone with the same question, I had a similar issue just yesterday. I never quite figured out why exactly it was happening, but I eventually got the problem to go away by cleaning up my mesh. This included

adding and connecting some vertices to break up some large planes getting stretched at weird angles
dissolving unnecessary edges and vertices
deleting entire planes that were not going to be visible in the render
separating a part that I had awkwardly extruded and probably had some weird relationships with other vertices.


How can I make an NLA strip longer to fit more keyframes?

Open the NLA editor
Select the strip you want to make longer
Open the properties panel with the N key
Go to the Action Strip tab
Enable the Sync Length checkbox - this will make the strip longer if you tweak it, making the underlying action longer.


Image texture is visible in Texture mode but not in Render mode?

Check to make sure the image is still in the location you pointed Blender to.  Sometimes, if the file has been moved, Blender will still have it in memory, so it still displays it in textured mode.  But when you click the render button, Blender will search for the image in the original file, and in your case, it apparently can't find it.  Double check your image texture node to make sure it is pointing to the right file.  Then, go to the file and make sure the image is still there.


Accessing object names with Python - outliner has different names for the same object

Use the object reference.

When adding an object via an operator, the new object is context.object.  The data part, the lamp in this case is context.object.data

import bpy
context = bpy.context
bpy.ops.object.lamp_add(type='POINT', radius=1, location=(1,1,1))
lamp_obj = context.object
lamp = lamp_obj.data
lamp.use_nodes = True

Ultimately if you are going to be adding hundreds of lamps with code suggest using API methods rather than operators which become slow.  Python performance with Blender operators

Test code below written and tested in 2.8.  See comments for conversion to prior.

import bpy
context = bpy.context
scene = context.scene
nlamps = 10

for i in range(nlamps):
    lamp = bpy.data.lights.new("Spot%d" % i, type='SPOT') # 2.8
    #lamp = bpy.data.lamps.new("Spot%d" % i, type='SPOT') # prior
    lamp_obj = bpy.data.objects.new("Spot%d" % i, lamp)
    lamp_obj.location.x = i
    scene.collection.objects.link(lamp_obj) # 2.8
    #scene.objects.link(lamp_obj) # prior 2.8


Applying color to a large number of duplicates (Bricks)

Select all the objects you want to be the same color then press Ctrl + L  > Make Links > Materials.


How can I show the Search Area box on a tracking point?

The visualization of the search area can be enabled in the Clip Display panel in the section Marker Display. Enable the checkbox named Search to show the search area. Alternatively you can also select a tracker and press Alt+S.

The properties for the search area can be found in the Track tab on the Marker panel.


It looks like the Stretch constraint uses the object's Y axis as the one that points to the Target (and deforms the object). So if your object's Y axis already points towards the target it won't rotate, but if the Y axis is 90°, the object will rotate 90°. So, depending on how your object is oriented, you may need to correct its orientation.


How to output the number of vertices, edges and faces given a polygon with Python?

You can get the active object for instance:

ob = bpy.context.object

And get its data (if it's a mesh object, the mesh datablock):

me = ob.data

Mesh element counts:

len(me.vertices)
len(me.edges)
len(me.polygons) # faces

Vertex count of a single face:

len(me.polygons[0].vertices)


Multiple gpu render fail: illegal adress in cuCtxSynchonize()(device_cuda_impl.cpp:2077)

Okay I found out this this cause issue.
if anyone having this issue. try to off this if it on.

They are located at Window setting -> graphic setting.


Messages

This is a logic brick only solution. It should be sufficient at the situation you described.

Selection handling

In this sample we let selectable object store the selection status in a property called "selected".

When it is "True" the object is selected.

When it is "False"  the object is not selected.

Give all selectable objects the property "selected" as boolean

Deselect all

When clicking anywhere send a message "deselect".

Any selectable object listens to a message "deselect" and deselects itself on receipt.

You need a (single) managing object that triggers this deselection.

With that you ensure on any right click all objects are deselected.

Select one

The one object the mouse cursor is over will be selected.

You see the selection will take place on the object under the cursor only. All other object will still receive the "select" message but ignore them.

Now let's make your managing object send the "select" messages:

It looks pretty much the same as the "deselect" logic. This is as both are triggered by the same key.

What will happen?

One left click:

message "deselect" will be send to all objects with message sensor listening to "deselect"
message "select" will be send to all objects with message sensor listening to "select"

[all selectable objects receive two messages!]

All selectable objects willreceive "deselect" and set property "selected" to False
All selectable objects will receive "select"

the one with the cursor over it will set property "selected" from (previously set) "False" to "True"
all others do nothing and keep "selected" with "False"

This way you can be sure only one can be selected as only one can have the mouse cursor above it.


Morph targets: A sphere shape turning into a cylindrical unwrapped sphere shape

I would do this backwards.

Crate a plane, enter edit mode (Tab) and subdivide it.

Press (U) and select Unwrap to create a UV map.

Exit edit mode Tab and in the properties panel create two shape keys by pressing the + box TWICE.That will create a base shape key for the plane and one for the deformed plane (a sphere).

Back in edit mode Tab, rotate the plane 90 degrees in the Z axis RZ90

Then rotate 90 degrees in X RX90

Move the plane up on the Y axis (this distance will be the radius of the sphere)

Press Space Bar type warp and select it.
On the warp settings change the WarpAngle to 180 degrees

Rotate the plane 90 degrees in the Y axis RY90 and warp again. This time make change the WarpAngle to 360 degrees.

At this point you should have a SPHERE!!

When you switch back to Object Mode your sphere will go back to a flat plane, don't worry you can control (and animate) the transformation by moving the value slider on the Shape Keys.

Then you can use UVs as the texture's coordinates in a material.


Copying Action From One armature to Another armature

An object can have only one active action, this is the action that receives new keyframes when you keyframe a value. The same action can be assigned to multiple objects. The dopesheet has several modes which includes action editor which can be used to edit or create, delete and assign actions to an object. The NLA editor can be used to have multiple actions affect the same object and also has the ability to repeat, ret-ime and offset an action over time.

An action is a collection of fcurves that contains keyframed values for an objects property/s. Each fcurve contains a data path that specifies the property that the keyframes effect. While the dopesheet can adjust the timing, the graph editor is used to edit other details of fcurves, including the interpolation mode of the curve.

For an action to be usable on multiple objects, they need to have the same data path for property names, for things like location and rotation that simply applies to every object. For an armature the "data path" recorded for each keyframe includes the bone name, so to use an action on multiple armatures they need to have matching bone names. The keyframes in an action will animate the bones with matching names the same in each armature.


I guess you need to:

In Edit mode, put the 3D cursor on the surface you want to snap.
Come back to Object mode and put the origin of the object to the 3D cursor.
Choose the Type of Element to Snap to Increment and enable the Absolute Grid Alignment option.
Now either enable the Snap option or press ctrl as a shortcut to enable it momentarily.


Your question is a bit confusing, but maybe you should rebuild your animation so that the step is taken in place, and you should move the armature instead.

If you dont't want to do this, then you need to add a python script to move your object to the exact position where you animated step ends... You must get the object's world position and increment it by whatever distance it travels in your animation. The script is only activated at the end of your animation... you can use the frame property on the action actuator to control this.

hope this helps
Nuno Estanqueiro


Have you tried the Dyntopo > Refine Method > Collapse Edges? It will simplify your topology. Of course you need to set the good resolution, the one you'll choose will define the triangle minimum size.


Selecting object show nothing in info pane

To set active object as parent armature deform with Automatic Weights for selected objects, you need to:

select objects include active:

object.select_set(True)

set active object:

view_layer.objects.active = object

call operator:

bpy.ops.object.parent_set(type='ARMATURE_AUTO')

Code example from scene:

import bpy

objects = [
    'Armature',
    'Cylinder',
    'Cylinder.001',
    'Cylinder.002'
    ]

context = bpy.context
view_layer = context.view_layer
scene = context.scene

# select objects include active
for ob in objects:
    scene.objects[ob].select_set(True)

# set active object
view_layer.objects.active = scene.objects[objects[0]]

# call operator
bpy.ops.object.parent_set(type='ARMATURE_AUTO')


Unusual lines on UV map after using “Difference” to create apertures on a plane

Using the Boolean to cut the openings left the object with only 2 faces, Filling in these  Concave Ngons caused the lines you see in the UV space. If you enable the face select mode this will become more obvious.

These Ngons will not be a problem as such once the object is imported into SL as the importer will convert those Ngons to triangles.

But as FFeller suggested using loop cuts is a much better way to go about this simply because you have more control over the geometry:

And having more control means it will be a lot easier to optimize the model ( = Lower LI costs) , easier to create lower LoD models and Physics model later in the process.
So best to avoid Boolean cutting for SL :)


take screenshots programmatically in bge?

In Bge you can indeed add an always sensor and link it to the python script


What is the best practices for rigging a Cartoon Character

Don't join the meshes, leave them separate.  The easiest way would be to modify the origins of your meshes so they rotate the way you want them to, instead of using armatures.

To do that, select your mesh, move the 3d cursor to the location you want your mesh to pivot from, and then select Object > Transform > origin to 3D cursor.  Now you need to parent your meshes to the body.  Select all of the appendages, and then select the body last.  Now press Ctrl + P and select object.  This will parent your arms and legs to the body.  You can now move them independently, but they will still follow the movement of the body.

If you wanted the antennas and eyes to move separately from the head, just parent the antennas to the head before you parent the head to the body.


How to stuff and coat a shark with licorice for biting?

Model your shark
Duplicate your model with Ctrl+D to make the inner portion
Go to sculpting tab, use the tools to deflate and change the inner portion (turn off symmetry)
Go to Addons -> Search for Bool tool -> Activate Bool Tool
Make your "teeth" object
5.5 Duplicate your teeth object
Select the teeth object, intersect it with your shark
Select the Teeth object first then the shark, and choose Booltool -> Slice
Select the cut out portion and delete it
Repeat the same with the inner portion
Scale the inner portion a tiny bit to prevent z-fighting
Apply different materials to the inner portion and the shark
Done


Where are the opacity key frames for masks?

While the bug is fixed (if it ever does), you can use a math node set to multiply to control the opacity of the mask. Animate the values from 1 (full opacity) to 0 (no opacity). Those keyframes will show up on the graph editor or the dopesheet.

Animating the values


Python: Add existing NodeGroup to Material

You can do something like this: create the node group instance and set the existing node group as node tree for this new instance.
import bpy

C = bpy.context

def instantiate_group(nodes, data_block_name):
    group = nodes.new(type='ShaderNodeGroup')
    group.node_tree = bpy.data.node_groups[data_block_name]
    return group

instantiate_group(C.object.material_slots[0].material.node_tree.nodes, 'NodeGroup')


How to copy color from webpage to Blender material surface color input value?

Load an image in Image editor. Use the color picker to sample the color from the image.
All the objects are affected by the light. It will never be the same as sampled because the light and shadows. You have to play with lights and its RGB or HSV values to get close as possible.


Data Transfer modifier: can't get it to work

thanks to @lemon 's hint i managed to find a solution and it was quite simple:

source and target objects must overlap!

they must sit at the same spot, just like for normal baking, and moving either object even slightly will noticeably change the result. by the way, it is not necessary to keep source object visible.


The enum for a navigation mesh is 'NAVMESH' not 'NAVIGATION_MESH'.  The python console is your friend here.

>>> C.object.game.physics_type = 'SOMETHING_WRONG'
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
TypeError: bpy_struct: item.attr = val: enum "SOMETHING_WRONG" not found in ('NO_COLLISION', 'STATIC', 'DYNAMIC', 'RIGID_BODY', 'SOFT_BODY', 'OCCLUDER', 'SENSOR', 'NAVMESH', 'CHARACTER')

You weren't getting an error because you had the double equals == which is a boolean test

game.physics_type == 'NAVIGATION_MESH'

Which will equate to False, more commonly I make the mistake of one equals, if (x=y) lol.


One option would be to create an RGB node and then make a group out of it. Then add that group to the other materials. When you change the color in the grouped RGB node, it will change in all materials.


How would I keep the animation and apply the modifier?

You can't.

Explanation

Applying a modifier means it converts your setup to a static mesh.

In relation to the BGE there are three ways to it deals with modifiers:

Supported Modifier

The BGE can run that modifiers. E.g. the armature modifier.

Automatically Applied Modifier

The BGE applies the modifier when loading the scene into a static mesh. This is like the user presses the apply button.

Unsupported Modifier

These modifiers are simply ignored and have no effect (but might disturb the processing of other modifiers).

Conclusion

In difference to Blender the BGE is not build around Modifiers. To get the effect you want I suggest to look at Logic Bricks (Playing actions, hiding/showing objects, moving object, adding/removing objects).


AlphaMasked Images showing up with pink instead of texture (Cycles) V 2.78

Make sure the Cycles Renderer is set as the render engine.

A pink color in texture view means, that there are missing images. You probably moved your Blender file to another directory or changed paths of image textures.

Go into textured mode in the 3D View. In the node editor select the desired image texture node.

If the source path is not found, the message "Can't Load Image" will be displayed. Click on the folder icon to locate your image file (marked green).


Different gpu without sli.how will it work in terms of memory

The cards are completely separate, they do not share memory. Whatever the lowest amount  of vram (in your case 8gb) will be the limit in blender.

The reason being that the whole scene is loaded onto each card. They are very likely rendering at different speeds, meaning your stronger card will be rendering more tiles then the weaker card.
(Think of it as if each graphics card is a computer in a render farm.)