text:
Forward a shapekey name to a "set" def
Python complete beginner here.
I struggled hard to find the way to animate shapekeys from a panel slider.
I almost got it. It works but only when I write the name of the shapekey myself (lines 8 and 12).
I want to apply the "set_shapekeys" to many shapekeys so I would like to know how to pass the name of my shapekey in something like "obj.data.shape_keys.key_blocks[keyname] but it doesn't work.
Hope someone can help me.
Thanks in advance.
import bpy
from bpy.types import Panel, Operator
from bpy.props import FloatProperty
from mathutils import Matrix, Vector

def set_shapekey(self, value) :
    obj = bpy.data.objects['foo']
    shape_key = obj.data.shape_keys.key_blocks["lobh"] #line 8
    keys = obj.data.shape_keys.key_blocks.keys()
    shape_key_index = keys.index(shape_key.name)
    obj.active_shape_key_index = shape_key_index
    bpy.data.shape_keys["Key"].key_blocks["lobh"].value = value  #line 12

class FOO_PT_panel_2(bpy.types.Panel):
    bl_label = "foo settings"
    bl_category = "foo"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_options = {"DEFAULT_CLOSED"}

    def draw(self, context):
        row = layout.row()
        obj = bpy.data.objects['foo']
        split=layout.split()
        col=split.column(align=True)
        if obj is not None:
            col.prop(obj, 'myFloatlobh', slider=True)

        obj = bpy.data.objects['foo']
        #split=layout.split()
        #col=split.column(align=True)

        if obj is not None:
            col.prop(obj, 'myFloatlobw', slider=True)

        obj = bpy.data.objects['foo']
        #split=layout.split()
        #col=split.column(align=True)

        if obj is not None:
            col.prop(obj, 'myFloatlobd', slider=True)

#floatproperty
bpy.types.Object.myFloatlobh = FloatProperty(name = "Foomax", min = 0, max = 1, soft_min=0, soft_max=1, default=0, set = set_shapekey)
bpy.types.Object.myFloatlobw = FloatProperty(name = "Foomin", min = 0, max = 1, soft_min=0, soft_max=1, default=0, set = set_shapekey)
bpy.types.Object.myFloatlobd = FloatProperty(name = "Foothick", min = 0, max = 1, soft_min=0, soft_max=1, default=0, set = set_shapekey)

classes = (FOO_PT_panel_2,)
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()
```

Hi. When you say "it doesn't work", what happens? Do you get error messages in the console?

Hey, what is that, Duarte Farrajota Ramos ? A good moderator who wants to help a beginner ? You deleted my post because  I gave an ansswer instead of a comment ! It is my first post and you ban me like a policeman, a little chief overusing his powers ? I have a problem, I thought Stack Exchange would be a nice way to learn Python. Shame on you !

We understand you're a new user; you're not banned from anything. Duarte corrected your mistake after it was correctly flagged. What's the problem? Also, I suggest you hold back on the name calling - it may make people less likely to help.

Thanks for your nice words, Ray,but I cancelled my account and I won't come back.


text:
Blender won't let me make things black
I'm new to blender, and I'm doing alright, except for one annoying thing: random things just won't turn black. I literally just try to make a black line and I've fiddled with all the settings but it just stays this weird light grey. I also copy some tutorials and I can't make things black like they have it. It just stays light grey.

Which version?  Hit Z and choose rendered or material preview.  Still not black?

Please provide a screenshot of the said black line and its material properties.

What kind of shading setup do you have? In the right upper corner there is some setting that let you see materials.

source: Stack Exchange

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

sort: votes


text:
Realistic Human Skin in Cycles
I have a character with some strange textures, and I don't know how to use them. For example for face i have these files:
face_D.tga
face_L.tga
face_M.tga
face_N.tga
face_S.tga

Now, I need a node map, so I can put everything in it's right place, but I have no idea about what I need to do, because I'm too new to Blender and Material Nodes.
I want to use all of these files to create a realistic human skin material.

Where did you get these map?

@JachymMichal Oops!, of course you can.  I was imagining setting radii by hand? I'll get to it as soon as I can. In the mean time, Axel can pick up your adjustment. So you reckon that red map is RGB SS radii, not RGB SS color? It seems odd to have SS color the same as surface color?

@RobinBetts Yes, it's seems odd at first. But that's just how SSS is implemented in Principled BSDF. The Subsurface slider actually multiplies the radius and also mixes Base and Subsurface colors. Other engines (V-Ray, Renderman, Arnold) have these as two separate sliders.

That's why I'm here ... I learn something every day  I grew up doing it with Mental Ray!!!

 Robin Betts just learned something new from me :). I just realized Mental Ray was discontinued long before I even started with 3D, you're like a wise elder around here :).

@JachymMichal  I've written you a small essay in a chat room.. actually, I probably wrote it for me, but anyway, there it is.

Everyone lessen !  you guys are making me confusing , well , let me say again , anyone is here who can set these texture on their right nodes ? if there is so please send an photo for me to see how should it be. plus , Im Extra noob at blender.

@RobinBetts , thanks very very much for that , well i used your nodes , and i worked on it , but the skin will stay full white. i removed AO so skin came back but , its not still looking real enough.

@RobinBetts i wish i could , but belongs to my friend and i don't have that permission. i asked but didn't let. thats why its making my work hard.

Here's a shot at what your tree might look like, as corrected by @Jachym.

Introduce the branches one at a time,starting with Diffuse color on its own.
Unlike the illustration, forget the AO branch to begin with. Plug the Diffuse map straight into the Base Color.
Then check the Normal. If you want to get a better view, you can temporarily unplug the Diffuse map to see  the effect on a white object.
When that's OK, plug the Diffuse back in, and go for the Shininess.
Now go for the Subsurface Scattering. Split the Diffuse, and plug it into Subsurface Color too.
Plug the 'M' map into the Subsurface Radius.
Depending on the size of your model, adjust the 'Subsurface' slider down. (I would recommend scaling the model in Edit mode, to life-size, in whatever units your scene is in.) Plugged in as shown, the RGB values in the red 'M' map represent the distances R,G and B are allowed to scatter through the object, in Blender Units, before attenuating to 0. Those distances are then multiplied by the value in the 'Subsurface' slider.

This is hard to check without the file.. but I hope it heads in the right direction.

If you really need the AO, (the lighting shouldn't really need faking..), use an RGB Mix node set to 'Multiply' or 'Overlay' to mix it with the Diffuse map on the way into the Base Color.

There's every chance @Jachym will have to correct me again :)

i tried but couldn't get my desire result. i uploaded an file so you can see it better. link is up in my question. Thanks by the way. ;)

@Axel     I've had a go, here. Tweaking would be a matter of taste .. the Normal maps aren't perfect.. seams are showing a bit.. and the fingernails, being part of the same SSS object, don't block the SS scattering through the fingers. If your privacy is important, I can delete this comment with its link at your request.

i give up on this , looks like this not gonna be fixed. i'll give it back to owner. Thanks for everything.

Not ooking OK in the .blend I sent?

@Axel Perhaps you expected a stronger effect :). But scattering is very subtle (almost imperceptible) on a single hand with spread fingers. Robin's setup gives very realistic results.

@JachymMichal I judged it by backlighting the hand.. it's actually too much, IMO.. If the fingernails stopped it, that would help.

I also noticed Random Walk sss method works great here (especially for the thin nails), and isn't much slower :).

@JachymMichal Crikey! There you go! Another lesson from JM! :)You really should have been answering this one.

i know with an hand is very hard , but i can't send whole character , even , im trying to process whatever you guys say on character face with any change that i can , but it alwasy looks like the same face , i need something powerful like Emily 2.1 model , which i never couldnt understand it.

@Axel.. have you tried downloading the .blend in my comment, above?

@Axel To better understand SSS, you can also check this thread: Rules and presets for SSS in Blender.

@RobinBetts Of course i did , 2 times i did XD , but guess what , I DID IT NOW !!!! little change in your nodes + my details made it Perfect ! not as much as emily but very acceptable. THANKS BIG MAN !!!!! Now i have lotta new question in my new posts. u gotta answer them all. ur cool.

@Axel.. Yay! .. I think I've learned more from this question than you have, thanks to JM.

@RobinBetts YEA , ur right we all did , Thanks to all !

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


text:
AMD GCN 1 mobile cards in blender
I have a laptop with old gcn 1 amd gpu
on windows, it says Radeon R5 M330, it's not R5, just a rebranded ATI card
on linux,
$ sudo lspci -v
01:00.0 Display controller: Advanced Micro Devices, Inc. [AMD/ATI] Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] (rev 83)

basically, a hainan card
these penny pinchers at hp have given me a "mobile" card rebranded more than 6 times !!! , they also did this with the wifi card btw, I mean yeah what should I expect at this price ?
so, my question is can I use this card with blender (for cycles rendering)? I know blender has dropped support for old cards, but I think there is still some alt render engine that supports this card, or perhaps an old version of blender ...
any help is appreciated...
sys info,
i3-duo (latest drivers with support from blender)
6gb ram

windows:
win 10 pro licenced
intel 520 hd integrated gpu (latest drivers with support from blender)
amd r5 m330 dedicated gpu (latest adrenalin drivers, ? from blender)

linux:
zorin 15.2 ultimate
intel 520 hd integrated gpu (old drivers, got it running after some fiddling)
amd hainan dedicated gpu (amdgpu, ? from blender)

I have the same GPU, and older versions of Blender support it. I think 2.78 was the last version to support this GPU generation. I don't know if there is some way to make new versions work with it.
Edit: Yes, 2.78 is the last version to support GCN 1.0 GPUs for Cycles rendering. From the 2.79 release notes:

Due to various issues with drivers for AMD GCN 1.0 architecture, those cards are no longer supported for Cycles rendering

You might not see a big improvement over rendering with your CPU though; this GPU isn't that powerful after all. I made a quick comparison between my CPU and GPU:

CPU (i5-6200U) took 8:13.03 with 4 threads rendering 48x48 blocks
each
GPU took 9:53.98 with 512x512 blocks, which actually got split
up into two 256x512 blocks by Blender because of some GPU memory limitation

You might get better results compared to your CPU, but just don't expect a lot from it.


text:
Split Off BMesh selected faces
I have a BMesh that I loop through and select some faces. I would now like to create a new BMesh out of all the faces I just selected. How can this be achieved in python? In addition, since faces have the tag attribute which can be used by custom scripts like mine, how can a new mesh be created using the tag status of each face to determine inclusion?

AFAIK there is no native bmesh function to do this. The way I have done that in the past was to construct a new mesh manually, and propagate it to a new mesh datablock using the Mesh.from_pydata() function the Mesh datablock offers.
code explanation
First, get the mesh itself from edit mode. the ensure_lookup_table() calls are mandatory, otherwise you cannot access faces or verts by index:
bm = bmesh.from_edit_mesh(bpy.context.object.data)
bm.faces.ensure_lookup_table()

next, retrieve a list containing all selected faces:
selFaces = [x for x in bm.faces if x.select]

If instead you want to work on tagged faces, use this list aggregator instead:
selFaces = [x for x in bm.faces if x.tag]

now use two more lists which will hold the output data for our new mesh:
py_verts = []
py_faces = []

the tricky part is in the coming loop. We need to pass on a list of Vectors of vertex coordinates and a list of lists of indices of the faces in question to the from_pydata function. So iterate over all selected faces, retrieve its vertices, and add the unique vertices to the new list, and the new index of that list to the new face index list.
for f in selFaces:
    # cur_face_indices holds the new indices of our verts per face
    cur_face_indices = []

    for v in f.verts:
        if v not in py_verts:
            # this vert is found for the first time, add it
            py_verts.append(v)

        # add the new index of the current vert to the current face index list
        cur_face_indices.append(py_verts.index(v))

    # face index list construction is complete, add it to the face list
    py_faces.append(cur_face_indices)

if you require a Mesh datablock:
Declare a new mesh data block, and run the from_pydata on it to create the new mesh:
me = D.meshes.new(name = 'output')
mat = C.object.matrix_world
me.from_pydata([mat @ x.co for x in py_verts], [], py_faces)

As you can see, there is an additional step in here, which gets the world_matrix and applies it using the @ operator on each vertex coordinates. This is basically applying the transforms of the source object on the new one. Alternatively you could also set the world matrix on the new object instead:
me = D.meshes.new(name = 'output')
me.from_pydata([x.co for x in py_verts], [], py_faces)
ob = D.objects.new(name='output', object_data = me)
ob.matrix_world = C.active_object.matrix_world

if you only require a new bmesh:
You still need to construct a mesh, but from there you should be able to retrieve the bmesh easily:
me = D.meshes.new(name = 'output')
me.from_pydata([x.co for x in py_verts], [], py_faces)
bm_new = bmesh.new()
bm_new.from_mesh(me)

complete script
Here is the full script, which has to be run from edit mode with the faces selected, and links the resulting object to the scene in the end:
import bpy, bmesh
C = bpy.context
D = bpy.data

bm = bmesh.from_edit_mesh(C.object.data)
bm.faces.ensure_lookup_table()
bm.verts.ensure_lookup_table()

# get all selected faces in a list
# replace x.select with x.tag in case that's what you are after
selFaces = [x for x in bm.faces if x.select]

# construct Python faces
# this is more involved, as we have to remap the new index
# to do this, we reconstruct a new vert list and only append new items to it
py_verts = []
py_faces = []

for f in selFaces:
    # cur_face_indices holds the new indices of our verts per face
    cur_face_indices = []

    for v in f.verts:
        if v not in py_verts:
            # this vert is found for the first time, add it
            py_verts.append(v)

        # add the new index of the current vert to the current face index list
        cur_face_indices.append(py_verts.index(v))

    # face index list construction is complete, add it to the face list
    py_faces.append(cur_face_indices)

print(py_verts, py_faces)

# now create a new mesh, and add the geometry as its data
me = D.meshes.new(name = 'output')

# get the world matrix of the active object and apply it to the mesh
# this ensures same orientation as the source for the new mesh, but with
# transforms applied
mat = C.object.matrix_world
me.from_pydata([mat @ x.co for x in py_verts], [], py_faces)

# create a new object, and link it to the current view layer for display
ob = D.objects.new(name='output', object_data = me)
C.view_layer.active_layer_collection.collection.objects.link(ob)

This is exactly what I was looking for. Bmesh really should have this functionality.

what about using split or separate methods from ops: bpy.ops.mesh.separate(type='SELECTED')

@Bruce the OP specifically asks for a bmesh function to avoid bpy.ops.* round trips. In general that's exactly what you should do when creating Add-ons. See the answers on https://blender.stackexchange.com/questions/2848/why-avoid-bpy-ops for some insights on this

bmesh.ops also has both split or duplicate methods, see: https://docs.blender.org/api/current/bmesh.ops.html#bmesh.ops.duplicate


text:
Custom Icons not showing up in Add-on
The structure of my add-on files is this:
main_folder
    __init__.py
    utils
        operators.py
        ui.py
        props.py
        icons
            icons.png

I am handling the loading and deleting of icons in register and unregister of the UI file:
custIcons = None

def register():
    global custIcons
    custIcons = bpy.utils.previews.new()
    scriptPath = bpy.path.abspath(os.path.dirname(__file__))
    iconsDir = os.path.join(os.path.dirname(scriptPath), "icon.png")
    custIcons.load("icon", os.path.join(iconsDir, "icon.png"), "IMAGE")

and
def unregister():
    global custIcons
    bpy.utils.previews.remove(custIcons)

When I am putting the icon in the UI:
def draw(self, context):
    self.layout.label(text = "Test", icon_value = custIcons["icon"].icon_id)

When I install the add-on, this shows up:

assume  \__file\__ is a copy paste error? and is it icon.png or icons.png   It is my understanding that __file__ is an abs path.  Wont be the value you want if you run it from the main thread.

Yes, \_file\_ and icons.png was an error. Thanks for pointing that out.

bpy.utils.previews.new() aka ImagePreviewCollection 's .load(...) needs an absolute file path, as relative file paths to work reliably.
def load(prefix, icon_name):
    global custIcons

    name = os.path.splitext(icon_name)[0]
    # abspath is needed for .load to work reliably
    filename = os.path.abspath(os.path.join(prefix, icon_name))
    custIcons.load(name, filename, 'IMAGE')
```


text:
How to connect two meshes together when meshes don't line up
I'm am trying to connect a head model to a body model, but the problem is that the head and body don't line up to where I can just merge the vertices. I tried using a boolean modifier but nothing happened for some reason. I have the head at a certain spot where I want it to connect to the body. Is there any easy way to do this?

Hello :). Please add some images to your question to illustrate the problem.

Use the Bridge Edge Loops tool. https://docs.blender.org/manual/en/latest/modeling/meshes/editing/edges.html#bridge-edge-loops


text:
Turn off motion blur in cuts
How do I turn off Motion Blur when cutting the camera (when the camera immediately moves to a new location in one frame)?

Nice question! If you mean to avoid objects blurring and looking like ghosts, I have an answer for that.

Yes, I do mean that. Thanks for your answer. It really helps.

Unfortunately even now that they added MB in Eevee, there's no option to keyframe it... which sucks... the only way to prevent unwanted artifacts now is probably to render each piece separately

Here is my solution: It requires some manual labor.
Update: Only works for Cycles
I will be saying "Ghost Effect" a lot in this answer. The image is what I mean by that.

First, locate the property titled "Position" in the Motion Blur panel. The position property defines how the Motion Blur is calculated:
Start on Frame: The Motion Blur is calculated through the current frame and the frame right after it.
Center on Frame: Calculated through frame - 1, frame, and frame + 1.
End on Frame: Calculated through frame - 1 and frame.
With these three settings, you can remove the "Ghost Effect" of motion blur with this procedure: Let's say that the cut is happening on frame and frame + 1. If you use the default Center on Frame, both frame and frame + 1 will have the ghost effect, because the Motion Blur calculates with neighboring frames. To fix this, keep it on Center on Frame, go to frame - 1, hover over the property with your mouse, and press 'i' to add a keyframe. Then, go to frame and change it to End on Frame and add a keyframe. Then, go to frame + 1 and add a keyframe on Start on Frame. Last, add a keyframe on Center on Frame for frame + 2. In total, you will need to add 4 keyframes.
Here's an explanation of what this is doing:
On frames that are not in the cut, the Motion Blur computes on Center on Frame. When it reaches the first frame of the cut, it performs on End on Frame. End on Frame computes with frame - 1 and frame, as stated above. Because the cut happens on frame and frame + 1, the Motion Blur does not reach the cut, and will eliminate the "Ghost Effect". This can also be applied to the next frames.

There is a problem that you can not keyframe shutter in eevee...

@Tokenyet he said it is cycles only

@Eric Xue, that was an update after reading Tokenyet's comment, but thanks for pointing that out anyway.

@Eric Xue , Oh, Sorry, I missed that word. I potentialy feel this is for eevee since the date is May 27, 2020 :P

@Tokenyet i guess, makes sense.

Here are some researches at eevee.
I tried Multiple Camera, this could pass motion blur on some scene, but for the object that used from last scene, It will cause ghost effect on the object.
Let me think simply, why not just render the whole animation again without motion blur? The disadvantage for this is to render twice, and It's a big waste of time.
The final workaround I come up with, is to check which frames are the problem frames, and write It down. Then just manually render those transition cuts and replace the problem frames. This could be more easier with writing a batch script, then passing a sequence of frame number from the note. (don't forget to turn off motion blur)
Just my two cents, hope It help.

Blender 3.1, tested in Cycles. When I keyframe the motion blur shutter, it keyframes it but it cannot be changed if keyframed again.
I did figure out though that you can keyframe the rolling shutter to "top to bottom" and set the value to 0 which seems to take away all the blur for just that frame. You can then keyframe one frame before and after to reset the rolling shutter back to "none" and restore the blur.
What am I using it for? A scene for work that has a semi truck rolling down the freeway and I wanted to put the project name and people on the side of the semi trailer. It was too blurry to read it though and now I can. I already had everything done and thought of this at the last minute and did not want to move a ton of keyframes for the rest of the scene and mess something up.
Otherwise I was going to have to rerun that frame set without motion blur and re-add it. This is fine if you do it once, but not if you have to keep doing it finding things to fix overall.


text:
How to read the contents of a text file?
We can define a StringProperty and set its subtype to FILE_PATH in order to select a file:
file_path: StringProperty(
    name = "File Path",
    description = "A path",
    subtype = "FILE_PATH")

Q: How can I get the actual content (text) of the selected file?

Hi and Welcome. What do you mean by "inside of it" exactly? Also, might be a good idea adding your code to the question. Please read: https://blender.stackexchange.com/help/how-to-ask

Is the question clear enough now? This is the second question I put, so it is not that good.

Yep, that's better @Pat. I recommend take a basic python course. How to read a text file: https://www.digitalocean.com/community/tutorials/how-to-handle-plain-text-files-in-python-3

pathlib.Path
Recommend for paths, using pathlib module.
For the most part this is a generic python question. The blender specific part is making the path absolute if given as a blender relative path, prefixed with "//"

Relative chosen when setting path property in file browser
import bpy
from pathlib import Path

#path = some_object.filepath # as declared by props
path = "//tmp/foo/bar.txt"  # a blender relative path

f = Path(bpy.path.abspath(path)) # make a path object of abs path

if f.exists():
    print(f.read_text()) # read and print.

The site https://medium.com has some great articles on pathlib and its usage:

https://medium.com/@ageitgey/python-3-quick-tip-the-easy-way-to-deal-with-file-paths-on-windows-mac-and-linux-11a072b58d5f
https://medium.com/@webology/pathlib-is-wonderful-9d25919469d3
https://medium.com/swlh/five-most-useful-pathlib-operations-77f9c96790b3

Cheers. Feel free to edit in missing links.

24 downvotes? I'm sorry, I feel responsible for that. Most likely the reason why OP (the other pat) was removed. I should edit the other answer to get 24 downvotes too, lol. But I guess my edit gets reverted anyway because as we know by now, some users don't like any critics or suggestions to improve answers or even having a hard time accepting a better one for whatever reason...

Wild stats, voting isn't a thing obviously... might be nice having this on meta. Btw, yet another pat: https://blender.stackexchange.com/users/98123/pat

May find this interesting: 12 upvotes on old posts in one day (never happend to me in 3 years): https://blender.stackexchange.com/users/94339/patisawesome200?tab=reputation

Having a hard time finding a good quote from Dr. Watson. lol. Feels like: https://i.giphy.com/media/aVCTDsm7XY6Pu/giphy.webp and https://i.giphy.com/media/26gJzdwIgfiDBChDa/giphy.webp

Have a soft spot for the Nigel Bruce version https://en.wikipedia.org/wiki/Sherlock_Holmes_(1939_film_series)

OMG. Good to know. 19 up-votes in a row is danger to the public! Precise observation Mr. Holmes... arrest him again! Bad news is that since the votes are corrected there is no chance to find the up-voter anymore, I'll keep my eyes open and give my best Mr. Holmes.

If the answers would help, I wouldn't mind... Ok, we'll see how good the machine handles that.

I guess we can't do much, not the type of guy who betrays someone. Might help to tell him that we noticed that, we'll see...

No reply on my comment yet, but no further fake votes at least.


text:
Displacement moves my mesh away from it's position in Render Mode
I'm experimenting with a way to procedurally create some rocks for myself, but for some reason, my rock moves slithly in Render Mode, the displacement is clearly working but I don't understand why it's moving the rock.

As you can see everything is set up but the rock moves. You can see the original outline of it in yellow. That Mix Shader leads only to the color material, nothing else is affecting it's displacement.
What's causing this?

You should plug the noise texture output into the "Height" input of a displacement node, then plug the output of this node into the displacement input of the "Material output" node

Thank you. You were correct! Please make a proper answer to that I may close this thread and approve your answer!

You should plug the noise texture output into the "Height" input of a displacement node, then plug the output of this node into the displacement input of the "Material output" node.


text:
Extend Blender Python Class
Note: both Blender SE and google are currently useless for this somewhat simple subject, so bump this question up for others like me.
I would like to extend a blender class (BMesh.types.BMEdge) into a custom class, "PEdge", so that I can add some extra parameters. I want to replace all the BMEdges in my BMesh with my new PEdges as well. How can this be achieved in blender python?

You cannot use a bmesh element as a base type
Unfortunately as possible with many blender types, it is not possible to  use bmesh elements as base types to extend the class in a "traditional way".
>>> class Foo(bmesh.types.BMEdge):
...     pass
...
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
TypeError: type 'BMEdge' is not an acceptable base type

I know. I have tried that already. The question is what should I do (the NON-traditional way)?

No. I am quite unfamiliar with Blender's Python API. I am unsure what the 'Blender Way' of adding information to a data type is.


text:
Can't edit mesh in Edit Mode!
This is urgent. I'm working on a massive file and I cannot share the blend file.
I can't edit anything at all in Edit mode. I click "G" to move a vertex, face or edge, and nothing moves. Absolutely nothing. I'm working on an important project and I need to have this done today.
I have no idea what happened, I might've clicked something but Blender tell me nothing. I've never seen this and I can't fix it.
Please, any help is welcomed, this is very urgent!

You say that this file is huge? Can you share a screenshot or a small video?

What mode are you in. Do the verts go orange when selected?

@Sanbaldo He has stated that the file is way too large for him to share.

Have you made sure that you selected selection pointer?
Normally top left bar, it is a cursor with an orange circle around it. When you select it it should fix it


text:
Read the contents of a Text Datablock
Writing into a text datablock can be done with the script
text = bpy.data.texts[name]
text.write(something)

However, when I used the script text.read, an error appeared.
Question: How do I read the content in a text datablock with a script?

TextBlock.as_string()
Will give the complete contents of the text block.
Test Text block "FooBarBar"
Foo
Bar
Bar

Once again off to the python console to test.
>>> D.texts['FooBarBar'].as_string()
'Foo\nBar\nBar'

>>> print(D.texts['FooBarBar'].as_string())
Foo
Bar
Bar

>>>

same result as joining lines with
>>> '\n'.join(l.body for l in D.texts['FooBarBar'].lines)
'Foo\nBar\nBar'

On the error...
>>> D.texts['FooBarBar'].read
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
AttributeError: 'Text' object has no attribute 'read'

The error appears in RED that the text block has no read method.  This is confirmed by consulting the documentation
My 2c worth of advice, try autocomplete in the console "@MartinZ style", consult the docs, and then....

I have never needed to work with text blocks so I have no idea yet. Let's find out.
If you press Tab after writing something in the Python Console, you can see all the available options from auto complete like this:

We can see that it is possible to access lines text.lines so if we want to read the 4th line for example we carry on with auto complete:

and see that it has body, that's probably the thing we need here then:

It's a string. That's it.


text:
How can I make these eyelashes 'folllow' or 'pull' the verticies of the head object?

I want to make a 'blink' shape key for this character. The eyebrows and eyelashes are on different UV maps and are different objects than the head. Is there a way to make the eyelashes and eyebrows follow the face's deformation? I.e. if I pushed the eyelids or lashes in in edit mode and made it a shape key for 'blink', can both lashes and eyelids move at the same time?

You should be able to do this by hooking the vertices of the eyelid to the eyelashes, so that the eyelash pulls them down, (which is what I think you are trying to do).
1) Select the portion of the eyelid you want to pull down, and create a vertex group for it in the vertex panel.
2) Select the eyelashes that will affect the eyelid, then select the main mesh (in this case, the body, if that is the mesh that the eyelid is part of).
3) With those two objects selected, press Ctrl+H, making sure you only have the part of the eyelid you want affected selected, and no other vertices.
4) Now you will notice that the eyelashes actually pull the vertices of the eyelid down with it when it moves, but it is probably going to look bad at first.
5) Select the main mesh, and go to the modifiers tab. Here you will see a modifier automatically added for the hooking object. You can adjust both the falloff type, radius, and the strength of the hook. This is for automatically adjusting the hook's influence proportionally. You also should select the vertex group you created earlier. This is for easy adjustment of the hook's influence. Using the settings in the modifier tab for the hook, adjust the strength and falloff until you get a value that nicely moves the eyelid.
Note: This method works best with an object that has not had any subdivision modifiers applied yet, because the adjustments will be much smoother.
Hope this helps!

You can definitely parent them to whatever head bone you may have, and they'll move with the head, or the eyelid bone, etc. though it may be a bit finicky once blinking, brow movements, and such come into play. It's generally considered better just to include and join them as part of the main rigged object for simple uses. There are probably a few methods I'm unaware of, similar to pinning cloth physics objects or something. People usually just put a big part of the UV tile aside for eyes and similar, buuuuut now-!
As of the most recent blender versions, use UDIM textures, which allow you to use many separate high poly textures (or low, you can mix and match) for single objects, as is standard in most high end 3D software now. https://www.youtube.com/watch?v=LR3Y9R2wmdI is a pretty good rundown!
Don't be afraid to put non-manifold things like eyelashes or eyeballs in the same object to be controlled by the same rig or skeleton, especially if it's a simpler one. Choosing whether or not a mesh should be joined to its supposed parent object borders on the philosophies of zen and whether you're comfortable doing it in this use case. you'll find a lot of models doing it one way or the other in various cases, so get used to philosophizing and agonizing a little over it.
a lot of people also use hair particles for those, because you can use procedural materials, and as a 3d model, it will then technically have no functional resolution limits.


text:
Why does Blender crash when trying to place objects with 'threading.Timer()'?
I'm trying to make a simple program where 15 spheres are randomly placed into a 20x20x20 volume, then after two seconds it clears all the spheres and places another 15 randomly.
It will place the first 15 spheres fine after two seconds, then after another two seconds blender closes.
Any help with this is much appreciated.
import bpy
import random
import threading

def place():

    bpy.ops.object.select_all(action='SELECT')
    bpy.ops.object.delete(use_global=False)

    for i in range(0,15):
        x = random.randint(-10,10)
        y = random.randint(-10,10)
        z = random.randint(-10,10)
        bpy.ops.mesh.primitive_uv_sphere_add(location=(x,y,z))

        bpy.ops.object.modifier_add(type='SUBSURF')
        bpy.context.object.modifiers['Subdivision'].render_levels=0
        bpy.context.object.modifiers['Subdivision'].levels=0

        timer = threading.Timer(2.0, place)
        timer.start()

    return None

place()

Threading and blender are not really designed to go together

Blender API Gotchas: threading
So far, no work has gone into making Blender’s Python integration
thread safe, so until its properly supported, best not make use of
this.

Here is the second example from link modified to.  Add ten spheres, then randomly move them every 2 seconds with thread.
As mentioned in docs, will after a while kill blender.
Also will find that in threads (AFAIK timers are using threads too) context is lost Context is incorrect when calling from a timer .  Recommend not referencing context from a thread / timer method. This includes use of operators.
In both timer examples below the spheres are found in the data by name..
import bpy

for i in range(10):
    bpy.ops.mesh.primitive_uv_sphere_add()

def func():
    print("Running...")
    import bpy
    from random import randint
    spheres = [o for o in bpy.data.objects if o.name.startswith("Sphere")]

    for o in spheres:
        o.location = tuple(randint(-10, 10) for a in "xyz")

def my_timer():
    from threading import Timer
    t = Timer(2, my_timer)
    t.start()
    func()

my_timer()

This continues to run after blender is closed...
Using app.timers as suggested by @Gorgious
import bpy

for i in range(10):
    bpy.ops.mesh.primitive_uv_sphere_add()

def func():
    print("Running...")
    import bpy
    from random import randint
    spheres = [o for o in bpy.data.objects if o.name.startswith("Sphere")]

    for o in spheres:
        o.location = tuple(randint(-10, 10) for a in "xyz")

    return 2

bpy.app.timers.register(func)

Use a modal timer operator.
Modal Timer Operator would be my recommendation  for this.
Would recommend using a modal timer for this. See the example in Text Editor > Templates > Python > Operator modal timer change the timer tick/ or count ticks for 2 second intervals.

Why does this post have no votes? Another mystery.

If I understand the code correctly, each place() method then recursively calls 15 more place() after 2 seconds, which each of these instances themselves call place() 15 more times after 2 seconds. etc. I think this will crash any program in python pretty quickly.
Blender has specialized methods for recurrent calling of methods. See the documentation :
https://docs.blender.org/api/current/bpy.app.timers.html
Exemple :
import bpy

def every_2_seconds():
    print("Hello World")
    return 2.0

bpy.app.timers.register(every_2_seconds)

Think the recursive nature above was a logic error. The first 15 spheres not placed  from thread call the next time it is, and crash. Even if unindented outside of for loop will In both cases ( using threading and using timer (using threading too i believe) } context will be lost.   https://blender.stackexchange.com/questions/135970/context-is-incorrect-when-calling-from-a-timer    Would recommend a modal timer operator to do this.


text:
How to select with python code only vertical edges from cube?
How to select the vertical edges, using python code if a selected previously the cube?

You can use this script to select each edge if its two vertices' X and Y coordinate are both really close to each other.
import bpy
import bmesh

obj = bpy.context.active_object  # Get selected object

epsilon = 1e-5  # Threshold to account for floating point precision

if obj:
    bpy.ops.object.mode_set(mode='EDIT')  # Go into edit mode
    bpy.ops.mesh.select_mode(type="EDGE")  # Switch to edge select mode

    bm = bmesh.from_edit_mesh(obj.data)  # Create bmesh object for easy mesh evaluation

    for e in bm.edges:  # Check all edges
        first_pos = e.verts[0].co  # Get first vert position of this edge
        other_pos = e.verts[1].co  # Get second vert position of this edge

        # Select or deselect depending of the relative position of both vertices
        e.select_set(abs(first_pos.x - other_pos.x) <= epsilon and abs(first_pos.y - other_pos.y) <= epsilon)

    bmesh.update_edit_mesh(obj.data)  # Update the mesh in edit mode

How to run a script

how you recorded the video?

I used the software ScreenToGif

The dot product
If two vectors are parallel then the dot product of their normalized direction will be 1 if in same direction (angle between 0) or -1 in opposite direction -1 (angle between 180 degrees)
Checking that the absolute value of dot product is around 1 will find edges defined by the vertex coordinate difference regardless of order.
Have used this method in example here Subdividing cubes at different intervals
So similarly
    def aligned(e, axis, TOL=1e-5):
        axis = Vector(axis).normalized()
        dir = (e.verts[1].co - e.verts[0].co).normalized()
        return (1 - abs(dir.dot(axis))) < TOL

    # select if aligned with local z axis.
    for e in bm.edges:
        e.select_set(aligned(e, (0, 0, 1))

    # select if aligned with global z axis
    axis = ob.matrix_world.inverted() @ Vector((0, 0, 1)) # local space
    for e in bm.edges:
        e.select_set(aligned(e, axis))

(if doubles in mesh will need to deal with zero length edges.)
Hardcode for default cube.
if this is a freshly added  default cube can rely on the edges having the same index each time, and could select based on index.
geom=[e.index for e in bm.edges if aligned(e, (0, 0, 1))]
print(geom)

Outputs [1, 3, 6, 9]
so the  bmesh edges of the default cube in $Z$ dir are
bm.edges.ensure_lookup_table()
vertical_edges = [bm.edges[i] for i in (1, 3, 6, 9)]

How rather than selecing every edge in the shape how can you select just one edge any edge?


text:
Hide Panel With Python
I have a class that extends bpy.types.Panel. When a combination of items are chosen in another panel, I want this panel to appear, but not otherwise. Right now the panel will always show after being registered. I browsed through the documentation and found nothing useful. What function can I call or flag can I set to show and hide a panel, say, on clicking a button?

A simple if statement in draw() based on a certain state/flag/bool should do it. Suggest adding your code otherwise it's impossible to answer your q. Please read: https://blender.stackexchange.com/help/how-to-ask

See also https://docs.blender.org/api/current/bpy.types.Panel.html#bpy.types.Panel.poll

@brockmann Wouldn't poll() be better? https://blender.stackexchange.com/questions/82957/poll-method-for-custom-panel

Sure possible too. However, depends on the condition and whether the panel or its elements should appear/disappear (in conjunction with the other panel mentioned in the question). I don't know... the reason why I asked for the actual script @RayMairlot

@blockman doesn’t draw only get called once? Maybe I better revisit the API.

Nope. Gets called in regular intervals.

Put an __init__ with a print in your panel class and will see it is instanced at regular intervals.  The poll classmethod determines whether to.

Would call this "dupish"  in that the condition there is exactly 2 selected objects.  The condition here is the properties.  What panel these props are set in is immaterial, just what the properties are... hmmm talking myself into marking this as a dupe, will leave for others to decide.

Poll the panel
Given this from the question

When a combination of items are chosen in another panel, I want this
panel to appear, but not otherwise. Right now the panel will always
show after being registered. I browsed through the documentation and
found nothing useful. What function can I call or flag can I set to
show and hide a panel,

to not show a panel at all have it not poll.
Every panel class has a poll class method. Being a class method it is available without an instance of the class being created.
if the poll method return value is non None or boolean True then the panel shows.  In the example below panel shows if the context scene name starts with "Scene"
If the panel polls it instances the panel and in doing so calls the draw methods (draw_header, and draw if expanded)
The draw method below draws the scene name property iff it is exactly "Scene" Remember it must poll.  Only modifiying the poll will show name prop if the scene name is "Bob" for example.
A conditional in the draw method wont stop the panel from being drawn, just the content within. The poll method is the way to stop the panel from being drawn at all.
Have added an __init__ method that prints "init", the poll method prints "poll" and the draw method "draw"
import bpy

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"
    def __init__(self):
        print("init")

    @classmethod
    def poll(self, context):
        print("poll")
        scene = context.scene
        return scene.name.startswith("Scene")

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

        scene = context.scene
        if scene.name == "Scene":
            # it's the scene named "Scene" woohoo
            col = layout.column()
            col.prop(scene, "name")

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

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

if __name__ == "__main__":
    register()

Have produced this answer because the idea that the draw method is called often is in fact not strictly the case, it is called only once per instance of the panel. The panel is instanced a lot... if it polls.
Running above when a scene name polls will print to console
poll # check if panel polls
init # it polls init the panel
draw # draw the content ....
poll
init
draw
poll
init
draw

or if it doesn't poll
poll
poll
poll
...

indicating that if the there is activity to redraw the area the panel resides, it checks if it polls, if it does it instances the panel and draws.
Can see here that rather than having conditionals in the draw, could set a particular  self.draw = self.draw_bob method when initializing the class.
Use a combination of both.
Given the OP's accepted answer, will speculate the panel resides in the file browser and is designed to show when a certain operator is being run. Changing code above such that panel resides in filebrowser tool props
bl_idname = "OBJECT_PT_hello"
bl_space_type = 'FILE_BROWSER'
bl_region_type = 'TOOL_PROPS'

to poll only when export scene obj (for example) is being run.
>>> bpy.ops.export_scene.obj.idname()
'EXPORT_SCENE_OT_obj'

a new poll method to reflect this
@classmethod
def poll(cls, context):
    op = context.active_operator
    return op and op.bl_idname == "EXPORT_SCENE_OT_obj"

Will ensure the panel only instances when that particular operator is active.
Using this poll can rest assured in the draw code of the panel   context.active_operator both exists and is the one of interest.
Use conditionals in draw code based on the operators props, or what is more often the case these days use subpanels that poll based on a condition, within the condition of their parent panel.
Will notice more and more import export operators are beginning to use this method.
Why?  to simply have an always polling panel (the default) and something like
   op = context.active_operator
   if op.prop:
        pass

in draw code will throw an error constantly chattering messages  into console like an endless stream of garbage when the operator doesn't exist or  doesn't have a property prop whenever the tool props panel of filebrowser is active for some other operator we are not interested in.


text:
How can I display a FloatVector without it being editable by the user?
I am writing a python script that takes some user input in the operator and does a calculation. The result is three floats, which I would like to display in a nice form like FloatVector but I don’t want them to be editable. This would produce unexpected results. I passed in only a get() function to the parameter constructor to make a read-only result, but now I can’t set the values via code.
What is the ‘blender way’ of showing data to the user in a ui panel, and if there is none, how can I make this work?

You can disable the row (makes it read-only) and set emboss to False for example:
def draw(self, context):
    layout = self.layout
    # ...
    row = layout.row()
    row.prop(my_data, "my_prop", emboss=False, text="Values")
    row.enabled = False

Or you can use a label:
    row = layout.row()
    row.label(text="Values: {}".format("  ".join(map(str, my_data.my_prop))))

this is perfect! Had no idea about disable row!

Thanks for expanding and enhancing my answer @brockmann ;)

Read only property

I passed in only a get() function to the parameter constructor to make
a read-only result, but now I can’t set the values via code.

Confused as to why you think cannot just set the value of a read only property in the get method.
Silly example, in the main thread sets the value of _booble_gooble to (1, 2, 3)  This  value is used by the float property getter.
This way you have a truly read only property, not one that is being masked in the UI, but possibly available to alter in the custom properties.
import bpy
from bpy.props import FloatVectorProperty
from random import random

_booble_gooble = (random(), random(), random())

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

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

        scene = context.scene

        col = layout.column()
        col.prop(scene, "read_only_float")

def random_value(self):
    # self is scene
    return _booble_gooble

def register():
    bpy.types.Scene.read_only_float = FloatVectorProperty(get=random_value)
    bpy.utils.register_class(HelloWorldPanel)

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

if __name__ == "__main__":
    _booble_gooble = (1, 2, 3) # set it
    register()


text:
Bone moves weird
When trying to move bones in pose mode some of the bones are moving in a sort of robotic motion where they are snapping to locations where I cannot move to the exact location I want. I can't really post this i an image but hoping someone can figure this out.

have you enabled the Snap option?

Where is that located?

3d view > Header menu bar, the magnet icon

It worked. Thanks.


text:
How to use multiple dots in idnames
In add-on operators, you are required to give an idname to each operator. Commonly, it is category.operator. This results in calling the operator with bpy.ops.category.operator. When I tried to put two categories: category1.category2.operator, there was an error. Is there a way to put two categories in an operator idname?
I have the same question for registering Property classes: Normally, in register, I would put bpy.types.Scene.name = PointerProperty(PropClass). When adding multiple categories like bpy.types.Scene.category.name, an error occurs that says NameError: category is not defined. Is there a way to put multiple categories on properties?

Part ii) is equivalent of a.b = 3 which will throw an error if a is not defined or doesn't have property b.  Adding a class property equiv of SomeClass.foo = property() which gives an instance of SomeClass property foo. SomeClass.foo.bar = property() will only work if SomeClass.foo is defined (see python docs)  .. btw don't redefine the name property will cause errors.  Part i) is No too. The devs may change this is in the future, (unlikely to be any time soon)  For time being consider using underscores foo_category.bar_operator

@batFINGER Ok. Thanks. Should I delete this question?

I tried
 bpy.types.Material['custom_float'] = bpy.props.FloatProperty(name="Test Property")
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
TypeError: 'bpy_struct_meta_idprop' object does not support item assignment

>>> bpy.types.Material[custom_float] = bpy.props.FloatProperty(name="Test Property")
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
NameError: name 'custom_float' is not defined

>>> bpy.types.Material.custom_float = bpy.props.FloatProperty(name="Test Property")

The last one was the only one that worked
It looks like underscores are the way to go


text:
Control object emission strength (not material)
I have multiple objects with the same emission material. Is there a way to control the strength of the emission for each object?

Do you want to control the emission without having to dive into the shader editor ? Would a custom property in the scene do it ?

I don't think scene properties would work because I need different objects to have different amounts of emission, but thanks anyway.

Please edit your question and try to re-phrase it. It is not clear what you want.

are you saying that you want several objects to have the same emission material, but you want them to have different strength values?

Yes, that is what I am asking.

The simplest for me would be to use the object pass-index.
This is supposed to be used in the compositor workspace but the value can be accessed in the shader editor. It is an integer value so if you want more precision, you can add a math node set to divide between the "Object Info" node and the "Emission" node.


text:
How to use linked objects with an Array modifier?
I need to create a bricks wall with linkeds option, for use less memory. But i want use this with a Array modifier(a procedural method) . How do this?
Addendum:

Your question is not clear, if you create a brick wall and want to save memory, you can either use Array (but you can't apply it otherwise it won't save memory anymore), or duplicate your brick with alt D

I need a procedural method that use duplicate linked objects.

If by procedural method you mean non-destructive, Array is not destructive, but 1) it tends to be repetitive except with some tricks like displacement, and 2) as soon as you apply the modifier the bricks are not linked any more, but what about bricks that you link-duplicate? With 3 different bricks you can build a whole wall and it will stay very light.

A method would be to use linked-duplicated bricks (AltD).
If you use an Array modifier, it has the advantage of being non-destructive and light as long as you don't apply the modifier, but it will give a bit repetitive result. But you can use a Displacement modifier to solve the problem:

Create a 2 brick object, subdivide them a bit.

Give it an Array modifier on the X axis. Then a second on the Z axis.

Give it a Subdivision Surface and smooth it. Then give it a Displace modifier with a Cloud texture, it will allow you to break the wall uniformity.

For the brick you show, you can do it this way:

Create a plane, subdivide it, bevel the new edges.

Drag the central edge to create the slots, give your object a Subdivision Surface to check the shape, give it an Array on X and Z axis. Put the Subdivision Surface modifier below the Array modifiers.

how to add the line in the texture like this:
https://alafantini.it/administrator/public/8_3prodottibase_g.jpg

you can model it for real or fake it with a bump map, it depends on your needs, if you need to make some close-up shots it would be better to model the grooves

also do you need to see the inner structure?

for trasversal architectonic section. Then i need to see empty space inside.
For line outside brick maybe only bump greek texture

if you want to model your brick it's rather easy, you need to draw its profile with vertices, then extrude. As it's an industrial type of brick, you don't need to use any noise or displacement in the array.

I do this, from svg to mesh extrude. But im using the bevel modifier, dont change nothing.

Let us continue this discussion in chat.


text:
Video Sequencer Cache Button Exists?
Is there a button in the Video Sequencer that, when pressed, will cache as much of the timeline as possible?

Read also https://blender.stackexchange.com/questions/182692/how-to-import-footage-in-the-vse-for-optimal-playback-and-organization

In the preview sidebar, you'll find Prefetch Frames:


text:
how to apply a boolean modifier to a collection
how to apply a boolean modifier to a collection instead an objects?

I think the best way to achieve something like what you are trying to do, is using the Bool Tool add-on.
Activate the Bool Tool add-on (ships with Belender) by checking its box in the Preferences window.
In the 3D Viewport press N, click the Edit tab and click on Bool Tool to extend the menu, if it isn't already.
Then right click the collection in the Outliner window and choose Select Objects.
In the 3D Viewport Shift select the target object (so the collection objects and the target object are selected), and click on the desired boolean operation in the Bool Tool menu. For instance: Brush Boolen Difference.


text:
Problem where 5 Face Flows are Meeting at 1 Vertex
I Think Images WIll be Best... SO those goes... .blend file - Google Drive
You can see How the Mesh is getting Bad where that 5 face Joint vertex is....
I don't wanna describe anymore, you can see for yourself in the image... and in the blend file
But it is Like I can't post the question

A 5 edge vertex such as this is known as a "pole" and is sometimes a necessary part of making a mesh.However, as you are experiencing, they can cause shading issues, especially when placed on a curved surface that has smooth shading applied, or near edges. The best solution in these cases (if the pole cannot be avoided) is to move the pole closer to the center of a flat face. The other issue you have, that is also likely causing shading issues, is the two edge loops that terminate into the side of a quad a little down and to the right of pole you have highlighted in your second image.

I thought About that, Thank You Christopher... I decided That I would keep that in mind while modeling from the next time...


text:
How to bake an air brick with all holes inside
how to bake an air brick

If i start with a cube i can have this result with a baked texture?

you won't be able to fake deep holes if that's your question, but you can fake the grooves on the sides

For the grooves how?

do you mean you don't know how to bake? You need to bake the normals, maybe follow a tutorial on this topic, if you meet an issue please tell

i try to bake with different method(normal, normal with cage). but dont bake the exactly map that i want. If i sent you the HP model con you try do this?

share your file here: https://blend-exchange.giantcowfilms.com/

this is the clean version :

I only see one object, where is the one that will receive the baking?

Add all items in the scene that you neeed:

I found a workaround for solve my question.

create LQ object
Use magic UV map
bake AO of LP with HP
Clean result in inkscape
apply new texture to LQ object with Bump node.
This is the result without subdivision.

It's because your grooves are made of faces that are completely parallel or frontal to the normals of the object that bakes, normal bake save only normals orientations, not depth, you need for example to give a small bevel to the angles or create b&w heights.

how to bake the heights correctly in my case(cube)?

it looks like it's now possible, perhaps check this video: https://www.youtube.com/watch?v=O1__olo3hds


text:
How can I achieve a Anime Shader look in Blender?
So, i saw a post in this Stack about 2 years ago but nobody had awnsered, so im trying to ask another time, does anyone know how to actualy get this Shader in blender 2.8? Somehow they have controls over the shading, and normals. And the shader draws smooth lines around the edges. Here are more examples.
I would like to know, what kind of settings, what kind of stuff I should be looking for, to copy this style with blender, or if anybody pro enough to create a short tutorial it would be amazing!
Here are my examples.

Animation:
https://twitter.com/twitter/statuses/916984184035360768
This here is actually created in blender. https://orig00.deviantart.net/f78a/f/2015/056/9/e/untitled_by_keiichiisozaki-d8jfztd.gif

https://blender.stackexchange.com/search?q=Cartoon+look

https://blender.stackexchange.com/search?q=Anime+style

https://blender.stackexchange.com/questions/66782/how-to-make-toon-shader-more-realistic-and-clean-crooked-shadow-in-models

https://blender.stackexchange.com/questions/33871/is-there-really-a-way-to-make-a-true-toon-shader-material-in-cycles

I recommend anyone interested in that topic to visit blendernpr.org. It's THE place for stylized CGI in Blender.

I specifically made a long playlist where the main characteristics of stylizing a shader play a big role in your character considering:

Vertex painting (to create specific shadows) use separate RGB to create filter for channels that can be later used as specular, reflective, etc. maps.
Using a threshold to limit the light (aka Ramp Shader)
Many math operations between results to ADD light or Multiply it (darken) in the shader editor.
Modeling in regards to how the normals will be affected by light. This is tangent and crucial.
You can copy "simplified" normals from less dense polygonal objects, since you want a very "flat" shading and not light-computed-accurate shaded models. Use the Edit Normals modifier.
Textures can also be used to create masks, so you can have flat colors but limited by black/white textures.
PLANNING a GOOD 2D CHARACTER REPRESENTATION is a MUST! You can't jump into 3D without proper knowledge of what makes your character look 2D.
Mask out any unwanted light shedding on the model. Use alphas in the image node textures.
You can watch more details about these points from simple to complex examples in this series for BLENDER ONLY >>
You can use occluding meshes to create fake shadows. Create a "transparent material" but shadows are opaque. You don't see the occluding material shader, but the shadows will be on top of whatever you want to cast shadows to.


text:
Creating floors for an SVG floorplan converted to 3D and exported for use with Unity
My plan is to convert some floorplans into a map for a simple FPS game in Unity. The building I'm doing has three floors.
My workflow is as follows;

Import svg into Blender
Convert to mesh
Extrude walls to desired height (each path creates 4 vertexes creating nice, thick walls, each with an "inside" and "outside" face
Set each wall to a face for texturing inside Unity (normals are something I'm expecting problems with later on and am yet to deal with)
Import into Unity as OBJ

My problem is creating ceilings and floors. My idea was to simply select the vertices and hit F to fill with a plane, then extrude to the same thickness of the walls created with extruding from the SVG but this isn't a very exact process.
What would be the ideal way to achieve this? Any tips would be greatly appreciated. Needless to say I'm learning as I make this and am a n00b. :)
Thanks!

Maybe just add planes on top and bottom? Nice polycount, easy to hide in Unity if you need so.

Some screenshots to illustrate perhaps?

That was my idea but adding a plane to exactly match the walls seems to be beyond my capabilities.
Edit: obviously I can align it manually. I'm looking for some way to do it without me fiddling and visually aligning stuff.


text:
Armature animation is transformed incorrectly and cannot reset to its default position
I am not sure what I did, but suddenly my bones in pose mode are no longer the one that I had before. And therefore, all the animations I did before (which were normal) are now weird and distorted.
The bones in edit modes are still the ones that I had before, which is expected as rest pose in pose mode:

But in pose mode (rest pose), the bones are now like this (Note the foot bone and arms, which is clearly not the same to the ones in edit mode):

And for animations, the running animation which goes forward is now going backward instead, with a weird animation:

By the way, here's the same animation which I exported before:

Additional information

No constrains nor modifiers (except mirror and IK) are used.

What I tried

Clear transforms in pose mode
Applying transforms in object mode
Re-parent in object mode

What I guess that is happening

I have accidentally applied a position as rest pose (couldn't figure out a button to reset it, however I tried the this process and it modifies the bone in edit mode as well, so I'd discard this possibility)
I have scaled the armatures and as the animation transforms are not scaled, the animation is distorted (however, it doesn't explain why my character is running backwards nor the weirdness in rest pose)

I figured it out. When I was animating I accidentally got into edit mode and pressed ALT-R (thought that I was in pose mode), which reset the roll position of the bones.
Recalculating the roll position brings the bones to the rest position when no transforms are applied.

However, the animation still has weird behavior, it might be that the recalculated roll is different to what I had when rigging the bones.
Anyway, here's my tip: RECALCULATE ROLL BEFORE ANIMATING. So if you accidentally changed the roll, you only have to recalculate the roll and not to reanimate all the animations.

i have same problem with hot keys and modes


text:
I accidentally removed the texture paint window on the left and now I can't continue,
I removed the window where you actually paint the textures (not painting the model but the image) and now I can't continue, how can I get the screen back

You can split the existing 3d Editor into two editors and then change one into an Image Editor - hover your mouse at the top right corner and you should see the option available when you drag the corner of the editor.

You can press the plus button and select Texture Paint under general.


text:
How to display various info text in viewport
How to display various and custom info text in viewport with script and clean with another script and /or shortcut in blender 2.8+(im using 2.9).
SCRIPT FOR DISPLAY
import bpy
import blf

class DrawingClass:
    def __init__(self, context, prop):
        self.prop = prop
        self.handle = bpy.types.SpaceView3D.draw_handler_add(
                   self.draw_text_callback,(context,),
                   'WINDOW', 'POST_PIXEL')

    def draw_text_callback(self, context):
        font_id = 0  # XXX, need to find out how best to get this.

        # draw some text
        blf.position(font_id, 15, 50, 0)
        blf.size(font_id, 20, 72)
        blf.draw(font_id, "%s %s" % (context.scene.name, self.prop))

    def remove_handle(self):
         bpy.types.SpaceView3D.draw_handler_remove(self.handle, 'WINDOW')

context = bpy.context
dns = bpy.app.driver_namespace
dns["dc"] = DrawingClass(context, "Draw This On Screen")

SCRIPT FOR CANCEL TEXT DRAW
import bpy
dns = bpy.app.driver_namespace
dc = dns.get("dc")
dc.remove_handle()

Hi! Bare minimum is to show some effort (research, code, minimal example etc.). Please read: https://blender.stackexchange.com/help/how-to-ask

Also https://blender.stackexchange.com/questions/135123/display-text-on-3d-viewport

need the clear script. in this question and other ther'arent the script for clear in 2.8+

Please take your time and try to explain in detail: what you got and what you'd like to achieve by editing your question.

@batFINGER The question this is marked as duplicate of may have a duplicate answer, but it is not a duplicate question.

@RayMairlot  It's good enough AFAIC.   OP deleted prior question after it was marked as a dupe of question their illustration came from re centering text on screen. .  Hence OP is aware of code to write text on screen. If OP can explain why the answer to question marked as dupe doesn't work for them yeah perhaps re-open.   At the moment it shows very little effort (the other close vote above) .  Will attempt to hunt down a better dupe.

@batFINGER I don't think we should be closing questions based on what an OP has demonstrated they know in other questions. If other people come across this question and get directed to the duplicate I don't think they will find the answer explanatory enough of this problem.

@RayMairlot  Somehow (due to me too) original dupe comes from https://blender.stackexchange.com/questions/135123/display-text-on-3d-viewport  chose to cut out middle man.  The second one re middle of the viewport is the OP's previous question (self removed) after marked dupe One I perhaps could have used as primary dupe again.   Do we need a question for bottom left, top left, slightly left of center, there is one re using 3d coords.

@batFINGER It's certainly getting a bit confusing, I would say this (again, duplicate answer, not question) and this are not good duplicates, the other two are.

@batFINGER I don't think different alignments requires different questions as those would be very similar. Would suggest just adding other alignment options to brockman's answer (if you or brockman have time) and maybe edit the question to something more general like "How do I align modal draw text in the viewport?" so it is not focused  on 'middle'. Thoughts?

you have a method for cancel text after few seconds?

Good approach... What's wrong with that?

We should re-discuss that for python questions specifically. If you look around, python q/a got usually less votes but answering is much more labor intensive than 95% of all the non-python answers (like instructions how to press 3 buttons). To prevent re-iterating the same thing over and over again and also to respect the effort of the original authors -> updating the old answers and closing when the answer nails it or the OP shows no effort is the way to go IMO @RayMairlot


text:
particle distribution with texture does only work in viewport
I want to distribute trees on a landscape (with a particle system) based on a texture. In the particle settings I chose the texture I wanted to use, and checked "Density" below the influence tab in the texture properties. It works fine in the viewport, however, as soon as I render it, all the trees are suddenly evenly distributed.
Rendered View

Have you tried weight painting?

Yes, weight painting works as expected, but there are many mountains in this landscape, which I don't want to paint out manually, especially when I have the exact texture already. Mabie there is some way of importing the texture as a weight paint map?


text:
Eevee render much too bright
Beginner working through Grant Abitt's seashack tutes.
Eevee renders too bright. The colour is ridiculous. Like a nuclear bomb exploding overhead.
I turn down the world strength, I delete lights, I turn the sun down to zero, and it makes no difference. The render is still ridiculously bright.
If anyone can help, here's a link to the blend file.
https://www.dropbox.com/sh/kaz5jgkt4zl1914/AACu4HlwYoTb8ClGhusl-WEka?dl=0

In the Viewport Shading switch your settings back to default, and in the Render settings > Indirect lighting, delete the Lighting Cache.

Thank you so much! It worked perfectly.


text:
Blender Shrink/Fatten Issue
I have a mesh that I want to shrink but when I try to...it doesn't really go well (see GIF).
Someone has a fix for this?
https://i.stack.imgur.com/5X59m.jpg

Hi. While videos can be good, ideally all question content should be in the question body, in the form of good descriptions of the issue and images. Also, please make the title of your question specific to the problem you are having and not just the general topic. Thanks.

If you used the current version of Blender(2.83.4 at the time of writing) you would not have such an issue. In 2.79 this operation used to not work correctly with Individual Origins selected as pivot point for transform operations. Select another to fix this:

This worked! Thanks!


text:
Is banding in solid view normal?
If I set up a cube in solid mode and put the view inside it, I see what looks like a lot of banding:

If I up the contrast, it's a lot easier to see:

Is this normal limitations-of-8-bit, is it a blender problem, or could it be a graphics driver problem?
I realize it doesn't look like a lot of banding on the screenshot, but it's far more noticeable when panning around.
Edit in response to duplicate
This is not in rendered images (at least that I can tell), just in the viewport.

there is no way to escape banding on 8 bit displays You can try dithering the rendered images. https://blender.stackexchange.com/questions/5795/what-does-dither-do-in-cycles/5800#5800

Does this answer your question? Rendered image shows visible "line strokes" artefacts

https://blender.stackexchange.com/questions/137459/blender-2-8-cycles-denoiser-produces-banding/137471#137471 and https://blender.stackexchange.com/questions/6488/spotlight-with-halo-applied-is-creating-rings-around-light/6489#6489

@susu Thanks, none of the questions you linked helped, afaik those are about rendered images, this seems to just be in the viewport. As for the bit on 8 bit displays, how do I tell if it's just that usual 24-bit color limitation or if there's something else going on?

255 tones is not enough to resolve subtle changes on values that are similar.

Rendered image is dithered by its natural process. But view port do the rendering directly and without sampling or sample far less from final render. Then banding effect will become highly noticeable. (Also view-port might use 6-bit for faster rendering perhaps)

I have the same problem. I don't know how to totally fix it, but I learned that if you choose 16bit in output it looks a little bit better, also to set 2.0 in dithering in post processing.


text:
Window min max when switching viewports?
I am looking for a way to toggle from the quad viewport (top,left,front,persp etc) to making one viewport larger Blender 2.8 is amazing but the hotkeys and viewport navigation is not intuitive.
This is an example in Silo: Here I have a quad viewport and I moused over to perspective and hit spacebar and it went full display in quad layout. From there I can hit spacebar again and mouse over another view, hit spacebar again and can toggle back and forth. Does Blender have that ability or is it something I might have to script in Python?

in Blender it's CTRL+spacebar and no offense, but I think you're confusing "intuitive" with "what I'm already used to"

Think the point was missed. Thank you for the answer but I am asking about switching viewports to min max. what I have seen is you can max perspective and have to use NUM keys in that port to go top,left,bottom etc. Your answer only maximizes and hides properties, animation and menu bars. No offense but people keep missing what I am trying to get help with.

right, then sorry, I thought that was what you meant by "min/max viewport", but obviously not. Can you try to describe a bit more what you're after?

Hi, ok here it is: I am in quad view, and am looking for a way to go let's say switch to 'top' viewport.. now I want to make that viewport full view. then do my editing, switch back to quad and now I would like to go to 'left' viewport and make that full view, etc, The only thing I could use so far would be in quad view and the perspective viewport can be made full and can only toggle left,top,bottom etc with the gizmo. thanks for helping me so far.

okay, then there isn't really an equivalent in Blender (apart from CTRL+ALT+Q to get in and out of quad view). You might be better off splitting your viewport in 4 (by dragging the corners) and setting each view manually then using CTRL+spacebar to max them

this sounds like what you need: How to maximize a view from quad view Unock the view and then use Ctr+Alt+Q

@susu I was writing a comment to say just that :) Also, you can remap that shortcut (preferences>keymap>search for "quad") to something easier to reach, like say CTRL+\

Holy, the moderators and Stack are ridiculously nit picky about posts. This is a question and answer type of website(s) and if am getting character deleted and flagged I will go somewhere else. I said nothing out as I believe 'wrong' or inflammatory. I will go elsewhere to talk about Blender and help in migrating from other applications to working now in Blender. Thank you all for your time.

Nothing personal, I'm pretty sure it's just to avoid duplicate questions, same as on any other stackexchange sites (which are quite different from forums or quora). Maybe try https://blenderartists.org/ for a more casual time. The big shame is that it was flagged as a duplicate of a question that doesn't have a good answer, when the one susu pointed out is way better! https://blender.stackexchange.com/questions/31221/how-to-maximize-a-view-ex-front-ortho-in-blender

Nothing personal but your guys are total jerks. I did NOTHING wrong, was not mean, abusive and feel like I have to walk on eggshells on these sites. Find someone to delete all my info as I couldn't find it from digging around of the Stack master sites. I am very disappointed in how this Stack site operates. I am spreading the word to have anyone I know to never signup for your services.

related link: https://blender.stackexchange.com/questions/18320/how-to-change-the-default-views-of-quad-view


text:
Where is build version info in 2.90, if not on the Splash Screen?
Earlier, I used to click on the Blender icon > Splash screen to get build info, build times, hash etc.
It is not on the splash screen anymore. It only shows major version.
Where can I find the info ?

It is in the App (icon) menu > About Blender.


text:
Extra Keyboard Shortcuts for Porportional Editing?
It's nice to enable/disable proportional editing with O, but I'd like to switch between falloff settings with a keyboard shortcut. If I open the the menu and right click on an option, the "Assign Shortcut" option is there, but blender doesn't seem to be able to differentiate between the different modes if I assign different shortcuts:

Is there any way to get it to work?

Will the falloff pie menu meet your requirement?
It should be ShiftO by default:

You can search the shortcut in preference with keyword falloff:


text:
Custom Shapes are gigantic
I've been having a lot of trouble with doing custom shapes for my bones. I think I know where the issue stems from: I had to change the size of my armature because I switched unit types and wanted my mesh to be measured in metric/centimeters to reflect real life size. Thus changing something? I had to make the armature bigger to accommodate the real life size.
Does anyone know how I could fix this without having to edit the small plane (the plane) until it is in the position and size that I want? (Plane is an example I set up not indicative of the shape I want)
Thank you very much for any help you attempt to provide.

Image is of after I orient custom shape. Before I do the custom shape (plane) is just as the wireframe.

When you change size in object mode always apply the changes (Ctrl+A) https://blender.stackexchange.com/questions/7298/why-is-it-important-to-apply-transformation-to-an-objects-data

I already applied it.
Moreover I tried updating blender to see if it had a solution and now its in this weird new UI that doesn't work and I can't open my file in the old version again. I've been crying all morning because I've lost weeks of work. I just wanted some custom shapes. Now all I want is for Blender to work again instead of this awful UI where I can't do anything. And any file type I export it as won't let me keep my old model.


text:
Streaking Behaviour of Lights - Render but not Viewport
My scene in the viewport looks like this:

But the render comes out like this (hopefully the jpeg's not too bad):

I have no hidden lights, no random meshes. There should be no reason the lights "smear" as they do. I've thought about hiding the light from the reflection rays with the light path node, but I'm not sure how to do that and it seems entirely unnecessary. I see the second light from the left's reflection on the plane, but that's pretty easily solved (in the viewport, anyway) by just moving it back a bit. There's no weird compositing things going on either.
What's going on? Thanks.

It looks like the render is the physically correct way to render lights over that kind of surface. Looking up reference images of sunsets over an ocean show similar effects. To make the light not travel that far down the surface of your floor, you'll likely need to lower the power of the lights.
I wonder if the floor has a modifier on it that changes it's displacement that would only show up on a real render, and not in your viewport.


text:
How to view the python command triggered when an action happens in 2.8?
In Blender 2.7 you could drag down the info area and view all the python commands that are being executing when you run an action.

How can you do the same with Blender 2.8+?

Sure. Just go to any window (I use the timeline so long as I'm not animating), and select "info" as the editor type.

The information should appear as you expect.


text:
How to get all keyframes for selected strip in python?
Suppose we have an image strip in VSE and it has 2 keyframes for its opacity. How can I edit the values of each one of them via python?

Import the bpy module to access Blender's data.
import bpy

Context Method
If you just created the keyframes and are simply scripting in the text editor, you can look up the objects by context. You need to be certain that the strip has two keyframes and is selected (active) in the sequencer.
Get the active scene by context.
scene = bpy.context.scene

Get the active sequencer strip by context.
strip = scene.sequence_editor.active_strip

Lookup the fcurve connected to the data_path of the active strip with it's name and property. (Look at batFINGER's answer on how to construct the data_path more elegantly with strip.path_from_id("blend_alpha").)
data_path = 'sequence_editor.sequences_all["' + strip.name + '"].blend_alpha'
fcrv = scene.animation_data.action.fcurves.find(data_path)

Assign some values to the keyframe_points stored in the fcurve.
for i, y in [[0, 0.0], [1, 1.0]]:
    fcrv.keyframe_points[i].co.y = y
    fcrv.keyframe_points[i].handle_left.y = y
    fcrv.keyframe_points[i].handle_right.y = y

Force the sequencer to refresh.
bpy.ops.sequencer.refresh_all()

Data Method
If are trying to use this functionality from an addon or are unsure wether an active strip is selected or even if keyframes are present at all, you have to validate the data.
View code snippet from github.
Encapsulate the functionality in a method, which can be aborted, if a precondition is missing. The required parameters are:

the scene's name

the sequencer strip's name

the values which are used to overwrite the existing keyframes values
def modify_strip_keyframes(scene_name, strip_name, keyframe_values = [1.0, 0.0]):

Get the scene by name, but return if it doesn't exist.
    scene = bpy.data.scenes.get(scene_name)
    if scene == None:
        print("Scene not found.")
        return

Verify that there is animation_data and a sequence_editor. If there are no keyframes or no strips, these items will be None. (Calling properties of None will crash the script.)
    if (scene.animation_data == None or scene.sequence_editor == None):
        print("No strips with keyframes.")
        return

Get the strip by name and get the fcurve associated with it's blend_alpha (the opacity) property.
    strip = scene.sequence_editor.sequences.get(strip_name)
    if strip == None:
        print("Strip not found.")
        return

    data_path = 'sequence_editor.sequences_all["' + strip_name + '"].blend_alpha'
    fcrv = scene.animation_data.action.fcurves.find(data_path)

    if fcrv == None:
        print("No opacity keyframes found.")
        return

Verify that there are as many keyframe_points on the fcurve, as values have been supplied. Then loop over the points and assign the new values to the keyframe_point coordinates co.
    if len(fcrv.keyframe_points) != len(keyframe_values):
        print("The strip has " + str(len(fcrv.keyframe_points)) +
            " keys, but " + str(len(keyframe_values)) + " values were supplied.")
        return

    for i in range(len(fcrv.keyframe_points)):
        key = fcrv.keyframe_points[i]
        key.co.y = keyframe_values[i]
        key.handle_left.y = keyframe_values[i]
        key.handle_right.y = keyframe_values[i]
        key.handle_left.x = key.co.x
        key.handle_right.x = key.co.x

To execute the function, call it and refresh the sequencer to visualize the change.
modify_strip_keyframes("Scene", "cat", keyframe_values = [1, 0.5])
bpy.ops.sequencer.refresh_all()

Very comprehensive If I had have seen this before answering wouldn't have bothered.  Path from ID gives some point of diff.

I didn't know path_from_id. I will give a reference to your answer.

You opened my horizons, thank you!

Find the fcurve based on its datapath
The suggestion of toggling into graph editor and looking at the visible fcurves, will be dependent on graph editor settings.
Instead create the datapath that is keyframed and search for it in the action fcurves.
VSE strip animations belong to the scene object.
Script below

gets the active strip

finds the path of the active strip from its ID object, the scene, an example for active movie strip named "Foo"
 'sequence_editor.sequences_all["Foo"].blend_alpha'

Searches for it within the scene actions fcurve collection

Note: Many or all of the properties above could have value None including the sequence editor the active strip, the animation data and the action.  Would need to test for each.
import bpy
from bpy import context

scene = context.scene
seq = scene.sequence_editor
active_strip = seq.active_strip
datapath = active_strip.path_from_id("blend_alpha")
action = scene.animation_data.action

fc = action.fcurves.find(datapath)

#Assuming you are at VSE with your strip selected
context.area.type = 'GRAPH_EDITOR'
for fcurve in context.visible_fcurves:
    for keyframe in fcurve.keyframe_points:
        #Do w/e you want with the keyframe
        pass
#We switch back to VSE
context.area.type = 'SEQUENCE_EDITOR'

My misconception was that Graph > Keyframes. While the reality is Graph > FCurves > Keyframes.


text:
Why am I unable to color my volumetric clouds white?
I am trying to render a cover of white clouds as seen from above. I am using the Principled Volume shader, using gradient and noise textures. It now looks as follows:

However, the clouds are very dark (even though I set the color to white), and I don't know how to change this. I put a purple sun light with maximum strength right above, but it only colors some contours. I've also tried HDR environment maps. How can I get the clouds to be white, just like real life clouds on a sunny day?

After replicating your node network I found reducing the anisitropy value on the principled volume node makes the clouds whiter

Thanks for the suggestion! It alleviated the problem, but didn't really solve it, as the base color still was black.

I solved the problem by scaling down my entire scene. Apparently large-scale clouds aren't rendered correctly, and in my case there was a pretty clear threshold at which it started showing its base color.

Turn up Max Bounces -> Volume or the ray will be reported as lost if it bounces into the volume and not immediately to a light source.

Once bounces are increased you can multiply the density to get a thicker volume appearance.
For very very large volumes it may be appropriate to introduce a little bit of emission just to emulate atmospheric scattering without the computational cost.

i had the same issue in eevee :
the volume shader appeared black.
i figured a solution (blender 3.5):

use the Principled Volume Shader
set color to black !! (do not ask me why)
set density to 0.001 (do not ask me why)
finally, control the white intensity:  with the emission-strength slider (0.008) !
do not forget to set the blend mode of the volume to AlphaBlend or AlphaHashed (in material settings)

image:

if volume has an attribute 'dencity' you can plug it to blackbody to make it whiter, but you should use low values for multiplier to get good result
with dencity attribute:

without dencity attribute:


text:
What is the difference between Active Strip and Selected Strip?
I understand that the active strip can only be 0 or 1 and that the selected strips can be >= 0, but other than that, what is the meaning of these 2 concepts?
A Python scripting perspective would be appreciated.

Most Blender operators, Interface action "work" on active object (eg. the RHS information tab, apply modifier); Selected objects... are just been selected.
Selecting — Blender Manual
If a method, operator can handle multiple objects at once, it might uses selected objects. Otherwise, active object will be chosen. Back to the 2.79 time, selecting multiple object and go in edit mode will only go in edit mode for the active object. Now it uses selected objects and active object in Blender 2.80.
So if a job/operator need to work on something, and there should be only one instance that being handled at a time. Active object will provide only 1 object or None, make it easy to deal with. And the User Interface will always make active object different, letting the user know which object are going to be deal with. So the word active.
And, surprisingly "active object can be not selected" after you deselected it. Which mean active object is the "last object you interact with".


text:
How do I rename all object as same as their material name?
Newbie. I have a scene with so many objects. I want to rename them at a single time same as their material name. How do I do that? Is their any script/plugin?

Name objects after active material
May or may not work as you expect.  All objects could share one material and hence renaming would end up with objects named "Material", "Material.001", ... following the blender naming convention for unique object names.
An object can have many materials.
Test script have renamed every object in scene after the name of its active material if it has one.
import bpy
from bpy import context
from bpy import data

# all objects
all_objects = data.objects
# scene objects
scene_objects = context.scene.objects
# selected objects
selected_objects = context.selected_objects

for ob in scene_objects:
    if ob.active_material:
        ob.name = ob.active_material.name

for all objects in blend edit and use
for ob in all_objects:
    ....

similarly for selected_objects

thank you so much,
It worked perfectly
what if i want to rename with material's diffuse map/base color (or whatever map used for the color texture) name?
for ob in all_objects:
if ob.active_material:
ob.name = ob.active_material.name.Diffuse_MAP_NAME
i meant something like this


text:
Nvidia problems on Linux
When I install blender through my package manager (xbps) or Flatpak, it does not detect my GPU. I should see the options for OptiX and CUDA (and maybe OpenCL, too?) for my GPU, but I just do not. When I run the binary in the tarball off of blender.org, I do see the CUDA option, but not OptiX. There's nothing wrong with my drivers as far as I can tell, nvidia-smi and the like work normally. I see no reason this shouldn't work that I know of. This was a problem with most distros (excluding Pop!_OS) that I ran. My solutions so far are to either wait for AMD to have good GPUs or just retreat back to Pop!_OS. Are there any common things to check for when nvidia drivers decide that working is too much effort?
Random Possibly Useless System Info:
RTX 2060 with proprietary drivers, 3900X, Void Linux

here on ubuntu I could only render using CUDA when running blender as root

@wilks wait what reason is there for running blender as root?

can't remember exactly but I think it was because of a bug in NVIDIA's drivers


text:
Where to put external Python Blender scripts when Blender was installed from Snap?
I wrote a Python script which uses Blender API and outputs render scene frame range. I want to execute it over a few files with no GUI/in the background. I found this thread which explains that I can put my script in path_to_blender/version/scripts/addons and later execute using blender.exe --background myFile.blend --python ./version/scripts/addons/superScript.py
The issue I'm having is that I don't know where to put my script as I installed Blender from Snap and so the file structure looks different. I found /snap/blender/current/2.83/scripts/addons but when trying to copy anything into it, it returns cp: cannot create regular file './get_scene_framerange.py': Read-only file system I also checked the following directories:

/var/snap/
/var/lib/snapd/
/home/username/snap/

but only /snap/ has dir called addons/
Ideas?

After talking to the guys on the official Blender forum #python it turned out the scrip can be located pretty much anywhere and it doesn't need to be in a special directory, as I thought before. To run it I used a command i.e: blender --background monkey_test.blend --python ./get_scene_framerange.py where the last bit is a path to the script located anywhere


text:
I hit a hotkey and something happened to my sculpt and i dont know what it is

I hit a hotkey and I'm not sure what it is and how to undo it, please help.

This is a shot in the dark but it looks like your Normals got inverted?
If that's the case go-to edit mode select all of the vertices then navigate over to
Mesh>Normals>Recalculate outside


text:
How can I transform origin when I am in Edit Mode with shortcut?
I come from Maya, and my first problem as you probably know is how can I transform origin in edit mode with shortcuts. Is there some good addon even paid or can I keymap this. What I want is this:

Select object in object mode with mouse
Swith to Edit mode with Tab key
Select some verticies with mouse and Shift key
Press (Some key) to switch on/off for transforming origin
Press (Some key) to activate on/off Snapping mode
Press (Some key) to switch Snapping mode, etc: edge / vertex or even closest or middle

Thank you.

here are some thing to get you started.
Shift + Tab for switching Snapping on/off
Shift + Ctrl + Tab for switching between Snapping options/methods
Transforming origin -  So you are asking for transforming origins, probably so that you can move/scale/rotate at that origin. But Blender has a more elaborate method to do so, by using 3d Cursor. Its a just a null pointer made for this purpose. Simply being in edit mode press Shift + S and you will find options to change the 3d Cursor location like this -

Also you can select some loops and snap the 3d Cursor using same method Shit+S. Still only the Cursor position will change, else nothing is going to change. Now press "." near right Shift on keyboard for this menu and you will have to select 3d Cursor , now things will move/scale/rotate from this point/3D cursor/Temporary origin. -

Also please enable Pie menu from the preferences -  ITS A GREAT TIME SAVER !

I think it would be good to edit these into one answer.. then I would know which one to UV :)

If you mean object origins: (as opposed to current transfrom pivot point)
I do it by having the shipped add-on 'Pie Menus' activated, in particular, 'Origins Pie'.
It's supposed to have the shortcut CtrlAltX but for some reason, (can someone suggest maybe why?) on my Linux, this won't bind, so I've switched it to ShiftAltX in my keymap, which works in Edit Mode, and Object Mode. That menu gives you most of the snapping options you will need.
You could also assign a shortcut to the Object Mode Header > Options > Origins checkbox, which will display the Object space axes of the selected objects, and allow them to be transformed and snapped like any other object.

Alternately - To select options for 3d cursor

and to select the origin as 3d Cursor(Will enable blender to use 3d cursor location as origin)


text:
How to move texture via rig
I'm trying to make a character model where I can move the pupils. Is there a way I can make the eyes so that I can move the pupil texture around the eye using a rig?

To my knowledge textures can't be rigged.

I’ve seen other people do it.

You can add drivers to the uv coordinates.

You can parent an object, e.g. an Empty, to a bone in a rig and then use that object's location as texture coordinates in the Eye object's material.
This way the Empty will follow the Rig, and the Texture will follow the Empty.
Add an empty to your scene and place it where you want the pupil to be on the eye.
Select your armature and go into Pose mode.
Click on your Empty
Shift-click on the bone
CTRL-P -> Bone
Now the empty will follow the bone.
In the shader editor for your eye material:
Shift-A -> Texture Coordinates.
Select your empty from the Object field at the bottom of this node.
Use the Object output of the Texture Coordinates node as coordinates for your texture. Remember that Image textures usually use only the X and Y components of their coordinates vector, so you may have to rotate your empty so that Y is up/down, or you could swizzle the Y and Z components of the vector using SeparateXYZ and CombineXYZ nodes by simply plugging X to X, and Z to Y.

This result can be obtained by keyframing the texture's offset in the texture's Mapping panel. Rigging is done with bones and applies to meshes that are 3D whereas textures are images.


text:
My mesh, triangles and sphere?
I created this piece but I'd like to delete triangles to have a perfect result and use a Subsurf.
How I could to do to improve my mesh ?

Thank you so much !

it would be easier if you shared your file, but maybe you should choose another topology at the beginning, i.e. a cube that you subdivide instead of a UV sphere:

My suggestion:
Something that worked for me when editing the mesh of a character after applying a skin modifier was to add an edge loop wherever possible around tri-faces.
Basically add an edge loop in the quads next to the tri face, and poof, you have quads there. You can adjust the edgeloops' locations by alt+LMB to select, and the G key twice to move.


text:
How to convert SFM models to Blender on a Mac?
I want to convert some SFM models to Blender but all the conversion tools I can find (i.e. Crowbar) are for Windows only. Is there any way to port SFM models to Blender on a mac?

I know you asked this 8 months ago. but there is a way to install windows on a mac. it will partition your hard drive. it's dual booting. this is done by an official application included in macOS, called Bootcamp assistant. you'll need a 32GB or bigger pendrive, and a copy of windows (which is provided by Apple on the app's website) I've used it a lot. macOS can interact with the partitioned windows part of the hard drive, but it's read-only. (you can only open files from the drive, or copy them to a write and read the drive and modify the copy) unfortunately, windows cant interact with mac. to switch OS hold alt when booting up the PC and you'll see two drives. "windows" and "Macintosh HD" in that order. if you don't hold alt, it automatically boots on windows. I don't know if you can change it.