How to adjust pen sensitivity for brush size and not shade pressure?

Simply turn on the pressure sensitivity for the Radius and disable it for the Strength. Those options are found in the brush settings in the tool shelf. It is the little button on the right of the Radius and Strength fields. I highlighted them in red in the image below.


Blender supported 3D files that support armature

Two possibilities depending on the tools used:

Use OBJ files in combination with BVH. BVH contains the skeleton,
and OBJ is capable of containing vertex weights
DAE which is one file that can contain both the weights and the
    skeleton. This is the best format IMO and is widely supported
    (although perhaps slightly less supported than OBJ/BHV).

If FBX is your only option, I've used a program that converts FBX to DAE.

http://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=20481519


How do I can grab the current image in blender game engine from a python controller?

The second approach is the closest. But here's some code that may help (untested, but pulled from a working setup)

    obj = cont.owner
    camera = obj.scene.objects['NOT ACTIVE CAMERA']
    tex = bge.texture.Texture(obj, 0, 0)
    tex.source = bge.texture.ImageRender(
        camera_obj.scene,
        camera_obj,
    )
    tex.capsize(640*480)
    tex.source.background = [0, 0, 0, 0]
    source = self.tex.source
    data_array = bytes(640*480*4)
    source.refresh(data_array, 'RGBA') # Take the picture....

    print(data_array)  # Hopefully lots of data - in a 1D array.

You shouldn't recreate the data_array and texture objects each frame. Only do it on the first  frame, then just keep running the source.refresh() line.

If you run into issues, let me know and I'll make a blend file.


I can't find the individual and interpolate options under inset tool

Use the "individual" option in the "inset faces" panel in the bottom left part of the 3D view (the option will be shown after a first inset operation).


How do I model across a mirror modifier?

Solution: Separate the geometry that will be non-symmetrical, and rename it.

Select the object (by right-clicking on it), then press Tab on the keyboard to enter Edit mode.
Then, select the geometry that you want to separate, and press P (hotkey for separating) and you are done!

Now you can press Tab again to go back into Object mode and see the separated geometry.

You can also rename a mesh by selecting it in the Outliner edtior (the object list in the far up-right in the default window layout), double-click the object's name and type in the new name instead of the one with a ".001" at the end given to the object by default.


Set the desired size for the rendered scene in Scene->Dimensions->Resolution:

Then render using F12 and save the resulting image


How to keep the view from snapping to another location when exiting camera view?

Disable the Auto-Depth option in User Preferences > Interface.

There will be still a small jump in the transition but not that big.
Also making your scene larger will help.


How can I tell what mesh selection mode blender is in

You can access this via the Scene property:

http://www.blender.org/api/blender_python_api_2_76_release/bpy.types.ToolSettings.html#bpy.types.ToolSettings.mesh_select_mode

Or if you're editing meshes using the BMesh API (if you're modifying the mesh in BMesh already).

http://www.blender.org/api/blender_python_api_2_76_release/bmesh.types.html#bmesh.types.BMesh.select_mode

Example to run in the console:

>>> print(bpy.context.scene.tool_settings.mesh_select_mode)
<bpy_boolean[3], ToolSettings.mesh_select_mode>

To see the values, you can get get the sequence as a tuple

>>> print(tuple(bpy.context.scene.tool_settings.mesh_select_mode))
(True, False, False)


How to get screen color under mouse cursor?

here an example about how you can use the glReadPixels  + mouse events;

I did some changes to code from https://blenderartists.org/forum/showthread.php?362427-3D-coordinates-of-the-mouse

import bpy
import bgl
from bpy_extras import view3d_utils
import mathutils

"""Functions for the mouse_coords_to_3D_view"""
def get_viewport():
    view = bgl.Buffer(bgl.GL_INT, 4)
    bgl.glGetIntegerv(bgl.GL_VIEWPORT, view)
    return view

def get_modelview_matrix():
    model_matrix = bgl.Buffer(bgl.GL_DOUBLE, [4, 4])
    bgl.glGetDoublev(bgl.GL_MODELVIEW_MATRIX, model_matrix)
    return model_matrix

def get_projection_matrix():
    proj_matrix = bgl.Buffer(bgl.GL_DOUBLE, [4, 4])
    bgl.glGetDoublev(bgl.GL_PROJECTION_MATRIX, proj_matrix)
    return proj_matrix

"""Function mouse_coords_to_3D_view"""
def mouse_coords_to_3D_view(x, y):
    depth = bgl.Buffer(bgl.GL_FLOAT, [0.0])
    bgl.glReadPixels(x, y, 1, 1, bgl.GL_DEPTH_COMPONENT, bgl.GL_FLOAT, depth)
    #if (depth[0] != 1.0):
    world_x = bgl.Buffer(bgl.GL_DOUBLE, 1, [0.0])
    world_y = bgl.Buffer(bgl.GL_DOUBLE, 1, [0.0])
    world_z = bgl.Buffer(bgl.GL_DOUBLE, 1, [0.0])
    view1 = get_viewport()
    model = get_modelview_matrix()
    proj = get_projection_matrix ()
    bgl.gluUnProject(x, y, depth[0],
                     model, proj,
                     view1,
                     world_x, world_y, world_z)
    return world_x[0], world_y[0], world_z[0]

"""drawing point OpenGL in mouse_coords_to_3D_view"""
def draw_callback_px(self, context):
    # mouse coordinates relative to 3d view
    x, y= self.mouse_path

    # mouse coordinates relative to Blender interface
    view = get_viewport()
    gmx = view[0] + x
    gmy = view[1] + y

    #c= bgl.Buffer(bgl.GL_UNSIGNED_BYTE, [3,1])
    #bgl.glReadPixels(x, y, 1, 1, bgl.GL_RGB, bgl.GL_FLOAT, c)
    #c= bgl.Buffer(bgl.GL_SHORT, [3,1])
    c = bgl.Buffer(bgl.GL_FLOAT, [3,1])
    bgl.glReadPixels(gmx, gmy,1,1,bgl.GL_RGB,bgl.GL_FLOAT,c);

    draw_square_follow_cursor(c, gmx, gmy)
    draw_corner_square(c)
    draw_square(c)

def draw_square_follow_cursor(c, gmx, gmy):

    # draw 3d mouse OpenGL point in the 3D View
    dist= 50 #distancia del punto al cursor
    mouse3d = mouse_coords_to_3D_view(gmx+dist, gmy+dist)
    bgl.glEnable(bgl.GL_BLEND)
    bgl.glColor3f(c[0][0],c[1][0],c[2][0])
    bgl.glPointSize(30)
    bgl.glBegin(bgl.GL_POINTS)
    #bgl.glVertex3f(*(mouse3d))
    bgl.glVertex3f(mouse3d[0], mouse3d[1], mouse3d[2])
    #bgl.glVertex2f(gmx,gmy)
    bgl.glEnd()

    # restore opengl defaults
    bgl.glLineWidth(1)
    bgl.glDisable(bgl.GL_BLEND)
    bgl.glColor4f(0.0, 0.0, 0.0, 1.0)

def draw_corner_square(c):
    for area in bpy.context.screen.areas:
        if area.type=='VIEW_3D':
            X= area.x
            Y= area.y
    dist= 100 #distancia del punto al cursor
    mouse3d = mouse_coords_to_3D_view(X+dist,Y+dist)
    bgl.glEnable(bgl.GL_BLEND)
    bgl.glColor3f(c[0][0],c[1][0],c[2][0])
    bgl.glPointSize(30)
    bgl.glBegin(bgl.GL_POINTS)
    bgl.glVertex3f(mouse3d[0], mouse3d[1], mouse3d[2])
    bgl.glEnd()

    # restore opengl defaults
    bgl.glLineWidth(1)
    bgl.glDisable(bgl.GL_BLEND)
    bgl.glColor4f(0.0, 0.0, 0.0, 1.0)

def draw_square(c):
    bgl.glEnable(bgl.GL_BLEND)
    bgl.glColor3f(c[0][0],c[1][0],c[2][0])
    bgl.glBegin(bgl.GL_POLYGON)
    bgl.glVertex2f(-0.5, -0.5)
    bgl.glVertex2f(-0.5, 0.5)
    bgl.glVertex2f(0.5, 0.5)
    bgl.glVertex2f(0.5, -0.5)
    bgl.glEnd( )

    # restore opengl defaults
    bgl.glLineWidth(1)
    bgl.glDisable(bgl.GL_BLEND)
    bgl.glColor4f(0.0, 0.0, 0.0, 1.0)

class ModalDrawOperator(bpy.types.Operator):
    """Draw a point with the mouse"""
    bl_idname = "view3d.modal_operator"
    bl_label = "Simple Modal View3D Operator"

    def modal(self, context, event):
        context.area.tag_redraw()

        if event.type == 'MOUSEMOVE':
            self.mouse_path = (event.mouse_region_x, event.mouse_region_y)

        elif event.type == 'LEFTMOUSE':
            bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
            context.area.header_text_set()
            return {'FINISHED'}

        elif event.type in {'RIGHTMOUSE', 'ESC'}:
            bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
            context.area.header_text_set()
            return {'CANCELLED'}

        return {'PASS_THROUGH'}

    def invoke(self, context, event):
        # the arguments we pass the the callback
        args = (self, context)
        # Add the region OpenGL drawing callback
        # draw in view space with 'POST_VIEW' and 'PRE_VIEW'
        self._handle = bpy.types.SpaceView3D.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_VIEW')
        self.mouse_path = []
        #self.wx = bpy.context.window.width
        #self.wy = bpy.context.window.height
        context.window_manager.modal_handler_add(self)
        return {'RUNNING_MODAL'}

def register():
    bpy.utils.register_class(ModalDrawOperator)

def unregister():
    bpy.utils.unregister_class(ModalDrawOperator)

if __name__ == "__main__":
    register()

some example


(Animation) Nodes : how to map a rotation to a value between 0 & 1?

the Map Range Node is what you are looking for. It takes the input values (min: 0, max: 360) and maps it to the target values (in your case 0 to 1).

Combine that with a Float Math Node set to modulo of 360. this way you'll only get values between 0 and 360 (540 returns 180 so the map range node will output .5).

separate Euler -> math node -> map range node.

Edit: final nodetree


How to put a Linear Workflow in practice with Cycles

By default, Blender is a scene referred radiometrically linear reference space model.

This means that, when Cycles is selected as the renderer, values are radiometrically linear ratios that extend from zero to infinity.

The subject of color, color management, scene and display referred, and other such topics is immensely vast, far too vast for a simple answer here.

The short answer to your query however, is that Cycles is already a scene referred renderer, and no special effort is required to enable this aspect. More specifically, if you load an sRGB display referred image as a texture, it will be automatically linearized to display linear. While not scene linear, this permits textures to behave within a scene referred system.

Upon loading images in common formats such as JPEG, TIFF, PNG, etc. you should not adjust your image nor adjust your output. The linearization happens at the architectural level, and is correctly formatted for output.

To fully harness a scene referred model though, one should begin to round out their knowledge of color. A wonderful entry point might be the Visual Effects Society paper written by Jeremy Selan titled Cinematic Color: From Your Monitor to the Big Screen.


How to create edges in existing mesh based on a list of vertex indices with Python

I simplified it a bit. I later found out I had a syntax error in my loop - I was doing the right thing in principle before.
The object you are adding edges to has to be selected and in edit mode when running the script.

import bpy
import csv, os, bmesh, math

#filepaths
filepath = bpy.data.filepath
directory = os.path.dirname(filepath)

verts = []
edges = []
faces = []

csvedges = directory+"/csv/3d-edges.csv"

edgesReader = csv.reader(open(csvedges, newline=''), delimiter=',')

current_obj = bpy.data.objects["wave"]  # particular object by name

obj = bpy.context.object
bm = bmesh.from_edit_mesh(obj.data)

if hasattr(bm.verts, "ensure_lookup_table"):
    bm.verts.ensure_lookup_table()

with open(csvedges, 'rt', encoding="utf8") as csvfile2:
    edgesReader = csv.reader(csvfile2, delimiter=',', quotechar='|')
    for idy, row in enumerate(edgesReader):
        if (idy > 0) :
            #print(idy)
            bm.edges.new((bm.verts[int(row[0])], bm.verts[int(row[1])]))


This problem haunted me for weeks but as in the past, I solved it before anyone needed to answer.

The trick is that I was scaling the object by clicking on the colored z-axis on the gizmo and not clicking somewhere further away.

Seems so simple now.


In pose mode, assign a copy location constraint to the bone that should move, and set as target the other bone. Then you can Keyframe the "Influence" parameter to have the constraint working only in the desired keyframes.


Editing a rigged mesh (MakeHuman > Blender > Unity)

I think your steps should look more like the following:

Edit the mesh

1.1 - delete the vertices for the head

1.2 - shift+a (to add) and select cube (while still in edit mode)

1.3 - The cube should be selected. Place the cube (g button) to desired location.

1.4 - make sure the vertices of the cube are still selected, and go into the "data" panel (icon is a polygon triangle thingy), find the vertex group named "DEF-head", and assign the cube vertices to that group (set slider to 1.0 and click "Assign" button).


How to export a sequence of images as a video file in Blender 2.8

Go to the Output Tab in the Properties Window. You can specify your output formats there, video included.


The Tooltip suggests that it's useful for fast moving flows. The documentation is more precise, and indicates it's mostly useful for fast moving sources - so you won't see any effect unless your source is moving.


You can correct this shape manually, using two tools.

01) Scale tool
- correct the height of edge rings, so they're level.
- just scale them to 0 along the Z axis

02) To Sphere Tool
- this tool will make a circle from any shape
- you can use it to correct the roundness of your edge rings
- select the edge ring and go Mesh > To Sphere (click anywhere to activate it)


2.80 - use Eevee and Cycles together for motion blur issue

I was able to get this set up by creating a separate scene that composites the Eevee and Cycles scenes together - I have both of those set up with the default composting node setup, but I'm not sure it's required. This allows it to work with all frames, or individual ones if you render from the composited scene.

If it's a sequence, that composited scene clip can then be placed on the timeline in the VSE (in a master VSE scene), but it doesn't have any preview functionality unfortunately, so I set up two tracks - one that contains the original unblurred Eevee clip, so I can edit/render things quickly with the solid shading, and the other has the composited one. I just enable/disable the tracks before exporting. I wish there was a workflow in the compositor for branching off when wireframe/solid is requested, but I haven't seen anything do that yet.

Thanks for detailing your node setup here - it was really useful!


You can import .obj files by going to File > Import > Wavefront (.obj). Several files can be imported into your scene.
Once the files are in Blender, you can make any changes to them if need be (such as joining them into a single mesh object by selecting them all and pressing CtrlJ) and then you can export back to a single .obj file by going to File > Export > Wavefront (.obj)


Is there a way to auto update or reproject newly added vertices on a shrinkwrapped mesh?

Q. What is the workflow to setup retopolgy with SubD in Blender?

A.

Create your reference mesh:

In the Properties Editor> Object tab> Display panel set Maximum Draw Type to Solid.

Create your retopo mesh:

Create a plane as the beginning of your retopology mesh and name it.

Setup X-Ray for retopo mesh:

In the Properties Editor> Object tab> Display panel enable X-Ray.

Setup Sudivision Surface Modifier for the retopo mesh:

Add Subsurface Modifier.
Enable Adjust edit cage to modifer result icon.
Subdivisions level to 2 or whatever is desired.

Setup Shrinkwrap Modifier for retopo mesh:

Add Shrinkwrap Modifier with defaults.
Set the Target to the reference mesh.
Enable Adjust edit cage to modifer result icon.

Setup Snapping to Faces for retopo mesh:

In the 3D View header, enable Snap during transform and set the
Snap Element to Face but leave off Project individual elements on the
surface of other objects.

Setup a viewport material for the retopo mesh:

In the Properties Editor> Material tab, add a new material.
Give it color like bright green or whatever you desire.
Copy the material color (hover over it and press Ctrl+C)
Go to the Material tab> Settings> Viewport Color, hover over it and
paste (Ctrl+V).

Update: I discovered that if your shrinkwrapped mesh is misaligned in certain areas, a quick fix is to apply the shrinkwrap modifier and then add another shrinkwrap modifier and set it up again. All the misaligned points will be fixed without having to move them around individually in order to get them to update.


it is kind of weird, but make sure the texture you bake to is present in your material node tree and make sure it is selected when you bake.


Plane is not solid in cell fracture, but explodes

Finally figured it out. Had to reduce the source limit.


It looks to me like some kind of mix between glossy and transparent shaders.

This setup is rather arbitrary, it's up to you to come up with a combo you like.

The trick is that there seems to be multiple layers of mesh superimposed, allowing objects near the surface to be seen, while nearly completely obscuring the bottom.

One way to go about creating such layers is by first creating a "base mesh". I used a fluid simulation, but for more control you may want to use dyntopo.

Once you have a mesh more or less how you'd like it, duplicate it and add differently seeded displace modifiers, and decimate modifiers with different ratios to get a mix of polygon sizes.

Also note the way the water meshes in your example have been sculpted to give the impression of currents; long poly strips where water is flowing straight, and choppier, evenly distributed triangles for more turbulent regions.
I didn't do this, but you may want to.


How to make a sine wave distortion effect?

Mix color instead of Add color

Starting from a similar situation:

You should set up a wave texture with horizontal bands and a little bit of distortion:

Then Mix the coordinate of the UV map with the Wave texture. Keep the value low.

Finish by animating the values of the Wave texture in order to achieve the desidered result.


How to let game users modify 3D image during the game?

change shape of the object

The question is "how do you change the shape of the object"?

Store the steps how to do that and do them again later.

For example:

You want to change the width of a wall. To do that you play a "width-changing" animation. To be more specific you play a specific pose of such an animation. This results in a wall with a different width.

The steps to get that shape are: Play pose x of the width.changing animation.

So you store this information (name of animation and frame of the pose).

On restore you can play this pose again.

Without further information on the how you want to change shape I can't provide further details.

I hope you get the idea.


Subdivision surface creating face where it shouldn't

The reason subdivision surface is "closing up" the hole for the toilet basin is because you have no vertex information to continue subdividing from there.
Subdivision surface attempts to take a single face or edge and divide (hence the name) it into multiple parts. (Two parts if an edge, four if its a face)
Blender currently supports two modes of subdividing, Catmull-Clark and Simple. Catmull-Clark subdividing subdivides and attempts to smooth out the new faces by determining the proximity of each face to each other, thus creating a roundish shape. Simple subdividing subdivides each face, while retaining the original shape of the object.
If you have an unclosed portion of a mesh which you are subdividing, the dividing and smoothing of the faces on the unclosed edge will smooth and start to draw closer to each other.
In your case, you should probably either extrude the face further into the basin and close it up at the bottom, or extrude it and form a pipe or something out the back of the toilet if you don't plan to close the mesh up.
This would make the smoothing of the modifier less visible at the mouth of the toilet, and give you a better result.


3d tracking: after render video is shorter than original (same fps and amount of frames)

The problem is solved! Unrelated to Blender, but on Adobe Premiere. It was in the interpretation of the frame rate of sequence (in the project panel, right click on the clip-modify-interpret footage-assume this frame rate)


How to subdivide part of mesh but not apply the modifier?

The Subsurf modifier has no controls for limiting it to only part of a mesh. So if you want want to use that modifier, instead of some other techniques listed below, you are left with the top two options.

Split the mesh. In edit mode, select the part you do not want to have subdivided and press P > Selection. Now just add the modifier to one of the two objects.
Keep hard edges. There are many ways to achieve that, holding loops (just edge loops added near important edges) are a common option, but you may be able to use edge creases. This question is a good resource for those methods.

If you don't need to use the subdivision surface modifier then you have more options left open to you though modeling.

Add loop cuts with CtrlR
Subdivide only selected parts of a mesh with the Subdived operator. It is can be found in the tool shelf, from the 3D view header Mesh > Edges > Subdivide, or in the specials menu W > Subdivide.
Knife tool. you can use the knife tool to selectively add more edges where needed (also very useful for controlling edge flow).
Bevel. Can be immensely useful for adding holding loops. It is a great tool any time you need more detail in a specific spot.

Vertex connect Path J is a less common but still useful tool that adds new edges by simply connecting the selected vertices.


Bmesh: Immediately encounter strange error after adding new layer and running bmesh op

Assign your int layer before you assign geometry.  PS took out verts from bisectable geometry.

import bpy, bmesh

mesh = bpy.context.edit_object.data
bm = bmesh.from_edit_mesh(mesh)
cut_layer = bm.edges.layers.int.new('cut')
geom = [e for e in bm.edges[:] + bm.faces[:] if e.select]

ret = bmesh.ops.bisect_plane(bm, geom=geom , plane_co=(0,1,0), plane_no=(1, 0, 0))
bm.edges.layers.int.remove(cut_layer)

bmesh.update_edit_mesh(mesh)


Fluid Simulation: Inflow is stretching to the edge of domain when baked

The normals of the inflow object are inverted. Flip or recalculate them.


Installing Python 3.6 on any version of Blender

It’s to do with setting the PYTHONPATH in blender somewhere.  Two min and I will see if I can find it on my phone...

Edit I can’t find the exact answer on my phone. Search for “change python version blender” and you will get the answer, it’s been asked a few times but not for 2.8 as far as I can see.

Also the answer varies depending on OS.

Here it is... Change Python version used by blender


HI .
1- Just make two cuts like Picture by selecting Edge loops and Press CTRL + E > mark seam
2- go to uv and press U to unfold it
GL .


Looking for equivalent of Fusion 360 Sweep with Path and Guiderail in Blender

You can actually do all this directly from a bezier curve object, mostly without any modifiers or destructive workflows.

You need the classic three-bezier curve objects system:

One for the actual $Body$ of the Tea Light

One defining its $Section$,

And one has a Taper Object to adjust the radius expansion interactively.

Assign them all to the correct slot of your body object, then play around with the taper shape to control the profile of the light.

For the Taper Object $Y$ coordinates of the points control the scaling ratio. At
$Y=1$ there is no deformation, bellow that it reduces radius, and above it increases.

You can use Tilt to rotate the base. Adjust interpolation settings to improve smoothness.

This may require a conversion to mesh to take care of the closed cap at the base. Alternatively if you prefer avoiding the destructive last step, use a mesh object with an Array Modifier and Curve Modifier, deformed along the same "Body" curve, then use an End cap representing the base.


How to spin more than one propellers(objects) at the same time

Using Drivers.

Similarly to my answer here I believe drivers are a great way to animate mechanical objects.

For a very simple case the rotation axis, in this case z, can be "spun" by setting the rotation to the frame, by typing frame (known to drivers, as the current frame) into the field.

Adding other variables as custom properties on the parent empty, eg on / off / speed, as well as on the individual rotor empties themselves, could change the speed of each.


To connect the nodes smoothly, all that's needed is to (CtrlE > Edge Data) mark Freestyle edges on a low-poly version of your curved surface, as you appear to have done, and then assign a Subdivision Surface modifier with Catmull-Clark interpolation. (The newly generated faces and their sides are not visible to Freestyle, unless you apply the modifier, and mark them afterwards). Then you set the Freestyle Line Style to select only by Edge Mark.

This is assuming that the result of CC subdivision is mathematically accurate enough for your purposes. If not, it is possible to select every n'th loop on a more densely divided grid.

Select 2 parallel edges, n apart, on the loops you will eventually want to mark.
Hitting CtrlShiftNumpad + will select successive edges at the same interval, across the grid.
Using the Select menu in the header, select 'Loops' > 'Edge Loops'.

Loops will be selected at that interval, to be marked.


your topology has many errors:

red circle: you have 5 edges come from a single vertex
green circle: you have 3 edges come from a single vertex

You need to have only quads (A square or rectangular polygon is referred to as a quad or quadrilateral polygon, and is a four-sided polygon. It has exactly 4 vertices at the corners connected by 4 edges) for best shading results.
How to fix it?
Edit your topology to have only quads:

merge the vertex in orange circles. Select the vertices and press M (or Alt+M in version 2.79 or older)
remove the vertex in the yellow circle
continue fixing the topology to have only quads

here's a good topology for a fork (source here: https://www.turbosquid.com/3d-models/fork-metal-3d-model-1360722)


Properties, the Defaults for Property keys, and when to use get()

The default value will not be automatically applied when declaring a property with a getter and setter.

In Python you can use the .get() function when accessing a key in a dictionary that may not exist. It allows you to specify a second argument which will be used as default value in case the key cannot be found. This is necessary for your use case, because the key "enum_flag_var" may not yet exists in the bpy_struct dictionary. Accessing it using self["enum_flag_var"] will result in a KeyError.

KeyError: 'bpy_struct[key]: key "enum_flag_var" not found'

The key will exist once you've assigned a value to the property in your script or when the user sets a value in the UI. You cannot use self.property in the getter, because that would in turn also call the getter and therefore cause an infinite recursion. That's why the value is accessed through the dictionary.


Properly convert Hex Color code to Blender RGB in python

This can be achieved using the following code:

def hex_to_rgb(value):
    gamma = 2.2
    value = value.lstrip('#')
    lv = len(value)
    fin = list(int(value[i:i + lv // 3], 16) for i in range(0, lv, lv // 3))
    r = pow(fin[0] / 255, gamma)
    g = pow(fin[1] / 255, gamma)
    b = pow(fin[2] / 255, gamma)
    fin.clear()
    fin.append(r)
    fin.append(g)
    fin.append(b)
    fin.append(1.0)
    return tuple(fin)

It may not be completely clean code, but is really helpful


Blender crashes when running trying to overlap()

The script iterates over all objects, including those that aren't meshes. Only determine the overlap for objects with type set to "MESH" and it will work properly.

Your script with the suggested fix:

import bpy
from mathutils.bvhtree import BVHTree

dgraph = bpy.context.evaluated_depsgraph_get()

for obj in bpy.context.scene.objects:
    if obj.name.startswith("M") and obj.type == "MESH":
        for obj2 in bpy.context.scene.objects:
            if obj2.type == "MESH":
                print(BVHTree.FromObject(obj, dgraph).overlap(BVHTree.FromObject(obj2, dgraph)))


The correct way is to assign the "source" action to the target armature via the dopesheet, but there are 3 main problems in your attempt:

1) The scale of the two armatures are different (Source: 0.094, Target: 1)

2) The animation of source is expressed in hips location and all bones Euler rotation, while all target bones are on quaternion: you will have to select every bone in pose mode and switch it to euler rotation mode in the "N" panel; by now the target reads only hips location, every other animation information is lost.

3) The bone's location and roll angle are so different from source to target that I think is nearly impossible to make this animation work on the target rig (on this last point, maybe someone more expert than me has a solution)


EEVEE not rendering Grease Pencil lines as expected

After lots of rage & trial/error, I have a workaround for this:

Add an Offset modifier to the Grease Pencil object
Try changing the Location value by + or - 0.01 on whichever axis will move the GP object closer to the camera & away from the 3D object.

I'm assuming this is a bug in Blender, causing the GP object to be considered closer to the 3D object it's near. For animation, I've keyframed the Location value of the Offset modifier & increase it when the camera zooms out & causes this issue. Then when I zoom back in (to where it renders correctly), I keyframe the Location value back to 0.

Hope this helps somebody.


Is it possible to safely and reliably maintain a reference to a blender object in python?

Use a PointerProperty

As pointed out in Is it possible to use bpy.props.PointerProperty to store a pointer to an object?  can point to any blender bpy.types.ID type object, in example adding an object_of_interest pointer to the scene.

import bpy
from bpy.props import PointerProperty

bpy.types.Scene.object_of_interest = PointerProperty(type=bpy.types.Object)

Run script above and test in python console below.

Starts off not set, None

>>> C.scene.object_of_interest is None
True

Set it to the context object

>>> C.scene.object_of_interest = C.object

>>> C.scene.object_of_interest
bpy.data.objects['Cube']

Rename it

>>> C.scene.object_of_interest.name = "Foogle"
>>> C.scene.object_of_interest
bpy.data.objects['Foogle']

>>> C.object
bpy.data.objects['Foogle']

Remove it

>>> D.objects.remove(C.object)

Back to None

>>> C.scene.object_of_interest is None
True

If we did this via reference ie

object_of_interest = C.object

deleting then re-referencing would mean death to blender.


BGE Actions not working to the rig [any of the other questions helped]

First aid:

un-parent skin mesh object from armature object
ensure the skin mesh object has no modifiers at that state
parent the skin mesh object to the armature object in deform mode
ensure the skin mesh has vertex groups matching the bone names
ensure you have an animation (action) that belongs to the armature
add logic bricks that activate an Action actuator playing your animation in-game
start the BGE and activate the above logic

E.g.

Always -> AND -> Action Actuator


The Fresnel node outputs which percentage of light would be reflected off a glossy layer, with the rest being refracted through the layer. The most common use is to mix between two BSDFs using it as a blending factor in a mix shader node.

For a simple glass material you would mix between a glossy refraction and glossy reflection. At grazing angles more light will be reflected than refracted as happens in reality.

For a two layered material with a diffuse base and a glossy coating, you can use the same setup, mixing between a diffuse and glossy BSDF. By using the fresnel as blending factor you're specifying that any light which is refracted through the glossy coating layer would hit the diffuse base and be reflected off that.

For the Cycles node it is assumed that this glossy layer is a simple dielectric material with an index of refraction. Different and more advanced Fresnel equations exist but are not currently implemented. More advanced layering models exist but fresnel mixing is a commonly used approximation.


Change the effect of a light on a certain object?

Here's a screen shot showing the sort of compositing setup you'll want to make.

There is an orange lamp shining from the top left of the shot, and a blue lamp shining from the top right. The floor plane is ignoring the blue light while the cube and cylinder objects are receiving light from it.

First, for this to make sense you need to know the difference between layers and render layers. A layer is a slot where objects can reside. A render layer specifies for a type of render to be made by arranging layers in a special way.

So that you can see which objects are on which layers:

(I can label the layers because I'm using the Layer Management add-on)

Here are the Mask and Exclude settings for the render layers:

Explanation of render layer settings

Main Render Layer: Layer 2 which contains the floor plane is masked out.

Floor Plane: Excludes Layer 3 which contains the blue lamp. Masks out Layer 1 which contains the cube and cylinder.

Note that it's not even necessary to enable the "Blue Spot Lamp" render layer for the blue lamp to have an effect as long as the layer it resides on is enabled. Disabling that render layer speeds up render time.

More info: Understanding Render Layers


How to add a Stroke Layer in a Collection

I think some of the default names for things in Blender are confusing.

A Grease pencil object (yellow line icon in outliner) can be part of a collection. There's a Grease Pencil object called 'GP Object' in the image.
A Grease Pencil object has a Grease Pencil data block (green icon in the outliner). I've called the datablock 'GP' in the image.
That data block has layers. Called 'Lines' and 'Fills' in the image.
Layers have frames (the playhead selects which frame is the current one)
Frames can have strokes and fills (made of points).
With the Grease Pencil object active, you can use the Grease Pencil datablock tab to add/remove layers.


How do I limit gloss/reflection to only intense sources such as a light source?

As far as I know, there is no way to reflect only Lights/Emission shaders but there is a method to prepare your scene and objects to mimic such effect.

For this example I'm using simple scene with two mesh lights, HDRI lightning and simple objects.

Comparison:

Reflective material:

This is simple 'fake PBR' setting, Layer Weight node will allow you to make reflections be harder/softer.

Other objects and World setup:

You will need to disable Glossy Ray Visibility for every object that you don't won't to be visible in your reflective material. So in this case I have disabled Glossy in Cycles Settings of each object and Ray Visibility > Glossy under World settings to 'mute' HDRI map in reflection.


It seems a workaround is to press F6 after adding the object in.


Positioning a collection of objects along a curve

Even though I was able to get it to work with a particle system, it was pretty fiddly, so I think I have a better solution using a little scripting one-liner.

Make a backup of your blend file, in case something goes wrong.

Then, assuming your cubes are in a single collection called "Cubes", switch to the Scripting workspace and enter the following one-liner into the Python console:

>>> for n,o in enumerate(bpy.data.collections["Cubes"].objects): o.location.x = n*3
... # <Press Enter> #
>>>

The "3" here spaces the objects 3 meters apart along the x axis.  Use whatever spacing is convenient to keep the objects separated.  We'll adjust the final spacing later.

Now, we're going to create a mesh grid at the origin to control the cubes.  Switch back to the Layout workspace, and feel free to hide or unhide the Cubes collection as necessary.

At the origin, add a Grid mesh with a number of X subdivisions equal to the number of objects (say X=100) and Y=3 subdivisions.
In edit mode, select the whole grid, and "g x 1 " so the left hand edge starts at the origin.
In object mode, scale it up so the X subdivisions line up with the individual cubes in the collection.  The easiest way is:  "s x 1.5 " to scale it from 2 to 3 meters (to match the spacing in the Python one-liner, and then "s x 99 " where 99 is one less than the number of cubes.  Double check that all the X subdivisions are in the centers of the cubes.  Also, scale it down in the Y direction so the edges of the grid lie within the cubes.
Now, VERY IMPORTANT -- Ctrl-A Apply the Scale on the grid.
Back in edit mode, Alt-select the middle Y subdivision edge loop and move it along the X axis slightly.

The idea is to have a triangle of points contained within each cube.  It should look like this:

Now, back in object mode, select all the cubes, Shift-select the grid, and Ctrl-P Parent to Vertex Triangle.  Each cube will be parented to the triangle of three points it's closest to which will control its position and orientation.  Now, you can adjust the spacing by selecting the whole grid in edit mode and scaling it from the world origin pivot.  (Note, scale in all dimensions, not just along the X axis, or the cubes will tend to twist.)

Finally, you can tie the grid to the curve in the usual manner.  The most reliable method seems to be:

Select your curve, and Shift-S Cursor to Selected
Select your grid, and Shift-S Selection to Cursor
Select grid, then shift-select curve, and Ctrl-P Parent -> Follow Path

Now, the curve can be moved, rotated, and scaled in object mode, and the grid w/ cubes will follow along (in particular, the cubes will scale with the curve, so don't do per-axis scaling in object mode).  In edit mode, the curve can be scaled without changing the size of the cubes (they'll slide along the curve to maintain spacing).  To readjust the cube spacing (also without adjusting cube size), size the grid in edit mode.  You may find it helpful to turn on the Edit Mode Display for the Curve modifier in the modifier tab.

Finally, if the cubes start to twist, note that you can edit the grid and pull just one of the three Y subdivisions forward or back to untwist them.  Don't forget to turn off rendering of the grid or give it a transparent material or something.

Here's a 2.80 blend file that shows an example with 100 colored cubes.


how to render PNG with transparent background (Netrender) Blender

Network renderer uses the parameters you set in the chosen engine.
If you select Cycles in Network renderer, then switch to Cycles, go to Film, check "Transparent" and select an output format that includes the alpha channel. Then go back to Network Renderer.


Shape key morphing between two meshes with different vertices

You could try the shrinkwrap modifier. Here I have two icospheres with different number of subdivisions. I add the shrinkwrap modifier to the one with more vertices and set the one with fewer vertices as the target and the mode set to Nearest surface point:

Then I click Apply as shapekey, and here's the result:

I experimented a little with the different modes of the modifier. Viewing the results in edit mode shows the difference.
Nearest surface point:

Nearest vertex:

The project mode has a multitude of options, so I'm not posting any pictures of it, as it would make this answer too long. Instead I quote The Blender Wiki on the shrinkwrap modifier

  Projection
  This will project vertices along a chosen axis until they touch the shrink target. Vertices that never touch the shrink target are left in their original position. This implies that, depending on the settings of this option and the relative positions of the two objects, the modified object might sometimes remain undeformed. This is not a bug; just “play” with the settings (especially the Negative/Positive ones), or move one of the objects around...
  This method is the hardest to master, as it might sometimes give unexpected results...


Trying to move an object moves the texture on the object instead

Turn off this option in the N properties panel.


First, check if using the bevel modifier by itself works. Make sure your scale is applied as well.
If the bevel does work, you will need to create a vertex group with all the top faces of the text selected. You can then use that vertex group as a mask for the bevel modifier.
If the bevel modifier doesn't work, let me know and we can sort something out.
EDIT:
I did some experimentation, and it turns out that the text object in Blender has a bevel option! Simply just edit the bevel settings the way you want, then convert the text to mesh. You can then delete the bottom section of the text, re-extrude downwards, and voila!

The screenshot above is from Blender 2.92, and I see you're using 2.82. Most of the options should still be there, but if they aren't...
Then you'll have to retopologize your text and then apply a bevel modifier on that.


B-Bones: How to get access to individual segments?

This is a very late answer, I didn't see in until now and if somebody had answered it, I would not have jumped in, since I am struggling with the same issue myself. But I might be a baby step ahead of you, so I thought I should share: You'll want to use a spline-ik constraint on the last bone of your chain, set the chain length accordingly (the selected bone included), as in the manual:
 https://www.blender.org/manual/rigging/posing/inverse_kinematics/spline_ik.html
You'll need a target curve. To control the curve you will need hooks, those can be bones, too, but whatever you do, don't use the same armature as the one controlling your bones because you will get strange effects: if you use bones as hooks, you'll need 2 armatures. I still need to work on the last part and I did have my trouble with tutorials, but I hope this was useful.


RuntimeError and TypeError when trying to call wm.event_timer_add

The comment above by batFINGER worked:

There are many changes in 2.80 and it appears this could be one. Given the error message try wm.event_timer_add(0.1, window=context.window) ie make it a keyword argument.


Point light in Blender 2.90.1 not working

Your radius is too big, using something like 1 or 2 works, also make sure you light color is not too dark


You can test if the object is already in a collection (search from its name). And only if not found, create it and assign the name.


You can apply the array modifier to stack the shapes you described on top of each other. And, then, use the curve modifier (but don't apply it) to bend the stack in order to make an animation of the wind blowing on the tree like this:

Now, just add the top, the trunk and setup the materials:


Ristricting child translation to single axis

Use a child of constraint on B, set the Target to A and select only Location X.

A's location on the X axis will affect B, all other transformations will not.


SKINNING - How to remove specific vertex relation to bone

You can find it in the vertex groups tab. Find the group with the same name as the hand has, select the skirt's vertexes in the 3d view and click on remove.
https://docs.blender.org/manual/en/latest/modeling/meshes/properties/vertex_groups/assigning_vertex_group.html


There is a ridged corner in the 3D window (top-right), move the mouse there and when you get the "cross" mouse icon just drag it to the left (it seems that you have already performed this step).

After that, you will have an editor type selector with a "cube" icon in the left bottom corner, click on that and, from the drop-down, choose the icon next to "properties".

Alternatively,
Just save your work as it is and go to File then Load factory settings, then open your file again, unchecking the "Load UI" checkbox in the File browser.


Image blurred background to remove black bars

The VSE is well designed to do a simple task like this, and you can do an OpenGL render if you are impatient! ;-)

You can make a blender project with predetermined dimensions, eg 1280 by 720, making a vertical narrow image.

All media dragged into the VSE will "Auto-resize" to fit these dimensions.

Drag in an image, select it and press Ctrl-G to make a metastrip. We
will re-use this metastrip in a stack. To change the image simply
open the metastrip and replace the image strip.

Select the metastrip (right click) then press Shift-A (Add)  > Effect Strip > Gaussian Blur. Set Blur value to x: 50 y: 50 for example
Duplicate the metastrip Ctrl-D and move it above the effect strip.
You can constrain the horizontal movement by pressing the y key.
Select the 2nd metastrip (right click) then press Shift-A (Add) > Effect Strip > Transform. Change the scale of the y: 0.5 (this
depends on the original image aspect ratio).

With the top effect strip selected make sure that it's 'blend' type
is set to Alpha Over or Over Drop.

With all this done, you only need to swap the contents of the metastrip to change the effect output. To open the metastrip just press TAB. And TAB to return to VSE master timeline.


How to animate vertex colors using animation nodes

Animation nodes have Set Vertex Color node which can assign colors to vertices, loops or polygons.


There is a few nice helper methods hidden in the bpy.utils module space. For instance, calling

bpy.utils.script_paths()

will return all current Blender paths where Python modules can be put. Even if you (like I do on my system) redirect the Scripts Folder to a custom location, so they stay around when updating Blender, using this method you'll get a valid pointer. See this output here:

But you could also use

x = bpy.utils.script_path_user()

to retrieve the current location of your user scripts. This will return a string, and as a fallback your scripts home directory if no custom path was set.


Changing shape/size of green collision box

You cannot move or rescale them. From the Blender manual (emphasis added):

  Primitive Shapes

  These are best in terms of memory/performance but do not necessarily
  reflect the actual shape of the object. They are calculated based on
  the object’s bounding box. The center of gravity is always in the
  middle for now. Primitive shapes can be shown in the viewport by
  enabling Bounds in the Object ‣ Display panel.

Use a mesh shape to get more precision:

  Mesh-Based Shapes

  These are calculated based on the geometry of the object so they are a
  better representation of the object. The center of gravity for these
  shapes is the object origin.

You could, however, use a parent object with a collider if you want more control.


Combine and duplicate meshes before exporting them?

Sounds like a job for our good old friend: Undo. You can make it complicated for sure, but since the operation is in memory anyway, it should make it pretty fast.

import bpy

from bpy.props import (BoolProperty, FloatProperty, StringProperty)
from bpy.types import (Operator)
from bpy_extras.io_utils import ExportHelper

# ExportHelper is a helper class, defines filename and
# invoke() function which calls the file selector.
class EXPORT_OT_customFBX(Operator, ExportHelper):
    """Export the scene to FBX"""
    bl_idname = "export_scene.custom_fbx"
    bl_label = "Export FBX"

    # ExportHelper mixin class uses this
    filename_ext = ".fbx"

    filter_glob: StringProperty(
        default="*.fbx",
        options={'HIDDEN'},
        maxlen=255,  # Max internal buffer length, longer would be clamped.
    )

    # List of operator properties, the attributes will be assigned
    # to the class instance from the operator settings before calling.
    global_scale: FloatProperty(
        name="Scale",
        description="Scale",
        default=1.0,
    )

    use_subsurf: BoolProperty(
        name="Use Subsurf",
        description="Use Subsurf",
        default=False,
    )

    apply_unit_scale: BoolProperty(
        name="Apply Unit Scale",
        description="Use Subsurf",
        default=True,
    )

    def execute(self, context):

        viewport_selection = [o for o in context.selected_objects if o.type == 'MESH']

        if len(viewport_selection) == 2:
            if context.active_object in viewport_selection:
                # Join!
                # https://blender.stackexchange.com/q/13986
                # https://blender.stackexchange.com/q/50160
                bpy.ops.object.join()
            else:
                print ("Can not call join operator")
        else:
            print ("Nothing to join.")

        # Export
        bpy.ops.export_scene.fbx(
                filepath=self.filepath,
                global_scale=self.global_scale,
                apply_unit_scale=self.apply_unit_scale,
                use_subsurf=self.use_subsurf,
                use_metadata=True,
                axis_forward='-Z',
                axis_up='Y'
            )

        # Undo!
        bpy.ops.ed.undo()
        return {'FINISHED'}

# Only needed if you want to add into a dynamic menu
def draw_export_fbx(self, context):
    self.layout.operator(EXPORT_OT_customFBX.bl_idname, text="Custom FBX (.fbx)", icon="MESH_MONKEY")

# Registration
classes = (
    EXPORT_OT_customFBX,
)

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

    bpy.types.TOPBAR_MT_file_export.prepend(draw_export_fbx)

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

    bpy.types.TOPBAR_MT_file_export.remove(draw_export_fbx)

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.export_scene.custom_fbx('INVOKE_DEFAULT')

Operator is based on Templates > Python > Operator File Export

Another quite boring approach is saving the file before exporting to fbx and then reload the blend:

def execute(self, context):

    # Save!
    if bpy.data.is_dirty:
        bpy.ops.wm.save_as_mainfile(filepath=bpy.data.filepath)

    viewport_selection = [o for o in context.selected_objects if o.type == 'MESH']

    if len(viewport_selection) == 2:
        if context.active_object in viewport_selection:
            # Join! # https://blender.stackexchange.com/q/13986
            bpy.ops.object.join()
        else:
            print ("Can not call join operator")
    else:
        print ("Nothing to join.")

    # Export
    bpy.ops.export_scene.fbx(
            filepath=self.filepath,
            global_scale=self.global_scale,
            apply_unit_scale=self.apply_unit_scale,
            use_subsurf=self.use_subsurf,
            use_metadata=True,
            axis_forward='-Z',
            axis_up='Y'
        )

    # Reload
    bpy.ops.wm.open_mainfile(filepath=bpy.data.filepath)
    return {'FINISHED'}

Might be nice doing some tests to measure execution time of both... in memory.


Change Pivot point to "bounding box center"


When i export files from blender there are some unknown shapes blocking my models


It's a little hard to tell exactly what you're asking, but if you're looking to form a bunch of objects into a 180° semicircle, you can use an Array Modifier:

Just use an Empty as the offset object of the modifier, and keep the origin of the object in the same place as the empty. Then you can rotate the empty by 180/(35-1) to get the right increments to fill up 180°.


How to delete unused meshes from the Outliner?

Change the outliner view mode to "Orphan Data" instead of "Datablocks".
To the right of the search field in the header is a "Purge All" button;

and may simplify your problem.

This button essentially performs the save and reload process in one click, which in turn invokes Blenders garbage collection routines.


I use the VSE transform addon when you have added your strip press T and it'll be scaled with the correct aspect ratio, then G, R, S grab rotate scale the strip. see the docs for more options


I find when I have navigation problems, selecting a mesh and pressing the . key on the numpad fixes it.


How to make 3d text values larger in 3d view?

The font size for the dimensions is the same size as the text in panels throughout Blender (ie, the fields in the right-hand properties panel in your screenshot. You can adjust the overall font size by adjusting the DPI setting in the System section of the User Preferences :

Note that adjusting the DPI will affect the whole Blender user interface, not just the labels in the 3d View.


Assuming your desired end result is a solid cylinder with a textured top surface, perhaps there is another approach. Rather than using a Boolean to create the base, which is likely to generate artifacts, and badly-behaved geometry here, you could start with the whole cylinder.

Take your existing base-cylinder, and subdivide a top surface for it in some way. But whichever way, ensure there are at least some loops running around the circumference:

Assign the top surface to a vertex group.
Aim your Displace modifier at that vertex group. That way, it will displace the top surface of your cylinder, but not the rest.
Even then, there may be some sharp cut-offs of the displacement at the edges, leaving unrealistic thin slivers of displaced top-surface around the cylinder's circumference. So, in Edit Mode, you can edit the weights of the vertices in the group, giving them a falloff towards the outside:

(To edit weights in Edit Mode, select a loop of vertices. In the Item > Vertex Weights panel, adjust the weight of the active vertex, and hit the button to copy the weight to the rest of the loop)

So now you can get control over the depth of your procedural displacement as it approaches the edge of the cylinder:

You can see a couple of slivers sticking up at the back right of this render.. you could adjust the weights in these areas to get rid of them. You can edit the weights in other ways, if you want to achieve a different effect.


Render Audio on a machine with no sound card

You can do ./blender -noaudio -b --python test.py -o //out -a to get rid of those errors/warnings but I'm not sure if this will cause you not to be able to have audio in the videos you are going to save


In the Outliner, click on the key icon to make some other options visible, like Globally Disable In Viewport, which may be deactivate for your objects.


AttributeError: module 'bgl' has no attribute 'glColor4f'

While 2.80 is still under active development, not all of the templates included with blender have been updated with the changes needed to work with 2.80.

With the last of the python API changes about to be finalised any day, these remaining templates should get updated soon.

This post might help get you started with the bgl changes.


Resetting Transforms of an Object Changes Pivot of Object

You are asking for an impossible thing. Applying location keeps the geometry in the same location but zeros out the transforms.

What you are calling the pivot is the object origin. The origin is what all the transforms are biased off of. Take these images as an illustration.

The cube is at the global origin or scene origin (0,0,0).

Here the cube is moved, simple object mode transform (-4,0,2).

Here the cube's location is still the same as in the image above, but the cube is in a completely different pace. The reason being the geometry was moved in edit mode.

This is essentially what applying the location does. Blender clears the location (moves the origin to 0,0,0) and moves the geometry back to where the object was.

All that is  explaining what is happening to an object when you apply its location.
Modifiers, constraints, parenting, and rigging will effect an objects location and moving the object's origin will likely mess at least one of those up.


Objects in animation moving at different speeds on the same keyframe

You could parent the pearls to the crown, so that they follow the crown without being animated.

To do this, select the pearls and then the crown (so that the crown is active), and press CtrlP. Now you only have to animate the crown.

As for the reasons why the objects are out of sync in the first place, my first guess is that the origins are not in the same place.


In Python is it possible to change the background color of a property ui?

The colors are controlled by C code, you can't set it to arbitrary colors with python.

However, you can change the background to alert color (=red) by setting the alert property on the layout block:

import bpy

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout

        obj = context.object
        if obj is None: return

        col = layout.column()
        col.alert = True
        col.label("Alert state NOT supported:")

        box = col.box()
        box.label("Labels", icon="X")
        box.menu("VIEW3D_MT_object", text="Menus")
        box.prop(obj, "layers", text="Not all properties")

        col.separator()
        col.label("Supported:")
        box = col.box()
        box.operator("mesh.primitive_cube_add", text="Operators (Buttons)")
        box.prop(obj, "name", text="Many properties")
        box.prop(obj, "location", index=1, text="Vector props: only single")
        box.label("also with emboss=False, but...")
        box.prop(obj, "name", text="read-only?!", emboss=False)
        box.label("template_list() sort of (needs materials):")
        box.template_list("UI_UL_list", "foobar", obj.data, "materials", obj, "active_material_index")

def register():
    bpy.utils.register_class(HelloWorldPanel)

def unregister():
    bpy.utils.unregister_class(HelloWorldPanel)

if __name__ == "__main__":
    register()

Run the above code in Text Editor and check out the Object tab.


Object mirrors about component axis rather then main model axis

Yes, just use the "Mirror Object" field in the Mirror modifier:

Should give you the result you want:

If not, you might need to apply rotation on the object you want to mirror.


why extrude or move move not moving fluid

If it's happening when you move or extrude, it may be that you have Snapping turned on accidentally.  Check in your header bar and make sure you've got it turned off.

It's easy to accidentally turn it on with the hotkey Shift+Tab.


How can I decrease the size of textures in my blend file programmatically?

Asked many times

To quickly scale all images in .blend to given size:

import bpy
for img in bpy.data.images:
    try:
        # for empty render result image, etc.
        img.scale(512, 512) # (width, height)
    except:
        pass


Sculpting brush - low poly with normal map?

You got a very interesting problem to solve. You could bake normal map from high poly,sculpted chunk of terrain to a texture,and then use this texture as a brush in texture painting mode to paint onto a terrain texture and save it as a normal map for the terrain.

To to that, You have to have new image texture active in material of a UV mapped plane. Place this plane above high poly terrain, turn on Selected to active in Bake options panel, select first high poly terrain, and then the plane and hit Bake - that's all you have to in general do. But here is more detailed tutorial on the topic


you have area lights (with a really small size?) upon your ceiling, pointing downward.

Your ceiling is in it's own shadow! I didn't use BI for a long time, so i don't even understand that you have your walls visible...
Anyway, add some point lights under the ceiling or some area with low energy pointing up.


You will remove the lines while editing with picture editing apps. For instance if you are using photoshop, you can make the layer invisible when you are done with editing


How do I show the preview image in the background when compositing?

Add a Viewer output from Add Menu(Shift+A) -> Output and connect something to it.

Use V and Alt + V to zoom out and in and Alt + MMB to drag the image around.


You can try to fix the error with the approach described in this StackOverflow answer.

Otherwise you don't need to install Blender, you can also use the archive version. Download the appropriate version for your OS and extract the archive.

Blender 2.8 64 bit
Blender 2.8 32 bit

Alternatively you can also install Blender through Steam.


Setup blender cycles so that it shows svg images as they would normally look

As you describe it, you just want to import into blender for animation purposes.

I might be wrong, but I think blender only looks at the shapes of the svgs and (based on your image) approximates the color gradients as single colors. I suggest exporting all svgs as png with alpha and use the "import image as plane add-on" in blender. addon

Set the materials on the planes to an emission shader with strength 1 (this way they are "not shaded" and somewhat independent of external lighting, giving a 2d look) and the background to white.


There is an addon called BLAM: Camera Calibration Toolkit it can be used to match geometry to still images.

It uses the grease pencil to determine the perspective and focal length, and has tools for geometry reconstruction.

see http://stuffmatic.com/blam-blender-camera-calibration-toolkit/
It can be downloaded here: http://stuffmatic.github.io/

UPDATE: Blam is no longer mantained and has been replaced by fspy:

https://fspy.io/

For a detailed post on how to use blam and Fspy read: How can I recreate geometry using a photograph?


This tutorial deals with the animation of stuff along curves. Your model might be complicated to set up this up for, though.

https://medium.com/@behreajj/scripting-curves-in-blender-with-python-c487097efd13


Use a pass index on the material for the eyes.

Enable material index on the layer passes.

Add a ID mask on the compositor and use the number of your material pass index to create a mask for the glow.

EDIT

To make the glow yellow you can add color to the mask and change the final mix node's mode to add:


Your nodes setup is not good, you're actually mixing a grey color (in the MixRGB Color1 socket) with your brick pattern, it gives a grey brick pattern. Also you should put a Diffuse before your Output. I propose this solution which uses the AO as a mask between your brick pattern and the dark color you want to give in the folds of the shape:


Subsurf doesn't use creases outside of edit mode

Alright, found the problem. A boolean before the subsurf messed up the creases.


How to reopen folder select dialog (probbably by clearing string property)

I'd suggest just recall the operator, eg  the operator file export template operator_file_export.py  Used a directory property for a folder path, to keep filepath as a file path (usual usage).

class ExportSomeData(Operator, ExportHelper):
    """This appears in the tooltip of the operator and in the generated docs"""
    bl_idname = "export_test.some_data"  # important since its how bpy.ops.import_test.some_data is constructed
    bl_label = "Export Some Data"

    # ExportHelper mixin class uses this
    filename_ext = ".txt"

    filter_glob = StringProperty(
            default="*.txt",
            options={'HIDDEN'},
            maxlen=255,  # Max internal buffer length, longer would be clamped.
            )

    directory = StringProperty(subtype='DIR_PATH')

    def execute(self, context):
        if os.path.isfile(os.path.join(self.directory, "test.txt")):
            return {'FINISHED'}
        else:
            return bpy.ops.export_test.some_data('INVOKE_DEFAULT')


Thanks, @Jackdaw. That was the problem. Pardon for such a noob question. Today is my first day working with Blender.

Here is the working code:

import bpy

# turn on bloom
bpy.context.scene.render.engine = 'BLENDER_EEVEE'
bpy.context.scene.eevee.use_bloom = True

# add material
mat_name = 'EmiMat'
bpy.ops.material.new()
bpy.data.materials[-1].name = mat_name
bpy.data.materials[mat_name].node_tree.nodes.clear()
bpy.data.materials[mat_name].node_tree.nodes.new("ShaderNodeEmission")
bpy.data.materials[mat_name].node_tree.nodes["Emission"].inputs["Color"].default_value = (0.151736, 0.0997155, 1, 1)
bpy.data.materials[mat_name].node_tree.nodes["Emission"].inputs["Strength"].default_value = 5.
bpy.data.materials[mat_name].node_tree.nodes.new("ShaderNodeOutputMaterial")
links = bpy.data.materials[mat_name].node_tree.links
links.new(
    bpy.data.materials[mat_name].node_tree.nodes["Emission"].outputs[0],
    bpy.data.materials[mat_name].node_tree.nodes["Material Output"].inputs[0])

# add sphere
bpy.ops.mesh.primitive_uv_sphere_add(location=(0,0,0))
bpy.ops.object.material_slot_add()
mat = bpy.data.materials.get(mat_name)
ob = bpy.context.active_object
ob.data.materials[0] = mat


Animating orthographic scale on a camera, can't select the action in the action editor

Aha, figured it out - you can't open it in the Action Editor since it's not an object level action, but you can bring it up in the dopesheet for editing by selecting it in the NLA Editor and hitting Edit->Start Tweaking Strip Actions


Blender animation file turn into "Textedit" file and never came out as a video

I had this problem myself. You need to have File Extensions checked under Render: Output tab and then it will be saved in the correct file format - PNG in my case.


How do I import a Camera from an external .blend file?

You should append the camera from the "Object" Data-Block, not the "Camera" Data-Block.

Shift+F1 to append, select the .blend file and go to the Object Data-Block and select the camera. Then hit "Append from Library".

Update

When you append from the "Camera" Data-Block, you are appending the Camera's settings, not the Camera object itself.

But when you append from the "Object" Data-Block, you'll be appending the camera itself (the object), including it's settings.


The donut's displacement was poking through the icing. The solution is to either decrease the Displacement Scale or increase the icing's Solidify modifier Thickness.


Drag and drop, do you mean you drag and drop a picture from your file explorer to Blender's viewport? If I remember correctly it doesn't crate a mesh plane but an image empty, which can't be rendered.
If you want to import images as planes, use the addon conveniently named "import images as planes". It is shiped with Blender, you just need to enable it in the preferences. Then use the penu File → Import → Images as planes. When navigating in Blender's file explorer, you can open the sidebar and play with the import options, like the shader used for import, as you wish.


Go to the Cloth Cache settings and put a negative value into the start field. So animation will begin before timeline starts. Then press "Bake".


you are using incorrect key , the key is the name of the movie clip

#load new movie clip
bpy.data.movieclips.load(clip_path)
#get the new movie clip
movie_clip = bpy.data.movieclips.get(clip_name)
#assign movie clip to the node
bpy.context.scene.node_tree.nodes['Movie Clip'].clip = movie_clip


How to have multiple unwraps for respective textures on one object?

To use different UV Maps on one mesh you can simply do the following (suppose you already have a first map):

Go to the Object Data Properties (the green triangle) and under UV Maps hit the Plus symbol.
A new UV Map is created, usually named "UVMap.001" if the first one isn't renamed from "UVMap". In the UV Editor window you won't see a change, because the new UV map will automatically inherit the data from the first map.
However, in the UV Editor window you can now change the UVs to whatever you need them to be rotated, scaled etc.
In the Shader Editor you can add the different UV maps for example by adding Input > UV Map nodes and plug them into the Vector inputs of image textures etc. or maybe choose them in other nodes if they have UV options etc.


Check your visibility options on each mesh supposed to be rendered. The render visibility toggle is hidden by default in the outliner, find it in the Filters:

For the main mesh, t looks like you unchecked the "Show Emitter" option in the render panel of your hair settings.

If neither of these is the issue, maybe check your materials.


The colors of the layers of my first 2D animation are wrong for some reason

Found the solution with the help of "Mingfen Wang",that's "Just click the 'Diffuse BSDF' item, and select 'IAP_SHADELESS' shade, then render".


Unable to change animation interpolation or extrapolation

You are not supposed to be changing Extrapolation mode, that is used for "extending" or repeating an animation after the last keyframe, as far as I know.

You are supposed to change the handle types, instead.

Select all your keyframes with A and then press V Set Keyframe Handle Type > Vector


Override final pixel color in a Cycles/OSL shader?

I do believe that RSL scripts might have more control over the final colour than OSL scripts do. From the OSL specification --

  A closure is an expression or function call that will be stored, along with necessary contextual information, to be evaluated at a later time.

What this means is the green node sockets that connect to the Material Output provide the render engine with a way to calculate the final colour not the specific colour to use in the final image. The steps of mixing reflections and lighting is performed by the renderer not by the OSL script.

For interest the first example that gandalf3 pointed you to can be achieved in OSL with --

shader flatcolour(color Colour = 0.8,
    float Strength = 1.0,
    output closure color BSDF = 0 )
{
    if(raytype("camera"))
        BSDF = (Strength * Colour) * emission();
    else
        BSDF = transparent();
}


Converting bottle threads from diagram to a 3D model

Such a nice diagram almost calls for the Simple Deform Modifier :)

Model the thread as in the diagram
Add a Simple Deform Modifier > Bend
Choose an axis and set angle to 360°


Apparently Blender Found it hard to render with small number of pixels (100 * 100) with 100%, but worked OK if 1000px * 1000px with 20%, which was satisfactory for me as well. The Error message 'Error writing frame' could have been a bit more descriptive.


How to toggle the transparency view on edge selected mode in Blender 2.80?

You may use toggle x-ray option:

Available both in wire-frame and solid view with option:


IKBone rotates and inverts trying to follow pole when spine is rotated

Answered: I had "Inherit Rotation" turned off as the tutorial I followed said.
I just turned on again and now works as expected:


Is there a way to render an object invisible but still have it block view?

Use the holdout shader. Just be wary it will also not render anything else covered by the shaded object. It will not even render world texture.

EDIT: [

This is in cycles, BTW
You find this by going to the material tab, go to surface, click "use nodes". The default shader is Diffuse BSDF, but you can change it using this menu. Use mix shaders in the node editor if you want to mix it with something. "With a Holdout shader, you're basically saying, 'there's nothing here, not even background." When Cycles renders a material with a Holdout shader, it makes that section of rendered image completely transparent, with an alpha of zero. This can be useful in compositing, as the effect can give you a 3D mask" - Blender for Dummies I threw together a quick sample render with very high contrast colors, just to show what I mean. Be careful though, as you can see the mesh with the holdout shader does still cast a shadow.


In part you answered your own question. Solidify gets confused, when at the end the vertices overlap. I don't know how you animated your mesh, but instead of animating all the way to the point, where vertices overlap, stop a very little bit right before that point, like 0.00001 units away.


You cannot use a bmesh element as a base type

Unfortunately as possible with many blender types, it is not possible to  use bmesh elements as base types to extend the class in a "traditional way".

>>> class Foo(bmesh.types.BMEdge):
...     pass
...
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
TypeError: type 'BMEdge' is not an acceptable base type


I saw that tutorial too a week or two ago. I think he even said in the Video that the smooth brush alone does not generate new topology with dyntopo. You would have to slightly go over it with a a different brush to create topology that you can smooth afterwards.


Let me propose another solution.
This will get you the christmas tree shape.

It's not perfect, but it's fast.

1) Create a spring using the Screw modifier.
2) Add a SimpleDeform modifier, set mode to Taper,  set axis to Z
3) Adjust the Deform Factor to change the diameter of the spring.


I used two sets of lines in the example above, and for sorting work only one is needed. If there are more than one set, then the first is superimposed on the second, and so on.

So I changed colors with a modifier (I previously created two groups of objects and each created its own set of lines) and the sorting, finally, started to work as expected :)


Blenderkit addon - Error while trying to enable the addon in Blender 2.9

For all who might have the same problem, I found a solution thanks to the addon developers, I guess there was a conflict between several downloaded versions of blender, so to fix the issue, I went to the following path
C:\Users[Your Username]\AppData\Roaming\Blender foundation
I deleted the blender foundation folder and restarted blender and now I was able to enable the addon again
make sure to show hidden files in order to see App Data folder.


Why is the bone moving the wrong part of the mesh?

It looks like you've accidentally weighted the wrong vertices. Select the mesh, enter edit mode, and select those vertices. Then, click the Object Data Properties tab in the properties panel.  Find Bone.004 in the Vertex Groups area, click it, then click the Remove button. Exit edit mode, and it should be fine.


'Adjust Last Operation' panel closes when trying to change values

Problem Solved. For whatever reason, the Global Undo checkbox was not ticked (in Preferences > System). Once this had been set the panel started working again.


Adding geometry detail from textures to a low-poly model for 3D printing

The supplied textures aren't displacement maps, just color maps.
So any results will be... well... suboptimal :).
The miniature was definitely modeled manually.
Displacement using the provided textures - vs - original model with no displacement


This shouldn't affect anything if you're clicking directly on buttons but you can use CtrlAltU to bring up your user preferences or press Space and search for it there. Next go to the Input tab and look for a button next to Window marked Restore (Blender remembers what changes you make and offers a handy way to reset only that section without messing up any other keybindings you remapped). From there you can use to set it back to the default value of whatever config preset you are using.

If you have nothing to lose you can also bring up the space menu and type load factory settings then save that as your new startup settings.


No, there is no quick and easy way to fix imported CAD models that have messy and triangulated geometry.
You can try to make it better, but in most cases geometry made in CAD applications is messy to start with and triangulated on top of that. Even though you can see some suggested solutions working on really basic geometry, most of the time models you really need tend to differ a lot from a triangulated cube. Messy geometry typically coming from CAD or solid modelling software packages is usually a lot more difficult to work with when you need to make bevels on it, select and edit parts of it, mark seems, or UV unwrap the models since you cannot use any of the modeling or selection tools related to geometry loops or rings and the topology density is unevenly distributed. It is very easy to get lost in it while trying to fix it and spend way more time working on it than you would if you chose to remodel it from scratch and to end up not only with more time wasted but with a lot lower quality result as well. It is really worth considering to just use this kind of geometry as reference for remodelling it all.
In addition to that, you might come across some automatic retopology solutions out there like for example zRemesher in ZBrush or Quad Remesher and while these seem to be and in a lot of ways are really amazing and miraculous tools, and can indeed be a great help and save many hours of work, they are still unable to solve a lot of cases, so remodeling by hand unfortunately is still very often the only solution.


That is a security feature, click the "Reload Trusted" button right to the error message. To permanently allow script execution  change the user pereferences accessible from the file menu:

Auto-run scripts security options


Is it possible to change viewport draw mode when navigating?

Switch shading mode while navigating the 3D View

import bpy

class VIEW3D_OT_View_box_orbit(bpy.types.Operator):
    """Switch shading mode while navigating the 3D View"""
    bl_idname = "view3d.navigate_shade_switch"
    bl_label = "Navigating Toggled Shading"

    nav_mode = bpy.props.EnumProperty(name = "Navigation", items=[
        ("rotate", "Rotate", "Rotate the view"),
        ("move", "Move", "Move the view"),
        ("zoom", "Zoom", "Zoom in/out in the view"),
        ("dolly", "Dolly", "Dolly in/out in the view"),
        ("fly", "Fly", "Interactively fly around the scene"),
    ])
    shade_mode = bpy.props.EnumProperty(name = "Shading", items=[
        ("BOUNDBOX", "Bounding Box", "Display the object's local bounding boxes only", "BBOX", 1),
        ("WIREFRAME", "Wireframe", "Display the object as wire edges", "WIRE", 2),
        ("SOLID", "Solid", "Display the object solid, lit with default OpenGL lights", "SOLID", 3),
        ("TEXTURED", "Textured", "Display the object solid, with a texture", "POTATO", 4),
        ("MATERIAL", "Material", "Display objects solid, with GLSL material", "MATERIAL", 5),
        ("RENDERED", "Rendered", "Display render preview", "SMOOTH", 6),
    ])

    def modal(self, context, event):
        if not hasattr(self, "navigating"):
            self.navigating = True
            getattr(bpy.ops.view3d, self.nav_mode)("INVOKE_DEFAULT")
            return {"RUNNING_MODAL"}
        elif event.type == "TIMER":
            return {"RUNNING_MODAL"}
        context.space_data.viewport_shade = self.shading
        return {"FINISHED"}

    def invoke(self, context, event):
        v3d = context.space_data
        if v3d.type == "VIEW_3D":
            self.shading = v3d.viewport_shade
            try:
                v3d.viewport_shade = self.shade_mode
            except TypeError:
                pass # Shading mode not supported.
            context.window_manager.modal_handler_add(self)
            return {"RUNNING_MODAL"}
        return {"CANCELLED"}

bpy.utils.register_class(VIEW3D_OT_View_box_orbit)


How do I get precise foot placement in animated walk motion?

In short, use the Floor constraint. I'll come up with an elaborate answer when I find time. Don't get confused by the name. The constraint can also be used for walls.


Is it possible to bevel vertices in a plane?

You can bevel vertices using Ctrl+Shift+B shortcut. Dragging the mouse will change bevel depth, and scrolling middle mouse button will change the amount of segments.


Video editing workflow - VSE and compositor slows down framerate when previewing?

Don't use overs; there is no cache in the VSE
Don't use heavy codecs. Try AVI-JPEGs or the like.
Use precisely the resolution of the input; don't set the resolution percentage via the render resolution or you will force resampling per frame.


Why can't I edit image for UV Map after joining Objects?

UV unwrap the mesh and select the texture you want it to be mapped to

Split the screen, turn it into the UV Image Editor.

Go back to the 3D view editor, select all the faces in Edit mode by pressingA

And back in the UV Image Edit header, you can select the image you will use as the texture.

Here is a tutorial

To texture paint it, you need to apply the texture. This is example is in Blender render, are you using cycles?


Sunbeams! But without blurring of the rest of the scene?

Light rays coming into dark (church window) always will look better, than open foggy environment for this sun-beams.

If you want to avoid volumetrics in back part of the scene, make volumetric Cube smaller or use some texture for Density node to keep Volume Scatter in specific part of your scene.

Separate XYZ node is used instead of Mapping node just because it is still difficult for me to use it for orientation simple Gradient texture in one of main axis.

You can also render separately Volume Pass, add some contrast and composite it.


How can I check face selection in edit mode

Polygons can be accessed in Python from the object data. So we start at bpy.context.object.data.polygons to retrieve the polygons of the active object. Note that I assume the object is in Edit Mode. This yields a list of polygons, which then can be checked for selection by accessing the select attribute.

To check the first polygon in the mesh for selection state, use:

bpy.context.object.data.polygons[0].select
# this returns True if the first polygon is selected,
# or False in case it is not

To get the selection state for all mesh polygons, you can use list accumulation:

print([x.select for x in bpy.context.object.data.polygons])
# for the Default Cube, this should yield:
# [True, True, True, True, True, True]
# IF all faces are selected. Play with selection to see the change,
# but remember to tab in and out of Edit Mode to make Blender aware of the
# selection change before running the code again

Now, if you just want to know if there is at least one polygon selected, you can query if True is in that list:

print(True in [x.select for x in bpy.context.object.data.polygons])
# this prints True if at least one polygon is selected

An IF-statement now could be:

if True in [x.select for x in bpy.context.object.data.polygons]:
    print('Faces are Selected')
else:
    print('No Faces Selected')


Deform a flat shape while retaining the original mesh

Yes, this is possible:

For manual control:

Rigging (use bones to bend and fold the shape)
Shape key (manually make some edits - while keeping the base shape) - the shapes can be mixed together and their influences animated.
Check on other deform modifiers too, shrink-wrap. lattice... all of them really, could come in handy for deforming a flat shape.

For effects:

Wave modifier
Warp modifier
Displace (consider using texture to displace, it can be animated too).
Physics: (also worth looking into)

Soft body
Cloth

Note, vertex groups can be used to influence many of the distortion methods described above.

This question is quite general (thats OK), but means my answer is generalized too.


How do I select an object in the 3D viewport?

That circle/crosshair is the 3D cursor.
To select you need to Right click instead of Left click.
You can change this behavior in File > User Preferences (CtrlAltU) > Input:

Open the User Preferences:

Go to the Input tab. The select left/right options are under Mouse:

If you want to save these settings as the default for the next time you open blender, click  Save User Settings in the Header (at the bottom of the window):

This is one of the most controversial parts of blenders UI.
For some further information you might want to check out:

"Fixing Blender – Part 1: Why It’s Broken" by Andrew Price

This video by Sebastian König explaining some advantages to using RMB to select

"Fixing Blender – Part 2" by Andrew Price

This 3 hour discussion about Blender's interface

"New Blender UI Proposal" by Andrew Price

The manual on object selection


What is this mode and how do i get out of it?

I assume you're talking about Rendered View. Just click the button I marked in the screenshot.
Here is some more information on what these four buttons do.

I hope this helps.


Seeing invisible objects in the dope sheet

The little ghost button at the bottom of the dope sheet enables/disables showing invisible objects.


Mirror UV

Once you unwrapped the geoemetry, I would duplicate the uvmap with the "+" button on the right and then flip the UV islands on the other side of the texture. This way you just have to pick the right coordinate (in cyles for example the UV node as shown below) for two istances of the same texture and mix them with backfacing factor.

Reynante Martinez wrote an article about Double-Sided Texturing in Cycles, you can read it at: http://www.reynantemartinez.com/double-sided-texturing-in-cycles.html.

You can also take advantage of the Vector Mapping node to automatically flip your UV so you'll even not need to duplicate your UV map.


How to distort (in this case) letters, patterns etc underneath a water drop?

It's as simple as you wrote about it. Create a drop of fluid and place it on your textured mesh or just mesh with modeled pattern.

You can create drop of fluid with box modeling, sculpting, fluid simulation or even soft body. It's completely up to you.

Scene setup:

Nothing more than a plane and fluid drop - in this case sculpted with mouse from a sphere.

Node setup:

Even simpler - Principled shader with Transmission set to 1, IOR: 1.33 and Roughness: 0.


Why does this happen when using subdivision modifier?

This can have multiple reasons, mean crease has this effect but it's not purple on the edge so I exclude it. "doubles" is another possibility, the most likely one. Doubles is what we blenderers refer to when multiple vertices or points are on the same location.
This can be caused by loop cuts that you have placed on other places and not noticed how it went around there too or when you extruded, but then rigth clicked it and forgot about it.

Luckily there is an easy fix for that.

It seems like you are using blender 2.8. I am not sure how your settings are but if you press space bar you can search for "merge by distance" in older blender versions this was known as "remove doubles". It will, what the name suggests, merge vertecies by their distance to each other. But if you do so make sure you don't accedentally get unwanted triangles, which can happen when it was a loop cut that went around the without you noticing.


Using a custom property in if statements in the BGE

You debugged part of your problem in your code. You mixed blender's api (bpy), in with the game engine's (bge).

The line unit = bpy.data.objects["player"]["unit"] will do nothing in the game.
You already defined the scene in your script, so that line with bpy needs to be:

unit = scene.objects["player"]["unit"]

That line is accessing the game property "unit" on the object named "player".

Your last if statement is not correct. You need something in the if statement's bodies, even just pass will work.


Most likely you need to enable the sequencer in the post processing settings (found in the render context of the properties window).


Is there a way to show distribution of UVs as a heat map?

Yes there is an option to display UV distortion.
In the UV/Image Editor while in edit mode hit N button to display properties panel and in Display section enable Stretch.

Select Angle to display angular distortion, or Area to display area difference between the UVs and the 3D faces.


How to get the effects to follow the object's animation?

I made a similar animation of a missile firing, and was struck with the same problem of moving the domain along with the particle effects emitter. I simply gave the domain the same path to follow as the missile. Remember that the larger your domain is, the larger the effects will be. If you keep the domain moving with the human by animating it to move with the human, you should have it fixed.


How to model a globe with an elevated honeycomb pattern?

My idea is to parent the hexagon to an icsophere and to enable the face duplication of the icosphere : the hexagon will be copied on each faces of the icosphere. Then, you just have to delete all faces which are in the ocean. You will need a second icosphere to modelize oceans.

create a new project and delete the cube object
Add a first icosphere (S + A and select Icosphere) to modelize continents
in the tool property panel, change Subdivision to 5
Duplicate the icosphere object (to modelize oceans)
create a cylinder (press Shift) + A and select "Cylinder")
in the tool property panel, change Vertices to 6 (to have an hexagon)
change the Radius to 0.02
change the Depth to O.05
Change the Cap fill type to nothing
Add a Solidify modifier and click the Apply button
select the hexagon and then the first icosphere, press CTRL + P and click Set parent to Object
select the first icosphere
in the object panel, press the Faces button in the Duplication pane
edit the first sphere and delete faces which are in the ocean


There is probably nothing wrong with your Border Select key definitions, its probably the Select/Activate operator that is resetting your selection.

Try change it to either to a Mouse Release event or to Extend Selection by default, so there's no conflict and starting a border select won't unintentionally trigger the colliding operator.


Smooth modifier cause gap/hole in landscape mesh

Solution:

Select mesh
Go into Edit Mode
Ctrl + TAB and select Vertex mode
Select all vertices by pressing A
Press W and select Remove doubles
In the options panel, set a number greater than 0


Low-Quality Wireframe material on Cycles for Preview Purposes?

You can easily use the Wireframe modifier to do something like this. You will want to untick the Replace Original checkbox. You will have about as low-res of an effect as you can get. One other important thing is Subdivision modifiers do affect it, so you may need to move the Wireframe modifier up or down the modifier stack, and you may also need to enable Crease Edges to keep the wireframe from deforming.

Sadly the Wireframe node in the material editor does not follow the mesh edges, but the triangulated mesh (quads are treated as two triangles, etc.)


Your mesh has very tight corners for limited Beveling.

Some suggestions that could help

Change the Outer Mitter type to arc/patch. Creates ugly n-gons, but sometimes helps.
Apply bevel to all edges. You're currently beveling only some, which results in tight geometry.
Use Subdivision modifier with low unlimited bevel. Clean geometry but higher polycount.

Just to illustrate


You would have to render a Freestyle pass with the Line Set Silhouette selected on the left and Crease selected on the right, and change to Logical AND on the right.

This would trace a border stroke around the visible perimeter of the object, like tracing the alpha edge.

You'd have to composite this over your OpenGL render, as you can't generate Freestyle render passes when doing OpenGL renders.

In order to make it easier to composite over your OpenGL renders, it would be helpful to make the background and cube the same colour (let's pick pure white), and then make the stroke a black colour. To do this uncheck Transparent in the Film panel of the Render settings section. Make the world a solid white colour and the cube an emission shader with 100% white. Then make the stroke colour in Freestyle a 100% black.


Noisy pixelated lightbulb filament emitter

I love mesh lights so I use Branched Path Tracing & the Light Paths settings to get rid of fireflies and noise.

I get good results in most situations by, in the Sampling Panel, choosing Branched Path Tracing and setting Clamp Indirect to something between 0.1 and 0.5 and setting the Mesh Light Samples to 3ish.

In the Light Paths Tab, I set Max Bounces, Diffues, Glossy, and Transmission to 2. Lastly, you can check Denoising in the Layers tab to clean up any remaining noise. I just leave the defaults.

Attached pic has at least 7 mesh lights and used only 250 samples.(So you can still see some denoising artifacts, but for super low samples, not bad.)


Setting GPU rendering: CVMCompiler has now run for 5 hours

5 Hours loading kernel doesn't sound right, that should be the first indication that something is wrong.

Anyway your graphics card is too old and unsupported.

As stated in the Official Blender Manual only cards with GCN (Graphics Core Next) 2.0 or above are supported.
That means Radeon HD 7790 and above, as stated in the linked Wikpedia article

The AMD 6750 is no longer supported. Also 1Gb of memory is very low for today's standards and you probably wouldn't get any benefit from GPU rendering anyway


There is no CLI option to choose which application templates is open at startup, you need to use python to tell blender to open one of the templates.

You need to call the bpy.ops.wm.read_homefile() operator, using --python-expr in the CLI arguments should be enough -

blender --python-expr "import bpy; bpy.ops.wm.read_homefile(app_template='usertemplate')"


after clicking on add paint slot, Blender still reports missing texture slots

It is not possible to paint on a node based material in Blender Render. You can paint on a material in Cycles as nodes as long as you have set up an image node and texture image to paint to - and the best interaction there is in Material Draw mode so that you can see the layers of image textures together.


From what I have observed, when motion blur is enabled and Cycles is the renderer, Blender steps back a frame to compute the motion difference between the frame being rendered and the frame that came before - you can see this happening in the info line at the top of the UV/Image Editor when rendering is underway - so long as you leave all settings unchanged Blender should deliver consistent motion blur over whatever frame range you set - alternatively you can add a one-frame "head" and "tail" to your frame range to make sure you definitely get all frames properly rendered across the breaks in your sequence


I would suggest not to use bpy.ops and instead access the selection directly.

# assume you the active object is the parent
for obj in bpy.context.object.children:
    if obj.type != 'EMPTY':
        obj.select = True

This is a little more clever, you can do it recursively (to select children's children).

def select_children_recursive(obj_parent):
    for obj in obj_parent.children:
        select_children_recursive(obj)
        if obj.type != 'EMPTY':
            obj.select = True
# call the function
select_children_recursive(bpy.context.object)

Similar to above but caller can define types not to select

def select_children_recursive(obj_parent, type_mask):
    for obj in obj_parent.children:
        select_children_recursive(obj)
        if obj.type not in type_mask:
            obj.select = True
# call the function
select_children_recursive(bpy.context.object, {'EMPTY', 'LAMP'})


Best way to attach objects/armor to cloth

You can create an empty and parent it to the cloth mesh using the "3 vertex" option, so that the empty will follow the average position of three selected vertices of the cloth mesh. Then you can add an armature and set a copy location constraint to the armor bone, pointing at the empty.


Which Mac setup would be any good for blender?

A Mac might not be an ideal choice to work with Blender at the moment. The hardware configurations are limiting (GPUs available with Macs are far from optimal for rendering), price/value ratio tends to be very much not to your advantage as well when we start looking at the specs that would be better suited for rendering and similar alternatives. OpenGL technology that Blender relies on entirely was recently deprecated in the OS as well making it a questionable choice for any developers thinking about the future of Blender so the support for the platform might not be as good and might not be improving any time soon. You should carefully consider if it is in your best interest to choose a Mac at all if you need it primarily for 3d work and especially if you are planning to use mostly Blender.


Can I have a unique UV map for each frame?

UV maps are not animateable by default in Blender. However, there is an addon that can give you this functionality, it's called AnimAll.

Once you install this addon, you will have a toolbar in the Animation toolbar in the 3d Viewport on the left. This will allow you to insert UV keyframes and alter the UV Map to achieve the per-frame warping you require.


How to apply shortcut to "Show whole scene transparent" ?

Was looking for the same and just found it.

In Blender 2.8 it is called Toggle X-Ray and the default shortcut is Alt+Z.


Add a round-half spherical edge to a cylinder surface

Select the area where you want to add the semisphere (the same selected vertices in your picture).
Move the 3D cursor to the center of the selection.
Move the camera so that you're looking at the area from the side.
Select the left-most vertex of the previously selected area.
Use the spin tool to generate an 90 degree arc. You should get something like this:

Move the camera to the top of the cylinder.
With the vertices of the arc selected, use the spin tool again, now rotating 360 degrees and using as many steps as the number of vertices on the face of the cylinder. The result should look like this:

Select everything, and use "remove doubles".


How to add a texture color specificed "glow" to a HUD panel?

Figured it out

Just had to plug the texture directly into emissive color instead of trying to use the output from the principle BSDF into emissive color. This works! Problem solved.


Animating transparency of an object with an alpha channel applied

Two images above are a black transparent texture named Texture.003. Not the Show.

In the materials texture panel create a blend texture with Colors Ramp Selected True.  Solid black 100% transparent on both ends of color ramp.

Select Influence Alpha.  Alpha of 0 is 100% transparent as you know.  We are affecting the final value with our new alpha target value at 0.0 .  If we [were] targeting with a new alpha value of 1.0 we would have an opposite affect.  This is mentioned to keep the influence idea separate from the actual alpha value of the texture pixel alpha.

Create animated value from 0.0 to 1.0 on the appropriate keyframes with alpha. Blend Type Multiply.  The yellow numeric background indicates a value with a keyframe.

Image above. Shows texture in first slot which has transparent pixels.  The sphere was only to avoid a solid black background.


Blender 2.8 VSE "No Items available" when adding the scene to the sequencer

You can't add a scene strip referring to the same scene as you're currently in. So make a new scene/or a copy and this one you'll be able to add.