UV layout doesn't match shape of the object I created a cube and made it sort of rectangular. When I tried to UV map it, this is what it looked like:

As you can see in the UV layout, all the faces of the mesh are being represented as squares. I was hoping that the dimension of the faces would be more similar to the actual faces in the mesh, i.e. more rectangular.

Is there something I'm doing wrong?

Seems like you have edited the object and didn't apply the scaling. If so, you have to apply the changes for your particular editing transformations such as Scaling and Rotating.

Go to the Object mode
Use ⎈ CtrlA and select an option.

This will apply your transformation changes to the object by setting the Scale to (1,1,1) and Rotation to (0,0,0).

See the documentation

Scaling object and UV Unwrap without applying transformation changes:

After applying changes:


Materials only showing in some views I am using blender 2.79 and I have a material with the color of purple. The color shows in one of my views but not the other.

Please make sure you are on the Material Under Viewport shading,

As shown below:


Blender compatibility with glibc v2.12 I am a bit of newbie, and trying to install blender on Red Hat. I am using RHEL 6.9 and constrained to use glibc v2.12. I know this is not the latest version but I know that library is not compatible with the latest download of "blender". Anyone know of an older version in an blender archive that is compatible with glibc v2.12?

By only looking at the filenames, v2.78 has releases for glibc 211 and 219.

Another option would be compiling blender yourself, that will allow you to patch any glibc calls that aren't compatible with the older library version. As it is only the latest version that doesn't use the older library, I'd expect it to be only a matter of linking it with the older library rather than making any code changes. Any incompatible code changes that have been made can be found in blenders source code repository so you can also see any related code changes that will be affected by the change.


How to call vertex groups in Animation nodes [SOLVED] I would orient some instances by vertex normals, but i'd like to control orientation by vertex groups, to give z negative values to some instances, like in the pictures.is it possible? i've tried with Vertex Group Input but it gives me unexpected results.

Solved by 3DSinghVFX, then i've added a Combine Vector to control also Guides parameter from Vertex Group Input.

You can achieve that effect by controlling the scale of the normals with the vertex weight.

First, instanced an object (Cone) on the vertex locations of the base object (Cube) using this node-tree:

Then, remap the weight (using Vertex Weight Input node) which is in range (0, 1) to (1, -1) using Map Range node with the Threshold (in Threshold node) = 0.5 i.e., vertices which have weight less than 0.5 will have normals with scale = 1 (+ve direction) and vertices which have weight equal or greater than 0.5 will have normals with scale = -1 (-ve direction).

You can very the Threshold as you like.

Blend File:


BGE: How can I activate an actuator multiple times during a script? I am working on a game in the blender game engine. I need to Position an empty, spawn an object at it, re-position  it, and spawn another object. When I run my script it only appears to have activated once. I have recreated the scenario in another.blend file and the situation still persists.

Here is my code:

import bge

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

actu = cont.actuators['SpawnCube']
own.worldPosition = [4,0,0]
cont.activate(actu)
own.worldPosition = [-4,0,0]
cont.activate(actu)

yeah that is an issue when using Logic Nodes. I think some of them can only be activated once per frame.
There is however a solution to your problem and its this:

import bge

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

own.worldPosition = [4,0,0]
scene.addObject('NameOfTheObjectToAdd', own)
own.worldPosition = [-4,0,0]
scene.addObject('NameOfTheObjectToAdd', own)


Freestyle render - Problems getting it right I am trying to get the same result as:
https://docs.blender.org/manual/en/latest/_images/render_freestyle_export-svg_suzanne.svg

From Render docs, freestyle SVG exporter.

I have tried working with freestyle edge marks, but it does not get the desired result.

I have tried the different settings, but it I cant get the result.

Can anyone help me with the render settings.

Eric

I'm very curious to see a better solution since I'm not very experienced with Blender myself, but perhaps this would work for you:

create a plane an add an Array modifier, with Constant Offset in the Z axis. The more duplicates you create the more lines you'll have in your final render.
select the object to be rendered and add a Boolean modifier.

Operation: Intersect
Object: plane

hide the array for rendering

Repeat with any other objects to create the horizontal lines.


Precise simulation / particles help? I am animating a piece of machinery, and am currently trying to simulate rocks falling into a hopper, then being pushed down the screw. I am open to any method that gets this done.
(In the picture below, I have a boolean cutting the objects in half, but the particles etc are still colliding with the whole mesh). The screw is rotating, and should be pushing the rocks along.
Currently I have tried rigid bodies, which work the best, but with the size / amount of particles I want, is not possible on my PC.
I have tried particles with collision objects, but the particles, as in the picture below, merely go underneath the screw.
I've also tried using a curve guide to guide the particles, but as they are falling from below, and can fall into several different slots, that just isn't working.
Any and all help is appreciated!
UPDATE: I am now using the Molecular addon, but my only issue is the extreme bouncing off of particles from each other. Is there any way to reduce that?
UPDATE 2: I am now using a texture to reduce the particles' size over their lifetime - does this scale down the 'collision' shape for the particles too, or just how they look visually?

In your case, the Molecular Addon works best. To download it, go here: https://github.com/scorpion81/Blender-Molecular-Script/releases and select the zip file for your OS. Do not unzip it. Go to Edit->Preferences->Addons, click Install and select the zip file. Then enable it.
Usage: The molecular add on is a way to make particle systems behave more lifelike, for example, collisions, stickiness, etc.
For your case (follow these):

Create a particle emitter (can be any shape)
Give your mechanical parts collision modifiers
Instance an object on the particle system (I use 1 subdivision Icospheres, low geometry is better)
Press the play button and make sure the particles fall correctly as you want. Note that the molecular addon is still not working right now and particles will still behave normally, which includes clipping through each other.
Once you are happy, scroll down inside the particle system settings and check "Molecular". The add on is now enabled, but in order for you to see the effects you need to bake it. Now we will adjust the settings.
Open the density menu and press the button. Choose "sand", and this will accurately calculate the weights of each particle.
Open the collision menu and enable Self Collision (particles collide) and Collision with Others (particles collide with other things).
In order to see the results, open the simulate menu, choose a frame range, and press "simulate". Once you are done you can view the simulation by playing the animation, and you can also reset it by just pressing "free bake"

Tips:

Instance low poly objects on your particle system. Even one less vertex makes a big difference
Make sure to increase the particle lifespan so they make it to the end of the animation.
Are items still clipping through each other? Increase the timesteps. I usually use around 16 timesteps for relatively fast simulations.


Combining Curve modifier with Follow Path constraint Is there a way to deform a mesh along the curve but also move the object along the curve?

if I add a Follow Path constraint with Follow Curve option enabled, my object doesn't deform;
if I add a Curve modifier, it deforms but I can't offset it;
if I add both constraint and modifier I can't make them to behave the way I want;

Is it possible to achieve what I want without using Armature?

The only workaround I found so far is modifying my object pivot point + using Curve modifier, but this won't work for me: I want to have several linked objects along the curve.

Ah! Displace modifier before the Curve modifier with the same axis:


Need help flipping multiple objects in a collection as a whole Hi guys, i'm still new in blender and i'm currently trying Hard-Ops non destructive modeling, i have an issue on mirroring a collection as a whole, if i try "right click -> mirror" it will mirror based on each of the objects individual origins (which is a mess).

I also tried putting the origins to the head and ctrl+m to mirror it but it still ends up super messy

Below is an attempt to mirror the objects by 3D cursor as a pivot point

How do i mirror them as a one whole object? i've been scratching my head this whole day haha, any insight will be much appreciated :)

I might be missing something but the problem seems simple to me.

With your first described attempt you were using Individual Origins.

But I think you want to use Median Point while mirroring, and you'll get the desired result.


Is there a way to procedurally scatter objects on the ground of my scene? I would like to have plants, rocks, sticks and other debris scattered randomly on the ground in my scene, but I don't want to have to place it all there by hand. Is there an easy way to do this in Blender?

Placing Objects Randomly on the Ground with a Hair Particle System

Using a Hair Particle system is a very easy way to have objects scattered randomly on your ground plane. This can be very useful for creating litter in cities, rocks & sticks in woods, trees in forests, weeds in abandoned lots, etc:

Step #1: Create your Objects

Add to your scene one of each type of object you want to have scattered on the ground. In this example, I'm using 3 objects:

Each object's Origin Point is the point where the object will touch the ground plane. So, make sure to place the Origin Point accordingly. In this example, we'll move the Origin Point of each object to the mesh's bottom-most point:
Select an object > Edit mode (TAB) > select all (A) > move the object up until it's Origin is at the base of the object:

Now make all your objects a Group by selecting them all and pressing CTRLG
Then name your group something like "Object Group" in the Tools panel (T)

Now rotate all the objects 90 degrees on the Y axis. This is very important because in hair particle systems, particles use the global +X axis as "up" for orienting the particle (or object, as in the case here):
Object Mode > select object > R > Y > 90

You can now move them off to the side or to a different layer -- just don't rotate them.

Step #2: Make Your Particle System

Add a Hair particle system to your ground plane:
Select ground plane > Object Properties window > Particle System tab > click New > set Type to Hair

For the particle system, make the following settings:

Enable Advanced

In the Render section, select Group, and set Dupli Group to your object group, and enable Rotation

Enable the Rotation section, set Initial Orientation to Normal, and the (Rotation) Random to 1

In the Physics section, adjust the Size of your objects, and if you want some of the objects to be random sizes then adjust Random Size

Adjust the Number of objects in the Emission section

The result is a scattering of your objects over the ground:


How to select loops with 'emulate 3 button mouse' and 'LMB select' enabled? Is there a way to select loops with Emulate 3 Button Mouse and Left click select enabled?

In blender 2.8 it is double left click to select a loop if the Emulate 3 Button Mouse is checked in settings.


Script for Placing Mesh on Sphere with Provided Latitude and Longitude A while back, I made a planet Earth (UV Sphere, 3 Subsurf levels, and highres Earth texture with Generated Texture Coords) with various pins stuck on different geographic locations. These pins each had a plane at the bottom of them with a unique picture on them. It was for a project I did for my dad on Fathers Day this year (I made a collage of all of his colleagues and him to show that they were a company that truly covered a lot of the world).

See second link for full video:

While I was making this, I devised a system that worked decently for manually placing different pins at different latitudes and longitudes on the "planet," which included placing the 3D Cursor at the center of the planet and rotating the pins around the planet with Pivot point > 3D Cursor. However, between rotating the pins correctly, setting different images, and then making minor corrections, this understandably took a long, long time, and if I had to do something like this again, I would prefer that it not take as long.

Gif of rotation with failed text :)

I'm wondering if anyone could design a Python script/add-on that would take the inputs Latitude, Longitude, and a Path to an image, grab a preset mesh (pin and plane), position it at the "latitude and longitude," and add the image to the plane. It occurs to me that the location would only have to be relative, because one could always use a Vector > Mapping to rotate the map image.

If I have understood your video well, the difficulties (I am learning Python) here are linked to several points :

Copy of objects and materials as I have seen no way to change the pictures and colors keeping original pin and card materials
Placement of the pin and card

Copy of objects and materials

Copy of objects is base on this function that creates a new mesh and a new object based on this mesh and link it to the scene. The object is tagged 'CivicCollage' as this will be useful for a cleanup of the generated object, if needed.

def Duplicate( name, obj ):
    newMesh = obj.data.copy()
    newObj = bpy.data.objects.new( name, newMesh )
    newObj.isCivicCollage = True
    bpy.context.scene.objects.link( newObj )
    return newObj

Copy of the materials needs to preserve all the object materials and replace only the needed one (either the texture for the card, or the color for the pin). The trick here is to link these materials at the object level, as if not, this will interact badly with the original objects.

def AssignDuplicateMat( obj, copyObj, mat ):
    newMat = mat.copy()
    newMat.isCivicCollage = True

    for i in range(len(obj.material_slots)):
        copyObj.material_slots[i].link = 'OBJECT'
        if obj.material_slots[i].material.name == mat.name:
            copyObj.material_slots[i].material = newMat
        else:
            copyObj.material_slots[i].material = obj.material_slots[i].material

    return newMat

Once done, using the previous function for both card and pin, we can change either the texture of the card or the color of the pin. This is based on the name of one node of the Cycles configuration :

def AssignColorToMat( mat, nodeName, color ):
    node = mat.node_tree.nodes.get( nodeName )
    if node != None:
        node.inputs['Color'].default_value = (color.r, color.g, color.b, 1)

def AssignTextureToMat( mat, nodeName, image ):
    if image:
        node = mat.node_tree.nodes.get( nodeName )
        node.image = image

The image is previously loaded from a file. We first check if this image is already known, and if not we load it using the combination of a root path and a file name to have the full image path :

def LoadImage( imagePath, fileName ):
    try:
        return bpy.data.images[fileName]
    except:
        try:
            fullFileName = bpy.path.abspath( imagePath + fileName )
            return bpy.data.images.load( fullFileName, check_existing = False )
        except:
            return None

Objects placement

We need some conventions here :

Pin and card are Z up (we see the pin top and the card face from top view)
World sphere is orientated so that 0° in latitude and longitude is at positive X axis

From that, we convert the parameters in radians, then calculate the position and finally the needed rotation (surely that could be shorter, but...). Note that the rotation needs to be assigned in the mode of the object rotation display (here I kept the conventional Euler, but if you are not using it, this code may fail, assigning the values but with no visible results).

def PlacePin( worldLocation, radius, latDeg, lonDeg, scale, pin, card ):

    latRad, lonRad = radians( latDeg ), radians( lonDeg )

    x = cos( latRad ) * cos( lonRad )
    y = cos( latRad ) * sin( lonRad )
    z = sin( latRad )

    location = Vector( (x, y, z) ) * radius
    locationFromWorld = location + worldLocation
    scale3D = (scale, scale, scale)

    aroundZ = Quaternion( (0, 0, 1), lonRad )
    aroundY = Vector( (0, -1, 0) )
    aroundY.rotate( aroundZ )
    aroundX = Quaternion( aroundY, latRad )

    rotation = Quaternion( baseRotationQuat )
    rotation.rotate( aroundZ )
    rotation.rotate( aroundX )

    pin.scale = scale3D
    pin.location = locationFromWorld
    pin.rotation_euler = rotation.to_euler( 'XYZ' )

    card.scale = scale3D
    card.location = locationFromWorld
    card.rotation_euler = rotation.to_euler( 'XYZ' )

Other aspects

I can't detail all the script parts here.

The addon is based on a GUI with two modes.

A manual mode

These parameters are self explanatory, except maybe the nodes : you have to set here the nodes names (as they appear in the node information panel 'N').

A "from file" mode

This mode allows you to generate several pins from a file.

This file is indicated in the first parameter and the last parameter corresponds to the images folder.

For instance, I have used this text file, with fields separated by ';' and with the following columns:

Latitude
Longitude
Scale
R color component of the pin
G color component
B color component
Location name
Image file name

48.8534100;2.3488000;0.05;255;0;0;Paris;paris.jpg

51.500152;-0.126236;0.05;255;0;0;London;london.jpg

40.440624;-79.995888;0.2;0;255;0;Pittsburgh;pittsburgh.jpg

35.6895000;139.6917100;0.1;0;255;0;Tokyo;tokyo.jpg

-22.9027800;-43.2075000;0.1;0;255;0;Rio;brazil.jpg

6.465422;3.406448;0.1;0;255;0;Lagos;lagos.jpg

39.9075000;116.3972300;0.1;0;255;0;Pekin;pekin.jpg

-35.2834600;149.1280700;0.1;0;255;255;Canberra;sydney.jpg

Note about the file data : I needed to add a carriage return for the presentation of the answer, but for the real file keep the lines consecutive (the real file is packed into the blend).

Cleaning the generated objects

Last, the "clean" button allows to delete generated objects and to mark unlinked materials and textures.
This can be useful also because the script may fail if some parameters are not as expected...

Addon

To have an addon from the blend file below, simply save the Python code into a file.py. Or simply run the script directly from Blender.

Note that I have tested all that... but if you encounter some problem, please tell...


Script skew camera in game engine I want to make my camera to act like my illustration below with just some python scripting, because I want this to be changed during runtime. This is for a school project.

I'm very sceptic if this is possible, but I hope so.

The orhtographic illustration is from the back of two cameras with images below, where the left is regular and the other one is modified. The two images on the bottom is the desired result.

This is for a kind of "point of view" tweaking. Like if you were looking on the image from the side, it would still appear as it was facing you.

If this does not work, then maybe my next idea is possible.

This is two cameras from the top view where the right one is modified.

Thanks!

There is no built-in functionality for that. However, You can setup a custom camera view matrix using a bit of Python.

import bge
scene = bge.logic.getCurrentScene()
cam = scene.active_camera
# get projection matrix
camatrix = cam.projection_matrix
#modifying the camera projection matrix by modifying the x and y terms of the 3rd row to obtain a shift of the rendered area
camatrix[2][0] = 2*shiftx
camatrix[2][1] = 2*shitfy
cam.projection_matrix = camatrix

See this for detail.


Mirror actuator in BGE Is there a way to get a whole bunch of planes to mirror themselves along a single axis in game using logic bricks? I have my planes parented to the bones of my armature to make a 2D character and I want him to be facing left when I push ← and right when pushing → because it is a 2D game. Right now I have two copies of my character. One facing right and one left and I have it set up so that all the planes turn invisible when the opposite button is pushed which makes for a lot of logic bricks. Does that make sense? If they just mirrored along their net origin point on the z-axis in my case, that would be way easier. I will post a pic of my current situation when I get home if you need it.

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

To do so, play an action with scale keyframes:

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

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


Join these two objects together? I'm trying to join the bottom of this arcade stick to the face below it by actually having it attached to the mesh. What would be the best way of doing this?

I've tried to bridge the bottom edgeloop to the face however this did not work. I've been looking all over google to figure out how to do this but my blender terminology is next to non-existant so I wouldn't know exactly what key terms to be searching for to begin with.

Try to use the boolean modifier set to add and then fix the topology manually using the knife tool


Group particles not showing up in Cycles i'm currently having trouble with a project i'm working on. I can't quite get this object group to emit from this plane as a particle system.

The group is on the 2nd layer. Here's the blend file: http://pasteall.org/blend/index.php?id=49654

This should fix it, but I suggest watching some tutorials how to create grass in Blender.

Usually it's done with hair particles, either by manipulating the hair
https://www.youtube.com/watch?v=mZR_WKVYiX8

or duplicating mesh grass using the hair particles
https://www.youtube.com/watch?v=eshOzshjt90&t=58s


on select color changes Im getting some problem when i click the object it shows the color and when select other object or deselect the color is no more. U can c my image below how the color change on select and deselect. May i know how to fix it. I have restart blender and my machine to but yet to same problem.

I presume, that in the place, where you're clicking there are 2 meshes, one with material applied and one without. When you click on the one with material it is being shown.


Cannot form edge loop (No ngons or tris) I'm making a dagger in a half moon shape. I got this far (see picture below), but I really want to make an edge loop on the sides (not the sharp edge of the blade, but the side), but I only get vertices suggestions on the edges and not for the entire length.

I used a cylinder to make this and used the boolean modifier with another cylinder.

The reason your edge loops aren't continuing as you would like is because you've created n-poles towards the end of your crescent. You've done this in order to maintain all-quad topology, but all-quad topology is only useful as long as it lets you continue edge loops as you want to. The corner where the three highlighted lines intersect, as far as the topology is concerned, is exactly identical to the corner of a cube. Blender doesn't know which edge to continue the edge loop down, so it stops there.

Option 1: Take the Triangle

In this case, you can just leave triangles there. They're not really going to screw up a subdivision surface modifier, and for the most part they will let you continue to add edge loops along the geometry as needed.

Option 2: Better Quad Geometry

If you really want to keep to quads though, you simply need to add some more geometry which puts your quads in the right places.

This arrangement preserves quads, but doesn't put those inconvenient poles along the edge loops you want to select:


Edit Mode Transform Median X, Y, Z location. How to read the N-Panel Rather than recalculate it - How can I read the Transform Median X,Y,Z that is displayed in the Transform Median Dialog..

The code to calculate it is straight forward but I'm just curious as to "where this data is coming from"?.    It's right there and I can't get my pythonic hands on it.

The tool help for it is bpy.ops.ui.editsource but the documentation doesn't reveal anything.

Should I be looking in the BMesh class?

Similarly:   In object mode - the Transform Location is that of the last selected object.
But the "pop up tool tip" at least gives me the "Slot Info"

I didn't see a response but this is the code that I used:
I think the original author was CodeManX

    def calcpivotpoint(theobject):
        ob = theobject
        me = ob.data

        bm = bmesh.from_edit_mesh(me)
        verts_sel = [v.co for v in bm.verts if v.select]

        pivot = sum(verts_sel, Vector()) / len(verts_sel)

        return ob.matrix_world @ pivot


How to use my own geometry as mesh deform cage in BlenRig add-on? If my character's proportions are very different than the original human's proportions that the mesh deform cage was designed to contain, then I have to do so much tweaking to match the cage to my character. Is there a way to use my own mesh cage that already matches the character and copy the deformation weights from the BlenRig mesh deform cage to it?

Yes, Although you may end up needing to spend just as much time correcting the weights.

The data transfer modifier can copy vertex weights, but you will probably need to do some tweaking after and of the modifier settings to get things right. It will also need the blenrig cage to be made to at least roughly match your new cage, as you are going to want to use the "Nearest Vertex" setting.


Git Flow when coding for blender I am sry if this is the wrong place to ask this or if this has already been answered elsewhere but I couldn't find it.
I am confused about the git workflow when coding for blender: When I clone the blender src I get a local repo with the blender src code, but as I understand it, I can't directly develop in this repo because I don't get a Visual Studio solution or smth similiar and I don't get an application to run/debug.
So I build blender and get another folder outside of my git repo called build_windows.. or something. In this folder I get a VS solution and an application to run/debug. Here I can work on the code with VS.
But how do I get my changes, that I make in this folder, back into the source code folder, back into the git repo? I can't imagine I have to copy the changes manually.
What am I missing in this workflow? If someone could explain that to me, I would greatly appreciate it.
Thank you!

You work with source code in the src folder of the cloned blender repo directly. If there is no project file for the IDE included (in your case the Visual Studio Solution) you need to create one and set it up to use this src folder.
Fortunately, Visual Studio offers support for git, so all you have to do is create a new Visual Studio Solution and set up git and the blender repo. Then you can track your changes and do the versioning in Visual Studio.
Of course you can still use the git command line but the source files stay in the src folder. Git handles the changes and keeps track of them. The repo itself with all versions and changes is usually stored in a folder named ".git" inside of the main folder.
Hope that helps.


Duplicate mask including animations in vse (2.81) I need to duplicate a mask including its animation to invert it and apply it on a movie strip. Is there a possibility to do it? In the dope sheet in mask mode it says "Keyframe pasting is not available..". In recent version it was possible via a number button next the mask name, but this button does not exist in 2.81 any more.
thanks daniel

Save your file with a new name (myproject_tmp.blend), then reopen the original file. File/append, select myproject_tmp, Mask, mymask, Append.

You can now delete myproject_tmp.

That's a dirty workaround... The miss of this button is either a bug or a regression in my opinion.


Bridging Faces Gives Error Message I have a problem with bridging the faces selected in the first picture.

When I click Bridge Faces this error message pops up:
Select at least two edge loops

What might cause the problem?

You are getting this error message twice:

Which means you are currently operating on two separate meshes.  Each mesh has a face selected so neither is able to complete the operation.
If you join the objects by selecting them in Object Mode and pressing Ctrl + J you will be able to run the operation normally.


What options do I have to make metal engravings and etchings in blender? I'm want to create the hidden blade from assassin's creed brotherhood (video game)

I created the model and stuck on how to create engravings on the hand guard of hidden blade

Here are some reference pictures

The engravings on the blade doesn't has that much of a bump to them, so I'm going to add them in textures

But ones on the hand guard does

So my question what options do I have to make them?

I want it to be details just like in the first picture

So I don't think a texture with a bump map will do

PS: Still a noob in blender so... sorry if this question is stupid

sculpting and baking the normal is the best way of doing these... another not so very recommended process is to take out its UV layout into image editing software and create a greyscale map of the design you need over it and then use it as a bump map on the mesh...


Subsurf and mirror modifier creating a split in mesh I was practicing with modeling a leaf using a image reference. Everything went fine and I finished modeling my leaf, but I wanted to make it more realistic (I'll add textures later), I saw lots of people using the Subdivision Surface modifier but it doesn't work for me.

My model:

My model when I add the Subdivision Surface modifier

The mirror modifier is designed to work properly with the subsurf modifier. You shouldn't have to do anything extra.

The main problem is that your subsurf modifier is above your mirror modifier in the stack. The subsurf should be below the mirror modifier.

Essentially, you're suburfing one half all by itself, and then mirroring that. Rather, you want to mirror the part you have, and then subsurf the whole thing.

If that doesn't fix all of the problems, there are some other problems you might be running into.

Normally, the mirror modifier will merge vertices from one half that are close enough to the save vertices from the  other half. You just have to make sure of two things:

Your center line must be perfectly straight.
Your center line must be close enough to the mirror pivot.

To make your center line perfectly straight, select all the vertices that are on the center of your mesh and scale to 0 only on the proper axis. If your center line parallels the x axis and lies on the x-y plane, then scale to 0 on the y-axis.

To make sure your center line is "close enough" to your mirror pivot, first determine what your mirror pivot is. The default is the object's origin, but you can use the origin of another object. In your case, it's probably the object's origin. Here's a method you can use:

Select all vertices
Zoom in on the object's origin (orange dot) and move all the vertices until the center line lies exactly on the origin.

You may have to zoom in very far to get it perfect, but you really only have to get "close enough" as defined by the merge distance set in the mirror modifier.

It's best to move on a single axis, which you can do after starting the operation, in this case grab. After typing g, type the letter of the axis along which you want to move the vertices. You'll be constrained to this axis until you choose another one, or finish the operation.


How to instance geometry rather than Objects? I'm trying to reverse engineer the awesome setup of Felipe del Rio here.
I got as far as setting up an XY array with geometry nodes that instances objects using Line primitives. I want to repeat the XY output on the Z-axis, creating the basic shape of a building.
I am looking for a way to 'chain' the XY-axis output, but there are currently no nodes that instance Geometry directly (Blender 3.0 alpha). How would I achieve this?

I found Felipe del Rio's solution on developer.blender.org: https://developer.blender.org/project/view/121/
Felipe uses the Grid primitive, which gives you a 2d array option. No 'chaining' required.
I'll wait for further developments to see if instancing geometry becomes an option.


Global Axis/View weirdly tilted I'm having quite an unusual problem with Blender. The global axis of my entire scene is oddly rotated/tilted, when moving around the tilt stays the same.
I think it's best described through a picture:

You can see that even the axis in the bottom left of the 3D view is tilted.
How do I get out of this view?

Press and hold Ctrl and Shift while rotating the Mouse Wheel to rotate your view:

Or Press Numpad 1  to go back to Front view or  Numpad 3 for Left view...


Blender renders HDRI instead of background clip I am a little confused right now. My plan was to take a 360 image with the camera in the spot where that red thing is, take that picture as enviroment light for more or less realistic reflections. Then I filmed the same spot with my camera and tried to add that metal sphere in.
Tracking worked fine.

The problem now is, that blender shows the actual footage I want in the preview render but when I try to render a frame by hitting F12 the background is this distorted version of the footage.

It cant be the image from the 360 camera because the perspective doesn't fit.

How do I fix it?

Ok, turns out this automatically created node was responsible. It's not supposed to be here.

I guess I'm not gonna delete this post for now in case someone else needs it.


Python - move UV for selected items I want to use python to move the UVs of the selected objects. I am having trouble with moving the UVs. When I run my script I moves the objects instead, not the UVs. All object have exactly 1 UV map.

My approach the problem:

for mesh in selection:

for UVs in mesh

select all UVs

move UVs

Here is my code.

import bpy

scene = bpy.context.scene
for count, ob in enumerate(bpy.context.selected_objects):
    if ob.type == 'MESH':
        scene.objects.active = ob
        bpy.ops.object.mode_set(mode='EDIT', toggle=False)

        bpy.ops.mesh.reveal()
        bpy.ops.mesh.select_all(action='SELECT')

        # execute any editmode tool
        move_x = count % 10
        move_y = count // 10
        bpy.ops.transform.translate(value=(move_x, move_y, 0), constraint_axis=(True, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=0.263331)

        bpy.ops.object.mode_set(mode='OBJECT', toggle=False)

It's all about context, at no point are you in the image editor. The same bpy.ops.transform.translate() is used in the 3d view and the image editor. Basically, you could just save the current area, switch to the editor, perform transforms and switch back. Granted, there are much more elegant ways to do this but for a 3 line hack, it works quite well.

import bpy

#+ grab the current area
original_area = bpy.context.area.type

scene = bpy.context.scene
for count, ob in enumerate(bpy.context.selected_objects):
    if ob.type == 'MESH':
        scene.objects.active = ob
        #+ switch to the image editor to perform transforms etc
        bpy.context.area.type = 'IMAGE_EDITOR'
        bpy.ops.object.mode_set(mode='EDIT', toggle=False)

        bpy.ops.mesh.reveal()
        bpy.ops.mesh.select_all(action='SELECT')
        #+ select the uvs
        bpy.ops.uv.select_all(action='SELECT')

        bpy.ops.transform.translate(value=(0.125, 0, 0), constraint_axis=(True, False, False))

        #+ return to the original mode where the script was run
        bpy.context.area.type = original_area
        bpy.ops.object.mode_set(mode='OBJECT', toggle=False)


Randomization of the array modifier I would like to create something that is basically what array modifier does, but with a tiny bit of randomization (of both location and rotation). The particle system would be otherwise fine except that it is too random. I couldn't find a way to make the particles mostly organized with a little bit of randomness.

I found a really old patch to Blender introducing exactly what I wanted, but apparently it was never accepted: https://developer.blender.org/T26662.

EDIT: I used the method suggested by Faceb Faceb below to get the following result:

The result is fine, but in this method I have to apply the array modifier before randomization which makes it more difficult to e.g. change individual parts of the array later (if I wanted to, for instance, fiddle with the shape or looks of the bricks in the picture above). If there is a way to achieve this result using the particle system, I'm interested.

Result with Particle System

Preparation

Create an Object (Cube) and bring it in the desired shape.
Create a Plane, subdivide it in Edit Mode (F6 for adjusting the number of cuts easily).
Add a Particle System to the Plane.

Setting up the Particle System

In the Physics Dropdown choose No.
In Render Dropdown choose Object and pick your "brick" you have created.

In the Emission Dropdown choose:

Emit from Faces
Grid
Enable Hexagonal Grid

Play around with the Resolution value in the Emission Dropdown and scale S your Plane along one Axis until you have a nice Pattern.

Randomize:

In the Emission Dropdown you can add a random Offset to the Grid locations
Enable the Rotation Dropdown and randomize softly the Particle Orientation


Why do I get a type error when trying to name a newly created object? From a script, I create a bunch of circles with bpy.ops.mesh.primitive_circle_add() and I need to name the newly created object. But I get a Type error message at the circle.name line:

  TypeError: bpy_struct: item.attr = val: Object.name expected an int type, not str

 def makecircle(uid, id, ring, rad, vert, sthick, origin):
    bpy.ops.mesh.primitive_circle_add(
        radius = rad,
        vertices = vert,
        location = origin,
        rotation = (0,0,1.5707/2))
    circle = bpy.context.object

    bpy.types.Object.time = bpy.props.FloatProperty(name="Time")
    bpy.types.Object.duration = bpy.props.FloatProperty(name="Duration")
    bpy.types.Object.pause = bpy.props.FloatProperty(name="Pause")
    bpy.types.Object.interval = bpy.props.FloatProperty(name="Interval")
    bpy.types.Object.target_rotation = bpy.props.FloatVectorProperty(name="Target Rotation")
    bpy.types.Object.ring = bpy.props.IntProperty(name="Ring")
    bpy.types.Object.event = bpy.props.IntProperty(name="Event")
    bpy.types.Object.uid = bpy.props.IntProperty(name="Uid")

    circle.name = "Tile" + str(ring) + "." + str(id)

When all is done I would expect the objects to be named on the pattern "Tile0.0, Tile0.1, ...".

Why won't Blender let me give the objects a name?

This works fine for me with repeated calls to

makecircle(2, 3, 10, 10, 10, 1, (0,0,0))

I end up with "Tile10.3" and then a whole lot of "Tile10.001" using the blender naming system.

You need define a blender object property once, all the bpy.types.Object.xxxx = IntProperty(...) should be moved to a register method, called once.

The error you are getting is almost certainly that you have defined

bpy.types.Object.name = IntProperty(...)

elsewhere in your code.  As long as that code has been run ONCE somewhere while the file is open, the name property of an object is expected to be an Integer and will remain throwing that error if you try and set it to a string.
If I run the offensive little bit of code then check the console

>>>C.object.name
0

which isn't really what we want.

import bpy
from bpy.props import IntProperty, FloatProperty, FloatVectorProperty
from math import radians

def makecircle(uid, id, ring, rad, vert, sthick, origin):
    bpy.ops.mesh.primitive_circle_add(
        radius = rad,
        vertices = vert,
        location = origin,
        rotation = (0,0,radians(45)))
    circle = bpy.context.object
    circle.ring = ring

    circle.name = "Tile" + str(ring) + "." + str(id)

def register():
    bpy.types.Object.time = FloatProperty(name="Time")
    bpy.types.Object.duration = FloatProperty(name="Duration")
    bpy.types.Object.pause = FloatProperty(name="Pause")
    bpy.types.Object.interval = FloatProperty(name="Interval")
    bpy.types.Object.target_rotation = FloatVectorProperty(name="Target Rotation")
    bpy.types.Object.ring = IntProperty(name="Ring")
    bpy.types.Object.event = IntProperty(name="Event")
    bpy.types.Object.uid = IntProperty(name="Uid")
    # will produce the error you are getting.
    #bpy.types.Object.name = IntProperty()
register()

makecircle(2,3,10,10,10,1, (0,0,0))


Animate Text bpy.ops.transform.translate I am trying to find the right code to animate text that follows a bezier curve in python blender api. I can add the keyframes, and they appear to be working when I drag through the timeline, but when I run script it sets just one keyframe. I need to be able to tell it the start keyframe at frame 1 and the end keyframe at frame 249. Here is part of the code I am using:

bpy.context.object.name = "Text"

bpy.ops.object.modifier_add(type='CURVE')
bpy.context.object.modifiers["Curve"].object = bpy.data.objects["Circle.Text"]

bpy.context.object.modifiers["Curve"].deform_axis = 'NEG_X'

bpy.ops.transform.rotate(value=1.5708, axis=(1, 0, 0), constraint_axis=(True, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, snap=False, snap_target='CLOSEST', snap_point=(0, 0, 0), snap_align=False, snap_normal=(0, 0, 0), release_confirm=False)

bpy.ops.transform.translate(value=(12.8872, 0, 0), constraint_axis=(True, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, snap=False, snap_target='CLOSEST', snap_point=(0, 0, 0), snap_align=False, snap_normal=(0, 0, 0), texture_space=False, release_confirm=True)

bpy.ops.anim.keyframe_insert_menu(type='Location', confirm_success=False, always_prompt=False)

bpy.ops.transform.translate(value=(-11.6886, 0, 0), constraint_axis=(True, False, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, snap=False, snap_target='CLOSEST', snap_point=(0, 0, 0), snap_align=False, snap_normal=(0, 0, 0), texture_space=False, release_confirm=True)
bpy.ops.anim.keyframe_insert_menu(type='Location', confirm_success=False, always_prompt=False)

Thanks in advance if anyone can help.

Ditch the operators

Test run with default text and default bezier circle objects

Below is code which does, what I believe to be, same as above, but without any operators.  For case of example I have used an object named "Text" in scene for text object, and an object named "BezierCircle" for the curve. Change to suit

import bpy
from mathutils import Matrix, Vector
from math import radians

context = bpy.context
scene = context.scene

text = scene.objects.get("Text")
curve = scene.objects.get("BezierCircle")

if text and curve:
    # add modifier
    cm = text.modifiers.new("foo", 'CURVE')
    cm.object = curve
    cm.deform_axis = 'NEG_X'
    # rotate
    R = Matrix.Rotation(radians(90), 4, 'X')
    text.matrix_world @= R # replace @ with * for pre 2.8
    # translation
    text.matrix_world.translation += Vector((12.8872, 0, 0))
    # insert keyframe
    text.keyframe_insert("location", frame=1)
    # and again
    text.matrix_world.translation += Vector((-11.6886, 0, 0))
    text.keyframe_insert("location", frame=249)


I want the domain of a fluid simulation to abosrb the mesh (stop rendering splashes) as soon as it touches the bottom of that domain. Possible? My fluid sim goes from top to bottom as a waterfall, but i want the water to be absorbed by the bottom of the domain as the fluid touches it. Is that possible?

Yes, that is what outflow fluid objects are for. Add a plane to the bottom of your simulation and set the fluid type of the plane to "Outflow".


Best way to have text change during an animation? The short version

I want to create a very simple animation that will change the text of two fields based upon the time elapsed in the animation. I think that the python API is the best place to start, but not entirely sure of that.

I think my question is a duplicate of How can I make dynamic text in an animation?. For my purposes the simple python scripting will work best, but that Animation Node add on looks amazing.

Longer

I want to create a training aid for some musical exercises (Stick Control). Each exercise is played 20 times and generally I'll play 24 total exercises. Depending on the tempo, the total animation will run from 20-50 minutes.

I'll create a metronome track in my audio application and put the two together for the final product.

I intend to do several versions at different tempos, so python was appealing b/c I can put the BPM in the script and then derive what's needed from there.

Hopefully, that's pretty clear. Really looking for the best starting point. It would be really nice if I could get the changing text during the timeline scrub so I could verify that I was doing things correctly without having to dump a complete render each time.

It occurs to me that this is somewhat similar to a walk cycle (on the repetition count), some way to easily change the time scaling for different BPM might make that approach a winner as well.

I don't know exactly how to do it, but if you are looking into scripting methods of doing this, check out animation nodes. This sort of thing is pretty much what it was made for. You can use nodes as well as custom python script to get what you're looking for.


Which mode should i trust for lighting? I want to export my objects to unity, but in blender I`m using Eevee engine. However the light in rendered more and material preview mode is completely different, which impacts the colors of objects. Which one can i trust to see the true final colors of the objects so that they will be the same when i export them to unity?

Material Preview
Material Preview uses one of the builtin generic HDRi maps to light the objects.
It is for preview purposes only and wont affect final scene lighting, nor will it be exported along with the model.
In this mode scene lights are ignored (optionally) for performance and workflow reasons. You can enable them in the Shading Popover.
Render Preview
Render preview uses your actual World Shader as background color instead and lighting.
Scene lights are also previewed closer to final result. They are still never exported to other applications though, so in external game engine or environments results will always differ.
You can switch the HDRi on/off for both preview modes.

Also see related How to use Default HDRIs in Renders?


Making own layout, Toggling through multiple cameras in a scene I need to make a layout so I can see individual parts of my scene all at once for editing purposes.
Sort of like my own quad-view; therefore it's not animated and is unlike the solution in  "https://blender.stackexchange.com/questions/3502/how-can-i-make-a-camera-the-active-one" ).
I could manually move my viewing angle in each viewport into place. However, I discovered the angle in veiwports may all reset when the active camera is changed. So I've placed a new camera objects in the locations I want them (one for editing with, one as the render camera, and one aimed at my custom facial rig and IK/FK UI).
If I add more cameras how can I temporarily toggle through the cameras for quick referance? You know, rotate through the view from each camera but only in one specific "layout window" without changing the active camera in all viewports?
Note: I work in both Blender 2.79 and 2.9 series and would like the answer for both versions please.

Use Local Camera
Ther's a feature called Local Camera that allows you to specify a camera per viewport.
You can find it in the N bar under view. Just specify the camera for each viewport.

To enable the feature in 2.79 you must disable the  lock local camera and layers toggle in the header (see cursor position below).


illustrating transparent tunnel while embodying solid front I'm trying to create a scene which consists of one huge block which is seen from really close such that no edges are visible. The inner life of the block should consist of various tunnels carved into the block whith connections to the outside (like a futuristic town). The block should be transparent to some point such that its inner life is visible, however it should be still obvious that there is a wall.

For the block I used a glossy shader mixed with a diffuse one, then again mixed with a transparent shader. I added a plane as illumination from the side to get a reflection and an illumination gradient to highlight the wall but I'm not really happy with the result so far.

How do I make it clear that everything rests in a box with an obvious wall while still being able to show channels inside the material?

I think this is not a question of how to do it, but a question of what you want to do. My recommendation would be to think more about what you want to do, what you wish to communicate visually and how. Maybe look for something visually similar or attempt to sketch it. It is hard to achieve what you want if you do not know what you want. Work more on the concept so it is clearer.


Mirrored pose problem (IK goes crazy) I have a problem when I try to mirror my run animation, the IK bones on the foot go completely out of control on the mirrored portion of my animation.

The white keyframes are what I copied, and the yellow are the keyframes are the ones I pasted with (shift ctrl V)

The IK bones go completely out of control in the mirrored portion of the animation.

I used sebastian lague's amazing rigging video

https://www.youtube.com/watch?v=Q9f-WVs3ghI

After take a look into your Blender's file. I think that your problem is about your Leg Control bones aren't have the same local rotation in edit mode. So whenever you do mirror paste, your bone will move at wrong direction.
How to fix it:

Select your armature then press TAB to enter Edit Mode
Select both of your Leg Control bones then press CTRL + N and choose Global + Z Axis

Back to Pose Mode and do your mirror paste, the rig is working perfectly now.

P/S: You must re-animate your animation, because after reset rotation, your armature doesn't work correctly with current animation. Here is your file after i fix it. Sorry about my bad english, hope someone could edit this :(


Mesh added to scene is off axis I am very new at this and I'm not entirely sure how to explain this stupid and I'm sure easially fixable problem... I have the cursor and origin set to the center. But when I add mesh like a flat plane, it is added facing flat to whatever my view is instead of adding at 0x 0y 0z. So to add a plane flat with the grid, I have to be in top view (7).

Right after adding your object, uncheck the [   ] align to view option in the toolbar. If you don't see the toolbar, hit t and it will pop up on the left side of the 3d view.

Edit --
Just to add Zac's comment: you also can access this menu by hitting F6 after adding your object.


Procrustes in Blender I am trying to solve the Orthogonal Procrustes problem inside Blender for a specific case but I am having some trouble. I have a face and a pair of glasses in my scene. They are not in a specific position, they can be anywhere.

I have then defined the following function using the numpy library, that is an implementation of the Orthogonal procrustes problem:

import numpy as np

def procrustes(X, Y):
  X = X - X.mean(axis=0)
  Y = Y - Y.mean(axis=0)
  (U, S, Vt) = np.linalg.svd(np.dot(Y.T,X))
  R = np.dot(U, Vt)
  Y = np.array(np.matrix(Y) * np.matrix(R))
  return X, Y

It finds the best translation and rotation for putting glasses on the face (it finds an orthogonal matrix which most closely map Y to X) and now I want to apply it.
In my case the translation can be avoided and we can assume that it's already fixed. So we can consider only rotation for simplicity. X and Y should be two np arrays of points in the space.
Do you have any idea of how I can apply this function to my problem?

First of all, I would suggest using the letters A and B, instead of X and Y. Furthermore, you don't document what type they are; I assume those are matrices. You can call X.to_euler(...) to get the rotation from the matrix, and assign it to ob.rotation_euler.

For more info, see the mathutils API documentation.


How can I make permanent changes to the mesh after the shape keys have been applied? I'm trying to understand to manage correctly vertex groups and shape keys. These are the steps I did:

1) I have created the vertex groups of the eyes of my character

2) I have created the shape keys of the eyes of my character, left (called eyeOpen.L) and right (eyeOpen.R). When the value is 0, they are closed, when the vaue is higher they are opening.

This is how appears my character at this point:

Now, after that I did the step 1 and 2, I realized that I have to modify the wings of the character. So, with the eyes closed, I have modified a little the wings, and here you can see how the character appears now:

Now, when I have opened the left eye, you can see what happened:

In other words, the character has came back to be the original model. But I don't want to do it. I want that, even if I open the eyes, the last changes that I did to to mesh, remain unchanged. How can I do this? Thanks.

NB: In the pic #3 you can see that I cut the faces that connect the head with the rest of the body because I thought that, when I opened the eyes, the latest changes made to the mesh remained unchanged, but I was wrong. Now I imagine that I have to change the mesh of the wings also with the eyes opened, but in this case I have to work two times every time that I have to modify the mesh after that the shape keys have been applied?

I've attached the 3d model,here :

you will see a gap all around the eyes. I imagine that can be fixed putting a lot of bones all around the eyelids.

As long as you don't add or remove faces, you can always go back and select the base shape key and make modifications to your mesh. The important part is that you select the base shape key before you enter edit mode.
But if you do major changes to your topology, then, as mentioned by cegaton in the comment, you'll have to redo your shape keys.


Set origin for lamp and camera objects According to my understanding, I should be able to set the origin of all object types using Ctrl+Shift+Alt+C, and then choosing Origin to Cursor. This works for mesh objects, but not camera or lamps. The origin point does not move for them, and they continue to rotate around themselves.

Is there a way to set the origin for cameras and lamps? I just want to rotate them around an external point.

You can parent them to an empty and rotate the empty.

As an alternative, as noted by @MrZak, is using a different pivot point for transformations.

In this example the pivot point is set to the 3D cursor:

While this might seem like the simpler solution, in the long run, it's not. The advantage of the empty, is that it's location is stored and easy to access. When you have it selected and are moving it around, it works just like it would if you moved the center point. The only difference, is that it's a separate object and displays that way.

The pivot settings are things that will be changed every once in a while, so while they're good for one transformation, they aren't good for a center point, because the 3D cursor will most likely be moved at some point in the modeling process. You'll have to switch to another pivot option also. Especially median point which is usually the easiest to work with.


What's the name of this tool of Blender? That tool/mode where you have a background image and you can start modeling things, create meshes and etc. using that image as reference?
Also: Can ANY image be used in this mode/tool?

I think there is no special mode for this. Once you have a background image added to the scene (Shift+A > Image > Background), create your first primitive in Object Mode, then switch to Edit Mode and start modifying and extruding your model based on the background image.


How to reduce render time? This single frame took about 2 Hours to render. I plan on making an animation with this scene, so something needs to be done about that. I have all lights (The two Lamps and a sun) set to one bounce. Yes, I am using volumetrics, however I have them set up so it should be minimal;

I'm suspecting its polygons, but I'm not entirely sure. If anyone could check out my file and see if theres a genuine problem with it or if its just some setting I have switched.

I'm rendering with a GTX 1060 6GB.

Heres the .BLEND. It's 500mb by the way (I dont know why it is)

Well for one you vastly overrepresented the geometry of simple objects. See for example your arm chair:

There is no need to have this many polygons. I don't even think you are using smooth shading and it looks smooth just because there are so many polygons. It looks like this with solid shading:

But guess what happens when I add a decimate modifier and set the reduction factor to 30%? It looks the same but has way less polygons. With the kind of displacement you're doing, you should really be using microdisplacements with texture maps, and normal mapping instead of insane polygon counts. For the chair you could get by with just normal mapping which is  computationally way cheaper than displacement mapping but gives similar results when the geometry is not dramatic or on the silhouette as seen from the camera.

Regarding render times, there are lots of optimizations you can do but unless you reduce the polygons the BVH tree will be huge which will make everything else slower. You probably don't need 2500 samples on an animation. If you are playing back at 30 frames/second you can accept a tiny bit more noise and you won't notice much because it only lasts for 1/30 a second and the noise on each frame is unique. First reduce the polycounts though, then worry about render optimizations. A relatively unoptimized scene of that complexity should take about 3-10 minutes to render on a GTX 10XX card with those noise levels you have now.


Bone Limit Rotation constraint not fully working So I'm using a Damped Track constraint and over that a Limit Rotation constraint as I only want the bone to rotate in X axis. This is the only setup I get it "working" but it has one tiny mistake, it rotates it a little bit to one of the sides, when it's not supposed to.

Even weirder is that if I take off the Limit Rotation constraint and I make it so the bone naturally only rotates on the axis I want then it looks fine (but I need the Limit constraint).

I would really appreciate any ideas, thanks!

Note: if I change the Convert option to anything else other than Local (or Local with Parent) then it goes all over the place.

--- EDIT ---

After doing Locked Track as constraint instead of Damped Track and Limit Rotation the rotation still happens, even when I'm not moving the tracked bone in X:

I found this video on YouTube. You can watch this video.
https://youtu.be/y6ECmeANUSw


Nodes not visible for material created in properties panel Materials created in material properties are not showing up in the node editor in blender 2.70.  Is there something I need to turn on?  I've looked in user preferences and I don't see anything obvious.

Here are some possible causes:

You're working in blender internal rather than cycles:
You're working with the compositing nodes:
Make sure that the selected option is the little ball, not the one that's selected in the image.
Your view is not in the right place. hit the . key on your number pad. if nothing happens, hit A then ..
Make sure use nodes is checked


Can't do accurate weight painting with Blender I learned with Maya, mastered it, I am a pro. With Blender I am less than zero, a complete incompetent. The most challenging for weight painting is the butt. Default weights make the butt look like a fold when sitting so it needs fixing so that the volume of the butt doesn't shrink when the legs are bent and you don't want the torso to indent either. My solution, I have to export just to weight paint so I can use a smoothing brush and also, so I can contour an inner thigh without the brush hitting anything else.

It takes finesse and the correct tools and accurate tools as well. Selecting only affected mesh points and using the smooth function and I still can't get results. I feel like I'm using a keyboard as piano keys sure you can make music but it feels clunky and lacking.

But I must be doing something wrong as I seem to be the only one who feel like a complete incompetent that I'm willing to pay just for better weight painting tools. Maybe a plugin I could buy? Hiring someone to make a script? Anything?

At least is there a tutorial that would show me how to master weight painting in Blender? I never found any tutorials that addressed the skill of weight painting with Blender. Sure there are tutorials on the basics but never showing advance skills.

The solution is Blender v2.78

Weight Paint bug fix for v2.78: Blur now smooths between connected weights

Previously it would average all the points under the brush and applying that value, giving an off a feedback loop that often depended on the direction of the brush stroke, giving a not-very-useful smearing effect. Now blend brush smooths between connected edges as it should.

Now there is a real smooth brush that was greatly needed. Now I can do all the weight painting in Blender, also I discovered Alt+B to make a square slice to isolate part of a shape to have an unobstructed view of where you need to edit.


View input vector values of Image Texture node? I'm troubleshooting a model in which I have an Image Texture node with a generated image 119,617 pixels in width. As the node accepts the pixel coordinates in normalized form only (from 0 to 1), I have to divide the pixel indices (0,1,2...119616) by their total number (119,617).

I'm getting unexpected results, in which the colors of the image texture are offset by a certain number of pixels (in some cases upward, in other cases downward), which led me to suspect this was a numerical error, maybe a rounding error due to limited precision of the Math node.

In other words, maybe the number of decimal places kept in the division result (e.g., of 1/119617) was too small to precisely capture the pixel positions (and therefore to correctly locate them in the image texture).

As answered here, this does not seem to be the problem (though not knowing the cause just yet I can't be 100% sure).

To better troubleshoot this issue, I'd like to look at the vector input values of the Image Texture node. These are the normalized pixel positions. I know that the Data-Blocks field of the Outliner panel has a lot of data, but the Input section for the Image Texture node doesn't show the vector values themselves.

Knowing that things that can't be done interactively in Blender often can be done with Python code, I'm wondering: is there a way to access those input vector values with some Python commands?

Many thanks in advance if you know the answer and care to share!

To view the vector values, you can plug what goes to the texture node to Emission shader and render those vectors as colors.

You can check only values stored in input fields from python, the nodes are not processed when querying these values. Value outputs will just give 0.0. The shader node tree gets executed when rendering.


Imported SVG shows circles instead of squares I have some wierd issue with a .svg Import, here's the vectorized image on Illustrator:

But when i import it on Blender, it looks like this:

It transforms squares into circles. And i have no clue why it does that.

I have the same issue with multiple image.

How can i fix this ?

So the problem was in Illustrator. The Image trace tool considered some rectangle as Circle. I had to convert all part how gave me Circle.

Full answered here: https://graphicdesign.stackexchange.com/a/118502/131137

Thanks to him (And you too !) !


Problem with an UV map (doubled mesh) and texture painting I sculpted this head myself, I did retopology of it and I marked seams to make a nice and readable UV map. Then I subdivided it, because I want to keep it detailed.

When I unwrap the mesh, I get a UV map with my mesh, but doubled. It could be harmless, but it gives me a lot of problems while trying to texture paint, since it looks like I need to paint on two layers of the same mesh (if that makes sense), if i don't, it will leave marks.

Here when I try to paint directly on my mesh. It's leaving the marks.

Here when I paint on the UV map. One eye layer is painted.

And here, when both eye layers are painted.

I've tried to Remove Doubles (Merge by Distance) and then unwrap again, it's still doubled but messier.

I'm new to 3D design so I will appreciate any help. Thanks!

You have double geometry overlapping. Deselect everything in edit mode and then select one copy of it by hitting L while hovering the mouse over it. Hit X to delete it. Redo UV unwrapping after that.
The mesh also looks way too dense for that amount of detail...


How can I unapply a subdivision surface modifier? I accidentally applied a subdivision surface modifier, but I don't want that. I tried to undo it, but that is not working. Is there any other way to do this?

You can discover the global history. If you can find the operat，then you can back to there by click.

following the link：
http://www.blender.org/manual/getting_started/basics/undo_and_redo.html?highlight=history


Linear curve to wave curve I would like to create a shape/curve similar to the white line on the picture below. From linear curve to wave curve.

How can I create this one?

Press Z to work in wireframe view

Enable Add mesh: extra objects with File -> User preferences -> Add-on

Generate linear to wave, with Add -> Mesh -> math function -> XYZmath surface and make sure you leave 'U wrap' blank:

Add a mirror modifier and enable the highlighted button:

Press Tab tp enter Edit mode and move the waves from each other:

Add a circle curve:

Then select the wave and add a curve modifier

Scale the circle curve:

Scale everythong with -1 along the x-axis and rotate to obtain:


Add new parametric curve object/type using Python I'm thinking of implementing an add-on (using Python) for Lagrange curves. In short (after an instance has been added), in Object Mode there should just be a curve (i.e. the parametric curve evaluated at a couple of parameter values subsequently connected by line segments) like a Bézier curve, whereas in Edit Mode there should be a control net as well (similar to the control net of a NURBS curve) that allows the user to change/modify the curve. In addition, it should be possible to assign a numerical value to each point/vertex and edge of the control net.

My approach would be to draw the curve using bgl (given a polynomial degree, the values assigned to the edges could act as parameter spans, thereby defining Lagrange basis functions — any position on the curve can then be computed as the sum of the control points multiplied by their associated basis functions). However, I'm not sure how to make the curve into an actual object (such that it can be selected, saved, ...). In addition, it should still be possible to change the resolution of the curve at a later time.

Next, how/where to store the control net and additional information? My approach would be to create a mesh for this purpose and store values in a bmesh layer. In Object Mode this mesh should be hidden. But how to link it to the curve (changing values re-defines the basis functions which should result in a different curve, likewise moving control points should change the curve)?

I realize this is a rather comprehensive question -- I'm fairly familiar with bmesh but apart from simple scripts I don't have much experience coding things in Blender. Any thoughts on a general workflow (see steps/outline above) or references to similar add-ons would be much appreciated!

There is an extra objects addon that provides a 3d function surface that should help with how to create the mesh.

For the showing the surface in the viewport I would look at CGCookies retopology tools. If you watch the demo video you will find they draw a preview over the mesh object before creating the final mesh data.

You might want to look at the PropertyGroup or Collection types as a way to add extra data to an object.

There is a chance you may be asking too much for python, maybe you need to consider it as a patch to be added to blenders main source code.


Problem with for loop in vertices I want to add an empty to each vertex of my model but sometimes it works and sometimes there's an error ("Requires selected vertices or active vertex group"). However this error appears after the loop is running the 10th time or so; So, this is completely confusing...

Where's the problem with my code?

import bpy

#CREATE GROUP FOR STICKY EMPTIES
bpy.ops.group.create(name="sticky_grp")

#ACTIVE OBJECT
actObj = bpy.context.active_object

#VERTICE ARRAY OF THE ACTIVE OBJECT
actVerts = actObj.data.vertices

#COUNT FOR NAMESPACES IN LOOP
cnt = 0

#FOR LOOP TO GET VERTICES AND SET "a" AS VERTEX VARIABLE
for a in actVerts:

    bpy.ops.object.mode_set(mode='OBJECT')                   #SWITCH TO OBJECT MODE
    a.select = True                                          #SELECT VERTEX
    bpy.ops.object.mode_set(mode='EDIT')                     #SWITCH TO EDIT MODE
    bpy.ops.object.hook_add_newob()                          #CREATE HOOK TO SELECTED   VERTEX
    bpy.context.selected_objects[0].name = "sticky_empty"    #RENAME EMPTY TO STICKY EMPTY
    bpy.ops.mesh.select_all(action='DESELECT')               #DESELECT VERTICES

    #SELECT STICKY EMPTY
    try:
        if cnt == 0:
            bpy.data.objects['sticky_empty'].select
            bpy.ops.group.objects_add_active(group = 'sticky_grp')

        elif 1 <= cnt < 10:
            bpy.data.objects['sticky_empty.00' + str(cnt)]
            bpy.ops.group.objects_add_active(group = 'sticky_grp')

        elif 10 <= cnt < 100:
            bpy.data.objects['sticky_empty.0' + str(cnt)]
            bpy.ops.group.objects_add_active(group = 'sticky_grp')

        else:
            bpy.data.objects['sticky_empty.' + str(cnt)]
            bpy.ops.group.objects_add_active(group = 'sticky_grp')
    except:
        print("SELECT STICKY EMPTY ERROR")

    #DELETE HOOK MODIFIER
    try:
        if cnt == 0:
            bpy.ops.object.modifier_remove(modifier="Hook-Empty")

        elif 1 <= cnt < 10:
            bpy.ops.object.modifier_remove(modifier="Hook-Empty.00" + str(cnt))

        elif 10 <= cnt < 100:
            bpy.ops.object.modifier_remove(modifier="Hook-Empty.0" + str(cnt))

        else:
            bpy.ops.object.modifier_remove(modifier="Hook-Empty." + str(cnt))
    except:
        print("DELETE HOOK MODIFIER ERROR")

    #ADD NAMESPACE + 1
    cnt = cnt + 1
    print(a)

You have to toggle out of edit mode after deselecting all vertices to solve your issue.

bpy.ops.object.mode_set(mode='OBJECT')          #SWITCH TO OBJECT MODE
a.select = True                                 #SELECT VERTEX
bpy.ops.object.mode_set(mode='EDIT')            #SWITCH TO EDIT MODE
bpy.ops.object.hook_add_newob()
bpy.ops.mesh.select_all(action='DESELECT')      #DESELECT VERTICES
bpy.ops.object.editmode_toggle()

For better understanding why you have to leave the edit mode this answer maybe helps.

Edit: In terms of better error handling I suggest you to write a bit more functional and split the code in useful pieces. The positive side effect would be that you have much more control, because you also can cache your states. I assume from the code above you want to have following functions:

create empties from all verticies of the selected object
add and assign hook modifiers for all empties to the selected object
create a group or add empties to a group

For e.g. this function creates the empties and returns a list of the new ones:

# -----------------------------------------------------------------------
# create empties from vertices
# -----------------------------------------------------------------------
# parameter: mesh object
# returns: list of new empty objects

def createEmptiesFromVerts (obj):

    # get object data
    objMesh = obj.data
    vertList = [vert for vert in objMesh.vertices]

    # create a list for the new empties
    emptyList = []

    for i in range(len(vertList)):

        # get local coordinate
        vertCoordinate = obj.data.vertices[i].co
        vertCoordinate = obj.matrix_world * vertCoordinate

        # add the empty
        bpy.ops.object.add(type='EMPTY', location=vertCoordinate)
        newEmpty = bpy.context.active_object
        newEmpty.location = vertCoordinate
        newEmpty.empty_draw_size = newEmpty.empty_draw_size # / 4
        bpy.ops.object.select_all(action='TOGGLE')
        bpy.ops.object.select_all(action='DESELECT')

        # append the new empty to the list
        emptyList.append(newEmpty)

    # set object to original state
    bpy.context.scene.objects.active = obj
    obj.select = True

    # return the new empties
    return emptyList

With this incoming list you can go on with the next function and assign the hook modifiers.

# -----------------------------------------------------------------------
# create hook modifiers
# -----------------------------------------------------------------------
# parameter: mesh object, hook object list
# returns: assigned hooks list, assigned modifier list

def hooksFromVerts (obj, hookObjs):

    # get object data
    objMesh = obj.data
    vertList = [vert for vert in objMesh.vertices]

    # create list to save all assigned hooks
    assignedHooks = []
    assignedModifiers = []

    for i in range(len(vertList)):

        bpy.ops.object.mode_set(mode="EDIT")
        bpy.ops.mesh.select_all(action="DESELECT")
        bpy.context.tool_settings.mesh_select_mode = (True , False , False)
        bpy.ops.object.mode_set(mode="OBJECT")

        # get local coordinate of vertex
        vertCoordinate = obj.data.vertices[i].co
        vertCoordinate = obj.matrix_world * vertCoordinate

        bpy.context.object.data.vertices[i].select = True
        bpy.ops.object.mode_set(mode="EDIT")

        # assign hook if coords of vert and hook object are equal
        for n in hookObjs:
            if vertCoordinate == n.location:
                #modifierName = "Hook" + str(i+1)
                modifierName = "Hook_" + n.name
                obj.modifiers.new(modifierName, type='HOOK')
                obj.modifiers[modifierName].object = n
                bpy.ops.object.hook_assign(modifier=modifierName)

                # append the hook objects to the list
                assignedHooks.append(n)

                # append modifiers
                assignedModifiers.append(modifierName)

    # set object to original state
    bpy.ops.mesh.select_all(action = 'DESELECT')
    bpy.ops.object.mode_set(mode ="OBJECT")

    # set object to original state
    bpy.context.scene.objects.active = obj
    obj.select = True

    # return assogned hooks objects and modifiers
    return assignedHooks, assignedModifiers

As last step you can create a function that creates a group if it not exists and throw your empties in it. To call this is much more easier and for us more readable at all:

# get the object
selectedObj = bpy.context.active_object

if selectedObj.type == 'MESH':

    # create empties
    generatedEmpties = createEmptiesFromVerts(selectedObj)

    # create hooks
    generatedHooks = hooksFromVerts(selectedObj, generatedEmpties)

    # remove modifiers
    #removeModifiersByNameList(selectedObj, generatedHooks[1])

    # create or add to group
    generatedGroup = addObjectsToGroup("testgroup", generatedHooks[0])

else:
    print ("please select a mesh object.")

Hope this helps!


White lines appearing when rendering shadows to separate layer and recombining in compositor I have trawled forums for ages looking for a possible answer to this.

I am trying to render shadows to a separate layer then recombining them in the compositor with the rest of the image. This is because I would like to have complete control over the shadow layer and ultimately apply a mask to it (to avoid any shadows extending past the render border creating a hard edge).

I have created a simplified setup to demonstrate the issue.

In this simplified setup I have 2 view layers, layer 1 containing a cube and layer two containing a shadow catching plane. You can see that the lines appear at the border between the shadows and the object. I have looked into issues of premultiplied alpha but none of this seem to sort it. They appear despite the condition of either Convert Premul checkboxes on the Alpha Over nodes.

I suspect that it may be to to with the Transparency filter in the Film section of the properties, however altering this leads to poor results.

Does anyone have a solution or some tips on what to investigate. This will ultimately be for an animation and so I'm keen to achieve everything in Blender rather than saving 2 sets of frames for the shadows and for the objects

For reference here is an image of just the first view layer with both the cube and shadow cater being rendered showing no lines

Any help or advise would be massively appreciated

I did a test scene like the one you did.  I thought it was due to the premult setting (usually that's the guilty party for compositing edges), but that's not the case here.
 Part of it is due to anti-aliasing and the pixel filter - not because of bad settings, but just the nature of it.

With the cube by itself, the edges of the alpha are going white to black, with some grey in the middle.  For the shadow catcher and holdout cube, the edges between the shadow's alpha are going white to grey to black, in the opposite direction.  This edge is on the same pixels for both layers, of course. When you do an alpha over, that edge results in some grey alpha values from both layers competing for the same pixels.  Therefore, some of your white background peeks through and shows up as white

The best solution is, simply, don't composite this.  If you can avoid compositing layers of the same CG scene, render the shadow and object together.  My guess is you want to do this for visual effects; I do that too and run into this situation often.  I usually render the shadow together with any CG object I'm putting in a video to get a clean edge.

If you must composite them together, you can do some masking and simply expand the shadow layer's alpha edge with a dilate/erode node.  That can get messy and give strange results, but it's possible.


How can I solve this .obj to .icn conversion problem? I'm trying to create .icn models for homebrew PS2 save icons. Is there a way to export .icn files directly? or How do I approach this problem?

I prepare the simplest model I could in blender v2.92
Then I create a UV map and use a 128x128 px .tga file as a texture
image
Then I export finished model as .obj
Blender puts out a .obj and a .mtl file but there's no extra
texture file(I also don't have the copy texture file checkbox which
was shown in some of the videos online.)
When I open the .obj file(that I exported) in Win 10 3D viewer, it
shows the model fine with the texture and everything.
But then I convert the .obj model to a .icn model using some
homebrew tool and when I try to create the actual icon.sys file with the model; it shows the wireframe and/or a badly(full of holes) textured model.

Although this homebrew tool works with some other .obj files, It doesn't seem to work with what blender puts out.
So is there a way to export .icn files directly with blender? or how do I approach this problem?

after trying everything for days I asked that question and to my chance I reached a solution from somewhere else.
so the solution was to create triangle's instead of quads for the faces and that's it. nothing else is needed.


Weird deformation with subdivision surface I'm new to Blender and I'm currently practicing by making a basic low poly character. I've encountered a weird glitch with when I apply subdivision surface to the model.

Used the boolean modifier to cut out some fingers for my model. However, when I activate the subdivision surface modifier, this happens.

How do I go about fixing this?

Take a look at the topology of your hand there. The entire part with the fingers is one big concave n-gon, not good.

The ngon is what is making the subdivision surface freak out.

To fix this you need to change the topology of the fingers so that each finger is a separate face (example below)

Sadly there is no easy to fix for that. I tried using the knife tool and cutting in some additional faces, but that just moves the problem ngon, not get rid of it.


Change the Coordinate System for Unity Export? How to change the axis Z and Y? Make it so that it was like in Unity or maybe this can be done in Unity?

Just model in blender the way it is intended. Before you export your model to unity you can adjust the export settings in the export dialog, there you can switch the axes around however you like.


Problem with UV mapping (single face dis formed) I, in my opinion would not label my self as an advanced person with blender, so there may be something I am not doing or missing. I was trying to make a model when I stumbled upon a problem with UV mapping. I originally was not surprised as I often mess up UV mapping in some shape or form but this time it was different, a solid face with no brakes was being dis formed and i had no clue why. It cant be the seams because its one face, and I set the scale to 1,1,1. I still have yet to fix this problem or what or why its happening. I would still consider my self new to blender and if anyone has a solution to my problem please inform me of any mistakes I have made. Thanks

Use a different operator with N-gons

N-gons are very handy, but they come at the cost of not having a precisely defined topology between the vertices. Blender is struggling to recognize the shape of the surface, the proportion of each branch, with the Unwrap operator due to the algorithm that's behind it.

I'll suggest to simply use another operator for this specific task, for example the Smart UV Project operator:


how to unwrap this simple window frame? I'm fairly new to 3d modelling and I've been working on my UV unwrapping lately, I've had problems with this object for a few days and was wondering if one of the pros / semi pros can help me out...
The object is a simple window frame.

The issue is with the inside part of the frame has warped UVs as you can tell from the photo below. Where else do I need to mark a seam to fix this?

The issue with your unwrap isn't the seam placement, it's that you didn't uncheck Fill Holes in the unwrap dialog.
This is probably way overkill, but here is the layout I came up with that uses the least amount of visible seams as possible:
Top:

Bottom:

The layout:


Is it possible to deselect a group while keeping the original selection selected? You can select a group of objects by selecting one object of that group and pressing ShiftG > Group

Is it possible to deselect a group, while keeping the rest of the original selection selected?
(e.g. box select a lot of objects, then deselect all of them that are in a certain group.)

Invert the selection with CtrlI
"Select" the group as you specify, with the Extend option enabled.
Reinvert the selection.

This works for many things, not just groups.


Alt-click is not selecting edge loops on a mac. I'm using right click but no joy.

It used to work but something has changed and I can't figure out what.

I found two ways to do this
You need to go to edit > preference under the Input. turn off emulate 3 button mouse.
or
You need to go to edit > preference under the Keymap search for Loop Select and change it from Ctrl + LMB  to Shift + LMB


Edit multiple parts of tower mesh simultaneously I am trying to edit the following mesh from a game:

I would like to know if it is possible to link the 30 buttresses and walls together so that if I edit one of them, I will edit the other 29 as well? I am aware of X mirroring but from what I have read, this only appears to allow editing of two parts of a mesh at once.

Alternatively, is it possible for me to delete all except one of the walls and buttresses then, once I've finished my editing to the two, copy-paste those vertices in a circle around the centre?

I am still learning Blender so if anyone who answers can give step-by-step instructions, I would greatly appreciate it. Thanks!

As the comments above indicate, the best way to do what I wanted is to create a circular array.

What I did was:

Delete everything except one buttress and wall.
In object mode, select the remaining buttress and wall then in the Modifiers panel, click "Add Modifier" > "Array"
Press Shift+C > "Cursor to Centre" then Shift+A > "Empty" > "Plain Axes".
Reselect the buttress and wall then in the Modifiers panel, tick the "Add Offset" box, then click the box below that and select the empty created in the previous step, then untick the "Relative Offset" box and finally, change "Count" to the number of duplicates needed.
Reselect the created Empty then, in the transform box, change the Rotations until the clones are positioned correctly.
Make the required edits to the mesh.
When finished, in the Modifiers panel, click on "Apply".

Edit: The above are the instructions for Blender v2.49, which I was using at the time. For v2.79, the instructions are slightly different:

Delete everything except one buttress and wall.
In object mode, select the remaining buttress and wall then in the Modifiers panel (wrench button in Properties pane), click "Add Modifier" > "Array"
Press Shift+C then Shift+A > "Empty" > "Plain Axes".
Reselect the buttress and wall then in the Modifiers panel, tick the "Object Offset" box, then click the dropbox below that and select the empty created in the previous step, then untick the "Relative Offset" box and finally, change "Count" to the number of duplicates needed.
Reselect the created Empty then, in the transform box, change the Rotations until the clones are positioned correctly.
Make the required edits to the mesh.
When finished, in the Modifiers panel, click on "Apply".


Bad Normals with Text Geometry I am trying to make a Text mesh, but the normals aren't coming out right no matter how I recalculate them.
Here is an image of my issue after converting to a mesh (and before):

It just isn't smooth. I tried auto-smooth, i tried recalculating normal's, i tried smooth shading, i even tried remesh + decimation. It looks the same or worse. Adding more segments to the bevel makes it look better but doesn't fix the underlying issue. Anyway to interpolate the normal's of the vertices the way I want?
Thanks

Splize's answer worked. Simply merge vertices of the extruded text geometry since the caps are separate from the extruded geometry. Smooth as butter and with 0 bevel segments!


How to get radius of a spline in animation nodes? Similar to Is there a way to address the shrink / fatten / radius values of individual vertices on a curve with animation nodes?

I've got one main spline that acts as a driver. This spline will have many child splines that are copies of it, but the children should be offset based on the parent's size. Higher radius -> bigger offset.

The problem is, I can't find any way to access the parent's radius at a given point. Get Spline Samples and Evaluate don't have this information.

The Spline Info node can access radii, but it returns one radius for each point in the spline, and ideally the children will have much higher resolution than their parent. Is there any way to interpolate between values like the Sound Falloff node does for spectrum data? Is my best option to make second "helper" splines to store the data?

In the new beta v2.1, which you can download from the release page, the Evaluate Spline Node returns the radii of the samples:


How to extend an Operator I tried to extend my own Operator but it doesn't work.

What am I doing wrong?

If I add this operator I get "Test"

class OperatorX(bpy.types.Operator):
bl_idname = "test.x"
bl_label = "Test X"

strprop = bpy.props.StringProperty(default = "Test")

def execute(self, context):
    print(self.strprop)
    return {'FINISHED'}

Then I add the next operator extends the first.

class OperatorY(OperatorX):
bl_idname = "test.y"
bl_label = "Test Y"

def execute(self, context):
    print(self.strprop)
    return {'FINISHED'}

If I call OperatorX I get:

bpy_class_call: unable to get python class for rna struct 'TEST_OT_x'

And if I call OperatorY I get:

(<built-in function StringProperty>, {'attr': 'strprop', 'default': 'Test'})

I need a few operators with the same properties but different execution.
How to solve it?

Florian

@batFINGER: Thank you! It works.

I've done it like this now:

import bpy

class Base:
    strprop = bpy.props.StringProperty(default = "Test")

class MyOperator(bpy.types.Operator, Base):
    bl_idname = "object.my_operator"
    bl_label = "My Operator"

    def execute(self, context):
        print(self.strprop)
        return {'FINISHED'}

bpy.utils.register_class(MyOperator)


How to snap Origin to selection instead of closest element? I've been trying to get Blender's pivot to work more like Maya's with snapping. What I'd like to do is snap the pivot point of my selected object to a vertex of a target as shown below:

However, when I turn on vertex snapping this is the result I get, which looks to me like it's snapping the closest edges to the selection:

However, the result I'd like to get would be this one (this is eyeballed but I'd like to be able to do this with snapping to get precise results):

To snap the Origin Point (orange dot) choose to snap with Median
It's in the Snapping Menu, second from right.


uv unwrapping difficulties with a table leg i have tried various unwrapping methods to no avail. this is quite an unusual shape so i understand blender has a hard time trying to follow the topology. i have added seams to the top and bottom of the legs as well as the side but when unwrapped one part seems significantly stretched. smart uv project makes the texture look patchy also. what is the best way of unwrapping this with the least distortion possible?

I think Mark Seam and Unwrap works pretty good, perhaps share your file + texture of this single object so that we can test


How to rotate bone group 90 degrees for all frames? Let me preface my question by saying I'm a very newbie user. I have a weapon model and the arms need to be rotated 90 degrees for every frame for the whole animation (and i've got a few more weapon models that need this to be done, but unfortunately it's a very lengthy process.) Is there anyway I can change the Rotation of a bone group for all frames of an animation?

Here's a picture of what I want to do, if it helps:

The armature should not have really have keyframes on its object at all: just its bones. Then the rotation for the object could be easily applied with Ctrl-A > Apply Rotation.

If the above is absolutely impossible, you could try something like this, but I will warn you it'll get messy fast! This will iterate over every frame and apply the rotation, then add a keyframe.

import bpy

scene = bpy.context.scene

for frame in range(scene.frame_start, scene.frame_end + 1):
    scene.frame_set(frame)
    bpy.ops.object.transform_apply(location=False, rotation=True, scale=False)
    bpy.ops.anim.keyframe_insert_menu(type='Rotation')

You could also, like I said before, do something like this (if you're fine with the rotations getting screwed for the time being):


Toon Shader appear to be have gray colour coming out, for the shadow When I tried to make toon shading, with diffuse bsdf, shader to RGB, color ramp, and material outputs nodes, it appears to be fine if there is no object covering it with shadow(with only light emit and create the shadow)

(the light is near the floor)
but when there is something blocking the object and create a shadow depend on where the light, it will appear with some gradient

(the light is behind something, causing the floor to have gradient)

(my render properties)
all object have the same nodes, only diffuse, shader, color ramp, and material output.

Go into the Render Properties tab, and under Shadow, turn off (un-check) "Soft Shadows". Also, consider enabling high-bitdepth, and if the shadows have jagged edges, you can get rid of them by increasing the shadow-map Cube Size.


Sculpting smooth model with jaggered vertex I've applied Shade smooth to my model and I am sculpting it to make some kind of head (I'm new to Blender!)

For some reason everywhere is smooth except for here, any suggestions?

Sorry for th vague info, if you need to know more please ask, and I'll try my best to give you more info.

I'm by no means an expert but when sculpting this can occur quite frequently, ideally you use dynamesh and smooth it to prevent the pinches from forming in the first place but if it can't be helped you could select the area from edit mode wireframe (mind the backside of the model), weld all the verts so it's a flat surface, dynamesh and continue. There are probably better solutions, but this is how I've figured to solve it.


Can I "fill" an empty object? I have this weird object (vascular tree) which is empty inside, but closed from the top and the bottom:

However, it is empty inside, which makes me unable to use boolean on a bigger object (I want to make a hole in an object through which this object will go through). So I thought I should fill it and then try to boolean.
But, how do I fill it?

Thank you sincerely.

All mesh, or 3D modeled virtual objects for that matter, are "hollow" or "empty inside" by definition, there is no such thing as mass, dense volume or matter inside them, with the possible exception of actual volumetric data like voxels or point clouds.

Concepts

Boolean operations on meshes are always performed as mathematical operations over the surfaces to simulate the existence of a dense "filled" object, by combining the surfaces of the intervening objects through cutting, intersecting and or subtracting operations. These operations happen only on the "shell" or faces of the mesh surface, to give the impression of having dense interior, when in reality there is none.

For that reason mostly only coherent, closed, "watertight" manifold meshes are successfully usable in fruitful Boolean operations outside of CAD applications, that use either ACIS Solid Modeling, NURBS based surfaces, or other geometry representation models more suited for these types of operations (and even these are all hollow as well, despite the application best efforts make you believe otherwise).

Open or inconsistent meshes (non-manifold) often give problems, errors, bad results, or fail completely.

Diagnosis

That being said, in your case if you can't preform a Boolean operation on your object it is most likely because your mesh is either too complex to process or has geometry issues.

Boolean operations on meshes are limited at best. If there are errors in your objects like discontinuities, wholes, inconsistent normals, overlapping geometry, or any other geometry problems that make your mesh non-manifold or non watertight they will fail to various degrees.

There are also complexity limits that can be handled. If you are reaching Blender, the algorithms, hardware, or available resources limits, you should break down your objects into more manageable chunks.

Possible solutions

There are many common issues with Booleans and very well known solutions to deal with them that have been thoroughly covered before. What you need to do is clean it your meshes and make sure these errors and discontinuities are gone.
Stuff you can try:

Removing doubles - Edit Mode > W > Remove Doubles (Alt + M > By Distance for 2.8+), to merge all open or overlapping geometry
Recalculate normals - In Edit Mode Ctrl + N (Alt + N for 2.8+)to make sure all surfaces are facing the same direction consistently.
Check for holes - In Edit Mode press Space Bar and search for Select non Manifold. That should highlight any remaining wholes, or problems with your mesh which you must then solve by hand, like overlapping faces, inconsistent normals, missing geometry, etc.
Ensure there are no coinciding or coplanar surfaces between the two operands -  These usually confuse the algorithm making it unable to distinguish in from out.
Eliminate any intersecting edges - If edges intersect between two operands (common with symmetric objects, geometric or orthogonal shapes, hard surface modeling, among others) operations will likely fail, this is a known limitation of current Boolean algorithm. Nudge them around very small distances, rotate them micrometrically to break perfect alignments.
Search for self intersections which are common in data obtained from scanned data like 3D Scans, photogrammetry, or other real world captured data. Solving this will be mostly a manual process as there are no current built in tools to handle them automatically, but you can turn on Mesh Analysis from the Overlays popover to get a good indication of problematic areas.

After that your Boolean operation stands a better chance to produce good results, if your mesh is not too overly complex to successfully be processed. If that is the case the you should break it apart into smaller objects making sure that each and every one of them involved in Boolean operations is a watertight "closed" manifold mesh.