text:
Properly animating a plane reflection
Apologies if this question has been asked before, but even after several rephrasings I still don't see what I am looking for. I'm also a n00b when it comes to solid modelling, although I have a rudimentary grasp of the basics thanks to the Donut tutorial.
Problem / Challenge: I want to animate an object (a ball-and-stick representation of a methane molecule with 4 different substituents, to be precise) being plane reflected to its mirror image. I can create the actual mirror image easily enough, but the intermediate steps of atoms and bonds being projected onto a flat plane and then outward again towards their destination locations are proving to be a headscratcher.
Please note that I am not after 'mirroring the animation'; I am after 'animating the mirroring'.
I could calculate the projection onto and outward from the plane by hand of course, but especially the necessary Euler rotations will be extremely tedious. Not to mention that if I change the mirroring plane I can redo the calculations. Just before typing up this message I chanced upon what looked like a geometry node editor which I'm guessing could at least automate the calculations. But perhaps there is a better, more encompassing way of doing what I want.
Ideally I want the motion of the molecule to be such that the original 3D form becomes a 2D projection on the mirroring plane, and then subsequently becoming the mirror 3D form. If that is too difficult to accomplish easily, I'll settle for the individual elements of the molecule remaining 3D objects on the mirroring plane, albeit already scaled and rotated.
Thanks in advance for any pointers, tutorials, and tips.

Could you illustrate a bit what you're looking for? Using a simple mirror modifier could do?

This sort of thing?


text:
How to make the grease pencil only draw the inner edges?
I want to make my grease pencil only draw the inner edges of an object. How would I achieve this?
I am able to draw an outline around an object and even a line on all the edges, but I can't seem to figure out how to only draw a line on the inner edges.
I am using the Source Type "Collection", if it is not possible this way I can also use the object source type, but I'm trying to avoid that for now.

You can invert the "silhouette" contour type:

Thanks you very much, that worked

source: Stack Exchange

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

sort: votes


text:
How do I remove "object as camera" ? When trying to render, it's only capturing a close up section of one object in the scene Unsolved
Please help!! I'm going out of my mind
I'm only using one camera. I keep setting the camera to how I want and then when rendering its only showing a very small view of the room. I think it's because it was set to "object as camera"? but I don't know how to undo it.
https://i.sstatic.net/xXkUr.jpg
first image is what I want to render - second is what is actually getting rendered

select a camera, then ctrl + numpad 0

@lemon Thank you for replying. Unfortunately that hasn't changed anything

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

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


text:
Why is my modeling and my Layout different?
My layout is showing me something different than the modeling is showing. I don't know how to fix that.

My layout is showing me something different than the modeling is showing. I don't know how to fix that.

Alt H to unhide?

or / to enable/disable local view


text:
Distribute Points on Face to Objects with Particle Properties
I'm trying to distribute the cylinder on the face of the icosphere that has some particle properties. When I tried to joint geometries, the particles properties disappeared. Can someone help me with this? Thanks in advance!

maybe try switching the order of the links going into the join geometry.  Anyway, what attributes are disappearing?

did you try realize instances before distribute on points? if that doesn't help, pls provide blend file

realize instances node solved the problem! Thanks @Chris


text:
Connect 2 vertices with a cylinder
I'm working on a chemistry project where I want to create some atomic structure.
In order words, I have two atoms and I want to connect their centers with a bond (cylinder).

I was thinking about snapping tools but the cylinder can only have 1 origin so its two ends cannot snap to the two vertices.

does the connection need to seem welded or is this good: https://zupimages.net/up/23/20/ls4r.jpg

@moonboots what in the picture looks good to me. I just have many bonds to make so I'm wondering if there's a way to snap them automatically.

Create your 2 spheres, create a curve, in Edit mode select all and press V > Vector in order to flatten, put its 2 ends at the centers of the spheres, give it thickness in the Object Data > Geometry > Bevel > Depth, give it 2 Hook modifiers with the spheres as Object:

If you move the spheres the curve sticks to the centers:

Thanks, I think this solves my problem.

You could use a Geometry Nodes setup like so:


text:
How to Create This Curved Ridge?
I've got a simple cylinder and a sphere boolean, I'm trying to create a smooth ridge like in the following annotation. This seems like it would be pretty straight forward but I can't seem to figure it out. Any ideas?

a smooth ridge but with a "spike" as the blue line, that's it?

Not so much a spike, more as if the cylinder geometry was slightly pulled over the sphere boolean to create a lip partially around it. As if there was a bevel that joins the cylinder to the sphere.

more or less like this? https://i.sstatic.net/FCL9q.png

Exactly like that!

A possible way to do it.
Start with a relatively low resolution for the cylinder and the sphere (16 rings here). Duplicate the mesh and apply the boolean on it.

Keep half of the object (we'll mirror it later), and simplify the mesh removing some edge loops in the sphere part and joining the vertices that are in proximity. Also add rings/cuts on the cylinder.
To do that, use these tools. Snap to vertices and automerge options:

Below before and after:

Make the cut for the ridge using the knife tool:

Add a mirror and subdivide modifiers. Push the ridge and bevel it.

For bottom and top part, make the faces and inset them:

Next step, cleaning, make quads from ngons and tris, for top and bottom parts:

To harden the ridge, you can select it and crease the edges:

That can give you this:

Blend file with each step included:

This is fantastic, exactly what I wanted. There is a step in between the second from the bottom second lef and the bottom third left where the edges seem to go from quite angular to curved. Not sure how you managed to achieve that?

You're talking about the last steps? Just few "optimizations" a bit less vertices in the last one. No real impact for this shape.

One more question, I am trying to bevel that edge with CTRL but nothing seems to be happening at all. Are you using a plug in at all to create the bevel? I just can't seem to get it to work.

I think bevel should work... and no, I used no plugins here. Is the issue visible in edit mode, or are you talking about the final result?

I'm talking about the bevel you mentioned here: "Push the ridge and bevel it." I think you may of dissolved some edges before you beveled? If that's the case, I got to here in the video, but looks very different to your bevel https://www.loom.com/share/ec684caba2cc4ed1819294e9c230ecce

Ah ok. after the bevel I've pushed the edge(s) to the right along X, to make a bigger ridge.


text:
Fluid simulation does not follow animation
I've been working on a project where I try to release some water (shown in blue) inclosed in some object (shown in purple) by opening a gate (pink-ish). The water first fills up the purple container object, then the gate opens by some kind of animation, and finally the water is supposed to flow out. However, under most settings, the water is stuck inside the object and appears to be blocked by some invisible wall (see the screenshot, the water is supposed to fall down). I got the water to move out of the object under a specific set of settings, but those were quite problematic (i.e. not the right gate opening timing, a very low fluid resolution). The relevant properties of the scene objects are:

The purple container object is set to fluid obstacle, volume initialization type shell, slip type is set to free slip (made the whole thing work once) and it has some thickness.
The gate shares the properties of the container object (although changing the volume initialization type to volume made it work once), but it's thickness is made through a modifier. The gate is animated by a simple deform>bend modifier, which uses shape keys somewhere internally I think (at least I saw an error message stating this).
I don't think the domain settings are that interesting, but lowering the resolution sometimes made the whole thing work.

Does anybody have any idea what I should be paying attention to? I'm confident the problem is due to the animation of the gate (which starts in a closed position, and then opens), as removing the animation and making it's initial state open lets the water flow through.
Update: The fluid does seem to follow the animation when using shape keys, which might be helpful to someone (I cannot achieve the animation I like with shape keys I think however, as applying my bend modifier as a shape key results in an unwanted animation).
Update 2: I've included my testing file in this question, it already contains the modifier based opening/bending animation of the gate.

Even with your gate open the container fills? I expect the mesh is enclosing the water and the opening is ignored. Try adding some thickness to the purple container so that the fluid flows around it.

Yes, even with my gate open the container fills (or did you mean to remove the animation and just have an open gate and see if the problem persist?). I do no think the opening is ignored per se, as it's only ignored sometimes (i.e. it works as an opening  probably depending on mostly the fluid settings). As said, the purple container already has some thickness, but I could at more I guess. I'm not really sure what you mean by fluid "flowing around it" though. The container is filled properly, and surely you don't mean fluid flowing on it's outsides?

With solid walls it should be easier to determine the outside that it can flow around, instead of being an enclosed container. Try without the gate being there to see if that is stopping it, maybe the gate animation isn't registering. Also try higher resolutions, more detail may allow it to fit through the hole. Do you get the same result in preview and final resolution?

Higher resolutions make the problem worse, as it ended up working when I decreased the resolution to about 30 at one point, and then it stopped working when I increased it to 60+ (as stated in the question). I have not observed any differences when changing between preview and final resolution.  I will try your other suggestions in a bit.

The hole is super large btw, so that's also not it. (remember, i had it working sort of okay at one point, but I forgot most of the settings and some of those were super problematic anyway)

Okay so, disabling the animation and starting with an open gate lets the water flow through, which imo means that the problem almost 100% lies within the animation. Any ideas? (my original post contains some info about the animation)

Could it have to do with the fact that my animation is made by a modifier, but the fluid modifier is applied first so that the fluid modifier does not see the animation modifier?

Oddly enough, the fluid does seem to follow the animation when using shape key animation instead of animating a modifier property directly. Unfortunately, applying my modifier as a shape key creates a different animation compared to animating the property of the modifier.

Did you check Export Animated Mesh for the gate? It's animated with modifiers, you need to tell the engine to use the end-result.

I did, same results unfortunately. That setting looked really promising though!

@rien333 That is weird, that should have fixed it.. The last thing that comes to mind is to try with armature animation instead of modifier animation. If all failes, could you upload this test file to https://blend-exchange.giantcowfilms.com/? Maybe there is a fix, maybe it's a bug to be reported. Happened several times.

I wasn't really looking to do an armature animation because that will probably take me a bit of time, but it seems like the best solution indeed for now. (I'm using a shape key based animation now, which works, but it's a total mess because of some unrelated stuff)  I'll upload the file in a bit and put it in my question.

The problem is that the Fluid Sim on the obstacle is being applied before the bending of the door has been applied. This means that the fluid sim is taking into account only the 'original' shape of the object - not the one after the modifier has been applied - see the modifier stack showing the FluidSim above the SimpleDeform in the modifier stack in the following image :

For the fluid sim to take account of the 'new' shape of the obstacle, it must take place after the deform - so it must be below the deform in the stack. Simply click the arrows to move the Fluid Sim below the Simple Deform to allow the fluid to flow through the open gate.

Ha yeah your right, in my answer i was thinking he somehow had a malicious object, thus i added a fresh plane to perform the same order of modifiers.

hmm, I already have had a suspicion this was the culprit, but I remember that when I tried it out on my actual project file the result still didn't come out as expected . I'll recheck now, thanks for the input and if it works I'll accept your answer!.

I found a way how you can solve this in a "relative" quickly way.
Add a plane to your scene, subdivide length in 2 then subdivide it 10 times or so. Then Shrink wrap this plane, on your animated object.
Remove the fluidsim obstacle from your animated mesh.
For the Shrink wrapped plane, Add fluidsim (trough add modifiers!!!)
Then you get a non specific fuidsim control below it, it has a small properties icon, click it, set it to Fluid obstacle and animated mesh.
Below i add this working solution, note that I tuned the plane a bit.
Because shrink wrap had to fit in both open and close position.
Therefore i bended it, also I added another plane width fluid collision against leaking at the bottom.
Here is my final solution for this problem... btw it was a nice puzzle !!!

The only thing left todo is give those planes invisible materials, so you wont see them in final render.

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


text:
Scripting: separating selection results in edgeless mesh
Whenever I use a script to separate a mesh by means of a selection the separated mesh contains no edges (only vertices). In contrast, separated meshes always contain edges when either manually selecting and separating  within the GUI or selecting manually and then separating in the python console. I use the following code to separate a mesh:
bpy.ops.object.mode_set(mode='EDIT')
bm = bmesh.from_edit_mesh(bpy.data.objects['OBJECT_NAME'].data)

# Generate a certain set from vertices from the bmesh
# This function only generates vertices that are connected by edges
# and form a rectangular shape over the mesh
vertices = get_some_vertices(bm)

for v in vertices:
    v.select = True
    bm.select_history.add(v)
bpy.ops.mesh.separate(type='SELECTED')

If make a selection manually, and then just run >>> bpy.ops.mesh.separate(type='SELECTED')
in the console the result contains edges, as expected.
Can anyone reproduce this or explain why my new mesh does not have edges given my code?
$ blender --version # (tried another version as well)
Blender 2.79 (sub 2)
build date: 2018-02-22

My end goal is to nicely fill in my separated selection with the "F" key, so if anyone knows how to do so for a set of unconnected vertices programmatically that would also help.

Instead of selecting vertices of the bmesh, one should additionally select the corresponding edges and faces to create a new mesh containing them. It seems that when programmatically operating on a bmesh blender is a bit more literal on what you select than it is when selecting manually in edit mode.

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


text:
Can't run blender
Blender suddenly stopped working on my PC.
Can anyone help me pls.
When i try to run it. I get following error
blender: error while loading shared libraries: libncursesw.so.5: cannot open shared object file: No such file or directory

Sounds like the kind of problem that may require uninstalling and reinstalling Blender. I'm not speaking from experience, it's just that if library files are missing or corrupt, your installation could have problems with it... or there could be problems with your hard drive. It's hard to say.

I tried uninstalling  but it didn't work.


text:
How to add ringing artifacts?
A ringing artifact is one where edges will have a sort of high-contrasting banding pattern across them. https://en.wikipedia.org/wiki/Ringing_artifacts

Even better would be to have multiple ringing bands, as seen here using a sinc filter:

I already have one way of adding this type of artifact by resampling it with a windowed sinc filter in ImageMagick, but I would like to be able to add this in blender directly. How do I do this?

@cegaton I already have a better way to do it that I linked to. But yes, if there were no other way I definitely might try that.

Try using a Sharpen filter in the compositor:

You could add a blur node after sharpen to optain something closer to the example


text:
Why can't I add cuts to a shape?
I am trying to add cuts to a shape to give it a bent shape. The object is the back pane of a foldable chair.

But when I try to select the shape (L) and add cuts (ctrl + R), the cuts I add do not appear on the shape... but cut numbers show up in the text bar on the bottom.

Maybe there are other ways to do this, but I have a beginner level, and tried many different ways to do this already.
Among the other ways I tried to do this; I tried starting from a flat cube then added cuts but adjusting the top left and top right curves to the existing frame made the shape of the grid too skewed to later on give it a curved round shape.
I also tried selecting the excess angles on top with the C selection shape and removing them but it looked way too messy.
I also tried flattening two cylinders and I was planning on merging them together but that didn't work either.
The current shape I have, I got it by creating a thin torus, removing 3/4ths of it all around, and the inside faces, then I duplicated it and rotated it on the other side then joined the opposite vertices.

See http://blender.stackexchange.com/q/17870/599

I don't see this as a duplicate. If it were me, I'd switch to edge select mode, select the two edges across the bottom, and subdivide them using the subdivide tool, and increasing the number of divisions to 3. Then using the three sets of vertices in the bottom edge, create the radial geometry for the back. (

can you make this an answer to be upvoted/accepted and close the question? thanks


text:
Changing the scene
I have tried changing the scene, but it doesn't seem to work. Am i missing something?
bpy.ops.object.select_all(action='DESELECT') #deselect all object

bpy.data.objects['inner.002'].select_set(True)

obj = bpy.context.window.scene.objects['inner.002']
bpy.context.view_layer.objects.active = obj

bpy.context.object.display_type = 'TEXTURED'

bpy.data.screens["Layout"].shading.show_xray = True
bpy.data.screens["Layout"].shading.type = 'WIREFRAME'

First start with the window, most people will only have one window open, but when there are multiple windows, each can show a different scene.
win = bpy.context.window_manager.windows[0]

In 2.80 the current scene is a window property.
win.scene = bpy.data.scenes['Scene.002']

In 2.7x the current scene is a property of the active screen layout -
win.screen.scene = bpy.data.scenes['Scene.001']

But then what your sample code is trying to do is change properties of a visible editor, which isn't changing the scene, you need to dig a bit more for these properties. The relevant properties have also changed in 2.80.
In 2.80 the 3D viewport shading options are within the shading property -
for area in win.screen.areas:
    if area.type == 'VIEW_3D':
        area.spaces[0].shading.type = 'WIREFRAME'
        area.spaces[0].shading.show_xray_wireframe = True
        area.spaces[0].shading.xray_alpha_wireframe = 0.5

In 2.7x we can set wireframe display as part of the 3D viewport properties, the equivalent to wireframe x-ray is occlude geometry, which is an edit mode feature.
for area in win.screen.areas:
    if area.type == 'VIEW_3D':
        area.spaces[0].viewport_shade = 'WIREFRAME'
        area.spaces[0].use_occlude_geometry = False


text:
Animated difference boolean with displacement texture - Empty mesh error 2.8
I am new to Blender,and I got a problem with animating boolean object with displacement texture.
In some frames it works, it cut the inside of the object and in some frames object is empty. No matter which option of texture I am tweaking - there always would be errors somewhere.
The only way when it’s working as it should is when I use soft textures (clouds eg.) But I need this “brickish” effect.
Things tested:

Added and applied more subdivisions to both objects, does not work.
Changing texture coordinates from “global” to “object” helps much
(not completely) to this problem, but I need my surface changing

GIF first shows what’s happening, and then how the cutting mesh looks like.

I would appreciate any help.

Blender 2.8 is not stable right now, I do encounter these kinds of problem when rendering animation. It seems that some of the frame Blender render it with a wrong context.
Usually I will try to manually change the frame and render it as a fixed image. And if image is fine, I will use a script to do the animation rendering rather than ctrlF12.
bl_info = { "name":     "Auto Renderer",
            "category": "Misc",
            "version":  "0.0.1",
            "Authur":   "hikariztw (Taiwan)",
            "blender":  (2, 80, 53),}

import bpy

class AutoRenderer(bpy.types.Operator):
    bl_idname = 'common.auto_renderer'
    bl_label = 'Auto Renderer'
    bl_options = {"REGISTER"}

    start_f: bpy.props.IntProperty(
        name="Start Frame",
        default=1)
    end_f: bpy.props.IntProperty(
        name="End Frame",
        default=30)

    def invoke(self, context, event):
        return context.window_manager.invoke_props_dialog(self)

    def execute(self, context):
        self.file_path = context.scene.atrender_folder_path
        for i in range(self.start_f,self.end_f+1):
            bpy.context.scene.frame_set(i)
            bpy.data.scenes['Scene'].render.filepath = self.file_path+str(i)
            bpy.ops.render.render( write_still=True )
        return {'FINISHED'}

class AutoRenderPanel(bpy.types.Panel):
    """AutoRenderPanel"""
    bl_idname = "VIEW3D_PT_autorender"
    bl_label = "Auto Render"
    bl_category = "Render"
    bl_space_type = "VIEW_3D"
    bl_region_type = "UI"

    def draw(self, context):
        layout = self.layout
        ###### RENDER
        layout.prop(context.scene, "atrender_folder_path")
        layout.operator(AutoRenderer.bl_idname,\
         icon='AUTO', text='Start Render')
        ######

classes = (
    AutoRenderer,
    AutoRenderPanel
)

def register():
    for klass in classes:
        bpy.utils.register_class(klass)
    bpy.types.Scene.atrender_folder_path = bpy.props.StringProperty(
        name="Directory",
        description="Where to render to",
        default="C:/test/where/",
        subtype = 'DIR_PATH')

def unregister():
    del bpy.types.Scene.atrender_folder_path
    for klass in classes:
        bpy.utils.unregister_class(klass)

if __name__ == "__main__":
    register()

the script add a panel in right of 3D-View panel

Press the button and set what you want to render. The main window freezes during the rendering process, you can open system console to see the process and status.


text:
Blender class register issue
I'm getting an error when trying to register a class. I'm sure it's something silly, but tried google, looking at templates and looking at the manual without luck. Here's the code:
import bpy

class MESH_OT_L(bpy.types.Operator):
    bl_idname = "mesh.L"
    bl_label = "delSplitNormals"
    bl_options = {"REGISTER", "UNDO"}

    def execute(self, context):

        selection = bpy.context.selected_objects

        for o in selection:
            bpy.context.view_layer.objects.active = o
            bpy.ops.mesh.customdata_custom_splitnormals_clear()

class VIEW3D_PT_dansTools(bpy.types.Panel):
    bl_label = "L"
    bl_category = "L"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'

    def draw(self, context):
        self.layout.operator('mesh.L')

def register():
    bpy.utils.register_class(MESH_OT_L)
    bpy.utils.register_class(VIEW3D_PT_dansTools)

def unregister():
    bpy.utils.unregister_class(MESH_OT_L)
    bpy.utils.unregister_class(VIEW3D_PT_dansTools)

if __name__ == "__main__":
    register()

Anyone any ideas?
Error in console
RuntimeError: Error: Registering operator class: 'MESH_OT_L', invalid bl_idname 'mesh.L', at position 5

What error? And your bl_idname seems to be not correct format. python - bl_idname requirements for 2.80

Also execute(self, context): in the Blender Operator subclass must return {'FINISHED'} or {'CANCELLED'} in the end - otherwise you get another Error trying to launch it

The bl_idname of MESH_OT_L should be lower case and one dot only, which is: mesh.l.

You need to follow the naming convention that Blender API required. It is kind of meta type that Blender used to organize the components that addon gonna registered.
And also you should use MESH_OT_L.bl_idname in your panel for clearance and flexible to change your bl_idname since it will warn you if MESH_OT_L is not found or missing bl_idname.
It is surely included in the page that you point out: Reference/Release Notes/2.80/Python API/Addons - Blender Developer Wiki
But it is not that clear why should lower case id been used (it is a former convention rather than 2.80 change)

I see, thanks! Looks like I need some more time with the manual and getting used to the conventions.

It could be confusing at the first time, manual didn't "strictly" list out the convention and give more valid and invalid example.


text:
Reading inputs from an xbox controller?
I'm trying to read inputs from an XBox 360 controller in Blender 2.8 however my scripting knowledge is limited.
I think I would have to install this python module/library/whatever the heck its called https://pypi.org/project/inputs/ but unfortunately I have no idea how to do that and every tutorial/instructions I read on the subject might as well be written in hieroglyphs. I understand "installing with pip" is a thing and I think Blender 2.80 comes equipped with this tool but that doesn't mean much to me.
This doesn't seem like a difficult problem but installing python modules is above my head. If anyone could break the process down in layman's terms, I would be eternally grateful, or if there is another way of doing this that I'm not seeing please feel free to share.
The ultimate goal of this endeavor is to use the controller as an animator's tool, that is using the joysticks and buttons to perform actions in Blender. That part I'm confident I can wrap my head around it's just getting the actual inputs that's stumping me.

Related: https://blender.stackexchange.com/questions/139718/install-pip-and-packages-from-within-blender-os-independently, https://blender.stackexchange.com/questions/56011/how-to-install-pip-for-blenders-bundled-python

pip is a tool for an operating platform to install some package in a organized way. Those packages are provided by community in some repositories. Most of the python package dev will distribute their work in there for easy installing. And Blender use an individual python build contained in installed directory. While pip is not directly linked to that environment. So the links provide some method to  achieve pip in python console.

@Hikariztw followed those links as closely as possible and still no luck.

Assuming your are using Windows Platform:
Open your python bundled in Blender to enter a Python interactive console.

Type down following code one by one line (#line can be ignored):
import subprocess
import sys
# enable pip
subprocess.call([sys.executable, "-m", "ensurepip"])
# upgrade pip to latest version
subprocess.call([sys.executable, "-m", "pip", "install", "--upgrade", "pip"])
# install any package
subprocess.call([sys.executable, "-m", "pip", "install", "inputs"])

Thank you so very much! This worked like a charm. For future visitors (in case it's not glaringly obvious) in the last line you would replace "inputs" with the name of whatever package you're trying to install...in quotations of course. Mine just happened to be inputs. Just noting for the programming challenged like me. Thanks again @Hikariztw

Just about to warn you. These code, especially subprocess.call, is extremely dangerous command that call another python process, which can run arbitrary codes that might harm your system and file. Check the code carefully and run if you meet another code use these command


text:
How to enable add-ons via scripting?
I am trying to install and enable the add-on using the API on CentOS 7.6.1810 64bit. The add-on can be installed into add-on folder and there is no error reported when I enable the add-on. However, the status of the add-on just keep false. I tried enable and disable the internal add-on, and it works fine. This is the script I used to print all add-ons and enable my external add-on:

Q: How to enable add-ons using via scripting?

What is the error message? It would be helpful if you paste your code instead of image.

Hi. If you need to include code please paste it in to the question instead of just adding an image of it. This will make it easier for people to test your code. At the minute they would have to type it out themselves. Thanks.


text:
Change color space of image texture node using python?
I have trouble to get a script working within Blender 2.8. What is the correct way to change Color Space mode of an image texture node?
node_opacity = nodes.new(type="ShaderNodeTexImage")
node_opacity.colorspace_settings.name = "Linear"

The colorspace is shown from the image data, it is not a node property.
node_opacity.image.colorspace_settings.name = 'Linear'

Wow..  I wouldn't expect to have to reach for the string value of its name..

@RobinBetts despite the name, it is an enum. Will throw an error if you set it willy nilly enum "willynilly" not found in ('Filmic Log', 'Linear', 'Linear ACES', 'Non-Color', 'Raw', 'sRGB', 'XYZ')

Thank you for the command, but when I set the image to Linear my normal map baked becomes black it loses all his informations.

If you would like to reference it with the node property, you can do
bpy.data.materials[0].node_tree.nodes['Image Texture'].image.colorspace_settings.name='Linear'


text:
Can Pixar USDZ files imported into Blender?
Can Pixar USD files (USDZ) be imported into Blender?

Have you solved this problem? I've tried the following add-on and it didn't work: https://github.com/robmcrosby/BlenderUSDZ

Yes. Download the latest version from here: https://github.com/robmcrosby/BlenderUSDZ
In Blender: Edit > Preferences > Addons > Install > Select the zip and make sure the add-on is enabled.

Related: How to download and install an add-on hosted on github properly?

Yes. In my case it worked simply by renaming the file with .usd.zip extension then unzipping it and importing it as USD in Blender.


text:
How to properly import an obj with all materials and textures using python?
I'm just about to import an .obj mesh to Blender and render it all by using a python script.
There are three files: .obj, .mtl and an image texture. I've checked the three files and confirmed they are in correct formats. I tried to manually import it to Blender and everything works well.
However when I use bpy.ops.import_scene.obj to import the mesh, even I set filter_glob="*.obj;*.mtl", the render result has no material as well as no texture applied.
Q: I would like to know whether I need to set any additional parameter to make it work...?


text:
How can I improve my mesh imported from Sketchup?
I have created a mesh in Sketchup Pro, imported using a plugin in an older version of Blender, and then opened the file in the latest build. As you can see the Mesh looks awful. As I plan to use Brick and tile textures, I'm guessing I will need to do some cleaning of the mesh first?
Is there a better way to import the files that will give me a cleaner mesh? I have the pro version, so lots of options. Do I need to add Loopcuts and new edges everywhere to get rid of the triangle faces?
Any advice on where to go next to make texturing simpler would be appreciated.

Regarding the "the mesh looks awful":  religiously using quads is not the holy grail. thing is, every renderer has to break down the objects to render into tris anyways. that said, yes, its recommended to still model properly for ease of selection. this mesh is a great example of why I personally dislike booleans. its just the way meshes turn out when you do it. regarding the texturing process: what you need to do is unwrap the faces, it doesnt really matter if they're quads or tris. (it'd be qy< trickier if you had an organic mesh, too).

for example: select one of the facade faces, then hit "CTRL + ALT + L" to select all the other facade tris (you might need to change the degrees by which it selects). go into the front view by hitting "numpad 1" (or the appropriate direction regarding the selected side of your house) and on top of t he viewport hit UV -> project from view. you can afterwards adjust the result in the uv editor.

Is there a better way to import the files that will give me a cleaner mesh?

This is less a Blender question at this point than a Sketchup question; The import isn't making all the tris, Sketchup is. Perhaps see if there's a "quads" export option.
Assuming that isn't an option  (because if it is, you can stop reading), you have two options;
1: Retopologize the mesh (either by modifying the current mesh, or by making a new mesh on top of that one with the intention of recreating the same shape with a different edge flow)
2: Don't model in Sketchup first (obviously not applicable for this model, this is future-looking).
If my memory of Sketchup holds true, it isn't concerned with per-vertex manipulation, it just allows you to make shapes and plunk them together. That said, you will always get haphazard meshes from it. If you start with Blender, you can keep edge-flow in mind from the get-go, and you can skip all the cleanup or remeshing.

Do I need to add Loopcuts and new edges everywhere to get rid of the triangle faces?

No. Yes. Kind of both, depending on what you need;

If the mesh needs to be one continuous part with no missing faces (otherwise referred to as "manifold"), then you do have to make loop cuts if you want consistent edge-flow (particularly on meshes that use subdivision modifiers).
If is can be multiple parts, you could make, for example, one part for a roof section, and one part for the walls. Then, if you want to add a windows, you wouldn't need to loop cut all the way around the roof every time.

Also, in general, if you are working on hard surfaces (mostly non-biological, like a house, or a car) you can forgo loop cuts throughout the model by carving up a face, then terminating the edges locally. For example, let's say you started with this house (forgive the quick model);

Now, you want to add a door here, but then these would be the loop cuts;

Yuk. Instead, you could add the following edges;

Now you can extrude out that one face, and you have the start of a door;

(Then maybe you add a door frame, get a little fancier, etc etc);

Of course, this is all well and good, and everything is still in quads, but it can be argued that you've traded one problem (bad edge flow) with another (poles). What's a pole? Any vertex with more than 4 edges. We've created 2;

Now, this is a VERY wide topic, so you'll want to research both edge flow and poles, but the short version - in this specific case - is that
1: This is a solid structure that might be subdivided, but won't be distorted (like a human elbow or shoulder model might need to deform). So the poles shouldn't be an issue
2: We've hidden them in an out of the way area (which also applies to a human model). At some point or another, many models will end up with poles, even subdivided biological ones. The key is to hide the pole (and thus, the potential artifacting and UV issues) somewhere out of the way (like a rafter, or an arm-pit, or a nostril).
The above example works on windows as well. Not only would you have cut through the roof;

You would have cut through the entire middle of the house (and any other details along the way);

Oof. But we can apply roughly the same process as before. You can use "cut" (the "k" key) to draw the basic shape (hitting enter at the end);

Then use "cut" again to fill in the missing edges (one at a time, hitting enter after each);

Two windows can be achieved with the following pattern;

Of course, now we have 4 Tris. If you want to reduce that to 2, you can add a single loop cut (instead of the 4 you might have tried before, one for each left and right side of each window);

Then you arrange the edges like this (and maybe extrude some faces for window frames, first pulling them out, then pushing them back in);

You could get rid of all Tris, but at this point it's a game of "how badly do I want to have all quads, and what kind of edge flow do I want to maintain?"

Hope this helps!

Of course, if the roof and walls were separate objects, you wouldn't need to worry so much about edge loops. In fact, the windows and doors might be separate objects too, and you can avoid most edge loops all together :)


text:
Inset specific faces and extrude them afterwards - Python
I'm quite new to blender-python so forgive me if there are some things I don't get right...
I try to model some cables with the Blender Python API. I came to the point where I need to inset the ends of the cables and extrude them (represents the copper ends of a wire). I searched online but could not find a good solution for my problem.
This is my code so far:
import bpy
import math
import random
import bmesh

#define number of Cables
numberOfCables = 2
count = 0

#clean scene (delete all objects inside
def clean_scene():
    for things in bpy.data.objects:
        bpy.data.objects.remove(things)

clean_scene()
#bpy.ops.object.select_all(action='SELECT')
#bpy.ops.object.delete(use_global=False, confirm=False)

#Main Programm
for i in range(numberOfCables):

    #define random values for location and size
    X = random.uniform(0,5)
    Y = random.uniform(0,5)
    randomRadius = random.randrange(15,50,5)/10000 #random thickness ranging from 3mm to 8mm
    randomLength = random.uniform(0.3,1) #random length ranging from 30cm to 1m
    randomSeed = random.uniform(0,10)
    #print(randomRadius)

    #create Curve
    def create_Curve():
        bpy.ops.curve.primitive_nurbs_path_add(radius = randomRadius,
                enter_editmode = True,
                location=(X,Y,1))
        return bpy.context.object

    obj = create_Curve()

    #randomly place vertecies to have different "cables"
    bpy.ops.transform.vertex_random(offset=.5,
            uniform=5,
            normal=5,
            seed=randomSeed,
            wait_for_input=True)

    bpy.ops.object.editmode_toggle()

    #defining a volume for the cable
    def create_Cable():
        bpy.ops.mesh.primitive_cylinder_add(radius=randomRadius,
                depth=randomLength,
                enter_editmode=True,
                location=(X,Y,1))
        return bpy.context.object

    cable = create_Cable()

    #loopcutting the Cylinders for flexibility

    def view3d_find( return_area = False ):
    # returns first 3d view, normally we get from context
        for area in bpy.context.window.screen.areas:
            if area.type == 'VIEW_3D':
                v3d = area.spaces[0]
                rv3d = v3d.region_3d
                for region in area.regions:
                    if region.type == 'WINDOW':
                        if return_area: return region, rv3d, v3d, area
                        return region, rv3d, v3d
        return None, None

    region, rv3d, v3d, area = view3d_find(True)

    override = {
        'scene'  : bpy.context.scene,
        'region' : region,
        'area'   : area,
        'space'  : v3d
    }

    bpy.ops.mesh.loopcut_slide(
        override,
        MESH_OT_loopcut = {
            "number_cuts"           : 100,
            "smoothness"            : 0,
            "falloff"               : 'SMOOTH',
            "edge_index"            : 2,
            "mesh_select_mode_init" : (True, False, False),
            "object_index"          : 0
        },
        TRANSFORM_OT_edge_slide = {
            "value"           : 0,
            "mirror"          : False,
            "snap"            : False,
            "snap_target"     : 'CLOSEST',
            "snap_point"      : (0, 0, 0),
            "snap_align"      : False,
            "snap_normal"     : (0, 0, 0),
            "correct_uv"      : False,
            "release_confirm" : False
        }
    )
    #back into OBJECT Mode
    bpy.ops.object.editmode_toggle()

    #apply Cylinder to shape of the Curve
    cable.modifiers.new(type='CURVE', name='applyShape')
    #Select Curve
    #Still Problem with NurbsCurve
    if count == 0:
        cable.modifiers["applyShape"].object =  bpy.data.objects["NurbsPath"]
        cable.modifiers["applyShape"].deform_axis = 'POS_Z'
    else:
        a = "NurbsPath."
        b = str(count).zfill(3)
        cable.modifiers["applyShape"].object =  bpy.data.objects[str(a+b)]
        cable.modifiers["applyShape"].deform_axis = 'POS_Z'

    #Increase Count by 1 to go into else loop in line 115
    count += 1

    #move Cable along Z axis to align more with Curve
    bpy.ops.transform.translate(value=(0, 0, 0.6))

Please be patient I know it is kinda messy...
And everything after the for loop (under #Main Programm) should be indented but something is messed up here so I can't indent it.

Now as I said I need to inset the end caps and extrude them so that it looks like this.

If here is anyone out there helping me I would really appreciate that! Thank you very much!
P.S. I also have a Problem with randomising the vertices only in X and Y direction (I want the cable to be "flat") I only found the bpy.ops.transform.vertex_random function but it also randomises the vertecies along the Z axis.
So if there is a solution to this as well I would really appreciate that!

I've written a library called Blogo (https://github.com/mlewis109/blogo) which (I think) will help you a lot with what you want to do.  It allows Blender python to be written in a similar way to the Logo programming language.  You define a cross section - such as a circle for a wire - and then this is swept through space using commands like "forward", "left", "right", "up", etc.  You can easily change the cross section to put the cap on the end how you want.
For example:
# Draw a wire with a random squiggle in it in the xy plane
def create_wire(wire_radius, wire_length, wire_colour, cap_colour):
    wire = Blogo()
    # store starting position
    pos = wire.get_pos()
    # turn around to draw the connector
    wire.right(180)
    draw_end(wire, wire_radius, cap_colour)
    # turn back and go back to start
    wire.right(180)
    wire.pen_up()
    wire.set_pos(pos)
    wire.pen_down()

    wire.set_texture(wire_colour)
    wire.set_cross_section("circle", wire_radius)
    direction = 0
    step_length = 0.01
    # make lots of turns, each similar to the last but randomly different
    for turns in range(int(wire_length/step_length)):
        min = -1
        max = 1
        # bias the turns back towards straight
        if (direction > 2):
            max = 2/direction
        elif (direction < -2):
            min = 2/direction
        direction += random.uniform(min, max)
        # turn by a small amount then go forward by a small amount
        wire.right(direction)
        wire.forward(step_length)
    draw_end(wire, wire_radius, cap_colour)
    return wire

# Draws either end of the wire, with a plastic protector and metal connector
def draw_end(wire, wire_radius, cap_colour):
    wire.set_texture(cap_colour)
    # make cap slightly bigger than the wire
    wire.set_cross_section("circle", wire_radius*1.1)
    # make the end of the cap narrower
    wire.add_width_func("all", "curve_end", curve_length=0.3, curve_width=wire_radius)
    # cap is 1cm long
    wire.forward(0.01)
    # remove the narrowing end
    wire.add_width_func("all")

    # add a metal connector
    wire.set_texture("grey")
    # Cross section shape of the metal connector, these coordinates represent a trapezium,
    wire.set_cross_section([(-0.5,-0.25),(0.5,-0.25),(0.3,0.25),(-0.3,0.25),(-0.5,-0.25),(-0.29,0.24),(0.29,0.24),(0.49,-0.24),(-0.49,-0.24)], wire_radius*0.9)
    # go back into the wire by 5mm to get a good connection and then forward 1cm
    wire.backward(0.005)
    wire.forward(0.01)

# draw a red wire 5mm thick, 1m long with a blue cap
create_wire(0.005, 1, "red", "blue")

Results in:

Wow I don't know what to say! That result is truly amazing! The work and effort you put into this is insane thank you.
You created a very useful tool for many people out there! This will definitely boost the quality of my work!


text:
2D Bounding box around object for different camera's (different positions) - Blender 2.9
I am a beginner in Blender and Blender scripting. Currently I am trying to create a script that automatically renders images of a single object from different camera viewpoints. I use the following setup:

I have a text file with the different camera poses (position and orientation) w.r.t the world frame (object).

I create the object (Monkey) using the python API

I created functions such as add_camera(), add_light, render_settings, which create these 'objects' with the desired settings. The code for the add_camera function is shown below.
def add_camera(name, focal_length, x,y,z,q0,q1,q2,q3):
  cam_data = bpy.data.cameras.new(name)
  cam = bpy.data.objects.new(name=name,object_data=cam_data)
  bpy.context.collection.objects.link(cam)

  cam.data.lens = focal_length
  cam.data.type = 'PERSP'

  cam.rotation_mode = 'QUATERNION'
  cam.location = mathutils.Vector((x,y,z))
  cam.rotation_quaternion = mathutils.Quaternion((q0,q1,q2,q3))
  bpy.context.scene.camera = cam

I then use a for loop to loop over the different camera poses extracted from the textfile, creating a new camera for each pose and setting that one to be active. This works and creates the expected rendered images from the different camera views.
for pose in range(len(verts)):
    scene = bpy.context.scene
    cam = add_camera('Camera',50,verts[pose][0],verts[pose][1],verts[pose][2],verts[pose][3],verts[pose][4],verts[pose][5],verts[pose][6])
    light = add_light('Light',verts[pose][0],verts[pose][1],verts[pose][2], 500, 'POINT')
    file = os.path.join('D:/Images/', 'image_' + str(pose))
    bpy.context.scene.render.filepath = file
    bpy.ops.render.render(write_still=True)

Furthermore, I want to generate and export the 2D bounding box around that object. For the bounding box generation I am using this script which works perfectly for a single scene/instance (using e.g. last created camera). However, when I try to incorporate this in the loop, it fails and outputs different coordinates compared to simply running the aforementioned bounding box script on a single scene (camera, object and light). It often outputs the entire image size as the bounding box.
I adapted the for loop as follows:
mesh_object = bpy.data.objects['Monkey']
for pose in range(len(verts)):
    scene = bpy.context.scene
    cam = add_camera('Camera',50,verts[pose][0],verts[pose][1],verts[pose][2],verts[pose][3],verts[pose][4],verts[pose][5],verts[pose][6])
    cam = bpy.context.scene.camera
    light = add_light('Light',verts[pose][0],verts[pose][1],verts[pose][2], 500, 'POINT')
    file = os.path.join('D:/Images/', 'image_' + str(pose))
    print(camera_view_bounds_2d(scene, cam, mesh_object))
    bpy.context.scene.render.filepath = file
    bpy.ops.render.render(write_still=True)

I have no idea what is going wrong, so any help would be greatly appreciated! Furthermore, the end-goal would be to automatically write the bounding-boxes for each rendered image to a separate text file as well. The idea was to use the implementation shown here:
  def write_bounds_2d(filepath, scene, cam_ob, mesh_object):
    with open(filepath, "w") as file:
    file.write("%i %i %i %i\n" % camera_view_bounds_2d(scene, cam_ob, mesh_object))

Thanks!
EDIT: The BoundingBox script I used, followed by a script that loops over the poses. Furthermore, the datafile of the different poses is also included.
import bpy
import os

def clamp(x, minimum, maximum):
   return max(minimum, min(x, maximum))

def camera_view_bounds_2d(scene, cam_object, mesh_object):
"""
Returns camera space bounding box of mesh object.

Negative 'z' value means the point is behind the camera.

Takes shift-x/y, lens angle and sensor size into account
as well as perspective/ortho projections.

:arg scene: Scene to use for frame size.
:type scene: :class:`bpy.types.Scene`
:arg obj: Camera object.
:type obj: :class:`bpy.types.Object`
:arg me: Untransformed Mesh.
:type me: :class:`bpy.types.Mesh´
:return: a Box object (call its to_tuple() method to get x, y, width and height)
:rtype: :class:`Box`
"""

"""
Gets the camera frame bounding box, which by default is returned without any transformations applied.
Create a new mesh object based on mesh_object and undo any transformations so that it is in the same space as the camera frame. Find the min/max vertex coordinates of the mesh visible in the frame, or None if the mesh is not in view.
"""

matrix = cam_object.matrix_world.normalized().inverted()
depsgraph = bpy.context.evaluated_depsgraph_get() #Looks like this is only if modifiers and animations have been applied, it then updates this, based on the frame it is at. The scene will be updated based on the dependency graph
mesh_eval = mesh_object.evaluated_get(depsgraph)

# A new mesh data block is created, using the inverse transform matrix to undo any transformations

mesh = mesh_eval.to_mesh() #Simply keep it like this, you do not need to specify arguments
mesh.transform(mesh_object.matrix_world)
mesh.transform(matrix)

camera = cam_object.data

# Get the world coordinates for the camera frame bounding box, before any transformations
frame = [-v for v in camera.view_frame(scene=scene)[:3]] #What this does, is that it has the four corners of the camera box in world coordinates before object transformation. However, for this purpose we only need 3, top left, top right and bottom left.

#For perspective camera you need to do a transformation
camera_persp = camera.type != 'ORTHO'

lx = []
ly = []

for v in mesh.vertices: #so you loop over all the vertices of the object (for cube 8)
    co_local = v.co #Extract locations of the object in the object reference frame
    z = -co_local.z #Object in front of the camera has a negative z axis officially, so you now make it positive, to follow the convention that negative z means behind the camera.

    if camera_persp:
        if z == 0.0:
            lx.append(0.5)
            ly.append(0.5)
        if z <= 0.0:
            """ Vertex is behind the camera; ignore it. """
            continue
        else:
            # Perspective division - I think this makes it into homogeneous coordinates (divide by homogeneous w component)
            frame = [(v / (v.z / z)) for v in frame] #v.z is the camera frame coordinates world, so you loop through frame (line 46) and then
    #I think this decides on the size of the camera frame in world coordinates
    min_x, max_x = frame[1].x, frame[2].x
    min_y, max_y = frame[0].y, frame[1].y

    # max_x - min_x is the width, so you find the vertex location, minus the min location (the size of image), therefore x always positive in image reference frame.

    # max_y - min_y is the height of the camera frame (image) and then with origin of system in top left corner you will always have a positive y coordinate if in the image. This process is done for each vertex. This is normalized (dividing by width or height)
    x = (co_local.x - min_x) / (max_x - min_x)
    y = (co_local.y - min_y) / (max_y - min_y)

    #So you append the x,y location of the vertex in the image reference frame
    lx.append(x)
    ly.append(y)

mesh_eval.to_mesh_clear()

""" Image is not in view if all the mesh verts were ignored """
if not lx or not ly:
    return None

#What this does is you check all the vertices and then you calculate the image frame coordinate corresponding to it.
min_x = clamp(min(lx), 0.0, 1.0)
max_x = clamp(max(lx), 0.0, 1.0)
min_y = clamp(min(ly), 0.0, 1.0)
max_y = clamp(max(ly), 0.0, 1.0)

  #    """ Image is not in view if both bounding points exist on the same side """
  #    if min_x == max_x or min_y == max_y:
   #        return None
    # You need this to transform the normalized coordinates to the render output size
""" Figure out the rendered image size """
r = scene.render
fac = r.resolution_percentage * 0.01
dim_x = r.resolution_x * fac
dim_y = r.resolution_y * fac

""" Image is not in view if both bounding points exist on the same side """
if round((max_x - min_x) * dim_x) == 0 or round((max_y - min_y) * dim_y) == 0:
    return None

#You scale the image coordinates based on the size of the image..
return (
    round(min_x * dim_x),            # X
    round(dim_y - max_y * dim_y),    # Y
    round((max_x - min_x) * dim_x),  # Width
    round((max_y - min_y) * dim_y)   # Height
)

The script I use to loop over the different poses:
import bpy
import os
import mathutils
import csv
import importlib
import sys

dir = os.path.dirname(bpy.data.filepath)
if not dir in sys.path:
  sys.path.append(dir)

import BoundingBox
import pipeline_arch

importlib.reload(BoundingBox)
importlib.reload(pipeline_arch)

from BoundingBox import *

config_poses = 'D:/cameraPoses.csv'

def add_light(name,x,y,z, energy = 500, light_type = 'POINT'):
   # Create light datablock
   light_data = bpy.data.lights.new(name=name, type='POINT')
   light_data.energy = energy

   # Create new object, pass the light data
   light_object = bpy.data.objects.new(name=name, object_data=light_data)
  # Link object to collection in context
  bpy.context.collection.objects.link(light_object)
  light_object.location = mathutils.Vector((x,y,z))

def add_camera(name, focal_length, x,y,z, q0 = 0, q1 = 0, q2 = 0, q3 = 0):
  # Create camera block
  cam_data = bpy.data.cameras.new(name)
  cam = bpy.data.objects.new(name=name,object_data=cam_data)

  # Link object to collection in context
  bpy.context.collection.objects.link(cam)

  #Setting the camera parameters
  cam.data.lens = focal_length
  cam.data.type = 'PERSP'

  #Place the camera
  cam.rotation_mode = 'QUATERNION'
  cam.location = mathutils.Vector((x,y,z))
  cam.rotation_quaternion = mathutils.Quaternion((q0,q1,q2,q3))
  bpy.context.scene.camera = cam

 def render_settings(resolution_x = 1024, resolution_y = 1024, image_type = 'PNG', color_mode = 'RGB'):
  bpy.context.scene.render.resolution_x = resolution_x
  bpy.context.scene.render.resolution_y = resolution_y
  bpy.context.scene.render.image_settings.file_format = image_type
  bpy.context.scene.render.image_settings.color_mode = color_mode

  #Load the camera poses
with open(config_poses, 'r', newline = '') as csvfile:
  ofile = csv.reader(csvfile, delimiter = ',')
  next(ofile)

  rows = (r for r in ofile if r)
  verts = [[float(i) for i in r] for r in rows]

  #Create the objects
  bpy.ops.mesh.primitive_monkey_add(location = (0.0,0.0,0.0))
  bpy.context.object.name = "Monkey"
  bpy.context.object.scale =  (2,2,2)
  mesh_object = bpy.data.objects['Monkey']

  #Running the script over the different poses with the desired settings
  render_settings(512,512,'PNG','RGB')
  #light = add_light('Light',20,1,1,5000, 'POINT')
  file_boundingbox = os.path.join('D:/', 'bounding_box.txt')

for pose in range(len(verts)):
  scene = bpy.context.scene
  cam = add_camera('Camera',50,verts[pose][0],verts[pose][1],verts[pose][2],verts[pose][3],verts[pose][4],verts[pose][5],verts[pose][6])
  cam = bpy.context.scene.camera
  light = add_light('Light',verts[pose][0],verts[pose][1],verts[pose][2], 2000, 'POINT')
  #mesh_object = bpy.data.objects['Monkey']
  file = os.path.join('D:/', 'imageMonkey_' + str(pose))
  print(camera_view_bounds_2d(scene, cam, mesh_object))
  #write_bounds_2d(file_boundingbox, scene, cam, mesh_object)
  bpy.context.scene.render.filepath = file
  bpy.ops.render.render(write_still=True)

#Clean the scene
bpy.ops.object.select_all(action = 'SELECT')
bpy.ops.object.delete()

#Clean the data
data = bpy.data
for camera in data.cameras:
   data.cameras.remove(camera, do_unlink = True)

Datafile:
x,y,z,q0,q1,q2,q3
20,0,0,0.5,0.5,0.5,0.5
0,20,0,0.0,0.0,-0.707107,-0.707107
-20,0,0,0.5,0.5,-0.5,-0.5
0,-20,0,0.707107,0.707107,0.0,0.0
0,0,20,0.707107,0.0,0.0,0.707107
0,0,20,1,0,0,0
0,0,-20,0,0.707107,-0.707107,0.0
0,0,-20,0,0.382683,-0.923880,0.0
10,-20,0,0.707107,0.707107,0.0,0.0

ok, i am willing to help, but then i want a script example, which i can copy/paste and it works (just the script). But it doesn't ...so please extend it so that it works. thanks. or provide blend file.

Hey Chris, thank you very much. I've included the two scripts that I use and the dataset. However, in order to be able to import the script BoundingBox, you need to save the scene as a Blend file. As can be seen when running the script, it constantly prints (0,0,512,512) as the BB locations, however, running the BoundingBox script in isolation at one selected pose results in the correct BB coordinates. If there is anything unclear or you still need something, please let me know!

Often an update is required, particularly if constraints are involved. The matrices may need updating with a context.view_layer.update() or depsgraph.update() used to be scene.update() or a mesh.update() Related re creating 2d bbox  https://blender.stackexchange.com/questions/214572/constrain-a-camera-to-an-object-while-also-aligning-it-perfectly-to-the-center-o/214597#214597

will also post https://blender.stackexchange.com/a/176762/15543  could make a script to add all cameras with markers, then render animation.   On a closer look think the issue is cam = bpy.context.scene.camera should be vice versa.  Adding a new camera, but always using the first one set as scene.camera

Setup via animation system.
In an previous answer ran over some methods to set up different camera views.  By way of answer here will set up the cameras and markers in one script.  Calculate the 2d bbox in a frame change handler.
Multiple cameras and markers using data from above.

Result of running on default file
import bpy
from mathutils import Matrix, Quaternion, Vector

context = bpy.context
scene = context.scene

data = '''20,0,0,0.5,0.5,0.5,0.5
0,20,0,0.0,0.0,-0.707107,-0.707107
-20,0,0,0.5,0.5,-0.5,-0.5
0,-20,0,0.707107,0.707107,0.0,0.0
0,0,20,0.707107,0.0,0.0,0.707107
0,0,20,1,0,0,0
0,0,-20,0,0.707107,-0.707107,0.0
0,0,-20,0,0.382683,-0.923880,0.0
10,-20,0,0.707107,0.707107,0.0,0.0
'''

cam_col = bpy.data.collections.new("Cameras")

def newcam(name):
    camdata = bpy.data.cameras.new(name)
    cam = bpy.data.objects.new(name, camdata)
    cam_col.objects.link(cam)
    return cam

def addcam(i, x, y, z, q0, q1, q2, q4):
    q = Quaternion((q0, q1, q2, q4))
    loc = Vector((x, y, z))
    M = q.to_matrix().to_4x4() @ Matrix.Translation(loc)
    f = i + 1
    cam = newcam(f"F{f}")
    cam.matrix_world = M
    print(i, loc, q)
    m = scene.timeline_markers.new(name=f"R{f}", frame=f)
    m.select = True
    m.camera = cam

scene.timeline_markers.clear()
cams = [addcam(i, *args) for i, args in  enumerate(map(float, line.split(",")) for line in data.splitlines())]
scene.frame_start = 1
scene.frame_end = len(cams)
scene.collection.children.link(cam_col)

Frame change handler.
Using script from  Constrain a camera to an object while also aligning it perfectly to the center of the object (relative to the camera) even while using perspective which calculates the 2d object bbox, and creates a faceless quad as a visual at object origin.
Here I have converted this to a frame change handler, which using setup above reports the percentage of bbox displayed.
Worth noting the using the evaluated camera object.
import bpy
from mathutils import Vector

from bpy_extras.object_utils import world_to_camera_view as w2cv
import bmesh
import numpy as np

actor = "Suzanne"
create_bbox2d = False

def frame_change(scene, dg):

    ob = dg.objects.get(actor)
    if not ob:
        print("No Actor Abort")
        return None
    me = ob.data
    cam = scene.camera
    print("Frame", scene.frame_current, cam.name)
    cam = dg.objects.get(cam.name)

    bm = bmesh.new()
    bm.from_mesh(me)
    bm.transform(ob.matrix_world)
    u, v, w = np.array([w2cv(scene, cam, v.co)
            for v in bm.verts]).T
    bm.free()
    test = w > 0
    if not np.any(test):
        print("All behind camera")
        return None
    #print(u, v, w, test)
    u, v = u[test], v[test]
    u = np.where(u > 0, u, 0)
    u = np.where(u < 1, u, 1)
    v = np.where(v > 0, v, 0)
    v = np.where(v < 1, v, 1)

    bbox2d = (
            (u.min(), v.min()),
            (u.max(), v.min()),
            (u.max(), v.max()),
            (u.min(), v.max()),
            )
    dim = Vector(bbox2d[2]) - Vector(bbox2d[0])
    area = dim.x * dim.y
    if area < 1e-6:
        print("No area in image")
        return None
    print(f"Area Percent: {100 * area : .2f}")
    print(bbox2d)

bpy.app.handlers.frame_change_post.clear()
bpy.app.handlers.frame_change_post.append(frame_change)

if __name__ == "__main__":
    frame_change(bpy.context.scene, bpy.context.evaluated_depsgraph_get())

Result of changing to actor = "Cube" and running on default file.
Frame 1 F1
No area in image
Frame 2 F2
No area in image
Frame 3 F3
No area in image
Frame 4 F4
No area in image
Frame 5 F5
Area Percent:  3.80
((0.4269004762172699, 0.37004533410072327), (0.5730994939804077, 0.37004533410072327), (0.5730994939804077, 0.6299546360969543), (0.4269004762172699, 0.6299546360969543))
Frame 6 F6
Area Percent:  3.80
((0.42690056562423706, 0.37004542350769043), (0.5730994343757629, 0.37004542350769043), (0.5730994343757629, 0.6299545168876648), (0.42690056562423706, 0.6299545168876648))
Frame 7 F7
All behind camera
Frame 8 F8
All behind camera
Frame 9 F9
No area in image

ie on frames 5 and 6 cube is  about 4% of camera frame... seems ok going by, by eye, estimate area of rectangle using one fifth of both sides.
Notice too that am clamping the verts to UV range if outside.  If the actor is in front but all to the left of the camera view all points on line u = 1 having zero area. Would be very tempting to use in conjunction with Drawing a rectangle using opengl in blender to indicate which way to the context object (game HUD style) when in camera view.

Thank you for the example code! I got it to work! However, I needed to change the lines:
M = q.to_matrix().to_4x4() @ Matrix.Translation(loc) to  M = Matrix.Translation(loc)  @q.to_matrix().to_4x4() for the pose to be correct.


text:
What is the difference between Bone Layers and Bone Groups?
What is the difference between Bone Layers and Bone Groups? Please use blender 2.8 or later for your answers.

Bone Layers (technically Armature Layers) is a way to hide visibility of rig controls.  When accessed from the Property window, it's a bit confusing.  It's much more intuitive when seen in the "N" panel (see below)
https://docs.blender.org/manual/en/latest/animation/armatures/properties/skeleton.html#armature-layers

Bone Groups are a way to organize your rig controls by color (also allows selecting entire categories of bones).  Below, I've got IK controllers hilighted and you can see the color set associated with IK- RED for bone color, BLUE for selected bones (the left hand), LIGHT BLUE for active bones.
https://docs.blender.org/manual/en/latest/animation/armatures/properties/bone_groups.html


text:
What type of Textures are these?
So I recently downloaded a bunch of models from Animal Crossing New Horizons and I came across these textures that I've honestly no clue what to do with. The file name is "Crv" which I'm going to guess is short for "Curve" but I'm honestly not sure.
If anyone knows how to set these up in the Node Editor, please let me know.

Those look like cavity maps (aka CReVice maps)! They're basically a type of ambient occlusion map, meaning a lot of tutorials that apply to ambient occlusion in the node editor will also apply to these.
According to the Polycount wiki:

A cavity map is a texture that stores small-scale ambient occlusion. Also called a Crevice map. Cavity map is different from Curvature map which stores the convexity/concavity of a mesh.

(Source: http://wiki.polycount.com/wiki/Cavity_map)
Here's a guide on different texture map types if you're interested! It may help with identifying other textures. https://cgtricks.com/basic-guide-for-testures-map-types-yanko-stefanov


text:
Fluid domain becomes a solid block with fluid's material
I just started using Blender in the last few days and found some of it an exercise in frustration.
I've watched a heap of YouTube tutorials on creating EEVEE fluid and I think I get it (for the most part).
I can create the Domain and a Sphere as the inflow etc, and it all seems to work. I change the material to glass, etc, and I have all the EEVEE refraction settings set up to work. It all seems to look OK in Replay mode. I even can set up an HDR background.
The thing is, is that if I view the fluid animation in Replay mode, it's fine, but if I go and change the Mesh Generator to 'Final' then the whole cube that is the Domain suddenly takes on the material properties of the fluid and just becomes one solid block of glass. And when I play, it just sits there as the block of glass.
The same sort of thing happens if from the very beginning I start with 'Modular', and bake the data, particles, mesh etc separately - it all seems to work, but then if I free the data to change something, again, the Domain becomes a solid block of material, and even though it still has Domain properties etc, I can see that in wireframe mode it does not have that little cube in the lower corner that domains seem to have.
The whole thing just not seem very consistent. Can anyone help?

Related https://blender.stackexchange.com/questions/172639/fluid-simulation-domain-visible

Thanks! That helped. I guess I just wasn't being patient enough


text:
How to make faceless sphere
First of all, I'm new to Blender (v2.80). Currently working on AI project for which I need to create my data set. I need to render my object from every possible angle. I found a simple solution over here:
Script to render one object from different angles

Create a mesh whose vertices are the desired viewpoint positions,
around your body scan. (It's the sphere, in the illustration, named
'Viewpoints')
Create one camera, and assign it a 'Track To' constraint ('To': -Z,
'Up': Y) with the body scan as target

I was trying to achieve that effect, to make that sphere mesh. I just don't know how to make the sphere empty. It looks like this (my object and camera are inside of the sphere):

I'm sorry for making new post about it, I would prefer to comment that post that I'm referring to, but I don't have enough reputation for commenting posts.

Hi. Glad you liked the solution. To get rid of the faces, Edit Mode,  X (Delete) > Only Faces.

@RobinBetts no one likes the dolly lol.

@batFINGER  give it some time.. not counting chickens, here :)

I liked both solutions! Thank you a lot!

bmesh script.
Add sphere, remove only faces with bmesh in object mode
import bpy
import bmesh

context = bpy.context

bpy.ops.mesh.primitive_uv_sphere_add()
ob = context.object
me = ob.data
bm = bmesh.new()
bm.from_mesh(me)
bmesh.ops.delete(bm, geom=bm.faces, context='FACES_ONLY')
bm.to_mesh(me)
me.update()

SE should have a 'Diplomat' badge..


text:
auto Ik just doesn't work anymore
I was working perfectly then it suddenly stops working... no more automatic ik, I know someone already asked this here Bone Turns Orange And Auto IK Doesn't Work but mine doesn't turn orange and nothing of what the answers suggested works.

AutoIK is still working for me in 3.5.0.  I'd suspect your problem is that the bones you're trying to pose lack the "connected" property; autoIK uses this to determine the virtual chain length of the IK.  You can check this property by selecting a bone and looking on properties/bone/relations; you can set, in edit mode, from the same place, or through a ctrl-p set parent operation.

If Nathan's answer doesn't help, maybe share the armature so that we can test, and tell what bone you're trying to move?

Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.

@moonboots I pretty sure my file was just corrupted, I tried reimporting everything to another blender file and auto  IK started working again

@Nathan the bones were connected, have been using it for hours then it suddenly sopped working for some reason, i tried various solutions on the internet, even asked chatgpt but nothing... the only thing that worked was exporting everything as FBX then importing it again in another blender file. although it messed up all my animation names by adding "armature|armature :    " behind the name of every animation


text:
Terrain for gamedevelopement, how to paint it?
My experience level: around 8 years and always hated nodes, never used them avoided them like hell cause found everything about node logic to be counterintuitive and illogical and insesical, plus they pretty much change everything almost every few updates, I've always just used stencil painting to color my blends.
but I'm trying to make a small map, an isle of a few kilometers, split in small UV's of a few hundred meters each.
Every tutorial on youtube either does it by hand painting every single piece of dirt or uses some kind of masks that then I have no idea how would they even export all that stuff to a game engine, the stuff they show on youtube or blender reddit in general always seem like useless assets that would only work in blender and serve no purpose outside blender.
so is there a way to paint terrain for gamedev that actually exports?

Hello, if you don't feel comfortable with materials in Blender you can do it with a software like Substance Painter, Quixel, Armorpaint, etc. If you do it in Blender, you can use Image Texture as masks, then bake to an unique Image Texture, or use brush masks, etc

Some major game engines also have their own tools to handle terrains, might be worth a look in that direction.


text:
What should a proper grid for a bevel look like?
I have a box with a simple form and a bevel.
The box looks like on a picture. The bottom surface is narrower than the top surface.
The grid of the top surface is OK. But I doubt the grid of the narrow surface, there are dents here. What should a proper grid look like?

You can lower this using autosmooth shading and adding a normal edit modifier:

Normal edit with "radial" option will align all the normals with axis coming to the face from a center (which can be the object center itself of another object's center).

Hello, what does Normal Edit do exactly?

Hello, @moonboots, answer edited

It works very strange. With subD I've lost all edges in the view. I think the problem is with 3-pole on the narrow surface

yes... that may be what you want or not.

I've tried to move 3-pole inside the narrow surface and it helps. I don't know if it is correct or not, but it works.


text:
How do i render a image from my active camera when i have a sequence with an animation?
Hi there I already did some projects in Blender but now I am stuck.
I always rendered still images out of blender, now I started to make a small product animation which I also could render as images and make a composition.
My problem now is that if I want to render a still image but from another camera (selected as active) it always renders me the frame I am on in the sequence.

Would really help me to finish the project.
I attached some pictures so you see whats my still image that I want from camera 1 and what the output is from the sequence.

I'm not sure if I understand your problem correctly. You want to render a still image, but from a different frame as the one you are currently at? Why don't you just simply go to the frame you want?

Thanks for the reply. Yeah that would work but only if i have the frame in the camera. Problem is i want to render a still image from another camera, that is not in the sequence.

Got it working! i just did it like you said and put my ew camera with the frame i want in the sequence. that did the trick ;) thanks!


text:
How to seperate from an overpowered empty
a question from an experienced Blender user here... (So please assume I know what I am talking about)
One of the problems that has followed me greatest throughout my journey in Blender has been the disaster that is unparenting empties from objects and the ensuing chaos as the object mesh and texture rip each other apart.
How can I unpair an empty without causing any damage to my model? Is there a way I can almost reset the model mesh while keeping UV unwrap data?
Thank you!

Hi, Jet Winkelman. Brace yourself - expert answer is coming up. I am also very experienced and extremely skilled Blender user. I always know what I am talking about and never make mistakes. I am in fact one of the best there is in pretty much anything I do. So... yeah.

Please share your file, it's not clear why unparenting would damage the texture

Unparenting an object from its parent does not change UVs, so good news there - there is nothing you need to do about UVs in that situation.
Unparenting is quite easy, you need to select the object and hit Alt+P(you could also go to Object menu -> Parent -> Clear Parent), then choose Clear and Keep Transformation if you want the object to remain in the same global position, orientation and scale as it is while parented. You can unparent any type of object from any other type of object - it doesn't matter if the parent or the child is an empty.

If objects change some undesired, unexpected way when you unparent something, there must be some other things going on than just simple hierarchy in the scene. There are many ways objects can depend on other objects in Blender so it is hard to advise further without more information or a shared .blend file.

Thank you, I can't believe the solution was so simple! Thank you!!

@Jet Winkelman if the answer is correct, mark it as so


text:
Some fonts are not showing up
I am trying to use a font called DIN Medium, which is a Postscript font, in Blender.

However, when I browse, I cannot see the font listed in the folder:

Are my eyes failing me, or are some font formats not supported in Blender?
I couldn't find any info on this online when I searched.

I'm not sure Blender supports post script fonts directly

Thanks! maybe that's worth being converted into an answer if there's an official statement somewhere? Also I didn't find an addon to solve that, quite weird

I would but I'm not sure if this is really true. Could not find anything online from my superficial research to confirm or refute my theory.

This was all I could find, but it is far from an official statement https://blenderartists.org/forum/showthread.php?341336-Load-a-font-into-blender

On *nix systems blender uses freetype, which supports postscript fonts.
When you choose a font file the file browser applies a filter based on the filename extension. The file you show doesn't have an extension so would not be listed as a supported font file.
If the file doesn't have an extension or it is not in the list of known extensions then you can turn off the file filter so that all files are available to be selected.

Thank you! It does make the font appear in the list, but it is listed as a "0kb" file and cannot be used/selected. So if these fonts are supported, how do I use them? http://imgur.com/a/l0esl

If it isn't recognised as a font file and you can't get the font in other formats then you either need to convert it to truetype or opentype... or find another font that looks the same. You might be able to use the font in inkscape and export as svg to get the text into blender.

The installed fonts which are not shown in C:/windows/fonts are located at
C:/Users/USer Name/AppData/Local/Microsoft/Windows/Fonts
You can browse through and select the fonts..

I am sorry if this was unclear but the question is for MAC users

MicroMachine Sryy haven't noticed that..

Thanks, this did the trick for me on Windows 11.

Works in window 11 that same directory. Blender 4.0.1 If it didnt show, just relink the font. Double click on it or it wont work


text:
Object doesn't render - layer conflict?
The object on Layer 8 ("Planks") is not rendering, although it is totally visible in Viewport.
If I select all the layers together (the desired outcome), then hit Render, all the layers will render except this one. If I move the object to one of the other layers, it will still not render.
"Camera" is selected in "Ray visibility" of the Object panel.
When I go back and forth between objects to compare the Object panel of the problematic object with the others, I see no difference.
"Duplication" is not enabled in the Object panel.
In the Outliner, all three icons for display in Viewport, Select and Render are selected for the object.
I had the same problem a few months back, which was never really resolved because I couldn't share the file because of size issues (same here).
Here are the Render Layers settings - there doesn't seem to be a difference from one of the layer in the scene to another:

I tried to render with two different versions of Blender and found the same problem.

Maybe you already got it.. the problem is that your backwall has a solidify modifier which is only showing during render..if you dsiable it or move your planks a bit to the front it will work..
hope this helps..
What further confuses about this situation is that the Solidify modifier doesn't show in "Rendered Viewport" mode if the Eye isn't ticked in the modifier settings.

Thanks! This is also what the problem was in the other question I linked.

Glad i could help :)


text:
How knife project a building onto a plane?
I want to knife project my building onto a plane so that I can easily make a roof. However when I knife project the result I get the following result:

The steps I take are:

In object mode I select my building and then also select my plane.
In edit mode I select both again, set my camera to ortho and set position to Numpad 3.
I press F3, search for knife project and select.

did you tried up-res the plane ?

I have tried increasing the resolution as you suggested but it still resulted in the same


text:
Blender is encoding only the first half of my video?
I'm using Blender purely as a video editor.
I'm trying to render the final product, but every time I try rendering it, only the first 2:38 (or so) of the 6:44 minute video gets done.
When I hover my cursor over the unopened file, it lists the length at 00:06:44, but only 2:38 is viewable. I've tried adjusting things like frame rate (I've switched it to 23.98 fps like the source video instead of 24 fps), and checked that the start and end of the render coincides with the frames of the total video (so it's set to render frames 1 to 9691) but that didnt change anything. I've also tried rendering it as an FFmpeg (instead of an AVI jpeg like I've done successfully with other videos) and that let me briefly view the entire video but then became unwatchable every time I tried to open it subsequently.
What's going on? Is there a way I can fix this or maybe even expand the existing rendered file so I can see the entire video?
I tried rendering just the second half of the video. I had it start around where the cutoff was. The finished product ended up being less than a second long. I'm guessing the bit that actually showed up was the last bit of what was showing before.

You could try rendering as an image sequence, then, in the compositing editor, render as an .avi, but I have not tried this at all, and do not know if it would work.

Yes, it sounds like most likely there is some kind of error either in the rendering or the format. Does the video show up in the preview for that part? You can try rendering only the second half and see if the video is there, or if it is black, etc. Does the video continue playing to the end, just is black, or stop altogether? As mentioned, you can try an image sequence for that portion and see if it renders out. If so, you know it is at least working and showing up correctly for that portion, and must simply be a format error of some kind, not an actual issue with the rendering.

I updated the post. The finished product from the render stops playing at 2:38 like it's the end of the video. Not even a black screen. When I've tried using the render in Microsoft Video Editor, it shows the full length of the video, but at 2:38 it just shows the last image at 2:38 continuously.


text:
Rigify - How do I change 'Bend Rotation Axis' parameter using Python?
I’m trying to change this 'Bend Rotation Axis' parameter using Python: Bone Tab > Rigify Type > Bend Rotation Axis. Unfortunately, the output of the Info window isn’t shedding much light on this:

I have tried this:
 bpy.data.objects['metarig'].pose.bones['thumb.01.L'].primary_rotation_axis = 'X'

... but I’m getting the following error:

AttributeError: 'PoseBone' object has no attribute 'primary_rotation_axis'

When I hover over the Bend rotation axis dropdown, I get the following tooltip:

Q: How do I access the Rigify parameters class and assign my values?

Figured it out:
 bpy.data.objects['metarig'].pose.bones['thumb.01.L'].rigify_parameters.roll_alignment = 'manual'
 bpy.data.objects['metarig'].pose.bones['thumb.01.L'].rigify_parameters.copy_rotation_axes = [True, False, False]


text:
Calculate surface by logarithmic function?
Is there any way to use the log() function in order to calculate the surface of a mesh?

math.log(x)
Yes you can use the log method in the XYZ surface, just have to remember that log(x) will throw a math domain error for any value of x less than or equal to zero.

Bad Example using helper method a = log(u) if u < 0 else 0 the equations are x(u, v) = u, y(u, v) = a, z(u, v) = 1
Unfortunately the minima of u and v can not be set greater than zero.  To set a range for say u to [1, 2] could set up a helper method b = u + 1 and use b for u. Similarly for v

thanks for the good answer. Is it possible for you to show me how to 360° rotate this function in a script? Or is it maybe not that simple? Thanks a lot for your help!! Felix

"Rotating" in 90 degree increments will be akin to swapping formulas for  x y and z.


text:
How to remove extra materials from a mesh if the mesh has more than 1 material?
I am trying to write a little script that checks if mesh has more than one material, and if it does, remove materials until there is only one left on the item. Here is what I have so far:
import bpy
for ob in bpy.data.objects:
    number_of_mats = len(ob.material_slots.items())
    if number_of_mats > 1:
        for i in range(number_of_mats-1):
            # remove material here?

I cannot seem to figure out the method to remove a mat at this point. Any suggestions?

You can set the index of the list to 1, iterate through the upcoming slots, call and override the context of material_slot_remove(). Demo on how to remove all slots > 0:
Blender 3.2+
import bpy
from bpy import context

for obj in context.selected_editable_objects:
    obj.active_material_index = 1
    for i in range(1, len(obj.material_slots)):
        with context.temp_override(object=obj):
            bpy.ops.object.material_slot_remove()

Blender 2.8+
import bpy

for obj in bpy.context.selected_editable_objects:
    obj.active_material_index = 1
    for i in range(1, len(obj.material_slots)):
        bpy.ops.object.material_slot_remove({'object': obj})

You can also do it without operators
import bpy
for ob in bpy.data.objects:
    # Skip things without materials (armatures, etc.)
    if not hasattr(ob.data, 'materials'):
        continue

    while len(ob.data.materials) > 1:
        ob.data.materials.pop()

When I remove a material in the ui, this is echo'd:
bpy.context.object.active_material_index = 2
bpy.ops.object.material_slot_remove()

Looks like the documentation live here.
Hope that helps,
Koen


text:
Is there any way to bring smooth corrective modifier effect to unity?
Is there any way to bring a rigged model with smooth corrective modifier effect to unity?

You can apply the modifier to make its effects part of the mesh data.

oh now I'm thinking the rigging complicates this a lot, but I'll wait for feedback


text:
Decrease thickness of object
The following object, in obj format, is 1.6 mm thick and I want it to be 0.8 mm thick.  How do I decrease its thickness (from the inside, so that the outward appearance is still the same)?  When I go to Add Modifier->Solidify, it only allows me to increase the thickness, but not decrease it.
Note:  The suggested previous question does not help me much because I have thousands of faces along the edge to delete when in Edit mode (the original file was obj).

Possible duplicate of Quick way to remove solidify thickness

please show the object in edit mode to get the topology...

and / or provide a sample file  I have a bmesh script, that will need reworking if there are tris in the thickness.

Decrease thickness of object
I have made a half sphere and added some solidify modifier and applied to it. To decrease thickness or shrink down the thickness. In edit mode -> select all and press Alt+S or Mesh -> Transform -> Shrink Fatten

As soon as u click on or better press Alt+S like we scale we get a arrow to increase or decrease the thickness. After click u can press F6 for operator panel or adjustments. Click Ctrl+N to flip normal.

I guess you could simply select (eg) the internal shell, place the 3d cursor at center, select the pivot method for transforms to "3d cursor" and scale the selection:

here I scaled towards the sphere center

and here the opposite

You can't "snap" the scaling to the "middle" of the current thickness, but you can try to determine the needed scaling somehow: eg, try to scale it by increments (or using vertex snapping tools) until the inner shell matches exactly the outer one, note the scaling factor, and then undo, and scale again using a desired percentage (eg 50% of that to go from 1.6 to 0.8).
here I snapped the scaling to a vertex of the outer shell,

note the scaling in the bottom header: half of that amount, entered by keyboard while scaling, will do the job.


text:
Remove pointlight in reflection (Cycles selective lighting)
My scene contains:
1 sphere, 1 ground plane, and 1 point light.
The scene is lit with an HDR.
I'm searching for a way to disable the reflection of the point light on the ground plane. But I want to keep it on the reflecting object.
Is there a way to achieve this?

I want to get rid of this light in the reflection:

But keep this light in the reflection:

All in all - an exact reflecting copy of what's over the reflecting plane.

Here's the solution. I must confess it wasn't easy to find out...
So basically you make a list of render layers.

RenderLayer : all objects (not important in this case)
Ball: the ball alone
Ref all: all reflections (the light and ball reflections)
Ref lamp: reflection of the lamp only
Ref ball: reflection of the ball only (not required in this case)
Plane: only the ground plane

Use a ToonBSDF -glossy (cfr image below) for the ground plane material. Size: 0.001, Smooth: 0.
In the Render Layers nodes
The green box uses all reflections and lamp reflection together in order to substract lamp reflection from all reflections with the Difference key.
We combine the plane alone with the content of those green boxes with Alpha Over.
The last green box is used to go through a Blur in order to "simulate" the ground plane's roughness. It cannot be done any other way for the roughness as the input reflection needs to be very sharp in order to substract the lamp from it.
If you slide the Size of the blur down you will have a very glossy plane. If you need a higher roughness for the ground plane, duplicate the blur and add its duplication to its output node.

You can use a mesh light, with some fun light path tricks:

Customize however you desire.


text:
Cyan Color Origin Point, but Only One Scene
I have already read Cyan origin dot mystery, so please don't close this question as a duplicate of it.

In the above linked question, Ray Mairlot explains that a cyan origin point can be caused by an object being in multiple scenes. He includes a screenshot of the Properties panel > Object tab, which shows that there are two copies of the object across the scenes. Here is the screenshot:

I have a cyan origin point, but only one scene. I do have multiple copies of the object, though, like shown in the second screenshot. Where is my other copy of the object and how did it occur?
Here is my .blend:

I downloaded your file, every dot is orange!

@joshsanfelici The dot in the screenshot belongs to an Empty > Plain Axes inside the piano used for Object Texture Coordinates. Did you check it?

Oops, I didn't notice. Yes it's cyan and I don't know why (I think it shouldn't: I deleted all the objects one by one, it remained the empty with two items, then I deleted it and nothing remained).

I think you have managed somehow to corrupt some objects.You can select all the objects in the scene and then delete them.2 of them dont get deleted (you can these 2 in the outliner)(Also that might be caused by moving blender files that you appended in your current project)Maybe the blue dot is related to this somehow.

Maybe the empty shares data with the 2 corrupted objects?(Plus thats why its cyan?)


text:
Pros and Cons of Branched Path Tracing
To start, I am familiar with What is branched path tracing and how is it useful?
That answer is great, but I am wondering with all the pros of Branched Path Tracing, like...

Splitting rays
Advanced control over sampling
Reducing fireflies
Overall greater realism

...it seems that there are no cons, yet Path Tracing is still the default. I guess what I'm asking is why shouldn't I use Branched Path Tracing?

@root I would be on a GPU.

In my experience it just doesn't always help, especially on CPU.  But in certain scenes it can dramatically reduce my rendertimes.

@ShadyPuck  Sorry, hit enter instead of backspace.

@PGmath Ok. I will be posting a follow-up question with the scene that I'm working with.

I've tested tens of scenes using BPT and regular PT and so far there are no major cons at all when using BPT.
Some somewhat minor issues would be, knowing how to tweak the settings manually and slower viewport refresh during the first few samples (samples in BPT are slower)...
Other than that the its easier to test your models using regular PT and at the end of your scene switch to BPT when you know all the details of the shaders you are using...
As far as CPU vs GPU it seems to work the same, meaning it always beats regular PT, at least in all my tests, probably older (2015-2016) versions of Blender had no advantage using CPU, but as far as newer versions (2.78 and up) it is the better.


text:
Multiple Limit Distance Constraints
I will say that I've looked at a question called, "Distance constraints between objects/vertices/edges," but it didn't help.
I am not sure if this is a known bug or if it is meant to be this way, but when I add two Limit Distance constraints to an object (empty), the second negates the effect of the first. I would like it if when the empty translates to the maximum distance between the two objects, the objects stop separating.
For example, I was working on a project to answer a question concerning hinged objects and I had almost everything worked out. For the bottom left joint, connecting the triangle to the bottom bar, I used an empty with Limited Distance from the bottom bar and Limited Distance from an empty at the left of the top bar (I would Stretch To the triangle mesh between the two aforementioned empties). The following is the image the user posted in the second question linked.

This is the .blend file I was working on:

The constraints act in a top to bottom order, when there will be a conflict, the last constraint will always override the previous constraints.

Is there a way to fix this without python? I've never been a fan of it unless absolutely necessary. @Georges

I'm not sure, I'm not familiar enough with scripting, but a trick I learned from a tutorial by Rigging genius Nathan Vegdahl (The developer of Rigify addon), whenever you have a complicated relation, increase the count of parents, as in the case when you need to parent two objects to each other in both ways, so each one of them will use a property from the other, and which is awkward and simply not possible, you can use a third family member to be in-between, this simplifies the matter, I hope I was clear enough, but yeah, that's how it is.

I'm reading your question again, I already answered the question you're referring to, using a different method, but I'm really interested to know the way you're trying to do it, can you plz edit your question to explain more how you're trying to solve it? @shadypuck

@Georges I have some stuff to do right now, but I will probably be able to add more details tonight. Maybe even screenshots:)


text:
Is there a way to select all cameras without iterating through every object in a scene?
I require a way to select certain cameras in a scene. My plan is to get all camera objects in a scene, and then based on their names get the ones that I need.
Currently I’m selecting all cameras like this:
all_cams = [ob for ob in list(bpy.context.scene.objects) if ob.type == ‘CAMERA’]

But i think there should be a better way to do this, without iterating through all objects in a scene.
There is the  D.cameras collection and from there I can get all data-block names. But how I can go from data-block names to the object name?
Or at least how do I select the cameras using their data-block name? ( then I can work further based on selected objects)
Do you have any ideas how I can achieve this? Thank you!

Have you identified this operation as a bottleneck in terms of speed ? It should be pretty fast unless you have thousands upon thousands of objects. Otherwise you can use a custom collection property to store camera objects in the scene for instance. Using data block names will be even less efficient because of the lookup : [ob for ob in bpy.context.scene.objects if ob.data.name in camera_names] and even then if 2 cameras use the same data it will fail. Object data don't hold a reference to their object because they can be shared amongst an indefinite number of objects

"Have you identified this operation as a bottleneck in terms of speed ?"
Yeah, i was thinking that. Didnt have opportunity to run a test tho. I was just wondering if there is a way to do this. I'll stick to what I have right now, and if it will be a problem I will try to adress it then I guess ;p

Could perhaps  get a squeak more with a different test than equality ob.type.startswith('CAM') or via an attribute test  hasattr(...) , doubt its worth it.  Somewhat related https://blender.stackexchange.com/a/233823/15543

Yes there is such a way: [camera for camera in bpy.data.cameras if bpy.context.scene.objects.get(camera.name)].  No guarantee that it will be faster in any given situation though.

Don't worry too much, testing all objects in the scene is lightning fast... and the winner is:
[ob for ob in bpy.context.scene.objects if ob.type == 'CAMERA']

Time measurements of a scene with 1000 cameras and 1000 default cubes.

Code in question
cams = [ob for ob in list(bpy.context.scene.objects) if ob.type == 'CAMERA']
# Time: 0.0026161670684814453

Regular list comprehension
cams = [ob for ob in bpy.context.scene.objects if ob.type == 'CAMERA']
# Time: 0.0021109580993652344

Generator
cams = (ob for ob in bpy.context.scene.objects if ob.type == 'CAMERA')
# Time: 6.222724914550781e-05

Prefix list comprehension
cams = [ob for ob in bpy.context.scene.objects if ob.type.startswith('CAM')]
# Time: 0.0025479793548583984

Attribute list comprehension
cams = [ob for ob in bpy.context.scene.objects if hasattr(ob.data, "lens")]
# Time: 0.002920866012573242

The test to me illustrates that they are all almost equal apart from the generator operation which is ~30 times faster. Note that the main issue with generators is that you can only iterate over them once and then they're done.