Fixing deviant vertices after Remesh modfier

Looking at your .blend file, it appears that your mesh doesn't exactly line up for mirroring. This is partially causing the SubSurf modifier to pinch the mesh. To fix this, select the edge loop on the plane of reflection:

Enable Clipping on the Mirror Modifier:

Scale the edge loop on the X axis by 0 (S , X, 0, Enter). Now, as long as clipping is on, the vertices won't deviate from that midline.
Re-enabling the SubSurf modifier reveals that we don't have any pinching any more:

As far as the topology for your window goes, the Remesh modifier is not the best option for you. It has no regard to symmetry and is best used on complex, triangulated meshes, such as Dyntopo sculpts or 3D capture imports. It would be best to just manually retopologize by merging the tris into an n-gon, then cutting it into quads with the Knife tool (K), like this:

This mesh is still symmetrical and preserves your original mesh, unlike the Remesh result. This will also subdivide nicely:

With more subdivisions and smooth shading:

Download the .blend file here:


How to get rid of black triangles and artefacts?

Solved !
Credit to @Hikariztw and @Duarte Farrajota Ramos for pointing out the answer !

Sadly, I was only tweaking the clip start and not the clip end.

By tweaking BOTH of these options, here is the result :

z-fighting no longer showing up.

Thanks a lot for the help !


You have to keyframe both location and scale, if you want to scale in relation to the 3D cursor.

Since the object's pivot points are aligned with their geometric center they are technically moving, since the center position shifts up during animation.

Ideally though you should position all your objects center aligned with their bottom faces though.


I've fixed the problem. After some research on the 'net, the solution that worked for me was to enable Auto Run Python Scripts in File > User Preferences.


(Blender Internal) How to apply chroma key to videos on a plane?

This is a simple node setup in Blender's Compositor.  If you're unfamiliar with this part of Blender, leave a comment and I'll add step by step as to how to get into it.

If only wishing to remove the green and not overlay a background, i.e. have a video with just the effects, delete the BKD movie Node. Replace the Alpha Over Node with a "Set Alpha" node.  Connect it as shown below.

You'll end up with an alpha layered output.  If not needing the alpha layer, render in H264 AVI (RGB).  (or your favorite format)

If you do want the Alpha layer, you'll need to render the video as a series of Alpha layered .png images.  Make sure to create/select a special folder for these.  There'll be a lot!
These can be compressed into a single file for storage.

I've found it easier if the key colour isn't as bright as it's shown in the top pic.  (bottom of the keying node)

-=====-

Getting the resultant movies onto a plane -

Simply texture the plane using "Generated" mapping for starters to see how it goes.  You can revert to UV mapping if you prefer.

In the image properties "Image" tab, make sure to click on "Auto Refresh" so the movie or image sequence will play.


How to copy the specific location and rotation of a falling down object with cloth physics?

It's natural to think that when you're using 3 vertices as the target of a constraint, that you're using a face.  But you're not, not quite.  You're still just using 3 vertices, and vertices don't have full transforms.  As zero-dimensional thingies, they don't have rotation or scale.  When you use a constraint that tracks a vertex group, you can reliably expect it to acquire the location part of the transform, but not the other parts.
You're using a child-of constraint here, but there are other constraints where this would be a problem as well.  Copy rotation, copy scale, copy transforms, etc-- for anything that needs more than a location from its target, vertex groups are unreliable targets.
Blender, bless its heart, sure tries to make it work.  It tries well enough that sometimes it works.  But it's unreliable.
Here, it's not working.  We can use different vertex groups and constraints, constraints that need only locations, to do what you want.
Let's create three vertex groups on Cube.004 (the target of your constraint.)  We'll assign all vertices on one face to a group called "face".  We'll assign its two topmost verts to a group called "z".  And we'll assign two verts on its side to a group called "x".
Then we can replace our constraint.  Disable or delete the child of constraint, then create three constraints: a copy location, a damped track, and a locked track.  Each of these should target our old child-of target, but give each a different vertex group.  Copy location from face; damped track our Z axis to z; and then lock our Z axis to track our X axis to x:

All of our constraints use only the positions of vertices (the weighted average position) in order to define the rotation of our constrained object.  We're not acquiring scale, but that is much more complicated, and it doesn't look like it's something you want to acquire anyways.


How to use multiple Effect Strips in Blender Video Sequence Editor?

Try using a meta strip. Select the layers you want to apply the speed to and press Ctrl   G (or go tho the menu Strip->Make meta Strip) That will create a new strip that contains the selected strips.
Then you set a speed strip (or whatever other effect you want) on top of the meta strip.

Quote from the wiki:

A Meta Strip is a strip which contain several strips. It's like a Group of strips, working the similar way as Nodes groups. It allows you to reduce significantly the (vertical) space used in the sequencer, and treat multiple strips as if it was one strip. You can move, resize, and edit properties exactly the same way strips are. (see Editing and deleting strips page for more informations.)
You can edit the content of a Meta Strip by pressing ⇆ Tab; It will unwrap the content temporarily and hide any other strips present on the workspace, allowing you to select, move and resize the contained strips, or edit their properties. Press ⇆ Tab again to re-wrap the strips into one Meta Strip.


Why is my material in cycles rendering as as multiple images instead of covering the surface properly?

"I decided to re-topologize the mesh" there is your trouble, look at the UV map for the re-topologized mesh. You will probably find that the new UV map looks nothing like the old UV map.
Because I do not know the process you used to UV unwrap your mesh, I can not advise you on how to do in on your new mesh.


After some time and (walk outside), I got to find some sort of solution,

I used the Mixamo Collada (.dae) export that opened (after import to blender) as an armature only (no model included, Not sure why but anyway).

The difference is that the .dae file was correctly animated with no armature distortion/twists.

here is armature in the animation (sleeping position)

than I imported .fbx model in T-pose that I also run thru the Mixamo ridging process, to make the armatures matching with the (.dae).

there is some issue with the T-pose in Mixamo exports as I found in this coment on youtube (god bless him)

And then I swap the armatuers of the .fbx model
in hierarchy -> right click on armature(the one you want to !change!) ->  select 'remap User' -> in drop down menu by 'New ID' select the new armature that has the animation.

There is some issue with the hip bone of the .dae armature but that should not be too difficult to solve.

hope I can help someone, If there is better solution how to get the mixamo Characters (animations) work good, pls post the answer ( I have tried to look countless tutorials ( most of them old by now ) and I think that things has changed and nothing of that worked for me.


How can stipple shading be replicated in Blender?

This is a procedural shader-only approach, which could be adapted to taste. It's based on capturing the light-response of a surface as a color, and deciding on a set of threshold values in its brightness. For each threshold, darker tones are uniformly textured with procedural dots. The resulting textures are layered over one another, so tones below the minimum threshold get all the layers, the second-lowest all but one, and so on.

Create a 'Stipple Layer' node-group which will texture everything below a given brightness with procedural dots.

The Dot Density node is a relabeled Voronoi texture: the larger its scale, the further apart the dots.
The Dot Size node is a relabeled  Math > Greater than node: it determines the internal threshold on the Voronoi texture. Below the threshold, the dot will be Dot Color, above it, white.
The Threshold node is the external threshold value. Below it, there will be dots, above it, white.

Suzanne's eye trough a single one of these groups would look something like this, depending on the settings:

Now to layer them up.

Suzanne is shaded with a diffuse shader, and then the color extracted trough a Shader to RGB node. This means you must be in EEVEE, or just tap the color out after shading in Blender Internal, pre-2.8. Cycles doesn't know what the color of a surface is, until all the rays have been integrated at the end of rendering. Too late for us.
The RGB Curves node allows overall adjustment of brightness and contrast. 'Brightness EQ'
Unless each Stipple Layer group gets its own Mapping node, all the dots in the layers would be exactly over one another, so there would be no shading. Each mapping node is set to translate the texture by some arbitrary long way, so the lookup comes from different places in texture space.
Each layer darkens the next, so the dark dots accumulate over the white background.

The result of 4 layers:

By tweaking the dot sizes, densities, and thresholds, the boundaries between the layers can be disguised quite well. You can add an Ambient Occlusion shader to feed a layer, and intensify crevices, if you like:

You could also for example, split out your own R,G,B, and (probably) brightness channels to do a home-brewed color separation... lots of options.

The  Dot Size and Dot Density entries interact: If you adjust one, you have to adjust the other to compensate. You could perhaps automate that relationship? : I tried a simple division - it wasn't quite linear, and wound up being easier to adjust by hand.

Suggestions for improvement welcome.

Edit: I've expanded the group a little to include more options:

]6

An upper and a lower threshold of input tone for a stipple layer
'Dot Background': a background color for the zone between the thresholds
'Layer Background': a background color for the zone outside the thresholds

These allow the possibility, for example, of negative layers (white dots out of black).

Version 1:

Version2:


You can use a texture as a mixture factor.

Replace the noise texture with an image texture of you liking.

Change the diffuse for the fabric texture, and the glossy can be use for the shiny texture.


How can I cut holes using a Voronoi texture?

Volume shader

It is not fast to render, it is not the most practical method, but  I cloud not resist to post this image:


In pose mode, changes revert when I move the timeline

Well, I found the answer myself...turned out there was some data on the non-linear timeline that was messing it up. I deleted it and it fixed the problem.


OK, apparently even when you export to STL through the File > Export menu, you must select all before exporting. If your mesh is not selected, it will not be exported.

Do note that non-mesh objects will not be exported either (curves, armatures, etc).

In short, select all objects in your scene (A), then export to STL.


How to get rid of materials showing in the viewport when in solid mode

I'm having a bit of difficulty recreating your problem, but it's possible you have a type of viewport shading activated. Check the menu to the right inside your viewport (press 'n' if you don't see it) and look under the 'Shading' option. It should be located just beneath 'Display'. See if you have something like 'Textured Solids' checked. If you don't, an alternate way to address this problem is to apply a matcap, which you will find in shading, as well. Simply click on the picture after you tick the matcap box, and select the material you want.


Ok after further investigation the issue was due to Duet Display software I was running on my desktop to use my iPad like a Cintiq. I'm going to reach out to Duet Display support and see if they have ever tested multiple video card configurations.


How do I rotate a mesh object's vertices along an axis with a degree of rotation that increases along a linear gradient?

If you'll accept speed and on-the-fly adjustability in exchange for some precision, then perhaps proportional editing is what you are looking for:


Why does "merge by distance" not work here?

You have not selected both vertices to be merged. One is 'In Front' of the other, so hiding it from selection.
You have 2 options:

AltZ, toggle into X-ray mode in the viewport, so the back vertex is no longer hidden when making the selection

or

Check 'Unselected' in the operator's F9 Adjust Last Operation panel, which will merge selected vertices to all others within the given distance, selected or not.


Saving Z data linearly (accurate depth map)

There are a few things going on, here.

Firstly, the z-depth is exactly the distance of each pixel from the camera. You can demonstrate this by setting the clipping planes of your camera to specific values, and then using your mouse to inspect the RGB values in the render result view (not the saved image). The closest pixels will be the same value as your near clipping plane (assuming there's geometry that close), and the farthest pixels will be the same values as your far clipping plane (except for where the sky is visible, where the value will go to "a very large number"). I proved this to myself just a couple of days ago. I'll see if I can dig that project back up and upload a demonstration of some kind.

Secondly, those values don't fit in any typical RGB image. So anytime they need to be put into a file, they get mapped to 0-255. That means what might have been a 19-1200 floating-point range got squashed down to 0-255 non-floating point.

Lastly, when the image undergoes that transformation from floating point precision to 0-255, it ALSO gets mapped to a new color domain, which often includes a gamma adjustment and other strange transformations. It's usually quite effective for visual data, but plays havoc with numeric data.

The solution is an image format that is not limited to a 0-255 range for each RGB value. Enter OpenEXR and HDR. They can store the raw, floating-point values as they are in Blender, without compressing them... much. They're still limited to 32-bit floating point values, but that's plenty for just about anything.

So, if your data ever leaves Blender, it's been compressed somehow, unless you save it DIRECTLY to EXR or some other high-range format (without any intermediate nodes or processing). The best idea would be to use the buffer directly in Blender, rather than loading it from a file. If you do need to save it to a file, make sure that you're saving to some 32-bit format.

It may also be worth looking into the Mist Pass. It's similar... but different.


Cannot extrude curve after converting to mesh

You are using Face selection mode.

Switch to Vertex or Edge mode to enable the first extrusion.


Cycles volumetric object with intersecting mesh

Maybe try Remesh modifier on top of your mesh? Just move it to the bottom of your modifier stack and do not apply it.

You may expect different visual bugs and shape degradation, however for volumes it could work.


Ok so I solved it in the end. It would seem that it was because of some internal faces which were located near the eyes. I deleted those and rebaked and now it works :D


What lighting and background will make a realistic gemstone?

Lighting gems is an art that requires lots of patience, and what works for some scenes might not work for others.

With glass objects you are dealing mostly with objects that do not require to be lit, but do require other objects to be reflected on their surfaces, or seen trough them. In other words glass and crystals main attributes are that their surfaces are reflective, transparent and refractive.

So you need to create an environment that is conducive to show all of this characteristics.

Choose a background that will make your object stand out.

Create nice reflections:

Make an environment that is not homogeneous (like a flat color), but that has variations, for example a voronoi texture like in this setup:

Or create a World that has some texture but that is not necessarily visible to the camera.

To show the transparency, place an object behind the glass (you can choose to make it invisible to the camera by turning off ray visibility)

To add more accents add other emissive plane objects with different sizes and shapes and intensities, and place them so that they can be reflected on the faces of the crystal at certain angles.

Rotating the object will make those objects reflect differently:

After that you can add post-production effects on the compositor, like glares, streaks etc.

All of this examples were done using the default glass shader and no lights.


How to add modifiers using python script and set parameters?

You can add a new modifier to an object with ObjectModifiers.new(). If you store the result of calling ObjectModifiers.new() in a variable (in the example below I call it modifier) you then have access to all the properties of the new modifier:

import bpy

object = bpy.data.objects['Cube']

modifier = object.modifiers.new(name="Remesh", type='REMESH')
modifier.octree_depth = 5

You can see the type of modifier by hovering the mouse over the modifier in the Add modifier menu and you can see the name of the properties by hovering over the properties on the modifier.


Bright pixels that appear on the model after rendering

These pixels are called fireflies. The solution is to increase the amount of samples. I would try at least 500:


Make blender viewer look like 3D Builder

Blender Game Engine

While waiting for EVEE, Clay Engine and other things that are currently under development, this should be somehow possible with the good old Blender Game Engine. Here's a possible result:

First step is to switch the Engine in the Info bar (usually is on the top of the screen).

Real time shadow

Add a Sun lamp to the scene and go to the Properties editor and open the Object Data tab (sun icon). You'll see options that differ from the ones exposed in Blender Internal. If you enable Shadow, you should immediately see the cast shadow in the viewport once you have set it to Material Shading mode.

Here's a summary of the fields you'll have to work with:

You can now tweak the parameters of the rendering of the shadow (color, resolution, algorithm,..) to fit your needs.

In my example I parented the light to the camera (notice the dotted line in the previous image) in order to make it move accordingly to the view and not fixed with the scene. So light always comes from top left regardless the point of view as it happens in 3D Builder.

White material

For the whiteness of the materials, it's now just a matter of picking the right shade of white as diffuse color, bump up the intensity, and if you are not satisfied, also adding some Emission (called Emit in the material editor).


How to join multiple multilayer exr files into a png/animation in blender?

Usually with exr files one wishes to use extra data stored in them (various render passes, depth buffer information, etc.) to apply the finishing touches to the output after the render is complete. Even if this is not what you have in mind, the same process should serve to simply convert the exr files into pngs.

Import the sequence into the compositor (you can do this in the existing file or a new file):

Switch to the compositor (⎈ Ctrl← Left arrow) and enable Use Nodes if it's not already enabled.
Remove the Render Layers node and add an image node instead ⇧ ShiftA> Input > Image.
Click open and navigate to the image sequence directory
Select all the images (A) and confirm.
The Source of the image node should be automatically set to Image Sequence and the frame range set. If you enable Backdrop in the header you'll be able to see the current frame of the image sequence (it will update as you scroll through the frames, albeit not very quickly).

(if you wish) set up composite nodes to apply post-processing effects and generally take advantage of any extra multilayer information present in the exr files. Connect the result to the Composite output node. The File Output node is especially useful if you want to save multiple images per frame (e.g. to store different passes in separate pngs).
Render again, with the desired final output format selected (.png in this case).

To get Blender to render straight from the image sequence and not from the current scene, make sure the compositor doesn't contain any Render Layers nodes and that Compositing is enabled in Properties > Render > Post Processing (it is by default).
Set the output path, format, etc. in Properties > Render > Output.
⎈ CtrlF12 :)


You can use OpenEXR instead PNG, it has 32-bit float per channel. Unused channels will be compressed


Operators are for users, BMesh is for scripts
Pretty much all Blender's functions that you use in the UI must have their operators. This is just how Blender works. The UI is defined with Python and there must be a way to edit meshes from the UI so bpy operators exist. Mesh operators are better designed to be used by a human user. For example, they often require interactive user input. They are not designed with usage from scripts as the main goal.
BMesh is a tool for programmatically accessing Blender's internal modelling functionality. It is created for coding, flexibility, efficiency and speed of scripts manipulating meshes. When scripting and programing you usually want to do more with geometry than it would make sense for a UI user. BMesh is supposed to be for that. It is designed to access Blender's modelling functionality programmatically from a script as opposed to by a user.


This may resolve your shading issues, but it is no substitute for good clean topology.

I would suggest avoiding N-Gon's (polygons with more than 4 vertices) if you can.

You need more vertices to keep your topology as quads.

The poster above has linked to a good post that displays good topology.


Creating a sphere from a rounded cube is causing ridges

You have overlapping vertices as you can see here (I had to disable the Proportional Editing option as it would move the other vertex):

It creates a face that stick to the mirror axis, thus the artefacts. So select all and Merge by Distance to remove all unwanted vertices.


Saving a character so it can be opened in a seperate blender project

File/Link or File/Append will be useful.

Save your character as a .blend file.  From the "set" file use the menu option File/Append or File/Link. You will get the best results when when Append or Link from one .blend file to another .blend file.  File/Append ... File/Append is a great way to reuse and asset and animation across files.  Linked Libraries.  Link below.

The blender terminology for this is File/Append or File/Link.  Import is probably not what you want.

When you File/Append ... Choose the object or Mesh or Armature or Group.  You will travel through a hierarchy  to find what you need. Blender will also link/append related items.  You can design Groups to be linked/appended.

See this link.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Data_System/Linked_Libraries


Matter of Sorting element - What is Custom Sort?

Custom Sort: In general, you can sort a list of objects by key. E.g. if you have a list of customers, you can sort them by various keys such as first name, last name, customer number, etc.

Key - a key for a custom sort, which can be written as an expression using the attributes of your list element e. For example, you can enter e.location.x as as a Key to sort the list of objects based on their x location.

Key List - list of sorting keys. If your sorting key is not an attribute of the objects in the list, you can plug the list of key into the Key List Node. For example, look at this answer, where the polygons are sorted according to the distance to some point using Sort List node. Computed distances are used as a Key List.


change wireframe background in blender 2.8

There are several different viewing options which involve wireframe displays.

Clicking on the Viewport Shading buttons in the top-right corner of the 3D view. Of the four, the one on the far left, the first of the four, is Wireframe. This shows wireframe displays while turning off all solid shading, making all solid faces invisible.
As an alternative approach to achieving the above, pressing z in the 3D View to bring up the Viewport Shading pie menu, and choosing Wireframe.
Simply going into Edit Mode for any selected, solid-shaded object will automatically show a wireframe display. The above-mentioned Viewport Shading options work in Edit Mode as well as Object Mode.
If you go to the Overlays dropdown at the top-right of the 3D View (immediately to the left of the Viewport Shading buttons), you can turn on a Wireframe display for all objects in your 3D View. This has no effect on how anything else appears. It only adds a wireframe outline on top of otherwise solid-shaded forms. This function is technically accessible in both Object and Edit Mode, however it seems to have no visual effect in Edit Mode. Furthermore, the checkbox only exists in Edit Mode if you are also in Solid shading mode. If you are in Wireframe shading mode while in Edit Mode, and go to the Overlays dropdown, the Wireframe checkbox does not even exist! This could certainly lead to confusion. It might have been clearer to new users if this checkbox were merely grayed out in this case, instead of completely missing.
Wireframe displays can be invoked on an object-by-object basis by going to the Object tab in the Properties Panel (not the Object Data tab), for any selected object, expanding the Viewport Display section, and changing the Display As dropdown to Wire. This can be helpful when you don't want everything to be displayed the same way at the same time.

In addition to the above, you can create an x-ray view of a selected object with Alt + z to make the object display as translucent even without it having a wireframe overlay currently. Wireframe overlays can be used in addition to this x-ray feature. The x-ray feature works both in Object and Edit Mode. I mention this feature because, your first picture above has some graininess to it that I don't visually understand, but I wonder if the x-ray feature may be involved. Your picture below, which I gather is your version, doesn't have this graininess, so I wonder if when you activate the x-ray feature, you may have a display that matches the coach's version.
Hope this helps.


How can I apply textures without them stretching?

UV Mapping
A 3D model is usually made by a bunch of faces in the 3D space. Textures are 2D images. UV Mapping defines how the images cover the model
Imagine that you have to peel of the surface of an object and to put it on a table: if you object is a cube, it will not be a difficoult task, you'll just have to cut along some of the edges (the Seams) and unfold it. But if your object is curved, things became less obiouvs even with simple objects ( for example a sphere).
You can have a visual explanation in this video introduction about the topic.  Here's an extract :

As written in the Blender's reference manual page:

Every point in the UV map corresponds to a vertex in the mesh. The lines joining the UVs correspond to edges in the mesh. Each face in the UV map corresponds to a mesh face...
...When you unwrap a face to a UV Texture in the UV/Image Editor, each face of the mesh is automatically assigned four UV coordinates: These coordinates define the way an image or a texture is mapped onto the face.

So if you have a no UVmap assigned, the texture will not be mapped.
If you have a basic UV unwrap (like the one you get from UV mappaing (U in Edit mode) and choosing Reset option) each face will show all the texture, resulting in the repeating pattern shown below:

As the faces are long thin rectangles and the image is squared, the applied texture looks distorted (scaled on th z axis).
Let's modify the uv mapping a bit
Start from marking the top and bottom edge rings and one of the vertical edges as Seams.

Notice that the edge marked as Seams are now drawn with a red highlites to be distingushed from the others. They corrispond to the edges where the UV island's edges can be splitted,
Now, by running the UV mapping command and choosing the Unwrap option and scaling the island, you can get the following result:

UV mapping is a complex task that requires lot of practice to be mastered; there are many ways in which a group of faces can be unwrapped and Blender has many different tools to help you (you can find more info by examining the link to the manual at the beginning).
You can also have a look at the following videotutorials:

Blender: Uv Unwrapping a Curved Mesh
Blender Tutorial - UV Unwrapping basics for Texturing
Call for help - UV Unwrapping Slightly Complex Objects In Blender & Other UV Tricks
...

Basically any object that has texture needs a correct unwrap, so you'll find a section about it everywhere.
In the UVImage editor there is a checkbox that can help you to examine the streching of your uv island:

In the example above the circles on top are the UV island of the bottom and top faces of the cylinder. Their blue colour means there is no stretch. On the other hand the Side face's UV island has a gradient because the unwrapping was made without marking enough seams.
In this particular case I didn't set any vertical seams, so the peeled surface is a ring. A ring can be flattened upon a table, but you'll have to stretch a bit the material (inner fibers are compressed and outer are in traction) by twisting it.

Obiuvsly seams are not the answer for every problem. Where there is a seam, you'll have a discontinuity if your texture is not seamsless. Depending on what is the purpose, you'll have to find an equilibrium point between seams (discontinuity) and streching (distortion).
Procedural textures don't need unwrap because are mathemathically defined in the 3D space.


How to change Blender's default startup settings?

Ctrl + U will save your current settings and setup as the default startup view, meaning it will set everything as the default including the current view(s), whatever data is loaded (images, models), and the User Interface. This overrides the startup .blend file found in the config folder and can be used on another machine or similar version of Blender.

You can revert back to the factory defaults at any time by using File > Load Factory Settings.


Keyframe bones that are hidden and not selected

"Tweaking" BUILTIN_KSI_WholeCharacter class.

The class of the "whole character" keyingset, BUILTIN_KSI_WholeCharacter,  is available at 2.79/scripts/startup/keyingsets_builtins.py It can be pretty much copied to make a new custom keying set for your "TWEAK" bones by only iterating over bones in hidden layers, and / or by name prefix etc. A small sample file with info on which bones and what paths to keyframe would clarify somewhat.

Test script below, adds keyframes to bones hidden either via bone.hide or via unshown layer.  Prints "generate <bone.name>" for each keyframed bone.

This example edits the class method KeyingSetInfo.iterator to only iterate over hidden bones.  The iterator method chooses what iterable, in this case pose bones, should have keyframes generated.

import bpy
from keyingsets_builtins import KeyingSetInfo, BUILTIN_KSI_WholeCharacter

class CUSTOM_KSI_HiddenBones(KeyingSetInfo):
    """Insert a keyframe for all properties that are likely to get animated in a character rig """
    """(only selected bones)"""
    bl_idname = "HiddenBones"
    bl_label = "Whole Character (Hidden bones only)"

    # iterator - all bones regardless of selection
    def iterator(ksi, context, ks):
        # Use either the selected bones, or all of them if none are selected.
        bones = context.selected_pose_bones or context.active_object.pose.bones
        ob = context.active_object
        arm = ob.data
        def hidden(pb):
            bone = pb.bone
            # bone on these layers
            layers = [i for i, l in enumerate(bone.layers) if l]
            return bone.hide or not any(arm.layers[i] for i in layers)
        bones = [pb for pb in ob.pose.bones if hidden(pb)]
        for bone in bones:
            if bone.name.startswith(BUILTIN_KSI_WholeCharacter.badBonePrefixes):
                continue
            print("generate", bone.name)
            ksi.generate(context, ks, bone)

    # Poor man's subclassing. Blender breaks when we actually subclass BUILTIN_KSI_WholeCharacter.
    poll = BUILTIN_KSI_WholeCharacter.poll
    generate = BUILTIN_KSI_WholeCharacter.generate
    addProp = BUILTIN_KSI_WholeCharacter.addProp
    doLoc = BUILTIN_KSI_WholeCharacter.doLoc
    doRot4d = BUILTIN_KSI_WholeCharacter.doRot4d
    doRot3d = BUILTIN_KSI_WholeCharacter.doRot3d
    doScale = BUILTIN_KSI_WholeCharacter.doScale
    doBBone = BUILTIN_KSI_WholeCharacter.doBBone
    doCustomProps = BUILTIN_KSI_WholeCharacter.doCustomProps

classes = [CUSTOM_KSI_HiddenBones]

def register():
    from bpy.utils import register_class
    for cls in classes:
        register_class(cls)

def unregister():
    from bpy.utils import unregister_class
    for cls in classes:
        unregister_class(cls)

if __name__ == "__main__":
    register()

To make an iterator that selects bones in active bone group

bones = [pb for pb in ob.pose.bones
        if pb.bone_group == ob.pose.bone_groups.active]

Each pose bone has its keyframes generated using the KeyingSetInfo.generate method.  The generator keys in the desired keyframes for each iterable.  In example above that has been "poor man's subclassed" generate = BUILTIN_KSI_WholeCharacter.generate from the whole character built in.

Let's have a look at the BUILTIN_KSI_WholeCharacter.generate method

    def generate(ksi, context, ks, bone):
        # loc, rot, scale - only include unlocked ones
        if not bone.bone.use_connect:
            ksi.doLoc(ks, bone)

        if bone.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
            ksi.doRot4d(ks, bone)
        else:
            ksi.doRot3d(ks, bone)
        ksi.doScale(ks, bone)

        # bbone properties?
        ksi.doBBone(context, ks, bone)

        # custom props?
        ksi.doCustomProps(ks, bone)

    # ----------------

Pretty straight forward. To remove custom properties from the keying set, could define (and hence override) the generate method, and remove or comment out ksi.doCustomProps(ks, bone) to have no custom properties keyed in.

Alternatively, could reuse the generate method and  set up a dummy method and define for each of the keyframes you wish to bypass, for example do nothing for  b-bones or custom properties.

def dummy(*args, **kwargs):
    return None

class CUSTOM_KSI_HiddenBones(KeyingSetInfo):
    ...
    generate = BUILTIN_KSI_WholeCharacter.generate
    doBBone = dummy
    doCustomProps = dummy
    ...


How to set up a orbiting camera with zoom in the BGE?

One way to do this is by adding an empty at the point which you want the camera to orbit around, and adding a mouse look actuator to it:

Then parent the camera to it with ⎈ CtrlP.

For zooming, you can do something like this on the camera:


How to create an arch (vault) that is curved inside?

A Gothic vault is usually the intersection of Gothic arch prisms. For the basic shape:

Starting with a quarter of a circle, Z up, X accross, snap set to Vertex' and'Active'

Duplicate the vertex on X=0, drop it in Z, to give something to snap to
Under a mirror modifier in X with 'Merge' and 'Clip' checked, select all the vertices on the arc with the desired peak vertex active, and GX snap the half-arches together.

Discard excess vertices, and E extrude in Y

Create an empty at the origin, in this case, rotated in Z by 45 degrees
Assign an Array modifier ('Merge' and 'First and Last' checked) to the extrusion, Object Offset, with the empty as target.
Here, I used the shipped 'TinyCad' add-on to create the vertices shown active, at the intersection of perimeter edges.
K with Z cut through, from the new vertex to the center.

Select the external faces to be retained, CtrlI invert the selection, and X delete unwanted faces.
Here, I've also K with C to constrain to horizontal in a top view, cut the circumferential edges
If you want to bevel the peaks and troughs, select the edge-loops before applying the modifiers to a copy of the object, and bevel after applying.

The result.

Obviously there may be other actions you want to take while under the modifiers, to tweak / decorate / create suitable topology for columns, etc.


Delete the cube:
Starting with the unchanged default scene, select the cube (RMB click on the cube) then hit X or DELETE and RMB click the following popup. You may also repeat this step on the camera and light if you wish to start with a completely blank scene.

Save the startup file:
Click File > Save Startup File or hit CtrlU and click to confirm. The scene is now saved as the default startup scene and you no longer have the default cube!


poll() failed, context incorrect? - Example: bpy.ops.view3d.background_image_add()

The context members available depend on the area of blender which is
  currently being accessed.

See bpy.context

  Many operators have a “poll” function which may check that the mouse
  is a valid area or that the object is in the correct mode (Edit Mode,
  Weight Paint etc). When an operator’s poll function fails within
  python, an exception is raised.

See Operator.poll()

More about using Operators and why you experience poll-fails (mouse not over right screen area or wrong mode / other pre-condition). Also see the Gotchas section of the API docs about that.

You can either:

Run an operator via spacebar menu (see bottom of the section) in Blender 2.7x or using F3 as of Blender 2.8x from the proper Area (bl_options must not contain 'INTERNAL')
Specify the right execution context for the operator call (this fixes the context error only for some!)(API docs, example)
Use an override to pass the required context arguments
Change the Area.type temporarily
Use "low-level" API functions to achieve the same result without context worries

Override

Doesn't seem to work for this operator?! It adds a background but without name / texture.

import bpy
for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        override = bpy.context.copy()
        override['area'] = area
        bpy.ops.view3d.background_image_add(override, name="BG", filepath=r"image.png")
        break

By the way:
You can pass an empty dict (like bpy.ops.example.operator({})), which usually prints warnings to the system console about the context members missing. You need to pass these members and repeat until it doesn't complain anymore. But beware of certain operators, which require scene bases - if you don't provide a reference to them, Blender will crash to desktop before you even find out they are needed.

Change Area.type

area = bpy.context.area
old_type = area.type
area.type = 'VIEW_3D'
bpy.ops.view3d.background_image_add(name="BG", filepath=r"image.png")
area.type = old_type

Low-level

Similar to the override, you need a 3D View instance, in this case its space data (because this is the place where backgrounds reside). The following code takes the first 3D View of the current screen layout (if there's one), adds a new background and sets the image to an image datablock:

import bpy

filepath = r"C:\path\to\image.png"

img = bpy.data.images.load(filepath)

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        space_data = area.spaces.active
        bg = space_data.background_images.new()
        bg.image = img
        break


How can i stretch part of a geometry with a modifier?

Already found a way to do this, i just entered in edit mode and then used the proportional editing option, and also the snap option, it worked! but i just selected the faces i wanted to stretch :)


You could use a material similar to the following :

Here the 'sun' is an emissive sphere and a Bump node has been used on the plane to give the appearance of waves (from a Noise texture), using Fresnel to blend between Diffuse and Glossy. Be sure to keep a bit of Roughness to the Glossy shader (that's what causes the reflection to 'bleed' towards the viewer) and adjust the Diffuse shader to give a hint of color.


AVI is both large and not the most common format. It is generally played natively only on Windows, although other software packages can also open it (such as VLC). As such, it is not a good choice.

The format you are looking for is MP4 with the H.264 codec. It is the most common format and codec that plays on almost everything. It also has a relatively small file size.

As an additional tip, you should watch this tutorial on the best practice for rendering animations (you should render the individual frames as PNG images first, then encode the frames into a video file).


Opencl is not working on the Radeon HD 7750/8740 / R7 250E

Your GPU is GCN 1st gen. That's why it's not supported.
Cegaton pointed out in a comment Can't use Radeon GPU to render in cycles (R9 270)
Which is where I figured that out from this list here https://en.wikipedia.org/wiki/List_of_AMD_graphics_processing_units

EDIT: Originally I claimed and cited that Nvidia's Cuda core programming has higher support and faster speeds. However, Cegaton pointed out in the comments that as of Blender Version 2.79 OpenCL has made significant improvements. While OpenCL still is undergoing active development it appears to beat NVidia in the benchmarks, at least in tests comparing a midrange ~$200 graphics cards


setting and getting bone transformations

Edit bone transforms are defined with head, tail and roll

Edit bones store the data in head, tail and roll. Applying the transform matrix as above to the edit bone sets the roll to 90 degrees. It does not translate the head or tail. Your choice of bone head and tail align to the z axis and the transform matrix is rotating around the z axis 90 degrees.

Note: To get the adjusted value of bone matrix need to toggle back into object mode

bone.transform(tr)
bpy.ops.object.mode_set() # back to object mode
print('=====================')

Running the code above without the transform M1 and with M2 and getting the bone matrix after toggling back into object mode. ,  calculate the transform from M1 to M2

>>> M1 = Matrix([[1, 0, 0], [0, 0, -1], [0, 1, 0]])
>>> M2 = Matrix([[0, 0, 1], [1, 0, 0], [0, 1, 0]])
>>> T = M2 * M1.inverted()
>>> T
Matrix(((0.0, -1.0, 0.0),
        (1.0, 0.0, 0.0),
        (0.0, 0.0, 1.0)))

>>> T.to_euler()
Euler((0.0, -0.0, 1.5707963705062866), 'XYZ')

Remember that part of this matrix is the arbitrary choice of z axis for bone direction. In bone space the y axis is along the direction of the bone.  Notice how both bone matrices above will transform Y axis to Z.

>>> y = Vector((0, 1, 0))
>>> M1 * y
Vector((0.0, 0.0, 1.0))

>>> M2 * y
Vector((0.0, 0.0, 1.0))

To sum up, to calculate what transform has been applied to get from A to B, need A. A is not simply a "zero" in this case since you have defined head and tail before the transform.

If you make the bone tail above scalar * Vector((0, 1, 0)) ie Y axis direction, the bone matrix will be identity

Edit re comment

You don't get the "wrong" rotation you get an equivalent rotation. If you use the resulting bone matrix from above as your transform matrix, you will get same result for both. (the left hand rule.. or right can't remember) This goes back to my first comment under question.

Eg you can rotate default cone to make it point from up to forward in a number of ways. -90 around x axis or 90 around y 90 around z, different transforms same result. In object mode we can see the transform. In edit mode, just like with the edit bone, only the result is saved, what transforms were used to create that result, even given the starting point this is unknown.

Blender creates the bone matrix based on head and tail and roll. Trying to match back  the transform used from the result isn't 1:1

Let's investigate the two matrices from latest example

>>> tr
Matrix(((0.0, 1.0, 0.0, 10.0),
        (1.0, 0.0, 0.0, 21.0),
        (0.0, 0.0, -1.0, 0.0),
        (-0.0, 0.0, -0.0, 1.0)))

>>> tr2
Matrix(((0.0, 1.0, 0.0, 10.0),
        (-1.0, 0.0, 0.0, 21.0),
        (0.0, 0.0, 1.0, 0.0),
        (-0.0, 0.0, -0.0, 1.0)))

>>> q = tr.to_quaternion()
>>> q2 = tr2.to_quaternion()
>>> q.rotation_difference(q2).to_euler()
Euler((-0.0, -3.1415927410125732, -0.0), 'XYZ')

Note the difference in rotation between the two is a full revolution in one axis,

Using the resultant bone matrix instead as transform matrix.

===============
<Matrix 4x4 ( 0.0000, 1.0000,  0.0000, 10.0000)
            (-1.0000, 0.0000,  0.0000, 21.0000)
            ( 0.0000, 0.0000,  1.0000,  0.0000)
            (-0.0000, 0.0000, -0.0000,  1.0000)>
<Matrix 4x4 ( 0.0000, 1.0000, 0.0000, 10.0000)
            (-1.0000, 0.0000, 0.0000, 21.0000)
            ( 0.0000, 0.0000, 1.0000,  0.0000)
            ( 0.0000, 0.0000, 0.0000,  1.0000)>

How do you export bones relative to parent?

Exporting trouble. Bone tail and head positions change quaternion rotation


Blender will only render the scene as it exists in one specific frame, meaning you can't change frames half way through a render. While you can use the compositor to crop half of the image out, the entire image will be rendered before the crop happens so no time will be saved.

The only way I can think to reduce the render time is to cut the horizontal resolution in half. That would also mean moving the camera to compensate for the altered resolution, two cameras could be parented to stay in the same relative position so that both renders match up. Camera one can then be used to render frames 1-50 and camera two for 51-100. The two "half" images can then be composited together to get the final result.


How can I flatten a cube on the Z axis and make the sides protrude outwards?

You can quickly achieve this with a Simple Deform modifier set to Stretch and using a negative Deform factor.


How to automate high resolution renders in bulk

Rendering at 8k should not be problem for blender.

Rendering several small samples first is not faster than just rendering the whole thing.

A solution for your large amount of 8k renderings could be sheepit https://www.sheepit-renderfarm.com/index.php you can use it to have other people render your projects, or you could check the setting that allows only you to render it. All you have to do is upload your blend files and click a few buttons. (I'm not going to provide a step by step tutorial because there are thousands of easy to find tutorials on youtube like this one https://www.youtube.com/watch?v=0M8hO6k8Kqs)


Replace duplicate textures with exisiting one in Python

Try this
import bpy, re

def get_original_name(name):
    """When name looks like 'X.001', return 'X'. Otherwise None."""
    i = name.rfind('.')
    if i != -1:
        suf = name[i+1:]
        if len(suf) == 3 and suf.isdigit():
            return name[:i]
    return None

for material in bpy.data.materials:
    if material.node_tree is None:
        continue
    for node in material.node_tree.nodes:
        if node.type != 'TEX_IMAGE':
            continue
        if node.image is None:
            continue
        original_name = get_original_name(node.image.name)
        if original_name is None:
            continue
        if original_name in bpy.data.images:
            node.image = bpy.data.images[original_name]


I found the cause. It is a set of sampling in Render Propaty. I'm sorry for upsetting you.


Blender 2.82 EEVEE fire simulation appears in preview but doesn't in final render

Bloody hell, I've got it, it was behind the glass in the render lol, and in the viewport the glass was switched off. Eeevee works strangely sometimes...


Use CollectionProperty.move()

The code to move the collection property items is missing. scene.custom.move(0, 1) will swap items with indices 0 and 1.

        if self.action == 'DOWN' and idx < len(scn.custom) - 1:
            item_next = scn.custom[idx+1].name
            scn.custom.move(idx, idx + 1)
            scn.custom_index += 1
            info = 'Item %d selected' % (scn.custom_index + 1)
            self.report({'INFO'}, info)

        elif self.action == 'UP' and idx >= 1:
            item_prev = scn.custom[idx-1].name
            scn.custom.move(idx, idx-1)
            scn.custom_index -= 1
            info = 'Item %d selected' % (scn.custom_index + 1)
            self.report({'INFO'}, info)


Objects spawn on cursor rather than in the origin

You mean the 3D cursor right? According to blender manual, this is exactly what 3D cursor does:

  The 3D Cursor is used as the origin for any added object, can be used and moved with the snap tool, and is an option for the pivot point.

If you need a shortcut to place the 3D cursor back at the center, try using Shift + C.


Missing body parts when importing mhx in blender

This is what is expected when you export an .mhx from MakeHuman with clothing.  You need to deselect the options that hide the body parts under clothing in MakeHuman prior to export.

MakeHuman provides those options to reduce polygons/vertices that are not intended to ever be seen in a game, render, or animation.

Likewise, when importing an .mhx model in Blender, you are given options for hiding/showing various aspects of the model.  Just make sure your "hide vertices under clothing" options are set to be disabled in both programs.


How to write a text on a building picture

I finally found two plugins: fSpy and BLAM (this last one is outdated),  thanks to seseri, and intrac!
Recommended solution: use fSpy
fSpy is an external small software that you can download (Linux, Mac, Windows). Then you just have to place a few points on your picture to specify which are the aligned lined. Then, you need to save the project, and load it from the fSpy blender plugin (also need to be installed). The camera is automatically configured, and in my case it worked greatly! Just, I think the picture I gave above is not ideal, since I've the feeling that the building is not even a "cube": the higher you are, the fewer windows you have. So I just followed a line of window to find my parallel lines.
The package is well documented. In case you need more help, see [this link]2 for example.
Second solution, but outdated: BLAM
You may also be interested by BLAM , but this plugin is outdated:
No longer maintained. Check out fSpy instead

You can find an example of use here.


Camera rendered view only renders a tiny square

Maybe you've accidentally pressed shift B to render a selected part of the scene, you need to press ctrl alt B to get out


How to wrap on the sphere like ornamental design

1) Curve Modifier

For a simple sphere, I guess using the Curve modifier would be the best solution:

Create a bezier curve with the same circumference as your sphere
Add a modifier to your ornament and choose the curve as your Object in the modifier

2) Surface Deform and Shrinkwrap modifiers

But as your shape is much more complex than a simple sphere, perhaps you could use this method:

Create a plane, subdivide it and place it behind your ornament,
Give your ornament a Surface Deform modifier, choose the plane as the Target, and bind it so that the plane will deform the ornament as you want.
Give to your plane a Shrinkwrap modifier, and choose your lamp as the Target so that the plane sticks to the shape and the ornament follows.
Disable the eye icon in the Shrinkwrap modifier and shift D > duplicate both your plane and ornament all around your object, according to the direction of your shape's normals.
Re-enable the eye icon for each Shrinkwrap modifier so that you can see the the ornaments sticking all around your shape.
Apply the modifiers you want, delete the planes.
As this method didn't use an array, your ornaments are not properly joined, if you need to do it, join them with ctrl J and use some W > Bridge.


That method works extremely well for all sorts of short bendy things, tails, tentacles, tongues, you name it. Only having 3 controllers for all of it makes animating a snap, too.

I just want to add, that a couple of modifiers in combination with the mesh are useful:
First, a Subdivision Surface Modifier, to make sure there is enough geometry there to be deformed and after the Armature Modifier a Corrective Smooth Modifier to resolve any warping and breaking that the Bendy Bone might inflict on the surface. They are prone to doing that.

Minor Update: you can make the rig a lot faster by making the armature move the lo-poly model and adding the Subdivision Surface Modifier AFTER the Armature Modifier. Sorry about that.


Declare a global variable in a Blender session

If you want data to be global in Python, (within a Blender session).

Typically its best to create a module with a unique name specific to your project, import it - and access variables in that module.

Every script which imports the module will be viewing the same data.

In this exact case it sounds like you should add the object it self to a module.

import my_module
my_module.my_obj = obj

Some other script

import my_module
obj = my_module.my_obj


Is there a way to temporarily parent a vertex group to a bone?

You can parent using the following steps:

Select the mesh then select the armature
ctrl+P then parent with empty groups

After that once you want to clear the parenting:

go to the vertex group menu in the properties panel
Click the small down arrow
Clear all vertex groups


Connect a folding door with an armature without deforming the door panels

You could rig this sort of bus door arrangement without bones:

.. a series of hinges, each parented to the previous hinge.
Every hinge has its Z rotation driven by the zero'th, 'master' hinge.. ('Rot Master'). The odd-numbered hinges have -2 * the Z rotation of the master:

and the even-numbered hinges have +2 * the Z rotation of the master. The drivers can be cut-and-pasted; with care, pairs of doors can be duplicated along with their drivers.
The master's Z rotation is driven by the handle, thus:

.. where the '20' in the expression is the distance from the handle to the master when fully extended. The handle should have a Limit Location constraint to prevent it going off-axis, below 0, or beyond full extension.
The master and the handle can both be parented to a Root object (The big cube at the left) so the whole rig can be moved around. Doors, or whatever, can be parented to their respective hinges.

..sort of a cheap, limited, home-made IK.


They don't exist in that way now, the bulk of the info concerning tools are in the topbar. Add-ons are not yet ready for reintroduction in 2.8, and when they are done with the API then we will get an idea of how they will be accessed. Quite possible we will get special pop up panels if we want since they are now solving the window parenting issues.


Wireframe mode doesn't select everything

You probably disabled X-Ray mode.
It's enabled by default, but can be switched off/on.


Is there a way to rotate a plane in a way that its normal will face 3d cursor?

Not directly as far as I know, but you can use a constraint to your advantage as a workaround.

Add a Track To constraint to a plane, set it up to track any empty object. Make it point in Z direction and use Y Up.

You can now move this Empty object freely through your scene, and your plane will always face it. If you duplicate the plane, any clones should keep the behavior in sync.

While you can't make the plane face the cursor directly, you can now select the empty, and using the Shift + S Snap menu move the empty to the cursor easily with the option Snap > Selection to Cursor, cirtually making them point to the current cursor position.


Everything in pinkish in cycles or "Scene World"

Like metaphor_set mentioned the HDRI image couldn't be found at the given path. I had moved the contents of my Downloads folder to another folder because it had been getting too crowded.


Transforming collections with animation nodes

Case A (blue) would be to set the parent parameter every object has, wich also can be found in Object Properties > Relations > Parent
For a onetime operation this could also be done via shortcut Alt + P or python.
Case B (green) does not parent but moves a collection of objects in realtion to another. Here the logic of animation nodes and its potential maybe is more apparent.
Important: for this to work you have to check Delta Transforms in Object Transform Output > N-Panel > Item > Advanced Node Settings > Delta Transforms.

Here you can see were to find the Delta Transform toggle in the Object Transform Output Node:


Rendering shadows on transparent background / converting model from cycles to internal render

Someone commented with a different post with the answer, thanks!

Render shadows over a transparent background in cycles


Can I import .mtl file without the corresponding .obj file to a blender project (.blend file)?

The Obj file format is made of two files. The obj part contains the mesh informations. Geometry, UV mapping, normals. The mtl file contains a primitive Phong material, including existing paths to textures.
This material settings file cannot be loaded separately, it is tied to the obj file. And it does not contain textures, just paths to the textures. Embedding textures is not supported by the obj specifications.
But you can open the mtl file in any text editor. Have a look for the map kd entries. That's the paths to the textures.


In the Particle Properties tab check the box next to Advanced. After that it is possible to check the box next to Rotation. Under Rotation choose Normal-Tangent as the Orientation Axis.

Make sure to rotate the spike object in Edit Mode to get the desired alignment.
And it's also helpful to put the origin of the spike object at its base. (select the face at the base in Edit Mode, press Shift + S and choose Cursor to Selected. Then in Object Mode press the search key, F3 by default. Search "Set Origin" and choose Origin to 3D Cursor)


If you click “n” it will open the 3D view properties tab, you can adjust the “start” and “end” value. And if you change the end value to something big like “10^10”, you should be able to see everything and you might also need to select an active object and click “.” again.


RTX 2070 Super not recognized by Blender 2.82a (Debian Linux)

Edit:
Downloading 2.83.1 directly from the Blender website (not Pop!_Shop) fixed it for me.

Not an answer, but I have a similar problem.  My 2070 Super is not recognized for CUDA rendering in Blender 2.83.  I downloaded 2.82a and it works fine.  This is odd.
I use Pop!_OS 20.04 as well.


You may want to look into the display options in your particle system. This can help diagnose issues as well as get a better idea of the behavior of your emitter.

Here is an example of color by velocity.


How to make parts of texture shiny and reflective?

For demonstration purpose, the specular map is also being used as the diffuse channel to showcase the effect more.

Normally, the diffuse color map should only have the 'Diffuse Color' checked in the influence tab and the specular map shouldn't have this one checked at all.

Without the specular map influence:

With the specular map influencing the material's specular behavior:

Reflectivity:


How to install matplotlib for use in Blender 2.79?

After a lot of digging and trial and error troubleshooting, I have resolved the issue myself.  This answer is specifically for the OS and software/package versions specified in the original question.

Blender 2.79 comes with Python 3.5.3 and Numpy 1.11.2 bundled with it.  Other Python packages (e.g. SciPy, matplotlib) are not bundled with Blender.

Install Python 3.5 using Macports, along with the appropriate matplotlib (and any other packages you want to add to Blender) then copy the desired packages from the Macports location to the Blender location.

You can keep python 2.7 as the default python for your system, and set python 3.5 as default for python3 commands:
sudo port select --set python python27
sudo port select --set python3 python35

For me the location of matplotlib in the Macports install is:
/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/matplotlib

And the location that Blender accesses is:
/Applications/Blender/blender.app/Contents/Resources/2.79/python/lib/python3.5/site-packages/

Note that the README file at this location states:

  This directory exists so that 3rd party packages can be installed here. Read the source for site.py for more details.

(Confirming that we have the right location)

So, to copy Macports matplotlib package(s) to Blender:
cp -r /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/matplotlib /Applications/Blender/blender.app/Contents/Resources/2.79/python/lib/python3.5/site-packages/

You will probably want to copy numpy over as well (replace the existing one bundled with Blender), because the matplotlib you just installed with Macports was compiled with a newer version of numpy (1.13.3) rather than what is bundled with Blender (1.11.2). Matplotlib won't play well with the older version of numpy.

There are some additional packages that Blender needs in order to use matplotlib:
six.py
pyparsing.py
cycler.py
dateutil

These should be copied from and to the same locations specified above for matplotlib.

(See also this post by avocadohead:
http://eumenidae.blogspot.com/2015/09/adding-matplotlib-to-locally-installed.html)

(You can take my word for it, or avocadohead's, or you can find these dependencies yourself by trying to plot from the python console in Blender - you will get an import error telling you what it can't find. Then just keep copying over what Blender said it was looking for until the import errors stop).

Note: if you ever update Blender, the above process must be repeated (unless a new version of Blender fixes the issue by bundling these packages)

But there is also an issue with the backend.  Start Blender from the terminal so you can see what is going on behind the scenes (I recommend doing this from the beginning actually, because it provides answers a lot of the originally posted questions above regarding the versions and locations of python modules/packages used by Blender).  When you try to plot something using the 'Plot' button in 'Plot Output Settings' in CellBlender, you will see the following error in the terminal:

  RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.

We can fix this by changing the backend.  I recommend Qt4Agg.  But Qt4Agg requires an additional module, either PyQt4 or PySide.  Blender will only work with PySide.  So install py35-pyside using Macports, and copy it over to the Blender location as described above for matplotlib and the other packages.

Now we just need to make this the default backend for matplotlib in Blender.  This is done by editing the matplotlibrc file.  For me, the Blender matplotlibrc file is found here:
/Applications/Blender/blender.app/Contents/Resources/2.79/python/lib/python3.5/site-packages/matplotlib/mpl-data

Open it in your favorite editor and change backend from MacOSX to Qt4Agg
then uncomment the line backend.qt4 : PyQt4 and change PyQt4 in that line to PySide.

Now, (finally) when you try to plot something using the 'Plot' button in 'Plot Output Settings' in CellBlender, you will get a plot (and it is in a separate window)!

Other useful posts that helped me get to the bottom of this:
https://blenderartists.org/forum/showthread.php?304089-Install-Matplotlib-and-all-its-dependencies-to-use-within-Blender

Using 3rd party Python modules

Also, don't bother registering with mmbios.org with the intention of asking urgent questions on their forum - the  administrator will take days (still counting) to activate your account, if they activate it at all.


Speaker sound does not play when set with Python

If my_file_path is a relative path, use the absolute file path instead.

Be aware that bpy.ops.sound.open_mono gives no warning or error message even if the audio file is not found (or does not exist). The sound still shows up normally in the speaker-menu but you can't hear anything.

I also had to call update_tag() and relink the speaker to the collection. I have no clue why this is necessary, but the following code works in Blender 2.83:

my_file_path = "/absoulute/path/to/test.mp3"
bpy.ops.object.speaker_add()
speaker = bpy.context.object
speaker.data.sound = bpy.data.sounds.load(my_file_path)
speaker.data.update_tag()
bpy.context.collection.objects.unlink(speaker)
bpy.context.collection.objects.link(speaker)


How to import mhx2 model programmatically?

Here is an example:

bpy.ops.import_scene.makehuman_mhx2(filter_glob="*.mhx2", filepath="C:\\1.mhx2", useHelpers=False, useOffset=True, useOverride=False, useCustomShapes=True, useFaceShapes=False, useFaceShapeDrivers=False, useFaceRigDrivers=True, useFacePanel=False, useRig=True, finalizeRigify=True, useRotationLimits=True, useDeflector=False, useHairDynamics=False, useHairOnProxy=False, useConservativeMasks=True, useSubsurf=False, subsurfLevels=0, subsurfRenderLevels=1, useMasks='MODIFIER', useHumanType='BOTH', mergeBodyParts=False, mergeToProxy=False, mergeMaxType='BODY', rigType='EXPORTED', genitalia='NONE', usePenisRig=False, hairType='NONE', hairColor=(0.15, 0.03, 0.005, 1))


Sun lamp gives horizon glow not direct light?

Considering the scene units I was using, my sun lamp was astronomically huge. I reduced its size and it began functioning properly.


You can paint the holes with transparency. Basically, as you already did.
Bake the normal map from the Multires and then texture the accessory.
Use the alpha channel (or create a separate mask image) for Alpha slot of the Principled BSDF (or use a Transparent BDSF and a MixShader). Add some metal rings. That's it.
I had made something similar. Looks like this:
Low-poly mesh with rings (low poly circles + Solidify and Subdivision modifiers)

Textured with transparency (no baked normal map yet)

You can even pull a ribbon through the eyelets :-)

The ribbon is just flat plane with a Solidify and Subdivision modifier. In fact, it's not one part but several "V" parts.


Is it safe to use approximate gather method to bake AO maps?

Having used Blender to bake AO myself, I can say that yes, it generally okay. Note that there will be a reduction in quality compared to a very high sample bake.
Approximate gather generally looks 'smoother' than low sample AO bakes but is less accurate. My advice would be to try both and compare inside your game.

So it mostly depends on your use case, but it should be ok.


You can get there quite easily using Vertex Snapping.

Enable Snapping > Vertex, and use the Move tool to align it to other verts.


weird yellow and red grains on my renders

These are often referred to as "fireflies," and they're a common artifact in Cycles renders. Because Cycles is a path tracing engine which uses pseudo-randomness, some samples will find light sources and illuminate pixels that would otherwise be fairly dim.
You can either increase your number of samples (although it may take a very large number and long render time to eliminate them entirely), or you can take a look  at Blender's relatively new built-in denoising options.


you can use the HSV space by adding the Combine_HSV node as input color to you material, then keyframe its values  :

to keyframe a value RMB on the value in the Node Editor  and click Insert Keyframe

F-curves :

example file :


I would recommend editing the vertex groups in edit mode for the armor, that way the vertices are all yes and no they way this can be done is by going into edit mode for the armor, removing them all from the groups by pressing control a and then selecting remove for group, and then selecting assign for the groups that correspond to each piece of armor. It might be a bit tedious but it should work. If you don't understand just say so and ill post some screen shots. If you already tried this sorry for wasting your time.


Add the Same Modifier to Multiple Objects at Once?

You cannot use the modifier panel to apply a modifier to multiple objects, it only applies it to the one selected last. However, you can use Ctrl + L to copy the modifier on one mesh to all the other selected ones. You select the object(s) to apply the modifier to then the one that has the modifier.

Update:
Cool new trick thanks to Greg Zaal

If you Alt-Click on a property, it’ll work on all the selected objects at once, not just the active object. This works on most properties, including modifiers (as long as all the modifiers have the same name, which they do by default).


Blenders Collada exporter doesn't support Key framed UV's, also not sure if any other applications support exporting them.


Texture Painting: How to not have jagged edges when drawing?

Paint on an image that is twice the size you think you need, and you will get the better detail since this is about pixels, and downscale the image with an image editor to get the lower memory version. Make sure your UV mapping has allotted enough pixels for each island - unwrapping technique is critical for small details. In setting up your base image to paint to, perhaps consider checking the option '32 Bit Float' so that you have enough color depth to avoid jagged details, especially when painting bump maps.


On the bottom right, scroll up and you will see the panel to add materials.
Even if you don't assign a material to your mesh the smooth shading option should still work.
From what I can see, your mesh just has inverted normals.
Go to the panel on the left and click "Recalculate"
if that doesnt work, then click "Flip Direction".


How do I snap multiple objects, based on a vertex from one of these objects, to a vertex of another object?

Snapping is a bit hard to control sometimes, but you could create an empty on the vertex location, parent all your objects to this empty, and move the empty until it snaps to the destination vertex:


You can't really rig a curve with an armature.  (You can, but you're stuck using envelope weights, which suck.)
Converting to mesh is one option.  If you're interested in maintaining these as curve objects, to one degree or another, you can use curve modified meshes.  That will override your bevel but not your taper-- but I think you'll find that it's not too hard to create a mesh object to match your bevel; you can even use your bevel object, converted to mesh, as a start.
If you do decide to convert your curve objects to mesh objects, there are multiple ways to deform it, and for hair, using a lattice is one of my least favorite.  You can create bones for the strands of your hairs.  This may be easier to autoweight if you leave it as a separate armature, with a root bone that's a child-of your head bone.  But you can always weight it manually as well; simple linear gradients work well for this kind of hair, provided they're not too curvy.
But if you do want to use a lattice, be aware that you can use a lattice on your curve objects directly, without converting to mesh.
Another option, that you didn't mention, is using soft body physics for your curves.  Curves lack most physics options, but they can support soft body.  This can run on the spline (usually preferable) by enabling "Apply on spline" on the modifier (look at the buttons' tool tips.)  To "pin" one end of your spline, select a control point and look on sidebar/item/transform/weight.  This is a factor that's treated as the "goal" for the curve's soft body physics.  Curve physics usually have poor collision, as default soft body collision works just by creating a big sphere over every control, but if your goal is just some slight jiggle, or if you're willing to tune custom, non-rendering collision bodies, it can be fine.


Why is there no light passing through the window?

You have to add a bit to the glass shader to make light pass through it, like it would through a window.
Try using this node setup, works really well for architectural glass:


No, you cannot create collections with Animation Nodes. If you need to group objects then you can create a list of objects then iterate in them with loops or use vectorized nodes. Or you can just create collections manually.


How can I alternate rotating a bone and its associated controls around its tail and its head?

I use an IK constraint on your yellow colored bone and make a control bone for it that shares the location and size with the hand Bone (B in your drawing) but other than the hand bone it's not connected and not even parented to the IK Bone. On the Hand Bone I use a copy rotation constraint to copy the rotation of the control bone. If you do it that way you could set your cursor everywhere you want and transform the control bone around it.

EDIT:

you could also add another bone at the tip and parent the control bone to it to have controls at both positions


Save texture image then disable "Use Alpha" at image properties.


Relative reference to object property in material driver?

A driver is the only way I can think to access the object dimensions from a material.

Using a simple material example -

Add a driver to the field in a value node. Either right-click and select Add Driver or press D while the cursor is over the field. Setup the driver as -

Driver settings are shown in the properties panel of the Graph Editor when Drivers is selected in the header. This then mixes between the two diffuse nodes based on the dimension[0] value.

Note that auto-run python scripts needs to be enabled for drivers to work.

Obviously that is also rather rigid to the dimensions of one object. The Expr: of the driver can be any valid python, not sure of the path but there should be a way to go from the node with the driver to the parent object to choose the dimension value, which would be a more flexible way to use one material on multiple objects. I haven't had any luck accessing active_object in a driver.


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


Create empty through script using a cube as origin (0)

See if this is what you want.
import bpy

#Get active(selected) object
act_obj = bpy.context.active_object

#Get active object location
act_loc = act_obj.location

#Add empty and set location based off active object
bpy.ops.object.empty_add(type='PLAIN_AXES', location=(act_loc.x, act_loc.y + 2, act_loc.z))


How to install bgui for use in Blender BGE

Python 3 uses relative import. Use import .bgui instead of import bgui

If that's not the problem, do the example scene run okay? You should see a bunch of widgets on the screen.


How can I change multiple properties on the same and different nodes at the same time?

The X/Y dimensions of the Blur node are properties, not inputs, so they can’t be controlled via a socket. However, if you just want a convenient way to control them all together, you can use drivers, instead:


Script for rendering a specific frame n-times

The following works for me.
Add a follow path constraint to your camera. It is the offset of this constraint that we will change in order to move the camera.

camera_name: name of the camera you want to move
constraint_name: name of the constraint whose offset you want to animate
scene_name: name of your scene
output_location: where the rendered frames will be saved; if this is /some/path/tiger then your frames will be stored as /some/path/tiger0, /some/path/tiger1, ... (with file extensions added if this is in your scene settings)
initial_offset, final_offset: initial and final offset that will be used for the constraint
nr_frames: the total number of frames to render

Here's the code. It's very simple. To run it, just copy-paste into a new file in Blender's text editor, adjust settings and click Run Script.

#### Adjust these settings ####
camera_name = "Camera"
constraint_name = "Follow Path"
scene_name = "Scene"
output_location = "c:\\zoo\\elephant"

initial_offset = -10
final_offset = 10
nr_frames = 16
###############################

import bpy

# save now, so that we can restore these later
original_offset = bpy.data.objects[camera_name].constraints[constraint_name].offset
original_filepath = bpy.data.scenes[scene_name].render.filepath

# render the frames
for i in range(0, nr_frames):
    offset = initial_offset + (final_offset - initial_offset) * i / (nr_frames - 1)
    bpy.data.objects[camera_name].constraints[constraint_name].offset = offset
    bpy.data.scenes[scene_name].render.filepath = output_location + str(i)
    bpy.ops.render.render(write_still = True)

#restore original values
bpy.data.scenes[scene_name].render.filepath = original_filepath
bpy.data.objects[camera_name].constraints[constraint_name].offset = original_offset


How can I copy the material assigned to grease pencil2.8 strokes to other strokes?

An answer can be found here: How assign different material to strokes in grease pencil mode
You can use the assign button in the material panel after selecting the stroke

To assign a material to several strokes (for example, set all blue stokes in black)

You can select the blue material in the materials panel, then select the black one in the drop-down menu

Or you can switch to edit mode, select the blue lines by clicking on "select" in the materials panel and then select the black material and click on "assign" (or you can go to Stroke menu -> assign Material)

But it is also possible to change the material of just one blue stroke.

Just select it manually in the viewport and then assign the new materials according to the same procedure as above ("assign" in material panel or via the Stroke Menu)


BPS V3 Minecraft character rig animation problem (snapping)

Try selecting the first keyframe, then pressing T to change the keyframe interpolation. In the menu that pops up, select anything other than Constant. Constant interpolation causes the keyframe's value to be held constant until the next keyframe.


Quoting from the API documentation

Operators don’t have return values as you might expect, instead they return a set() which is made up of: {‘RUNNING_MODAL’, ‘CANCELLED’, ‘FINISHED’, ‘PASS_THROUGH’}. Common return values are {‘FINISHED’} and {‘CANCELLED’}.

You might get the arguments passed to a registered operator like this:
bpy.context.active_operator.properties['keyword']

or
bpy.context.window_manager.operators[-1].properties['keyword']

For more information about linking see also BlendDataLibraries and Library.


How to change mesh to Flat or Smooth shading while in sculpt mode?

Only way I know is press your space bar and look for flat and click on shade flat while in sculpt mode. Do the same for switching to smooth.

Hope this helps :)


mesh collision rigid bodies acting very strange. (bouncing, shaking, etc...)

I think that you're compounding workaround with workaround here.  You're trying to do stuff with collision when rigid body constraints would work better.  If that's the origin of your hammer, you're placing it at the center of rotation, rather than the center of mass, probably to get behavior you want, yet placing the origin here is creating other problems.
The important, non-obvious things for rigid body physics are:

All mass lies at the origin of the object.  No mass lies anywhere else.  If you place your origin someplace other than the intuitive center of mass of the object, expect unintuitive results.

Apply scale on all rigid body objects.

Simpler collision models are more accurate collision models.  (Which it sounds like you've already learned.)

Now, you want to hit something with the hammer.  Do you want to hit something with the handle?  If you don't, don't try to make this a rigid body; don't try to use collision to control the rotation of the hammer; use rigid body constraints to control the action of a hammer-only rigid body instead (a rigid body with an appropriately placed origin.)  Note that the hammer head itself is convex and convex-hull collision would work fine for it.  (But for your needs, I'd expect that cube collision would work just as well.)
So try this:

Apply scale on all objects.
Separate the hammer head to a different object.  Give it convex hull collision.  Set origin to center of geometry.
Remove rigid body physics on the handle, and parent the handle to the hammer head instead.
At the center of the axis, create an empty, give it a rigid body constraint physics, joining the axis (object 1) to the hammer head (object 2.)  Make the constraint "hinge" type and rotate it such that its Z axis points in the same direction as the axis.  Don't parent it to anything.

I think you'll find that does what you want.


User preferences shutting down blender; program not opening anymore at all, which causes this?

The only thing that is likely to fix that is updating drivers and using a fresh blender (I would recommend getting it from a .zip file)

You can get all the versions here blender.org/download/releases

Becuase of the error would I recommend that you don't copy the settings and only do the necessary ones, interface and input should be safe as long you don't have scripts in them.

It is possible that an automatic windows update is the reason.


You can achieve this with several different ways:

A) Don't have the wrong particles (Chose one or more)

Make the houses smaller
Make less houses
On rotation, check "normal". If you made your normals right, the houses should align along the faces decreasing the probability of going of an edge
Adjust the seed until all houses fit in the areas visible in the final render

B) Cut them in particle edit

Go into the particle edit mode
Cut all wrong placed houses

C) Vertex groups

Add a new vertex group
Assign all faces where a house is possibly allowed to stand (leaving a maring of the maximum size of a house in every direction) to that group
In the particle settings -> Vertex groups, select this group under "density"

D) Texture (Cycles only)

Create a new, empty image.
Go to orthographic top-down view of your city.
Select your mesh.
Go into texture paint mode.
Paint the areas where houses are allowed.
Go to particle settings -> Texture
Create a new texture and go to texture properties
Link that texture to the image you painted
Under influence uncheck all but "density"

E) Remove them manually

Apply your particle system.
Delete wrong houses
Select the remaining ones and join them (optional)

That's about all the possible ways I could think of. Chose the one you like the most! If I missed a good way, please add it. If something is unclear or you need screenshots, I can add them.


How to map an equirectangular image onto an icosphere in Blender 2.79b

I don't know how you could correctly unwrap an icosphere but you could do it another way around with an UV sphere, an icosphere, and a Shrinkwrap modifier:

Create an UV sphere.
Select all except the two poles and Unwrap > Sphere Projection mode, with Align to Object option.
Select the 2 poles and make a simple unwrap.
Prepare your material.
It works, your drawing is projected on your UV sphere.
In Object mode, create an icosphere within your UV sphere.
Give your UV sphere a Shrinkwrap modifier and choose the icosphere as Target.
Give your UV sphere one or probably 2 Subsurf modifiers, one above, one below the Shrinkwrap modifier. Test the best solution, and the best Subdivision values, it looks like an amount of 3 is necessary on the top Subsurf.
Now, thanks to the Shrinkwrap, your UV sphere has taken the shape of the icosphere, you should have the result you want.


Why does it change shape when i apply the scale?

It's because your modifiers act on original mesh scale 1.
Say you have a 1m diameter pipe mesh with 0.1 m thickness with the Solidify Modifier.
If you make it 2m diameter (scale it to 2 without applying it), you now have a 2m diameter with a thickness of 0.2m despite the Solidify Modifier still showing a thickness of 0.1m. The new scale and thickness are shown in the Viewport, but the modifier shows the values valid for a scale of 1)
And if you now apply the scale, the new thickness would be 0.1m because that's what the modifier is set to.
NOTE:
Scale is for the object and the modifier values are for the mesh. Object is separate from mesh (you can change the mesh that is used in your object anytime)


Compositing: When to use premultiplied alpha?

When should one check the Convert Premul box on nodes that use alpha?

Only when you know that your image has unassociated (often called "straight") alpha. Or in other words, when your image's alpha is not associated (premultiplied).

  why is there a Premul slider on the Alpha Over node? When would you
  need it to be something other than 0 or 1?

That's an unfortunate feature that brings a lot of confusion among users. It can be used to mitigate alpha errors. If you did your compositing right and didn't mix up associated and unassociated alphas, you should never use it.
And even if you didn't, that feature is a hack that will only mitigate, not fix those errors.
It's better to track down your alpha to spot any mistake and fix it.

  I understand that pre-multiplied alpha is sometimes good and sometimes bad, and that if used improperly it can result in dark
  borders where transparency tapers off. But that's about all I know.
  Could you please enlighten me?

It's never bad. It's actually the best way transparency can be expressed in an RGB file as it allows both occlusion and emission (that means that your foreground can both block and emit light).
You can do most of your compositing without moving away from associated alpha and expect good results.
That doesn't necessarily mean that unassociated alpha is never useful. It has its uses, but CG and VFX are probably better suited for associated alpha.
You just have to know when your image is associated or unassociated so the correct alpha-over operation is used and it produces the correct results.


Is there any way to copy the weight of one bone over to another(forgot to use x-mirror)?

I'll show you the method that works for me.

Activate the 'corrective shapekeys' addon (file--> user preferences--> addons--> corrective shapekeys). It can be reached from the 'object data' menu (under the 'vertex groups' header) by clicking the black 'down arrow'.

In 'weight paint mode' select the bone with the assigned weight and click 'copy vertex group' in the corective shapekeys addon menu.

Now you have a thigh.L and the thigh.L_copy in 'vertex groups'. With the original one selected, click on the padlock icon and lock it. Next select the copy and click the 'mirror vertex groups (topology)' option.

Rename the thigh.L_copy to thigh.R.

Now clicking the bone on the left and then the bone on the right, you can see that both have individual weights assigned to them.

The last thing is to assign the proper vertex groups to thigh.R bone. Select thigh.R bone and enter the 'edit mode' (TAB). Press A key to deselect everything and then press 'select' under 'vertex groups'. As you can see the right bone has assigned vertices that belong to the left one. We have to to remove it.

Unselect (B + mouse scroll) the vertices from the right side.

Remove the vertices from the left side by pressing 'remove' under 'vertex groups'.

Press A to deselect all and pres 'select' again. Now only the right side vertices are assigned to the right bone.

The left side weights and assigned vertices have been transfered to the right side.


How to fold a plane while keeping length of edges?

Welcome to Blender SE cheese!

While rotating the vertices around the fold, you must align your view so that the fold points directly away from the view. All vertices along the edge occupy the same point on the screen.

Now, you can set cursor to folding line, set pivot point to cursor and rotate.

Unfortunately, it is not easy to exactly align your view. If you need full precision you can create extra geometry and then align your view to it. Then remove the extra geometry.

Start like this:

Extrude a corner vertex at the end of the folding line. Right click directly to extrude it on top of the original.

Using the opposing vertex as cursor, scale the extruded vertex up some.

Now extrude that edge to create a face. Extrude the face to create a cube.

Select the face point away from the fold and hit Shift + Numpad 7. Now, your view is exactly aligned to the edge. Rotate the outer vertex.

NB! Extruding the edge the right way may be hard sometimes. You can experiment some and see. I'm not sure.

If you don't need exact precision. Align you view the normal way and rotate away.

Good luck!


Locate and delete the preferences files for 2.9.
The files you need to delete are startup.blend, userpref.blend, bookmarks.txt, recent-files.txt.
Read this link to find them on your system.
Where is the startup file stored?
Re-install blender and disable all adons.  If the program runs, only then start adding addons one by one, until you find the one that is creating the problem.
Once you find the problem you can report the bug to the developer of that particular addon.
If none of this works, then run blender in debug mode and file a bug report with the info from the console.
Best place to put bug reports?


Unfortunately, I don't believe Blender supports right-click panning due to the use of right-clicking for drop-down menus or selecting. However, you can change the default MMB action to pan, and Shift+MMB will become orbit.


Is the top row (menu, etc) customisable or is it fixed?

Yes it is!.

Fortunately, there is a way to do that. :D

Before

After

The UI source code for the topbar is available in scripts/startup/bl_ui/space_topbar.py

As an example here I've quick and dirtily monkey patched a new draw method to the top bar.

import bpy

context = bpy.context

def draw(self, context):
    layout = self.layout
    layout.label(text="Taken OUT!")

bpy.types.TOPBAR_HT_upper_bar.draw = draw

Note can undo this by calling scripts reload

bpy.ops.script.reload()

in the python console.

Most UI is alterable this way.  Enable Developer Extras to be able to right click on any property in layout and view source to see UI code.

For example the layout for Toggle window fullscreen button is

layout.operator("wm.window_fullscreen_toggle")


How do I create a magnified glass effect in Cycles?

The Glass BDSF material in the Cycles renderer does this quite nicely. The controlling variable is the IOR (index of Refraction). Set it to 1.0 and the lens will act like it is made of air (no effect, in essence). Keep it at the default 1.45 and apply the material to a lens-shaped object, and you should see the effect you are looking for. Play around with IOR until you get what you need.


Items on top of cloth, and dragging the cloth to move those items [blend files attached]

Much like rigid body physics, the cloth modifier in vers,2.77a at least, won't allow the cloth to be animated or shapekeyed whilst the physics cache is active.
The cache's frame range can be set however (physics properties) so we turn that off at frame 140 when the cloth has settled down.
Whilst the cloth physics is still active, two 'cloth shapers' are underneath the table that physically 'lift' the cloth ends.  The cylinder moves to the right between frames 91 & 98, the other end's triangular cube, from frame 98 to 105.
Both lifters are given Collision Physics.  They don't interfere with other collision objects such as the table and are invisible when rendered.  (eye & camera icons in the Outliner)
In order to animate the cloth, we'd need to  "Apply" the cloth modifier at frame 140 when it's settled down and therefore 'freeze' it in it's current shape, allowing keyframed animation.
In this example we don't need to animate the cloth at all.  Instead we duplicate the table and get rid of the copy's inherited physics so it's just scenery.
The original table is made invisible in the Outliner and remains stationary to support the cloth.
At the frames where the cloth is supposed to be pulled to the right, we instead move the duplicate table to the left with the camera parented to it so the cloth appears to be pulled to the right.

As the falling cubes physics are baked we can add keyframes to simulate their inertia.  All three are parented to an empty so they can be moved as one.
Should there be other objects and scenery behind, simply render the tables, cloth etc. out with a transparent background and render that as one clip.  Render the background objects as another and mix them in the VSE.


It is fixed now, was just missing in Blender 2.8 at the time I added this issue.


You can use a list comprehension to check if your function already exists:

def myFunc():
    """Your function"""

if not myFunc.__name__ in [hand.__name__ for hand in bpy.app.handlers.save_pre]:
    bpy.app.handlers.save_pre.append(myFunc)

It'll get the function's name from the pointer for each function in your handler list. Then, you can compare it to your function's name.

[hand.__name__ for hand in bpy.app.handlers.save_pre]

It's equivalent to:

handlerList = []
for handler in bpy.app.handlers.save_pre:
    handlerList.append(handler.__name__)


This is very easy to do. This is the same method you would use if you were creating a reload property for a gun. Create an integer property name Time that is always increasing as long as that property is less than 100. In this case, it is named time, Of course you could name it whatever you wanted.

Then have another property sensor limiting the keyboard's input so that it will only send a positive pulse when the integer Time is equal to 100 And E is pressed.

When using a system like this, you can hammer on the keyboard as fast as you want, but it will only turbo when the property Time reaches 100. and as soon as you turbo, The time property starts increasing until it reaches 100, where you will be ready to turbo again.


Bounding box coordinates taking into consideration (but not applying) rotation

The bounding box coordinates of obj.bound_box are in local space. To convert them to world space – assuming you're interested in the world space coordinates and don't just want to consider rotation – you'll have to multiply the world matrix with the coordinates as mentioned in this answer by CoDEmanX.

import bpy
from mathutils import Vector

obj = bpy.context.object  # or bpy.data.objects['cube']
bb_vertices = [Vector(v) for v in obj.bound_box]
mat = obj.matrix_world
world_bb_vertices = [mat * v for v in bb_vertices]

From there you can continue with world_to_camera_view. From your code it's not clear what your obj is, but just to clarify: This function takes the Camera object and not the object with the bounding box. The bounding box coordinates are only considered for the third parameter. Similarly, you will need the mat world matrix of the object with the bounding box.

import bpy
from bpy_extras.object_utils import world_to_camera_view
from mathutils import Vector

scene = bpy.context.scene
obj = bpy.context.object  # or bpy.data.objects['cube']
bb_vertices = [Vector(v) for v in obj.bound_box]
mat = obj.matrix_world
world_bb_vertices = [mat * v for v in bb_vertices]

co_2d = [world_to_camera_view(scene, scene.camera, v) for v in world_bb_vertices]  # from 0 to 1

render_scale = scene.render.resolution_percentage / 100
render_size = list(int(res) * render_scale for res in [scene.render.resolution_x, scene.render.resolution_y])
pixel_coords = [(c.x * render_size[0], c.y * render_size[1]) for c in co_2d]  # in pixels

for p in pixel_coords:
    print('{p[0]:.0f}, {p[1]:.0f}'.format(p=p))


Blender Video Editing Output differs from Preview

It looks like a gamma issue. Make sure your Color Management is set up correctly. You can try to set your gamma value to 2.2 and make sure sRGB is the color space for the sequencer to display the preview in the right color space.


For Viewport Shading you have both X-ray(orange in the image below) and Wire frame (red) enabled.
Enabling the Solid mode (green) Viewport Shading option instead should fix it.


Please check if the name in the code (mtllib Name.mtl) from the OBJ file is the same as the MTL file name.

If it's not please tweak the code or change the name of the MTL file.
This issue happened to me too when i realised the OBJ file doesn't have the same name
in the code.

If this doesn't work and/or the filename was the same then there
is probably an issue with the code. If the code doesn't match the pictures name's then you schould modify the names.

~Randy


You can put the items in an array and then run a loop:

def execute(self, context):
    parts = ['Body_00_Default', 'Body_01_Idle', 'Body_02_Attack', 'Body_03_Block', \
        'Leg_00_Default', 'Leg_01_Walk', 'Leg_02_Run']

    for part in parts:
        bpy.context.object.animation_data.action = bpy.data.actions[part]
        bpy.ops.anim.keyframe_clear_v3d()

    return {'FINISHED'}

or if you really want to clear ALL the actions, you could try

for act in bpy.data.actions:
    bpy.context.object.animation_data.action = act
    bpy.ops.anim.keyframe_clear_v3d()


pinning flag to pole: do I need an Empty?

AOQ:  yes, I can pin the flag in midair.  For some reason on my first attempt, I didn't create the vertex group I thought I had created.  On the 2nd attempt -- I would swear I went through the same steps each time, but there it is -- the vertex group was correctly created and works as a pin, and everything is dandy.

If the flagpole moved, and I wanted the flag to follow it, would the best practise then be to use an Empty between the moving pole and the flapping cloth?


locking button press in blender game engine

add property to the door which tells when the door is locked or unlocked .  then add trigger which sends message "unlockdoor" (and unlocks the door(sets locked to 0)) . then add animation


I've made a rope of extruded icospheres in BGE - how to prevent stretching?

You might try to increase physics substeps. Picture:

The documentation says:

  Number of simulation substep per physic timestep, higher value give better physics precision

This may potentially solve your issue.