Problem with Vertex Coordinates I'm using Blender 2.74 and trying to make this part of my code work:

import bpy
from math import *

me = bpy.ops.mesh.primitive_cylinder_add(radius = 0.5, depth = 1)

for v in me.verts:
    v.co[2] =v.co[2]+0.5

But appear the folow error:'set' object has no attribute 'verts'.

What's the problem?

If you print out the content of me in the console, you can see that it does not contain the cylinder's mesh data:

>>> me
{'FINISHED'}

The bpy.ops.mesh.primitive_cylinder_add operator, like most operators in Blender, returns its exit status (in our case {'FINISHED'} - signalling success) rather then the result of whatever it did.

If you want to access the vertices, you can do this through bpy.context.object.data.vertices, since after you add a cylinder primitive, it becomes the active object (context.object):

import bpy
from math import *

bpy.ops.mesh.primitive_cylinder_add(radius = 0.5, depth = 1)
me = bpy.context.object.data

for v in me.vertices:
    v.co[2] =v.co[2]+0.5

A few other things worth noting:

The vertex collection in the mesh object's data is called vertices (For instance: context.object.data.vertices) not verts. The bmesh module does call the vertex collection verts, which is probably why this confused you.
It's considered bad practice to import everything from a module, unless you're actually going to use everything you imported (from math import *). You should only import whatever function you intend to use. For instance:

from math import degrees, radians

Small tip regarding debugging in blender (and in general):
The error message you got gave you a nice lead for debugging. It says that whatever it is you're trying to use .verts with doesn't really have any attribute called 'verts'. The next logical thing is to check what the heck is inside the me variable by printing it, to see why it has no verts. This would have showed that me is indeed a set, not a mesh data object, which whould have indicated that the bpy.ops.mesh.primitive_cylinder_add operator returns an exit status, and not the cylinder's data.
[EDIT] And another late one. To get a shorter and more readable version of your scaling action, you can replace this:

v.co[2] =v.co[2]+0.5

With this:

v.co.z += 0.5


When I tick the use nodes button no nodes appear on my screen I am currently doing a donut course by The Blender Guru on Youtube and when I tick the box that says use nodes no nodes appear on screen.

This can have multiple reasons.

You can try View > View All, (Home) to show all present nodes.
If there are none, you can also add them manually through Add > Search


Why does the floor not have a texture? I put in a texture diffuse and normal texture image for my floor but it doesn't work. It has the texture correct in the preview but it doesn't show in the render?I would appreciate some help.

In order to see a texture on an object, you first must unwrap the object. In Edit Mode, select the entire object and then press U.

From there, there are many options. For a simple plane, I recommend going to top view and pressing project from view.

If you're unhappy with the size of the texture, go into the image editor, select your entire object in edit mode, and scale it up or down.


How do I get a cylinder arrangement of arrays with gradient (increasing/decreasing) heights? I have the following arrangement of same height cylinders in constanct distances and with constant diameter.
Anyone knowing whether I can make cylinders with increasing height as we reach the center of the arrangement. Something like a 3D Gaussian bell whith cylinders instead of points.

The code I am using to create them is the following:

import bpy, random
from math import radians
from mathutils import Vector

row = 10
column = 10

for i in range(row):
    for j in range(column):
        l = Vector()
        r = Vector()
        d = Vector()
        l.x = i*7
        l.y = j*7
        l.z = 1.5
        d = 3
        for xyz in r:
            r.xyz = radians(0)
        bpy.ops.mesh.primitive_cylinder_add(vertices=36,
                                            radius=1,
                                            depth=d,
                                            location=l,
                                            rotation=r,
                                            )

Thanks!

You have several flaws in your design.

The normal distribution is usually a two-dimensional function which only takes one variable as an input. You could multiply f(x) and f(y) and use the resulting value as the height.
Nearing a lot of iterations, you shouldn't use bpy.ops
Use the bmesh module to edit meshes and link the data blocks manually to the scene.
Vector objects can be instantiated with a tuple
Blender is slow with a lot of objects, aim to include all geometry in one object in the future

The resulting code may seem convoluted, but is faster and easier to maintain.

import bpy
import bmesh
import math
from mathutils import Vector

RADIUS = 0.16
HEIGHT = 32
SEGMENTS = 32
DISTANCE = 1
COLS = 20
ROWS = 20
SCALE = 1

MEAN = 0
STD_DEVIATION = 4

def normal_dist(x):
    global MEAN, STD_DEVIATION
    mean = MEAN
    std_deviation = STD_DEVIATION

    exponent = - math.pow(x - mean, 2) / (2 * math.pow(std_deviation, 2))
    return 1 / (std_deviation * math.pow(2*math.pi, 0.5)) * math.exp(exponent)

bm = bmesh.new()
bmesh.ops.create_circle(bm, segments=SEGMENTS, diameter=RADIUS*2, cap_ends=True)
bm.faces.ensure_lookup_table()
ret = bmesh.ops.extrude_discrete_faces(bm, faces=bm.faces)
bmesh.ops.translate(bm, vec=Vector((0,0, HEIGHT)), verts=ret['faces'][0].verts)

scn = bpy.context.scene

name = "me"

for i in range(COLS):
    for j in range(ROWS):
        pos = Vector((i - COLS/2, j - COLS/2, 0))
        pos *= DISTANCE

        name = "cylinder_" + str(i) + "_" + str(j)
        if name not in bpy.data.meshes:
            me = bpy.data.meshes.new(name)
        else:
            me = bpy.data.meshes[name]
        bm.to_mesh(me)

        if name not in bpy.data.objects:
            ob = bpy.data.objects.new(name, me)
        else:
            ob = bpy.data.objects[name]
            ob.data = me

        ob.location = pos.copy()
        pos *= SCALE
        ob.scale.z = normal_dist(pos.x) * normal_dist(pos.y) * HEIGHT

        if ob.name not in scn.objects:
            scn.objects.link(ob)

bm.free()

Sooo cool.


How to move forward or any movement which has surface deform modifier I have actually modeled a fish in blender and I had made surface deform modifier on the fish with the help of a youtube video.
I wanted your help in moving the fish forward or in circular motion but since I added deform modifier it is becoming difficult.
Therefore I humbly request you if you could help in getting the required objective.
Here is the blend file:

In your case, the idea is to take what can be "the main" object to drive all the other ones. If we take the force field and make it parent of the plane (flag like) then the force field will be the parent for all:

Select the flag plane then Shift select the force field and CtrlP then choose 'Object'.

Now add a curve, make the force field follow a path, adding this constraint:

The minus X is due to the force field orientation (rotated).

And...

To change the speed, select the curve and change "Frames" (the greater the slower):


Assign Materials by UV Island Help needed. I am using Blender 2.79 - I have a dress that I modeled and then unwrapped in UV layout. The problem is that I never added any material zones. What I would like to do now is add materials by UV island without having to try to select all those proper polys in 3d menu. Is there a way to add material zones by uv? Any help is appreciated!

If you are in your UV Editor, you could select a Polygon Face of any island and then hit L on your keyboard to select the island , after that you could assing a material.

Hope that helps.

Good Luck


I can't delete keyframe in timeline and dope sheet I want to delete keyframe for rendering.
but a keyframe is there and i had only same picture.

It exists on the timeline. :(

I don't solve with "click the keyframe and ctrl+i" Strangely, the delete menu did not appear.

I don't solve whit "dope sheet" Strangely, the keyframe is not here!!!

Summary should be enabled as well as hidden objects.


Having issues with Low Poly Texture Colours Blender Novice here.
I been getting into some basic low poly modelling for unity and have been working on applying a simple solid color texture to one of my trees.

The issue is that the colors seem to mix with adjacent colors in the texture even though the mesh is contained in the center of the color on the UV map.

I have been trying various methods but cant seem to fix it.

Any advice on how to deal with this?

EDIT: I dealt with it mostly by shrinking my meshes even more on the palette and then trying a better seam. Original seam was running along the top of the leaves now running along the bottom darker area and I no longer have the color leak.

As you can see in the image, green is leaking into the trunk of the tree from the color below it in the palette. As well as on the leaves.

you probably have too high the specularity of the material, what I'm showing you is an example in blender render, I'm not a render professional, my area is programming, but I've been studying for almost 4 years and today I work with shading language, and I'm still using BGE.

in conclusion you have to lower the specularity of the material so that it does not seem like it is going beyond the spaces of your color palette

I made my palette with 128 X 128 px squares
use unwrap view project, with the View Ortho 1
from the leaves of the trees select some faces from my unwrap and place them in another color to contrast

if you need to expand this answer, just say uqe more you want to know to include it in the answer


Fluid Domain disappears in cycles viewport render I'm experiencing this weird behavior with a fluid domain.

It looks like something is occluding the object whilst there's nothing else in the scene.

Even if I apply the FluidSim modifier, I still having this issue. Here you have a Blend file to see it for yourself.

In addition, I've uploaded the original blend file plus the last 10 frames of the cached simulation. Anyway, you could make your own cache:

https://www.dropbox.com/sh/a3wplh6bo8iiz4n/AADafjpXM95iDiWZtLoGWRSqa?dl=0

EDIT: I've experienced this again even with a brand new simulation made in official Blender 2.79.

Solution - to bring Fluid Domain whole visible in a viewport:

under Render Properties > Performance > Dynamic BVH change to Static BVH

or under Object Data Properties > Normals enable Auto Smooth

I don't have an explanation for that, very precise pixel based cut looks like some kind of clipping, but I don't see any type active. Also I was thinking about some flipped normals that caused something similar to me once (that's why auto-smooth probably worked here), but since the cliping is straight, it can't be a faces of fluid sim rather than something that cross it, but there is nothing like that ... :) Did you used FlipFluid add-on for that?

So, mystery wasn't explained yet :) But probably future generations will find some useful string of meanings from my notes, that brings a light into this dark old 2.79x ... :)

Anyway I don't have this issue in 2.8x


Branching Bezier Curves I am trying to model the "root feet" in the picture below.

I have used a bezier curve for the body -

But since bezier curves cannot branch, how should I continue the "feet"? I've tried blocking them out with multiple curves, but then I don't know how to combine them while maintaining good topology. Any help, advice, or ideas would be greatly appreciated.

If you want it to branch you need to use a mesh, not curves.

If you want your mesh to have an all-quad topology, here is the simplest way:

You can then further subdivide the edge rings to add detail and round off the roots more:

And with some additional fine-tuning of vertices and edge loops you can get something like this:

If you really want to use Bezier curves I recommend using the Sapling Add-on, which is packaged with Blender and just needs to be enabled from Preferences. It's ideal for making trees and other branching foliage. Although for a character such as the one you posted, I would model it as a mesh.


UV grid only showing on the uv/image editor not the 3d view UV grid only showing on the uv/image editor not the 3d view- this is what I mean http://imgur.com/rkS6G20

Judging from your screenshot, you're using Cycles Render engine and Textured View in the viewport. Cycles in this case behaves like this: It will show the image texture node on your model which is at the moment selected in the Node Editor (in the screenshot i marked it in a red circle), no matter if it is connected in the Node Tree or not. If you click another Image Texture Node in the Node Editor, the viewport will show you this one. Not seeing any texture could either mean you have no material set up at all, or an Image Texture Node is selected which does not provide any output at the moment.

The material preview mode on the other hand will give you a representation of the "real" material output, i.e. it tries to evaluate all nodes which are connected and show the result, independent of your selection.


Blender material button not working Blender material button doesn't work for selected object.

As you can see, it worked on the first object, but wont work for the plane, either. Maybe I messed up at the first object"s material, cause I'm new and it just wants me to give up?
I tried transparency to the first object and I assume that we wouldn't be able to see that without rendering, since it's not partially transparent in this view.

Thanks in advance.

In the screenshot it looks to me that you have to scroll up in the material window to view the contents, which for some reason is a bit higher up than what is currently shown.


Object rename detection my goal is to be able to detect when a child object is renamed in a way to display actual name and associated length value in every moment.
I first have a list of all name of object children.
If an object is renamed, I want to replace the ancient name in my list by the new one. However, it is not working when I rename several children.. Maybe there are others way to do it, or something I don't see in my code ? Thank you.

           for child in obj.children :
                if child.name not in bpy.types.Object.allnameList :
                    # A rename happened : Find the name to replace :
                    for w in range(len(bpy.types.Object.allnameList)):
                        if bpy.types.Object.allnameList[w] != child.name  and (bpy.types.Object.allnameList[w] not in obj.children) :
                            bpy.types.Object.allnameList[w] = child.name

Pointer property

Use a simple collection property with a name and a pointer to an object

import bpy

from bpy.props import CollectionProperty, PointerProperty

class ObjCollection(bpy.types.PropertyGroup):
    object = PointerProperty(type=bpy.types.Object)

def register():
    bpy.utils.register_class(ObjCollection)
    bpy.types.Object.foo = CollectionProperty(type=ObjCollection)

if __name__ == "__main__":
    register()

I've added the foo collection to every object... now off to the python console to test, clear the objects list

>>> C.object.foo.clear()

Load up every object in scene to context objects "foo" collection

>>> for o in C.scene.objects:
...     item = C.object.foo.add()
...     item.name = o.name
...     item.object = o
...

Rename every object in scene to "Bar"

>>> for o in C.scene.objects:
...     o.name = "Bar"
...

Iterate over context object foo

>>> for o in C.object.foo:
...     o.name, o.object.name
...
('Cube', 'Bar.001')
('Lamp', 'Bar')
('Camera', 'Bar.002')

The object formerly known as "Cube" is now known as "Bar.001" etc.

If the object has been since removed then

C.object.foo["Lamp"].object is None

We know that the lamp,  "Bar" formerly named "Lamp"  has been removed.

Please note: have defined the properties on classes eg bpy.types.Object and then deal with instances eg context.object.  In your question code it appears you have monkey patched a list onto the class bpy.types.Object (the one and only...) instead of, as shown in above,  the instances of that type (many)


Console flashes on launching, then closes (ms-windows) I installed blender on a windows 7 64 bit system.  I opened it one time then went to the tutorials.  in the meantime I had a power failure and when I tried to start blender again I get a dos window that closes itself then nothing.

I reinstalled Blender and get the same thing.  I am going to try to uninstall then reinstall but in the mean time, any other suggestions are welcome.

More than likely the problem is that your startup.blend and or userpref.blend file was corrupted. To fix this, just navigate to the user settings directory and delete them.

On Windows, the directory is located at
C:\Users\USER_NAME\AppData\Roaming\Blender Foundation\Blender\2.xx\config. See this post for more information on how to locate this directory on your os. This can work for both portable copies and installations.

OR

When uninstalling the program, tick Remove all files (second option) to make it delete the directory and then reinstall.

The next time you start Blender, it should start normally and if you tweak the interface and or change the user preferences and save them, it will write out new copies of these files with your new settings.


Reloading Scripts Behavior Should reloading scripts with F8 cause issues with the UI, and Blender all together? It has been doing such to me (factory defaults), but I don't know much about the feature.

A common issue arising is:

Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender\2.75\scripts\addons_contrib\
space_view3d_quickPrefs.py", line 939, in setup
    gllightpreset_chooseLoadLocation(1)
  File "C:\Program Files\Blender Foundation\Blender\2.75\scripts\addons_contrib\
space_view3d_quickPrefs.py", line 604, in gllightpreset_chooseLoadLocation
    filepath=bpy.context.scene.quickprefs.gllightpreset_importdirectory
AttributeError: 'Scene' object has no attribute 'quickprefs'

This is with factory defaults, but after reloading scripts. I have not changed the scripts folder either. Vanilla settings. This error will pop up every 100ms, until I enable the QuickPrefs addon from the Testing branch.

I'm really not worried about the issue of quickprefs, more than I'm really trying to find answers to the following questions:

1. Is the reload scripts command (default F8), only reloading the base script folder built-in with the Blender install, or does it reload all scripts referenced in the instance?

2. Does the "Scripts" Folder setting effect what folder is reloaded when executing "Reload Scripts".

3. Is it common for a brand new install, without any changes, or enabled addons to error when reloading scripts after it's very first startup?

The point of these questions is so that I may understand that portion of Blender quite a bit better, as well as know what is considered "normal behavior" before reporting bugs. My apologies for not being more clear.

Every addon uses a register function that allows it to add operators, panels, extra properties etc that it uses to work, it also has an unregister function to undo these changes when the addon is disabled.

If disabling an addon gives errors after being disabled that are related to properties or functions that it setup, then it is a bug in the addon that should be fixed.

You may notice that the addon you refer to is from addons_contrib, which is a collection of addons available that haven't been accepted as official addons to be included in release versions. Chances are this error is a known one and is one of the reasons it is still in contrib. In this case a release candidate is not being considered as a release version and includes the contrib addons, which may not be the best option.

While reloading scripts can help in some cases, it doesn't remove every change and start from scratch, for that you will need to quit then start blender. I believe reloading scripts relies on the unregister functions mentioned earlier to work properly.

Whether you are using a new install or an old one, it depends on the addon scripts enabled to whether any issues like this happen.


Array Modifier creates something that exports as single mesh, how to create same through group/parent/etc? I'm using Blender for Unity3D game asset creation.  The Array Modifier does something great (see below) that I would love to be able to do for arbitrary collections of objects.  I'm hoping someone might provide instructions / pointers / plugin / ... to help achieve!  So...

An unapplied Array Modifier creates an entity that behaves like a single mesh during export but can still be modified easily (e.g. change the curve, parameters, etc).

I wish to 'group' arbitrary objects to export the same way (possibly sub-including the results of an Array Modifier).

A concrete example

A table comprises legs and top.

The legs are identical so array-ed or group instanced (depending upon layout).  (Those legs might internally use Curve Modifier which we want to tweak in the future and their spacing might also need tweaking (picture doing this with a long curving fence if you're thinking manual answers!)).
On export, the arrayed legs appear as a single mesh (which appears in Unity3D as a single GameObject).  Perfect!

The table top needs including (otherwise its separation degrades performance due to requiring an extra draw call).

Group-ing in Blender does nothing (that I can tell?).
Parent-ing them merely produces same parenting in Unity = same performance issue.
Join-ing them will make the single object but prevent easy future modification.

Potentials

My research found is-it-possible-to-group-several-objects-and-then-manipulate-them-scale-rotate which suggests both parenting and grouping but otherwise nothing.

The only potentials I see involves temporarily joining before / during export.  This seems annoying overhead.  'Before' requires keeping the blend files outside Unity losing the lovely auto-update.  IIUC Unity imports blend files through some magic Blender-invoking that does an FBX export.  'During' might involve some programming hooks that might join things during that export but not modify the original file?

All thoughts welcome! Thanks in advance!

It seems that joining (CtrlJ) is exactly what you are looking for.

Joining shouldn't prevent future modification.
Within the joined mesh, there will still be two disjoint islands (or five, if each leg is disjoint): the table top and the rest of the mesh.

If you want to separate it again to work with, you can use P → By Selection. You can even, immediately after joining, save the table top as a vertex group so you don't have to worry about selecting it again later, although the Select Linked function (L or Ctrl  L) should work for that anyway.

Are there any other concerns for joining? If so, perhaps there's a workaround.


How can I show the Search Area box on a tracking point? This has never been an issue until just now but consulting the official documentation it appears that there should be a search box which is distinct from the pattern area.

https://docs.blender.org/manual/en/latest/movie_clip/tracking/clip/marker.html

Only... I don't seem to have it. I can see, rotate, deform etc. the pattern and I can resize the search area but there's no box to see the defined search area.

I've got some fairly fiddly tracking to do and to save time, I figured there's no point having huge search areas around each pattern, but the patterns are varied and organic in nature...

Maybe I've missed something but none of the videos I've caught seem to have it either. Did they removed this or is it disabled somewhere?

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

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


separate splines into multiple splines From an spline I'm getting a bunch of evenly distributed points between the control points of that same spline using the evaluate spline node. Now I want to create new splines dividing the original spline using the obtained points. The image below shows the desired outcome:

How can this be done using animation nodes?

Given a float list representing the parameters of the points we want to split at. We can compute a list with the last element removed and a list with the first element removed and use those lists as the start and end list of a trim node respectively as follows:


Artifacts / Darkening while baking I created this crate for a game I'm working on, I've been trying to bake my wood pallet texture I have but every time I try to do so my bake comes out having artifacts and the material itself darkens immensely. I've attached a picture, on the left hand side is my image after UV Unwrapping and on the right is after the bake. I've circled the artifacts with red circles. I'm using Cycles Render and the Bake Type is set to Diffuse. Any help or guidance would be greatly appreciated.

That's because there are no lights in your scene so it would be dark because lighting information is saved in baked textures when baking using the combined bake type.


How do I set the origin of an Armature Using Blender 2.8, I'm trying to move the origin of the armature.

I have uploaded my blend file here.

I am able to move the origin of the mesh, but not the origin of the armature.

I have uploaded a video here that shows how I'm trying it.

When I export my armature-mesh-object to Unity, the origin is the origin of the armature, that is what I need to change the origin of the armature. Changing only the origin of the mesh wouldn't help.

Thank you!

In object mode, put the 3D cursor where you want the origin to be, then select the armature and choose "set origin - origin to 3D cursor".

If you need precision for the placing, select the place (maybe a vertex, a face, a bone or whatever) and press Shift S "Cursor to selected", then again set origin.

When inspecting your file, turn off this option (that I don't even knew it existed).


Energy (glow) effect I am having an issue with this render. I only want the circular energy in the image to glow, not the whole scene. It was working before i saved it. Then when i came back to the saved file and rendered, the whole scene glowed. Hopefully this is a simple fix.

So managed to fix the issue only for a new one to arrive. I moved the circle to a different layer and turned off sky in RenderLayer001 in the layers tab. But now my human model glows with the circle..

Move the human model to a layer seperate from the glowing object and try rendering it that way.


How to change the pivot point of scaling to the center of selected vertices in Blender 2.8? I want to scale based on the center of the selected vertices in the image above. However, I don't know how to change the pivot point to the center of those vertices. I also don't think moving the object to the center of the global axis is the right way.

I think there was a function for this in previous versions, but I wonder if it disappeared? How does it work in Blender 2.8?

You just have bad transform pivot set up, you have to change it to the median point


Animation Nodes, how to add additional outputs? Missing outputs I am following some basic tutorials on animation nodes with latest Blender 2.81.

Tutorial

He is using older version of blender,
but right at the beginning he adds a Grid Mesh node with a very different output than what I find in mine.

For example, the same node "Grid Mesh" only has one output "Mesh" in my latest version, while in tutorial he has 3: Vertices, Edge Indices, Polygon Indices.

I am wondering if there is a way to add additional, missing, outputs in Grid Mesh node, or if there has been some change I am not aware about?1

You can use 'Mesh Info' node (Add -> Mesh -> Mesh info).


How do I change the Copyright information on a rendered file before rendering? I was looking at one of my render outputs (from blender render) and when I looked in more info (on OSX), I saw something that caught my eye.

How do I make it so that I can change that text in Blender before rendering? I'm using Quicktime with H.264 output but was wondering if I could do this with other video output types. I'm assuming python is required.

Looking at the Blender source code, the copyright seems to be hard-coded with the line:

  [qtexport->movie setAttribute:@"Made with Blender"

For this reason I don't think the copyright message is configurable via the interface nor via Blender's Python API, meaning the only option is to edit the copyright manually after rendering or see if you can write a Python script to do this (which would be a question for StackOverflow) and get it to execute automatically after rendering with an app.handler.


How to make this stylish «cutting mat» theme? Hello to everyone! I found this image in one of the topics called «How to make a curved Cone?».
Is this a «cutting mat» theme? Where can i find it? Thanks!

you can change the grid color here:

and background here:


How to get rid of shadowy texture on objects? I am trying to make a very simple diagram. I have these arrow-like objects that are inside of a transparent box. The arrows have this "shadow" on them, making them look dark. This effect looks fine on everything but the yellow arrows. I have removed all shadow effects, messed with lighting a little, and nothing changes. I am thinking it is texture related. I brought one arrow outside of the box, and it is still there. I have included a couple screenshots of the image and my settings.

I am extremely new to blender, and I am trying to keep this project relatively simple, so I would appreciate the simplest possible fix.

It's hard to tell from the images alone what you mean, there may actually be two different issues at play here.

As mentioned by Mr Zak you could easily make your arrows shadeless either by

Increasing Emission -  This will make the object as if it were emitting light, it will partly retain shadows and glossy reflections (with the right render settings you can even actually maker them glow if you render with Blender Internal)
Turning on the option Shadeless under the Properties Window > Material Options > Shading - This Will make your object flat colored, as if it were bi-dimensional, no shadows, no glossiness, or shine, and no light emission (basically doesn't react to lighting)

There is another issue at play here, that may be slightly messed up normals which will yield weird or unexpected shading. Use an edge split modifier on all your objects to make shading as expected.

Have in mind that switching to Blender Cycles may not be a full lasting solution on it's own, it will require setting up materials and scene differently from scratch since they are two completely separate and independent render engines, and Blender Internal materials are incompatible with Cycles and vice-versa


Mesh streching when rotating bone I have a stickfigure that I made and I want to rig. Most of the thing is working fine but the arms and legs are streching very weirdly. I want to make it in a way that, for example, if I rotate the elbow, the scale of the mesh wont change just the rotation of the mesh. I also want to be able to rotate each cylinder individually in its local location, regardless of the global location. So currently I am looking to make the normal mesh work and then adding this on top somehow. Any help would be appreciated!
Here is how it is in Rest:
Here is with some rotation:
I read some of the other posts but after attempting the solutions, I keep getting the same issue.
The file can be found here: https://www.dropbox.com/s/x8j4y8iofyul67z/stickfigure.blend?dl=0

You've scaled the armature in Object mode, you need to apply the scale in Object mode and it will work correctly (CtrlA).
About your deformation problem: After parenting With Automatic Weight you need to give some corrections in Weight Paint mode:


How to change display/render order of several grease pencil objects in Blender 2.82? I have 4 grease pencil objects. I am trying to get one to be displayed in front of the other ones but I can't find a way to do it. I could just pull it closer to the camera in the 3D space but then sometimes I get ugly white lines around the object. I don't understand how blender decides which grease pencil object to be on top and which one to be on the bottom. (not talking about the grease pencil layer order!)

Arranging them in 3D space is the only way I know of for separate grease pencil objects. e.g. to make one object display behind another just move it backwards on the y-axis.


STL Export from Makehuman Model giving strange results? I'm trying to make 3D models of characters from my novels, in order to make my own 'figurines' of them via 3D printing.  I've done the first one, and there are no non-manifold edges.  At this point, before I posed the character, I did a test export just to get an idea of the cost from Shapeways.  At this point, I ran into a problem.

When I export the model to STL, the STLViewer program cannot actually open it, instead crashing and causing multiple error messages.  When I import the STL back into Blender, it is slightly deformed.  When I upload it to Shapeways, the clothes seem to have disappeared, the face is deformed, and it doesn't pass the printability checks.

This occurs regardless of whether I export just a single part of the model (e.g. the hair) or the whole thing.  What can I do to actually be able to export these models so that I can 3D print them?

I'm using Blender 2.79.

Update:
I've also tried exporting in OBJ format, with identical results.

Never mind, I've got it worked out.  It was a question of units.  I'd scaled it in metres in Blender, but Shapeways no longer seems to accept uploads in metres, just in millimetres and inches.


Exporting form blender to unity I am having trouble with exporting a simple "map" from blender into unity. I have tried to export it as a .fbx file, but that doesn't help me that much as it gives me what looks like an incomplete mesh, but yet it is there. I used a plane mesh to make this asset, but I am not sure that the problem

I was wondering if anyone was having this problem as well and could help me quickly

Any help is very appreciated,

thank you.

(btw I am using blender 2.8)

The normals on your mesh are inverted. The effect you're seeing is caused by backface culling in the game engine, where faces with normals pointing in the opposite direction of the camera aren't rendered.

In order to fix this, you can try to recalculate the normals to face outside by using Mesh > Normals > Recalculate Outside or Shift + N. If they are consistently flipped in the wrong direction you can also use Mesh > Normals > Flip.

Blender has helpful options in the Viewport Overlay settings for detecting inverted normals. While in edit mode, you can display the normals. This allows you to easily see when the normals of your entire mesh have been inverted.

Sometimes only a few faces may have inverted normals. These can be quickly spotted by enabling the Face Orientation option.


Are there any tools for making irregular polygons regular? Are there any tools in Blender that take irregular polygons and make them regular (approximate a circle)? I'm specifically looking for a solution that works with preexisting polygons. Also, it would be nice if it keeps the overall position after making it regular.

Irregular Polygons

Regular Polygons

You can use LoopTools addon, which is already with the official Blender builds.

Enable this addon from the Add-Ons list, then select the target face, then W > LoopTools > Circle, which will distribute vertices circularly and evenly.


Why can I not edit the Mesh name in field created with row.prop(obj, "data") With the following code I can read out the name of a mesh data block.

row.prop(obj, "data")

And with the following code I can read out the name of the object.

row.prop(obj, "name")

But I noticed that I cannot edit the mesh data name only the object name.

Here is the code from Blender that generated the mesh data block UI.

class DATA_PT_context_mesh(MeshButtonsPanel, Panel):
    bl_label = ""
    bl_options = {'HIDE_HEADER'}
    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}

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

        ob = context.object
        mesh = context.mesh
        space = context.space_data

        if ob:
            layout.template_ID(ob, "data")
        elif mesh:
            layout.template_ID(space, "pin_id")

Think of Objects as containers, which can contain Curve data or Mesh data (and a few other kinds).

obj.data will refer to the Mesh or the Curve of the object. You would need to do the following to display the mesh's name

row.prop(obj.data, "name")

Or replicating what the standard panels do (with or without the icon).

    obj = context.object

    col = layout.column()
    if obj.data:
        col.prop(obj.data, "name")
        col.prop(obj.data, "name", icon="OUTLINER_DATA_" + obj.type)
    else:
        col.label('An empty selected')


How can I make my animation play for longer than 250 Frames? I'm trying to find the settings that allow me to see longer previews of my animations when I play the animation with ALTA.

The animations default to only 250 frames long, but I'd like them to be longer. What is the way to do this?

Changing the Length of Your Animation

In order to see a longer preview of your animation, you need to make your animation itself longer. To do this, you can change end End Frame of your animation in several places:

Properties Editor > Render tab > Dimensions panel: Set End Frame to a higher value
Timeline area: Increase the End value
Timeline area: Place the green frame cursor on the desired end frame, press E to set it as new End

NOTE: Changing the End frame in any of these places changes it in all the other places also


SVG Render (Freestyle) resulting in lots of open paths I am rendering this design in Blender that is made of lots of Circles. Need to export it out to Illustrator, but realizing the resulting artworks having all open Circle path. Wonder if this is a known issue and if there is any option to toggle it?

Thanks!

Looks like there is one operations in Adobe Illustrator that "OUTLINE" the whole line art illustration. So that should be ok. But I think Blender output of SVG is a bit dodgy.


Where do these hair artifacts come from? I'm rendering some hair close up, with a fresnel-based material on them:

The majority of the render looks fine:

However, some areas have a scratchy-looking artifacts running perpendicular to the hair length:

What cases these artifacts?

I guess you are using curve segments as primitives for your hair. In this case Blender interpolates the segments between the simulated hair particles using cardinal splines. However it can only approximate the spline using linear, tube-like segments.
It looks like Blender does not close the gaps between the tubes properly. You can reduce the effect by increasing the Curve subdivisions in the Cycles Hair Rendering settings:

This will however hurt performance since more geometry is created.

Here is a comparison of Curve subdivisions set to 2 (top) versus Curve subdivisions set to 4 (bottom):

In the bottom image the white lines are gone, however you can still see that the curves are only approximated by straight tubular pieces (see the edge of the hair in the bottom left corner and the shading of the hairs in the bottom right corner).


How to pass additional property value with operator_menu_enum on execute? I have an operator with couple EnumProperty properties, all of them enumerate the same item list. I'd like to know which property changed on execution from layout.operator_menu_enum().

With simple layout.operator() I can set it's property like this layout.operator(...).some_property = "value", can I do something similar with operator_menu_enum?

Not Currently.

(2.79. sept 12-2017) operator_menu_enum(....) doesn't return the operator reference, so assigning something to layout.operator_menu_enum(....).some_property='something' will fail.

would be super handy if it did.


Boundary loop of selected faces There was a couple of weeks before, Blender version which lets you determine boundary loop of seleced faces in edit mode.

I can't find how to activate this addon in todays build.

https://builder.blender.org/download/

Operator was called boundary loop in edit mode.
Could you tell me how to get this ?

Are you refering to this?

Boundary Loop

Reference

Mode: Edit Mode –> Edge select mode
Menu: Select ‣ Select Boundary Loop
Select Boundary Loop does the opposite of Select Loop Inner-Region, based on all regions currently selected, it selects only the edges at the border(contour) of these islands. It can operate in any select mode, but when in Face mode it will switch to Edge select mode after running.

All this is much more simple to illustrates with examples:

The steps I took to use Select boundary loop in version blender 2.77

Hit Tab to enter edit mode.
Make sure you are in select face mode.
Select the faces to be converted to edge boundary selection.
Hit Ctrl + E and select "Select Boundary loop"
That's all.

If your command isn't there, make sure you downloaded the official release.


Can I update a Make Human model in Blender without losing my animation? I did a lot of animation on an mhx model in Blender before I realised she had holes around her neck. Someone on the Make Human forum suggested I use an mhx2 character which solved the problem. Is there a way I can just update the character from within the same Blender file without loosing the animation?

I tried exporting the animation as a bvh file and reloading it onto the mhx2 character in a new Blender project but I've had all sorts of problems. It imports a skeleton of bones which walks downward on its own, or a tiny one which walks sideways on its own or some upside down orange balls which wander about. It's obviously got the animation which is good, I just can't get it to attach to the mhx2 character.

So to be clear I either need to

just update the model from mhx to mhx2 within the same project and not loose the animation
Export the animation as a bvh file and upload it onto an mhx2 character in a new project
Work out why my mhx character was making holes  around the neck in the first place and fix that. (this is the option I prefer as I need the project finished tomoro but i would like to learn all three)

I'd go with option 3, especially if your deadline is tomorrow.  Especially if it's just a matter of re-topoligizing, and then re-weightpainting just a bit.

If you want to learn from this, I suggest try having a master-slave style rig.  That means you have one set of bones you animate directly, and those bones in turn constrain a bunch of 'slave' bones that only deform the mesh.  That way if you want to re-import your model later on, you can simply re-constrain those 'fresh' new bones to your older animation rig.

You can even have two separate armatures, one for deforming, one for animating to make the re-constraining process clear to yourself.  Although I've found this method a tad obscure, and not considered canonical Blender rigging.


Array modifier working, but not doing what I need I am working on a subway in blender inspired by a Blender Guru tutorial, and when making the stairs, I used an array modifier.
But, I had to eyball it to make sure that the relative x,y, and z values were making it aligned.
Is there a way to just tell blender that you want to make them joined up?

You want your stairs to follow the corridor orientation (I put the origin to the geometry so that we can see the XYZ local or global orientation):

The Array will use the local XYZ to duplicate the instances (here the object local orientation is still aligned with the global orientation).
For example if you set 1 on the X axis in the Array modifier it will mean that your mesh will be duplicated on the local X axis and that the duplication will perfectly stick to the original mesh (and if you enable the Merge option, once you'll apply the modifier, the vertices of the original and of the duplicationss will automatically merge).
If you rotate the mesh in Edit mode, like you're trying to do currently, it will make the work a bit more tedious than if you kept it aligned with the local axis, because the values that you'll need won't be 1 anymore, you'll need to find them visually. In some cases you need to work that way, but in your case it would be much simpler to do that:

In Edit mode, align back your stair with the global axis (or recreate it):

Use values of 1 for YZ:

Go back in Object mode and rotate your stairs on the Z axis so that they follow the corridor orientation, to be more precise you can press Shift after having pressing RZ to rotate:

Also, this method has another advantage, if you need to make some changes to your stairs, you won't have to change the XYZ values, the instances will automatically align correctly, as they are still aligned with the local axis.


Erase part of mesh beyond intersection I am trying to make a simple coffee (I'm a beginner but not using any tutorials, I like to explore things on my own), here's what I've got:

What I want to do now is erase the part of the torus mesh that is inside the cup, I tried joining the cylinder and torus but that didn't help much (Why would it help anyways). How can I delete that unwanted part? B-Selecting/Deleting vertices isn't very efficient and easy to work with.

Know all the mesh selection tools.

In your case the Lasso or Circle Select tool could help.

Other mentionworthy tools:

Expand Selection - ⎈ CtrlNumpad+
Reduce Selection - ⎈ CtrlNumpad-
Select Edge Loop - ⎇ Alt RMB

You could also use a boolean modifier.

Select the torus and apply a boolean modifier with the cup as Object and the Method to Difference. Apply the modifier. Now you can use the Select Linked Tool L to delete the unneeded vertices.


Is overlapping but not connected geometry bad? In hard surface modeling, I sometimes end up with overlapping faces whose vertices aren't connected:

Is this bad geometry, and should I try to connect them with vertices, or is this totally fine?
The models are for use in games / for practicing and just for fun.

Should you avoid it? Yes.
Does it necessarily look bad?
It depends on the direction of the normals of the two overlapping faces.
If the normals are facing the same way you might have some bizarre results in Unity or other game engines. If they're facing different ways and you're using a 1 sided material shader it's not going to look wrong, just 2 sided, and you might not even notice it because a side would be on the inside, and if one only cares about triangle/face count it's totally ignorable.
Anyway, yes, as I said, do avoid overlapping things if you can.


How to create socket that pass lists of POPO (Plain Old Python Objects)? I am building custom nodes that operate on messages generated by an external source. I have developed Python classes that encapsulate these messages. I have a Blender addon that gathers a collection of these message objects and a custom node that packages multiple messages into plain old Python lists. I want pass these lists down stream to other custom modes across a socket. I have having trouble understanding List Sockets. I get "NoneType is not iterable" errors on even the simplest of implementations. I understand what the error means, but not why its being generated. Any pointers on where I should start? Also, is there any way to increase the fidelity of the diagnostic messages in Python / Blender / AN? I find that the stack traces and other information provided by these errors are not very helpful.
Thanks All,
Mike

The solution is pretty obvious, but here it is in case someone else has a similar problem. The problem was not with the socket but in the node, and the problem was that the node's execute() method must  return a collection of N items where N is the number of output sockets.


Colour shift car paint / Chameleon car paint How would I achieve a material effect like this ? Colour changes depending on the angle from Purple, Blue and orange.
I have no idea how to approach this since I am not familiar with materials. I would also like the material to have a very subtle shimmer to it / Glitter effect. No fussed about what renderer is used.
Thanks
Etienne

You can try something like this. Reflection works (as a coordinate) on it's own, but I feel it looks better when the vectors are combined with the Window vectors.

The "glitter" effect, you can get by using a White Noise texture as the metallic factor. I added the Voronai Texture, because it's a trick to make it so the White Noise isn't "infinitely zoomable". It also allows you to change the randomness of the shapes. I added the MixRGB to mix it with white to bring the whole texture back closer to "pure metallic" (100% white).


Vertex jumping when moving objects with the mirror modifier I was working on a character using mirror mode. I then created a separate object and joined it to the main mesh. However, after I tried moving this object, a few vertices from the end of the mesh would jump to the mirrored portion of the character:

I tried replicating this effect in other files, but it didn't always happen.

Is this a bug? Is anyone else experiencing it?

Note: This was in blender 2.77, with on additional plugins installed. The mesh had a subsurf modifier on as well, but the jumping occured even if I removed it.

It happens to me time to time as well, but only when I forget to uncheck 'x mirror'in the Tool Panel within the Options Tab.

If that is checked and you only have half a mesh in the case with a mirror modifier, Blender will try to calculate the missing halves verts by pulling them over to the missing side.

Either way, just uncheck it and things will be back to normal. :)


UV unwrap each face of an object via python script I have an object with several faces, and I want to loop over the faces, adjust the view for each differently and then UV unwrap the face from the chosen view.

I managed to do it using Blender GUI but how can I automate it via a python script?

This is the code I was trying with... I keep getting either a context error or an error saying that BMFace has been removed :s

import bpy, bmesh
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.select_all(action='DESELECT')
bm = bmesh.from_edit_mesh(bpy.data.objects['my_obj'].data)
for face in bm.faces:
    face.select = True
    if [...] : # Condition chosen to know which face this is
        q = Quaternion([...]) # Set desired corresponding view for this face
    for area in bpy.context.screen.areas:
        if area.type == 'VIEW_3D':
            break
    for region in area.regions:
        if region.type == 'WINDOW':
            break
    space = area.spaces[0]
    context = bpy.context.copy()
    context['area'] = area
    context['region'] = region
    context['space_data'] = space
    r3d = space.region_3d
    r3d.view_perspective = 'ORTHO'
    r3d.view_rotation = q

    for window in bpy.context.window_manager.windows:
        screen = window.screen
        for area in screen.areas:
            if area.type == 'VIEW_3D':
                for space in area.spaces:
                    if space.type == 'VIEW_3D':
                        for region in area.regions:
                            if region.type == 'WINDOW':
                                override = {'window': window, 'screen': screen, 'area': area, 'region': region}
                                bpy.ops.uv.project_from_view(override, orthographic=False, correct_aspect=True, clip_to_bounds=False, scale_to_bounds=True)
    face.select = False

Please help!

Manipulating UV coordinates in python is usually done via the bmesh interface.

I include an example from barber-pole.py

def spiralUVs(mesh, xPlus):
    # add a UV layer called "spiral" and make it slanted.
    mesh.uv_textures.new("spiral")
    bm = bmesh.new()
    bm.from_mesh(mesh)

    bm.faces.ensure_lookup_table()

    uv_layer = bm.loops.layers.uv[0]

    nFaces = len(bm.faces)
    for fi in range(nFaces):
        x0 = fi*2/nFaces
        x1 = (fi+1)*2/nFaces
        bm.faces[fi].loops[0][uv_layer].uv = (x0, 0)
        bm.faces[fi].loops[1][uv_layer].uv = (x1, 0)
        bm.faces[fi].loops[2][uv_layer].uv = (xPlus+x1, 1)
        bm.faces[fi].loops[3][uv_layer].uv = (xPlus+x0, 1)
    bm.to_mesh(mesh)

Some other examples that set UV texture coordinates include

http://web.purplefrog.com/~thoth/blender/python-cookbook/expand-uv-to-fit.html
http://web.purplefrog.com/~thoth/blender/python-cookbook/uv-from-geometry-cubic.html
http://web.purplefrog.com/~thoth/blender/python-cookbook/meshFromBathymetry.html
http://web.purplefrog.com/~thoth/blender/python-cookbook/thicken-texture.html


How do you animate a Rigify character? I'm in pose mode, in the animation tab, the Rigify character is all at the default pose and default location. I make the animation range from 1 to 20.

On frame 1, I select the root bone I press i and choose location, a keyframe appears.
On frame 20, I select and move the root bone, I press i and choose location, a keyframe appears.

I press the spacebar nothing happens.

What am I doing wrong?

[UPDATE]

I did some more research and  what is preventing my character from moving is when you convert a bone to a wiggle bone. Without everything works as expected.

Not all bone automation using drivers and add-ons will work when rendering or might interfere with bone rendering animation.

In pose mode select all bones then go to

Pose> Animation> Bake Action> OK

This will disable all built in automation but will assure that your animation looks identical in your renders as in the viewport.


How to End object in BGE after multiple collisions I am a student from Malaysia studying animation. This is my final year and I decided to make a 3D game using blender. In my game, I want the object in the BGE to end after taking two or more hits. Because it's too easy to make it die after taking one hit, is there any way to solve this ?

Make a new Game Property called lives. Use a collision sensor set to tap, and make a new Property actuator, set mode to add, property to lives, and value to -1. Then add a Property sensor, set property to lives, and value to 0. Connect it to an Edit_Object, end_Object actuator. Set lives to however many lives you want. Hopes this helps


How can I modify the frame rate without changing overall animation speed? How can I change the animation fps when I already have finished making an animation? I already did an animation and I don't want spend some time recalculating the time by hand, is there a easy way to change the frame rate without making the animation speed up or slow down?

You can change the timing of an animated scene without changing the frame rate. In the rendering settings Dimensions there is a time remapping section:

It works like this:

The values are in frames

For example:

If you want the whole animation to run twice as fast you set the old to 100 and new to 50.

Animated values that took 100 frames now will happen in 50

To make the animation last twice as long (slower) map old to 100 and new to 200.


gltf2.0 export ignores "Inherit Rotation" property changes This potentially affects other bone properties, but this is the only one I'm comfortable with messing with. Is this simply not something that's supported by gltf2.0 or is there a setting I'm missing during export?
Edit: Looks like this is an issue with an a solution currently being tested.

glTF has a straightforward node hierarchy, where children always inherit all of their parent's transforms.  It may not be able to exactly match Blender's options for things like "Inherit Rotation" specifically.
That said, there is an "Always Sample Animations" checkbox under the animation section of the glTF exporter.  This is on by default, and is intended to pick up the effects of all sources of animation, including Inherit Rotation.  If you think you've found a bug, check the issue tracker for similar issues, or file a new issue there.


How do I delete a mesh/object in the middle of my animation? I'm an MC animator, and I am a noob. I want to create an animation where the world deletes, and the character falls into the main grid thing.

I use a MAC, and Blender 2.79b.

I think that one way to achieve what you want is to scale to 0 and very fast your world in order to create the illusion of disappearing. Like in the GIF below.

If you need more details about how i have made the animation please let me know.


How to mirror/copy changes to other side of mesh I am working on making a shape key for my mesh to blink. I did one side and am now trying to duplicate the changes to the other side. Is there a way I can just copy everything from the left side of my mesh and apply all the same changes to the right side?

I know there is a mirror option but the vertices on the right and left sides are slightly different due to previous blinking iterations so I was hoping to just copy everything over.

https://imgur.com/a/HhvYsPY

There are lots of fancy options, but perhaps the simplest and least likely to cause unwanted issues, that will serve you well as a basic tool long into the future, is to just duplicate the vertices and scale by -1.

Please note, you can also just use the mirror tool (see link below), but this method does not depend on having other vertices selected, so it is more versatile.

Delete the vertices on the bad side.
Set the 3D cursor to the middle of the head.
select the good vertices (the mirror of the ones you deleted) (ctrl + shift + M).
shift + D to duplicate.
Set pivot to 3D cursor
s, x, -1 to flip over the X axis.
alt + m to merge the doubles.

Some of the other options are:

Delete half and use mirror modifier.
Symmetrize in edit mode.
Mesh -> mirror ctrl + m in edit mode.


How to make an object automatically take the same height as another object? I am currently working on recreating a city in Blender.
I have two 3D versions of this city: the first one comes from my lidar data, therefore it is deformed and very "raw".
The second one is a clean 3D version (a simple extrusion of the buildings from an openstreetmaps map), but the buildings do not have the good height.
I am very new to using python with 3D objects, but do you think it is possible to make a script that would make my clean 3D buildings automatically take the height of the buildings of the raw lidar version?
I would imagine, as an example, a script that would make my two objs have the same height when the x and y coordinates are equal?
I would appreciate any help, even by just telling me "where" I should look at to find answers.
Thanks in advance
Victoria H
EDIT 1: Here is an example of my buildings: on the right the "clean" one, which has wrong elevation, and on the left the one that comes from lidar data and is deformed but has good elevation

EDIT 2: I applied a shrinkwrap modifier, and the elevation infos seem to be correctly aquired by my "clean" buildings. However, they are slightly deformed on the x and y axis. Is there a way to apply this modifier only on the height of my objects (Z axis) and not on the x and y axis?

EDIT 3: here is a link to a blender file where I have saved 2 of these buildings:
SCREEN 4:
EDIT 5: After using looptools to flatten the roof

Maybe the Shrinkwrap Modifier can help you out. (I think i unlikely but i though I'd propose the idea anyway, just in case.)

Both cities have to be one object each though (Separate > By Loose Parts could be done later)

And in this example (Mode: Project, On Surface) the blocks with the right height slightly overlap the map blocks so the map blocks vertices have a surface right above them to snap on to.

Edit:
I suspected the top faced wouldn't turn out flat. But you can use LoopTools to fix that if needed.
Go to Blender Preferences > Add-ons. Search for "looptools", and check the box next to Mesh:LoopTools.
Go to the 3D Viewport and in a sideview (Numpad 1 or 3) you should be able to easily select all the top faces of the buildings (select the top vertices in Vertex Select and then switch to Face Select is best i think).
With all the top faces selected, press N to open the 3D Viewport Sidebar Panel (if it isn't op en already) and click the Edit tab. Extent the LoopTools menu. Extent the menu under the Flatten button. Choose Plane:View. Press Numpad 7 to go to topview and press the Flatten button.
All the faces should now be flattened while still being at their own respective heights.


How do I tell python to ignore a certain specified bone when it is not present in the armature I am writing a script to certain bones inside of an armature.
But if the script cannot find one of the bones I have specified the whole script just dies out and doesn't run any further. how can I make it so that if the script can't find a bone it ignores that bone and goes onto the next line of code.

You can use try statement in Python script.
See the document here.
A simple script:
a_list = [1,0,2,3,4,5]
result_list = []
while a_list:
    try: # Try to run this block
        divider = a_list[-1]
        result = 60 / divider
        result_list.append(result)
    except: # if "any" Error happen, do this block
        print(f"Oops, something go wrong: divider:{divider}")
        break
    finally: # whether there is an error or what, run this block
        a_list.pop()
result_list

Output:
Oops, something go wrong: divider:0
[12.0, 15.0, 20.0, 30.0]

Please don't silently bypass an error in code, let user know what happens and if possible, let them decide what to do explicit.


How can I mask an object to allow another object to show through? I have an outer eye and an inner eye.  I'd like the blue iris to show through the outer eye.  In my source files shown below, I've got a couple masks.

I suspect the answer is an image texture node with the mask file, but I'm not sure how to set that up.

If another solution seems better, I'm open to suggestions.

For reference, the .blend is here.
Thanks!

Generally, you would combine the 2 images using a mix shader, and use the mask image as the mix factor. See Below:


How to change origin of a layer in stroke in Grease Pencil? May I ask how to change origin of a layer in stroke?
Cuz all the layer will be affect in the object mode
while the option [origin to geometry] is not available in the edit mode

In Edit Mode, you select the point where you want the origin to be. Then Shift+S > cursor to selected.
In Object Mode, Right Click > Cursor to Selected.


Set the Rotation (in Quaternion WXZY) of a bone using API 2.49 I am using Blender 2.49b, and I have the following hand structure

I would like to rotate the bones "Bone.001" to "Bone.025" using values (Quaternion WXYZ) given as input from text files.

Although I read the text files, I am not sure how to set the rotation values of every bone.

...
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
    for handIdx in handIndices:
        pos = dataStore['Bone'][handIdx-1][frameIdx]
        bone.setRotation(pos[0], pos[1], pos[2], pos[3])
        bone.insertIpoKey(Object.IpoKeyTypes.LOCROTSIZE)

Scene.GetCurrent().update()

setRotation property doesn't work, giving the following error:

AttributeError: 'Bone' object has no attribute 'setRotation'

Could you please help me to find the solution on this manner.

Thanks in advance for your help and consideration.

Best Wishes,

Andreas

PS: If necessary, I can provide the blender file and code.

Bones have two rotations.  One is the rest orientation, and the other is the pose orientation.

The pose orientation is manipulated something like

obj.pose.bones[0].rotation_mode = 'QUATERNION'
obj.pose.bones[0].rotation_quaternion = q

But the rest orientation requires you to be in edit mode, and you have two choices.  You can manipulate the head, the tail, and the roll (requires extra math).  Or you can set the head and tail to a base state and use functions to transform the bone (and let those functions do the math for you).  Here's an excerpt from http://web.purplefrog.com/~thoth/blender/python-cookbook/bone-orientation-demo.html

translate = Vector([0,0,1])
bpy.ops.object.mode_set(mode='EDIT')
bone = obj.data.edit_bones[0]
bone.head = [0,0,0]
bone.tail = [0,1,0] # Using the Y axis is pretty important, otherwise we can't use the inverse of Q to pose the cube to an unrotated state
bone.transform(q.to_matrix())
bone.translate(translate)

I learned about EditBone.transform from  How to rotate an EditBone? is it possible .

I'll just jump to the conclusion that you want to alter the pose.  The other weird problem with your code is that it looks like you are setting the orientation of each bone several times (handIndices) and replacing a keyframe each time.  Since you are having difficulty updating your code to use the techniques in my examples, here is a rewritten version of your code with a couple of alternative implementations to choose from:

scn = Scene.GetCurrent()
arm_ob = scn.objects.active
bones = arm_ob.pose.bones

if False:
   #more like the original code
   for bone in bones:
      # use bone here
      for handIdx in handIndices:
         # why are we setting the rotation several times for the same bone?
         pos = dataStore['Bone'][handIdx-1][frameIdx]
         bone.rotation_quaternion = pos
         bone.insertIpoKey(Object.IpoKeyTypes.LOCROTSIZE)
else:
   # maybe handIndices is a list of bone indices?
   for handIdx in handIndices:
      pos = dataStore['Bone'][handIdx-1][frameIdx]
      bone = bones[handIdx-1]
      bone.rotation_quaternion = pos
      bone.insertIpoKey(Object.IpoKeyTypes.LOCROTSIZE)

Scene.GetCurrent().update()


Way to get vertex index to use in new vertex group from selected faces I try and not undertand if i am on the right way, that code i want to set the select
faces, make a vertex group, this is a piece of code:

    ob = bpy.context.object
    me = ob.data
    bm = bmesh.from_edit_mesh(me)

    vertex = [v for v in bm.verts if (v.select==True and not v.hide)]
    ver_grp = ob.vertex_groups.new(name = "My vertex group")

    ver_grp.add(???,0,'Replace')###not sure if replace can make ex novo

You are on the way

Let's talk about the vertex list line first

You can use v.index for list: vertex = [v.index for v in bm.verts if (v.select==True and not v.hide)], so the vertex will be a list contains your vertices indices.

Next, vertex_group.add() method:

It need 3 arguments (index, weight, type):

index: should be a list contain indices
weight: should be a float value in 0.0~1.0
type: should be a string in {'REPLACE', 'ADD', 'SUBTRACT'}

So you can use ver_grp.add(vertex,1.0,'REPLACE') for it

Sum up your code:

ob = bpy.context.object
me = ob.data
bpy.ops.object.mode_set(mode='EDIT') #You need to enter edit mode for bmesh
bm = bmesh.from_edit_mesh(me)

# not a good practice to use vertex for vertices indices list
v_indices = [v.index for v in bm.verts if (v.select==True and not v.hide)]
ver_grp = ob.vertex_groups.new(name = "My vertex group")

bpy.ops.object.mode_set(mode='OBJECT') #You need to enter object mode for add()
# Add . in float number help people know it is a float instead of int
ver_grp.add(v_indices, 1.0, 'REPLACE') # most of the blender string enums use upper case


Weird Unwanted Symmetry during Sculpting I was doing some sculpting and came across something weird.Even though I am turning off symmetry my sculpts still gets symmetric in such a way that every sculpt has an adjacent deep on their corresponding side(if that makes any sense).The point is if I sculpt using any brush simlar hole is created on the other side corresponding to the mountain I created.I tried changing the brush types but still it doesn't work.Please help.Here's the blend file.

In the symmetry settings, set your radial X parameter to 0.


How to connect different bone structures from the same armature? Hi!

I'm fairly new to Blender, and I've been having some trouble figuring out how to correctly rig a model.

Inside the model, I have different bone structures for the legs, arms, head and torso. Those all work wonders.

However, when I pose the torso for example, the root of the other bone structures stay unaffected.

Here you can see that when I move the upper torso area, the root of each arm and of the head stay where they were.

I'm sure this question has already been asked a million times but I'm not really sure how to phrase it without going into detail about it.

A solution I thought of was to use Empties, since I heard that those are used in more complex models to control different structures.

But I'm now having a hard time figuring out how to parent everything correctly.

Am I on the right track? Has this same question been asked before and I didn't find it? Thanks in advance for your answers.

P.S.: Please do not include the use of anything that can't be exported to a game engine or framework like LibGDX in your answers.

Sorry for asking, I eventually found it. It was actually a lot simpler than I thought! Pretty basic actually, I'm not sure how why it took me so long to notice.

Thanks anyway!


Create a positive mask in video editing I'm doing a video edit for a special effect of explosion and I'm encountering a little problem:

I did a mask around a car, to make the car visible in front of the explosion, but, like the majority of cars, this one has windows. That's why I created another mask for the windows, but here comes the problem:

I do not know how to "mask a mask", i.e. making holes in a "parent" mask (the car's one) that would sort of "cancel" the parent mask for this specific zone. And the few masking tutorials on the internet do not cover this.

So, if anyone knows the answer, I'd be happy to hear it, by the time, I'll continue to tweak with the color mixers to see if I can approach something good.

Thanks in advance :)

Got it!
A simple subtract node works well, you can even change the factor to change the opacity of the windows...

Sorry, this was a kinda useless question...


Exporting to DirectX for Vehicle Simulator with correct axis for each object, Blender equivalent of Xform reset? So, my problem is when I export to DirectX format (.x), it shows strange in Vehicle Simulator (a vehicular simulator), and my model does not behave as it should. the propeller of my ship, which should rotate in a clockwise way, and the rudder which should probably rotate on the Z axis (up-down). So, my problem is that in Vehicle Simulator, the axis is wrong. As when I try to apply the elements instead of the properties of the ship and it's behaviour, it's all messed up. A friend told me he used the Reset Xform function in 3ds Max to correct the axis, is there a similar feature in Blender?

I seem to have solved this myself, somehow by tweaking the pivot points of the objects in the scene of Blender.


Adding thickness to 3D Scan of face in Blender So I have a 3d scan of a face, pictured:

And it has no thickness whatsoever, I'd like to add some so that it can be 3D Printable (my printer can handle the vrml/obj format and tons of colors).  I've tried solidify but it puts a bunch of cracks through the face:

And I've tried using the bisect tool, then hitting f to fill the holes while what I bisect'ed was still selected, and all of the holes won't fill.  I've also tried some of the solutions from this question: How to make a perfectly flat bottom for 3D-printing topographic relief?
but it creates those same cracks.

Lastly I've tried selecting every vertice and extruding backwards, and whatever this is happens:

Any ideas?  I'm sorry if this has been answered somewhere else.

The 3D print plugin is nice for fixing up a mesh but otherwise I used to just use the decimate modifier and create a new mesh from a scan mesh. Also make sure you've tried selecting all vertices in edit mode and using the 'remove double vertices' function (or remove doubles in 2.79). Then using Crtl + Shift + N to set the normals (untick that box in the bottom left corner though) (in 2.79 it's just Crtl + N and there's no tickbox).

What it looks like is that for whatever reason the scan mesh isn't whole, like there's separate islands of vertices which would give the effect of the cracks


How can I make particles remain stationary on a surface? I want to make the falling autumn leaves.

I made a system of particles and the surface on which they must fall, but the problem is that even at the maximum value of "Particle Friction" parameter of the surface (collision modifier), the leaves (particles) continue to slide along the surface, and much too quickly.

How can I make them completely stop? And can I adjust the speed of sliding between a full stop and a very slow slide?

There are two basic ways to approach this problem through particles and collision objects:

First is not very suitable for animations, since the leaves freeze at the moment they hit the collision object. You basically check the "Die on Hit" and "Died" check-boxes in the Particle settings.

Second is more suitable for animations since the leaves move a bit even after hitting the ground and come to a stop smoothly. Here you DON'T check the "Die on Hit" and "Died" check-boxes but you edit the settings for the collision object itself. Namely the Stickiness and Friction Factor values.

Either way, the big problem is keeping leaves not going through the ground thanks to rotation of the particle - the collisions don't take into account the shape of the leaves. I would need more context to choose a solution for this. One solution would probably be to let the leaves rotate only around Z axis (thus not going through XY planes) which would tamper with the animation of their fall though and work only on absolutely flat XY planes.


Flip normals or delete geometry? For better overall performance This is certainly a noob question but I haven't found a solid answer yet.

Say I have a 50 face, UV mapped object ready to be imported to a game engine.

Only 40 of the 50 faces will be visible, the remaining 10 faces are still UV mapped

Obviously I don't want to render the parts that aren't visible so,

Is it better for general performance to just delete the 10 faces  or leave them UV mapped with the normals flipped? If I flipped the normals, does that mean those parts wont render? Or will it make no difference?

Thanks.

As a simple, yet very true rule in game design:
- Remove anything the player will never see or use.

UV data is still loaded, vertices are still calculated, there is still a check to see if the face is visible. Everything except the final step, which is 'visualising the face'.


Bones Deforming Mesh that it's attached to I'm very new to modeling, and have no backround on it either! I am having some trouble with bones and meshes. Basically, I have the bones to be the parent of the mesh, however when I attempt to move them in Pose mode, they deform and scale in weird ways. I'm just trying to make some robot legs.

For some reason you've scaled your bone on its Y axis (Z global axis when the bone stands up) when you were in Pose mode. You need to select it in Pose mode and press altS to reset the scale. The parented mesh will come back to its normal proportion by the way...

If you want your bone to be longer than it is, you need to scale it in Edit mode, not Pose mode, which is made for animation. If you think that the Octahedral display mode is not convenient, you can switch to B-Bone mode for example, then you can change the bone thickness with
ctrlaltS and drag.


Is it possible to have a Material input node in the Cycles Renderer? The Blender Render(er) has the so called "Material Input Node", where a previously defined material can be selected. The questions is, whether there is an equavalent for the Cycles Render(er).

All the given answers in the comments work correctly and as I expected.

I finally ended up using the Node Groups.


Basic question: how to use Transform Median? So I set the 3d cursor to 0,0,0 and move the object's origin to the 3d cursor.  Then I select an edge and G, X to move, then type -2 into the Z median.  Object snaps to -2....which isn't aligned to the grid (see picture).

Why doesn't specifying a position of -2 move the edge to the grid line, and how do I achieve this?  I can't turn on snapping/increment because it moves 1 unit from where it is, not to the nearest 1 unit grid line.

In 2.79, typing GZ2 will move your selection by 2 units in the Z of world space, GZZ2, in the Transform Orientation set in the header. Adjustments to the operation can be made in the Tool Region, bottom left in your screen grab.

If the Median location in the top right is set to 'Global' then any entry you make in the X.Y and Z fields will move the median point of your selection to that point in World space, while leaving the relative positions of the elements to each other the same as they were.

If the Median location is set to 'Local' then the coordinates displayed are in the space of the object to which the elements belong: scaled, rotated, and measured from the object's origin. Once again, modifications are absolute, in the object's coordinate system. Mostly, that's very intuitive, but if the object (rather than its mesh) has been scaled at some point, then so have its local coordinates.

If an object has been scaled by 2 in Z, then setting the local median Z of a selection to 1 will send the selection to 2 units away from the object's origin in its local Z.

Try applying the scale of your cylinder.


Object does not show in render (Cycles) (Blender 2.82) I'm at my wits end. I am trying to render my scene and everything shows up except for the body of my character. I did duplicate part of its mesh to create a molded piece of clothing and then proceeded to separate it from the original mesh, but from then on, my character stopped showing up in my renders. It does show up in render mode though. I read online that it might be fixed using the duplicate tab in the object properties, something to do with duplicating part of an object, but there is no such option in 2.82.
Please help me I'm going crazy.

Alright, I hope I can save someone's time and fix their problem if they ever come across the same issue.
Select the object that doesn't render, go into object properties, scroll down to Instancing, select None and then Render Instancer.
I don't know why it changed the setting by itself, I never clicked on this nor did this ever happen to me before after duplicating part of an object. Whatever


Intersection of objects taking into account plane scale After having a look at Loop at intersection of two objects (script) was wondering if I could do intersection of plane with mesh taking into account the plane scale... If I use the bmesh as is I get the following...

How could I get only intersection within the plane taking ito account the scale, i.e not getting the wrists?
Thanks!

In the end I did was to cast a ray, from that ray create a bisection with a flat plane, then I got the closest edge and vertex in the bisection from the ray hit position then explored the topology of the mesh getting only the vertices I could reach from that point:
# Perform bisection
        bmesh.ops.bisect_plane(
            bm,
            geom=bm.faces[:] + bm.edges[:] + bm.verts[:],
            clear_inner=True,
            clear_outer=True,
            plane_co=plane_co,
            plane_no=plane_no
        )

        # Bisection cleanup
        closest_edge = self.find_closest_edge(bm)
        vertex_list = self.get_reachable_vertices(closest_edge)
        for v in [v for v in bm.verts if v not in vertex_list]:
            bm.verts.remove(v)

Example of exploring topology:
    def get_reachable_vertices(self, closest_edge):
    edge_list = [closest_edge]
    vertex_list = [v for v in closest_edge.verts]
    for v in vertex_list:
        for e in [edge for edge in v.link_edges if edge not in edge_list]:
            edge_list.append(e)
            if (e.other_vert(v) not in vertex_list):
                vertex_list.append(e.other_vert(v))

    return vertex_list


Why is my object black in rendered shading mode? I am quite new to using Blender, currently using the 2.8 Beta Version, and I decided to make a Low-Poly Island from a tutorial I found on YouTube

In the tutorial, he added a Light and changed it to the "Sun" setting, which I did. He changed the color of the light, made sure the Strength was all the way up (at 10), and turned Contact Shadows on. When he put it into rendering mode, it displayed a beautiful source of light that he was able to move around into the perfect angle, when I put it into rendering mode, and my model was all black, no light to be found.

I've tried everything I could, looking up tutorials on how to fix it, playing around with the settings, and after about 2 hours of attempting to get the lighting to work, I never got it. I've rewatched the video numerous times to make sure I followed everything step by step, and I could not find any possible errors or mistakes. I am doing this render as a project for my Digital Arts II class in High School.

http://pasteall.org/blend/index.php?id=51602

My best guess is that you are not actually in render mode. I just downloaded the exact file you linked, opened it, pressed z and went into render view, and the material was not entirely black, it showed up as below:

What process are you using to go into render mode? It works fine for me with your same file, so I would guess that you are in some other mode of displaying it.


Script to delete unused Empties I have a (big) blender file that contains many empties, and as a result is very slow to work with.

Is there any way to have a python script that deletes objects of type "EMPTY", but only if it's not the parent of any other object?

I found a similar script <here>, but it works with a different  selection criteria..

List comprehension

Every now and then issues occur when removing objects from the collection that is being iterated over. (possibly an issue of the past) Now as a matter of choice I use list comprehension to create the filtered list.

For our filter, an empty has None for its data, and [] for children if none, both of which are boolean false.

A  popped member is removed until the list is empty.  The bpy.objects.remove(...) has a do_unlink property that has a default of False, setting to True removes the need to unlink from scene(s).

import bpy

childless_empties = [e for e in bpy.data.objects
        if not (e.data or e.children)]

while childless_empties:
    bpy.data.objects.remove(childless_empties.pop(), do_unlink=True)


Need a faster way to loop all frames and set keyframing data on properties? I currently have a file that contains animated blendshape information:

"brow_mid_down_left","brow_mid_down_right","cheek_squint_left","cheek_squint_right","cheek_balloon_left","cheek_balloon_right","cheek_up_left","cheek_up_right","mouth_corner_in_left","mouth_corner_in_right","mouth_corner_up_left","mouth_corner_up_right","mouth_wide_left","mouth_wide_right","lips_part","lips_upper_in",
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,
0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,

I need to load this data to my characters in Blender. But my issue is that what I have written takes nearly 2 minutes for only a few hundred frames and has become the slowest part of the entire process.

I am using a simple for loop to iterate through each file line, while at the same time I change the scene's frame using bpy.context.scene.frame_set(i) and then write the values to each property using the line bpy.context.object.keyframe_insert(data_path='["'+shapeName+'"]').

Here is a more complete example of the loop:

    with open(os.path.join(path, shapesfile), mode='r') as file:
        header = list(filter(None, file.readline()[0:-1].replace('"','').split(','))) #split all values and use filter to remove any empty values - https://stackoverflow.com/a/3845453/3961748
        for i, line in enumerate(file): #for each line of data in the file
            bpy.context.scene.frame_set(i) #THIS IS THE BOTTLE NECK
            shapeVals = line.split(",")
            for n, shapeName in enumerate(header): #for each blendshape found in the header
                shapeName = 'Mhf'+shapeName
                bpy.context.object[shapeName] = float(shapeVals[n])
                bpy.context.object.keyframe_insert(data_path='["'+shapeName+'"]') #Keyframes on custom properties use Python's getitem/setitem syntax - https://blender.stackexchange.com/a/3014/32655

From my testing I have found that the very act of changing the frame within the loop is causing the huge delay, and I don't believe it has to do with reading the file or writing the values. Because by simply commenting out the line bpy.context.scene.frame_set(i) then trying again, the process is lightning fast.

Is there anything else I can try?

Is it possible to construct an array for each property and just write directly to it's animation data somehow without needing to change frames?

Thanks for any advice, I'm sure even a slight improvement to this part would significantly speed up my batch loading (which currently takes a long time).

No need to change frame.

keyframe_insert(data_path, index=-1, frame=bpy.context.scene.frame_current, group="")

  frame (float) – The frame on which the keyframe is inserted,
  defaulting to the current frame.
  .

Remove the frame set (which also AFAIK updates scene) and set the frame implicitly.

ob.keyframe_insert(data_path='["%s"]' % shapeName, frame=i)


Object's coordinates are not influenced by constraint's influence? I'm trying to make a camera follow a path, starting from frame 150 and lasting 100 frames. So, I've keyed the influence parameter from 0 to 1 in the starting frame and then again from 1 to 0 on the last frame.

On frame 150, the camera is automatically aligned to the path, but its location is 0,0; only its rotation has been updated. This should't be too much of a hassle, except that it makes nearly impossible to animate a smooth transition from the previous frames onto the beginning of the path. The camera insists on  returning to world origin as it is there it will start its path.

This is probably due to the constraint's influence acting upon the camera but not updating its coordinates.

What should I do if I just want the camera to, sort of, snap onto the path as it reaches it?

Object drived by another is always represent by it's relative coordinates. If you parent a cube to an empty and you will move with empty, cube will have also zero in coordinates.

And I don't think there is a problem to animate Camera on top of the Constraint. But if you animated influence to zero on frame 149 and one to frame 150 somthere is not to much room for transition. Sorry if I understood you wrong.


Game Engine: Object with character physics shakes for some reason I have recently started to make new racing game. I downloaded and imported smooth detailed car model(.obj). I added Character physics for it, so I can add W, A, S and D controllers to it. But, after I put my Character physics on it, it began to shake, when I pressed "p". I tried to check Physics only for 1 of all materials it had, but it did not help. I even unparented cameras and lights off it, but it still shakes. And I can not add controlers that can move it(they don't work). Who can help me?

The problem you are experiencing is due to the way blender calculates the collision for the quads on your ground plane. There are two ways to fix this, you can use a cube as ground instead (with collision bounds set to box), or you can set your plane's collision type to box, even though a plane is infinitely thin.

To help see the problem,
First turn on Physics Visualization.
This does not effect anything except what you see, so in the end it does not matter if it is on or off.

If your plane's collision bounds are not set to anything, blender automatically calculates it as if it were made up of two triangles.

However, if you set it to Box collision, This problem goes away.

If you use a thin cube instead for your ground, (with collision type set to box) this problem goes away entirely.

Another thing you can try is putting all of your logic bricks and python on a invisible low detail object, for a collision mesh, and having your detailed car as no-collision but parented to the collision mesh. Even if this alone does not remove the shaking, it will dramatically help performance.


Can you assign multiple drivers to one bone? Can you assign multiple drivers to one bone? Is that possible?

A driver is used to calculate a single value. Only one driver can be assigned to calculate a specific value.

So yes a bone can have several drivers, one for it's x-location, one for it's y-location, one for it's x-rotation and so on.

If you need to use more complex logic to calculate the value, you can define a python function within the driver namespace.

import bpy

def driver_func(val):
    return val * val    # return val squared

# add function to driver_namespace
bpy.app.driver_namespace['driver_func'] = driver_func


Texture streches on the edge of extruded plane so I wanted to try and make some 3d models of pixel art, and I started with a basic Minecraft sword to train myself. So I started by adding a plane, adding a texture to it, added loop cuts to my plane, 15 loop cuts because it's a 16x16 texture, then I selected the blank faces and deleted them.
As I extrude this plane, A > E > $.1$, the texture messes up on the edge of the item, as shown below

Although not all faces mess up on the edge, a lot still do. I tried recalculating normals, unwrapping the object again, but I ended with the same problem, no change at all. Though I may have done it wrong, since I never did it before.
I tried smart UV project and cube projection, but they just mess it up even more.
Does anyone have a solution to this?

If I were you I would just add a UV Seam to both edge rings of the sides, by clicking on the edge ring with Alt + LMB and then adding a seam with U > Mark Seam, and then unwrapping with U > UV-Unwrap. That way you can split the sides from the UV-map which is probably whats causing the weird overlapping!


Not getting anything sensible from rotation_quaternion Please forgive if this is something obvious (I've only started looking at bpy today), but I don't seem to get a valid quaternion from objects, it's always coming out as (1.0, 0.0, 0.0, 0.0)

>> bpy.data.objects['Cube'].rotation_euler = (22.5,22.5,22.5)
>>> bpy.data.objects['Cube'].rotation_euler
Euler((22.5, 22.5, 22.5), 'XYZ')

>>> bpy.data.objects['Cube'].rotation_quaternion
Quaternion((1.0, 0.0, 0.0, 0.0))

Also

>> Euler( bpy.data.objects['Cube'].rotation_euler ).to_quaternion()
Quaternion((-0.8905556797981262, -0.29705408215522766, 0.17443729937076569, -0.29705408215522766))

>>> Euler( bpy.data.objects['Cube'].rotation_euler ).to_quaternion().to_euler()
Euler((0.5088514089584351, -0.5088514685630798, 0.5088514685630798), 'XYZ')

I'm missing something pretty basic?

Cheers.

There are two problems with what you are doing:

Rotations are ambiguous:

For euler rotations there are the problems of gimbal lock and the order in which the rotations are applied.
Quaternions on the other hand will give the rotation which their corresponding normalized Quaternion would produce. This means that all scaled versions of a quaternion will result in the same rotation. The Blender Wiki gives a good overview about the meaning of the different rotation modes.

The values of the other rotation modes are only set when you switch to them. The value you are reading from rotation_quaternion is a default value.To switch to another rotation mode in python set bpy.data.objects['Cube'].rotation_mode to one of the following values:
'QUATERNION', 'XYZ', 'XZY', 'YXZ', 'YZX', 'ZXY', 'ZYX' or 'AXIS_ANGLE'

You might also see different rotation values than which you set using python when you look at the properties of the object. The values in the image below are displayed after executing bpy.data.objects['Cube'].rotation_euler = (22.5,22.5,22.5).


Geneal Question About Creating an Add On I am a .NET Engineer. I don't know Python though. I am trying to find out of this scenario is plausible. Could an add-on be created that could take an ID map that was created in Blender Render and multiple imported diffused textures (maybe as many as 20) and then could "bind" a color (from the ID map) to each one of the imported textures and create a single diffuse map from the 20 textures. I am wondering if the Blender API surface area exposes the functionality to handle these tasks. I understand that this maybe too vague, but if you have experience writing add-ons and you think it is possible I could write up the required stories with acceptance criteria for a more specific response, just let me know.
Here is and example of the ID Map using red as the color "bound" to a given diffuse Map.

Are you sure need it to be an addon?
Otherwise you can use Compositor Color key node to create mask from color, and then color mix node to mask out textures:


Question about the pamameters of Arcto in sverchok's "Profile Parametric Node" <2v rx,ry> <float rot> <int flag1> <int flag2> <2v x,y> <int num_verts> [z]

As the syntax above shows，ArcTo has 3 parameters（ float rot, int flag1 and int flag2 ） between the radius vector and the coordinate vecter.
I've found that the third(int flag2) can be used to set the direction of the arc(CW or CCW),but I can't find out what the other 2 parameters( float rot and int flag1 ) stand for and can be used to do.
It will be kind of you to tell me the answer, and thanks in advance.^_^

This node was intended to closely resemble the SVG style of specifying paths, and you should really look at what SVG specs say about ArcTo

;; straight from the svg specs
(rx ry x-axis-rotation large-arc-flag sweep-flag x y)

For a deeper description see this github issue tracker post:
https://github.com/nortikin/sverchok/issues/350#issuecomment-51353886


When "is_library_indirect" property of ID's could be set to True? Every ID datablock in Blender has an is_library_indirect property (
https://docs.blender.org/api/2.79/bpy.types.ID.html#bpy.types.ID.is_library_indirect)

I wanna know after what user actions it could be set to True.

I have figured that out. It is set to true for objects that located in linked groups.


VSE output not going full screen I am still noob, following tutorials, but i can copy and paste like a pro, that said, here is my problem:

In VSE, i set dimensions to 1280x720, a lot of my clips are 1920x1080 (or 4x3 ratio), and as i animate, i get video that is 1280x720, but when i go full screen, video is centered in the middle of screen (my monitor is 1920x1080).
I tried add->effect strip->modify but still same results...

is there a setting i missed, miss clicked,
or do i have to convert all my clips to 1280x720 first, before importing them to blender...?

I am using 2.78 version of blender.

Thank you.

As it turns out, blender is just fine, and the problem was in mplayer, something that or other, xv, x11 thingy... i took videos on other machines (linux and windows) and files were working just fine in full screen. So i went after mplayer, and there was this update that required restart of X11...

anyway, i am sorry i took your time, noobs like me are probably the worst kind...


Restoring default toolbar layout in Blender 2.81 I'm using Blender 2.81, when I open old Blender files such as Blender 2.80 or older the toolbar layout in the 3D Viewport are different than the default toolbar layout when starting a new project.

This is what it looks like when I open an old Blender 2.80 file

And this is what it looks like when I start a new Blender 2.81 project

And if I open projects from Blender 2.79 or older the toolbar appears on the bottom of the 3D viewport (which is even more annoying). Is it possible to reset all the layouts to the default 2.81 layout?

From the file dialog

When you are in the Open File dialog, click the Settings icon in the top right.

Then deselect Load UI

Setting default behaviour

You can also change the default behaviour by changing your preferences.

Go to Edit → Preferences → Save & Load and uncheck Load UI

Be warned that this might be equally frustrating if your startup file does not contain all the views you would expect.


How do bone (skeleton) layers work? Bone layers, I can't find any information on how to use them other than how it separates bones. I clicked on a few of the squares, now I can't pose my character anymore as nothing is selectable. Even when I put all the squares like they were I can't get the dots to change. I realized I need to know how this works. No books or videos or articles explain properly for me how this system works. When I read the Blender.org manual my head wants to explode.

How do I unlock the layers?
How do I move what is in a layer?

Bone layers work exactly like Blenders scene layers, just for a single armature. The point is simply to provide a way to organize groups or types of bones in an armature, as working with all of them at the same time can be quite difficult, and there are often bones that never need to be selected or edited.

The dots you mention just show that there is something on that layer. There is also two 'groups' of layers, the second having the 'Protected' heading. Clicking on any of these protected layers won't change what is in your scene, but will prevent you from being able to select or edit anything on the corresponding 'Regular' bone layer.

To 'unlock' your layers, just make sure that you have none of the layers set to protected. If it still persists, it's probably not an issue with the bone layers.

Like Blenders scene layers, you can use Shift to select multiple layers. Also, you can use M to move bones between layers, just like with the scene layers. You won't be able to move anything on protected layers separately from the regular layers, as the protected layers are simply the way to tell blender that the contents of a regular layer should not be editable. Thus, moving between regular bone layers will update the protected ones as well.