Is boolean a reliable way of intersecting 3d printed objects?

CAD geek here.
You will need atleast some kind of margin between the two surfaces, or you will have a fit that is too tight, and while you can push it in probably, there is a chance (depending on printing filament) your piece will start to crack at the surface joint.
For as to how much margin to use, look up the minimum tolerance of your 3D printer, and use that as a rule of thumb.
If I can give you another tip, I would suggest to remake your joint with primitive shapes, this will make it much stronger, it will be easier to adjust your margin, make positioning easier, and keep it in place much better.
Example made in 2 mins with Booleans below :


How can I get vertex painted .obj files to import into Blender?

june 2015:

Vertex Colors are not part of the .obj file type specification - see section on Geometric Vertex.

However some programs use an unofficial extended format for inter-change and add r,g,b information on the same line as the vertex coordinates.

# standard format (v: x y z)
v 1.0 1.2 0.3

# extended format (v: x y z r g b)
v 1.0 1.2 0.3 0.5 0.2 0.2

Blender's .obj importer ignores everything after the x y z, therefore at this moment vertex colors are not parsed in any form.

If there was a color map (vertex colours) associated with the mesh, you'd  see it listed in

menu: Properties -> tab: Data -> subheading: Vertex Colors

If there's nothing there then there's nothing to show.


Why Does My Object Not Show in Rendered Shading Mode?

I presume you have some render layers set up. The option to to preview the active render layer in the 3D view header has been enabled:

This will mean that if an object isn't assigned to this render layer the object will not appear in the rendered view. Disable this button to view all objects in the rendered view regardless of their render layer.


Why isn't VSE dropping frames and giving me a correct frame rate?

Make sure you have your render dimensions are the same as images dimensions in your sequence.
Also it seems like FFmpeg used in 2.78b and newer gives much worse performance then an older one in 2.78a and previous releases.
I have tested it with videos only so I am not sure it will make any change with image sequence. But you can give it a try.


Animation Nodes - Why Time info Node does not update Frames?

You need to assign scene for the Node Tree. The option can be found in N-panel of Animation Nodes window.
For Blender 2.8+

for older versions of Blender.

Just click on drop down menu and select the scene which you are currently working on.


blender 2.8 - objects are scaling weirdly

You must have enabled the Only Origins option, which allows to move the objects apart from each others.


Revert mouse pointer/cursor back to default after a modal operation

In the good old tradition I'll answer my own question. :)

Updated (fixed issues explained in my other question)!

The solution is to use a modal operator invoked before invoking the built-in operator.

I'm not an expert in this, but what appears to be happening is that the operators are invoked "on top of each other" so the user first deals with the last one invoked - and the first one (here my.cursorsetdefaultmodal) finishes after the second one (here transform.translate) finishes.

To make this work without hiccups in all cases, however, the modal operator must use a timer to, apparently, allow enough time for Blender to process all mouse events properly. Without the timer it will work only when invoked from a property update function, not from an operator (see why in that other question).

The bonus is that this also works for long Blender's "internal" operations (those "running in background" but still blocking Blender UI, like setting a modifier's show_viewport option to True) even though they are not really modal.
I found out that Blender will run modal() at most once before it starts working on the long internal operation - and it will continue running modal() again after the long operation has finished.

Example code:

import bpy
from bpy.types import Operator, Panel

class CursorSetDefaultModal(Operator):
    bl_idname = "my.cursorsetdefaultmodal"
    bl_label = "CursorSetDefaultModal Operator"

    timer = None

    def invoke(self, context, event):
        self.timer = context.window_manager.event_timer_add(0.1, context.window)
        context.window_manager.modal_handler_add(self)
        return {'RUNNING_MODAL'}

    def modal(self, context, event):
        if event.type == 'TIMER':
            context.window_manager.event_timer_remove(self.timer)
            context.window.cursor_set("DEFAULT")
            return {'FINISHED'}
        return {'PASS_THROUGH'}

class MyOperator(Operator):
    """This is my operator"""
    bl_idname = "my.operator"
    bl_label = "My Operator"

    def execute(self, context):
        context.window.cursor_set("WAIT")
        bpy.ops.my.cursorsetdefaultmodal('INVOKE_DEFAULT')
        bpy.ops.transform.translate('INVOKE_DEFAULT')
        return {'FINISHED'}

class MyTestPanel(Panel):
    bl_idname = "mytestpanel"
    bl_category = "My Stuff"
    bl_label = "My Test Panel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    bl_context = "objectmode"

    def draw(self, context):
        layout = self.layout
        col = layout.column(align=True)
        col.label(text="My operator:")
        col.operator("my.operator", text="Run my operator")

def register():
    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()


How to get rid of corners rounding on blender?

The shape has a subdivision surface modifier.
A possible way to obtain sharp corners is to change the way this modifier uses the edges with "edge crease", ShiftE.

Go in edge select mode
Select the surrounding edges
And use edge crease


Your issue is with the render settings. By default, Eevee does not calculate Screen Space Reflections, effectively disabling translucent/transparent materials.

You have two options, change to the Cycles render engine, or stick with Eevee and enable Screen Space Reflections and Refraction


As per the comments, I eventually went with the approach of using multiple cameras.
Basically this consists of:

Have more than one camera object in the file.
Add "markers" to the dope sheet on a specific frame number.
Select the marker you want, select the camera you want, and find the hidden menu item to "bind" one to the other.

Now the render output does a hard-cut from one camera to the other when that specific frame is reached.
Unfortunately, binding a camera to a marker deletes the label on the marker, so it's now useless for... you know... marking anything. But hey, it generates the right output frames...


The problem is that you have one long edge connecting the upper and lower vertices, as well as several shorter edges in the same place.

Select the long one, and remove it, and the problem will go away.

To select it, you may have to click several times, to alternate between the long one and one of the shorter ones. Once the long one is selected, remove it by pressing X followed by E.


What are these bluish/greenish edges in edit mode?

You marked those edges as being sharp, possibly by accident.

It happens when you select an edge or edgeloop and press Ctrl + E > Mark Sharp

To remove it select the edge or edgeloop in question and press Ctrl + E > Clear Sharp


Opposing Wind Forces
Create two equal Wind force fields like in the image below.

Set the Strength of both fields to a high value and make sure that there is some falloff.

As long as these two forces are equal and parented to a plane (or any object), all particles should stay pretty close to the plane between the two force fields.


How to select the other vertices/edges after rip/rip fill

Just place the mouse on the wanted side :


How to do "filter select" in an existing selection?

Use the Outliner area to filter by type:

Change the Outliner's display type to Same Types, to filter by type similar to last selected object,
Press A to highlight all items, or LMB on empty part of a line to highlight individual item.
Press RMB on the Outliner, then click Select to select all highlighted items. You can also directly select/deselect an item by clicking LMB or Shift-LMB on its icon.

Use the Outliner's live search feature to filter by name. Even though a little trickier because it also matches object data, vertex groups, etc., selection using it can still be made easier if combined with some Outliner display types like Visible Layers, Selected, or Same Types.

Use the Outliner's Selected display type to prune existing selections.

Maybe those solutions aren't quite what you're looking for, but it's easy enough to try and still very useful to manage complex scenes.


Right click on your material,go to texture and check the empty boxes.Hope it help.


I have a particle system set to render as collection, only rendering one object

I hid some of the base/reference objects from render so they wouldn't show up in the scene and it seems that was causing issue. I thought it didn't apply to the instances in the particle system. I also had a few other things that were set up slightly oddly I had to redo but I think I'm good now!


How can I stops background freestyle lines from showing through thin foreground objects when near in zdepth?

The reported problem sounds like another case of a known issue documented in the following page:
https://developer.blender.org/T36350

If that is the case, subdivide big faces of the outer object into smaller faces and see if the visual artifacts are resolved.


How to stop Blender from simulating smoke when doing some things

Bake the simulation to a cache, then blender doesn't need to recalculate the simulation.

In order to bake the cache, you must save your blend file first, otherwise the buttons will be greyed out.

Read more in the blender manual section on baking smoke.

You won't need to hide the domain after you do this, unless of course you don't want to see it.


How to select a specific vertex in UV unwrapping?

Just after I posted this question, I found the answer myself.

I had this Button enabled

"Keep UV and edit mode mesh in sync"


Quick way to remove thousands of materials from an object?

This method takes time under one second if you have 20k materials object.
Select first your multimaterial object then object which has one material.
Click in material panel black arrow > "Copy material to Others".


How to render alpha channel and depth map quickly without having to re-render the whole animation?

You can try to denoise any image or image sequence with the compositor, without denoising data. The result will obviously not be as great as if it was using denoising data, but you won't have to re-render everything.


Increasing the samples amount helps enormously in your scene.
Also, you are mixing up the terms a bit. Fireflies are those white pixels that wont go away even when rendering with a lot of samples.
What you are experiencing is just called noise.

Result with 1000 samples:


Beginning with a box primitive, I used vertex extrusions, then boolean modifiers to attach the claw to the arm (which will then be attached to the body).

Then I was able to sculpt this using smooth, crease, and clay strips brushes.


I assume you're going to be using NLAs.

Since I've been unable to find a good explanation of blender's NLAs, I've decided to write a bad one and hope that feedback lets me improve it over time:

https://docs.google.com/document/d/1WrrdFpZ-VC7taxu4iD3hZIowYvyM953iZpBwkZ78PgA

I will include a (soon-to-be-outdated) copy of the "splitting actions" section here:

  This is probably the most difficult of the workflows.  When you are
  starting out with NLAs and haven't become comfortable creating small
  reusable chunks you will often realize "I wish I had split this up
  before now."

  The essence of splitting is to create a copy and delete part from
  each.  Let's refer to those two parts as A and B.

  Imagine your action is currently the primary action.  Use the Dope
  Sheet/Action Editor to give it a "good" name (maybe "AplusB").  Then
  use the double-down-chevron to move it into an action strip.  Create a
  new track and create a new action strip in that new track that refers
  to the same action.   You now have two action strips referring to the
  same action datablock.  Go ahead and create a third action strip
  referring to the same action datablock as a sort of information bunker
  in case you make a mistake later on.

  Make one of the strips active and hit the Tab key to start editing it.
  Use the Dope Sheet/Action Editor to make a single-user copy of the
  action (click the [3] button).  Now give it a name that identifies
  which half of the action it will become (maybe "part B").  After that,
  you can delete all the keyframes that don't belong in the action
  (delete the A, leave the B).    Memorize the name of the new action.  Hit Tab to stop editing that action strip.  Now change the Action of the action strip  to refer to the new action.

  Make the other strip active and hit the Tab key to start editing it.
  Use the Dope Sheet/Action Editor to make another single-user copy copy
  of the datablock (click the [2] button).  You can rename it (maybe
  "part A").  You can now use the Graph Editor to remove all the B
  keyframes and leave the A keyframes.  Don't forget to point the strip at the new action.

  Before you test the animation you should discard the 3rd (information
  bunker) action strip but not before you click the [f] button to force
  blender to not garbage-collect the AplusB action.  That way you can
  still recover it later if you find problems with the animation.


How do I roll a tube on itself down the sides?

You could start with a plane and delete one side.

Then add a Subsurf modifier to make the curl smooth. Add a Cast modifier driven by an empty. Then a screw modifier to wrap the distorted edge around into a tube.


Does Blender have a method to a get PNG-formatted bytearray for an image via Python?

I got this working based on Python code from Stack Overflow here.

Here's the version of that code adapted to work inside stock Blender 2.77a:

import base64
import zlib
import struct

def img_to_png(blender_image):
    width = blender_image.size[0]
    height = blender_image.size[1]
    buf = bytearray([int(p * 255) for p in blender_image.pixels])

    # reverse the vertical line order and add null bytes at the start
    width_byte_4 = width * 4
    raw_data = b''.join(b'\x00' + buf[span:span + width_byte_4]
                        for span in range((height - 1) * width_byte_4, -1, - width_byte_4))

    def png_pack(png_tag, data):
        chunk_head = png_tag + data
        return (struct.pack("!I", len(data)) +
                chunk_head +
                struct.pack("!I", 0xFFFFFFFF & zlib.crc32(chunk_head)))

    png_bytes = b''.join([
        b'\x89PNG\r\n\x1a\n',
        png_pack(b'IHDR', struct.pack("!2I5B", width, height, 8, 6, 0, 0, 0)),
        png_pack(b'IDAT', zlib.compress(raw_data, 9)),
        png_pack(b'IEND', b'')])

    return 'data:image/png;base64,' + base64.b64encode(png_bytes).decode()

Example usage:

print(img_to_png(bpy.data.images[0]))

This will print out a PNG-format data-URI of the image, regardless of what format the image is within Blender, and without altering the user's image.  I suggest using a very small image to test with, so the test output is not overwhelming when printed to the console.


Principled python script for selected object

The following code iterates through all selected objects and their respective materials found in the material slots. If a Principled BSDF node is found in the material, the Specular and Metallic properties are set to zero and links to Alpha and Normal are removed.

Be aware that every material will be fixed that is present in the selected objects' material slots. If that includes a material that is also assigned to an unselected object, that change will affect the unselected object as well.

import bpy

def remove_links(socket: bpy.types.NodeSocket, node_tree: bpy.types.NodeTree):
    """Remove all links from or to the given socket"""
    for link in socket.links:
        node_tree.links.remove(link)

def fix_node(node: bpy.types.Node, node_tree: bpy.types.NodeTree):
    """Adjust the properties if the node is a Principled BSDF"""
    if node.type == 'BSDF_PRINCIPLED':
        node.inputs['Specular'].default_value = 0.0
        node.inputs['Metallic'].default_value = 0.0
        remove_links(node.inputs['Alpha'], node_tree)
        remove_links(node.inputs['Normal'], node_tree)

def fix_material(material: bpy.types.Material):
    """Fix the nodes of the given material"""
    for node in material.node_tree.nodes:
        fix_node(node, material.node_tree)

def fix_selected():
    """Fix the materials of the selected objects"""
    for object in bpy.context.selected_objects:
        for material_slot in object.material_slots:
            fix_material(material_slot.material)

if __name__ == "__main__":
    fix_selected()


Trying to duplicate changes across faces of a dodecahedron

You can obtain this result, using duplicate linked objects:

If you duplicate linked AltD all duplicates are sharing the same geometry.

So to do it from a dodecaedron:

The gif above was becoming to big, but you see the principle:

Add a dodecahedron, enter edit mode, select and duplicate a face then separate it P
Select this newly created face, duplicate linked AltD then rotate around the first axis (front view)
Select the two faces, again duplicate linked and rotate along a second axis
Do this until you obtain the 12 faces

Once your individual faces edit finished, you can come back to a single mesh doing the following:

Select all the dupli objects
Then in the menu, object/make single user/object and data, and validate for the selection (edit: in fact this step is not useful)
Join them CtrlJ
Enter edit mode and remove doubles


Move object along a list of objects in Animation Nodes

This can be done by dynamically changing the objects used as the starting and ending vectors of the Animate Node.

First of all, we add our objects to a group and get them using the Objects From Group Node, we can then optionally sort them in whatever way we think it fits, in this case, I sorted them by name. The time of the Animate Node should maintain its range, that is, if the objects takes one second to move between the two objects (24 frames assuming the fps is 24), then the time should maintain that range and goes back to zero as it exceeds it, this can be done using the modulo operation. All we have to do now is find the two objects that we will use for the start and end points, it is obvious that if the start object has the index i, then the end will have an index i+1, so the problem reduces to finding i. i is zero at the first 24 frames, 1 at the next 24 frames, 2 at the next 24 frames and so on, this pattern can be generated using the floor division operator. By implementing that, we get the needed animation:


Why can't I use GPU rendering in Blender?

Blender Cycles relies on GPU compute languages like CUDA or more recently OpenCL. CUDA is exclusive to Nvidia and while OpenCL is technically cross platform, in practice AMD's implementation is the only one that provides a usable speedup for Cycles.

From the Blender wiki:

https://wiki.blender.org/index.php/OpenCL

... Intel GPU’s are getting more powerful but are not a good target yet and CPU based opencl provides little or no benefit over CPU based cycles.


I think you mean the motion blur effect.

In Cycles render engine, you can first animate the propeller with a very fast rotation, and toggle Motion Blur in Render tab, then set a appropriate Shutter time:

For Blender Internal render engine, there is also a Sampled Motion Blur panel in the Render tab:

For compositing, you can enable Vector pass in Render Layers tab, and use Vector Blur node to make use of it. Example:


Is there a way to bake a model's normal map in chunks?

If you uncheck Clear Image checkbox in the Bake/Output you will be able to bake from different chunks sequently to the same image. You may want to lower the Margin distance so that the margin wont overwrite previous bakes.

Another way of dealing with this type of problems is to (copy and) move different parts together with their high-poly counterparts so they will be baked all at ones but without intersecting with each other.

Or, as previous suggested, create a cage mesh so you can control the ray length in detail.


Whenever that's happened to me it's usually because there is an outdated bake on that mesh. Delete the bake and then Bake All Dynamics.


I do not know what causes the problem, but I fixed it by restarting from scratch.  I appended just the mesh from the original blend file into a new one then I rebuilt the armatures.  The resulting exported fbx then did not suffer from the jitter problem.

Not a great answer, but I found the following which could be the reasons for not working in the first place:

Make sure scale is applied to everything before you start building the armatures.
It seems that the fbx exporter does not handle scaling in the animations well, so don't have any scaling in your animations.
The fbx exporter seems to ignore the objects' origins and uses the "world" origin instead.  To avoid any problems, set all the objects' origins to the "world" origin.

You may be able to get away with just applying these steps without having to rebuild the armature.

I have since then always followed these steps on new projects and it has worked every time.

I would like to hear from others if this works for them.


Is there a way to delete a shape with an extrusion

Use the inset tool (Keyboard shortcut: I)

Select the faces, inset, and use the inset individual option.

from there you can extrude.

To make a though cut, select faces on top and bottom, inset, delete the newly created faces, select the edges on top and bottom and use bridge edge loops to connect top and bottom. (bridge edge loops


How to move an object's origin to the center of its bounding box?

Have you tried setting the center to BOUNDS?

bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY', center='BOUNDS')


How to model the interior of a building, inside the actual building

I'm not sure what exactly you are trying to do but I think this might help:

You can "hide" the walls by selecting them and pressing "H". Then you can place your models inside the building. Also, you can make use of the "Wireframe" mode. Just press "Z".

I hope this helped. :)


You have selected Constant Detail method. Look at tooltips, it has different meaning of resolution/detal size value


This result can be achieved easily using basic operations.

Connect parts of your shape, so it only has one edge (select 4 vertices and press F and repeat)
Connect it to a circle (or your handle)
Add some ridges and move your shape upwards to taper it.

Make one outside edge and connect it to a circle (or other shape)

Extrude it to make a handle (unless you already have one)

Add some ridges and move the shape upwards, it will taper nicely.


how to have grease pencil animation have one object permanent

Like wilks suggests, the easiest route might be to add another grease pencil object for background elements. The images below show one way to do that.


Fast way to remove internal faces for multiple objects at once

Does a Ctrl + J to join the meshs is what you ask ? Otherwise I don't have an answer. Maybe you should take a look at the add-ons, I think there is one with the booleans, but I don't remember its name, but I think it isn't on Blender by default.


The Period "." in Blender number pad emulate

I'm not sure either, though I have a feeling not all keys on the numpad are emulated, just the numbers. If you filter the key map by KeyBinding/numpad then you can assign whichever functions you like (in this case probably 3D View / View Selected) to alternative keys.


How do I find the users of a datablock using the Python API?

There is no way, internally Blender also doesn't store this data for easy access.

However some data types have convenience properties added to them to access some of the users.

Object.users_scene
Object.users_group
Object.children

Are handy in many cases, but specific to object types.


Projecting a Transparent image in blender

Make sure your alpha is connected and your Blend Mode is set to something other than Opaque:


A shapekey interpolates the position of each vertex linearly.

As you can see in the exemplary illustration, positions both points halfway between the Shapes will result in a new shape, which resembles neither of the keys.

You are seeking a rigid deformation, this is best done with Armatures. Since you are only animating a single object, you can simply key its transformation by pressing I and selection LocRot (for Location and Rotation). Then translate and rotate it on the desired frame and key it again.

An object's or a bone's animation will perform a matrix transform on the vertices, which is what you want, since it will keep their relative structure unlike the morph between two shapes.

Shapekeys are best used for deformations (like mouth shapes) where the transformation is not rigid.


Cycles works with shaders.

Shaders determine how the light is transformed upon hitting a surface.

The error on your case is that you created a node in blender internal and not in cycles. You can use nodes in blender internal as well, but they are not compatible.

NOtice how the nodes are completely different in Blender Internal:

Materials are not interchangeable between the two rendering systems. You need to delete the material and make a new one within cycles.


Change the Bone Rotation (Quaternions) of an Armature in text script

Might be hard finding someone that remembers how to use python in 2.49. The 2.49 api docs are still available here.

The second example on the armature page might be what you are looking for - while the docs list Get() as a function the example uses arm_ob.getData()

scn= Scene.GetCurrent()
arm_ob= scn.objects.active
arm_data= arm_ob.getData()
bones= arm_data.bones.values()

for bone in bones:
    # use bone here


How to stack multiple objects into a shape of another one?

Final result:

Overview:

You can use Particle System for such task. In my example you can see Suzanne and Cube filled with Spheres and Cube filled with Suzannes.

Particle System setup:

First add Particle System to your object - the one that is volume/shape/emitter.

Setup it as in the picture below:

Start/End should be set to 0, so particles will be generated at one time,
Emit from Faces > Grid will assure that particles will be distributed evenly,
Resulotion - how many particles should be in the emitter,
Render > Object is an object you want to distribute,
Size is a size of this object.

Set this settings in Wireframe mode to see changes. After everything is as it should be, you can go to Modifiers tab and Convert Particle System to mesh. Then delete/hide your emitter object.

Edit:

Difference with high resolution between Emit from Faces and Volume:

Blend file:


How to use Blender Internal to UV map AND Alpha map?

I wouldn't do it that way since the pixels counts are so different between the two images BUT if you wanted to, you do have the ability to have more than one UV map - so where you normally reference the default UVMap in the Data panel of the Properties editor, you would use one map for the color image and then add a new one for unwrapping to use the alpha map.


MP4 Publishing does not have Audio in Blender v2.79.6

It seems it is working after I test it first with MP3 format. I'm using a WAV file for the video. initially it did not work. But after testing with MP3 input to MP3 output, WAV input to MP3 Output work on the mp4. so its fine now.


Marvelous designer to Zbrush to Substance painter to Blender workflow issue

I figured It out!
I noticed the UV is flipped when I compared Blender to Substance so I flipped it in Blender and manually aligned it and it's fixed now!


Element indices messed up after switching from Edit to Object Mode

No reason an edit mode bmesh cannot be used with edit ops.

  I prefer NOT to use the BMesh module, since the bpy operators suit my
  needs much better.

They are not mutually exclusive.

In answer to

  1) For every vertex in object 1a) Select this vertex (v.select = True)
  1b) Select neighbor vertices (bpy.ops.mesh.select_more()) 1c) Store
  normal angles 2) Compare normal angles within selection... etc. For
  being able to perform a bpy operator (select_more() in this case) I
  need to toggle to Edit Mode. While (as you said) for manipulating mesh
  I need to be in Object Mode. So I constantly need to toggle, right?

As a simple example, cube in edit mode each vert selected separately and default select more (one face away) called. For the cube this will result in only one vert being unselected.  Note: Select more can also be called with bpy.ops.mesh.select_more(use_face_step=False) to only select via edge connection.

import bpy
import bmesh

context = bpy.context

ob = context.edit_object
me = ob.data

bm = bmesh.from_edit_mesh(me)
print("-" * 33)
for v in bm.verts:
    bpy.ops.mesh.select_all(action='DESELECT')
    v.select_set(True)
    print("Before", v.index, [v.select for v in bm.verts])
    bpy.ops.mesh.select_more()
    print("After", v.index, [v.select for v in bm.verts])

bmesh.update_edit_mesh(me)

Produces output.

---------------------------------
Before 0 [True, False, False, False, False, False, False, False]
After 0 [True, True, True, True, True, True, False, True]
Before 1 [False, True, False, False, False, False, False, False]
After 1 [True, True, True, True, True, True, True, False]
Before 2 [False, False, True, False, False, False, False, False]
After 2 [True, True, True, True, False, True, True, True]
Before 3 [False, False, False, True, False, False, False, False]
After 3 [True, True, True, True, True, False, True, True]
Before 4 [False, False, False, False, True, False, False, False]
After 4 [True, True, False, True, True, True, True, True]
Before 5 [False, False, False, False, False, True, False, False]
After 5 [True, True, True, False, True, True, True, True]
Before 6 [False, False, False, False, False, False, True, False]
After 6 [False, True, True, True, True, True, True, True]
Before 7 [False, False, False, False, False, False, False, True]
After 7 [True, False, True, True, True, True, True, True]

Strongly recommend simply using bmesh for this kind of thing. The linked geometry of an element is readily available.

import bpy
import bmesh

context = bpy.context

ob = context.edit_object
me = ob.data

bm = bmesh.from_edit_mesh(me)
print("-" * 33)
for v in bm.verts:
    # set of all verts surounding based on linked faces
    face_neighbours = {v for f in v.link_faces
            for v in f.verts} - {v}
    # list of edge neighbours
    edge_neighbours = [e.other_vert(v) for e in v.link_edges]
    print(v.index, [v.index for v in face_neighbours])
bmesh.update_edit_mesh(me)

Producing output

---------------------------------
0 [1, 2, 3, 4, 5, 7]
1 [0, 2, 3, 4, 5, 6]
2 [0, 1, 3, 5, 6, 7]
3 [0, 1, 2, 4, 6, 7]
4 [0, 1, 3, 5, 6, 7]
5 [0, 1, 2, 4, 6, 7]
6 [1, 2, 3, 4, 5, 7]
7 [0, 2, 3, 4, 5, 6]

An example to get the angle between vert and edge connected verts' normals

[v.normal.angle(n.normal) for n in edge_neighbours]

Hopefully the examples above might move you a little towards bmesh.  Consider the first example above used on a million vertex mesh, would require two million operator calls, as would the question code.

Python performance with Blender operators

Second example requires no operators, nor does it change the selection state. Actually There is no need to update back to the mesh, or use edit mode to obtain all the info needed for this example

Note worth mentioning for this example could be done in object mode directly from mesh data. Quick python console code example, look for faces that contain the vert index.

>>> me = C.object.data
>>> v = me.vertices[0]
>>> v.index
0

>>> set(sum([list(p.vertices) for p in me.polygons if v.index in p.vertices], [])) - {v.index}
{1, 2, 3, 4, 5, 7}

as in both examples above the only vert not in any face containing vert 0 is vert 6.


Binding Removes Particle System Vertex Weight Map

I just solved my issue. There is a lock icon that allows you to lock that specific vertex group that is highlighted.


Why can't cycles cast one ray per image pixel, instead of rendering progressively to infinity?

That is exactly what happens if you set the numer of samples to 1. You can try doing that. The result you get, however, will be unsatisfying.

The problem is that every sample can only travel one path each time it hits a surface. But most surfaces allow a lot more than one reflection direction. A diffuse surface is characterized, for example, by reflecting incoming light in an almost completely random direction.

So if you sample Pixel 1, and the light hits the first surface and happens to reflect, say, towards the dark night sky, this ray will tell the renderer that it shot to ~infinity and found no light. So this pixel is black.
On the pixel next to it, the ray, due to the randomness of the reflection of the surface, will happen to be reflected to the right, towards a big lamp, and will find a lot of light traveling this ray path, so this pixel will be very bright.

If you repeat this for all pixels, the result for each pixel is very random and the image you get is very, very noisy (more so the smaller your light sources are).

So, essentially, the reason why you need to shoot several times per pixel is because you have to shoot enough times that for every pixel, most directions have been "probed" and they all give approximately the same result.

If you only render perfect mirrors with no variation in reflection direction, one sample per pixel is enough, nothing will change with the second one. This is very rare as a scene though.


How do I delete/remove/replace an image using a script?

Some options

Result  with image strips are overlapping would indicate you are  setting start and end frames incorrectly in loop. If the idea is to make an animation of all the added strips,  not sure then why the render operator is inside the loop.

If that is how you want it, will need to  remove the image strip, replace the image strip, change the image strip data,  or batch render one make at a time

Remove the image sequence  Not sure if this will work, could be dodgy removing parts of a scene before it is fully rendered. Add code after render op.

 sequences.remove(image_strip2)

Secondly create the strip once, and change image settings, rather than creating new strip each time. This is equivalent of how you are resetting font body. (py console example) added strip with some dummy image, changed directory and element (image) name to a real one.

>>> im = sequences.new_image("Dummy", filepath="/tmp/xxx.png", channel=2, frame_start=3)
>>> im.directory
'/tmp/'

>>> im.directory = '/home/batfinger/Desktop/'
>>> len(im.elements)
1

>>> im.elements[0].filename
'xxx.png'

>>> im.elements[0].filename = "images.jpeg"
>>> im.update() # required???

Thirdly, rather than loop the csv inside the script, could set up a blend file to render a single car make, pass the make string and images to it and run from some shell script.

How to pass command line arguments to a Blender Python script?

For batch scripts there is no need to call the exit operator, as this is default behaviour.


Can I copy a video strip from one opened Blender into another?

This works for me - pack the video into .blend using File -> External data -> Pack All into Blend.
Then from the other project select File -> Append, find the .blend with the packed videos and append the Scene datablock.
The video strips should be appended now.


Shadow Catcher makes transparent the object that should make the shadow on the ground

I think you are confused on what the shadow catcher is supposed to do.

The shadow catcher would be an object whose only function would be to catch the shadow and be transparent, so that it can be overimposed over 2D images mainly. it is not meant for the object projecting the shadow. (read this link as an example of one of the uses for a shadow catcher: How to make a model cast shadows onto the world texture/background?)

If you wanted to project the shadow of a 3D object into a picture of a floor or wall that is just a 2D image then you would use a plane to work as a shadow catcher to create fake shadows.

In this case you want an object to cast a shadow on another 3d object, you just have to use a diffuse shader on the object and it will cast a shadow depending on the light you are using.

Part of your problem is that the background you are using is set to a strength of 1, creating a very bright flat illumination. Bring it down so you can see what the other lights are doing.


getLinearVelocity() provides you the motion vector you object was travelling since the last frame to reach the position it is now.

The motion vector is the vector from the last position (L) to the current position (C).

With the scalar or dot product you can determine if the previous position was in-front or behind the current position. You can even determine if it was left/right or over/under the object.

Before you can calculate anything you need to define what is front and what is behind. You need an Front/Behind orientation vector. Lets assume the border is the local XZ-plane.

anything that is at the positive Y-axis is front
anything along the negative Y-axis is back.
anything on the XZ-plane is neither back nor front (it is left/right/over/under)

For correct calculation all vectors needs to be in the same space. I suggest to use the scene space (world) You convert the orientation vector to scene space (relative to the objects origin):

from mathutils import Vector

FORWARD_ORIENTATION = Vector([0, 1, 0])
forwardOrientationVector = object.worldOrientation * FORWARD_ORIENTATION

The dot product projects one vector on the other and tells how much of the vector the projection uses. The calculation is pretty simple, but we still use the dot operation mathutils.Vector provides:

forwardRatio = forwardOrientationVector.dot(object.getLinearVelocity())

You check the range of the result, to get one of the three possible values:

if forwardRatio > 0.0:
    print("forward")
elif forwardRatio < 0.0:
    print("backward")
else:
    print("neither forward nor backward")

Similar calculations can be used to determine left/right (RIGHT_ORIENTATION = Vector([1,0,0])) and over/under (OVER_ORIENTATION = Vector([0,0,1])).

I hope it helps


UPDATE

  Good news! "node reset" functionality is now part of node wrangler and will "land" after the release of 2.78, means hopefully in 2.78a: https://developer.blender.org/D2129 If you are interested, download a preview here:

  Even it's now possible resetting multiple nodes. You can simply select the nodes you like to reset and hit backspace, which makes sense (thanks to Greg Zaal) since this is also the shortcut to reset a single node parameter.

Original text:

I almost hesitate to suggest this as an answer, as it seems like there should be a built-in way to do this for the standard Node Trees. But in the interest of experimentation here's an operator that resets the node by:

copying location / size / name / bl_idname of the active node
copying the links
deleting the original node
replacing it with a fresh one of the same type
reconnecting all links

code (rather inelegant, but seems to work for Node Groups too):

def store_replace(node):
    node_tree = node.id_data
    props_to_copy = 'bl_idname name location height width'.split(' ')

    reconnections = []
    mappings = itertools.chain.from_iterable([node.inputs, node.outputs])
    for i in (i for i in mappings if i.is_linked):
        for L in i.links:
            reconnections.append([L.from_socket.path_from_id(), L.to_socket.path_from_id()])

    props = {j: getattr(node, j) for j in props_to_copy}

    new_node = node_tree.nodes.new(props['bl_idname'])
    props_to_copy.pop(0)

    for prop in props_to_copy:
        setattr(new_node, prop, props[prop])

    nodes = node_tree.nodes
    nodes.remove(node)
    new_node.name = props['name']

    for str_from, str_to in reconnections:
        node_tree.links.new(eval(str_from), eval(str_to))

Add-on

https://gist.github.com/zeffii/010a108a612fd6071a4b

via search menu (Spacebar)

via node properties (N)


SOLUTION 1 POST PRO - Compositor/Directional blur

I started with a cube filled with static particles, all using an icosphere as the rendered object. Then I set up a Directional Blur node to animate the streak from the rendered image.

I also added some glare nodes to enhance the streaks as they get a bit transparent when distorted. I would render any spaceship interior on another layer so i could separate the zoom effect.

SOLUTION 2 POST PRO - Compositor/vector blur

You can use Vector Blur in the compositor.
I have made a larger volume of stars with an array of the initial cube. Then I fly the camera quite fast through it.
In the compositor I use a Vector node with a high number of samples (256).
In this way I can animate the streaks by moving the camera.

SOLUTION 3 POST PRO - In camera/Compositor

Use the moving camera again but this time turn on the actual motion blur feature in Cycles on the scene properties panel.
To emphasize the streak I have animated the size of the particle object (icosphere) as the camera speeds up.

I have added a second layer to render the cockpit image, which is parented to the camera location.

I used the compositor to place the cockpit over the star image. I found that if the cockpit object was in the star layer, the particles would streak inside the cabin. Notice that the cockpit layer only has an object with an Emission material so i have turned the sample rate down to 1. This renders very fast.

SOLUTION 4 POST PRO - In camera/Particle hair

In this example I have used particle hair and animated the length via the Path end value. At the same time I am animating the position of the camera (with cockpit object).

Here you can see the array of planes with a hole in the middle for the camera to fly down.

In this frame is the rendered view and the display view showing the hair increasing in length.


How do I make multiple things in the background the "ground and have them as "shadow catchers"

You have different options.
Do activate shadow catcher in EACH of the object properties like this in CYCLES:

If you're on EEVEE, setup the shadow catcher MATERIAL to assign to all the objects you want to catch the shadow on, like this:

Alternatively, you can use holdouts to separate what you need but (trimming) the pixels to later compose. Activate the HOLDOUT option in the filter selection, and activate it at COLLECTION level for all your grouped (collection) elements.


How to connect two sections of a mesh (sawed off shotgun)

To join 2 separeted meshes press CTRL + J in Object Mode. If you want to split them press instead CTRL + P. Hope I was useful


SO i've managed to do the trick using the answer of CoDEmanX here : enter link description here
Still very strict to use and have a high ms

import bpy

AN= bpy.data.node_groups['NodeTree']
L = AN.nodes["Data Interface"].value

def OB_list_joiner(L,b,n):

    ctx = bpy.context.copy()
    P=[]

    for v in L :
        o=v.copy()
        o.data=v.data.copy()
        P.append(o)

    for v in P:
        bpy.context.scene.objects.link(v)

    ctx['active_object'] = P[0]
    ctx['selected_objects'] = P
    ctx['selected_editable_bases'] = [bpy.context.scene.object_bases[ob.name] for ob in P]
    P[0].name = n
    bpy.ops.object.join(ctx)
    return P[0]

if N not in bpy.data.objects :
    O = OB_list_joiner(L,True,N)
else :
    O = bpy.data.objects[N]


Mapping Node, Box projection, and rotation

"I'm trying to map a texture to a cube"

Perhaps a simpler way of mapping a texture to a cube and have control of the orientation of the texture on each of the 6 faces is to use UV mapping?

Starting with the node setup you have already :

In the Texture Coordinate node change to UV, and the Mapping node change to Point (and reset the rotation and scale to Zero).
Drag open a new viewport and change Editor Type to UV Editor.
3D viewport > Edit Mode > select the cube, then U to open the UV Mapping menu and choose the Reset option. This will reset the UV's so that each face of the cube is mapped to the complete UV space. (Each face stacked one above the other).
3D Viewport > select the face that you would like to change the orientation of the texture.
In the UV Viewport > select the face (if it is not already highlighted in orange then use the A key to select it) and rotate it 90° with R90.

Or you can probably find the answer here http://www.blenderinsight.com/beginners-guide-to-cycles-nodes-the-procedural-way/  Under the chapter titled Object (with no reference object) :)


Is it possible to blend a tiled texture with itself?

I will assume you want to blend a planar tiling. Not to blend a cube mapping between sides.

If you really want to then yes its possible, but it is much more complicated than doing it in some 2D app.

For the blending to work, the tiles need to overlap. You can manipulate the tiling with mapping vectors no problem: How do I create repeating patterns with cycles' procedural textures

What the problem is is to map two source mapping locations into 1 output location for the blending. That would require a function that gives 2 values for 1 input >> impossible.

The workaround would be to use 2 textures, each tiled like chessboard colors. The tilling would overlap between the two and you could mix them with linear weights of how far from the tilling border the pixel is. This would still cause artifacts on tile corners when blended both in X and Y so 3 textures would be actually ideal.

And the blending would look not good at all, I think you are better to make a tileable texture with clone brush, because this is not worth it.


Is the object that is associated with an action selected?

Make a lookup table.
In going the other way can look at all objects in blend and from their animation data check all actions either assigned directly or via the NLA.
For example sake have used a defaultdict assigned to a set. Iterated over all objects and added all assoc. actions to set.
import bpy
from collections import defaultdict

actions = defaultdict(set)
for ob in bpy.data.objects:
    if not ob.animation_data:
        continue
    ad = ob.animation_data
    if ad.action:
        actions[ob.name].add(ad.action)
    actions[ob.name].update(s.action for t in ad.nla_tracks for s in t.strips if s.action)

# print results

for k, v in actions.items():
    print(k, v)

Example output
Cube {bpy.data.actions['Action'], bpy.data.actions['CubeAction.002'], bpy.data.actions['CubeAction']}

Once we have created lookup above can iterate over actions where  any that  intersect actions[ob.name] are associated with object ob
An object is selected if ob.select_set() is True
Alter above and use for ob in  context.selected_objects: to only look at actions assigned to selected objects in the context scene. (context = bpy.context If we make test code using context it pastes nicely into operator / panel code)
When an action is created by keyframing in the UI the action is assigned name, for example on object "Cube", "CubeAction" and the action is given an Action.id_root = 'OBJECT' to associate this action with objects (not meshes, shapekeys etc).
However IMO perhaps neither can be relied on, if the action is renamed, or created via code and the id_root is not set.


Coordinates limitation in edit mode. How to change it?

The limit is a function of the design of the software, and as far as I know, cannot be turned off. The maximum dimensions of an object are 20,000 blender units, that is from -10,000 to +10,000, in each axis. While in many cases, a blender unit is defined by the use to be equal to a meter, it need not be, and is sometimes defined to be another unit, for example, an AU, or a KM. Complicating the use you wish to use for Blender, there is also a minimum precision in Blender, in that the smallest units supported are -.000005 and +.000005.

How best to deal with the limitations posed by these design choices involves considering the use to which you intend to use your meshes.


This requires you to be comfortable with Python, but you could use the BGUI: https://github.com/Moguri/bgui

There is an example file that comes with the download that can help you get started.


You can use After Effect with Element 3D and then export the blender file as an OBJ


There is no way to modify the preloader of the "standard" web player without coding. Developers can customize preloaders by using the Blend4Web API: https://www.blend4web.com/api_doc/module-preloader.html


You can't do that in the current version. It may happen when 2.8 gets released but in the Blender Guru tutorial, he just zoomed the whole view. I suspect since his mouse cursor is still small that he's using the magnifier in Windows. Every operating system (Mac, Linux) has this functionality.


How do you detect collisions with fast objects like bullets?

In the physics tab turn up the Physics Steps > Substeps. This will calculate physics in between frames.


Ngons and messy Topology on flat Surfaces

Topology Guides Guides for 3d Artists first you should learn the basics to have a clean topology and not the clutter that is seen in your model, so you will achieve a good quality render and you will make your work easier by reducing the render time
You can use Loop Tools Addon, it is in user preferences addons, activate it and it will appear in edit mode when you press W
Example to create a good
Apply Smooth in Object Mode
and maybe you can apply a subdivision surface modifier
You can also read many very good answers that are here, and do not wait for the magic addon to arrive, which may never arrive

Topology

more Topology

when finished remember to apply scale and rotation, so that when you do not have scaling problems, remember to adjust the normals of your model

8.1 Object Mode

8.2 CTRL + A, Scale and Rotation

8.3 Edit Mode

8.4 select all and apply CRTL + N


The .mtl file is only a material definition file which contains references to textures.

if you want to export obj with .mtl and textures you need to make sure you follow these steps:

In your OBJ export menu:

Make sure material export is ticked

Set the path mode on COPY

You will see that in your target folder you now have

An obj file which contains your mesh information
An mtl file which contains material definition
All tetxure files referenced in the .mtl


Getting a crease when using a Mirror Modifier

You have some non-manifold inside faces caused by the mirroring. Select and delete them with X or Del.


How can I recover animation if I turn off my computer

The resources of your computer are limited

Rendering and using your computer for something else at the same time is not a good idea, not only will the rendering go slower, but you might reach the limits of your processing power and memory, and crash your system when you run out of resources. Let the computer alone when you render, while you do something else. Pick up a book or go for a walk or do something that doesn't require a screen...

Besides that. Never Ever Render Animations Directly as Video. Render as an image sequence first and encode later to a video format. Not only will you be able to pause and resume the render (so that you don't have to break the addiction to your favorite game, or to prevent the rendering from bugging down the performance of your game), but youi'll be able to try compression schemes so that your video has better quality.

Can you recover something from the crash? Probably not... but explore the following links:

How to resume a render that got interrupted?

Is it possible to recover deleted files in the file browser?

I started rendering a new animation after completely rendering one before. How do I retrieve that older render?


Partial shape subtracting using the Boolean modifier

It looks like you need to fix/flip/recalculate your normals on the top cylinder. To fix it...

Select it

Tab into edit mode.

T to toggle the tool panel @ left.

Click the Shading/UV tab.

Click Flip Direction

Tab to toggle back to Object mode.

Ctrl + A >> Rotation & Scale.

Try your boolean operation again, make sure the difference option is set.


Blender is not running on Nvidia gtx 1050TI

I don't know if this could be helpfull, but try to unistall blender, after this try to reinstall it again from Steam


Is there anyway to keep bounce lights of scene when rendering in separate view layers?

You can put objects in separate collections and use the Indirect Only option in the outliner.

This setting will make the collection only influence the view layer through indirect light bounces.


This functionality is built into the Bevel Modifier, which can be used to bevel only some parts of a model using vertex groups.


How to find the armatures which are hidden in the camera perspective by other parts?

you can go to the viewport display settings , and then check In front setting do that you can see the bones in the front of all the mesh


Apply a strip property to multiple strips

This is quite simple in python:

import bpy

for s in bpy.context.scene.sequence_editor.sequences:
    if s.type != 'SOUND':
        s.use_proxy = True
        s.proxy.build_25 = True
        s.proxy.build_50 = False
        s.proxy.build_75 = False
        s.proxy.build_100 = False

This will set use_proxy to True for every strip in the current scene which is not a sound strip.

Just paste it into the text editor (ShiftF11) and press Run Script or AltP.


Making a printable half sphere with a cutout in it for 3D printing

Once you've deleted the face you can extrude your object to give it thickness, or give it a Solidify modifier then apply. If there's already thickness you could extrude your F and use a Boolean modifier on your half-sphere.


How would I build a twisted water slide?

Using the Add Curve:Extra Objects shipped add-on, create a Spiral, Archimedes, 2 anticlockwise turns, type: Poly. Cut off the ends appropriately, and E extrude the new ends to make the straight sections.
Adjust the native Full bevel of the curve in its data tab, for depth and resolution. (object data tab > Shape and Geometry panels. Shape: 3D, Fill>Full.. and Geometry: Bevel>Depth and Bevel>Resolution)
In Object Mode AltC convert to mesh, then assign and apply a Solidify modifier
K with C and Z make a cut through the pipe, constrained to 45 degrees. Delete surplus faces and CtrlE > Bridge Edge Loops to repair the rim. Find or create a few edge loops round the outside skin, and Ctrl B bevel them to the width of the joints. With the new face rings selected, E extrude, right-click to cancel transform, AltS scale the extrusion along its normals.

Then you can add a Bevel modifier by angle (segments 2, profile 1.0) to sharpen edges, and add a Subdivision Surface modifier.. unless you just want to stick with low-poly, and Auto Smooth by angle in the slide's data panel.


Sadly, per this discussion thread at the Blend4Web website, it would appear that the latest version of Blender that supports Blend4Web would be 2.79, so the answer to your question would be "Not yet supported, unless you install and use Blender 2.79 for that specific purpose."
On the bright side, there's nothing at all preventing you from using older versions of Blender on the same system as a newer version of Blender, and the Blend4Web folks kindly host a download of Blender 2.79 on their downloads page for your convenience, and I do believe that you can still find older versions of Blender on the official Blender website if you look around a bit.


Use a python console

Recommend using a python console or a text editor to crunch in your expressions when they get too complex. See image in the way it has shown the error message.  Most syntax aware text editors have some way to highlight matching brackets, including blender.

Define any variables in your expression first with dummy values

>>> x = 1

Conveniently if using the python console, the math methods are already imported, .

>>> locals().keys()
dict_keys(['__name__', '__doc__', '__package__', '__loader__', '__spec__', '__builtins__', 'bpy', 'C', 'D', 'help', 'Vector', 'Matrix', 'Euler', 'Quaternion', 'Color', 'geometry', 'interpolate', 'noise', 'bvhtree', 'kdtree', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'gcd', 'hypot', 'isclose', 'isfinite', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log1p', 'log10', 'log2', 'modf', 'pow', 'radians', 'remainder', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', 'pi', 'e', 'tau', 'inf', 'nan', 'M', 's', 't', 'x', 'bmesh'])

just as most are known to the driver namespace (can be used in driver expressions)

>>> bpy.app.driver_namespace.keys()
dict_keys(['__builtins__', '__name__', '__doc__', '__package__', '__loader__', '__spec__', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atan2', 'atanh', 'ceil', 'copysign', 'cos', 'cosh', 'degrees', 'erf', 'erfc', 'exp', 'expm1', 'fabs', 'factorial', 'floor', 'fmod', 'frexp', 'fsum', 'gamma', 'gcd', 'hypot', 'isclose', 'isfinite', 'isinf', 'isnan', 'ldexp', 'lgamma', 'log', 'log1p', 'log10', 'log2', 'modf', 'pow', 'radians', 'remainder', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', 'pi', 'e', 'tau', 'inf', 'nan', 'bpy', 'noise'])

In the case you crunch in hit enter and the next line presents you with ... it most likely means you are missing a brace.

>>> sqrt(2) * (x - round(x, 0)) if (x % 2) < 1 else sqrt(2) * (x % 2
...
... )
1.4142135623730951

Test with different input values. The history (up and down arrows) saves retyping everything

>>> x = 0.33
>>> sqrt(2) * (x - round(x, 0)) if (x % 2) < 1 else sqrt(2) * (x % 2)
0.46669047558312143

And when you are happy with it, select it with the mouse  copy CtrlC and then paste CtrlV into the driver expression

See also defining a driver method and adding to namespace [Find Link]


All the objects are visible through others

You have probably enabled X-Ray mode ...


How do I snap an object to an empties world position in the bge

get an object from the scene named "Target"

scene = bge.logic.getCurrentScene()
objects = scene.objects
target = objects["Target"]

  get the sensor connected to the python controller

sensors = bge.logic.getCurrentController().sensors
sensor = sensors["sensor name"]

  when the sensor is triggered

if sensor.triggered:

or do you mean "when the sensor evaluates positive condition"? (Which makes more sense)

if sensor.positive:

  move its Owner (the player) to the "Target" object.

sensor.owner.worldPosition = target.worldPosition

I hope it helps

You can find more details on BGE Python in the BGE Guide to Python Coding


There is an fbx Import-Export add-on, have you tried it?

This could be helpfull to :

http://blenderartists.org/forum/showthread.php?274687-Another-FBX-Importer-Exporter-addon


How can I align faces that share an edge in Python? (without moving the common edge)

Here's a slightly different approach that worked for me. It rotates the active face to align it with the other selected face (that is not active).

It uses the common edge as the pivot point for the rotation. It doesn't have any tests for making sure only two faces are selected etc, so will only work with two faces selected in edit mode.

import bpy, bmesh

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

active   = bm.select_history.active
selected = list( # Find non-active face using set boolean difference
    set( bm.select_history ).difference(
        set( [ bm.select_history.active ] )
    )
)[0]

# Calculate the rotation difference between the selected and active faces' normals
rot = active.normal.rotation_difference( selected.normal ).to_matrix()

# The pivot is the common edge's center point
# Intersect both faces' edge sets to find the common edge
pivot = list(
    set( active.edges[:] ).intersection(
        set( selected.edges )
    )
)[0]

pivot_coos = [ o.matrix_world * v.co for v in pivot.verts ]
pivot_vec  = ( pivot_coos[0] + pivot_coos[1] ) / 2 # Calculate edge center

bmesh.ops.rotate(
    bm,                      # BMESH object
    cent   = pivot_vec,      # Rotation pivot point (edge center)
    matrix = rot,            # Rotation value
    verts  = active.verts,   # What verts to rotate (active face's verts)
    space  = o.matrix_world  # Rotate in object world space
)


Is there a way to have an object show up only in a reflection?

Use the light paths node on the Earth to isolate the reflection light ray.

In this picture I have a sphere emitting light, but it is only seen on the reflection of the plane. On the right is the node set up for the Sphere. You can use that node set-up for the Earth, just replace the principled shader with your current node set up for the Earth.

Hope this helps!


You can use the blend texture for this.

Go to the textures tab in the Properties Editor. In the material sub-tab (it's open by default), create a new Blend texture.

Change the mapping of the texture to "Object", and select the object that represents the model. Set the X coordinate input to Z (because we want the gradient to be vertical). The other settings don't matter, because the Y and Z coordinate inputs don't affect the output.

Now that the texture is mapped correctly, you can change it's influence (in the influence drop-down accordion). In your case, the texture should influence the color of the diffuse shader. If your material is brown, this texture should make it blonde (yellow-ish) on one end. The color influence is at 1 by default, which is what we want. Just change the color to what you want.

You should now have a basic gradient from blonde to brown. Then, just play around with the mapping and influence (and other) settings, until you get the look you want.


CRTL(or CMD) + ALT + 0 shortcut does not work

Edit > Preferences window > Input tab : check Emulate Numpad

  Many shortcuts don't work in Blender 2.8. Are these bugs?

Not bugs.You can find the new shortcuts in,

Edit > Preferences window > Keymap

Annoying at first but I get used to it quickly.

Blender 2.8 is a big change and more "industry" compliant, for example:

left click for selection (instead of right click)
Space bar for Play/pause
F3 for search, etc


How do I change the color of particles with lamps?

To make your particles "physical objects" make a mesh off scene that you want your particles to duplicate. Then, in the particle menu, scroll down to the "Render" panel and check the "Object" box. In the text entry box select you duplicate object and you're done!


It depends if you mean roughness as a 2D effect or 3D effect.

For 2D roughness you can use a Noise (or this kind of texture) as a factor in a mix between a glossy and a non glossy material:

For 3D roughness you need to plug a Noise (or this kind of texture) into a Bump node that you plug into the Normal sockets of your nodes. Here I've mixed 2 Noise Texture nodes into a MixRGB (try Overlay or Darken or Lighten mode) in order to have some smoother areas.

If you're not fully procedural and use an Image Texture:

In the case of a 2D effect, if you use an Image Texture you can create something without any unwrap, I guess it's the quickest way:

Prepare your dirt texture (a simple black and white jpg is ok).
Create this nodes setup: Texture Coordinate (Object output) > Mapping > Image Texture > ColorRamp > Factor socket of a Mix Shader.
In the Image Texture, load your dirt image, choose Box instead of Flat so that the texture will be projected all around the object. You may need to play with the Blend factor to avoid any seam effect.
In the Mix Shader, plug the 2 materials, the one that is supposed to be the glossy and the rough one.
You can play with the Location and Scale of the Mapping node, but don't play with the Rotation if you want to avoid stretching.

In the case of a 3D effect, same setup on the left, then:

Plug your Image Texture node into the Height socket of a Bump node.
Plug the Bump into the Normal sockets of your Diffuse and Glossy nodes.
Here I've used a (Math) Multiply node instead of a ColorRamp. - Play with the Strength of the Bump to increase the 3D effect.


I just dealt with this. Check your Timing panel and make sure the ending is set to 1.0

Hope this helps. It did it for me.


Disconnected (exported) mesh because of vertex paint?

There is a threshold value you can change when working with remove doubles.

There is two ways to change it. Both are (as blender standard) after you use the tool.

So first select all vertices (if you only want to join some, feel free to select a subset).

Now do Remove doubles. Probably nothing will happend because the threshold is way low by default. But in the toolbar (toggle it with T), at the bottom are the options for the last used tool. In this case it will look like this:

Simply change the Merge distance to snap together the desired vertices.

The second way to change this options is to press F6 directly after the tool. This brings up a dialog to do the same. It's a matter of personal taste what method you want to use. They are exactly the same in all other aspects.


There is a feature for this

The Combined Pass includes an alpha channel:

The Render Layers Node has an Alpha output for it:

If using Cycles make sure to enable Film > Transparent in the Render Context.

If using Blender Render make sure to enable Transparency in the Materials Context.

There is no need to change the material for all the objects in your scene!

There is no need to use ID Masks for this either.

There are cases where using an ID Mask will cause you problems, for example if your materials have transparency. Observe this tree. Its leaves are texture planes, so if you use an ID mask you will only see the outline of the planes.

If rendering glass with a transparent background in Cycles, see this.


CoDEmanX's link had a way to fix this. It's more of a work around than a solution, but I can just change the display device in the "Scene" tab to None. This allows me to export the colors exactly as seen in Blender. It might mess up rendering a bit, but these are models for a game and in my case I don't need to render in Blender. One speed bump, though, is that any colors set before changing it will be messed up and will need to be corrected.


Edit
The default shortcut for annotate straight-lines is D + ALT + LMB.
Change the hotkeys for that keymap.


When calling an operator via bpy.ops.* without any execution context the execute() method of the respective operator runs by default. If the operator provides any kind of  'user interaction' like a 'confirmation dialog' in this case, then you can pass 'INVOKE_DEFAULT' as execution context when calling the operator which will also run its invoke() method:

bpy.ops.wm.read_homefile('INVOKE_DEFAULT')

In order to display the operator as a button and also 'enable' its user interaction, you have to set the operator_context in the 'layout' before calling the operator:

Blender 2.7x

import bpy

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_idname = "CUSTOM_my_panel"
    bl_label = "My Panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOLS"
    bl_category = "Tools"

    def draw(self, context):
        layout = self.layout
        layout.operator_context = 'INVOKE_DEFAULT' #'INVOKE_AREA'
        layout.operator("wm.read_homefile", text="New", icon='NEW')

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

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

if __name__ == "__main__":
    register()

Blender 2.8x

class OBJECT_PT_CustomPanel(bpy.types.Panel):
    bl_label = "My Panel"
    bl_idname = "OBJECT_PT_custom_panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Tools"
    bl_context = "objectmode"

    def draw(self, context):
        layout = self.layout
        layout.operator_context = 'INVOKE_DEFAULT' #'INVOKE_AREA'
        layout.operator("wm.read_homefile", text="New", icon='FILE_NEW')

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

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

if __name__ == "__main__":
    register()

Custom Confirm Dialog

For a custom conformation dialog you can wrap the operator into another one and invoke invoke_confirm(operator, event) classmethod of the window-manager to confirm the execution by the user.

Blender 2.7x

import bpy

class SimpleConfirmOperator(bpy.types.Operator):
    """Really?"""
    bl_idname = "my_category.custom_confirm_dialog"
    bl_label = "Do you really want to do that?"
    bl_options = {'REGISTER', 'INTERNAL'}

    @classmethod
    def poll(cls, context):
        return True

    def execute(self, context):
        self.report({'INFO'}, "YES!")
        return {'FINISHED'}

    def invoke(self, context, event):
        return context.window_manager.invoke_confirm(self, event)

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_idname = "CUSTOM_my_panel"
    bl_label = "My Panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOLS"
    bl_category = "Tools"

    def draw(self, context):
        layout = self.layout
        layout.operator(SimpleConfirmOperator.bl_idname)

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

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

if __name__ == "__main__":
    register()

Blender 2.8x

import bpy

class SimpleConfirmOperator(bpy.types.Operator):
    """Really?"""
    bl_idname = "my_category.custom_confirm_dialog"
    bl_label = "Do you really want to do that?"
    bl_options = {'REGISTER', 'INTERNAL'}

    @classmethod
    def poll(cls, context):
        return True

    def execute(self, context):
        self.report({'INFO'}, "YES!")
        return {'FINISHED'}

    def invoke(self, context, event):
        return context.window_manager.invoke_confirm(self, event)

class OBJECT_PT_CustomPanel(bpy.types.Panel):
    bl_label = "My Panel"
    bl_idname = "OBJECT_PT_custom_panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Tools"
    bl_context = "objectmode"

    def draw(self, context):
        layout = self.layout
        layout.operator(SimpleConfirmOperator.bl_idname)

def register():
    bpy.utils.register_class(OBJECT_PT_CustomPanel)
    bpy.utils.register_class(SimpleConfirmOperator)

def unregister():
    bpy.utils.unregister_class(SimpleConfirmOperator)
    bpy.utils.unregister_class(OBJECT_PT_CustomPanel)

if __name__ == "__main__":
    register()

Property Confirm

In order to display a popup, some properties and an OK 'button' you can return wm.invoke_props_dialog(self) instead:

Blender 2.7x

import bpy

class SimplePropConfirmOperator(bpy.types.Operator):
    """Really?"""
    bl_idname = "my_category.custom_confirm_dialog"
    bl_label = "Do you really want to do that?"
    bl_options = {'REGISTER', 'INTERNAL'}

    prop1 = bpy.props.BoolProperty()
    prop2 = bpy.props.BoolProperty()

    @classmethod
    def poll(cls, context):
        return True

    def execute(self, context):
        self.report({'INFO'}, "YES!")
        return {'FINISHED'}

    def invoke(self, context, event):
        return context.window_manager.invoke_props_dialog(self)

    def draw(self, context):
        row = self.layout
        row.prop(self, "prop1", text="Property A")
        row.prop(self, "prop2", text="Property B")

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_idname = "CUSTOM_my_panel"
    bl_label = "My Panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOLS"
    bl_category = "Tools"

    def draw(self, context):
        layout = self.layout
        layout.operator(SimplePropConfirmOperator.bl_idname)

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

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

if __name__ == "__main__":
    register()

Blender 2.8x

import bpy

class SimplePropConfirmOperator(bpy.types.Operator):
    """Really?"""
    bl_idname = "my_category.custom_confirm_dialog"
    bl_label = "Do you really want to do that?"
    bl_options = {'REGISTER', 'INTERNAL'}

    prop1: bpy.props.BoolProperty()
    prop2: bpy.props.BoolProperty()

    @classmethod
    def poll(cls, context):
        return True

    def execute(self, context):
        self.report({'INFO'}, "YES!")
        return {'FINISHED'}

    def invoke(self, context, event):
        return context.window_manager.invoke_props_dialog(self)

    def draw(self, context):
        row = self.layout
        row.prop(self, "prop1", text="Property A")
        row.prop(self, "prop2", text="Property B")

class OBJECT_PT_CustomPanel(bpy.types.Panel):
    bl_label = "My Panel"
    bl_idname = "OBJECT_PT_custom_panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Tools"
    bl_context = "objectmode"

    def draw(self, context):
        layout = self.layout
        layout.operator(SimplePropConfirmOperator.bl_idname)

def register():
    bpy.utils.register_class(OBJECT_PT_CustomPanel)
    bpy.utils.register_class(SimplePropConfirmOperator)

def unregister():
    bpy.utils.unregister_class(SimplePropConfirmOperator)
    bpy.utils.unregister_class(OBJECT_PT_CustomPanel)

if __name__ == "__main__":
    register()

Note: bl_options of both examples are set to 'INTERNAL' which excludes the operators from search results, remove it if you'd like to run the operator via space bar/F3.


VSE correcting framerate without shortening strips or changing the speed of strips

Make a new vse template in blender..
Import the videos again one by one .. Blender will automatically set your project FPS to that of the video content you import..
This will also be concurrent with the length and sample rate of the audio associated with the video


Select both objects then in the mesh properties under ShapeKeys you will find an option to "Join as Shapes" in the menu under the add/remove buttons. This makes a shapekey in the active object that matches the other object.

With the shapekey selected in the list you can animate the value to morph between the two shapes. Either press I while the mouse is over the value or right-click and select Insert Keyframe.


What is wrong with my UV image repeating?

As Mr Zak said, it's probably because of a bad unwrapping, some of your UV islands must overlap due to the unwrap method you've chosen, which can be ok in some cases but not if you decide to paint your character, because what you paint on a face will also be painted on another one.

You need to check your UV/Image Editor to understand what happened, typically I guess each of your back faces must fill the whole surface of the texture.

For your purpose the best and easiest way is to first select all the faces of your mesh and U unwrap with the Smart UV Project option: This way you're sure that you've got really distinct islands and none of your face will overlap another one on the UV/Image Editor.

Please select one of your back faces and look what happens, I guess something like this:


Export armature animation + corrective smooth modifier?

Answer is quite simple: you cannot. Corrective smoothness is very advanced effect that simply cannot be exported, nor baked at the moment.

Only way to bake that I can think of, anyway, would be (with e.g. a py script), for each frame, to make a diff between the mesh with and without CS modifier, and store that diff in a relative shapekey, and then animate all those skeys such that they each express at one frame.

But this sounds like an awfully heavy solution to me. And result is not much guaranteed even, since shapekeys are applied before the armature modifier (and the whole modifier stack), while Corrective smoothness modifier comes after the armature modifier…


If the Jib is an object in its own (different object than the crane) you should select it, then shift select the bone (in pose mode), then press Ctrl P and choose the "bone" option. In 2.8 you will have also to check the "relative parenting" bone option as shown in the picture.

The bone parenting will transform a whole object accordingly to the bone transformations, whitout deformings, but if the crane is the same object it will be moved too.

If the crane and the jib are in  the same object you have two options:

1) select in edit mode all vertices of the jib, press P and separate the jib from the rfest of the crane, then follow the same procedure.

Or

2) select the whole object, shift select the armature, press Ctrl P and choose "with empty groups". Then select the crane, in edit mode select all vertices of the jib, select the right vertex group in the properties panel and click the weight assign button.


Trouble getting my character to follow a curved path

Put the origin of the curve at its beginning vertex (shift ctrl alt C > Origin to 3D Cursor).
Disable the different Follow Path constraints of the character objects (you don’t need them).
Switch your armature to Object mode, give it a Follow Path constraint, choose the curve as Target, enable the Follow Curve option.
Clear the Location of the armature with an alt G.
Rotate the armature the way it is supposed to be (R+Z+180).
Select the curve.
Open the Graph Editor, display the properties panel (N), open the Modifiers tab and deactivate the Generator (which is automatically created with the Follow Path but won't help you here).
On the Timeline go to frame 0.
Keep the curve selected and go to the Properties panel > Data > Path Animation, choose an Evaluation Time of 0 and and insert a keyframe.
On the Timeline go to the frame you want, and in the Properties panel > Data > Path Animation, insert a new keyframe in the Evaluation Time with the value you want.
In the Graph Editor, put your mouse over the graph and press T > Set Keyframe Interpolation, and choose Linear so that the movement along the curve is linear.

You can speed up the animation of the character along the curve with the Evaluation Time value.

You can speed up the walk cycle speed itself in the NLA Editor (right properties panel > Scale value).

But first, make sure first that no action is loaded in the Dopesheet editor, otherwise this action will play over the NLA strip.

Also, note that you can quickly edit the action of a NLA strip, selecting the strip and pressing Tab. The pin (on the left of the track) will allow you to see the animation with or without the NLA settings effect.


i may be misinterpreting the question, but it seems to me that if you want the mesh to deform the the curve, you need to add some loop cuts going down, a mesh can only deform along a loop


Animation nodes "object attribute input" color is not updating

You're looking at the wrong color. The object.color attribute refers to the object's viewport display color :

If you want to get the particular value of an input socket of a particular node in the node tree of a particular material, you need to use :
material.node_tree.nodes.get("Principled BSDF").inputs[0].default_value
I suggest using an Expression node to do it. Example :

Result :

Another way to do it, is to link the object viewport color to your principled bsdf. Then you can keep your AN tree :


Select the animated object, in the dopesheet select all keyframes you want to copy, Ctrl C to copy in the clipboard, select the new object, select the channel to be animated, set the cursor to the first frame where you want the copied animation to start, Ctrl V to paste the single animation channel.


How to hide "gaps" between parts of my detail?

It sems you have have overlapping vertices, which creates a seam in the topology when rendering.

Notice the black line between the edges which cause problem in edit mode are darker than the other ones.
Select all your vertices with  A  in edit mode and vertex select mode, and Press  ALT  +  M  (or right click > Merge vertices) then choose "by distance" in order to eliminate double-vertices.


"You DO have this in Blenderrrrr!" since POV-Ray does support Newton's thin-film coating under the iridescence keyword:


I ended up figuring it out. It was the size of the texture. I was using a large texture atlas and that was its limit. I did a test where I shrunk the atlas to 1/4th and I no longer have that issue. I can use a smaller texture atlas for modeling and then use the original texture when I import it into the game.


I downloaded your .blend file and if you remove the follow path constraint on the penguin, it should work fine!

Hope this helps!


Fastest way to turn a ring of unconnected vertices into an edgeloop?

Select all the inner faces with Circle Select or Lasso tool. Press F to create a face, then X and Only Faces to remove the face and leave just the edges. Select the outer vertices and repeat FX. You should now have two loops - simply select all and Bridge Edge Loops.

As an alternative to Bridge Edge Loops, select two adjacent pairs of vertices and remove the two edges between each and join opposite ones to make a ‘C’ shape that almost joins. Select all and Grid Fill. Select the vertices around the gap and F to create the face.

Animated gif showing the process :


The only tracks created for camera can be used for stabilization.

Select markers and copy them Ctrl+C
Select (in N side properties panel): Objects -> Camera
Paste markers here Ctrl+V
Now you can use copied markers for stabilization


Can I make a camera use the lens distortion parameters determined by camera tracking?

Yes it's possible.
Once you've determined the distortion values using the movie clip editor's lens distortion's tools you can use them on blender scenes using the compositor.
You need to add a Movie Distortion node in Distort mode, to your render layer. Make sure you select select the video clip as source.

Read: https://blender.stackexchange.com/a/15622/1853


Somehow I changed to edit mode in the 3d editor, I don't know how given I was only using the vse, but changing back to object mode fixed the problem.


You have accidentally activated Freestyle which is a non-photorealistic render engine for drawing line art. It can be deactivated by unchecking the Freestyle option in the Render tab.


Blender animation different when imported to Unity

Solved: the solution was to animate the rotation of the bone instead of the location


As far as I know, AMD GPUs take some minutes the first time you gonna render something. Indeed it has to compile kernel every time you open a new instance of blender.


You can do this by using a Bézier extrusion with animated start/end values, which was added in Blender 2.65. You'll need two curve objects: the path and the circle (if you don't have a circle curve, just add a Curve → Bezier Circle).

First, select the path, and set its Bezier Object (under the curve options tab) to the circle. This will take care of the extrusion portion. To avoid the "funky taper," just don't set the taper object.

Then, animate the End Bevel Factor value. To do this, go to frame 1, and set the End Bevel Factor value to 0. Hover over it and press I, or RMB → Insert Keyframe to insert a keyframe. Then, go to the frame where you want the transition to end, set the factor to 1, and insert a keyframe again.

This image demonstrates the two key things to set:

NB Using the circle as a curve object allows you to have a more flexible swept object. If all you need really is a circle with no endcaps, just set the Bevel Depth to a higher value than zero and set the Fill to Full instead of Half.


The situation in your case is a bit similar to one in the linked post in the comments, except for the fact that here are 4 islands overlapping and they do that in a bit more difficult way (see below). In the next screenshot you can see what you can get from "one" island on the UV map if selecting and grabbing them out:

Left - original UV map, right - all islands revealed

The problem however is that you can't just select those revealed islands, select adjacent faces in the mesh (Keep UV and edit mode mesh selection in sync) and delete them. Some of overlapping islands are those which should be preserved (meaning if repairing this UV mapping).
So to delete only double faces you should find only those which do not affect UV mapping as you see it. In order to do that:

With all islands revealed check Keep UV and edit mode mesh selection in sync in the header of UV / Image Editor.
Unselect all faces and use B (Border Select tool) to select one of revealed islands.
Move selection in UV / Image Editor and you'll see texture changing in 3D Viewport. The trick is to find those faces which do not move; those are the doubles and the ones which should be deleted.

Repeat that for other islands; once finished you'll get not very nice UV map and mesh with texture looking the same. The Remove Doubles operator won't affect UV map any more and you'll be able to delete remaining double vertices:

The UV map will look like partially stolen, and I don't think you can automatically gather it back again. However quick and dirty solution will be to select former overlapping islands and move them back to main ones (not the best solution though).

The checker texture isn't packed in blend


Artifacts when using the union Boolean modifier on modeled mesh. Workflow to add Nails/combine Nails in a sculpted hand model?

Wow. I've never had the stones to take on a mesh that dense and complicated. I'm also a newbie myself, but I have run into problems with artifacts like these. You have a TON of "Ngons" in there.
Trying to clean this up by editing the joined mesh, I think (and like I said, I'm a newbie and no real expert), isn't likely to end well. For one thing it'll take forever doing it by hand. For another, even if you have the patience to edit something like this by hand the results often just leave you with a ton of clean-up work where things that originally curved nicely suddenly turn into flat spots that actually make things look even worse than what you started with. And you can try editing the normals, face, by face, by face, until you're blue in the face, but the results aren't usually worth the effort.
Your nails look pretty good. All nice quads. But where the nails meet the flesh - all those faces desperately trying to be triangles with a half a dozen vertices along one edge... trying to clean that up by hand editing the mesh is just going to frustrate you to the point of giving up on it.
The thing is, people who sculpt characters deal with this all the time. So there are re-topology addons galore out there. Some for free, some for purchase. Most seem to work by allowing you to sort of shrinkwrap quads over your mesh, which does two things - first it allows you to dramatically reduce the number vertices in your mesh and there by dramatically reduce your render times per frame for when you finally start animating your model. Secondly if you intend to join the nails with the fingers, being able to move and/or merge vertices while keeping everything essentially shrinkwrapped to your original geometry is a big help.
I've watched, several re-topology addon demos on YouTube, even tried a few, and although they generally didn't help me with my own problems with artifacts, I suspect they'd work on a job like yours quite well.


Python: Difference between context’s `selectable_objects` and `visible_objects`?

These flags match the 'selectable' and 'visible' states of objects (also shown e.g. in the outliner, in the left columns).

selectable_objects is a subset of visible objects, since no hidden object shall ever be selectable.

Note also that objects on hidden layers are also considered hidden (i.e. are not in visible objects, even if their own visible flag is ON).

As for the last part of your question… it depends on what you want to do! Please be more specific.


Limit Possible Bone Location Within Custom Object

No solution was found in the version of Blender that I was using at the time - however in version 2.8 a few more modes were added to the shrink-wrap constraint including the "inside" type which limits the movement of the bone to within a selected mesh-object. This mode does exactly what I was after:

The other types of Shrink-wrap constraint now also allow you to do the inverse (ie. limit the movement of a bone to outside a mesh object).

I'm glad that this feature has been developed - it seemed like something that should have existed so good to see that it now does! perhaps it is a bit much but it is possible that the feature was added as a result of my question?

I hope this helps anyone who comes across this problem in the future!


(An answer, because comment do not allow for enough characters)
If you import the .stl In Blender, it should be easy to close it up in Edit Mode. Best way is probably to do it manually by selecting elements (vertices for instance) and pressing F to create faces between them.
You can probably select all vertices on one side an close it up with a singe press of the F key. However, since you don't want the hole in the center to be closed up (by either gear shape) as well, you should first create a bridge (of a face or an edge) between the inner and outer surface (for either side), before you do that.
It might also be worth knowing that Blender ships with Add-ons that allow for the easy creation of gears and cogwheels (by pressing Shift + a, selecting the desired object, and then clicking the properties in the bottom left corner or pressing F6). There is the Add Mesh: Extra Objects add-on which allows to create Gear objects and adjust their properties before they are added. And there is the Add Curve: Extra Objects which allows for a Cogwheel to be created; basically the same thing but as a Curve Profile.
Both add-ons can be easily activated by checking their box, if you go to the Preferences > Add-ons and search for "extra".


How to store and then restore selection mode (vert, edge, face) with and without BMesh?

bpy.context.tool_settings.mesh_select_mode[:]

will get your current edit selection mode.
It returns which selection mode is active as True. For example:
bpy.context.tool_settings.mesh_select_mode[:]

returns:
(False, True, False)

meaning Vert mode False, Edge mode True, Face mode False
You can also request the state of a single mode using its number (starting at 0):
bpy.context.tool_settings.mesh_select_mode[1]

returns (in my case):
True

because I am in Edge Selection Mode.
https://docs.blender.org/api/current/bpy.types.ToolSettings.html#bpy.types.ToolSettings.mesh_select_mode


How do I make the 3D manipulator straight instead of sitting at an angle?

Maybe your transform manipulator orientation is not set to Global:


Look at this anatomy of an HDRI image:

This is how things will be mapped. So your clouds are mapped below horizon.

The texture's aspect ratio should be 2:1. Anything else and things will be placed in wrong places unless you correct with mapping vectors (correcting epirectangular mapping could be tricky).

Looks like what you have is just the top hemisphere, but you are mapping it onto both hemispheres. The easiest fix is to edit the image itself and add the bottom by extending the canvas with black.


Removing all points below an objects surface

Blender has a built in tool for this called "Select side of Active". To use it you have to switch to vertex select mode and select exactly one vertex. This vertex marks the boundary, that means that either all vertices e.g. to its left or right will be selected after you run the command. See my screenshot for the result, the white vertex was the active one before i ran "Side of Active".

Using the last operator panel (Shortcut F6) you can tell blender which axis and which direction to look for vertices to select. Once done, simply delete them.


sounds like the meshes that you are looking for are probably hidden (since you cant view them in the viewport (object mode) but they appear in the renderer).

Check your outliner and get a closer look on the "visibility" button if it is turned on, the camera button (next to it) it is also a toggle responsible for the visibility of an object when the scenes is being rendered.

Also be ensured that the object is in the desired layer and this layer is visible.

A last option is that you may have changed the layers and the visibility
 in Render Layers tab. So you may need to take a look over there too.


What is the difference between positive and negative rotation?

The Euler rotation is calculated by a rotation matrix which uses sine and cosine; These functions are periodical, which means it wouldn't make any difference whether you set the value for Φ to Φ+360° or Φ-360°.

image by Udo Brechtel (Wikipedia); the label Einheitskreis means unit circle

Rotating a cube by 90 degrees (or a rectangle by 180°) wouldn't have any effect to the un-textured appearance of the mesh, but it would for materials (think of it like differently textured faces).

As @cegaton already commented, animations rely on the direction of your rotation. An arm could reach the same position by rotating 90° in one or 270° in the opposite direction.

When you increase the rotation by e.g. 720° between two keyframes the object would rotate twice around the keyframed axis. Note that Quaternions behave differently you can't express rotations > 360° with them.


Preview render view is noisy, not sure what I did or how to fix it

As m.ardito says, "previews are just... previews"

Unless you set your preview sample value to something very high, you wont get good results like the final render. In fact, that is why it is called a preview. The point of a preview is to render the file fast so you can look at how it will change in the final render. In preview mode it is easier to make materials and change lights.

If you want a higher quality preview image, just increase the samples under "preview." But, be warned, setting the sample size to something higher takes much longer to preview.


How can i attach array objects to a curve while animating?

parent the spheres to the curve so when you move the curve the sphere will follow
animate the curve using shape key


Enable motion blur in the properties window:

Be ready to increase the number of samples as well when you use motion blur.

For more information on all of the many options for motion blur please read the bmanual: https://docs.blender.org/manual/en/latest/render/cycles/render_settings/motion_blur.html


how to control pose of an armature real time in blender?

There has been some work on using a kinect with blender, you might find some help in that work.

From python you can manipulate an armatures bones with -

myrigbones = bpy.data.objects['metarig'].pose.bones
myrigbones['chest'].rotation_euler = Euler((12.0, 0.0, 0.0), 'XYZ')

Don't think that will work in a game engine controller though - the BL_ArmatureObject available in the game engine has a channels property to access bones.


How to dynamically show/hide panel elements using python?

The solution was so trivial I didn't expect it to be. It's a matter of simply adding a conditional to the panel draw function:

class SomePanel(bpy.types.Panel):
    bl_idname      = "the_panel"
    bl_label       = "Panel with some controls"
    bl_space_type  = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context     = "object"

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

        layout.prop(scene, "is_enabled")

        if scene.is_enabled:
            layout.operator("object.select_random") # As an example.


How to add 'Properties > Camera > Focal Length' to 3D View Panel?

I would recommend starting with the templates available. You need to import the blender python module & register your panel.

import bpy
from bpy.types import Panel

class MyPanel(Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'  # properties section 'n'
#    bl_region_type = 'TOOLS'  # tool bar section 't'
#    bl_category = "My Tab"  # add to specific tab
    bl_label = "My Panel"

    def draw(self, context):
        TheLayout = self.layout
        col = TheLayout.column(align=True)
        col.label(text="viewport lens")
        col.prop(context.space_data, "lens")
        col.separator()
        col.prop(context.scene, "camera")
        col.separator()
        col.prop(context.scene.camera.data, "lens")

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

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

if __name__ == "__main__":
    register()

Edited

Removed Loop of all objects to find multiple cameras.
Added scene camera prop for local selection in the event of multiple
cameras

.


Only the first objects i made are rendering

Press the / key in the numpad (or on the menu go to View->View_Global_Local) to exit local view. –  cegaton 2 hours ago


How do you use the Boolean Modifier on an Ocean Modifier to cut a cube in half and apply a material to the bottom half only

With a boolean you can use difference as your boolean and select the ocean object.


One possible solution to your problem is to manually assign and remove vertices from the weight groups. having very little geometry as you do, it should be fairly simple to tweak the weights based on the geometry.
This can be accessed through the vertex group panel (upside-down triangle)
Based on your description I cannot tell if you have tried this yet or not.


blender 2.8: why do I need to scale 10x on STL export?

Did you apply the scale transformation after adjusting the scale ?

ctrl+ A --> Apply scale

then try it