Convert polygons or ngons to quads using bmesh

Verts of non-boundary edge.

Assuming the white keys are the mesh, where there is an ngon is at the ends of a non boundary edge
Test script below, finds ngons, bisects using YZ (keys aligned along x axis) plane at boundary edge vert coordinates, removes doubles, and repeats until there are no more ngons.
An additional test to make sure the other two connected edges are at an angle of around 90 degrees has been added. (See below)
import bpy
import bmesh

context = bpy.context
ob = context.edit_object
me = ob.data
bm = bmesh.from_edit_mesh(me)

ngons = [f for f in bm.faces if len(f.edges) > 4]

while ngons:
    f = ngons.pop()
    def test(v, edge):
        if len(v.link_edges) == 3:
            e0, e1 = [e for e in v.link_edges if e.is_boundary]
            ev0 = (e0.verts[0].co - e0.verts[1].co)
            ev1 = (e1.verts[1].co - e1.verts[0].co)
            return abs(ev0.dot(ev1)) < 0.1
        return False
    # find verts of non boundary edge
    verts = [v for e in f.edges
            if not e.is_boundary
            for v in e.verts if test(v, e)]
    print(len(verts))
    for v in verts:
        geom = bmesh.ops.bisect_plane(
                bm,
                geom=[f] + f.edges[:] + f.verts[:],
                plane_co=v.co,
                plane_no=((1, 0, 0)),
                )
    bmesh.ops.remove_doubles(
        bm,
        verts=bm.verts,
        dist=1e-5
        )
    ngons = [f for f in bm.faces if len(f.edges) > 4]

bmesh.update_edit_mesh(me)


Almost any value in blender can be animated. Most of the values that can't be animated are global to the scene like render resolution that make no sense to animate.

With the cursor over a value press I to add a keyframe or right click  RMB and choose Insert Keyframe, even values in the node editor and colours can be animated.


Use your single faced mesh BUT on the end of the sleeves, or neck or any cloth "thickness" just model just a few faces giving the appearance of thickness "U" shaped on the edge like this (see pictures) that way you will get the sense of thickness without the need to apply a modifier or more subdivision surface unnecessarily.

That way you will still have cloth simulation with a very light weight mesh.
Make the cloth collide with very simple capsule polygon parented directly to the bone (no bone weights), hidden from render (wireframe view only). This way you´ll get a nice cloth simulation without the need of solidify. Play with stiffness. Make some vertex groups to "friction" the cloth more on some points.

Hope this is what you´re looking for. Cheers.


There are three things people may call "zoom" for a CGI camera :

Focal length
Sensor size
Camera position (dolly zoom)

You will find the first two here :


Issue with UV mapping and Texture paint tools

It's a Normal issue: Go in Edit mode, select all, and press ctrlN to recalculate the normals (shiftN in 2.8).


In the VSE preview window that the cube appears in press N for Properties and deselect the OpenGL Render. You should see the compositor output. If not, go back to the VSE window and press the Refresh Sequencer Button.


Vertex groups can not be named in blender 2.70

Ctrl LMB  click, or double LMB  click on the name of the vertex group. That is now how to rename anything in that type of list.

youtube video


From the wiki:

  Users can now create their own nodes using the Open Shading Language (OSL). Note that these nodes will only work for CPU rendering; there is no support for running OSL code on the GPU.

Quote from Brecht:

  The main issue is to get OSL working on the GPU. It's almost as much work as building Cycles itself. It's not easy to do so we need more people to help us.

The oso file just contains the shader compiled bytecode.


Yes, Blender does open .dds files, though Cycles currently has a bug in 2.79 where some .dds image textures can't be seen in rendered viewport or in the final image, showing a pink texture instead.

This can be solved by converting the image to another format, like .png.

Here's a great answer on how to use an image texture in Cycles: How do I put an image texture on a material in Cycles?

Here's a similar question (and answer) for Blender Internal: [How to] add an image to an object [in Blender Internal]


Ok, I'm years late to the party, but the reason the texture is rotated is because it's applying the mapping using the X, Y, and Z coordinates equally.  If you want to constrain it to a single axis, you can just use a "SeparateXYZ" node followed by a "CombineXYZ" node and only use the axes you want.  For example, as gandalf3 pointed out, if you want the texture aligned along the Z-axis, simply connect the Z output of the SeparateXYZ node to the Z input of the CombineXYZ node.

Likewise, if you want it to follow the X-axis, connect only the X output to the X input.  If you choose both Y and Z, your texture will be at a 45-degree angle because it's affected half by the Y coordinate, and half by the Z.  You can also think of it bisecting the axes you use.

That's why when you use X, Y, and Z all at once, it points at exactly the center between the X, Y, and Z axes.  You might think that's 45 degrees from each axis, but it's not.  Since the rotations are applied on top of each other, you get the "weird" values of 35, 45, and 90 degrees (look up Euler angles if you want more info). It's not a mystery once you understand the math (or at least how the math works).


Thanks @3fingeredfrog.

I used Pin (very useful tool!) combined with cube projection - unsure why this particular option worked, but it did.


You can see both global and local coordinates for selected elements from the 3D View > Tool Shelf > Transform Panel.

There you will find a button to toggle Between global and local.

Have in mind that this may not take into account mesh deformations caused by modifiers or armatures.

To take those into account you may end up having to convert to mesh or applying all modifiers.


After a lot of experimenting, I've seen that a submenu can be made from one of two functions in a Menu subclass: 1. self.layout.operator_menu_enum() or 2. self.layout.menu().

1. self.layout.operator_menu_enum()

If it's from operator_menu_enum(), you can hover your mouse over each option and the description will have the same function. For example, in Select -> Select All by Type..., each option you hover over has the description Python: bpy.ops.object.select_by_type(type='[some option]'). That's a good hint to say that the "Select All by Type..." menu was made from self.layout.operator_menu_enum().

(As a side note, I also see that the parameter name shown in the description is what you put in the property parameter when you're calling operator_menu_enum(). So since the parameter name in select_by_type() was "type", I'd call something in a custom script like self.layout.operator_menu_enum(operator = "object.select_by_type", property = "type", text="select_menu test"). And if I was making my own operator subclass for operator_menu_enum, apparently the variable name for the EnumProperty() you define is the string you put in the property parameter of operator_menu_enum(). I guessed that from this question.)

2. self.layout.menu()

If the menu is made from self.layout.menu(), you can hover over each option and you'll see different function names in the description. An example is View -> Align View. To find the id name string that you can use in self.layout.menu(), you can do a search in bpy.types. For example, here's the code and output I got from the Python Console when I was searching up bpy.types:

>>> for i in dir(bpy.types):
...     if "align" in i: print(i)
...
ARMATURE_OT_align
IMAGE_MT_uvs_weldalign
OBJECT_OT_align
UV_OT_align
VIEW3D_MT_view_align
VIEW3D_MT_view_align_selected

I checked for "align" in the if statement because I thought it was the most logical thing, seeing that the submenu name was "Align View". And also by best guess, I saw that "VIEW3D_MT_view_align" was the id name for this submenu (I double checked in a custom script with something like self.layout.menu(menu = "VIEW3D_MT_view_align", text = "align test")). Anyways, that's the best I can come up with. I couldn't find anything in google this time.


Possible Bug - My material color won't change

You must have deleted something from the original node network.

Your color ramp is not driven by any coordinate based texture so you will only get a solid color (assuming the same color at every point on the sphere). Since your ramp is a gradient of grey and you are mixing it 50% with black, you end up with a middle grey solid diffuse color! No surprise there!

To see the effect of the ramp, simply add a texture that's based on some sort of coordinates for example a Musgrave Texture, a Noise Texture or a Voronoi Texture would do. So would an Image Texture...


Colours underneath bleeding through when painting

Your model consists of at least two separate meshes.

Right now, the front of the coaster uses the same texture as the seats, which means you have to create either a new material for it or you need to adjust the UV layout for both meshes so they don't overlap.

One possible solution to use one material (and one texture) for all the meshes in your model would be using a Texture Atlas.

If you want to use two separate textures, you need to set up a separate material for each mesh.


large scale modelling, numeric problems?

The emphasis of Blender development is Artistic, and not high precision modelling like is expected from dedicated CAD/Engineering software. This doesn't mean you can't model or represent big things, but it does mean that you are limited to a level of precision in one mesh.

To get an idea about precision read Ideasman42's response to Digits of precision of vertices coordinates . The technical answer to your question can be found in this response.

Another resource which can really give a sense of the relative scales we're talking about is Alex Januszkiewicz's Article On AutoCad Accuracy. An excerpt:

  If you try to do a drawing that extends 4 km in each direction, Microstation's 32 bit format will limit your accuracy to 0.001 mm. The same size AutoCAD drawing can be drawn with an accuracy of 0.000000001 mm, that is one million times more accurate.

This refers to 32 bit Single Precision (Blender uses this) vs AutoCAD's 64 bit Double Precision storage.

The link for that text may not be available permanently, but if you google  "Alex Januszkiewicz AutoCAD accuracy" you will find it.


Elegant way to adjust this angle (which has another object which must stay parallel to it)

see my response to Nascent space above,
the missing link was to then change 'transform orientation' to normal, which allows me to scale the face along its face.
BUT not as elegant as hoped, because i ended up having to carefully line up the bottom vertices with the face of that bottom plate. error there doesn't bother me as much, but its not perfect, so still interested in ideas


Recalculate the normals on all the meshes. Remember to go to edit mode and select all faces. Then go to Your fluid settings on the glass and choose "volume" instead of "both" under volumen initialization:

I have added the fixed file below:-)


How to make a rigged object bend when pressed against a surface?

The best way would be to use Blender's Lattice tool.

https://docs.blender.org/manual/en/dev/modeling/modifiers/deform/lattice.html

it allows you to use a lower resolution 'mesh cage' to deform your model. there are two tutorials on the blender wiki, and this youtube link below is a good tutorial.

https://www.youtube.com/watch?v=10asQDMhFQw


How to get one UIList to control the contents of another UIList?

It's indeed tricky getting all the details sorted but it is possible to make it work properly:

(Minimal) Example: https://gist.github.com/p2or/4635887cfe6ed9e652eadc8aa7585a87

Data Structure

I'd suggest create a nested collection for your objects as part of the main collection (users), register e.g. per scene to get your data structure working and then test using the Console in the first place:

class CUSTOM_ObjectProps(PropertyGroup):
    obj_ref: PointerProperty(
        name="Object",
        type=bpy.types.Object)

class CUSTOM_NameProps(PropertyGroup):
    object_collection: CollectionProperty(
        name = "Object Collection",
        type = CUSTOM_ObjectProps)

class CUSTOM_SceneProps(PropertyGroup):
    user_collection: CollectionProperty(
        name = "Name Collection",
        type = CUSTOM_NameProps)

...
def register():
    bpy.types.Scene.ctm = PointerProperty(type=CUSTOM_SceneProps)
...

Proof using the Console

# Add User
>>> user = C.scene.ctm.user_collection.add()
>>> user.name = "Bob"
>>> user
bpy.data.scenes['Scene'].ctm.user_collection[0]

>>> user_obj = C.scene.ctm.user_collection[0].object_collection.add()
>>> user_obj.obj_ref = C.object
>>> user_obj.name = "My Object"
>>> user_obj
bpy.data.scenes['Scene'].ctm.user_collection[0].object_collection[0]

>>> user_obj.obj_ref
bpy.data.objects['Mball']

To speed up testing, operators for adding or printing the values might become handy:

class CUSTOM_OT_PrintOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "scene.ctm_print_operator"
    bl_label = "Simple Print Operator"

    def execute(self, context):
        scn = context.scene
        custom = scn.ctm
        lookup_dict = {}

        for uc, user in enumerate(custom.user_collection):
            print ("User Index: {}, Name: {}, Ref: {}".format(uc, user.name, user))

            for oc, obj in enumerate(user.object_collection):
                print ("-> Object {}, Ref {}".format(oc, obj))
                lookup_dict.setdefault(user, []).append(obj.obj_ref)

        # In case, dicts are nice
        print ("\nLookup:", lookup_dict)
        return {'FINISHED'}

Proof using the Console

>>> bpy.ops.scene.ctm_print_operator()
User Index: 0, Name: Bob, Ref: <bpy_struct, CUSTOM_NameProps("Bob")>
-> Object 0, Ref <bpy_struct, CUSTOM_ObjectProps("Bob_Mball")>
-> Object 1, Ref <bpy_struct, CUSTOM_ObjectProps("Bob_Icosphere")>

Lookup: {bpy.data.scenes['Scene'].ctm.user_collection[0]: [bpy.data.objects['Mball'], bpy.data.objects['Icosphere']]}
{'FINISHED'}

Drawing

Hardest part is getting both lists to draw properly. Since the actual names (from the first list) don't necessarily have to be unique, we obviously can not rely on any name value. One approach is introducing a custom index property to get track of the changes and keep it in sync (required for template_list anyway).

class CUSTOM_NameProps(PropertyGroup):
    active_obj_index: IntProperty()
    object_collection: CollectionProperty(
        name = "Object Collection",
        type = CUSTOM_ObjectProps)

user = custom.user_collection[custom.active_user_index]

...

layout.row().template_list(
    listtype_name = "CUSTOM_UL_Sub",
    list_id = "",
    dataptr = user,
    propname = "object_collection",
    active_dataptr = user,
    active_propname = "active_obj_index",
    rows = min_rows
    )

Notice, when using the wrong index value pointing to any non existing item will raise exceptions.


Blend4Webs m_trans.set_matrix does not respect linear algebra

As it turned out recent Blend4Web (17.12.0) does not support non-uniform scaling (it will be added with the next release). Which also means: its 4D matrix module does not expose the real transformation entity, which it usess at its deepest abstraction.

General workaround:

However Blend4Web supports non-uniform scale animations exported from blender, and it is also possible to jump to a specific animation frame. So make a appropriate scale animation and wrote a code which interpolates between its frames.

Example:

I wrote a window-scaleresponsive input range GUI element with this method, the relevant code snippet should be rather simple for someone with a basic knowledge about the Blend4Web SDK.

function registerSliderResize(railObj, knobObj, frameNum) {

  var etalonRatio = 16 / 9;

  function resize() {

    var ratio = window.innerWidth / window.innerHeight;
    var frameInd = Math.floor(ratio / etalonRatio * frameNum);

    if (frameInd > frameNum)
      frameInd = frameNum;
    else if (frameInd < 1)
      frameInd = 1;

    // invert frameInd
    frameInd = frameNum - frameInd;

    m_anim.apply(railObj, "rail-resize", m_anim.SLOT_0);
    m_anim.set_behavior(railObj, m_anim.AB_FINISH_STOP, m_anim.SLOT_0);
    m_anim.play(railObj, null, m_anim.SLOT_0);
    console.log(frameInd);
    m_anim.set_frame(railObj, frameInd, m_anim.SLOT_0);
    m_anim.stop(railObj, m_anim.SLOT_0);

    m_anim.apply(knobObj, "knob-resize", m_anim.SLOT_0);
    m_anim.set_behavior(railObj, m_anim.AB_FINISH_STOP, m_anim.SLOT_0);
    m_anim.play(railObj, null, m_anim.SLOT_0);
    console.log(frameInd);
    m_anim.set_frame(railObj, frameInd, m_anim.SLOT_0);
    m_anim.stop(railObj, m_anim.SLOT_0);
  };

  resize();

  window.addEventListener("resize", resize);
}

The result:

Two non-uniformly scaled version of the same slider adapted to the window size, changed by Chromium inspector.

The whole project:

You can download the whole source code and the corresponding .blend file.


Straightening out ALL uneven UVmap vertices in unison w/o overlapping?

I would just redo the UV unwrapping to get it straight.

Starting with a cylinder.

Select an edge.

Mark it as seam.

Select all faces.

Unwrap (no special projection, but a straight unwrap).

You should have a straight UV map like this:

Then just scale it to meet your needs.


I went with the following settings, which seemed to do the trick.

Removed the emission planes and replaced with a sun light source
Changed the color management to "Filmic" since that is supposed to be better with dynamic range
Used denoising to eliminate most of the grainy look
Increased the resolution of my animation to 1080p (not sure if that made a difference, but it looks better to me)


How do I use refraction to make underwater shadows look better?

Give the plane a single Refraction BSDF shader with blue color and IOR > 1.
Under Properties > Object > Ray Visibility uncheck shadow so the water does not produce shadow (that's why its almost black)


How to stop objects from flipping when using animations with a camera?

This is occurs due to use of properties inside action. If you use integer or float property inside action then it take property value as frame number.
Your animation start from 0 and end to 100 with 45 degree Y-axis rotation.

So When you put property value as 50, its take position of your cube animation from frame number 50. If you want to check this then use also 0 and 100 as property value. You also can check with any number you want between 0 to 100(limit of your frame animation). If you will use value above on 100 then its automatically take last frame of animation as property value.

Your cube movement erotic with mouse because You set properties inside to action so it set given property value between your frame animation as frame animation value( In starting it use original animation frame and in between your cube animation it set given property value and again use frame animation and so rotate cube).

In motion you can not use property so its play your original animation with frame animation, So there is no middle value to change position of cube therefore  in motion Actuator your cube animation play without erotic movement.

And one more thing is. I think it check/update property to every pixel so when you move mouse it play your prop given value from frame animation(with object position change).

** Edited **

First thing -> What do you want to do.
 1) Move cube when mouse move without cube animation.
 2) Move cube when mouse move with animation.

1) If you want to move cube with mouse movement and without animation then just use action actuator with play(action type) and dont set start and end frame in this. Dont use property inside action.

2) If you want to move cube with mouse movement  and with cube animation then just use play(action type) and start and end frame in it still don`t use property.

Main thing You want to make your cube animation rotation with 10 degree rotation with mouse move. So here you can do this with start and end frame just set your end frame to half of timeline like 50. So its move just 10 degree what you want.

you also can do this with two bool properties. First is true then set end frame to 50 and if second one is true then set end frame to 100. you can do this with scripts. sorry I dont know python for this so i cant post python code here. I am working with unity because unity is better then bge for game development.


Achieve a high pass filter in blender compositor?

By using these instructions from wikipedia:

If you want, then you can create a reusable node group by selecting the nodes and pressing ⎈ CtrlG:


Rigging when bones must achieve conflicting goals

To be able to 'ease out' of an action strip that's higher up the stack and back onto a lower strip's:

Ensure the higher strip's Extrapolation values (found in the properties bar) are set to Nothing.
Play with the Blend out fields (also in properties bar) to phase out of the Action strip's influence.  You can get a visual sense of how much easing is occurring by looking at the descending slope on the right part of the action strip (circled in picture).


Problem installing Blender 2.8.1 via Apple Remote Desktop

Same issue here, i just rolled back to the previous version.I had just deployed to 400 macs without testing (stupidly). It seems the permissions on the app require you to be an administrator. The person who installs locally has read/ write access, everyone has no access and there are no groups listed in the permissions. I will do some more testing tomorrow changing the permissions. I did give everyone full access but that didn't work.


How to unwrap model so its perfectly proportioned?

1:  Mark one vertical edge as Seam. In my example I added a seam on a very visible edge but ideally this seam should be placed somewhere less obvious.

2: Select all of the mesh, open the UV mapping menu and choose the Unwrap option.

3: Open the  UV/image editor window. The unwrap should look similar to the image below. This now needs to be scaled up.

4: UV Editor window, Make sure the Cursor is at the X=0 Y=0 position of the UV space. The lower left hand corner of the UV unwrap should also be at this position.

5: Change the Scaling Pivot point to be the 2D Cursor.

6: Scale up the UV’s until the highest edges are approximately at the same level as the top of the UV space.

7: To check seams, scale etc  Add a test texture/image in the UV editor  and see how it looks on the mesh.

8: With the 2D cursor still at the lower left hand corner of the UV space scale up or down until the test texture looks correct at the seam.


Reflections showing wave pattern after adding plane

This is the proper reflection of a curved surface. the peaks of the wave pattern are actually just the corners of the plane.

you could reduce the effects by changing the camera angle or the size of the plane. maybe it helps adding walls and making the plane more of a rectangle than a perfect square.

And the reflections aren't wrong in your second image. the bottom part is just the reflection of the plane.


Is there any way to mirror only selected parts of a shape key?

Other answers so far are good, but it's worth pointing out another technique.
There's an easy way to restore part of a shapekey to the basis shape, using "blend from shape" operation.  You can use this on parts of the mesh to "unshape" bits of the mesh.
Select the shapekey, then enter edit on the mesh.  Select all vertices of the shapekey you don't want (or select the bits you do want, then select inverse.)  Use a "blend from shape" operation, which I always call from the searchbar.  On the operator panel, specify Basis as the shapekey, set the blend to 1.0, and disable Add.  This restores the selected vertices to the Basis shape, making it so that some of your shapekey will be "unmirrored".
You can of course use this operator for a lot of other things as well.


How to get driver for z location by name (without looping)

I was able to find in the API documentation that there is a built in function for this collection.

Calling

object.animation_data.drivers.find('location',2)

did the trick.


Get/display the animation runtime fps in python

The last time I looked at this there was no way to directly get the value directly from a property of the API.

You can emulate it with a frame change handler, here is some test code that prints the approx fps to console.

import bpy
import time

t0 = -1
def timer(scene):
    global t0
    t1 = time.clock()
    fps = scene.render.fps  / scene.render.fps_base
    ms = 1000 * (t1 - t0)
    fps = min(fps, (1000 / ms))
    print("FPS:", fps)
    t0 = t1

bpy.app.handlers.frame_change_post.append(timer)


why is my image texture with texture not displaying properly?

To make our life easy blender can remember an image that you choose in the UV/mage editor while uv unwrapping or that you create while texture painting and use it when drawing an object in the 3d viewport. This only happens in the viewport with the right settings but does not carry over into the final render, to use an image texture in the final render you need to setup your material properly.

Recent versions of blender added the ability to add images to paint onto, when using blender internal the texture is normally also created, in cycles when needed a material and/or an image texture node can be created but it doesn't get connected up, you need to do that yourself.

If using blender internal you need to ensure that the texture is added and setup to use the image. For cycles you need to ensure the image texture node is connected to the shader node that you want to use.


How can I have Screencast display keys pressed during transform operations?

Scaling is a modal operation itself, just like the screencast keys. During the transformation, all events are consumed by that modal operator and never occur for the screencast keys addon. There is no controllable event bubbling like in browsers.

It could only be solved by a native screencast keys implementation through which all events would have to pass first.


Parenting messes up transforms - where is the offset stored?

The difference between the parent and child is stored on the child when the parent is set.

It's a matrix that can only be accessed through Python: bpy.types.Object.matrix_parent_inverse


Select your object, go in Edit mode and rotate it 90° on the X axis.


Its often a good idea to load up a reference image of the item that your are trying to model into the Background of the 3D Editor window. Then in Wireframe view trace over the image with vertices.

Its worth spending a little time getting the image setup correctly: Size, Position, Rotation, and Scale.

One thing to remember when using Background images, they only show up in Orthographique view and in the Axis that you have selected in the Background Image panel.

Oooops, 15 should read Eddge Split modifier and not Edge Spit !


There is no most efficient way to effectively round edges, this is highly dependent on what type of object you are modeling, how much detail you want, how close you plan to render, the environment your model will be in etc.

There are several ways to go about this, all highly effective depending on the situation they are use in. I would recommend to continue beveling your edges.

Why? Beveling is much more efficient and cheaper than subsurf, you also have better control of your geometry and topology. What you are doing above is using it inefficiently, that shape could be just as rounded with fewer segments, You don't need more than a few or so segments on any edge at a time. It is also worth noting that since it is a modifier, any mistakes you make can be easily undone.

Here are is an object duplicated twice and bevelled with different amount of segments, one has 12 segments and the other has 6, can you immediately tell which one is rounder?

Here are the wires..

As you can see it is highly efficient, it's all in how you use it. As you have it above is overkill for such a simple object, you don't need more than a few segments to round out your edges depending on the complexity of your mesh.

Note: Also using Shade Smooth on your hard surface models can help to make them appear more smooth/round and less faceted as I have done on the objects in the images above. You can also just smooth certain parts of your mesh by selecting the vertices/faces and using the same method.

Also, feel free to use a mixture of modifiers to achieve your final shape or effect, for some objects it is better to use subsurf with edgeloops and for others, subsurf with creases etc. There is no one good or most efficient way to go about it, It all depends on what you need, the model being used and how well you as the artist can determine what the best way to go about it is.

Additionally, you can get more tips here:

How can I make sharp geometric 3d models look more realistic?
How to smooth shade an object while retaining hard edges?


How can i select my self made Texture Paint on my Shape in Blender 2.8?

Have you looked at the Shader layout window to see how they are connected as nodes? There should be an image node for each image texture there. – Craig D Jones


How to quickly place text cursor in long 3D Text?

Here is two methods  to edit the text object in the text editor :

1- Link the object text to the text file :

2- Convert text object to a file, then back from a file to an object :

1- For the first method, run this script once and select your text object to see the live update.

import bpy

#this is one way link ( object to text file )
def link_object_to_text(context):
    obj = bpy.context.active_object
    if obj.type == 'FONT':
       if None == bpy.data.texts.get(obj.name):
          bpy.data.texts.new(name = obj.name)
          bpy.data.texts[obj.name].write(obj.data.body)
       text_file = bpy.data.texts[obj.name]
       obj.data.body = text_file.as_string()

bpy.app.handlers.scene_update_pre.append(link_object_to_text)

2- For conversion run the following script once

you will find it in 3D_View -> Object -> Convert text
OR type Convert Text Object in the Space menu

.

import bpy
from bpy.types import Operator
from bpy.props import *

def object_to_text():
    obj = bpy.context.active_object
    if obj.type == 'FONT':
       if None == bpy.data.texts.get(obj.name):
          bpy.data.texts.new(name = obj.name)

       text_file = bpy.data.texts[obj.name]
       text_file.clear()
       text = obj.data.body
       text_file.write(text)

def object_from_text():
    obj = bpy.context.active_object
    if obj.type == 'FONT':
       if None == bpy.data.texts.get(obj.name):
          bpy.data.texts.new(name = obj.name)

       text_file = bpy.data.texts[obj.name]
       #clear text_obj
       obj.data.body = text_file.as_string()

class   text_object(Operator):

    """text file from&to text object"""
    bl_idname = "object.from_to_text"
    bl_label = "convert text object"
    bl_options = {'REGISTER', 'UNDO'}

    #parameters and variables
    convert = EnumProperty(
                name="Convert",
                description="Choose conversion",
                items=(('T2F', "object to file ", "convert text object to text file"),
                       ('F2T', "file  to object", "convert text file to text object")),
                default='T2F',
                )

    def execute(self, context):
        if self.convert == 'T2F':
            object_to_text()
        else:
            object_from_text()

        self.report({'INFO'},"Conversion is Done")
        return {'FINISHED'}

    #get inputs
    def invoke(self, context, event):
            wm = context.window_manager
            return wm.invoke_props_dialog(self)

def addObject(self, context):
    self.layout.operator(
    text_object.bl_idname,
    text = text_object.bl_label,
    icon = 'OUTLINER_DATA_FONT')

def register():
    bpy.utils.register_class(text_object)
    bpy.types.VIEW3D_MT_object.append(addObject)

def unregister():
    bpy.types.VIEW3D_MT_object.remove(addObject)
    bpy.utils.unregister_class(text_object)

if __name__ == "__main__":
    register()


How exactly should I set surface normals for a sculpture?

In Edit Mode, you can display normals, to see exactly which dir they are facing (N > Mesh Display).

You might be able to simply call normals_make_consistent() operator:

bpy.ops.object.mode_set(mode='EDIT')
bpy.ops.mesh.select_all()
bpy.ops.mesh.normals_make_consistent()

Some models don't always import with consistent normals, because they weren't consistent with the order of their vertex arrangement (clockwise sometimes, counter-clockwise elsewhere, within the same model)


I guess you are referring to a material setup called HOLOGRAM

Try this material setup in the image

It will make your ghost blueish and transparent, and it will give a Fresnel effect which talks about the angle of view


Blender 2.79 Rigging - Dependency cycle help

The problem is that the wristmarker is an empty object. You can make it a bone and give it a custom shape.

Blender has a limitaion with cycle evaluation on object level, something that even new dependency graph does not solve. This does not exist in Maya, Cinema 4D, etc., where you would use empties in rigging.

In Blender it is convenient to keep all the relations inside the armature object. If you link something to an empty and back to the same rig, it will create dependency on object level.

If you really need to constraint or parent to different object (like when using curves and spline IK), you cannot link back to the same rig, but you have to use a different one to stay clear of any dependency cycles. This can be solved like this:

Rigging question about Spline IK and having all controls on one armature

Another reason to use only bones for any controls the animator will interact with is for linking characters into another .blend files. This also does not work conveniently as in other apps, you have to create a proxy object from your armature. If you had the rig setup with empties outside the armature, your rig would fall apart when making that proxy.


What kind of Texture map is it and how to use it?

The red, green and yellow colors indicate that this is a UV texture from Unreal Engine 4. You might be able to bake the mask into a PBR texture in UE4, or use a separate RGB node in blender to use this dirt mask texture.


Blender 2.8: How to use image sequence as a texture?

The standard way is to use the "texture node" configured as "image sequence".
In this example I've got pic01.png, pic02.png, pic03.png and pic04.png in the same folder.


As you can read on the upper right corner of your window, you,ve got 29.641 vertex, it's not enough for fine details. Try subdividing until you reach 1.000.000.
In object mode switch to "Smooth Shading".
If the computer gets slow, subdivide you model in different objects (P key in edit mode mode), and sculpt them one by one, using the multiresolution modifier to swithc between different levels of details.


Can duplicated objects be given a separate material?

Link your material to Object instead of object data. This drop menu is in the picture. By default it is set to Data

If you do it you need to set a new material.


Can I set my pose position like the new rest position?

Apply the armature modifier - armature in rest pose doesn't deform anything, so we need also a mesh to match the new rest pose.
Pose > Apply Pose as Rest Pose. This will set current pose as the rest pose. It sets only bones poses - constraints or custom properties in complicated or badly designed rigs might make the rig act weird with bones in different rest state!
Add the armature modifier back.


Boolean modifier makes a hole without rim in render

The Geometry is there, it is a matter of your materials and lights. The light inside is so strong that you cannot see anything. Hide it and you see the rim.


Quickest way to create a color gradient texture

You can find under the Add >> Texture >> Gradient Texture if you are using the Node Editor:

Or in the Material panel as shown below

Using the node editor is probably easiere because it helps to immediately figure out which node is doing what, the relations between the various components of the shader and quickly navigate the nodetree, while with the menus would be more tricky.

Down below you can see an example of usage of the gradient texture to mix two colors. On the top the node editor and on ther righit side the corrispective menu's view of the same material.


Advice on how to remove these weird black shadow things?

It looks like there is a Face/Polygon inside the handle, deleting that face will fix the shading problem.


Bone with TrackTo constraint isn't rotating properly in poses on 1st frame [video included]

Thanks to comments in the original post, I was able to find the problem and create a fix.

THE PROBLEM:
In this case, the bone with the TrackTo constraint was targeting a mesh object (a cylinder) which was a child of the armature, creating a circular dependency and producing the error I was experiencing.

THE FIX:
Positioned in the same place as the cylinder that was being targeted is another bone controlling the upper part of the excavator mechanism. I changed the target of the TrackTo constraint to that bone above it, thus eliminating the circular dependency. Now, even from frame one, the rotation of the bone with the TrackTo constraint is right where it is supposed to be.

Thanks again to everyone for their help!


As a developer of Sverchok i'd like to answer in the negative.

No F-Curves or Drivers for a slider/property from a custom NodeTree will show up in the Graph Editor. Custom NodeTrees are things like Animation Nodes and Sverchok, ie: anything not from a Shader Node Tree / Compositor Node Tree.

I asked Blender developers in IRC about enabling this for custom node trees, but it appears not so trivial or not a priority.

I think what you could do is make a custom property for a normal Empty object, and add a Driver and reference the specific node tree in the driver code. Can't confirm this works, but it's worth trying.


Where did the Hidden Wire feature go in Blender 2.78?

Here you have two pictures of the torus in Edit Mode. Note the button I've pointed out with the mouse. Is that what you are looking for?
Or are you looking for "hidden wire" checkbox on the properties panel, which usually shows on the right side of 3d view? In solid mode, there it is.


What I do is in the Blender Internal Renderer select the material that is going to have light cast on it. Then enable mirroring and turn down the glossiness.

You can adjust the number of samples it uses for smoother results.

Sorry for the wait, lack of internet at my home right now.


Why does my model become distorted when adding bones with Automatic Weights?

Blenders automatic weights are pretty meh. especially for a model of that complexity. youll probably be better off using manual weighting or envelope weighting


Problems with Texturing in Blender Game Engine

Judging by the images you posted, this is probably what's wrong with you scene.
Flipped normals

Steps to fix:-

1. Select your object and go to edit mode
2. Move over to the shadings and UV tab
3. Select everything in your mesh
4. Click on recalculate

5. Go to properties panel and find the shading section and turn off Backface culling

Explanation:-

What Backface culling does is cull or clip the back sides of the face, and the back side is determined by the normals. Your model, judging from the picture, has its normals flipped inside out, and you have backface culling on therefore it's culling all the backfaces. If recalculation does not work, then it means some of the faces are flipped unevenly, thus they need to be manually flipped by using the Flip Direction button in the same shading panel in the tools tab region.


Rendering results are corrupting between blocks

Just switch to perspective camera:

And your Render will look normal:


How to avoid intersections in an interlocking model?

I tried to achive that effect as well and I did stick to the modifier workflow. I added some array modifiers with merging enabled to make that shape and then i just modelled a path. I also added a solidify modifier and voilà. Got it.


How do i change the dimension back to 2m on the starting cube

It seems like you have two objects "Cube" and "Cube.001". I assume that the "Cube" has dimensions 2m x 2m x 2m.
The "Cube.001" object consists of two default cubes of size 2m x 2m x 2m but because they are in the same object the object dimensions are calculated from their bounding box as can be seen in attached image. You can separate the cubes in edit mode (select "Cube.001" and press TAB button) by pressing "p" and selecting "By Loose Parts".


How to tweak render when each render takes so long?

There are a number of ways to deal with this:

render a frame at low resolution and/or samples (i.e thumbnail). This
should reduce render time but still give you are. This can
effectively be done with the preview render in the 3d view.
learn more about optimising cycles settings (e.g. tile size, bounces, clamp)
render out to a multilayer EXR and use the compositor to perform final
tweaks rather than re-rendering.
for animation, Opengl playblasts
(the clapperboard icon in the 3d view) allow you a quick preview of
how your animation will look, but without full materials and
lighting. This can be very useful when normal playback is not at full
bake background props (inlcuding lighting etc) to textures once you
are satisfied with them, that way you don't need to re-render them
again (see http://www.creativeshrimp.com/light_baking_tutorial.html for a discussion of some of these techniques).


You can scale the object with negative value along a single axis to get a mirror.

To do so, play an action with scale keyframes:

frame 1: scale = (1,1,1)
frame 2: scale = (-1,1,1) [depends on your mirror axis]

Hint: As this is no turning, you still will see the front side when flipping. This means you can keep Backface Culling enabled.


How can I smooth or add loop cut without putting it between faces one by one?

To add multiple loop cuts at the same time, use Ctrl+R to enable the loop cut tool, then scroll up/down to increase/decrease the number of cuts.

Edit:

Use Subdivide rather than loop cut. Select all the faces, press Ctrl+F, then select subdivide. You'll end up with an extra loop parallel to the circle, so select that loop, and Dissolve Edges.


I decided to chance it and left my PC on over a night

Turns out it stayed on whilst rendering
Actually, turns out just having blender running at all keeps my PC on

I'd recommend just having blender open and seeing if your PC falls asleep or not,
before trying to render and leave it on, so that the system doesn't suddenly shut down while a process is running


Blender 2.8 How do I set object/collection active and apply my script for each of collection's objects in via python?

Here is a little commented script to iterate over a collection and populate a second one from copies of the meshes of the first.

import bpy
from math import radians
from random import uniform

# get an existing collection or create it if it does not exist
# if created, the collection is added to the scene main collection
def get_or_create_collection( scene, collection_name ):
    collection = bpy.data.collections.get( collection_name )
    if collection is None:
        collection = bpy.data.collections.new( collection_name )
        scene.collection.children.link( collection )
    return collection

# duplicate an object and link it to a collection
# copy_data allow to know if the objects will share their data or not (are dupli or not)
def duplicate( obj, collection, copy_data ):
    new_obj = obj.copy()
    if copy_data:
        new_obj.data = obj.data.copy()
    collection.objects.link( new_obj )
    return new_obj

# get the scene
scene = bpy.context.scene

# names of the collection
source_collection_name = 'Collection'
destination_collection_name = 'Collection2'

# get the source collection
source_collection = bpy.data.collections.get( source_collection_name )

if source_collection is None:
    print( 'will not work' )
else:
    # get the destination collection
    destination_collection = get_or_create_collection( scene, destination_collection_name )

    # enumerate mesh objects in the source collection
    for obj in [o for o in source_collection.objects if o.type == 'MESH']:
        # get a copy of the object
        new_obj = duplicate( obj, destination_collection, False )
        # ** Make your random transforms here **
        rotateX = round(uniform(-20,20), 2)
        rotateY = round(uniform(10,50), 2)
        scaleX = round(uniform(0.3,1), 2)
        scaleY = round(uniform(0.3,1), 2)
        scaleZ = round(uniform(0.3,1), 2)
        new_obj.scale = ( scaleX, scaleY, scaleZ )
        new_obj.rotation_euler = (radians(rotateX),radians(rotateY),radians(-90))


No "Denoising Data" checkmark in View Layer Properties

Denoising data is for the cycles render engine, not for eevee.


How can renders be matched up in Blender?

I would setup a background image. By setting the axis to camera you will always see the image or movie while looking in camera view Numpad-0. If you select a movie it will change as you change the current frame in blender allowing you to follow the animation.

You will most likely want to ensure that the render settings match the original video so that there is no distortion or misplacement. You can also choose whether the image shows up in front of or behind your models.

This is a viewport only display, the image will not be included in the final render, you will need to composite it over the video.


Unparent Bone and current bone keep transform

Control + A is a keyboard shortcut for applying a changed bone position as it's rest position in 'Pose Mode' (Maybe when you cut the posed position, it reverts back to it's rest position that you created it at?)

Control + A in object mode applies rotation, scale, and location.


How to make a growing unique index (IntProperty) of the objects?

A collection of pointers
Can set up a collection on the scene with pointers to objects.
On an object set up a property to populate the collection and return the objects index in that collection.
Feel it's a little hacky to use context to get the scene within the getter method.
Example of setting up the props.
import bpy
from bpy.props import PointerProperty, CollectionProperty, IntProperty
from bpy.types import PropertyGroup, Object

class SceneObject(PropertyGroup):
    object : PointerProperty(type=Object)

def get_scene_object_index(self):
    from bpy import context
    scene = context.scene
    obs = [o.object for o in scene.scene_objects]
    for ob in set(scene.objects) - set(obs):
        o = scene.scene_objects.add()
        o.name = ob.name
        o.object = ob
        obs.append(ob)
        ob["scene_object_index"] = len(obs)

    return self["scene_object_index"]

bpy.utils.register_class(SceneObject)

bpy.types.Scene.scene_objects = CollectionProperty(type=SceneObject)
Object.scene_object_index = IntProperty(get=get_scene_object_index)

def draw(self, context):
    layout = self.layout
    scene = context.scene
    ob = context.object
    self.layout.prop(ob, "scene_object_index")
    for o in context.scene.scene_objects:
        layout.label(text=f"{o.object.name}")

bpy.types.OBJECT_PT_context_object.prepend(draw)

Added a little draw method to object props panel
Drive the pass_index
A driver using this prop can be added to the pass index of an object.  Adding a value input driver to a material node will require targeting a different object per material.
EDIT
Have edited to give each object a custom property. Needs a rethink re property name to have a unique value per scene.  It appears the driver "auto updates" better from the custom property rather than the read (getter) only property.
Will revisit and clean up if I have time, thinking a prop on scene with an update method.

Note at issue here is the collection property of the scene is giving the object a user. Deleting objects using operator will only unlink them from the scene, not remove them from the data.   Requires an edit to remove objects if they are only used by the collection.
If an object that is assigned to a pointer is removed from data the pointer will return None


How do I center the view at the origin without moving the 3D cursor?

You can use Alt+F to centre the view to your mouse pointer.

The exact behaviour you requested can be achieved with a little Python. Run the following in the text editor and add a view3d.view_center_origin key-binding of your choosing.

import bpy

class VIEW3D_OT_View_Center_Origin(bpy.types.Operator):
    bl_idname = "view3d.view_center_origin"
    bl_label = "Center view to origin"

    def invoke(self, context, event):
        v3d = context.space_data
        if v3d.type == "VIEW_3D":
            rv3d = v3d.region_3d
            current_cloc = v3d.cursor_location.xyz
            v3d.cursor_location = (0, 0, 0)
            bpy.ops.view3d.view_center_cursor()
            v3d.cursor_location = current_cloc
        return {'FINISHED'}

if __name__ == "__main__":
    bpy.utils.register_class(VIEW3D_OT_View_Center_Origin)


Why does this horizontal line appear across the model when I add a subsurf modifier?

Go in edit mode delete the faces (but not the points) where there is the horizontal lines, and then create the faces again.


When you do Smart UV Project you can generate UVs with islands.  Then you can select the pieces that need to be rotated and rotate them by pressing R 90 Enter.  You can also scale the pieces generated by pressing R 90 Enter.


2.8 & 2.81 - WebM / VP9 Encoding error: Additional information: g_timebase.den out of range

The WebM/VP9 Container and Encoder only worked after I had selected a Dimension preset. Then afterwards readjust the render scale percentage and frame rate.

Does this solution make sense? No. But it worked with two different files I had been working on. Defining the dimensions manually for some reason caused the error previously mentioned and also the error,

CQ level 0 must be between minimum and maximum quantizer value (2-31)

which I received when setting the "Output quality" to "Lossless".


How to achieve uniform Inset and Extrude on multiple nonplanar surfaces?

Something along these lines might do it.. just following my nose, someone might find a snappier way..

The inset of the outer edge is not uniform

I think the only reason for this is that you scaled your cube in Object Mode, and it's carrying an object-level non-uniform scale. CtrlA > Apply the scale of your object, and if your inset is set to even, it should be even.

I have no idea how to loop cut the vertical slot

It's not a loop-cut, because it's not a loop. K Knife, with C to constrain its direction orthogonal to your view, should do that. Cut from an orthographic front view. The only problem is, how to get the cut right in the middle..

I EZ extruded the top edge up in Z..

CtrlX Dissolved the odd vertices, and Edge menu > Subdivided the top edge once to give me a guide-point in the middle. Then, looking from the front, You can K with C to constrain, cut an edge straight down the middle of the front region. You can discard the guide-edge once you're done with it.

Then, as you have before, you can I inset the whole front region twice, remembering or CtrlC copying the second distance, the width of your rebate. Now select the central cut line and CtrlB Bevel it by half that distance. (You can paste in the copied Insert distance and add a /2 after it into the width field of the Bevel's adjust-last-operation panel)

Then E extrude as before, for even, centered rebates:

You can SY (or whatever dimension) 0 with the Pivot set to Median, to flatten the backs of your grooves.


Experiments with array and mirror modifiers:

Mirror and array : your configuration more or less

After that, there is some guess to find the good position and this position will depend on both the object's origin and of the position of the 45° angle:

Mirror and mirror

And second way to do it is to place an empty at the middle of the 45° part (use snapping to do it), use it as mirror object and rotate it 45°.

Now add a second mirror, mirrored in X and Y, with a second empty as mirror object, and place this empty at the middle of the figure

Note that this last configuration (2 mirrors) does not depend on the object's origin location.

Link to the blend file


Having a collision object. How to kill particles from a defined source?

You can let particles Die on Hit by enabling this feature for one of your P object.
Collision object with Kill Particles option can do the same, but there is not a possibility to restrict it for a specific particle system - it works globally.
Particle System Properties > Physics > Deflection > Die on Hit

Or you can let collide particles with specific group of objects via Collision Collection.


Is there a tool similar to maya's "edit edge flow" in blender

Not exactly, but there are some tools which you can use to get similar results in specific situations.
Shrink/Fatten (Scale along normals)
Press AltS

Smooth subdivide
Change Smoothness in the redo panel (F6) after subdividing

Smooth loop cut
Change Smoothness in the redo panel after cutting, or set the smoothness while positioning the cut with AltMouse Wheel (the smooth value is displayed in the header).


How can I slice an object horizontally into equal pieces?

Boolean modifiers

I'll report the main passages of the method suggested by BlendersSushi in this article.

Basically it uses the Boolean modifier in combination with thin planes.

Start from creating the Array of evenly spaced planes

Apply the Array modifier and add a Solidify modifier with the minumum thickness possible (we'll lose the part inside the extruded plane)

Apply the modifier and Separate by Loose part by enter in edit mode and press P.

Select all the plane and make the object to cut the Active object. Then Run the script:

import bpy

# Get all selected except Active Object
slave_objects = (bpy.context.selected_objects)

# Get Active Object
master_object = bpy.context.active_object

# Iterate each newly created Modifier to point to corresponding slave objects

for num, slave in enumerate(slave_objects[:-1]):
    print(slave.name)
    bpy.context.scene.objects.active = master_object
    bpy.ops.object.modifier_add(type='BOOLEAN')

    current_modifier_name = bpy.context.object.modifiers[num].name

    bpy.context.object.modifiers["{current_modifier_name}".format(current_modifier_name=current_modifier_name)].operation = 'DIFFERENCE'
    bpy.context.object.modifiers["{current_modifier_name}".format(current_modifier_name=current_modifier_name)].object = bpy.data.objects["{slave_name}".format(slave_name = slave.name)]

After a while, you'll have the object automatically filled with Boolean modifiers.

Apply them, then add an Edge split modifier to get rid of shanding artifacts

Run the Origin to geometry command for an easier object handling.

Now you are able to rotate/translate each object.

By pressing Numpad/ you'll be able to get in to the Local view mode of the selection and examine each section.


What is the difference between "Pose" and "metarig"

Every object in Blender has a transform/object-block and a data block refered to object and object data.

  Object
  Holds information about the position, rotation and size of a particular element.

  Object Data
  Holds everything else.

There are various object data types. An object's object data can be swapped to another and multiple objects can share the same data. A null object owns no object data.

Object-data of the type armature is similiar. Your object-data is named "metarig". You can edit it by entering edit mode. When we enter edit mode for a mesh object (like a cube), the outliner stays the same. However, when we enter edit mode for an armature the outliner provides more information. When in edit mode, the armature object-data expand into a hierarchy. This feature is very helpful for editing the armature type object-data, since the hierarchical structure is important. (Meshes or curves don't display any information in the outliner, but that's ok, since the 3D View is a sufficient representation.)

Unlike all other object types, object with armature object-data have a third mode: pose mode. The bones created in edit mode are accessible in pose mode as well, but no for editing, just for posing. The pose bones also store transformation properties, but these are relativ to the rest pose. The restpose is deduced from the bone setup in edit mode and can only be changed in edit mode.

Next to the armature object-data, an armature object always will have pose-data.

The Pose datablock stores the bones pose. You will notice that when we enter edit mode the posebones disappear, because we can't edit the pose in edit mode, only the armature's object-data.

Are posebones and editbones the same?

In terms of describing a hierarchy, they look very similiar. But editbones (stored in the object-data "metarig") contain the rest pose of the armature and posebones (stored in the pose-data "Pose") store the pose of the bones. The posebones are also those that get keyframed. Edit bones can't be keyframed since the rest pose is unique.

Obviously an armature without a rest pose (the basis for all transformations and deformations) or a pose (the actual transformations and deformations) would not work, which is why you need both and cannot delete either.


How can i render only one object but still have the rest affecting it?

You can toggle object visibility at render:

Or play for each object with Cycles settings (here in 2.79):

[EDIT]

You can also render just a portion of the screen (CTRL-B on 2.79, then draw the box around your object) which can work mostly if your object doesn't move much in an animation.

For batching Cycles settings, I guess a python script would work, but that's above my current paygrade.

You can probably find an easy way to run through the objects list and set cycles_visibility.diffuse, cycles_visibility.camera, etc.


Is it required to have a cycle in an animation?

When you open an action and Blender displays a frame, Blender looks for the bones associated with the keyed channels on that frame. Only channels with fcurves of the action are updated, unkeyed channels remain with the same values.

If a character is posed sitting down and a nod action is opened (which only has keys for the head), only these (head) keys are going to update the bones (the head). It doesn't matter in which position the characters other bones were, when the nod action was created, only the bones are remembered which are keyed. For the other bones, there is nothing to evaluate.

A single key  is enough to create a horizontally extrapolated fcurve. The solution to your request is to simply key all bones on at least on frame of the animation. If this clutters up your action editor with too many channels, you can always regroup them and/or change their order by selecting them and pressing ⇞ Page up/⇟ Page down. Most actions will look like the image below. If you want bones to preserve a certain position, key them all!


In the material Game Settings section change Alpha Blend from Opaque to Alpha Clip, and in Transparency section you can adjust the Clipping amount by increasing or decreasing the Alpha value.


How to export blender model to Metasequoia files(.MQO)

I found this plugin : meshIO, I've tried to install it and apparently it's working:

http://sourceforge.jp/projects/meshio/

After installation, you can export in .MQO file with file -> export


You can change your UI font size, and then use Numpad - where you want smaller font.
Preferences > Themes> Text Style > Widget


How can I duplicate parented objects properly?

The simple anser is: select both of them. It's easier to see in wireframe mode. When you duplicate several objects together, their relationships get copied, too.

If you have selected both of them and the pupil doesn't move, it may be the pupil's location is locked. It will be duplicated but it won't move, so you have two pupils at the old position.


How to convert equations to work with Blender and animation nodes?

This is very easy to do, here I'm showing for a simple equation, y = sin(W*x), where W is a parameter and x is an independent variable.

Step-1
Create two lists, one for the parameter (parameter-1 is as W in this case), and other for variable x. Make a loop using the parameter-1 list as iterator and x-values as an input list,

Step-2
Make a group node (Equation) for y = sin(W*x) equation which later helps you to easily replace with another equation if you want. I'm converting x and resultant y list into a vector list and as output from the group node.

Step-3
Then add this group node into the Parameter Loop which we created in the step-1, and you view the output vector with 3D viewer Node.

Step-4
Last step to convert group node vectors to splines (curves) using "Splines Form Points" node and then as output from the parameter loop. Use the Curve Object Output node to convert splines to a curve object which you can render.


Change Encoding Settings through Python API

Set Output.file_format to FFMPG and adjust the attributes of Render.ffmpeg:

import bpy

scene = bpy.context.scene
rd = scene.render

# Set output type
rd.image_settings.file_format = "FFMPEG"

# Set output format
rd.ffmpeg.format = "MPEG4"

# Set the codec
rd.ffmpeg.codec = "H264"

...

Other options:

codec: MPEG1, MPEG2, MPEG4, HUFFYUV, DV, H264, THEORA, DNXHD, PNG
format: MPEG1, MPEG2, MPEG4, AVI, QUICKTIME, DV, H264, XVID, OGG, MKV
video_bitrate: 0 - infinity (integer)
maxrate: 0 - infinity (integer)
audio_channels: MONO, STEREO, SURROUND4, SURROUND51, SURROUND71
audio_bitrate: 32 - 384

For all available options, see the API on FFmpegSettings.


How do I change the default location Blender opens when I want to install an add-on from file?

Ohh I see. So to change this, you may want to go to the File tab in the USER PREFERENCES. To change the location Blender defaults to installing add-ons from, you need to change the location of the render cache. This can be done by clicking on the Render Cache file preferences in the file tab, and choosing a location in your computer or on an external drive. This should solve your problem.


How to not get hard edges in Eevee transparent emission material?

You will have to mix the final shader with a transparent shader and use fresnel node as factor(fac) value, then you can use fresnel's ior value or a color ramp for controlling smoothness and area to be cut.(Switch color ramp to B-spline for smoothest transition you can have.)


This sounds like the child objects have impact on the physics.
I assume your helicopter is rigid-body. That means it can collide with other objects such as static objects.
Now you parent the character object to the helicopter. I guess the character object is still static (or was dynamic and becomes static via parenting).
The problem is that the character object collides with the helicopter. The helicopter (as rigid body) will change position due to the impact. As the character object is parented to the helicopter the collision will always be present, making the helicopter move even further.
Solution
Ensure there is no collision between parent and child.
This can be by making the child ghost or by ensuring there is no intersecting face between the different physics meshes.


Materials information on a file Blender Internal Render

A Text Editor window containing a Python Script.  Filename indicated has the suffix [.py].  Line numbers and Syntax Coloring enabled. Yellow arrows from left to right show, Window Type, Name of file, Buttons for line numbers and syntax coloring, Button to Run Script.  Image Above.

Only copy the newest software code sample.  The images above have older software.  But they address questions that may apply to you which are not letter by letter code specific.

NEWER

import bpy
import datetime

print("-" * 88)
print(datetime.datetime.now())
print("-" * 88)

def inspect_m_textures(simple_sleek):
    print(bpy.types.ImageTexture, " Preferred")
    for m in bpy.data.materials:
        #print("M ", m.name)
        b = False;
        for ts in m.texture_slots:
            if hasattr(ts, 'name'):
                b = True
                continue
        if b:
            print("M ", m.name)
            inspect_t_textures(simple_sleek, m.texture_slots)

def inspect_t_textures(simple_sleek, slots):
    #print(bpy.types.ImageTexture, " Preferred")
    n = 0
    fs = "%03d" # format string
    #for t in bpy.data.textures:
    for ts in slots:
        #print(t.name)
        #print(type(t))
        #n += 1
        if not hasattr(ts, 'name'):
            continue
        t = ts.texture
        if isinstance(t, bpy.types.ImageTexture) and hasattr(t,'image'):
            n += 1
            ns = fs % (n,)
            if hasattr(t,'image'):
                x = t.image
                if hasattr(x,'filepath'):
                    print(ns, t.name, t.image.name,t.image.filepath)
                else:
                    print(ns, t.name, "Incomplete", "Incomplete")
            else:
                print(ns, t.name, "No Image")
        elif not simple_sleek:
            n += 1
            ns = fs % (n,)
            print(ns, t.name, type(t), "Other No Match")

inspect_m_textures(True)

OLDER

import bpy
import datetime

print("-" * 88)
    print(datetime.datetime.now())
print("-" * 88)

def inspect_textures():
    for t in bpy.data.textures:
        print(t.name)
        #print(type(t))
        if isinstance(t, bpy.types.ImageTexture) and hasattr(t,'image'):
            x = t.image
            if hasattr(x,'filepath'):
                print(t.name, type(t),t.image.filepath)
        else:
             print(t.name, type(t), "?")

inspect_textures()

Python for Cut and Paste.  Code Block Above.  Inspect, Verify and Improve. You can delete comments and extra print statements and extra print arguments.

Open or use text editor window. New Text. Name Textures.py  . Copy and paste the text above.  Make sure the formatting is retained.  Execute from Button or Keystroke indicated on Tooltip of Button. The console window has the textual results. Toggle the visibility of the Console Window from the menu.  In the [Info] window Menu/Window/Toggle System Console

Console Window on Windows 10.  Console allows Copy and Paste.  Python allows Standard Out Redirection.  Image Above.

Toggle the System Console. Image above.


How would I bend a cylinder while keeping it's shape?

It seems like your mesh has far too few vertices. Try to add some subdivisions, especially at the elbow. Blender needs enough vertices at the position of bending to create organic looking bends. After that, reconnect the mesh with automatic weights. The next you could check is "preserve volume" in the armature modifier of your mesh, and last, position your armature modifier before any subdivision surface modifier.

Additionally, it seems you are using two armature modifiers. It's probably better to create one rig with connected bones, and apply them to your mesh with automatic weights. This way, each bone has a different weight, a different strong influence on a single vertex. There are many tutorials on this theme available, and its to much to explain in short here.


Why im not getting thickness with shrinkwrap modifier

The shrinkwrap modifier will flatten your mesh (as explained to you on your previous question) since it will move all vertices onto the target mesh.

As an alternative you can try using a lattice to deform the mesh and have the lattice use the swhinkwrap. As the lattice is deformed your mesh will undertake a similar deformation.

Create a lattice with only one subdivision on the vertical axis. This is achieved via the Lattice properties in the properties panel (only visible when the lattice is selected - see the right-hand side of the image below). The Lattice properties define the number of U, V, W dimensions of the lattice. The dimensions default to 2, 2, 2 - effectively forming a cube. By increasing the dimensions in two directions (to give us some subdivisions) and setting the other dimension to 1 will form a plane. When the plane is deformed this can be used to affect your mesh - but since the lattice plane has no 'height' it also will not affect the 'height' of your mesh. Position the lattice along the baseline of the mesh you want to deform.

Add a lattice deform modifier to the design that you want to bend, and select the lattice object as the one to deform the mesh.

Now simply add a Shrinkwrap modifier to the lattice with the Target set to the surface you want to deform to. The lattice should now be deformed to the surface and your mesh will be deformed similarly. Adjust the Shrinkwrap distance and settings to fine-tune.


Here is a way to do it, tell me if it's clear:


What I landed on was similar to boots, but using a Clearcoat.

I couldn't shade smooth here, I'm assuming you can at some later point in the process.
As far as the fluid sim portion, to me the main thing to aim for is pronounced and persistent bubbles.  I don't know if that can be fully achieved with these controls:

I think in the longer term an emitter/rigidbody system of some sort would be necessary to maintain the appearance.
All I can say is good luck, because baking these sims to test behavior is very time consuming.


Mathematical Ratio among three point lights

There is no such formula, as lighting depends on the intentions of the artist.

Moreover thinking in three point lighting is also quite limiting, Sometimes you just need one light, sometimes you need more than 10 sources...

Some questions to ask yourself are:

What are the characteristics of the object that you want to portray? How is your lighting going to enhance, reveal or suppress them? Where is the main light source coming from? Do you want defined shadows or do you want soft ones? How dark do you need the shadows to be? How is the shadow of an object going to affect others in the scene or how are the shadows of other objects affecting the one you are focusing on? Can the lights affect how you perceive the shape of objects? Should your object be brighter or darker than the background? How would the light help guide the viewer on reading an image? How are the bright and dark areas affecting the overall composition of the image?

There are endless variables, and the history of art going back to cave paintings deal with solutions to particular challenges... Study images you like and think of where the light is coming from and how the the different sources interact.

Try things, experiment with placement, size, intensity and color and you'll find answers according to your taste.


Subtracting in Weight Painting Adds Material

I would recommend that you never substract any bone weights (unless you know exactly what you are doing, or have all correctly painted weights locked). Blender assigns the lost weight to other bones in proximity, but the program can never know which bone you would want the substracted weight to be on. Instead, add the weight to the bone, that should gain influence in the specific part of the mesh, the weight you add will be substracted from the other bone. It seems, your weight gets transferred to a bone that has transformations, therefore the mesh will displace. Select all bones in posemode and reset them (alt g for position, alt r for rotation and  alt s for scale). If you paint your weights in rest position, nothing should move.


Set material of a vertex group of a certain face

You can modify a previous answer to do this:

import bpy

o = bpy.context.object

for p in o.data.polygons:
    # Get all the vertex groups of all the vertices of this polygon
    verts_vertexGroups = [ g.group for v in p.vertices for g in o.data.vertices[ v ].groups ]

    # Find the most frequent (mode) of all vertex groups
    counts    = [ verts_vertexGroups.count( idx ) for idx in verts_vertexGroups ]
    modeIndex = counts.index( max( counts ) )
    mode      = verts_vertexGroups[ modeIndex ]

    groupName = o.vertex_groups[ mode ].name

    # If this polygon belongs to a specific VG, change its material
    if groupName == "VGwereInterestedIn":
        p.material_index = material_index # The material slot we want to use to shade polygons in this VG

EDITED:

I revised the code to answer the actual question, while leaving the above answer in case it interests other users. The code below takes a list of face indices and a material index, and assigns the material index to all the polygons that belong to these faces' vertex group/s.

import bpy

o = bpy.context.object

# List of face indices that represent vertex groups we want to shade with a specific material
myFaceList = [ 0, 100, 52, 32 ]

# Index of the material for shading the vertex group/s of the faces above
materialIndex = 1

def find_polygons_vertexgroup( p ):
    # Get all the vertex groups of all the vertices of this polygon
    verts_vertexGroups = [ g.group for v in p.vertices for g in o.data.vertices[ v ].groups ]

    # Find the most frequent (mode) of all vertex groups
    counts    = [ verts_vertexGroups.count( idx ) for idx in verts_vertexGroups ]
    modeIndex = counts.index( max( counts ) )
    mode      = verts_vertexGroups[ modeIndex ]

    return mode

for pi in myFaceList:
    # Find the current polygon's vertex group index
    vgIndex = find_polygons_vertexgroup( o.data.polygons[ pi ] )

    # Iterate over all polygons and change their material VG is the same
    for p in o.data.polygons:
        p_vgIndex = find_polygons_vertexgroup( p )

        if p_vgIndex == vgIndex:
            p.material_index = materialIndex


1) In edit mode, go to your vertex settings (it's the triangle connected with vertices icon) and click the plus sign to add a vertex group. Rename this vertex group something like "shrink".

2) Select all your vertices (Hotkey "A") and then in the vertex group tab, click "Assign".

3) In your Shrinkwrap Modifier, add this vertex group.

4) Then, select only the vertices you don't want shrinkwrapped to your original.

5) After that, with those vertices selected, in the vertex tab and with the vertex group selected, click "Unassign". Those vertices will be excluded from the shrinkwrap.

Hope you can understand my explanation and good luck with it :)


How do I connect a bone to another bone via python script

Parenting is done in edit mode where you setup the armature.

arm.pose.bones already indicates it is related to posing bones.

Try:

arm.data.edit_bones['yourBone'].parent = arm.data.edit_bones['parentBone']


One object with multiple elements ,different colours to elements inside object

Assuming Blender Render.

In [Edit] mode  you can place the mouse over a connected vertex group and

press l the second letter of  B(l)ender to increase your selection .

Then in the materials panel pick one material and click
[assign] button.

Particles can be created with different colors in groups or duplicated faces or material nodes so it may be easier to let the creation of particles assign colors for you.


UV layout is just a visual guide for texturing and there is no reason to keep it for the actual texture.

Basic UV layout workflow

The principles are the same for all editing tools on how to use the uv-layout no matter it is Inkscape, Photoshop, Affinity Designer, Gimp or whatever:

Export your UV-Layout out of Blender (UV Editor > UV > Export UV Layout), either as vector svg or image file (png)
Open up the file in your favourite editing tool
Create a new layer and give it any meaningful name like 'UV-Layout'
Place your UV-Layout onto that new layer and drag it on top of the stack
Set 'Blend-Mode' of the UV layer to 'Multiply' which basically allows to "see trough" the 'unfold geometry' and having the layout as reference in place:

To avoid moving the layer by accident lock your 'UV-Layout' layer by clicking the little lock-icon
Create your textures somewhere below that layer eg. in another layer called 'texture'
When done with texturing: disable your 'UV-Layout' layer by clicking the eye or stack icon left to the lock icon and export it as image file (eg. png, exr or jpg)
Back in Blender, load up the image in the Image Editor (Image > Open) to check for issues:

UV Editor vs Image Editor
Final step is to assign the image texture to the shader and set the viewport shading to Material Preview or even to Rendered to see the actual result:


UV Mapped a cube for a skybox, seams showing

UV's are used to define a link between a 3d surface and a 2d surface. When a colour is needed for the 3d surface it finds a location in 2d space and then chooses the nearest pixel from the image. While rounding floating point numbers and choosing the nearest pixel from the image there can be slight variations while following the edge between two points. While texture painting may get drawn to the left, the renderer may choose from the right.

For this reason it is common to bleed the texture colour past the visible edge of the UV's so that there is always a valid colour to be chosen. This means you need to leave some space between islands when laying out your UV's.

When texture painting there is an option to set the amount of bleed, it's location is probably a bit misleading as it is found within the project paint settings.


Vertex weight Edit modifier not working as expected

Had the same issue. Change the falloff type to custom and set the first point from 0 to 1 (so the all falloff becomes a straight line on the top). Make sure that your vertex group is empty and the weight set to 0. Here are the settings of the modifier:


Is there a post-finish operator hook in the python API

No, Blender doesn't have this functionality, Check on the documentation for bpy.app.handlers, aside from this we don't provide other hooks into Blender.


Blender NPR: flat shader that shows depth?

Fol Amor's toon shading was a combination of:

Self-luminated material (the flat-looking character)
Shadow pass (maya has ramp shaders, don't know about blender)
Rim pass (shader that highlights white around character)
zdepth as mentioned above.

it also has to do with how you composite all those passes together. You can do so via Adobe After Effects.

If you dig around vimeo, some of their artist have a making of that's specifically towards their render passes.

Their film's environment was a combination of 3d props/visuals with 2d matte paintings for the background.

Cheers!


Best way to tile a complex shape with a texture?

I think a simple unwrap would do just that. You just need to set all the outer edges of your shape as seams, so the UV unwrap 'knows' where to separate the shapes (UV islands) and avoid distorting and overlaping in the UVs.
To set edges as seams: in edit mode, select only the outer edges of your platforms and then click on "edge" and "mark seam".
Then select all faces, hit "U" and "Unwrap". I think it should give a pretty good result. Might need to tweak a bit in UV editing, like rotating the islands so they align with the texture pattern and stuff like that.


Force scientific notation in Blender GUI

Make a Scientific Notation Property Group.
As a workaround could set up a property group to handle scientific notation. Restricted to the significant digits of the float property, but allows to set the the power.
import bpy
from bpy.props import FloatProperty, IntProperty, PointerProperty
from bpy.types import PropertyGroup

class ScientificNotation(PropertyGroup):
    def get_num(self):
        return self.number *  pow(10, self.power)
    number : FloatProperty(min=-10, max=10)
    power : IntProperty()
    value = property(get_num)

bpy.utils.register_class(ScientificNotation)
bpy.types.Scene.foo = PointerProperty(type=ScientificNotation)

Layout with both number and power to set. Use the value property in calculation.  Could use a string property for the number, to get more sig digits.

Example of use in python console.
>>> C.scene.foo.number = 6.62607004
>>> C.scene.foo.power = -34
>>> C.scene.foo.value
6.626070022583007e-34

See also  https://blender.stackexchange.com/a/134310/15543


There is a way. Grab the model and press alt+p to clear parent. Then, go into Object Data properties and delete all of the vertex groups. Once you have done that, you can delete the old rig and work with the new one.


Restoring object transformation data after execute 'apply' command

Script.

Grab the script from here

Basically its the rotation that needs to be reset, once it is axis aligned, scaling, translating and moving the origin are trivial.

Put the object into edit mode.
Select a face that has a normal and edge aligned to axes.
Run the script.
If the selected face didn't axis align, Undo  Ctrl Z,
and try with another face.


How do I wrap text around a circle having it still standing up?

This relatively automated method places them automatically.

Create a simple plane object. In Edit Mode move about the Y axis the distance of your clock radius.
Aligned with the plane object center (not the geometry) add an empty object and rotate it $-30º$ about the Z axis.

Now add an Array modifier to the plane, set to Fixed Count and 12 iterations. Turn off all offsets and activate Object Offset pointing to the previously created empty object.

Create a bunch of numbers as separate (text or curve) objects. Center the text both vertically and horizontally for easier placement. Add them all to new collection (named "Numbers") containing those numbers exclusively.
Have in mind that the order in which you create your number objects is relevant. Particle sorting is as far as I can tell most likely obtained from chronological creation order, so the sequence you create your text objects in will directly influence the way numbers will be placed by the particle system, so when creating new objects or duplicating existing ones be sure to follow 1>2>3>...>12.
Now add a particle system to the plane set to Emitter, reduce the count to exactly $12$, turn on Use Modifiers, disable Random Order and Even Distribution and set the Particles/Face count to $1$.
Activate Rotation and under it set Orientation Axis to Object Y.

Under the Render panel pick Collection as Render As type and set the numbers collection as Instance Collection. Make sure Whole Collection, Pick Random and Global Coordinates are all off, and under Extra enable Unborn and Died.

Optionally turn off both Show Emitter and Render Emitter in the Viewport and Render panels.
This should ensure numbers are correctly placed at the right angles automatically for any arbitrary number of items without rotating them individually.


How do I copy vertex groups from one object to another?

Vertex groups are object data, so they will be copied by ⎈ CtrlL> Object data.
However, this will link all other object data as well.

For a onetime copy of only object data, you might want to try the bundled Copy attributes addon.

Once it's enabled, call it with ⎈ CtrlC (warning, this conflicts with object copy/paste):


100% weight is not enough for ensuring a rigid stuck, check the deforming vertices: they surely have some weight relatively to another bone (shoulder, neck, head, ....). The vertices will move exactly with their bone if they're weighted to that bone ONLY (even if weight is not 100%).

So you have to remove unwanted weights.

Another method is to separate all pieces and parent them with the associated bone with the option Ctrl P - Bone.


Move the camera view display back to the center of the screen.

In camera-view, press shift + middle mousebutton, then move your mouse and reposition your cameraview.

Alternatively your keyboard might have Pos1, works for you as well.


How do I add a camera so that it moves along a path while focusing on an object with Python?

Basic example using a circle based on Cegaton's setup from here.

Add the primitives and a camera. Assign each object reference to a new variable and add a Follow Path and Track To constraint using Object.constraints.new() method. Finally set all the constraint properties, eg. assign the variables to the FollowPath.target or set TrackTo.up_axis to 'UP_Y':

import bpy

# Add Suzanne
bpy.ops.mesh.primitive_monkey_add(size=2)
suzanne = bpy.context.object

# Add Circle
bpy.ops.curve.primitive_bezier_circle_add(radius=10)
circle = bpy.context.object

# Add Camera
bpy.ops.object.camera_add(location=(0, 0, 0))
camera = bpy.context.object

# Follow Path Constraint
fp_constraint = camera.constraints.new('FOLLOW_PATH')
fp_constraint.target = circle

# Animate Button
bpy.ops.constraint.followpath_path_animate({
    'constraint':camera.constraints["Follow Path"]
    }, constraint='Follow Path')

# Track-To Constraint
tt_constraint = camera.constraints.new('TRACK_TO')
tt_constraint.target = suzanne
tt_constraint.up_axis = 'UP_Y'
tt_constraint.track_axis = 'TRACK_NEGATIVE_Z'


How can I find animation nodes in node editor?

if you don't have animation node editor you should activate "animation node" in your preferences/add_ons

you can get it from https://github.com/JacquesLucke/animation_nodes and install it

when you use object node in node editor, you should assign an existing object to it. you can't create new object with this object node.


Blender built as a python module does not support a gui interface, it's runs as if blender was started in background mode. You can verify this by checking the background value

>>> import bpy
>>> bpy.app.background
True

If you are working on an addon, you can edit the scripts and then  disable/enable the addon to re-load the changes in blender. You may also want to look at the notes on remote debugging using eclipse.

You can open a text file in blender and run it as a script, you can reload the file after changes and then run it again. You may find the addon I link to in this answer helpful, the other answer there shows how to run a script straight from the file in blenders python console.


Access image pixel data WITH color management settings

The only way I know to do this is:

create a temp scene
set the temp scene's color management as desired
save the image with image.save_render(path, scene=tmp_scene)
read the file at path back in as an image and access its pixels

Maybe someone else will have a better answer though.


How to get rid of triangulation in STL glass

The STL from a cad program is not going to have good topology. Topology is important for smooth shading and even more so for a glass shader.

It is kind of hard to tell from that one picture, but your mesh may have more issues then just bad topology.

A quick and easy way to possibly fix your mesh is to add a Remesh modifier.

That modifier will make a completely new mesh (out of evenly sized quads) that closely matches the shape of the original.


How do I import garment patterns into blender?

You need to export the patterns form the app you are using on some format that is supported by blender.

Image

JPEG, JPEG2000, PNG, TARGA, OpenEXR, DPX, Cineon, Radiance HDR, SGI Iris, TIFF

Video

AVI, MPEG and Quicktime.

3D

Alembic, 3D Studio (3DS), COLLADA (DAE), Filmbox (FBX), Autodesk (DXF), Wavefront (OBJ), DirectX (x), Lightwave (LWO), Motion Capture (BVH), SVG, Stanford PLY, STL, VRML, VRML97, X3D.


Issue With Subsurface Scattering and Scale on a Human Model

Your subsurface radius value probably needs to come down in proportion to your model's scale.  Observe the following difference in SSS radius:

With a 60m model, 1 meter between light bounces is still fairly surface level, scaling it down the light could penetrate all the way through the model.  Here's the section from the documentation:
RGB Radius
This is not in fact the radius of the subsurface scattering, but the average path length between scattering events. As the light travels through the object it bounces around then emerges from the surface at some other point. This value corresponds to the average length the light travels between each bounce. The longer the path length is, the further the light is allowed to scatter. This is the main source of a material’s perceived “scatter color.” A material like skin will have a higher red radius than green and blue. Subsurface scattering is the diffusion of light beneath the surface. You control how far the light spreads to achieve a specific result.


Are there good techniques for creating high poly regions within lower poly meshes when using subdivision modifier?

So the rules for good subdivision topology, which you're violating and which are responsible for your artifacts, are:

Quads only-- no ngons, and minimal triangles.
No 6+ poles.
Put 3 and 5 poles on the most planar parts of your mesh-- definitely not at places where your mesh has a right angle.

There are other rules.  The rules only really matter for non-planar faces-- for faces that are out-of-plane with their neighboring faces-- because any verts created in the middle of a planar neighborhood will still be in-plane, and it doesn't much matter where exactly in the face they get created.  (As long as you don't have any concave faces-- when you subdivide a concave face, the subdivision-generated vert might not actually be in the bounds of your face, leading to double of the mesh and z-fighting.)
One way that good subdiv topology is sometimes communicated is, "Follow your edge flow."  If you look at the top of your circle in N2RPm.png, you can see that you're just laying a grid over your circle and bridging to the edge.  "Follow the edge flow" isn't always very useful advice for beginners, because it's something that doesn't make sense for a while, maybe not until you're good at topo anyways, but that's a good example of not following your edge flow.
Now, given those rules, how do we bridge areas of dense verts with areas of sparse verts?  Something like this:

Notice something especially important: I bridge the higher vert count to the lower count in a planar part of the mesh.  Not where the mesh bends 90 degrees.  Notice, no ngons, no triangles.  All 3 and 5 poles are placed on planar parts of the mesh.
There are limits to bridging like this.  You can drop two verts, or multiples of that, every time you use a new edge loop.  Here, I'm bridging 16 verts to 8 verts.  But you cannot ever drop one vert-- you cannot ever, using pure quads, bridge an even number of verts to an odd number of verts.


Axis flip when converting matrix4 to quaternions

No, you are not doing anything wrong. It is rotation expressed as a normalized 4-dimensional vector. Do not worry about the values there, if they need to be negative that is fine - it is still a representation of the same rotation, it is only expressed in a way that makes some math easier. It is really hard to make sense of quaternion values just by looking at them.

You can make a plane and test the rotations on it. You need to set the rotation mode to quaternion in the n panel to be able to change bpy.context.object.rotation_quaternion and see it on the object.
If you create another plane and run the script again changing the rotation in euler mode for bpy.context.object.rotation_euler instead, you will see the rotations match despite the negative values that happen to exist in a normalized 4-dimentional vector notation of the rotation. You can add this to the end of your code to see this. You will need a new object created and selected as the active object:

import bpy
#bpy.context.object.rotation_quaternion = quat_f2
bpy.context.object.rotation_euler = euler_f2

You will be able to observe floating point/binary conversion precision errors if you decide to compare the results of quaternion to euler conversions by the numerical values doing something like this:

print( quat_f2.to_euler() )
print( euler_f2 )

The rotations are the same. Numbers differ because of the precision errors during the calculations. That is normal.

If you need to interpolate between the quaternions you face a problem that the same rotaion can be expresed with a negative and a positive quaternion and it is possible to rotate the long way or the short way around to the same rotation. If I am reading this correctly, the short path would be between two quaternions the dot product of which would be positive, so you can check if your current rotation from the previous is the short one evaluating if the dot product of the quaternions is negative or positive and then negate your current quaternion if needed:

if quat_f1.dot(quat_f2) < 0:
    quat_f2.negate()


How to tell whether Object is a duplicate?

It's possible to check the vertices of both meshes via unit_test_compare for a first quick test:

import bpy

first_obj = bpy.data.objects['Cube']
first_obj_mesh = first_obj.data

second_obj = bpy.data.objects['Suzanne']
second_obj_mesh = second_obj.data

print(first_obj_mesh.unit_test_compare(second_obj_mesh))

Console Output:

  Number of verts don't match

For Linked Duplicates iterate through the mesh objects in the scene and check if mesh data block is associated with multiple objects:

import bpy

obj = bpy.data.objects['Cube']
obj_mesh = obj.data

mesh_dict = {}
for i in bpy.data.objects:
    if i.type == 'MESH':
        mesh_dict.setdefault(i.data, []).append(i)

print(mesh_dict[obj_mesh])

Note: Of course, it's always possible to compare the geometry, even if it would take long time for calculation and a bit of math, depending on your requirements.


How can a smoke domain be hidden from render?

Your problem with the highlited nodes is that the density is affecting the color, but not the density of the volume.  So all areas of the domain are emitting light (at strength 1.1).

To fix this simply plug the density into a math multiply node to change the overall strength, then plug that into the emission strength.  You could also put it through a color ramp or RGB curves node first to adjust the falloff.

This way the areas of the domain with 0 density will be emitting 0 light as they should.

Without density controlling strength:

With above node setup:


How do I script simple math functions in OSL?

Never mind, looked at it again the next day and it was rather obvious.. just needed a break apparently

shader invrsquareroot(
    float x = 10.0,

    output float result = 0)
{
    result = inversesqrt(x);
}


You can do this by iterating through all of the objects in the scene which are found at bpy.data.objects. This is all the objects in all the all the scenes. You could also use bpy.contex.scene.objects which would be the objects in the current scene. Then you would want to make sure it was a mesh object by checking its type. Then get all the vertex positions, convert them to world space, and make them tuples, if you want. In the end you get this:

import bpy
for object in bpy.data.objects:
    if object.type == "MESH": #check if mesh object
        verts = [object.matrix_world * vert.co for vert in object.data.vertices] #get vertex data
        tup_verts = [vert.to_tuple() for vert in verts] #convert to tuples
        print(tup_verts) #display list

You could add tup_verts to a larger list if you wanted, and you can leave the positions as Vectors by accessing verts instead of tup_verts

In more recent versions of blender (>=2.80) it is necessary to use the "@" operator for the element-wise matrix multiplication instead of "*". I.e. "object.matrix_world @ vert.co". See this answer: https://blender.stackexchange.com/a/129474/22220


FAQ — blender.org

Can I use Blender commercially?
Yes you can. Any creation you make as an artist with Blender is your sole property, and can be applied for any purpose you choose to. This also applies the Add-ons and Python scripts you write for Blender.
If you like to distribute Blender itself, you have to be aware of the GPL rules, which basically means you have to make sources for Blender available as well. However, in general it’s sufficient to provide information that forwards to blender.org.

All software nowadays should contain licenses, no exception for Blender. License — blender.org, which the licenses of Blender itself is basically using GNU V2 and V3 but some of the component is a slightly strict license. eg. Cycles: Apache 2.0
If your usage contain any modification of Blender and redistribute it with commercial license, it will probably cause some problem since that's not what GNU wanted. But if your just using Blender to creating content, it will be fine.
And there's also an interest point is that, Sharing Blender or Blender add-ons or scripts is always OK and not considered piracy.


Whenever I tried to add a material slot to a tracking scene plane, it shades out black. The File is in **EEVE Mode**

Ok here is a simple solution go to your collection and move the ground from background collection to foreground collection

and the other way is to disable holdout for the background you will find it in the filters in collection


How can I infinitely loop a png sequnce in blender?

Name the images so that they have sequential numbers at the end of the name of the file.

Enable the images as planes addon.

In the add menu select add images as planes. Select the image sequence you want to import.

Click on the cogwheel icon on the right of the import menu to expand the options and select "Animate Image Sequence", set the material to Shadeless, Check Alpha and set it to Premultiplied. Enable Auto Refresh.

A plane with the image mapped to it will appear.

To make the image sequence loop endlessly enable Cyclic on the material.


How to render an object with both a base mesh wireframe and subdivision surface wireframe?

I found a way to do it only in the Blender Internal render engine.

I add a subdivision surface modifier to the object. Then I add a new wireframe material and make it shadeless. Then I add a new material and assign it to the object. As long as the wireframe material is on top of the other materials, it will be shown in the render. Then in edit mode I hit E and then Mark freestyle edge. Then I click on Freestyle in the Render panel to enable freestyle and in the Render Layers panel I click only on Edge mark.


Firstly, you've set the point density to use the defining object's vertices rather than a particle system. Click Particle System and select the particle system you want to use.

Secondly, make sure the emitter itself isn't rendered, by unchecking Emitter in the Render panel in the particle system.


How to get 3D points of a Mesh in world space coordinates?

you would need sth like this to get the object in world coordinates
import bpy
from mathutils import Euler, Matrix, Vector

            object_rotation = obj.rotation_euler
            object_translation = obj.location
            H_m2w = Matrix.Translation(Vector(object_translation)) @ Euler(
                object_rotation, 'XYZ').to_matrix().to_4x4()

            cam_H_m2c = H_m2w.inverted()

            cam_R_m2c = cam_H_m2c.to_quaternion().to_matrix()
            cam_t_m2c = cam_H_m2c.to_translation()