text:
Can you edit a instancing collection in Blender 2.8?
I want to instance a collection a few times.
But when I want to change something I have to go back to the original collection which is not visible if i want to also see the instanced collection so editing the original collection works really slow.
So I was wondering if there is a way to instance a collection (or group of objects if those still exist) where you could edit every instance and it changes every instance and original collection.

you can try to use Quick Instance addon


text:
Can you use vertex Weight as falloff?
My question is how I could use vertex paint as falloff.
My goal is to make something just like with a object falloff but when the object falloff is gone over a polygon it must stay "disappeared".
I know you could do it with a paint modifier and after that a mask modifier and use the weight group made by the paint modifier but the mask modifier does more of a "cut" than slowy dissovling the poygons + in animtion nodes you have more control over the how the animtion plays.
I think the problem is in difference in list lenghts after you use the "Prepare Polygon Transformation" node but I can't a solution or a work-a-round.
So I hoped someone here could help me

Welcome to Stackexchange! You are trying to transform polygons based on weights of vertices, so your current approach wont work as you expected.
Instead, you need to somehow compute a weight for each polygon based on the vertices that make it. One way is to take the average of the weights of the vertices of each polygon. To do so, loop over the polygon indices, get the weights at those indices and average them:

Then you can use the Offset Polygons node to transform the polygons based on the custom falloff just as you did. There is no need to extract the polygon info or recreate it, the Offset Polygons node takes care of this:

Yes, that's what I wanted to create. I only can't find the Offset Polygon and the Mesh Object Input.

@TheEditor You are probably using version 2.0. Can you download version 2.1 beta from here.

source: Stack Exchange

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

sort: votes


text:
What does apply transform do?
I noticed apply transform changes matrix_world in some way but it did not become an identity matrix so it must be something else it is doing. Is it modifying the vertices? Is it setting matrix_basis to the identity matrix? Someone please help me understand how the GUI things relate to actual numbers :-)

This is the entry in the Blender manual.

I have already read that, but it doesn't go into detail about parent child relationships, constraints, bones, what is vertex data what is object data what are the orange dots edit mode vs object mode vs weight painting vs bone mode or whatever it is called... Like I want to be able to find the matrix/numbers for each thing and know exactly what it means.

"visually keeping the object data in-place":can mean pretty much anything. Like it could even mean the object is transformed into a jpg (I know that is not the case but that is the level of me not understanding how the data model works).

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


text:
How can I make up cloth in marvelous designer and simulate in blender
marvelous designer export cloth is not sew together, and once I simulate in blender they will split and fall down

It looks like, the patches which are generated and simulated in marvelous designer are not welded.
What I mean is: you have vertices and edges which are sharing the same location but they are not attached to each other.
To correct your mesh in blender, go to editmode, select everything, press w and pick "remove doubles".

Thanks,actually I merge them when exporting from MD and it is done

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


text:
How to keep the original shape when simulating cloth?
this is the original shape

after simulation

I want the skirt keep the shape rather than dropping down like this

Maybe it can be solve by Cloth Stiffness Scaling option but I really don'n know how to use it?

Try increasing Bending and Structural. To have an order of magnitude, you can check the Presets :

Silk : Bending 0.05 ; Structural 5.00
Rubber : Bending 25.00 ; Structural 15.00

Stiffness Scaling allows to control the stiffness of specific parts of the mesh. Create two vertex group (one for Struct, one for Bending), assign all your vertices to both groups, them weight-paint them.

Blue vertices will have the stiffness defined in Overall stiffness
Red vertices will have a stiffness of Overall + Max

I try your method but not obviously,maybe my other option is not right.But I found another easy way is assigned the vertex group as pin in cloth-simulation.

I try to assign the vertex group like this

And select the vertex group in pinning.It can also work greatly in animation.

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


text:
Why my pleated skirt wiggle in cloth simulate

it seems like that such structure dosen't work in blender
How can I optimizate it?

Have you tried increasing the Cloth quality steps and collision/self collision quality (https://i.sstatic.net/4YTpp.png)? Cloth works best with consistently sized quads so you may need to retopologise your mesh.

Yes,I have tried both the skirt face and the quality steps.The skirt is simulated correctly in MD,but the wrong style in blender

Applied Scale on both the model and the cloth mesh?

It improve pretty much after I decreased the mass,apply scale,increased the subdivision and the quality of Self-Collision like  your another answer.But I still dont know what cause the wiggle if you still have spare time.here is my blend.Thanks a lot .

I believe the problem is likely due to the interactions with the layers of cloth, compounded with how coarsely the mesh is subdivided - since the cloth simulation is dependent on edge length, the folded layers are becoming overlapped. Try going into Edit mode, select all, click Subdivide twice, then re-run. Unfortunately my system isn't powerful enough to run this simulation effectively - it was taking minutes per frame to simulate so not practical for me to run it. Also, the scaling is outside realistic limits - rescale it to be about 1BU high (assume 1BU=1m) and apply scale. see if helps.

appreciate it,I nearly solve my problem,actually just one subdivide can be great effect.Thanks a lot for your help.BTW, one frame per second is too slow....I'm still confused why  scale affects the simulation result,it is strange right?

That’s great that you’re nearly there. Once you’re ready it would be good if yoo could add an answer so others can benefit from your experience. The overall scale will certainly have an effect on gravity - since it’s around 9.81 BU/s/s - so it’s always best to size things based on their size in the real world. Scale can also affect rounding errors so extremes are best avoided. I’ve found Soft Body to be more adjustable for cloth so sometimes that can cope in situations where cloth cannot.

I'm new to this community,I never thought I can be helped so much,you are so good.Thank you

If you issue was not address then share your blend file here

You can try scaling it up to 10. If it still persists you can scale it again, but remember that by scaling it too much you have to adjust your camera settings, but this improves the render time.


text:
Did Blender 2.9 remove sticky option from floor constraint?
I used to rely on "sticky" features in floor constraints to make feet grip floor. Is that now gone?

This option has been removed in 2019 as indicated here by Sergey Sharybin.

Remove Sticky option from the Floor constraint
This option from the very beginning of its existence needed more work
to make it work correct and this was never done.
This option was working fine during continuous playback, when there
are no skipped frames, but it was failing when AV-sync of framedrop
was enabled. It was never working correct when jumping between frames,
including rendering on a farm which usually does frame-range based
rendering.
With copy-on-write things became even more tricky, since the "stuck"
flag was never preserved between re-evaluations.

I guess that makes sense. I often hit snags and jerks with it.


text:
Offset on driver via scripted expression
I am trying to rotate a set of limbs on a centipede all slightly offset from each other in a 360 degree cycle. Each one will have a driver with an offset, thus the centipede would walk as seen here https://www.youtube.com/watch?v=ivWcwgfWR7Y
The turning of a main control wheel offsets the y-height of the target bone by x amount.
The driver so far is this
sin(abs(v*.25))*.9

where v (var) is the z rotation of main wheel, and drives the y height of bone. How can I offset the expression so that, say, plus %10 of rotation causes the next limb to lag or lead height by 10 percent?

Note that the wheel is located toward center/root of centipede.

Use self and a custom property

Offsets L to R, -pi / 2, -pi / 4, 0, pi / 4, pi / 2
Using a simple example with 5 cubes as feet and another as the wheel.

Add a custom property to foot, if you are driving a pose bone add a custom property to the bone.
Helper script to add a custom property named "offset" (edit to suit) to all selected pose bones.
import bpy
from bpy import context

propname = "offset"

for pb in context.selected_pose_bones:
    pb[propname] = 0.0 # set a float proprty

Drivers have a use self option. When on self in an expression refers to the object being driven.  The custom property on the object can be added to an expression as self["prop"] Pick a better name than prop.
'rot' is a variable set up as usual getting the local rotation of the spinning cube.  We offset that rotation by adding the value of the property to it.
abs(sin(rot + self["prop"]))

I'm implementing this now...gonna accept once its working. Are you using the new Blender beta? Some things seem different on my end.

Yes I'm using 2.8.  Everything mentioned is available in 2.79.


text:
RE:Outliner animation realtime update?
Hei, i'm working on a mograph project in blender and i'm wondering if anyone knows a way to get the outliner to updat in realtime during play back? Currently if i scrub an animation or play frame by frame (by tapping left or right key) it will show just fine, how ever any time i simply play the animation (alt+a) it will only update this information on the frame i pause on.

I'm very curious as to why a UI control is that important to you? As there is a great deal of effort put into the compute of the actual render, which is what most people using blender would consider the critical output. I would really like to know more about your usage context, do you mind explaining this a little more inside of your question?

Sure, in this case the project is using baked f-curves from audio to control the response of instanced piano keys. Having organised the notes in the outliner into groups to keep track of everything in sequence the visibility of each object in effect shows when that key is active and responding to a pitch. Hence it would be handy to be able to see this in realtime as it would play a bit like a score sheet as a result, it's not a big problem as it does respond when scrubbing.


text:
Grease Pencil Backwards compatibility or import function?
Wanting to find a way to import old GP layer from 2.79 into 2.8 beta. At the moment if i open the .blend file the GP data is shown however there doesn't seem to be any way to select or edit the data. Wondering if anyone has found a work arou

Possible duplicate of Convert annotations to Grease Pencil object (old GP to new GP)

AH, i figured out a workaround in the meantime for anyone looking for the same thing. Basically the issue is that the old GP data is being brough in as an annotation rather than a GP object. I found an answer to this issue here
Convert annotations to Grease Pencil object (old GP to new GP)


text:
How can i center axis on the object?

How to center the axis(yellow) on my object(blue)?

Option 1:

Select your object (not edit mode)
Press Ctrl+Shift+Alt+C (Yes, 4 keys at once)
Select "Origin to Geometry"

Option 2:

Select your object and go into edit mode
Press A (maybe twice) to select your whole mesh.
Press G to grab your selection and move it to your Origin.
(If you only want to move it straight down press Z to stick the movement to the Z-axis

Note that if you want to move your object around in your scene you should not do that in edit mode as the origin (the thing in the yellow circle) doesn't move with it. Otherwise you end up with the problem you hae right now.

So if i want to adjust an object i should do it in edit mode but changing the position should be done in Object mode?

Generelly speaking: Yes.
The origin of an object ist the small orange dot. That is by default also the pivot point if you rotate it for example.
Just try it out yourself: If you move an object in edit mode the origin stays at the same place and does not move with it. If you move an object in object mode the origin moves with it. That is what you want most of the time.


text:
Help me to add glossiness in my file

I want to plastic type gloss and reflection of light on it.
Please help to add those effect.

Could you please add more information about your scene setup, render engine and current material?

Do you got the answer or want more detail? if yes accept the answer.

Here's the Setup:

Add a glossy Shader (with roughness: 0)
Add Mix Node to combine the material
Assign factor of mix node according your need (the more fac creates more gloss!)
Add a show light which will be reflected on your model.
Play around the position of your mesh light so you can get good angle of reflection.

That's all


text:
Blender Python - Call function when face is newly selected in edit mode?
What I'm making is a script that assigns values to each face, I have a GUI that has fields for each value assigned to each face. So when I click a face I the GUI element to be set to whatever the values are for that face.
So what I am looking for is a way to have an event handler for when a face is selected in edit mode. So when I select this face, this function is called.

Related https://blender.stackexchange.com/a/185661/15543

Years later, and still there doesn't seem to be a simple way to subscribe to the selection event. I've been reading about it and one of the common solutions is to wrap the target operator—view3d.select in this case, I think—in another function.
Another creative solution is to attach a new draw callback to the 3D viewport, as seen in this excellent example. This one solution is good for when you not only want to catch selections but changes in the mesh.
Then there's the idea in the other answer in this question.
Using Keymap to trigger an Operator
Using the keymap is pretty interesting. I find it slightly less dirty that the wrapper method, although not as solid as the draw callback. It's ideal for when you only want to watch for direct selections and don't care about what the operator originally mapped to the key returns.
The only issue is that the example has nothing to do with the proposed solution; it's just the generic keymap example from the manual. This answer was tested on Blender 3.1.
This is what the register/unregister functions should look.
# Store keymaps for unregister access
addon_keymaps = []

def register():
    # Add Keymap Entries
    wm = bpy.context.window_manager
    kc = wm.keyconfigs

    # Create only if it doesn't exist already
    # Use "Mesh" for Edit Mode keymap entries
    if not (km := kc.addon.keymaps.get("Mesh")):
        km = kc.addon.keymaps.new(name="Mesh", space_type='EMPTY', region_type='WINDOW')

    # SELECT
    # Get the default key mapped for 3D viewport selection
    key = kc.active.keymaps['3D View'].keymap_items['view3d.select'].type

    """
    [Option 1]
        This method relies on using 'RELEASE' to avoid overwriting the original key
    functionality—in this case, Vertex/Edge/Face Selection.
        If there's anything else mapped to the 'RELEASE' event, then it'll be overwritten.
    """
    kmi = km.keymap_items.new(idname=demoOperatorRELEASE.bl_idname, type=key, value='RELEASE')
    addon_keymaps.append((km, kmi))  # Register for unregister

    """
    [Option 2]
        This method uses a modified Operator that won't overwrite the original key
    functionality. It'll have the downside of requiring 2x Undos to undo the action, and
    could  have other unforseens consequences.
    """
    kmi = km.keymap_items.new(idname=demoOperatorPASS.bl_idname, type=key, value='PRESS')
    addon_keymaps.append((km, kmi))  # Register for unregister

def unregister():
    # Remove Keymap Entries
    for km, kmi in addon_keymaps:
        km.keymap_items.remove(kmi)

        # Clean Up: Remove empty addon keymap
        if not len(km.keymap_items):
            bpy.context.window_manager.keyconfigs.addon.keymaps.remove(km)

    addon_keymaps.clear()

The biggest issue with the keymap trick is that by default new operators overwrite the original operators mapped to the same key. Thus you'll need to either map it to a different action of the same key, hoping it's also not mapped to something else, or use a special operator.
Option 1
Operator for keymap using RELEASE.
class demoOperatorRELEASE(Operator):
    """Operator used in conjunction with keymaps to automate some function"""
    bl_idname = "object.demo_operator_release"
    bl_label = "Demo Operator Name that Appears in Keymap (Release)"
    bl_description="Hello World!"
    # Using 'REGISTER' will make the operator remember the last custom props used.
    #   It'll also always show a popup when using the operator.
    #   When you use it and have options you DON'T want remembered, use options={'SKIP_SAVE'}
    #   in the props defintion
    #   bl_options={'REGISTER', 'UNDO', 'INTERNAL'}
    bl_options={'UNDO', 'INTERNAL'}

    key: bpy.props.StringProperty(default='', options={'SKIP_SAVE'})
    keypress: bpy.props.StringProperty(default='PRESS', options={'SKIP_SAVE'})

    @classmethod
    def poll(cls, context):
        # You can use aditional conditions here so the operator, and the shortcut by extension,
        #   won't be trigged unless the conditions are met
        return context.active_object.random_special_condition

    def invoke(self, context, event):
        # It's possible to capture the key name and press type here
        self.key = event.type
        self.keypress = event.value
        return self.execute(context)

    def execute(self, context):

        # Include your function calls here
        # (...)

        # Example of performing an action based on key press type
        if self.keypress == 'RELEASE':
            print("Was a Release!")
        return {'FINISHED'}

Option 2
This Operator lets the event through, so it reaches other operators mapped to the same key. I couldn't find any documentation on the consequences of using PASS_THROUGH in the execute method, thus I'm not sure using this trick is a good idea, but hey, it works.
class demoOperatorPASS(Operator):
    """Operator used in conjunction with keymaps to automate some function"""
    bl_idname = "object.demo_operator_pass"
    bl_label = "Demo Operator Name that Appears in Keymap (Pass)"
    bl_description="Hello World!"
    bl_options={'UNDO', 'INTERNAL'}

    key: bpy.props.StringProperty(default='')
    keypress: bpy.props.StringProperty(default='PRESS')

    @classmethod
    def poll(cls, context):
        # You can use aditional conditions here so the operator, and the shortcut by extension,
        #   won't be trigged unless the conditions are met
        return context.active_object.random_special_condition

    def invoke(self, context, event):
        # It's possible to capture the key name and press type here
        self.key = event.type
        self.keypress = event.value
        return self.execute(context)

    def execute(self, context):

        # Include your function calls here
        # (...)

        # Example of performing an action based on key press type
        if self.keypress == 'RELEASE':
            print("Was a Release!")

        return {'PASS_THROUGH'}  # Keep keymap shortcut from overriding default keymap

I couldn't find a way to do this. So I presume there isn't an easy way. But the next best thing is to do add a keymap that triggers when MOUSESELECT is pressed. Here is an example of that.
# store keymaps here to access after registration
addon_keymaps = []

def register():

    # handle the keymap
    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name='Object Mode', space_type='EMPTY')

    kmi = km.keymap_items.new(ObjectCursorArray.bl_idname, 'SPACE', 'PRESS', ctrl=True, shift=True)
    kmi.properties.total = 4

    addon_keymaps.append(km)

def unregister():

    # handle the keymap
    wm = bpy.context.window_manager
    for km in addon_keymaps:
        wm.keyconfigs.addon.keymaps.remove(km)
    # clear the list
    addon_keymaps.clear()`


text:
Blender modeling don’ts and things to avoid?
Hi i’d really appreciate if someone could give me the “10 commandments” so to speak of blender modeling. A lot of the resources out there discuss what you CAN do in blender but sparingly what you CANT or SHOULDNT do. Like I randomly stumble upon tips like- don’t have faces on top of faces or  make sure your normals point outward. I was hoping someone could list some things to look out for. I’m planning to render pictures using objects made in blender on other programs such as SFM or Daz. I was hoping there would be some universal modeling rules to keep in mind. Thanks!!

Open ended opinion based questions are not a good fit for this site, according to the rules Perhaps ask over at Blender Artists instead. Also take a look at http://topologyguides.com for a good starter.


text:
Blender link external scene in the existing scene
I have a wery complex scene with lots of objects, and I have to fragment my file in smaller parts to be able to work
I have basic file in whitch I shoud import the other files as objects, or as scenes.
If I import it as objects, and than if I make changes in the imported file, like adding more objects, than all the time I have to inport the newly created objects.
If I import as scene, there will be another scene created.
My question is if there is a way to import the file in a way, that if I add new objects, and I reload it, the newly created objects to appear in the same scene.

https://blender.stackexchange.com/questions/93705/is-it-possible-to-link-one-or-more-layers-from-another-blend-file

We will use the link function (not the "append", which creates a full copy of your data and don't do any sync from the source file).

From your "master file", separate your assets into groups ;
Save each group alone in a separate "slave" file ;
In your master file, delete everything, then use the menu File → Link and link every group you need from your slaves files.

That way, your master file contains only linked groups. And your other slaves .blend files each contain one group, which you can edit. The master file will receive the changes. If you ever create a new object in a slave file, don't forget to assign it to the group so he will be synced.


text:
selecting multiple groups
I am trying to select two groups at a time. I tryed shift + G and select a group, than select another object from another group, and hit shift + G again, but the previously selected group was deselected, how can I make to select two or more groups?
thank you

Clear selection with a
All click can be done in the outliner window
In the outliner window show groups.
Click on first group
Shift click on the second group.


text:
display object data name in the wiewport
Ewery time I want to check witch data block is used by the selected object I have to switch to object data tab in the properties view, is there a way to instantly display the used object data name somewhere to be allways visible?
Thank you

The only solution I found is to create another propertis window with the object data tab opened.


text:
Copy object to another scene, but keep data
What I need is to make a copy of an object to another scene, but keep the object data the same (link).

There are at least 2 ways. Create a new scene, then...
2.9 update:
Select your object on the original scene, go in the Object menu Link / Transfer Data > Link Objects to Scene, then Choose your new scene.
2.7:
Select your object on the original scene, go in the Object menu > Make Links > Objects to Scene > then choose your new scene.

You could also create an object in the new scene, select it and go in the Properties panel > Data, and in the top dropdown menu (Browse Mesh Data to be Linked) choose the mesh you want.

To make an object independent, click on the 2 that will appear next to the data name.


text:
Ambient occlusion disappear at distance
Ambient occlusion disappear in blender 2.82, eeve when I get farther from the model, why it is happening this?

It's not the Ambient Occlusion, but the light's shadow distance


text:
Modelling for a game engine, stuff I should know?
Good evening. I would like some help, if someone would be willing to tell me for what I should watch out and what I should know when I make a model for any kind of game Engine.
I do know I have to keep the model as simple as Its possible (poly count) and to use Normal maps to add complexion (...)
I remember that game engines see the structure of a model in triangles, Should I learn how to model in a triangles? or does Blender have build in conversion. I remember once hearing about other software that can convert a model while keeping the same structure,complexion, from quads to triangles (i don't think thats the proper way of saying it)
Any help would be nice, point me to a video, text or you can explain here.
Thank you for reading.

Unless you tell us what game engine you're aiming for, it will be hard to be specific.
However, you shouldn't try modelling with tris, it would be hard and pointless. With triangles you can't use loops, most tools won't work as intended (ie. Bevel, Inset...)
Either let the engine do the conversion (Unity, UE4, Godot, does it really well) ; or if you want more control, handle it yourself just before export (ie, Blender "Triangulate" modifier)

It will be for Unity 5.5.5f, the game uses that version of Unity. I want to know what should I keep in mind while modelling. I make give it to someone else, they gonna use Unity Engine to prepare it and then import it to the game


text:
Bounding Box (how to make it and how to use it for auto holes)?
Hello, its been a long time since i was here... I kinda don't remember how to ask a question here (properly)
So I will just ask, I would like to create a bounding box that would be used as a auto cutting of an object in Blender 2.8, a permanent cut (like with a knife) but done automatically, unless you think I should do it differently. That could be good too but some tutorial would be nice.
My issue is I have 5 doors on each side in a hallway and I want to keep it as simple as its possible, at least for now. Later I will want to make walls that will be imported to a game engine but for now I just want to make something simple and then go from there

Hi, Towik, could you describe in more detail what the result would be if you achieved your goal?

Well, the thing is if I could just make a plane and grab a side to make it longer and use some kind bounding box for instant cutting where the doors would be, it would be faster. at this moment I have to make a plane, after rotating it so it would be vertical, after that I have to grab one edge move it, then I have to make a loop, at the height of the door, then I select the edge above the door and E, then I end up with the wall above the door, then I have to E the wall to the next door and after that I have to extrude the edge to the floor... and so on


text:
Radeon ProRender ,auto Triangulate of models (Render)
If I go and do a preview or even do a full render of Wireframe ,RPR will show models that are quads as fully Triangulated .Does anyone have any idea why ?
At first I though it would even do that if a model is full of Tris but it doesn't do that

All models are always triangulated at render time, viewport or otherwise. Triangles are the only thing a computer can draw, regardless of what the editing tools may make you believe. Are you experiencing any issues?

As far as I know or can see ,no issues .After looking at the info panel all I can see is Tris ,so makes sense ,Thanks.


text:
How can I get a remote computer to automatically render a blender file
I have a computer at home that I want to use for rendering so I can continue using my laptop.
Is there a way I can send a blend file to my Desktop which will automatically be opened and rendered for me.

Yes, there is. Automatically scheduling it will be a bit of a hassle, though (if you want to do that).

Rendering it
Blender can actually be run from the command line (Terminal on Mac, cmd on Windows). You can render a file like this:
blender -b path/to/file.blend -o whatever-####.png

On Mac, prefix this with /Applications/Blender/Blender.app/Contents/MacOS/ (replace /Applications/Blender with wherever you installed Blender). I don't know what to prefix it with on Windows.
Try this out, and it should spit out a .png image file in the current directory (another name for folder), which should be your home folder.
Rendering it remotely (on Mac)
You can just transfer the file to the remote machine and run the above command. This is for controlling it from the work machine.
Open a terminal on the rendering machine and type hostname. (You only need to do this once.) Then go to your work machine and type ping whatever.local, where whatever.local is the output of the hostname command on the other machine. You should get a continuous stream of output. Hit Ctrl-C to stop it. This step is to make sure that the two computers can see each other.
Now run this command, which does something very interesting:
ssh yourusername@whatever.local

yourusername is your username on the remote machine.
It'll give you a scary "identity could not be verified" warning the first time you connect. Just type "yes" to continue. (It can't tell the difference between a new machine and an impostor.)
Assuming you got your other machine's password correct, you are now controlling the remote machine!
Now copy the file to your render machine, or run this command:
scp yourworkusername@work-machine.local:/Users/.../file.blend ~

This will pull the file to your home folder on the remote machine. (Run hostname in another window to get your work machine's name.)
Now run the blender command above. Repeat scp and blender as necessary. When you're done for the day, type exit to log out of the remote machine.

How would I do this on a windows machine?

The blender command will still work on Windows, so you can transfer the file another way and run the command there. (blender should be prefixed with wherever it's installed; I just don't know where it installs to on Windows, if anywhere.)

Windows 10 actually has built-in SSH now, but it's disabled by default. (See here for instructions on enabling it.)

If u use a hard drive and put the blend file plus any textures in the same folder u could build it on the laptop and then just plug the hard drive into the pc. Then just open it and press render

But how can i do this if i am not at home, sorry should of specified is there an automated system


text:
How would I go about making a liquid swirl/ similar to the photo?
I'm looking to make a swirl out of yogurt similar to this image. I've tried doing some different simulations but I'm not sure how I could get the liquid to go somewhere specific or to twist it in a particular way. thanks

Possible duplicate of How can I make water follow a path?

Look for Gleb's recent splash tutorial on youtube https://www.youtube.com/watch?v=I0Tz1U6A5vI


text:
how can i separate dupliverts object on the circle
after dupliverts of plank how can i separate duplicated object to independent object

The operator is "Make duplicate real": in object mode, Shift+Ctrl+A or in the menu "Object/Apply/Make duplicate real". Once done the objects will share their geometry (like in alt+D duplication), if you also want the geometry to be independent, use "Make single user" in the object menu whilst the dupli are selected.

Select circle.
SHIFTCTRLA Make Duplicates Real


text:
How to throw many rigid bodies orderly?
I want to throw the rigid body ball like batting machine.
But i don't know how to do that. i can just throw one rigid body by using wind not keyframe.
so, is there way to throw the rigid bodies different frame like batting machine?

The Animated property of rigid bodies enables/prevents them from being simulated.

It can be keyframed as well. Start off with the animated property unchecked and key it, by hovering over the checkbox and pressing I. Then some frames later, when you wish for the simulation of the rigid body to start, set a keyframe with the animated property checked.

This can also be done with keyframes.
In this example I set LocRot keys on frame 1 and 3. Then I key the animated property to disabled on frame 2 and enabled on frame 3.
The result is a simulation starting on frame 3 with the initial velocity of frame 2.

Offset the keys as desired.


text:
How to randomize wood pattern in many object?
I want to make wood house. but my wood pattern is not nature. If i use texture, all woods have same pattern. Is there any way to randomize wood pattern?

Is your wood image-based, or procedural?

That is image-based


text:
difference of uv mapping between viewpoint and render

In the view point, roof's pattern is straight line.
but in the render, roof's pattern is diagonal line. why this problem happen?

There is Random socket output added to the UV map vectors. On the other hand Texture shading mode shows only mapping of the currently selected texture without taking into account any nodes. So likely end result is the difference between your node setup and texture mapping.

Not using Math node but using MixRGB node can solve that problem.


text:
I want to make a duplicate object into each independent object

I have a circle of replicated objects, but I want to have each independent object

Select the object and tab into Edit Mode. Select the entire mesh with A and then click RMB and select Seperate > By Loose Parts. This should make them all individual objects.


text:
Object movement unit
Can I set the unit to move when I press the G key and move the object? For example, can the box be set to move in a fixed unit by 5mm increments?

You can change the snapping unit by changing the grid scale:

Though, this is relative to the zoom level (relative to the grid).
To use it, make sure that snapping is set to "increment":

While grabbing, use Ctrl key to snap one unit and CtrlShift keys to snap 1/10 units.


text:
Cutout tube from mesh
I have a mesh that I would like to cut out a tube from.  I'm familiar with the boolean modifier, but the problem is it will not cut out the middle of the tube.

What would be the best way to cut out the tube (including hollow inner section) from a mesh?
Thank you

A couple of questions.Will the tubes be separate objects when you are done? If not, do you want the result to be a continuous manifold? ( i.e. the inside of the tube cuts the inside of the mesh, the outside of the tube cuts the  outside of the mesh)?

Booleans are strongly discouraged. Using proper topology is strongly recommended

@RobinBetts Thanks for your comment.  They don't need to be separate objects, but they do need to be a continuous manifold.  It's a 3D printed air nozzle for a 3D printer.  Thanks again :)

@DuarteFarrajotaRamos Thanks for your comment!  Yeah, I've been reading about that a bit over the last day and I've been fighting with creating a proper manifold as a result of it.  I'm quite new to Blender, so many of these concepts are a little over my head but I'm definitely learning a lot and will be a master of it by next week (j/k - someday perhaps)

With such tubes, the boolean modifier won't remove the cube part in the center of the tubes, as they are not within the tube mesh
I see two possibilities:
1- "apply" the boolean modifier and remove the parts of the cube you don't want (select a vertex in each "inner part" and 'select linked'), or
2- duplicate your tubes, and make cylinders out of the copy (remove the inner wall and close the ends), then use those in your modifier. I'd make the cylinders slightly smaller than the outer diameter of the tubes, to avoid all risk of holes between the cube and the tubes.
The first is probably easier in a static object, the second when you need to animate the tubes


text:
Creating realistic procedural wall plaster texture
How do I make a simple procedural texture to get a result similar to this?
In real life its a traditional wall plaster that its not smooth.

It looks like this in real life.

Could you maybe post real life example with a closer view?

You could use the Musgrave procedural noise node as displacement texture for a very simple plaster like surface. You can change the node settings to control how rough and detailed the plaster would be.


text:
For some reason a chair i downloaded for my scene doesnt show in the final render i dont know how to get it in the render
I have made an bedroom it looks fine in the viewport render but when I actually render it the chairs doesn't show.
I got the object from Blenderkit but I also got some other stuff that shows like the katana
Viewport:

Render:

http://blender.stackexchange.com/questions/53632/render-result-is-completely-blank

Please share the whole screen including your outliner window to see the visibility settings for your objects.


text:
How to use shortcuts for tools instead of actions in Blender 2.8
I'm having some problem with the way blender handle the shortcuts. When I use a shortcut for a tool, like the extrusion one, for example, it immediately execute extrusion, instead of just selecting the tool.
I managed to bypass it by clicking in each option at the quick tools menu and reinserting the shortcuts, but apparently I have to do that for each blender mode. Is there a option I'm missing in the preferences or maybe a plugin to make Blender behave differently?


text:
How to change minor radius of a torus in blender 2.8
I cannot find the way to change the minor radius in blender 2.8.

In Blender 2.8 after adding the torus (or any primitive) a notification will pop up in the bottom left corner of the 3D View.

After pressing it, a list of options will appear, including the minor radius.
Alternatively, you can use shrink/fatten in edit mode (ALT + S).

Same with Blender Version 2.79

How to change radisu after torus is added and propably some other operations have beeen executed in between? I can not find that option any more.


text:
How can I add two textures?
How do I make a Noise texture (or any texture) only appear in places where Musgrave is white/black?
I tried adding them with math node but this gives monochrome image.

https://blender.stackexchange.com/questions/3105/how-can-i-blend-two-textures-together-using-cycles/3112#3112 https://blender.stackexchange.com/questions/10453/how-can-you-smooth-the-edge-between-two-materials/10455#10455 https://blender.stackexchange.com/questions/105454/how-to-mix-textures-with-colour https://blender.stackexchange.com/questions/46424/add-a-transparent-image-on-top-of-a-material

There are lots of ways to do this, but to open up mixing options, you could do it via the colors of the textures, via a Mix RGB node set to one mode or another -
Darken:

Lighten:

If you just want to use the Musgrave Textrue as a mask, (not actually see it,) then you could connect it to the Mix RGB node Fac to Fac, and put whatever other texture/color you want into the top color slot.

Instead of using the Math node for adding, you should use the Math node with Multiply. So for example then the areas where your Musgrave texture is 0 will remove the influence of the Noise texture there.
If you use colorful noise you could have a color mix node with that noise and white (or whatever color you want when the musgrave is 0) rbg color as inputs, and the mix factor would be controlled by the musgrave texture value


text:
How to find the point coordinates on the object's surface for simulate effect like hit on wall from laser beam
I tried using bones constraint (like shrinkwrap ), but doesn't happy.
maybe with script
any suggestions?

Have a look at the doc about bvhtree here https://docs.blender.org/api/2.79/mathutils.bvhtree.html?highlight=raycast. The last function "ray_cast" can give you the hit point (location, normal, face index and distance)

Would also suggest looking into dynamic paint

Using BVH tree and raycasting, as suggested by lemon, in Animation Nodes.

Wow! You made my day...
Very good solution
Thanks a lot


text:
Can't find a control for size under physics in the particles panel
I'm following Andrew's Blender Guru beginner tutorials, and I'm working on particles right now. The problem is I can't find "size" and "random size" options under physics in the particle panel. I can see it on Andrew's tutorial but I can't find it on my own software.

maybe https://developer.blender.org/T54003 (try to install 2.79 not 2.79a)

@lemon It's 2.79 I have installed, u can see it on the screenshot.

@SignorCharles, the "a" appears in the splash screen not in the header bar. So have a look at the splash screen

@cegaton Yes, this was very helpful, I found it nested under the "Render" after unchecking the "Advanced button"

OK...So I unchecked "Advanced" button under Particles panel and discovered "size" and "random size" controls were nested under "Render" in the same panel. I think that's how it is in my version 2.79 of blender.


text:
How do you bake the AO with the texture in cycles?
How do you bake the AO with the texture in cycles ?

what do you mean "with the texture"? Do you want a bake of the AO and the color combined?

I want the AO to be darker when I bake the texture. I tried baking the AO, and then bake combined and took them to GIMP and put them together. But this makes the texture to dark. I'm trying to get a brighter texture with AO.


text:
VSE: No Audio In Rendered File, Mixdown causes crash
Ever since switching from Windows to Linux, I have been unable to render any videos in Blender's VSE with the audio tracks.
The audio codec is selected in the scene tab:

However after rendering with Render > Render Animation the created file has no audio data whatsoever. ffprobe gives this result:
$ ffprobe -i wheel.mp4
...snip...
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'wheel.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    date            : 2020/08/13 09:38:02
    encoder         : Lavf58.49.100
  Duration: 00:00:06.67, start: 0.000000, bitrate: 5835 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 5832 kb/s, 30 fps, 30 tbr, 90k tbn, 60 tbc (default)
    Metadata:
      handler_name    : VideoHandler
$

When I attempt to render the audio on it's own via Render > Render Audio > Mixdown, Blender crashes without a log file regardless of how I attempt to mixdown the file.
This is happening regardless of my choice of rendering engine, and I don't think it's an out of memory error since I have plenty of available memory before the crash and the video portion renders fine.
Has something changed between rendering files from the VSE between 2.7 and 2.8, or is there something I don't know about rendering audio in Blender on Linux that's causing a crash?

What distro are you using? Did you use a repository to install or did you download directly from blender.org?

Fedora (and probably other red-hat based distros) don't have support for ffmpeg non-free libraries out of the box. https://blender.stackexchange.com/questions/28681/limited-set-of-output-codecs-in-fedora-linux-how-can-i-enable-others

Those are fair comments. I'm running Manjaro, and using Blender from the Arch package repository. I'm not sure if this is specifically a problem with using nonfree codecs because I had this issue with VP9/Vorbis as well. I'll try with the official tarball and report back.

I'll be darned, that worked right out of the box. I'll go ahead and answer my own question I suppose.

After a few comments on the above post and some experimentation, it seems not all distro packages are created equal. If you're experiencing some weird bugs like this, try downloading a tarball right from Blender.org.

Packages from repositories are not created by the developers of blender, so go figure how they are compiled and what is included or left out.


text:
How to add UDIM tiles based on UV island location?
I want to add UDIM tiles based on the location of the UV island of the selected objects via python.


text:
How to install python module before installing addon?
I want to install the python module via pip before installing the addon.
The addon depends on the module which I want to install via pip

Note it's good practice to ask the user for permission before installing packages to their directories.

https://github.com/robertguetzkow/blender-python-examples/tree/master/add_ons/install_dependencies

In the __init__.py inside def register() and before the modules imports. It does not import the modules, only installs. The function should be run every time the addon is activated as it adds required path site.getusersitepackages() where the installed modules are  located to sys.path. While installing Blender may appear frozen, but it actually downloads the modules. Example.
Get ensure_site_packages code from here: https://gist.github.com/unwave/24f0ee4bfc9cc0af1bf35eda5d54d49f
import site
ensure_site_packages.ensure_site_packages([
    ("PIL", "Pillow"),
    ("xxhash","xxhash"),
    ("bs4","beautifulsoup4"),
    ("pyperclip", "pyperclip"),
    ("cv2", "opencv-contrib-python"),
], site.getusersitepackages())

Can also use ensure_site_packages.get_site_packages_directory() which is .\_deps\<python version> relative to ensure_site_packages.__file__

It doesn't works

@Karan What is the error?

I tried and it's not installing any python package anywhere

What does it write to the console? Can you import the modules? The destination for the installed modules is site.getusersitepackages(), see what is the return value of it and look for the modules there.

I can't use import <module> inside blender python console, and I can't use import <module> in my addon files. It says  not found

Are the modules present in site.getusersitepackages()? Is site.getusersitepackages() in sys.path when you import?

Yeah,  it is available

Let us continue this discussion in chat.

This script uses the user's site-packages folder from the main python interpreter on the system, instead of the one used by Blender. Mixing these is a bad idea and could easily lead to problems. A better idea is to install the module to the addons directory to keep everything encapsulate. This location can be found with bpy.utils.user_resource("SCRIPTS", path="addons/modules", and pip takes a -t location argument to install to the given location instead.

@Jasper A problem with just addons/modules is that it gets copied when you choose to transfer the previous Blender preferences to a newer Blender which can have a different Python version. So the distinction between python37/site-packages and python311/site-packages is lost. The site.getusersitepackages() was added to sys.path by default: https://projects.blender.org/blender/blender/commit/72c012ab4a3d2a7f7f59334f4912402338c82e3c

Some cases of the Blender's python version changing are covered by the logic in the PREFERENCES_OT_copy_prev operator.
https://github.com/blender/blender/blob/f33d7bb598ceae93af4e8eb1cee79e06a1b8950c/scripts/startup/bl_operators/userpref.py#L72-L158C28
https://github.com/blender/blender/blob/f33d7bb598ceae93af4e8eb1cee79e06a1b8950c/scripts/startup/bl_operators/wm.py#L3193-L3201C4
But for example 2.93 would suggest to transfer the settings from 2.90 despite the fact that they use 3.9 and 3.7 python versions correspondingly.

I see that the pip package is already included with blender 3.2. On the python console try the command import pip and then pip.[Tab autocomplete] to verify that it is able to navigate.
If you need you can install packages within your personal scripts folder that you can find (or change) via Edit :: Preferences :: File Paths :: Scripts:


text:
How to bake texture in the background with multiprocessing or subprocess and bring the baked texture back into the current scene?
I want to bake the texture in the background and bring the baked texture back into the current scene so that blender doesn't freeze while baking.

Not an optimal solution but you could open two instances of Blender.
In the one instance you do the baking stuff and in the other you use the Image.
You could link some objects from the baking file to the Image View file so you have the same setup. And if the baking is finished you go into the outliner of the viewing file and reload the library(baking file) with right click onto it:

I dont think not freezing while baking is possible. because it is essentialy "rendering". While we can "uncheck" the lock interface in normal rendering, i dont think we can unlock in the baking one.

but i have a little recommendation. I've been using this amazing baking addon named "simplebake",to export mesh and textures to unreal engine. which really makes my baking workflow much much faster.
Also simplebake has the feature you wanted, which is automatically apply the baked texture and mesh right back to the scene while maintaining the old baked geometry in a hidden collection.

bring the baked texture back into the current scene

the developer is quite responsive and hears what we want. Once i requested to add a USD output and he added it in an instant.
here is the link: https://www.blendermarket.com/products/simplebake---simple-pbr-and-other-baking-in-blender-2
i hope my answer helps you

Absolutely awesome addon! This should become a part of Blender!

I found another solution that could work.
In the experimental features you have the option "Draw Manager Locking". It says it Doesnt look the UI during background rendering


text:
How to switch image via python?
I want to switch from Render Result to Viewer Node via python.

It only works in the current context

It works if you have any of the visible areas with the Image editor, which should be the case in most contexts. If you don't have one, you can always make one. See python - How to open an image editor window and display an image file in it? - Blender Stack Exchange

If none of this answers to your question, then please edit your post to better explain what you need.


text:
How to update/refresh Viewer Node's image data via python?
I want to update/refresh the Viewer Node image data via python so that I can save the image.

You’ll want to turn on Auto Render as explained here https://docs.blender.org/manual/en/latest/compositing/sidebar.html but I think that’s all you’ll need.

How to enable it via python?

bpy.data.screens["Compositing"].areas[3].spaces[0].use_auto_render, but you should iterate over areas to find the area of type "NODE_EDITOR" instead of using the magic number 3.

Aha! Using the next() function, we can find the first area of type "NODE_EDITOR": next(area for area in bpy.data.screens["Compositing"].areas if area.type == "NODE_EDITOR").spaces[0].use_auto_render

It doesn't works

That’s not a lot of info to go on.

It doesn't work when I enable 'use_auto_render' with python.

That’s the same amount of info, because that is exactly what and only what the code is supposed to be doing, as previously discussed. Please provide a precise error message as shown in the console.

It doesn't show any error but saves a blank image.

This problem is related to https://blender.stackexchange.com/questions/274712/how-to-channel-pack-texture-in-python


text:
How to create draggable panel like modifier stack?
Is it possible to create a draggable panel like a modifier stack in N-Panel?

You just need to create different panel classes inheriting from bpy.types.Panel class with the same bl_category and different bl_labels. Each class will represent individual panel in the stack. here is a simplified code:
from bpy.types import Panel
from bpy.utils import register_class, unregister_class

class MY_Panel(Panel):
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"
    bl_category = "Dragable"
    bl_options = {"DEFAULT_CLOSED"}

class MY_PT_Panel1(MY_Panel):
    bl_label = "Panel 1"

    def draw(self, context):
        col = self.layout.column()
        col.label(text="Properties 1")

class MY_PT_Panel2(MY_Panel):
    bl_label = "Panel 2"

    def draw(self, context):
        col = self.layout.column()
        col.label(text="Properties 2")

class MY_PT_Panel3(MY_Panel):
    bl_label = "Panel 3"

    def draw(self, context):
        col = self.layout.column()
        col.label(text="Properties 3")

classes = [
    MY_PT_Panel1,
    MY_PT_Panel2,
    MY_PT_Panel3
]

def register():
    for cl in classes:
        register_class(cl)

def unregister():
    for cl in classes[::-1]:
        unregister_class(cl)

if __name__ == "__main__":
    register()

Not this, I mean a draggable panel inside a panel in N-Panel

Afaik, nested draggable panels are not implemented in Blender API. Anyway I can not provide a link to a reputable source. Hope you'll find a solution. The only thing I can state is that Properties is not a panel, it is a window, which has specific interface and behavior related to it. Properties' Panel classes' bl_region_type attribute is "WINDOW", not "UI" like in N-Panel's classes. Their code has nothing specific which nests panels or makes them draggable, they just are. You can right-click on any parameter in Properties (except modifiers) and select Edit Source to see their code.


text:
How to show progress bar while git clone repo?
I am cloning the git repo into my addon folder.
I want the operator to show the progress of the cloning of the repo.
import bpy
from bpy.types import Operator
import os

class XX_OT_install_dependencies(Operator):
    bl_label = 'Install Dependencies'
    bl_idname = 'xx.install_dependencies'

    def execute(self, context):
        import subprocess
        path = os.path.join(os.path.dirname(os.path.abspath(__file__)), '../')

        subprocess.run(['cd', path], check=True)
        subprocess.run(['git', 'clone', '<repo>'], check=True)

        return {'FINISHED'}

classes = (
    XX_OT_install_dependencies,
)

register, unregister = bpy.utils.register_classes_factory(classes)

I think you'd have to setup a pretty elaborate boilerplate structure if you want to send and receive messages between processes that way. Happy to be proven wrong though. Also if I may is it a "the client wants it that way so I must do it" requirement or is it a "I'm bored waiting for it to complete, wouldn't it be nice to have a progress bar showing me how much left I have to wait" requirement ? Because if it's the latter, the combined time you'll spend setting this up will far outpass the amount of time you'll save by looking at the progress bar filling up :p +1 though


text:
How to get active/context.area in the modal operator?
I want the context.area in the modal operator when I change the workspaces to e.g. Shading workspace.
Currently, when I change the workspace I get None when I print(context.area)

import bpy
import gpu
from gpu_extras.batch import batch_for_shader

class ModalOperator(bpy.types.Operator):
    """Move an object with the mouse, example"""
    bl_idname = "object.modal_operator"
    bl_label = "Simple Modal Operator"

    def draw_callback(self):
        vertices = (
            (100, 100), (300, 100),
            (100, 200), (300, 200))

        indices = (
            (0, 1, 2), (2, 1, 3))

        shader = gpu.shader.from_builtin('UNIFORM_COLOR')
        batch = batch_for_shader(shader, 'TRIS', {"pos": vertices}, indices=indices)

        shader.uniform_float("color", (0, 0.5, 0.5, 1.0))
        batch.draw(shader)

    def invoke(self, context, event):
        self.handler = bpy.types.SpaceView3D.draw_handler_add(self.draw_callback, (), 'WINDOW', 'POST_PIXEL')
        context.area.tag_redraw()
        context.window_manager.modal_handler_add(self)
        return {'RUNNING_MODAL'}

    def modal(self, context, event):
        print(context.area)

        if event.type in {"ESC", "RIGHTMOUSE"}:
            bpy.types.SpaceView3D.draw_handler_remove(self.handler, 'WINDOW')
            context.area.tag_redraw()
            return {'CANCELLED'}

        return {'PASS_THROUGH'}

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

# Register and add to the "view" menu (required to also use F3 search "Simple Modal Operator" for quick access).
def register():
    bpy.utils.register_class(ModalOperator)
    bpy.types.VIEW3D_MT_object.append(menu_func)

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

if __name__ == "__main__":
    register()

I also want a solution too. When a operator running, change workspace also make the event.mouse_region_x not usable.

Is there any way to restart the modal operator if context.area is None?

I tried but failed before. The context, event of restarted modal still cannot be used.

It was a subject I was curious about a lot when I started coding in Blender.
Unfortunately, such a thing is not possible in blender.
Blender didn't have a direct event handler specifically for workspace changes.
However, I recommend using a timer rather than doing this with a gpu coding.
It also writes to the console in the following piece of code.
The code is:
import bpy

class CheckWorkspaceOperator(bpy.types.Operator):
    """Check Current Workspace"""
    bl_idname = "object.check_workspace"
    bl_label = "Check Workspace"

    _timer = None
    _previous_workspace = None

    def modal(self, context, event):
        if event.type == 'TIMER':
            current_workspace = context.workspace
            if current_workspace is not None:
                workspace_name = current_workspace.name
                if workspace_name != self._previous_workspace:
                    print(f"Current Workspace Name: {workspace_name}")
                    self._previous_workspace = workspace_name
            else:
                print("No active workspace found")

        elif event.type in {'RIGHTMOUSE', 'ESC'}:
            return self.cancel(context)

        return {'PASS_THROUGH'}

    def invoke(self, context, event):
        current_workspace = context.workspace
        if current_workspace is not None:
            workspace_name = current_workspace.name
            print(f"Current Workspace Name: {workspace_name}")
            self._previous_workspace = workspace_name
        else:
            print("No active workspace found")
            self._previous_workspace = None

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

    def cancel(self, context):
        if self._timer:
            context.window_manager.event_timer_remove(self._timer)
        return {'CANCELLED'}

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

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

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

if __name__ == "__main__":
    register()

If you want, you can also write this in the info field. Instead of print:
self.report({'INFO'}, f"Current Workspace Name: {workspace_name}")


text:
Script to select all vertices in an object and assign new vertex group
I have a blender file which often has multiple objects in, which when they need editing together I have to assign a new vertex group to to easily select them.
Right now my process is;

Click the object,
Hit tab to select all vertices,
Go to Vertex Groups and hit add,
Rename it for that object,
Hit assign and be done.

Sometimes I have 20 objects so this gets repetitive. Is it possible to create a script in python that can do this for me, and possibly in a batch edit so it does it for all objects selected? If so, how would I go about it?
Thanks.

The code below is loops trough every selected object:

delete all vertex groups
create a new vertex group named as the object itself
then assigns every vertices in the object to the group

So all you need to do is, select your objects then Run Script.
import bpy
import sys
import logging
# config for logging
logging.basicConfig(level=logging.DEBUG)

def createVertexGroupForObject(aObject):
    # set to object mide : "VertexGroup.add(): cannot be called while object is in edit mode"
    bpy.ops.object.mode_set(mode='OBJECT')

    # remove all vertex groups
    for vertexGroup in aObject.vertex_groups:
        aObject.vertex_groups.remove(vertexGroup)

    # add new vertex group with the name of object
    newGroup = aObject.vertex_groups.new(aObject.name)

    # assign objects vertices to vertex group
    verticesToAdd = []
    for vertex in aObject.data.vertices:
        verticesToAdd.append(vertex.index)

    try:
        newGroup.add(verticesToAdd, 1.0, "ADD")
        logging.debug("\t\tvertex group added")
    except:
        logging.error(sys.exc_info())

# get selected objects
selected = bpy.context.selected_objects

for obj in selected:
    logging.debug("\tselected: " + obj.name)

    createVertexGroupForObject(obj)

Would make remove all other vertex groups optional.

Feel free to edit the code, The comments (text begins with #) eg: "# remove all vertex groups" are describes what that part does.
So if you remove those 2 lines under that comment, your existing vertex groups will stay intact.

Thankyou I'll keep that in mind as a way to optionally not run code. My point is the OP doesn't ask for all existing vgs to be removed. To me it seems an unnecessary addition to adding a vertex group containing all vertices.

You are right, but my experience is: when I run scripts, I often have to run them multiple times, and if I mess up something (eg: didn't select something), this way I don"t have to search for the cause, just hit select all, and re run the code, the result always going to be the same, and i wont have any duplicates.
I use to run MySql scripts, and it's a must have to write your code this kind of way

If a selection of meshes already  have 50 meticulously hand weight painted vertex groups, your saying it's best to wipe them all out  to add the trivial case (select all - assign) vertex group.  This is destructive. If there exists a vertex group  with same name as object remove  that one   first by all means.

Your clearly commented answer really helped me! Collecting the verts in a list (verticesToAdd) was the step my script was missing. I thought my_object.data.vertices was a list already, but I guess it's some other type of data. I learned from your use of logging too, and it helped me catch the source of an error.

Just created it for myself now, then found this thread here :)
Its similar to Tamas-Katona's answer, but little different form.
For all selected objects it create new vertex group with name=prefix+obj_name and assign all vertices to that group.
(it is assumed that you select only mesh-objects)
import bpy

def get_all_vertsID(obj):
    verts = []
    for vert in obj.data.vertices:
        verts.append(vert.index)
    return(verts)

sel_obj = bpy.context.selected_objects
for obj in sel_obj:
    all_verts_id = get_all_vertsID(obj)
    v_group_name = 'prefix_'+obj.name
    v_group = obj.vertex_groups.new( name = v_group_name )
    v_group.add(all_verts_id, 1.0, 'ADD')

You only need two lines of code, one to create a vertex group with a specific name and the other to assign the selected vertices to this new group.
import bpy

# your code here

# New Vertex group from selected vertices

bpy.context.object.vertex_groups.new(name='New_Vertex.000')
bpy.ops.object.vertex_group_assign()

here my full post:
How do I create a vertex group from selected vertices in edit Mode with Python (Blender 2.8)?


text:
Ask for new directory while another file import is in progress
I am creating a blender plugin to import a file, which also contains path and texture name information.
What im doing in the code, is to try and actually open the path contained in the file, however, what I want to do and I cant, is to get the user to select a new texture path, if the one that was just used is found to be invalid.
Here is my code snippet

    #Create Materials
for mtr in material_instance:
    mat_name = read_string(strings[0][0][mtr[0]])
    mat = bpy.data.materials.new(name=mat_name)
    mat.use_nodes = True
    nodes = mat.node_tree.nodes
    for node in nodes:
        nodes.remove(node)
    links = mat.node_tree.links
    principled = nodes.new(type='ShaderNodeBsdfPrincipled')
    node_output = nodes.new(type='ShaderNodeOutputMaterial')
    node_output.location = 400,0
    link = links.new(principled.outputs[0], node_output.inputs[0])
    for tex in range(mtr[4], mtr[4]+mtr[2]):
        tex_type = read_string(strings[0][0][texture_type_assignments[tex][0]])
        print(tex_type)
        image_tex = nodes.new(type='ShaderNodeTexImage')
        image_name = read_string(strings[0][0][texture_definitions[texture_type_assignments[tex][1]][0]])
        image_path = read_string(strings[0][0][texture_definitions[texture_type_assignments[tex][1]][1]])
        if (not os.path.isdir(image_path)):
            msg = "Please select a dir for path {0}".format(image_path)
            #DO SOMETHING TO GET NEW CUSTOM PATH FROM USER
            #image_path = new_path_from_user
        image_full_dir = '{0}{1}'.format(image_path,image_name)
        try:
            image_tex.image = bpy.data.images.load(image_path+image_name.replace('.tga','.dds'), check_existing=True)
        except:
            image_tex.image = bpy.data.images.new(image_name, 1, 1)

As you can see, I read the -to be imported- image name and path from the file, and then try to see if the path that I just read is valid. However, if it's not, I would like to get the user to select a new one, without of course interrupting the whole importing process (so this new path selection should happen in-between all this, as the files I am trying to import, may contain more than 1 different image paths.
Probably, showing a new directory picker would be the best, but if that's difficult then just showing a popup dialog with text input would do the job for me (something like this)

Is that possible?

Yes I think that's possible.  One way would be to use a modal timer operator doing what you are doing now, if there is an invalid folder, pause the timer op with a flag (not really pause loop n do nothing)  and call some set folder operator (that invokes a filebrowser.) if folder is valid keep going.

@batFINGER Im sorry to ask though, but as a new python/blender coder, is there an example of this available to study?

Scripting templates > python > operator modal timer


text:
Adding holes to this sphere
I would like to subtract cylindrical holes in this object, centered over each of the highlighted vertices and aligned with the object's center.  Can somebody show me how to do this?

Welcome to bse. Could you please post a sample file or link on how to create quad sphere like that.

A similar sphere, if this can help:

What do you mean by "cylindrical holes"? Just a cut or plain tubes?

Thank you both for answering so quickly!  LukeD and remco.   I'm new to blender and relatively new to 3d modeling.  You guys rock!

Steps:
First of all activate LoopTools add-on in User Preferences, than:

CTRL+Shift+B to Bevel vertices.
MouseWheel to add more cuts or press F6 to see menu with Bevel options.
W > LoopTools > Circle.
CTRL+Num -  to select less.
X > Delete Vertices.

Edit:
For OP model holes will have different number of vertices. But besides that everything is working just fine.

As a workaround you can first select vertices with 3 connected edges and make for example 5 Bevel cuts: 3 edges x 5 cuts = 15 vertices.
Than do the same thing with vertices with 5 edges connected with 3 cuts: 5 edges x 3 cuts = 15 vertices.

I'm afraid Ctrl+Shift+B will not work as expected for the OP's model, as the selected vertices are not surrounded by the same amount of edges.

@lemon check my edit.

LukeD, right. But Steve should tell what he means by "cylindrical" as I understand it as "plain tubes"... but I don't know

@lemon well, we will need to wait for Steve to answer. No matter what it could be a couple of steps more.

LukeD, anyway your solution is probably ok as facing vertices share the same amount of edges... so you can bridge them... UV for your answer!

Yes.  Plain tubes.  Well it worked great.  You can make sure that the resultant shape faces have the same vertices the same diameter by typing in a value for radius when you do the loop function.  After deleting vertices inside the circles I simply extruded the faces of the circles inward.

Duplicate only the selected vertices and separate them into their own object (S2).
Create the cylinder of the required diameter and length. Make it a child of S2 and set 'Duplication->verts' on S2 (check the "rotation" box). You may have to realign the cylinder and correct its length, I found that that works best in edit mode.
Make the duplicates real (Shift-Ctrl-A) (perhaps join them in a single object to ease the next step).
Now use a boolean modifier on your first object and subtract the cylinders you created

This approach may be interesting but as an answer you should provide more details and eventually the corresponding blend file. I say that mainly because the boolean modifier may or not work in this context.

Just adding a little bit of info.
I tried to solve this procedurally using Sverchok Add-On in Blender. Basically as you requested, if you want to place Cylinder at every selected points, then boolean it. In such scenario, if you do this often, you might want to use Python code or node setup like this.
I found that we need to have a thickness on the icosphere so that we can have a nice boolean cut.


text:
Link Image Texture Path to Object Name
I have a material node setup in cycles that I am trying to get an image texture file path to automatically updated based on the name of the object that the material is applied to. For example, if the object name is 123456 the image texture path should update to /Image-Textures/123456.png in the root folder of the .blend location.
Otherwise I am having to make a new material for every object since each has a different image texture. I think there should be a way to do this with python but my skills in that department are rather lacking.

Related https://blender.stackexchange.com/questions/104446/how-to-show-different-images-based-on-object-id

So I tried using OSL and after messing with it for a couple hours I realized it only works with CPU rendering which isnt really feasible for me. Is there any way around this?


text:
BGE Parent actuator not working as expected with multiple objects
I'm trying to make a object rotate around either of two empties, swapping between them when a key is pressed. Logic bricks are as pictured:

The plan is when a key is pressed the current parent empty and the player object are parented to the other empty and rotate around it. It works the first time around (switch from right empty to left empty). After the second time the right empty does not move with the other objects, but rotates fine.
.blend included

This sounds like a looping reference. I'm not sure. May I suggest a different solution: Parent the character to one empty. Play an action with positional keys at the left and right foot (action actuator in property mode). This way you do not need to fiddle with dynamic parenting.

Your suggestion kind of works, the empty moves as the property is toggled, but the player object moves too due to the parenting. Can't replace the parenting with a Child Of constraint as it doesn't work in BGE.


text:
How do I remove an unwanted texture that keeps showing up in Object mode?

I really want to know how to remove or erase this little bit of unwanted texture from Object mode as I've already got a texture to go above it. It gets covered up when I put it in texture paint but as soon as I return to object mode (and view on Texture) it comes back.
It also comes back on top of the actual textures when I output this character into the game. Please help.

Try unhiding everything in Edit mode and see if there's a tri assigned to some orange like texture. Make  sure also to select all in Edit mode and assign selection to desired texture by choosing it in the UV editor. Include some information about how do you export your character into the game, what settings, what format, what game engine etc


text:
NLA Action of material Mix Shader node FAC value
I'm creating an animation where regions of the brain light up and turn off, cued to  video and sound. Many many keyframes of essentially "fade on / fade off" switches for each of the 6 highlighted regions.
I started keyframing the Mix Shader node FAC values using a transparent shader to "turn off" the highlight, but there are too many keyframes to do and it's getting out of hand.
This feels similar to NLA actions - drop "cerebellum on" action strips where I want to turn "on" the cerebellum; and more easily adjust timing and add transitions to suit video...
...but I'm not able to create an action strip of a material! Is this possible? Is there a trick to do it?
I then thought of using an empty's x location to drive the FAC value of the mix node in the material and create action strips of the empty, but don't know how... does this require a Python script?
Is this something the fabled animation nodes could help resolve?

Found the answer:
Fade in action applicable to all objects (in cycles)
Keyframe the object's pass index from 0 to 100, use the object info node:object index output, connect to math(multiply) node with value of .01, connect to FAC value input on mix node.The object's pass index gets recorded in the NLA editor, so I have my action strip!


text:
How to create two objects that screw into one another
I am trying to create two objects that screw into each other, very much like nuts and bolts, for 3d printing purposes. I started with two very simple shapes:

I am applying screw to them separately with the same parameters:
turns=3, center=0,6,0, axis=1,0,0
However, at the end, my shapes don't fit into each other:

What am I doing wrong?

Perhaps a more robust approach is to 'model the gap'.
i.e. keep the inside and outside profiles as one object, (possibly reserving an
 AltD instance of the combined  profile for convenient editing, ) then assign the screw modifier, then separate the surfaces.

(Which you can do by CtrlL select linked, and P > separate selection ). You can flip the normals of the female component, and embed it wherever it is needed, later on.

You need to position the offset right. Click the vertex that would be on the spinning axis, and snap the cursor to it. In object mode, make "Origin to Cursor". Now do it for both, that should fix it.

Thanks. Which vertex would that be? The topmost vertex for both shapes? Also, how do I snap my cursor to a vertex?

Just search for blender screw, there are plenty of explanatory videos.


text:
How to automatically create faces between a set of vertices
I have the following object with an inner screw-like cylinder, and an outer hexagonal prism:

I am trying to close this shape up by adding faces between the screw and the hexagon, to create a nut for 3d printing, essentially. But, as you can see, there are almost a hundred vertices on the screw. Is there any way to close this shape up automatically? I don't care about the topology of the model too much, as this will be 3d printed.


text:
creating two groups of joined objects using python
I am trying to create multiple joined groups using this answer to an already existing question.
I am reading some coordinates from a file, creating spheres at those coordinates, and assigning a material of a certain color depending on the index. I would like to join together the spheres that have the same color.
Below is a minimal reproducible code:
import bpy
import numpy as np

coords = np.loadtxt('coordinates.dat')

# 0 (A)
matBlue = bpy.data.materials.new(name="blue")
matBlue.diffuse_color = (0,0,1)
# 1 (B)
matRed = bpy.data.materials.new(name="red")
matRed.diffuse_color = (1,0,0)

materialColors = {0:matBlue, 1:matRed}

spheres = [[],[]]
count = 0
for coord in coordinates:
    bpy.ops.mesh.primitive_uv_sphere_add(location=(coord[0],coord[1],coord[2]), size=0.5)
    name = 'sphere' + str(count)
    bpy.context.active_object.name = name
    currentSphere = bpy.data.objects[name]
    currentSphere.data.materials.append(materialColors[count%2])
    spheres[count%2].append(currentSphere)
    count += 1

# join spheres
scene = bpy.context.scene

for i in range(2):
    ctx = bpy.context.copy()
    ctx['selected_objects'] = spheres[i]
    ctx['active_object'] = spheres[i][0]
    ctx['selected_editable_bases'] = [scene.object_bases[ob.name] for ob in spheres[i]]
    bpy.ops.object.join(ctx)

However, when I do this, I end up with red spheres joined, and the blue spheres are not joined. What am I doing wrong?
Note: In reality, I have 8 groups instead of 2. Hence the for loop at the end.

Beware the naming system
There is an issue with this part of your code, I've added a print statement boolean  if the object you have chosen as currentSphere is also the newly created sphere.  bpy.data.objects["sphere0"] will always be the first object created with this name. Running again with any objects with the same name existing, will give somewhat unpredictable results.
for coord in coords:
    bpy.ops.mesh.primitive_uv_sphere_add(location=(coord[0],coord[1],coord[2]), size=0.5)
    name = 'sphere' + str(count)
    bpy.context.active_object.name = name

    currentSphere = bpy.data.objects[name]
    print(currentSphere is bpy.context.active_object)

could use something like below, where the currentSphere will be the newly created object, but may not end up with the name you choose. (To make sure it has unique name would need to check and rename/remove others)
for coord in coords:
    bpy.ops.mesh.primitive_uv_sphere_add(location=(coord[0],coord[1],coord[2]), size=0.5)
    name = 'sphere' + str(count)
    currentSphere = bpy.context.active_object
    currentSphere.name = name
    currentSphere.data.materials.append(materialColors[count%2])
    spheres[count%2].append(currentSphere)
    count += 1

I also contend in this case can set context, rather than overriding.
for i in range(2):
    for o in scene.objects:
        o.select = o in spheres[i]
    scene.objects.active = spheres[i][0]
    bpy.ops.object.join()

Bmesh approach
Another suggestion would be scrapping the primitive add and join operators altogether and use bmesh to create spheres at coordinates.  Test script, creates two bmeshes for odd and even coordinates, and writes the first to active object's mesh.
import bpy
import bmesh
from mathutils import Matrix

coords = [(0, 0, 1), (1, 0, 0), (0, 1, 0), (1, 1, 0)]
bmeshes = [bmesh.new(), bmesh.new()]
for i, coord in enumerate(coords):
    bmesh.ops.create_uvsphere(bmeshes[i % 2],
        u_segments = 16,
        v_segments = 8,
        matrix=Matrix.Translation(coord),
        diameter=0.5)

# for example sake to mesh onto active_ob
me = bpy.context.object.data
bmeshes[0].to_mesh(me)
me.update()
for bm in bmeshes:
    bm.free()

Thanks for the detailed explanation and pointing out the possibility to use bmesh.


text:
Glass BSDF doesn't appear correctly
I am having trouble creating two glass spheres next to each other with proper refraction and transparency:

However, I end up with either an opaque object (back sphere, when blend mode is opaque), or a glitchy transparency (front sphere, blend mode=alpha blend). I'm not sure what I'm doing wrong. I just need to make multiple spheres refracting through each other -- how do I achieve this?

Glass is limited in eevee - enable "backface culling" or disable "show backface" (alpha-blend).

@ChristopherBennett would it be better to switch to cycles?

Cycles is much better for (realistic) glass and transparency, though the tradeoff is much longer render times.


text:
Object locations not updating before render (Python)
I've created a script to add four cubes to a scene on two separate layers.  I use object.location and object.rotation_euler to randomly position the objects in the scene.
When I render the scene at the end of the script not all of the objects are rendered in their new locations.  It mostly seems that either the objects on layer 0 or those on layer 1 get stuck at the origin.  Some of the "Scenes" (objects in different locations) render correctly, but others don't.
Interestingly, if I save the file before the render and open after the script is complete, all the objects are in the correct place.  This confirms that the location and rotation changes are being set.  I'm not sure when or how to make sure they are applied.
Research:

I've read a bunch of threads on this issue, but haven't found one
that reliably solves the problem.  In previous more complex models
bpy.context.scene.update() had some effects, but didn't fix
everything.
I've added bpy.context.update() before I save the file and render
the scene with the objects on the different layers.
I have the same results if I run with bpy as a module
(experimental), as a background job or from the Python console in
Blender.
From the Blender Python console:

import s2
s2.run()

When I run this in the Blender Console I can see that the objects
are not all updated in the 3D-View.  If I save the file at this
point and then revert I can see the objects move to the correct
location.
I've been working around this by saving the file and then running a
subprocess with a small script to render the scene.  This is the
equivalent of saving, and reopening the file.

It seems like I'm just missing something obvious here.  All help is appreciated.
Sorry for the long example, but it took a bit to whittle it down to this.
import bpy
import os
from math import radians as radians
from random import random as random

from mathutils import Vector

root_dir_path = os.path.join(os.getenv("HOME"), "tmp/scratch")
if not os.path.exists(root_dir_path):
    os.makedirs(root_dir_path)

obj_layer = 0
mask_layer = 1
camera_layer = 2

def clean_obj():
    for obj in bpy.context.scene.objects:
        if obj.name not in ['Camera', 'Lamp']:
            bpy.context.scene.objects.unlink(obj)

    for obj in bpy.data.objects:
        if obj.name not in ['Camera', 'Lamp']:
            bpy.data.objects.remove(obj)

def dump():
    print("current state:")
    print("\tObjects  : ", bpy.data.objects.keys())
    print("\tMeshes   : ", bpy.data.meshes.keys())
    print("\tMaterials: ", bpy.data.materials.keys())
    print("\tTextures : ", bpy.data.textures.keys())
    print("\tScenes   : ", bpy.data.scenes.keys())
    print("\tWorlds   : ", bpy.data.worlds.keys())

def active_layers(layers):
    mask = [False] * 20
    for layer in layers:
        mask[layer] = True
    return mask

def render_scene(filepath, layers):
    bpy.context.scene.camera = bpy.data.objects["Camera"]
    bpy.context.scene.layers = active_layers(layers)
    render = bpy.context.scene.render
    render.use_file_extension = True
    render.filepath = filepath

    render.resolution_percentage = 100
    render.tile_x = 480
    render.tile_y = 270
    render.image_settings.color_depth = '16'
    render.image_settings.compression = 0

    bpy.ops.render.render(write_still=True)

def run():
    # Clean up
    clean_obj()

    camera_obj = bpy.data.objects["Camera"]
    camera_obj.layers = active_layers([camera_layer])
    camera_obj.location = Vector((0, 0, 20))
    camera_obj.rotation_euler = (0, 0, 0)

    bpy.data.objects["Lamp"].layers = active_layers([camera_layer])

    num_obj = 2
    num_scenes = 2
    # Add 4 objects to the scene all at (0,0,0)
    # Layer 0: Object-00, Object-01
    # Layer 1: Object-00.Mask, Object-01.Mask
    for i in range(num_obj):
        scene = bpy.context.scene

        # Add Object
        obj_name = "Object-{:02d}".format(i)
        print("Adding object: ", obj_name)

        bpy.ops.mesh.primitive_cube_add(radius=1, view_align=False, enter_editmode=False,
                                        location=(0, 0, 0), layers=active_layers([obj_layer]))

        obj = scene.objects.active
        obj.name = obj.data.name = obj_name

        # Add Mask Object
        obj_name = "{}.Mask".format(obj_name)
        print("Adding object: ", obj_name)

        bpy.ops.mesh.primitive_cube_add(radius=1, view_align=False, enter_editmode=False,
                                        location=(0, 0, 0), layers=active_layers([mask_layer]))

        obj = scene.objects.active
        obj.name = obj.data.name = obj_name

    dump()

    for s in range(num_scenes):
        for i in range(num_obj):
            x = random() * 10 - 5
            y = random() * 10 - 5
            ry = random() * 360
            rz = random() * 360
            print((x, y, 0), (0, ry, rz))

            ry = radians(ry)
            rz = radians(rz)

            obj_name = "Object-{:02d}".format(i)
            obj = bpy.data.objects[obj_name]
            obj.location = Vector((x, y, -2))
            obj.rotation_euler = (0, ry, rz)

            obj_name = "{}.Mask".format(obj_name)
            obj = bpy.data.objects[obj_name]
            obj.location = Vector((x, y, 2))
            obj.rotation_euler = (0, ry, rz)

        # Update the scene?
        bpy.context.scene.update()

        filepath = os.path.join(root_dir_path, "block-{:03d}.blend".format(s))
        print("saving: ", filepath)
        bpy.ops.wm.save_as_mainfile(filepath = filepath)

        filepath = os.path.join(root_dir_path, "block-{:03d}.blend".format(s))
        render_scene(filepath, [obj_layer, camera_layer])

        filepath = os.path.join(root_dir_path, "mask-{:03d}.blend".format(s))
        render_scene(filepath, [mask_layer, camera_layer])

if __name__ == '__main__':
    run()

More research: It seems that bpy.context.update() just isn't working like I expect it to.  I can bring out the ugly brute force:

Change context to VIEW_3D

Select each object

Toggle into EDIT_MESH and back to OBJECT

Render

When I render after this everything is in the right place.
I'm currently using 2.79.   I'll try a different version to see if it is something specific to 2.79.

Got it!  I have objects on multiple layers.  In render_scene(): bpy.context.scene.layers is set to just the layers to render.  When bpy.context.scene.update() is called it only updates the layers that are active.  If all the layers that have had objects location changed are active then everything updates fine.  If an object is moved on a layer that isn't active in the scene then its position is updated.
Makes sense that scene.update() only updates things that are visible.

bpy.context.scene.update() only updates the layers that are active in bpy.context.scene.layers.  Make sure that the layers that are going to be rendered - set with bpy.context.scene.layers are the same ones that are active when scene.update() is called.


text:
Blender material button not working
Blender material button doesn't work for selected object.

As you can see, it worked on the first object, but wont work for the plane, either. Maybe I messed up at the first object"s material, cause I'm new and it just wants me to give up?
I tried transparency to the first object and I assume that we wouldn't be able to see that without rendering, since it's not partially transparent in this view.
Thanks in advance.

In the screenshot it looks to me that you have to scroll up in the material window to view the contents, which for some reason is a bit higher up than what is currently shown.

That's it. I couldn't find "diffuse bdfs" (or whatever), either, in the other object's material. but now, it's right there too. Thanks!

Great! Please mark the answer as accepted if it solved the problem.


text:
Cycles won't render image
However, blender render does render the plane image. It's just a picture of trees (and an added sun, pointing at the plane, and I made a two second animation, just to see (I'm like really new, still).
So, I decided to try cycles render, to see if there was any difference in the image (and to see how much longer it takes), and it just renders the plane without the image.
I added an icosphere, just to see and both renders it.
Thanks.

Possible duplicate of How is Cycles different from Blender Internal?

Make sure to have texture created with "Node Editor".  This is the basic node for texturing in Cycles Render.

From 3D View, toggle to Node Editor -- make sure to toggle "Use Nodes"


text:
How big should i make my assets for a game
So, i am trying to make a small game level to test some stuff and I made a tree that is 4.7 million tris, is this way too much and do i need to reduce the size, or is this ok

4.7 million tris is way, way to high for most systems. Like waaay to high, I'd recommend aiming for around 2k max for a tree that is used many times in an environment.

top of the line AAA games these days will have for the main character ~0.5m tops. 4.7m for an asset is way to much. But the exact number depends entirely on your target.

Well, that could be ok if the only thing you're going to do in your game is showing this tree alone... and some engines would probably break the same...
A basic character (human mesh + clothes) for vg is good at, lets' say, 15K polys on low-end mobile devices...
To keep a 4M model high quality you need to create a low poly model, then bake all the maps your game engine needs to use the low poly like an high poly, saving processing power in your game engine.
This is called baking and is better explained on Polycount here.
Blender-wise, you could try to use the AssetGen addon, for instance, to test the process...


text:
python script to move another object when a certain object is moved
Suppose I have a cube and a sphere. I want to write a python script such that when I move the cube by a vector (x,y,z), the sphere also moves by the same vector. I want to be able to move the cube by hand, and have the sphere move automatically. I realize that I can do this by selecting both before moving, but I would like to accomplish this with code. Is this possible?

Does it really have to be with code? I mean there are a bunch of built in tools to accomplish this, like say parenting, constraints, setting up relations that are much easier.

@DuarteFarrajotaRamos This is partly out of curiosity, and also partly due to a possible scenario in which I would have too many objects.

You can use drivers to do this, or use a constraint. The constraint is probably the fastest option (performance-wise), as they are written in C.
If you want you can even add drivers or constraints via Python, in case you want to have scripted control over those.

I didn't know about drivers. Thanks for pointing this out!


text:
How to limit (mask) proportional editing in Blender 2.8?
I want to prevent proportional editing on certain vertices.
Maybe I'm searching for the wrong word or phrase.
Limiting editing to a certain vertex group would help.
Masking also gives me no search results.
I tried locking vertex groups, but it does not disable editing its vertices as expected.
The only answer you find is hiding, yet hiding is not a solution. It is -- by design :) -- making parts of the mesh invisible.
For example if I want to close an eyelid I would need the lower lid to be visible yet not affected by editing the upper lid.
So hiding is a workaround if you duplicate the whole mesh, but is there a solution?

I've never heard about a kind of "pinning" function, hide would be the solution, but yes it's not perfect...


text:
How to create a render layer in blender python
In Blender's 'Render Layers' tab in its 'Scene' section there is a list of render layers. I wish to know how I can create a new render layer and customise that layer using a script.
For example, to create a render layer called "Characters" that only renders scene layer number 1 (ignore mask layers for now).

Create a new render layer with Scene.render.layers.new()
As a rule of thumb, I always use an  API method such as  new_render_layer = scene.render.layers.new(name) in preference to the operator, in this case bpy.ops.scene.render_layer_add().
Test code, creates a new render layer named "Characters". Makes it the active render layer. Sets only  scene layer 0 (the first) as included, turns off zmask, and, just for fun,  makes true for every odd zmask layer.
import bpy

context = bpy.context
scene = context.scene

new_rl = scene.render.layers.new("Characters")
# make active
scene.render.layers.active = new_rl
# set only layer 0 true
new_rl.layers = [not i for i in range(20)]
# don't use z mask
new_rl.use_zmask = False
# every odd zmask layer
new_rl.layers_zmask = [not i % 2 for i in range(20)]

See RenderLayer docs for more render layer properties to set.

Thanks! This was helpful. The output window only ever shows the operator class commands.


text:
How to render without rectengles between objects?
Helo, maybe someone could help me with my rendering problem? When I render I see strange rectangles bedind the tree and I don't know how to fix this.

I guess this is not a rare problem, but maybe I could not find the answer or I just don't know how to call this thing.

Your render result is indeed very strange and no, it's not common. Can you please explain better how your scene is made? Is the background an horizontal plane? Are you using Cycles for the render? (If you can upload your blend file to https://blend-exchange.giantcowfilms.com/ and edit your question with a link, that would help)

I use horizontal plane with texture and a tree with leaves is made with Sapling Addon. I use Blender Render

This looks like a bug and should probably be reported to the tracker with a proper example file to recreate the problem


text:
Duplication vertex lighting/color
I'm wondering if it is possible to copy vertex lighting from one object to another, similar but different from default one. Here is screen showing what I really want to do ( https://i.sstatic.net/aJ9V6.png ) - make every selected place the same dark. I can't do it manually with vertex painting and brush tools because any change is very visible, I want to avoid it. So is it possible and if is how can I apply it?
Thank you in advance for response!

Try using data transfer modifier. Vertex Color is in Face Corner Data. If Your objects have same topology, the best setting of matching vertex is Topology, otherwise try nearest corner and best matching normal:


text:
Hide render on all but one object on several collections in different layers
Let's say I have two layers.
In total, I have three collections excluding "scene collection". ("Collection", "back", and "front").
In "back" and "front" I have the same amount of objects.
I have an input (int ID)
What I'm trying to do is to hide render on all objects in "back" and "front", and then unhide renders based on that input.

You can use driver functions (python-like).   Let's say that by (int ID) you have a custom property on a single object. In that case you can 1) hover over the property, right-click (RMB) and "Copy as New Driver", then 2) go to the objects "Visibility", hover over the Show In Renders and RMB Paste Driver. for the property, 0 will make it renderable, '1' will eliminate it from a Render. You would then paste this to each objects "Render" control. I'm not sure there's a way to use a Driver for a collection's "Disable in Renders", sadly.

@james_t pointed out in a comment that I could use drivers.
So I managed to make a solution by looking into drivers.

Type the following into the text editor:

import bpy

# myObj.003 -> 3
# myObj     -> 0
def getId(obj):
    if len(obj.name.split('.')) == 1:
        return 0
    return float(obj.name.split('.')[1])

bpy.app.driver_namespace['getId'] = getId

def isId(var, obj):
    var -= getId(obj)
    return 0 >= var or var > 1

bpy.app.driver_namespace['isId'] = isId

Run the code.
Right-click (RMB) on the target property (in this case the "Disable in renders") and press "Add Driver".
in the driver do the following:

set Type to "Scripted Expression".
enable "Use Self".
Add some sort of input variable named "var".
set Expression to the following code:

isId(var, self)


text:
swap "disable in viewports" and "disable in renders"
I'm working on a big project and to improve performance I have hidden a lot of modifiers and objects in viewports. But now I want to see how the current full version of the project looks like in object mode and with the ability to look around.
is there a way to swap "disable in viewports" and "disable in renders"?
or is there another way to get the same effect?


text:
Text with different font filling in XOR pattern or fills in places that should not be filled
When using the font "Cabin", the fill does not work correctly. (see image)
I have tried all the fill modes and all relevant geometry settings to no avail.

The font has overlapping geometry because of the triangles in places like two of the inside corners of the 4.  This is confusing the geometry engine into not understand what is inside the numeral.

I get that but is there no way to fix this? other programs can handle it.

Fonts aren't something Blender handles well.  Hopefully someone else will know how to fix it for this one.  I'm sorry I don't.


text:
unable to smooth copy of object
After copying the eye, the new object lost its smoothness.
Tried shading smooth, recalculating outside, smooth face, edge, and vertex.

is their any overlapping geometry?

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

@moonboots file here: https://cdn.discordapp.com/attachments/339937717343223809/990715861050458202/eye.blend

there's only one eye in your file and if I duplicate here it seems to work, could you please share the file with the 2 eyes?

@moonboots humm. ok, here you go: https://cdn.discordapp.com/attachments/339937717343223809/990718609837944842/eye2.blend

it seems ok on my computer: https://zupimages.net/up/22/25/gigh.jpg

visible confusion

@moonboots Using blender 3.2 (Steam) what about you?

same, 3.2........

Try checking if resetting the normal data does anything. Its in the properties panel under Object Data Properties> Geometry Data> Clear Custom Split Normals Data

@Jakemoyo It is grayed out.