text:
Script to scale objects resets scale when scrubbing through frames
I am writing a Python script for Blender 2.8 in which I replace objects in the scene with new objects.
I start by importing the new object as a .FBX and linking the original object data to the new object.
The new object then needs to be scaled down to fit where the old objects were.
The issue is that when I run the script it appears to have worked until I change the animation frame and the scaling I have applied is erased.
Here is a snippet of the code
import bpy

file = '\\Fruit&Veg\\Banana_FBX\\Banana.FBX'
i = file.rfind('\\')
new_asset_name = file[i + 1:-4]
bpy.ops.import_scene.fbx(filepath=file)
bpy.context.view_layer.objects.active = bpy.data.objects[new_asset_name]
bpy.ops.object.scale_clear()

bpy.data.object['Orange'].select_set(True)
bpy.ops.object.make_links_data(type='OBDATA')
bpy.context.view_layer.objects.active = obj

ratio = bpy.data.objects[new_asset_name].dimensions[2] / 0.255 # how much larger new object is

bpy.ops.transform.resize(value=(1/ratio,1/ratio, 1/ratio), orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, False, True), mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False, release_confirm=True)

What is the pivot point of the transform resize operator. Setting scale eg https://blender.stackexchange.com/a/160978/15543 will scale about the object origin.

Solved! I solved it by setting the object's origin to the center of its geometry. The origin was set to the center of the object before scaling it down which explains why it appeared to jump in space

Solved!
There were existing keyframes on the object that I imported so I had to delete them before changing the scale.
The origin was set to the center of the object before scaling which resulted in the object jumping in space
This was fixed by setting the origin to the center of its geometry after the rescaling operation

I'm pretty sure your scale is keyframed. Just like when you scale manually and there are scale keyframes present, it will ignore your changes (unless you use auto-keying) and reset to the scale saved in the keyframe. FBX often have everything keyed by default export options of the program they were created with, even if the property isn't animated. If that's not the case, please don't downvote, but provide more detail, maybe share the .blend. Thank you.

Thanks yes there were keyframes present. I have deleted the scale keyframes and my scaling is now rendering as expected. But now the new object jumps to a new location when I scrub through frames! I can't delete location keyframes because I need to maintain the original animation. My script does not apply any location transforms so I'm not sure what the issue is

Try not to use bpy.ops, whenever you can. There's a chance that you are scaling relative to the cursor, that would explain the jumping. So instead use: myob.scale = Vector((x,x,x))


text:
Bevel in Solidified Plane
I created a plane and started working on it's corner to add some radius.
Now I want to smooth the edges (perimeter) of the plane. I tried to use Bevel but I am unable to do this as soon as I solidify the plane. Any clues why it doesn't work properly or how to do this?

Hey there, welcome to the Blender Stack Exchange! Could you please add an image of what you are looking to do? Thanks in advance!

You can't use the Bevel operator to bevel the edges of your Solidified plane, without applying the modifier, because the edges don't exist at the time the operator is invoked. You can use a Bevel modifier to do it, below Solidify on the stack.
The first bevel, rounding the corners in XY, could be done with an operator, and that may be better, allowing you to, say, inset the plane, to avoid the normals in the triangulation of the large n-gon interpolating badly over the edges into the thickness. However here we go with modifiers all the way, on a once-subdivided plane..

A bevel of the corner vertices only, by vertex-bevel-weight:

Solidify, with defaults..

Bevel the rim, by angle, again, with default settings out of view..

The resulting normals aren't perfect, but can be fixed with a Weighted Normal modifier.

Although I solved this after taking too much time, I appreciate the reply! Hopefully it will help other folks.

Based on your shape, you can get smooth corners without a Bevel, just use a Subdivision Surface instead. Put it above the Solidify modifier if you only want the corners rounded like in your picture, or put it below if you want it to round horizontally and vertically at the same time. See Below:

Thank you I will try to get it work today!

source: Stack Exchange

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

sort: votes


text:
How would I setup a model for use with SSR in another game engine?
I'm attempting to use Panda3D with an extension for PBR. However, upon exporting my model, the default Blender enviroment map is put in somewhere, this causes it to reflect off of the grassy plains that Blender shows by default. I am attempting to change this.
My main question here is: How do I export without using a baked in enviroment map?
The research I've done indicates that somewhere Blender is baking in the enviroment map as (rather then an issue with my code):

Models with some sort of SSR option on (I have no clue what it is) work as normal.
My models (I tried with a simple metalic cube) don't work, reflecting off of the afformentioned world.

Googling the issue turned up nothing. Can anyone help? Thanks.

Turns out it was working, just not in the way one would think.
So, basically, what was happening was that it was not only reflecting off of the default world, but also onto the in game world. I didn't look close enough to notice, but that's what was happening.
In order to "fix" this, you need to set the enviroment map to an empty white (or black, or any other color for that matter) so that your true reflection will be overlayed on top.

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


text:
How to add material "Slot List" to panel on my addon?
How to add material "Slot List" to panel on my addon?

When you want to get a widget of the main UI you can find how it looks like in the code. Very convenient.
In your case:

right click on the dropdown to get the source:

a message appears at the bottom on the main window:

open the Scripting workspace:

in the text editor, open the script that has been added by the previous operation:

go to the line with the red marker:

copy the relevant code block:

paste the code in the Draw() function of your own script and adjust it so that no variables get missing:

 ob_type = # set your current object here
 has_material_slots = True # do a test here

 if ob_type != 'LIGHT':
    row = layout.row()
    row.enabled = has_material_slots
    row.ui_units_x = 4
    row.popover(panel="NODE_PT_material_slots")

run your script:


text:
How to get list of exist areas ui_type?
If type bpy.context.area.ui_type = '' in console, this will throw an error and offer an enumeration of the existing types, like: "... not found in ('VIEW_3D', 'IMAGE_EDITOR', 'UV', 'CompositorNodeTree', 'TIMELINE', etc.)"
How to get this list of ui_types of areas?

I think you are looking for this

AFAIK the only way to get this using python is to force the error by setting it to a wrong value, catch the exception as a string, parse the values between the parentheses and separate them. Or you can use the docs as Ratt mentioned

As @Gorgious has mentioned you can catch the exception and then parse out the values like this:
import bpy
import re

try:
    bpy.context.area.ui_type = ''
except TypeError as e:
    match = re.search(r'not found in \((.*)\)', str(e))
    if match:
        enums = match.group(1).split(', ')
        enums = [enum.strip("'") for enum in enums]
    else:
        raise e

print()
print(enums)

What's the difference between except TypeError as e: and except Exception as e:?

Exception is the base class of TypeError where TypeError is the subclass or derived class. Some call this relationship a parent class and child class. It
inherits from Exception class https://www.w3schools.com/python/python_inheritance.asp

This script works for built-in enums: https://blender.stackexchange.com/questions/314226/blender-api-show-list-of-available-entries-of-a-built-in-enum-property


text:
Why `foreach_set()` don't work?
How do I write an integer attribute for each vertex?
For some reason this code doesn't work:
import bpy

mh = bpy.data.meshes.new("Mesh")
mh.vertices.add(2)

att = mh.attributes.new(name="a", type='INT', domain='POINT')
att.data.foreach_set('a', [1, 2]) #mh.vertices.foreach_set('a', [1,2])

#AttributeError: foreach_set(..) 'IntAttribute.          data[...]' elements have no attribute 'a'

#>>> bpy.data.meshes['Mesh'].attributes[:]
#[bpy.data.meshes['Mesh'].attributes["a"]]

What am I doing wrong?

You add a attribute named "a", But there is no "a" attribute in the data collection.
import bpy

mh = bpy.context.object.data

att = mh.attributes.new(name="a", type='INT', domain='POINT')
att.data.foreach_set('value', range(len(att.data)))

print(att.name)

for v in att.data:
    print(v.value)

foreach_set is much faster, though, method is effective only for a small number of vertices.
Object mode
In object mode.
There is a way to specify directly.
import bpy

# Get the mesh data of the Cube object
mesh = bpy.context.collection.objects["Cube"].data

# Add a new attribute (ignore if it already exists)
if "new attribute" not in mesh.attributes:
    attribute = mesh.attributes.new(name="new attribute", type="INT", domain="POINT")
else:
    attribute = mesh.attributes["new attribute"]

# Check all vertices and set attribute values based on conditions
for i, vert in enumerate(mesh.vertices):
    if vert.index in [1, 2]:
        attribute.data[i].value = 5
    else:
        attribute.data[i].value = i

# Verify the attribute values
for i, attr in enumerate(attribute.data):
    print(f"Vertex {i} attribute value: {attr.value}")

# Note: This script can only be used in Object Mode

Console
Vertex 0 attribute value: 0
Vertex 1 attribute value: 5
Vertex 2 attribute value: 5
Vertex 3 attribute value: 3
Vertex 4 attribute value: 4
Vertex 5 attribute value: 5
Vertex 6 attribute value: 6
Vertex 7 attribute value: 7

Edit mode
By the way, here is the script in edit mode.
Bmesh is used. This may be smarter.
Booleans cannot be used, so please specify booleans in object mode.
import bpy
import bmesh

# This script adds a new integer attribute to the vertices of a mesh object named "Cube".
# It then sets the attribute values for each vertex, with specific values for vertices
# with index 1 and 2, and prints the attribute values.

# Get the target mesh object
mesh = bpy.data.objects["Cube"].data

# Add a new attribute
attribute_name = "new_attribute"
attribute = mesh.attributes.new(name=attribute_name, type="INT", domain="POINT")

# Get the BMesh in edit mode
bm = bmesh.from_edit_mesh(mesh)

# Get the attribute layer
layer = bm.verts.layers.int.get(attribute.name)
if layer is None:
    layer = bm.verts.layers.int.new(attribute.name)

# Set the attribute value for all vertices
for vert in bm.verts:
    if vert.index in [1, 2]:
        vert[layer] = 5
    else:
        vert[layer] = int(vert.index)

# Display the set attribute values
for vert in bm.verts:
    print(f"Vertex {vert.index} attribute value: {vert[layer]}")

# Update the mesh
bmesh.update_edit_mesh(mesh)

Manually setting custom attributes per edge / vertex / etc

Hello, this is a great answer, but I feel like it does not really answer the actual question. The advantage of using foreach_get and foreach_set is that it's magnitudes faster than direct attribution with a for loop. You won't notice the difference with 8 vertices, but with 8 million vertices you'll see it instantly. Cheers

@Gorgious
Thanks again for your comments. I certainly didn't know what such a useful function was. Looks like I need to learn how to manage larger numbers!


text:
The best way to solve this problem with an increasing number of splines
I have a different number of splines representing text.
My goal is to ensure that the number of splines is always not lower than the threshold I need.
If I'm given 3 splines, but I only need 3 splines, then everything is great and I don't need to do anything.

But if I'm given 5 splines and I need 6 splines, then I just convert this to mesh, and select a random edge. And then I split the edge, and turn the result back into splines.
After which I get the required 6 number of splines.

If instead of 6 splines I need 10 splines, then I make 5 cuts instead of 1.
Since the number of cuts can be large, it is important that they are in random places for beauty.
But... there is one problem.
If a random cut falls on a "symbol with a hole" (an edge between two different splines, not between the same one), or if all these splines are symbols with holes,

Then, after a random cut, instead of increasing the number of splines, their number will decrease.

In order for their number to really increase, an 2 additional cut will have to be made.

In total we come to the conclusion "number of cuts $\ne$ goal splines $-$ current splines".
So I had to just use a repeat zone, something like

Continue randomly cutting until get lucky and the quantity is right.
Well... Is there a way to solve this without a repeat zone? Any math tricks or other tricks? Something that will work faster than repeat zone on a large number of splines?

Hello and welcome. Please use a title that matches the content of the post. It should read like a question, be descriptive but succinct, unique and identifying, summarizing the problem so that anyone searching for similar issues is likely to find this. Remove anything superfluous, avoid using words like "this", "help with", "issue" or "question about", instead describe what "it" is. Remember, your title is the first thing visitors see, answers you get depend heavily on it. See What is the problem of asking “How do I do this?"

Maybe I'm too dumb to understand this... I mean I understand cutting something and getting less than before. I just do not understand this being given x splines and needing y splines. Who/what gives these splines? Who/what determines how many splines are needed? I just don't get why there is no other way than cutting meshes to match given number with needed number because I somehow missed how these numbers are determined (well the given ones of course by the text - wherever this comes from - but what determines the threshold?)

Actually it looks like a topology question. If your object has a hole i.e. its Euler characteristics is 0, than you need to cut it whole going through the hole to reduce the number of splines. If the Euler number is 2 i.e. a continuous object then only 1 cut is needed. But I don't know how to detect the topology of a mesh in Blender ^^

Additionnally I join the other comments. Knowing why you want to cut these letters and why the number of spline is important would help.

Of course if it was really important, I would definitely clarify this. I take threshold count of splines as I want randomly from my head.
How about thinking about this question as it stands? Just in the context of a solution in Blender?

You want to cut the existing pieces into a fixed number of pieces? The number of splines is irrelevant, right?

@ugorek knowing the reason why you want to have an arbitrary number of spline could avoid a XYproblem

@Leander On the contrary, I need a fixed number of splines; a number of pieces (they are mesh islands) does not matter.

...Oh, I love this task, so I played around with it a bit...

First of all:
You got it absolutely right: The Fill Curve node is extremely helpful here, as it reliably prepares the geometry in such a way that there are no more internal curves.
This seems to have solved the actual problem.

Nevertheless, I don't want to withhold my gimmick from you, as it might work a little more efficiently than your previous approach:

Essentially, I also use Fill Curve as a starting point to process the problematic areas correctly.
However, I then divide the mesh into two parts:

the outer (original) curves
the inner edges, which I obtain by triangulating the mesh

The advantage here, however, is that I edit the existing curves directly and thus avoid having to convert them into a mesh again.
To obtain the inner edges, I use the following group:

Extract interior edges
I use these inner edges to cut the curves, which looks like this within the Repeat Zone:

Process the cuts
But the trick here is to separate the selected edge from the rest so that Random Value does not select the same edge again in the next run.
This process also takes place in a group that looks like this:

Select a random edge from the interior edges
By then checking which points of the outer curves intersect with the selected edge, I can separate the curve that I want to cut.
The Accumulate Field node then helps me to separate the points that lie on one side or the other of the intersection.

Cut the curve into two parts
By defining with Set Spline Cyclic that these curves should be closed, I finally get the necessary curves, which I then only have to join with Join Geometry.
Depending on the target value, this process is then repeated until the desired number of curves is reached.
(Blender 4.1.0+)

Amazing. It would have taken me a long time to come up with a method yourself with Spline Cyclic. However, your method of Extract interior edges is quite unusual; you probably didn’t like GeometryNodeInputMeshFaceNeighbors and FunctionNodeCompare for some reason.

@ugorek Thank you for your praise (and the bounty, of course)! To be honest, I just wrote it down like that and didn't even think about the fact that there are other ways to get the inner edges (there are usually several ways that you don't always think of straight away). I haven't tested whether it would work any better with the method you suggested. Have you tried that?

Yes. The result is the same, and it works, as expected, faster. GeometryNodeSeparateGeometry which uses result of the two aforementioned nodes.

Brilliantly! N-gons mode from Fill Curve helped to unambiguously determine the number of partition iterations.
Since polygons in Blender cannot contain holes, converting to n-gons automatically solves problems with letters that contains holes.

This is the same trick I was talking about. How come I didn't think of this right away?.
Now, instead of entering a large number of iterations (ex. 1111 cycles),
you can find them out using "number of cuts $=$ goal $-$ face count from n-gones"

But... this method requires two Fill Curves nodes, which does not improve performance much. So still puzzled.


text:
How to find out if geonodes's viewer is active?
Using python i can access the node
bpy.data.node_groups["Geometry Nodes"].nodes["Viewer.001"]
But how can I find out if it is currently active for preview?

I don't think the node has a exposed property for that. But you can find the spreadsheet area, get its space and check if object_eval_stateis set to VIEWER_NODE. That should be the case, except if the user comes to another object eval state after that.


text:
What's the difference between `bl_rna` and `rna_type`?
The code for accessing properties via bl_rna and rna_type gives the same result.
import bpy

obj = #blah blah any random object bpy.data.node_groups["Aaa"].nodes["Bbb"]

for pr in obj.bl_rna.properties:
    print(pr)

for pr in obj.rna_type.properties:
    print(pr)

What is the difference between them?

I don't think there's a difference.. it's just inherited from different structures. If you try something like obj.bl_rna == obj.rna_type the result should be true.

@Secrop can you elaborate on "inherited from different structures"? Do you know which these structures are? bl_rna and rna_type seem to always point to the same object from my tests, but if they are from different structures it may be possible there is a case where they indeed point to different objects?

@taiyo It may be some legacy thing.. rna_type is a direct representation of the C structure described in the rna_types.c, and bl_rna is something that is mainly created for the Python API. It may just be a way to allow a python custom data structure to behave as a C structure... but it is as old as I can remember, and probably it's just kept for compatibility reasons.


text:
Get self key map item in operator (How can an operator find out his call hotkey?)
You can assign different hotkeys to one operator.

But when it is executed, how can it be determined with which hotkey it was called?

import bpy

class MyOperator(bpy.types.Operator):
    bl_idname = "node.my_op"
    bl_label = "My Operator"
    myProp:  bpy.props.StringProperty(name="Aaa", default="1")
    def execute(self, context):
        kmUser = bpy.context.window_manager.keyconfigs.user.keymaps['Node Editor']
        #next: ???
        print("Hi, you called this operator using `type=idk`, `shift=idk` and `alt=idk`")
        #print(kmUser.keymap_items['node.my_op'], self.myProp)
        return {'FINISHED'}

def register():
    bpy.utils.register_class(MyOperator)
    km = bpy.context.window_manager.keyconfigs.addon.keymaps.new(name="Node Editor", space_type='NODE_EDITOR')
    km.keymap_items.new(idname=MyOperator.bl_idname, type='H', value='PRESS', shift=True)
    kmi = km.keymap_items.new(idname=MyOperator.bl_idname, type='D', value='PRESS', alt=True)
    kmi.properties.myProp = "2"

if __name__=="__main__":
    register()

bpy.context.window_manager.keyconfigs.user.keymaps['Node Editor'].keymap_items.keys() are not Unique. So kmUser.keymap_items['node.my_op'] returns the first item with that name. However, each item has unique id but different for keyconfigs.user.keymaps and keyconfigs.addon.keymaps.
I'd suggest find the index of first and then incrementing the index to get the other:
kmUser = bpy.context.window_manager.keyconfigs.user.keymaps['Node Editor'].keymap_items
i = kmUser.find(MyOperator.bl_idname)
altD = kmUser[i]
shftH = kmUser[i+1]

Note: if you don't set kmi.properties.myProp for shift + H keymap, value of myProp will be unpredictable.
Full code:
import bpy

class MyOperator(bpy.types.Operator):
    bl_idname = "node.my_op"
    bl_label = "My Operator"
    km_index:  bpy.props.IntProperty(name="Index", default=-1)
    def execute(self, context):
        kmUser = bpy.context.window_manager.keyconfigs.user.keymaps['Node Editor'].keymap_items
        i = kmUser.find(MyOperator.bl_idname)
        kmi = kmUser[i + self.km_index]

        print(kmi.to_string())
        # print(f"Hi, you called this operator using `type={kmi.type}`, `shift={kmi.shift}` and `alt={kmi.alt}`")

        return {'FINISHED'}

def register():
    bpy.utils.register_class(MyOperator)
    keymaps = (
        {'type': 'H', 'value': 'PRESS', 'shift': True},
        {'type': 'D', 'value': 'PRESS', 'alt': True},
    )
    km = bpy.context.window_manager.keyconfigs.addon.keymaps.new(name="Node Editor", space_type='NODE_EDITOR')

    for i, v in enumerate(keymaps):
        kmi = km.keymap_items.new(idname=MyOperator.bl_idname, **v)
        kmi.properties.km_index = len(keymaps) - i - 1

if __name__=="__main__":
    register()

This looks like a XY problem to me. I think an operator doesn't need to be able to know how it was called, the only things it needs to know is the current context it was called with and its properties. IMO it is a design problem to tie logic with specific inputs. What if you want to use your addon with a VR headset and you have another set of inputs ?
Anyways to answer your question I suggest you add eg a string or enum property to the operator and fill that in the keymap entry. Something like
class MyOperator(bpy.types.Operator):
    bl_idname = "node.my_op"
    bl_label = "My Operator"
    i_was_called_with: bpy.props.EnumProperty(
        items=(
            ("SHIFT",)*3,
            ("ALT",)*3,
            ("CTRL",)*3,
        ),
        options={"ENUM_FLAG"},
    )
    def execute(self, context):
        print(self.i_was_called_with)  # outputs is a set like {"SHIFT", "ALT"}
        ...
        return {"FINISHED"}

Link to EnumProperty docs
However the way I would do it :
class MyOperator(bpy.types.Operator):
    bl_idname = "node.my_op"
    bl_label = "My Operator"
    execute_mode: bpy.props.EnumProperty(
        items=(
            ("ISOLATE",)*3,
            ("HIDE",)*3,
            ("DELETE",)*3,
        ),  # Random ideas
    )
    def execute(self, context):
        print(self.execute_mode)
        ...
        return {"FINISHED"}

@Gorious, you said: "This looks like a XY problem to me." Well, depends on the use case. For example I am currently trying to get the actual key mapping used to call the considered operator to display it in its tooltip (using the custom "description" classmethod).


text:
Tracing images to grease pencil : how does the scale param work?
I'm scripting something that is exporting grease pencil frames to PNGs, process them in another software, and now i try to import them back, trace them to grease pencil again, and move them at the exact same position as initial frames.
The main issue for me is about the scale parameter of the ops.gpencil.trace_image() operator.
bpy.ops.gpencil.trace_image(target=src_ob, thickness=10, resolution=10, scale=0.515, sample=0, threshold=0.8, turnpolicy='MINORITY')

It doesn't seem to be influenced by the scale of the image at object level, nor his resolution. with trials and errors 0.515 seemed to work for one frame but unfortunately it's not working for other image ratio.
Any thought ?


text:
Where to find Fcurve's 'enable modifiers' (wrench) attribute with python
As i'm working with custom fcurves in the Dopesheet, i wanted to use that little wrench icon to control something.

It was easy to find fcurve[0].lock and fcurve[0].mute attributes which were booleans as expected, but this one seems undocumented.
Any suggestion is truly welcome !

As with many of the area UI items, this one isn't exposed through the Python interface.  The best you can do is use the mute value of each of the fcurve's modifiers.


text:
How to persistently delete default grease pencil brushes?
I'm working on 2D animation with a set of brushes for each character and i scripted an add-on to import this brush set from another .blend file.
I'm now struggling with the removal the default brushes, bpy.data.brushes.remove(bpy.data.brushes['Airbrush']) works fine at first sight, but i notice now that the default brushes are loading again every time i switch to draw mode.
import bpy

bpy.data.brushes.remove(bpy.data.brushes['Airbrush'])
try :
    if bpy.data.brushes['Airbrush'] :
        print('not deleted')
except KeyError :
    print('no more airbrush') #it prints this line

bpy.ops.object.mode_set(mode = 'OBJECT')
bpy.ops.object.mode_set(mode = 'PAINT_GPENCIL')

try :
    if bpy.data.brushes['Airbrush'] :
        print('Airbrush came back !!') #Airbrush always comes back !
except KeyError :
    print('no more airbrush')

Is there a way to permanently delete these brushes or prevent them from reloading ?
Thanks !


text:
How to sweep a profile along two rotation axes? (how to model globoid worm gear)
I'm new to blender and I'm looking for some help of modeling a globoid worm gear. Here's a website that explains what globoid worm gear is.
There's this video that demonstrates modeling a globoid worm gear, and it's method is calculating the parametric equation of each tooth profile and generates the worm directly. However, I find this
"adding material" method against the natural sense of worm making process ("removing material"), and that' where my question came along.
What I wish to achieve is modeling the globoid worm by removing material of a hourglass-like cylinder object and here's by ideal steps

generate a hourglass shape
construct a tooth profile
rotate and sweep the tooth profile with respect to two axes and get the tooth body.
use boolean operation to remove the tooth body on cylinder to get the globoid worm.

Here's a simple sketch I draw that I hope to convey my idea precisely.

The part I'm struggling with is the 3. part because I cannot find the suitable function to sweep a profile along two rotating axes at the same time. As you can see in my sketch below, the first axis is around the center line of the hourglass and the second axis is around the gear.

THANKS!

That can be a "screw" and a "simple deform" modifiers:

Make a profile (bottom left below).
Set the external part into a vertex group.
Add a screw modifier (use 'calculate order' to set the orientation of the faces correctly).
Add a simple deform modifier. Stretch mode and centered on an empty placed at the center of the screw. Use Z axis to deform around it and the vertex group to be deformed (so only the external part).
Then tune the modifier factor (or scale the empty) so that it corresponds to the wanted circle.

Thanks for the help. However, this is not the globoid worm I'm looking for because the tooth surface of the worm doesn't match with the gear

I'm no Blender wizard, yet, and I haven't found a native/vanilla tool to get your desired result, but I did see this addon pop-up a few days ago, which might do exactly what you want. Radial Array Tool Addon
Let's hope someone with a bit more experience in Blender shows up in the comments and shows us how to do it without 3rd party addons!

Thanks for the suggestion! I'll check out this addon and see if it works


text:
Can I access addon preferences from ExportHelper definition?
I want to store default export settings in addon preferences. Something like this:
class MyAddonPreferences(bpy.types.AddonPreferences):
    bl_idname = __name__
    my_saved_prop: BoolProperty()
    def draw(self, context):
        self.layout.prop(self, "my_saved_prop")

class MyExportOperator(bpy.types.Operator, ExportHelper):
    <...>
    prefs = bpy.context.preferences.addons[__name__].preferences
    my_export_option: BoolProperty(default = prefs.my_saved_prop)
    # AttributeError: 'NoneType' object has no attribute 'my_saved_prop'

But I can't access the stored settings from the helper's attributes, only from its functions. I can populate the settings in invoke():
def invoke(self, context, event):
    prefs = bpy.context.preferences.addons[__name__].preferences
    self.my_export_option = prefs.my_saved_prop
    return ExportHelper.invoke(self, context, event)

...But that will mean any non-default settings from previous calls will be lost. Is there any way around this?

As it turns out, I need to register the preferences earlier for this to work:
class MyAddonPreferences(bpy.types.AddonPreferences):
    bl_idname = __name__
    my_saved_prop: BoolProperty()
    def draw(self, context):
        self.layout.prop(self, "my_saved_prop")

bpy.utils.register_class(MyAddonPreferences)

class MyExportOperator(bpy.types.Operator, ExportHelper):
    <...>
    prefs = bpy.context.preferences.addons[__name__].preferences
    my_export_option: BoolProperty(default = prefs.my_saved_prop)

Simply registering before the operator in register() is not enough.


text:
GeoNodes: merging by distance only between different instance IDs
I have the following radial array node tree:

Currently it welds all duplicate verts.
I want it to behave like the Array modifier, only welding verts between instances, but not within the instance itself.
Not sure if this is possible at all. I know exactly how I'd go about doing this in Python, but the "selections" in GeoNodes are confusing to me for now. Selecting boundaries wouldn't be the solution though, for example.
Possible use cases: two-sided foliage for game assets, edges that become non-manifold when merged, using split edges for shading, etc.

well, there is a "cheap" solution with vertex groups for this special problem (but it won't solve the "general" instance differentiating thing:
you could just use a vertex group like this:

So essentially just the VG will be welded.
result:

Hacky, but I can see it working in most practical cases. I'll wait to see if there's some other way and mark as answer. Is there a way to make it merge everything with no vertex group provided? I can think of subtracting a value of a "don't weld" group from 1, is there a better way?

i know another "dirty" solution which wouldn't need a vertex group, but i think even for that you would "wait" for a better answer...so...would be another waste of time for me ;)

I meant "give it time and mark yours as answer unless a cleaner solution appears", naturally.

no problem - i am sure there will be another cleaner answer ;) One hint: if you want to "tickle" the guys here: ask a question, give an absurd bad answer with another account and you will get the quickest answers here you have ever seen :D :D :D

How's this for "dirty"? Is that about what you had in mind? I imagine the same could be done for vertex indices, but there's no real way to loop through them, is there?

no, i had another idea in mind which actually would separate the instances.


text:
Help me to optimize animation in this project
I have already watched several videos on how to optimize projects in blender, but it still takes me several minutes to render 1 frame, and the entire project will take at least 200 minutes to render. This is norm?
I left the project file below in Google Drive:https://drive.google.com/file/d/1Qi_O7eSEoPYKHSHjdqTzvsfYx9LjI9U6/view?usp=drive_link

You could decrease the Light Bounces total to 1 instead of 3, limit the sampling to 20 instead of 50, or even Time Limit of 5 seconds instead of 0, I can’t barely see a difference

the shaders seem to be very heavy (at least for little integrated graphics chips). With a simple shader that doesn't use this Node Group the render only takes 1/3 of the time in my test. Consider baking texture maps, the outputs of this Node Group.


text:
How do I fix materials incorrectly mapping on certain faces?
I'm new to Blender so this may be fairly obvious. How do I fix the wood texture stretching on the top and bottom surfaces? I would like to keep them oriented the way they are, but have it extend correctly to the other faces.

The first stage is to mark seams on your object and then UV unwrap it. You can then rotate the faces on the object in the UV editor so that the texture faces in the right direction. Explaining all that is a little complex for this Q&A site so I'd suggest finding one of the many YT tutorials on UV unwrapping such as this  one.


text:
How to Simulate an Accurate Projectile Motion in Blender
Is there any way to create an object shooting at an initial velocity that forms an accurate projectile trajectory? I'm referring to something similar to PHeT's 2D cannon experiment--but with Blender. Right now I'm looking to create a trajectory without having to manually add keyframes for points on the trajectory, so, essentially, relying completely on the Physics Features of Blender. The problem is that I don't know a way to make the object move with an initial velocity at a certain angle.
Recently, I've messed around and tried to replicate a simulation from PHeT, and this is the result

As you can see, I had to add keyframes for the integral parts of the trajectory (which I copied exactly for PhEt's accurate simulation). I tried to minimize the number of keyframes, in a way where the endpoint would still be the same, but it isn't really accurate. The wireframe lines are where the trajectory points are.
However, what I really want to achieve is a projectile trajectory without animated/manual keyframes. Is there any way to achieve this, or at least get somewhere close to it? Any help would be greatly appreciated :)

do you mean that you want to generate keyframes, or simply want to have the good physics trajectory?

I want to generate keyframes of an accurate physics trajectory only using (if possible) blender features without manually adding them for each point on the curve--if that makes sense.

Just keyframe animation of two locations (e.g. 0/0/0 at frame 1, and 0/4/4 at frame 5).
Then keyframe "animated" checked of that rigid body object for frame 5, and keyframe "animated" unchecked for frame 6.
then you get:

and if you add a wind force (force field) you get:

Maybe useful information for anybody who wants to do something similar - let'S say the last keyframe for the movement of the rigid body object is on frame $n$, than the keyframe $x$ to uncheck Animated has to be $4\leq x\leq(n+1)$, so the "uncheck keyframe" $x$ can never be earlier than frame 4 and never be later than 1 frame after the movement is keyframed, otherwise this will not work.

@GordonBrinkmann very interesting. Of course as I understand it, the "keyframe $n$" is a simplification and you mean the last frame with desired movement - which can be after extrapolated fcurve value past the last keyframe, or an fcurve modifier or a driver… Also any idea why the $≥ 4$? It's as if not only velocity ($>2$), but also acceleration had to be evaluated… Does the requirement stand if you start animating before frame $1$?

Thank you! This is really helpful, I'll look into it

Hi Andrewy, if my answer helped you, please click on the checkmark left of my answer, thx.

@MarkusvonBroady Yes, keyframe $n$ is a simplification regarding the above question, where no modifiers are used since it showed a simple way to give the rigid body an initial velocity. Don't know where that velocity > 2 is from, that's not necessary to make the simulation take over from the animation (it's just when gravity is enabled you need some velocity as soon as physics take over). But the $\geq 4$ was a simplification according to the answer, too - actually it has to be Simulation Start + 3. But since these things are not in the answer and it is not mine, I did not go into detail.

@GordonBrinkmann still, I wonder why it's the simulation start $+3$… I imagine it could be $+1$, because, then it can read the previous position, current position, and based on it calculate the offset between the two as velocity and apply that to the rigid body. But perhaps it can't use current frame, as it is being evaluated, therefore it needs $+2$ to have two previous frames to get the velocity. So I wonder why it needs one more frame, as if it needed to also calculate acceleration for some reason, but that wouldn't make sense to me.

@GordonBrinkmann Maybe the velocities are calculated after physics simulation, and therefore this velocity value "lags" 1 frame behind and that's the reason?

@MarkusvonBroady I have no idea why it works as it does, and could only give wild speculations here in the comments :D By the way, if $m$ is start of movement, then my earlier condition is $(m+2)\leq x\leq (n+1)$. My last guess on this topic: you are probably correct, it cannot use the current frame, so it needs $(x-2, x-1)$ to calculate velocity and direction on $x$. And the extra frame is probably needed because, as you suggested, physics are calculated before the velocity. But I don't know. I just use that conditioning to make sure initial movement is considered in simulations.


text:
Create a row of duplicated cubes, each a different color
I'm in the geometry node editor, using the Duplicate Elements node. For this example I duplicate a cube to create 100 cubes arranged in a line.
I would love to be able to use the index output of the node to choose a different material for each cube in the line. However, when I try to connect this output into anything determining a material, the connecting line is dotted red, and it fails to assign any material.
It seems like the Set Material node requires a constant input, not a variable input.
Is there a clean way to set a different material to a large number of duplicated or generated objects in the geometry node editor?

you can probably write the index into some sort of attribute and read this in your material. within the material you have to distinguish based on the index. but i guess multiple materials is not possible yet.

Does this answer your question? Applying existing multi-material from a geometry node mesh single mesh with multiple colors per part in array

@Crantisz I was able to figure it out from your links, thank you. Realize Instances was the key


text:
Blender viewport messed up
I entered a camera view, but after exiting (via the view rotator), the viewport looked messed up. Here are some pictures of what happened. (The checkered box pattern was already there before as a plane, but it has become distorted)

How do I fix it? (I don't have num pad on my keyboard)

you have toggled View ‣ Perspective/Orthographic. If you have no numpad for the shortcut Numpad_5 you can use the menu of the viewport (or assign another shortcut in the preferences) - or just click the little grid icon below the "view rotator" (the Navigation Gizmo)


text:
Single mesh vs separate objects parented together
If you're modeling something, when would you choose to try to make it one mesh vs using different objects and parenting them etc?
For example, in the very popular anvil tutorial by Blender Guru, he does everything in one mesh through manipulating it (and goes through a painstaking process to ensure that there is a single clean mesh).
However, in another tutorial I watched on CGCookie where a lamp is made, all the parts of the lamp are separate objects.
I've seen this question but it doesn't really discuss the advantages or disadvantages: Single continuous mesh vs disconnected parts

https://blender.stackexchange.com/questions/116017

In many ways it is up to you how you want to work, and how you orgainze your elements. There isn't a single way to create, whatever works for you should be OK. Working on separate pieces can be a bit more complex, as you need to plan carefully how you are going to fit the pieces together at the end if you are looking for deformations. For mechanical objects or some rigs might be easier to have different elements, for organic shapes it is not as straight forward. What kind of objects are we talking about?


text:
Painting multiple textures at once
I'm curious whether it's possible or not to clone paint on multiple texture slots at once? I want my clone painting to affect all the maps I have on an object. If that's not possible is it possible to copy clone strokes to the other maps somehow?
Thanks,
Mitchell

No, it is not possible to clone all texture images at once. Paint works on a single source to target, so cloning from one part of your Diffuse map will only affect that Diffuse map, not the Normal map that is also part of the material texture slots.

if u use the same picture on both materials its supposed to work like this:
and dont forget to set the uvs correctly :)

Thanks for your answer! Could you elaborate on your answer please? We prefer answers that are more than a comment on their own.

i wanted to comment but i dont have 50 reputation, so i answered

It is very easy to earn more rep here. You can edit some posts, you get 2 points for each approved edit, and you are 3 upvotes away from 50. Write a solid answer or ask a great question :)

i tried on a cube and it worked, heres a screenshot!


text:
Exporting camera crane alembic
I'm using blender's crane camera rig to get a shot however I need to export the camera to an external program but because the camera is being controlled by the crane it doesn't have any transform information itself. Is it at all possible to export this camera with it's motion while using this rig?
Thanks,
Mitchell

Didn't take long to find the solution. You just have to select the rig itself and export that as an alembic. Rather than doing what I was doing and selecting the camera.


text:
Emulate Numpad: Negating a number value while hovering mouse cursor over value box?
Usually without the emulate numpad feature on, pressing the minus key while hovering over a numeric value would multiply the value by -1. However, with the emulate numpad on, that negation doesn't seem to work anymore. Is there a way to set that negation shortcut to another key somehow?

I'm curious about this feature, on my end it zooms the field's panel out (and + zooms in)


text:
Add deflection in middle of edge (catenary curve)
I'm very new to Blender and trying to use it to design cut patterns for a tent I plan to sew. In tent design, you need to add catenary curves to edges so they tension the panels nicely. For instance, you can see the curvature where the panels join in this image

In modeling terms, I need to create a 3-point arc edge. I'd like to specify the deflection at the midpoint to accomplish this

I have a feeling the solution is something related to beveling. However, the answer here does not work if I add a vertex to the middle of my edge - the bevel just adds additional vertices without introducing any curvature. Another answer shows beveling for faces, but I need to bevel the edge connecting two faces.

I guess somebody has to suggest a cloth simulation, although I'm not sure it will meet your specifications. The curves resulting from pinning and tension don't appear to be catenaries, until the tension is wound up to an unrealistic level.
The topology is as shown, with the selected vertex-groups pinned in the simulation:

The edges between planes have also been given some damping in tension.. there may be more accurate settings, depending on the real-life constraints. The cloth settings are a slight variation on the 'Rubber' preset, supplied in the .blend as 'Tent', with a Shape > Shrink Factor providing the forces.
The result after running the simulation for ~75 frames:

Looked up solving for sag and found link (added to answer) which would require some numerical method to solve. Let the cloth sim work it out.  (aside) Wonder do modified meshes (eg mirror above) perform better in cloth sim? Came across  draw a catenary by mapping a parabolas focus point as  parabola is  rotated about a line.  (Bernoulli IIRC)   Did you forget the capital D?.

@batFINGER   Hmm! Mirror? Dunno! I don't think cloth deals with tension across mirror-plane, if mirror is below, and if mirror is above, then has to simulate the lot anyway? Catenaries.. does a 2D stretch follow a catenary, anyway? is it not more like a minimal surface .. which may be the same thing.. Interested in how you would flatten the surface after simulation for use as a cutting-pattern. .. Capital D? Still decyphering that remark :)

Begs the question re elastic material.  Came up here as well https://mathworld.wolfram.com/Catenary.html  D re hair comment, keep small  d for  the hoi polloi.

Add curve extra objects.
Another curve based option is to use the the catenary curve provided.  It has an option to "hang" a catenary curve between two objects.  Powerlines, cables, etc
Enable the add curve extra objects addon.
In demo below have two cubes at x = +/- 4. With them both selected  Add Curve > Knots > Catenary

The "dangle" of the curve is defined using the parameter a as described in

Catenary

To calculate the sag given seam length and end points is demonstrated here
https://physics.stackexchange.com/questions/481379/catenary-equations-solving-for-sag-given-distance-and-cable-length
Somewhat related.
How can I create a mathematically correct arc/circular segment?

Use curves.
Start with a bezier curve.
Scale each control point to zero (S+0)
Subdivide the curve. A new control point is created. Moving the newly created control point should do what you want. You can specify precisely where to place it by using the numeric controls (Press N to enable the control region)

Or try using Nurf Surfaces.


text:
Multi textured graphics
I'm brand new to blender and am a bit dazzled by the node wrangler. I've been playing with texturing different parts of the mesh using downloaded textures etc. But when it comes to texturing the decals I get lost. Basically, I want to model this can

The aluminum can texture I'm using from Poliigon but on top of that, I want the label to have three layers to it like the image below

Bottom Layer. A translucent background pattern that combines with the texture and
shade of the can ( a bit like how multiply works in
photoshop/illustrator).
Middle Layer. An opaque, colour area that contains the main graphics. This needs
to have a very subtle plastic texture to it
Top Layer. A textured spot varnish to most of the circular graphic, but not the
words in the middle.

I've created a separate UV to the aluminum texture map the different layers to, but other than that I'm pretty lost. I'm assuming that I can use the black details shown in the link to define which areas have which texture but I can't figure out how to do that and I'm even more unsure about how these would then combine to make it look like the real-life can.

you need to load all these b&w pictures in Image Texture nodes, then use them as some sorts of "masks", think of them as photoshop masks, you just need to plug them into the factor socket of Mix Shaders, and plug the colors or nodes you want in the 2 Color sockets of these Mix Shaders

use the black and white images as masks to combine different shaders and/or colors the basic concept is explained here: https://blender.stackexchange.com/questions/46424/add-a-transparent-image-on-top-of-a-material/46447#46447


text:
Inverse Kinematics Issue
I am fairly new at using Blender and I am currently trying to learn how to rig my modeled guy I downloaded off the internet. I was able to rig my guy's leg and is moving smoothly, but when I tried to use inverse kinematics on the arm, it went berserk. It seemed that when I applied the "Inverse Kinematics" operation to the bone, it showed an orange line attached from the bone to the abdomen, and I know that this is what is causing the problem. I have tried everything to remove it. I tried clearing the parent on this using pose and edit mode but nothing is working. Can anyone help? (Picture attached)

That dotted line is normal. It visually indicates where a connection of some kind lies between two objects. Typically it's a parenting relationship. In this case, it is a representation of the IK solver. It draws a line to the top bone in the IK chain. Now, it's odd to me that you have bad behavior already, because according to your screenshot, you have yet to choose a pole vector AND you have yet to choose the armature object as a target, also. Until those things happen, the IK doesn't have enough information to do anything, good or bad. So when exactly did it start going berzerk?

It actually started to go berzerk after I assigned both its target and pole target. This was my second attempt. My first attempt did not have the orange dotted line and it turned out to be fine. I assigned the target to the hand controller and the pole target to the bone behind the elbow to allow a total movement of all the bones in the arm. However, the orange dotted line appeared this time, and now the arm is jank.

So what happens if you delete the IK constraint and start over?

Nevermind, I actually figured it out. My chain length was set to zero, in which attached the orange dotted line to another part of the body but I needed it to attach to the arm, so I set the chain length to 2 and it works smoothly now.


text:
How can I sculpt a small/fine line?
In sculpt mode, using the draw tool, I can only seem to make indents in my object if the change is massive (i.e. taking a massive chunk out of it), if i set the brush settings to have a smaller radius or a stronger strength, barely any change is made.

Try the snake hook brush with dynotopo enabled.
The snake hook brush is designed to pull geometry into thin strands depending on brush size. Dynotopo is recommended because as you pull vertices out, it loses more and more detail until the tip of the line has only 1 or 2 vertices. Dynotopo will automatically create new geometry do you don't need to worry about that.


text:
Boolean Difference on Hollow Object
I'm building a submarine that I want to 3d print. I built the hull and now I want to cut a hole in the top so that I can put in the electronics/motors inside and then close it with a lid.

I took a bunch of circles and bridged them from one to another to create an outer skin since I knew the dimensions of the circles.
I selected some faces on the top of the sub that would be the "lid". I shift-d copied the lid out.
I solidified the sub in order to give the hull some width.
I solidified the lid to give it some width
I do a boolean difference so that I can cut out the lid from the hull.

It doesn't work as expected.
Below are some screenshots where I did the boolean difference on the hull and a long rectangular shape with the expectation that a hole would be punched in the hull. The 1st pic is the outside and you can see the entrance hole at the top. The second image is where it gets strange. Blender wrapped the hollow area that was cut out with a rectangular section.
Some things I checked include whether or not the shape is non-manifold (it is), are the normals pointing off to anywhere weird (they don't seem to be).
What is blender doing here?

I think I figured it out.
I had the normals set facing from the shape upwards. I flipped them on both shapes to face inwards. After that, I did the boolean difference and it worked.


text:
how to fade to white some image texture shader?
i want to make shader by nodes that look like Voile curtain. but i need to make it looks like this photo.
but ways i tried made this result.
how can i do this fading to white?

Use a gradient texture. Once you get the coordinates right, the rest is easy.

Since rotate gradient is not that easy use Texture Coordinate node and Separate XYZ node to use Z as factor for Mix RGB node http://www.blenderinsight.com/wp-content/uploads/2018/06/word-image-405.png

@vklidu and use my image connected to Diffuse bsdf color?

As usual with nodes, there is more than one way to do this:

Here, I am using the Y position of the UV coordinates as the factor to mix my texture color into white.
I am also using an RGB curves node to distort these coordinates to control the exact gradient.  Not asked for, but recommended.
Many people would use a (possibly remapped) gradient texture instead of separated UV.Y.  A linear gradient texture just outputs the X component of the input vector; using coords or a linear gradient amounts to the exact same thing.  Many people would use a color ramp instead of an RGB curves node, but I find the curves interface easier to use.
There are alternate coordinates that you can use.  For most objects, generated coordinates describe the 0,1 bounding box of the object, so you could probably use generated coordinates.z instead of UV.y.  I usually prefer to use UV coordinates over other coordinates for editability and stability.

it worked really well. thanks so much


text:
set shader properties by mesh face index/position in ply file
I'm trying to set color and other properties of a shader dependent on the specific face of an imported mesh.
To make the problem a little bit less abstract, I'll give you the background: I did physics simulations on a surface mesh with some other software and got a timeline of values for each mesh face saved somewhere in a textfile. I want to make an animation, where these values are color coded on the surface mesh with blender.
I'm not exactly a blender pro and tried to fumble around with .osl scripts to the effect that I can set the time-dependent color of an object by using something like
float my_array[120] = {
#include "myfile.txt"
};

within the .osl script. I don't know whether there is a better way, any suggestions are welcome, but it works for now.
But now I'm stuck. The script needs a second input: the specific mesh face, preferrably as the index at which it occurs in the .ply file of the mesh. If I had that, i could again load some flattened array, calculate an index in it from the mesh index and the time. But how do I get that index? The Geometry node does not have something like that and a UV-map also doesn't seem like the place to look.
Thanks in advance for any pointers

Related https://blender.stackexchange.com/questions/161664/using-float-property-layers-value-in-node-editor-similar-to-vertex-color  and  https://blender.stackexchange.com/questions/76520/how-to-get-random-color-variation-on-a-single-mesh


text:
Why does my brush size widen?
whenever i hover my brush over an rectangle or any other uneven object my brush widens relative to the shape of the object, i tried to reset my brush settings and it did not work.
Help please

Do you mean the circle of the brush becomes an ellipse? That happens when you have scaled the object and the scale differs for each axis (=non-uniform scale). Blender warns you about this with the message "Object has non-uniform scale, sculpting may be unpredictable" in the status bar. To fix it, switch to Object mode, and apply the Scale (Ctrl+A).


text:
matching image in plane/mask to video footage
I recently watched Ian Hubert's lightsaber tutorial.  About midway through, he discusses using a plane with an emission material and a clean plate image (as the color) to animate the lightsaber ignition.
I played around with a couple of different videos I had, and in each case, the plane was clearly visible in the render and did not blend well with the underlying video footage.
I ended up finding another tutorial that shows how to make a phone appear to levitate through the use of a mask and clean plate image.  I tried this approach as well, but again the mask was clearly distinct from the rest of the video.
I know some steps can be taken to try and minimize the issue--having footage where the lighting/brightness doesn't vary; limiting the number of frames where the clean plate is shown; using compositor nodes to make the mask less sharp; etc. But it still seems like I'm missing something.
As a last resort, I tried an experiment.  Instead of using video footage I had shot, I used screen recording software to capture a video of a simple setup in MS Paint.  I created a large blue rectangle with a small, thin yellow rectangle inside it.  I used a still image of just the blue rectangle as my clean plate.  However, after trying both tutorial methods, I was again left with a noticeably visible plane/mask.
Here is a frame render of the experiment using the mask method (I animated the mask moving to cover up the yellow rectangle, but the mask was distinct throughout).
Does anyone know what I might be doing wrong?  Can anyone replicate the tutorials more or less cleanly?  I'm stumped.
Thanks in advance.

Try changing the color management :

Blender uses Filmic by default but this will change how your footage color are rendered so you should use Standard for projects involving video footage :

The difference between the two is subtle but when you put them on top of each other, it's quite noticeable :
Filmic

Standard


text:
How to change hdri opacity
I would like to change the opacity of ah hardy, but not make it completely transparent
I tried to use a mix shader mode, but the factor doesn't provide a gradual effect, rather it gives either a fully transparent result or a none transparent result

The term "transparent" does not really apply to HDRI map representing the environment. It has nothing to be transparent to except darkness. So you can mix it with black and it will be darker or you can mix it with another color and it will be as if it was transparent while the other color was behind it. You do it sort of correctly - you can mix the shader or the color with whatever you want with Mix Shader or Mix Color nodes.

You adjust how "transparent" it is by adjusting factor value - the one called "Fac" 0 meaning the top input is fully visible, 1 meaning the bottom input is fully visible.


text:
Making mould pieces for model too big for 3D printer
I am trying to import an STL model and edit it, so the model's walls are thickened. Afterwards, the model is divided into smaller sections, to allow 3D printing of the pieces.  Each one of the pieces must be generated with flanges and holes, to allow reassembly of the model.
I have tried using geometry nodes to achieve a one click solution, but with little success, and i have tried using Python to run my own custom code, to even less success.
My hope had been to run my own custom code, but such hopes has been dashed.
My question is, am i going about this wrong? Does the answer lie in Blender only land? How would you attack this problem?

And how these flanges and holes looks like? Can you post some images

I am afraid i do not have an image to post, due to the nature of the problem. I have to generate the pieces with the flanges on, which i failed to do. The size of the flanges, the number of holes in them and the number of pieces is to be automated.

Without knowing how the result should look like, it likely won't be possible to answer your question.


text:
Vertices Rigging Problem
I'm still new to rigging. So, for the last few hours I've been trying to rig this cloth but there's a small problem that keeps bugging me.
Whenever I move the head bone ( I used Mixamo's rig) there are parts of the cloth that sticks to it, making a terrible deformation. Worst part is, I don't know what the problem is because there are other active meshes that are much closer to the bone but doesn't get this problem (example: outer layer coat). Can anyone help with this? I've been searching for a solution but there seems to be no answer in the internet.

Some vertices of this part are probably assigned to the head bone vertex group or to the one that is above. To fix that, activate the 2 first options on the top of your Armature modifier, select the dysfunctionnal vertices in Edit mode, go into Object Data > Vertex Groups, select the vertex group of the head and click on the Remove button under the vertex groups list, same for the vertex group related to the top bone


text:
Blender 2.83 Scale SVG not showing visual effect
I am a newbie with Blender (Version 2.83) on Windows 10. I want to do one simple job: import a SVG file and scale it in Blender.
I downloaded a football image in SVG file format, its name is like: C:\Temp\Brzauca01.svg Now, I open Blender 2.83 and delete the default image, then I import the football SVG file, but I can't see it from Blender. So I tried the following to scale the SVG image.
I typed S, then 5 trying to make it as 5 times as its original size, but I can't see any visual effect.
You can see the Blender IDE after I imported SVG file and after I typed S, 5
By the way, another picture you can see that I can use InkScape 1.0 to show the Brzauca01.svg, it is a football image in SVG format.
Please advice what I should do to show the visual effect for scaling a SVG file.Blender IDE show SVG file after scale

Was the element converted to paths? Blender cannot import Raster Images in a SVG container.  Read: https://blender.stackexchange.com/a/23171/92768. If you don't want to deal with vector graphics then export the image as PNG from Inkscape and import it using the "Import Images as Plane" addon.

Hello, thanks for your advice, I found the SVG file is not correct, it came without path information.  So I found another one, now, it works.

Does this answer your question? Why can't I import a SVG file from Adobe Illustrator or Inkscape?

Yes, but I can't find how to mark this question as answered. Please help and thanks!


text:
How to import a SVG file and scale it using latest version of Blender
I am a newbie with Blender (Version 2.83) on Windows 10. I want to do one simple job: import a SVG file and scale it in Blender.
I downloaded a football image in SVG file format, its name is like: C:\Temp\Football.svg
Now, I open Blender 2.83 and delete the default image, then I import the football SVG file, but I can't see it from Blender.
So I think it is small, maybe I can scale it to a little bigger.
I can type "Ctrl+A" and I can see Scale with number of 9.
But how I can scale it to something bigger?  For example, if I want to scale it to twice as bigger as now, which keys/mouse I have to use?
I have only 2-button mouse.
Please advice.

There is nothing different in newer versions of blender, it works just the same as the old. Select "Scale" and move the mouse to the right to make things bigger.

To scale you need to select the object and press S. Then you can move the mouse to size the object.
Some useful shortcut are:

S, then a number (for example: 3) --> you increase the object * 3 (you can also use non integer number, like 0.5)
S, Z (or X or Y) --> you increase the object only in Z (or X or Y) axis
S, SHIFT+Z (or SHIFT+X, SHIFT+Y) --> you increase the object in all directions but Z

Hello: I tried to do what you have instructed.  However, it seems not easy: you mean "select the object", which I don't know how to do this.  I typed S then 5 trying to make it 5 times of the original size.  But I can't see it.

To select the object you just need to left click on it (or select from the right panel where you have all your objects listed). You need to be in object mode (not in edit mode)


text:
Exporting a KHR_materials_unlit material with alpha
I need to export a glTF model with a material that uses the KHR_materials_unlit extension. This is a simple faked shadow, and so I need the material to use an image with an alpha texture on it.
The 2.8 manual suggested to use a Background material to get KHR_materials_unlit, but that does not support alpha:

The latest manual has a more complicated suggestion, but again the solution has no mechanism to support alpha:

To export an unlit material, mix in a camera ray, and avoid using the Principled BSDF node.

For reference, this is what the exporter expects.

@scurest Thanks! That's...frustratingly cumbersome. I hope future Blender can improve on this to make it simpler to turn off shading without creating complex shader graphs for each material.

This seems to work and is pretty simple, using a Mix Shader surface for the material, with the Fac set to the alpha of the image, the first Shader set to a Transparent BSDF, and the second Shader set to the color of the image:

This is similar to, but simpler than, what Blender creates if you hand-edit a glTF file to use KHR_materials_unlit with an alpha material and then import that glTF into Blender:


text:
Breaking a face with multiple triangles into component triangles
My mesh has three triangles that are in a weird relationship. The "middle" triangle is its own face, while attempting to select either of the "outer" two triangles as a face ends up selecting all three triangles as a single face. How can I break the macro triangle into separate faces? (I need to select just the bottom triangle for some manipulation.)

middle triangle selected

selecting left or bottom triangle is a single macro face

Is it possible that the large triangle is actually it's own five-sided polygon? In that case it should be easier to just delete it (x -> delete faces) and fill the remaining two triangles manually.

Yeah, I second this, you have a smaller triangle overlapping a larger triangle making it look like 3. Delete the "macro" face and refill the remainder.

@LuigiTKO Thank you for the advice. That worked. If you care to write this as an answer, I'll accept it.

The larger triangle you're seeing is actually a five-sided polygon, which overlaps with the middle triangle causing the illusion of three triangles.

You can fix this by deleting the larger triangle (x -> delete faces) and filling the resulting holes with the F key.


text:
Stitching two meshes using closest points
I have two terrain meshes separated by a long gap. I need to fill the gap. The two sides do NOT have the same number of vertices; the vertices are not always aligned with a mate on the other side. However, the vertices along each side are perfectly aligned along the axis running the length of the gap.

I tried selecting all verts on both sides, adding a single face (with 423 edges), and then triangulating the face. The algorithms for triangulation unfortunately produce results that do not connect the shortest spots across the gap. For example, there's obviously a mountain ridge here that should connect right across.

Other than manually creating hundreds of edges, can you think of a technique to automate this? (There are other gaps besides this one I need to bridge.) The algorithm, I think, would be for each vertex on one edge to connect to the closest vertex on the opposite edge.

Extrude the edges out from one of the edges of the terrain mesh.

Right click to just leave them in place. Then Ctrl+G > Add to New Vertex Group.

Then add a Shrinkwrap modifier, set it to Nearest Vertex and use the vertex group as the mask for that mod.
Result:

You might need to add some vertices where needed to get the two sides to match 1:1.
Without verts:

New verts + edges:


text:
Disabling Multi-View/stereoscopy in viewports
When using Multi-View to render many cameras—oddly exposed under "Stereoscopy"—how do I make it so that the viewports aren't showing red/blue? I'm not making a stereoscope, I'm just trying to batch render many cameras.
Before enabling Stereoscopy/Multi-View, Solid shading displays as desired:

Enabling Multi-View renders red/blue in every 3D viewport mode:

Open the Sidebar for each 3D Viewport you want to fix.
View ▸ Sidebar, or put the cursor over the viewport and press N
Click on the View tab on the right side of the sidebar.
In the Stereoscopy section, choose Views instead of 3D.


text:
Change material color based on specific normal angles
I'm trying to add false coloring to a terrain to help me identify the slope of faces when looking at it from top-down. I'd like:

~vertical faces (normal within 30 degrees of horizontal) faces to be one color
~flat faces (normal within 30 degrees of vertical) to be one color
other faces to have a third color

I've hooked the Normal from a Geometry node to calculate a dot product with +z: the output of which should be -1 for faces pointing down, 0 for horizontal, and 1 for vertical. I've fed the result to a color ramp, with color stop changeovers to 0.333 and 0.666, which should be 1/3 and 2/3 of 90 degrees (30 and 60 degrees). However, there are faces (like the one selected) that are "obviously" within 30 degrees of vertical, yet they aren't showing the vertical color. Why?

The relationship between the dot product and the angle is not linear. It is the output of the cos() function. So, some common normal angles placed on the color ramp after dot product with +Z would be:

90 degrees: 1.0  (vertical normal)
75 degrees: 0.966
60 degrees: 0.866
45 degrees: 0.707
30 degrees: 0.5
15 degrees: 0.259
0 degrees: 0.0 (horizontal normal)

To calculate the color ramp value for an angle away from horizontal:
cos((90 - angle) * π/180)


text:
Is it possible to convert a material shader mask to geometry in Geometry Nodes?
Hi I’m curious if it’s possible to convert a material shader’s mask into geometry somehow? I was thinking it might be possible with geometry nodes, but not sure how to access the shader mask specifically. Any ideas? I’m using Blender 3.3 btw. Thanks! Here’s a ss of what I"m talking about.


text:
Meshes turning white during rendering
I'm finished my model and would like to render it:

However when I render, there are some issues:

Some sections are coming out white where they should be grey / black. Other bits are black where the meshes intersect.

You may set different colors in the materials that show up temporarily in the 3D Viewport, but the materials with the names

asphalt
Material
sidewalk
sidewalk.001
store-front

all have a keyframe on the Base Color of the Principled BSDF at frame #37, setting it to white. Before rendering, Blender evaluates keyframe settings and shows the determined color, not the one you've set afterwards and not stored in a keyframe.
I would delete all those keyframes unless you want to animate changing colors (but then the other colors need keyframes, too).

For the black intersections: overlapping faces cause problems in rendering. You shouldn't have two or more faces in the same location.

Awesome, thanks! No idea how I set the keyframe value

@TomSelleck I don't know either, but it's quite simple  Just be over the color field with your mouse, then hit I to insert... and then you probably duplicated the material which had the keyframe.

Edit :
@Gordon Brinkman is right, I didn't saw that but yeah, you've got a keyframe on the color.
First, it appears that your asphalt shader is white.

Second, the angle that are "black" are due to an error while modeling. Your mesh has overlapping faces causing these black artifacts. You should remodel it without overlapping.

It is white, but simply setting a different color will not help - see my answer.


text:
Hiding intersecting parts and beyond intersections while animating piston movement
Im trying to implement a piston movement animation for this Bionicle leg piece and the pistons are intersecting with the mesh when moving or statically. The real life object cannot move in this direction, so movement of legs is unnatural without the knees Of course, I can cut a part of the piston with an angle that can hide it inside the mesh, animation ruins it tho (piston bones are hidden, using damped track constraint).

Is there any possible solution to hide that intersecting part of the mesh?
Also here is the inside view, if it's of any use:

I suggest you make a convex hull duplicate version of the triangle piece (with the same modifiers and such to keep it in the same position as the original), and hide it from viewport/render, but use it as the target for a Boolean modifier on the piston shell.


text:
Appling a material to selected faces only
I looked at this SO question to apply my material to only one face however the material is applied to the entire mesh.
What have I done wrong?

You can split material assignment only if several materials.

As-salamu alaikum !
You have to create a separate material by clicking on the + button. And then select the faces which you want to have the new material, select the new material and click assign. You're done.


text:
There is a Thick line in the mesh, making a slight bulge and I can't do anything about it
Hi I pretty much just started 3D and I was following the blender guru's tutorials making a cup.(https://www.youtube.com/watch?v=SBtDix7xGOg) I thought I was done so I saved and was about to exit when I discovered this problem. I don't know how it happened but I did some searching and tried merging and dissolving vertices. I looked like a bunch of vertices jammed up in two spots so I even tried dragging some out and deleting them but none seems to work without breaking the object. Do I just have to redo it? is there a soluton?

maybe merge the vertices?

The culprit edge is darker than the rest. Means there might be double the vertices there. right click > merge > by distance in edit mode

I have tried merging the vertices and It doesn't seem to work


text:
I messed something with color (principled BSDF?) and I don't know whats wrong
I was attempting to make a chocolate chip  but it renders like a ghostly mint-chocolate. I recently made a doughnut and was trying to make something similar on my own. What should I do to fix it?

Hello, looks like you messed with the subsurface scattering settings. They are great for organic objects but you have to tweak them with caution. Try from scratch with a brand new principled bsdf node (Add > Shader > Principled) and tweak the setting little by little to see the effects

This thread might help with SSS settings: Rules and presets for SSS in Principled BSDF

Wow, Thank you both! I was not expecting a reply so quick

@JachymMichal How did I never see that ? Thanks :)


text:
Green faces in sculpt mode but I don't think I did anything
I was re-making an anvil following blender guru's tutorial(because I applied modifiers in wrong order and screw up without backup) but suddenly I saw gaping holes in my mesh and had a mini-panic and reverted back to my auto save. Then, I realized there are green faces where the holes were.
So, I thought maybe there are loose vertices or something so I went and looked in edit mode. But I couldn't find what was off about it.
I've tried to merge it by distance, smoothing it but it didn't do anything. I don't know why it's happening or what I've done wrong. But other side looks fine witch is making it more confusing.
I'm assuming it could be the multi-plane scrape tool, but other parts where I've used it are fine and I am stuck

I did a bit of searching and think I've found an answer.
Wacky, weird colors when entering sculpt mode (blender v2.83)
Basically, clock on the dropdown menu near the viewport mode selection, and deselect 'Face sets' This should do the job.
Hope this helps.

I think that fixed it! Thank you!

I would complete @Relevred answer proposing to do 'Alt-W > Face Set from Visible' which just seemed to reinitialise this state using all the object faces and so no need to turn off the overlay feature.
Docs:
https://docs.blender.org/manual/en/latest/sculpt_paint/sculpting/editing/face_sets.html


text:
What controls the precision of Knife Project?
I was working on a project with a large-ish terrain (7M+ faces) that I Knife Projected many curves (~70k faces) onto:

After a bunch of cleanup (selecting faces that hadn't been selected by Knife Project), I zoomed in and realized that there were many faces crossing the curve border; some faces that should have been inside the curve went outside, some faces that should have been outside the curve went inside. The edge was not clean:

Seen above, the orange outline shows the curve that was knife projected, green shows the faces selected.
I came here to ask how to improve this, but decided I should reproduce it first and experiment with any ~threshold settings I could find. And...I cannot reproduce it. All the knife projects I make now are ~perfect. Here's the same region, with a new test knife project:

I know that I did not have Auto Merge or Split Edges and Faces on when editing the mesh. In fact, I am fairly certain that I did not edit any vertex placement on the entire terrain during material assignment. So, I assume the bad result I got originally is what came out of the knife project, and not something like Merge by Distance changing my terrain after the projection occurred.
So, I assume--and I'm being clear about this assumption, because I might be wrong--that knife projection produced a sloppy edge the first time around. What controls the precision of the projection? Even now it's not perfect--as seen in the final image below--so I assume there's a threshold or similar setting I've now changed that is affecting my new tests.

one imperfectly placed vertex

I found the ~answer in a comment on another, similar question. Horrifyingly, it depends on the zoom level when the knife project is applied. If I zoom way out in the orthographic view and then apply the knife projection, I get this horrible result:

So: if you want accurate knife projection, zoom in on the viewport before applying knife project. (!!)


text:
Sliding texture in U does not evenly cross wedge-shaped quad
I have a semi-circle mesh with quads arranged radially. (The inner-most edges are short, but non-zero length.) The UVs are designed so that textures sliding in U will rotate around the semi-circle, mirrored on both sides. It's almost working as intended.

However, if I hide the mesh, zoom in, and move slowly, you can see that as the blue portion of the texture crosses the inner quads, it does not interpolate perfectly radially:

This is not an optical illusion. Turning back on the wireframe, we can see that the blue is filling the width of the inner quad near the origin, but then is nowhere near the edge of that same quad near the outer edge, nor does the texture fill the quad in the outer ring:

I think the setup is clean:

The mesh was created by generating a mesh circle, extruding the outer edges without moving them (E Z 0 Enter) and then scaling them towards the origin (S 0.8 Enter). Repeat for the inner quads, scaling down to about 0.01. These should be radially perfect within the limits of high-precision floating point values.

The UVs are perfectly aligned in a grid, by selecting rows and columns of verts and scaling their offsets to 0 on the opposite axis (S X 0 Enter). Each column might have slightly varying widths, making them not quite perfectly distributed across the width, but they're pretty close, and the edges of each quad are definitely vertical in UV space.

The texture is (overkill, to be sure) a 512x512 grid of colors, as seen in the UV map above. The Texture is set to use Closest interpolation, but the same result occurs with Linear.

The texture is slid by animating the X coordination only of the UV Texture Coordinates. The same problem is seen if I go into the UV editor, and slide the UVs in X only (G X mouse slide).

Any suggestions for what's going on here, and how to fix it?
My next steps are going to be trying to subdivide the inner sectors, or try for triangles instead of quades on the inner sectors.

I don't understand why it's happening--I can only guess that it's something about the precision of the vertex coordinates--but the problem is directly tied to how small the central ring gets, how close the points are to each other:

Note in the above how the blue line starts parallel to the quad edge, but as the scale is shrunk it angles over and touches the edge. Once the vertices go past the origin (not desirable) that effect disappears, but other overlapping effects show up.
The solution, then, is simply to subdivide the interior ~sectors. The innermost sector still shows the problem, but the rest of them do not, which makes the problem almost imperceptible.

The root cause is described and shown in Possible to uniformly slide UV across non-rectangular quad?. That also shows that the problem DOES exist on the "interior sectors", it's just less obvious. Subdivision of the wedge-shaped quads in either direction helps mitigate the issue, but does not remove it perfectly.


text:
How do I "unlock" the movement and scaling? Whenever I transform an object, it moves/scales/rotates it by a set amount
Whenever I try to move/scale/rotate an object, it moves it by a specific amount (1 meter). How can I make it stop doing that and make it move freely?
Context:
(Video link) https://screenpal.com/watch/cZVlDqVJe9g

Hello and welcome. Instead of having users go through links and external sites please use the builtin tools to embed images in your post. See How to upload an image to a post? or GIF


text:
Potential bug that creates white black patches on the mesh + warps mesh behaviour and destroys it upon sculpting
Unsure if a known issue, nor do I know how I managed to do this.
Part of the mesh changes to black and white patches when I enter sculpt mode, Pre-entering sculpt mode, the material has slightly off norm properties that would normally be in cycles. Mesh cant be texture painted either. Second time it has happened in a long period, accidently saved this time though.
Is there a fix or ?


text:
How do I fix glitchy/jittering exported render?
I'm new to blender, and trying to make cinematic car animation, but I don't know why my render is super glitchy/jittering I've tried to rendered it again but still the same, so where did I go wrong? Please let me know because currently I'm struggling with it and it really killed my motivation to learn blender.
This is the animation btw:
https://drive.google.com/file/d/1cYalNYuoVtfd_zZdPz1mzjsI4jR8hVYs/view?usp=sharing
Another example:
https://drive.google.com/file/d/10gRqLhmoUm4B4f9V9m_HeX_NKjUKLN34/view?usp=sharing

Hello and welcome. While files, images, and external videos or links may be helpful additions they should not be the only way to obtain information about your issue. Don't make understanding your question rely on downloading a file, watching a video or visiting an external site. Use the builtin tools to upload images or gifs, along with thoroughly explaining the problem in written form so it can be indexed and searched for thus helping future visitors with similar issues.


text:
UV map a sphere into wedges
Is there a way to UV map a sphere into 4 wedges? I was provided a UV map from a 3D designer that had the art in 4 wedges, but I haven't found a tutorial on how to do so. Help?

You can mark edge creases to form the wedges, have you tried that?

What kind of sphere ICO / UV ...? Reference image of your case would be helpful.

Select the edges that should be seams

Press U > Mark Seam

Select all with A

Press U > Unwrap


text:
how do i change the colour of my model back to the default modelling colour
im fairly new to blender and ive been working on a model for a few days now and all of a sudden the head of my model has turned black, and i cant seem to find anything to change it back. the only thing i can say is i was messing around with a few of the tools on the left (the colour map and a few below that one) and the face turned black after selecting one of those tools, and wont change back.

You can try deleting the "color" attribute of the mesh. Or simply using the paint tool within the sculpting tab tools and paint the mesh white.

painting over in white fixed it. thank you for helping!


text:
Need help with joining animation from several rigs to one (same mesh and bones on each rig)
I have several rigs with animations. All are the copies with same 5 bones and mesh (no defined armature, just bones).
Mostly the same first and last frame, enabling easy transitions between animations.
Conditions have changed and now I need to put all animations into one rig and export it to be imported into a game engine.
The problem is that I've transformed locations somewhere along the line on some rigs so the point of origin has moved to world origin. So when I copy location and rotation keyframes from one rig to the target rig, sometimes that gives unwanted movement in location and rotation.
I've tried to solve it by delta transforms to zero out movement both for location and the animations.
Also tried to make actions of it and put it into nonlinear animations before that.
Is there some addon that can help to solve this and sanitize the animations or is my only option to remake all animation in the target rig? (It's about 28 different animations so I rather avoid it)
Saw another thread about Copy Global Transform. Can this work?

Hello, what you could do is move the bones with the help of the Graph Editor so that they align with the other actions?

Thanks, that is a good tip I can try


text:
Per-Face Vertex Color from Image Texture
Is it possible to convert a UV mapped image texture into per-face vertex color?
I found this script that can generate Per-face vertex color from Normals of 2.79, or an add-on Bake vertex color, but it doesn't work per-face.

It depends how often you want to do this.. it's computationally inefficient, but I'm sure an equivalent procedure would be scriptable.. Split all edges on mesh. In UV map, pivot 'Individual Origins', scale all faces to 0, so all faces sample a point. Run 'Bake Vertex Color'

I came to this through this Q https://blender.stackexchange.com/q/211511/2214 so I was curious how to ... your step with "Individual Origins" generated my Q :) BTW Scale to zero (or even with small face size) results as black for "Bake Vertex Color" add-on :)

Oh. Bother. It's a beautifully written add-on, well-commented... but it's doing quite sophisticated sampling, which is getting tangled up by 0 faces? Would 1 center-of-face sample do, for your case? (Where's @batFINGER when you need him :D)


text:
Bend feature of simple deform modifier doesn't work as intended
I was trying to use the bend feature of the simple deform modifier, but was unable to made it work as intended (i.e it doesn't bend the edges following a round shape, instead it bends both ends to each other). Here's the preview of the issue.
https://imgur.com/a/whQszjj
Do any of you guys know what is the issue here?
Thanks for your help.

It should work:

Maybe your mesh is not subdivided the right way.
Other possibilities: the object is scaled or rotated in object mode.


text:
How to get rubber thing to deform as mini gun moves up and down instead of moving with it?

How to get rubber thing to deform as the mini gun moves up and down instead of moving with it in Blender 4.0.2.
I used automatic weights it is not working.
Please watch whole gif
Video
do i need soft body physic?

Hello and welcome. Please don't post the same question more than once. If your previous question was put on hold, address the raised issues by editing it so it can be reopened rather than post a new one, otherwise see What should I do if no one answers my question?

No, you don't need soft body physics. Just another bone or two, I guess. Has the "plunger"/rubber thing a bone? If you only have 1 bone you cannot control the deformation properly.
Add two more bones, make sure the barrel of the gun is only influenced be its own bone. In the example, you see the "gun" is blue when I select the lower_rubber_bone vertex group. It's complete red (=full weights) when the handle_bone vertex group is selected. Each bone has a Vertex Group with the same name as the bone.
The rubber thing should be influenced by both bones all three bones. Checkout the Weight Paint mode, if With Automatic Weights does not provide a perfect result. The barrel will most likely bend as a result. You can fix this manually by painting the weights.
Note that you also can assign and remove vertices from a vertex group in Edit mode. There you can also hide geometry that are in your way. This hides them in Weight Painting mode, too.
The root bone lower_rubber_bone in the example can rotate, scale and move the whole object in Pose mode. No need to move the armature in Object mode (but sometimes you want/need to).


text:
Cannot reset the center of an object with "Origin to Geometry"
I would like to reset the center reference of the parent object model, but no matter what buttons I clicked, the location reference point is still not at the center. Can anyone please give me some advice? Thanks!
In the attached image (in the link) that shows the layers, I tried to reset the origin from the child object all the way to their parent. However, when I revised Base, any child under Base was reset but Base itself cannot be changed. The model screenshot is also attached.
https://drive.google.com/drive/folders/1NtficCjk-Mu0G1cFLHaVwCUZye6IDqTO?usp=drive_link

Hello your link asks for an authorization

https://drive.google.com/drive/folders/1NtficCjk-Mu0G1cFLHaVwCUZye6IDqTO?usp=sharing
So sorry just updated!

could you please share the file itself? https://blend-exchange.com/

Yep! Just uploaded the file to the drive! Thanks :)

Could you please reformulate what you are trying to do? What is the "center reference" or the "location reference point", or "revise" or "reset" for example? The object called Base is an empty for example, you can't change its origin position

Yep! The ultimate goal is to align the robot arm's location with the model so that the arm and the center of the model share the same y value wrt to the global frame. My initial attempt was to set their y location manually, but I realize that the reference center, i.e. the x, y, z location in transform of the model is not at the center. Hence, I cannot adjust the position by matching the y value directly. This is the reason why I want to reset the center of the model. I hope this makes more sense! Thanks!


text:
Blender 4.0.2 Voronoi Texture OK in Material Preview but not in Rendered
I have been using the Carvature wood material nodes in 3.6 with great success but in 4.0.2 something interesting happens. The textures preview correctly in Material Preview but not in Rendered view. I tracked the issue down (or so I think) to the Voronoi Texture. Check the difference in these screenshots. The only difference is the Viewport Shading.

What I noticed is that when in Rendered View but switching to EEVEE the results are correct. So something to do with Cycles?

I think I managed to fix it. Regarding the screenshot below, the Vector Transform node was transforming from Object to Object i.e. not doing anything to the vector. When I changed the transformation from Object to World, it worked in Cycles and EEVEE.
Curiously,

Object -> Object did seem to transform Object -> World in EVEE.
Object -> Object did seem to transform Object -> World in Cycles in Blender 3.6.


text:
Armature selection using a eyedropper
I created an addon that uses an eyedropper to select an armature.
The type retrieved is determined by how the object is selected.
Using an eyedropper makes it an "Object", and using a list makes it an "Armature".
Please point out my mistake.
Or is this by design?
Eyedropper
type: <class 'bpy_types.Object'>

List
type: <class 'bpy_types.Armature'>

My program
import bpy
from bpy.types import Panel,Operator

bl_info = {
    "name": "sample",
    "author": "Kageji",
    "version": (0, 0, 0),
    "blender": (2, 83, 0),
    "location": "3D View > Sidebar",
    "description": "",
    "warning": "",
    "support": "TESTING",
    "wiki_url": "",
    "tracker_url": "",
    "category": "Object",
}

class Sample_Panel(Panel):
    bl_label = "sample"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "sample"

    def draw(self, context):
        layout = self.layout
        scene = context.scene
        layout.prop_search(scene, "targetArmature", bpy.data, "armatures", text="", icon="ARMATURE_DATA")
        layout.operator(Sample_Operator.bl_idname, text="Button")

class Sample_Operator(Operator):
    bl_idname = "sampleoperator.operator"
    bl_label = "sampleoperator"

    def execute(self, context):
        obj = context.scene.targetArmature
        self.report({'INFO'}, "type: {} Object: {}".format(str(type(obj)), str(obj)))
        return {"FINISHED"}

classes = [Sample_Panel, Sample_Operator]

def register():
    for cls in classes:
        bpy.utils.register_class(cls)
    bpy.types.Scene.targetArmature = bpy.props.PointerProperty(type=bpy.types.Object)
    print("rename mixamorig bone name is active")

def unregister():
    for cls in classes:
        bpy.utils.unregister_class(cls)
        del bpy.types.Scene.targetArmature
    print("rename mixamorig bone name is inactive")

if __name__ == "__main__":
    register()

Hi. You get two different types because your script requests two different types. It works as designed ;-) In line 27 the prop_search looks for "armatures", while in line 47 the targetArmature is a PointerProperty of bpy.types.Object. If you want to have objects then change line 27 to "objects", for armatures change line 47 to bpy.types.Armature.

I see. Understood.
My understanding of blenders has deepened.
Thank you for your advice.

Armature selection using a eyedropper

Hi. You get two different types because your script requests two different types. It works as designed ;-) In line 27 the prop_search looks for "armatures", while in line 47 the targetArmature is a PointerProperty of bpy.types.Object. If you want to have objects then change line 27 to "objects", for armatures change line 47 to bpy.types.Armature.

I have made some changes based on this comment.
Changed bpy.props.PointerProperty type to bpy.types.Amature.

line 47
bpy.types.Scene.targetArmature = bpy.props.PointerProperty(type=bpy.types.Object)
bpy.types.Scene.targetArmature = bpy.props.PointerProperty(type=bpy.types.Armature)