text:
Create a next button inside panel
I was working with the addon but I have stuck at this situation. I want to press the Next button inside panel then, new operators should pop up and the rest operators should be removed. Basically, I want to know how does Next button work.
There is a better example in the screenshots to understand what I am looking for.

import bpy
C = bpy.context
D = bpy.data
O = bpy.ops

class ADDON_PANEL(bpy.types.Panel):
    bl_label = "Add Objects"
    bl_idname = "pl.add_mesh"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Add Objects"

    def draw(self,context):
        layout = self.layout
        layout.operator('meshes.delete_all')
        row=layout.row(align=True)
        row.operator('back.op')
        row.operator('next.op')
#        layout.operator('mesh.add_cube')

class NEXT_OP(bpy.types.Operator):
    bl_label = "Next"
    bl_idname = "next.op"

    def execute(self, context):
        return {'FINISHED'}

class BACK_OP(bpy.types.Operator):
    bl_label = "Back"
    bl_idname = "back.op"

    def execute(self, context):
        return {'FINISHED'}

class ADD_OBJECTS(bpy.types.Operator):
    bl_label = "Add Cube"
    bl_idname = "mesh.add_cube"

    def execute(self, context):
        O.mesh.primitive_cube_add()
        C.object.modifiers.new('Subdividion','SUBSURF')
        return {'FINISHED'}

class DELETE_ALL(bpy.types.Operator):
    bl_label = "Delete all objects"
    bl_idname = "meshes.delete_all"

    def execute(self, context):
        bpy.ops.object.select_all(action='SELECT')
        bpy.ops.object.delete(use_global=False, confirm=False)
        return {'FINISHED'}

classes = (ADDON_PANEL,  DELETE_ALL, NEXT_OP, BACK_OP, ADD_OBJECTS)
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()
```

Share the code along with the question

I would use a custom property for the UI to store the page number (How to create a custom UI?). The Next button increases the number and the Back button decreases it. In the draw method, use the value to decide which buttons should be shown on the given page. The property is stored in the scene.
Notes:
Beware that if there is an error in the draw method you only will see it in the System Console. There is no error popup.
If you have different independent scenes, there will be different options for your add-on in each scene.

import bpy

from bpy.props import (StringProperty,
                       BoolProperty,
                       IntProperty,
                       FloatProperty,
                       FloatVectorProperty,
                       EnumProperty,
                       PointerProperty,
                       )
from bpy.types import (Panel,
                       Menu,
                       Operator,
                       PropertyGroup,
                       )

C = bpy.context
D = bpy.data
O = bpy.ops

class ADDON_PANEL(bpy.types.Panel):
    bl_label = "Add Objects"
    bl_idname = "pl.add_mesh"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Add Objects"

    def draw(self,context):
        layout = self.layout
        layout.operator('meshes.delete_all')

        my_tool = context.scene.my_tool   # access to properties

        print('draw: my_tool.wizard_page_number -> ', my_tool.wizard_page_number)

        # decide what to draw on the current page
        row=layout.row(align=True)
        if my_tool.wizard_page_number > 0:
            row.operator('back.op')
        if my_tool.wizard_page_number < 3:
            row.operator('next.op')
        if my_tool.wizard_page_number == 1:
            layout.operator('mesh.add_cube')

        layout.prop(my_tool, "wizard_page_number")

class NEXT_OP(bpy.types.Operator):
    bl_label = "Next"
    bl_idname = "next.op"

    def execute(self, context):
        my_tool = context.scene.my_tool   # access to properties
        my_tool.wizard_page_number += 1   # next page
        return {'FINISHED'}

class BACK_OP(bpy.types.Operator):
    bl_label = "Back"
    bl_idname = "back.op"

    def execute(self, context):
        my_tool = context.scene.my_tool   # access to properties
        my_tool.wizard_page_number -= 1   # prev. page
        return {'FINISHED'}

class ADD_OBJECTS(bpy.types.Operator):
    bl_label = "Add Cube"
    bl_idname = "mesh.add_cube"

    def execute(self, context):
        O.mesh.primitive_cube_add()
        C.object.modifiers.new('Subdividion','SUBSURF')
        return {'FINISHED'}

class DELETE_ALL(bpy.types.Operator):
    bl_label = f"Delete all objects"
    bl_idname = "meshes.delete_all"

    def execute(self, context):
        bpy.ops.object.select_all(action='SELECT')
        bpy.ops.object.delete(use_global=False, confirm=False)
        return {'FINISHED'}

# ------------------------------------------------------------------------
#    Scene Properties
# ------------------------------------------------------------------------
class MyProperties(PropertyGroup):

    wizard_page_number: IntProperty(
        name="Wizard Page Number",
        description="Current Page of the Wizard",
        default = 0
        )

# ------------------------------------------------------------------------
classes = (ADDON_PANEL,  DELETE_ALL, NEXT_OP, BACK_OP, ADD_OBJECTS, MyProperties)   # register MyProperties
def register():
    for cls in classes:
        bpy.utils.register_class(cls)
    bpy.types.Scene.my_tool = PointerProperty(type=MyProperties)    # store in scene

def unregister():
    for cls in classes:
        bpy.utils.unregister_class(cls)
    del bpy.types.Scene.my_tool                                     # delete from scene

if __name__ == "__main__":
    register()

That's really, helpful. Is there any way to do it without using properties?


text:
How to know that the operator is being pressed?
I have created a function above in the script, I want the function repeated if I press the Continue button.
To do this, I would need to tell bpy that this operator is True or pressed but I don't know how to do that.

code is here.
import bpy
import bpy.utils.previews
from easybpy import *
from bpy.props import StringProperty, BoolProperty, IntProperty, EnumProperty, FloatProperty
from bpy.types import PropertyGroup, Operator, Panel
from bpy_extras.io_utils import ImportHelper, ExportHelper

def datafunc(boxes, upload):
    scene = bpy.context.scene
    props = scene.COMP_PROPS
    boxes.label(text='Country Name')
    boxes.use_property_split = True
    boxes.use_property_decorate = False
    boxes.prop(props, 'String')
    boxes.prop(props, 'Float')
    img = boxes.operator(upload)

class ComparisionProperties(bpy.types.PropertyGroup):

    Float : FloatProperty(name='')
    String : StringProperty(name='')

class ImageOpertoar(Operator, ImportHelper):
    bl_label = 'Upload Image'
    bl_idname = "upload.image"

    filter_glob: StringProperty(
    default='*.BMP;*.JPG;*.IRIS;*.PNG;*.JPEG;*.TARGA;*.OPENEXR;*.TIFF;*.WebP;*.GIF;',
    options={'HIDDEN'})

    def execute(self, context):
        bpy.ops.image.open(filepath=self.filepath, use_udim_detecting=False)
        return {'FINISHED'}

class ComparisionPanel(bpy.types.Panel):
    bl_label = 'Compare'
    bl_idname = 'COMPARE_DATA'
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_context = ''
    bl_category = 'Comparision'
    bl_order = 0
    bl_ui_units_x=0

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

    def draw(self, context):
        layout = self.layout
        row = layout.row()
        row.label(text='Enter your Data', icon_value=0)

        boxes = layout.box()
        upload = 'upload.image'
        datafunc(boxes, upload)

        row1 = layout.row()
        row1.operator('continue.panel')
        datafunc(boxes, upload)
        row1.operator('finish.panel')

class ComparisionContinue(bpy.types.Operator):
    bl_label = 'Continue'
    bl_idname = 'continue.panel'

    def execute(self, context):
        return {'FINISHED'}

class ComparisionFinish(bpy.types.Operator):
    bl_label = 'Finish'
    bl_idname = 'finish.panel'

    def execute(self, context):
        return {'FINISHED'}

def register():
    bpy.utils.register_class(ComparisionProperties)
    bpy.utils.register_class(ComparisionPanel)
    bpy.utils.register_class(ImageOpertoar)
    bpy.utils.register_class(ComparisionContinue)
    bpy.utils.register_class(ComparisionFinish)
    bpy.types.Scene.COMP_PROPS = bpy.props.PointerProperty(type=ComparisionProperties)

def unregister():
    bpy.utils.unregister_class(ComparisionProperties)
    bpy.utils.unregister_class(ComparisionPanel)
    bpy.utils.unregister_class(ImageOpertoar)
    bpy.utils.unregister_class(ComparisionContinue)
    bpy.utils.unregister_class(ComparisionFinish)
    del bpy.types.Scene.COMP_PROPS

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

Using global variables

what do you mean? How would I do this? any example.

Here is a similar example you can refer to

import bpy

my_data = []

class PropGroup(bpy.types.PropertyGroup):
    my_string : bpy.props.StringProperty(name='')

class Op_add(bpy.types.Operator):
    bl_idname = "wm.op_add"
    bl_label = "Add text"

    def execute(self, context):
        my_data.append(bpy.context.scene.my_group.my_string)
        return {'FINISHED'}

class Op_fin(bpy.types.Operator):
    bl_idname = "wm.op_fin"
    bl_label = "Get result"

    def execute(self, context):
        print("Op_fin execute")
        return {'FINISHED'}
    def invoke(self,context,event):
        self.s = '-'.join(my_data)
        my_data.clear()
        return context.window_manager.invoke_popup(self)

    def draw(self, context):
        self.layout.column().label(text=f"Result = {self.s}")

class XX_Panel(bpy.types.Panel):
    bl_idname = "XX_PT_Panel"
    bl_label = "XX Panel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_category = "NEW"

    def draw(self, context):
        layout = self.layout
        layout.row().prop(bpy.context.scene.my_group, "my_string")
        layout.row().operator("wm.op_add", text = f"Add text {len(my_data) if my_data else ''}")
        if my_data:
            layout.row().operator("wm.op_fin")

def register():
    g = globals()
    for k in g:
        if isinstance(g[k], type): # Check if it is a class
            bpy.utils.register_class(g[k])

    bpy.types.Scene.my_group = bpy.props.PointerProperty(type=PropGroup)

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

Thank you very much for writing the script for me. I am new to bpy, that's why I was not getting you.

source: Stack Exchange

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

sort: votes


text:
How do I get rid of this shading pattern?
The artifacts appear when I increase the metallic factor in the bsdf shading node. Smooth shading is on, normals are correct, and I'm pretty sure there aren't any duplicate faces. I got the material from the blender market(free) and I tried to simply change the metallic value on the bsdf.

The screenshot a node group named “alternating color” with an off-screen vector plugging into it. Bluntly, even with how almost ridiculous little information that gives on the shader tree, I’m sure it’s the problem.

Hello and welcome! There is something wrong, maybe clipping, with the calculation you feed into the Height of the 2nd bump node. double check the "Knitter Shape" calculation.

After messing around with other files, it seems that the edges appear with procedural materials in general when the metallic factor increases and its just prominent in this file. I've messed with the nodes in this file including the ones feeding into the second bump map and nothing seems to cause it except the metallic factor. Is this just something I'd have to just work around?

The answer is very simple. Your quad polygons are not planar. The renderer only sees triangles, not quads, so the ones that face upwards or lit brightly, and the ones that face downwards or lit dimly.

You can kinda circumvent it with a bit of tweaking though. I have to say the material is a bit suprising. Usually physically speaking a surface is either metallic (1) or not (0), here it's set to 0.6 or so which is weird. Also the roughness is set to 0 which makes it extremely reflective, thus making it obvious your faces are not planar since light is reflected in its entirety relatively to the surface normal. Try setting it to a higher value (0.4 or so)

I think what the author of the material wanted to do is use the Sheen factor instead of the material. You can manually entrer a value higher than 1 to get a more noticeable effect. https://i.sstatic.net/0HqIH.png

@Gorgious the non planar quads is true but im not sure if thats the reason since the smoothness works with another material, just not with the OP's customized shader. i think its something with the bump map.

After looking again, its definitely the bump map. When I remove the second bump node, the shading is smooth. Im having a hard time finding the root cause. I'm gonna continue messing with the related nodes though.

Ok I found a good work-around. I increased the roughness to about 3.5. I disconnected the bump node from the Principled bsdf.(The translucent bdsf still has the issue but its hard to notice.) I then connected the bump map to the metallic factor with a  ColorRamp and math-multiply node in between. And now the individual stands are shiny like I wanted without the artifacts being noticable.

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


text:
Is my soft body mesh flawed for soft body physics?
I want the "Pachi Shell" to behave like a semi-rigid plushi. I've spent several hours tweaking stiffness, push/pull, self collision, etc, but I can't get the results I want before it the mesh acts sporadically. The mesh is all quads.

Hello, could you please be more precise about what you want, why you're not glad with the result, and also share the file with the Soft Body that you've set?

The file is in there. There should be a baked animation already applied that is stable, but doesn't have the plushy-like physics I want. Edit: sorry, I uploaded the wrong one.

You've shared a file but I can't see any Soft Body for the objects, and if you've baked the animation it is in your computer. Please share the object with the Soft Body and tell a bit more about why you're not glad

I uploaded the right file now

What about enabling Stiffness and Self Collision?

Both make the physics unstable, especially the stiffness.


text:
Closest snapping in object mode does not use closest vertex when multiple objects are selected
The snapping page in the manual says that the snap with closest option should "move the closest point of the selection to the target". That only works when a single object is selected though, making it fairly useless since you can also easily work in edit mode in that case.
Take a look at this: https://youtu.be/0uuCatZnCzk
I want to snap the door to the outcropping in the wall, but I don't want to use the origin of the parent which is used as the hinge position. Instead I want use the closest vertex from the door frame which is a child of the hinge. That works fine if only the door frame object is selected, but as soon as the parent object is part of the selection it will always use its origin no matter what, even though it is clearly much further away from the vertex I'm using as the snapping target and the frame is the active object, not the parent.
Situations like this come up all the time, do I seriously have to unparent and move the child object I want to use for the snapping first and then move the parent to match its position afterwards and then reparent the child?


text:
Change dimensions of multiple objects the same amount
so I made a fractured circle with the cell fracture add on, but between the fractures of all the pieces I want an equidistant space between them. Favorably a solution where I can fill in an exact number.
now I have tried to use the scale option on multiple objects, with alt scale, but that results in the following.

when I do this, I have the problem that the bigger pieces do not proportionally scale to the smaller pieces and vice versa, the result being that they all have different spaces between them.
does anyone have a solution for me?
update 1:
so what I've tried to do is get the inner edges of the fragments merge them by distance, made them a bit bigger then the circle, convert to curve, then added a plane that I converted into a curve as well, and added the plane curve as an object bevel in the object data properties, resulting in the following.

now the question if there is a fast way to make these all connect to each other so I can use this as a cutter for the circle.

i might not be right, but i think what you are asking for is mathematically impossible. I think you cannot have the same spaces between all pieces and proportionally scale them in this fractured cell scenario.

Its just that I want all the objects be 0,5 mm smaller in both directions. So there is a 1 mm gap between all the parts everywhere. I dont want to scale them, scaling causes the issue im having with the different gap sizes everywhere.

You could strip the top off your fragments, I inset faces, invert the selection, delete, and re-extrude to thickness. But with all the acute angles, the inset's likely to create quite a mess to clean up.
Here's a GN group that does it with a mesh-boolean. It does return a single object from a collection of fragments, but they could be separated again, by loose parts, if wanted.

I found the result was cleaner if the boolean was executed on the top surface alone, and the result re-solidified. That's why the apparently unnecessary nodes are there.

I guess you may want to leave the external perimeter untouched? Call back if so. There will be a way, I'm sure.
 Blender 3.2b

Since I'm still lacking knowledge on geometry nodes, I went with another approach (see update) that gives me a little more control over what I do, albeit more manual. thank you for showing me though

That's fine, you can always just download the file and use the GN modifier on your fragment collection :)


text:
Snake scales align to normal in geometry nodes
I'm lost, tried everything. I have this snake with scales done in geometry nodes. All works great until I try to animate it through curve modifier. The scales are not aligned to normals properly. I cant apply the geometry nodes modifier, because I need to lift up the scales through proximity node in the animation (there should be something like wave of lifting scales). Im using this "Face Tangent" node I found while googling solution. Does anyone know how to solve this please? :-)

so you want the scales to follow the 'along' the curve except when the cube is near, then you want the scales to rotate to the surface normal?

I want the scales to naturally follow the snake's body as he moves along the curve. Then use the cube to lift them up.

Are you instancing the scales using the distribute on points node?

I suspect the problem is in the group "Face Tangent", but without knowing what is behind it or the whole node tree, it might be hard to give an answer here. Also, it would be helpful if you could share your blend file so that we don't have to rebuild it all to answer your question. Thanks!

I believe you can achieve your desired effect by swapping the order of the curve and geometry-nodes modifier. Your proximity will be hard to do then because it will be calculated before the curve deformation so you should probably split that into a separate nodetree after the curve modifier then.

Sorry guys, can't upload the original file, but here is the file with the same setup, just with placeholders. :-) https://mab.to/QHWNzZTmr

I think this might work for you:

You don't really need to recalculate tangents if this one already gives you the curve that you use to align the whole shape.
Just get this curve with Object Info, convert it to points and transfer the rotation.
With this rotation you can then align the normals and additionally turn them into a rotation with the value given by Geometry Proximity.
Note that the node Map Range also changes this rotation from $-90°$ to $0°$.
PS: By the way, rotations cannot be combined so easily with Vector Math. A rotation is something completely different from a direction vector, and can only be combined with another rotation.

Awesome, thank you very much!!!

@Marek You're welcome! Great snake by the way, I like it.

Got a bit absorbed in this one... OTT... late as usual.. :)
Here's a GN group that, given a curve and a scale-object, will procedurally coat a profile of the curve with scales, exposing the following adjustments:

The counts of scales around and along the curve
The radial offset of each ring of scales with respect to the last
The scale of the scales (sorry) down each of their dimensions, chiefly for adjustment
(Having set the rotation of the scales to the curve tangent and  mesh normal by default,) allows further adjustment around all axes. Again, chiefly for tweaks, but can be used for your effect.

The curve can have its radius varied, and the scales will change size accordingly.
It's mainly plumbing. The only thing to note is that, if you capture the attributes of a curve:

.. then they are automatically transferred to a mesh created from it, in a sensible way. The points on the mesh segment loops pick up the attributes from the points on the curve to which they correspond.
That allows the rotation of the scales to be set from the curve-tangent and the mesh-normal, when instanced on the mesh faces:

The further rotation-adjustment can be reached from outside the group, and controlled, say, by the proximity of another object:

So you can achieve this kind of effect:

(exaggerated for illustration)
 (Blender 3.2b)

Robin!!! Insane amount of work u put into this little snake thingy, much appreciate! :-)

Hi @Marek !  I was kind of doing scales anyway... your question prompted me to work on it and try to  improve the interface.. a variation of this does roof-tiles.

very nice one!!! ...but unfortunately just moving your empty in your example blend file doesn't work in 3.4 but works in 3.3....ok...have to check maybe just a blender bug

Hi, @Chris! Thanks! Go ahead and share the faulty file if the problem persists.. or maybe it's the download, as presented in the answer?

no, i even downloaded the newest 3.4 alpha - some error. I am pretty sure it is a bug


text:
Shortest Edge Paths between two empties
so I'm trying to get the shortest path between two empties using the "Shortest edge paths" node, but I can't figure out how to get the vertex of the mesh where the object is located. I already tried with "Field at Index" and the "Transfer Attribute" node, but that didn't work.
This is the setup I tried with:

As I understand it, I have to somehow get a matching input in B of the equal node for it to work properly, right?
Can someone please explain what I need to get it correct?
Thanks in advance

I haven't watched the whole video yet, but
Kaizen Tutorials has done a detailed tutorial on using it here. It's only available in Blender 3.4 Alpha of course!

@JohnEason Thank you for your reply! The video is very informative in general and goes in the direction of what I need, but I still can not figure out how to solve the problem of having just a single path between two objects and not multiple as he shows in the video.

I'm no expert on geometry nodes. Perhaps someone else here can point you in the right direction! I see that Joey Carlino also posted a video on using it here on the same day. Perhaps that one has more useful info for you.

You can use geometry proximity to find the nearest vertexes like this:

Nice answer, simple and straight to the point solution. Was having a hard time understanding how to use the Shortest Path Node. Only thing missing is a short textual description of the nodes used, for indexing and searching purposes

Oh, I'm a bit late for the party and my approach is very similar to Crantisz' answer. It's not a real difference but my solution uses... Vector Math! ;-) ... maybe it's still helpful for someone.
This new Shortest Edge Paths node can be a bit confusing, especially when there are more than one start and end point involved. I recommend creating a little playground for visualization.

Finding which point is near a given Empty object is straightforward. You calculate the distance between the Empty and the Position of the points that you have. If the distance is zero then it's a perfect match. Due to the limited numerical accuracy of the floating point numbers, the comparision is  exactly with zero but +/- tolerance. This tolerance value is called Epsilon for the Compare (Equal) node. Finally, in conjunction with the Vector Math (Distance) node, it defines a search radius.
Let's put it into a node group because we need it twice, one time for the start empty and another time for the goal empty:

The node group works like a filter to sort out the mesh vertices that should be used as the start of the shortest paths. It's kinda like a callback in a programming language.


text:
Is there a difference between local and global sizes?
So this is a bit of a "hard to formulate a title for" question, but the thing is, i have two mesh objects. Both of them sit at the same position in Z when i select them in object mode and look at the item panel where it says transform: location. both have 0.11mm as z value, and the bright orange point (i think this is the origin of their respective local coordinate systems) for both f them sits at the same height, although not in the same spot on the XY plane.
both are simple meshes, a bezier curve converted to mesh and extruded in z axis to get a row of polygons.
Now, for the first mesh i get a local value for the height of the extruded part which is 2mm.
For the second mesh, i get 0,614. Although they are actually the same size visually (also in orthographic view).
Im really confused, and the only thing i could possibly think of playing a role here is that the objects have been scaled beforehand and now are coming from different scale points of reference.
I have worked with a lot of modeling tools so far, tbh not with C4D, as an example, when it was important to have precise measurements. But all of them had local and global coordinates, but not local and global scale, if that even exists in this case.
So i guess my question is, where can I read how this differentiation in scale works in blender, and maybe a method of setting the local scale (if it exists) to the same value for two objects, so that i can have same local sizes for both of them.
Edit: here is a screenshot
The explanation in the suggested thread by @gordon brinkman is exactly what i was missing. I dont understand whats going on completely tbh but enough to be able to work around it, so thank you to all of you.

Hi :). I feel like you're perhaps confused about the Scale/Dimension values relationship? Would you please add a simple screenshot to illustrate which values you're talking about?

Does this answer your question? the measurement in blender is weird. I guess my answer there might help with the understanding of scale and dimension and different size though seemingly the same etc.

If it's not a TL;DR, maybe this will help

It sounds to me like you’ve conceived everything correctly. I’ll try to bring up the specific article in the Blender manual… https://docs.blender.org/manual

I could not find a specific page in the manual that covers this, but you should look at the Object tab in the Properties editor. Also, you can press N in the 3-D view port to show the properties side bar, and check the Item tab. Either one will show you the object’s scale.

@GordonBrinkmann this is exactly what i was missing, thank you for the in detail explanation. It still seems to be a very weird approach. does this have to do with you also not really beeing able to scale edges on a number input base? it seems like blender doesnt like to deal in absolutes ^^

@ozr2222 You can enter numbers when scaling edges... or do you mean scaling a specific distance in meters? That's not scaling. In geometry, scaling a vector (and vertex locations etc. are vectors) is multiplying the vector with a scale factor, this factor you can enter when scaling. You can either scale uniformly or, if you restrict it to certain axes, this works like an entrywise multiplication or Hadamard product with one or more axes multiplied by 0. If you want to reach a certain distance you must either know the factor between old and new length or move one or more vertices.

@GordonBrinkmann yes youre right... i cant verify with other modeling software right now but i think i can remember that you can only scale it by a factor, not enter an actual size when scaling.

@ozr2222 No, because scaling is not necessarily for a single edge, face etc. And if you wanted to "scale" two edges of different lengths pointing in different directions by 2 meters, which one of them should be scaled those 2 meters? And if you say both but they have diffferent lengths, then the factor would be different for each which means it would no longer be a vector scaling.

@GordonBrinkmann i mean you can either scale the edge along its orientation, or scale it along another axis, like the global coordinate system.
along its orientation you can only scale one edge (or mutiple one along their respective orientations at the same time), but according to a coordinate system you can scale as many as you want. but its ok im not very good at using the appropriate terms and i think i understand you.

@ozr2222 Yes, of course you can scale in many orientations and coordinate systems - but it's always scaling by a factor. Not by a certain amount of meters.

@GordonBrinkmann ok sorry i think now i got it, yes that was not precise from me - i meant scale to a certain amount of meters or units. not by meters thats just not possible right. but make it so that its x meters in x y or z

@ozr2222 Well, if you know the dimensions you want that's easy... if something is 4  m in x and it should be 5 m, scale it by 5/4 = 1.25 on x axis ♂ or if something is 3.14159... m in x and it should be exactly 5 m - just enter 5 m in its x dimension, then apply the scale with Ctrl+A


text:
Errors running blender in Ubuntu 20.04 WSL
I'm trying to run a test for a repository that requires blender. Blender is installed, I created a venv with numpy installed, and I've navigated to the repository's directory to run a test but I receive a traceback for an error:
(venv_w_numpy) me@my_pc:~/FbxToNpyConverter$ blender --background -P fbx2npy.py
Blender 2.82 (sub 7)
shared memfd open() failed: Function not implemented
shared memfd open() failed: Function not implemented
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
Traceback (most recent call last):
  File "~/FbxToNpyConverter/fbx2npy.py", line 7, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'

Again, my conda environment venv_w_numpy has numpy installed and is activated. Does blender require it's own special type of environment? I'm new to blender and to this repository, but it seems like the error is caused by something with blender.

You shouldn't need to install numpy. Blender ships with its own Python interpreter with numpy preinstalled. Unless you need a venv for something else, it should not be necessary to use one.

I'll clarify to say that I tried creating a venv with numpy installed after getting this error, and that, of course in retrospect, the venv does not help. I'm wondering why the blender-shipped python interpreter is insufficient and causing this ModuleNotFoundError.

There seem to be other issues preceding this. I would suggest you do a clean setup with an official release of Blender. Remove existing config files in ~/.config/blender/2.82. Issues might also be caused by add-ons.


text:
How to fill a face with geometry nodes?
Sorry if this has been asked before, I've googled around for a while but none of the solutions have worked for me, my situation is this, I have an example mesh like this:

If I wanted to fill a face inside, like what you would get if you just pressed F with all vertices selected in regular edit mode, how could I get that same result only with geo nodes?
Thanks in advance and sorry for my english <3

Yes!!!! That worked, thank you so much, I knew it probably had to do with converting to curves but couldnt find the right combination, geonodes are awesome, thanks again <3 <3
EDIT: Btw how can I set your answer as the right one so that green check appears? I cant seem to find it

i posted this as answer, now you can confirm ;)

Just convert it to curve, then use fill curve, then convert to mesh again.
Make sure that all z are 0 when using fill curve (else it won't work). So you might have to rotate your mesh/curve before and after fill curve.

It needing to be laid down on z was the prob for me thanks!


text:
Saving the state of objects at specific keyframe
I am trying to create a game asset in blender and for better accuracy and in order to be more realistic, I am using the physics tool for the asset I am trying to make.
However upon interacting with the rigid body option and the settings being dynamic for the meshes involved, I cannot move or copy/save the state of the meshes at the specific keyframe I need after it starts and I need to be able to have it in a specific formation.
Any help will be appreciated.

A non-destructive way would be to play the animation through and at the frame you wish to 'freeze' the model, duplicate it and ---> WITHOUT <--- moving the timeline further, clear it's animation in the Outliner, them remove it's physics and any other contraints or modifiers.  You end up with a copy that's frozen in the action pose at that frame.
If the physics engine varies the original's motions after that, do as above but from a duplicate Blend file.  Append (import) the frozen model back into the original file.

Like you mentioned I have tried different methods when the frame is frozen, duplicating, copying, using even 3 different blender programs in order to paste them in. Turn off the physics. But each time I am having the models in a random place, stacked on top of each other or pasted in before the animation has taken place. I will keep trying to work something out. It would also be extremely difficult to remove the physics one by one from the asset as there are many similar meshes involved.

I have figured it out, posting answer soon.

Glad to see you have it sorted :)

I have found that here is a quick an easy solution to this problem.

Play the animation of the physics and stop at the required frame.
Select the objects you would like to save the state during interaction with physics.
Navigate to [top left {near object mode}] Object
From the drop down select Rigid Body
Apply Transformation
Preferably duplicate or copy the object then (optional) and save in different file.

I recommend doing this no matter the mesh count and saves a lot of time, if you have any other ways to go around this issue please leave another answer or comment.

Figured this out recently, had to share, it was making me crazy.
Run the animation > pause at desired keyframe > select the object you want to save > Navigate to File > Export (Export whatever file type you need) > Check "Selected Objects" and "Apply transformation" boxes > name it > hit Export > now you have an object file of the saved animated keyframe with all your physics.
good luck.


text:
Texture Mapping Distortion
I am working on a character creation pipeline, and the mesh's texture coordinate mapping seems to have become distorted.
I have attached an image of what is happening.  You can see that a checker board texture is being distorted and noisy in certain areas.

Contrast this with 'correct' character's texture mapping, where the texture mapping is not distorted at all.

Note that these two meshes have the exact same topology and exact same Vertex Order. I have confirmed vertex indices are the same between the 'correct' and 'incorrect' meshes.
I have also compared Face Order, and both have the same faces indices in same area, as shown below:

Note also that while troubleshooting, I assumed this was a UV issue and deleted the UVs from the mesh, and then copied the UV Map from the 'correct' mesh using Ctrl+L and 'Copy UV Maps'.  This had no effect on the issue.  I also deleted the UV then transferred UV map using Data Transfer modifier, and that had no effect either. Issue persists.
Edit: in response to comments, note the following

The two overlapping meshes are not both visible at the same time in
viewport in the screenshots posted. Thus, it is not an issue of overlapping and intersecting meshes.

I have compared both UV's, they are perfectly identical and
overlapping.  A selection of faces on one mesh appears in the same location of UV in UV Editor or the other mesh. As per below: (synching between viewport and UV Editor selection is on)

This is the mesh with "Correct" texture

This is the mesh with the "faulty" texture

So when you compare the UV Editors they have the exact same UVs?

@femacamps Isn't it just you have two overlapping meshes in a Viewport?

I updated the main text to address those questions.
UV's are identical.
Meshes are not overlapping in viewport.

Please share your issued  model (half face could be enough) via https://blend-exchange.com to speed up solving your Q. Thank you

I can't upload to blend-exchange since file is minimum 70MB, but i uploaded to Google Drive https://drive.google.com/file/d/1-Fioa0CBswJLvtiZvYU0PJKRMJPLRmy2/view?usp=sharing

I no longer need assistance with this issue.  I have just set my characters up from scratch and now UV mapping is correct, so can disregard this question.  Obviously issue remains unresolved, but I personally do not need a response to this.


text:
Converting Particle System Hair to Curves Hair that follows figure when Shapekey loaded
New Curves Hair system was implemented in Blender 3.3.
I have converted my old Particle System hair to Curves hair, using the method described in this Youtube video.  However, my issue is that the hair doesnt follow my character when i dial in shapekeys for the character.
The steps i took were as follows:

Converted Particle System Hair to Curves (using special menu in Particle Systems Properties menu)
Under Curves properties, I have updated the Surface to be my scalp mesh, and the UV Map to my scalp mesh UV Map
In Sculpt Mode, I have clicked 'Snap to nearest surface'
I then dialled in a shapekey on my character (which has the scalp connected via a surface deform modifier), and the scalp moved but the hair stayed where it was.

Is this a true Surface Deform modifier -or- is it a Geometry Nodes modifier, named Surface Deform, with a single Deform Curves on Surface node in it? The last one is the correct one. It must be on the HairHead object (curves). And the HairHead object should be a child of the surface object (Scalp_HairHead2).

Have a look at your screenshot. The HairHead curves object in the outliner has no modifier. There is no blue wrench icon. But the Scalp_HairHead2 object has one. This looks wrong.
The curves object HairHead must have a Geometry Nodes modifier with a single Deform Curves on Surface node in it.
Furthermore, the HairHead object should be a child of the surface object Scalp_HairHead2.

If you add a Curve > Empty Hair object to a selected object (Shift+A) then Blender ...

creates a Curves object
makes it a child of the select object
enters the values for Surface > Surface and Surface > UV Map in the Object Data Properties panel
adds a Geometry Nodes modifier to the Curves object. It's needed when the mesh is deformed by an Armature modifier or shape keys. Note: It's named Surface Deform but it's a Geometry Nodes modifier. Don't confuse it with the true Surface Deform modifier.

If you convert a Hair Particle System to the new Hair Curves you need to do steps 2 to 4 manually.

Shape key test:

Thank you, that worked perfectly. The only additional thing I needed to do was ensure that the 'Add Rest Position' box was ticked under Object Data Properties on my scalp mesh.


text:
How to make a glossy bumpy material
I am making a glossy book cover and would like to reproduce this effect in Blender:

Any suggestions on making the material with this sort of bumpiness?
I've tried doing something similar to suggestion at following link but I wasn't able to come to close to this effect:
How do I create a bumpy reflective material?
Here is what I've attempted so far, it's not quite there:

Thanks.

please share the shader node setup you've already tried and are working on

You're very close - I suggest swapping the Voronoi Texture with a Noise Texture, lowering the influence by mixing it with white before the Bump Node. I also changed the BaseColor to almost black (looks like it's black in the example image). Roughness looks good at around .1:

This helps, thanks!
I did have to use 0.1 for the Noise Texture Scale otherwise it looked very grainy at 14. Does that sound right?

The scale is relative to the size of your object - pick whatever scale looks best for you, even if it's different from mine. The idea is just to use a Noise texture as a basis for bump (Instead of Voronoi).

Makes sense, sorry I'm new to Blender just hacking something together. Thanks again!


text:
How would I make a tube-like edge for my model
I've recently found myself unable to perform a seemingly simple action in Blender while creating my model. I want to create a "tube-like" edge where 2 of the parts connect together, but nothing I've tried has worked, since extruding the edge results in a plane that I can't scale properly. I'm unsure of what to do, as I'm quite new to Blender and don't fully understand what I'm doing. Explaining what I want to achieve seems a bit hard, so I've added some images! I'd really appreciate some help!

hello it's hard to understand what is your object, do you have other pictures?

I added more images, I'm trying to create the bump that I've circled in red, but have little clue how to. I just need it do go along the top edges of the model, just like in the image. The same bump can be seen around the window.

I would take the edge in question, duplicate it into an object that I convert from Mesh to a Curve, and have a cylinder use the Curve modifier.  See my Answer below.

Here is one example:

I started with a cube where I removed the top face and Beveled to look similar to your target shape.   I then selected non-Manifold edges (or you can select these manually), 'D' (Duplicate), 'P' Separate Selection (into a new object 'Cube.001'),

I then converted the Cube.001 into a curve that will bend a new mesh:

Then I added a cylinder and subdivided only the vertical edges to make sure it had sufficient edges to bend along the curve,

and then used the Curve modifier to fit it.  (you may have to adjust the axis of conformance, and move the cylinder or Object :: Apply :: Location):

My example:
You can add the Subdivision Surface modifier to smooth the outcome.


text:
Confusing normal map bake
I've been trying to bake a normal map to a low poly model from a tree trunk that I've photoscanned. But for some reason the normals appear to be at a weird angle... I'd expect the flat parts of the bark to be blue, facing forward, but instead they're red, making them reflect the light at an odd angle in the model.
Any idea what could be wrong?

Edit: Here's a correct normal map I was able to get out of another software called xNormal. I feel like I must be missing something in the setup?

Ok. I finally figured it out. I had to go into the object data and click clear split normals. I guess the photogrammetry software applied their own normal smoothing somehow


text:
New bone in armature doesn't move in animation after export into unity
I rigged model in Mixamo and then I used this armature to animate my model.
Now I had to add bone to my armature but I don't get it how to do it.  I has three different situations with this.

When I add bone (in Edit mode) do my armature it generate sepetraret armature with that bone an several other IK and bones form my base armature

In second time in stick to my base armature but it doesn't show in my rig form so i can't animate this.

In the end I create bone which stick to my base armature and I can animate it and it work well (even I was happy it's work) but after I export this to Unity this new bone  doesn't move, though Unity sees that bone.

So what I can do to move this bone in unity ?
View from Blender

https://drive.google.com/file/d/1lEpOb3LuzE8dYUgiobYBjG4IsOzBhDzt/view?usp=sharing
Unity https://drive.google.com/file/d/1ZXoPNw6oUMYVOhPvan-96LLDOwg3NjHe/view?usp=sharing

Hello and welcome. Please don't ask more than one question per post. Use the [edit] below, to break this into multiple posts so that each focuses on a single issue. Make as many separate questions as necessary.

So the problem was in Unity, if you use a humanoid rig it doesn't show extra bones in animators so in Unity you should active these bones manualy.
Here is the answer  https://forum.unity.com/threads/humanoid-rigs-and-extra-bones.360979/


text:
Can't see the edge line in edit mode?
Blender 3.12
Connection address for problem demonstration:
https://www.ixigua.com/7142775731351716387?utm_source=xiguastudio&wid_try=1
The URL is a Chinese website watermelon video. I don't know whether it can be accessed outside China.
Status bar screenshot:

Problem Description:

Left click cannot select objects, box select cannot select objects.

If the object origin is hidden, the left button cannot select the object at all

If the object origin is displayed, the object can only be selected by clicking around the origin.

When you switch TO EDIT MODE, the dots AND faces are displayed normally. In edge mode, the edges are not displayed, but you can select and move the edges.

Hope enthusiastic netizens to help answer, where does the problem appear? Heartfelt thanks!!
The results of the latest attempt.
Completely uninstalled nonstandard blender addons, load the blender factory preferences and load factory settings startup file, but questions remain.
I lost all of my customizations, key Settings, interface Settings, path Settings since Blender started...
Do I have to completely uninstall all Blender installation files? Deep confusion and fear!!
Also, I tried to start another version of Blender locally and had the same problem.

Did you reset the settings to factory values to check if the problem still appear?
Does it also happen in Blender 3.3 LTS ?

Not tried in Blender 3.3, not installed

Tried versions 2.93, 3.1

Resetting to appearance Settings won't fix the problem, it's already been tried


text:
Dark & bright triangles/faces on exported mesh visible in-game

I'm trying to add more detail to a mesh that already had this problem. There isn't anything in blender that I can see would cause this. I tried manipulating normals but it doesn't seem to affect the issue. Adding a sharp edge along the mirror line removes this but then the shadows look a bit unnatural in-game. Switching to flat shading also helps but looks bad in-game as well. It happens on the axis where the texture gets mirrored. Subdividing along the mirror line makes the effect smaller, corresponding to the smaller face size. Any idea what might be causing this?

A line along a mirror edge is often due to an internal face. Look at your object in x-ray mode and delete any internal faces that you find.

thanks for your comment. there are no internal faces. the texture is mirrored but there is no cut in the topology along the mirror line...


text:
Merging all the loose parts in an STL file
I'd like to cut a model imported from STL into two. However, the model consists of thousands of small loose components, which cause unexpected behavior after applying the "Bisect" tool. Is there any way to merge all of them (or compute the union) to have one object without any loose components?


text:
Boolean operation doesn't work even with perfect normals and vertices
I'd like to apply the boolean operator to subtract the rod-like structure (highlighted) from the dish antenna. Ideally, the bottom of the rods should make a hole on the dish, but it doesn't work in that way. The normal vectors direction look fine. I also merged close vertices to avoid duplicated vertices. What would be a possible reason for the failure?

In the Boolean modifier, under Solver Options, enable Hole Tolerant, or use the Fast option instead of Exact. That said it won't give good topology

@moonboots, thank you for your comment. I tried both options, but it did not change the result.

Q&D way: (1) Select each object (one at a time) and in Edit Mode, go to Mesh/Separate/By Loose Parts ("3d" will make 5 parts and "top" will make 13 parts); (2) Add 6 Boolean modifiers to the parabola from "3d"; (3) Select one pole after the other as intersecting object.

You want 3d_antenna to become 3d_antenna minus th space occupied by top_antenna.  But when we do that, we see that it doesn't act as you anticipated:

There are a few requirements for a boolean to work well.  There are tricks that Blender does to try to make it work okay even when it doesn't work well, but those are just tricks-- it's a computer "helping" you model, which is a lot like a toddler helping you build a house.
When does it work well?  1) When both meshes are manifold-- ie, watertight.  2) When neither mesh has any self-intersection.  3) When there are no coincident faces-- places where overlapping faces exist in the same plane.

Are these meshes watertight?  No.

Neither mesh is watertight.  Both have non-manifold elements.

Do these meshes self intersect?  Yes.

The objects are made up of multiple mesh islands, which intersect with each other.  While I'm looking only at 3d_antenna here, the other mesh self-intersects as well:

Do these meshes have coincident faces?  I don't think they do, I only offered that for completeness.  But-- I didn't look that close.

Those three things are necessary for a boolean operation to figure out, what is inside, and what is outside?  With self-intersection, parts are inside and outside at the same time.  With non-manifold geometry, there is no particular inside or outside.  And with coincident faces, it just can't decide, it's right there, so is that inside or outside?  It's right exactly at the border where inside becomes outside.
How can we fix the self intersection we see here?  By boolean unioning mesh islands:

How can we fix the fact that some mesh elements are not manifold?  By excluding those from our booleans by separating them out to different objects:

If we had a problem with coincident faces, how could we solve it?  By moving something very, very slightly.
And when I fix some subset of these, I see that a boolean difference works fine:

Well, as fine as a boolean will ever work on a smooth shaded mesh without retopo, which isn't very much.

Thank you so much for your excellent answer! My problem has been resolved!


text:
How to fix glitches in facet orientation visualization
Problem
I created a SLDPRT model on SolidWorks, exported it as a PLY file, and imported it into Blender. Ideally, the face normals should oriented toward the outside, but the facet orientation is shown as a mix of blue and red. For example, in the image below, the facet orientations of the dish antenna are partially red.

However, when it is zoomed in, the orientation is shown as blue:

What I tried

Recalculation of face normals: I selected all the faces by A and recalculated the face normals by "Mesh -> Normal -> Recalculate Outside." It didn't fix the problem.

Merge duplicated vertices: Press M and merge vertices by distance. I tried several distance values, but no vertices were merged until the model collapsed.

Check the non-manifold mesh: "Select -> Select All by Trait -> Non-Manifold." The model doesn't have any non-manifold mesh.

I suspect the model somehow overlaps facets, but I don't know how to confirm and repair it. I didn't use any tricky techniques that would cause duplicated facets in Solidworks—only the Extrusion, Revolve, and Mirror operators. Could anyone give me some advice? Thank you.
I have attached the Blender file below:

Is it actually causing a problem? - I suspect you're just seeing flashes of the back face of the 'other side' of your object. You can see the same on the solar panels if you move them around a bit.

I think it's safe to ignore. It's just a glitch in Blender I think. There's nothing wrong with the model.

@HarryMcKenzie It's an incorrect clip start setting. It's not just a glitch in Blender, all OpenGL / DirectX applications have these limitations.

@GordonBrinkmann Thanks for sharing :) but I still see red even with 0.1m

@HarryMcKenzie Really? I don't, see the screenshot in my answer (and obviously it solved the problem). It's a well documented issue, glitches in perspective view are usually caused by incorrect Clip Start values, in orthographic view it is usually caused by Clip End values. It is even explained in the Blender manual, I just couldn't find a good answer here to mark it as duplicate.

@GordonBrinkmann Interesting. Could you share the blender documentation of the glitch also in your post for others to read as well. Here's the glitch for me in 4.2 also at 0.1m but reduced glitchiness. https://imgur.com/a/XYJ7Nd8

These kinds of glitches are typical for having a too low Clip Start value in the 3D Viewport. Extremely low values will make these glitches also visible without the Face Orientation overlay - but when this is enabled, it becomes visbile even quicker.
Your setting is Clip Start = 0.01 m and looks like this:

Increasing the value to 0.1 m gives this result:

The strange shading that is left is because you have shaded the object smooth.

It works like a charm! Thank you for your answer!

In addition to Gordon Brinkmann's correct answer to adjust your Clip Start and Clip End values in the 3D Viewport, there's another setting you may need to adjust if you are using the new version of EEVEE in Blender 4.2 or newer and your Scene Unit Scale is smaller than 1 (such as when using 0.01 for exporting to Unreal Engine).

Go to Render Properties > Viewport > Pixel Size, and change it from
"Automatic" to "1x".

When combined with the correct Clip Start and End values, this will fix the Z-fighting and flickering when overlays like Face Orientation or Face Sets are used.

Thanks for the valuable information!

@Ogiad You're very welcome! :-) I discovered that the Blender Team considers this a bug so it will eventually be addressed in a future release: https://projects.blender.org/blender/blender/issues/124013


text:
2 lines of corner bevel artifacts
I'm trying to fix the artifacts in the topology of this beveled corner.
I already have a few corners that look good, but there are still 2 problematic spots with artifacts and I don't know how to fix that.

Can anyone tell me how I can fix this?

hi and welcome! I think you might want to retopo that big ngon into quads

Hello please share your file so that we try to fix it: https://blend-exchange.com/

@pevinkinel N-gons can be problematic, but most of the time beveling is stiil possible...  looking at this very narrow corner I guess there are rather issues with overlapping, but the sharp cuts in the corner seem to indicate there's more probably duplicate geometry. The corner looks like it was beveled (higher resolution than the surrounding parts) and then the doubled vertices not merged where the bevel segments came together.

@GordonBrinkmann You're totally right. Looking at the file now, applying the bevel modifier makes a mess of extra vertices in that corner

You are using a much too high Amount setting on the Bevel modifier for that sharp corner and have the Clamp Overlap option disabled. As you can see in Wireframe mode this creates overlapping geometry which is responsible for the artifacts:

So you either have to reduce the Amount until the overlapping doesn't occur anymore or enable the Clamp Overlap option, so every bevel is reduce to the mutual minimum on all edges so that no overlapping appears, no matter how high the Amount is set:

Another thing you could do is to make the edge segments somehow wider or create different angles to reduce overlapping, but that depends on how you want the shape of the corner to look like.


text:
geometry nodes curve array modifier with relative offset and differing instance sizes

I did a curve array modifier in geometry nodes with and float curve to differ the sizes along a curve, everything works perfektly fine. But i really want to apply a feature to make the offset realtive to each other, so even if the size of every instance changes the distance to each arrayed piece stays the same.
I havent been using geometry nodes for a long time, so any help is appreciated.


text:
How to darken only a specific area of a Spot Light?
If you look at Audi's matrix light technology, the car's headlights recognize other cars and only dim the light in that area.
I wanted to express this in Blender.
I tried a few things, but didn't get satisfactory results.
The method I tried was to shine a light on an object, make the object transparent, and then only cast a shadow.
And by using the constraint options (Copy Location, Limit Distance), the car that shoots light and the car passing by are in a straight line so that the dark area follows the car.
This method was fine, but it was awkward because the edges of the shadows were too sharp.

Another way was to use Image Texture.
I tried using an image with black bars on a white background and shining it with a spotlight, but the results were just randomly lit.
Also, the dark areas didn't make it follow the car.
This method was very different from what I wanted.

Here is an example video that I would like to follow.

https://www.youtube.com/watch?v=xYSix5r38qY
I want to follow the part from 0:57 to 1:02 of the video.
I want to make the dark areas look natural, like in the video, and make the areas follow the car and disappear.
Is it possible to express something like that using nodes or using image textures?
Blender experts' help is desperately needed...
Thank you.

You can force a light source to cast a shadow instead by giving it a negative wattage value (this also has the effect of negating light from other sources) - perhaps you could parent a (disabled) spotlight with a negative wattage to each of the "other" cars, and then find a way to enable it when the respective car comes within proximity of the "main" car. Given the limited angle between when the light first hits the car and where it is when it passes out of the spotlight stream, you may not even need to make the shadow source (-light) move (or track) the lights as it passes.

jesus that was perfectly I wanted
thanks a lot christopher

Here's a cheeky hack, some variation of which may be good enough, and fuss-free..
Create a shadow-casting material, which is otherwise invisible:

On objects which are supposed to be interpreted as cars, assign this GN group:

.. which makes a copy of the object as its convex hull, scales it towards the selected lamp, and assigns the shadow-cast material to the copy .
Which makes this difference:

The generated shadow-caster can have its relative dimensions and distance-from-lamp adjusted. You can tweak those for the desired effect, depending chiefly on the  radius of the lamp.

I'll have to study the geometry nodes, but that's exactly what I wanted though.
Thank you very much.


text:
Animating Audi Lamp Sequence
I am trying to animate a lamp sequence for an Audi tail light.

As you can see now, I divide the lamp object into separate objects (short red bar-shaped objects),
I created an animation by adding an animation that turns on and off to one object and placing a time difference.
I think you can achieve the same effect more conveniently without dividing objects by using nodes.
But the problem is not knowing how to do it.
I want to create an animation in which the bars turn on one by one, without dividing the object into one object.
Additionally, if you know, please teach me how to create an animation where the long horizontal bar under the short bar smoothly turns on.
example video : https://www.youtube.com/shorts/hZaJGqJ2w0g
Looking forward to the answers from the experts.
Thank you

The way I see with geometry nodes would require modeling the segments in geo-nodes as well. It could be done, instead of my curve line node you could model a curve and put the rest of the node tree on there. Only getting the orientations of the light segments right may be a challenge.
Animating a single segment is easy with the setup below. Animate the Plane position to light up a different segment. Or animate the number of adjacent segments by animating the Planes scale.
To animate multiple non adjacent segments you can add more Planes, but that will also require more nodes to track them so they can be added to the selection input of the set material node.
The big challenge for me was finding out I had to use the realize instances node for the selection on the set material node to work.
Make sure the Plane(s) are not rendered by deselecting the little camera next to them in the top right of the screen.

I was playing with this a bit more and accidentally discovered animating multiple segments can be done by adding shape-keys to the Plane object and animating them.

To do that:
select the Plane and, in edit mode, duplicate the vertices (a to select all and shift d) but do not move them, and keep them selected.
In Object mode, in the mesh tab on the bottom right of the screen, add the "Base" and "Key 1" shape-keys by hitting the + sign next to the shape-keys twice.
Now with the Key 1 selected tab back into edit mode and move the new set of vertices e.g. to the far right.
You can animate by keyframing the shape-key value.
Create as many separate duplicate sets of vertices with their own shape-key as you need.


text:
Exporting animations made with curve geometry to FBX format
As shown below, I created a surface using Extrude from Geometry in the Nurbs Curve function, and used an add-on called AnimAll to create an animation that moves the belt by capturing keyframes at the points of the curve.
Then, when I exported this as FBX and checked it in another program (VRED), it was imported as a belt without animation applied.
If I mesh it with the 'Convert Mesh' function, I can export it as FBX, but the keyframes I specified are deleted.
Is there a way to import a mesh as FBX and apply animation to it?
Unfortunately, the .abc format does not work properly in VRED...
I'll also upload the file I'm working on.

https://blender.stackexchange.com/questions/57531/fbx-export-why-there-are-no-materials-or-te


text:
How would you morph objects to fit inside offset box of a mesh?

I am trying to distort each mesh geometry to fit within the box made by offsetting the mesh surface.

So far I have successfully been able to modify each object individually by manipulating vertex groups from the original object after the Realize Instance node.
where I am stuck is:

Selecting each box and its corners
using that data to distort the related geometry
the best way to distort

Keen to hear if there is a simpler way to achieve this, that still enables me to modify each object after.
Thanks!

Hello ! Not an answer but you might be interested in https://archive.blender.org/developer/D13515 or the Tissue Add-on (not Geometry Nodes)

Thanks, this looks like it could be an option.


text:
Rigid Body Object "animated" value resetting location and rotation
I recently made a post about a project I am working on. For context you can find the post via this link:
How do I animate the same rigid body multiple times?
I was able to solve the initial problem by baking the simulation to keyframes. After that, I made the cube to a rigid body object again. At first that interfered with the animation of the first jump but I solved the problem by giving every keyframe the animated value. Now I have a similat if not the same problem.
I tell the rigid body to be animated for the whole of the first jump as well as for momentum gain for the second jump. So far so good. I keyframed the initial location and rotation for the second jump, as well as the animated value. I then moved the cube into the air, keyframed location and rotation, unchecked the animated value and keyframed that aswell. As soon as I uncheck the animated value though the cube jumps back to the initial point for jump two.
Why does it do that even if I tell it to be in the air on the same keyframe? Anybody has an idea how I can solve this? I think baking into keyframes again seems obsolete as the problem will just repeat itself.
Project File:

Rigid body simulation does cache its simulation.
So all you have to do is "delete bake" and then "bake all dynamics" then you will get:

Thank you so much Chris.
My days have been busy with some other work related stuff and I come back to this post only to find that the problem has already been solved.
I love this community already.

you are welcome!


text:
How do I animate the same rigid body multiple times?
Hey guys I recently started to work with Blender. I want to crate a 3D logo animation in which a cube is jumping in forward direction.
At first I just wanted to animate the cube with keyframes but then discovered the rigid body function. When I learned that I can animate a rigid body I thought to implement this function into my animation for extra realism.
I animated the first jump with success by keyframing the „animated“ function on the rigid body. For upward and forward momentum the cube is animated and for the fall it switches back to a dynamic rigid body.
Now that I want to animate the second jump, when I activate and try to keyframe the „animated“ function, the cube automatically jumps back to the last location where the cube was last set on „animated“. So to say it jumps back to the position where it is in the air just before it turns back to a dynamic rigid body in the first jump.
Is there a way I can solve this problem? I simply tried by copying the keyframes of the first jump and paste them again on the timeline where I want the second jump to happen. But then the cube of course jumps back to the origin and the jump is in the exact same location.
Help is much appreciated as I was not able to find any source on this toppic. All the tutorials only cover one transition from animated to dynamic.
File: <img src=https://blend-exchange.com/embedImage.png?bid=Xz8kaaBD />
(Sorry for spelling and grammar mistakes. I am not a native english speaker)

Hello could you please share your file (only the useful objects)? https://blend-exchange.com/

I will try. I am very new to blender and also this community. I don‘t know how to share only certain objects but since the project is pretty small I will just upload it whole if that is okay.

The file should now be uploaded.

Oh ok I've never noticed this limitation, maybe you need to bake the first simulation in that case?

When it's animated, it goes where you tell it, and you tell it where to go via keyframes.  If those keyframes are not where it is, then it stops being where it is.  You could keyframe it where it is, which you could do, perhaps, by copying transforms from it to an empty, applying that constraint, and then copying back to itself.  Another way to do it would be to bake the rigid body physics to keyframes ("bake to keyframes" operation) and then run a new simulation.  Either way requires finalizing the earlier part of the physics, unless you want to script.

Thank you for your replies. I will try if it works with baking keyframes.

Okay, so I baked the simulation to keyframes. After that I tell the jumping cube to be a rigid body again. That however gets into conflict with the keyframed animation again since it seems to calculate the animation together with the rigid body values. Hence the animation changes and the jump does not look good anymore. Is there a way where i can tell the cube WHEN to become rigid body again? So for the duration of the keyframed, first jump it wouldn't and when landed it would be a rigid body object.
Edit: Maybe I can solve it by telling the cube to stay animated for the the first jump?


text:
How to export multiple groups with meshes
I have a kitbash file and I want to export each one of the assets to a seprate fbx file for easy viewing and to ease on my pc since the whole .blend file contains around 15 mil polys.

I was wondering if there is an option in blender python scripting to export multiple groups with the meshes in their groups like in the picture above.
so .py operation will make a "KB3D_LAB_AC_A_grp.fbx" file that will contain the files in that group and will do the same for "KB3D_LAB_AC_B_grp" and so on.
or maybe replace or make a new collection for each one of the empties in order to export using collection with the regular collection batch in the fbx export.

import bpy

def export_fbx(context, path: str, name: str):
    ''' Export FBX file.

    path (str) - Filepath to save the file to.
    name (str) - Name of the file.
    '''
    bpy.ops.export_scene.fbx(context,

        filepath = path + name + '.fbx',
        check_existing = True,
        filter_glob = '*.fbx',
        use_selection = True,
    )
    return path + name + '.fbx'

# change 'Collection' to your collection
for object in bpy.data.collections['Collection'].objects:
    if not object.parent:
        override = bpy.context.copy()
        override['selected_objects'] = list(object.children_recursive)

        # set object origin to geometry
        # NOTE: can't undo
        children = [o for o in object.children_recursive if o.type == 'MESH']
        bpy.ops.object.origin_set({
            "object" : children[0],
            "selected_objects" : children,
            "selected_editable_objects" : children,
        })

        # change 'C:\\Users\\karan\\Desktop\\' to your path
        export_fbx(context=override, path=bpy.path.abspath('C:\\Users\\karan\\Desktop\\'), name=object.name)

Added:
# set object origin to geometry
# NOTE: can't undo
children = [o for o in object.children_recursive if o.type == 'MESH']
bpy.ops.object.origin_set({
    "object" : children[0],
    "selected_objects" : children,
    "selected_editable_objects" : children,
})

Amazing! thank you! btw is there a way to make this some sort of an addon? so you can select the filepath and the collections you want to export.

Also is there a way to set origin to geometry with export? so the origin will be in the center of the object.

I added set origin to geometry while exporting, but it can't be reverted back after export. You have to undo it with ctrl + Z manually.


text:
Only one item selecting in edit mode
I'm on Blender 3.4.1 and I have switched from object to edit mode and I can see xray of one item for some reason, and I am unable to edit other items, even if I click on them. It shows that they are selected, but the only item I'm able to edit is the weird one that is xray-ed.
I'm learning Blender so this might be obvious but I'm not sure what it could be
Screenshot attached.

Hello could you please share your file? https://blend-exchange.com/

The object which you are editing does not change by selecting a different object. The objects which has the editing symbol next to it (the square with the top-right corner highlighted) indicates the object which you are editing. In this case that's "Cube.001" and in your case "Cilinder.004":

If you want to change this to another object, simply click on the dot next to the object you want to edit.

This is expected behavior. Edit mode does not make objects merge together. While you can go into edit mode on multiple objects at once, you do this by selecting multiple objects, then entering edit mode.
Note that that isn’t really an X-ray view: You can’t see through anything. In edit mode, edges become visible and traced out in black for convenience. When selection mode is set to Vertex, vertices also have dots on them.
This is a pretty basic question. See the Blender manual for more information.

Scenes and Objects
Modeling


text:
Imported GLTF is broken in Blender but works fine in a random GLTF viewer website
There's an incredibly annoying bug that I've found that's preventing me from moving forward on an important animation commission. I figured I'd ask about it on here as a last resort because nothing else I've tried is working.
Basically, I have a GLTF that I'm trying to import into Blender. It imports fine, but half the model is just completely missing. At first I thought it was a problem with the export file itself, but then I tried viewing it in a random GLTF viewer website (https://gltf-viewer.donmccurdy.com/) and it worked just fine.
The model works fine in this online GLTF viewer:

Here's the errors that come up if I click the "2 Errors" button in the bottom left:

In Blender it's broken; Half the model is missing:

Here's the error message that shows up when importing into Blender:

https://file.io/P8zWE8unh76Y (link to the GLTF I'm having issues with)

In the bottom-left corner of the viewer, you can see a tab showing there are two errors with the glTF. Click that tab to see the error report and post that. If the glTF has error, you will probably not be able to import it into Blender.

Added the image

The UNEQUAL_ACCESSOR_COUNT does look consistent with the Blender error. So the problem is with the glTF.

Is there any way to fix the gltf? I can't exactly re-export it very easily

Not an easy one I know of. You'd probably have to write a script tailored to this specific glTF.

Any other ways to fix it somehow?

I downloaded it and looked at it. Open the .gltf in a text editor, delete line 235657, and also delete the comma at the end of line 235656. Save. You should now be able to import it. This will remove the broken UVs on Mesh_445 (which is a wine bottle next to the ham), so be aware that mesh will be missing its UVs.

Thank you so much!!!! I think it worked


text:
Fine Tuning of a 1st 3D Object - Total Newbie
I hope it's OK to ask this question here.  I'm asking for my son who has been playing with Blender for a school project.  I'm sure I won't be using the correct terminology to describe what he is doing or what the problem is.
He's made a Christmas light bulbed-shaped object which looks pretty good, but he's noticed some imperfections with the shape when rotating.

When we bring up the object in Blender and rotate it appears to wobble which I guess means imperfections.
What we're looking for is help in how to fine-tune this shape.  The Blender file should be attached.
We were first trying to modify a sphere by dragging vertices individually but we quickly realized this probably isn't the easiest way to do things.  He then discovered that by highlighting a horizontal line of vertices and relocating up and down by use of a pin type image that can be clicked to move the line was a better approach or got him closer to what he wanted.
Would appreciate instructions on how to perfect this shape/object!
Any early guidance is appreciated!!

You can upload your file here - https://blend-exchange.com/ - copy the link they give you then edit this question and paste the link in.

There are also a myriad of things he can do to fix this - the first that comes to mind is to select and delete all the faces on the "bad" half, and then use a Mirror Modifier to complete the object.

Also, if he is just learning blender, I would highly recommend this series - https://www.youtube.com/watch?v=nIoXOplUvAw&list=PLjEaoINr3zgFX8ZsChQVQsuDSjEqdWMAD - it's probably the best starting point for many users to learn the "functional in's-and-out's" of blender, and almost all users here will know what you're talking about if you have questions throughout. It's a bit like an achievement award - "Have you done the donut?"

Hello, you can also show a screenshot?

Thanks for all of the tips.  I've uploaded the file and will definitely check out that instructional youtube series!

Hi @Superfreak3, and welcome! ..  apart from a slight pinching at the poles of your UV Sphere, and maybe a tiny discontinuity in curvature, the model looks OK. Do you mean it doesn't match your reference image? If so, we can't tell, because the image isn't packed in the .blend file. You can make a screen-grab, and add images to your question. (Maybe the reference itself, so we can use it, and maybe an illustration of the mismatch, or your meaning of imperfection)

Thanks @RobinBetts.  The shape really doesn't match our reference image, but the difference is so small and inconsequential.  We were just trying to see how we can clean up the model/refine it to clean up such things like tht pinching and discontinuity in curvature.  The goal is to get things printed in the end so wondering if any of those things would show up in the print.

Thanks @RobinBetts, I'll be watching for suggestion(s).

It's hard to answer this one in a very definite way. I'm not picking up the 'wobble' you're referring to, unless it's the very slight consequence of the pinch-poles of the UV sphere. The pinching is chiefly a shading anomaly, to do with the way normals are interpolated by the renderer,  not a geometric anomaly, so shouldn't make any difference to a print. To be honest, the model looks fine.
In general, if you needed to fine-tune the curvature of a surface like this,some of these moves/features might be typical:

Generally working under large-diameter Proportional Editing
In any tool or any numeric field, Shift-dragging to gear down mouse-movement
Working under Smooth and Subdivision Surface modifiers until happy, and then applying, at least Smooth
SShiftZ .. (shift-drag) to scale latitudes in XY only
G G to slide latitudes up and down longitudes, while trying to keep intervals changing smoothly.

However, if you're fanatical about continuity in curvature, in the same way as a CAD-designer of highly reflective objects might be, any manual adjustments of elements are almost bound to mess it up.. I think you have to automate it, somehow. An obvious route is to rely on the inherent continuity of a spline with aligned control-points. Blender curve-editing is not the friendliest, but it's improving....

Create a Curve > Bezier Curve. I've declared mine to be 2D in its Data tab > Shape panel,  to guarantee it stays flat in its own object-XY. not strictly necessary. (You can just ensure it's always scaled to 0 in the appropriate direction in Edit Mode, instead)
In Edit Mode, ensure the end-points are at exactly 0 in global X and Y. You can enter that numerically in the 3D View N panel , Item > Transform fields
Subdivide the curve once, and set all control-points to 'Aligned'...

(Left, Object Mode, displaying object axes, in my case. Mid, Edit Mode.)

Scaling the end-points to 0 in Z about a Median Transform-Pivot will ensure the tangents at top and bottom will be horizontal.

Now you have only three control-points with handles to adjust, in an orthographic front-view (Numpad 1), to get any smooth profile you want.
The profile can be given Screw and Weld modifiers, to create the surface of revolution. Smooth and Subdivision modifiers might be appropriate. When happy, a copy of the object can be converted to a mesh.
The difference between your mesh-edited surface, and this curve-edited surface is tiny, but shows up under a stripe-matcap:

Front and top-views, curve-model in green, with better continuity in curvature.

For your print, IMO, all this post is way over the top. But maybe it suggests an alternative route.

If you really want to get into the weeds, there's a nice reference on the continuity of curves here: https://www.youtube.com/watch?v=jvPPXbo87ds

Wow thank you Robin Betts  A lot of great information!!


text:
Is there a way to avoid geometry nodes calculating if the object is hidden via the Outliner
I observed that when the container geometry for a geometry node tree is hidden with the eye icon in the outliner, the tree is still evaluated.
Is there a way to avoid that? I would have expected that it does it out of the box, but it does not. I could also imagine to implement something with the switch node. But how would I access the visibility in the node tree.
Any help would be much appreciated.

Hello ! I think you are talking about the viewport visibility, which is just a visual feedback change. All the objects are still there and evaluated. What you want is to disable the object, with the monitor icon insteaf of the eye icon

@Gorgious Thanks for your response. I did not refer to the switching in the modifier stack, i.e. monitor or eye icon, but to the visibility in the Outliner, where you can disable the visibility in viewport (eye) or render visibility (camera). It would be neat to hide an element in the viewport and its calculation would stop as well. I'll update accordingly.

Yeah by default the monitor icon is not displayed in the outliner. you can enable it by clicking on the sieve icon in the top right of the outliner and activating the monitor icon there. Alternatively you can disable objects by selecting one of them > Object properties > Visibility panel > Show in Viewport

If your item is in a collection that is unticked (excluded from viewlayer) it is also not evaluated - I find this a quick way to be able to turn large chunks of a scene off from a processing.

I agree. Thank you that helped a lot. Boosting the fps up again to quickly check if the animation plays out nicely.


text:
Error when Installing my addon
I was installing my blender addon when I get an error:
Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 3.4\3.4\scripts\modules\addon_utils.py", line 333, in enable
    mod = __import__(module_name)
  File "C:\Users\hi\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\Illumin8r.py", line 7, in <module>
    target_obj = bpy.context.view_layer.objects[0]
AttributeError: '_RestrictContext' object has no attribute 'view_layer'

My code probably has nothing to do with but here it is
bl_info = {
    "name": "Illumin8r",
    "author": "BinaryOdysseus",
}

import bpy
target_obj = bpy.context.view_layer.objects[0]

collection = bpy.context.collection

def create_point_light1(name):

    light_data = bpy.data.lights.new(name=name, type='POINT')
    light_data.color = (1,1,1)
    light_data.energy = 100
    light_data.shadow_soft_size = 1.75

    light_object = bpy.data.objects.new(name=name, object_data=light_data)
    light_object.location = (1.35, -2.5, 2.56)

    bpy.context.collection.objects.link(light_object)

def create_point_light2(name):

    light_data = bpy.data.lights.new(name=name, type='POINT')
    light_data.color = (1,1,1)
    light_data.energy = 250
    light_data.shadow_soft_size = 1.75

    light_object = bpy.data.objects.new(name=name, object_data=light_data)
    light_object.location = (-1.175, -5.5, 4.64)

    bpy.context.collection.objects.link(light_object)

def create_point_light3(name):

    light_data = bpy.data.lights.new(name=name, type='POINT')
    light_data.color = (1,1,1)
    light_data.energy = 500
    light_data.shadow_soft_size = 2.15

    light_object = bpy.data.objects.new(name=name, object_data=light_data)
    light_object.location = (-6.7, -0.1, 2.2)

    bpy.context.collection.objects.link(light_object)

def create_point_light4(name):

    light_data = bpy.data.lights.new(name=name, type='POINT')
    light_data.color = (1, 0.612277, 0.441099)
    light_data.energy = 1000
    light_data.shadow_soft_size = 3.17

    light_object = bpy.data.objects.new(name=name, object_data=light_data)
    light_object.location = (0, -0.6, 3.2)

    bpy.context.collection.objects.link(light_object)

def create_spot_light(name):

    light_data = bpy.data.lights.new(name=name, type='SPOT')
    light_data.color = (1, 0.868938, 0.686679)
    light_data.energy = 10000
    light_data.spot_size = 180

    light_object = bpy.data.objects.new(name=name, object_data=light_data)
    light_object.location = (0, 0, 14)

    bpy.context.collection.objects.link(light_object)

def create_sun_light(name):

    light_data = bpy.data.lights.new(name=name, type='SUN')
    light_data.color = (1, 0.984, 0.675)

    light_object = bpy.data.objects.new(name=name, object_data=light_data)
    light_constraint = light_object.constraints.new(type='TRACK_TO')
    light_object.location = (0, 0, 14)
    light_constraint.target = target_obj
    light_constraint.track_axis = 'TRACK_NEGATIVE_Z'
    light_constraint.up_axis = 'UP_Y'

    bpy.context.collection.objects.link(light_object)

def button1(context):
    create_point_light1("Point")
    create_point_light2("Point")
    create_point_light3("Point")
    create_point_light4("Point")
    create_spot_light("Spot")
    create_sun_light("Sun")

class Add_Lights(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "illumin8r.add_lights"
    bl_label = "Add quick lights"

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        button1(context)
        return {'FINISHED'}

def button2(context):
    bpy.ops.object.select_by_type(type = 'LIGHT')
    bpy.ops.object.delete(use_global=False, confirm=False)

class Remove_Lights(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "illumin8r.remove_lights"
    bl_label = "Remove all lights"

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        button2(context)
        return {'FINISHED'}

def button3(context):

    bpy.context.scene.render.resolution_percentage = 200
    bpy.context.scene.render.image_settings.file_format = 'HDR'

    camera_data = bpy.data.cameras.new(name="hi")

    camera_object = bpy.data.objects.new(name="HDRI Camera", object_data=camera_data)
    camera_object.location = (0, 0, 4)
    camera_object.rotation_euler = (1.5707963267949, 0,0)
    camera_object.data.type = 'PANO'
    camera_object.data.cycles.panorama_type = 'EQUIRECTANGULAR'

    bpy.context.collection.objects.link(camera_object)

class Make_Scene_HDRI(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "illumin8r.make_scene_hrdi"
    bl_label = "Turn scene into HDRI"

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        button3(context)
        return {'FINISHED'}

def button4(context):
    bpy.context.scene.render.resolution_percentage = 100
    bpy.context.scene.render.image_settings.file_format = 'PNG'

class Make_Scene_Normal(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "illumin8r.make_scene_normal"
    bl_label = "Turn settings back to normal"

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):
        button4(context)
        return {'FINISHED'}

def menu_func(self, context):
    self.layout.operator(SimpleOperator.bl_idname, text=SimpleOperator.bl_label)

class LayoutDemoPanel(bpy.types.Panel):
    """Creates a Panel in the scene context of the properties editor"""
    bl_label = "Illumin8r Quick Lights"
    bl_idname = "SCENE_PT_layout"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

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

        scene = context.scene

        # Big buttons
        row = layout.row()
        row.scale_y = 1.25
        row.operator("illumin8r.add_lights")

        row = layout.row()
        row.scale_y = 1.25
        row.operator("illumin8r.remove_lights")

class LayoutDemoPanel2(bpy.types.Panel):
    """Creates a Panel in the scene context of the properties editor"""
    bl_label = "Illumin8r HDRI Maker"
    bl_idname = "SCENE_PT_layout_2"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

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

        scene = context.scene

        # Big buttons
        row = layout.row()
        row.scale_y = 1.25
        row.operator("illumin8r.make_scene_hrdi")

        row = layout.row()
        row.scale_y = 1.25
        row.operator("illumin8r.make_scene_normal")

def register():
    bpy.utils.register_class(Make_Scene_HDRI)
    bpy.utils.register_class(Make_Scene_Normal)
    bpy.utils.register_class(Remove_Lights)
    bpy.utils.register_class(Add_Lights)
    bpy.types.VIEW3D_MT_object.append(menu_func)
    bpy.utils.register_class(LayoutDemoPanel)
    bpy.utils.register_class(LayoutDemoPanel2)

def unregister():
    bpy.utils.unregister_class(Make_Scene_HDRI)
    bpy.utils.unregister_class(Make_Scene_Normal)
    bpy.utils.unregister_class(Remove_Lights)
    bpy.utils.unregister_class(Add_Lights)
    bpy.types.VIEW3D_MT_object.remove(menu_func)
    bpy.utils.unregister_class(LayoutDemoPanel)
    bpy.utils.unregister_class(LayoutDemoPanel2)

if __name__ == "__main__":
    register()

Addons are first loaded in a restricted Context where no view_layer exists (line 7 tries to access it with no success). You should move that line to somewhere where the context exists (for example when the operator executes).

The solution was as @Secrop has said:

Addons are first loaded in a restricted Context where no view_layer
exists (line 7 tries to access it with no success). You should move
that line to somewhere where the context exists (for example when the
operator executes)


text:
Not able to add a curve, the Add menu only lets me add meshes
I am brand new to Blender.
I want to add a Curve Circle so I pressed ⇧ Shift +  A to add it, but the popup Add menu only lets me add meshes.
How can I add other object types?

When you say you can only add meshes, do you mean that curves aren't there, or you can't add anything else (ex: Lights, Text, Image, Empty, etc...)?

Most likely you are trying to add a curve while editing a mesh in Edit Mode. Meshes and curves are different kind of objects and cannot be combined.
Curves can't be added to a mesh object, and meshes can't be added to a curve object.
Exit Edit Mode and you will be able to add a curve as a different object. Press ↹ Tab  to go to Object Mode to see full Add Menu
Blender has different kinds of objects, all of them have different and unique characteristics and cannot be combined into objects of a different kind:

Meshes
Curves
Surfaces
Metaballs
Text objects
Lattice

Also see related Why can't objects in Edit Mode have their own name?

You might want to read the following related link: https://blender.stackexchange.com/questions/56153/why-cant-objects-in-edit-mode-have-their-own-name/56155#56155


text:
Clarifying UIList - Using parameters in list_template() and draw_item()?
I may have gotten some misinformation or have crossed wires from reading a number of different demos on UIList. I'm trying to clarify what I don't understand.
To place a UIList in a panel, according to Blender API docs, template_list() is called:
template_list(listtype_name, list_id, dataptr, propname, active_dataptr, active_propname, item_dyntip_propname='', rows=5, maxrows=5, type='DEFAULT', columns=9, sort_reverse=False, sort_lock=False)
This starts with 6 positional parameters (the only ones I'm dealing with at this point): listtype_name, list_id, dataptr, propname, active_dataptr, active_propname. I'm working from a demo that calls it with this line:
row.template_list("MY_UL_List", "The_List", scene, "my_list", scene, "list_index")
From what I understand, the last 4 items are:

dataptr - the parent object of the list being used for data in the UIList class
propname - the name of the list being used
active_dataptr - the parent of the object being used as the index of the active item
active_propname - the name of the index being used

What I don't understand is why the list object and the index aren't just passed as parameters instead of passing their parent object and their name, in string form. Along with that, when I'm writing my own draw_item() for my UIList class, how can I use this info? I'd especially like to get the propname or the actual list object being used by the UIList class or list_id. (I tried getting self.propname from inside draw_item() but it's not there. The same with self.list_id.)
My questions about draw_item() are similar. According to Blender API docs, this is a call to that routine:
draw_item(context, layout, data, item, icon, active_data, active_property, index=0, flt_flag=0)
Again, I'm only dealing with the positional parameters, skipping context and layout, which leaves data, item, icon, active_data, and active_property. Why, in the parameter data, the parent object that contains our list (the CollectionProperty list) is passed, instead of the actual list object. Also, the name of the property used as an index is given in string form in active_property, but not the property or object itself.
It seems to me it'd be easier to just pass, in draw_item() the actual list and index objects than passing their parent and a name in string form. I'm assuming the answers to "Why isn't just the item passed?" are the same as they are for list_template(), but included this just in case they are different.
To summarize my questions:

Why are these parameters passed as the parent object of the list and list index (and then their names in string form) instead of the actual list and list index?
How do I access the list name passed to list_template() (or the list object)?

2: self.bl_idname

@batFINGER That gives me the name of the UIList class, but what can I do to get the info in the list_id parameter passed to it in list_template()?

Absolutely no idea.  Had a play with the UI list simple template. Could find no issue with setting or not. OOps Misread thought it said first name.

@batFINGER Same here. Checked API docs, tried tests in a script and from the console. The way I found to detect what list it is in use is to either get the class name with type(data).__name__  to get the class name. The other is to read active_property, which is a string, and it has the name of the index object. Those are the only reliable ways I can find to detect which list your using. I'd like it more if there was something documented about that to state it clearly, but the closest is the definition of what to pass through active_property.

Small error in the above. Use type(item).__name__ to get the class name of the ClassProperty that is being used for the list being displayed.


text:
Placing a flat box layer on the bottom
I'm trying to place a flat box layer on the bottom of every objects but how?  The layer goes on top of them instead.

What do you mean by saying "a flat box layer"? And placing it on the bottom of every object? Which object, the cube? And what exactly are you doing to try to place it? The only thing I see above the cube is a selected plane but I don't know what you tried to do so far...

I tried to draw a flat box underneath the cube as the floor.  Instead of underneath it, it appeared above it.  Any clue how to draw a flat floor underneath the cube?

I recommend watching a few tutorials for getting the basics like moving stuff around. Blender's official website points you to some good resources: https://www.blender.org/support/ . Moving stuff is one of the most basic features in Blender, so if you don't know how to do that, chances are you are missing another  essential functionality even for a start. You can obviously use BSE for whatever questions no matter how simple, but it will just be way easier and quicker to learn the basics from video tutorials.

I'd suggest adding a Plane not a Cube for that! It's where it is because it's created where you have the 3D cursor. Firstly move the cursor to the world origin with Shift-C and move you cube up to sit on the origin by selecting it and using G Z 0. Then add your Plane Shift-A > Plane (and take note of @MartynasŽiemys comment above!)

I found the solution by typing:
Then add your Plane Shift+A > Plane

Could you elaborate more on your answer? Basically it just says to add a plane (not even in your own words, just copied from the comment by @JohnEason above), but since you already had a plane (or is it a flat cube?) in your question's screenshot I wonder how this is a solution to your problem... I thought the problem was where the object is placed, not which object is added.