text:
How to Run Code After Baking With 'INVOKE_DEFAULT' Has Finished?
bpy.ops.object.bake('INVOKE_DEFAULT', type='DIFFUSE')
save_image()

Does not work because the bake uses 'INVOKE_DEFAULT' and thus save_image will be executed directly.
How to run save_image after the baking has finished?

Don't invoke default?  If you are after user input could write an operator or macro to invoke and feed arguments into bake op.

But this freezes the UI and no progress bar is shown

@RobertGützkow sounds good, but I can't find a handler for "bake_post" or something similar

@RobertGützkow unfortunately, neither render_post nor render_complete is triggered

The options to save the baked image externally doesn't appear to work either. I'll put it on my to do list.

Although the question is old, can help more developers.
You can create a modal operator and check the state of the 'is_dirty' property of the image.
import bpy

class ModalTimerOperator(bpy.types.Operator):
    bl_idname = "wm.modal_timer_operator"
    bl_label = "Modal Timer Operator"
    _timer = None
    _img = None

    def modal(self, context, event):
        if event.type in {'RIGHTMOUSE', 'ESC'}:
            self.cancel(context)
            return {'CANCELLED'}

        if event.type == 'TIMER':
            if self._img.is_dirty: # <--- Wait until the image is marked as dirty
                self.finish(context)
                return {'FINISHED'}

        return {'PASS_THROUGH'}

    def execute(self, context: bpy.context):
        if context.scene.render.engine != 'CYCLES':
            context.scene.render.engine = 'CYCLES'

        if not context.active_object.select_get() or not context.active_object.type == 'MESH':
            self.report({'WARNING'}, "No valid selected objects")
            return {'FINISHED'}

        obj = context.active_object
        mats = obj.data.materials
        mats_len = len(mats)

        if mats_len == 0 or not mats[0]:
            mat_new = bpy.data.materials.new('BakeMaterial')
            if mats_len == 0:
                mats.append(mat_new)
            else:
                mats[0] = mat_new
            pass

        mat = mats[0]
        mat.use_nodes = True
        nodes = mat.node_tree.nodes
        tex_node = nodes.new('ShaderNodeTexImage')
        tex_node.name = 'BakeNode'
        tex_node.select = True
        nodes.active = tex_node
        self._img = bpy.data.images.new('BakeResult', 1024, 1024)
        tex_node.image = self._img

        self.report({'INFO'}, "Execute")
        result = bpy.ops.object.bake('INVOKE_DEFAULT', type='DIFFUSE')
        if result != {'RUNNING_MODAL'}: # <--- Important to check the result
            self.report({'WARNING'}, "Failed to start baking")
            return {'FINISHED'}

        wm = context.window_manager
        self._timer = wm.event_timer_add(0.5, window=context.window)
        wm.modal_handler_add(self)
        return {'RUNNING_MODAL'}

    def cancel(self, context):
        self.report({'INFO'}, "Baking map cancelled")

    def finish(self, context):
        wm = context.window_manager
        wm.event_timer_remove(self._timer)
        self.report({'INFO'}, "Baking map completed")
        #save_image() # <--- Call the function after baking

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

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

if __name__ == "__main__":
    register()
    bpy.ops.wm.modal_timer_operator()

Thank you. Great script.
As a side note, once the image data is baked, is_dity returns true.
If you want to bake that image over again, you need to pack the image once.
In
self._img.pack()

, the value of is_dirty returns false.
Now you can create a modus operandi that bakes images on top of each other.
When overlapping bakes, scene settings should also be reviewed.
bpy.context.scene.render.bake.use_clear = False

To add another answer to an old question...
@Carneiro's solution worked really nicely for a single bake, but unfortunately I found that calling bpy.ops.object.bake more than once in a for loop did not work with INVOKE_DEFAULT, the first would work fine but the rest would fail. I also needed to dynamically define the number of bakes.
Thanks to a user called kaio in this thread (plus others) on the Blender dev talk forum I managed to piece together a solution using a macro instead, a feature that seems little documented.
I had setup code that needed to happen in the scene before each bake also, and I wanted to manually save the image afterwards and report the progress. Calling bpy.ops.object.bake(...) from a macro operator did not work. I had to add OBJECT_OT_bake as a step in the macro.
Below is a template approach that can run multiple steps in a macro, showing a toy example of baking at different margin settings. It's essentially a summarisation of kaio's code from that other thread, with the one major difference being that it doesn't need _bpy.ops.macro_define from the hidden _bpy module, as you can use .define on the macro class (this may be new since 2019, I'm not sure). Leaving it here in case it helps someone!
from typing import Optional, Type
import bpy

class DEMOProperties(bpy.types.PropertyGroup):
    progress: bpy.props.IntProperty(default=0)
    total: bpy.props.IntProperty(default=0)

def get_macro() -> Type[bpy.types.Macro]:
    # need to redefine the class to clear any previous steps assigned to the macro
    class DEMO_OT_bake_macro(bpy.types.Macro):
        bl_idname = "demo.bake_macro"
        bl_label = "Bake Macro"
        bl_options = {"INTERNAL", "MACRO"}

    # unregister any previous macro
    if hasattr(bpy.types, "DEMO_OT_bake_macro"):
        bpy.utils.unregister_class(bpy.types.DEMO_OT_bake_macro)

    bpy.utils.register_class(DEMO_OT_bake_macro)
    return DEMO_OT_bake_macro

class DEMO_OT_bake_setup(bpy.types.Operator):
    bl_idname = "demo.bake_setup"
    bl_label = "Individual setup for bake"
    bl_options = {"INTERNAL"}

    out_path: bpy.props.StringProperty(subtype="DIR_PATH")

    def execute(self, context):
        # do before-bake scene setup

        output_image = bpy.data.images.new("out_image", 1024, 1024)
        output_image.filepath = str(self.out_path)

        # ...
        # insert into material, etc
        # ...

        return {"FINISHED"}

class DEMO_OT_post_bake(bpy.types.Operator):
    bl_idname = "demo.post_bake"
    bl_label = "Save previous bake, remove image for next time, handle progress"
    bl_options = {"INTERNAL"}

    def execute(self, context):
        image = bpy.data.images["out_image"]
        image.save()

        bpy.data.images.remove(image, do_unlink=True)

        context.scene.demo.progress += 1

        return {"FINISHED"}

class DEMO_OT_transfer(bpy.types.Operator):
    bl_idname = "demo.transfer"
    bl_label = "Bake Images"
    bl_description = "Set up and start a series of bakes"
    bl_options = {"INTERNAL"}

    _timer: Optional[bpy.types.Timer] = None

    def modal(self, context, event):
        if context.scene.demo.progress == context.scene.demo.total:
            self.cancel(context)
            return {"FINISHED"}

        if event.type in {"RIGHTMOUSE", "ESC"}:
            self.cancel(context)
            return {"CANCELLED"}

        return {"PASS_THROUGH"}

    def cancel(self, context):
        context.window_manager.event_timer_remove(self._timer)
        self._timer = None

        context.scene.demo.progress = 0
        context.scene.demo.total = 0

    def invoke(self, context, event):
        # set up the macro
        macro = get_macro()

        margins = [4, 8, 16, 32]

        context.scene.demo.progress = 0
        context.scene.demo.total = len(margins)

        out_folder = "./"
        for margin in margins:
            setup_step = macro.define("DEMO_OT_bake_setup")
            setup_step.properties.out_path = out_folder + f"padding_{margin}.png"

            bake_step = macro.define("OBJECT_OT_bake")
            bake_step.properties.type = "DIFFUSE"
            bake_step.properties.save_mode = "INTERNAL"
            bake_step.properties.margin = margin

            save_and_remove_step = macro.define("DEMO_OT_post_bake")

        # start the macro
        bpy.ops.demo.bake_macro("INVOKE_DEFAULT")

        # need a timer to kick off the macro and clean up after it's finished
        self._timer = context.window_manager.event_timer_add(0.1, window=context.window)
        context.window_manager.modal_handler_add(self)

        return {"RUNNING_MODAL"}

def register():
    bpy.utils.register_class(DEMOProperties)
    bpy.utils.register_class(DEMO_OT_bake_setup)
    bpy.utils.register_class(DEMO_OT_post_bake)
    bpy.utils.register_class(DEMO_OT_transfer)
    bpy.types.Scene.demo = bpy.props.PointerProperty(type=DEMOProperties)

def unregister():
    bpy.utils.unregister_class(DEMOProperties)
    bpy.utils.unregister_class(DEMO_OT_bake_setup)
    bpy.utils.unregister_class(DEMO_OT_post_bake)
    bpy.utils.unregister_class(DEMO_OT_transfer)
    del bpy.types.Scene.demo


text:
How to Add "px" as Unit to a Number Input?
When I use the following line to add a number input:
row.prop(context.scene, 'output_size', text='Output size')

I get this result:

But my goal is to add "px" as a unit after the number like this:

The output_size should be an IntProperty that is declared with a subtype set to "PIXEL".
bpy.props.IntProperty(subtype="PIXEL")

bl_info = {
    "name": "Subtype example",
    "author": "Robert Guetzkow",
    "version": (1, 0),
    "blender": (2, 80, 0),
    "location": "View3D > Sidebar > Example tab",
    "description": "Subtype example",
    "warning": "",
    "wiki_url": "",
    "category": "3D View"}

import bpy

class ExampleSettings(bpy.types.PropertyGroup):
    output_size: bpy.props.IntProperty(description="Some elaborate description", default=1024, subtype="PIXEL")

class EXAMPLE_PT_panel(bpy.types.Panel):
    bl_label = "Panel"
    bl_category = "Example tab"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"

    def draw(self, context):
        layout = self.layout
        layout.prop(context.scene.example_settings, "output_size", text="Output size")

classes = (ExampleSettings, EXAMPLE_PT_panel)

def register():
    for cls in classes:
        bpy.utils.register_class(cls)
    bpy.types.Scene.example_settings = bpy.props.PointerProperty(type=ExampleSettings)

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

if __name__ == "__main__":
    register()

source: Stack Exchange

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

sort: votes


text:
How to Create the UV Grid Texture with Python?
How to create the generated "UV Grid" texture with the help of the Blender Python API?

Either generate a checkerboard and assign the pixels to a new image data block or just call bpy.ops.image.new() and pass UV_GRID:

One downside of using the operator is that you would have to supply a reliable (unique) name for the image data block otherwise it automatically gets renamed to Untitled.001, Untitled.002... due to Blender's nature of handling data:
import bpy
import secrets

# Generate "unique" name
image_name = secrets.token_hex(5)

# Call the operator
bpy.ops.image.new(
        name=image_name,
        width=1024,
        height=1024,
        color=(0.0, 0.0, 0.0, 1.0),
        alpha=True,
        generated_type='UV_GRID', # BLANK, COLOR_GRID
        float=False,
        use_stereo_3d=False,
        tiled=False
    )

# Get the image from data blocks
image = bpy.data.images.get(image_name)

# Display the result
if image:
    bpy.ops.screen.userpref_show('INVOKE_DEFAULT')
    # Change area type
    area = bpy.context.window_manager.windows[-1].screen.areas[0]
    area.type = 'IMAGE_EDITOR'

    # Assign the image
    bpy.context.area.spaces.active.image = image

Related:

Is it possible to create image data and save to a file from a script
How to open an image editor window and display an image file in it?

Perfect! Exactly what I needed.

It's also possible to create a new image containing the "UV Grid" or the "Color Grid" directly, without using the bpy.ops.image.new(...) operator:
import bpy

# Create the image
img = bpy.data.images.new(
        name='some name',
        width=1024,
        height=1024,
        # Further arguments are optional and this are the defaults:
        alpha=False,
        float_buffer=False,
        stereo3d=False,
        is_data=False,
        tiled=False
    )

# Setup the grid
img.source = 'GENERATED'  # optional, since it's done implicitly
img.generated_type = 'UV_GRID'  # alternatively use 'COLOR_GRID' here

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


text:
How to Change Image Saving Options with the Python API? (Color, Color Depth)
In my script I create an image, generate the image and then save it like this:
image = bpy.data.images.new('my_image', width=1024, height=1024)
# other code that generates the image by baking onto a texture node ...
image.filepath_raw = '//outputs/my_image.tif'
image.file_format = 'TIFF'
image.save()

But when saving the image I would like to have control over those options:

...which are available when saving from the user interface.

You can discover nearly all data paths from Blender GUI itself.
Set your mouse cursor over a field and a tooltip will appear:

You can also copy (part of) the path directly here:

Then you can use it (and test it) from the Python console, and also discover all the properties you need using autocompletion with the Tab key:

So concretely you can for instance:
bpy.context.scene.render.image_settings.color_mode = 'RGBA'
bpy.context.scene.render.image_settings.color_depth = '8'
bpy.context.scene.render.image_settings.compression = 20

You can now easily search in the documentation:

And have access to a complete information for the fields values (click me).


text:
Python: How to Save UV Layout With Specific Background Color?
select_obj(some_obj)
bpy.ops.object.mode_set(mode="EDIT")
bpy.ops.mesh.select_all(action='TOGGLE')
bpy.ops.mesh.select_all(action='TOGGLE')
# how to set background color of this image?
bpy.ops.uv.export_layout(filepath='uv_layout.png', size=(1024, 1024), opacity=1)
bpy.ops.object.mode_set(mode="OBJECT")
bpy.ops.object.select_all(action='TOGGLE')

The image looks like this (it has a transparent background):

However, I want to achieve a colored background like this:

I've tried to import PIL and do the image manipulation with this module, but it seems as if it isn't included in Blender.

A simple way is to hack the addon here: https://developer.blender.org/diffusion/BA/browse/master/io_mesh_uv_layout/export_uv_png.py$33

@lemon But how am I supposed to change Blender's source code from my Blender addon?

In that case, can reuse the code? As bpy.ops.uv.export_layout doesn't do it, what an answer can be except rewriting it? Or reprocess the file exported by bpy.ops.uv.export_layout (but a lot slower...)?

@lemon Sounds good! I will try it :)

It is not that hard to overwrite the function provide by the module itself (it is still in Python scope):

Caution:
The following code may now work as expect since source code is constantly changing.
One should always look at matched source code and modify the "clear" color in used (the tuple (0.0, 0.0, 0.0, 0.0) )

import io_mesh_uv_layout
from io_mesh_uv_layout.export_uv_png import *

def new_export(filepath, face_data, colors, width, height, opacity):
    offscreen = gpu.types.GPUOffScreen(width, height)
    offscreen.bind()

    try:
        bgl.glClearColor(0.0, 1.0, 0.0, 0.9)  # Here, a green, 0.9 alpha background
        bgl.glClear(bgl.GL_COLOR_BUFFER_BIT)
        draw_image(face_data, opacity)

        pixel_data = get_pixel_data_from_current_back_buffer(width, height)
        save_pixels(filepath, pixel_data, width, height)
    finally:
        offscreen.unbind()
        offscreen.free()

io_mesh_uv_layout.export_uv_png.export = new_export  # Directly overwrite it

In your addon, you can provide a color picker(from a color float property) for user. And after updating the value, patch the original export function on the fly. There shouldn't be any tricky part and no performance issue at all.

A more complex method is to modify the uv layout export itself:

Which needs to modify the operator itself, kind of tricky but more flexible to use:
 (Comment included)

If black background is good enough you could import the created image and remove the alpha channel.
select_obj(some_obj)
bpy.ops.object.mode_set(mode="EDIT")
bpy.ops.mesh.select_all(action='TOGGLE')
bpy.ops.mesh.select_all(action='TOGGLE')
# how to set background color of this image?
bpy.ops.uv.export_layout(filepath='uv_layout.png', size=(1024, 1024), opacity=1)

img = bpy.data.images.load("C:\\File\\Path\\Here\\uv_layout.png") #Import image. Remember to change filepath
img.alpha_mode = "NONE" #Ignore alpha channel
img.save() #Save the image

bpy.ops.object.mode_set(mode="OBJECT")
bpy.ops.object.select_all(action='TOGGLE')

Just make sure you change the filepath to point to your file.

This can be done manually in image editor from the Alpha drop-down menu by selecting None. Alpha Drop-down menu is under Image tab. Image tab visibility can be toggled by pressing n.

That's definitely a good idea! Unfortunately I also need other colors than black :)


text:
Control the scale of an object by another parameter (length of another object)?
I have this lever:

When I move that selected face (of the cube) in a local way on the X axis...

I want that parameter to control the scale of the sphere (when the length of the lever is short, the size of the sphere is small, when it's big, the size of the sphere is big)... BUT...

While also retaining the sphere on the lever.
Not sure how to do it.

I hope i understood you right, so you want this:

this can be done with drivers.
This is how e.g. my scale x/y/z driver of the sphere looks like:

Input is the cube's x-location and i just use that as scale value.
blend file:
To add a driver just right-click on the property you want to drive and choose "add driver".
A driver works like this: you have an input variable (or more or none) and with these you can "drive"/change that value where you put the driver in.
e.g.

here my input variable is again the x-location of my cube.
With this i change the z-location of my sphere with this:
var + .8
var is the x-location (of course i could have renamed it) and i add .8 to it, because it has some "starting position" because it "sits" on the lever.

Yes, thats exactly what I want, thank you! I will explore drivers.

I just noticed you provided a lot more detail, thanks a lot! I will try to see how to add drivers and then add those settings. Thank you for the blend file as well, so helpful!

you are welcome. If you don't understand something, just ask - then i will improve my answer.

Thank you! I am a bit confused how you were able to add a driver to that specific face x location on the plane. When I move it with G -> X, and I right click the X parameter, I don't find a "Add Driver" setting.

honestly, i did not really understand what you meant with face x location - i just used the x location of my cube to drive the other values. You can add a driver buy right clicking over the property (e.g. z scale value) and then "add driver"

Sorry I meant that the length of the cube was growing but not on both sides, on one side only, which is what I wanted. I figured out that you simply moved the object's anchor point to that opposite face, and scaled in local space. Brilliant!

yes, that did the trick ;) the problem is, that if you are a bit more experienced, you sometimes "forget" the "gotchas" you made earlier...


text:
Curve edges of cylinder extrusion inward like an arc
I have a cylinder which I've extruded like so:

I want to convert those edges to be curved like an arc inwards like so:

Such that the entire bottom section is curved (the faces along with the edges).
Note: beginner

Make the bottom shape like this

Select this edge loop

Hit ctrl-b to create a bevel and play with the Shape slider

You can turn on Clamp Overlap and adjust the Width to get it to go all the way to the outer edges

Absolutely beautiful! Thank you so so much for the effort in this answer! Is it possible to get the top line of the curve to merge with the cylinder? I guess by making the segments thin enough I could approximate that.
I will experiment with this and maybe I'll stumble on something!

@Hmm See the last comment in my answer, "turn on Clamp Overlap and adjust the Width" This tells Blender to stop allowing any more adjustment when an outside edge touches another edge. So you can drag the Width slider until the bevel stops getting any bigger. It does create overlapping vertices but selecting all then merge by distance will clean that up :)

HISEROD answer below is actually an easier way to do that :)

AH! Sorry about that, didn't understand the first time. Makes sense! Thank you. I will try both methods. Man... I love the internet. So many kind people!

Just make your extrusion (E, ShiftZ in my case) and bevel the inner edge loop (CtrlB).

How do you make the extrusion only along the X and Y axis?

Never mind, found the answer, for those looking press E to extrude, then S to scale!


text:
Reduce sine wave f-curve modifier frequency?
I've got an animation of an object with an f-curve with a sine wave (Built-in function), and a Noise modifier in the graph editor.
When I exported my animation it was too fast.
I know I can increase the number of frames to reduce the speed but I don't want to do that.
Instead, I want to reduce the frequency of the sine wave from the graph editor. Is this possible?
If not, is it possible to slow down the frequency of the graph editor as a whole (for all animations?)
(The second option would be way more preferable actually)

Sorry about that, I found the answer (not for decreasing the speed of the graph editor animations as a whole (meaning f curve modifiers which can't be edited through keyframes since I've got only 1 key frame), but for sine wave functions.
The answer is reducing the Phase Multiplier below 1:

No need to apologize. And thanks for coming back to answer the question. It's actually encouraged that people answer their own questions when they figure it out on their own. It helps others learn.


text:
How to achieve soft body pieces squeezed inside of sphere effect like this?
I want to create something similar to this ad at around 4 seconds in: https://www.themill.com/work/case-study/samsung-notebook-plus2/

You see these balloon-like objects that seem to be squeezed into a cube, like a mime. Then it's as though a boolean occurs.
I want to create something similar but with a sphere, and where the actual sphere is not visible, just the objects that are squeezed inside of it, like the ad.
I also want to replicate the boolean effect.
I've never tried soft body stuff or physics stuff before, and am unsure how to go about this.

maybe look here: https://blender.stackexchange.com/questions/82952/scaling-a-soft-body-object-inflated-balloons-in-a-box

Thank you! I tried this with a sphere and it seems to have worked only after adding collision to the sphere and flipping the normals, as well as adding collision to every bubble. However, when I try to do a boolean of a cube into the collision sphere (not the bubbles), they don't get squeezed, they pass right through the boolean as though there is no cube. Even if I add collision to the cube, it still doesn't work.

do you really have to use a boolean, can't you use an invisible object as a collision object?

True! I just tried and it worked! Thank you thank you thank you!

alternative https://blender.stackexchange.com/questions/219183/expanding-balloons

For the basic balloon trick, see the answer here. Then, instead of using Boolean, use an invisible object and give it Collision.

Do you know how I could prevent it from inflating over time just having it remain at a constant level of inflation?

maybe stop the simulation at a given frame (under Cache)?

Well I do want to animate the balls as they move around, so I think I want to keep the simulation going to maintain that soft bouncing effect. Would this maintain that?

oh ok, I don't know enough about soft bodies, I hope someone will tell


text:
Create a network of nodes using Geometry nodes?
I have this 2D image of a network I created:

I'd like to convert this to 3D using geo nodes, such that the circles are spheres, and the lines are thin cylinders. I want to do this such that I have one parameter that I can turn up to increase the number of triangles like so:
Knob at 1:

Knob at 2:

Knob at 3:

And so on.
What I've tried so far has failed. First I made a triangle object by deleting one of the vertices of a square and selecting all then F (to fill in a face).

Then, I added point instances of spheres to that:

When I tried subdividing however, I did not get the exact same shape I drew:

easiest way I can think of is using the Grid Node, it's perfect for this...

the blend

Wow! I could not be more impressed! Thank you thank you thank you. My one question is: are these lines connecting the spheres not a mesh? I'm curious how I could make them cylinders / a mesh so that I can add a material to them.

you're welcome Hmm, thank you for the nice question..! you would need to convert those curves to mesh using a profile curve to be visible in render... just updated the blend

Yay! Exactly what I wanted. Thank you so much again that was very kind of you.

didn't explain it but it's really simple, you use the grid node, rotate it 45º and delete the top part, then place sphere instances to vertices... for segments you convert grid to curve and back to mesh... the 'map range' node is used to scale components, didn't do the math, those are just approximated values and depends on the max level you need

I know that there's already a checked answer for this question but in case you want to try out another method to create the network, here's a hardcore way of achieving the network :)
You can, ideally, have two points at the starting (or 1st position of your network) that you can use to instance the first two curve lines of your network. Since these lines are instances, you can take their indexes and use the Modulo math function to a mask so that you can tell Blender to rotate the lines in 2 opposite directions. It'd look something like this.

Now, we need to repeat this step for every iteration (or knob) for the network to keep expanding. For this to work, you'd need to be able to select only the last points of every iteration (or knob). Since you're using curve lines from the beginning, you can take advantage of the Endpoint Selection node with Capture Attribute to achieve this.

These "last points" can be re-used for instancing the UV spheres later on. Our node setup at this point would look something like this.

Once you're done with the 1st iteration (or knob) of your network, you can group all the nodes together and start passing out the needed outputs to keep repeat the process over and over again.
With 8 iterations:

You can keep doing this until you're satisfied with the result. Here the full node setup:

For this method, there are a couple of things that are worth to be noted:
Advantage points:
Lines length: You can adjust the lines (thus increasing the overall size of the network) and still be able to keep all the lines and spheres correctly connected.

Angle: The spreading angles can be freely adjusted.

Disadvantage points:
Peformance-wise: the more iterations you have, the more time it'd take to process things.
Time-consuming: Passing each output through node groups one by one takes quite some time.
Here's the blend file in case you want to take a look later. Extra reminder, it's recommendable you're using Blender 3.2+ since there are some nodes that aren't available in the 3.2 or below version.

oh that's some heroic work right there :))

nice work, but some loop nodes would really help here... also this answer seems less specific in the sense it would work for other shapes too


text:
Camera doesnt capture viewport in Blender 2.8
As per the instruction, if we want the camera to capture the viewport we have to press ctrl+alt+numbpad[0]. This works for native blender geometry. But when i import the object in .obj format to blender, everything seems ok but the camera doesnt capture viewport using the shortcut.
Is this a known issue?

Can you clarify what you mean by "capture" the viewport? Ctrl-Alt-Numpad-0 moves and rotates the active camera to wherever the viewport currently is.

Yes thats what i meant by capture i.e. move and rotate to point to what viewport is seeing, but when you import an object, which is large, it doesnt move/  rotate the active camera .

Is the camera the Camera in the Scene Properties? https://blender.stackexchange.com/questions/149987/whatever-i-do-i-cant-change-camera-view/149992#149992

@FFeller the problem was the default clipping of the camera because the scene was quite large and due to clipping of the camera it just shows grey.

From trying to replicate the described problem, I found this potential pitfall (which has been confusing new users for years). The camera actually does move to the new viewpoint, but only shows grey.
If that is the problem you're having... it's because each Camera has its own Clipping Distance limits.

Once you've moved it far enough out, make sure the Camera's Clip End is increased enough so it encloses the distance back to the origin.

This solved the problem. Yes the camera moves but all i see is grey due to clipping. Not sure why this hasnt been fixed yet. I also had to change clipping for the viewport when I imported the model so it seems like have to redo it for the camera as well.

It didn't even occur to me to suggest it at first (as it's "just one of those things" you  get used to), but it's very interesting to hear a fresh perspective on it. Just out of curiosity, when you say 'hasnt been fixed yet', do you have any suggestion how it could be fixed?

It could be fixed by automatically detecting the size of the geometry and dynamically assigning the clipping values automatically so just like other 3d packages one can see the large or very small model by default and dont have to perform clipping adjustment. In summary I had to adjust clipping parameters when i imported the model and "again" for the camera and subsequently "again" for shading panel and other panels which is quite annoying when you are coming from Rhino or Maya because of Blender hype

@GENIVI-LEARNER Thank you for replying to that, it was just personal curiosity, but you're right, totally makes sense, just to get rid of one of those continual small extra manual actions/annoyances that the program could detect pretty easily.


text:
How to change the color of my custom node's label
My extension uses nodes and I would like to be able to change the color of their label. At the bottom of the page is a picture of what I'm talking about

The color of the header can't be edited, only the body. Set use_custom_color to true and then assign the color

This cannot be done. See more
https://projects.blender.org/blender/blender/issues/69086
and here
https://projects.blender.org/blender/blender/pulls/105102


text:
How to add my own SECOND splash screen
I want to add a second splash screen that will appear when I start blender and in which I can add my own text. This is necessary for my addon.

Not possible using python, we would have to compile blender...


text:
How add editor type like "COMPOSITOR"
There is already an answer to the question whether it is possible to create your own editor type, but my question is more SPECIFIC and also the answer to this question is very OLD. I want to find out how to create editor type as a compositor. For example, there is addons like "Animation Nodes" or "Socar" and they add their editor type like compositor to Blender.

Have a look into the templates that come with blender: Text Editor > Templates > Python > Custom Nodes.

@brockmann with a bit more explanation that would be a perfect answer to the question.


text:
Subdivision modifier renders with Viewport Subdivisions in Edit Mode
Modelling a mask in Blender. Used subdivision modifier with 1 subdivision on the Viewport and 2 on the render. Like this:

I made sure the render and realtime buttons were active as can be seen above.
In object mode, behaviour is what I expected, 1 subdivision applied in the Viewport, 2 in the render, like so:
Object mode Viewport

Object mode Render

If I enter Edit Mode, the viewport still behaves as expected, but the render always shows the number of subdivisions set for viewport, like so:
Edit Mode Viewport

Edit Mode Render

I am new to Blender, do we have to exit Edit Mode and then render?

To see the modifier settings enable the last button, the one with an inverted triangle. That is the one that enables visibility of the modifier in edit mode.

I am also new to Blender and noticed this recently. I believe it's due to the fact that you cannot apply modifiers (e.g. Subdivision Surface) while in Edit Mode. When you render, it still takes into account whether you're in Object or Edit Mode. So yes I believe you must be in Object mode for the modifier to be applied during the render.


text:
Separate parts to single mesh
When I add a model with seperatly parts from an other program it loads into a single mesh instead of separate ones, how do I fix that

your question is not clear, are you talking about a single mesh or a single object with different meshes within? For the second case, select each mesh with L then press P (Separate) > Selection, or select all and press P > By Loose Parts

What is the external file format? Could you provide an exemple?

@lemon it's obj

Moon like for an example I exported 4 meshes in single time and when I open it in the 2.8 workspace it's only a single mesh, but when I used to open it on the 2.79 it was 4, I want to know how to import them as separate meshes in 2.8

Is 'split by object' option checked in the import panel (bottom left)?

I don't know let me check when can open, if it's checked should I uncheck it or nah?


text:
sail wind animation from Blender to Unity
I created a raft with a sail and I added a WindForce in order to animate it.
As I'm really happy with the result (cloth modifier + WindForce), I would like to import the result to Unity.
But as it's not a standard animation with rigs and stuff, I have no idea how to export it, if it's even possible.
In case it's not, I was thinking about reproducing every frames of the Sail wind animation, but the question is :
It is possible to "extract" or "copy" a frame in order to create an independant object with the same shape?
I hope it's clear and not too stricky to solve!
Thanks for reading and any help will be well appreciated.

https://blender.stackexchange.com/questions/42910/how-to-bake-object-with-cloth-simulation-and-subsurf-not-applied-having-troub


text:
Make points rotate so they point towards target object using geometry nodes?
I would like to do what is described here: https://www.youtube.com/watch?v=CedtNe4CFrk&ab_channel=RyanMaggs
And here: Geometry nodes circle point instance looking towards center
The trouble is that both are done in the old version of Geometry nodes. I'd like to do this for Blender 3.1.
I have some cylinders, and I'd like them all to point to the sphere at the center:

The related question that you have linked is already for Blender 3.0 and Geometry Node Fields.
The missing part is probably the direction vector.
If you want to let objects point all to a target you need to calculate a vector that points in this direction for each object. The vector is v = location B - location A.
location A is the position of the point/object from the Position node and location B is the position of the target from the Object Info node's Location. Use a Vector Math node to calculate the vector v.
Then use this vector v for the Align Euler to Rotation node to calculate the needed rotation of the points/objects. That's it.


text:
How to invert shading on an object?
I'd like to invert shading in this sense: When there's a light on an object (e.g. a sphere), where the light is meant to be, it's dark (like a shadow), and where the dark parts are meant to be, it's light. Would love any help whatsoever!

Not sure if this is what you're looking but you can give a light a negative power like -100 W. Then it spreads darkness.

Mmmwahhhahahaha!

@Blunder Thank you! Love this.

In EEVEE,  you can invert the light-response of a surface using Shader to RGB

Super interesting! Thank you! This is actually closer to what I want but I wish this feature was in Cycles (not via compositor)

In the compositor, the colors on an object can be inverted. In other words, where the shadow is will be bright and where the light is, it will be dark.

Details:

Create the scene
Go into the compositor, enable nodes.
Insert an invert node and everything will be inverted.

To select an object to invert, cryptomatte will be used.
Enable cryptomatte in the View Layers Properties

In the compositor setup nodes as shown below to mask out one of the objects.

The Blender 2.92.0 file for this is available here -

Beautiful! Thank you so much!


text:
My mesh deforms when I shade smooth
I am modelling a character but wherever I bridge edge loops between hands, feet and arms my mesh doesn’t look good at all when I apply subdivisions or if I shade smooth. I have removed doubles and set scale and rotation of all objects to zero but nothing works. An answer would be greatly appreciated, thanks!

You need to learn topology, for which there's plenty written on this site and elsewhere.  You want all convex, relatively planar, relatively square quads, relatively evenly sized, with no 6+ poles, and 3 and 5 poles placed on the most planar parts of your mesh.  Try doing an image search on "3D topology" and study what you see.

i have good topology with all of the categories that you said. i am familiar with this. I will upload a topology image. However I have all quads no 6plus poles. I only have this problem when i bridge edge loops and fill in edge loops. Thanks. I am following the video tutorial on the youtube channel Blender Arthttps://www.youtube.com/watch?v=ySZnHBbthrE&list=PLY4NaOmLmvHbbP9GneJsIxQWz3uR__m3S&index=2

How to take a screenshot

Some of your normals are probably going the wrong way. Try selecting all in edit mode then select Mesh > Normals > Recalculate Outside

Thanks, this worked. I really appreciate this. Thanks ever so much


text:
i am stuck on how to weight paint my human character using the rigify add-on
i am trying to weightpaint my character. I have used the riify add-on to rig it. I do not know what the relationship between the rigify rig and weight painting is. Do i paint on the human meta rig? I am trying to make it so that i can control my character using the rigify rig. I know how to weightpaint the human meta rig but i am unsure how to approach it with rigify. Help would be really appreciated as i am desperate to get animating after making this character for so long! Thanks!

The metarig is only used to lay out the bones on the mesh. I recommend a tutorial if you're not familiar with Rigify.
Place the character model so that it stands on the "ground" (soles of the feet at z=0). Make sure you have applied All Transformations (scale, location, rotation) to the mesh with Ctrl+A (in Object mode) before you start. The bones of the elbows and knees should be bent slightly.
When you're happy with the layout, apply All Transformations to the metarig, then press the Generate Rig button. You can use this button more than once. Rigify can override the generated rig. See section button Advanced Options.
The Generate Rig button creates the actual rig. It's just named "rig" and has all the control bones and deform bones (layer 30) on different layers.
After you have created the generated rig you can parent it to the mesh with Automatic Weights and test it in Pose mode.
There might be some issues that need to be fixed.

The fingers might need some corrections. To make the fingers "grab" you need to scale the red handle. If it doesn't work proper have a look here: Rigify finger controls rotation not moving correctly

The eye lids you might have to weight paint manually. And you need to parent the eyeballs to a bone of the rig to make them follow the control. Video: Fixing the Metarig - The SECRETS of RIGIFY: Part 3 and Weight Painting - The SECRETS of RIGIFY: Part 4! - [Blender 2.8]

The teeth and tongue might need some weight painting

Thanks! I am really grateful for your advice and it has helped a lot!

The main things you should understand are:

The meta rig is just a way to build the Generated rig. You always parent and weight paint with the Generated rig.
The Deformation bones of the Generated rig are on layer 29 which is hidden by default. So you weight paint Rigify like any other rig but you have to unhide layer 29 first.


text:
Where to Download Missing Textures
Where can I find the missing textures for Blender? You see, I'm trying to color a model of a little girl for Tina in the 3D remake of Barney and the Backyard Gang's Three Wishes video.
https://www.youtube.com/watch?v=ceD2VJ3_GTI

Those aren't missing textures for blender. That means that the model you downloaded is supposed to include textures that weren't there.

might be the textures are included but the paths do not match where they are on your system. Simply put, Blender can see there should be images files for the object but can not load them. The system console may detail what the paths it is looking in are.


text:
How to Export Colors in Blender
How do I export color models in Blender? I'm trying to color them but they come out in gray.

Try .fbx it should work

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


text:
Exporting Animation with Mesh using Follow Path Constraint
new to blender, was following a video tutorial which did not show me how to export the mesh/animations, and have run into some trouble. Project is a free designed Roller Coaster, created with 5 Objects.
One cube turned into tracks using an array modifier,
One cube turned into 3 Rail Car objects,
One Nurbs Path, used to create the "track"
The issue:
Currently, when exported to FBX with animation keyframes, I can import to other software, however the animation does not come through. Furthermore, when reimporting into blender the entire mesh is gone.

Now, the object and animation work fine within blender, but something is going wrong during the export process. Would greatly love any hints/assistance, but unfortunately this is all the detail I can provide until asked other questions :)
Please just ask if you require more information. Thanks for your time.

Update -- I have managed to export the mesh into a file which can be remiported, however at this point it loses the follow path constraint entirely

You can't export constraints at all. Try to export to fbx. In the exporter window switch to the animation tab (in the lower left corner) and disable "All Actions" and "NLA Strips".


text:
whatever I do , I can't change camera view
i can't change came angle or delete and all new created cant change camera view.
thank you very much if you can find out what the problem is

Please add more information to your questions. Blender is a complex software and "I tried everything" tells pretty much exactly nothing.

@FFeller solved my problem :)

In the Properties>Scene tab you can choose which camera will render. For some reason you can use meshes as camera and you did it. Switch back to camera instead of the sphere mesh.

thanx you man,  finally achieved something with u


text:
How to prepare model for 3D print?
the problem is simple, I often work with models that are prepared for animation. So lots of planes, non closed object and so on. For 3D print I need to close all holes, make planes solid and merge all the object so there are no intersection. This is a hell of a proces when the model has about 200 pieces and you have to check them all and the process has lots of errors, is there something that makes this kind of automatic?

Have you tried the blender 3d printing add on?. If that hasn't worked, I'd suggest exporting a selection and attempting a different workflow. That article's goal is to create a mold, but the software it uses (Meshlab, Meshmixer) can help you accomplish some tasks. Some very complex models I have found hard to do everything automatically. Further, if you are working with slicing, I would recommend chitubox. It automatically hollows models and creates supports.


text:
Constant light intensity in render
I have a question about rendering. I have a simple render, object in front of direct light and camera. I have simple turnaround and I would like to have constant light intensity on the object. So far the front of the object is brighter beacause its closer to the light. How to set it up, so the object isnt in gradient of the light and shadow?

Delete your light and do light your object with your world just like that. This won't be very realistic though, might be best to use an HDRI.

Yeah, just background, looks wierd, but the HDRi background looks like something that could work.

In light setup, check the value "Custom distance" helped me


text:
Clean up intersecting geometry
iam repairing a model that has intersecting geometry. It is a really dense mesh that was conected via boolean. So it is firmly connected but in a wrong way and i have no way to erase this zero thick wall without selecting it manualy, which is in that dense mesh almost impossible. Is there a way to isolate this kind of geometry and delete it?

If the mesh is watertight but has areas with zero thickness then these areas are non-manifold. In Blender 2.80 you can select them using Select > Select All by Trait > Non Manifold.

For 2.79 and earlier take a look at this answer by gandalf3.

It might be easier to select the outline of it selecting edges or vertices with ctrl+click to select the shortest path between them and then use Select Loop Inner Region function:

I think that these advices are good I didnt know about selection of non manifold geometry, its pitty that it select only the edge, not the whole polygons. The selection came to my mind as well, but the geometry was really messy and big. I ended up completely deleting the whole perimetr of intersecting geometry and remodeling it.

I noticed that usually this kind of work is not very pleasant and it seems like it takes a whole lot of time because it takes effort, however in reality, if you actually measure the time you spend on it, even though unpleasant this is a surprisingly fast process.

Yeah, probably because its boring :D


text:
how to add thinckness to complex geometry
Iam modeling a top for a 3D printed toy car. I started from a mirrored plane, so it now has no thickness. If I use solidify modifier it makes a lot of bad geometry and intersecting faces. Making it manually seems like to much work. Is there a right or balanced way to add thickness to this model so it can be 3D printed?

you could test extrusion and its different options to see if it makes a difference, it will probably need to rework a bit anyway

Hello :). The solidify modifier has a 'complex' setting with different options. It often gives better results, but may still require manual tweaking in the end.

@JachymMichal yep, already tried that, it has much better results, but still makes intersections. I feel like there should be more options when adding thickness, like merging geometry and preventing geometry from penetrating in the corners and so on.


text:
3D PDF from Blender
i have a customer that uses 3D views of products and he send me a PDF actually containing a 3D model which you can turnaround and observe. How I get this PDF containing 3D object out of blender or what conventor do I need?
Thanks for answers.

Hello :). It seems there is already a similar question https://blender.stackexchange.com/q/72572/78972. Just let us know, if it works for you.

Oh, I somehow missed this post, its about the exact problem, but the solution is little bit obsolete and does not work for me. They advice to use meshlab to convert files to U3D which should be usable for PDF, but the Meshlab itself is now 4years old and has a bug when exporting file to U3D it was supposed to be repaired in the next version which never came out.
Is there another way to make interactive 3D PDF or do I have to use some convertion to U3D because its kind of wierd that you have to have a separate paid program just for convertion. And do all the proces just to have a simple PDF

Hello :). I'm no developer, but if adding full support for 3D Pdf was that simple, I'm sure there would be an addon for that. Maybe there is. You can also suggest this to Blender developers and ask them. Anyway, good luck, and let us know what you found out :).

Ok, so far I ended with photoshop which I have access to. Photoshop can actually open some 3D files like .OBJ, textures are OK the materials not so, there are some informations missing as for example gold PBR material now looks just like dark yellow and the photoshop export to U3D or directly exports a PDF with the 3D file which is awesomly simple. If the Blender would have some export for PDF or other formats that non-graphic users can see as an amateurs it would be great for customer service.
I will dig more deeper to find out about the materials convertion. And also as the developers.

Thanks for the info. Consider posting your comment as an answer, because for many people Photoshop is a readily available solution. Until there's native support in Blender, that's our best bet. And thanks for posting on rightclickselect :).

Ok, so far I ended with photoshop which I have access to. Photoshop can actually open some 3D files like .OBJ, textures are OK the materials not so, there are some informations missing as for example gold PBR material now looks just like dark yellow and the photoshop export to U3D or directly exports a PDF with the 3D file which is awesomly simple. If the Blender would have some export for PDF or other formats that non-graphic users can see as an amateurs it would be great for customer service. I will dig more deeper to find out about the materials convertion. And also ask the developers


text:
How to copy a surface of an object
just simple and quick question, is there a way to make a plane object like text to copy surface of another object, like in the picture?

Yes, use the shrinkwrap modifier

Thank you, I have to go through the modifiers, there is a plenty things what they can do.

One mesh can be projected onto the surface of another, by adding a Shrinkwrap modifier to it.

The Shrinkwrap modifier allows an object to “shrink” to the surface of
  another object. It moves each vertex of the object being modified to
  the closest position on the surface of the given mesh (using one of
  the four methods available).
It can be applied to meshes, lattices, curves, surfaces and texts.

For your example, the shrinkwrap modifier should probably be set to project, with the X and negative options checked.


text:
Setting to brush texture follow the path of drawing?
iam currently using sculpt brush of a animal fur, but iam not happy with how it works. All the settings make it like the stencil that the texture is in one direction and it doesn't look natural. Is there a setting that tilt the pattern as Iam dragging the mouse so the pattern is created naturally with the movement and it will tilt when the brush change direction.
(P.S. I would like to have the same effect as well for texture painting, if there is the same setting)

This should be the option you want.
Properties panel(N)>Tool>Texture

From manual:

Rake R
Angle follows the direction of the brush stroke. Not available with 3D textures. (Shortcut sculpting only.)

https://docs.blender.org/manual/en/2.81/sculpt_paint/brush/texture.html

Oh where is that in 2.8 I cant find it

@Fowl it is right under the place where you specify your brush texture

Finally found it, I didnt realized that I used 3D texture

@convector wait, so it does not work in sculpting at all?

@Fowl it does work with 2d texture but not 3d textures.

@convector when I create a texture and use it in paint there is the rake option but as soon as I use the same texture for a sculpt brush, the rake option is missing

@Fowl what did you set the mapping to? Only setting it to view plane, area plane and random will have the rake option.

@convector thanks, that was the problem


text:
Multiple holes in object by boolean
I have a sphere with wall thickness that is separated for 3D print to 36 pieces that intersect a little. I need to randomly pierce it by holes. So I a made the 36 pieces a one object, model the cylinders also made them one object and then tried to subtract them from the sphere. As I expected, the Boolean went mad and it turned out badly. How to achieve the desired model with working Boolean or in other way? Here is my file.

Answer A:
The reason it doesnt work is that you have a very bad (unecessarily huge and unstructered) topology (See 1). Using a fresh and nicely subdivided icosphere/uv-sphere the boolean operation should work better. (See 2) I'd also suggest to use simple topology cylinders with bevels instead of those highpoly triangled ones.
I'd say build it from scratch and lowpoly, but if you dont want to, to keep your creases/trenches you could also try the new remeshing options (Voxel/ Quadriflow) to get some clean topology.
Your specific modell is easily reproduced using a mirror-modifier workflow, after extracting the necessery parts from an UV-Sphere via Separate. (See 4, m-mod is not applied yet in image)

Answer B:
Workaround for unreliable boolean modifier when using a loose parts cutter objects - meaning the cutting objekt has multiple unconnected polygroups inside:
Separate your cutting object by loose parts and apply to every loose part to be cut a boolean modifier per loose part cutting object.(per cylinder in this case)
Doing this by hand is tedious! Here is a script to set boolean modifiers to the active object for every single object in a specified collection:
import bpy

#boolean modifier will be applyied to active object
obj_base = bpy.context.object
#per object in collection named "Coll_Cutter" the active objects gets one boolean modifier
collCutter_name = "Coll_Cutter"

for c in bpy.data.collections:
    print(c.name)
    if c.name == collCutter_name:
        cutterlist = c.all_objects

for cutter in cutterlist:
    bool_one = obj_base.modifiers.new(type="BOOLEAN", name="bool 1")
    bool_one.object = cutter
    bool_one.operation = 'DIFFERENCE'

Actually I started from a clean topology and the boolean didnt work as well. If I subtract from one sphere it is OK but as soon as I divide it to those 36 pieces and i add thickness it cause a mess. I can divide iso sphere as clean as normal uv sphere.

i dindt realise that the mesh has loose parts. 1 You could separate it by loose parts and apply the modifier via linking (Ctrl+L) to all the parts. 2. generally a rule of thumb that makes many things easier is working from simple to conplex: in this case id suggest to get the thickness with a solidify modifier, after cutting the holes. This way you would reduce the complexity of the boolean oeration, therefore strengthen its sucess, and also keep a clean topology.

Oh yes, that didn't come to my mind that I can separate them but keep the modifier for all of them. Or try thickness after the boolean. Will try, I guess the separation will do.

Hmm, it did the same thing as before :-/

if you update the file i can take a look at it

I just tried to apply the boolean just on one piece. Nothing no update. The problem with the thickness is, that I have to make it thick before boolean and then copy it to make the sphere, because after that it is hard to slice it into the 36 pieces for 3D print

i see, after testing i also found that the boolean modifier with multiple objects as cutter is unreliable, even with simple geo. Mabey if you take 1:1 (Mesh to be cut : cutting mesh) so that one cylinder is the difference object for one part of the sphere. setting this up manualy is tedious, trying this via script would be smarter. Unfortunatly i dont hav eenough time for now, maby in a few hours or tomorow i can help you with that.

updated answer with new option

Oh great, just one thing, I have never used a scripting, can I bother you and ask you to explain more for a noob the way to do this?

Yes of course: this script is ready to go. Scripts are written and exwcuted in the text editor in blender. Just copy it in and choose Text>run script. If an error occurs you can find that in the system console Window>Toggle system console. (On mac you have to start blender from console to get it unfortunately)

You can change the name at the top to a collection of your liking collCutter_name = 'something'


text:
Text along path does not work as expected
I have a text object that I want to go along path. The problem is, that the text moves only in 2 dimensions.
I expected that the text will be on top of the curve, but it kept offset. But that is not so important as the path not fully control the text.
What am I missing?

try to use the CURVE modifier on the text instead of the "follow path"

https://i.imgur.com/TVkqU7c.png

I had still problems with the offset and placing the text right on the path. I deleted everything and started again, the origins must be at the same place as when it is created, then it worked as i wanted.
I somehow miss more option at this, as for example, to have control where on the line the text should be and about the deformations.

also it deforms the letter and break the geometry https://imgur.com/a/s1yAFwL

There are multiple problems:

Text on Curve only works in 2D (like in Illustrator/InDesign/Photoshop)
Your Nurbs curve is bent in different direction, because it's rotated in 3D space
Text doesn't fit the Nurbs curve length because the curve needs to have applied scale

Text on Curve only works in 2D. It doesn't care about the curve's 3D rotation

Make sure the Curve has applied scale

To move an object along a curve, you can use a Follow Path Constraint on the deformed object:

But first, you may need to make sure your follower object and curve have their origin aligned, otherwise there will be an offset between them and the deformations might not be as expected. Though this can be use for intended effects too.
As for the Follow Path constraint, you can either do this manually by selecting the follower object, add the Follow Path, set the target and hit Animate Path, or you can just select your follower object, then your curve and hit ⎈ CtrlP → Set Parent to Path Constraint

This will set the constraint for you, with the target and the animation.
The only thing you may need is to set the Forward and Up axes, which totally depends the context. If you don't know what to use, set your transform orientation to Local, select your follower object with the Move active tool enabled and see which axes you need:

I dont want to deform an object, I want text follow the path, the deformation of the text object is unwanted.

i updated my answer

I'd like to see if this option works for me v2.93 / MacOS.
This is what I get for "Follow Path":  https://imgur.com/a/p7hU3oi
which I'm not finding very helpful.
I'll ask it as a separate question and see if that helps.


text:
New blender 3.2 sculpt paint does not work
iam testing the new blender 3.2 and somehow, the sculpt paint does nothing at all. On all the videos I watched, they just subdivide for enough resolution and go to the sculpting mode, select paint and starts painting. In my case, nothing happens. Is there a default setting that needs to be adjusted to work properly?

Make sure that you have selected attribute in shading:

If you want to make it visible in other shading modes (render and material preview), add color attribute node in the material setup:


text:
Rip tool not considering the mouse direction
I'm new to blender and im trying to use rip tool but it's not working properly. No matter where the mouse cursor is, it's always ripping in the same side.
This is the vertices i want to rip

And the result i get every time i rip is this, but i want the rip to happen on the other direction.

Rip depends on your mouse position. So if you want to rip off other side, you should place your cursor on the right side of your edge.
Example:

Worked now, thanks


text:
How do you texture your hard surface model
quick question to the community, I just got into hard surface modelling with hardops/boxcutter and I was wondering what approach you guys use once you have to texture your model. Do you use basic BSDF with Decalmachine? Or do you use stuff with procedural effects like materializer or Definitely Eevee Mats? Or do you unwrap your whole model to be texturized in blender nodes/Substance Painter/Quixel?
Unwrapping seems like a real paint in the butt (especially with all the booleans/bevels/Ngons,etc) and I was wondering if people encourage that approach for hard surface models.

I personally prefer to use Shader Nodes as it is easy to work with, in my opinion. However, if things are too complicated for me to use Shader Nodes, I just use the UV and paint in the textures.

If you plan to paint something like dirt or rust, you can unwrap with the Smart UV Project mode, you won't have to deal with the UVS anyway


text:
Basic extrude operations in a piece
I want to do some basic extrusion operations on a part with already defined dimensions. The first one is the extrusion of a 35mm square. I have tried to do it with "inset faces" but I can't set the dimensions I want.

The second operation is very similar. In this case, a 30mm circle. In this case, I can't make the circle to extrude.

You actually can inset faces with a set dimension. I see you haven't applied scale yet, inset will use the scale. In Object Mode, press Ctrl + A and then click Scale. Then in Edit Mode, select the top face, Inset, and enter in the dimension you want to inset from the edge by. In this case, it would be 2.5mm, so type 2.5. Then select center face, and extrude down by -5.

The circle extrusion would be easier to do with Boolean Modifiers. Create a cylinder at the center of the cuboid with radius 15mm, and any length longer than the extrusion depth. Enable snapping with Snap To Vertex on, then move the cylinder and snap the bottom face with the top of the cuboid by hovering cursor over any of the top vertices. Press G then Z to move on the Z axis. Enter -5 to move it down by 5mm.

Now add a Boolean modifier to the cuboid, set to Difference, and select the cylinder.

You can either hide the cylinder and keep to modifier, or press Ctrl+A on the modifier to apply. Keeping the modifier is usually the way to go, because you can stack as many modifiers as you want, then turn them off or on if needed (This is also known as non-destructive modelling). If you export an object, all the modifiers are defaulted to automatically apply.

Wah! Want i wanted! Thank ypu so much @Benus


text:
Run 2 versions of Blender
Can I use 2 versions of Blender? I have v3.0 can I create in v3.0 will it work in older an version? I'm using Mac in case this ie relevant.

Yes, you can run two versions.  No, files saved in 3.0 won't be right when run in earlier versions.  Best way to learn this is to try; it takes about as much time as it takes me to write this comment.

Thanks, appreciate your reply.

This answer will help you migrate to V3. This answer talks about running two versions at once.  You might want to take the tour.  Sometimes you can find answers to your questions faster if you search for similar questions before asking one.


text:
How to make an Asset Library for node groups?
I have a bunch of "shading tab" and "Geometry nodes" node groups made to do repetitive jobs like applying random selected materials to a mesh based on the place of some empty objects.
I wanna be able to easily use all these node groups in different projects with easy access.
My node groups are now messy. If I want a node group, I have to find it in some folders, open the blend file, find the node group and copy paste it. That is not cool
I wish there was a way to make an asset library of all of them, preferably with a thumbnail image.

The asset browser is still under development so I don't think they can be used in 3.0 although from a November Blender Devtalk posting you may be able to enable them as an experimental option. You can save them in your startup file though for later use. See this YT video.

Blender's 3.0 Asset Browser can partially solve this problem because you can assign your node groups to materials, one material per interesting node group; but this won't work for Geometry Nodes (yet).  It also won't work for earlier versions of Blender.
Here's my pre-3.0 technique for node groups:

Create a single Blend file
Put a single material in the Blend file.
Add each node group into that Blend file.  Tip: Name your nodegroups so they are easy to find.
Make sure that you set Fake User for the material so that it isn't removed when Blender closes the file.
Save the blend file.

Now, when you want to use your node groups you only have one file to look at.  You can either Link or Append the material to your current file by going to the File  Menu, selecting link or append and opening the saved node group file.  Navigate to materials and select the material:

Now all of your Node groups will appear in the Add menu:

This approach has two obvious problems: There are no automatically generated thumbnails to tell you what a given node group does.  The list can grow very large.
You can subdivide the groups and add them to different materials in the library file but they all end up in the same add menu.
It's not great, but it's better than searching through many files.

This is the current solution for Blender 3.2+.

You have two different ways to manage your node groups and make them reusable in Blender:

Node Presets
Asset Browser

Both do something similar: they make previously created objects available to you for reuse.
Node Presets
Node Presets are based on the similarly named add-on that comes with Blender.
Your nodes are stored in a separate file in a specific path, and you can access them in other projects.
This variant it optimal if you don't have any special nodes that can be called "Assets", but rather recurring generic nodes.

The main difference to the Asset Browser is, that these nodes are available directly in the context menu of the Node Editor:

This is especially convenient if you often want to use individual nodes and need quick access to them.
But be sure to note the following: The names of the node groups must NOT start with underscore. These nodes will be ignored.
There is, however, the following to consider here:
For technical reasons, this mechanism (just like the Asset Browser, by the way) cannot distinguish between different node types.
This has been discussed here before: How do I find out the node type?.
That's why the context menu in the shader also lists Geometry Nodes and vice versa. This can be annoying if you have created many individual nodes in both areas.
The only workaround is currently found here: How can I use custom node groups as node templates/presets?.
This contains a small modification of the existing add-on, where instead of using one path for all nodes, multiple paths are used for different node types. In addition, this add-on mod also fixes a bug so that it can be used in Blender 3.1.

Attention: Changing the nodes here requires a restart of Blender!
Asset Browser
Basically you can use all objects with the Assets Browser, not only nodes.
The basic principle is that you collect your nodes in a separate file, and define the path to it in your settings.
To do this, follow these steps:

First, make sure that you have created a library in Preferences > File Paths > Asset Libraries, and that the specified path exists.

Then switch the Display Mode in the Outliner from View Layer to Blender File. There you will see all objects that are present in the current file.

In the object group Node Groups you can now find your node (also Geometry Nodes etc.). Click with the right mouse button on the entry and select the option "Mark as Asset".

The node you marked as an asset will now appear in the Asset Browser.

To make this node available in the Asset Browser in other projects, save this blend file in the path you specified before.
In my example I used C:\Users\quellenform\Documents\Blender\Assets\ and named the library "User Library".

If you now change the entry "Current File" to "User Library" in the Asset Browser, your asset will appear there. You can now simply drag and drop it into your node trees.

Any idea how to make this so it's linked? I think when you add a node tree asset it makes a COPY of the node tree - if I fix a bug in the original asset file node tree - the bug fix won't propagate to the consumer project?

@stackzz I'm afraid that's not possible. At least I don't know of any way. Maybe a Python script helps to replace/update node groups. ..?

I found a way in blender 3.4 (not sure about previous versions) - if you open the asset browser view on the top of the area to the right of the menu there is a dropdown box with options "link, append, append (reuse data)" - if you select link option before you import an asset the data is linked and any changes in the source file will propagate into the consumer file. If you save the consumer file and reopen it from the console you can see info messages from consumer file console reading the source libraries each time on file open.

Here's a short answer for Blender 3.3 (very loosely based on what @quellenform wrote):
Right-click on the group name field in the nodes editor - then you'll get the "Mark as Asset" option. The little shield will then change to a blue asset icon. Save the file in you Asset Library as any other asset file. That's it.

Hello ! Thank you for your answer. However I don't really see the difference with quellenform's answer ?

It's just a quicker way to do the same thing.

oh okay gotcha.


text:
Edit some vertices manually without applying symmetry modifier
I'm a beginner.
1- I want to make a bunch of different symmetrical objects. These are gonna be my base meshes.
2- Then I want to make some duplicates of each one.
3- Then edit each new duplicate unsymmetrically.
The problem is that, after doing all these, I wanna go back and edit the base mesh symmetrically. If I use mirror modifier, I have to apply it for the third step. Is there a way I could do my manual edit without applying the modifier?

It is impossible to temporarily disable a modifier and 'manually editing it without applying the modifier'
But there is a method you can follow. Instead of applying a mirror modifier you can enable symmetry in edit mode.
by enabling either of these icons.


text:
Principled volume showing up in viewport, but not cycles render

Am I doing something wrong? (I'm not great with shaders lol so any advice would be very helpful)

you mean you don't see it if you make a final render?

Yep, do you have a solution?

no, I was just asking because it was not clear, but maybe share your file (just the cube with the Principled Volume)? https://pasteall.org/blend/

https://pasteall.org/blend/e10a24312d924bae9352109755a2f65d here

You've disabled the render option in the Outliner (or Object panel > Visibility > Renders):

lol how did i not notice that, tysm

@Raccoon This site is not a regular forum, don't reply "Thanks" as an answer or comment, instead upvote the post that helped you. If you feel it completely solved your issue consider marking it as accepted.


text:
Loop cut: wheel not working as expected
I'm using Blender 3.0 on Windows 10 Pro, and I just noticed that if I call the loop cut tool from the keyboard shortcut (CTRL-R), then the mouse wheel adjusts the number of cuts as expected.
On the other hand, if I call that tool from the side toolbar, then the wheel zooms in-out and has no effect on the number of cuts.
Is that the intended behavior?

In this case, Number of cuts is set from tool settings:

Sure, but what I'm trying to figure out is if the different behaviors are by design, or if it could be a setting on my side.

It is a design. How is it expected to zoom in and out when the tool is selected?

The same as when we call the tool with CTRL-R?

When you press some operator like Ctrl+R, in goes to "modal" mode. You are not able to manipulate the view while it is active. Not only scroll but even rotate (except knife tool and some others) It allows us using all hotkeys, that usually manipulate the view. But using tools doesn't lock the view, so this hotkeys can't be used.

I see. Is this way of doing things pretty consistent in Blender, or is it only a handful of tools that behave like this? I think it would be nice for the documentation team to add such a note. I will enter a "ticket" on their system. I needed to validate first if I was not either doing something wrong.

Well, it's not a bug actually, because it works as expected. You can make a post at devtalk.blender.org though. And I don't see a lack in documentation, it has a section about tool settings: https://docs.blender.org/manual/en/latest/modeling/meshes/tools/loop.html#tool-settings

When I mention creating a ticket, it's not to report a bug in the software, but rather a lack of clarity in the documentation. After reading the two different versions of the tool, Loop-Cut and Loop-Cut and slide, I now see that both are indeed documented, but for newcomers like myself, a bit more clarity wouldn't hurt.


text:
Randomize texture position by frame
I would like (for an electricity shader) to randomize its Location by frame...
I know Object Info has a random output but not sure how to change that value each frame.
Any idea?
Thanks

You could add a fourth dimension to your Noise and Voronoi texture and control the W dimension with #frame driver. Just write #frame to the value field.

The frame driver is probably too fast so you could divide it by 100.

In fact what I need is a vey different result each frame so even I have to multiply the #frame value. Very interesting solution. Thank you very much!!


text:
Scale distance between meshes
I know I can scale the distance between objects with the option below

Does it exist something similar for meshes into the same object (edit mode)?
Thanks

Break them up into separate objects, use the mentioned option then join them back into one object

There are hundred of meshes (cubes) not so easy

If not possible in Edit mode (let's see if anybody has a solution), It could be separated by Loose parts ("P" key) and do what Duarte said... not so easy but a bit easy


text:
Placing an object along an edge over another
I want to place an object along an edge over another, but keep the same angle betwen faces. My English is not good so I hope a couple pictures can show what I want. I put manually a pyramid over a plane. It's placed along one edge keeping two similar angles... I would like to get it with any object/angle. Not sure if it could be done using native tools or it would  involve python scripting.
Perspective

You couldn't do this natively unless you rotate the cube how you want, then apply rotation with Ctrl+A and then activate face snapping with "Align Rotation to Target" enabled. If you wanted it to work dynamically, without having to apply rotation then I think you would need to write your own script for it. As far as I know.

you cannot do it at all with "any" object because no one knows which face of the object should have the same angle...so you should somehow define the faces which should be aligned. So tbh your question is a bit unclear.


text:
Console output in a panel or pop-up window?
I have a script that shows the absolute paths of each image in the scene. I can see it in the console but... is possible to see that info in a pop up window with bpy.types.panel or something similar?


text:
Slope mask for texturing
I found this way for masking textures using a slope.
https://blender.stackexchange.com/a/265439/105723
If it's just a basic shading it works fine

Mask

But I noticed it takes account of displacement and normals...

Mask

Is there a way to avoid that displacement and normal info and keep the first mask result?

Similarly to how you mix the color for the Principled BSDF you need to mix the displacements or the height map you use for the displacements.

I mixed the colors not the displacements, ok, I understand... Thanks!


text:
Placing 3D cursor using python
I want to place an object where the cursor is using python. So I need a script that place the 3D cursor where I have the cursor at that moment and then place the already selected object there. To do that I created a quick favorite that call that script loaded as addon (image below)

But I can't get the 3D cursor where the "windows cursor" is pointing. I'd need a script that emulate what the shift+RMB does
I'm just a newbie, please have mercy :) since my code may be neither elegant nor good
bl_info = {
    "name": "Place object",
    "blender": (4, 0 ,2),
    "category": "Object",
}

import bpy
import mathutils

class OBJECT_OT_placeObject(bpy.types.Operator):
    """Place object where the cursor is"""
    bl_idname = "object.place"
    bl_label = "Place Object"
    bl_options = {"REGISTER", "UNDO"}

    def execute(self, context):

        # Mouse cursor coordinates
        mouse_x = bpy.context.region.width // 2
        mouse_y = bpy.context.region.height // 2

        # Get the depsgraph actual
        depsgraph = bpy.context.evaluated_depsgraph_get()

        # Convert mouse coordinates to a ray in 3D space
        ray = bpy.context.scene.ray_cast(depsgraph, origin=bpy.context.area.spaces[0].region_3d.view_location, direction=mathutils.Vector((mouse_x, mouse_y, 0.0)))

        # test if ray intersetcs
        if ray[0]:
            # Mover  3D where the mouse cursor is pointing
            bpy.context.scene.cursor.location = ray[1]
        else:
            print("No se encontró intersección")

        # -----------------------------------------------------------
        # Place object where the cursor is

        # Get the 3D cursor position
        cursor_location = bpy.context.scene.cursor.location

        # Get the selected object
        selected_object = bpy.context.selected_objects[0]

        # Move selected object where the 3D cursor is
        selected_object.location = cursor_location

def menu_func(self, context):
    self.layout.operator(OBJECT_OT_placeObject.bl_idname)

def register():
    bpy.utils.register_class(OBJECT_OT_placeObject)
    bpy.types.VIEW3D_MT_object.append(menu_func)

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

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

If you have a look at the user preferences, you can see the operator that is triggered by  Shift  +  RMB :

That's bpy.ops.view3d.cursor3d() you can find it in the docs, which apparently is really not that useful in this case if you ask me. It's tricky to use from an operator and I have no idea how one is supposed to know that it needs to be run with 'INVOKE_DEFAULT', but it does. So it should be bpy.ops.view3d.cursor3d('INVOKE_DEFAULT') and it can set 3d cursor location to the mouse position from another operator.
So that would be:
import bpy

class OBJECT_OT_placeObject(bpy.types.Operator):
    """Place object where the cursor is"""
    bl_idname = "object.place"
    bl_label = "Place Object"

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

    def execute(self, context):
        previous_cursor_location = context.scene.cursor.location.copy()
        bpy.ops.view3d.cursor3d('INVOKE_DEFAULT')
        context.object.location = context.scene.cursor.location
        context.scene.cursor.location = previous_cursor_location
        return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

It works like a charm... so simple so effective. Less is more. I have much to learn yet.
Thank you very much

AFIK, we should avoid the use of bpy.ops inside custom scripts.

@VíctorGV, Karan is right though, keep in mind it might not always be the best idea to go too crazy with operators in your code. I think this one is probably fine though and I think it makes some sense in this particular case, but it's not "the best" way, just one way to do it.

You should use a modal operator
import bpy
from bpy.types import Operator
from bpy_extras.view3d_utils import region_2d_to_location_3d
from mathutils import Vector

class OBJECT_OT_place_object(Operator):
    """Place object to the 3D cursor"""

    bl_idname = "object.place"
    bl_label = "Place Object"
    bl_options = {"REGISTER", "UNDO"}

    def invoke(self, context, event):
        self.cursor_location = context.scene.cursor.location.copy()
        context.window_manager.modal_handler_add(self)
        return {"RUNNING_MODAL"}

    def modal(self, context, event):
        cursor_location = region_2d_to_location_3d(
            context.region,
            context.space_data.region_3d,
            (event.mouse_region_x, event.mouse_region_y),
            Vector((0, 0, 0)),
        )
        context.scene.cursor.location = cursor_location

        if event.type in {"RIGHTMOUSE", "ESC"}:
            context.scene.cursor.location = self.cursor_location
            return {"CANCELLED"}

        elif event.type == "LEFTMOUSE":
            for obj in context.selected_objects:
                obj.location = cursor_location
            return {"FINISHED"}

        return {"PASS_THROUGH"}

def menu_func(self, context):
    self.layout.operator(OBJECT_OT_place_object.bl_idname)

def register():
    bpy.utils.register_class(OBJECT_OT_place_object)
    bpy.types.VIEW3D_MT_object.append(menu_func)

def unregister():
    bpy.utils.unregister_class(OBJECT_OT_place_object)
    bpy.types.VIEW3D_MT_object.remove(menu_func)

if __name__ == "__main__":
    register()

Hard to reed those long lines. :D I finally start to get what this whole PEP8 thing is about. :D

It might be nice to avoid using operators in code since they are really meant for the user, but in this case... I don't know... modal operator seems to be a bit of a hassle to me. Still a perfectly good answer.


text:
Blender 3: rigging a trailer
I've been searching for a way to get a trailer rig, but the solutions I found are bullet physics method I can't find and a way using IK that's not clear at all.
Anybody has a clearest solution (please, no addons)?

Does this answer your question? Does anyone know how to rig a truck/trailer so that the trailer follows the truck in a realistic way?

Thanks, Chris, that's one of the solutions I found but it's a bit cryptic for me... not sure what is foot or shin in that gif.

it would help if you would have written that into your question that this didn't help... ;) i try it myself...

Ok, I'll keep in mind next time

ok, you are right...the description isn't really good ;) sorry for that

Nothing to apologize for :) . It looks a nice solution but without details we miss a lot of info

https://blender.stackexchange.com/questions/19675/creating-a-trailer-rig/ https://blender.stackexchange.com/questions/81872/how-to-rig-a-truck-trailer-so-that-the-trailer-follows-the-truck/

I think I got it using this link https://blender.stackexchange.com/a/81979/105723
that cryptic solution mentioned above... I have to try and try till to make it work, since the elements in that answer haven't the same names in the explanation than the picture. This is my outliner with the structure:

Basically, as you see,  the head is the truck bone, the "neck" bone shouldn't be applied to mesh (just help the other bones to get the result) and a trailer bone. The named foot bone and target bone don't affect any mesh, just to control the IK chain with those constraints (copy rot and copy loc).

The blend file


text:
Reduce bump by distance to camera
I'm trying to reduce bump by distance to camera and finally I get a mess of nodes and I got lost. I post a picture of what I got, but just for reference, please, no laughs ;)

Could you help me how to get it? Thanks!
EDIT: That animated positions at mapping is because it's a kind of sea simulation

Hi :). You want to decrease the Displacement the further it is from camera?

Exactly, it dissapears if farther.

There should be a Displacement node between the last MixRGB and the Material Output node. It works similar to the Bump and Normal Map nodes that you need for the Normal input slot of the Principled BSDF. The Displacement node has a Scale value which controls the strength of the bumps.

I accomplished this with a spherical gradient.

Oh sorry, didn't see your answer :)

You can target the camera in texture coordinate node.

Use Object coordinates and target the camera
Add Vector Math > Length + ColorRamp to control the falloff
Multiply your textures by the result

The answer to this is Camera Data -> View Z Depth or View Distance.
The values output by this are completely unusable without some modification, so you need to make judicious use of the Map Range node.
Here I'm taking the data from roughly the start distance of my object to the end distance, and remapping to a range of 1-0.  We apply that to the Strength input of the Normal Map node so that the close end has full strength bump and fades to 0 at the far end.


text:
Colorize AO layer shadows using Blender compositor
When compositing AO I use to colorize its shadows a bit bluish but not sure how to do it (or even if it's possible to do that)in Blender compositor. Any idea?

Hi :). Sure, just run the AO pass through a Mix node before you comp it in.

You can run the AO pass through a Mix Node before you comp it in.

So easy. Thanks! I've been playing with color blending and I didn't realize screen was so evident to use


text:
Gradient shader according to the polygons size
If I create a (very basic) gradient shader it's applied to the whole object the same way. Even if exists a different material for the small rectangle but same nodes I get the same result:

But, is there an automatic way to copy that nodes to a new material (in this case the drawer) and get the gradient according to the size of the polygons similar to this image?

I had to change the color ramp in the drawer material manually, but if the gradient could adapt to the size of the polygons it would be great.
Thanks!

Related: Gradient that depends on an absoulut value for several objects and texture mapping generated coordinates with world orientation

You're using generated texture coordinates.  Generated texture coordinates are generated by looking at the bounding box of your object (before any deforming modifiers, but after any generative modifiers).  They range from 0 at the bottom, left, front of your object to +1 at the top, right, back of your object.  Because your drawer has a different bounding box, this means they are different coordinates.
You can revise your existing material to use different coordinates, although this is going to require some other editing.  Probably simplest is to make all objects from the material use the object coordinates of the larger cube.  However, object coordinates range from -1 to +1 instead of 0 to 1-- or at least, for your purposes they will-- and so you'll probably need to map them a bit:

Sorry, Nathan. I didn't specify it's the same object so if I use "Generated" instead "Object" your node tree works for me. Thanks for your help. Anyway there is a simpler node tree I posted below from another post: The problem of another user is my solution XD  (thanks to StackExchange algorithm!)

The problem of another user is also another answer for my problem (thanks, Stackexchange algorithm!) Gradient that depends on an absolute value (several objects)


text:
Ambient occlusion problem using EEVEE
I'm trying EEVEE for compositing but I don't know how to avoid (if possible) those ambient occlusion "pops" . It occurs when an object is in front of other and the ao shadows appear suddenly when revealed to the camera.

have you given AO to these objects and have enabled AO in the Render panel.

Not sure what do you mean saying "given AO to these objects" Have I to do something with the objects? Is it not enough activating AO in the View layer panel? In Cycles I don't have to modify objects to get tha AO pass... is with EEVEE different?

The reason for this happening is that unlike cycles, ambient occlusion generated by evvee are not physically accurate. Eevee tries to mimic ambient occlusion and only generates ambient occlusion for objects in front of the camera.
As you said, ambient occlusion pops occurs when an object which was hidden by something comes in front of the camera. It is coz as soon as the object is visible to camera, eevee generates ambient occlusion causing the poping effect.
My advice would be to use cycles which generates physically accurate Ao maps

So AO is useless but for still images in EEVEE. Thanks, Maulik


text:
Geometry nodes in Blender 3.0 : random rotation 180º increment
I've been searching for a way to rotate instances with a 180º increment. I found a previous solution to this problem
https://www.reddit.com/r/blenderhelp/comments/lwgzsq/random_90_rotation_increments_in_geometry_nodes/
but I don't know how to get it with the new geometry nodes. The most I got is

but as you can see I only get a simple random rotation not what I need. Any idea?
Thanks

Rule of thumb is if there is no ° on the right of the field, you have to use radians. If you don't want to do trigonometry which is understandable, the MATH node mode can be set to "to radians", and then you can input a value in degrees.

try this node setup:

The random value give a 0 or 1 with a 50% chance.
shader:

So that's the way I have to use Pi. Thanks!

you are welcome

Get a 0 or 1 random output, multiply it by pi, and add it to your desired base rotation:


text:
wm.open_mainfile is causing issues with context.screen.area in 2.79
This is my first post so pardon any errors in formatting.
I'm trying to create a script that opens a file and links objects to it however when I attempt to link the objects it gives me a polling error. I looked up how to fix it and I found this code.
for area in bpy.context.screen.area:
    if area.type == 'VIEW_3D':
        override = bpy.context.copy()
        override['area'] = area
        bpy.ops.view3d.background_image_add(override, name="BG", filepath=r"image.png")
                break

it only works when the following code isn't present
bpy.ops.wm.open_mainfile()

When it is present I get
AttributeError: 'NoneType' object has no attribute 'area'

I have looked all over and could not find anyone else having this issue so I'm under the impression it is a very niche case so any help would be greatly appreciated. Below is similar code without all the extra filler I've written. The code in question is on lines 44-58.
import bpy

bl_info = {
    "name": "Link & Append",
    "author": "Exotic",
    "version": (0, 0, 1),
    "blender": (2, 7, 9),
    "location": "Render > sample",
    "description": "",
    "warning": "",
    "wiki_url": "",
    "tracker_url": "",
    "category": "System"}

class SampleMessage(bpy.types.Operator):
    """SampleMessage"""
    bl_idname = "button.message"
    bl_label = "Message"

    def execute(self, context):
        bpy.ops.wm.save_load_operator()
        return {'FINISHED'}

    def invoke(self, context, event):
        wm = context.window_manager
        return wm.invoke_props_dialog(self, width=400, height=400)

    def draw(self, context):
        layout = self.layout
        layout.label("WARNING", icon='ERROR')
        row = layout.row()
        row.label("Are you Sure?.")
        row = layout.row()
        row.label("Press OK")

class SaveNLoad(bpy.types.Operator):
    """save_load Operator"""
    bl_idname = "wm.save_load_operator"
    bl_label = "Save N' Load Operator"

    def execute(self, context):
        yourpath = "C:\\Your path here\\mother.blend"
        bpy.ops.wm.open_mainfile(filepath=yourpath)

        for area in bpy.context.screen.area:
            if area.type == 'VIEW_3D':
                override = bpy.context.copy()
                override['area'] = area
                bpy.ops.view3d.background_image_add(override, name="BG", filepath=r"image.png")
                break

        directory = "C:\\Your path here\\Cone.blend\\Object\\Cone.001"
        filename = "Cone.001"
        filepath = "C:\\Your file path\\Cone.blend\\Object\\Cone"

        bpy.ops.wm.link(filepath=filepath, directory=directory, filename=filename)
        return {'FINISHED'}

def add_object_button(self, context):
    self.layout.operator(
        SampleMessage.bl_idname,
        text=SampleMessage.__doc__,
        icon='BLENDER'
    )

def register():
    bpy.utils.register_class(SaveNLoad)
    bpy.utils.register_class(SampleMessage)
    bpy.types.VIEW3D_MT_object.append(add_object_button)

if __name__ == "__main__":
    register()

Any help would be greatly appreciated.

Related https://blender.stackexchange.com/questions/42956/python-operator-context-is-incorrect


text:
Bevel tool not working properly
I'm new to blender and i'm having a problem, the bevel tool is not behaving like i want when i press ctrl+b

Are you mixing trianlges and quads?

Nope, only quads

Try applying scale, then bevel. To apply scale: ctrl + a. Then choose scale.

hard to see what's happening, maybe share the part of the mesh where you try to bevel: https://pasteall.org/blend/

My issue was incorrect normals, I used ⇧ Shift + N and it solved the problem.


text:
How to create an inverse weight map based on particle system
I'm creating a forest that consists of trees and grass. After creating a particle system for trees, I want to make the grass appear where there aren't any trees. Instead of creating a new weight paint that manuallly paints spots without trees, is there a faster way of creating a particle system where the grass only appears where there aren't any trees?

Have you tried inverting the density field in the particle properties ? (The double sided arrow icon on the right of the field)


text:
How to convert on-surface curve to seam?
I have a cylinder-like surface and a mirrored bezier curve shrinkwrapped onto it.
I'd like to use the curve as a seam for UV mapping, actually for pattern making purposes.
How can I create from the curve a (possibly easily selectable) edge loop on the cylinder?

you say 'pattern cutting' Is that  in the flat? Could you elaborate a bit more on the intended use?

Here's one way to do it.

adjust the shrinkwrap modifier so that the curve is entirely just above the surface.

apply the mirror modifier.  You may want to make a backup copy of the curve before you do this.

In object mode select first the curve and then the cylinder.

Go to edit mode

Knife Project. You may want to make a backup copy of the cylinder before you do this.  You can find Knife Project in the Mesh menu; or search for it with the F3 search.

This will create edges on the cylinder that match the curve.  You can now mark those edges as seams. (Select the new edges, Ctrl–E to bring up the edge menu and select Mark Seams)
EDIT: Here's one way to ensure a precise match to a mirrored curve.
If you're mirroring, the original curve probably lies entirely one side of one of the axes.  Meanwhile the cylinder's length is parallel to another  In this example, the X and Z axes:

To obtain symmetry, knife project twice.  The first projection is from the orthogonal view along the 3rd axis, with the positive direction coming out of the screen.  In the example, that's the Front view.  The second projection is from, the orthogonal view along the 3rd axis, with the negative direction coming out of the screen.  In the example, that's the Back view.
Here's the example with the curve hidden showing a view of the cylinder after the two knife projections:

There are cases this won't work for, but for the vast range of curves that are meant to be mirrored it should work well.

oh so they have also reimplemented the former way to use the knife project. Edit: no, it works this way only for curves, I didn't know you could cut with curve + there's a kind of inconsistency here

Your method creates nice edge loops but it has a downside. It creates edges on the surface closest to me, not on the one that is closest to the curve. I assume this is related to the way the tool works ("Keep in mind that Knife Project works from the current view’s perspective.") This gives incorrect result with a closed surface and a closed curve.

@kkeri you're right; knife project doesn't do what you want.  I'll give it some more thought.

The curve is mirrored, so you only have to work on half, and orthogonal knife-projection towards the mirror plane should be just fine? (mirroring the cylinder, too, if necessary)

@RobinBetts good point, I have to work with mirrored shapes. I tried out your idea and it works well on this example, however for more complex shapes it yields fuzzy edges near the tangent. I need high quality output, so may be knife project is not the right tool to achieve it.

@kkeri have you tried playing with the offset value of the shrinkwrap or not using a shrinkwrap but having the curve stand off the object?

@MartyFouts no, in the meantime I found a completely different solution, see my answer.

Finally I figured out how to solve my problem. My solution gives exact seams and it doesn't assume that the curve or the cylinder is mirrored.

Convert the curve to a mesh, this will also apply all modifiers.
Add a skin modifier to the curve.
In edit mode select all vertices of the curve.
Set mean radius Y to 0 and set mean radius X to an appropriate value to get a ring that intersects the cylinder in a single loop.
If the ring leans on the cylinder surface, mark another vertex as root until you get a good result, similar to the screenshot below.

Now add a boolean difference modifier to the cylinder and select the curve in the object field.
Apply the boolean modifier.

The resulting edge loop may need some cleanup but it is precise and independent of the current view.

a bit fiddly for finding the starting point, but a nice approach.