text:
Blender API Python split body by loose parts
I'm trying to make a python script that splits alot of objects into its loose parts and i actually have gotten this to work but i encountered a bug that i don't fully understand and thus come to you to help me out!
I have the following code to manipulate each object that i need to have manipulated (and split):
for collection in bpy.data.collections:
  if collection.name == "Render":
    for object in collection.objects:
        print("Manipulating object: {}".format(object.name))

        # place at correct location and scale to the setting size
        object.scale = scale

        thickness = list(object.dimensions)[2]
        location = [0 ,0, thickness/1000]
        object.location = location
        object.rotation_euler = rotation

        # split the mesh
        if object.type == 'MESH':
            print("Splitting mesh")
            bpy.ops.mesh.separate(type='LOOSE')
    break # no need to check other collections

What happens is that all the objects that it iterates through are placed at the correct location and with the correct size and everything but only the last item in the list
collections.objects

is split into its loose parts but all the other objects are not.
Heres an image of the console:

Note that 5AD48 part shows up multiple times because it has been split.
My first thought was that its caused because once the body is split the collection is not the same anymore, so i tried copying the list but that just made it more buggy.
Anyone have a clue what causes this bug?
Any insight will help!
Thanks in advance!

Are you sure there are lose parts in the other objects? Try doing separate by lose parts manually.

@ViplavPrakash Yep, even if i make them all a copy of eachother it still only splits the last objects. My next thought is that blender actually selects the last object in the list, sees the split and just splits that object constantly. so maybe there is a way to select objects ?

It seems like blender selected the last object in that list (the reason for that is likely because these meshes are imported in a piece of code infront of the code i posted) and i never actually selected the other meshes.
This code works for me and splits all bodies:
for collection in bpy.data.collections:
if collection.name == "Render":
    for object in collection.objects:
        print("Manipulating object: {}".format(object.name))

        object.select_set(True)
        # place at correct location and scale to the setting size
        object.scale = scale

        thickness = list(object.dimensions)[2]
        location = [0 ,0, thickness/1000]
        object.location = location
        object.rotation_euler = rotation

        # split the mesh
        if object.type == 'MESH':
            print("Splitting mesh")
            bpy.ops.mesh.separate(type='LOOSE')
        object.select_set(False)
    break # no need to check other collections


text:
When I rendered my project, it seems to be completely grey. Also, I have Blender v2.79
I'm a noob at Blender so that maybe the problem. I have Blender version 2.79. I rendered it a couple of times, but it still came out gray. These are screenshots taken before and after the render. (the first one is before, the second one is after)

Please help!!

Does this answer your question? Render result is completely blank?

Try changing from Blender Render to Cycles Render in the drop down menu along the top? That's where I'd start at least.

source: Stack Exchange

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

sort: votes


text:
Where can I see and edit keyframes for texture properties?
I am pretty new to blender and I want to animate the alpha value of a texture. (Actually I want to have an object appear and disappear in a pulsating way). I need to do it in eevee, NOT in cycles.
I have succeeded to change the opacity of an object by changing the alpha value of the texture:

And then switching to «alpha blend» within the textures settings:

So far so good.
Now I would want to create a pulsating animation between alpha 0.25 and 0.75. I found this post where it's said that I could create my animation with keyframes and then add a cyclic f-modifier.
The problem is, that I can't see my keyframes I am setting for the texture.
I can open up my timeline, go the desired frame and right-click on the alpha property:

This will indeed add a keyframe, and I can see that the texture is changing over time, but they keyframes don't show up in any view.
I tried to change to «Graph Editor» and deselected the «only selected»

But I can nowhere find the keyframes for my alpha property!
I would be super happy to know where I can edit them in a timeline-like way and how I can then add a cyclic f-modifier to that animation, changing between the values of 0.25 and 0.75.
Thank you for any help.
PS: I am using blender 2.81

I needed to deselect Selected Only from the Curve Editor header and use the search bar or enter all the nested properties of the material.
The material had to be selected within the project panel where you see all your object hierarchy.
After that I could add keyframes, and use Shift + E to add a Cycle F-Curve modifier.

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


text:
Weird view (fragments) in orthographic view
I use blender 4 and I have set up some very basic geometries.
If in orthographic view I always see some weird rendered faces. When in isometric view it is gone.
I have no idea what change has caused this. It was not there from the beginning. Also restarting did not help.
Any idea why this (bug?) appears?

Hello maybe check the N panel > View > View > Clip Start and Clip End?

It is true that this changes things. I have currently set Clip start: 0.001m and Clip End: 1500m.
Because my model is quite big, as it shows a building and I wanted to build it in original sizes (meters). Therefore I had to increase the clip end quite a bit. Changing the value only changes the fragments but it does not resolve the problem...
Any further idea? I think it could be the right direction...

For more information about the clipping settings read the second half of my answer here: https://blender.stackexchange.com/questions/311169/question-on-scaling-object-and-its-impact-on-rendering-in-cycles/311176#311176 Adjusting only the Clip End is not enough.

maybe share your file? Only keep some objects...

@moonboots Why? The Clip Start is simply too low. If he increases it to 0.01 or even better to 0.1 the problem will be solved. When the scene is so large I doubt it has to be kept on 0.001 m. More about it in the Blender manual here: Depth Buffer Glitches

I meant if he can fix with the Clip Start and End    ;)

https://blender.stackexchange.com/questions/1385/shadows-along-edges-of-mesh-in-3d-view/ https://blender.stackexchange.com/questions/4946/where-can-the-viewport-clipping-parameters-be-changed

Thank you very much. This was it!


text:
Rotating view causes large objects in model to get distorted
When my model gets pretty large and I try to rotate it, only certain view angles work. In other angles, it looks like it is breaking up or distorting. I am not trying to render and I'm not using a camera. I am using version 2.79. I tried updating to 2.81, and it did the same thing so I went back to 2.79 to get this project done. I have attached a couple pictures. One shows what it should look like and the next shows what the distorted image looks like. Help much appreciated!

https://blender.stackexchange.com/questions/5201/how-do-i-increase-the-render-distance/5202#5202

That's clipping. 3D View > N, Properties region > View tab, Adjust the near clip nearer, and the far clip nearer, too,  if everything still fits the depth. (This comment is possibly a duplicate)

Thanks for the answer. I changed the end from 1m to 10m and the problem went away.


text:
Left toolbar is missing - Blender 2.81a osx

I don't know what is happening. My left toolbar is missing.
It is closed toolbar:
It is opened toolbar (shortcut T)
How I can fix it?

There is a small arrow on the left. Drag that to the right.

Didn't help. Just increased the empty space :(

authors: Андрей Сорока


text:
The bevel tool is beveling too steeply

As the picture shows, the bevel is doing it very steeply. What should I do?

Is the scale of the object uniform?

You need to apply scale to the object before beveling to get a nice result. Go to object mode, select the object you want to bevel, then go to Object > Apply > Scale.
In edit mode, select the edge not face or vertex that you want to bevel, then press B.


text:
Why when I unwrap my model does the field for the Torso come out so strange?
I have been trying for the last 2 hours, fiddling with where I have placed my seams and either the torso or the legs end up like this. If someone could please tell me what it is I am doing wrong.
I would like to note this is one of my first proper modeling projects with Blender and one of the first times I've used the unwrapping tool so I am unfamiliar with it.
Thanks for your help]1

Check that there is a complete seam, around the neck, around the top of each arm, around the top of each leg. and at least one vertical seam running the complete length of the torso. In Face select mode, hover your mouse over the torso and press the L key. If your torso is completed isolated from the rest of the model with seams then only the torso will be selected. Usually for the torso you will have two seams, at the sides, running vertical, One under each arm down to the top of the legs.

Thank you so much! That fixed it!

I am pretty sure you are unwrapping the mesh wrong. You have it unwrapped in a sort of round ball shape on the UV map. If you unwrap it with cylinder projection, cube projection, or even just select one side of the chest and unwrap it that way, it will be more square-like/flat. That would work a bit better and you would not have stretched textures.


text:
having issue with render ,everything becomes black
when i render at the end of rendering everything becomes black

What render engine do use, what lighting setup did you create, what should it look like?

StackExchange is a Q&A site which values questions that show you've made an effort towards solving the issue.
The How do I ask a good question
page from the Help Center may help you improve your question. Please try to describe what you've tried so far
and why this didn't give you the desired result.


text:
How can I apply the same change to multiple channels in Graph Editor?
I'm a beginner and learning with a video course in Blender Cloud.
I would like to apply the same modification to two channels such as the X Scale and Z Scale in one action in the Graph Editor.
In the video course, Animation Fundamentals, 101 Simple Bouncing Ball (Part02), around 22:55, the instructor edit both the X scale and Z scale at once.

Use the eye icon to show only the curves you want to edit, then select all keyframes you want to edit, then press G to move, G X to move along time, G Y to move along values, S X to scale along time, S Y to scale along values. Confirm with enter or Left click.
You can set the pivot point of scaling with the usual pivot icon (Bounding box, individual center or 2D cursor).

Thank you. It worked. I tried to solve it only with mouse operation. With GY shortcut keys with multiple channel selection with shift key solved the problem.

Perfect, if it has been useful please mark the answer as accepted.


text:
Circular Array not working after modifiyng cube in 2.81
I'm trying to make this circular array of cubes that would sit on a UFO so it's sitting on an angle. It's working when I make a regular circular array of unmodified cubes, but as soon as I modify the cube to make the array with, it goes crazy, the locations are all off.I did set the cursor to the UFO's origin and the cube's origin to the cursor.Basically I am trying to make a circular array to use as a Boolean to cut some holes in the UFO.
Setting up for the array

Making the array with simple cubes

When I modify the cube and make the array

 After applying the size and rotation it worked with no problems /Thank you Robin.

First shot:  Ctrl A > Apply the scale of the cube. (bake the scale into the mesh). Each iteration of the array will inherit the transform of the original, and apply it again, recursively. You want that for the rotation, but not the scale.

Thank you Robin. It Worked. I applied the size and rotation. Thank you again.


text:
light bleed on objects in eevee render engine on Blender 2.81a
in 2.80 there is an exponent and bleed bias slider on the shadow option on lights to get around the light bleed, but in 2.81a there isn't/missing and I'm having trouble on how to avoid/fix lights bleeding into the interior of objects, any ideas?

This was intentionally removed here: https://developer.blender.org/D5659 As far as I understand, the developers felt that the new shadow model deals well with light leak on its own. But don't quote me on this reasoning.


text:
How to create a dithering effect?

How does one create this effect and be able to control the level of dithering?

In the youtube video from which you take this image, the author explains it in the first commentary https://www.youtube.com/watch?v=SwGM7bl-wC8

Close to this https://blender.stackexchange.com/questions/143884/how-can-stipple-shading-be-replicated-in-blender/144623#144623

@thibsert could you elaborate on his instructions? I'm still fairly new to blender so they aren't entirely clear to me. thanks

For Eevee, the principle is similar to the one used in this answer.
Simply you can change the input parameters and play with the Voronoi texture options.

I've changed few things to the node setting.

Voronoi input is set to camera texture coordinates.
Voronoi changed to 2D and distance to edge.
Colors inverted.
Inputs on the right tuned.

I have written a detailed breakdown of the shader as a medium post. Here is what the result looks like. The .blend file is attached below.

The main idea is to create a map from grayscale to the dithering patterns. Once you have created this, you can use the Diffuse BSDF node to create the shading, which will be mapped to the corresponding patterns.

I use the camera coordinates to create the pixel index.

The pixel index can be turned into different patterns using simple modulo arithmetic. The checkered pattern would be mod(x+y,2). Here is another example.

Once you have all the patterns, create a map from the grayscale to the patterns.

Add them together and use the pattern as the factor input of the Color Mix node.

Left is the Diffuse BSFD only, and right is after the mapping.


text:
2 objects use the same mesh; how to separate?
I don't know how I ended up with 2 objects that share the same mesh (Cube.143) in my bench model; I want to have a unique mesh for each. Suggestions welcome. thanks
ps: I can't find any apparent linkage between the two objects.

Related - http://blender.stackexchange.com/questions/1652/how-to-make-multi-user-objects-single-user

You've probably joinded two meshes (pressed Ctrl+J). Separate them (P) : http://blender.stackexchange.com/questions/41205/how-can-i-unjoin-meshes

I think it was a case of a linked object.. thanks anyway

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


text:
Does an inactive Blender prevent Windows from sleeping and/or hibernating?
I use W7 on a ThinkPad, with hybrid sleep enabled. Sleep/hibernate work as expected without Blender.
When Blender application is loaded (i.e. the application has been launched, but is not rendering anything), the computer never enters sleep mode, ignoring sleep timers. The display is off, but fan air is hot, an indication of a sustained CPU/GPU use.
Is there some Blender documentation about this? Is there a solution to prevent it?

I'm aware of how to pause the Blender process, but my question is different.

I don't know if Blender disable sleep/hibernate, because my rig is always ON. But if you let Blender running and do nothing, it should use CPU or GPU very little, less than 1% to 0%. It just take some RAM depend on loaded scene. Are you sure Blender load your CPU/GPU? Consider upload screen of running processes. Because this can be everything, most likely some mining visus.

@Shubol3D: I checked to be sure: I don't see any significant activity on the CPU using Resource Monitor or Process Explorer, and the latter tells me there is no significant GPU use either. Snapshot. Still air is a bit hot, and Windows doesn't go on sleep state. Closing Blender, air seems colder and the computer sleeps and then hibernates normally.

hmm, I don't thing this have something to do with Blender. Based on your screenshot looks like it's more about your hardware condition. Hot air in almost zero CPU load  = something wrong with cooling system. I don't know your situation and it's out of topic here. This was discussed millions times all over the internet.  :)

@Shubol3D: For temperature, I'm not talking about very hight one, and I don't exclude the fan need some cleaning. However I this has likely no impact in the sleep issue.

powercfg -requests shows an audio stream being active any time blender is open


text:
What was the first printed documentation for Blender?
I remember buying a printed documentation from NaN a long time ago. Perhaps it was this one:

2000 "official" documentation for Blender 2.0, source
In my memory the book was more in the shades of pink, but I may be wrong. Anybody can confirm this was the first book sold by NaN? (I'm not talking about books written by independent writers, though at this time I doubt there was many authors).

Interesting find, though I'm not sure this technically classifies as a question about Blender. Perhaps you'll have better luck at https://blenderartists.org

I believe this one is way older and Ton signed it.

Can you add more details about this? What version is it for, when was it published, etc.

Wel as you can read it is for V 1.5 and it was published by

Published by Not a Number

Eindhofen, the Netherlands, 1998


text:
Create points on faces around the location of another object
Using 3.1.
I can't find how to use the geometry nodes to distribute points around the location of another object in spite this is demonstrated in this tutorial (at 45:40) made with version 3.0.
The tutorial where the points follow the cube when the cube is moved:

It's based on using the Selection input of the Distribute Points on Faces nodes. My own setting:

The size of the area where points are created is not manageable, Points are created anywhere on the plane. Selection value it not processed the same way, it seems the node just checks the value is positive to create nodes at any location, else no nodes are created.

As points are distributed irrespective of the distance from the empty, moving the empty doesn't move the points.

Can someone explain what changed since the tutorial was recorded, and what is the new solution to create point around another object location?

You can distribute points on the mesh then use a translate instances node and multiply a noise by the normal of the object you distributed it on. This will randomly offset the points or instances around the object.


text:
How can color and alpha channels differ in the Image Editor?
I'm rendering with composition, my goal is to isolate an object, its shadow, its reflection and the background in order to be able to adjust the background image/color, and the intensity of the shadow and the reflection independently.
The final result with Cycles ("Render Result --> Composite") is as on the left side:

When looking at the alpha channel (bottom) I see it's 0 for the reflection area, which seems incorrect. If the image is saved and reloaded (right side) pixels with alpha = 0 are gone.
The compositing network which may not be optimized as I'm learning how it works:

I don't understand how the composited image can have an alpha layer not matching what is displayed, and I don't know how to save an image which has the correct reflection area.

Since that you've set Alpha to 0, why are you asking that image has become transparent?
The alpha in PNG is Straight, in Blender - Premultiplied so that you have to set up some alpha to get saved in PNGs, for example like this:

Then you load the image, you will notice some difference:

But it will be equal if you convert alpha:

They appear transparent, because alpha is 0. Png doesn't keep color information in this case in purpose of file compression though


text:
Rotating in the 3D-View using a linear mouse pointer displacement?
To apply some rotation to an object or an element, the usual method is to turn around the rotation center:

This means one have to look at the current position of the mouse cursor in order to know if the mouse must be moved up, down, left or right. My personal feeling is this is not easy to use:

The distance of the pointer from the center controls the increment/decrement, it is difficult to maintain the same rate.
When using "Continuous grab" (default) and the pointer has wrapped around the screen, the direction to use becomes unclear.

Is there an option to use a linear displacement to control the amount of rotation, e.g. move up to increase rotation, move down to decrease rotation?
I'm not asking how to use numeric input (mentioned in How can I rotate something without having to roll the mouse around the screen?) or the transformation manipulator ("gizmo").


text:
How do I extrude faces along their actual normals?
Using 3.1, I'm trying to extrude 2 faces forming a small angle along their individual normals. I use Face --> Extrude Individual Faces which shows a tooltip: "Extrude each individual face separately along local normals":

However the normals are not used (and I don't see where the axis used for each face does come from). I tried to use the same command with only one face selected, the result is the same for this face. What is the problem?
In case this is relevant, the pivot point is set to Median Point.

In Object mode, try to apply the scale?

@moonboots: This works. Thanks. Seem to me this is a bug, a normal is a normal whatever the scale...?

you mean it should not take the scale into account for this kind of operation? In my opinion it makes sense as it's not the 1:1 scale

In v 3.2a, you can do this without apply scale.

@moonboots: Yes, the new face should be centered on the normal, which is invariant with the scale. Computing the axis in 1:1 scale is not consistent. Else the size of the new face should be the 1:1 size too.

it does extrude along the normals except the object is scaled so the extrusion appears squashed

In Object mode, apply the scale with CtrlA

I'm adding this as an explanation of how extrusion is done with a scaled object.
There is an inconstancy between the face normal displayed by the normal gizmo and the face normal used by the tool extruding along the normal. There are two normals for Blender.

From left to right:

The scaled object
Blender uses 1:1 scale to determine the face normal. As the object is not scaled with the same factor for X, Y and Z, the normal is different from the normal gizmo normal.
Blender extrudes the face.
Blender resets the object actual scale. So the face size matches with the actual scale, but the extrusion axis is not coincident with the current face normal.


text:
What does prevent the camera object to show up in a 3D viewport?
For Blender 3.1.
With a fresh new project with the default configuration and switching to the Animation workspace, two 3D viewports are shown: What is viewed from the local camera (with its passe-partout) and what is viewed from the scene camera:

Default Animation workspace
If the local camera viewport is changed into a scene camera viewport, e.g. by pressing Numpad 0, the camera object is invisible (left below), contrary to the other viewport:

Camera visibility is different between viewports
The missing overlays can be recovered using related the Show Overlays listbox but where is the setting used to configure the view to not show the camera?
What I checked:

Camera visibility (eye) is checked in the Outliner list.
Show in viewports in the camera properties is checked and Viewport Display is set to Textured.
Camera visibility is checked in View Object Types selector for the viewport.
Show Gizmo switch in the viewport has no influence on the camera visibility.

But obviously this is not enough and there another setting hidden somewhere. Someone knows?

These questions are related to an object visibility problem, but apparently not applicable:

My camera turned invisible (N panel setting, not present in 3.1)
My camera object is invisible in viewport, and tools don't work for it (camera type hidden).
A camera representation is missing from my scene. How can I see it? (camera hidden using h).
Camera not in Outliner or in 3d view (camera deleted).
Objects disappearing in viewport but visible in outliner (local view and other suggestions not applicable).
Objects Not Showing in Other Workspace Viewports, Only Default (local view).
Objects not appearing in Blender in 3d viewport (wrong layer).

And finally a list of 26 possible reasons:

Why does my object not show up? (these applicable to a camera: Object hidden, clipping distance, scene layer, local view, Cycles filter, camera disabled, wrong scene, ray visibility).

I think that the "viewport camera" is looking at the scene from a position where the camera object is not visible.  If you select all and hit numpad-period to frame everything the camera should show up -- or just select the camera to frame it.

I think you are looking for the "Extras" of the Viewport Overlays here:

Invaluable knowledge. Finally a 27th reason to know for an object not showing up.


text:
How to recover texture paths when opening autosaved files?
As Blender kept crashing on a project, I had to restart from autosaved files several times, a real hassle. Frankly I don't understand how they are supposed to work with attached textures. My preferences are:

File Paths | Data | Temporary files: Not set
File Paths | Data | Textures path: //
Save & Load | Blend Files | Default to: Relative paths

Autosaved files are stored in my case in [user]\AppData\Local\Temp. I first move this file to the original folder in order to allow relative paths to work, then open it. The World HDRI image should be found but Blender makes everything pink and logs:
Read blend: [user]\Desktop\Blender Projects\Blender Day 3_autosaved_copy.blend
GPUTexture: Blender Texture Not Loaded!

Output of File | External Data | Report Missing Files:
Warning: Path '[user]\AppData\Local\Temp\Textures\HDRI\hamburg_hbf_2k.hdr' not found

The original HDRI path is:
[user]\Desktop\Blender Projects\Textures\HDRI\hamburg_hbf_2k.hdr

But by some mysterious mechanism, it was changed to:
[user]\AppData\Local\Temp\Textures\HDRI\hamburg_hbf_2k.hdr

My question are:

How to prevent such unexpected redirection
How to fix a corrupted file in a single step, regardless of the number of resources affected by this redirection?

To reproduce this case: Set an HDRI image for World material, wait the necessary time for Autosave to be triggered (varies according to preferences), reload the autosaved file.

Don't open these files using open dialog or directly from file browser, use a special tool in blender for recovering files:

Open up Blender

Go to File → Recover → Auto save... and open the file here. This will open the recovered file, keeping all links alive.

Then the file is loaded, and it seems everything is ok, and you see (Recovered) in the title bar, save file:

Ctrl+S this will save file to original location, and (Recovered) indicator will be removed

Double check. I haven't faced problem with that either on Linux or Windows.

Loading the recovered file, same pink color and same missing path Warning: Path 'C:\Users\Ben\AppData\Local\Temp\Textures\HDRI\hamburg_hbf_2k.hdr' not found

Maybe this recover is from an already broken file... Try different one.

With a fresh file it works. What I see is the path in the Windows title bar is set to the original folder, while when not working it is set to the temporary folder. Strange.

I'm pretty sure that you have already mess up these files, so some mistakes may happen... But if you get used to my suggestion, it will work every time in the future.

You must be right. Probably I opened the file from the temp folder (hence breaking relative paths), then it was autosaved under the same name, then I opened this last file with Recover Auto Save.


text:
Process meshes that have multiple users only once in script
I would like to subdivide all edges of the selected objects. This is what I've done so far:
def execute(self, context):
    theScene = bpy.context.scene

    # Store selected objects
    theSelected = bpy.context.selected_objects
    theObjects = set([obj for obj in theSelected if obj.type == 'MESH'])

    # Iterate over selected objects
    for obj in theObjects:
        # Set this object as active
        theScene.objects.active = obj

        # Select all edges in edit mode
        bpy.ops.object.mode_set(mode='EDIT')
        bpy.ops.mesh.select_mode(type='EDGE')
        bpy.ops.mesh.select_all(action = 'SELECT')

        # Subdivide
        bpy.ops.mesh.subdivide()

    return {'FINISHED'}

How to adjust this operator to process meshes only once when they are used in multiple objects?

You could use an array to check if a mesh has been already modified.
theScene = bpy.context.scene

# Store selected objects
theSelected = bpy.context.selected_objects
theObjects = set([obj for obj in theSelected if obj.type == 'MESH'])

#all the meshes here:
meshes = []

# Iterate over selected objects
for obj in theObjects:
    # Set this object as active
    theScene.objects.active = obj
    mesh = obj.data

    # Do something if the mesh isn't in the array yet
    if (not mesh in meshes):
        meshes.append(mesh)

        # Select all edges in edit mode
        bpy.ops.object.mode_set(mode='EDIT')
        bpy.ops.mesh.select_mode(type='EDGE')
        bpy.ops.mesh.select_all(action = 'SELECT')

        print(meshes)

        # Subdivide
        bpy.ops.mesh.subdivide()

        # Toggle Object Mode to select next object
        bpy.ops.object.mode_set(mode='OBJECT')

That's a good method, thanks. I see that you reset the mode to OBJECT before the next iteration, is this mandatory?

Honestly I don't know. I've added it just because I've got an error while running the script :)

I think names are unique for each data type in a scene, so use those. Either that set should be a dict with names of meshes as keys, or collect the names of processed meshes into a separate set and process only if the name is not in that set. You get the mesh name from obj.data.name.

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


text:
Geometry tree: Trying to fully understand how to create and use custom attributes (fields)
Version 3.1.
Setup
I'm trying to follow different tutorials where objects of random colors are placed at the vertices of another object. According to this tutorial, this can (must?) be done this way:

Create instances of the object to be placed at the vertices.
Embed a custom color value in the geometry data, so it can be read by the shader when rendering the instance.
Use a Capture Attribute node to inject the attribute value on instances.
For some reason the attribute added to the instance will be lost prior to be read by the shader (explanations found are not very clear), so instances must be realized into simple geometry.

This tree just does that:

Now this is not the end of the story, the Capture Attribute node is indeed set to add the value to each instance (as highlighted in green above), but as instances will be removed and converted into simple geometry, the values has to be attached to some other geometry entity. A point which wasn't clearly explained in the documentation/tutorials I used. After some (painful) experimentation, I now assume the element to be used for attaching the value is defined partly in the Group Output node and partly in the Geometry Nodes modifier. E.g. this setup will add the color to vertices (points):

with the name InstanceColor:

(CubeColor, the name of the socket is not used). And looking at the spreadsheet view, the value is actually found at the right place:

To reuse the attribute value in the material/shader, the right name has to be used (another point which was missing in the documentation/tutorials I used):

Questions
This quite long introduction to explain what is my limited knowledge of geometry nodes and attributes and this is still confused. Could someone help in explaining:

The reason the Capture Attribute node has to be connected to the socket of the Group Output. After all values are injected into the instances, using the Geometry, so why using the socket.

The reason the name to be used to store the attribute in the instances is defined in the modifier parameters rather than in the Capture Attribute node. The node is already used to define the element where to store the value (Point, Instance, etc)

The reason there are two default values for the attribute, what is the use of the one found in the side panel, it seems unused.

The reason instances must be realized.

You may be interested in the Blender Studio tutorial Geometry nodes from Scratch. It explains attributes in detail, including custom attributes.

@MartyFouts: "You may be interested in the Blender Studio tutorial" --> Blender Studio has T&Cs which are disproportionate to the occasional tutorial watcher: "You will indemnify, defend, and hold harmless the Blender Studio and its affiliates, directors, officers, employees, and agents, from and against all third party actions that: arise from your activities on the Blender Studio Service". I'm not Mr Musk. A no go, I don't encourage such sites.

That is a boiler plate phrase you will find in Stack Exchange's TOS as well.  You pretty much can't use the net if you avoid that clause.

@MartyFouts, The difference is SE content can be read without accepting/subscribing. Blender is repeating NaN mistake by writing a poor documentation and forcing subscriptions for tutorials: In the 90s Blender was free, but the documentation was sold by NaN, only extracts were freely available. I supported NaN at that time by buying the documentation, money was actually wasted according this summary).

No that's not a difference.  You can read the free content on Studio without subscribing, just like SE.  Your legal liability in that case is exactly the same as reading SE.  You cannot post questions on stack exchange without creating an account and accepting the TOS. Your legal liability in that case is exactly the same as Blender Cloud.  You've accepted the same TOS here that you reject there.

@MartyFouts: "You can read the free content on Studio without subscribing, just like SE", The tutorial you linked is not free (except a 8-minute introduction).

The reason the Capture Attribute node has to be connected to the socket of the Group Output. After all values are injected into the instances, using the geometry, so why using the socket.

There are no reasons ;-) But in your example you have random color per instance. If you plug in a random node directly into the output node, it makes a random color per domain, not per cube, for example per face:

Of course, if we can store data in instances, it would be looks like that:

But unfortunately, instance domain is not supported in shaders yet (see #4). Without what, we have to use Capture Attribute to make Random Value node generate values per instance.

The reason the name to be used to store the attribute in the instances is defined in the modifier parameters rather than in the Capture Attribute node. The node is already used to define the element where to store the value (Point, Instance, etc)

It was designed for reusing nodes. You have the same node setup, but different objects with different attribute names.
But! In 3.2 you may save attributes in GN directly like this:

The reason there are two default values for the attribute, what is the use of the one found in the side panel, it seems unused.

Well, it is used. Then you add a new Group Output node, you will see that it will have the default value.

The reason instances must be realized.

Because instance domain is not supported in shader nodes yet Blender wiki:

Instance domain attributes are only supported in Geometry Nodes

Without that we are limited to convert instances to the real geometry, which Realize Instances does


text:
Compound paths invisible while imported in Blender

I'm doing a logotype for a friend and I wanted to print it in 3D but unfortunately my svg (created in illustrator) doesn't show some of my compound paths in Blender and I can't figure why.

Can you upload the SVG file?

the problem is with compound path, try to remove compound path, and make the hole/space real path


text:
How to create crystals on a sea bed like this?
I am creating a layer of crystals on a sea bed in Blender 3.5.
To create crystals on the sea bed, did the following steps:

Created multiple particle systems (4 particle system) on the same plane. Used hair setting.
For each particle system, used different objects as instance.
In weight mode, created different spread for each particle system
Material – Used Color Ramp with Glassy BSDF to to give crystal look.
Render Engine - Cycles

Requirement

From top the layer should look like stars with different coloured emissions spread on a sea bed, and as we move closer, emission stays but crystals start appearing.

Issues faced

Unable to get glow and starry effect on the particles. Tried composting, but didn't get the effect with that also.
Crystals (particles) at some places are looking very clustered and shape is distorted.

Material Used Screenshot (Same material nodes have been used on all crystal)
Project
I am creating a layer of crystals on a sea bed in Blender 3.5.
The sea bed would have sand particles and crystals spread on it.
To create crystals on the sea bed, did the following steps:

Created multiple particle systems (4 particle system) on the same plane. Used hair setting.
For each particle system, used different objects as instance.
In weight mode, created different spread for each particle system
4.Material – Used Color Ramp with Glassy BSDF to to give crystal look.
Render Engine - Cycles

Requirement

From top the layer should look like stars with different coloured emissions spread on a sea bed, and as we move closer, emission stays but crystals start appearing.
Sand bed has to be created

Issues faced

Unable to get glow and starry effect on the particles. Tried composting, but didn't get the effect with that also.
Crystals (particles) at some places are looking very clustered and shape is distorted.
Sand bed : How to add sand particles with different golden or other shades in different areas. Help here also will be appreciated.

Attachments

Material Used Screenshot (Same material nodes have been used on all crystal)

Render Image ( Please ignore the background -HDRI image use to get right colors for a sea bed)

Ref Image for the cystals ( though not exact but something similar)

Blender 3.5 File - Unable to find how to attach blender file here directly

https://blend-exchange.com ... copy paste given code via edit into your question.

In these days people use geometry nodes (instead of particle system) ... so here is one quick ...

Material – Sand with some random instances set to emit light

Material - Gems ...

Simple composite with Glare node ...


text:
Skin modifier not same size on all points
I'm using the skin modifier to make a model but when I press Ctrl +  A to scale it down it disappears on some points.
How can I fix this?

Try recalculate normals. Or maybe share the file so we can take a better look.

Thanks actually i already solved this, there was a duplicate of the point in the same location


text:
How to switch all lights on/off at once in Cycles?
In cycles, lights intensity can be modulated by varying their Color values.

Is there a way to do this for multiple lights at once without using individual keyframes (keying a single object is ok). My need is only to have two states (black, white) if this is more simple to obtain.

You could just use instances. (Copying with Alt + D)
Or, after the fact, assign the same Data Block to every light here:

Alternative with Drivers:
Add a driver like this to the Strength of every lamp. That way you can maintain more control over individual lamps.

This uses the zLocation of an Empty and multiplies it with the Strength. You would simply use the same Empty for all Lamps. That way you can control them all at once.
Update for Color
Here's an example to control the color in a similar way.
This is the node setup for the Lamp.

Then add the following drivers accordingly.

This is relatively intuitive to use.

Cool! Glad to hear! Mark as answered, if this is the solution you needed.

Note the question was for Cycles lamps which have no Strength attribute, but the principle is an interesting one. Perhaps you could update the example for the Color attribute.

Ah, you deleted your first comment. ... - The Lamp doesn't, but the Lamp Material, of course. I updated the answer to add the example for the Color. But it is basically the exact same principle.

Thanks for additional details (I didn't mean changing the color, but was asking for how was the color node changed so that the intensity of the lamp could be changed -- you actually provided the details too, great). In the meantime I learned about drivers, and see the source value for the driver could also be a custom property of one of the lamps (instead of the empty location).


text:
Extruding along normals actually extrudes laterally
Using 3.1.
Trying to extrude hole borders along normals to give them some depth. While the object is a deformed plane obtained applying a Shrinkwrap modifier, vertex normals seems correct:

However extrusion with extrude along normals is done laterally, in the plane, similar to scaling in plane (extruding holes individually gives the same result):

I'm sure I've forgotten to set something, but I can't see what...
(this is part of a tutorial, at 44:39)

Ok I've looked at the moment in video to understand that is wrong.
From the hotkeys you can see that he pressed G because extruding worked like you show.

So he used extrude to make a new ring of edges, and then moved it using the regular grab tool.

You are right on the tutorial (and in that case there is no need to use 'along normals', as a simple extrude will be enough). I'm surprised, extruding along normals should follow normals, the documentation is very poor (Extrusion and offset will be locked in to only move along the local normals of the selected mesh). See also Extrude and Move on Normals does not move vertices or edges on normals. Now if this is not the correct tool to use for the purpose of extruding along the normals, do you know how can this be done?

Along normal is Alt+S, this works strange with edges... Probably a face  only tool

Mesh>Transform>Shrink/Fatten (Alt-S) doesn't extrude but moves vertices along normals, that's a good help, Extrude followed by this tool should do an actual extrusion along normals. Well (after checking) actually it doesn't as vertex normals are again equal to vertex positions, as mentioned in the bug report I linked earlier. The result is a scaling operation about the object origin. I give up!


text:
Denoising the frames of an animation
I would like to use the new denoise node in Blender 2.81 to denoise an animation. I understand how to denoise (in compositing) individual frames but I do not know how to run the denoiser for all frames of the animation. Maybe this is a related question:
Denoising Animations
but I still do not understand how to denoise all the frames of animation. Thank you very much for your time.

As long as the denoiser in inserted in compositor between render layer and composite node, and "compositing" is checked in post processing tab (as default), every frame of the animation will be automatically processed.


text:
Blender 2.81a is slow on Macbook pro when selecting items from the Properties window
I recently got a new MacBook Pro so I have more free space on my computer's memory than ever before and yet my properties window still makes blender run slowly. My Macbook pro is a new model so it's graphics card should work fine. Is it possible a setting I changed in blender could be causing the problem?

Can you please elaborate what exact steps you're performing in Blender?

Thank you for responding. I have an object in my scene that I'm using a bevel modifier on and when I try to manually change its properties in the properties window it doesn't update for 2 minutes it doesn't even show the inputted value until it's finished processing.

Sounds like you're setting very high values for the number of segments or you have other modifiers like subsurface already on the mesh causing a high complexity.

I see so would setting it for 100 segments be overkill?

Yes, definitely. Such high numbers shouldn't be necessary at all. Have you enabled smooth shading?

Ok got it thanks for the help I'll try to avoid overdoing it with beveling from now on

Also, I probably could enable smooth shading to limit my need for the bevel thank you for the suggestion

Got it thanks so much


text:
Blender Version Transition Issue
I do have a question. When upgrading from 2.79 to 2.80, i receive an error saying that I need to update my old version of [Open-G.L] will not work and needed a [Open-G.l] 3.3 or higher which i don't have, any help to keep the old version in blender will be of help, i do want to try out the sculpting mode in 2.80?

What GPU do you have? And what OS?

Please check if your hardware fulfills the minimum requirements for Blender 2.8x. If your GPU is supported, try to update your graphics driver.


text:
Problem with planes intersecting in veiwport
Using Cycles in Material Preview mode and planes that intersect each other display oddly - one plane displays fully and ignores the fact part of the other plane should be showing. Better explained in the image below.

How do I get them to act how they do in Solid view where they appear how I would expect them to:

Couldn't find an existing question for this, expect it's something obvious I'm missing.

This looks like an "alpha clipping"  issue.
Your planes look like they have an image texture applied to them. If this is correct and the image has an alpha channel (for transparency) then try setting the Material Properties > Viewport Display > Blend mode to Opaque.
Example Plane textured with an Image with an Alpha channel:

Or even better Open the image in Gimp or Photoshop and remove the Alpha Channel ( Gimp : Layer > Transparency > Remove Alpha Channel
Edit to add a couple more screenshots after Hienronymous's comment.
The Show Backface option is not available when Blend Mode is set to Opaque but there when Blend Mode is set to the default Alpha Blend
Which (probably) makes sense since the two seem to preform similar functions.
The Blend Mode  Opaque "Renders surface without transparency" and with Show Backface deselected "avoids transparency sorting problems".

Typically found the answer after an hour of fiddling.
Under the Materials tab scroll down to Settings and uncheck "Show Backface".

In Blender 2.81 I don't see the Material tab > Settings > "Show Backface" option. Do you mean "Backface Culling" ? Didn't look like a Backface Culling issue. Typically with Backface Culling enabled the back face becomes completely invisible which is not the case in your first image. Just curious and Welcome to the Blender Stack Exchange forums :)

Thanks for the warm welcome! It seems "Show Backface" doesn't appear by default on most materials, but when Importing Images as planes the option shows in the material settings.

Thanks, We learn a little more every day   :).  I edited my answer to try to illustrate your comment.


text:
Hiding transform panel from 3D view properties 'UI' Panel from user?
Almost everything is in the question. I've been browsing the web for a while and couldn't find out a way to hide or at least disable the Properties Transform Panel of the 'View_3D' area. Is there a way to redraw (override the draw) entirely this Panel, by the way? I need the user to be unable to transform the objects otherwise, but by using my custom tools. I've been able to remove every other Panel but this one. Any brilliant idea?
Also, is there a way to simply remove this whole area (and replace it by a new fresh one), or even better redraw completely the area?

Do you still need an answer?

Absolutely, I finally left this panel accessible, and spend my time to develop my application. But in the end, I'll need do it. So I'll be very thankful if you can help with this. Thanks.

do you want to draw is somewhere else?

Perhaps this helps : https://blenderartists.org/t/removing-an-existing-panel/693294/3

I use this to draw it in the tool shelve
class ObjectTransformation(bpy.types.Panel):
    bl_label = "Transformation"
    bl_idname = "Transformation"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'TOOLS'
    bl_category = "Modeling Toolbox"

    def draw(self, context):
        layout = self.layout
        obj = context.object
        row = layout.row()
        row.column().prop(obj, "location")
        row.column().prop(obj, "rotation_euler", text="Rotation")
        row.column().prop(obj, "scale")
        row = layout.row()
        #Calls the CTRL A menu
        #row.operator("wm.call_menu", text="Apply Tans").name="VIEW3D_MT_object_apply"
        row.operator("object.transform_apply", text="Apply Rot").rotation=True
        row.operator("object.transform_apply", text="Apply Scale").scale=True
        row = layout.row()
        row.column().prop(obj, "dimensions")

OK, thanks for sharing. I might be missing something, but drawing another Transform Panel in the Toolshelves region, won't make it disappear from the Properties region. I don't really see what part of my question you are answering here. I think we misunderstood each other, or my question was unclear, but my point was: How do I hide the default Transform Panel?

To my understanding the trans tap in properties panel is hard coded and not scripted. I looked into space_view3d.py and did not see it being mentioned.

Yep. As far as I have been digging there was no other way than changing (a few) things in a couple of C files and recompile Blender. But I was hopping some pythonic trick could help with overriding/redrawing the content of the whole Property region. Thanks anyway. Cheers.

I also looked at space_view3d.py and didn't find anything about transforms. However, for the future, if you want to remove a panel, you just need to unregister the class it's associated with. For example, Name Panel addon replaces the default name panel in properties region, then registers its own panel. You can see that code here: https://github.com/trentinfrederick/name-panel/blob/master/init.py#L121 - Transform and View panels are the only ones I can't find info for, so they likely link to much deeper data in blender.

@Gauthier Boaglio, would you mind to share what C files you have changed? I'm at the same problem at the moment.

Have it. It's the class view3d_panel_transform in the view3d_buttons.c File. Line 1137 bis 1172. Plus line 1182. pt->draw = view3d_panel_transform; . And there are of course some more classes called from the class view3d_panel_transform class. Which you might want to delete too.
But it's enough to turn off the class view3d_panel_transform to hide the panel from the Properties sidebar. This class can by the way not be accessed by Python. And so not be unregistered. Original comment from the c file:  /* XXX C panels not  available through RNA (bpy.types)! */


text:
Fluid gas simulation only showing in Object view, not Rendered view or in final renders [Cycles]
I have a scene with a straightforward fluid setup that seemingly works fine until rendering. After baking the sim I can see that the sim looks normal in Wireframe and Object view:

However it doesn't appear at all in rendered views:

I've used 2 versions of Blender (3.5.1 and 3.4.1), used a variety of materials (emission and Principled volume) for the domain, tweaked the lighting, tweaked the Domain parameters, switched to Eevee, messed around with scaling, baked and rebaked, and nothing has changed. I can only think there must be some basic render setting I'm overlooking (but yes, everything is enabled in renders).
No idea what steps to take next, getting a little loopy. Any help or ideas would be much appreciated. Test file with the issue here https://we.tl/t-GcmHWmBwkC

First of all, I do not know what exactly you did, because in the Shader Editor the Material Output node has a red border which indicates some kind of error, but it goes away after I click it. I'm no developer so I'm not going to investigate this. Probably it's just because the file is from a different version than my Blender.
In your file the Emission node is plugged into the Surface socket of the Material Output node. The smoke simulation produces volumetric data. You have to plug it into the Volume output.
But directly plugging the Emission in the Volume output does not work that well either because it needs some information about where the smoke is. To provide that information you can add a Volume Info node and plug the Density output into the Strength of the Emission. Or you simply use a Principled Volume node to make the smoke appear in render.

Amazing. Thank you very much Gordon, that makes perfect sense now!


text:
How to get rid of the jitter of softbofy rubber band
I am currently trying to get a basic slingshot to work.
It consists of two simple poles and a softbody hooked in between as rubberband. It works so far.
But I cannot get it properly animated.
I just tried to use a basic collision object (which I had planned to make invisible later) to use it as a drag item. Strangely the rubber band acts as if the drag object was magnetic and gets pulled towards it. Additonally it gets crumbled very weird (jittering) during drag phase. I tried several settings in the softbody settings, but could not get it done properly.
I posted the same at blender artists where I could add the blend file.
BlenderArtists
Does anybody have an idea?
Alternatively, is there maybe a better solution to do this.
Thanks in advance

This might help - https://blender.stackexchange.com/questions/131773/is-there-a-better-way-to-make-paths-working-on-a-string-for-longbow/132733#132733

Thanks. Unfortunately the sligshot is much more comlex. The bow, returns more or less to its default position, when released. The slingshot is switching sides one or more times and the rubber part is dangling and moving around, when not in use, but beeing moved around. I do not know if I can animate this manually. Therefore I was trying to do it with a soft body-

Thst looks great, thank. Any additional data would be very welcome

Wow, great. Thanks

Slingshot - (Note, this was done in vers 2.77a.  It should work in 2.81)
See Blend file below

The difference between this and the longbow -
Is there a better way to make paths? Working on a string for longbow
... is the way the rubber is anchored to the yoke (Y piece) and the projectile holder/pouch.
The rubbers are made up of two straight curves instead of just the one to give it a sharper angle at the apex/stone holder but as it turns out, one piece (curve) would probably do it. (See layer 6)
3 hooks are added to control the rubbers' shape & stretch.  One at each of the yoke ends and the 3rd shared between the two ends that come together at the apex. (projectile end)
The hooks at the yoke are parented to it and this effectively anchors the rubbers' ends to the yoke.
Similarly, the shared hook at the apex, anchors both rubbers together.  When the hook is drawn back the rubbers' apex is drawn back with it.
When it's 'released' (animated)  it's this hook that's animated to emulate the retraction and the subsequent launch action, plus the oscillations that follow.
A circle "Nav Empty" is what 'bolts' (parents) the whole thing together and localises the hooks and separate parts.  The Nav-Empty can be angled, rotated and moved about the scene and everything will come with it, including the projectile. ( before it's launched)
The stone or projectile uses a 'Child-of' constraint, the parent being the holder or pouch.  This will force the stone to follow the pouch and rubbers as they retract to the most forward location, whereupon  the constraint's influence is switched to zero between two adjacent frames.  This frees up the projectile, allowing it to be animated freely along it's trajectory.
Physics was experimented with here but it introduced complications that frankly, cancelled out any perceived advantage.
The projectile holder or pouch is another (separate) bevelled curve that's expanded to be larger than the rubber and that's also parented to the rubber's apex hook.  A thinned down cube shaped as a piece of leather would look better.
The holder is forced to follow the apex hook but after the launch frame, some rotoscoping (frame by frame alignment and keyframing, using it's own hooks) was deemed the best way to keep it aligned.  There's only a few frames involved.
-=================-
Info -
An interesting observation here is that once a curve's intermediate or inner control points are removed so there are only two remaining, one at each end, then replaced, they lose the ability to curve gently or biologically as before.  Deforming their shape after that, ends up with 'vectored curves' that are much sharper.
This proves ideal for anchoring the rubbers to the yokes.  A control point at the yoke end and inside the yoke's mesh, plus one just outside, provides a solid anchor for the rubbers.
Both rubbers were therefore stripped of their inner or intermediate control points.
The single segment remaining within each is subdivided once so we end up with 3 control points in each rubber, one at each end, and one that can be slid along their length near the yoke end. This acts as a corner guide which is animated to ensure the rubbers don't penetrate the yoke, but sit snugly at the surface at the yoke's corner edges.  This is particularly useful when oscillating the apex hook after the launch.

I've no idea of your experience so if you have further queries, just ask here.

Fantastic, thank you very much.

I will look into it on the weekend.


text:
Bone properties Tab does not get updated
When I select a bone in Edit Mode, the Bone Properties tab does not get updated.
It shows always the details of a default bone. For example the bone I had selected last in Pose Mode, before switching back to Edit Mode.
I am using Blender 2.8 (Windows)
Is this a Bug, or did I something wrong (some strange settings)
Additionally, I cannot select a bone in Edit Mode by simply clicking on it (as it works in Pose Mode) I have to select it completely by the Circle Selector.
Can somebody help me out

I reverted already to Factory Properties and tried Linux version. No improvement

I had the same problem in 2.9. Realized I had accidentally hit W and switched to the circle select tool which made it so I could highlight new bones but the properties tab stayed on the originally selected bone.  Switched back to box select and then I could select as normal. Hope that helps

or hit w again to toggle off.

Make sure you didn't Pin your Properties Editor:


text:
How to make Edge Glow?
I am doing a zooming in and out animation for symbols.
And it suppose to have an edge glow, like in the example photo.

Is it possible to achieve without volumetric lighting because the lighting of the symbol should not be affected. I also get a grainy effect for some reason and I want the background to be completely black.
p.s. The symbol is floating in the air and has no objects around it, so emission on the sides wont be visible.

You can use a blur node in the compositor.

This is possibly easier to achieve in post production through the compositor.
You probably don't even need Cycles or "formal rendering" for somethning this simple. You can use the *OpenGL Render active viewport" or animation at the bottom of the 3D view.
Then add the glow effect and colors as desired in the compositor. You can use a Filter > Blur or a Filter > Glow node for this.


text:
How to fill all holes with shrinkwrap function?
I'm working for an architecture firm trying to clean up our Revit model and 3D print it.  I looked through the 3D checklist and tried to clean up the model but every time I "Make Manifold" blender deletes walls.
My friend uses Materialise Magics software which has this function called Shrinkwrap.  Essentially it covers the entire model with this blanket (which you can adjust to become more refined to show more detail) and plugs all holes.  Then he thickens the model and prints it.
Do you think blender has a similar feature? I know blender has the shrinkwrap tool but after messing around with it, it hasn't fixed the holes or thickness issues I am having.
Thank you in advance.

I would try to use fill the hole and then try to remesh it, voxel remesh or something like that to get rid of the non-manifold geometry

You could use the remesh modifier with a high enough octree depth and then use the sculpting  smooth tool if you notice an unwanted surface structure. The holes will be closed this way but I don't know if this is the most elegant and clean way to do this.


text:
How to bake multiple sounds to f-curve to the same object
So im animating a characters mouth using shapekeys and baking them to an audio clip. I want to add three different audio clips to the same character's mouth using bake sound to f curve. But, when i try baking the second audio clip, it replaces the previous audio clip.
My question is, how do I add multiple audio clips to same object using bake sound to f-curve. (I don't want to use armatures)
I've heard that you can use the NLA editor in order to then push the action from the action editor or something... I have no idea how that works, can you help me?
Thanks in advance!

Pushing Down (or Stashing) to the NLA

Bake your fcurve as you've done.

Give the action a meaningful name, I've switched to dope sheet shape key editor mode to do this. Can push down / stash / rename directly from the NLA editor too.
Hit the push down button
Switch to the NLA editor and move your strip where you wish to play in the timeline.

Consult the docs re the difference between push down and stash, and other info re using the NLA Editor.

Repeat.  Notice in image above I have already done this once.. with the previous bake "MyAction.001".

Custom Properties and drivers.
How to bake multiple audio sounds to f curve?
A suggestion is add a speaker, parent it such that it sticks out the mouth. When a speaker has a sound loaded it is loaded as an audio strip in the NLA. It never has the correct length. Match it to the length of your sound bake for that sound.

SoundAction is a baked sound on a custom property on a speaker.
NLAStrip (in aqua) is the sound the speaker plays resized to match.
I used this concept for the now defunct sound drivers addon. https://blender.stackexchange.com/a/39241/15543
No armatures have been used in this answer


text:
Problem rendering animation with Eevee blender 2.8
I recently rendered an animation of a car driving on a road. I haven't had any problems before but with this animation it flickers, specially the car and the trees. I Rendered with Eevee.
If you guys know any solutions please help.
Take a look at the animation here:
Car Driving Animation Youtube

Hey, question: If you select your camera, what are the values at "Clip start" and "End"?

Try using Cycles engine.

@DarkSoul Turns out the Clip Start was very low. I played with the Clip Start and End and the result is much better! Thanks!


text:
Blender 2.8 vertices of object doesn't update after location change in python
I import a .fbx object and move the location. Then I try to print the local coordinates of the object. Regardless of where I move it, it prints the same local coordinates leading to me believe that the mesh vertices are not being updated. The snippet is attached below.
bpy.ops.import_scene.fbx( filepath = "sample.fbx" )
myObj  = bpy.data.objects['testObj']
print (myObj.data.vertices[0].co)
myObj.location = mathutils.Vector((1,3,5))
print (myObj.data.vertices[0].co)

This prints the same values both times. How do I update it? I would appreciate an answer for Blender 2.8

For 2.7x and before, but related https://blender.stackexchange.com/questions/94034/i-dont-know-what-is-wrong-with-my-python-script  Vertex coordinates are in local space.  Can move a mesh object anywhere in the scene by setting the objects transform (translation, rotation, scale) without altering the vertex coordinates.  This is a fundamental of 3d maths eg one default  cube has local coordinates existing of the 8 combinations of +/- 1 (-1, -1, -1) , (-1, -1, 1) ...  (1, 1, 1) that remain unchanged no matter how it is transformed.  As shown in the answer below object transform is used to

place local objects into our global space.   Put another way object transforms don't change the local data.  If you wish to transorm the data not the object use myObj.data.transform(Matrix.Translation((1, 3, 5))) to translate all local coordinates by (1, 3, 5)

I now understand local coordinates. So if want to change my location of the object and get the global coordinates of the vertices, I should use Matrix.Translation to move it and then pre-multiply with matrix_world ? I cannot get the global coordinates of the vertices by setting the myObj.location?

For the scene global coordinate system, multiply by the object's world matrix:
myObj  = bpy.data.objects['testObj']
print (myObj.data.vertices[0].co)
myObj.location = mathutils.Vector((1,3,5))
print (myObj.matrix_world @ myObj.data.vertices[0].co) # <----

This code is to be run in blender 2.9 It explain how to get or convert local coordinates of a vertex to global coordinates.
#############################################################
# imports :
import bpy
from mathutils import Vector

#############################################################
# Add a Cube and Get the initial local coordinates of vertex id 0,
# Get the initial Cube matrix_world,
# Calculate the initial vertex id 0 Global Coordinates :

bpy.ops.mesh.primitive_cube_add()
Cube  = bpy.context.object
Mw = Cube.matrix_world
Vert0_Lco = Cube.data.vertices[0].co
Vert0_Gco = Mw @ Vert0_Lco

print (f"Vert 0 initial Local coordinates :\n{Vert0_Lco}") # should be (-1, -1, -1)
print (f"Cube initial Matrix world :\n{Mw}") # should be the identity Matrix
print (f"Vert 0 initial Global coordinates :\n{Vert0_Gco}") # should be (-1, -1, -1) also

#############################################################
# Make a translation vector :
# Translate the cube,
# Get the final Cube matrix_world,
# Calculate the final vertex id 0 Global Coordinates :

Trans_Vector = Vector((1,3,5))

'''Now If you want the Cube matrix_world to be updated after the translation transform dont use<<< Cube.location = Trans_Vector >>>, instead use :'''

Mw.translation += Trans_Vector

print (f"Vert 0 final Local coordinates :\n{Vert0_Lco}")#Should be the same ( (-1, -1, -1) dont change after transform)
print (f"Cube final Matrix world :\n{Mw}") # should change to :
'''
Matrix(((1, 0, 0, 1 )
        (0, 1, 0, 3 )
        (0, 0, 1, 5 )
        (0, 0, 0, 1 )))
'''
print (f"Vert 0 final Global coordinates :\n{Vert0_Gco}") # should change to (0, 2, 4)

Hi thanks for the answer. Code only answers are frowned upon here. What does this code do, what is its purpose and how does it work? Could you add a short explanation of what you did here?


text:
How to present longitude and latitude in Blender?
Trying to export .csv file to open it later in Mapbox but I get an error
Input failed. Latitude and longitude fields not present.
How to anable latitude and longitude in Blender?

You'll have to tell us the data you're starting with, on which lat. and long. are measured

Hi Robin. First of all I have this builiding image created in Blender. And now I'd like to place it on a map . In order to do this I should...? And here is the problem 'to do what' - change it to .csv, .geojson? Have know idea :(


text:
How to import/export geojson file in Bender
Trying to import geojson file containing buildings into Blender. How to do it?

hava you resolve this problem?

Did you figure this out Ramona?


text:
Buffer property changes / shadow properties / restore properties
I'm writing an Add-on which imports high resolution parameterized plant models. I create Panel which presents the configurable parameters.

Because changing the plant model is expensive, I want to buffer or shadow changes to the property and have the user press an "Update" button/operator (not shown). If they don't press the button, I need to revert the changes to the properties. so they are correct the next time the plant is selected.
I've tried creating a temporary set of the same properties, but I keep running into the limitation of the draw() (and poll()) context being prevented from modifying ID properties - so I can't create the copy.
I suspect I'm missing something obvious as this can't be all that uncommon. How can I save off the state of active object property group prior to draw() and restore when no longer active if the user doesn't commit the changes via an update operator?
For example, in the screenshot above, the user might change the Season from Summer to Fall, and then change their mind, deselect the plant, the panel disappears. When they select the plant again, the Season should display Summer, not Fall.

What is working for me now is adding the property group to the object type twice as my_props and my_props_shadow. The UI works with my_props_shadow. A reset operator copies my_props back to my_props_shadow. These seems clunky and I feel like I'm unnecessarily polluting the object namespace - but I haven't found something better yet.


text:
Object “Grouping” - delete children with parent
I'm writing a Blender (2.81) Python Addon which needs to display one mesh in the Viewport (low res) and one for Rendering (high res) (these are plants/trees). I currently create two objects and use the low-res object as the parent of the high-res object. While this is configurable, by default the high-res object is not visible in the viewport and is not selectable. This presents the low-res object to user in the viewport where they can move, rotate, and scale it and have those changes affect the high-res child at render time (and the user doesn't have to think about the high-res object at all).
The challenge I currently have is deleting the parent in the viewport leaves the child in the scene, where I would expect to be able to delete “the tree” by clicking on it in the viewport and pressing X.
Am I thinking about object composition the right way here, or is my brain still stuck in SketchUp land and I need to adjust to think in Blender terms?
Is the Parent/Child mechanism the right approach for this kind of composing?
Should I be using a custom collection to contain the two objects instead? (still can’t delete with X in the 3D viewport).
For example, in the image below the viewport looks like the upper-left by default. It can be configured to show the high-res in the viewport as in the lower-left, but only the low-res is selectable (in wireframe if the high-res is visible). Either way, only the high-res is rendered as in the lower right:

Yes, blender delete object does not remove children.  IMO looks like a job for collections. Present the user with a collection instance (collection has hi and lo res mesh, no parenting).

Thanks for the response @batFINGER. I mocked this up in the UI to experiment. To delete a tree from the scene I would need to identify it in the outliner, most easily done by clicking on the desired tree in the scene, then find the active object in the outliner, right click the containing collection, and select "Delete Hierarchy". That seems pretty cumbersome - especially in a scene with lots of plants. Is that the typical workflow - or have a missed something that makes this easier?

My other concern is that users will attempt to delete the low-res object in the viewport and not realize the high-res object remains (since it isn't visible in the viewport). I think I must still be confused about how people build scenes with multiple complex objects.

Please check out instancing collections. Add both to a collection. Add object > collection instance > choose the collection.   The instanced object contains all objects of the collection and can be deleted in one fell swoop.

That seems to be precisely what I was looking for. Thank you @batFINGER!


text:
Pass data to EnumPropery items callback
I'm struggling to pass a variable to an EnumProperty items callback, resulting in making this variable a global, which I prefer to avoid. I want to be able to access the "plant" from the "model_callback", but I can't reference it as self.plant. I am unclear on the scope I'm running in within the callback.
Simplied example follows. Note that in the real example, the plant variable changes whenever the filepath is updated.
class ImportPlant(bpy.types.Operator, ImportHelper):
    bl_idname = "import_object.plant"
    bl_label = "Import Plant"
    # ...

    plant = ["spring", "summer"]

    def model_id_callback(self, context):
        items = []
        # Results in: AttributeError: 'IMPORT_OBJECT_OT_plant' object has no attribute 'plant'
        for model in self.plant:
            items.append((model, model, ""))
        return items

    model_id: EnumProperty(items=model_id_callback, name="Model")

    # ...

How can I access the plant variable in the model_id_callback without just making it a global?

The plant is a class attribute not an instance attribute, meaning that each object of type ImportPlant references the same plant. Therefore replacing self.plant with ImportPlant.plant should be the solution. (Currently on mobile, hence posted as comment and not as polished answer).

@RobertGützkow ah, I was confused because accessing the properties did work with self.filepath for example. Tested using the class name instead of self and it indeed works. This is slightly better than global :-) and since the ImportHelper is modal, I suspect it is sufficient. Thanks!

To test this further, I made plant a property: plant = property(get_plant, set_plant) and initialized it in init(). I can still refer to self.plant in the other methods of the class (draw, invoke, execute), but EnumProperty callback still reports: AttributeError: 'IMPORT_OBJECT_OT_lbw' object has no attribute 'plant'. Somehow, it feels like the callback is running in a different context.

Using a constructor in operators is a bit tricky, because the lifetime is limited to it's execution. I would have to look at your whole test script to see what's wrong.

The plant is a class attribute and not an instance attribute, meaning that each instance of the class ImportPlant references the same plant. Therefore your script should use ImportPlant.plant instead of self.plant.


text:
Solidify modifier creates uneven edges
I am creating walls for my building, the walls are made out of planes. When I add a solidify modifier to give my walls some thickness, the newly created edges aren't straight near the corners.
Can anyone suggest possible solutions, in order to straighten out the extended edges around the corners
Top view below

Even thickness option should works fine for the goal in the provided example. If you have a particular geometry where the method fails I would suggest to post/upload that.


text:
Glass acting as a lens?
What could be causing my plane with glass shader to act like a lens?
I want normal glass, and already have tried 2 different node setups, but it still acts like a lens.
Render:

Glass node setup 1:

Glass node setup 2:

Any reason you are not using a plain Glass BSDF for a glass material?

you could use the glossy and mix shader with transparent

Unless you are looking for an (unrealistic) material that reflects light according to Fresnel's law like glass does, but does not refract? That would be glossy + transparent. I've never touched those IsXRay nodes, and I don't think you need them.

I'm looking for a node setup that will produce realistic glass, and not act like a lense. Plain Glass BSDF shader doesn't act like a lense which is good but it's not the most realistic way to make glass. I've seen the 2 I've tried being used in realistic scenes, but it's just not working for me.

Which of the node setups is used for the shown render?

@PGmath it doesn't matter since both provide the Exact same result, I've compared the renders.

It looks like the glass object has no thickness.
Without any thickness, rays are bent only once, and behave as if everything behind the plane were inside the glass, rather than behind it.
After adding a solidify modifier (or thickness via any other method), rays passing through the glass will be bent upon entering it, then bent back upon exiting it. This should result in the expected appearance:

Nope, unfortunately adding solidify modifier didn't change anything.

@IgorTatarnikov: Gandalf3's answer is correct and should work. I'd advise you to check the scale of your scene and check the thickness of your glass. Glass always have refraction, so it will always act a bit as a lens, but the extreme refraction in your example is clearly what gandalf3 pointed out. Check again your scene and make sure your glass isn't just a plane and it has some realistic thickness.

@Gez Ik, it seems legit. But it doesn't solve the problem in my case. And I've used blender long enough to tell if an object has a solidify modifier or not.

huh. Is it possible you could upload a .blend exhibiting the material/object in question?

Does it have the normals pointing in the right direction?

@gandalf3 I will upload it as soon as I can, having network connection issues at the moment.

@Gez I've checked the normals, everything seems alright

You could change the IOR to be 1. Then the light will no longer be refracted. But I think you had that solidify Problem mentioned above.

Well it looks like the light path node going through the math nodes is distorting things. If you just use the glass shader only the problem goes away.

I know the light path node is better for setting up glass but it seems something is off. If you want to keep the same set up so it renders faster with no fire flies try dropping the IOR to something like 1.05 and see if that fixes it.


text:
How to get Model to have an Outline
I've just finished sculpting a skull and now I want to create a render looking like that:

And freestyle just doesn't provide a similar result.
Here is my model:

And here is with freestyle:

Options:

What is the best way to produce a render looking similar to the very first photo I've posted?
It doesn't matter what engine I'll have to use Blender or Cycles either way is fine by me.

Don't expect any automated technique to produce results as the first image, that is a hand made 2D illustration, no amount if trickery will achieve that from a 3D model without manual intervention. That being said, your freestyle result can be drastically improved by tweaking settings and playing around with styles

Also, there should be no geometry in the eye's and nose sockets.

@DuarteFarrajotaRamos I understand that clearly. Could you list all the possible ways to make the render look as close as possible to the B&W 2D Image. Manual or not I'll try everything.

For starters you should set the backgrounds to white color, so the outline is also visible. Perhaps also reduce the overall inner line thickness a bit, but leave the outline thicker. Use several different styles for more variation too, but 'list all the possible ways" doesn't seem reasonable. I don't often use freestyle so I can't help much here, but maybe using blender internal render is more adequate


text:
How can I display a bpy.types.Text custom properties in the interface?
Re an interesting question in another Q&A : https://blender.stackexchange.com/a/315212/86891
bpy.types.Text, which inherits bpy.types.ID, supports custom properties. It is possible to access, read, and edit them using the API but it would be more convenient to do it directly using the interface.
How can I do that ?

There is in fact a builtin helper function to display custom properties in the UI. It is not really documented but available over on the github mirror. We'll use that and display it in the "N" panel of the Text Editor.

from rna_prop_ui import PropertyPanel
import bpy

class TEXT_PT_custom_properties(bpy.types.Panel, PropertyPanel):
    _context_path = "edit_text"
    _property_type = bpy.types.Text
    bl_label = "Custom Properties"
    bl_space_type = "TEXT_EDITOR"
    bl_region_type = "UI"
    bl_label = "Custom Properties"
    bl_category = "Custom Properties"

bpy.utils.register_class(TEXT_PT_custom_properties)

FWIW here's the full PropertyPanel file. You don't need to rewrite it, it is builtin and should be available from within the Blender text editor.
https://github.com/blender/blender/blob/main/scripts/modules/rna_prop_ui.py

great! +1 the question is: why didn't they add this to default Vanilla Blender?

@Chris I think there are 2 reasons, the first one, look at the collection custom properties, which was added a few versions ago : simply that noone thought about it, and users didn't complain about it either, and 2, adding a custom property on a text is a bit more abstract than adding a custom property to an object IMO, so it might be a little overwhelming for newcomers. But I think the 1st explanation is the most likely :p

Also, for example asset meta data support custom properties, but there really isn't a point in messing with custom properties in assets since you can't read them from another file without having to open the library file which defeats the purpose of asset meta data.

I think the text editor is a bit forgotten in general. For example anywhere where there is text it is quite common to have a feature where you double click on a word and drag to select whole words, or triple click to select the whole line, but Blender's text editor doesn't have such features. Not a big deal, but it just seems if those are forgotten, it's not surprising.


text:
How can I change the outliner Restriction Toggles with Python?
I'd like to be able to change the restriction toggles (filters) that are displayed on the right of the outliner, similar to this :

But with the Python API.

These restriction toggles are attributes of the SpaceOutliner class which is a child class of Space.
Each Area in the Screen holds one or more Space(s). Thankfully the Outliner area only holds one.
import bpy

# Fetch the first outliner area in the screen
# Will throw error if workspace doesn't contain any outliner editor.
outliner_area = next(a for a in bpy.context.screen.areas if a.type == "OUTLINER")

space = outliner_area.spaces[0]
space.show_restrict_column_enable = True  # Collection exclusion (Checkbox icon)
space.show_restrict_column_select = True  # Selection state (Cursor icon)
space.show_restrict_column_hide = True  # Local visibility (Eye icon)
space.show_restrict_column_viewport = True  # Global visibility (Monitor icon)
space.show_restrict_column_render = True  # Render visibility (Camera icon)
space.show_restrict_column_holdout = True  # Holdout
space.show_restrict_column_indirect_only = True  # Indirect only


text:
How can I know if a panel is the parent of other subpanels?
One can make a sub-panel to be drawn inside a parent panel using bpy.types.Panel.bl_parent_id.
import bpy

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

    def draw(self, context):
        self.layout.label(text="Hello world!", icon='WORLD_DATA')

class HelloWorldSubPanel(bpy.types.Panel):
    """Creates a Panel in the Scene properties window"""
    bl_label = "Hello World Sub Panel"
    bl_idname = "OBJECT_PT_sub_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_parent_id = "OBJECT_PT_hello"
    bl_context = "scene"

    def draw(self, context):
        self.layout.label(text="Hello world!", icon='WORLD_DATA')

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

if __name__ == "__main__":
    register()

I can check if the two panels are related with :
print(HelloWorldSubPanel.bl_parent_id == HelloWorldPanel.bl_idname)  # Returns True

But suppose I don't have access to the child class or don't want to hardcode the relationship test.
How would I know, without having access to the child panel class code, if the parent panel contains any children sub-panel ?

I could not find an attribute for this in API documentation. However, you can compare bl_idname with the bl_parent_id attribute of all panels to represent the hierarchy.
import bpy

class HelloWorldPanel:
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Tools"
    bl_options = {"DEFAULT_CLOSED"}

class HELLO_PT_World1(HelloWorldPanel, bpy.types.Panel):
    bl_idname = "HELLO_PT_World1"
    bl_label = "Panel 1"

    def draw(self, context):
        layout = self.layout
        #print (issubclass(self.__class__, HelloWorldPanel))
        layout.label(text="This is the main panel.")

class HELLO_PT_World2(HelloWorldPanel, bpy.types.Panel):
    bl_parent_id = "HELLO_PT_World1"
    bl_idname = "HELLO_PT_World2"
    bl_label = "Panel 2"

    def draw(self, context):
        layout = self.layout
        #print (issubclass(self.__class__, HELLO_PT_World1))
        layout.label(text="First Sub Panel of Panel 1.")

class HELLO_PT_World3(HelloWorldPanel, bpy.types.Panel):
    bl_parent_id = "HELLO_PT_World2"
    bl_idname = "HELLO_PT_World3"
    bl_label = "Panel 3"

    def draw(self, context):
        layout = self.layout
        layout.label(text="Second Sub Panel of Panel 1.")

classes = (
    # The order of registration must be parent panel first or loading errors will occur.Perhaps due to blender specifications, registration seems to be "by name," so class names may need to be created in order of name.
    HELLO_PT_World1,
    HELLO_PT_World2,
    HELLO_PT_World3,
)

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

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

if __name__ == "__main__":
    register()

    for idx, cls in enumerate(classes):
        for cls_rev in classes[idx+1:]:
            if hasattr(cls_rev, "bl_parent_id"):
                if cls.bl_idname == cls_rev.bl_parent_id:
                    print(cls.__name__, "is parent of", cls_rev.bl_idname)

Output:
HELLO_PT_World1 is parent of HELLO_PT_World2
HELLO_PT_World2 is parent of HELLO_PT_World3

The UI code comes from How to create a custom UI?

Yeah I was hoping not having to loop through all panel classes to find the relationships but it seems it isn't possible to get it directly through the API... This will do, thanks :)


text:
How can I check if an item has already been marked as an asset?
I'm creating a an asset library using the Asset Browser features introduced in version 3.0.
How can I know for sure that an asset has already been marked without having to open the library in the Asset Browser ?

Using the interface
In the outliner, objects that have been marked as assets have an icon with books on the left of their name :

Materials and Worlds have an additional display hint in the material and world properties :

Depending on the data type you may or may not be able to mark an asset twice using the interface, but if you can you will be greeted with an error message :

Using Python Scripting
If an object has been marked as asset, one can access its library asset data using ID.asset_data.It has the nice added benefit of returning None if the item is not an asset.
So one can define a function to determine if an ID is an asset:
def is_asset(obj):
    return obj.asset_data is not None

Testing on a brand new file :
import bpy

def is_asset(obj):
    return obj.asset_data is not None

obj = bpy.data.objects["Cube"]
obj.asset_mark()
print(f"Is {obj.name} an asset ? {is_asset(obj)}")
obj.asset_clear()
print(f"Is {obj.name} an asset ? {is_asset(obj)}")

Prints in the console :
Is Cube an asset ? True
Is Cube an asset ? False


text:
How do I get the selected Assets in the Asset Browser using the API?
Similar to Python : Get selected objects in outliner
How can one access the assets that are currently selected in the asset browser editor using the python API ?
I assume it should be available on a per-editor basis since, contrary to the outliner where selection state is shared between all editors, different asset browser editors can have different asset selection states :

i cannot even find the "right" area type  TypeError: bpy_struct: item.attr = val: enum "ASSET_BROWSER" not found in ('EMPTY', 'VIEW_3D', 'IMAGE_EDITOR', 'NODE_EDITOR', 'SEQUENCE_EDITOR', 'CLIP_EDITOR', 'DOPESHEET_EDITOR', 'GRAPH_EDITOR', 'NLA_EDITOR', 'TEXT_EDITOR', 'CONSOLE', 'INFO', 'TOPBAR', 'STATUSBAR', 'OUTLINER', 'PROPERTIES', 'FILE_BROWSER', 'SPREADSHEET', 'PREFERENCES')

have a look at startup/bl_operators/assets.py.  It looks like you need something like active_asset = SpaceAssetInfo.get_active_asset(context)  There only seems to be the concept of active and not selected?

@Chris Yeah it's not .type it's .ui_type... was fooled by it too !

@MartyFouts ooh neat I'll dig into that thanks !

It looks like it is not currently possible to gather a list of currently selected assets in the asset browser editor.
One can however get a handle on the currently selected asset with context.asset_file_handle, and only this one. But it seems unreliable at best and the documentation explicitly states that this member will be replaced in the future.
I'll wait for this feature to be implemented in one of the future versions then. :)

The quote from the docs: "Avoid using this, it will be replaced..." made my day :D

@brockmann Fast forward in 5 years when this quote is still there in the docs... xD

Well seems I was wrong, it is in the works : https://docs.blender.org/api/current/bpy.types.AssetHandle.html

Blender 4.0+
Blender 4.0 introduces bpy.types.AssetRepresentation, bpy.context.selected_assets, bpy.context.asset we can use to our advantage.
import bpy

class PrintSelectedAssets(bpy.types.Operator):
    bl_idname = "asset.print_selected_assets"
    bl_label = "Print Selected Assets"

    @classmethod
    def poll(cls, context):
        return context.selected_assets

    def execute(self, context):
        for asset_representation in context.selected_assets:
            print(f"{asset_representation.full_path=}")
            print(f"{asset_representation.full_library_path=}")
            print(f"{asset_representation.id_type=}")
            print(f"{asset_representation.name=}")
            # This will be None if the asset is not located in current file :
            print(f"{asset_representation.local_id=}")
        print(context.asset)  # Active asset

        return {"FINISHED"}

def display_button(self, context):
    self.layout.operator(PrintSelectedAssets.bl_idname)

def register():
    bpy.utils.register_class(PrintSelectedAssets)
    bpy.types.ASSETBROWSER_MT_editor_menus.append(display_button)

def unregister():
    bpy.types.ASSETBROWSER_MT_editor_menus.remove(display_button)
    bpy.utils.unregister_class(PrintSelectedAssets)

if __name__ == "__main__":
    register()

Blender 3.6
I found the answer while researching another answer.
It's actually an attribute of File context which unless I'm mistaken does require the piece of code to be executed inside the context of the asset browser.
Here's the slightly altered script that adds a button in the Asset Browser header that, when clicked, outputs some information about the selected assets in the console :
import bpy
from pathlib import Path

class PrintSelectedAssets(bpy.types.Operator):
    bl_idname = "asset.print_selected_assets"
    bl_label = "Print Selected Assets"

    @classmethod
    def poll(cls, context):
        return context.selected_asset_files

    def execute(self, context):
        current_library_name = context.area.spaces.active.params.asset_library_ref
        if current_library_name != "LOCAL":  # NOT Current file
            library_path = Path(context.preferences.filepaths.asset_libraries.get(current_library_name).path)

        for asset_file in context.selected_asset_files:
            if current_library_name == "LOCAL":
                print(f"{asset_file.local_id.name} is selected in the asset browser. (Local File)")
            else:
                asset_fullpath = library_path / asset_file.relative_path
                print(f"{asset_fullpath} is selected in the asset browser.")
                print(f"It is located in a user library named '{current_library_name}'")

        return {"FINISHED"}

def display_button(self, context):
    self.layout.operator(PrintSelectedAssets.bl_idname)

def register():
    bpy.utils.register_class(PrintSelectedAssets)
    bpy.types.ASSETBROWSER_MT_editor_menus.append(display_button)

def unregister():
    bpy.types.ASSETBROWSER_MT_editor_menus.remove(display_button)
    bpy.utils.unregister_class(PrintSelectedAssets)

if __name__ == "__main__":
    register()

context should be the context of the asset browser? context.selected_assets won't work out of that context I think

@NoobCat well, yes, because you can have multiple asset browsers open at the same time with different selection states

How to get it from the window area
>>> bpy.context.screen.areas[3].spaces.active.params.filename
'geometry_nodes\\procedural_hair_node_assets.blend\\NodeTree\\Braid Hair Curves'

If the asset browser area on the window has been identified, it is useful to learn the information from the console.
In the example,
it is "bpy.context.screen.areas[3]".
but the number will vary depending on the environment.
The area can be identified
by https://github.com/Pullusb/devTools
which is an add-on that provides a convenient button on the console.

Acquire information via operator
We already have the code for the answer, but some of the context data accesses have "mechanisms that can only be accessed via the operator".
For example, the following access is only accessible on the operator and not in the area
https://docs.blender.org/api/current/bpy.types.FileSelectEntry.html
Therefore, it is necessary to set up an access button in the area from which to obtain the divestment.
Of course, if you place this button anywhere other than on the asset browser, it will not work.
import bpy
from pathlib import Path

# breakpoint = bpy.types.BP_PT_bp.bp
class PrintSelectedAssets(bpy.types.Operator):
    bl_idname = "asset.print_selected_assets"
    bl_label = "Print Selected Assets"

    @classmethod
    def poll(cls, context):
        return context.selected_asset_files

    def execute(self, context):
        for asset in context.selected_asset_files:
            asset_re_path=asset.relative_path
            print("### asset path :",asset_re_path)

        return {"FINISHED"}

def display_button(self, context):
    self.layout.operator(PrintSelectedAssets.bl_idname)

def register():
    bpy.utils.register_class(PrintSelectedAssets)
    bpy.types.ASSETBROWSER_MT_editor_menus.append(display_button)

def unregister():
    bpy.utils.unregister_class(PrintSelectedAssets)
    bpy.types.ASSETBROWSER_MT_editor_menus.remove(display_button)

if __name__ == "__main__":
    register()

For blender4.0
There seems to have been a change in the API.
The following are the changes
From
selected_asset_files
To
selected_assets
https://docs.blender.org/api/current/bpy.context.html#bpy.context.selected_assets
https://docs.blender.org/api/current/bpy.types.AssetRepresentation.html#bpy.types.AssetRepresentation
import bpy
from pathlib import Path

class PrintSelectedAssets(bpy.types.Operator):
    bl_idname = "asset.print_selected_assets"
    bl_label = "Print Selected Assets"

    @classmethod
    def poll(cls, context):

        return context.selected_assets

    def execute(self, context):
        for asset in context.selected_assets:

            asset_path=asset.full_path

            print("### asset :",asset_path)

        return {"FINISHED"}

def display_button(self, context):
    self.layout.operator(PrintSelectedAssets.bl_idname)

def register():
    bpy.utils.register_class(PrintSelectedAssets)
    bpy.types.ASSETBROWSER_MT_editor_menus.append(display_button)

def unregister():
    for f in bpy.types.ASSETBROWSER_MT_editor_menus._dyn_ui_initialize():
        if f.__name__ == display_button.__name__:
            bpy.types.ASSETBROWSER_MT_editor_menus.remove(f)
            return

if __name__ == "__main__":
    unregister()
    register()

It works, but how to get all selected assets? It return only one (the last)...

@Bicukow  I have made an addition to my answer. Please check it.


text:
Feather Texture Edges of Cylinder

With this vortex I'm making, I would like to feather those edges but I'm not quite sure the correct node set up. The vortex was made using a Cylinder mesh with the caps deleted.

Make "endcaps" for your cylinder by using a Wave Texture separated on it's lengthwise axis (in this case Y) and a ColorRamp - Note the very small scale of the Wave Texture - you will have to shrink it until there is only one "Wave" line, and then invert it with a ColorRamp so the "outsides" are black instead of white. I also used a Vector Math node to add the vectors from a (also Y-axis) stretched noise texture to "deform" the endcaps, and give them that feathered look. Note that the vector addition requires you to move the Wave Texture "back to center" by using a mapping node, moving it -0.5 on the Y axis.

Once you have the look you like, just multiply it over the alpha you are already using as part of your existing material (assuming you have one - it looks like it from your screenshot).