How to change direction of view by Python? I have an idea.
For example, I have three 3D View areas. And when I change view in the biggest one, in another 2 views direction must change too.
For example #2, if I press 1 when the biggest window is active, then in 2 other 3D View windows view direction must change to Top and Right. And if I press 3 in biggest window,  directions of view in other windows must change to Top and Front.
Now I just have access to all areas by using this code

    bpy.context.window_manager.windows[0].screen.areas

I hope you understand me, sorry for bad english.

Register a new operator that changes the views to your liking and bind it to a hotkey.

You can calculate the size of an area by multiplying width * height if that marries up with your idea of area size:

import bpy

class VIEW3D_OT_viewmulti(bpy.types.Operator):
    """Adjust 3D Views based on size (required 3)"""
    bl_idname = "view3d.viewmulti"
    bl_label = "Change multiple views"
    bl_options = {'REGISTER', 'UNDO'}

    def execute(self, context):

        areas = sorted((area for area in context.screen.areas if area.type == 'VIEW_3D'), key=lambda a: a.width * a.height, reverse=True)

        if len(areas) < 3:
            self.report({'ERROR'}, "Not enough 3D Views (< 3)")
            return {'CANCELLED'}

        ctx = context.copy()
        ctx['area'] = areas[0]
        ctx['region'] = areas[0].regions[-1]
        bpy.ops.view3d.viewnumpad(ctx, 'INVOKE_DEFAULT', type='FRONT')

        ctx['area'] = areas[1]
        ctx['region'] = areas[1].regions[-1]
        bpy.ops.view3d.viewnumpad(ctx, 'INVOKE_DEFAULT', type='TOP')

        ctx['area'] = areas[2]
        ctx['region'] = areas[2].regions[-1]
        bpy.ops.view3d.viewnumpad(ctx, 'INVOKE_DEFAULT', type='RIGHT')

        return {'FINISHED'}

# store keymaps here to access after registration
addon_keymaps = []

def register():

    bpy.utils.register_module(__name__)

    # handle the keymap
    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name='3D View Generic', space_type='VIEW_3D')

    kmi = km.keymap_items.new(VIEW3D_OT_viewmulti.bl_idname, 'SPACE', 'PRESS', ctrl=True, shift=True)

    addon_keymaps.append((km, kmi))

def unregister():

    bpy.utils.unregister_module(__name__)

    # handle the keymap
    for km, kmi in addon_keymaps:
        km.keymap_items.remove(kmi)
    addon_keymaps.clear()

if __name__ == '__main__':
    register()

Hotkey in above example code is CtrlShiftSpace.


My properties panel is horizontal, how do I turn it back to vertical? I'm not entirely sure what happened, maybe a hit the wrong key. ut my properties bar is horizontal, it's playing hell with my ability to select anything that takes up a lot of vertical room (like modifiers).

How would I go about correcting this?

Rightclick in the panel, and pick Vertical


Particle Instance Modifier ignoring Length (2.79 & 2.8)

When using Dupli Object option in a hair particle system, the Vertex Groups -> Length influences the object's size correctly.

When I use the same particle system by Particle Instance Modifier, the Vertex Groups -> Length is ignored (only Density parameter works).

Is this a desired behavior or a bug? But most importantly, does anyone know how to get Particle Instance Modifier working with Length parameter?

I need this to vertex paint the size of my vegetation (populated by a particle system) where I avoid using Dupli-Objects because of many reasons (poor performance, converting to a single mesh issues, need of pre-rotating the models etc.).

This is an intended behavior. The length property only influences the particles from the particle instance modifier if you use the Create Along Paths option, but that doesn't scale them like you want.

They key here is to use the Size parameter. The issue with this is that it only exists for emitter type particles, and not hair. So you cannot control the size of particles if you are using the hair option (as far as I am aware).

Switching to emitter will allow you to control the size of each particle. This is not done with vertex groups, but with textures. Why that is I'm not sure. If you scroll down to the bottom of the particle settings there is a texture panel, where you can create a new texture. Go to the texture tab and create a texture that will define the size. Blend works well for the gradient on your example. There may be ways to convert vertex group values to textures, but I'm not sure about that.

Once you've got the texture created, under the Influence heading in the texture panel there is a Size option. Check that and you should be good to go.


Blender Object Visibility Controls at version 2.80+ At Blender versions prior to 2.80, it was simple to toggle and keyframe the visibility - either in the viewport or the render by manipulating the buttons in the Outliner.

Those buttons aren't present in Blender 2.80 - how do I control the visibility as before?

The visibility options are still available in the Overview window and operate as before, but are hidden by default. They can be re-enabled via the 'Filter' drop-down which provides various toggle buttons for the various additional controls :


The parts of this model are not showing in game engine nor do they have shading I'm new to the Blender game engine and I don't know what to do with this model glitch. Certain parts of the model aren't showing and there is no shading. How do I fix this?

For the shading problem: the viewport is currently in shaded mode

If the textures still aren't showing, bear in mind that only image textures are supported.

For parts of the model not showing, it is likely that the normals are inverted or that you are using single planes. In computer graphics, most faces have only one side, and if you look from the other side they will be transparent. To fix this you can:
 - Flip the normal to face the correct way (edit mode -> select face -> ctrl+N)
 - Disable backface culling

Viewing the normals using one of the following options is reccomended:

As should be evident, the selected faces have their normals flipped and are thus not visible from where the camera is.


Problem with exporting FBX file with multiple materials and UV Maps I'm trying to export FBX file to Substance Painter with multiple materials and multiple UVs merged together (merged under one name) I have vertex groups for them and materials.

When I'm trying to export selection only this Error pops up : https://imgur.com/a/8YAAB

Heres link to blend file: https://mab.to/aXVEW8bPC

Thanks in advance for any anwsers

I was trying to export FBX and said error was poping up. It was 3 objects with 3 different UV maps on one MAP ( i think its called UV Atlas). 3 materials all assigned even had vertex group for each one. After multiple trys i separated all of the objects and started exporting them one by one. It appears UV map on one of them wouldnt let the whole model to export. I tried with materials as i heard that un assigned materials can prevent you from exporting... i tried saving to obj and than back to fbx still nothing. I made new seams (cause i found in error info multiple UVIndex mentions) and unwrapped it once more and it exported. Simply as that.


How to access and edit Mapping Node via python? I need to access Mapping Node via python to edit Location\Rotation\Scale

mat = bpy.data.materials['MaterialName']
mat_nodes = mat.node_tree.nodes
map = mat_nodes['Mapping']

map.inputs[0]
print(map.inputs[0])
**<bpy_struct, NodeSocketVector("Vector")>**

But there are no other inputs, and I have noidea what [0] input does

PS I know that my node named Cracks_Mapping

Found an answer here :
Access Mapping node with python

bpy.data.materials['Material'].node_tree.nodes['Cracks_Mapping'].rotation[2] = some value

That's how you do it. input[0] is the only input of the node, the Vector. The 0 is the index. For example rotation has 3 index, 0, 1, and 2 for X, Y, and Z. Knowing that, if you assign a value to .rotation[2] like in my code example you'll modify Z rotation value of the mapping node. It's pretty straightforward really.


How to render Smoke/Fire in RENDERMAN I am trying out RenderMan 21 but can figure out how to render smoke and fire.

I am assuming I use "PxrVolume" but it puts volume for the whole domain object not the emitter smoke object. I tried attribute nodes (used in cycles) but that doesnt seem to be working for me.

Anyone have any ideas?

I read over the instructions and I can only find stuff for Maya not Blender.

Ok I figured out how to render smoke OR fire. (But not both)

You have to type "density" or "flame" in the "Density Float PrimVar".

However this leads me to other questions. (Like how to change the density, and have the flame and smoke render together).


white outline around PNG I have been stuck with this problem for a while now and cant move on.Im making sticker by applying PNG on object.Everything work just fine only the image have white outlines which i cant get rid off.Pls,any help would be much appreciate.

I already figured it out.Changed the PNG options in shader editor from LINEAR to SMART.Outlines are gone –


Displace perpendicular to normals? The Displace modifier has the option to displace based on the face's normal, so upwards/downwards relative to the face, same as Z translate based on normal. Is there any way to get it to do an X or Y translate in relation to the normal?

This a type of what is typically referred to as vector displacement, where the displacement map provides RGB values which are used to get displacement along different axes. This displacement can occur along different orientations (or coordinate spaces) of the axes.

Currently, to my knowledge blender only supports local object space (The 'RGB to XYZ' option in the displace modifer, see https://www.blender.org/manual/modeling/modifiers/deform/displace.html). To displace along vectors perpendicular to the normal the displacement would need to be applied in the vertex tangent space. If you are familiar with normal mapping this is very similar to the difference between object space and tangent space normal maps.

Local object space displacement will work fine so long as your mesh does not dynamically deform (e.g. armature modified, cloth sim etc).


Automatically show the texture of selected node (or selected material) Is there any way to automatically show the texture of selected node (or selected material) in the UV/image editor? When I use a lot of textures in a project, then a manual search of the appropriate texture is annoying.

solution: select required material, eventually required texture node in node editor, after that switch to "Texture paint" mode, relavant texture will be displayed in UV/image editor automatically


Why does rendering to one slot remove renders from other slots? In Cycles render I used to render multiple images to multiple slots to compare results.
But now rendering to one slot clears the other slots.

Is there a setting I need to fix this?  So I can render to all the different slots and the images stay there?

Needed to click the blank button to right of Slot 1.
Then select the render.
It was there, just hiding.


How does the GPL apply to code in Blender files? (e.g. Drivers) It's known that any Python script running inside Blender must be GPLv2+ compatible ***, See the GPL FAQ, but what about driver expressions? Does this mean all my Blend files have to be GPL as well?

What are the implications for having Python code inside a .blend file?

*** if it is to be redistributed

Short answer: Yes, the GPL applies to drivers too.

Just as the GPL applies to addons, it applies to drivers (any scripts running inside of Blender). However this doesn't automatically everything you do in that blend file is suddenly GPL.

Consider:

In many cases drivers on their own don't constitute an original work, Obviously you can't copyright 1 + 1, rot / pi or other simple expressions.Exactly what is original enough to be copyrighted isn't totally clear and depends on local laws.
In the case where the client/customer has the blend file, they can see the driver expressions anyway, and use them, however drivers are rarely useful on their own, typically they are only valuable because of their use within a rig and data they reference (the rig, objects etc).
In many cases, the deliverable content from a project isn't a blend file, The finished work may be image / video / exported-model, therefor there is no need to distribute the blend file, a driver can be treated as in house software.

So the main case this prohibits are:

If you made a rig and wanted to charge licensing fee's for using the drivers.While this remains possible, you would have to use a GPL compatible license for the drivers.
If you give a blend file to someone, you could not prohibit them from reusing or sharing a driver-expression in that blend file.

In practice, the drivers in a blend file are plain-text anyway, and not all that useful on their own.

But might mixing the scripts with the .blend file data, also make the blend file GPL?

It's worth looking into this more, however Wordpress lets images in a theme be exempt from the GPL. (Where the theme may contain code & data, this is a precedent where the data is exempt while the code isn't).
http://wordpress.org/news/2009/07/themes-are-gpl-too/

Obligatory - I am not a lawyer disclaimer, however this is how the GPL applies as I understand it @ideasman42


Can't join objects with different materials I'm trying to join multiple objects with different materials(Ctrl+J). When I join them they disappear in render view.
I was trying to assign materials to different mashes, but it doesn't work!
I just don't know what to do

This is my blender file:
https://drive.google.com/open?id=1w6xj5XGGIMKtyS8n-4XUSqpCFBkTOaAx

There is flower model and 4 materials: green for flower stem, flower leafs and flowers

I joined flower stem,leafs and flowers but it shows only flower stem in render view.

edit: sorry, I forget to pack textures into .blend file

So...
When you want to join multiple objects, be sure that they have UV maps with identical names.
It was not obvious for me.


Camera option won't work? I'm trying to render a Roblox character but the camera won't work. I've tried pressing just 0 which made my whole character disappear, I also tried doing ctrl+0 but it said "Modifiers cannot be added to object camera 001". It seems like I'm the only one with this problem.. Can anyone help? :(

Maybe a classic missing-numblock problem because your on a laptop or mac?
if so: User Preferences->Input->Emulate Numpad


How to align pivot to the center of a hole I've got a button model, that is supposed to be rotate around the pivot point in the center,

But how to set the pivot point to the exact center is a problem, the center should be further into the hollow area
I know this model is simple and if you create it from a cylinder the pivot is what I want, but I want to know if say I got model from other people and the pivot is not in the center, how can I align it to the center,thanks.

In Edit mode, '2' for edge select then ALT-click on the top edge round the inside of the hole and SHIFT-S > Cursor to Selected.
If you want it half way down the hole, go to Face mode, ALT-Click one of the edges inside the hole to select the ring of inner faces then SHIFT-S > Cursor to Selected again.


Way for my texture to emit light/glow on the Eevee engine So, im working right now on a scene which ends with this red Ruby, im tryning to find a way for it to glow but keeping all its details, already went with the alpha map trick but doesnt get the finish version i want, its there a step im missing or there's another form??

In Eevee you have a very fast bloom function:

However that makes everything pixel bloom as long as it's brighter than the threshold. If you want to make single objects bloom you need to mask them some way and then use the mask for a glow effect in the compositor (post render). One way is to use object pass index.


How to make the sculpt detail size always look the same? I've been sculpting using the dynamic topology. Set the detail size in the Dynotopo panel. When I zoom out of the object and sculpt, the detail size is appearing bigger. Is there a way to make the detail size look the same no matter how far the view from the object is?

You have to switch to Constant Detail in the Dynotopo panel.


How do I align my grid to background footage? I have a background-image set up and now I want to align my grid to it?

How do I do it. I remember watching a video where I could simply rotate it like an object?

In my opinion is  easier to match the perspective of an image using BLAM or Fspy read the bottom of the answer.

But if you want to do this manually, set your view to camera view (Numpad 0) and enable view->Lock Camera to View. That will allow you to move the view to position it to a point where it closely matches the background image. Note that once you exit camera view or change to perspective view, your background image will no longer be displayed and or relevant. It will require some trial and error but it is possible, the trickiest part is going to be matching the camera lens...
Once you find the correct camera placement disable the lock camera to view option to prevent moving the camera. You might even want to lock all setting for your camera at that point.

Update for 2.8
With the camera selected, find the camera settings in the Properties window.
Enable Camera background.
Select the image.

The image will now show when using camera view.

NOTE: Blam is no longer mantained and has been replaced by Fspy: https://fspy.io/, but there is no importer for blender 2.79 or previous versions.
For a detailed post on how to use blam and Fspy read: How can I recreate geometry using a photograph?


Image to plane not working for me This feature was working then i tried rendering it and planes were blank. I tried adding another different image as plane and it doesn't show at all just a black plane. The video i am trying to add is in documents>blender projects>folder>videos, no idea whats happening or what I've done.

First change image source from Movie to Single Image or Image Sequence.

In Texture viewport shading mode, image texture for displaying must be active at Node Editor.

Just click on it and it should be appeared.


Imported Objects and UV Maps ok so here is what im trying to do, making a building with static props. while i was creating the props such as supports and so on, i started thinking about the uv map and about the major pain it was going to be managing the buildings geometry and the static props. A thought i had was that i could create the props outside of the current building file and import them in, but my question is, will they come into the file with their own UV map(where i can maintain the uv map only inside that file) and textured or will the model that is imported come into file expecting to be placed on the same uv map as the building.

Also to note, no i know that i could create the props outside and implement them into the building but what im trying to do is make a single object that all it needs to do is be placed and have all the props associated with it already placed

When you import an object from another .blend file with Link or Append from the File menu, it comes with all linked datablocks, so UV maps, materials, textures, and various others will be also imported.

When you import from a different file format with File > Import, what you get depends on what the format stores. For example, "Wavefront (.obj)" can contain mesh, UV map, and texture, but not armature. When you import an SVG file, you will get several curve objects.

For an example of using multiple .blend files in a project, look at the files from Big Buck Bunny.


Incorrect Smooth object On flat shading it looks good, but on smooth displays incorrectly.
With subdivision surface, it looks terrible!!
How to fix it. There is my blender file: https://ufile.io/5qja2

To understand whats wrong you first need to understand what subdivider does.

Subdivider simply takes 3 vertices, and outputs the average of these 3 points, which in your case these are the points because your magazine lacks horizontal vertices
https://gyazo.com/a39bbb69b08b39541eac0cda3077ec60

you need to have vertical vertices along your magazine and other places where it deforms, something like this:
https://gyazo.com/4f41ac0fd74ee7850644daf9e7b975ed

and then add edge loops to sharpen corners.


How can I delete the bevel object once a curve is created? I really like the curve feature. I think it has a lot of potential for creating curved objects for someone like myself who has a lot of difficulty creating a curve out of other meshes.

However, I really hate how curves pretty much need a bevel object, and that this bevel object CANNOT (to my knowledge) be deleted after the curved mesh is created.

Is there any way to create a curve, make a bend, have it be beveled, and not need a bevel object/be able to delete the bevel object afterwards?

That will depend on the shape you want the bevel to be and whether you want to keep editing the curve. For odd shapes you will need to keep the bevel object as it defines the shape. You can hide the bevel object or move it to another layer to keep it out of the way. If you don't need to edit the tubing then you can setup your bevel and then convert it to a mesh with ⎇ AltC and delete the curve objects.

For simple bevel shapes you don't need to use a bevel object. A square tube can be created by adding a bevel depth and leaving the resolution at 0.

By increasing the resolution to 1 or 2 you get a hexagonal or octagonal shaped tubing, higher values give a rounded cylindrical tube.

If you want sharper edges you can add an edge split modifier.


What are the node plugs called? To help me communicate better what is the correct name for node attachment points?

Sockets

In the Blender manual's page about Node parts it is said that Sockets is the name for the ...

  ...input and output values from the node.

  They appear as little colored circles on either side of the node. [...].

  Each socket is color-coded depending on what type of data it handles.


Rotate multiple objects randomly at 90 degree intervals Blender 2.8

I'm creating a wall tile pattern made of large square tiles.

Like this:

Is there a way to rotate multiple objects randomly at 90 degree intervals?

I'm familiar with "Randomize Transform" in the F3 menu, but it rotates at any angle between.

I'm only interested in random 90, 180, or 270 degree rotations.

Cheers.

Well, I gave it a shot, but all I could manage was to rotate entire selection by whatever angle (value) is used. I am not iterating over individual meshes. If somebody can tweak this, I'm sure it would work:

import bpy
import random
from datetime import datetime
import math
import mathutils

for obj in bpy.context.selected_objects:
    random.seed(datetime.now())
    randnum = math.radians(90 * random.randint(0,3))
    bpy.ops.transform.rotate(value=randnum, orient_axis='Z', orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, False, True), mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False)

Change 90 to 45 and you will see what I mean. Scripts are accessible in 2.8 from the Scripting tab.

EDIT:  Actually , selecting each panel one at a time, hovering the cursor over the script panel, and pressing "ALT"+"P" (which runs the script on the selected tile) takes less than a second. Doing this with each of these hundred panels took less than 100 seconds. The result looks like what you want and the time is reasonable if you want to tile a hundred or fewer panels on a wall:

Note: You will see if you open the .blend file, but each of these tiles is a copy of a scaled down cube with two vertices moved down slightly. This ensures the back of the tiles are flush with the wall. You can move them down further (or the other two up) if you want a more dramatic slope. But you will need to delete the other 99 and generate, then apply the arrays again. That will only take a few seconds though.


Animating appearing/extending strip with gaps As i am new to blender i decided to learn by recreating some animations which have some interesting problems, and gain more knowledge about how tv intros are being done, collecting some parody intros to videos. I came across a simple yet troublesome effect , found no answer by googling or getting through tutorials and testing methods on this case led me to nowhere.

https://youtu.be/amyFUdwQc6Y

I attempted to recreate the animation above, especially  the extending/appearing/drawn white strip with "randomly" placed gaps , strip which travels just above surface , casting shadow.

Tried dynamic paint,( with alpha channel) image sequence texture but although effect was very similar, whole invisible strip was casting shadow being Z transparent, in places where white color haven't reached yet.

I tried bezier curves as well(vector mode) but it appears that taper cant profile part in squary way, or maybe i am missing something here.

Shape keys seem to hard way to go , while keeping whole animation of stripe "unrolling" at constant speed.

I tried as well putting an array of planes on the path but it is completely not what i attempt to achieved.

I will edit post and add some pictures tomorrow.

There are a few methods that you could use to achieve this, some simpler, some more flexible. The one that follows can give you results similar to what's shown in the video.

First create a curve object that roughly follows your desired path, bevel its corners so you get less distortion on tight curves. In this example I use the great Curve Fillet Tool addon from the Blender CG Cookie Market (it's a paid extension, but worth the price IMHO), you can also use the Simple Curves Addon or just do it manually if you prefer.

Now add a plane object, scale it lengthwise so it's narrowest side is placed along the curve length for better precision. Also scale the other direction to match the desired line thickness. Make sure you apply the scale before proceeding.

Add an Array modifier to you plane, and set it to Fit Curve and pick the previously created curve. Tick the Option Merge to join the arrayed planes.

Now add a Curve Modifier on top of it, set it to the same curve and it should distort it along the curve length. Make both the plane and the curve coincide at the same scene coordinate to avoid unwanted distortions.

Now the magic all comes from a Build Modifier, which will make the strip like effect progressively grow along the curve as desired. (Scrub the timeline to see the effect)

If you want more control, optionally apply the Array and Curve Modifier Modifiers only (leaving the Build Modifier live) if you later wish to manually adjust the shape of the strip, like different materials along the path, varying width, colors or add gaps, otherwise leave all modifiers live for a more flexible non destructive workflow.


Creating an entire planet I would like to model a fantasy world that I made and I am wondering about the technical limits. The planet is about 3 times bigger than earth and has four continents, each the size of half the USA. I am not talking about making a sphere and texturing it, I mean like Google 3D where you can zoom all the way into a single house except more detailed. Would there be any technical problems? Would the program lag from having that many vertices? Should I just model each continent separately or even each region within the continent separately?

Is this for an animation or game?

For an animation you can use compositing to transition between several different versions of your model, each with different scales of detail.

For a game you'll probably need to fetch higher resolution blocks of game data as needed, similarly to how Google Earth fetches higher res textures as you zoom in.

Either way it probably won't be easy, but the result could be impressive if executed well.


Is there a way to see the script inside of any of the pre-made Blender modules? This is for my own self education and understanding. I tried to open some blend files in a text editor just to see what's in there, and it was mostly unreadable. How can I see the individual modules, and where they are located or run from?

@Ray When you add a sensor and an actuator and connect them and make something happen, like move a cube. How can I look "under the hood" and see the script that makes that go?

The majority of the game engine is not Python. It is written in C, and as a result it is compiled into the engine and cannot be viewed as 'python.'

I'm guessing you're looking at the Geodesic Chess blends, in which case nearly all of the scripts are in the Scripts folder rather than inside the blend. The non-script modules include:

bge (built into Blender Game Engine)
mathutils (built into Blender and Blender Game Engine)
os (built into python, for accessing files)
json (built into python, converts python dictionaries into nicely formatted text files)

Documentation for them can be found by clicking on the links above. You may also want to look at Reading the BGE API.

As for the unreadability of blend files, this is because it is stored as binary data, which cannot be read as text (well it can, but as you have discovered, it is meaningless).


How can I replace all selected object's mesh? With a linked duplicate object I can edit the mesh and have the change show up on all the duplicates. Can I completely replace the mesh of every duplicate instead, and in an easy and repeatable manner?

To be specific, I would like to create a chain out of a duplicated chain link, and I want to manually create each LOD mesh of said chain link. I would then like to replace the chain link mesh of all duplicates to make different LODs of the composite chain.

Note that the array modifier is not flexible enough for my purposes.

You can change the mesh assigned to an object in the data tab:

In order to change more objects you could use python:
import bpy

# the name of the mesh to copy to all selected objects
mesh = bpy.data.meshes["Cube"]

for o in bpy.data.objects:
    if o.select:
        o.data = mesh

For 2.8+
Python: Selecting object by name in 2.8
if o.select_get():
    o.data = mesh


Can fluid respect soft bodies (or any deformation!) in blender? Right now, I have a render that looks something like: this.

As you can see, the fluid is ignoring the soft body simulation.

Is there any way I could make the fluid respect the soft body simulation?  It doesn't need to be good - this isn't an engineering project - but the fluid needs to follow with the soft body, more or less.

Is there ANY way within blender to make a fluid simulation respect any deformations at all?

Thanks for the help!

PS: What does it mean to Apply a fludism modifier?

In short, no. The fluid sim won't interact with any other simulator. But there is a way around this limitation.

For the obstacle object, selected Export Animated Mesh, this will animate the mesh itself, rather than simulating the mesh. As a "real" mesh, the fluid sim will treat it like any other mesh, and react to it appropriately. However, this will have to be repeated anytime you want to change the physics simulation. Incidentally, this also means that the soft-body cannot react to the fluid sim.


Is it possible to mask animated displacement textures? I'm in the last chance saloon and I can't figure this out.
I'm trying to create an edge mask that will softly blend out an animated bubble displacement texture.
I've created the bubble displacement on a plane which is phasing through the textures z axis via a controller linked to an empty. The problem is that the edge of the plane is clipping the animation. I need the animating bubbles to softly falloff before the edge of the plane so I can seamlessly place in situ in the environment.
The bubbles have been created via modifiers. I will be rendering this through Eevee and not cycles, just in case you need that info.
Hope that make sense. Any help would be greatly appreciated.

You could create a vertex group and then in wait paint mode, paint a gradient onto those vertices, and then use that vertex group in the displacement modifier.

For an All-Modifier Approach that doesn't require any editing the actual plane
They way you can mask out the edges is by creating a mask texture in texture paint mode with white all around the edges of the plane.  Then you can use that along with a Vertex Weight Edit modifier placed before the "Texture" vertex weight edit modifier you already have to remove the edge areas from the vertex group.
First, copy your "Texture" modifier and move the copy up to come first.

Then, go into Texture Pain mode and turn off all your modifiers so that you can see what you're doing better.  Then, go into the "Active Tool" tab of the Properties editor, and under "Texture Slots" set the Mode to "Single Image" and press "New"  Name it something like "Texture Mask."  You should then see a black image appear in the Image Editor and the plane in the 3D view should also turn black (make sure you're in solid view instead of material view.  That threw me off at one point).  Then paint a white edge around the plane.

Next, switch to weight paint mode and turn on the "VertexWeightEdit.001" modifier you copied from the "Texture" modifier.  You should now see a bunch of spots on the blue plane.  Now, go into Texture tab of the Properties editor.
Make sure the modifier is set to the correct one (VertexWeightEdit.001).  Then click the "2" next to the name of the texture.

Then, set the Type to "Image or Movie" and choose the "Texture Mask" image you created earlier.  Then, go back into your modifiers and change the VertexWeightEdit.001 modifier's Texture Coordinate from "Object" to "UV".  Also, select "Group Remove" and set the Remove Threshold to 1.  You should now see your mask appearing in red against blue on your plane.

Finally, turn on all your modifiers, and everything should be working properly.


Spherical Distance-From-Center Gradient Using this simple node setup, i'm able to get a pretty good gradient for this kind of mesh :

Could it be possible to get the same kind of gradient with a sphere like this one ?

I mean, the further the face get from the center of the sphere, the whiter it will get, and vice-versa.
Hope someone here can help me !

PS : I'm french, so my english may not be perfect ^^

Not sure whether it's the best approach but here's how I would wing it:

Giving that result:

The gradient texture has its origin at the object origin and creates a virtual sphere that gets brighter and brighter which creates darker valleys and brighter mountains. Once upon a time it was called a blend texture.


Please tell me how to fix this rigging problem I have a problem with rigging the imported model. Here is a screenshot of my object, you can see the arm deformation. In the second picture, you can see that the mesh is tilted. Could somebody please tell me the cause of this problem? It is embarrassing but I am totally newbie in 3D modeling so I have no idea what to do.[]

This model is very complex and requires manual weights editing. The automatic weights or Mixamo could only be a starting point.

The model is ripped with losses. There is no material data, and it's probably missing a small part and a vertex color data. This kind of game model demands deep 3D knowledge.

I made a rigging with Mixamo and tried to set up materials. I have not figured out how exactly those alpha maps are used, but overall it is correct. The weights still need attention.

A small tip I have learned: by default, Blender ignores color data for pixels with zero alpha, and you need to set Alpha from Straight to Channel Packed so it will not affect RGB value.


How to create a texture made out of multiple color layers I wanted to ask if you know how to make multiple layers on a sphere. I wanted to make a sort of jawbreaker Ball that if Opened or cut would reveal different color layers. and if there is a way to make it a sort of material that would adapt to any model. if you have seen something like that please send me a YT link or something I haven't found something along these lines myself.
thanks for reading!

This is using a boolean difference modifier on the sphere. The texture nodes in Blender are 3D which means the sphere gradient texture contains information about the inside of the object the material is applied to.


How do I flip a texture? I have a model (not built by me) where one of the materials is defined as shown by the image below. Occasionally I would like to flip the texture-image (sailor_right.png).
I thought I could connect a Mapping-node somewhere to do the flipping but I cant figure out how and where? So:

What type of node should I connect?
Where should I connect the node?
What values should be used in the new node?

The point is that I'm using this model and driving it with python to apply different texture-images between renderings. I could of course flip it using some other program before feeding it to blender, but I think that would be inconvenient since I could just get blender to do it for me.
Obviously I'm fairly new to blender and 3D-modeling so please be kind to me. But I might be all wrong here in my assumptions, if so then tell me that!

Add a texture coordinates node and a mapping node.
Depending on what you mean by "flip" can change the scale to negative one for whatever axis, or rotate the coordinates 180 degrees on a particular axis.


How do I optimize my large grass system to render quicker? I'm working on an animation which has a lot of natural landscapes, and I'm using a particle system to generate grass (Models that come with the Graswald addon). These frames take a long time to render and the process pretty untenable for a longer animation. Is there anything for hair/particle system which works in the same way as adaptive subdivision works for displacement? That is, render the grass which is up close with more detail and gradually tone it down the further it gets away from the camera?

I think the best way would be to have very low poly grasses with very low Res textures. But it's not very evident. In my knowledge, at the moment, there is not the equivalent of adaptive subdivision for the hair particle.
On the other hand, I noticed that former versions of Grasswald used less graphic-card memory, than newer, in rendering but it uses still more memory than low poly particles you can model yourself. To go further, the last Grasswald version has an adaptive weight painting depending on the camera's fieldview. But it doesn't works with videos because, when you change the weight painting, the particle system will randomly change each time you change this weight-painting. That's to say if your camera make a travelling, the particle system would randomly change on each frame.
I will make my video but only with grass micro-displacement texture (with adaptive subdivision) instead of any particle system.


Add created vertices to a list My goal is to add every created vertice to a list.

import bpy
import bmesh
def add_vert(loc):
    bm = bmesh.from_edit_mesh(bpy.context.edit_object.data)
    v = bm.verts.new(loc)
    bm.verts.index_update()
    bm.verts.ensure_lookup_table()
    vertlist = []
    vertlist.extend([v])
    print(vertlist)
    return {v}
add_vert((1,1,1))

This is what I get as output:
[<BMVert(0x0000020E20C3CF20), index=12>]
[<BMVert(0x0000020E20C3CF58), index=13>]
[<BMVert(0x0000020E20C3CF90), index=14>]

This is what I would like: [<BMVert(0x0000020E20C3CF20), index=12>,<BMVert(0x0000020E20C3CF20), index=13>,<BMVert(0x0000020E20C3CF20), index=14>]

You need to define your vertlist variable outside of the function. Currently, vertlist exists only within the scope of the add_vert function. You can either define it before hand:

vertlist = []
def add_vert(loc):
    ...

or add a try statement to check if vertlist already exists:

def add_vert(loc):
    ...
    try:
        vertlist
    except NameError:
        global vertlist = []
    ...


Baking multiple materials into one texture If there are multiple objects with different materials that have been combined into one object, UV unwrapped together and texture baked, the result is glitchy at best. Here is my process:

I start out with everything as a single material with a single UV map and multiple materials. There are three separate pieces in the combined mesh:

I create a new material, a new 4096x4096 image, and a new UV map (through smart projection) that doesn't overlap. I select the image, the new material, the new UV map. Every piece of magic I can think of since I don't know exactly how the bake knows what to bake where:

I click bake, with the sample size set to 256. Nothing is baked to the image I created and selected:

Some stuff baked, but not all of it, and what little was baked was baked to two new images it created:

I don't know what's going on here.

To make this work properly, you need to have an active Image Texture with your new image file in each material you have in this model. Basically, what you have to do now, is to CTRL+C on Image Texture in Everything material, visit each other material and CTRL+V. Then baking will give you appropriate result.


Context is incorrect python error I am doing a POC using blender 2.77a and I am trying to display data continuously in 3DVIEW generated from python script.

When I try to modify the text object by editing it with the line command bpy.ops.object.editmode_toggle() I get an error "Context is incorrect".

I tried to launch the script from space bar but same error appeared. Which part of the context field is missing or wrong and how can I override the context to make it right for blender?

import bpy
import time
import numpy as np
from queue import Queue
from threading import Thread

def main(context):
    for ob in context.scene.objects:
        print(ob)

class SimpleOperator(bpy.types.Operator):
    """Tooltip"""
    bl_idname = "object.simple_operator"
    bl_label = "Simple Object Operator"

    @classmethod
    def poll(cls, context):
        return context.active_object is not None

    def execute(self, context):

        # Produce data
         def producer(out_q):
            while True:
                data=np.random.rand(1)
                print(data)
                out_q.put(str(data))
                time.sleep(3)

         # get data
         def consumer(in_q):
            while True:

                data = in_q.get()
                print(data)

                #Replace the old text by "data" in 3DVIEW (Text object)
                bpy.context.scene.objects.active=bpy.data.objects["Text"]
                bpy.ops.object.editmode_toggle()
                bpy.ops.font.delete()
                newText=str(data)
                bpy.ops.font.text_insert(text=newText)
                bpy.ops.object.editmode_toggle()

         def start():

           # Create the shared queue and launch both threads
            q = Queue()
            t1 = Thread(target=consumer, args=(q,))
            t2 = Thread(target=producer, args=(q,))
            t1.start()
            t2.start()

         start()
         return {'FINISHED'}

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

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

if __name__ == "__main__":
    register()

    # test call
    bpy.ops.object.simple_operator()

Firstly threading isn't well supported. the context error would be from the threads not having a context. You may be able to pass the context from execute(self, context) to the threads and override the context when calling the operators.

I would suggest that a better option would be to use a modal operator. Based on the modal timer operator template included with blender -

import bpy
import numpy as np

class ModalTimerOperator(bpy.types.Operator):
    """Operator which runs its self from a timer"""
    bl_idname = "wm.modal_timer_operator"
    bl_label = "Modal Timer Operator"

    _timer = None

    def modal(self, context, event):
        if event.type in {'RIGHTMOUSE', 'ESC'}:
            self.cancel(context)
            return {'CANCELLED'}

        if event.type == 'TIMER':
            txt = str(np.random.rand(1))
            context.scene.objects['Text'].data.body = txt

        return {'PASS_THROUGH'}

    def execute(self, context):
        wm = context.window_manager
        self._timer = wm.event_timer_add(3.0, context.window)
        wm.modal_handler_add(self)
        return {'RUNNING_MODAL'}

    def cancel(self, context):
        wm = context.window_manager
        wm.event_timer_remove(self._timer)

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

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

if __name__ == "__main__":
    register()


One object having two different colors and distortions So my question is how do I fix an object that was made by joining two separate objects together. Specifically what I want to fix is the color issue, I need it to be one color and without any distortions.(greyish black parts) Would be glad if anyone can provide feed some back.

Tab into Edit Mode and A to select all then hit Ctrl+N to make the normals consistent.


Create a plane and apply ocean modifier to it I've been trying this a bunch of ways but no matter what I do I get a blank white plane. What I want is to programmatically create a plane with the ocean modifier applied to it. What am I missing?

bpy.ops.mesh.primitive_plane_add(radius=10, view_align=False, location=(0, 0, 0))
bpy.ops.transform.translate(value=(0,0,-1.0 * model_height / 2.0 + 0.2 * model_height))
for obj in bpy.data.objects:
    obj.select = False
plane = bpy.data.objects['Plane']
plane.select = True
bpy.context.scene.objects.active = plane
bpy.ops.object.modifier_apply(modifier='Ocean')

You need to add the ocean modifier before you can 'Apply' it. Try :

import bpy

model_height = 2

bpy.ops.mesh.primitive_plane_add(radius=10, view_align=False, location=(0, 0, 0))
bpy.ops.transform.translate(value=(0,0,-1.0 * model_height / 2.0 + 0.2 * model_height))

for obj in bpy.data.objects:
    obj.select = False

plane = bpy.data.objects['Plane']
plane.select = True
bpy.context.scene.objects.active = plane

#Add the modifier
bpy.ops.object.modifier_add(type='OCEAN')

#Apply the modifier
bpy.ops.object.modifier_apply(modifier='Ocean')

Obviously, if you want to adjust the Ocean modifier you'll need to do this before 'apply'ing it (or don't apply it and leave it on the modifier stack).


Extrude along mirror line I added a mirror modifier along the X axis. Then I added some vertices on the mirrored axis. I tried to extrude a vertex along the X axis, but it didn't work. I am able to extrude along the other axes, but not along the X axis. How can I fix this problem?

When clipping is enabled, any geometry exactly along the mirror axis will not be allowed to move. If you disable it, then you can extrude and move center vertices.


Set a different length for each animation I have a blender model and I have been making a few simple animations with it. Prior to today I could select the animation in the Dope Sheet and go to Timeline, set the Start/End frames and leave it at that. I could then do the same for another animation and both would have their own length.

It seems I touched something I wasn't supposed to because now when I set the Start and End frames for one of the animations it changes it for all of the other ones.

Any idea how I could set a particular number of frames for each one of my animations ?

It's looks like you have same animation data for different objects. So try this: Select the objects and press U -> Animation data to create a copy of it for all your objects


Render displaying frame 1 of cloth simulation instead of baked result visible in the 3D view I have baked a 995 frame cloth simulation but when I go to render a still frame at frame 995 (tried 990) it displays frame 1. How do I render the final frame of the simulation instead?

Sounds like the cloth modifier is disabled in the render.

Make sure the camera icon is selected in Properties  > Physics:


Texture painting stencil bug 2.8 I was following a tutorial blender fast track and in the tutorial they were using texture painting with a stencil to put runes on a sword, on the tutorial when using the stencil it shewed up as a see though overlay. on mine nothing appears but I can still use the stencil? It was a lot of trial and error to get an invisible stencil in the right place! is there a known fix for this or did I miss a step? I have been over the tutorial several times with the same result.

If you have problems with rune emission (making the whole blade glowing instead of the runes) - just make sure that the left gradient button in rune emission color ramp is black


Is it possible to simplify this mesh? I have too many vertices I'm struggling to work my model with this amount of edge-loops/handles. Can anyone suggest a less cumbersome approach?

If you wish to keep the overall topology of the hood, you cannot. However if you do want less vertices, there are two ways to go about doing this. The first being to lower the subdivison surface modifier. Of course this only works if you used a sud surf modifier in the first place and haven't applied it. The second way is to delete loop cuts. To begin go into edit mode and select the loop(s) you wish to remove by pressing ALT + RightClick. Press SHIFT + ALT + RightClick to select more than one.  Once selected press x to open the remove tab, finally press G to remove the loop cut.


Getting x,y,z coordinates of objects in blender API FOR MULTIPLE OBJECTS I am trying to calculate the cooordinates of the center of a group of objects using this code:
obj = bpy.context.active_object
vcos = [ obj.matrix_world * v.co for v in obj.data.vertices ]
findCenter = lambda l: ( max(l) + min(l) ) / 2
x,y,z  = [ [ v[i] for v in vcos ] for i in range(3) ]
center = [ findCenter(axis) for axis in [x,y,z] ]

The problem is that "bpy.context.active_object" returns only the (bpy_struct, Object) of one OBJECT only (the first to render) and does not consider the other objects. As a result the obtained X,Y,Z coordinates are only correct for one object and not all of them.
Any solution?
Amir

Take this image :

bpy.context.active_object only gives a reference to the active object in the given context. This is Cube.002, with the light orange outline.
Cube is selected, but it is not the active object. (dark orange outline).
When you type bpy.context.selected_objects in the blender console you get an unordered list of all the selected objects.
>>> bpy.context.selected_objects
[bpy.data.objects['Cube'], bpy.data.objects['Cube.002']]

In python you can iterate through a list of objects with a for loop. (Documentation) Your code, which is valid for one object, can be translated for a list to :
import bpy

for obj in bpy.context.selected_objects:
    if obj.type != 'MESH':
        continue
    # Sidenote : Use @ instead of * for element-wise multiplication in matrices
    vcos = [ obj.matrix_world @ v.co for v in obj.data.vertices ]
    findCenter = lambda l: ( max(l) + min(l) ) / 2
    x,y,z  = [ [ v[i] for v in vcos ] for i in range(3) ]
    center = [ findCenter(axis) for axis in [x,y,z] ]

    print(center)

Result :


How to make a simple mask like in Hitfilm? So, I want to use Blender for motipn graphics, and I previously used Hitfilm Express. One of the most frustrating things in Blender is creating a mask. But how does one do that like in Hitfilm? In Hitfilm, you literally just add a mask in the properties of something, and then thats it. How does one do that in Blender?

And I want to know how do I make the mask transparent without using a color key node (right now to make the mask transparent, on the mix node, I put the background to be green, then I use the color key mode to make it transparent)

You can use Set Alpha node(In Converters) and as an Alpha input use the mask. You can also use Alpha Over node with Alpha 0 background input and your image "over" input, but that leaves sometimes ugly rim, so the first option is better in most of the cases.


Making sure that faces have the same dimensions this is my very first try at using Blender so sorry in advance for the noobish question.

I have this very simple object (supposed to be a window):

I'd like to find a way to be sure that face A as the same width as face B (and potentially top and bottom faces too).

I created this object using extrusion on a simple cube... I don't even know if I was supposed to this that way.

Thanks for your help and guidance.

I went with @moonboots answer (all glory to him).

Delete the group of faces that A is composed of
Duplicate the group of faces that B is composed of
Snap that duplicate at A's position


How to get a lamp icon at the location of a lamp When you first start up Blender 2.6.9 it has a cube, a camera, and a lamp. Both the camera and the lamp have a simple icon-like image that you can see and move around like other objects in the scene. However, sometime during my modeling process these icons have disappeared and when I try to move my light source a circle shows up around where it is but the circle doesn't move when I try to move the light around. Is there a setting or some way to change it back so that I can see the icons for the lamp and camera and move them around again?

Edit: I also just found out when I tried to move other objects that the circle shows up for them too, is there a way to make that go away as well? It's kind of annoying and I'm not used to it.

The large circle you described is showing because you have Proportional Editing enabled . Click the icon or use O to disable it. As for the missing icons, make sure that you didn't hide them accidentally or that you didn't tick Only Render under Display.


Array along a 3d curve with rotation lock on certain axis i want to do an array of my instance , its a steet lamp that need to follow a road that go up and down ...

so i need an array of my instances and a curve modifier? but the problem is that my Z rotation value keep changing , according to the normal of the curve , and i dont want this because street lamp stay straight even if the road is inclined ... i tried to lock the rotation of my instance and tried to do an Z axis constraint but it dont work , i failed ? , i dont know what to do ...

im also quite confuse about every different way to do an array following a curve , i know we can use a curve modifier , a constraint , modify bezier option in propreties, and even particles ?? im lost here , dont know which technique is best for what ..

thanks

To duplicate an object without deformation and with a constraint on its Z axis, use Dupliframe:

Build your bezier curve, and, in Edit mode, make sure that it goes in the right direction, if not: select all and W > Switch Direction
Put the origin of your bezier curve at it starting point
Put your object at the same point
In the Data menu of your bezier curve, click Path Animation, then in Frames choose the amount of duplications that will happen. Enable Follow.
In the Object menu of the object you want to duplicate, in Duplication, enable Frames and unclick Speed.
Parent your object to your curve with ctrl P > Object.
Keep your object selected and go to Constraints, choose Limit Rotation, and click X and Y, unclick Z.

It should work


UV unwrap doesn't show up in Object Mode? I know that this is a usual question and might already have an answer online, but I am stuck at UV unwrapping for a lot of time already and i want to explain my issue in detail.

I want to add textures from an image onto a few cubic meshes i have, mostly the front face. I unwrapped the cube in blender and added a image to and it looks good in the texture window, but as soon as i enter object mode or rendered the image is no more and the cube is showing the material only and not the image. I have already assigned the image texture with UV coordinates to the cube still it doesn't show up on object mode. Please help me..

In order to make a UV Mapped image appear in Object Mode, I found it was necessary to both:

Set the Viewport Shading mode (The button just to the right of the Edit/Object mode selector in 3D View) to "Texture Mode"
Set Properties -> Shading (game_settings.material_mode) to GLSL (OpenGL Shading Language)


Is there a way to change the color of keyframes? Is there a way to change the color of keyframes on the timeline? For example, I would like all the keyframes associated with the Left Leg to be Blue and the Right Leg to be Green.

There is a way to change the colors of all keyframes. If you go into the user preferences and go to Themes > Dope Sheet then you can change the colors of selected and unselected keyframes.
I could be wrong, but after using Blender for two or three years I have not seen a way to change keyframe colors for individual bones. Would be a nice feature have for sure.


Can you draw in 3d from orthografic projections? Im drawing a orthographic reference for my character, and then I would like to trace it in blender with grease pencil so I have a 3d-ish reference instead of several images.
Now, grease pencil only draws on a plane or the surface of an object as far as I know, so that's the question, is it possible to draw a stroke in front orthographic, and then again in left orthographic (for example), and have blender turn it into a single stroke in 3d space that looks like both?

All you need to do is switch the view in which you want to draw, so that the strokes are aligned in a different axis.

Blender will not magically merge shapes, though.
But you can edit your objects just like any other object in 3D to get whatever shape and plane you want.

Note that you can also set the grease pencil to draw at different planes, determined by the 3d cursor. That would allow you to draw from the same view, but at different depths.
See: Align Grease Pencil with Camera Angle


I'm importing a model, and the whole model is joined. I'm trying to separate the model's parts I got a model from ripping a video game, but the model has separate parts/object groups that I want to separate.
Sorry for the abruptness of this post.

In order to seperate parts a mesh, go into edit mode on the object in question, then either right click and select seperate, open the quick search menu and type seperate, open the mesh menu in the top of the 3D viewport and select seperate, or use the hotkey [P] and select seperate by loose parts.
You can also seperate individual pieces by selection, I noticed that you have vertex groups for the different pieces, which would allow you to easily pick which parts to seperate.


Remove lighting effects I have a plane with an object coming out of it. No materials are assigned. I placed a Point light in front of the scene, illuminating the whole surface. You can clearly notice a difference between the two surfaces.

How can I disable those differences? I am building a virtual model in which no light scattering should be present. I want the materials to behave equally if exposed to the same light (like a perfect projector).
I tried with different materials with no success.
EDIT: I am projecting some light pattern onto the surface. So I want the material to evenly reflect the pattern, without any scattering/shadow.
If I usa a RGB input (thanks to @Christopher Bennett) the material does not interact with projected light. E.g. the central object does not reflect the yellow chessboard pattern like:

Instead I want the chessboard to be "stamped" on the object, again with no other light effect.

Do you mean something like this? - just plug an RGB input into the Material output. This is what you could call "unshaded", there will be no shadows or light scattering of any kind.


How can I block in colors quickly with grease pencil tool? https://youtu.be/SqyThycbqYg?t=76

In this video you see the artist blocks in color very quickly with grease pencil, how can I do that? I would like to do this as well, create a virtual 3D set and blocking the shapes very quickly for rapid prototyping animation.

A grease pencil stroke has two colours, one for stroke and one for fill, the default setup has the fill opacity set to 0.0 so it is transparent. A palette is used to define the two colours to use. The current palette selection - the one highlighted - is used when you draw a stroke. Changing a palette setting will change all strokes using that palette.

By creating multiple palette entries you can quickly select a different option before each stroke.

The current grease pencil system uses layers and palettes. Each stroke can use a different palette choice and you can have multiple strokes on each layer.

The version used in the video (2.77) was made before the palettes were added, that is why there are two colours for each layer and only the one colour setting can be used per layer. The process is still the same, just that now you select the palette instead of the layer to choose a different colour setting.


How do I give my drawers more detail? Hello I am trying to make a desk. I have used two Alex drawers from ikea as leg units but there's no way of differentiating its walls with the units themselves. How can I make this possible? I've tried using the solidify mod but it didn't work out well.

Drawer:

.Blend file

Please tell me if you need me to elaborate.

If your drawers are separate objects in reality, there are no reason not to make separate meshes in 3D, especially if you want to make some close shots of the desk. Also, you need to keep quads as much as possible, meaning surfaces that have 4 vertices and not 5 or more. For example let's take one of your drawer:

Make it a separate mesh (I've deleted the rest of the object to make it simpler).
It looks like you have a lot of overlaying vertices, so to clean all this press W > Remove Doubles. On the top of the 3D view the amount of deleted vertices will be displayed.
Delete useless vertices with X > Dissolve Vertices.
Also delete vertices that are not part of any face with X > Delete Vertices.
To make quads, use the knife, K to activate, C to cut orthogonally.
Once you have only quads, extrude the whole surface with E.
If the normals are flipped, press ctrlN.
Now you have the facade of one drawer.
You can add depth with some edge loops ctrlR and extrudes E.
Etc...


Unable to pick color option? I am new to blender and trying to start off simple with minecraft animations. I am watching a video tutorial about how to change a character's "skin", it's easy if the options are enabled but it seems mine are not. I was wondering how do I enable these options?

This first image is what I see:

This second image is what I am trying to achieve but the options are not there:

I hope this is an easy fix, thank you in advance. I am using cycles render and the latest version of blender (downloaded blender yesterday).

You selected the wrong shader.

Click on Mix Shader and select Diffuse BSDF instead.


How do I clear this list so I can start empty and fresh? Pretty much this.  I'm a bit stuck on getting a decent bake my first time and want to clear the slate and start fresh.

I don't think that there is a way to clear this list without a script. If you don't want to use a script, save your objects individually, and re-load the Blender start-up file. Then import your objects, and make new shaders.


Object too dark after solidify from an SVG I've:

Created a voronoi pattern as an SVG
Imported SVG to Blender.
Turned SVG into a Mesh.
Used "Solidify" to "extrude" the mesh.

I now have a 3D object - I do only hard surface modelling for 3D printing.

The issue:
The object is very dark (no matter what Viewport shading I use) and I can see vertices, edges & faces ONLY in wireframe mode (see image below).

Question: how can I light my object to appear as other "native" Blender objects?

Thanks,
Roy

When you imported your svg object, it automatically created a material with the color of your svg. Go in the Properties panel > Material panel and delete this material.


2d sprite bone rigging I have a question. Is it possible to draw a sprite from a side view and then rig that with bones? Maybe I would first have to import the image into blender and then dop that outline with a mesh. Then, if even possible, I could maybe attach the sprite to the mesh and add the bones. I dont really have much experience with blender but I did create a humanoid sculpture and successfully rig it a long time ago. I don't remember being able to paste an image to the mesh in blender, but I do remember something having to do with seams and then maybe I could export those parts and attach it to them in another program (or worse have to draw over them which means having to draw the image all over again.) I'm not much of an art guy, more of a coding guy. I use Unity and would like to only have to draw one image and then do all the animations of that one image in blender so that I can focus more on coding. If it is possible please let me know. Thank you in advance for any response.

To get started with your project you could enable the addon Import Images as Planes in Menu: File / User Preferences.

It will be accessible from the menu File / Import / Image as Plane and create a plane an UVMap and assigns the image texture.
Note: You need to set the Viewport Shading to texture otherwise you won't see the image texture.

Bones are used to deform geometry you should ask another question (perhaps add an illustration) on what exactly you want to achieve.

You can tweak the subdivided edges in the UV-Editor and scale to maintain the proportions. Separating P By Selection for e.g. the legs allows you to have single objects for this part of the image which can be animated using bones as shown in the image above.


Does enabling crossfire speed up GPU rendering with cycles? As the title says, does it help or not to enable crossfire?

I tried rendering the bmw with both crossfire enabled and disabled (2 of my 3 cards)

The setup is
Radeon R9 280X
Radeon R9 270
Radeon 7870

The following time (2.11) is with crossfire enabled between the two R9's

while 1.33 was the time with crossfire disabled


Subdividing has warped my mesh. Is there a way to clean up this mesh after adding other modifiers? I am trying to create an unusual ring in Blender 2.77. After using the subdivision surface modifier on my ring, I noticed the change affected the formation of the vertices, which appear to look like slight dents on the shank (inside of ring). I have lost my earlier files due to a fault in my portable hard drive therefore I cannot carry on working from a previous file. I can start from scratch, but I thought it is better to ask of any possible ways to fix my current file. Modifiers have been added before I noticed the mistake. I am sorry if this does not make much sense, I am still new to Blender and could not figure out this issue. Whatever I researched did not come up with relevant answers.

I have found a file which contains an older version of my ring. As you can see the shank edge has many tris. I have tried to make these quads, but that only repeats the problem. I am guessing this is the reason the shank edge has slight dents in the design. What is the best way to clean up this mesh?

No sure it's adequate in your case, but I'd go in Sclupt mode, select any brush (the standard inflate/deflate will do), set its strength to 0 so that the shape isn't changed, but turn Autosmooth to 0.1 or something like that.

You will then be able to smooth the geometry with the brush just where needed, without touching anything else.


Install Blender on macOS 10.10.5 Trying to install Blender on my Mac and I am being told that I cannot do it with my operating system (macOS 10.10.5). Is it possible?

You can't install the latest version as that requires macOS 10.12 +.

You can install Blender 2.79:

  Blender 2.79 runs on all systems that support OpenGL 2.1 and above, with recent graphics drivers. For macOS, version 10.9 and later are supported.

(Source)


Rigging - pose mode is squanched up I downloaded a rigged character in a blend file here:
http://cdn.digitaltutors.com/wp-content/uploads/2015/03/DT_Puppet_Rig.zip

When I open it in blender it is fine in armature rest position, but the pose position is all squashed up and unusable.

Can anyone give any hints about what I'm doing wrong. I tried to select all and clear pose transforms but no luck.

thanks for any help,
Andreas.

SOLVED! The hint was an error warning - "autorun disabled!" Blender wasn't running a script. Press Ctrl + Alt + U, then head over to File and enable Auto Run Python Scripts. Now all works well. The automatic running of python scripts has been disabled since version 2.6.


Difference between a paintmap and wetmap Can somebody explain to me what is the difference between a paintmap and a wetmap? I'm currently studying dynamic painting and wondering the difference between these two outputs.

When a brush with a Color and a Wetness moves through a canvas, it lays paint.

As a result, the canvas gets

a color, represented by the (RGBA) Paintmap, and affected, for instance, by the Dissolve effect

(no dissolve in this example)
some wetness, represented by the (greyscale) Wetmap, and affected, for instance, by the Dry effect.

Once the paint dries out (if it does), its color remains while its wetness goes away.

Example shader where the color is the paintmap, the specularity is the wetmap, the roughness is one minus the wetmap (there is also some alpha-based bump here):


How do I fix Exception Access Violation error on startup? I just installed Blender, but when I try to start it, the command prompt comes up with "Error: Exception_Access_Violation" and then closes (and Blender never starts of course). How do I fix this? I tried running as administrator and that doesn't help either.

I want to answer so that anyone with my particular situation might benefit ... I had this same frustrating problem with WIN 7, and  a Intel HD graphics  (which supports only OpenGL 2.1) ... I tried some suggestions which didn't work (though I needed the 2013 C++ library anyway, a link to this is given at the Blender site just below the Blender download links--I had only 2010) then I simply updated the graphics driver from a 2010 version to the 2012 version . and that did it. Actually I was surprised it did, but it did.

Read also that some other people had to go back to an older driver instead.

At any rate 2.77 can at least run with a Intel HD graphics, I am proof.

By the way I used an Intel utility called Intel driver update Utility to find the right driver. The screen went black after the driver was installed, and I feared the worst, but after restarting things seemed ok, the driver was installed and even Blender worked! Darkest before the dawn or something. Assuming all is well..

Oh last detail which probably doesn't matter) I didn't install Blender, I unzipped the zip file and ran it straight..


Selection of object using command not working I wrote a script that imports and modifys two objects. It works as following: The script imports an .obj and makes some modifactions. The position of the object stays the same. After the modifications, the same .obj is imported again. Then the last imported object is selected and Boolean/Difference/Object1 used.

The Boolean works without problems, when I run the script till the object is imported again and I select the this object by hand and do the Bool.

The script runs till
bpy.context.object.modifiers["Boolean"].object = bpy.data.objects[NameWOFormat].

I understand that I have a problem with my selection. There is a small Modifier symbol next to the Name "Object1" in the Outliner Window. If it would run as it should, the symbol would be behind "Object1.001". That's the reason I think it's a selection problem.

Am I using the wrong command for the selection?

import bpy
import os
import bmesh
from pathlib import Path
from mathutils import Vector, kdtree, Matrix

NameWOFormat ="Object1"

# Modifier Boolean
def ModDif():
    global NameWoFormat
    global NameSubstrObject
    bpy.ops.object.mode_set(mode='OBJECT')
    bpy.ops.object.modifier_add(type='BOOLEAN')
    bpy.context.object.modifiers["Boolean"].operation = 'DIFFERENCE'
    bpy.context.object.modifiers["Boolean"].object = bpy.data.objects[NameWOFormat]
    bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Boolean")

bpy.ops.import_scene.obj(C:/Object1.obj)

#===============================================================================
# Now I do some modifications on Object1. I save this block of code here.
#===============================================================================

# Change into Object-Mode
bpy.ops.object.mode_set(mode='OBJECT')

# Import Object1 again and use Boolean
bpy.ops.import_scene.obj(C:/Object1.obj)
NameSubstrObject = NameWOFormat + ".001"

# Do Boolean edit
bpy.ops.object.select_all(action='DESELECT')
bpy.data.objects[NameSubstrObject].select = True
ModDif()

You can add modifiers without using operators or relying on what is selected.

import bpy

# this creates Object1
bpy.ops.import_scene.obj(filepath='Object1.obj')
# this creates Object1.001
bpy.ops.import_scene.obj(filepath='Object1.obj')

obj = bpy.data.objects['Object1.001']
m = obj.modifiers.new(name='cutting modified obj',type='BOOLEAN')
m.object = bpy.data.objects['Object1']
m.operation = 'INTERSECT'


How do I move all children objects away from parent empty (by scaling the empty) but NOT scale the children? I have a bunch of boolean modifiers on a cube. I want to move them all off the cube by just scaling the empty they are parented to. But, I don't want the child objects scaled. Is there a way to do this (non-python)?
I am happy to use drivers or other techniques to achieve the same result: namely moving the booleans off the cube in a direction as if they were scaled. Thanks!

If this is the same problem i had, and you are using version 2.81, try this:


UV Mapping Rounded Objects & Baking Long time 3dSmax.maya user, getting to grips of the great (and surprisingly free) Blender.. Going well so far, but now im completely stuck on a few things. - so would appreciate any insight on these things.

ok first up, is UV mapping. - im trying to texture a brick path that surrounds the model, its a huge circle basically, but the brick is 3 wide on the texture. - In 3D max Id UVmap to a spline path that would follow the curve, thus the texture would follow too. - there is not many options with UV stuff here, other than the basics. ive tried all sorts from unpack, to different map types. - but none yield the results I want.

The other question is a bit of a silly one.. but had me looking for hours!!

you map a floor for example. (actually shown above as it was that floor) - I set my UVs to how I want them, but kept within the bounds of the texture limit space. (as its going to UE4) so I cant stretch UVs. - but needed a quick way to tile textures so the scale is less or more, there was/is no way of doing this in 2.8 from what Ive seen, as all the help i got was from pre 2.8 and things are somewhat changed since.

Anwyay, the workaround WHILE very not ideal. is to add 2 nodes in the node engine, for UV and vector, this works fine, but when you are working with a complex set of textures alredy, and then need to preview textures on the fly, you have to go in an manually set this every time, and it takes lots of time to do, plus a lot of frustration!. - I would BE VERY happy for a "tile" option within the texture part of blender (why is there not one I dont know!) spoilt by other 3d programs I guess!.

Anwyay, ive been learning (still) learning... its been a challenge switching. but for good reason!. - Still lots to go through, but getting there day by day. and blender is actually really great!

Here is the 3D file.
blender File

thanks so much for the detailed answer.. sadly I think Im doing something wrong. - the results you have is what I want basically.

Ok here is what i did, just to be clear, I will repeat the steps I did.

Added seams similar to yours. but across the rest of the mesh (see pic)
The cross and center circle can be mapped normally, and moved thats not an issue. so mapped those first as you suggested.

The circle part on the outside, I selected a UV poly, Pressed U, and chose the follow quad, this did nothing. - To get this to work I had to select all faces, then the reults are what follows in the pic. - it sort of worked but in a very odd way!.

Please advise me where I went wrong. - and once again, thanks for your time.

In my example I marked all the red edges as "seams", then selected the cross only and pressed U - "project from view", then selected all the circle, selected one face as "active" (deselect then re-select one face) and pressed U "follow active quad". Moved and scaled the UV islands as I wanted, because the textures are automatically tiled outside their UV space.

For the second part of the question, a common workflow is to set the size of the texture scaling the UV outside the boundaries, then when satisfied with the result, create a new UV map optimized for export and bake all texures in a new image with the new UV map, so you can optimize your texture space.

After you've arranged your UV map, create a new one (properties window, vertex tab, plus button in the UVMaps panel (I called it Target UV), select all and press U project from view. Create a material with an emission shader controlled by the floor image with the first UV, create a second image node contgrolled by the Target UV, load a blank image of the desired dimension, have it selected in the node editor (even if it's not connected to anything), switch to Cycles Render and press Bake button with emission option. This will create a new image texture with a complete UV Mapping inside the boundaries.

Plus, enable the "Node wrangler" add-on in the preferences, so that you can select an image node in the node editor and press Ctrl T to quickly create the UV and mapping nodes.


My manipulate axis is skewed I must have accidentally hit a shortcut for a setting, but my axis is off and when scaling, I'll press X  to scale on the X axis and my shape will be skewed.

My 3d manipulator tool is off at an angle and I can't figure out how to reset it or change it back.

Consider pressing the different keys on your numeric keypad.
This will align your view to an axis in the set {XYZ}.

NumberPad 1
NumberPad 3
NumberPad 7 with/without the variation of
Ctrl

https://docs.blender.org/manual/en/dev/editors/3dview/navigate/align.html

Consider changing the

transformation orientation to

[Global]

as indicated by the yellow arrow.

Sometimes a rogue keystroke or click can change a setting unbeknownst to many.

If your 3D mesh above is not time consuming ... I would just consider archiving mesh file. Similar to a delete. Create a new file and start over.  You probably wont make the same mistake.  Starting over may be more cost effective than chasing down one little small problem and trying to remember your actions or describe it.


Why does my Python script "Onionize" my cone? I have created the python script found at this link. The link also includes the associated Test.csv.

The purpose of my script is simply to create two cones, but somehow, for a reason I cannot figure out, the output of Blender (see image below) is to "Onionize" my cone; my cones look like strange pointy onions.

Why?!

Code:

    import bpy, csv

from bpy.props import IntProperty
from bpy.types import (MESH_OT_primitive_circle_add, MESH_OT_primitive_cylinder_add, MESH_OT_primitive_uv_sphere_add, MESH_OT_primitive_cone_add)
#MESH_OT_primitive_cone_add.vertices = IntProperty(name="Vertices", default=32)

for area in bpy.context.screen.areas: # iterate through areas in current screen
    if area.type == 'VIEW_3D':
        for space in area.spaces: # iterate through spaces in current VIEW_3D area
            if space.type == 'VIEW_3D': # check if space is a 3D view
                space.viewport_shade = 'RENDERED' # set the viewport shading to rendered

bpy.ops.script.python_file_run(filepath="C:\\Program Files\\Blender Foundation\\Blender\\2.79\\scripts\\presets\\units_length\\meters.py")
fp = "C:/Dropbox/Blender/Test.csv"
bpy.context.scene.render.engine = 'CYCLES'

def makeMaterial(name, diffuse, specular, alpha):
    mat = bpy.data.materials.new(name)
    mat.diffuse_color = diffuse
    mat.diffuse_shader = 'LAMBERT'
    mat.diffuse_intensity = 1.0
    mat.specular_color = specular
    mat.specular_shader = 'COOKTORR'
    mat.specular_intensity = 0.5
    mat.alpha = alpha
    mat.ambient = 1
    return mat

def setMaterial(ob, mat):
    me = ob.data
    me.materials.append(mat)

AQ2 = makeMaterial('AQ2', (0.329411764705882,0.505882352941176,0.611764705882353), (1,1,1), 1)
AQ4 = makeMaterial('AQ4', (0.611764706,0.478431373,0.329411764705882), (1,1,1), 1)

with open( fp ) as csvfile:
    rdr = csv.reader(csvfile, delimiter=',')
    for i, row in enumerate( rdr ):
        bpy.ops.mesh.primitive_cone_add(radius1 = float(row[3]), radius2=0, depth=float(row[3])*2, view_align=False, enter_editmode=False, location = ( float(row[0]),float(row[1]),float(row[2])), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
        setMaterial(bpy.context.object, AQ4)
        active = bpy.context.active_object
        bpy.context.active_object.name = 'SAQ4'
        active.modifiers.new(name='mysubsurf', type='SUBSURF')
        active.modifiers["mysubsurf"].levels = 5
        bpy.ops.object.modifier_apply(apply_as='DATA', modifier="mysubsurf")

        bpy.ops.mesh.primitive_cone_add(radius1 = float(row[7]), radius2=0, depth=float(row[7])*2, view_align=False, enter_editmode=False, location = ( float(row[4]),float(row[5]),float(row[6])), layers=(True, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False))
        setMaterial(bpy.context.object, AQ2)
        active = bpy.context.active_object
        bpy.context.active_object.name = 'SAQ2'
        active.modifiers.new(name='mysubsurf', type='SUBSURF')
        active.modifiers["mysubsurf"].levels = 5
        bpy.ops.object.modifier_apply(apply_as='DATA', modifier="mysubsurf")

    x = float(row[8])
    save_render = "C:/Dropbox/Blender/" + str("{:10.2f}".format(x)) + ".png"

    bpy.data.scenes["Scene"].render.filepath = save_render
    bpy.ops.render.render( write_still=True )

    # deselect all
    ##bpy.ops.object.select_all(action='DESELECT')
    # selection
    ##bpy.data.objects['SAQ2'].select = True
    # remove it
    ##bpy.ops.object.delete()
    # deselect all
    ##bpy.ops.object.select_all(action='DESELECT')
    # selection
    ##bpy.data.objects['SAQ4'].select = True
    # remove it
    ##bpy.ops.object.delete()

As commented above, the lines

active.modifiers.new(name='mysubsurf', type='SUBSURF')
active.modifiers["mysubsurf"].levels = 5
bpy.ops.object.modifier_apply(apply_as='DATA',modifier="mysubsurf")

in the code confirm that the problem is the interaction between subsurface modifier and tris in the mesh geometry. Remove or comment these lines and you will get beautiful cones.

The code can be used if the primitve added is based on quads.


Can Blender import videos with transparent background? I have video with transparent background which I wanna import to Blender sequencer. I've checked in my browser that my video is 100% has transparent background. When I add it to sequencer in blender it has black background.
When I export it using WebM I also get black background on time when transparent video should be placed but transparent where I place some transparent pngs. So transparency is active but seems blender can't import transparent videos.
This video imports to Davinci Resolve without any problem.
What do you think?
Blender 2.93.0a
My video's format: WebM, libvpx-vp9.
Ubuntu Linux.

Solved.
However I found some transparent format that Blender supports for transparency, it should be reencoded like this:
ffmpeg -i in.webm -vcodec prores_ks -pix_fmt yuva444p10le -profile:v 4444 out.mov

"Blend"-option should be set to "Alpha Over" in the N-panel of the strip.


How to select only a border of selected area? I selected some area and I need to get selected only border of this area. Does anyone know any function to achieve that? Or a script?

Select Boundary Loop

You can find the function in the Select Menu.

It will select only the boundaries edges of the provided face selection.

As said in the manual's page:

  ...based on all regions currently selected, it selects only the edges at the border(contour) of these islands.

Here's an example of usage:


Object won't move when I add Soft-Body physics I got the object with the soft-body to work at first but now it refuses to move at all when I press play. The only way to get it to move again is to start a brand new project and redo everything.

I figured it out, I need to press Playback and then "Set Start Frame." Didn't have to do that before so I don't know why I have to do that now. Hope they change this later one.


Rigidbody - Change Dynamic simulation to animatic I have an issue with the physics system (as you can see in the title haha).

The problem is : I have an animation where an object (dynamic) rebound on a surface (passive - animate). After a while, the surface drop down rapidly. At that exact moment, I want to activate the animation data of the object to go down with the surface.

I already tried to switch between both of the options (dynamic - animate) and animate the objectf with keyframes and no success.

I already tried to put a constraint (copy location) and no success...

Do you have any suggestions? thank you!

Detail -  Method 1 -

Switching from Dynamic to Animated doesn't come without it's problems.  There is a workaround but it's proven not overly stable in my own projects.  There are two suggestions here and the Blend file that demo's method 1.

I did this twice to make sure it wasn't going to act up...

Before setting the physics and at frame 1 a "Child-of" constraint is placed on the Monkey with the slab as it's target.
The "Set Inverse" button is clicked on and the constraint's Influence slider set to 0.  The 'Set Inverse' may have to be clicked on again AFTER the influence is adjusted.

The timeline is then taken to frame 76, which is well after the collision and where the Monkey's rolling motion is about done. At this frame the constraint's Influence slider is keyframed again with a value of 0.

One frame on from there (frame 77) the influence slider is keyframed yet again, this time to 1.

With that done and when played, the Monkey should fall and hit the slab, bounce around and when the slab also falls, follow it down.

It worked first time in my version (2.77a) and it may well be the order in which the constraint and physics are used that decide if it's going to act up or not.  Note, I did the 'Child-of' constraint first.

An advantage of this method is that the physics are still doing their thing whilst the slab is falling and even after it comes to a stop.  i.e. the Monkey is still rolling around.

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

Method 2 -

A reliable alternative should things not go according to plan is to visually switch over to a duplicate monkey which would be parented to the slab outright from frame 1.

There'd be no hangups between the two constraints and the 2nd Monkey follows the slab down, unimpeded.

Detail -

Do the physics and once happy, at frame 77 when the Monkey's rolling has all but stopped, duplicate it and IMMEDIATELY clear the copy of physics and all animation.  Select it again and check the Dopesheet to make sure nothing remains.  Physics have a habit of hanging around and leaving a Dopesheet strip(s) even after it's supposed to have been cleared.  That strip has to be deleted!

With the 2nd Monkey now free of all constraint and therefore stable, we can visually switch over to that at frame 77 in the Outliner.  Their respective eye and camera icons can be keyframed to switch the original OFF and the duplicate ON.

Move back to frame 1 and do the inverse.  The original to be ON, the copy OFF.

At frame 77 both monkeys will be perfectly aligned and the switch-over therefore undetectable.
Monkey 1 would be seen to fall and bounce, Monkey 2 following the slab down.

Another more complex example of this is demonstrated in the video at the very bottom of this link - How to keyframe child of constraint in and out


Setting multiple gravity I have a war tank freezing in the air and one feather next to the tank, when I press the play I want the tank to reach the ground faster. Even when the weight differ they will reach the ground at the same time, so I want to put gravity to the tank and another gravity to the feather.
How can I do that?

Fact that a tank reachs a ground faster than a feather falling from the same high is not a question of gravity, but matter of air friction. Thanks Lemon for pointing out :)

v01 Force Field - Drag
You can set Rigid Body as usual...

add Cube - enable Rigid Body simulation > Mass > 100 kg
add Plane - enable Rigid Body simulation > Mass > 0,6 kg

and simulate Air friction by adding Force field object (like Drag type) and play with Strength value. Here Linear 0.01

Notes
Example above is option how to slowdown falling object based on mass, without any physical accuracy, just to get desired effect.
For some reason speed fall is affected also by Dynamics > Damping Translation. Two objects, both of mass 1 kg, but one object with damping increased to 0.8 also gives air friction effect.

v02 Cloth Sim
Another option is to use cloth simulation, that has a parametr Air Viscosity per object, so it can be adjust individually.

In this example also Cube use Cloth sim, that with some setting can react as solid object. For tank you can just use Rigid Body as before.


How to select vertices, then convert to face selection with Python? I am brand new to Python, and cobbling things together from various sources, so I have next to NO idea what works, what doesn't work, or WHY things work.

I'm creating a script to apply a mirror modifier, then split the object into its two sides.  I'm using two slightly different routines depending on whether it is one symmetrical object with a center line, or two mirrored objects with no connected geometry.

When I used this code, it worked:

mesh = ob.data
bm=bmesh.from_edit_mesh(mesh)

bpy.ops.mesh.select_mode(type='VERT')
vtest = False  ##see if we can select side of active
for vert in bm.verts:
    if(vert.co[0] == 0):
      vert.select = True
      bm.select_history.add(vert)
      vtest = True
      break

if(vtest):  ## select side of active and part
    bpy.ops.mesh.select_axis(sign='NEG')
    bpy.ops.mesh.select_mode(type='FACE')
    bpy.ops.mesh.separate(type='SELECTED')

However, if I selected the vertices in a loop and tried to switch to face mode it dropped the selection.

  else:
        for vert in bm.verts:
            if(vert.co[0] <0):
                vert.select = True

        bpy.ops.mesh.select_mode(type='FACE')
        bpy.ops.mesh.separate(type='SELECTED')

This threw the error 'no selection.' and if I stopped the script just before the FACE selection mode switch, the mesh was in edit mode, all the vertices on the left side were selected, and if I then clicked face select mode, everything would be deselected.

I can't explain that.

The code that I finally got to work is BS and i'd like to know what fifty things I did wrong.

bm.select_mode = { 'FACE' }
bmesh.update_edit_mesh(ob.data)
bpy.ops.object.mode_set(mode = 'OBJECT', toggle = False)
bpy.ops.object.mode_set(mode = 'EDIT', toggle = False)
bpy.ops.mesh.select_mode(type='FACE')

If I leave out any of those lines, it fails.

My BASE question is: why can I select vertices using the 'select side of active' command, then swap into face mode and convert the selection to faces but if I select the vertices myself in a loop and switch, it drops them?

Flush the selection

The bmesh module has some methods for flushing selection.

  Selection / Flushing

  As mentioned above, it is possible to create an invalid selection
  state (by selecting a state and then de-selecting one of its
  vertices’s for example), mostly the best way to solve this is to flush
  the selection after performing a series of edits. this validates the
  selection state.

Test Script: run in edit mode, selects vertices with

import bpy
import bmesh

context = bpy.context
ob = context.edit_object
me = ob.data

bm = bmesh.from_edit_mesh(me)
for v in bm.verts:
    v.select_set(v.co.z < 0)

bm.select_mode = {'VERT', 'EDGE', 'FACE'}
bm.select_flush_mode()
#bm.select_flush(True) # or select flush, deselect all first.
# put in tool in face select mode (without op)
context.tool_settings.mesh_select_mode = (False, False, True)
#bpy.ops.mesh.separate(type='SELECTED')

After the flush above only faces with all vertices selected are selected.  Verts not part of a selected face are deselected.


How to bridge a string of edges? I am trying to bridge the edges on a string of edges to another string of edges with faces. (See image)

How can I do this? When I use the F key, it does something strange because the height of the edges fluctuates. Also, bridge edge loops tells me to "Select at least two edge loops." What should I do?

Bridge Edge loops can handle this situation.
Make a selection on the top row of n contiguous vertices.
Also make a selection on the bottom row of n contiguous vertices.
Bridge Edge loops.


Bump and color data in a single brush? Is there any way to paint onto a bump map and diffuse map at the same time, so that the strokes match up? Like a multi-layer brush that uses a greyscale texture for the bump layer and a color texture for the diffuse color?

Here's a rough sculpt to demonstrate what I'm imagining:

The GIF above shows how such a brush could be made. The black and white height map would be the displacement brush, transferring its greyscale data to the bump map texture and the green one would transfer its color data to the diffuse map texture.

The resulting brush images:

Making the brush is one thing, but is it possible to use such a brush?

Blender only paints to one image at a time.

One solution may be to set the texture brush mapping to stencil and align them visually. If your brush textures align and you don't move the 3dview then the two textures will just line up after you change brush settings and active layers.

When you enable stencil mapping, the texture is overlaid on the 3dview. Use  RMB to move the texture into place, ⇧ Shift  RMB to scale and ⎈ Ctrl  RMB to rotate, then use  LMB to paint it onto your texture image.


When I render the colors are not showing as they should, some parts are white I've made a 3D model in Blender and I tried to render it but when I do the colors are not showing as they should, some parts are white even if they are not on the model.
I've attached pictures to show you, I don't know how to fix this, thank you very much.

In your scene tree, it looks like there's a second donut that is hidden. Objects that are hidden in the viewport will still show up in renders. Either delete it, move it off camera, or since it is already part of a separate collection, "disable" the collection by un-checking the box.


Baking Sound to F-Curve with Python on Pre-Existing Objects Ok, so I've been loosely following this tutorial:

http://cgcookie.com/blender/2011/06/02/building-an-audio-visualizer-in-python/

However, my model is very different and because I'm not making a simple stretchy rectangle, I modeled the mesh I want to animate, (It's still only being animated by changing the Z scale), beforehand. It's actually a series of identical meshes, but each will represent a different set of frequencies from the sound, very similar to the tutorial above. The meshes are names as follows: "Fence.000", "Fence.001", "Fence.002", ... "Fence.014".

I'd like to point out that I have programming experience in Java, PHP, HTML, and JavaScript, however this is my first time with Python. Here's my script:

import bpy;

count = 15;
lo = 0;
hi = 15000;
step = (hi - lo) / count;

for i in range(0, count):
    name = "Fence.0" + ("0" if (i < 10) else "") + str(i);
    bpy.context.scene.objects.active = bpy.data.objects[name];

    bpy.ops.anim.keyframe_insert_menu(type = "Scaling");
    bpy.context.active_object.animation_data.action.fcurves[0].lock = True;
    bpy.context.active_object.animation_data.action.fcurves[1].lock = True;

    bpy.context.area.type = "GRAPH_EDITOR";
    bpy.ops.graph.sound_bake(filepath="/Users/Andrew/Desktop/Trap.mp3", low=(step*i), high=(step*(i+1)));

    bpy.context.active_object.animation_data.action.fcurves[2].lock = True;

bpy.context.area.type = "TEXT_EDITOR";

What I'm struggling with is getting an object that exists already and setting it up in a way that the line

    bpy.ops.anim.keyframe_insert_menu(type = "Scaling");

can access it. After googling and lots of copy and paste, I've ended up with the above. However, it still complains about an error, and the error message coming out is:

Traceback (most recent call last):
  File "/Users/Andrew/Graphic Design/dancing fence.blend/Text", line 15, in <module>
  File "/Applications/Blender/Blender.app/Contents/MacOS/2.71/scripts/modules/bpy/ops.py", line 188, in __call__
    ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: No suitable context info for active keying set

Error: Python script fail, look in the console for now...

I know to anyone experienced the above code probably looks like it was written by a 5 year old, but I would love it if someone could explain to me how blender works with python, (The documentation I've been able to find has all been worse than terrible.), and maybe even explain to me how my own code works. (Eek, that's never a good sign. :( )

Thanks.

What I'm struggling with is getting an object that exists already...

You get the objects from bpy.data.objects:

obj = bpy.data.objects[obj_name] #where obj_name is the key / object's name

#in this case
for i in range(count):
    obj = bpy.data.objects['Fence.%04d' % i] #formatted string

    #set the keyframe
    obj.keyframe_insert(data_path="scale", frame=1)

Some links:

Add keyframe to a scene property
Python tutorial and documentation
String Format Syntax
Blender Python API documenation