text:
Blender GUI Glitch with flashed Mac Pro
I just installed Blender on my flashed Mac Pro 4,1 and the GUI is totally messed up. I'm not sure what to do. Any ideas?

What version of macOS / OSX are you using?

OSX 10.13.6 is the latest OS version I can use without a special hack.

I just looked through the requirements, and it says the minimum req for the GPU is 1G. I have three 512MB cards. Is that what could be causing it?

Please check what graphics cards you have. Are they ATI Radeon HD 2600XT, ATI Radeon HD5770 and ATI Radeon HD 5870?

I ended up finding out that I did not have a Metal2 compatible card. I upgraded to an RX580 and all is well! :)

Blender currently doesn't use Metal, but 2.8x has higher minimum requirements for the hardware, compared to 2.79b.


text:
Blender FBX/OBJ house export doesn't include interior
I'm not exactly sure how to be able to render this house mode with the interior for use in Twinmotion. I can look 'inside' the house in Blender and see materials/faces/etc, but but it goes into twin motion, going into the house doesn't show the blackface of the walls etc (like no-clipping mode).

This is it in Blender:

I'm not sure how to add a .blend file here (any suggestions)? Thanks!

Hi Joel! Just upload it here https://blend-exchange.giantcowfilms.com/ and add the link to your question.

How do I add it here? It's not giving me a link. It's just sitting saying 'Files may take some time to process' but it's been quite a long time. Does it just take a really long time?

Usually not. It should go pretty quickly. Once it's uploaded the website will provide you a share-link.

Are the walls just flat planes? If so, maybe try using a solidify modifier

I'll take a look when I get back. :)

Yep. That did it. I thought the walls had thickness, but it was the baseboard wrapper that had thickness. Setting a solidify modifier fixed it. Thanks guys!

stphnl329 was right. I can't believe I didn't notice it, but the main exterior walls (which are hard to make out in wireframe) are just planes of no thickness. I added a solidify modifier and applied it, and all is well! Thanks!

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Merge Vertices by Distance & Center
Is there a way to merge vertices by distance and center?  Trying to turn grooves into V's.

Or maybe just an easier way to do this entirely, I've been doing it a lot lately and it's getting tedious.
I want to:
With a face, create equidistant V grooves along it.
current method:

Ctrl+r loop cut and slide
E extrude faces
tediously select each
vertex pair and merge center

@cegaton is right, instancing is almost certainly the way to go.. but just to explore some operators, and the way they automatically select on completion ....
With Orientation set to 'Normal' and Pivot set to 'Individual Origins'

Select top and bottom edges
Right-click menu 'Subdivide' with the number of grooves per face
CtrlB bevel with 2 segments
CtrlNumpad -  reduce the selection
GZ move reduced selection along face normals.

In your case, to go your way, and select the faces whose vertices are to be merged, you could probably ShiftG select faces by similar area to a sample, and, again, CtrlNumpad -  reduce the selection to the front faces.

Oh bevel with 2 segments, that is helpful.  Also reduce selection saves a lot of time. (Dang, can't mark 2 as answers)

@Daoidh     No problem! It's just nice to be able to share some of the little things which make Blender a fast modeler, once you think in its way.

Add a cube and scale it along Z axis;
Select vertex pairs and merge them center;
Extrude edges of the opposite face by the same amount;
Use array modifier as mamy times as you want.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Cannot unsubscribe function from bpy.msgbus
The callbacks still remain after I try to unregister using bpy.msgbus.clear_by_owner, leading to unwanted appending callbacks. Is there something wrong with this code? I do get the expected prints.
    CALLBACK_OBJECT_NAME = "callbackListener"

    if CALLBACK_OBJECT_NAME in bpy.context.scene:
        print("Clearing previous owner")
        bpy.msgbus.clear_by_owner(bpy.context.scene[CALLBACK_OBJECT_NAME])

    bpy.context.scene[CALLBACK_OBJECT_NAME] = {}

    subscribe_to = bpy.types.LayerObjects, "active"
    bpy.msgbus.subscribe_rna(
        key = subscribe_to,
        owner = bpy.context.scene[CALLBACK_OBJECT_NAME],
        args = (),
        notify = selectionChanged,
        )

Looking at blender source code, there's one more option to add in arguments for message bus subscription. Adding options = {'PERSISTENT'} prevents multiple additions. It still does not explain why above code does not work though.

Does 'PERSISTENT' work for you?

yes it works for me

Owner can be any python object.+
Using example here https://developer.blender.org/P563 can use the simple python object class to instance a handle.
handle = object()

Can also use
handle = 4
handle = set()

Simple example throws callback when context object name is changed.  Running in  text editor (main thread) the handle is lost. A quick workaround is to  save it to the driver namespace.
import bpy

handle = object()

# all branches below work
if 1:
    # To get some properties we need to prevent them being coerced into native Py types.
    subscribe_to = bpy.context.object.path_resolve("name", False)
elif 0:
    subscribe_to = bpy.context.object.location
else:
    # all object locations
    subscribe_to = bpy.types.Object, "location"

def notify_test(*args):
    print("Notify changed!", args)

bpy.msgbus.subscribe_rna(
    key=subscribe_to,
    owner=handle,
    args=(1, 2, 3),
    notify=notify_test,
)

# In general we won't need to explicitly publish, nevertheless - support it.
bpy.msgbus.publish_rna(key=subscribe_to)
bpy.app.driver_namespace["handle"] = handle
# ... to clear
# bpy.msgbus.clear_by_owner(handle)

To clear the callback via python console
>>> bpy.msgbus.clear_by_owner(
clear_by_owner(owner)
.. function:: clear_by_owner(owner)
Clear all subscribers using this owner.
>>> bpy.msgbus.clear_by_owner(bpy.app.driver_namespace['handle'])

If an immutable type like int is used (eg handle = 4 can clear from console with
bpy.msgbus.clear_by_owner(4)

but not for a dict handle = {}, possible the hassle in question code when setting the scene ID property.
In an addon can define the handle globally and remove in the unregister method, as it has the addon's module scope.
handle = object()

def register():
    # set up a callback with owner = handle

def unregister():
    bpy.msgbus.clear_by_owner(handle)


text:
Subclassing property group class problem
This code throws AttributeError: 'B' object has no attribute 'x', what might be the cause?
class A (bpy.types.PropertyGroup):
    x : bpy.props.StringProperty(name = "X")

class B (A):
    ind : bpy.props.IntProperty(name = "Prop")

bpy.utils.register_class(A)
bpy.utils.register_class(B)

bpy.types.Scene.testvalue = bpy.props.PointerProperty(type=B)
print(bpy.context.scene.testvalue.x)

bpy.utils.unregister_class(A)
bpy.utils.unregister_class(B)

Only use bpy.types.PropertyGroup for the registered class type.
The property group and bpy.props properties are wired up as properties through the "rna voodoo magic" internally with blender when registered.
Similarly as often seen with operators and panels, only give the registered class the type you are registering. For want of a more technical description.  Refered to as "Mix in classes" in panel link
eg below the B propertygroup class inherits A.  All annotations of B and A become properties of the pointer property instance..
import bpy

class A ():
    x : bpy.props.StringProperty(name = "X", default="Foo")

class B (A, bpy.types.PropertyGroup):
    ind : bpy.props.IntProperty(name = "Prop")

#bpy.utils.register_class(A)
bpy.utils.register_class(B)

bpy.types.Scene.testvalue = bpy.props.PointerProperty(type=B)
print(bpy.context.scene.testvalue.x)

#bpy.utils.unregister_class(A)
bpy.utils.unregister_class(B)

Prints "Foo" to the system console.


text:
Is real multithreading possible with Blender scripting api (Windows)?
I'm trying to use multiprocessing module on Windows to run work in parallel. Problem is that on windows, each thread spawns new instance of Blender. Is there a workaround to this? I'm not looking into having co-currency but real multithreading utilizing cpu cores to run tasks.

Multithread program sample using python "Threading" module https://blender.stackexchange.com/questions/176593/animation-nodes-2-freezes-with-python-scriptmultithreading?noredirect=1#comment295976_176593

unfortunately "Threading" module only offers co-currency

This is more of a general Python question rather than Blender. The problem is that you can't use Threading for real parallelism in CPython (which is what Blender is using, the default Python implementation). You can use multiprocessing for that, by creating another process to just run your function that you want to split between cores. The problem is that multiple processes communication comes with a performance cost, so in some cases, running everything just in a single "thread" happens to be faster.
You can use Cython for doing parallel multithreaded execution by using the 'with nogil:' statement, which turns off the global interpreter lock for encapsulated code. That's what I suggest looking for.


text:
Is there a way in Blender 2.8.1 to use indexed colors in vertex painting
I am looking for a way to do vertex painting in Blender with indexed colors, so that one could have a palette of colors and assign a index of those colors to a vertex. This would enable a way to easily change colors in a set of vertices. Is there a way to do this already in Blender 2.8.1-> , or a plugin that could be used?

Can add a palette to a brush. As long as panting brush gives all or nothing result, ie the vert color is exactly set or not. then assigning (or evaluating) an index to color from palette is relatively simple (addon code wise)... recall something similar..?  Assigning in edit mode on a vert selection basis would be, IMO, be  easiest to implement.


text:
How to manually set selected item in UILayout.template_list?
I want to select a item from UILayout.template_list from script, not from user interaction. I use following setup:
layout.template_list("UI_UL_list", "objects", scene.objectNames, "objects", scene.objectNames, "activeIndex", rows = 1, maxrows=2)

I would like to change the active index from script. When I try to do that inside panel's draw-function, I get error:
AttributeError: Writing to ID classes in this context is not allowed: Scene, Scene datablock, error setting activeIndex

See https://blender.stackexchange.com/questions/43710/how-can-i-change-a-custom-property-value-in-python-attributeerror-writing-to-i/43727#43727 (possible dupe)  Question title and body appear at odds.

yeah that looks about right


text:
How collection properties are to be used with Blender
I'm trying to get collection properties working. I have looked at examples at Blender documentation, but maybe the API has changed a bit, or I am just getting it totally wrong somehow.
This fairly simple snippet fails:
>>> cp=bpy.props.CollectionProperty(type=bpy.props.FloatProperty)
>>> cp.add()
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
AttributeError: 'tuple' object has no attribute 'add'```

printing out cp gives
(<built-in function CollectionProperty>, {'type': <built-in function FloatProperty>})

Meaning it is a tuple. How to add more entries? I understood that that was the purpose of CollectionProperty. According to documentation, a simple
cp.add()

should do it.

Looks like that for the code to work, the class needs to be part of bpy.props.Scene.

The API regarding collection property hasn't changed much (if at all) since 2.49.  Please refer to the example in the docs https://docs.blender.org/api/current/bpy.props.html#collection-example  You define a property on a class, you add to an instance.

yes that example works, thanks


text:
How to see source code of menu blender 2.8.1?
In previous versions of Blender, you could see source code of a menu by right clicking and select view sources from a dropdown menu. How can you do it with Blender 2.8.1?

Enable developer extras https://blender.stackexchange.com/a/158495/15543

that works thanks!


text:
is Object.ray_cast is not working in blender 2.8.1?
Using object.ray_cast I get
RuntimeError: Error: Object 'Cube' has no evaluated mesh data.
What's wrong with code?
        mesh = context.active_object.data
        obj = bpy.context.active_object
        depsgraph  = bpy.context.evaluated_depsgraph_get()
        obj_eval = obj.evaluated_get(depsgraph)
        for vert in mesh.vertices:
            obj_eval.ray_cast(vert.co, (0.0, 0.0, 1.0))

Run it in object mode

Thanks, I had no idea you have to do that


text:
Is it possible to have 2 materials reference same shader in Blender
I'd like to be able to have same material in Blender with 2 different names. It should work in a way that if I edit the shader in Blender in one of the materials, it will update in both materials. Is this possible?

Using a node group?

wrapping the whole shader in node group? that might work

See https://www.youtube.com/watch?v=3g4LSx6MSBA for instance


text:
Animations imported into unity from blender don't work
So after decaphimes of hardwork I was ready to import my Blender character into Unity, I export my rig, model, and animation as an FBX and put it in Unity... but nothing works or plays. My Model shows up in Unity But it stays in whatever position I imported it in and nothing else, the animation plays by itself when I look at it in the Unity animator thingy on the bottom right-hand corner when I select the model. But it never applies to my character, and when ceratin animations do work it'll only work with the imported model. I'm not able to swap out animations (All animations I created that all come from the same Mama and Papa rig)is what I'm trying to say. This is a link to all of my files and assets, it would be great if someone could solve this problem for me.
https://drive.google.com/drive/folders/1eq_2D13hRwJEU_uGFt3J0UZndyesnCWj?usp=sharing
I will give whoever solves my problem boundless gratitude, thank you.

Everytime I export fbx from Blender to Unity I disable "NLA Actions" and "All Animations" options in the exporter window's animation tab. Then there will be only one animation in the file, but you can make one long animation what includes all the moves you need, then you can cut apart it in Unity. This is the only way how I can use Blender with Unity. But this works well for me.


text:
Extruded symbols going round corners
Bit of and odd issue but i'm trying to model the attached image.
I can make the shape and I can model the symbols but i have no idea hows to make the symbols conform to the shape.
Any help would be appreciated.

Are you having trouble with topo-- joining the pen to the symbols-- or is that of no concern?  Are you just looking for techniques to bend a symbol?  If so, it would be useful to see what kinds of mesh (wireframes) your using for your symbols.


text:
make link - object data but keep original scale
i have a city layout made of cubes of diffent sizes. im trying to replace those cubes with some building models while keeping the size of the cube.
the tool make link(object data) get me close to what i want but its not keeping the original scale of my cubes. if the scale of the cube is set in object mode the scale is way too big. if the scale of the cube is set in edit mode the cube take the exact scale of the building model.

so basically i would like to have each boxes replaced by the model but keep their dimensions.
any idea how i could achieve this ?


text:
Renaming an obj based on a Vertex Group script
I have a model with parts named obj0, obj1 etc which I am creating vertex groups with the same name for. I'm joing them together to edo and then After editing the model I split by vertices. I'm trying to rename all the original parts their name based on their vertex group name now using a script to save time. The following is what I have so far.

I have this which works when there's just one vertex group in the obj, but after splitting by vertex it keeps the remaining ones in. How would I edit this code so that the obj is renamed from the VertexGroups.active_index selected instead of the at the top of the list?
Thank you.

why did you post your script as an image? Please post your code as text in a code block in the question.

Use the active vertex group
import bpy

for ob in context.selected_objects:
    avg = ob.vertex_groups.active
    if avg:
        ob.name = avg.name

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Blender for VFX
I wanted to know where can I began learning VFX in blender. I know that blender has a great compositing, camera tracking and masking etc. capabilities and I want to know how can I use them effectively to create effects like the ones in Infinity War and Harry Potter series. I know some YouTube channels have tutorials for this like Kenan Proffitt and Darkfall but their tutorials teach how to achieve specific effects (like fire, smoke etc.) whereas I am looking for systematic tutorials from basics like the ones Blender Guru has for modelling. So it would be really helpful if someone guides me regarding this. Thanks.

Try looking into Moby Motion's camera tracking video. VFX has many components, such as simulations, destruction, modifiers, particles, camera tracking, and compositing. It might be more efficient to learn these things separately.

In reality, main industry 3d packages for feature film productions are still Houdini and Maya along with all other available tools depending on the department - 3DE and SynthEyes for tracking, Zbrush and 3d Coat for sculpting, Mari and Substance for texturing, Arnold and RenderMan for rendering and especially Nuke for compositing etc. as well as in-house developed tools like Gaffer. However, you can create feature film quality effects with Blender but there are a bunch of known limitations. TLDR; I'd suggest fxphd.com, also there are a lot good free tutorials on www.sidefx.com/tutorials/

Still valid: Which would be the best VFX software for an absolute beginner?

The best program for begginers to anything 3d is blender.  it's free, has more youtube tutorials than maya or 3dsmax, and is made by people who use it for real projects.


text:
360 Video Environment
I am making an animation in which I need to have a 360 video in the background as the environment texture in World panel instead of an HDRi. Is there any way to so this?
Thanks.

Yep. Just convert the video into an image sequence and load it into an Environment Texture node as usual. Make sure you have 'Auto Refresh' enabled.


text:
Rendering: Excluding a layer while keeping it's influence (Masking?)
I am making this Christmas Tree but the problem is that I can't render the whole scene in one go because of too many particles. So I have rendered my tree and now I want to render only tinsels wrapped around the tree but I want it as png with alpha so that I can add them together as layers.
So how can I do this?
Thanks.
Tree

Tinsel

This works perfectly. Thanks. Can you write it as an answer so that I can accept it?

It should work if you replace the transparent with a holdout shader. However that doesn't solve the Memory issue.
There's a fairly easy solution, which of course doesn't work in all cases.
In post you can use the Z-pass in order to combine renderlayers.
Compositor -> SHIFT A -> Color -> Z-Combine.
It is intended to do what you want, but it will produce strange results when MB or DoF is involved.

Thanks for the answer. An example would be really helpful.

Did you get the notification that I edited my original answer as for your request?

In my own opinion the only way do so in Blender 2.8* is to override the hidden but influencing materials with Camera ray to Transparent setup:

Diffuse BSDF must be replaced with your Node setup.

Tried this. Doesn't seem to be working. A example would be really helpful. Also, in this method I would have to render the Tinsels and Tree together which will defeat the whole purpose of this question. https://imgur.com/39Dn9yU


text:
Most efficient way to create these hairs
I am trying to make a pipe cleaner but I am having some trouble to create the hair strands on it. I also want the strands to be translucent from the top part to absorb some of the light.
The hair strands are bunched together and then the bunches are spread across the metal wire.
I have tried multiple particle systems and also tried to fake it with a mesh but nothing seems to be working since I require good detail. So what would be the most appropriate and efficient way for it?
Thanks.

Possible duplicate of How do I make a fur for my teddybear?

I don’t think they’re actually in bunches, but in a spiral.

Just a thought, but could you model one bunch of strands with maybe a cluster of image planes, get that bunch to look correct, and then apply it as the render object for a particle hair system?

Also could try an array modifier if the particle system is not orderly enough.

hi Skyler Jyvqh, welcome to Blender SE! You can always [edit] your posts to add more information (instead of adding a comment). Check the [tour] and the [help] if you want to know more about the site.


text:
Model looks weird in rendered view
I have modeled a googly eye and added a simple principled shader with full transmission but when I view it in rendered view, there is a weird black thing along it's edge. I have not encountered it before so I don't know what's causing it, the material or the model.

It looks like you haven't assigned the white material to all faces.

I've assigned it. Actually I am using a white glossy+diffuse for the back faces and the transparent for the front faces.

When you add a Multiresolution Modifier to something which has already had its UVs laid out, you can get an effect like this. Make sure the UVs are as you want on the full res model.  And you could have normals flipped??

Actually I have not unwraped it since I am not using image textures and the materials are procedural. Also, there is no multires modifier. The normals are facing correctly.


text:
objects experience THE SHAKE at great distance from center
here is the problem in detail
https://www.youtube.com/watch?v=Pyr5lWPqfkk&feature=youtu.be
does anyone know how to fix it? Or work around ?
i wanna create 1:1 scale space flight simulator so the bug is in the way.

Could you test it in UPBGE and, if it results the same, could you report the bug at UPBGE's issues? I don't think it's something related to a setting, I've heard about this bug before, it's something related to the floating point numbers precision.

the test video was actually done in UPBGE .  I know that it's floating point number precision problem but i wanna know how to workaround the problem . But how for example Kerbal Space Program doesn't encounter that problem in unity but in blender it's present

http://spaceexvr.blogspot.com/2015/04/how-i-got-around-floating-point.html someone fixed this in unity

Some workarounds I could think of:

Decrease the scale of your universe, by re-scaling down all your assets or by decreasing the Unit Scale (Properties Editor > Scene > Units > Unit Scale).

Move the player to center and the whole world by the resulting offset after some distance. Preety complicated, though... I see you opened the issue on UPBGE's repository, let's hope they come with a workaround (or even a fix).


text:
FSX Verify errors, is there a log file?
When using the FSX Verify tool I am getting errors which point to;
\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\FSX_Toolset4FSX-P3D.py
Is there an output from 'FSX_Toolset4FSX-P3D.py' in the form of an error file I can read?

I am MZNZCDR working on fsx addon, so I also encountered this problem. Here's how to avoid this error:

intialize the fsx tool.
put friend name anyone then click to GUID button to assign it with ASCII code.
check all model you made that it has a material assigned.
for animation all the animation must be verified after the assigning animation.

After completion of all checks you will find there's no error in export to mdl with animation.x file.
Try these guide lines then call me if it further tease you.


text:
UVmagic tab, where is it?
I can't find the tab in the tool shelf for uv magic. The right click menu shows up, but I can't see it as described in the tutorial.
Location    3D View > Sidebar > UV Manipulation.
Also does anyone know of a video tutorial in English?
Thanks

OK I found it, I had to reinstall the addon. I didn't realise it comes as part of 2.79 so I downloaded it from the net. When I installed the download I got a duplicate warning, so I removed the folders mentioned in the warning. That really screwed it. So restored folders from waste basket, restart and there it is! the V magic tab below display tab.


text:
Image Texture not showing

I'm having an issue with my image texture. I want the eye texture to show up on the flat surface I have selected but no matter what I do it never shows up.
Help please.

on your screenshot you are in Solid mode, have you tried in Rendered mode for example?

......Well, I'm dumb.
Thanks for your help though lol.

You are in Solid display mode, switch to Rendered display mode.

Thanks, I got that from the last guy who answered.


text:
Problem with linking Objects to Bone
So I tried weight painting first then just simply straight "Assigning" bones but either method results in the below picture.

As you can see, when I move the model in pose mode the face objects attached to the head bone clip through the body mesh. Any help would be very much appreciated.
PS. I also don't know how to have the bones show up in the "vertex groups" for the "Pupils" object. Somehow they show in the other face objects but not the pupils. Help with that would also be appreciated. Thank you.

I've just answered to this kind of question here, I hop it will help: https://blender.stackexchange.com/questions/127286/why-does-my-armature-deform-incorrectly?noredirect=1#comment220745_127286

@moonboots
I did as shown on the link you gave me, but now when I try to parent the objects to a bone, nothing happens. I tried weight painting too and it already says those objects are painted red so they should move, but they don't.

when you weight paint, make sure that your armature is in Pose mode, and select the bone you need to see what is its influence. But perhaps share your file so that we can see what's your problem: https://blend-exchange.giantcowfilms.com/

That's the file. Hope you can solve this cause I've been trying for months.

First thing, you should lower down the Subsurf View value of all your objects to 2 because at 5 it's hard to work.
Now, about your problem, it's because your eyes, eyebrows and eyelids are separate objects, and you didn't parent them With Automatic Weight but directly to armature as a simple parent: as you can see, if you select them, enter in Edit mode, and see what are their vertex groups in the Properties panel > Data > Vertex Groups, there's only Armature (meaning the armature object on its whole will move these objects, but not the bones within this armature, i.e. like a basic parentage from an object to another).
So first select eyes, eyebrows and eyelids, join them to the whole body with ctrlJ, go back in the vertex groups list of the whole body and delete this Armature group. Now assign all these new vertices to the group called "head". It should work (well, still some corrections to make in Weight Paint mode so that the neck bone doesn't affect the head mesh).
Hurray and Happy New Year !!!!


text:
how can i improve script execution time
Is it there a control or something to assign more resources to script execution. Or the only option is to improve script's code performance?.

If blender freezes while script execution, you should check performance using build-in modules.
In some cases you can cache function return using functools.lru_cache.
The one way to get more resources is using multiprocessing.


text:
Make a Soft-Body to follow path
I am making a small tetris animation but the problem is that the blocks are not falling as they should. Sometimes they collide with the container walls and sometimes they do not land on the position the need to. I was wondering whether I can make soft bodies follow a path while taking gravity into consideration. If yes, can I make the blocks collide with the container, spin and position them where needed? When I searched for this a bit, I found out that I would have to use soft-body goal and vertex groups but I have no idea how to use them.
So can anyone please explain this to me?
Thanks.
blend file
(After a lot of fiddling around, I was able to animate these four blocks but I don't think I can do this for all of them).

if you go to the weight paint mode and paint a certain area that you want to animate and then in physics settings you check goal and choose the vertex group you created, you can add location/rotation/scale keyframes which will affect the vertex group only.
here the object(cube) is being pulled by 2 simple keyframes

Well, I am really a beginner in animation but do you mean that I should Location Keyframe start and end of the animation? I tried it and it looks like the object is just following the keyframes and not taking in consideration the Gravity in physics. Also, the animation stops at the last keyframe and doesn't move further. I also want the blocks to bounce like in real life. A step-by-step solution or the .blend file would be really helpful. Thanks.

what blender version do you use? so i send the right type of file because 2.79 can't handle 2.8 files.

Thanks. it's 2.79b.

https://drive.google.com/open?id=1wiVI6gGV1Xi-MejeQx-7bj4l_qqXw26l for 2.79b

Well I have seen the file and it looks like the cube is not taking gravity into consideration, it is just moving linearly from one point to another. Also, the bounce doesn't seem realistic since I think the cube is starting to fall from the last keyframe and not the first.


text:
How should I model this?
I am finding it hard to model this curved neck of the guitar since it is carved from a single piece of wood and am unable to keep a nice and clean topology. It would be great if someone could help me regarding this.
Thanks.

This is a good place to use the power of the Bridge Edge Loop tool

(left to right)

Starting with a geometry like this:
CtrlE > Bridge Edge Loop the curved sections of profile, with surface interpolation -  adjust the number of cuts and smoothness to your liking.
CtrlR cut corresponding edge loops in the base and back, and if you're picky like me, GX, GZ the new loops with Snap (vertex, active) so they're straight to the loops in the curved section.  Again, Bridge Edge Loops to form the sides. Now's the time to tweak the curvatures if you want to, using GG to slide edges, loops,  or vertices. Cut in some extra loops to keep the face density reasonably even, close to the curved section.
Assign a Bevel modifier with 2 segments to the edges you want to remain sharper (Here I did it by weight) .. and a Subdivision Surface modifier.

Apart from the pair of poles at the corner, the topology is still in unbroken quad loops, making it relatively quick to adjust, if you need to.

Instead of trying to model the curves manually, you could instead let the subsurf modifier do most of the heavy lifting for you.
An example of this might be something like:

..apologies for almost repeating your answer.. I just wanted to include the steps.

No worries mate, I could've probably spent a little more time preparing a more complete answer like what you did. I had the impression the op was not a beginer hence the straightforward answer.

What do you think about this topology (I'm not sure to see the same thing than you, though)?

Try to make sketches first. It is a good help to figure out complex meshes.
I made this one and I hope it is good enough to help you.

Actually I would like to avoid tris and ngons to keep my topology as clean as possible. Thanks for the sketch though.

id try using an inset and pull the face out. you can use subsurf to smooth things out whenyou finish the model or make it its own separate obj and subsurf now


text:
Can I add random viewport colours in 2.79 like in 2.8?
I was wondering if I can add random viewport colors for better visibility like the new feature added in 2.8, but in 2.79 (maybe an add-on) since my PC doesn't support 2.8 due to my hardware limitations. I know that I can add materials to individual objects and change their viewport colours manually, but it's too much of work and unfeasible for large scenes.
Thanks.

The following add-on randomizes the viewport color. It works for both Cycles and Blender Internal. Save the file into 2.79\scripts\addons and activate if through the preferences. The add-on creates panel in the 3D View properties (N) titled Randomize Viewport Color.

In order for the viewport material to be applied for Cycles you need to have a material applied that uses nodes. This is a safety feature, because otherwise changing the viewport color would also change the material color. A limitation for Cycles in 2.79b is that the viewport color is tied to the material. Every object with the same material will have the same color.
Please keep in mind that this is a quickly written add-on and may have some areas that could be improved.
bl_info = {
    "name": "Randomize Viewport Colors",
    "author": "Robert Guetzkow",
    "version": (1, 0),
    "blender": (2, 79, 0),
    "location": "View3D > Properties",
    "description": "Randomizes the viewport colors of all objects",
    "warning": "",
    "wiki_url": "",
    "category": "3D View",
}

import bpy
import random

class RandomColorSettings(bpy.types.PropertyGroup):
    use_viewport_color = bpy.props.BoolProperty(
        name="Enable Viewport Color",
        description="When checked and update is pressed the viewport coloring will be enabled for all materials.",
        default=True)

class RANDOMIZE_VIEWPORT_COLORS_OT_update(bpy.types.Operator):
    bl_idname = "randomize_viewport_colors.update"
    bl_label = "Update"
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):
        if context.scene.render.engine == "CYCLES":
            for mat in bpy.data.materials:
                # Make sure that nodes are used, otherwise this will change the actual material color
                if mat.use_nodes:
                    if context.scene.use_viewport_color:
                        mat.diffuse_color = (random.uniform(0.0, 1.0),
                                             random.uniform(0.0, 1.0),
                                             random.uniform(0.0, 1.0))
                    else:
                        mat.diffuse_color = (1.0, 1.0, 1.0)
        else:
            for obj in bpy.data.objects:
                obj.color = (random.uniform(0.0, 1.0), random.uniform(0.0, 1.0), random.uniform(0.0, 1.0), 1.0)

            for mat in bpy.data.materials:
                mat.use_object_color = context.scene.use_viewport_color

        return {'FINISHED'}

class VIEW3D_PT_randomize_viewport_colors(bpy.types.Panel):
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_label = "Randomize Viewport Colors"

    def draw(self, context):
        layout = self.layout
        layout.prop(context.scene, "use_viewport_color")
        layout.operator("randomize_viewport_colors.update")

classes = (
    RANDOMIZE_VIEWPORT_COLORS_OT_update,
    VIEW3D_PT_randomize_viewport_colors
)

def register():
    for cls in classes:
        bpy.utils.register_class(cls)
    bpy.types.Scene.use_viewport_color = bpy.props.BoolProperty(
        name="Enable Viewport Color",
        description="When checked and update is pressed the viewport coloring will be enabled for all materials.",
        default=True)

def unregister():
    for cls in classes:
        bpy.utils.unregister_class(cls)
    del bpy.types.Scene.use_viewport_color

if __name__ == "__main__":
    register()

Thanks for this, but it still doesn't solve the problem completely. I would like to add random colors directly as I create the new objects for better viewport readability like in 2.8. With this addon, I would have to create different materials for various objects and for addon to work which is too much of work for large scenes. Thanks for the help though.

That is the limitation for Cycles in <=2.79, the viewport color is tied to a material. I don't think there is a workaround for that.

There a couple addons for it. I use random_material_viewport_colors. But as far i know, these addons do random material color, not object. So you need to create material for every object you need to be random colored.

Not true, you can set the viewport color in 2.79b as well.

Yes, but i mean addons can do random colors only for materials. But i can be wrong.


text:
Modelling with Curves using a bevel object
I am trying to model this long stone bench in blender using curves. I have a made a path and the cross-section of the bench. When I select bevel object of the path as the bench's cross-section, the resulting mesh is completely flat or cubic. Can someone please let me know where am I going wrong?

Did you applied Rotation for cross-section? If yes, this is a reason.

The rotation and scale for the curve and cross-section is set to 0,0,0 & 1,1,1.

Select cross-section, go to Edit Mode, select all, and try to rotate it on different axis and see what happens.

Yep. That was the problem. Actually I was rotating it in object mode previously. Now it's fine. Thanks. BTW can you please explain why does it matter rotating it in edit mode instead of object mode?

You can read about it here: https://docs.blender.org/manual/en/dev/editors/3dview/object/editing/transform/clear_apply.html section Apply. I do not know more about it then Blender manual :)

Is that the 'String of Pearls?' ...Marine Drive?

@RobinBetts Yep. It's. Marine drive (queen's necklace) in mumbai....


text:
World colour is creating some fog like effect in eevee
I've been using blender internal for most of my projects. I got a project done in internal into EEVEE and the world colour created some fog like effect on the screen depicted below:

The weird thing is Im pretty sure I solved this issue when I encountered it during the beta but I cant remember how, for reference heres a similar version of the image above that I did in during the beta:

How do I get rid of this foggy effect thats most likely caused by the world background colour?

I figured it out, all I had to do was remove/disconnect volumetric scatter in the world tab.


text:
How to connect edges and create face on disconnected vertex through scripting api
I'm trying to create new faces on a mesh as per the image. End result should be the triangle split to 3 faces each having 4 edges.
For some reason following code does not connect the edges, the new vertex in the middle gets created though. Using Blender 2.93.2
bm = bmesh.new()
bpy.ops.object.mode_set(mode='EDIT')
bm.from_mesh(mesh)
bpy.ops.object.mode_set(mode='OBJECT')  # return to object mode
bm.edges.ensure_lookup_table()

for poly in bm.faces:
    center = bm.verts.new(poly.calc_center_median_weighted())
    for vertex in poly.verts:
        if vertex.select:
            bmesh.ops.connect_verts(bm, verts = [center, vertex])

# make the bmesh the object's mesh
bpy.ops.object.mode_set(mode='OBJECT')  # return to object mode
bm.to_mesh(mesh)
bm.free()

I also tried to create a new face using bmesh api, but having the newly created "center" vertex on the parameter list crashes blender.

Related https://blender.stackexchange.com/a/118497/15543 If you want to look at selection and use edit mode, use an edit mode bmesh.

thanks that example helps a lot


text:
Cannot get shadows working with shader graph nodes
I have a custom shader that is basicly just rendering a object with vertex colors. I am trying to get shadows working by using LightPath node, but everything renders black when I apply that node. Using Eevee renderer.

Hint: the colors of the nodes in and output socket indicate the type of the connections. Connections mostly only make sense between sockets of the same color. At the very least you probably want an emission BSDF somewhere.

@cegaton multiplying scalar with vector is possible, so that should work.

Looks like light path node can be used only with shader nodes, otherwise it does not do anything, even with matching colored node connections.

The way to get control of the shadows was to have a light with high intensity, and then a mesh with white albedo color. Then the node graph in the image shows how to filter the shadowed part out from the render. There's no light path node at all anymore.


text:
Is there a way to know when color picker is closed in the scripting API
I need to update mesh vertex colors when color has been selected from color wheel. I don't want to do this all the time when color item is updated, because that would be too slow.
Is there a way to know when color wheel is closed? I also looked into timer-based solutions but unfortunately context seemed to be wrong and I could not use them. Also I cannot do this within draw function for the same reason.

import bpy
from functools import partial
from time import time

from ..third_party.boltons.funcutils import wraps

def parametrized(dec):
    def layer(*args, **kwargs):
        def repl(f):
            return dec(f, *args, **kwargs)
        return repl
    return layer

@parametrized
def delay_execution(func, delay_sec=1.0):

    lock = False
    def timer(*args, **kwargs):
        nonlocal lock
        lock = False

        func(*args, **kwargs)

    @wraps(func)
    def wrapped(*args, **kwargs):
        nonlocal lock

        if not lock:
            lock = True
            bpy.app.timers.register(partial(timer, *args, **kwargs), first_interval=delay_sec)

    return wrapped

@parametrized
def on_release(func, delay_sec=1.5):

    exec_time = time()

    def timer(*args, **kwargs):
        nonlocal exec_time
        if not abs(exec_time - time()) < delay_sec:
            func(*args, **kwargs)

    @wraps(func)
    def wrapped(*args, **kwargs):
        nonlocal exec_time
        exec_time = time()

        bpy.app.timers.register(partial(timer, *args, **kwargs), first_interval=max(1.0, delay_sec))

    return wrapped

I achieved this by creating these two useful decorators. It'd require the library 'boltons' to be added to your addon.
@on_release() is the one you are interested in. Simply put that over your update callback, you can also specify delay (default is 1.5 sec) after which the function gets executed when you stop changing the property by doing this @on_release(delay_sec=your_delay)

In case you are wondering why I used boltons @wraps instead of its equivalent from standard library functools is because unlike the standard implementation of wraps, it preserves the function's signature which is essential for the wrapped update callback to run at all.


text:
Is there a way to know when mesh topology is edited in Blender scripting API
I would like to check mesh for any modifications in Scripting API in mesh topology, such as adding or deleting vertices/faces. Is there a callback or function that works for this purpose?

Yes, you can use Depsgraph and handlers (depsgraph_update_post/pre) for that. For example,
import bpy

def mesh_change_listener(scene, depsgraph):
    # check if we need to iterate through updates at all
    if not depsgraph.id_type_updated('MESH'):
        return

    for update in depsgraph.updates:
        if isinstance(update.id, bpy.types.Mesh):
            print('Mesh \"{}\" updated.'.format(update.id.name))
            do_your_stuff(update.id)

if __name__ == '__main__':
    bpy.app.handlers.depsgraph_update_post.append(mesh_change_listener)

But if we subscribe to bpy.types.Object with msgbus, how do we retrieve the knowledge which object exactly got updated?


text:
How can I make radial text sweep?
I added an object - plane, rectangle.
Went to edit mode and deleted 3 edges, left only one.
Exit edit mode and added screw modifier to this edge.
This way I can animate drawing of circle with changing angle of screw modifier.

Since I need that this animation be rectangle and not circle, I added cube, hidden and not rendered. This cube is object for Boolean Intersect modifier for Edge.

With some Shift+D, little materials here and there, etc. final product is this:

Is there any chance that I can add text on grey rectangle which would also radial sweep appear? I'm googling all day and cannot find a way (newbie :) ).
One important thing - project is in Eevee, not in Cycles.
Thanks in advance.

As for now, I'm using workaround where I rendering solid rectangle .png image with desired text (no matter in Blender or GIMP) then using that .png as Image Texture for radial sweep edge. But I really would like to learn how to accomplish such a that with text, directly in 3D Viewport.

I that a text object or a text on a texture?

As said, now I'm using workaround with text on texture - png image with text on it. But question was how this kind of radial sweep can be done with text object in 3D Viewport, i.e. is it possible to make that text object appear radial in same way as grey rectangle on gif in my post above?

Using shaders (Eevee here but works for Cycles too).

Top part:
Presuming Z is facing the camera, we take X and Y as base for the calculation.
Artan2 gives the angle between -pi and pi for each X and Y position.
Bottom part:
Now from 2 values the current frame and the amount of frames, translate that in order to have a value between 0 and pi.
Then translate it between 0 and -pi (for the left part) and between pi and 0 for the right part.
Transparency:
We compare that to the effective X Y angle and if OK (one or other into the good interval), set alpha to 1 (no transparency).

Another way, that can be considered less maths and/or more flexible is to use a gradient texture with radial mode:

Thanks a lot my friend. Will not be able to try this before evening (in next ~8 hours). Will follow up.

Thanks a lot once again. I downloaded your .blend's and they are exactly what you said - they are working. I still have no enough time to import it in my project and to see will they work out of box, but thing is here very clear and I am pretty sure it must work with or without little tweaking  (IDK, for whatever reason maybe will be some issue triggered with my project settings). Answer is fully accepted, cause this is exactly what I looked for.


text:
Problems with Bool Tools difference
I am having issues regarding the Bool Tool stuff, more specifically the Auto Boolean difference tool. Whenever I attempt to use the tool between two objects, it gives me a Traceback error. Here's a screenshot:

I am somewhat new to Blender, and I had to install Bool Tools manually (it did not appear in the user settings menu).

I found out my problem. The Bool Tool Blender Wiki article has the wrong link. Go to the Github dl here: https://www.blendernation.com/2014/05/14/add-on-booltool/
Then download the .rar
Optionally, after downloading the .rar move to whatever folder you want.
Open with 7zip or a program that can open .rar files, and move the BoolTools.py into the folder.
Open Blender, go to User Preferences, addons, and install from file. Go to where you have BoolTools.py and select that to be installed from file. Enable it by checking the black box on the side. That should work for you, as it worked from me.
Sorry for my stupidity, I am rather new to Blender.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Shortest Edge Paths node : how do I get the vertex index after the next?
As it says in the title, the Shortest Edge Paths geonode is useful to find the index of the vertex immediately after the starter vertex on the shortest path between this starter vertex and the closest vertex in an array of given end vertices, but what if I want to get the index of the vertex after that? Or more generally, any vertex on the calculated path?
Thank you very much!


text:
Particles collision margin/padding
I am making a simulation with boids particles inside a mesh (I have applied collision physics to the mesh, inverted the normals and applied all transformations) and for some reason, the particles do not collide to the edge of the mesh and leave a gap from all sides.
How can I fix this?

Figured it out finally. I had changed the scale from default 0.05 to 1. If I change it back to 0.05, it seems to work. Don’t know why though.


text:
Auto snapping behaviour
When using LoopCut, some vertices snap on each other. I don't have snapping enabled.
how can I turn off this behaviour :D
https://www.youtube.com/watch?v=hM5HK3Pi8Qo

does this also snap if you turn off your speed sculpt add-on?

Turn off the vertex automerge option shown below.

Ty, so simple haha but never noticed that icon b 4.

You're not alone! :^)


text:
Removing Hotkeys
Is there a way to remove all the hotkeys?
I've used 3D max for around 6-7 years, over that course of time I had my own arsenal of personal hotkeys(shortcuts).
I've decided to move over to Blender, I'm trying to rebuild my little infrastructure but hotkeys are conflicting, I don't want to delete blenders hotkeys, one by one.
Any idea how I can get a clean slate, and just rebuild from there?

Do you tried Industry Compatible keymap?
This one ships with lasted builds from builder.blender.org and includes key-buildings most popular in outer programs (like max,maya,houdini ets.)
In last builds you can turn it on in Edit -> Preferences -> Keymap


text:
Scripting - Pie Menus
How do I write a script that would goto my custom workspace and initiate the mode set.
I want it so when I swipe to Modelling in my pie menu it chooses my "Modelling" workspace and goes to object mode, not edit mode.
I have pie menus installed, will I write it in script from then run it from pie.
here are some of the code snippets I've managed to collect.
wm.context_set_id
Context Attribute: window.workspace  Value: Modeling
object.mode_set
wm.context_set_id
Context Attribute: window.workspace Value: Sculpting
sculpt.mode_set

bpy.context.window_manager.windows[0].workspace = bpy.data.workspaces['Modeling']
bpy.ops.object.mode_set(mode='OBJECT')

it appears you can't stop it from always going into edit mode, why blender, WHY!

well, the whole point of having a modeling workspace is to model, ie, edit, so that's why.  You can delete it and add your own workspace that you call it Modeling.  If you derive that workspace from Layout it can be set up any way you want.

It's cool, I just model and sculpt with-in the workspace now, don't need to worry about what I was trying to do above. Was cool that workspaces change the desired tabs and buttons to ones preference. meh!


text:
How can I apply a modifier to selection only?
I'm making a cookie cutter model to 3D print, and I want to extrude the upper ring of faces to be wider on the top (or just make it thicker on X/Y axes)

I've tried selecting the upper ring and separating it, then applying solidify modifier and later joining both meshes with CTRL+J into one. It looked kind of like I wanted to, but as a side effect I got a few unfixable non-manifold edges so in the end my 'solution' was garbage. Any other ways?

Bottom line: You can't apply modifiers to selection only. Some do support using Vertex Groups for influence though.

Thanks, that chicken example was exactly what I was looking for.

I'm trying to follow the steps from the thread you've sent me, but I'm lost when it comes to choosing the bevel. I have no idea how to create that sharp curve object. I tried creating a plane just like this and converting it to curve with alt+c but it doesn't work, and when I try to recreate this by using curve tool it all comes out rounded and skewed. Help please :(

Why doesn't the plane work? Convert the Spline type to Poly using the toolbar button

I figured out how to make my plane a curve, but now when I use the bevel  I get another  problem


text:
How to model/apply a rhomboid pattern on a cylinder? (Sword hilt modeling)
I'm modelling a Vibrosword from Star Wars and I can't figure out how to model the rhomboidal incisions on the hilt.

Any help will be greatly appreciated :)

Not the same but the technique detaled here may help https://blender.stackexchange.com/questions/58959/how-to-model-braided-nylon-sleeve/58963#58963

A slightly different technique, not necessarily quicker, but has fewer steps.
Subdivide your cylinder vertically the number of desired times with a Loopcut.
With all loops selected start the Bevel operator, switch to Percent mode, turn on Vertex Only, and increase the value to 50% so it goes half-way through the edges.
Don't forget to remove all doubles in the end.
Disclaimer: You might end up with some NGons in the ends that might call for some cleanup if you want proper topology.

This is brilliant. A brand new method for me. Tried it using only keyboard shortcuts. Here's how to achieve it: After subdividing a cylinder with Ctrl+R you press A twice to select the whole mesh, then Ctrl+B, V, M (three times) and you type 50. Finally you press W to remove doubles:) (works on all different sized cylinders). Thnx Duarte! Still wonder if there's a faster method though ;P.

Subdivide your cylinder vertically the number of desired times with a Loopcut.
Select all faces and use the Poke operator to turn them into rhombus.
Using the Select Similar operator (Shift+G by default) select all horizontal edges and erase them with the Dissolve option, making sure you keep the ones defining the cylinder top and bottom edges.
Repeat the process for the vertical edges by Select Similar then Dissolve.
Done!

Duarte, why are you copying the solution from my first .gif posted here?: https://blender.stackexchange.com/questions/61785/modeling-waffle-shape-of-cone Just kidding :). Good answer here. I wonder if there is a quicker way to achieve this kind of subdivision though. It would be great to have the e.g. 'poked cylinder' (you name it) object available via Mesh Extras menu.

Haha hadn't seen that one before, upvoted. Great modelling BTW, icecream cone looks fantastic, now it made me hungry. Now that you mentioned it, I just found a different method

I wonder what you use to make gifs like this one under 3MB

https://blender.meta.stackexchange.com/questions/963/what-is-the-process-for-creating-gifs-for-questions-and-answers/

I can make easier case 2
Just perform poke face (Alt +  P) and tris to quads(Alt +  J)

Hi, thanks for the post. This site is not a regular forum, answers should be substantial and thoroughly explain the solution and required workflow. One liners and short tips rarely make for a good answer. If you can [edit] your post and provide some more details about the procedure and why it works feel free to restore it, otherwise it may be deleted or converted into a comment. Perhaps add a few images illustrating the workflow and final results. See How do I write a good answer?


text:
Unable to fix error message "You should have an active texture to use multires baker"
I have been following Kent Trammel's YouTube tutorial series on creating a realistic head within Blender without many obstacles. In part 3 (https://www.youtube.com/watch?v=KoiYMx2xXGA&t=27s) he bakes a displacement map from his multires mesh (seen at 5:42). However, when I attempt this I am greeted by "You should have an active texture to use multires baker". This issue has been raised before with various solutions (https://blenderartists.org/forum/showthread.php?319591-Multires-Baker-You-should-have-active-texture , How to pick target texture image for baking?) yet after trying each one I get the same message.
In the images below you can see that I selected my UVs and created an image Untitled.001.
 I also assigned this texture to my material.

and the texture even shows textured view

yet I still get the error message.
I have been trying to fix this for hours now, so any solution would be greatly appreciated.

Try removing texture from the material, removing it from the UV editor (with all faces selected in UV editor press X button to remove texture and then assign again by selecting it from the dropdown list) and baking again. For Blender Internal material isn't important, it's assigning textures per faces. If nothing works upload the file and include the link here

@MrZak Thanks for the suggestion. Alas, after following your steps exactly, it still didn't work. And at over 8,000,000 faces, the blend file is 148MB (well over the blend-exchange limit). I've deleted background images and compressed the file to 100MB, so if you really want to take a crack at it you can find it here https://drive.google.com/file/d/1G3jAoBwKXTRBOJZiW8fKWbFux5xGL4-a/view?usp=sharing otherwise I'll probably look into starting over.

It would be easier if you separate e.g. the head as the problem mesh and save it into a new file and upload that one. 100mb is a lot but even more is 8mln faces which can be a problem to operate on lower end hardware. You might also find useful developer notes about the baker

@MrZak Thank you for that link, the developer notes seem like a helpful resource for future projects. I went ahead and removed 4 multires levels, bringing down the model geometry to 250,000 which translates to a 23MB file

Try to delete existing materials, then create a new material and add the image texture again

Not all faces of the mesh are assigned to that texture so baker can't start working due to that.
The culprit is that some faces of the mesh are hidden, never fall under selection hence don't get assigned to the texture in UV Image editor. Unhide them in Edit mode with Alt+H. Only unhidden geometry is selected in the screenshot below.

Note also that while baking will work once you select all after unhiding and assign to the texture, it's better to fix that area as it's non-manifold geometry which can cause some troubles down the road.
Select overlapping edges and remove them:

Also there're overlapping vertices on the back of the head left probably after applying Mirror modifier. To avoid UV map corruption don't delete them rather than use Alt+M to join them at center:

Thank you so much. Following your steps, I was able to bake a displacement map and save myself from hours of frustration. That being said...!(https://ibb.co/jtms56) When I do bake it, I'm left with a solid gray displacement texture.

@GageBenham It wasn't mentioned in this answer, it should be somewhere in developer notes and here as well: in order bake to work as expected there should be some difference in the levels of the Multires (View vs Sculpt/Render)

That solved it. Thanks again for your help!


text:
Unwanted artifacts in Dynamic Paint wetmap
I have been trying to get the effect of melted wax running down the surface of someone's face.
After struggling to recreate the desired viscosity with a fluid sim, I decided to used Dynamic Paint with the drip effect to create an image sequence of wet maps.
The results were much better, however, there are some messy artifacts that ruin the illusion (as seen on the nose). After rendering the image sequence at various resolutions with the same result, I have a feeling that this is due to the simulation side of Dynamic Paint. Is there any way to correct this? If not, is there another approach I can take to get the same effect?


text:
How can I texture individual tiles?

As the pic above , in the tile there us small squares , each square have its own drawnings , how can make the same tile in blender ?

Is each tile its own object, or are they all part of the same object?

they all are part of the same object .. what i need is , how to make the art inside that tile , like the circle with that flowers inside

Image texture? Seriously, what are you asking for? How to assign different materials to different parts of object or how to create flourish pattern?

and how to add the bitmaps into blender ?

im using blender cycles render

if you have some image editor like Gimp or Photoshop you can create the composition with the diferent textures.

1.- Unwarp the rectangle
2.- export the Uv Layout

Than create your composition in Gimp or Photoshop, with the exported UV-Layout
  3.- In Cycles, create a Material
  4.- and add the Image Texture Nodes with your composition image.

yes yes .. i want to like this ... thank youuu sooo much

@Rayedalharbi upvoting and / or accepting the answer is considered a "thankyou" too.


text:
When i render active scene with the mesh that converted from the hand writing picture there is nothing to be seen in the render window
I am just the beginner and sorry about my question can be very obviously to answer. I use 2.79 version. I draw by "Grease Pencil" some simple picture and "Convert to Geometry" choosing "Path". Next I go to "Object Menu" select "Apply", choosing "Visual Geometry to Mesh". When i render it is no picture at all!

“Convert to Geometry, Path” will convert your grease pencil drawing into a Path and that path should be selectable and visible in the 3D View window (if you hide the grease pencil lines). However, paths are not normally visible in renders since they have no width.
To make the path visible in the render simply select it, select the Curve properties in the right-hand properties panel (it’s the one with a curve with a white dot at each end), scroll down to Geometry and increase the Bevel Depth. This will add some renderable geometry to the path. Adjust the other settings to get the desired effect (eg, change Fill in the Shape panel to Full) and optionally add a Subdivision Surface modifier to get a rounded stroke.


text:
Internal render stuck at Freestyle View Map Creation
I am using the freestyle effect in Blender internal and when I preview it, the effect gets rendered really quickly, but when I render the image for real, it always gets stuck on 'Freestyle: view map creation'.
Help would be greatly appreciated.

Update: removing all cloth simulations and forces fixes the problem. So for stills, this is easily resolved, but for animations I have yet to find a solution.


text:
Compositor not working inside adaptive smoke domain
I have created a circle mesh and set it up as an emission.  I also added a compositor for it to add blur and glare effects.  I have set up a smoke domain and two flow objects.  The smoke domain also has adaptive domain turned on.
If I place the circle outside the main smoke domain it renders and composites just fine.  If I place it inside the main domain, but outside the adaptive domain it again renders and composites fine.  However, if I place it inside the adaptive domain it does not composite.
Why? and/or what am doing wrong?
BTW, I'm new here...I have a small test .blend file for this issue, but I can't figure out how to attach it to this question so I'm hoping my description above makes sense.

Yes.  I posted that one first as a guest but didn't see any feedback that made me believe it went through so I opened an account and posted again.  Sorry for the duplication...newbie...


text:
Ambient occlusion bake crashes blender (cycles)
I can't get an ambient occlusion bake to work with my file; every time I try to bake, Blender crashes. I'm using cycles render, and my object is pretty low-poly. There might be some weird geometry in it, but the UV unwrap worked alright.
I'm using Blender 2.78 on a MacBook.
I've tried having the image texture node selected, both edit mode and object mode, checking and unchecking "clear", and creating a blank texture image to put the UV onto.
I'm absolutely new to Blender, so please let me know what other info is necessary! Here's the .blend:

The main reason for the crash is dupliframes (not really expected behaviour though).
The object has Frames enabled in the Properties editor > Object tab > Duplication rollout. It duplicates the object as many times as there are frames set (from 1 to 100), resulting in ~44 000 faces. It isn't visible as object is static.

Also with this the object won't be renderable. Set the option to None and the bake will work.
There are some minor problems though in mesh geometry (non-manifold geometry) which are better to fix. Although they won't crash the bake:

Remove doubles (W > Remove Doubles) and recalculate normals (Ctrl+N) first, this will remove some of the non-manifold geometry.
Edges overlayed on top of the faces (moved with Grab tool below for visualization purposes):

To avoid UV map corruption delete one edge, then select vertices from the sides  and use Connect Vertex Path tool with J to split the face as it kind of was. Repeat for the other edges shown in the screenshot above.

Above selected edge was already made as mentioned.
Internal vertex inside of the mesh.

Above faces of the body are hidden to allow seeing through the mesh. Remove that vertex.


text:
Snap a Vertex Group to a Surface
I need to create a consistent model for a Physics Simulation Program.(Comsol) Is there any Way to snap these selected Vertices straight onto the Surface? Creating a water-tight closed System? I tried Shrinkwrap and Automerge but both didnt give me good results. Thanks in advance.

For the purpose I recommend you to use Shrinkwrap modifier which contains a lot of options to snap one object vertex ti another:


text:
Can I match my particle density to my displacement map?

I have a plane which uses a noise texture as a displacement map.
I want to put some grass on the plane as particles and match the particle density to the displacement map but I can't find a way to link/save the texture. What is the correct process for this?

Hello :) Is every instance of noise inherently the same and just scaled/detailed differently? I assumed it was randomized every time

It's not randomized. It always uses the same formula to calculate the noise. So, every instance of the noise texture looks the same, if the scale is the same. (gotta admit, I learned all this in the past 15 minutes :).

That's great! Let me try this

You can add a Mapping node, to better control the location/scale/rotation of your texture.
Noise texture always uses the same formula to calculate the noise.
So every instance of the noise texture looks the same.
Add a Mapping node, so you can precisely control the output.

So the "Noise" option in the texture menu is different (it appears to similar to the White Noise texture node), there is an Original Perlin noise in the "Clouds" texture but that's got different parameters. Also it turns out hair cannot be displaced anyway (https://developer.blender.org/T50091) :( I think I'll just use displacements again to create grass and see if it works. Thanks for the help though!


text:
How do you scale cloth simulations?
I can't figure out what exactly to do with this, when I run the simulation at a smaller scale, everything is fine.

When I scale it by 10 it becomes strange, even though everything is aligned with the origin and the force field is a point and as such scale shouldn't affect it.

Which parameters need to be modified for it to scale correctly?

Have you tried just scaling it then baking?

I haven't been baking anything. Should I be baking things? I've been just scaling and pressing spacebar and being disappointed at the results.

You do need to bake it.

To get your simulation to work efficiently, you must first, save your .blend file, then bake the simulation. The bake settings are under the cache tab in the cloth settings. You will be able to scale it to whatever then.


text:
Generate Color-Map in blender
here is what I do right now: I create an image and fill it with some colors like so:

then I unwrap my mesh so that every face gets the color I want it to have.
However I don't like this workflow at all, I would prefer it, if I could just select colors for the faces in blender and then blender automatically generates a color map.
Somone knows if this is possible? It must be an image so I can import it to my game engine

If I understand you correctly you want to select each face, assign it a color and bake that? By the time you're done, you have easily created a new material for each face. Use groups to coordinate them, so you only need to change the color of the material.

Related: Add different materials to different parts of a mesh? and How do I bake/add material colors onto my UVmap?


text:
How can I fix these creases on my mesh?
My problem is:
My mesh has these shading errors but I can't find any double vertices or double faces. I tried using "Merge by Distance", but it didn't work.
Can someone help??? Thanks in advance!

Have you tried recalculating the normals?

Also: can you show a picture of the object in edit mode so we can see what the topology looks like?

Thank you. some of my faces were flipped. I recalculated normals.


text:
Is there an easy way to draw lines with measurements like in SketchUp?
In SketchUp, I click the line tool, then click on the stage and move the mouse in the desired direction followed by just typing in a number and clicking enter.
I wanna be able to do the same in Blender. Is there a way to do this? Sorry if this is a super low-level question. Even if I have to add plugins or something can I get Blender to work like SketchUp?
I wanna switch over to Blender as I'm starting to model cities with photo mapped terrains and SketchUp can't deal with the data very well. Also, I'd love to be part of this community and help others in an open-source program.

You could always add a plane, and type in the dimensions.  Then delete afterwards.
Not the exact solution, but something that would function.
Or there is a "measurement" tool in layout mode and modeling mode, on the left tool bar.  But that doesn't quite sound like what you're looking for.

Thank you for the advice Mike. I tried that but it isn't as quick as just drawing lines. Any other ideas? I'm basically looking for something like Inkscape, Illustrator or SketchUp.

Sorry, very new to blender, and never touched those other programs.

I just wanna draw lines and type in the distances as I go.

Even if there are plugins, I'm happy to load extra bits to be able to draw lines properly.


text:
Bake From Multires
Followed 4 different tutorials. Seem to have closely the same steps

Multi-res On Mesh
Add New Details
Cycles Renderer
(Shading Tab) Add New Texture
New Image> Color Space: Non-Colour
Render Properties Tab
Bake: Bake From Multres

I have the the multi-res at levl 6, on test Monkey. Adding test brush marks, big bumps etc.
When I Click bake. I get output but it's just a flat purple UV, no details.
Not many settings tbh.
curretly, Bake Type: Normals, Margin: 16 px, clear image ticked.

You need to lower the Levels Viewport value in the Multi Res modifier settings.
When you bake a Normal map from the Multi Res modifier, the Viewport levels are basically your low-poly mesh while the Render levels define your high-poly mesh. The baked normal map is the difference of both levels.
When you select Levels Viewport = 0 and Render = 4 for example, it should do the trick.

(I have no idea what the □ Bake from Multires checkbox in the Cycles > Bake settings exactly does. You don't need to check it but you can. If you don't activate it then just select Normal for Bake Type.
When it's checked it also requires a lower viewport level to work. It seems it automatically selects Normal for the Bake Type, and hides a few other settings such as the Influence and the Active to Selected sections. The bake process also seems to be a bit faster and the result differs slightly.
The documentation says only:
Bake from Multires - Bake directly from multires object.)

Thank you. as simple as lowering the viewport display too 0.

Make duplicate of original 3D model. One with high detail sculpted, second is original with low poly without multiresolution, model that you will apply final textures.
After you finished sculpted or painted 3D model, make duplicate again, on the duplicate apply all modifiers, and bake textures color, metal, roughness, normal.
Rule 1: all this duplicate must have same UV wrap, and same names UV maps.
Select original low poly 3D object, make duplicate, make new material insert to only one his material all bake image textures.
If you made new UV map apply checked render icon to use it if you made on new one UV map. All material or UV maps should to be deleted on this 3D model.


text:
Rig offset when generating
Base armature, using rigify under the hood. Location/Rotation/Scale all fine.

When I Generate I get this:

So I cleared transform, I get this:

Nothing aligns. Any idea what could be throwing off the rig?

Looking into the matter myself, I was unaware the rig was not 100% bound to position/location/scale of the metarig on generation. as in, if you move the rig it will hold that position even if you delete it. So if you tweak the metarig and generate, it will revert back to the last position you deleted it from (which seems mental) Or I could be completly wrong, but the problem is fixed.


text:
Painting problem when using pen in Blender
I've been using Blender for years. This is my first time to experience it on a 2in1 PC (HP Pavilion x360). This machine has a pen which works perfectly in any app except Blender.
Whenever I tap the screen with the pen on a surface to paint (in UV/Image Editor or 3D View, no matter), it just doesn't start. When I drag the pen a little bit, then it starts drawing. Interestingly, the distance between the point I click and the point it starts drawing seems equal to length of the radius which appears in Win10 when holding pen to emulate right-click. I disabled holding option for right-click but the problem still exists. (This happens also when sculpting or painting weights.)
In Krita or GIMP, I don't experience this kind of issue. It just starts painting the moment I touch the stylus on screen.
I really want and prefer to use this pen in Blender rather than a mouse. How can I solve this problem? Can I decrease or totally disable required length of dragging that tells the system I'm not holding? (as I said disabling it in Control Panel doesn't work.) Or is there any way to make Win10 to treat Blender's window as in Krita's or GIMP's?

Same touch-draw distance problem for Grease Pencil in 2.79b on a Toshiba convertible with Wacom touch/pen (0x056A, 0x50A2, driver/utility 6.3.31-4 aka 7.3.4.48, wintab.dll 1.0.5.9) on Windows 10 Home build 17134. Disabling "Continuous Grab" has no effect. Tried disabling pen-related features as well, especially "Flicks" (Pen and Touch / Pen options / Pen actions / "Press and hold") "Hold to right click" Option, but no effect. Unfortunately, your solution does not fix it for me either. (same issue with Annotation in Blender 2.80.27 alpha) Anything else required (restart does not work either)?

Could you please manually run "regedit" and go to "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Pen" and then check if there's a 32-bit record named "LegacyPenInteractionModel" with value of "1"? Because this definitely disables that annoying threshold. It just may break the pressure sensitivity but that is another problem. It literally is the fix for "Windows 10 Fall Creator’s Update" which exactly is the cause of the problem. Also, make sure you have installed that update. Btw, can you tell me if you have Wacom drivers on your device?

It appears to have been fixed (works for me): https://developer.blender.org/T55589 (requires LegacyPenInteractionModel to be disabled).

@handle Happy to hear that! Two months ago, you said it didn't work. Could you please tell us more about what exactly solved your problem? Might be useful for anyone else having the same issue.

I have the same problem, but unfortunately, the reg command does not apply to windows 10. Can someone give the windows 10 prompt line?

I'm back. Believe me or not I've been looking for a solution for weeks but I found a solution today just a few hours after I posted this question. So, now I'm sharing it:
Because of one of the updates, Win10 doesn't treat legacy apps and modern apps which specifically designed for pen in the same way anymore. I think this is why I have never faced any issue in many apps (such as Krita and GIMP) but Blender. (Blender is legacy but not GIMP? LOL I don't get it, too.) There is a way to disable this behavior.
Solution

Run cmd
Type this and enter: reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Pen /v LegacyPenInteractionModel /t REG_DWORD /d 1 /f

This will make it! If you have any problem with pen in future and want to go back use this command: reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Pen /v LegacyPenInteractionModel /t REG_DWORD /d 0 /f
Btw, yes... it really is a BIG mistake not to put an option for this in the control panel. I wanna swear to Microsoft but I don't know if it's allowed here. So... shame on you MS! It took me weeks to just find this solution.
[Source: https://www.reddit.com/r/Windowsink/comments/8508fi/controlling_pen_behavior_in_windows_10/ ]
Edit
Addition:
It seems this command breaks pressure sensitivity. I solved it as well:

Go back with second command I mentioned above
Run regedit and go to HKEY_CURRENT_USER\Software\Microsoft\Wisp\Touch, set PanningDisabled to 1.
If there still is any issue, install/repair WinTab (https://www.microsoft.com/en-us/download/details.aspx?id=49498 download and install Wintab_x32_1.0.0.20.zip or Wintab_x64_1.0.0.20.zip depending your system arch)
If it still occurs, go run first command again.

Now, I can draw without any latency and pressure sensitivity works perfectly!

In blender go to Edit -> preferences -> Input -> Tablet and select "Windows Inc" under "Tablet API"
Now your pen should behave as set by the rules under pen in windows settings (means you have to turn of hold for rightclick there if you have not already)

Try Windows Ink or Wintab option, and make Strength bigger.

Thank you, this helped me, although I was having a different problem. See this question: https://blender.stackexchange.com/questions/207356/mouse-is-painting-stylus-is-erasing

For me on a Dell XPS 2-in-1, the problem went away when I turned of Flicks in the Pen settings in the control panel.

I assume you probably have not got Windows 10 Fall Creator’s Update yet due to your OEM or your OEM provides you another update. This problem is specifically related to this update. Before the update, everything was working great for me without having to fix anything.


text:
Architectural Addon - Export UV for handcraft paper models
I can remember watching a video about architectural-design-addons in blender. At some point the youtuber said that it was possible to export the uv for handcrafting. Like these paper kits for children. Well now is the time I could benefit from this. Sadly I wasn't logged into youtube and can't find the video anymore. Does anybody know what addon could do this? example:
EDIT: I found a similiar addon but I dont think it can work for me. https://github.com/addam/Export-Paper-Model-from-Blender#export-paper-model-from-blender

Hello :). It could be Export Paper Model addon, that is shipped with Blender. Just enable it in Preferences > Addons.

Thank you very much. This is the one and only. Thank you

Happy to help :). Good luck with your models.

Jachym Michal solved this issue. Its the "Export Paper Model" addon, preinstalled in blender. Thank you again!


text:
Blender 2.8 how to see rendertimes in RenderView
I want to compare my seen in 2.79 and 2.8 but in Cycles (2.8) I can't see the time how long it rendered.

Well, it's still written at the top of the image viewer with render result opened:

but not in the 3d render view thank you though

If you use EEVEE, yes it doesn't display the render stats in the viewport. But not Cycles.


text:
Will duplicated geometry cause problems for 3D print it or WebGL?
I'm fairly new to blender. I want to design a somewhat complex model, that I can later print with a 3D printer and possibly use for WebGL as well. Before I start, I wanted to clearify that I'm actually joining the  meshes together properly and that overlapping and duplicate lines are acceptable.
I'm using the 'honeycomb' mesh that comes with blender as the base:

I applied the array modifier to the mesh and set the X offset to 0.765 so it lines up properly:

From what I understand, the blender instead of 'extruding and copying' the honeycomb pattern, it 'stacked and copied' the pattern, in other words - the line that connects the original honeycomb mesh to the honeycomb copies is actually two lines overlapping each other at exact location.
In edit mode, if I 'click' once select and drag the points around, I can see there are duplicate lines:

Is there a function where Blender can remove this duplicate lines and recreate the mesh by 'joining' the points 'cleanly' and removing the duplicates so it's connected cleanly like the original honeycomb mesh?
My question is: Will this kind of mesh cause me any problems if I would want to 3D print it or use it for WebGL? is this considered bad design or is this mesh perfectly acceptable?
Another example, if I take 2 cubes, overlap them and ctrl+j(oin) them, is this a proper model, or do I need to redesign it, so there are no overlapping faces? Thanks!

In Edit mode W > Remove Doubles that's a pretty obvious one. You'd be advised to remove the duplicate faces before arraying though

You need to delete those points that will overlap if you are using an Array Modifier. To help visualize this remove the array modifier, select your mesh, duplicate it and drag it over until it lines up. You will see that those vertices will overlap...

@DuarteFarrajotaRamos not sure if I understood. The original honeycomb doesn't have any duplicates/overlapping lines, they are created by the array modifier and after applying the array modifier and 'Remove Duplicates' I get 'Removed 0 vertices' ( I selected all the points ctrl+a).

Array modifier has Merge and First And Last options designed specifically to solve the problems of overlappng duplicated geometry. Note that in general it's easier and more flexible just remove it in the first place to avoid the problem from the beginning, still it's possible. Remove Doubles doesn't necessary delete all the doubles at once; probably the vertices will be far enough to not fall under threshold of the operator.

@Dontwalk thanks! I understood the problem, but does that mean if I set array modifier count value to 100, I will have to edit the mesh manually and select/delete/re-join these overlapping lines 100 times? or did I misunderstood something

@MrZak thank you so much, that solved my issue! Please post it as answer and I will mark it, thanks!

I meant to remove the faces that will become overlapped before doing the array, like Mr Kak mentioned

You or anyone else are welcome to post the answer. Note that solution I proposed is fixing the problem which is better to avoid in general, so it might be not the best one (e.g. First And Last could remove more vertices than you expected). If posting answer add those details as well if possible


text:
Uneven distances between the edges when extruding
I have the following mesh:

When I try to inset it, the distances between the edges are in equal distance:

But when I try to extrude them (by pressing e then s), I get uneven distances between the edges:

How can I extrude the edges evenly/do an inverted inset?

You might want to take a look at the Offset Edges add-on for Blender 2.80: https://blenderartists.org/t/offset-edges/584283/200

What you're trying to do is a Shrink/Fatten but with a simple series of vertices. I don't think you can do it with simple vertices but you could do it with a trick: Use the faces normals.

Extrude up your mesh.
altE to Extrude Region (Vertex Normals).
Drag to get what you want.
Only keep the shape you want.

Thank you sooooo much!!!


text:
Merging overlapping duplicate geometry
I have a simple plane, to which I applied the 'cell fracture' add-on. The add-on created separate layers for each fracture, so I selected everything and used 'ctrl+j' to join all of the layers into one mesh and removed the faces:

Now I would like to have this mesh solid and 'connected' as I see it visually, but when I zoom in, I see that the edges are not connected, but are overlapping:

I tried 'remove doubles', but it 'simplified' the mesh and altered its pattern:

The closest I could get it to remove the extra vertices was using the 'Limited Dissolve', which removed all the extra vertices:

but still the original problem persists and the vertices/edges are still overlapping:

How can I 'merge' these edges so that I could get a solid mesh? Thank you!

It appears you had the threshold too high when you removed doubles.

By joining and merging the vertices you are going back to one solid object, which is mostly undoing the results of the cell fracture.


text:
Game Engine - Steering Behaviour Understanding
I am working on a BGE Horror Game right now and I want the enemy to follow the player around, but not directly. I want it to also walk around radon parts of the map even when the player is not there. Is this any possible with the Steering Actuator? And also, I have seen the different behaviours that I can apply (Path following, Seek, Flee). What is the difference between these 3?
Thanks in advance!

Welcome to BSE! :D As far as following the player around, I think you'll have to do a bit of work in python for that.  I would suggest having the enemy path find to an empty that is placed randomly via a python script.  As far as the different behaviors go, from what I can remember path following has obstacle avoidance and is a good way to get from point A to point B.  Seek will cause the object to just start walking towards the target, and flee will cause it to start walking away.  I believe seek and flee have basic obstacle avoidance, but I'm not sure.

Possible result:

What you're searching for is called a "Navmesh" and it is done without any python-code.
Therefore you need the Steering-Actuator.
The Seek-Mode makes your object to allways face into the direction of the target and move towards it, until the set distance is reached.
The Flee-Mode is quite the opposite, it makes your object move away from the target, until the set distance is reached.
What you need for avoiding obstacles is the Path following-Mode. This mode uses a mesh that tells your object, where it can move and calculates the fastest way to the target.

1. Create a Navmesh - select every collision objects in your scene, including the floor. Then click on Build Navigation Mesh, which creates you a plane with holes, where your obstacles are. Play around with the Agent-Values if your scene has ramps or different hights...

2. Use the Navmesh by choosing your Navmesh as "Navigation Mesh" in your Steering-Actuator.


text:
Fast keyframe insertion
I noticed that every time I insert a new keyframe on an object using the Python API, the insertion takes more time.
Here are some timings of a keyframe insertion:

1st keyframe: 0.0176 ms
10000th keyframe: 1.0012 ms

(both only measure the insertion time of one keyframe)
Now I don't need to insert so many keyframes but this is just to show what is happening. Although it's just ~1ms here, it makes a big difference for me because I need to keyframe many objects (~10000).
So here are my questions:

Why is this happening?
How can I insert ~1000 keyframes to an object in an efficient way?

Related  If you have the data for frame and value.

@batFINGER Thanks, that solved it! Maybe post a normal answer so I can accept it?

Use foreach_set to set all fcurve data from data
Similarly to this q&a can add our data directly to an fcurve.
fc.keyframe_points.foreach_set("co",
        [x for co in zip(frames, samples) for x in co])

is setting the co, the (frame, value) pair of each keyframe point
i = 0
for f, s in zip(frames, samples): # zip => (f1, s1), (f2, s2) ...
    fc.keyframe_points[i].co = (f, s)
    i += 1

note foreach_set requires a "flat (or one dimensional) list"  eg [f1, s1, f2, s2 ...]
flat_list = [x for co in zip(frames, samples) for x in co]

Script below creates a random noise per frame for frames 1 to 250.  The action and fcurve is created for location.y and  assigned to the context object.

import bpy
from random import random

frames = range(1, 250)
samples = (random() for f in frames)
# some action
a = bpy.data.actions.new("SomeAction")
fc = a.fcurves.new("location", index=1, "LocY")

fc.keyframe_points.add(count=len(frames))
# populate points

fc.keyframe_points.foreach_set("co",
        [x for co in zip(frames, samples) for x in co])
# update
fc.update()
# assign to context ob
ad = bpy.context.object.animation_data_create()
ad.action = a

To tweak it up a notch, if you are not going to edit the fcurve convert it to sampled points
fc.convert_to_samples(1, 250)

Every time you add a new keyframe, Blender has to add it to its internal list of keyframes and the larger the list becomes the more work is involved in maintaining it (allocating memory, sorting, inserting records, etc) - so it gets progressively slower.
1ms per keyframe doesn’t sound too bad to me - at least for any ‘reasonable’ number of keyframes (normally you would set a small number of keyframes and let the f-curve interpolation fill in the gaps - the whole point of keyframes really).
If you really must specify so many individual points for your animation then perhaps a Driver would suit better. A driver function could be written to take a list of distinct values - a dataset - and take some kind of ‘index’ (eg, the frame number) and return the relevant value for that object. In this way you don’t need to maintain lots of keyframes and can simply have a dataset (which could be held in a file, for example) that can be used to drive the animation.

Thanks for this idea. I tried it and it's very fast to create all the drivers but unfortunately it's quite slow when I play the animation (~25 FPS) while the keyframes were running at ~45 FPS. My drivers' expressions are just reading the values in memory.


text:
How to speed up hiding thousands of objects
I need a quick way to hide thousands of objects in the view layer via python. I have tried running the following code, but it takes 10 seconds to run with 10,000 objects:
objs_to_hide = bpy.context.scene.collection.all_objects
for obj in objs_to_hide:
    if obj.visible_get():
        obj.hide_set(True)

Is there a way to do this operation faster? I also tried using the 'hide_view_set' operator with the following code:
objs_to_hide = bpy.context.scene.collection.all_objects
for obj in objs_to_hide:
    obj.select_set(True)
bpy.context.view_layer.objects.active = objs_to_hide[0]
bpy.ops.object.hide_view_set(unselected=False)

But I got the following error when running that: RuntimeError: Operator bpy.ops.object.hide_view_set.poll() failed, context is incorrect
I have a feeling the operator would not be the most efficient path forwards anyways – operators seemingly rarely are. I did try hiding 10,000 objects from the viewport interface using the 'h' key and it seems to run instantly... which leads me to believe it must be possible to hide massive amounts of objects much faster than the first code snippet above. Any help would be greatly appreciated!

I'm not sure if it's applicable here, as you don't hide persistently for viewport/render, just hide temporarily as when using the H, but The docs say:

Object.hide_viewport, Object.hide_select and Object.hide_render: Setting any of those Booleans will trigger a rebuild of Collection caches, thus breaking any current iteration over Collection.all_objects.

Operators are slow when you call them on one object or just a handful of them, but they are very fast for bulk operations like this, because you move the loop from slow Python to fast C implementation.
import bpy
from bpy import context as C

for obj in C.scene.collection.all_objects:
    obj.select_set(True)

with C.temp_override(area=next(a for a in C.screen.areas if a.type=='VIEW_3D')):
    bpy.ops.object.hide_view_set()

@ChristopherGearhart I don't know an answer to that

Thank you! This works great, but after that code when I call bpy.context.space_data.overlay I now get the error EXCEPTION (<class 'AttributeError'>): 'NoneType' object has no attribute 'overlay', and it didn't used to error out. How do I revert the context back to the original state so I can access the overlay from the space data?

@ChristopherGearhart deindent so you're no longer within with block.

I also figured out how to achieve the same effect for unhiding only a select number of objects by building a list of all the hidden objects that I want to stay hidden (excluding objects that I want unhidden), running the bpy.ops.object.hide_view_clear() operator, and then running the bpy.ops.object.hide_view_set() operator again on the list of objects I built before unhiding all.

It is deindendted but still errors out :/

@ChristopherGearhart If you do print(C.space_data) before using the operator, it probably already is None, my guess is the operator doesn't cause the error.


text:
How to redraw status bar in Blender 2.80
I've added my own progress bar to the Blender 2.80 status bar (the footer of Blender) with the following abstracted code:
def draw_progress_bar(self, context):
    self.layout.prop(context.scene, "my_progress", text="Simulating")

bpy.types.STATUSBAR_HT_header.append(draw_progress_bar)

Only problem is, when I update the my_progress scene property, the progress bar in the UI doesn't update unless I move my mouse over the area. Typically, this would be solved by running the following code to redraw the area:
def tag_redraw_areas(area_types:iter=["ALL"]):
    """ run tag_redraw for given area types """
    area_types = confirm_list(area_types)
    screens = [bpy.context.screen] if bpy.context.screen else bpy.data.screens
    for screen in screens:
        for area in screen.areas:
            for area_type in area_types:
                if area_type == "ALL" or area.type == area_type:
                    area.tag_redraw()

But in this case, the Status Bar does not seem to be listed in bpy.context.screen.areas. Is there any other way to redraw the status bar in Blender 2.80?

I've found you can cause the status bar to redraw by calling:
bpy.context.workspace.status_text_set_internal(None)
It will of course also remove any currently set custom status text, but unlike the non 'internal' version it does not remove appended draw functions.

Hi & Any ideas re https://blender.stackexchange.com/questions/146815/getting-the-topbar-area-instance


text:
using the node editor with multiple entry points
I'm using blend4web and have some different 'switch select' behaviours set up, one moves an object up on click and down on second click.
The other changes the colour of an object based on click of another object.
Both behaviours work independently of each other but not together, it seems that I cant switch between entry points?
Also clicking any other object in the scene (no behaviour defined on the object) stops either entry point working / behaviour being carried out.
can someone point me in the right direction I'm not sure what I'm doing wrong?

You probably better ask that over at the Blend4Web Forum

Both behaviours work independently of each other but not together, it seems that I cant switch between entry points?

Indeed, the current setup depicted on the screenshot suggest independent behavior.

Also clicking any other object in the scene (no behaviour defined on the object) stops either entry point working / behaviour being carried out.

You need to connect the miss socket with some socket before the switch select node.


text:
Automatic Heat Weighting: Failed to find a solution for one or more bones error
Please don't mark this question as a duplicate, because solutions for other questions with the same error, doesn't work for me.
So I have a character model, created via ManuelBasioniLab, and I want to make an armature with automatic weights for it, so I created few bones to test that it will be working, and it doesn't work because of error.
I tried to:

Delete half of the mesh and using mirror modifier
Use Remove Doubles (on the first try deleted about 130 vertices)
Use subsurf modifier
Use decimate modifier

Nothing seems to be working, the error is still showing.
Link to the model: https://www.dropbox.com/s/8cqahidxh39zyav/character.blend?dl=0

Changing the scale of mesh and armature to bigger solved my problem.


text:
How to Hide 3D viewport
Is there a way to remove drawing the scene twice but keep a U.I window open ?
I have a second window, but I want it 100% just for that  Rigify fast select options.
My question, how do I disable the 3D engine (or close to that) on the 2nd window I really just want to display the U.I

Not 100% sure what you're asking, but at the top left of the viewport(s) is a button that looks like a grid with a sphere above it - this lets you change the editor type. Click change it from a 3D viewport  to anything else.

Each viewport's display options are independant from each other, so you can use that at your advantage.
First, let's hide every object type we have in a viewport using the View Object Types popover:

Open this popover, and  LMB-drag down the entire eye icons' column to disable this viewport's object types display.
Now you still have the rig and gizmo displayed. But then to make it better : you can simply disable the viewport's overlays and gizmo by toggling off these buttons:

Demo:

Legend! I remember this now xD forgot about this!

Glad it helps! Don't forget to accept this post as answer with the checkmark button bellow the votes buttons.