Problem - dark Border around Render Frame with Eevee Reflection Plane

Solution!
Render Settings > Film  set Overscan to Active

It seems that Blender trimms the area outside the camera frame and dosen't consider this informations. That's the origin of the problem. A falloff starts form there. The overscan option let some information outsite the camera frame and the effect dosen't occure.

Why this musst be like that - I don't know.


I got this to work if......

I created a group out of only the camera in the linked file ("A").

In my new file ("B"), I linked in the group from ("A").

In the outliner, I expanded (drilled down into) the linked group.

Then on the child group object:

Right Clicked.
Select >> Link Group Object To Scene.
Selected the camera object in the 3D view.
Ctrl+Numpad 0


How to access the window width/height inside a GLSL Shader?

It depends if the shader is set as an actuator "Filter 2D" or not. Then you can use the predefined uniform floats bgl_RenderedTextureWidth and bgl_RenderedTextureHeight. If it is just an arbitrary shader you would need to pass the values yourself as uniforms e.g.:

// glsl
uniform float ww;
uniform float wh;
...

And pass the values via the python api like:

# python
shader.setUniform1f("ww", float(bge.render.getWindowWidth()))
shader.setUniform1f("wh", float(bge.render.getWindowHeight()))

To set up the shaders you usually use code like this:

cont = bge.logic.getCurrentController()
own = cont.owner

vs = """
// vertex shader code here
"""

fs = """
// fragment shader code here
"""

mesh = own.meshes[0]
for mat in mesh.materials:
  shader = mat.getShader()
  if shader != None:
    if not shader.isValid():
        shader.setSource(vs, fs, True)
    shader.setUniform...


Is there a way to move an object file to file?

two ways i know,

file> append on one of the blend files, I don't find this as good.
have both files open and copy one object Ctrl-C and paste it Ctrl-V in the other blend file.

Hope this helps.


Blender Cycles: uniform position-based colors?

This is just a response to mark this question as answered. The user Gorgious linked a video which showed the solution: youtu.be/05HFa3jNBH0?t=24

The trick seems to be to switch to top-down, orthographic view, then project a UV map from view, shift the UV map over the desired part of the texture, then select 'individual origins' and scale the UV map projections of each object waaaaay down. Done =)

Thanks, Gorgious!


Prepare for a long journey. Start small. Aim to have something functional and complete, but simple, as soon as possible.
Here's a good intro on Python: https://automatetheboringstuff.com/
https://docs.blender.org/manual/en/latest/advanced/scripting/addon_tutorial.html gives a good overview of writing a simple addon.
I personally learned Blender addons best with Michel's tutorials. Since then he wrote a book about it. The old tutorials seem to be gone. https://blendermarket.com/products/creating-add-ons-for-blender
After you've learned everything, you need a good ref: https://docs.blender.org/api/current/index.html https://docs.python.org/3/reference/
And of course, as all addons for Blender are open source, go and open the folder of your favorite addon and start reading.


Copying from the info header in Blender 2.8

That's just how it is. It is not perfect. Some operations reported in the Info panel require a specific context to run and will not work in scripts or from the Python  Console, then there are a few that get reported incorrectly there as well. It is often helpful to see the info panel, but there are limits to its usefulness. See the documentation if you need to find a specific function or ask another more specific question describing what you want to do here if you cannot find the answer elsewhere online first.


CGBoost has some good vids on the topic. Also, try the sculptmode features branch. This has an excellent volumetric remesher that can convert your dyntopo object to quads for you to use the faster multires modifier with. This branch of Blender has lots of improvements over the ordinary Blender 2.8, but it's not official so be warned there may be bugs. Back up files, keep the old Blender around when you update just in case, etc., etc.
You could use the free and open source tool instant meshes for quad remeshing, too.

It's generally bad practice to have uneven detail density on a sculpture- you should get the low-frequency details right before the high-frequency details. But anyways, in your situation it's probably well advised to cut the mesh into pieces, then fill the holes, sculpt, and use Bool Tools to combine them later.

Filling the holes is pretty easy, enter edit mode once you've separated a part and go to mesh>cleanup>fill holes (or search with F3), and set the 'number of sides' to the max (100). If it fails to fill a hole (too many sides), try using select>select by trait> non-manifold, (in edge select mode, it won't show up if you're selecting faces) but be warned that it might select more than just the edges you want to fill. Once you have removed any unnecessary edges from the selection, press f to fill. I usually ctrl-f>Poke Face and then do some dyntopo sculpts on it to even out the triangles. Then you can use remesh or instant meshes to turn each part into quads, and multires.


I think you don't have a light and images appear pink with moved texture try to add a color to the objects and a base .


Unable to run Blender 2.8 beta on Raspbian Buster

Blender 2.80 requires at least OpenGL 3.3 to run its UI. I don't think Raspberry Pi 4 supports that. It says:

  OpenGL ES 3.0 graphics

at https://www.raspberrypi.org/products/raspberry-pi-4-model-b/specifications/

That does not look like OpenGL 3.3 to me.

As for 2.79, maybe you are not trying the correct build suitable for ARM processors. See this answer.


Dynamic EnumProperty values changing unexpectedly

The EnumProperty properties represent underlying integer values - 1, 2, 3, etc. - and the 'enum_items' function provides the conversion between the numbers and the textual description (in this case the names of the objects in the scene).

The problem is that the list returned by the 'enum_items' function is changing when meshes are added or removed from the scene so that the values held in the EnumProperty properties no longer corresponds with the same object. This means that as the sequence of objects changes, the corresponding enumeration value also changes, resulting in the values being reassigned.

The 'enum_items' list is currently being built directly from the context.scene.objects list and each item is appended to the list. When objects are added to the scene they are added to the start of the list of objects - hence they are appearing at the start of the list and this is shuffling the objects along the list - so what was in position 1 is now in position 2, what was in position 2 is now in position 3, and so on. A simple dirty fix to this would be to change the order of the list - by inserting each one at the beginning rather than appending them at the end. ie,

Change :

items.append( (obj.name, obj.name, "") )

to :

items.insert(0, (obj.name, obj.name, "") )

You should now find that adding new objects to the scene no longer upset the existing EnumProperties. However, deleting objects still presents a problem - unless it's always the 'newest' object that is deleted, although even then you have the problem that the EnumProperty still points to the same (empty) slot of the list (so if a new object is added again then it will be immediately populated into the same slot - rather than the slot being initially blank!).

To address this you can assign a unique identifier when adding items to the list (in which case it no longer matters on the order in the list since the uniqueid is used to maintain consistency regardless of the sequence) :

items.append( (obj.name, obj.name, "", <uniqueid>) )

This can be achieved as follows :

import bpy

# NEW CODE - Create a list to assign unique identifier to each mesh name
enum_items_store = []

def enum_items(self, context):

    items = []
    for obj in context.scene.objects:
        if obj.type == 'MESH':

            # NEW CODE
            # Scan the list of IDs to see if we already have one for this mesh
            maxid = -1
            id = -1
            found = False
            for idrec in enum_items_store:
                id = idrec[0]
                if id > maxid:
                    maxid = id
                if idrec[1] == obj.name:
                    found = True
                    break

            if not found:
                enum_items_store.append((maxid+1, obj.name))

            # AMENDED CODE - include the ID
            items.append( (obj.name, obj.name, "", id) )

    return items

class SomePropertyGroupEntry(bpy.types.PropertyGroup):
    mesh_obj = bpy.props.EnumProperty(items=enum_items)
    val = bpy.props.IntProperty()

class SomePropertyGroup(bpy.types.PropertyGroup):
    collection = bpy.props.CollectionProperty(type=SomePropertyGroupEntry)
    index = bpy.props.IntProperty()

class SCENE_UL_list(bpy.types.UIList):
    def draw_item(self, context, layout, data, item, icon, active_data, active_propname):
        if self.layout_type in {'DEFAULT', 'COMPACT'}:
            layout.prop(item, "name", text="")
            layout.prop(item, "mesh_obj", text="")
        elif self.layout_type in {'GRID'}:
            layout.alignment = 'CENTER'
            layout.label(text="", icon_value=icon)

class SCENE_OT_list_populate(bpy.types.Operator):
    bl_idname = "scene.list_populate"
    bl_label = "Populate list"

    def execute(self, context):
        context.scene.prop_group.collection.clear()
        for i in range(3):
            item = context.scene.prop_group.collection.add()
            item.name = "item"+str(i)
        return {'FINISHED'}

class SCENE_PT_list(bpy.types.Panel):
    bl_label = "UIList Panel"
    bl_idname = "SCENE_PT_list"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "scene"

    def draw(self, context):
        self.layout.operator("scene.list_populate")
        self.layout.template_list("SCENE_UL_list", "", context.scene.prop_group, "collection", context.scene.prop_group, "index")

def register():
    bpy.utils.register_module(__name__)
    bpy.types.Scene.prop_group = bpy.props.PointerProperty(type=SomePropertyGroup)

def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.prop_group

if __name__ == "__main__":
    register()

Note that mesh names are never removed from the list of IDs. This means that the unique identifier will only be re-used if a mesh is re-created or renamed to the same name as a previous mesh.


I would recommend that you use a proper IDE (Integrated Development Environment) that supports Python. This will allow you to check for syntax problems. The correct indentation of the code is important for Python because it is used to determine what part of the code belongs to, e.g. an if, else condition or a function.

Correctly formatted your first code should look like this:

import bpy

def driver_func(val):
    if val < 5:
        output = val * val
    else:
        output = val + 20

    return output

# add function to driver_namespace
bpy.app.driver_namespace['driver_func'] = driver_func

Note that everything that belong into the function is indented by four spaces. What belongs inside the condition is indent by another four additional spaces. This is necessary in Python, because unlike for instance C, it doesn't use curly braces to determine the scope.

Your second script is problematic for two reasons.

The syntax is invalid. If you want to perform an equality check you have to use == instead of =. The latter is only used to assign a value to a variable.
You're declaring a variable outside the function, but are using it inside without passing it as an argument. This is bad because a) you don't want to create global state b) in this particular case the driver will not be able to access the variable because it has gone out of scope. The bpy.app.driver_namespace['driver_func'] only contains a reference to the function, but not the variable you're trying to use.
You cannot access the active object like through bpy.context.active_object when using the code in a driver. It should be bpy.context.view_layer.objects.active.

The correct script would therefore be:

import bpy

def driver_func(val):
    active_obj = bpy.context.view_layer.objects.active

    if active_obj.name == "A":
        output = val * val
    else:
        output = val + 20

    return output

#add function to driver_namespace
bpy.app.driver_namespace['driver_func'] = driver_func


How to change the mapping of a texture in cycles?

The tutorial is using the blender internal render, you are using cycles.

To change the mapping type in cycles, click on the field for the Vector of your texture.

Or in the node editor, add either a UV Map node or a Texture Coordinate node.


why my curve shape become smaller than original source curve?

Curve control point's Radius ≠  1

Each control point has a parameter called Radius that controls the size of the object being beveled in the area of influence of that control point. You can see from the image sequence below how the parameter can be varied to alter the size of the section without a taper object.

In your specific case, the Mean Radius of the curve that can be seen in the Transform section of the Property Shelf is saying that the average Radius is different than 1 (size untouched).

By examining each control point you can see that none of them is set to 1, that's why the size of the beveling object is different from what expected.

The solution consist in restoring the Radius to 1 by calling the Set Curve Radius operator while all the control points selected in edit mode.

Result:


Moving from material to texture, how do I keep diffuse/specular settings?

It is possible to make color palette automatically through scripting in both unity and blender, but with given info and case it's beyond the scope of this question. You can create texture manually in blender through setting UV/Image view from view to paint, creating new 2px*2px image, and painting it with brush with radius 1.

For your other question, there is no simple automatic way to put unity-compatible specular data into your texture. The specularity behaviour depends purely of the choice of the shader and supplied textures in unity, and without further info it's hard to say much about how to proceed with that and also it's not really blender-related question, so you need to go look for unity-related tutorials and forums.

   To get the look in that tutorial you need to switch your material's shader in Unity from standard to Legacy > Diffuse


Some tips concerning the circular cut, starting from the answer indicated by Duarte Farrajota Ramos in the comments.

The result is the following, and this answer is concerning the cut only and its cleanup, not the logo part (as the approach may be very depending on the logo shape itself):

Just to say, we can notice that the starting mesh is very clean and uses a subdivision modifier so that we have a reasonable amount of vertices to work on:

After the cut is done, we obtain some distortions, as the cutting circle geometry does not correspond to the bottle. This is particularly visible without the subsurface modifier:

So, the cleanup consists mainly on three actions (and this works because we know that we'll have the subdivision modifier after that):

Dissolving unwanted vertices
Merging vertices
Adjust cut position

Dissolving vertices:

Select them
Use X and choose 'dissolve vertices'
The aim is to do that 'everywhere' to make quads again around the hole (again, we know that subdivision surface modifier will compensate that)

Mergin vertices:

At some places this is easier to merge AltM, either at center or at the last selected.

Adjust cut position:

Select the wanted vertex and use G twice to move it along the edge:

Once all done, in this case, remove the inner part of the cut:

Now select the border, extrude E, and scale S a bit. The aim for that is to isolate the central part with a 'clean' edge loop:

Last steps, filling the hole:

Continue that as possible and finally adjust vertices in the same way as the beginning so that almost all faces are quads:

Link to the blend file


Can the blender game engine render diffuse material nodes?

The blender game engine cannot render cycles materials. This might bring similar results, It's not currently available for download at the time of writing.


Check the Preferences > Addons. On my build the addon was present twice, which was indicated by an info bubble in this section (see pic below). There will be listed two paths, one of which you'll have to delete.


Removing specular intensity from all materials with internal

copy the script below, add a new text block, paste, right click, run script.  The specular intensity of all materials will be set to 0.

import bpy

for m in bpy.data.materials:
    m.specular_intensity = 0.0


Because that's exactly what pressing s with x does(look at your global orientation axes,x shows sideways).you might want to press y or -y to get what you want.


Is it possible to assign a parent to a control point of a curve using animall?

I am not sure how this works with the AnimaAll addon but the way I would approach this is to:

Select the control point of the curve in edit mode that you would like to attach to the head.
Press Ctrl+H to 'Hook' the control point, choose 'Hook to New Object'.
A new empty will have appeared that the control point will be parented to via the hook modifier that was just added. Parent this empty to the head in object mode by Shift selecting the empty and then the head and press Ctrl+P and choose 'Object' as the parenting type.

The control point is parented (via the hook modifier) to the empty and the empty is parented to the head.

The hook modifier can also be added by manually choosing to add a new hook modifier to the curve like you would add any other modifier.


How to intersect objects and delete leftover internal planes?

Select the objects and hit Ctrl+J to join them into one object, change to edit mode and select the meshes you want to intersect, hit Ctrl+F and select Intersect (Knife) from the menu and change to Self Intersect in operator panel.

After the operation is done, intersecting edges will be selected and you can mark them as seams Ctrl+E>Mark Seam, then select internal faces using L button when hovering with the mouse cursor over internal faces while in face selection mode.


Why the belt not fitting on body with shrinkwrap?

You should use the 'project' option of the shrinkwrap modifier:

'Nearest surface point' may stretch the mesh to find the closer correspondence to the target.

'Project' projects along the object (belt here) surface's normal until it reaches the target.

Link to the documentation: https://docs.blender.org/manual/fr/dev/modeling/modifiers/deform/shrinkwrap.html#mode

Complement

From there, if you add a solidify, you'll see that the two extremities of the belt overlap.

To avoid that, you'll need to use a vertex group to drive the shrinkwrap. But in this case, you have to apply the mirror modifier first, so that left and right parts can be different:

Apply the mirror
Enter edit mode
Select all the vertices
Create a group and assign the vertices to it
Use this group in the shrinkwrap modifier (the modifier will now use these weights to moderate the influence of the shrinkwrap)

Now, switch to weight paint mode in order to change the vertex group's weights values:

Enter in weight paint mode
Enable vertex selection
Choose/select the vertices on the right (or left)
Choose a substract brush
And tune until the wanted result is obtained


removing the white border in material 3d viewport when selecting alpha blend or alpha clip

i figured out an acceptable workaround for my purposes, i changed the color in the transparency node from white to a very dark green and its good enough for me


I write this as an answer to be able to add a picture of what I guessed you want: is it something like this?

I can explain step-by-step how to get it, but I wish to be sure that I did understand well...

this was obtained starting from a simple cylinder and then an image like this:

Let me know, in comments, if you wished to get something like this, and if you still need instructions, I'll add to this answer...

[edit] Ok, since you still need it I try a complete step by step description of how I got that vase above. I hope your hospital trip was nothing too bad, anyway :)

The overall descriptio is this: we're going to create a quite detailed vase, first, applying all modifiers, in order to obtain a good-looging basic shape, with smooth geometry (remember that 3d printers don't smooth geometry as 3d programs do, so to get printed smooth results, your mesh needs to be really smooth, and thus, detailed).

Then, we will duplicate a rectangular portion of the outside conical surface of the vase, that we will use to create an "extruded" flower shape, using a displacement modifier. This extrusion needs to be far more detailed than the vase, because this is required to have a good displacement result, but the displacement will be applied to a curved surface, so the "extruded" flower shape will nicely follow the overall vase curvature.

Done that, you'll have two separate shapes: the basic vase, and a rectangular portion of its outside surface dispalced as a fower: you can then join the two objects, and try to export this to STL format, and print that: in my experience, 3d printer's software (like CURA or others) can print an object if they can spot a "solid" shape, even if it comes from a roughly joined mesh,like in this case.

Here's how to:

First step is start from a basic cylinder, remove top face, and scale lower face, to get a basic vase shape, giving it a "brick red" material (cyles renderer, later on this)

Then, use a solidify modifier to give some depth to your vase mesh, and apply it whan satisfied

Then, since we're going to use a subdivision modifier (subsurf), let's add some extra edge loop near the top and bottom of the vase shape (and also on the top ring of the vase), otherwise it would distort too much there. You can do this with CTRL+R command: a new purple edge appears, then move it where you need, then apply (right click or enter).

Now let's apply the subsurf modifier, level 2 is enough,

and then apply it, getting a quite dense and smooth basic shape

Now move the view to front, and select a rectangular shape of faces

Then duplicate it

And then separate this duplicate part, obtaining a separate object. Don't move, scale rotate this separate object or the vase, they need to stay where they are now!

To get a better view of the separate object, hide the vase (select it and press H)

Now you could make this object mesh more evenly spaced, but preserving its curvature: I'm not sure this is really needed, but I did so, dissolving some edges

...ending with just this central one

then, using again CTRL+R  I subdivided the upper and lower parts, ending with the same amount of vertical and orizontal loops.

then I subdivided this mesh 20 times (needed for later displacement): you'll get a VERY dense mesh...

then I loaded a black flower on white background image in the image/UV editor, like this. The flower image is also set as the texture of the vase "brick red" material (see texture settings)

in edit mode, using U on the complete selected mesh, I chose "project from view (bounds)" to get a nice fill of the UV grid on the image (on the left)

Then, move to modifiers and insert a displacement one, select a small negative strength, select "UV" texture coordinates, and set the object UV map as "UV map"

What you'll get in object mode is like this:

Now unhide the vase you hidden before since it's invisible now, see the outliner, and clik on the disabled "eye" icon to make it visible again, you'll get something like this:

Place camera and lights in a good way to see the result, which should be something like the above result:

I know this isn't too short, but is not that complex, after all. Let me know if some clarification is needed. Meanwhile, I thought of another method, maybe simpler, to get similar results... If it works, I'll add another answer, or add to this one.


I don't think subdivision and self-collision matters much, even the model size (just don't make them extremely tiny). In fact, subdivision generates even worse artifacts in some cases.

For the "exploding" issue, what matters much is the Distance parameter in Cloth Collision panel for cloth object, and the Outer parameter in Collision panel for the collision object. When the initial gap between the two objects are relatively small, you need to tweak these two parameters specifically so that they will not become "procedually intersecting" before running simulation.

Of course, subdivision will lead to much better result, as long as key parameters like above can be taken good care of. But it doesn't mean other things are trivial. For example, don't forget to apply Scale for object when doing so.

Example File


How can I make an indent on a edge loop?

On a subdivided cube example you can see how a ring cut on the right side of the top face can add unnecessary faces all the way around.
Alternatively you can localise quads and save on face count in the other two cuts.
The other cut on the top face allows a flat base to the cut.
The cut on the side face of the cube creates an angled finish, adding less faces overall.


Where can I see and edit keyframes for texture properties?

I needed to deselect Selected Only from the Curve Editor header and use the search bar or enter all the nested properties of the material.

The material had to be selected within the project panel where you see all your object hierarchy.

After that I could add keyframes, and use Shift + E to add a Cycle F-Curve modifier.


How to emit hair particles from other hairs

It is possible to do this non-destructively, but you must be using a mesh object for your first object.

Add a particle system your base object, then set the Type to Object and select your initial hair object:

Add a hair particle system to the hair object:

The hair particles will also appear on each instance of the mesh object, but only in the render (this is probably a good thing :P).


Airbrush and Soft Pencil always black, regardless of material chosen (2D, 2.8)

I've figured it out. Airbrush and Soft Pencil are Dots material. If you have only Line materials, blender will switch to the default "Dots Stroke" material, which is black. Change the color of this material.


The reason my enums were not showing up was due to me changing my property definitions to use the ':' operator instead of '=', such as..

bpy.types.collection.FBXGSpawner : EnumProperty(

instead of..

bpy.types.collection.FBXGSpawner = EnumProperty(

I read that we are supposed to use the ':' operator in Blender 2.8+. If this is the case, maybe someone can help point out what else I may have done wrong to prevent properties from drawing. One of my simple drawing functions..

# draw object settings
def draw(self, contex):
    aobject = bpy.context.object
    layout = self.layout
    box = layout.box()
    con = box.row()
    con.prop(aobject, "MergeWith")

If anyone knows the reason they were not rendering, post and I will accept it as the answer. Thanks!

Edit: After playing around with the code, I believe this is (at least close) to the correct way to set up a custom enum:

class FBXG_MappingPanel(bpy.types.Panel):

    # define enum flags
    EnumTypes=[ ('GA', "Asset", "tooltip"),
                ('LP', "Low", "tooltip"),
                ('HP', "High", "tooltip"),
                ]

    # define enum variable
    EnumVariable= bpy.props.EnumProperty(
        name="Title",
        options={'ENUM_FLAG'},
        items=EnumTypes,
        description="tooltip",
        )

    # define drawing section
    def draw(self, context):

        # draw
        layout = self.layout
        row = layout.row()
        row.prop_enum(self, "EnumVariable", 'GA', text='Asset')
        row.prop_enum(self, "EnumVariable", 'LP', text='Low')
        row.prop_enum(self, "EnumVariable", 'HP', text='High')

The biggest mistake I made was not realizing that you need an individual prop_enum() call for each individual flag allowed to be selected. I was trying to use it as a single call. If anyone notices any issues here, that would be appreciated. Also, if anyone can help newcomers understand what the number property is intended for and what purpose it serves, that would also be great. Thanks!


Thank you cegaton, the articles you posted in the comments helped me fix the process. I erased all the trackers that gave higher than a .5 solve error and additionally tracked parts of the scenes on different axes and on both sides of the 3D text I am tracking, manually adjusting the tracks/empties where necessary using the graphs also found in your comments to find troublesome empties.

As well, I chose previous frame from within the tracking windows, and tracked motion with Affine instead of the default Loc/LocRot. I did this until I achieved a solve error of 0.3.

Big shoutout to cegaton, thank you!


Selecting - how to differentiate "elements"?

There are two ways in edit mode (↹ Tab):

Press L while hovering the mouse over the part of the bag you want to select. This will select all the geometry which is connected to the part under your cursor.
Select some geometry (e.g. with  RMB), then press ⎈ CtrlL. This will select all the geometry which is connected to the existing selection.

If you want to separate the parts into separate objects, then press P> Loose parts in edit mode. This will separate disconnected parts of the object into their own objects.


Why do I get a text that reads "feet" on the top corner of the 3d viewport?

That are your units of measurement.
For Version 2.8X Enable/Disable Text Info in the Overlay Controls.

Then set the scale to the Unit System in which you measure.

For Versions 2.7x
You can change them under the Unit tab in the Scene Properties menu.

If you want "Blender" measurements just set the length to none.


Smoke renders, but not fire in 2.79 Cycles. However, both are fine in rendered viewport

cegaton was right, it's a known issue with the viewport -- disabling Transparent under the Film tab and using a big plane behind my subject with a holdout shader let me render the flame correctly, then I used a lighten blend mode to composite it in Affinity Photo. Thanks, everyone!


How would one code a pie menu with an additional traditional menu beneath it?

The solution I ended up with is the same as discussed in the comments:

import bpy
from bpy.types import Menu

class Submenu(Menu):
    bl_label = 'Some Submenu'
    def draw(self, context):
        layout = self.layout
        layout.label("Some Submenu")
        layout.separator()
        layout.operator("mesh.primitive_cube_add", text = "Some Submenu Operator", icon = "BLENDER")
        layout.operator("mesh.primitive_cube_add", text = "Some Submenu Operator", icon = "BLENDER")
        layout.operator("mesh.primitive_cube_add", text = "Some Submenu Operator", icon = "BLENDER")
        layout.operator("mesh.primitive_cube_add", text = "Some Submenu Operator", icon = "BLENDER")

class Pie_menu(Menu):
    bl_label = "Some Pie Menu"
    def draw(self, context):
        layout = self.layout
        pie = layout.menu_pie()
        pie.operator("wm.call_menu_pie", text = "Some Other Pie", icon = "RIGHTARROW_THIN").name="Pie_menu"
        pie.operator("mesh.primitive_cube_add", text = "Some Operator", icon = "BLENDER")
        pie.operator("mesh.primitive_cube_add", text = "Some Operator", icon = "BLENDER")
        pie.operator("mesh.primitive_cube_add", text = "Some Operator", icon = "BLENDER")
        pie.operator("mesh.primitive_cube_add", text = "Some Operator", icon = "BLENDER")
        pie.operator("mesh.primitive_cube_add", text = "Some Operator", icon = "BLENDER")
        pie.operator("mesh.primitive_cube_add", text = "Some Operator", icon = "BLENDER")
        pie.operator("mesh.primitive_cube_add", text = "Some Operator", icon = "BLENDER")
        pie.separator()
        pie.separator()
        other = pie.column()
        gap = other.column()
        gap.separator()
        gap.scale_y = 7
        other_menu = other.box().column()
        other_menu.scale_y=1.3
        other_menu.operator("mesh.primitive_cube_add", text = "Some Menu Operator",icon = "BLENDER")
        other_menu.operator("mesh.primitive_cube_add", text = "Some Menu Operator",icon = "BLENDER")
        other_menu.menu('Submenu', icon='RIGHTARROW_THIN',  text='Some Submenu...')

def register():
    bpy.utils.register_class(Submenu)
    bpy.utils.register_class(Pie_menu)

def unregister():
    bpy.utils.unregister_class(Submenu)
    bpy.utils.unregister_class(Pie_menu)

if __name__ == "__main__":
    register()

    bpy.ops.wm.call_menu_pie(name="Pie_menu")

It works exactly as I wanted:


Is there a way to export an object without all of it's inside geometry?

I want to say the answer is no - for what you're describing.

Maybe there's a script out there that does it for you but it sounds like something you might have to write up yourself. ?

In my experience, I would typically hand-delete them, separate them.

It also sounds like a lot of work to fix and might need to look into another workflow method...

Good luck!


You can set the Min and Max Values in the Range fields:


You can use a principled BSDF and make it translucent or transparent with the transmission settings. You can also use the clearcoat settings and clearcoat normal input to make it look different outside.


Just maybe .... you have to change your sound quality from
16bit 192000hz sound to 24bit 44100hz instead. Hope it helps.
Make sure to go through all your sound devices and set it
up appropriately.


How to apply gradient color change in an animation

If you want the color to stay in one place, you could use a Procedural gradient texture.

From the wiki on procedural textures:

  Procedural textures are textures that are defined mathematically. They
  are generally relatively simple to use, because they don't need to be
  mapped in a special way - which doesn't mean that procedural textures
  can't become very complex.

This works for fluid simulations because the procedural texture exists in 3D space, so UV unwrapping is unnecessary.

Cycles:

Here is a node setup for cycles which uses a Gradient texture node to mix the colors used by the shader.

You can scale and translate the texture with the Mapping node. Note that it may be more intuitive to use the Texture option (added in 2.69). This will apply transforms directly to the texture:

Result:

Blender Internal:

To do this in BI, create a new material and set the type to blend, then set the mapping coordinates to Global.

The texture can be scaled and translated with the Offset  and Size settings in Texture > Mapping (Note that these values control the mapping of the texture, and not the position texture itself. One way to think of it is setting the size of the mesh to match the texture.

An alternative to using the mapping node or the offset and size settings is adjusting the texture space in Object Data > Texture space (ShiftT). Note that you will need to use a Texture coordinate vector for this to affect anything.

If you want the texture to move with the animation you can use either animate the mapping or texture space coordinates, or use an empty object to define the texture space.

Note that if you want the color to be attached to the liquid, using procedural gradient may be too limiting.


The Generated and Position outputs each represent coordinate systems.  These are often used as texture coordinates for procedural textures since they are 3-dimensional, though they can be useful for other effects as well.

Generated Texture Coordinates
Generated coordinates are defined by the bounding box of an object, and are unique to each object.
Generated texture coordinates give the bounding-box-space position across the mesh.  The bottom, left, front of the bounding box is the origin (coordinates [0, 0, 0]), and the top, right, back of the bounding box is [1, 1, 1].

I use generated coordinates when I need the texturing to transform, particularly rotate, with the object.  However when the bounding box is significantly non-cuboidal generated textures will stretch and distort the texturing.  In these cases you may need to manually "un-stretch" the texture with a mapping node, or use Position coordinates.
Generated coordinates can also be useful for non-texturing methods, like creating gradients or other more advanced techniques.

Position Coordinates
The Geometry > Position output gives the position in world-space across the object.  The origin ([0, 0, 0]) is the world origin and all other points are simply their respective position in Blender Units relative to the origin.

I like to use Position coordinates to keep uniform texture scaling across with a material assigned to multiple objects with different sized bounding boxes.  Using Position coordinates also prevents distorted stretching on objects with significantly non-cuboidal bounding boxes.


I've released YafaRay-E (experimental) v2.0.0, which includes Render Passes, Render Views and, among other things, there is a samplerate pass available that shows the places where the adaptative AA is sampling more pixels. It's not exactly what you showed here, but I hope it's good enough.

You can download it from here:

http://www.yafaray.org/community/forum/viewtopic.php?f=12&t=5132

Best regards.


Does the motion tracker follow a point if it changes colour throughout the video?

Ideally you want to track objects that do not shift in shape, color or brightness. There is some room however to do some adaptable tracking.

In the tracking settings use:

Pattern Match:

Previous frame.

Enable:

Prepass

and

Normalize.

If the changes are slow, those settings might help you to track an object that changes color or intensity. Note that if the changes are too drastic from frame to frame, you will need to track until the frame where the automatic tracking stops (or fails to be accurate), then manually re-position the tracker and continue the automatic process until it fails again and so on.

Blatant quote from the manual

  Pattern Match

  Pattern Match controls which patterns get tracked; to be more precise, the pattern from which frame is getting tracked. Here is an example which should make things clearer.

  The tracker algorithm receives two images inside the search area and the position of a point to be tracked in the first image. The tracker tries to find the position of that point from the first image in the second image.

  Now, this is how tracking of the sequence happens. The second image is always from a frame at which the position of marker is not known (next tracking frame). But a different first image (instead of the one that immediately precedes the second image in the footage) can be sent to the tracker.

  Keyframe

  An image created from a frame on which the track was keyframed. This configuration prevents sliding from the original position (because the position which best corresponds to the original pattern is returned by the tracker), but it can lead to small jumps and can lead to failures when the feature point is deformed due to camera motion (perspective transformation, for example).

  Previous Frame

  Keyframes for tracks are creating every frames, and tracking between keyframed image and next image is used. In this configuration the pattern is tracking between two neighboring frames. It allows dealing with cases of large transformations of the feature point but can lead to sliding from the original position, so it should be controlled.

  Prepass

  Enables a two pass tracking, where the first pass is a brute force tracking of location only, and the second pass will use tracking of the full motion model refining the first pass.

  Normalize

  Means patterns will be normalized by their average intensity while tracking, to make them invariant to illumination changes. An example where this is useful is a scene where a marker moves in the shadow of an object.


Normally, you'd have to increase the sample count (4x to halve the noise...)

At the noise level you show in your image, and if you are using Blender 2.79, you can try to use the noise reduction: in the Render options, switch 'feature set' to 'experimental', then in the 'render layers' tab activate the 'Denoising' option.
Denoising will add a bit to your render time (but less than increasing the sample count), and can lead to some loss of fine detail. It's up to you to decide if the detail loss is a problem.

I don't think they will be very useful for your scene here, but some other options that can reduce fireflies are:
-  in the render tab, under 'Light paths': (slightly) increase 'filter glossy'
- in the render tab, under 'sampling': set the 'clamp' options to a value higher than zero (the higher, the less effect, but there's no upper bound afaik)


Can I have some tris in my model made up of quads?

Unity only struggles with N-gons, which are polygons made of 5 or more vertices, so you shouldn't have problems if you have some triangles in your model.


Is it possible to pause cloth simulation and start at a later frame?

Delaying and freezing cloth sims -

As far as I'm aware the the cloth's physics can't be delayed or 'paused' directly but there is a workaround.

This example has the cloth lying on an invisible plane to begin with, thereby holding it's fall until the required frame.

It's released by switching the plane instantly down to a location directly below the bed and over a single frame range.

NOTE - The cloth's setting may have to be changed (keyframed) to suit when it's lying on the plane and when on the bed.

The cloth will fall and settle onto the character and bed but will most likely want to keep wriggling.  To avoid this it's visually switched to a 'frozen' copy of itself.

To freeze -

Save the Blend file at that frame firstly and then 'Apply the cloth's physics modifier.  This will give us a frozen duplicate which MUST be cleared of all physics and animation!

Save the project again but as a temporary file.

Reload the previous save and append the temporary.  Copy paste the frozen mesh into the original scene.

You should now have a soft cloth plus an identically shaped hard-mesh version at that particular frame.

At that frame, visually switch over to the hard mesh version in the Outliner. (Keyframe the camera and eye icons so we see the duplicate, not the soft original)

Play and check that the cloth falls, settles and remains stationary.

Save that as the project Blend file.

-================-

When the character sits up, at the frame where that starts, visually switch back to the soft cloth again.

At the frame where the cloth settles again, do as above. Save the project file firstly and at that frame, 'Apply' the mesh and write that out to another temporary file.  Append that back into the 2nd project file, etc etc.

-=================-

This can all be simplified considerably when done in the VSE, however this would be a bigger challenge when the character is to move during the cloth's frozen frames as we have in this example.

The dummy character used here is copyright so including the Blendfile isn't possible, however it's all in the procedure.  A matter of freezing, substitution, and switching their visibility.

Should you feel it necessary to have the Blend file, I can redo it with a cube character.


How do a transform simple object to have a concave shape

I was able to do it in surprisingly few steps using a shrinkwrap modifier.
Here's my version of your starting shape.

I noticed that yours isn't at the worldspace origin. You will want it there for the steps below. Select your headboard in Object Mode, right click on it, select Set Origin, and then choose Geometry, to make sure you're object center is in the middle of your mesh. Then press Shift + c to force the 3D Cursor to the worldspace origin (just in case it isn't there already). This will reorient your view, though that outcome was not intended. Press numpad period to get recentered on your selected object, if necessary. Then press Shift + s to bring up the Snapping menu, and choose Selection to Cursor. Now your object is centered at the Worldspace origin.
Start by creating a mesh cylinder (Add > Mesh > Cylinder)  and take note of the starting options I chose in the Operator panel to the bottom left of the 3D View. You may find that you can't use the same numbers because of a difference in scale between my version of your headboard and your own. I chose 48 because that allowed 12 sides of the cylinder to be placed precisely between the two points of intersection shown in the pic below, at the two red arrows, which is what you want. 12 is the magic number, based on your very own model, because that's the number of sides that designates the row of faces that you want to build into an arch.

Here's what it may look like after you have the new shape in place. Don't worry about how it looks or how long the cylinder is. It doesn't matter.

Next, make sure you're in Object Mode, select the new cylinder you just made, and hide it (h), then select the headboard, and go into Edit Mode. Select all of the vertices shown below. These are the ones you want to change into a new shape. Next you will want to create a vertex group, which will remember this particular selection of vertices, and allow you to target it later in other operations. Create the vertex group by clicking the "+" icon under the Vertex Group Section of the Object Data tab in the Properties Panel. With your vertices selected, press Assign.

Next, go back into Object Mode and, with your headboard selected, go to the Modifiers tab of the Properties Panel and create a Shrinkwrap modifier. Assign the vertex group you created to it. You may also want to unhide your cylinder again (Alt + h in Object Mode) so that you can find it more easily in the next step.

And finally, assign the target, which is the cylinder you created earlier. This will appear to have no effect until you hide the cylinder afterwards. If you want to make this effect permanent, you will need to apply (Ctrl + a) the shrinkwrap modifier. After doing that, you can delete your cylinder. You don't need it anymore.
Hope this helps.


How to run an external command, showing its progress without locking Blender? (Escape to cancel for eg)

External processes can be run while collecting their output using non-blocking file reading.

This example uses a mix-in class (works the same way as Import/ExportHelper) which you can subclass to create your own operator that runs a command.

Each line printed by the external application shows in the header,
and pressing escape kills the process.

Notes:

For reliable updates, the process your calling may need to explicitly flush the standard output (sys.stdout.flush() in Python).
This only works with a recent build & upcoming 2.77 (a minor change was needed commit).
Unfortunately, non-blocking reading from a processes requires some black magic with ctypes.Though it may be supported in Python3.6).
In practice you may want to have a cleanup operation when canceling. (if the process works on temp files for example).

Example script:

"""
To test this operator, run the script, then open operator search (space-bar)
to execute: External Command Example
"""

import subprocess
import os

# ----------------------------------------------------------------------------
# Portable non-blocking pipe.
#
# This is really black magic on ms-windows!

if os.name == "nt":
    def pipe_non_blocking_set(fd):
        # Constant could define globally but avoid polluting the name-space
        # see: https://stackoverflow.com/a/35052424/432509
        import msvcrt

        from ctypes import windll, byref, wintypes, WinError, POINTER
        from ctypes.wintypes import HANDLE, DWORD, BOOL

        LPDWORD = POINTER(DWORD)

        PIPE_NOWAIT = wintypes.DWORD(0x00000001)

        def pipe_no_wait(pipefd):
            SetNamedPipeHandleState = windll.kernel32.SetNamedPipeHandleState
            SetNamedPipeHandleState.argtypes = [HANDLE, LPDWORD, LPDWORD, LPDWORD]
            SetNamedPipeHandleState.restype = BOOL

            h = msvcrt.get_osfhandle(pipefd)

            res = windll.kernel32.SetNamedPipeHandleState(h, byref(PIPE_NOWAIT), None, None)
            if res == 0:
                print(WinError())
                return False
            return True

        return pipe_no_wait(fd)

    def pipe_non_blocking_is_error_blocking(ex):
        if not isinstance(ex, PortableBlockingIOError):
            return False
        from ctypes import GetLastError
        ERROR_NO_DATA = 232

        return (GetLastError() == ERROR_NO_DATA)

    PortableBlockingIOError = OSError
else:
    def pipe_non_blocking_set(fd):
        import fcntl
        fl = fcntl.fcntl(fd, fcntl.F_GETFL)
        fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
        return True

    # only to keep compatibility with nt version
    def pipe_non_blocking_is_error_blocking(ex):
        if not isinstance(ex, PortableBlockingIOError):
            return False
        return True

    PortableBlockingIOError = BlockingIOError

# end magic!
# ----------------------------------------------------------------------------

class SubprocessHelper:
    """
    Mix-in class for operators to run commands in a non-blocking way.

    This uses a modal operator to manage an external process.

    This class defines:

        process: The running process object.

    Subclass must define:

        command: Sequence of arguments to pass to subprocess.Popen
    """

    @staticmethod
    def _non_blocking_readlines(f, chunk=64):
        """
        Iterate over lines, yielding b'' when nothings left
        or when new data is not yet available.
        """

        fd = f.fileno()
        pipe_non_blocking_set(fd)

        blocks = []

        while True:
            try:
                data = os.read(fd, chunk)
                if not data:
                    # case were reading finishes with no trailing newline
                    yield b''.join(blocks)
                    blocks.clear()
            except PortableBlockingIOError as ex:
                if not pipe_non_blocking_is_error_blocking(ex):
                    raise ex

                yield b''
                continue

            while True:
                n = data.find(b'\n')
                if n == -1:
                    break

                yield b''.join(blocks) + data[:n + 1]
                data = data[n + 1:]
                blocks.clear()
            blocks.append(data)

    def _report_output(self):
        stdout_line_iter, stderr_line_iter = self._buffer_iter
        for line_iter, report_type in (
                (stdout_line_iter, {'INFO'}),
                (stderr_line_iter, {'WARNING'})
                ):
            while True:
                line = next(line_iter).rstrip()  # rstrip all, to include \r on windows
                if not line:
                    break
                self.report(report_type, line.decode(encoding='utf-8', errors='surrogateescape'))

    def _wm_enter(self, context):
        wm = context.window_manager
        window = context.window

        self._timer = wm.event_timer_add(0.1, context.window)
        context.window.cursor_set('WAIT')

    def _wm_exit(self, context):
        wm = context.window_manager
        window = context.window

        wm.event_timer_remove(self._timer)
        window.cursor_set('DEFAULT')

    def modal(self, context, event):
        wm = context.window_manager
        p = self._process

        if event.type == 'ESC':
            self.cancel(context)
            self.report({'INFO'}, "Operation aborted by user.")
            return {'CANCELLED'}

        elif event.type == 'TIMER':
            if p.poll() is not None:
                self._report_output()
                self._wm_exit(context)
                return {'FINISHED'}

            self._report_output()

        return {'PASS_THROUGH'}

    def execute(self, context):
        import subprocess
        try:
            p = subprocess.Popen(
                    self.command,
                    stdout=subprocess.PIPE,
                    stderr=subprocess.PIPE,
                    )
        except FileNotFoundError as ex:
            # Command not found
            self.report({'ERROR'}, str(ex))
            return {'CANCELLED'}

        self._process = p
        self._buffer_iter = (
                iter(self._non_blocking_readlines(p.stdout)),
                iter(self._non_blocking_readlines(p.stderr)),
                )

        wm = context.window_manager
        wm.modal_handler_add(self)

        self._wm_enter(context)

        return {'RUNNING_MODAL'}

    def cancel(self, context):
        self._wm_exit(context)
        self._process.kill()

# ------------------------------------------------------------------------
# End generic code, now to show an example operator using SubprocessHelper

import bpy
from bpy.types import (
        Operator,
        )

class MyCommandOperator(Operator, SubprocessHelper):
    bl_idname = "wm.my_command"
    bl_label = "External Command Example"

    command = (
        # Run Blender's Python, but could be any other command.
        bpy.app.binary_path_python,
        # pass in a script to execute
        "-c", """
import sys
import time

# Some dummy status reports
status_report = ('Hello World', 'Blender is working!', '... almost done', 'Task Complete!')

for word in status_report:
    # Will show in the info area.
    print(word)
    # flush to ensure we get the output immediately.
    sys.stdout.flush()
    # wait a second.
    time.sleep(1.0)
"""
        )

def register():
    bpy.utils.register_class(MyCommandOperator)

def unregister():
    bpy.utils.unregister_class(MyCommandOperator)

if __name__ == "__main__":
    register()

    # bpy.ops.wm.my_command('INVOKE_DEFAULT')


How to keep driver control objects in view of camera

You can add a custom property to an object and have them drive your animation:

The trick is to enable the little pin in the upper left corner. That way the editor keeps displaying that panel.

If you want controls moving with the camera, you can parent them to the camera, disable rendering for them in the Outliner and use local space instead of world space in the driver variables. That way only relative movement towards the camera affects your animation and the camera can still move around.

I recommend empties between the camera and the controls. The empties swallow the offset between control and the camera and the controls start with zero regarding their parent empty. That means you don't have to use awkward offset values in the driver.


How to make eye tracker for flat eyes that already applying lattice

It is well explained here.

I don't think it is recommended to apply the Lattice modifier, and I think you should begin with a round sphere, not a flat sphere, otherwise it won't deform properly. So:

First create your lattice around your eye sphere. Keep the lattice cubic. Give your eye a Lattice modifier with the Lattice as Object. Give your lattice a basis shape key and create a second shape key.

Keep the lattice selected, go in Edit mode, select the second shape key, scale the lattice on the Y axis.

Back in Object mode, select the second shape key and push the value to 1, the eye should deform. Then bring it back to 0 for the moment.

Create a bone at the center of the eye, use the 3D cursor as Pivot Point to rotate it 90° so that it point forwards. Create a second bone that will be the target. Give the first bone a Track To constraint with this second bone as Target. Parent the eye to its bone, move the target, the eye should follow.


You're in Eevee. Switch to Cycles, if you want to enable denoising data.


Z depth values in OpenEXR do not match the objects in the scene

Blender's depth map should work fine. I have tested it and I do get the right distance.
How do you load the OpenEXR files? Not all OpenEXR readers are reliable. I have noticed that OpenCV can give inaccurate results (see https://github.com/opencv/opencv/issues/10114).


Certain verticies arent registering for weight paint

Just from the screenshot, my guess is that you need to add geometry to your mesh. I would add a bunch of subdivisions or apply a subsurface modifier. This will allow it to have enough faces for your weight painting to take on more complex characteristics.


How to create a sub-category or folder in T-Panel tab

The sections you are referring to that can be collapsed and expanded are called panels. You may have noticed that when you alter the addon you find the bl_category a few lines under a class definition that has Panel in brackets at the end of the line.

We have some control over the placement of panels (not 100%). The small dots to the right of the panel allow us to drag them up and down to get a different order and the order that we place them in gets saved with the rest of the interface settings. This means you need to enable the addons that you want, Save User Settings so that they are enabled on startup, then re-arrange the panels the way you want them and then File->Save Startup File so that the layout settings are used every time you start blender. You may also want to ensure the Load UI option under the File preferences is disabled so that your startup layout is used instead of the layout saved with the file.

To get more than that you will need to write your own addon. Yes you can copy the code of another addon, but the changes needed mean that you will need to re-structure the code again after any updates - so consider this option as your custom addon where someone else writes most of the code for you.

Each panel is defined by a class that is a subclass of bpy.types.Panel. The draw method of the panel class defines what is displayed inside the panel, you can take the contents of an existing panel's draw method and combine them into one panel that you have defined. For some panels you may also need some of the surrounding code that the panel relies on. As shown in this answer you can add a custom property and use that to show a disclosure triangle that can contain the items from another panel to get the "sub-folder" layout that you are looking for.

You can find an example addon here that provides the following panel.


You must have scaled your curve, when you've applied the scale it has rescaled its vertices radius. So go in Edit mode, select all and right click > Set Curve Radius, or open the N panel and bring back the Mean Radius to 1.


Is it possible to animate settings of primitives?

You can't access this kind of history in Blender. But you can use the modifier stack to suit your needs.

Then add keyframes to animate it :


I am also struggling with this.
Here you have some advice: How do I stop hair particles going through the body and the head?
Hair dynamics works, but not perfectly. In faster speed of the object, some strands always will go trough the mesh. Also there is a bug in Blender 2.8. - When the quality step (hair dynamics) is above 1, hair explodes. So, don't use this verison if you want some collisions.


This sounds quite ridiculous, but your scene might actually be upside-down. If this is the case, just select all your objects, and rotate them 180 degrees on the Y axis. You can also rotate your camera to be upside-down the same way if your scene is to large to be entirely rotated. If the scene is not the problem, look at the camera settings. The view might be distorted, or the camera you are moving may not be the active camera.


Within Blender (and the BGE) the logic is assigned to the game object and can't be exchanged. This means the behavior is fixed assigned to a specific game object.

But there are options to work with that.

Separate objects

Have one object with the behavior and others for representation. This way you can exchange the behavior be assigning another behavior object. You can establish the relationship via parenting.

Composition pattern (Python only)

You object gets fixed high-level behavior. E.g. Perform the driving behavior.

Your code is designed around the composition pattern. For example the car can have a driver. The driver performs the driving behavior. You can have one driver for aggressive driving and one for calm driving etc.. They all share the same interface to the car.

Before driving you assign a specific driver to the car. You can even exchange the driver on-the-fly.

This design fits very well
- on a discrete number of driver tpyes
- the driver types have not much in common (they are very different)
- you want to add further driver types later

The different driver types are Independent of each other.

Parametric

You have one driver's behavior that can be controlled by different parameters e.g. aggressiveness.

This fits well
- when there is smooth transition from one behavior to the other. e.g. aggressiveness 0.0 .. 1.0
- when the different behaviors are pretty similar


How to bake multiple sounds to f-curve to the same object

Pushing Down (or Stashing) to the NLA

Bake your fcurve as you've done.

Give the action a meaningful name, I've switched to dope sheet shape key editor mode to do this. Can push down / stash / rename directly from the NLA editor too.
Hit the push down button
Switch to the NLA editor and move your strip where you wish to play in the timeline.

Consult the docs re the difference between push down and stash, and other info re using the NLA Editor.

Repeat.  Notice in image above I have already done this once.. with the previous bake "MyAction.001".

Custom Properties and drivers.

How to bake multiple audio sounds to f curve?

A suggestion is add a speaker, parent it such that it sticks out the mouth. When a speaker has a sound loaded it is loaded as an audio strip in the NLA. It never has the correct length. Match it to the length of your sound bake for that sound.

SoundAction is a baked sound on a custom property on a speaker.
NLAStrip (in aqua) is the sound the speaker plays resized to match.

I used this concept for the now defunct sound drivers addon. https://blender.stackexchange.com/a/39241/15543

No armatures have been used in this answer


How to create an air distortion/blur effect in eevee?

One way to do it would be to play with Principled BSDF Transmission and IOR.

I modeled a crude Christmas tree like shape by taking a cylinder and adding some edge loops to it. Next I selected randomly some of the faces and extruded them along individual normals. Then I moved the extruded vertices down.

and set the Principled BSDF transmission to 1 and IOR to 1.01.

This basically means that the material is almost air but not quite. It's quite close to warm air with a lot of distortion.

Remember to check Screen Space Reflections under Render Properties and Refraction under Screen Space Reflections.

and Screen Space Refraction under Material properties.
Next I animated the object to scale up, follow a curve and vanish by changing IOR from 1.01 to 1.00.


Courtesy of Lemon!

Distorted bakes

This resolved the issue. I applied an edge split as per the post, but am still unable to really understand WHY that worked. There were no hidden or squashed faces, the face in question is planar (scale y 0 and apply scale changed nothing) and yet it still baked as if it weren't. Odd for sure, but at least there's the solution.

Thanks again!


You need more geometry. The subsurf modifier works by interpolation, meaning that is subdividing the geometry, the boundaries for materials are also interpolated. On the sides of the guitar you need to add supporting loops, those will help you define the edges for the material as well.

As an example of the issue, this cylinder has two materials, one for the top and bottom faces, and one for the sides. The subsurf modifier interpolates mapping of the materials clearly. Adding supporting loops will fis the mapping error:


You have an unused video strip in the VSE and in the Post processing options you have sequence enabled. That makes the Video Sequence Editor take precedence and it will not render your scene, but whatever is happening on the VSE. Disable the sequence box and you'll be able to render your scene.


Want to get volume using 3dprint addon but get Problem From blender Console

Python NameError
The error occurs on this line.
bm = mesh_helpers.bmesh_copy_from_object(obj, apply_modifiers=True)

and is informing you that mesh_helpers is not defined.
Assume you are doing a bit of copy paste to and from the 3D print addon, where no doubt mesh_helpers is imported and available, whereas you missed it. It  can be imported from the 3D print toolbox
from object_print3d_utils import mesh_helpers

may find similar issues with clean_float and _scale.


Is there any way to animate specific vertices instead of the whole object?

To do this you need to create shapekeys and then keyframe their influence/strength.

Shapekeys are essentially alternative shapes for you mesh that allow you to interpolate between them and the base shape of the mesh.

see the blender manual for more details


Right way to stop export operator from saving with empty filename?

Check out the ImportHelper and ExportHelper code.
If you look at either the import or export operator templates in the text editor will see they use the helper mixin classes ImportHelper and ExportHelper
Here is the code for export helper from bpy_extras.io_utils  find it in the scripts/modules folder of your blender installation.
class ExportHelper:
    filepath: StringProperty(
        name="File Path",
        description="Filepath used for exporting the file",
        maxlen=1024,
        subtype='FILE_PATH',
    )
    check_existing: BoolProperty(
        name="Check Existing",
        description="Check and warn on overwriting existing files",
        default=True,
        options={'HIDDEN'},
    )

    # subclasses can override with decorator
    # True == use ext, False == no ext, None == do nothing.
    check_extension = True

    def invoke(self, context, _event):
        import os
        if not self.filepath:
            blend_filepath = context.blend_data.filepath
            if not blend_filepath:
                blend_filepath = "untitled"
            else:
                blend_filepath = os.path.splitext(blend_filepath)[0]

            self.filepath = blend_filepath + self.filename_ext

        context.window_manager.fileselect_add(self)
        return {'RUNNING_MODAL'}

    def check(self, _context):
        import os
        change_ext = False
        change_axis = _check_axis_conversion(self)

        check_extension = self.check_extension

        if check_extension is not None:
            filepath = self.filepath
            if os.path.basename(filepath):
                filepath = bpy.path.ensure_ext(
                    filepath,
                    self.filename_ext
                    if check_extension
                    else "",
                )

                if filepath != self.filepath:
                    self.filepath = filepath
                    change_ext = True

        return (change_ext or change_axis)

which as you can see sets the name to "untitled." if not set.
Check out the templates to see other properties that are used to extend this
# ExportHelper mixin class uses this
filename_ext = ".txt"

filter_glob: StringProperty(
    default="*.txt",
    options={'HIDDEN'},
    maxlen=255,

Also a files collection bpy/file browser: get selected file names where directory is used to designate the folder the files reside in.
Set custom location for import/export helper


Game Engine: how to switch scenes in python code

It does exist in the API, the trick is you have to get the scene first:

for scene in bge.logic.getSceneList():
    if scene.name == 'oldSceneName':
        scene.replace('newSceneName')
        break

API:
https://www.blender.org/api/blender_python_api_2_78a_release/bge.types.KX_Scene.html#bge.types.KX_Scene.replace

Another useful 'replace scene' like thing that I have done quite a lot is to end the current scene(s) and then add the new one:

for scene in bge.logic.getSceneList():
    scene.end()
bge.logic.addScene('sceneNameGoesHere')


how can I export object position info from blender to text file?

This will write the location x,y and z values of the active object(bpy.context.object) at every frame starting from the start frame and finishing with the end frame set in the render settings under Dimensions section, Frame Range. You can change that by changing the for loop's condition. You can format the output as you need as well, just keep in mind you need to convert values you wish to output to strings.

import bpy

file = open("C:\\SomeDirectoryBlenderHasPermissionToAccess\\SomeFile.txt", 'w')
scene = bpy.context.scene
loc = bpy.context.object.location
for frames in range(scene.frame_start, scene.frame_end+1):
    scene.frame_set(frames)
    file.write('Loacton at frame '+str(frames)+':('
    +str(loc.x)+', '+str(loc.y)+', '+str(loc.z)+')\n')
file.close()

If you needed to run it for all objects in the scene you would need a loop within a loop:

...

for every_object in bpy.context.scene.objects:
    for every_frame in range(scene.frame_start, scene.frame_end+1):
        scene.frame_set(every_frame)
        loc = every_object.location
        file.write('Loacton at frame '+str(every_frame)+':('
        +str(loc.x)+', '+str(loc.y)+', '+str(loc.z)+')\n')

...

You can find more info on working with strings here. www.w3schools.com is a wonderful resource in general when learning Python.

Blender Python documentation is usefull as well especially the search function there.

One more extremely useful place to learn is Blender itself. There are some very useful examples that come with Blender here:

Also auto complete function(ctrl+space) is extremely useful in the Python Console:


How to completely fill an object with fluid?

There is no shortcut at all. My idea could be select the inner side of your container mesh and duplicate it with Shift + D.
Then press P to separate the selection into another object.
You can try to make new mesh closed by selecting its top loop and pressing F and with luck get it close without much work (the mesh must be closed the Fluid sim to work).
Then add Fluid modifier in Physics panel.


Here is a quick solution, which allows you to change the workspace from Python:
bpy.context.window.workspace = bpy.data.workspaces['Layout']
All the available workspaces are stored in bpy.data.workspaces, so you need to pick one from those.
Now it is just a matter of putting your favourite into a Python script and register it as an operator, so you can map a key to it :)
Good luck!
EDIT:
As promised, a simple addon file: github blender-workspace-swapper
It does not contain keymaps yet (to be fair, I am not sure how those are created for addons, maybe someone else could help?), but calling the operator via the operator search works.
Alternatively, calling it from the python line like this:
bpy.ops.workspaceswapper.swap(targetWorkspace="Animation")
If the workspace does not exist, it will append it from the startup.blend in the config folder (make sure that one exists).


Is the Texture Coordinate node currently broken for vector displacement?

As always, open to correction, but reverse-engineering from the symptoms alone, this seems to be a caching problem.

If you plug the displacement vector straight into the Displacement
input of a Material Output node, the vector seems to be evaluated in World
space.
If you request a displacement in World space (however it is calculated,) you would expect an object to 'swim' through that displacement when it is rotated: in the viewport, it does not. The displacement appears to be cached in Object space. When the object is transformed, the displacement follows.
You can update the cache in at least two ways I've found.. flip out of Rendered to Solid mode and back again, or put a Vector Displacement node between the requested vector and the  Material Output, and switch its space from, say, 'World' to 'Object' and back again.

The cache appears only to apply in the viewport: in frames rendered through a camera the displacement is updated correctly.
I think this may qualify as a bug..or it may considered a valid optimisation for viewport performance?
TL;DR
To evaluate the displacement vector in Object space, (so it follows the object, and therefore persists through flipping between Rendered and Solid modes), put it through a Vector Displacement node, set to 'Object Space'.


Give those edges some fun ;) (understand Mean Crease):

(also the bottom ones respectively)


Linking a Hi-Res & Low Res Version of a character, and controlling both with a single armature

If all the objects you link to the scene are from the same project, all you have to do is go File -> Link... , browse for your project, enter it, find "Object" folder, select all the objects you need to link and press "Link" button. After that you can put each linked object to any collection by selecting it in the 3D viewport and pressing "m" button on the keyboard, or by directly dragging them to the collections in the outliner. Objects don't have to stay in the same collection with the armature to stay linked and parented to it. More to say - one object can be linked to several collections at the same time.

If your two mesh-objects are linked to the scene from the several different project files, inside those files they both have to be parented to the same armature. This means in one of those files (e.g. with high-res mesh) the armature has to be be a linked copy of the armature from another (with low-res mesh): not a separate object with the same name, bones and animation as in the first one - it has to be exactly the same armature-object, linked to the second project in the way I described in the first paragraph. To perform this you can link the armature-object from the first project to the second project, in the second project select your objects and this linked copy of armature, make sure the last one is an active object, press Ctrl+P and choose "Armature Deform".

After that you can link to the new project your low-res object and the armature from the first project and high-res object from the second project - it will be automatically linked to the armature. Then you can create collections and arrange everything as you want.

And if you want to be able to control the armature animation directly from the main project with your linked meshes from other projects parented to it, inside their projects you have to parent them to the linked copy of the armature from the main project. Hope it makes sense.


Invert weight paint values with modifier

Yes. (Besides being able to invert the influence of the vertex group in many of the modifiers, by hitting the small double-arrow icon next to the Vertex Group field....)

If you want to invert the group itself, you can use the Vertex Weight Mix modifier targeted on the group (here, 'Group'), and mix with an anonymous Group B, with B's default weight set to 1, and the Mix Mode set to 'Difference'.

(Excuse the grotty color quantization)


You can assign several materials to a mesh and a material can be used by several meshes.

In this first image, 2 materials (1) are assigned to the left object (2), and the wood part has its UVs located in (3) in the texture.

In this second image, again 2 materials are assigned (1) but to the right object (2), and its UVs are located in (3).

To assign several materials, use the '+' button on the right, so that a new material slot appears.
Then assign (or create) a material for this slot.
Last step, go to edit mode, select the wanted faces and click 'assign' in the material part :


Hair Dynamics not colliding with emitter 2.75a

The previous hair system calculated mass much differently, so by reducing the mass significantly (from 1.0 to 0.1), the hair didn't fall through the mesh in as many places. Tweaking the mass seems to help fix the issue, although weight painting the hair strands is required and tweaking the collision properties of the emitter.


How to make all polygons face outwards in an existing model?

in Edit Mode press Recalculate Normals in Toolbar (press T to show it):

It's usually better not to see backfaces. You can turn them off in 3D View Properties Panel (press N to show it):


Make holes with boolean not working - blender 2.8

Boolean modifier -> turn overlap threshold all the way down to 0. Since your objects are so small in the scene blender considered the faces as overlapping (i.e your rectangle was too thin).


How can i make transparent glass like material to put it over another object?

What you need to change is the Saturation and the Value of the Glass BSDF node. With an RGB Input you just do this:

With an image texture, you will need to do something more like this:

This will make the saturation less, the value less, and the contrast less, allowing the glass to be much more transparent.

Here are some examples:

High Saturation, low Value:

Low Saturation, high Value:

As you can see, the cubes in the background are now visible, and the environment texture behind the sphere is now much more visible.

Other things to check:

The Roughness value
Any mix nodes, even unused (press M to mute them)
The right material is assigned to the object


I am trying to add a custiom property to an add on but it shows me an error

Spelling Error
Quite likely the property fails to register because it has no idea what discrription  is. (Most likely you are alerted to this error when trying to register the operator class) Coding is about attention to detail.  Recommend for blender coding questions here, adding minimal, but runable, code to your question eg the register code for above.
Sure enough, tacking bpy.utils.register_class(MyOperator) to the question code, and checking system console
TypeError: 'discrription' is an invalid keyword argument for FloatProperty()
ValueError: bpy_struct "OBJECT_OT_my_operator" registration error: noise_scale could not register

any attempt to use noise_scale with this operator will lead to error as mentioned in question.
Use description instead and will register as intended.
>>> bpy.ops.object.my_operator(
my_operator()
bpy.ops.object.my_operator(noise_scale=1)
Tooltip


Extracting a text string info (character's indices) to use it as a material mask

The color of each character is determined by the material index on the text object. Therefore, to have each character use a different color from the color ramp requires a material for each color.

The steps involved:

A material for each color in the color ramp node.
The text object must have all the materials applied to it.
The characters must reference the index of the materials.

This script takes the colors from a color ramp node, makes new materials and then assign each character a material.

import bpy

txt = 'Text' # The name of text object and text curve.
materials = bpy.data.objects[txt].data.materials
i = 0

# This material holds the color ramp node, change 'material name' to the name of your material.
rampMat = 'material name'
colorRamp = bpy.data.materials[rampMat].node_tree.nodes['ColorRamp'].color_ramp.elements

# Convert colors from the ramp to materials and add them to the text object.
for element in colorRamp:
    color = element.color
    material = bpy.data.materials.new('color')
    material.diffuse_color = color[0], color[1], color[2]
    materials.append(material)

# Loop through the characters setting their indexes.
for character_format in bpy.data.curves[txt].body_format:
    character_format.material_index = i % len(materials)
    i += 1


3D  view/Render
Give the camera a negative scale on the local X axis.
Both S X X -1 and ⎈ CtrlM X do this (use Y instead of X for flipping vertically), or you can set the scale directly in the transform panel:

Rendered animation playback
When previewing an already-rendered animation (⎈ CtrlF11) you can flip the display horizontally with F and vertically with Shift-F.
Sequencer
The VSE has an option to flip strips in Properties region > Filter:

Thanks ideasman42 for mentioning these :)


I had this same problem! originally I thought it had something to do with me pressing Ctrl+I or something like that, but I later realized I had changed the keyboard from English to German. Once I switched it back everything was fine again.


How can I model a decorative serving tray?

You can:

Keep only a flat segment, simplify it as much as possible (actually it will depend on if you plan to use a Subdivision Surface modifier at the end) and mirror (enable the Clipping option of the Mirror modifier):

Create an empty a the center of the object, give your object an Array modifier, choose a Count of 8, disable Relative Offset, enbable Object Offset with the empty as Object:

Rotate the empty 45° on the Z axis:

Move the segment so that it doesn't overlap its instances, extrude inwards:

Extrude to give thickness with AltE > Extrude Faces Along Normals:

Make sure you don't create inner faces, if so, delete them:

Add geometry and bvels where needed:

Apply the modifiers, close the center, merge the vertices by distnace, stretch on the X axis:


As LukeD commented, meshes should consist of quads of roughly the same size. A standard way of rendering faces is to take a color assigned to a given vertex of the face and linearly interpolate the color across the face to the next vertex. So if your faces are not roughly uniform in size, you can get these long shadows stretching across the surface of your model.

Basically, the lights in your blender editor illuminate the vertices. If one vertex of a face is very far from another vertex, the vert farther from the light will be assigned a darker color, and the "color gradient" across the long face is very noticeable (because it's just evenly blending the colors of the vertices across the face). If you add more polys, there will be more vertices to illuminate, which will give more accurate coloring.


related, same thing happens with .ply files: use the Vertex Color layer: Import PLY doesn't display vertex colors

In Blender there is no color per polygon, but you can set all vertices of individual polygons to the same color. When vertices are shared by multiple Polygons their vertex_color information is not.

If the .x3d is formatted correctly, then Blender will make the appropriate vertex_color map (tested! for instance with this file).


See this answer. Looks like a similar thing is happening to your mesh. If you check the dimensions in the properties panel you'll see the values go crazy once the can disappears.

Removing the softbody modifier and re-adding a fresh one stops the disappearing act, and it doesn't look like you have any overlapping geometry. I think it's something in your softbody settings, in the Soft Body Edges section. It looks like you've tweaked that quite a bit; perhaps you've pushed it to its limits.


Applying gradient texture to deformed volume based on Z coordinate

A guy from blender IRC support channel (#blender on freenode) found the answer, so, as follows!

There are TWO methods. First one is raytracing:

It's really slow, and OSL depending. And casuses crashes, apperently ;)

Second method, much faster (bueno!) uses height maps instead of gradient texture.

Also, @JA12 simplified it even more, look at the nodes:

You can study it with the attached .blend file.
It's amazingly simple.
.blend file my mirror: mirror


Go into edit mode.
Select the tip of the second bone and snap the cursor to it. ⇧ ShiftS
Select the root of the first bone and extrude a new helper bone from it. E
Select the tip of the helper bone and snap it to the cursor. ⇧ ShiftS

Select the helper bone.
Choose the normal orientation for transformations.
Create a custom transform orientation from the normal orientation.
Delete the helper bone. (We have the custom orientation from the root of the first bone to the tip of the second bone, and that is all that we need.) X
Choose the 3D Cursor as Pivot Point. . / numpadperiod
Select the root of the second bone and scale it to 0 on the custom XZ axis, by pressing S[⇧ ShiftY]0. (Shift has to be held while Y is pressed, this constrain scaling along the XZ axis of the custom transform orientation.)

Copy paste the roll property from one bone to the other.

This answer expands on how the custom transform orientation works.


transparent (test) grid showing up when rendering?

The rendered scene you posted seems to be from an earlier version of your blend file than the one you posted. When I render using the blend file you posted, I don't have any transparency problems:

Try rendering again and see if you still have the problem.

One thing about your file I noticed is that on frame 1, the camera itself is positioned partially inside the wall:

The part circled in green is where the camera sees from, not from the front, shown here in red:

That results in your scene at frame 1 of your animation being partially obscured by the wall, like this:

To fix this, simply move the camera at frame 1 fully into the room, then set a keyframe for it:


How to enforce planetary gravity on fluids?

You could use particles set to 'Fluid' type and rendered using a Metaball as the dupli-object. While this won't produce a full fluid simulation it might be good enough for your usage. Using particles means that the 'fluid' will be affected by the force fields (the true fluid simulation is not affected by such force fields) so you can disable gravity and use a force to draw the 'fluid' to the planet.

This can produce the following :

Blend file included


How to model a uncontinuously screw like in picture

Basically you do what is done in the first answer to this question:

How to model the bottle threads?

Because you want about 3 short threads all starting from the top, make a cylinder with the number of sides being divisible by 3, for example 33.  The cylinder in the first screen shot only has 32 sides, so the picture is only approximate.  Where the user, Xtremity, makes his single thread from one poly only, you need three, situated as shown in the first screen shot.  But make the threads one at a time.

Follow that answer/tutorial that Xtremity wrote, with only the following changes as shown in the second screen shot.  Put about 100-120 in the Angle of the Screw modifier, and change the value in Screw until your thread has a much height as you think it should have.  Iterations should stay on 1.


Blender video editor not starting my created video

The playback will always happen between the start frame and the end frame of your scene.
Change them to fit your clip.
You can see them at the far right of the time editor, named "Start" and "End".


How to select all keyframes between two markers with Python

I would iterate through all the keyframes and check which frame they're on. That's the first number in the x.co vector. Then check that against start/end variables which you would get from markers (didn't include this code). If the frame is between start/end deselect, if outside of that then select it.

import bpy

obj = bpy.context.object             #active object
action = obj.animation_data.action   #current action

start = 20 #first marker variable
end = 80 #second marker variable

for i in action.fcurves:
    for x in i.keyframe_points:
        if x.co[0] > start and x.co[0] < end: #check greater than/less than marker frames
            x.select_control_point=False #deselect if in between markers
        else:
            x.select_control_point=True #select if outside of markers


You have a bone on different layer which has influence on the legs :

select the bone in the outliner
switch it to layer 1
go to weight paint for the legs and clean the weight


Why is blender not rendering my object to scale?

Ok, I figured it out. This happened because the armature was animated and the render must have been rendering a different frame. Since I don't need the animation, I right clicked on the armature and removed the "Animation" entries. This solved the problem.


One of the way to make your mesh made of wire is using wire modifier.  If you want to fill the holes between wires your can check replace original. Like this effect:

Again if you want to make the wire look more like organic,  you can add a bunch of subsurface modifier. Like this :

Other than that,  if you want to see some interesting effect,  you can use tissue addon. Thankfully it comes with blender,  you just have to enable it.  And the effect should look like this:
Hope that helps!!


I believe this dude goes into that.
https://www.youtube.com/watch?v=3CSUxATQVLw

create resource folder in unity.
set char origin and bone origin to the same locations.
export char to that location
unity should automatically import all animations, materials, and other important contents.


In your object, in Edit or in Weight Paint mode, you just have to create the vertex group that is supposed to stick to the Target object, then add your Shrinkwrap modifier and choose this group in Vertex Group.

Also note that the more your vertice will be part of the group (i.e. from 0 to 100% weight), the more it will stick to its Target object


Part of the model doesn't show vertices on it. Error message under Transform tab is "Nothing selected"

Hitting ALT+H to unhide everything solves the problem.


Active object falls only through parts of the other active object

I think you may have edited the object after applying the RB, delete the the current RB sim and reapply with collision type as mesh.

edit:i think I know the problem your object does not move, normally rbs are added to moving objects by default, yours doesn't, causing some problems, i tried recreating the scene and ended up with messing in the sensitivity panel and the dynamics parts, what you want to do is try adding a small amount of sensitivity, and disable the dynamics in it, reply if this worked.


How to synch audio with video when both tracks are from same source?

I you loose sync between video and audio, generally the reasons can be:

1) you didn't match the frame rate (in your case 29,97)

2) you didn't match the audio sample rate (in your case 48 KHz), in the preferences

The others parameters are a matter of quality/file weight, not about Sync.


A workaround is to make the base path of the File Output node change according to the subframe, before every render, using a Python script. In this way, the output file names won't be overwritten. This script must be run once before rendering.

import bpy

def add_subframe_to_fo_path(scene):
    if scene.name == 'SceneName':
        scene.node_tree.nodes['File Output'].base_path = '//sth/' + str(scene.frame_current) + '-' + str(scene.frame_subframe)

bpy.app.handlers.render_pre.append(add_subframe_to_fo_path)


Rigging and skin modifier using rigify modifier

I guess the different mesh parts are from different objects?

First, make sure every object has its scale and rotation applied using ⎈ CtrlA → Apply Scale / Apply Rotation. Scale influences directly the rigs' deformation (basically as a multiplier), so if there are some differences in scales and rotation between the objects controlled by the same rig, it will be messy.

Then, the only thing you can do is work the weights so that the weights are basically the same where two different meshes hover each other or are close together. The goal is to make them move at the same rate, so if you set each close vertex with the same weight for the same bones, and if there's not a huge difference in mesh topology, it should work fine.

Alternatively, you can completely avoid the issue by simply joining these meshes together so there's not gap to manage in the first place.


Where exactly are you trying to export to and through which exchange format?
As stated above materials are very tied to the rendering system they were created for, you can't really export them as you can with a 3D model.

If you are using Cycles render you need to

Create a new material
Add two emission shaders (one with the desired color, the other white)
Use a Mix Shader node to mix them
Add a layer weight node as mixing factor
You may use either Fresnel or Facing as output
Optionally you can fine tune the color grading with a Vector Curve Node
To get the material to emit light only in one color add a new Mix Shader node
Connect the original shader to the bottom socket
Connect the uniform emission color to the top socket
To control that mix shader add a Light Path node
Connected the Is camera socket to the mix factor

This should work in Cycles, but as stated above it is very much tied to the way Blender works and how Cycles builds it's shaders, I very much doubt you will be able to export this anywhere useful, much less to a real time rendering system like a game engine or something.


How can I change IntProperty default value stored within PropertyGroup?

Use a setter getter
Instead of setting the default of the property, emulate a property with a getter setter that retrieves the custom property when set, else some default we have set.
Internal "get/set" function of property?
As an example have added another intproperty in same prop group as a means to adjust the default value without any re-registering trickery.. which can turn ugly and strip the RNA if it gets out of sync.

Demo gif, changing setting of default is matched by myint till set
While myint has not been set it is given the default value. Once it is set it uses the value set.
import bpy
from bpy.props import PointerProperty
from bpy.types import PropertyGroup, Panel

class AAA_PT_Demo(Panel):
    bl_space_type = "VIEW_3D"
    bl_context = "objectmode"
    bl_region_type = "UI"
    bl_label = "My Demo"
    bl_category = "Demo"

    def draw(self, context):
        settings = context.scene.mysettings
        layout = self.layout
        layout.prop(settings, 'default')
        layout.prop(settings, 'myint')

class MySettings(PropertyGroup):
    def get_myint(self):
        return self.get("myint", self.default)

    def set_myint(self, value):
        self["myint"] = value

    default : bpy.props.IntProperty(
        name = "My Int Default",
        step = 5,
        default = 44
        )
    myint : bpy.props.IntProperty(
        name = "My Int",
        step = 5,
        get=get_myint,
        set=set_myint,
        )

classes = (MySettings,
           AAA_PT_Demo,
           )

def register():
    for cls in classes:
        bpy.utils.register_class(cls)
    bpy.types.Scene.mysettings = PointerProperty(type=MySettings)

def unregister():
    for cls in reversed(classes):
        bpy.utils.unregister_class(cls)
    del bpy.types.Scene.mysettings

if __name__ == "__main__":
    register()

Other possiblilties are storing the default properties on another "toolsettings" prop group, or instead of using an annotated property def, simply declare a class variable default = 44 in the prop group and grab it from the class.


Here's what worked:
Mark all edges as seams then select all and UV unwrap.


The script that plays an animation is something like this:

import bpy
bpy.ops.screen.animation_play()

In the future, if you want to use python to do something, you can make it easier by activating Python Tooltips, which you can do by going to Edit >> Preferences >> Interface >> Python Tooltips. You can see Python Tooltips in action by hovering over a button like the Play Animation button.


Adding a keyframed Brownian Motion to an object

You could add keyframe modifiers.

Add keyframe to the x,y,z positionsn at the beginning of the animation
Go to the Graph Editor -> right panel (press N to show it) -> "Modifiers" label -> Add Modifier -> Noise.
Do the operation 2 to the three keyframes (X, Y and Z positions).
In the Modifier panel (where you just added the modifier) of each keyframe (X, Y and Z) modify the noise properties in order to make them different each other and to set the Brownian motion as you want.


Blender wont work and just stays white window

have you tried uninstalling Blender and removing all config files?
They're found in %appdata%\Roaming\Blender Foundation\Blender*version number*\config.
I had your same problem and solved it by uninstalling and removing that folder, then reinstalling. Let me know!


I had the exact same problem, but for me the origin in Unity was always the center of the part.

It turns out that there's a setting in Unity that determines how the axes are shown for the part. I spent probably three hours trying to troubleshoot what was wrong in the process.

There was no problem with how I had exported the part, just with how Unity was displaying the part handle. When I clicked "Center" it changed to "Pivot" and then the axes were shown from the same location as I had set the part origin in Blender.


The Hand.L shouldn't have full weights over the hand.

I had to redo auto weights on the hand bone then do auto weights on the finger bones


How do I extrude a vertex group in Python, the same way that the 'E' shortcut does it

A simple way to reproduce operations in python is by using the the info editor.
In this case i first executed the "extrude-region" in edit mode and copied the info log to my python script.


First you should simplify your object to make it easier to work, select all and press CtrlE > Un-Subdivide:

Here is what you get (set the parameters in the Operator box), as long as it doesn't change your shape it's better to work low-poly imho:

Then boolean the 2 objects:

It gives bad topology:

But you're going to work on it with the knife tool, join, dissolve edges and vertices, etc:

Now you can give your object a Subdivision Surface etc:


What he his doing there is enabling an addon. Do do this hit Ctrl-Alt-U, or File>User Preferences.

Now you are in the user preferences. Go to the addons tab. Next you will need to install the addon. Click Install from File.

Navigate to the addons .zip or .py, and select it.

The final thing to do is to select the checkbox. If you want the addon to be installed when you create a new project, click Save User Settings.


Volumetric lighting can be done with volume scattering.
On cycles you have two basic choices:
1. Add volume scattering to the world volume. That will create a foggy/dusty atmosphere for the whole scene. It might take long to render, but the whole scene will be covered in a kind of misty/foggy atmosphere.
Note that anything connected to the background surface shader will be ignored and will render black, so Enviromental textures will not work well with volume scattering (for more info read this post).

2. Create some geometry around the area where you need volumetrics, and use volume scatter as volume for the object (there should be no node connected to the surface, only to the volume). This approach has the advantage of being a bit less intense to compute and you can still use the background color or environment images (like HDR).