text:
Is there any visio like symbol set for Blender?
I'm new to Blender and like it a lot. I'm looking for a symbol set kind of Visio style. Like network symbols (servers, disks, terminals) of database symbols (entitie, relations).
I would like to create a database architecture landscape in which you can fly around and visit the individual parts in the architecture.
Q: Is there any visio like symbol set for Blender?

Hi and welcome! Recoomed take the tour to learn about how this site works: https://blender.stackexchange.com/tour Cheers!

I don't know much about Visio at all and in fact it's the first time I hear about it, but a quick Google search reveals that it is possible to save diagrams created in it in SVG format. You can also import SVG format to Blender. If you press F4 followed by P or go to Edit -> Preferences, navigate to the Add-ons tab and search for "SVG", you will find an option to enable SVG import add-on:

Other than that, Blender is a content creation software package, so you can also just make whatever diagrams using it's modelling and drawing tools. This is the way to go with most things, because you cannot expect to find assets for every single idea you imagine.


text:
How can I create custom decals using Decal Machine?
I just tried to create a decal but I get an error in the console:

Traceback (most recent call last):
File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\2.83\scripts\addons\DECALmachine\operators\create.py", line 162, in execute
packed, decaltype = core.pack_textures(dm, decalpath, textures, size)

TypeError: cannot unpack non-iterable NoneType object
location: :-1

Does anyone know why this happen? How to make it work?

Given that this question is about a paid addon, you should contact the developer directly for support (or get your money back)

Same issue, did u solve it

source: Stack Exchange

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

sort: votes


text:
How do I delete a camera in a blender scene I downloaded
There is a blender scene I just downloaded and it has a camera in it. Whenever I try to delete it, it deletes the whole scene. All i want is the camera to be removed

Could you please share your file: https://blend-exchange.com/

Check if the objects are parented to the camera and unparent it first if it is so.

@moonboots Not necessary, it's an instanced collection as the screenshot shows.

@Lukasz-40sth If the child object is not selected, deleting a parent object will not delete the child. Only transformations that are made in relation to the parent object get lost if you delete it.

Yes that's what I thought but I wanted to make sure  ;)

It looks like you used Append to import the collection into your scene. And in the Append options "Instance Collection" was enabled. You can see it from the orange collection symbol in the Outliner. This is just an empty which instances the collection.

And this means you just have a linked duplicate to the original collection in your scene which can only be changed as a whole, but only transformations like moving, rotating, scaling. You cannot edit individual objects or meshes or delete individual parts, only the collection altogether.
To be able to manipulate individual objects you have to convert the instance into real objects. You can do this by selecting the collection, then from the 3D Viewport menu choose Object > Apply > Make Instances Real or in the viewport hit Ctrl+A > Apply > Make Instances Real.

In the tool options on the bottom left of the viewport you can then choose if you want to parent the converted objects to the empty from which the instance came and if you want to keep the original hierarchy of the original collection when creating the individual objects. You can do this by enabling the options.

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


text:
How to stretch armature according to two different points
I an trying to create my own addon. I have a button which adds two points for positioning ("Start_point" and "End_point"). Then another button should stretch a bone between the two points. I was trying to first add an armature at one point and then stretch it toward another. Here is my code for the first part:
  import bpy

  get_object_1 = bpy.data.objects["Start_point"]

  bpy.ops.object.armature_add(enter_editmode=False, align='WORLD', location=location1, scale=(1, 1, 1))

About how to stretch the bone, I have no idea. I tried doing it manually, copying the code from the "Info" in scripting tab and then editing the location of the stretch by another variable, but it did not work. So how can I achieve this.
I know that this is not that difficult, and I am sorry for posting this. But please bear with me, I am quite new to scripting in Blender.

This might help if you want to edit bone/pose bone head/tail positions: https://blender.stackexchange.com/questions/265213/transfer-orientation-of-points-to-bone-armature/265241#265241

That might be of some help, I will try it and get back to you, @XY

Not what I am looking for .. Sorry @XY


text:
How do I Exclude Light from an Emission Object?
I'm making a small solar system, complete with a star and planets. I want the star to appear in the renders, but using it as a light source makes the renders much worse because its light is noisy. I would much rather use a point light as the light source, but I still want the star to be visible in renders. Is there a way to make it so that the light from the star is still visible in the camera, but it doesn't affect the rest of the scene? I'm using Cycles.

If you go to the Object Properties tab on the emission object, there under Visibility > Ray Visibility you can disable everything except for Camera.
This way the emission object will be visible but not affect the scene in any way, it will shine no light onto objects, it will not be visible in reflections etc. You can even put your point light into the center and the emission object will not block the light, so you can use the point light as light source for your planets.


text:
How to link object data whilst keeping original rotation data
I have a model where I am trying to replace a bunch of placement planes with a screw model. I am hoping to be able to use linking object data to make this work but so far I am struggling. I have duplicated one such placement plane to demonstrate. You can see the set up below:

I have applied scale on both the plane and the screw, I have set the origin to geometry on the plane and then I have used object linking data to replace the plane with the screw. My end result is this:

As you can see the screw is not facing the direction I would like it to, I want it to be facing out of the plane (i.e. sort of towards the top right in the image). I've tried applying rotation but that only ends up with the screw being the exact orientation it is currently. Any suggestions would be greatly appreciated!

You can use instance on faces, but as I see, you have at least 2 faces, not one.

Of course applying the rotation (i.e. resetting all rotation values to 0° without changing the mesh's orientation) leads to the screw being oriented as it is originally. The problem is, you are not showing any information how this plane is oriented or how the screw is oriented (since I assume the arrows are using Global orientation, not Local), no rotation values either. Generally the Link Object Data works like this: the "new" screw will be placed with its origin where the plane's origin is, its Z axis will point in the direction where the plane's (local) Z axis points.


text:
Rendering a Volumetric Image
So today I decided to try making a volumetric texture. (I found a mod for Kerbal Space Program that adds custom volumetrics, and I wanted to try making something.) If you're unaware, a volumetric texture is basically 3D voxel data that's been sliced up and placed onto a 2D texture. Here's an image to demonstrate:

(Green is Y, red is X, and blue is Z. Also, it's scaled down. The original image was 4096*4096.)
The tiling system starts from the bottom left corner and goes up. Once it reaches 16 images, it loops back down, moves one space to the right, and starts again. This repeats until there are 256 tiles.
Here's the question: I have the individual images rendered already, but I don't know how to tile them (other than painstakingly stitching 256 images together.) Do any of you know how?
Here's the images I've rendered, in case you'd like to use them. They're not perfect, but it's a start.

Non Blender
This task would be faster to solve out of Blender ... some online generator or by ffmpeg (if installed) via Terminal with the  command below (here is step-by-step tutorial) ...  it works for me - fast almost one click (copy-paste) solution.
ffmpeg -i %04d.png -filter_complex tile=16x16 output.png

Blender
If you incist to use Blender, here is one way.
Volumetric texture from image sequence can be achieved by UDIM Texture like answered here. UDIM generates sprite sheet 10 x n grid. For volumetric texture is each tile vector translated into a slope at Z axis.
– Shader
For your need you would have to change the way of translation from 10 x n  to  16 x 16.
That I'm going to skip for now.
– Geometry Nodes
For the same purpose you can follow a quellenform's answer, that generates UV translation of UDIM's grid into custom sprite sheet from geometry. The only one thing I changed in his node-tree is instancer (see node-tree) and Scale Instancer node to 0.1 ...

Custom UV than looks like this ...


text:
How to make a neodymium magnet?
I am new in Blender and would like to make two neodymium magnets that simulate the forces and attraction, but I have no idea how to make it.

Have a look at this: http://blender.stackexchange.com/a/52240/7777

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


text:
Physics in tracked scenes, not working
I've already made plenty of Blender physics simulations in my life but when i try physics in a camera tracked scene, literally nothing happens. Always. All setup is the same as in other scenes but when there's a tracked camera, simulations don't work for me :/
For example, my current problem is :
I simply tracked a camera motion (and in addition also object motion - my hand) and I'm trying to make a cube fall off my hand on the table. But as i mentioned, physics doesn't work. I add a rigid body, passive, active, mesh, animated for hand blablabla but no active objects are falling. I also tried to add a completely new, casual cube, also added rigid body to it and still nothinng happened. I made the object tracking from Jonathan Kron's YT tutorial
His Cube is falling but mine is not :(
Appreciate any help

After I converted Constraint to F-curve it start to simulate.
Why it is not working like in tutorial from 2020 ... hm ... a bug?


text:
Blender 2.9 python Operator bpy.ops.object.mode_set.poll() failed, context is incorrect
I'm a bpy beginner and i'm facing a error with python scripting on the line
bpy.ops.object.mode_set(mode='EDIT')

Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
  File "/usr/local/blender-2.90.1-linux64/2.90/scripts/modules/bpy/ops.py", line 201, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.mode_set.poll() failed, context is incorrect

The code :
import bpy

Opsobj = bpy.ops.object

Scene = bpy.context.scene
Opsobj.select_all(action="SELECT")
Opsobj.delete(use_global=False)

target = 'jacket'
file_loc="/root/file.fbx"
bpy.ops.import_scene.fbx(filepath=file_loc)
so = bpy.context.active_object

for obj in bpy.data.objects:
    obj.select_set(False)
bpy.data.objects[target].select_set(True)

Scene.objects[target].select_set(True)

bpy.ops.object.mode_set(mode='EDIT')   <--- error here

I want to edit the jacket objectpy.context.scene.objects.active
How do i select the right context to be able to do the operation?

Some objects are not editable, an empty for example.  Make sure the acitve object is set, context.view_layer.objects.active = context.scene.objects.get(target) making it the active object to be edited.  If there is no object named target it will be None and also fail.  After an import (generally) the imported objects are also context.selected_objects.  Rarely use bpy.data.objects which is all objects in blend file whether linked to context scene or any scene.

@batFINGER yes, after I manually delete an object, my script will fail, unless I make some known object active, even if I have to make it (or some other) active again just after the mode_set(). thx!


text:
posebone.keyframe_insert() not being stored in animation, only armature keyframes stored successfully, any ideas?
my first post here. I've been tearing my hair out on the steep learning curve with manipulating bones and armatures in Blender 2.8. I'm very very close to the solution but have a hit a stumbling block.
As a background I am importing data from a simulation I have carried out in other software (Rhino3D) which I have stored in a json file. I have a list of "frame_data" stored in the "frames" list. Each frame has a list of "stems" which are the elements I am animating each with its own armature. With the data from the json file I insert keyframes for the armature's location and orientation and then I loop through the pose bones of the armature inserting keyframes.
I have learned the hard way how to format the data and get the orientation of the matrices just right. The final stumbling block here is that the armature stores its keyframes and the animation plays back well after I have run the script, but the bones themselves are static and take the pose of the final frame only. The empties that I have used as an intermediate step also animate correctly, so I definitely have the data I need, it just doesn't seem to have any effect when I call
stem_bone.keyframe_insert(data_path="rotation_euler", frame=frame_no)

I have already been caught out by the "gotcha" of needing to call bpy.context.view_layer.update(), is there a similar issue here? Does anybody know?
Is it because of the nesting of my loops at all?
for frame_no, frame_data in enumerate(frames):
    print("Current frame: {}".format(frame_no))
    for stem_idx, stem in enumerate(frame_data):

        if stem_idx>0:
            continue
        #if frame_no>10:
        #    continue

        if stem["type"]==0:
            bpy.ops.object.mode_set(mode='OBJECT')
            bpy.ops.object.select_all(action='DESELECT') #deselect all objects

            curr_name = stem["name"]
            print("Current stem: " + curr_name)

            curr_arm_name = curr_name + 'Armature'
            current_stem_armature =  bpy.data.objects[curr_arm_name]
            bpy.context.view_layer.objects.active = current_stem_armature

            #keyframing of root location of armature (stem node 0)
            # X, Y, and Z location to set
            location = stem["root_loc"]
            root_rots = stem["root_rots"]
            #print(location)

            #OK this section is working!!
            current_stem_armature.rotation_mode  = 'XYZ'
            current_stem_armature.rotation_euler = root_rots[0],root_rots[1],root_rots[2]
            current_stem_armature.keyframe_insert(data_path="rotation_euler", frame=frame_no)
            current_stem_armature.location = location[0],location[1],location[2]
            current_stem_armature.keyframe_insert(data_path="location", frame=frame_no)

            bpy.context.view_layer.update()

            #bone_transforms = stem["bone_transforms"]
            bone_rots = stem["bone_rots"]
            bone_locs = stem["bone_locs"]

            for bone_idx, stem_bone in enumerate(bpy.context.active_object.pose.bones):
                print(stem_bone.name)
                if bone_idx>0:
                    b_name = stem_bone.name
                    curr_empty_name = curr_name + "_" + b_name+"_empty"
                    # If we're on the first frame
                    if frame_no==0:
                        curr_empty = bpy.data.objects.new( curr_empty_name, None )
                        curr_empty.empty_display_size = 0.01
                        curr_empty.empty_display_type = 'ARROWS'
                        curr_empty.location = 0,0,0
                        def_coll.objects.link( curr_empty )
                        bpy.context.view_layer.update()

                    bpy.ops.object.mode_set(mode='POSE')

                    curr_empty_ob = bpy.data.objects[curr_empty_name]
                    #change empty then apply its transform to bone
                    bone_rot = bone_rots[bone_idx-1]
                    bone_loc = bone_locs[bone_idx-1]
                    curr_empty_ob.rotation_mode  = 'XYZ'
                    curr_empty_ob.rotation_euler = bone_rot[0],bone_rot[1],bone_rot[2]
                    curr_empty_ob.keyframe_insert(data_path="rotation_euler", frame=frame_no)
                    curr_empty_ob.location = bone_loc[0]/1000,bone_loc[1]/1000,bone_loc[2]/1000
                    curr_empty_ob.keyframe_insert(data_path="location", frame=frame_no)

                    bpy.context.view_layer.update()

                    input_mw = curr_empty_ob.matrix_world

                    bpy.context.view_layer.update()

                    output_mw = current_stem_armature.convert_space(pose_bone=stem_bone,
                                                    matrix=input_mw,
                                                    from_space='WORLD',
                                                    to_space='POSE')
                    #print("output_mw")
                    #print(output_mw)
                    bpy.ops.object.mode_set(mode='POSE')
                    stem_bone.matrix  = output_mw
                    #stem_bone.rotation_euler = output_mw.to_euler()
                    bpy.context.view_layer.update()

                    #bpy.context.scene.frame_set(frame_no)
                    stem_bone.keyframe_insert(data_path="rotation_euler", frame=frame_no)

                    print(b_name+ "  rotation_euler  frame no  " + str(frame_no))
                    print(stem_bone.rotation_euler)

                    bpy.context.view_layer.update()

                    stem_bone.keyframe_insert(data_path="location", frame=frame_no)

            bpy.ops.object.mode_set(mode='OBJECT')
            bpy.ops.object.select_all(action='DESELECT') #deselect all objects


text:
Random UV angles

just wondered if anyone can help?
When I assign a video to multiple faces, it doesn't always have the same rotation. There are hundreds of them as the object is a giant spiral so can't go round manually adjusting. I'm wondering if there's some kind of sub-text-information that tell the uv editor which way the image should be but surely that should then be the same for every face? Maybe because it's a circle, the image angle changes in relation to the direction of the face?
Any potential solutions greatly appreciated!

Do all faces show the same normal orientation? And how have you unwrapped?

hi Robin, the faces show different orientations as per the image. I just did a regular (not live) unwrap..


text:
How to link the output of a Vector Math node to another node?
I try to build a operator for some specific shaders by using Python but got stuck on how to make a node connection between ColorRamp (input) and Vector Math (output):

When I try to use shadername.links.new(VectorMath.outputs[0], ColorRamp.inputs[0]) both nodes are disconnected and I am not sure why:

Some coding excerpt:
 #colorRamp
    ramp = mat_ruby.node_tree.nodes.new("ShaderNodeValToRGB")
    ramp.location = (-800,100)

    ramp.color_ramp.elements[0].position=0.102
    ramp.color_ramp.elements[0].color = (0.215861,0,0.017642,1)

    ramp.color_ramp.elements.new(0.636)
    ramp.color_ramp.elements[1].color = (0.396755,0,0.032,1)

    ramp.color_ramp.elements.new (0.794)
    ramp.color_ramp.elements[2].color = (0.701102,0.147,0.016,1)

    ramp.color_ramp.elements.new(0.893)
    ramp.color_ramp.elements[3].color = (1.0,0.292,0.0,1)

    ramp.color_ramp.elements[4].position = 1
    ramp.color_ramp.elements[4].color = (1.0,1.0,1.0,1)

    mat_ruby.node_tree.links.new(ramp.outputs[0], glassA.inputs[0])

    math = mat_ruby.node_tree.nodes.new('ShaderNodeVectorMath')
    math.location = (-1000,100)
    math.operation = 'DOT_PRODUCT'
    mat_ruby.node_tree.links.new(math.outputs[0], ramp.inputs[0])

Q: How can I link the output of a Vector Math node to the input of eg. a Color Ramp?

Hello, I've answered your question and taken the liberty to modify the title to make it a bit more clear, feel free to revert if it doesn't feel like what you intended :)

The Vector Math node actually has 2 outputs : One of type Vector, and one of type float. They get hidden / shown depending on the node's operation.
The float type is accessed with the second index of the outputs. Change your last line to :
mat_ruby.node_tree.links.new(math.outputs[1], ramp.inputs[0])

Or (not advised since it is language-dependant)
mat_ruby.node_tree.links.new(math.outputs["Value"], ramp.inputs[0])

That raises an interesting question.. I wonder.. can you use locale-translated strings to look up into this kind of dictionary?

@RobinBetts Yup that would be handy ! I never really dived into that and it's quite hard to find related docs given the keywords locale and translation :) I think it would depend if the string is translated at runtime or at compile time ? Anyway this would still be unadvisable since one could work with a material created by another person with a different locale language...


text:
How to animate the particle hair size?
I have made a sphere and assigned a hair particle system. I'd like to scale the hair particles in one area when higher than that of another area and would like to animate that too.
Q: How to animate the particle hair size?

U can animate particle size by hitting i key in the scale input box

I'm not exactly sure if I understand your question correctly, but you can easily animate particle scale:
In your particle settings, under "Render" right-click on "Scale" and choose insert keyframe. Alternatively, you can click on the small dot right to the box.
Then, go forward in your timeline, insert a new value for "Scale" and again, insert a keyframe.

This may result in something like this:

Just right-click the scale value, then click insert keyframe. Move to another frame, then edit the scale value. Right-click the value, then add another keyframe. This will animate its size.


text:
Blender 2.8+ - Baking textures on headless machine (batch baking)?
I'm a noob when it comes to scripting so I came across this solution: Baking textures on headless machine (batch baking) But unfortunately, I can't make it work for 2.8+:
bake_all.py
import bpy
import os

scene = bpy.context.scene
for obj in scene.objects:
    obj.select = False

for obj in scene.objects:
    if obj.type != 'MESH':
        continue

    scene.objects.active = obj
    obj.select = True

    bpy.ops.object.bake(type='COMBINED')
    obj.select = False

# save all baked images
for image in bpy.data.images:
    if image.is_dirty:
        # foo.png -> foo_bake.png
        filepath, filepath_ext = os.path.splitext(image.filepath_raw)
        image.filepath_raw = filepath + "_bake" + filepath_ext
        image.save()

Q: How to execute the script in latest versions?

Updated the code based on the comments and it still doesn't work:
import bpy
import os

scene = bpy.context.scene
scene.render.engine = 'CYCLES'

for obj in scene.objects:
    obj.select_set(False)

for obj in scene.objects:
    if obj.type != 'MESH':
        continue

    bpy.context.view_layer.objects.active = obj
    obj.select_set(True)

    bpy.ops.object.bake(type='COMBINED')
    obj.select_set(False)

# save all baked images
for image in bpy.data.images:
    if image.is_dirty:
        # foo.png -> foo_bake.png
        filepath, filepath_ext = os.path.splitext(image.filepath_raw)
        image.filepath_raw = filepath + "_bake" + filepath_ext
        image.save()

bpy.ops.image.save

This is not working on my remote PC, it works fine on my local PC but not on my remote farm. What am I doing wrong?
this is not doing anything
# save all baked images
for image in bpy.data.images:
    if image.is_dirty:
        # foo.png -> foo_bake.png
        filepath, filepath_ext = os.path.splitext(image.filepath_raw)
        image.filepath_raw = filepath + "_bake" + filepath_ext
        image.save()

in terminal it says

Info: Baking map saved to internal image, save it externally or pack
it

only the bake file is created that is not usable... do I need to add the filepath?
I tried to add save file and download blender file to open it locally but no baked textures within...

I get line 6, in <module>     obj.select = False AttributeError: 'Object' object has no attribute 'select'

Okay, my bad it did have some outdated lines. Please check the answer you provided, I updated the code for 2.8+. basically obj.select became a method obj.select_set(state) and now with view layers you have to set the active object per view layer. scene.objects.active = obj becomes bpy.context.view_layer.objects.active = obj

Does the update solve your issue? @sephiroth85

no, i updated it but still getting this

line 15, in
bpy.ops.object.bake(type='COMBINED')

line 201, in call
ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: No valid selected objects

Do you actually have a mesh object in your file ?

@Gorgious after bake it seems that blender doesnt save the files?

Have tested the script and it seems to work properly. I'd suggest share your blend preferably using https://blend-exchange.giantcowfilms.com/ and add the blend to your question to figure out your issue...

done, what I want to do it, is to run baking on my remote render farm that I have

anything? @brockmann

as mentioned this is not working on my remote PC, it works fine on my local pc but not on my remote farm


text:
Why does my particle hair look so patchy?
Particle hair seem to have a weird behavior. Following image shows my guides:

And here is the render:

What am I doing wrong?

That is a https://en.wikipedia.org/wiki/Moir%C3%A9_pattern
Add a small amount of randomness to the vertices to avoid that.

It actually works !

I suppose you've set too small root radius and edge. Considering Diameter scale, it becomes 0.01 * 0.01 = 0.0001 which I believe is pretty physically accurate but almost invisible if the rest of the character is not scaled to 1.7m height. Try to increase root radius.

I have set my character to real world size,the thing is not the size of the hair but the inconsistent look on different parts of every hair strand.


text:
How set an hotkey to run a saved script like ui_menu.py (Blender 2.90)?
Following tutorials about how register the hotkey for a script or menu.
I always get an error with nameofthefile.py not found or "error in line x" but I copy/paste the whole script.
So lets say i create a new script, from the template Ui_menu.py,
how do I set and register the hotkey to run it while modeling ?

Without proper operator doing that thing in modeling panel, you cannot assign a hotkey to a script. You can however create an addon, register an operator that run the script by selecting specified text block. Then you can use that id to assign to new shortcut

Open a new script , using the template ui_menu
Add these lines to make it able to become an addon
import bpy

bl_info = {
    "name": "MY_OWN_MENU",
    "blender": (2, 80, 0),
    "category": "Object",
}

class CustomMenu(bpy.types.Menu):

Save the file anywhere, using notepad and change the fileextention to .py
like "My_custom_menu.py"
now in blender -preference- addon , click install addon, and search your file.
If done correctly your addon will appear in the window with the "name": "MY_OWN_MENU"
set the checkbox active.
Now open the blender-preference-keymap
i am not sure of this part, i selected the 3D-view-3DviewGlobal and added a new key at the bottom.
maybe this mean that out of the 3d view this key will not work.
Since we are calling a menu, write "wm.call_menu" in the first field.
this will make appear another field , Write in the exact name of the so: classOBJECT_MT_custom_menu .
I read somewhere that f5 f6 f7 f8 area free-key left to user, set the hotkey you prefer.
At every startup blender will load the addon, making work the shortcut.
going in the addon window, we can uncheck the addon , to set it off, but without deleting her.

I am not sure about your method. It seems to be not related to your original question. But yes, if you are going to run a script every time. Make it an addon will do the work

thank you very much.
you answer with a great number of info, i will try to understand it fully,

If you need to run any script in any context area. You might need to use a new operator to make the shortcut available due to the lack of operator. The one that scripting editor used will poll the context and only work in scripting area.

Code
import bpy

def create_summary(text: str, length: int = 300) -> str:
    return f"Code Preview:\n\n{text[:length]}"

def list_textname_callback(scene, context):
    return [
        (text.name, text.name, create_summary(text.as_string()))
        for text in bpy.data.texts
    ]

class TEXT_OT_run_specified_script(bpy.types.Operator):
    bl_idname = "text.run_specified_script"
    bl_label = "Run specified text script"
    bl_options = {'REGISTER'}

    # fmt: off
    script_name: bpy.props.EnumProperty(
        name="Run script from:",
        description="Run this specified script.",
        items=list_textname_callback
    )
    # fmt: on

    def invoke(self, context, event):
        # Prompt to ask
        return context.window_manager.invoke_props_dialog(self)

    def execute(self, context):
        script = bpy.data.texts.get(self.script_name, None)
        if script != None:
            exec(
                compile(
                    script.as_string(),
                    filename=f"{script.name}",
                    mode='exec',
                ),
            )
        else:
            self.report({'WARNING'}, "No script found.")
        return {'FINISHED'}

def _menu_func(self, context):
    self.layout.operator(
        TEXT_OT_run_specified_script.bl_idname,
        text=TEXT_OT_run_specified_script.bl_label,
    )

# fmt: off
classes = [
    TEXT_OT_run_specified_script,
]
# fmt: on

def register():
    for c in classes:
        bpy.utils.register_class(c)
        bpy.types.TOPBAR_MT_window.append(_menu_func)

def unregister():
    for c in reversed(classes):
        bpy.utils.unregister_class(c)
        bpy.types.TOPBAR_MT_window.remove(_menu_func)

if __name__ == "__main__":
    try:
        unregister()
    except:
        pass
    register()

Details:
The arbitrary script you want to run is loaded and executed by another operator. Operator is a class inherited from bpy.types.Operator and been registered to Blender system.
Most of the button in Blender is an UI to invoke operator. The short-cut keymap need an bl_idname to hook on. But the original text.run_script (The small play button in your text editor) cannot select arbitrary script and run, also it cannot be run outside the text editor due to the poll method block unnecessary context call.
That's why you need another operator doing the same thing but accept changing script and run it in every where.
TL;DR:
This addon is only a play button that can accessed in anywhere and run any text block (doesn't even need to be a python script). This addon provide a bl_idname for short cut to assign to, make it possible to bind to shortcut.
If anyone here and want this to be a valid addon, go for the github page and download it. It will be put under testing addon.

Hi , thank you , this is amazing, and interesting.
its a script to "run" any script i left open in the script editor!
following your post as guide i finally get myself a shortcut to a custom menu.
Right now i understand that i made the script , become an addon.
that now is registered in blender at start-up,
and inside the addon i defined some, class or operators?
and now from the keymap i can add a key to call any operator registered so mine too.
i am confused about, Class & operators,
make an addon for menu or moving-vertex or duplicate
works in the same way?

Roughly the same. Operator is different from menu(Panel). But the whole process should be similar. And worth to note is that from 2.90, you can't search(F3) your addon if it is not registered in any panel. It need to at least append to some menu that search engine can filter it out.


text:
How to execute my operator (wikibooks.org 2020)?
I am trying to learn python for blender,
following this and many other things online.
https://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Advanced_Tutorials/Python_Scripting/Addon_Anatomy
I open the scripting editor, copy and paste the "complete script"
And run the script.
The script dont give me any error,
but i cant find it in the search menu operator.
What am i missing?

If you want working examples of python scripts, you can always dig into the templates (next to Format on the top of the text editor). For example the Simple operator presents a minimum working example of an operator. From there you can expand bit by bit until your own operator works.

Can you run the operator from the console, like this? bpy.ops.mesh.make_tetrahedron('INVOKE_DEFAULT')

Yes i cant find in the "Search menu" neither the template of simple operator.
I close and restart blender for not overlap the two operator registration.
No i cant run the operator with bpy.ops.mesh....

And like this? https://gist.github.com/unwave/c65e1b59b5833251ee87805bcc6e9bc4

Yes this script make return the output true to the console, so the operator is in blender.
Joonas resolved the problem, there is a checkbox to be able to find extra-script!!!

This site is no regular forum so please don't add "solved" to the title, just accept one of the answers instead... Thanks.

bpy.ops.mesh.make_tetrahedron('INVOKE_DEFAULT') should have worked regardless.

The code works just as it is supposed to work. You just need to enable Operator Search to use it. You need to select Edit -> Preferences. Under Interface check Developer Extras checkbox.

Now you can find Operator Search from Edit drop down menu.

Search Add Tetrahedron

Errors
You can select Window -> Toggle System Console to see the errors your code gives.

hi, thanks , i got no error at all, no red flag , no console errors, i added a screenshot in my post

Hi, the line 26 already start with the # so its a comment and irrilevant , right?
i removed the whole line , just in case, but i still cant find the operator in the search...
Any suggestion on where learn this things for the new blender 2:90?
its really hard find guides that works

@Est Silly me. I should have read the code info first before assuming too much. Sorry about that. I edited the answer and it should work as it's supposed to work.

oooooooooooooooooo thankyou
that little check!,omg.. every time so much time wasted.
thank you man, none of the guide ever said nothing about that little check.
Now i can find it in the search. Thankyou very much


text:
Break node connections from within Property Editor?
To create a node and connect it to a Property, I can click on the color-coded dot next to the Property name. This launches a pop-up menu of permitted input nodes for that data type.
So how do I BREAK a connection from the Property Editor? I know I can go into the Node Editor and break the connection there. But I should be able to just break the connection directly in the Property Editor, restoring that Property to its default status and UI.
In Maya, I can do this by right-clicking the attribute name and choosing "Break Connection". But for the life of me, I can't figure out how to do this in Blender. The documentation wasn't helpful, I searched and searched and couldn't find anywhere this magic colored dot was even mentioned. I wasted a great deal of time trying to find it.

Sure. Click the linked shader property and select Disconnect from the list in order to break the connection. You can also select Remove if you'd like to get rid of the linked node:

Thanks, I found that, but it's not consistently in all pop-up menus. It's missing sometimes.

ARGH!!! The pop-up menu is limited to the size of the window!!! Items are being cut off!! Serves me right for having the Property Editor in another window so I can maximize viewports. ARGHHHHH

Even if, that's exactly what you wanted. If the menu is cut off, file a bug report. I can not confirm for linux and osx @AaronF.Ross

I will file a bug report. I hope they don't tell me I need to test it on the beta version, I'm already in too many beta program. Thanks

Good news is that they are going to reply, quickly. Last time I filed a bug report for Maya I didn't get any answer @AaronF.Ross I would recommend do yourself a favour and take Blender or Maya as (buggy) as they are and don't try to compare each other, you are wasting your time IMHO.


text:
Hole in cylinder Topology
I'm attempting to cut a neat hole in a cylinder using minimal topology. I've used an octagon for both the cylinder and the hole. On applying the subdivision surface modifier, the region near the hole curves out a bit intersecting with parts of other objects which isn't supposed to happen with a perfect cylindrical surface. How may I correct it?

maybe try this method: https://blender.stackexchange.com/questions/194716/how-to-get-rid-of-this-poles/194719#194719 ... it consists on using another cylinder as target of a shrinkwrap, it allows you to correct the shape of your cylinder. If it still doesn't work, please share your file

@moonboots Thanks! Yes that would work. But the required levels of subdivision has to be applied prior. Bending a fully subdivided plane would be another method which I actually did. But obviously has the same requirement as the former.

Does this answer your question? Cutting a circular hole in a hollow cylinder without distorting the cylinder

When you create a low poly cylinder and then add a subsurf it creates a high poly cylinder but with a smaller diameter because the surface will be inscribed into the low poly cylinder's volume.
You have to push inside a bit the loop of your hole:


text:
Image overlaping image in Shader
The attached screenshot shows a whirlwind effect appearing behind the moon. I want it appearing in front of the moon.  How do I adjust a certain image to overlap another image in Shader ?   I want it appearing in front of the moon. Is it a case of a hierarchy adjustment in the Scene Collection window ?

please provide blend file

Here is a link: https://www.mediafire.com/file/3livuvlnff9ztm5/Test.blend/file   But I also noticed Blender saved another (same) file at the same time ... not sure why .... here it is: https://www.mediafire.com/file/pvnva9qib5l3x06/Test.blend1/file

By the way, just a another quick question:  You will see in the blender file another moon (left one) ... I intentionally decided to drag and drop that moon png file from a pc folder into the blender scene. I noticed that when I select that moon and try to work on it in Shader, I can't add any nodes at all. I tried converting it to mesh but still no Shader nodes available to select. Do you have to do something with those images when you drag and drop them into Blender before you can then add nodes in shader to work on them ?

please use "file"->"external data"->"pack all into blendfile", then save your blend file and upload again. thank you.

ok here are the links after having done what you instructed me to do: https://www.mediafire.com/file/3wi56znjqoy04qt/Test.blend/file and https://www.mediafire.com/file/dsuyd10eyv97scq/Test.blend1/file   Still not sure why the are 2 files produced by blender.

so you want the beach as background, the moon before that and the whirlwind before all?

@Steb please use the [edit] button below your question to add any new information (files, ect) This is not like a forum where information collects below the original post. Please read the [tour] to learn more about the site and how to best benefit from it.

@Chris,  correct

@Timaroberts, in future I will use that edit button when adding extra images or additional information that I left out in the original comment. I assume though message replies to people can simply be added using the Add Comment button.

i assume you want:
the beach as background, the moon before that and the whirlwind before all.
So you have to make one image for each object. Your "whirlwind" and the beach are one object in your file. So you cannot have it before and behind the moon.

Yes, the whirlwind in front and behind it would be the moon and behind the moon is the background wallpaper of beach. I have now re-done the scene and each of the 3 objects have their own respective images assigned (see scene collection box). When you say that the whirlwind and beach are tied in as one object... is it because of this (circled issue): https://i2.paste.pics/79ddec9433752ddc9928955b2e2be978.png    If so, when I remove the beach image in that node setup, then I have an issue with the green screen removal: https://i2.paste.pics/13ef470e48966e87a2e011ea704f9160.png

Any ideas how to also fix the lack of the green screen removal as well as placing those objects in order of visibility mentioned earlier.


text:
Unable to use API to call bpy.ops.render.opengl()
Ubuntu 18.04 with Blender 2.79
The goal is to load a 3D Model into Blender and create/save a .PNG file.
Here is my script:
def preprocess(file):

    # remove mesh Cube
    if "Cube" in bpy.data.meshes:
        mesh = bpy.data.meshes["Cube"]
        print("removing mesh", mesh)
        bpy.data.meshes.remove(mesh)

    # import the 3D object
    imported_object = bpy.ops.import_scene.obj(filepath=file)

    # change the view to make certain the entire 3D object is viewable
    for area in bpy.context.screen.areas:
        if area.type == 'VIEW_3D':
            for region in area.regions:
                if region.type == 'WINDOW':
                    override = {'area': area, 'region': region}
                    bpy.ops.view3d.view_all(override)

    # Deselect all so selection highlights are not passed to .png
    bpy.ops.object.select_all(action='TOGGLE')

    bpy.ops.render.opengl()

    bpy.data.images['Render Result'].save_render(filepath="scripted.png")

This script works until I get to the line:
bpy.ops.render.opengl()

This line appears to have no effect whatsoever.
When I am run the above command from the console manually by going to the Render -> OpenGL Render Image menu, Blender renders the object as expected and the console view is updated with a 'Render Result' view.
From what I have learned about the API, some commands must be executed within a certain context.  It seems like I need to let the script know which viewport is the active viewport, but this is purely speculation on my part.
Any advice on how to render this 3D object via script would be appreciated.

The operator works correctly and will render your image. However with the default arguments it won't switch to the UV/Image Editor. If you intend to replicate the behavior of Render > OpenGL Render Image then you will have to change the execution context. In general buttons in the user interface use 'INVOKE_DEFAULT' as execution context.
bpy.ops.render.opengl('INVOKE_DEFAULT')

Additionally you can use the write_still=True argument to save the file. It will write the file to the path specified in bpy.context.scene.render.filepath. The last line in your script could then be removed.

Thank you for this answer.  In addition, I learned the rendered image is based on the Camera view.  My object was not in view of the Camera and I kept getting images of just the background color.

@learningtofly The actual final render (Cycles, Eevee, BI) with bpy.ops.render.render() is from the camera's perspective, bpy.ops.render.opengl() should match your view from the 3D viewport. If my answer solved your problem, please consider marking it as accepted by clicking on the checkmark.

Checked!  Apologies for the oversight.  Thanks again for the answer.


text:
place bone-armature given selection of faces/vertices/edges for cursor
I am trying to place a bone in an exact position on my 3d model. I need to use other geometries as references such that the desired position of the bone can be inferred from the selection of vertices/edges/faces. I have been trying to follow these 2 other answers to move the base of my bone.
Change pivot or local origin of an object
Move cursor to center of some selected geometry/faces
My issue is that I have to "Enter Edit mode" and then select the desired vertices/edges/faces, but they do not specify which object needs to be in edit mode, the bone or the object(s) with the reference geometry. Also, I find that the only way to see all of the geometry at once is in wire-frame mode, but then I am unable to select the faces. In short, I do not know how to apply the answers above in the context of my question.
The bone seen below needs to have its base placed such that it is in the middle of the block model (around where the green Y-Axis is) and the Z-X plane (Blue-red arrow plane, only red line can be seen) location should be coincident with the hole for the lever. If looking along the green axis (centered) at the big block, the base of the bone would be right in the middle of the block. If looking directly into the hole, the bone base would be centered on the center of the hole. Does this make sense?
(Ignore the holes on top of the big block. Only looking at the hole near the lever/leg peg)

If you are selecting a face / edge / vert  then the mesh will need to be in edit mode. eg select a face, shift-S cursor to selected, moves cursor to face.  Exit edit mode of mesh, go into edit mode of armature select bone and shift-S snap selection to cursor.  (the snap options are pretty intuitive)

well, it appears that was the trick to get the base of the bone placed where I expected it to be. I just tried this, and it turns out that, for using multiple meshes, you simply go to object mode, shift select the objects, then click edit mode, then follow the process as described by @batFINGER I will consider this answered, even though an answer was not entered.

The user @batFINGER solved my problem:
"If you are selecting a face / edge / vert then the mesh will need to be in edit mode. eg select a face, shift-S cursor to selected, moves cursor to face. Exit edit mode of mesh, go into edit mode of armature select bone and shift-S snap selection to cursor. (the snap options are pretty intuitive)"
There are special selection tools available when you use the Shift-S hotkey that enable the fine-comb control required to move the 3d cursor to place objects.


text:
How can I turn nodes that made in shader editor to script?
I want to make a button and when I press it, it will apply the material I made, that mean the nodes.
I try different way to type script but it wasn't work.
bpy.ops.node.add_node(type="ShaderNodeTexNoise")

What's wrong with this code?

Related https://blender.stackexchange.com/questions/5668/add-nodes-to-material-with-python  My recommendation is to test things out in the the python console.   https://blender.stackexchange.com/questions/160042/principled-bsdf-via-python-api

https://blender.stackexchange.com/questions/200547/how-to-add-node-in-the-center-of-the-shader-editor-with-python

Adding nodes to a material is best done using low-level functions. I'd suggest use Nodes.new() instead of bpy.ops.node.add_node(). The add_node() operator is more for direct user interaction, and requires the correct context to run.
How to create a new node via material data-block, assuming a material name of "Material":
bpy.data.materials["Material"].node_tree.nodes.new("ShaderNodeTexNoise")

Better practice is using pythons get() method to basically perform a search for the material in the first place and (avoids potential index errors):
import bpy

mat = bpy.data.materials.get("Material")
if mat:
    mat.node_tree.nodes.new("ShaderNodeTexNoise")

Related:

Control Cycles material nodes and material properties in Python
How to assign a new material to an object in the scene from Python?

Disagree on "best done via bpy.data", depends on the situation, you can also get the node tree reference from the editor or any object. Recommend use get() on the material data block (to avoid our famous index error) and ideally use the active object and its active material in context: bpy.context.object.active_material.node_tree.nodes.new("ShaderNodeTexNoise"), can be easily incorporated into an operator as well (might be part of the question, not sure).

Re the question.. an option would be to  add a panel to node editor and put  operator button there, where there is context.active_node etc ....  suggest requesting  clarity re what the OP means by apply the node to material   linked and settings too?  @brockmann can you recall a node to script addon?

I mean turning nodes to script. I don't mean to use it in shader editor. I would like to add a button that apply the nodes when I press it

@BNFilms edit your question to clarify.  Including where you want the button.  It really is not clear from question in its current form.

If I understand correctly you want to turn your material into its equivalent python nodes. Arguably this is a bit too involved for a single SE question because there are a lot of use cases. Thankfully I tackled this some months ago for a personal project so I can share what I worked on.
You'll need to learn how to use a script.
How to use :
Select your object, select the material you want to copy, run the script. The material code will be added in a new text block.

"""
This scripts "serializes" the active material of the currently selected object
And creates a script readable by the Blender API to recreate said Material.
As any Blender script, it is free to use in any way shape or form.
V 1.1 - 20.10.23
Fixed NodeSocketVirtual error
"""

import bpy

from bpy.types import (
    NodeSocketShader,
    NodeSocketVirtual,
    NodeSocketVector,
    NodeSocketVectorDirection,
    NodeSocketVectorXYZ,
    NodeSocketVectorTranslation,
    NodeSocketVectorEuler,
    NodeSocketColor,

    NodeReroute,

    Object,
    Image,
    ImageUser,
    Text,
    ParticleSystem,
    CurveMapping,
    ColorRamp,

    ShaderNodeTree,
)

from mathutils import Vector, Color

ERROR = "~ ERROR ~"

def get_link_statement(link):
    """
    Build the statement to re-create given link
    """
    return f"""\
links.new({link.from_node.path_from_id()}.outputs[{get_socket_index(link.from_socket)}]\
, {link.to_node.path_from_id()}.inputs[{get_socket_index(link.to_socket)}])\
    """

def value_from_socket(socket):
    """
    Returns the evaluated value of a node socket's default value
    """
    # A Shader socket (green dot) doesn't have a default value :
    if isinstance(socket, (NodeSocketShader, NodeSocketVirtual)):
        return ERROR
    elif isinstance(socket, (
            NodeSocketVector,
            NodeSocketVectorXYZ,
            NodeSocketVectorTranslation,
            NodeSocketVectorEuler,
            NodeSocketVectorDirection)):
        return f"{[socket.default_value[i] for i in range(3)]}"
    elif isinstance(socket, NodeSocketColor):
        return f"{[socket.default_value[i] for i in range(4)]}"
    else:
        return socket.default_value.__str__()

class NodeCreator:
    """
    Helper class to programmatically recreate the passed node
    """
    # These props are internal or read-only
    # and aren't useful in the serialization.
    default_props = (
        "dimensions",
        "draw_buttons",
        "draw_buttons_ext",
        "input_template",
        "inputs",
        "internal_links",
        "isAnimationNode",
        "is_registered_node_type",
        "output_template",
        "outputs",
        "poll",
        "poll_instance",
        "rna_type",
        "socket_value_update",
        "type",
        "update",
        "viewLocation",

        "texture_mapping",
        "color_mapping",

        "filepath",

        "cache_point_density",
        "calc_point_density",
        "calc_point_density_minmax",

        "interface",

        "height",
        "show_options",
        "show_preview",
        "show_texture",
        "width_hidden",
    )

    def __init__(self, node):
        """
        Initialize the node inputs and outputs,
        and the different fields' default values
        """
        self.node = node
        self.input_default_values = []
        self.output_default_values = []
        if not isinstance(node, NodeReroute):
            for _input in node.inputs:
                self.input_default_values.append(value_from_socket(_input))
            for output in node.outputs:
                self.output_default_values.append(value_from_socket(output))

        self.type = type(node).__name__
        self.properties = []  # Could use an ordered dict instead.
        for prop_name in dir(node):
            if prop_name.startswith("_") or prop_name.startswith("bl_"):
                continue
            if prop_name in NodeCreator.default_props:
                continue
            self.properties.append((prop_name, getattr(node, prop_name)))

    def statements(self):
        """
        Build the chain of statements to programmatically recreate the node
        """
        statements = []
        statements.append(f"new_node = nodes.new(type='{self.type}')")
        self.properties = sorted(self.properties, key=lambda p: p[0])
        for props_tuple in self.properties:
            prop, value = props_tuple
            if isinstance(value, ImageUser):
                statements.append(f"""\
img_text = new_node.{prop}
img_text.frame_current = {value.frame_current}
img_text.frame_duration = {value.frame_duration}
img_text.frame_offset = {value.frame_offset}
img_text.frame_start = {value.frame_start}
img_text.use_auto_refresh = {value.use_auto_refresh}
img_text.use_cyclic = {value.use_cyclic}
img_text.tile = {value.tile}\
                """)
                continue
            if isinstance(value, ParticleSystem):
                # /!\ Make sure this is executed after node.object statement
                statements.append(f"""\
if new_node.object:
    new_node.{prop} = new_node.object.particle_systems.get('{value.name}')
                """)
                continue
            if isinstance(value, CurveMapping):
                statements.append(f"""\
map = new_node.{prop}
map.clip_max_x = {value.clip_max_x}
map.clip_max_y = {value.clip_max_y}
map.clip_min_x = {value.clip_min_x}
map.clip_min_y = {value.clip_min_y}
map.tone = '{value.tone}'
map.use_clip = {value.use_clip}\
                """)
                # Remove the 2 starting default points and only these :
                for i, curve in enumerate(value.curves):
                    statements.append(f"map_c = map.curves[{i}]")
                    for point in curve.points:
                        statements.append(f"""\
map_c.points.new({point.location[0]}, {point.location[1]})""")
                    statements.append("""\
removed_start = removed_end = False
for i in range(len(map_c.points) - 1, -1, -1):
    p = map_c.points[i]
    if not removed_start and p.location[0] == map.clip_min_x and p.location[1] == map.clip_min_y:
        map_c.points.remove(p)
        removed_start = True
    if not removed_end and p.location[0] == 1 and p.location[1] == 1:
        map_c.points.remove(p)
        removed_end = True\
                    """)
                statements.append(f"map.update()")
                continue
            if isinstance(value, ColorRamp):
                statements.append(f"""\
cr = new_node.{prop}
cr.color_mode = '{value.color_mode}'
cr.hue_interpolation = '{value.hue_interpolation}'
cr.interpolation = '{value.interpolation}'\
                """)
                for stop in value.elements:
                    statements.append(f"""new_stop = cr.elements.new({stop.position})
new_stop.color = {[ch for ch in stop.color]}""")
                # Remove the 2 starting default stops and only these :
                statements.append("""\
removed_black = removed_white = False
for i in range(len(cr.elements) - 1, -1, -1):
    stop = cr.elements[i]
    if not removed_black and stop.position == 0 and all([stop.color[i] == (0, 0, 0, 1)[i] for i in range(4)]):
        cr.elements.remove(stop)
        removed_black = True
    if not removed_white and stop.position == 1 and all([stop.color[i] == (1, 1, 1, 1)[i] for i in range(4)]):
        cr.elements.remove(stop)
        removed_white = True\
                """)
                continue
            if isinstance(value, ShaderNodeTree):
                statements.append(f"""\
ng = bpy.data.node_groups.get('{value.name}')
if not ng:
    new_node.label = \"Missing Node Group : '{value.name}'\"
else:
    new_node.{prop} = ng\
                """)
                continue

            if prop in ("hide", "mute", "use_custom_color"):
                if value:
                    statements.append(f"new_node.{prop} = {value}")
            elif prop == "text" and not value:
                continue
            elif prop in ("select", "shrink"):
                if not value:
                    statements.append(f"new_node.{prop} = {value}")
            elif isinstance(value, str):
                if value:
                    statements.append(f"new_node.{prop} = '{value}'")
            elif isinstance(value, Vector):
                if len(value) == 2:
                    statements.append(
                        f"new_node.{prop} = ({value[0]}, {value[1]})")
                else:
                    statements.append(
                        f"new_node.{prop} = ({value[0]}, {value[1]}, {value[2]})")
            elif isinstance(value, Object):
                statements.append(
                    f"new_node.{prop} = bpy.data.objects.get('{value.name}')")
            elif isinstance(value, Image):
                statements.append(
                    f"new_node.{prop} = bpy.data.images.get('{value.name}')")
            elif isinstance(value, Text):
                if value:
                    statements.append(
                        f"new_node.{prop} = bpy.data.texts.get('{value.name}')")
            elif prop == "parent":
                if value:
                    statements.append(f"""\
parent = nodes.get('{value.name}')
if parent:
    new_node.parent = parent
    while True:
        new_node.location += parent.location
        if parent.parent:
            parent = parent.parent
        else:
            break\
                    """)
            elif isinstance(value, Color):
                statements.append(
                    f"new_node.{prop} = ({value[0]}, {value[1]}, {value[2]})")
            else:
                statements.append(f"new_node.{prop} = {value}")
        for i, dv in enumerate(self.input_default_values):
            if dv == ERROR:
                continue
            statements.append(f"new_node.inputs[{i}].default_value = {dv}")

        for i, dv in enumerate(self.output_default_values):
            if dv == ERROR:
                continue
            statements.append(f"new_node.outputs[{i}].default_value = {dv}")

        if not isinstance(self.node, NodeReroute):
            for _input in self.node.inputs:
                if _input.hide:
                    statements.append(
                        f"new_node.inputs[{get_socket_index(_input)}].hide = True")
            for output in self.node.outputs:
                if output.hide:
                    statements.append(
                        f"new_node.outputs[{get_socket_index(output)}].hide = True")
#        DEBUG Print node location as a label :
#        statements.append("new_node.label = str(new_node.location[0]).split('.')[0] + ', ' + str(new_node.location[1]).split('.')[0]")

        return statements

def serialize_material(mat):
    """
    Returns the ordered statements necessary to build the
    Mateiral generation script
    """
    node_tree = mat.node_tree
    statements = [f"""\
import bpy
new_mat = bpy.data.materials.get('{mat.name}')
if not new_mat:
    new_mat = bpy.data.materials.new('{mat.name}')

new_mat.use_nodes = True
node_tree = new_mat.node_tree
nodes = node_tree.nodes
nodes.clear()

links = node_tree.links
links.clear()
    """]

    statements.append("# Nodes :\n")
    for node in node_tree.nodes:
        for st in NodeCreator(node).statements():
            statements.append(st)
        statements.append("")

    if node_tree.links:
        statements.append("# Links :\n")
        for link in node_tree.links:
            statements.append(get_link_statement(link))

    return statements

def write_material_to_text_block(obj):
    """
    Create or overwrite a text block with the same name as the material
    Which contains all the necessary statements to duplicate the material
    """
    if not obj or obj.type not in ('MESH', 'CURVE', 'VOLUME', 'SURFACE', 'FONT', 'META', 'GPENCIL'):
        return
    am = obj.active_material
    if not am or not am.use_nodes:
        return
    statements = serialize_material(am)

    text_block = bpy.data.texts.get(am.name)
    if text_block:
        text_block.clear()
    else:
        text_block = bpy.data.texts.new(am.name)

    for st in statements:
        text_block.write(st)
        text_block.write("\n")

    return text_block

def get_socket_index(socket):
    return socket.path_from_id().split(".")[-1].split("[")[-1][:-1]

if __name__ == "__main__":
    text_block = write_material_to_text_block(bpy.context.active_object)

The code is available there for grabbing
https://github.com/Gorgious56/Material2Script/blob/main/material_to_script.py

@brockmann Yeah figured I'd spend 5 minutes writing the answer rather than 10 mins trying to figure out the actual question :)

I can feel your fortune-telling skills.

@Gorgious very cool script. Coded something similar a few yrs back, as usual started neat, got spaghettified  and back-burnered. Pinching this instead.

@batFINGER Well a fair number of your answers helped me in the process so it's only fair ^^ thanks :) I'm thinking of updating it, a few nodes have been tweaked/added since (vectore rotate and attribute come to mind)

Finally UV'd, seems the OP is not willing to edit the q.

Hard to put a finger on the "mind-reader  factor.  eg  OP knows what they want and so should we, no edits required. @Gorgious thanks, consider asking a new Q re converting nodes to script. Given the accepted answer could prob re-title this one and shut it down as dupe.

Asked a new question @Gorgious, feel free to edit it and copy and paste your answer.


text:
Text to mesh > remesh not giving smooth enough results
I have followed every tutorial regarding text to mesh conversion and the topology cleanup but no matter what i try (remesh with smooth, solidify, shade smooth)
If i leave the bad topology, the mesh is smoothed very nicely:

Then I do the remesh, but no matter what values i try, it always looks as if the general shape didnt get translated smoothly:

Even if i turn on smooth shading and do the right click and go shade smooth, it still looks edgy

even though the mesh is quite dense:

No tutorial could help me fix this issue, all of them show the same procedure, is there a step in between I can add to fix this?
My goal is to turn and twist the mesh smoothly, so a dense mesh is not the problem for me, the non-smooth translation however is..
Anyone who can help?
EDIT Blend File:Text to Mesh Blender file
Appreciate your time!
Sincerely
Oz

Okay so I almost got it!
this time I did the following:

Remove all effects from the text (all bevel and extrudes).
convert to mesh.
add decimate modifier and select planar -apply it.
add another decimate this time select collapse and reduce just so u have the amount of letters in the face count e.g. if your word has 4 letters u want to end up with a face count of 4. this ensures that your have clean outlines for each letter.
go do edit mode, select all and extrude, make them as thick as you want.
while in edit mode, click on mesh > normals > recalculate outside.
Usually you only have to shade smooth now and it should look smooth but that where i am confused why the shading is still so weird.

I wanted to use this as a new starting point since this ensures the cleanest amount of faces to work with.
Any Ideas?

maybe you've subdivided without smoothing, which has the opposite effect, it tends to flatten the shape. If you don't have a lower topology version, maybe try to simplify this one with X > Limited Dissolve? If it still doesn't work maybe share your file? https://pasteall.org/blend/

Hey moon, can u please tell me the steps in order? first text to mesh right? then limited dissolve?

Yes you can convert to mesh, you should not end up with such a dense topology, maybe share your file once you've converted to mesh?

you can either extrude and bevel your text (as text) or convert to mesh then extrude

please provide blend file

I have added the Blend file at the bottom. Thanks!!

Have a script that does something similar to your new edit.  Select and dissolve non boundary edges.  The face count will depend on how many holes are in character. can an 8 be made with one ngon face?

@batFINGER hope this helps, friend - https://blender.stackexchange.com/a/211249/110840

Thanks Al, was rhetorical for OP to ponder. 8*)

Use only bevel with very low amount, for example 0.003. Limit Method is set to Angle. For more precision use limit method "Weight", select edges and change weight for the selected. The weights are in properties shelf / Item / transform /edges data / mean bevel weight. To see it you have to be in editmode.


text:
How to achieve dynamic lightning for day/night earth planet
I cant get dynamic lightning. I have used drivers to set up this, however, once I add the night texture it still shows on parts that I have lights. Here is my node setup:

I have been following Blender Guru's tutorial on the earth planet up until the point where he makes static maps for day/night (https://www.youtube.com/watch?v=9Q8PwcDzb8Y - min. 29:00) and then used this tutorial (https://www.youtube.com/watch?v=Hvx4pYGK0a0)  to create dynamic.

How to upload an image to a post


text:
Problem with playAction()
hey i want to play more than one action one after one according to user preferred action. I mean, if user wants to play ‘run’ and ‘jump’ actions, then it should play first ‘run’ action then after that should play ‘jump’ action.
I used a for loop to play actions, but it only plays one action only. I also tried changing the start and end time of actions but not work.
Here is my code:
cont = bge.logic.getCurrentController()
main_arm = cont.owner
layer = 0
priority = 0
blendin = 3
mode = 0
layerWeight = 0.0
ipoFlags = 0
speed = 0.08
end = 0
count = 3 #no.of words that user input, suppose that he
#entered 3 words that mean I should play 3 actions

for j in range(0, count):
    if main_arm.isPlayingAction(0) == False:
        data = actions[j] #actions is some kind of array which contains the
        #action, start and end time of which user preferred actions. There are 3
        #actions which user want to play
        action = data[0] #taking the action
        start = data[1] + end #taking the start time of above action, when loop is active, it
        #adds previous action's end time to get the current start time
        end = data[2] + start #taking the end time of above action, when loop is active, it
        #adds previous action's start time to get the current end time
        print("action played " + action)
        main_arm.playAction(action, start, end, layer, priority, blendin, mode, layerWeight, ipoFlags, speed)

HOPE YOU CAN HELP


text:
I Cannot make GIS Blender 2.82 Addon for Windows work
I am not sure what I did wrong during the process of installing the GIS add-on, but for some reason even after unchecking and rechecking its checkbox in Preferences, there is still no sign of any sort of GIS option in Blender. Not even if I searched it in the "Operator Search".
Also, is the GIS add-on able to work with both Cycles and Eevee? I tried switching between the two, but nothing happened. If you have any suggestions for what I could do to fix this issue, please let me know.

Are you sure that you've downloaded the correct .zip file, see this answer.

I downloaded the correct .zip file, but not until now I did not know all of the steps for how to actually install an add-on. After downloading the .zip file, I just had to hit Install in Preferences, then select the .zip file.


text:
glb import error
I am trying to import a glb file exported from 3ds max using verge3d but getting a list of errors.
Will appreciate any direction to solve this.
Thanks!
Errors:
Traceback (most recent call last):
  File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\addons\io_scene_gltf2\__init__.py", line 758, in execute
    return self.import_gltf2(context)
  File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\addons\io_scene_gltf2\__init__.py", line 779, in import_gltf2
    BlenderGlTF.create(self.gltf_importer)
  File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_gltf.py", line 41, in create
    BlenderScene.create(gltf, scene_idx)
  File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_scene.py", line 80, in create
    BlenderNode.create(gltf, node_idx, None)  # None => No parent
  File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_node.py", line 169, in create
    BlenderNode.create(gltf, child_idx, node_idx)
  File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_node.py", line 63, in create
    mesh = BlenderMesh.create(gltf, pynode.mesh, node_idx, parent)
  File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_mesh.py", line 58, in create
    BlenderMaterial.create(gltf, prim.material, vertex_color)
  File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_material.py", line 89, in create
    BlenderEmissiveMap.create(gltf, material_idx, vertex_color, factor_only=True)
  File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_map_emissive.py", line 31, in create
    BlenderEmissiveMap.create_nodetree(gltf, material_idx, vertex_color, factor_only)
  File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\addons\io_scene_gltf2\blender\imp\gltf2_blender_map_emissive.py", line 49, in create_nodetree
    principled = get_preoutput_node_output(node_tree)
  File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\addons\io_scene_gltf2\blender\com\gltf2_blender_material_helpers.py", line 40, in get_preoutput_node_output
    output_node = get_output_node(node_tree)
  File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\addons\io_scene_gltf2\blender\com\gltf2_blender_material_helpers.py", line 18, in get_output_node
    output = [node for node in node_tree.nodes if node.type == 'OUTPUT_MATERIAL'][0]
AttributeError: 'NoneType' object has no attribute 'nodes'

location: <unknown location>:-1

Looks like the importer add-on crashes due to some incompatibility with Verge3D-exported asset. You might want to file a bug report on the addon's GitHub page:
https://github.com/KhronosGroup/glTF-Blender-IO/issues


text:
where is the movie clip node on blender 2.83?
I'm on blender 2.83 and I would like to apply a shader nodes scheme to a movie clip,instead to the single frames,but it seems that it isn't where it should be. At least,according with the tutorial that I'm following,this one :
https://www.youtube.com/watch?v=_pPGR3d9WWc
Below you can see clearly that I don't have that node anymore.

You are in the wrong node editor at the moment. The Movie Clip node is a compositing node, and is found in in the compositor.
Refer to the image below:

Currently, you are in the shader editor. So, just switch editors and you will find the node you are looking for.

To use a movie clip as texture in a material use an Image Texture node.
Select the video as source.


text:
Armature Missing
Was rigging my model and suddenly the armature disappeared.
Don't remember using weird shortcuts apart from Ctrl+Tab to enter/exit pose mode.
In the outliner it actually shows up as 'active' and 'visible' but cannot see it.
I'm using blender 2.82 The project does not come from older versions, it was created in this one. Already tried Alt+H
Found this: Armature Disappeared
but it doesn't work for me.

Turns out I was in isolate mode all the time.


text:
How To Cut A Sine Shape On A Cylinder
Trying drawing a sinelike shape on a cylinder
I am trying to draw the picture below. I tried using boolean modifier on the cylinder but, I couldn't create an object that would like on the picture below.
Any tips on how I can remove a shape from my cylinder that looks like on the picture below?

Hello :). Not an answer, but you can download the STEP files (in the video description) and import them to Blender. Import STEP file to Blender

I assume you are having trouble with that curve. One way to create it would be to use edge loops and proportional editing. You want to make sure your cylinder has a slightly higher resolution, so the curve will be relatively smooth.

Go into edit mode and add an edge loop in the middle of your cylinder.
Select it with alt + your selection mouse button and search for checker deselect (my search button is F3). A new tab will appear, which lets you specify the offset etc. You want to only select the tips of your future curve.
Now, enable proportional editing by pressing O and hit G to move the vertices. You can adjust the editing radius with your mouse wheel and move the vertices forward until you have something that looks like half of a sinus curve.
Repeat these steps with the other half.
Now, create another edge loop underneath that looks the same by pressing ctrl + R and then E. Go into face select mode and select the curve with alt + selection button.
Extrude it and scale it inwards while locking the x-axis by pressing shift + X while scaling.

One way to do it is with curves converted to mesh, and then Boolean.

Go to Preferences > Add-on. Search for "extra" and check the box next to Add Curve: Extra Objects to activate this add-on. Also search for "loop" and check the box next to Mesh: LoopTools to activate this add-on.

Go to the 3D Viewport and press Shift + a and choose Circle (not the one under Bezier, but the one under Arc)

Open the menu at the bottom left corner (or press F6) and set the value of Sides to 12, and the value of Radius to 1.2 m. Have the buttons underneath set to: 3D, Bezier, Vector. And have the boxes next to "Cyclic" and "Show in edit mode" checked.

Select every other vertex (or control point) and move them 0.4 m in a direction perpendicular to the circle (z-axis).

Press Ctrl + I to select the other vertices. Press V to Set Handle Type and choose Vector.

Press Ctrl + I again to select the first set of vertices, and move them another 0.4 m in a direction perpendicular to the circle (z-axis). A total of 0.8 m.

Then copy and flip the curve. Press A and then Shift + D, and then Esc. Then press S, Z, -, 1, Enter.

Move the the duplicated curve 0.2 (or maybe 0.3 m) in a direction perpendicular to the circle (z-axis). And rotate it 30 degrees around the axis perpendicular to the circle (z-axis).

Then you should have something that looks like this.

Next go to object mode and press Alt + C and choose Mesh from Curve/Meta/Surf/Text. And go back to Edit Mode and press A to select all.

Press N for the N-panel to show if it doesn't already. Click the Edit tab. Extend the LoopTools menu, and extent the Circle menu. Lock the Z-axis by clicking the lock+Z icon and press Circle.

Then press Ctrl + E and choose Bridge Edge Loops. Press Alt + E and choose Extrude Faces Along Normals. Press for instance -.3Enter.

Add a Mesh > Cylinder, change the vertices value to 128, put a Boolean modifier on it and choose the Object named Circle as a target for the modifier.

Hide the Circle object and you're left with something like this.

(Image disclaimer: Boolen modifier applied, Smooth shaded, and Edge split modifier added)
You probably wont do exactly this but there probably is something in this method you can use : )


text:
Workflow: Baking Before Texturing?
I have a very basic question regarding character workflow.
First I sculpted a character, then I did the retopo. Now I'm wondering, should I bake (highres to lowres) before the texturing process or after. If it doesn't matter what's the best way?

I'm not sure if I understand where you're going with that question. Baking is a part of the texturing process. You bake the details of your hires model to a normal map. It also depends what type of model we're talking about and what materials you are going to use. At this point your question is too general to receive a detailed answer. Feel free to edit it and put more information in.

ok what I meant when saying texturing was painting in texture paint mode. But i guess my confusion was created by the lack of knowledge I have of baking.


text:
Replacement For "Centers Polygons" Node In Blender Sverchok?
I keep getting asked for "Centers polygon" node in various Blender / Sverchok tutorials but I cannot find one.  Nor is there anything online that points me in the direction of it's replacement.
Can anyone tell me what node I am looking for?

has this question been edited by someone not me?

Section analyzers has two nodes for this feature. Both have benefits, one output matrices, other has median calculation and bounds center and median weighted also.

cheers dude. i found this out yesterday but forgot i'd posted this

this Q have to be in SE with right A for others


text:
How to map a UV sphere with no distortion
I'm trying to make a procedural planet shader, and a major problem I'm having is distortion on spheres. If I use the UV texture coordinates, they always get compressed at the poles and stretched on the equator.

I've tried messing with the UVs, but I always end up with some really obvious seams. I'm also not using a normal image texture setup, so I can't use the spherical texture option. I've also tried using a separate vector node and using the Z axis to change the scale of the texture, but I still can't get it right. Is there a way to UV map a sphere with little to no distortion? Or does anyone know of a node setup that could correct the scaling issue?

Could you describe what kind of shapes you're starting with?

I'm using an image texture of a crater, and randomizing their locations across the mesh. Since the position is randomized, I can't use the spherical projection option.

You could cut the UV sphere UVs in half, horizontally or you could use a Quad sphere https://blender.stackexchange.com/questions/253219/how-to-create-quad-sphere-with-evenly-spaced-edges


text:
I made a Model then linked it and saved it and now I cant unlink it
I made a model and I linked it all Together and saved it all, and now I need to unlink A model from that linked model but I cant. please help

How exactly did you "link it all together"? We need more details and possibly to see your Blend file before we can give you any advice. You can include images in your post by following these instructions and share your Blend file via https://blend-exchange.com/ following the instructions on that page if it isn't too large.

Hi, Thomas, and welcome to BSE. Your terminology is a bit ambiguous here, so this can't be reasonably answered without clarification. @JohnEason has made some good suggestions to fix that.

If by "link" you mean "join" and by "unlink" you mean "separate", you can enter edit mode, select the parts you want to separate, hit p for the separate menu and click selection.

Thank you very Much!

@Thomas Gill If the answer is correct please mark it as so (chick icon)


text:
Noob shading advice. How do I shade like the referenced image?
Noob question here ;)
I need to shade a human figure to look like the referenced image (White and blue-grey).
I would also deed to know if it's better to be done in EVEE or Cycles.
Thanks in advance!

Hi. Please use a title that matches the content of the question. It should be descriptive but succinct, unique and identifying, summarizing the issue so that anyone searching for a similar problem is likely to find it. 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 potential visitors see, answers you get depend heavily on how insightful it is. See What is the problem of asking “How do I do this?"

Looks like rough metal to me.

Fairly simple to achieve. You can make a shader like that using Layer Weight node and its facing output colored with a Color Ramp( Shift  +  A  and search in Shader Editor):

This is a shader that does not react to environment so it really doesn't matter much what engine you use for it. The choice of render engine would probably be dictated by other circumstances.


text:
Putting flat texture on the box
I am creating an architecture model. I have stairs modelled as simple boxes for each step. The single step is multiplied using array modifier and this way I have stairs.
But the question is about texture mapping. I have flat texture and I want to achieve the result that the single step has continuous mapping on each side. When I unwrap it, only single corners are connected. How to do it correctly and in easy way (to do not modify the texture)?

Hello, I would say make sure that the UV seams are correct but maybe show some screenshots?

A step with continuous mapping on each side? It not only depends on correct UVs but also on the texture - some textures cannot be continuous on each side (or you phrased that mistakable). For example, let's say you a simple box and the texture is a simple 45° degree striped pattern. When you want it to be continuous from the top face to the front face this works. From top face to the side face this works too. But then the side face to the front face can never be continuous with a pattern like this. So it would be helpful to know what texture it is and what you mean by continuous on each side.

I think it would greatly help us understand this question precisely, if you could show us a picture of  the unsatisfactory result.


text:
UVW Box mapping modifier (3dsmax) alternative in Blender
in 3dsMax very often I was using UVW Box Mapping modifier. It let me control the scale of the texture on each side of the box, no matter how much I have modified it earlier.
How to achieve it in Blender? I don't care about the corners. I just want to project some box mapping and be able to control texture scale and offset as I did in simple way in 3dsMax.


text:
Mixing scripting and Geometry Nodes
I am learning Geometry Nodes by creating procedural windows blinds.
Thanks to the answers on my previous question I have solved some problems but now I want to get further.
I want create a number of slat composing windows blinds (done).
I want to be able to rotate each slat through single input parameter (done).
Now I want to be able to animate those blinds in the way that slats will go top and down, stacking each other accordingly.
I cannot find any suitable method for that as currently I am creating instances on points based on curve line.
I was thinking about 2 ways:

Using some rigging and making each lower slat a floor for the upper one. This way moving the last slat I shall be able to move all on top of it. But I don't know if it is possible to make such thing in a procedural way on each instance.
Using some Python scripting and maybe avoid creating instances based on mesh line. But on the other hand I would like to use Geometry Nodes. Is it possible to mix Python scripting with Geometry Nodes?

Thanks

Here's one example on how to mix Geonodes + Python: How to create a simulation in Geometry Nodes?

You can use whatever techniques you want including Python or any rigging techniques on geometry created by Geometry nodes, but there is no need for it. You could simply animate properties of geometry nodes with simple keyframe animation:

You could make drivers as well if that works better for you with other rigs you might need, or you could simply control geometry nodes with position of some objects in the scene. It's just a matter of what you need and what's more convenient for you.
It could be something like this as well:

Also "scene time" node passed to a map range (usually with clamping enabled) is an option to control animation.

Keyframe animation has more features, you can use Graph Editor to control interpolation visually and so on so that's why I would not recommend Scene Time node as the first solution, but sure, there are many ways to make it work.

Thank you for the answer, but this exactly the way I did it so far. But it is not what I expect to achieve. I want those slats to behave exactly as in the real life. The Last slat on the bottom shall move and others shall stack on it and start moving up at some point. All the other slats shall preserve their distance to each other until the will not be pushed by the ones on the bottom.

I believe you can do that with geometry nodes as well. I would recommend asking another question about how to achieve that specifically with geometry nodes describing the desired result in detail, maybe providing an example. There are all kinds of blinds... It would help a lot to know the specific desired result.

@user2301299 there are two ways to achieve that, one is a simulation, and I linked above how to do that. Another is to mathematically predict how a blind will be affected by other blinds. For example, you don't need to simulate a ball to know its height after a few bounces - you can use a formula to calculate it immediately. The former takes more time to figure out the workflow and is computationally expensive, the latter is fast but figuring out the mathematical formula can be very hard.

@user2301299 I provided another example in the edited answer that might be closer to what you need. It's not a full solution, because I don't want to dedicate a lot of my time to this without having seen a specific example of what you are after, but it could be a start.

@MartynasŽiemys Thank you very much. This is exactly what I was looking for.


text:
Why can't I get rid of seams when texturing objects?
my objects always have a clear line where the texture ends and begins again.  I have a feeling it's how I'm unwrapping it, but I don't know any other way.  Theres a black seam in the middle of that bullet and also on the other side of the head.  Then the square you can see where the texture ends on the edge's. I painted the bullet so its not an image that I pulled off the internet.  I painted the uv map using photoshop, so it is an image texture but the texture was made for that uv map.  I also added my UV layout there.

its because the texture is probably not meant to be seamless. If it is, and that is happening, and your uv wrapping seems alright, then it probably that you have "Interlopation" in your texture in the "Image Sampling" in the textures tab. Uncheck this, and it might go away.

It's not a problem of UV unwrapping, it's just the material itself. You won't get rid of the seams entirely, though.
As long as you don't use purely procedurally generated materials (that means no image textures are involved), it's next to impossible to create a UV map without visible seams. You would have to straighten the polygons on your UV map so it fills the whole texture map (granted your image texture is tileable).
If you want to use image textures and want to get rid of the seams, you need to "paint them away" in Texture Paint Mode. Use the Clone Brush, clone a similar looking part of the image and paint over the seam to make it less visible.
"Hard" 90 degrees angles like in your cube example are still problematic. You can solve this by using the "Chinese Box unwrap" instead of "Smart UV Project" , which results in less seams. Then start painting over the remaining seams starting with a very small brush.

I used the clone brush to paint the texture and it looks good in "texture mode" but when I render it, it still has seams.

Did you save the texture?

Ah that's what I needed to do.  Thanks a bunch.

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


text:
Why is it creating two vertices in the same spot?
So im new but im going all out and trying to model a pistol and for some reason when im about to start beveling the edges, it messes up because there are two vertices located in the exact same point.  So I have to move one out of the way, then delete one, then create new faces.  Its very frustrating and I cant think of anything im doing wrong.  All I know is that it seems like it might be happening when I do a "loop cut" I think is what is called. (hitting ctrl+R)
edit: Ok now after playing around trying to see what the problem is, it got worse.  I didn't change any settings but now every time I try to move a vertices or an edge it just has multiple copies under it. I'm literally unable to do anything to the model without messing it up now.  Please help

In Blender, sometimes you can create faces or edges without knowing. For example, if you tried to extrude a face, (shortcut E), but then you canceled the operation with escape, you might not notice, but a new face have been created over the one you was selecting, and its now in the same position!. This might be how the problem that you have was started.
One solution might be in the Mesh> Cleanup> Degenerate Dissolve menu found in the 3D view header while in edit mode.


text:
How can I make adjacent object meshes seamless?
I have a character mesh where different parts of the body are separate objects (body, head, mouth) but the vertices line up as if it could be a single mesh.
I am getting shading differences between the meshes and I am wondering how I can fix this? Pictures are below.
It seems like a normals related problem, but the normals are all facing the correct direction. Maybe they are weighted incorrectly?
I would like to keep the objects separate as the different parts can be swapped out.
Here is a link to the blend file (without textures)

A split edge will look like a sharp edge. If you want to keep the meshes separate, you will have to deal with this problem. Did the parts actually need to be changed out, or is it just the texture that needs changing?

There is some geometry to change but I guess I can work around it. I was mainly wondering if it's possible

I’ve been stuck on it for a while, and had decided it wasn’t. However, in terms of altering the geometry, you might be able to get some pretty good results using shape keys.

Share your file. https://blend-exchange.com/

@R-800, added to main post

Related https://blender.stackexchange.com/questions/159008/rip-secret-door-showing-no-trace-of-edges-into-shade-smooth-sphere

To fix your normals I had to follow several steps.
Before beginning, I recommend that you unlink your world node and then create a new one for your scene, as doing this will quickly retrieve the default world settings without destroying your existing ones (be sure to first mark your present world node as protected by giving it a fake user, with the shield icon button, or else the unlinked node won't save with your file). This return to default settings will make it easier to see the results of the below changes in renders. I also created a sun light afterwards, because it's very dim after removing your modified world settings. I then turned off the selectability of this sun light in the Outliner, because I'm going to be box selecting the entirety of your meshes parts when all I want are mesh parts.
Start by selecting all of your mesh parts and then pressing Shift + d to duplicate them, then press x to constrain along the X axis, and drag these parts to the side so that they can be easily seen as well as selected independently of the originals. Left-click to conclude this transform operation, then press Ctrl + j to join all of these copies -- which should still be selected -- together as one object. Then press m bring up the Move to Collection menu, and click the option to create a New Collection for this new copy of your mesh. I renamed my mesh copy at this point to have the same name as its collection. With the new mesh copy still selected, move it back to the World space origin where it began. For the below steps to work, it must occupy the same space as the original. Now go into the Outliner and hide the new copy's collection so that we can only see the original version of the mesh.
Select all the parts of the original version of your mesh, then go into the Object Data tab of the Properties Panel, and with the Normals section expanded, hold down the Alt key, and while it is held, click the Autosmooth checkbox. Holding Alt will allow the change to take place for all selected objects at once. With Alt still held, change the angle value to something around 90 Degrees. You will want more than the default 30, or some of the normals will not be smooth.

The above step is intended to prevent Blender from complaining with a prompt that this be done when in the middle of performing the next step.
Side note: I noticed that you had two armature modifiers on all these parts. This is very likely to not be what you intend, nor want. You might want to purge them from these objects before beginning the rigging process later. I say this because, I have found that extra armature modifiers often get added accidentally, and often lead to double transformation weirdness. If you don't mean for there to be two, remove one of them. Probably remove both, as you will likely get yet another one added automatically when binding a new armature. If you want a fast way to do rid yourselves of them, delete both armatures from any one mesh part. Then box select all the mesh parts, including the selected one. The one you selected first will remain the active object, even though it wasn't selected last. Now press Ctrl + L to bring up the Make Links menu, and choose Modifiers. The active object has no modifiers, and now, neither will any of the others).
Select any one of the mesh parts (it doesn't matter which one) so that all the others are deselected automatically, and then go to the Modifiers tab in the Properties Panel. Choose to create a Data Transfer Modifier. Under the Source text field, enter the name of your copy mesh created earlier. Now, check the Face Corner Data checkbox and expand the same section to reveal more options. Click the Custom Normals button, then under the newly accessible Mapping option, choose Nearest Corner of Nearest Face. Leave all the other modifier settings at their defaults.

Now, with this modified object still selected, box select all of the associated mesh parts again, and the modified one will become the active object of all of the other ones selected, even though it was already selected beforehand. This will make it the source for all the others in the following operation. Press Ctrl + L to bring up the Make Links menu, and then choose Modifiers. This will copy the modifier you just made to all the others.
At this point, your normals should be fixed. You can test this in renders. Make sure the copy version of your mesh -- which was only needed as a source for the repaired normals -- is set to NOT show in renders, either by turning off its display filter in the Outliner, or by deleting it outright, since you won't need it anymore.
If you want all these data transfer modifiers applied, one quick way to do it is  to select all the mesh parts, and then go to Object > Convert To > Mesh, which will save you the trouble of applying the Data Transfer modifiers one at a time.

Wow, amazing, it seems to have worked!

That's great. If you found this information useful, consider either voting it up or marking it as the preferred answer so that others with the same problem can find it in search results.


text:
How can I increase an image's opacity in the video editor?
I rendered some video effects that I want to overlay on top of some video footage in the video editor. The video effects are imported as an image sequence.
Turns out the video effects are too transparent. I can duplicate the image sequence and stack them to increase the opacity, but is there a better way? I tried the curve strip modifier but it can only adjust RGB.
Here is a screenshot of my current setup (edited to remove personal info), all the clips are in "Alpha Over" mode.

can you show us how you "overlayed" them in a screenshot? with settings?

@Chris, ok, I just added a screenshot.

Select your alpha-Image.

Increase saturation and multipy.
Before:

after:

Ok that seems to work, thank you. Is it equivalent to the image stacking I was doing before?

I don’t know what you mean with equivalent, but I think it is a very similar effect.

I guess I'm asking is "mathematically", does changing the multiple/saturation have the same result as stacking images

Honestly - i don't know.