Rigify - what are tweak bones,and what do they do? I am quite new in Blender, and try to understand  what are Tweak bones which are generated by Rigify.
How is using of them? Unfortunately, I could not find any clear definition of them.
Thanks a lot in advance!

They allow you to deform your character with a lot of freedom.
This can be useful for cartoony animation... although if you don't go too extreme with them, you could possibly use them to create realistic motion.
I have a video where I explain a bit about them:
https://www.youtube.com/watch?v=vKgH5zXIYmM&feature=youtu.be&t=1171


Blender with system python failing I'm working on Ubuntu 14.04 LTS.  I downloaded Blender 2.76b and deleted the python directory to push blender to use the system distribution of python.

Ubuntu comes with both python 2 and 3, but the python command is linked to 2.7 on my system.

When I try to start the blender application, I get the following message:

connect failed: No such file or directory
Read new prefs: /home/alex/.config/blender/2.76/config/userpref.blend
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
Aborted (core dumped)

How can I troubleshoot this issue?  I'm thinking it's a pythonpath problem but I'm not sure what path the blender app is looking for when it starts, python or python3.  Thanks for the help!

EDIT

I tried deleting the python dir and then running the following:

sudo ln -s /usr/lib/python3.4

in the same directory, giving me a symlink to python3.4.  Unfortunately, I still get the same error on running blender.

Alex

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

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

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


Why does the shortcut I created change to NDOF Fit I changed the shortcut for Frame Selected from Number . to Shift F and after I saved the project the shortcut changed to NDOF Fit and I can't change it or remove the shortcut. The only way I can change it is to reset the default settings but that removes everything including my project.

How do I create a short cut for Frame Selected when it says NDOF Fit.

Blender Preferences > 3D View > 3D View Global > View Selected > Keyboard F


GeoNodes. Random Rotation from normals Let's say I have a log and I need to place moss or lichen on it. I make a bunch of nodes as in the screenshot below. But how do I make this moss rotate along the conditional Z-axis, not global, but the axes of the log normals?

The Attribute Randomize node will fill the specified attribute with random values, but cannot (by itself) account for the existing state of the attribute. To take the initial rotation into account, you'll want the Point Rotate node.
In the below example, rot_offset is a custom attribute filled by Attribute Randomize that is used as an offset from the initial (normal-aligned) rotation. You can name it something different if you'd like. Set the min/max bounds on this attribute to change the range of random rotation.

Note that if you want rot_offset to be considered in tangent space (treating the surface normal as positive z), you'll have to choose "Point" instead of "Object" in the Point Rotate node.


Why rig is not generated I have activated riggify addon. And with armature i have scale and position all the bones. After clicking the generate option i cant find my rig but in the outliner the bones are separated with the names.

I Can't find this rig arrow direction.

Any help or suggestion. Thanks

Have you checked the visibility of the layers in the armature panel?


How to increase the decimal length for edge info When I enable my mesh display, and click on the edge info. The only information I get back is a whole number, and a decimal point to the nearest tenths place. This is because the length is past the 100 mark, if it was 99, it would have the decimal increase to the hundredths place.

This is a brand new file, no extra information is added except the default cube.
There has to be somewhere to increase the length of the decimal places to be shown through edge info.

A temporary fix to this, is to make the whole number, and then add the smaller length at the end, then once you are done. You can just dissolve the middle edges.


Background Images in the Right Orthographic Viewport Disproportionate to the Other Views I noticed that when I put a Background Image in the Right Orthographic View port it is disproportionate to the other view ports. I know the sizes are correct, I've measured them in Photoshop and my computer tells me the sizes are correct but when I put them in Blender, the Top and Front view are proportionate but the right view is always off. I try resizing it but it's not a matter of it being too small, it's completely disproportionate to the other views. Any ideas?

@brasshat
I did something similar. I had originally made an orthographic projection, that's how I know all of my measurements were right, but instead of uploading the individual images as separate jpgs into the Background Image I just imported the Orthographic Projection file directly. That seems to work, however, I have to move the image in each viewport so that they line up, but the sizes are accurate now, I just don't seem to understand why it wouldn't do it with individual jpgs.

I went ahead and put my idividual jpgs on top. Note that I did nothing to these jpgs that would change their size but this is what I get.

Notice that Blender is changing the sizes of the individual jpgs but leaving the psd file alone. Any ideas?

The way I deal with this is to take the three views of the object, and normalize them to the same size. Lets suppose I have the dimensions of the images of item are that the top view is 1000 pixels long by 800 pixels wide, the dimensions of the front view are 1000 pixels long by 1200 pixels tall, and the dimensions of the end view are 800 pixels wide x 1200 pixels tall. In Photoshop (R) [NB: for the record, I don't use photoshop, and do this in GIMP, but it is beyond the realm of my imagination that you can't do the same thing in photoshop] I create a canvas using the maximum of the dimensions of all three, plus a border, so I'd create a base image size (in GIMP, a "canvas") measuring 1100 x 1300 pixels. I'd make three copies of this image, and into one I'd place (so that the center of the desired part of the image is at the center of the canvas) the top view, in a second I'd place the front view, and in the third, I'd place the end view. The amount of border around the three images will vary, but the parts of the Blender image in each viewport should be both the same perceived size, and the same actual size.

I don't usually "waste" the borders around the images, either. Using the image processing software, I'll usually edit into the borders of the background images things like scales and useful dimensions not already provided, or readily apparent, in the drawing.


Does Clipping Work in Blender 2.9? From the Blender docs, it appears that when I create a view > render regions > clipping region (CMD + B), only the selection within the clipping should be visible, however:

I have tried different views. Also checked to see if, for example, Transform, would only with within the "clip", and that doesn't happen either. Rendering also isn't limited to what's inside the clipping area.
So am expecting I am missing a step or otherwise misunderstanding either:

what is supposed to happen
how it's supposed to work
how to achieve it

Thanks.

From  your screen shot, you enabled "render region" rather than clipping region. Not sure what's the correct key bind in Mac OS, but in windows, it's Ctrl + B (Which might be eq to Cmd + B in common translation).
Please look at the menu again, it said Alt + B to create clipping region, as the following picture show. Red dashed line is for render region, and it's separated from clipping region.

Remember, It is "clipped", not hidden. It should only be working in Solid or Wired Frame view mode. On the other hand, render region only works during rendering in Cycles.


Network render one still image not an animation I know it's possible to render an animation in a network by rendering every frame with one PC. However, I want to render one image.

I would like to know how.

Should I let every computer render one different pass. If so, how?

Or, should I split the still image in tiles. (Would I do this with a script, or is there a better way?)

I want to post processing of the image and have control over the different passes to blur noise and get rid of fireflies.

Sorry for my bad English.

The short answer, yes you could divide the image (tiles) and distribute then to each computer over a network. The fact is, there is no script/function to do that and the overhead for each connection will be something to consider, since will need to send the whole scene anyway to allow the render engine show all reflection, color bleeding, etc...
Another approach, that I am testing right now, is to render a image with a smaller number of samples with different seed for each computer and then, re-assembly them back. This methodology is already covered by others (Kent Trammell, this is the arquive file on cgcokkie or even here @StackExchange.

We can think about this as: For two images generated with different seeds,  let's get pixel[10,10] for instance. On first image the RGB value is (0.34, 0.78, 0.2) and on second image the same pixel[10,10] is (0.32, 0.80, 0.22). None of this values are right or wrong, but we can assume that the best value (or median) will be (0.33, 0.79, 0.21), that is probably more close to right answer for that pixel.

Using this approach, is it possible to write a simple script to load images from a folder, and them find the median value for each pixel and generate a final image.


Normal Map Bakes a Rainbow Can anyone tell me what's wrong in this picture? This is my first attempt at baking a normal map from a high-poly mesh to a low-poly mesh, and I've been stuck at this step for hours. I've followed tutorials step-by-step, and still can't figure out what's going on. All the related posts I've looked at are about some specific artifact appearing in an otherwise decent normal map; I've tried changing the ray distance and thought about trying to make a cage, but as you can see in the picture the failure is so complete that I'm sure I'm missing something really fundamental here...

Solved! For the sake of better organization, I had my high-poly meshes in a separate collection from my low-poly meshes.

In the Outliner window, I dragged the high-poly mesh into the same collection as the low-poly mesh, and after that the normal map baked properly (not perfectly, but it's at least a starting point.)

So I think what I'm missing is an understanding of what Collections are in Blender and how they are used; I was assuming they were a way to organize and collectively edit groups of objects in a scene (basically what it says on the tin), but evidently there's more to it than that.

(Haven't looked into details of why this worked yet, but it just bugs me when an op comes back with "solved!" but gives no explanation of how they solved it, so this is what I've got.)


Can you randomize the triangles of an icosphere? Im really struggeling with getting this triangular structure to work.

Its like half an icosphere but with randomised vertices.

I already tried editing the vertices with random-proportional editing and then do a limited dissolve.
But this only works to a limit and gives something like this

If anyone knows a quicker solution than" do it by hand" id be so glad.

Please halp.

Edit:
Haunt_House`s answer worked perfectly

An easy way to get random triangles on any geometry is to start from a highly subdivided object and apply a Decimate modifier.

You will get nice regular triangles with the Collapse option. Use the Ratio to tweak the number of final faces.


How to preview texture correctly with its UV in object mode? I add 2 image textures and combined with mix node. Also i create 2 separated UV for each these textures. Everything works in render with no problem. It's just how can i preview selected texture correctly in object mode.

So i'm in object mode and set the viewport shader to solid and turn on texture. Now, in shader editor, if i click any image texture, it will be displayed in the viewport. The problem is it use the whatever current selected UV in property panel. I don't want this behaviour. I already attach UV map node and set the proper uv for each textures (and it's rendered correctly). So what i want is if i click any texture in shader editor , it should displayed with the correct UV i've attached.

Is it possible ?

video :
https://youtu.be/vUf8D8j63Ck

Have your image loaded as a texture
Set your material Base Color to the texture you want
With Object Mode in the 3D Viewport Set Viewport Shading Color to Texture

If anyone can elaborate on how to attach multiple textures to a mesh's UV that would be excellent

  !


Blender 2.80: Newly created object appears in unused/invisible collection - how to avoid? I am using Blender 2.80 on Linux.

When I create an object (Add->Mesh->...) it will be put into an
collection, which is set "invisible" (not used).

How can I avoid this?
How can I predetermine where new object get inserted?

By the active group in outliner:

The white gray circle in the collection icon indicate that is the active collection now, all new object will link to there.

You can manually click on other Collection (include scene collection) to change the active collection in order to insert any thing in to desired group.


How does changing 'Dimensions' fields at once exactly work? For related X, Y, Z fields of Location, Rotation  and Scale in the Transform panel of the 3D view 'N-Region', there is a possibility to change the 3 fields at once. It can be done with the mouse or with numerical input.

But it seems 'Dimensions' fields behave strangely (entering individual values works as expected). Sometimes the value is lost after being entered, sometimes only two fields are changed. An example:

When using the mouse, Y is left unchanged (expected: All values adjusted in proportion).
The final dimensions X and Z are different (expected: Final values are starting values times the same factor).
When entering the value 5, the result is 2 (expected: 5, whatever the scale value).

Is this a bug?
If not, what is the reason to prevent this single input?

Using 2.79b.

It is not a bug, it is a well known limitation of the current system, as you can see in the bug repot.

  Object dimensions are broken and an abuse of RNA, IMHO - the same
  problem happens from Python and we had it reported too.

  Basically they rely on one axis being set, then updating - before the
  other values are set.


What's the fastest way to calculate the midpoints of a sequence of edges? I'm trying to create a list that calculates the midpoints of a sequence of edges.

Right now I'm doing it like this:

eList = []
for e in [e for e in bm.edges if e.select]:
    pt_1, pt_2 = (ob.matrix_world * e.verts[0].co), (ob.matrix_world * e.verts[1].co)
    addPt = pt_1 + pt_2
    co = mathutils.Vector((addPt[0]/2,addPt[1]/2,addPt[2]/2 ))
    eList.append((e, co))

I multiply each vert in the edge by the object's world matrix, then add the verts together. I divide each axis in the vert by 2 and covert them to a vector and then put the edge and the vector in a tuple and append that to a list.

It's probably not a very efficient process but I'm still pretty new to python and can't think of a faster way.

Is this something that could be done faster in numpy?

What would be the fastest way to perform this function over a large sequence of edges?

Some improvements.

Use list comprehension
Only need to multiply the local average edge coord by matrix world
once.
Multiply / divide a vector by a scalar, rather than on a per
component basis.

Test script

import bpy
import bmesh

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

mw = ob.matrix_world
elist = [(e, mw * (e.verts[0].co + e.verts[1].co) / 2)
        for e in bm.edges if e.select]

could make a little helper routine.

def mid_edge(e):
    return (e.verts[0].co + e.verts[1].co) / 2

elist = [(e, mw * mid_edge(e))
        for e in bm.edges if e.select]


how do I render white liquids? I want it to look like these

if I set the glass shader color to white it just becomes transparent

I gave a try with this node setup, you need a mix between Translucent/Transparent/Subsurface Scattering/Glossy/Glass and at the end, plug the Principled Volume into the Volume socket of the Material Output:


how to add a driver to the z rotation local axis of an object? I want to add a driver to the z rotation local axis of an object, how can I do this?

Select your empty.
Open the properties panel in the 3D view N
Hover over the Z axis of the location field, RMB  > Add Single Driver.

Open the Graph Editor and switch it to Drivers.
Select the driver on the left panel, then press N to open the properties and start editing the driver.


Python Scripting: Remove Curve Object Preferably not using selection, tried bpy.data.meshes.remove don't works for it

Something like this,

First remove the Object that uses the Curve
Then remove the Curve data

code:

curves = bpy.data.curves
objects = bpy.data.objects
scene = bpy.context.scene

# remove the object
obj = bpy.data.objects[object_name]
cu = obj.data  # the curve
scene.objects.unlink(obj)
objects.remove(obj)

# remove the associated curve, if you need to and it doesn't have other users.
curves.remove(cu)

You won't be able to remove Curve data if there are remaining Objects associated with that Curve data. cu.users will tell you how many users the Curve has, if that returns 0, the curve data can be removed with no other steps, but if it's more than 0 then other Objects are referencing the curve and you need to clear those references first.


What's going wrong with my Luxrender Prism? I've just started playing around with LuxRender in Blender. I've made a scene with a sun and light going through a slit into a prism. To the prism I have assigned the prisma material from the LuxRender materials database. When I then render the whole prism seems to glow like the image below:

I then added the 'air' volume as the default exterior volume and the whole scene just ended up glowing:

Using a Glass material I seem to be able to get some renders that look quite normal, so any help with Glass 2 is welcome! Thanks in advance.

In my experience, rendering with Luxrender in Blender still (as of June 2017) means avoiding many features that innocently present themselves as "Blender-friendly" (like nodes, LuxCore API, materials conversion, etc.), and sticking to core Luxrender as much as is possible within Blender. In my opinion, this is largely because the two approaches to rendering are fundamentally different, making the "Blender friendly" attempts only obfuscate the fact that, in the end, to get the most out of Luxrender through Blender, the user must adapt to Luxrender's different perspective (on materials, lighting, rendering, outputting). This is not a criticism of Luxrender; I could say the same about how we adapt when going between Blender Internal and Cycles. That said, I do think Luxrender's "Use Materials Nodes" button is almost an invitation for confusion, since it doesn't even appear to give access to the specific things (like dispersion, for example) that make me sometimes choose Luxrender for a particular use.

The rules I tend to stick by when using Luxrender in Blender:

Don't use nodes
Use only Classic API (not LuxCore API)
Use only LuxRender GUI
Don't use the "convert" Blender materials to Luxrender materials feature

In regard to dispersion (the prism effect you are looking for), all you need to do is go to the Materials tab, select material type "Glass", and turn up the "Cauchy B" slider.


Blender 2.80 and Windows 7 I try to open Blender 2.80 on Windows 7 and nothing happens.

I have never had problems with previous versions on my machine, it works perfectly under Ubuntu (my second machine).

Does someone have an idea ?

It seems like you possibly are trying to use the same blender download file for both Ubuntu and Windows, in which case you would need to download the windows file for blender 2.8: https://builder.blender.org/download/, although with the level of detail you have provided it is rather hard to tell. Could you state what machine you are using, where you downloaded the blender file from, and anything else that is non-orthodox about your setup.


Is there and existing Blender renderer REST API service? There are plenty of Blender renderer SAAS providers out there. But in our use case we need to send a blender file + python file via an API and the SAAS will render, and provide the rendered results back to us. Is there any existing providers for this?

Perhaps you should take a look at RenderStreet.
I used it for my work as well, what i like about it is that they provide a plugin in Blender, from which you can upload a blend file. Then they do the rendering, they do an estimate of the cost (which can change over time, since your render frames can get more complex); you can ask someone else to pay ahead your render time (ea your manager, or your custommer). And they have web interface that looks quite well on a mobile phone. you can pause / start (multiple) jobs, and they have also FTP access to download your end result.

You might get cheaper elsewhere, but the fact that they offer such billing, and preview made it very easy to combine with real work.
Their support is also quite good, and their speed is blazing.

For sure there other render farms, and even amazone scripts.
But in a work situation this might be as close to saas in a "company-sense-work" way as one might get.

And if you a little bit more time left, you might find an old Coin minner who sells his hardware (that's my current situation), i ussually use that now unless i have to finish something in one day, then i go to a render farm solution.

(oh you might edit the script of renderstreet to make it even more Rest Alike, or ask their support to create it for you).


How can I organize the outliner with groups? When I learned the basics of Maya awhile back, they taught us that we could organize and clean the outliner window with groups. Anyway, it doesn't seem that I can hide multiple objects into one grouping in the Outliner in Blender.

Is there another way of doing this?

Basically you can use Groups and Parenting to organize your scene.

Grouped objects are displayed hierarchically in the group view.

Parented objects would be displayed hierarchically in the outliner's default view.

See the Outliner Documentation for more detailed information.


Adding image textures in texture paint There are many tutorials on how to use multiple textures in modeling detail onto the mesh but it seems impossible to find how to paint or stencil paint more than one texture onto a single object.

Is there a way in Blender to import or open multiple image textures and use them one after another on various parts of the same model like you can in other texturing apps such as Sculptris?

Thank you for your time.

The way I do this is pretty useful to me, so I will share this method here:

First, select the images you want to use and make copies in a new folder, renaming them with whatever tool or program you want to follow a sequence like 'image.001, image.002, etc' so that the same image name is shared and they follow a sequential number.

Load them as a new brush texture or brush mask depending on what you want to use them as.

Add a timeline editor to your workspace if not present, and set the end frame number to match the number of images in your image sequence.

Use the playhead controls or the left/right arrow keys to switch images as you paint.

Another neat trick is that you can press the Play button and paint, your dabs will change texture corresponding to where the play head is on the timeline. This can be used for many effects like randomly mixing wear images or changing scratch marks, or even just imitating Alchemy for idea generation.


Bendy bone ends don't follow rig, also 'stretch to' issues So I have a little bunny that I need to animate for a school final, although when I connect the bendy bones together the ends which I would use to control the bones don't follow the root bone

Also when using the 'stretch to' constraint to allow the flexibility of the bones, by themselves it works fine, but when I joined them to the rest of the armature they squish up against the main bone

Screenshot showing squish issues

End points stay in place while rest moves sporadically

Any help would be immensly appreciated  >.<

You might add your blend file to see whats wrong: http://pasteall.org/blend/
I assume that you didnt apply scale to the model before doing automic weights (that could explain the weird lower picture). Make sure you parent the bones correctly. If you find it difficult to make a skeleton start with rigify and remove the bones you dont need, then in the end turn some of the bones in bendy bones.


Texture is only rendered correctly in first frame I am new to Blender and I am trying to create an animation. My data is saved as a Blender voxel file which I load into a cube, adjust scattering etc. and it looks fine, but the texture is only visible in frame 1 and disappears in the following frames (in object mode and also when rendered).

What am I doing wrong?

Thank you very much in advance for your help!

The cause of my problem was that I had not set Still Frame Number to 1, see this post: Bug? Voxel Data Animation Issue (Still Frame Number Keyframe not rendering).

Maybe it helps somebody else.


If I am rendering with blender, can I open a new project while it is rendering? If I am rendering with blender, can I open a new project while it is rendering?

I will show you what I do when I try to open another page...

Ok, so while my project is rendering, I open up the Blender icon

This opens up a new page

I save this project

Then I open up the document(while my other project is rendering)

Then this pops up

I always thought that if I rendered something huge that would take weeks to render, couldn't I also be working with Blender on another project?
I know this a lot but it would really help me if someone figured it out...

Just open a new instance of Blender:

Windows:
Right click on the blender icon then choose Blender. This will open new blender instance.

Linux:
Just run the application another time

Mac OS:
By default, only 1 instance of an app can be run. You can work around this limitation by invoking Blender from the terminal command line. open -n /Applications/blender.app


Blender 2.8 Animation: How to select keyframes from inside the UI like in 2.79 In Blender 2.79, dragging your mouse in the middle of the frame would scrub through frames. Now in 2.78 it does a box select. In order to scrub through frames again I must drag my mouse across the frame numbers at the top.

How can I switch the frame scrubbing back to what it was like in 2.79?

As commented, the default setup in 2.80 is to use ⇧ Shift RMB in the middle of the animation related editors to change the current frame.

If you want to change this, you can adjust the keymap settings in the User Preferences.

You can find the frame change under animation.

And the selection settings are under Dopesheet -> Dopesheet(Global)

By changing the selection settings to use ⇧ Shift RMB and the frame change to use  LMB you can continue working the way you remember.


How to install Pyserial for Blender 2.83 I was looking at the answers for other Blender versions but it seems like it's always changing.

I don't know if I'm correct but something called "pip" is supposed to come with blenders python in 2.83
and you're supposed to use that to install a custom module.

My end goal is to be able to use "import serial" with my scripts.

I followed this tutorial: http://www.techmonkeybusiness.com/hand-installing-pyserial-into-python-installations.html

The tutorial says:

Download the pyserial source code. The file you're looking for ends with .tar.gz
Unzipp what you've downloaded
Copy the serial folder it is under PySerial\pyserial-3.2.1\serial (the version can change)
Paste the folder in your blender modules folder 2.83\scripts\modules

and now you should be able to use import serial


How does one align an object to trackers in 3d view? There must be a way to align an object to trackers, but I don’t know how or where to find this feature. Basically, I want to snap an object to a single, or collection of trackers in the 3d view after a solve. Specifically, an object solve, but at this point, it doesn’t matter. I get the feeling that it’s even possible to align and orient a 3d object to a group of trackers. I’m at a loss.  Any help would be appreciated.

In the Solve section you have two options:

3D trackers to mesh (which will create vertex where the selected trackers are)

or

Link Empty to track (which will create an empty in the 3D environment to which you can parent objects)


Is there a fast way to render an obj+mtl file to PNG I'm using command line blendering an obj+mtl file to PNG this question. However, it takes 2 seconds to render a scene.

Is there a faster way to do so? Because, I need to render hundreds of output with the same scene, different texture?

Generally, my task is to render hundred of output every time user put a new logo on a t-shirt model on web interface, so I need a quick rendering method.

Here is my updated blender file .blend and with_texture.blend

Follow @edna suggestion, I have turned off anti-aliasing. It still takes ~2s to render.

bpy.context.scene.render.use_antialiasing = False

Here is my output for rendering

We can't help you without knowing what it is in your scene that is taking the time. Two seconds is almost nothing, so presumably it is a very simple scene and rendered using the Eevee or Internal engine.

Simplest answer is to lower the resolution. Beyond that, I would suggest that this question would be better on BlenderArtists, where there is more room to discuss things like render settings and their impact on the final image.

Regardless, I suggest you post an example file here: PasteAll.org


How to get intersection of a specific object and the mouse in the BGE? Still following the same tutorial as I was following so long ago :P

At about 9:30 he mentions using rayCast() to get the intersection of the ray and any objects with a specific property.

This sounds like what I want to do, which is get the location of the point underneath the cursor on only a specific object.

Here is my script:

from bge import logic

def main():

    scene = logic.getCurrentScene()
    cont = logic.getCurrentController()
    mouse_over = cont.sensors["mouse_over"]

    if mouse_over.positive:
        tracker = scene.objects["mainTarget"]
        crosshair = scene.objects["Cross_hair"]
        floor = scene.objects["Floor"]
#        tracker.worldPosition = mouse_over.hitPosition
        tracker.worldPosition = crosshair.rayCast(floor, "isTrackerFloor", 0, 1, 0).hit

I think it should be working, except I keep getting type errors from the rayCast function arguments. I've tried shuffling them all around, but had no luck (with the above arrangement it throws TypeError: must be str, not int, which I assume means I have the property name in the wrong place?).

What is wrong with the arguments? and If the above technique doesn't do what I want after all, is there any other way to do this?

Blendfile

After some discussion with gandalf3 we found a solution:
The main problem was that the rayCast function will cast a ray between the centers of two objects: Those passed as objto and objfrom arguments. Thus the ray's hitpoint always was the position of objto, not the position over which the mouse hovered.

But rayCast also accepts 3D points as inputs. The trick is to use a Mouse sensor, set to 'Mouse Over Any', and connect it to the Python Controler which holds the script:

In the script one can use the rayTarget and raySource properties of the mouse over sensor as inputs for the rayCast funtion. The modified code looks as follows:

from bge import logic, render

render.showMouse(False)
#from bge

def main():
    scene = logic.getCurrentScene()
    cont = logic.getCurrentController()
    mouse_over = cont.sensors["mouse_over"]

    if mouse_over.positive:
        tracker = scene.objects["mainTarget"]
        crosshair = scene.objects["Cross_hair"]
        floor = scene.objects["Floor"]
        object, hitpoint, normal = crosshair.rayCast(mouse_over.rayTarget, mouse_over.raySource, 0.0, "isTrackerFloor", 0, 1, 0)
        tracker.worldPosition = hitpoint

One further note: The 'Edit Object' actuator which is set to 'Track To' seems to make the affected object point to the target with its local y-axis. Make sure the object with the actuator is rotated correctly in edit mode.


Marked Seams not all cutting in UV Map I am trying to UV Unwrap the lower part of a mouth.  The teeth have been outlined with seams to remove them.  I want to be able to Texture Paint them separately from the rest of the mesh.  Most of the teeth gave no problem but the front four do not want to detach from the rest of the mesh.  Removing Doubles found none and I can not find any other modeling problems.
Any suggestions on fixes that can be tried?

BLEND FILE

Weird because I've seamed the other teeth, unwraped with the first unwrap option (Unwrap), and it worked perfectly, so you must do something wrong somewhere, what option are you choosing?


Sleep mode rendering times So far I haven't needed to keep rendering over night but when I do get to that, I would like to know if blender continues to render when my laptop goes into sleep mode. I'm too scared to try it in case it screws up the render...

Nothing happens during sleep mode, not even the operating system is running.
Blender will not render because the computer is not powered on.

During Stand By the computer is in a low powered state with minimal energy consumption and little to no activity.

Depending on your version of the operating system the computer will either store the session in RAM memory or down to the hard drive reducing the power consumption to virtually zero.

If it serves as consolation Blender generally prevents Windows based operating systems, at least, from entering Stand By while running, so your renders will theoretically not be interrupted if the computer never enters sleep.


What steps should I take to speed up an Eevee render? I have a pretty beefy PC: RTX 2070, I7-9700K but somehow my Eevee animation ends up taking more than 1 minute per frame yet can render at around 10-50 FPS in the viewport with minimal quality loss compared to the full render, at around the same resolution.
So, are there render settings that I should change to make the animation render faster? or is the Eevee render just super broken?
It seems like this is a fairly common problem, brought up in many unsolved questions:
Why are my Eevee renders much slower to output than they are in a viewport?
Will it soon be possible to render an Eevee animation in realtime (2.8 Beta)?
Eevee Preview Render from Python
Many have come to the conclusion that either the normal render does more calculations to make a more realistic image, or that it takes time to save the image to the disk.
If it is the first case, what settings can I change to make each render take the same time?
I highly doubt it is the second case as it should not take more than a minute to save a 1mb file to my solid state drive.
And yes, I have tried the viewport render, which does speed things up substantially (like more than 50x faster than the regular render), but I'm still struggling to understand why the regular render is taking so long.
Here is a picture of one of the more demanding frames of the animation:

To reduce render time in EEVEE you can try the following steps:

In the screen space reflections menu and turn off refraction and enable Half Res Trace.
In the sampling menu reduce the samples for rendering.
In the output properties panel reduce the resolution of the from a 100% to about 75% or lower.


Is there a way to "hack" blender to work better in windows? I have been using blender for some time in a Macbook pro. Then I used it in linux. Now I'm running it in a Windows 10 machine with similar or better capacities and it doesn't render nor shows previews better. In fact it performs quite worse.

Task manager and resource monitor show Blender is not even close to maximum capacity (around 25-36% in CPU and memory usage 23 to 29% even when nothing much is running at the same time).

When I change the affinity to one processor I kind of get a faster render (not as fast as in linux or OSx).

Are there any other ways to hack windows or Blender so I can get a better performance?

use decent video drivers that actually have good openGL performance. It's not Blender that's at fault, it's not Windows that's at fault, it's the 3rd party hardware drivers that control your hardware.


EEVEE ignores light-emission outside of the camera frame Screen Space Refraction = on
Motion Blur = on
Refraction = off (when I turned it on, the raytraced light dissapeared completely)
All Materials are based on Principled BDSF
All Materials are set to Opaque and SSR
Transparent Shadow = none

As you can see, the reflection only occures when the emitter is inside the frame (at least in my scene)

Its kinda odd that it works perfectly fine in viewport because it renders the whole scene instead of just the frame.
I hope, that I just missed something in the settings...

Eevee is not a physically accurate render engine and employs a number of 'shortcuts' in order to get realistic results with minimal render time. One of these shortcuts is Screen Space Reflections (and Refractions).

As implied by the name, Screen Space interactions are dependent on what is visible on the "screen" (effectively the camera) so anything outside the visible field of view will not be considered. This is a method typically employed in game render engines and is usually 'good enough' but does have its limitations. By not considering anything in the scene which is not directly visible the rendered can significantly reduce the workload but in your case it produces such unrealistic results. For Viewport renders the same is true but the viewport can "see" parts of the scene outside the frame of the camera so the effect seems less pronounced (but if you adjust the view towards the edge of the visible space you should see the same effect).

If you want to continue using Eevee (rather than swap to Cycles) you have two options.

Render each frame larger than required and then trim off the excess in the Compositor. Resizing the camera to include a border without affecting the rest of the frame can be easily achieved by adjusting the Sensor Size of the camera (in the Camera properties) and the compositor can be used to trim back down the the required size.
Use Light Probes. Light Probes are effectively meshes that act as a boundary between your objects and capture details of the light crossing that boundary. The Light Probe includes settings as to the area of effect to consider for reflections/refractions. The light is captured by 'Baking' the light map - options for which are on the render settings under the heading 'Indirect Lighting'. Once the lightmap is baked it will be used for reflections regardless of whether the source is inside or outside the rendered 'screen space'.


Is there a way to separate colors from chained mix rgb nodes? I am creating a node group that I would like to be able to make 6- 8 individual colors available for the material. While it would be ideal, I am aware that color ramps cannot be used from outside of a node group. As an alternative, I have tried chaining mixRGB nodes with the intent of separating the colors individualy. The problem I am having is that chaining mix rgb nodes seems to be unpredictable at times as to how exactly colors will mix/ separate.

The following image is to better illustrate my difficulty. The material settings in node shown are for the object displayed. The resulting mix is nothing like what is selected from the group. It seems that colors are ignored rather than combined or separated, and I don't know how to control this. I ultimately want to control a color per node in the 'math' node group within the material, which I think I can work out once I get this part sorted.

I have seen and tried working with this answer, but wasn't able to work with it when combining multiples of these groups together. I am also having a similar problem with the proposed answer. (Separating colors predictably)

Thus far, I have the material somewhat working but the colors blend somewhat unpredictably and seem to be a bit unreliable in how the material is affected. I haven't been able to find a good way to approach the problem. Below are the current node setups for the approaches I have been using.

This is my current node setup for my approach using mix rgb nodes:

What I would like to achieve, I have come close to using color ramps, but the problem there is that in order to make a change to color, I have to open the group, make the changes, and then continue.

This is the setup I used with color ramps:

This is the 'Math" node group within the material:

The general look I am after is as follows, the shader ball on the left is assigned the mix rgb setup, and the one on the right,which would be closer to the look I'd like the material to have is the color ramp setup:

Is what I am trying to do possible? If so, what is the correct way of doing this?

Here is the .blend file for anyone who would like to take a closer look and not copy a node setup from a screen shot:

Here is a way that can help :

I dont consider here the way you are using this kind of ramp, but I have just focused on a way to obtain the ramp. So I did not wanted here to reproduce the way you are using the shader (only the ramp).

This "pseudoRamp" node group is a thread of several "rampMix" nodes groups (this node group can be reused to have more or less colors as inputs) :

And the role of each of them is to give a color between two (the previous color and the tested color) depending if the value is in between the values margins.

Here is the "rampMix" :

And the "rampMix" itself uses a "between" node group :

This last "between" node group needs to handle the limits of "lesser than", as it is strict ("<" and not "<="). So we cannot use "lesser than" with a "greater than" or we will miss the limit value.

Here is the blend file

Note : this is not perfect at the limit, as you cannot downgrade the amount of colors (the last will stay last, but previous ones can overlap each other). So a little enhancement is needed for that.

Complement for the criss crossed aspect

The nodes described above can be mixed in order to make crossed color lines :

The first nodes on the left are here to modulate the amount of strips and are based only on the X, Y values in order to cross these axis only.


How can I convert a node made material into an image texture? I have a sphere having a planet material MADE WITH NODES, and I want to convert this material into an image texture; because this material is made with nodes and only works in Blender, but I want to use in another software.
This is my sphere material :

For Example :
This is Jupiter :

And this is the texture :

In this case I used a downloaded image for Jupiter to be the material but I want the opposite, I want to change the material to image texture Like The shape of Jupiter texture.
Is there anyway in Blender that can achieve my goal ?
This is the file with my sphere material .

Textures Needed :

Albedo / Color / Diffuse
Normal Map
Roughness
Glossines

I am using normal nodes and I am not useing the new Principled-shader

The method of creating textures is called Texture Baking. Different kinds of textures (normal map, specular map, albedo map, etc.) take different sources, from which you 'bake' the texture - it can be surface normals, materials, lights, etc.
How do I bake a texture using Cycles bake
Not every material can be easily baked into single image without visual loss.
Many materials have properties like refraction, surface normals, roughness and many others, which rely and change with lighting. Usually you need to bake several textures from a single material to be able to re-create it in other app's shader system.
You might need textures like:

albedo
normals
transparency
emission
sub surface scattering color
and others..

plus if the shader system is modern PBR based engine, you will also need:

roughness
metalness

and if it's specular based, you will need:

specular
glossiness

Cycles materials can have very complicated node networks, so what I recommend is to build your material using the new Principled BSDF shader, and when you are satisfied with the result, bake all the inputs of this shader one by one into textures with 1st method (to not do this manually you can also search for addons that bake textures for specific engines, like this Unreal texture baker):

1st method - bake as Emit pass - anything that goes in, you get exactly out:

pass through emit shader

fool-proof method for any RGB, B&W, Value or Vector shader input.

2nd method - render the surface into a texture - it's like rendering into UV space instead of Camera space:

You can choose to bake with direct, indirect (bounce) or both lighting and to include or exclude different render passes (diffuse, glossy,..).
This is useful when the other app's shader engine is not that powerful and you would like to bake lighting, shadow or other information into the texture(s).

3rd method - You can choose each pass from 2nd method as a separate Bake Type option. It's the same as Combined and leaving only that one pass enabled. There is however an extra option to bake Color only without any lighting taken into account:

4th method - Bake Type: Shadow. Bakes shadows, but only in B&W. For colored bounced shadows the surface has to be baked twice as type: Combined - with light source on and off - and then the result obtained with difference of those 2 textures.

5th method - Type: Environment - bakes environment lighting into texture

6th method - Type: Normal - bakes normal map. Depends only on geometry in the scene. Rendering samples do not influence this baking process.

For anyone not familiar with Render passes this might be confusing. This is how the passes work and how they are combined into the final render:

More on this and image used is here: Cycles Passes

Since you uploaded your .blend file, I can show you the steps in a practical way.
If you want a rectangular output like in your Jupiter example, we need to redo your UV unwrap. Left is how it is now, right is what we need:

Unfortunately a sphere geometry cannot be unwrapped like that, but a warped plane can. The more geometry towards the poles, the better it will be:
Rectangular plane into a sphere
Download the file attached, append the plane, unwrap it to the whole UV space (unwrap from top - Project from View (Bounds)), move to frame 60, apply all the modifiers and scale the sphere to your liking. Since your material is procedural, it will look on this new sphere the same (left original, right fixed UVs):

As a side note, there is an issue with the material. There are black lakes, that behave like a sharp mirror. These areas will likely generate artifacts when trying to bake some information from them:

Now comes the baking. Every equirectangular texture has to have a ratio of 2:1 (like in the Jupiter example), so I will create a new texture for baking with dimensions 2048x1024, color black (does not matter), no alpha channel.
Since I don't know how you want to use this sphere in the other application, I will go through several baking options and results:

Bake everything. Type: Combined, all passes and lights enabled. The resulting texture:

As you can see, the light is baked in, so is the darkness. If you view this texture on the sphere, you get exactly what you would render from the camera:

To fix the darkness, we can delete the light, light the sphere from all directions with the environment, and do the same bake again:

Now when we add this texture to a sphere and we light it with a lamp, we get this:

The lighting will behave correctly, but the material not. We lost the specularity and roughness information. The oceans are no longer shiny, everything behaves the same.

I guess the previous one is what you wanted. But if you would like to create all the diffuse, roughness, normal from displacement, etc. textures for some game engine for example, it is best to bake it from the Principled BSDF shader (very easy to get PBR textures). Luckily I was able to optimize your material - turns out it is just a glossy shader and some redundant nodes, you can delete them:

From this we have 3 inputs - glossy color (specular), glossy roughness (by inverting it we get glossiness) and displacement. First two bake using 1st method through Emission shader and Type: Emit option:
Specular:

Glossiness (in Blender Internal this is called Hardness):

For the normal map select Type: Normal and let the displacement be connected to the Material Output Node as is. But add a diffuse as shader, else it won't work (don't ask me why:) :

Normal:

Albedo texture is black, there is no diffuse component.
Now when using these 3 textures this works much better and closer to how the Cycles material behaves:


Reconstructing axis of pot with one shard via vertex normals I`m planning to do a reconstruction of a whole pot from one shard of it.
I've already thought of a way to do it, but I really don`t know how to make it happen in code.
Theory: every shard has a certain bend to it. This bend contains two pieces of information:

the orientation of the shard within the pot
the diameter of the pot.
You can easily see this when turning on vertex normals in edit mode. Technically, from the process of making pottery, there is a center axis in the middle of every pot. The vertex normals cross this axis, so you can see the axis clearly when turning the vertex normals on.

Problem:
how do I reconstruct that axis via script? mathematically it is the intersection of the vertex normals with a thin cylinder.
Step one would be to select the vertex normals from a certain selection only, as I don`t need the one facing outwards...

Test Shard

Proof of Concept

Result on single selected edge of convex hull
Further to comment, have added this as going some way to proof of concept,
Fistly here is a script that copies your object and mesh to another, goes into edit mode and converts it to a convex hull.
Select the shard and run
import bpy
bpy.ops.object.mode_set()
bpy.ops.object.duplicate(linked=False)
dupe = bpy.context.object
dupe.display_type = 'WIRE'
bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.convex_hull()

after which new wire frame of the convex hull of original in edit mode with all geometry selected.
The next script goes thru the edges of the hull, finds the closest point on the mesh to its middle point, uses these to create a circle from chord as described here How can I create a mathematically correct arc/circular segment?
To visualize have added a vert at circle center and the two joining edges.  As data would save as radius, centre coordinate, and normal (axis of rotation the normalized cross product of two edge vectors)
Test script, creates predicted circle "wedges" for each selected edge.  Run with convex hull mesh in edit mode, edges of interest selected.

Result on all edges of convex hull
import bpy
import bmesh
from math import asin, degrees
context = bpy.context
scene = context.scene
ob = context.object
me = ob.data
bm = bmesh.from_edit_mesh(me)
shard = scene.objects.get("3D_Scherbe_Model_50K")
#edges = bm.edges[:]  # all edges
edges = [e for e in bm.edges if e.select]
#edges = [e for e in bm.select_history if isinstance(e, bmesh.types.BMEdge)]
for edge in edges:

    o = (edge.verts[1].co + edge.verts[0].co) / 2

    hit, loc, _, _ = shard.closest_point_on_mesh(o)

    if hit:
        h = (loc - o).length
        if h < 0.1:
            print("On surface")
            continue
        a = edge.calc_length() / 2
        r = (a * a + h * h) / (2 * h)
        if abs(a / r) > 1:
            # math domain error on arcsin
            print("N/A")
        else:
            angle = 2 * asin(a / r)
            print(f"{r} {degrees(angle)}")
            vc = bm.verts.new(o + r * (o - loc).normalized())
            for v in edge.verts:
                bm.edges.new((v, vc))
bmesh.update_edit_mesh(me)
me.update()

Notes.

Instead of predicting a circle from the closest point to edge centre, could walk the edge and make  sample points to crunch into   https://meshlogic.github.io/posts/jupyter/curve-fitting/fitting-a-circle-to-cluster-of-3d-points/ and https://github.com/ndvanforeest/fit_ellipse as suggested by @RobinBetts.

Similarly could use the generated circle estimate to test against actual mesh surface.

Look at the normal returned from closest point on mesh.

Narrow down the selection, is there historic data that suggests radii or wedge angle within a certain range.

Project (closest point on mesh) equal length "subchords" of edge onto mesh, if each has same radius and angle would be a perfect match.  Minimize for best fit.

Look at the bounding box dimensions. If an edge is shorter than some fraction of minimum bbox dimension it is probably not major pot axis. Consider shaving off some percentage.

Decimating cleaning or smoothing shard mesh in some way.


How can I change the number of Samples in Blender Render in 2.70? How can I change the number of Samples in Blender Render in 2.70? I've looked everywhere in the UI, the internet and the manual and can't find it anywhere. This page in the manual makes it look like it should be very obviously found in the Scene tab, but I still don't see it.

That page is for cycles (note the URL: /Render/Cycles/Integrator).
"Scene settings" in that case refers to settings that effect the entire scene, as opposed to material settings which only affect objects which use that material.
There really isn't a global samples value for BI the way there is for cycles, as the way they work is so different (see How is Cycles different from Blender Internal?). However, BI does use raytracing, similar to cycles, for some things. So where applicable there are sample settings to control the number of raytraced samples:
Global ("scene") settings:
When the Gather method is set to raytrace, you can set the number of samples used for AO and environment lighting in Properties > World > Gather > Sampling:

Per material/lamp settings:

Glossy reflection and refraction in Properties > Materials:

Raytraced shadows on lamps:


Can't select everything in edit mode? I still can't select everything from my model when I go into edit mode. There is a red line all around one piece of my model when the other is selected. I have one modifier on the top part, if it changes anything. Here's a screengrab if it helps identifying the problem.

http://imgur.com/5aQL3kh

Thanks.

The orange lines say: this is an other object.
Select the upper object in object mode and see if I am right.


Remove extra geometry from objects Is there a tool or an easier way to remove unneeded geometry from objects? Mostly when using a "Displace" modifier, on many places there are flat surfaces where there is extra geometry on the mesh, that you would like them to be removed. At first I thought of the "Decimate" modifier, but is there a way to do it more evenly. By preserving the edge/face flow and such. Is there some feature for something like that in Blender?

From this

To this

Or to this (if I want the geometry to be to the very limits and worrying only about the shape)

Manual with good topology

To get the topology in your second image. Select the loops you want to delete with Alt RMB , or in Wireframe mode use border select (B). Then press Delete and choose Edge Loops.

Manual with N-gons

To delete all edges and vertices on a face and just be left with a large N-gon. Select all the faces on a plane (example everything on the top); then press Delete and choose Limited Dissolve.

Modifiers

If you are less picky about topology, and want a more automatic solution Then use a Decimate modifier. For examples like your's set the Decimate modifier to Planar, then adjust the angle limit to suit your needs.


Texture painting showing UVGrid when coloring I modeled a human figure and i have UVMapped every part of it. Now i am trying to TexturePaint it but when i draw the color a UVGrid appears under the color. I would like to paint my model whithout that Grid showing. Does anyone know how to get Rid of it?

You might have set an UVgrid image as Brush texture.

The brush texture is color-multyplied by the brush color. If you remove the brush texture you'll be able to paint the color only.


Missing render preview. No automatic re-render when changes are made, etc Other than installing Node Wrangler, I haven't made any changes to user prefs since install.
I do have "Update Automatically" checked.
My materials preview, however, is updating when I make changes to it.

edit: wording improved

If you're referring to the "update automatically" option under view menu of UV/image editor, which is also used to keep rendering results, this:

which says "update other affected window spaces automatically to reflect changes during interactive operations such as transform"

Imho that has nothing to do with re-rendering automatically. That, for sure, acts on UV editing: if enabled, e.g., other 3D views in "textured" mode are updated automatically while you're still transforming your UV map in that editor. Without it enabled, the update happen only after you commit the UV editing. It sort enables a realtime results preview while editing UV.

To get something similar to what you describe, you could get that effect using another Blender editor option:

instead of using this windows setup:

you could use "area duplication" options like:

obtaining a small separate window that you can set as "rendered" viewport shading (works both in Internal and Cycles, nowadays):

Now, in this way every little change in your objects is immediately reflected (re-rendered) in the small window. Hth.


Blender not displaying animated keys I am trying to animate a material, but the animated keys are not showing in the graph editor.
Can anyone give me a clue, please? Shall I activate any kind of addon, feature, etc? Or is it a bug on blender?
I am using blender version 2.91.0. Below a print from my situation. I also attached a MWE .blend file. Thank you!

Select both the object and the node with the animated property:


How to spin more than one propellers(objects) at the same time I was making a drone animation and i wanted to know how i can make the three propellers i made to rotate like a helicopter does at the same time in an animation.

Using Drivers.

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

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

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


A mess happens when i try to unwrap my model, any idea whats causing this? Please help i have been at this for a couple of hours, and i have no idea how to fix this.

the problem is your model. You have got a lot of strange faces in the inside of your sword, and on top of the sword some vertices that are not connected while they should be. So you have to delete all the inner faces and connect the vertices that should be connected. And then add the seams and UV-unwrap the model
In the blendfile I add, I corrected it all so you can see the difference.


How to smooth only one side of the model? I have this medallion thing. Which i made from a png and i need to smooth only one side of it. Is there a way to accomplish this? Other than modelling it from scratch.

One side of the coin as in top and bottom? If so you can extrude the bottom faces and apply "Smooth vertice" then apply "shade smooth" but only with those bottom faces. To do this you have to be in edit mode and only select the faces that you want make smooth.


Constantly running modal operator TL;DR: Skip middle paragraph.

I'm trying to make an addon that draws certain info in the view, and have it do that basically all the time that the addon is on.

The way I've been told bgl drawing works is that you put the drawing code in a modal operator. However, all examples I've seen involve starting it from the invoke() method, which is run
when the user executes the operator - not what I want. I've also tried putting the bpy.context.window_manager.modal_handler_add(self) code in the register() class method, but because that method does not have access to self, I only got errors with the various arguments I tried (which were: none, the class (its general name), the cls argument that register(cls) gets, and some others. If needed I'll expand on this).

How do I make the operator run "on startup", or how else can I achieve my goal?

I am afraid this is a limitation and you cannot interactively draw with bgl outside of modal operator. There is no way to initialize the drawing handler because it needs the modal operator for access to events and the modal loop where tag redraw would happen.

Tag redraw could be done but the events are the bummer. Linking similar: Get events without running modal

From blender api user events outside of modal can't be caught. There is probably a possibility to catch them with python in monitor space and from blender areas and window positions get them local (like mouse coords).

From user perspective how blender is made it seems the philosophy is that user should have control over modal operators and start/end them manually ideally with button in ui. So something doesn't run in the background without your knowledge. There is somewhere an answer from Brecht on something similar but couln't find it.

There is possibility to call an operator from handlers, but mostly you will get another limitation:

 "RuntimeError: maximum recursion depth exceeded"

Calling the operator from load_pre handler should be fine though. See similar: My custom timer is cancelled when loading a *.blend file


Is it possible to create a custom object type with Python API? I am writing an IO + editing tools addon for a very complicated model format (World of Warcraft WMO). Besides meshes, it is supposed to have a few specific object types. Is it somehow possible to add a new type of object to Blender with Python API and define custom rules of editing for it. I'd not mind using other solutions if possible.
Here is what I am trying to achieve:

Fog spheres. This object should basically represent a colored sphere with custom properties, that you can scale, move and rotate. Right now I am using a mesh sphere for that, but I do not need edit mode in it.
Water plane. Actually just a plane with static X and Y coords for vertices. Similar to what people often use for terrain in game engines. I need to be able to edit the Z coords of this plane, but block the editing of X and Y coords since you cannot change them. I also need to be able to mark specific faces with flags.
Doodad. Actually a reference to another object file. It should be a regular mesh object, however I need to block any changes that can be done to the mesh itself, since it is actually a different file. That includes blocking things like apply rotation, scale and other operators that can potentially change the mesh of the object.

Are these things anyhow possible to achieve with Blender Python?

No, object types are hard coded in Blender's C code.

Typically developers of add-ons use Empty types and attach custom properties to them.


How to make local objects link mantain their hierachy in Blender 2.8 python? (SOLVED) Is there a way to maintain hierarchy objects after we Make Local several linked objects the scene ?

I notice that if we try Make Local the parent object, the child will be put outside the parent, in my code example below, the last for loop was to make every objects that start with prefix "C_" will be made local, but I can't find a way how to order the loop so it would start from child to parent, instead of randomly pick the object.

import bpy

context = bpy.context
scene = context.scene

filepath = "C:/Char/C_Character.blend"

# append all objects starting with 'C_'
with bpy.data.libraries.load(filepath, link=True) as (data_from, data_to):
    data_to.objects = [name for name in data_from.objects if name.startswith("C_")]

# link them to scene
for obj in data_to.objects:
    if obj is not None:
        scene.collection.objects.link(obj)

# make them local
for obj in scene.objects:
    if obj.name.startswith("C_"):
        obj.make_local()

Thanks a lot !

I somehow accidentally using Operator Search (F3) and type in Make Local to selected objects, and the hierarchy perfectly maintain, though using operator is not really ideal, but it works at the moment.
EDIT : Please make sure you turn off Empty and Curve object display, it need to local mesh first to mantain hierarchy

so I change the script to :

# make them local
for obj in scene.objects:
    if obj.name.startswith("C_"):
        bpy.ops.object.select_pattern(pattern='C_*')
        bpy.ops.object.make_local(type='SELECT_OBJECT')

So I hope this can be helpful

Thanks


my fire simulation is not reflecting the right way so i'm trying to make a fire simulation reflect off my desk but im having a problem. it looks like there's a box there but the only things that are being rendered are the smoke simulation, the plane that its reflecting off of, and the cylinder. i'm using the wisp shader for the fire if that means anything.

The issue comes from how you mix the things together. In your second layer, the volume domain is excluded, so it's not rendered.

A way to go arround this is to render everything from one layer, but instead of mixing two layers, we will mix different passes of one layer according to object IDs, thanks to the ID Mask node.

Here's my version:

I'm sure it's not the best solution, but it's all I can think of.


Setting up render farm? GPU VERSUS CPU I wish to get some advise for 1 MASTER and 9 SLAVES PC for performing rendering over network. I need to know if I CPU versus GPU rendering is faster? If yes then I will buy more powerful CPU and use a low-end graphic card.

It really depends on your scene. At the Blender Institute we render mostly on CPUs; when a GPU runs out of memory it'll crash, and when a CPU runs out of memory it'll swap. Things will get slow, but at least the render will finish at some point. Of course it also helps that we have a few very nice servers with CPU 40-80 cores each. If the RAM required to render the scene fits the GPU memory, things should be fine and it really depends on what kind of hardware you fit exactly.


How to remap my UV without messing with textures already applied to a mesh? The title says it all but i'll give further details. I have a 3D mesh on which I have already applied some textures, but i didn't care about uv mapping it the proper way. The problem is I figured out I must care about that now but I don't wanna retexture it from scratch. Is there a way to remap the UV while keeping the texture intact in its place?

You can have multiple UV maps on an object*.
With multiple UV maps you can keep your "old" UV map for the texturing you already did. Then add a second UV map and properly unwrap your object.

In the Object Data tab of the Properties window under the UV Maps heading, you will see something much like this:

Click on the + button, that will add another UV map slot to your object.

You really should name both your UVmaps now, just double click or CtrlLMB  on the name in the list to rename it.

Note: Be careful which UVmap is selected (highlighted in blue in the list), simply clicking on a UVmap will change what UVmap is selected or active. When you are unwrapping your object you will be changing the active UVmap.

Last step, go to everywhere you used the "old" UVmap: cycles nodes, BI material textures, modifiers, and dynamic paint, and make sure it is using the correct UVmap.

Now you can safely, in the new UVmap, unwrap your object however you like and it will not affect your previous texturing at all.

* In reality it is not added to the object, but the object data. However for brevity I will refer to it simply as the object.


Python: exchange object I got a .blend file where I got a simple cube and a plane. The Cube has some attributes like being a rigid body etc.

Now I let this cube fall on to the plane and then render an Image. This is my code:

scene = bpy.context.scene
cam = bpy.data.objects['Camera']
obj = bpy.data.objects['Cube']

scene.render.image_settings.file_format = 'PNG'
scene.render.filepath = '/path/testImage.png'
scene.render.resolution_x = 640
scene.render.resolution_y = 640

scene.frame_set(scene.frame_end)
bpy.ops.render.render(write_still = True)

I would like to exchange the cube-object with another object coming from an .stl file. So loading this stl object and having it instead of the cube but with the same attributes that I set to the cube and at the same position.

How can I do this?

With help from @batFinger I derived this working solution:

import bpy
import os

scene = bpy.context.scene
cam = bpy.data.objects['Camera']
obj = bpy.data.objects['Cube']

scene.render.image_settings.file_format = 'PNG'
scene.render.filepath = 'testImage.png'
scene.render.resolution_x = 640
scene.render.resolution_y = 640

# change mesh
path = r"assembly_upsampled.stl"
bpy.ops.import_mesh.stl(filepath=path)
obj.data = bpy.context.object.data
bpy.data.objects.remove(bpy.context.object)

# scale size
max_dim = 2
if obj.dimensions.length:
    obj.scale *= max_dim / max(obj.dimensions)

# render
scene.frame_set(scene.frame_end)
bpy.ops.render.render(write_still = True)


Duplicated objects copy animation I have been designing a defense tower. I have a sphere that rotates around 360deg as it's default animation. I added two cylinders to it, one being the base for the guns, and the other being the actual gun. I plan to add another animation to as well.

The problem is that the gun cylinder(s) "Cylinder.003" are linked somehow. I used ⇧ Shiftd to duplicate the cylinder and I have 2 of the exact same cylinder. When I try to make my animation, both cylinders move, but I only want one to move at a single time. If anyone can tell me how to "unlink" these "linked" objects, it would be much appreciated. I am stuck on this project until I can unlink it.

Any help would be greatly appreciated.

In object mode, select one of the cylinders and press U to bring up the Make Single User menu.  Choose the Object Animation option. Now they will each have their own Action datablock you can animate.


Which Mac is suitable for Blender 2.8? I am considering purchasing a Mac for my godson who will be using it to run Blender 2.8.  I know very little about this program.  All I can find are requirements for a Mac that will run earlier versions of Blender.  Would someone please recommend a list of requirements for a Mac (or a link to a list of requirements) that I could use to find a model that can run 2.8?  Thank you in advance for all your help! Sincerely, M. Lap

The most important component for Blender is a good graphics card. Unfortunately, to get an even remotely decent GPU (Graphics Prcessing Unit) on a new Mac you'll be looking at $3K+, certainly not worth the money.
Macs these days come equipped with AMD cards which have sup-par support for GPU rendering. Even if you could somehow get an NVIDia card to work on your Mackintosh, Apple decided to deprecate third party toolkits on their platform, thus making CUDA unavailablke for GPU acceleration of Cycles renders.
Additionally, given that also Apple decided to deprecate support for third party graphics APIs like OpenCL and OpenGL in favor of their own Metal API you will always be looking at a feature crippled system when compared to competing platforms in terms of GPU rendering and real time drawing performance, which makes MacOS an even less of an advisable ecosystem to invest in if you are seriously looking at open source software.
For that reason, I cannot recommend a Mac for Blender.
With a gaming PC, you could buy something with very good specs for about \$1~1.5K. A laptop with specifications like Intel Core i5 for CPU and 8GB RAM would also work just fine, and you can find a laptop with an NVIDIA GTX 970 on Ebay/Craigslist for pretty cheap these days.
For the NVIDIA 10 GPU series cards a GTX 1060 would be a good entry point. NVIDIA will soon release new GPUs for their 20 series. Laptop with a 20-series GPU might be a bit expensive though, but it might be worth-it specially if you were planning to spend ~$3k for a MacBook Pro.
If you absolutely have to buy a Mac then the 15" MacBook Pro is probably the best bet. It's the only laptop in Apple's lineup with a dedicated GPU, the MacBook Air/12"/13" all use integrated graphics which is admittedly insufficient for Blender 2.8 (it's too slow).
Related

What are the limitations of Blender for Mac?
eGPU + Blender + Cycles + Mac
eGPU Vega 56 (Blackmagic) Mac + cycles problem


How to make NLA strip rotate based on previous action? in this file http://pasteall.org/blend/34781, i would that the person turn left and continue to walk but there is a little bit problem that i could understand that canceled the turn left action. Could you help me

I resolve it. You have to cancel the rotation master before starting the new moving cycle. This is my new file .blender


Interpolate two sets of tracking points Lets say I have two sets of tracking points with the same number of points/set, is it possible to associate points from one set to the other and make them interpolate in time?

EDIT:

As suggested by @poor, I'll try to clarify what I try to achieve.
This question originates from @cegaton's comment in 2D morphing video images.

I am trying to use the tracker to morph from two video sequences. Imagine two videos, first video has a square moving from left to right of the screen, second video has a rectangle moving the same way. I track four vertices of square as object A and the rectangle's as object B. Both tracking points move according the the image of its video from left to right, but what I want is to interpolate those tracking points (I don't know if creating a new object C or just modifying one of the existing objects) so that at the same time they move from right to left they also aproximate positions of object's A points to object's B points. In the end we will have four points moving both from left to right and adjusting position from A to B thus making posible using on a plane two videos that distort and fade from video A to B.

Hope this makes sense.

Let's say you want to interpolate the movement of empties between frame 0 and 50

create one empty for each tracking point of set A.
add a constraint to the empty associating with tracking point 1 of set A
add a constraint to the empty associating with tracking point 1 of set B
set the influence of the first constraint to 1 and add a keyframe
go to frame 50, set the influence to 0 and add a keyframe
do the inverse of steps 4 & 5 for the second constraint (0 --> 1)
Repeat steps 2-6 for the other tracking points

This strictly answers your question of how to interpolate between tracking points (you might need to adjust the curves to be linear).

However since you need to morph the next logical step was to use the empties as hooks to deform a mesh. However the hooks need to modify the position of the vertices directly and not relatively as they do (see this queston ). Still, the half-solution here is worth sharing.


Performing a quick / rough render Is there a way to reduce the quality of a render in order to output it quicker? I'm currently using the Cycles Render in Blender 2.79 and find it quite slow on my old machine.

It would be good if I could render something quickly in a lower quality just to get a rough idea of how things will look, before I commit the time to rendering it properly.

The same goes for the real-time 'Rendered' view.

Is this possible at all?

You could try a new version of Blender, in some ways it is more optimized and organised.

Anyway, these steps are similar in all versions

Change amount of samples to around 10-20.
Reduce resolution (size of the output)
Multiply viewport pixel size

This will make your render look really grainy and crappy. Just like you asked.


I can't render past frame 35! Whenever I render an animation I have downloaded and edited it wont render past frame 35. It stops, freezes on me then I have to open it back up again! But when I attempt to make my own, (thats why I download templates I cant animate...) It does... What is a possibility or the problem? I need this fixed ASAP! I'm making this for a client and I cant have a bad rep!

If Blender is freezing and crashing while you're rendering, then the animation is doing something that demands more resources than Blender is able to give it.

Without being able to see the file, it's really hard to guess. There are a number of things that might be going on at frame 35. At that point, there are some keyframes. These keyframes might be related to something very complex going on. There might be a whole lot of objects introduced into the scene at that point, which would increase the RAM requirement. There might be some kind of feature introduced at that point, that Cycles isn't able to handle.

It looks like this scene might be trying to use Animation Nodes, which aren't supported in 2.70.

Generic solutions are few and far between, but one of them is upgrade Blender to the latest release (the one on Blender.org, not from the nightly builds). Don't try to solve anything else until you've upgraded.

The next thing you need to do is find out what NEW thing the scene is trying to do at frame 35.

Look in the Visual Sequence Editor to see if there's a new effect or strip that starts at frame 35.
Look in the Graph Editor and/or Dope Sheet to see if there are any animations that start on frame 35.
Look in the Compositor to see if there are any nodes that have keyframes. Maybe there's a compositing thing that starts at frame 35.
Look in the Console (Windows -> Toggle System Console) to see if it's giving you any error information that might help.
Look in the Info panel (blue circle with an 'i'; it looks like it's just a menu bar, but drag its border to make it bigger) to see if there are any errors there that might help.

On an unrelated note, if you've gotta deliver this to a client, you don't have time to solve this problem. You've run into this problem already. It's likely that you'll run into more problems with the same file, even if you solve this one. You need to dump this file and go find another solution.


Is there a way to render an animation that looks like as if it is rendered with the OpenGL lights (View-port lights)? The view-port lighting is very useful for me for viewing objects and I like its lighting system, which made me wanting to replicate it into my animation renders. For example, I would use this when I want to render a scene with view-port lighting results and at the same time if I want to display some features from the blender internal or cycles render engine. For view-port render there is a view-port render button -

However, the view-port rendering does not feature features from both render engines.

Is there a way to replicate the view-port rendering so that an animation looks as if it is rendered with the view-port rendering button?

Can you tell which part is Cycles and which is viewport render? ;)

Unfortunately blenders normal ball widgets don't have any way to set values numerically (yet), so you'll have to use some python to get and set the values.

Get the default openGL lights from the user-preferences. To do this, run the following in the python console:

for light in bpy.context.user_preferences.system.solid_lights:
    print(light.direction)

It should print something like

<Vector (-0.8920, 0.3000, 0.9000)>
<Vector (0.5880, 0.4600, 0.2480)>
<Vector (0.2160, -0.3920, -0.2160)>

Create a material and add three normal nodes, then run

bpy.data.materials['openGL'].node_tree.nodes['Normal.001'].outputs[0].default_value = (0.5880, 0.4600, 0.2480)

Where openGL is the name of the material, Normal.001 is the name of your normal node, and (0.5880, 0.4600, 0.2480) is the direction you want to set it too. Do this three times, changing the the node and direction until your three normal nodes look like the light widgets in the user preferences.
Copy/paste the diffuse colors from the user prefs into RGB nodes in your setup:

Note that you can copy/paste colors by pressing ⎈ CtrlC/⎈ CtrlV while hovering over a color field, but make sure the correct window is focused when going between multiple windows.
Setup the rest of the nodes, and enjoy your path-traced openGL renders :P


Stretch heightmap over whole plane How do I stretch my heightmap over the whole plane?

My plane has the dimensions of 6000 x 6000 and I subdivided it so that each pixel should be the value of one rectangle. My heightmap comes with 200 x 200px resolution.

I imported the image as texture, set the 'color space' to 'linear' and the clipped it.

Now I added the modifier Displace but it only interprets the values on a little area in the middle of the plane.

How do I stretch my heightmap over the whole plane?

The result should be like that

You can do this also by hand, but one easy way would be  to use the import images as planes (included but not enabled by default), importing your "map".

You will get a plane with the same aspect ratio as your "map", of just 4 vertices, with the uv mapping already done. Just subdivide the plane 200 times (cuts, 6000/200=30), and apply displace modifier.

If using blender render, you can displace directly selecting the already imported "map" from the list. With cycles, the displace modifier only uses  a texture, but there is a button (see image below) in the modifier to "show the texture in the texture tab" where you can set the texture to image, and select your "map".

then in the modifier set it to use "uv coordinates"

cycles example:

blender render (internal) example:


Eevee outputs large sections of video completely black I'm trying to render a short 8 second mp4 animation loop, but for some reason Eevee keeps replacing large sections of the outputted video with complete blackness. Some of it renders the way I want, but then the rest is just black.. I've looked through the settings and I can't find anything that looks like it would cause that, and I have only two animation keyframes to make the camera move, nothing that would affect lighting. Can anyone help?

Okay I fiddled some more and fixed the problem. Turns out I had broken image files in the video sequencer that were overwriting it. In case anyone else has this issue, try rendering it with the sequencer bypassed. Hope this helps someone!


How do I focus the camera on a certain area or object? I was working on a scene and the camera moved pretty fast in it that you couldn't even see the object in it. So I would like to know how you focus the blender camera on an object so that when the camera moves fast you can see that object clearly.

Tracking

I think the term you wanted to use is "tracking". Focus refers to whether the camera is in-focus or blurred.

Select your Camera
From the Constraints context add a Damped Track Constraint
Set the Target to be your object you want the Camera to follow
Set the axis to -Z (that's the direction the Camera looks out of)

Focus

If you want to set the camera's focus, (as in blur), add an Empty to your scene, then from your Camera settings specify that the Empty is to be used to specify the point of focus. Position the Empty accordingly. Adjust the F-Stop to control the amount of blur.


Particle system deforms in the render I'm trying to render grass made out of a hair particle system and it deforms itself every time I render it on EEVEE, even though it looks right in the viewport.
I changed the shader so it's not that, and I've noticed it happens when the particles count goes over 5250 (I'm trying to render at 15000). Below I share the images. I'd share the .blend file but blendswap isn't uploading it and I believe that's how we're supposed to share it?
Following is the link to the .blend file https://pasteall.org/blend/b42803bc22bb4ebfb7e683e56a1f5dc6
Ok (viewport):

Render:

Found the issue, the children particles were too many for rendering.


Show/hide mantaflow particles This is probably a simple answer, but I can't seem to find it.

I've already searched BSE, but I can't find a related question.

How can I show/hide the particles in the mantaflow simulation? I would like it so that I can only see the baked mesh, not the particles.

Select your domain. Go to the particle properties tab. Change "Render As" to "None"


How to generate a Transparency "Gradient" Shader?(Eevee) Using the  setup below ,a transparent gradient shader does not get generated.
How to generate a Tranparency "Gradient"  Shader in Eevee?

UPDATE 1

Tried the below 2 solutions by @Moonboots but was not getting the same result.  Also checked switching Blend mode to Alpha-Blend and unchecking 'Show Backface' ,but not getting transparency.What's missing?

I'm not sure to understand your node organization, in my opinion you should choose between the alpha and the transparent solution, which would give the ColorRamp plugged into the Alpha socket:

or the ColorRamp into the factor of the Mix Shader between the Principled BSDF and the Transparent:

Also, maybe deactivate the material Show Backface option?


Axis is locked when sculpting? I am currently sculpting and for some reason I can't add detail to the side of my mesh; it only works for the front and back.

If I grab my nose, its axis is locked to X and Z. It can't move on the Y axis but can be moved on the X and Z axes.
I can only sculpt on the front and back of the mesh, I can't sculpt on the right or left.

Make sure you don't have any axes locked in Tool shelf > Symmetry / Lock > Lock:


How do I prevent duplicate materials when copy-pasting? I am doing a lot of object copy/pasting, but I want the new copies to just use the same material/texture as the original. Is there a way to prevent Blender from automatically duplicating the material for the new copy?

Copy-pasting is a operating system level tool provided as a convenience for quickly transferring data between different environments, not something you would regularly use inside an application as part of its native workflow.
It should be used carefully and exclusively when required between different files, rarely within the same file.
It can lead to all sorts of issues, some of which you already encountered, like material duplication, losing datablock sharing, breaking child/parent relationships, among others.
If you are duplicating objects within a scene the correct workflow is to use Blender builtin operators, like object duplication with ⇧ Shift +  D, object cloning with Alt +  D and linking with Ctrl +  L.
Between different files, the recommended workflow is to either use linking or appending.


Vertex coordinates of mesh imported from Blender as fbx are all equal to 0,0,0? Edit: When I use FBX ASCII export and set Normals == None in Unity's import settings it allows me to access the vertices as expected, I have no idea why this works though..

I was trying to figure out what was wrong with altering the vertices of my model and found that printing the vertices of a model imported from blender resulted in every vertex being == (0, 0, 0). Using the same script to print the vertices of a Unity created Cube worked as intended.

        GameObject go_body = GameObject.Find("tiger_body");
        Mesh mesh_body = go_body.GetComponent<MeshFilter>().mesh;
        Vector3[] body_verts = mesh_body.vertices;
        for (int i = 0; i < body_verts.Length; i++){
            print(body_verts[i]);
        }

Does anyone have any insight into why the blender model is different? I additionally don't understand how the game engine can render it in the correct place when all of the mesh's vertices are equal to (0, 0, 0)?

Thanks in advance!

I tried exporting it in ASCII instead of binary and the vertices exist as expected in the fbx file, why is Unity not recalling them properly with mesh.vertices;?

Additionally, when I export using .OBJ the vertices work as expected as well.

I had this issue and solved it by unchecking the Scale Import option.  I think its because the model was too small so when it scales it down, everything is too close to 0.0 and gets rounded.
I imagine you were getting the same thing as most of your values are already 0.1 and then scale it down 100x it becomes 0.0.


Is it possible to enable render transparency for only certain renderlayers? I am currently rendering a scene that because of polycount issues I have to render on three different renderlayers. However I would like to disable the render transparency for one of those renderlayers. Is this possible?

You can do this by assigning objects into different layers and setting render setting to transparent in the Scene setup property page.


Is there a way to lock rendered layers? Is it possible to lock which layers get used in compositing?

It get annoying having to re enable all the layers you want to use in the compositor every time you disable a bunch of layers to check just one or two layers to see what is on them.

Is this possible? If not, is there an easier way to check the contents of layers?

No, you can't lock a scene's layer visibility. To check layer contents, what I usually do is to reserve a separate 3D View area with its own active camera and layer visibility.

You can have a 3D View area's camera and layer visibility settings detached from the scene's by toggling off its Lock Camera and Layers button, located to the right of layer buttons:


Why don't i have an option called collection? I am a beginner to Blender, and I am watching a tutorial on how to make a donut. This guy has an option called "collection" which he has and I don't. Can someone please explain why?

It happens at 17:25 in this video.

Either you have not changed the Particle Emitter to use collections, or you have not created a collection for the sprinkles. BlenderGuru changed the particle emitter to use collections earlier in the video here.

If you did not create a new collection, you right-click in that window in the top right corner, and press New. This will create a new collection that you can rename by double-clicking, or pressing F2.

Alternatively, you can select all the objects you want to move to the new collection (in this case, all your sprinkles), press M and select + New Collection. BlenderGuru showed this process in the previous video here.

Edit: unrelated to original question, related to comments

Looking at the objects list in the top right corner, The donut and the sphere both have Particle Emitters applied.

To remove them, first, select the object (either the donut or the sphere, you don't want to delete the particle emitter from the icing), then go to the Particle Properties tab (blue icon with a couple of dots connected with lines). Then, press the minus button shown below.


In add-on script, how to automatically rewrite string in the bottom statusbar on each edge select/deselect in edit mode I'm trying to write my first add-on that should tell me the summary length of selected edges in edit mode if there are any. I got the part with getting selected edges and counting sum length, but what I am currently struggling to do is

to get add-on invoked on each edge select/deselect

to update the sum value to display result on the bottom statusbar (where the name of the active object, amount of vertices/edges/faces are displayed)
For the first one I guess there could be some sort of callback/delegate that I could assign for every select and deselect to be invoked, but I don't know which to use. For the second I guess (and hope) I just need to know which variable to use.

I'm using blender 2.8.71 beta if that matters.
Thanks

I only answer the second one for you since it is a little bit hard to find. But it is actually very useful in many case.

status_text_set(string)

status_text_set(text) in bpy.types.WorkSpace(ID):

  classmethod status_text_set(text)

  Set the status bar text, typically key shortcuts for modal operators

  Parameters:    text (string) – Text, New string for the status bar, None clears the text

So we can bpy.types.WorkSpace.status_text_set("hello world") to set the status bar, cool.

Or since context got an workspace as well, use context.workspace.status_text_set("foo") will be a better idea when using in operator or function which has it own context. - @batFINGER

Important

Clear the content by assign it a None, or it will keep showing there until next function call. You should consider clear it after you leave your operator.


Why do the cubes in my Rubiks cube move into each other? I made a model of a Rubiks Cube, with all of the little cubes inside of it separate. The cubes appear to clip into each other on turning.

Here is an example:

If anyone could help, that would be amazing.

You have nine separate objects selected, and "Add Keyframe" made animation curves for each object. Because they are separate, each goes it's own way, on separate lines. You can see the orange dots moving on their own straight lines, instead of a circular path.

To fix this:

Clear the current curves.
Bind the objects to a shared parent while keeping their offsets.
Animate the parent only.

EDIT: You say in your comment that you will be animating more rotations. For that case I have two ideas:

Easy mode: move the object centers to the cube center, so all orange dots will be in the same global position. Then rotation along the three axes will move the meshes along a circular path.
Advanced mode: Python script as driver for object position and rotation. This is harder to set up for beginners, but it can result in a shared controller for all 26 objects.


Python: display a string from childprocess in blender interface I am making an addon to launch background rendering in GUI. I want to use subprocess.Popen to execute blender with -b. And here is my code:

import bpy
import subprocess
import multiprocessing

FILE = "test.blend"

class Background_Render(bpy.types.Operator):
    """call blender in background"""
    bl_idname = "render.back_render"
    bl_label = "Render in Background"

    def execute(self, context):
        #render_task()
        task = multiprocessing.Process(target=self.render_task, args=(context, ))
        task.start()
        return {"FINISHED"}

    def render_task(self, context):
        argument = ['blender', '-b', FILE, '-f', '1']
        process_handle = subprocess.Popen(
            argument,
            stdout = subprocess.PIPE,
            stderr=subprocess.STDOUT
        )
        for line in iter(process_handle.stdout.readline, b''):
            print(line.rstrip().decode()) # print for debug
            # both below not work
            context.area.header_text_set(line.rstrip().decode()) # show info in GUI
        context.area.header_text_set() # set empty after finish

My first approach is run Popen or say render_task directly, however blender will freeze when I start the job. So I commented it away. And I added the call to a multiprocessing.Process. It not get freezed. Unfortunately, string can be print into terminal but not into GUI with context.area.header_text_set or Operator.report.

What is the best practice to show data in multiprocess? And why they are not showing?

Inter process communication solutions between Blender 's window manager and event system and another process are tricky at best: not impossible, quite possible, but requires extra effort.

ideasman42 has an excellent solution presented at blender.stackexchange.com/q/45731/228


Wireframe overlay is not working I'm a beginner in blender, I use the AMD kit (motherboard, processor and video card) I was taking a course and ended up being stopped by a problem - my Wireframe overlay doesn't work, I've tried everything, uninstalled, updated blender and my video card driver, and nothing solves it. Can someone help me?

Interestingly, there is another location in the UI where you can try to turn this feature on, and, strangely enough, turning it on in one place doesn't turn it on in the other place. So it may not be exactly the same feature in some sense. But it looks the same, as far as I can tell. So it may work for you to try this as a workaround.
Go into the Object tab (not the Object Data tab) of the Properties Panel. Expand the Viewport Display section, and then click the Wireframe checkbox. Visually, this feature seems to be the same as using the overlay function. But as I said, the overlay checkbox will not be affected by clicking the display checkbox here. I don't know why.
Let me know if this works for you.