The fastest way to recreate buildings from real world cities in Blender I found a lot of interesting tutorials about how to import terrains from the real world into Blender.

For example,this : tutorial 1 or this : tutorial 2

What about the buildings of the cities?

A friend told to me you can use another approach to import your city map into Blender. You can make a screenshot of the place, you wanna use and using Adobe Illustrator or Inkscape turn it into vector graphic (.svg) and import into Blender.

I did something better than that. I used the tool Maperitive, selected an area on the OSM and then I converted the file to .dae format, this is the result that I get :

As you can see, there is no separation between the vertices, so when I extrude the points this is what happens :

It's not good at all. I know that I can go on the Open Street Map web site, select an area, export it to OSM file and then import it in Blender, but the problem is that a lot of areas (including the area where I live which is my biggest interest) aren't mapped; because when I try to import it I see only a small geometry.

So, what's the fastest and nicest way to do this?

Thanks.

Go to OpenStreetMap, and make sure you are using the default layer on the right-side menu.

Use the Share Option, then on the lower part use the SVG (or PDF) option to export the visible area. Adjust the scale before exporting if you want any semblance of metric precision or accurate measurements

Either import it directly into Blender, or if you wish do some cleanup in Inkscape and remove unwanted or unneeded parts.

You can then easily extrude buildings directly as curve or convert to mesh for more complex or detailed modelling.

Have in mind that it still requires the desired area to be mapped and have actual building information.


How to get started with Python Coding in Blender? I want to start programming to help me in my artworks, and don't know python. However, I can pick languages quite easily. Where should I get started and what's the software I need? Plus, if I want to develop the Game Engine, will I need C++ programming knowledge? I want to become a developer for the game engine.

Many times as you know more about Blender you will need less Python.

In Blender use the Python console window and execute your python from a text window.  Note that tool tips show Python references.  See text output in the Blender console window. One small project suggestion is to print out the names of the Blender Objects in the console window.

Python.org site can be incrementally read and searched via the internet.  There are certainly free videos and texts on the internet, with and without Blender.

Here at Stack Exchange there is a Python group.

Note that in Blender the [info window] shows Python for many of your user actions so you can observe and customize.

If you want to reinvent the 3D Wheel and get Python experience, pick a small project such as one that has many scripts and solutions already, so one may refer to known solutions.  Here is one idea.  Write Python to change the content of a [text] object over time from a Python list of strings.

Know that Node programming exists for the Compositor and Materials et cetera.  There is also BAN  ... Blender Animation Nodes.  There is also the driver feature of Blender which use Python.  One small project might be to animate the visibility of two objects based on the visibility of a third object.

I am not addressing the Game Engine in particular.


in Game Logic, can Object A use Object B's sensor? Is there a easy way for Object A to use Object Bs sensor using the logic bricks? or do I need to have an always sensor on Object A, and run a custom python script?

Maybe I'm reading this wrong, but, it looks like you just need to select both objects, and connect the sensor from objectB to a controller from objectA.


How can I align an object in a discrete sense to the camera orientation? I don't want to move the camera to follow an object, but I would like to place an object using the currently selected camera.

The obvious use case is position text. 2D text could obviously be added in another tool (like Gimp). Other use cases could be aligning an object perpendicular to the camera (like a perspective gauge arrow).

The most obvious way is to align the object upon its creation. The option Align to View is present on all object creation operator's property, I use this mostly for text object. It will align the object's rotation to whatever active view perspective when the option is checked:

When that's not possible, sometimes I use a bit of Python, too, assigning the camera object's rotation_euler to the object to be aligned. From Python shell:

C.object.rotation_euler = C.scene.camera.rotation_euler


How do you use your system's Python with Blender? As the title sais; I'd like to use my system's Python with Blender, instead of the internal one, but after searching for ~30 minutes I still couldn't find a way how, or at least not in words I understood.

$ blender --python-use-system-env
Allow Python to use system environment variables such as 'PYTHONPATH' and the user site-packages directory.


How do you restrict the left click rate in the game engine? In my game I have an action performed whenever the left mouse button is pressed. Is there a way to restrict how fast the player can click? Right now the event will trigger as many times as they can press the button, but I would like to put a cap on that so that the action can't be spammed so many times per second.

You can create a timer property in the logic editor panel and name it whatever you want. Say - "dTimer". Now when your game runs it will run. And in your python script do like this -

if mouse_click.positive and own["dTimer"] >= 2: #2 seconds
    #do whatever you want
    own["dTimer"] = 0 #Reset the counter to zero

As soon as you reset it to 0, it will start the counting from 0 again. You can debug the property if you want.


Getting rid of the little (+) buttons for a clean window I wanted to have a second window (with a 3D View) totally clean for projection.

Anyone have any idea how to get rid of the little (+) buttons on the side, the ones that show up when you press T or N key to hide the side toolbars?

Editing the code and compiling Blender again, I guess.
Could some one help me or point me the way.

2.79

Duplicate the area into a new window.
View ‣ Duplicate Area into new Window
OR
Duplicate a window with ⎈ Ctrl⎇ AltW
Info area ‣ Window ‣ Duplicate Window
Then, Toggle Area Fullscreen ⎇ AltF10. View ‣ Toggle Fullscreen Area
Eliminiate additional 3D View icons in the User Preferences ⎈ Ctrl⎇ AltU under Interface ‣ Display (on the left)

2.8

Although the manual says the same as in 2.79. The Toggle Fullscreen Area is somewhere else in 2.8 (2018-10-12).

3D View Menu: View ‣ Area ‣ Toggle Fullscreen Area. ⎈ Ctrl⎇ AltSpace


Problem Exporting Lattice Deform + B-Bones + Shape-Key Drivers I am not too advanced in all this, and my problem has really stumped me.
I have created a couple of characters from VeggieTales, using B-Bones, shape-keys, and Drivers to animate the mouth and a lattice deform to "rig the eyes". Here's what I've got:

I'm planning on using B-Bones as well to animate the whole body.
My problem is I want to be able to export these characters and import them into other Blender projects - maintaining the rigging and bones, etc.
I've tried exporting it on every format available in "File->Export", and none of them will import the object with the Lattices and the Bones + shape-key drivers, etc. Some of them even don't export everything in the scene (the eyes, for example, disappear).
I'm wondering if there is a way to export such an object, maintaining parenting, Lattices, Bones, shape-keys, and drivers?
Thank you very much!

Well, my Blender instructor actually told me how to fix this problem, so for those of you who are experiencing this same dilemma, try this:
Instead of exporting the file, just save a file with ONLY THE CHARACTER. Then, open the scene you want to "import" the character into. Go to File->Append. Here, find you blender file with the character, and click enter. Then, go to the "Object" Folder, select all with the "A" shortcut key, and click "Append" in the bottom right hand corner. That's it - the character, with the armature, lattices, and EVERYTHING is imported to your new scene!
Sorry about this. I hope someone else has this question, and finds this answer helpful! :D


My VDB from embergen is blocky and pixelated apparently I have exported my vdb from embergen, and I have imported them to blender, they seem to be too blocky and pixelated, I have spent hours on trying to find a fix but no sauce. Any help will be appreciated!

Try increasing the samples and/or decreasing the tile size in the Volumetrics Settings in the Render Properties tab. Start and end work to increase resolution as well, however these settings modify the volume visibility based on camera distance, so be careful that your camera will remain within the distance range:


The rendered images differ from the images in the toggle camera view I am using an orthographic camera. Why do the rendered images differ from the toggle camera view? Please refer to the attachment. My images appear distorted. How can I make my rendered images the same as the toggle camera view? Thanks in advance.
Chen

The difference is due to different lighting. Currently the viewport shows objects in studio lights but the rendering happens in sunlight. To see the rendered image in viewport: Change Viewport Shading to Rendered:


Modelling one irregular surface to fit against another I'm currently modelling a sofa.  Each seat has two cushions, a horizontal one for sitting on and a vertical one for back support.  Both have been deformed with sculpting and proportional editing to give them a used look.

I want one cushion to sit on top of the other with the bottom of the upper cushion deformed to fit the contours of the cushions underneath.
So far I've been achieving that by placing the two meshes so they intersect, then pulling up the individual vertices of the upper cushion using snap to face so that they follow the form of the lower cushion.  See included test render.

This works, more or less (as you can see from the included test render there are a few places where the two meshes still interfere with each other and the line vanishes), but is annoying and slow, plus getting enough distance between planes to allow Freestyle to draw a line without them looking like there's a gap is a process of trial and error.  There has to be a better way of achieving the same effect.  Is there a way you can get Blender to deform one mesh so that it fits properly against another?

I am aware that you can just push one mesh through the other, but I'm also using Freestyle on this project, and Freestyle apparently can't render lines where meshes intersect, so the two meshes have to sit flush to each other and not pass through each other or there will be no line in the final output.

Use the Shrinkwrap modifier with vertex groups.
Select the cushion you want to deform add a shrink wrap modifier, in the target option select the second cushion, change the order of the modifier to make sure the shrinkwrap modifier is below the subsurf modifier, then in edit mode (for the first cushion) select the vertices thats touching the second cushion and add them to a vertex group(go to object data properties, select the plus sign under vertex group, rename the group if you want, then with the desired vertices selected in edit mode click on assign), deselect everything and click the select button under the vertex group option to make sure only the desired vertices are part of the vertex group, then in the shrinkwrap modifier, under the vertex group options select the vertex group you just created.
And you should be good. Just make sure not to move the second cushion cause it is using it as a reference, if you do the first cushion would get distorted.


Pass collectionProperty through operators (Blender 2.8) I want to pass some created objects by an operator to another operator for modifications.
I tested with CollectionProperty, but can't pass the collection from the first operator to the second one:
TypeError: Converting py args to operator properties:  OBJECT_OT_called_op.selItems expected a each sequence member to be a dict for an RNA collection, not SceneSettingItem

What is the problem here ? (Maybe, there is a better method to pass a list of objects).

import bpy

# Assign a collection
class SceneSettingItem(bpy.types.PropertyGroup):
    name = bpy.props.StringProperty(name="Test Prop", default="Unknown")

class CallerOperator(bpy.types.Operator):
    """caller"""
    bl_idname = "object.caller_operator"
    bl_label = "Simple caller Operator"

    def execute(self, context):
        #Assume we have some selected objects :
        selected = bpy.context.selected_objects

        # Create Collection :
        bpy.types.Scene.my_settings = bpy.props.CollectionProperty(type=SceneSettingItem)
        # clear collection:
        bpy.context.scene.my_settings.clear()
        # add in collection:
        for obj in selected:
            my_item = bpy.context.scene.my_settings.add()
            my_item.name = obj.name

        # pass collection:
        bpy.ops.object.called_op(selItems = bpy.context.scene.my_settings)
        return {'FINISHED'}

class CalledOp(bpy.types.Operator):
    """called"""
    bl_idname = "object.called_op"
    bl_label = "Called Operator"
    selItems : bpy.props.CollectionProperty(type=SceneSettingItem)

    def execute(self, context):
        #read collection
        print ("collection = ",self.selItems)
        for obj in self.selItems:
            print(obj.name)

        return {'FINISHED'}

def register():
    bpy.utils.register_class(CallerOperator)
    bpy.utils.register_class(SceneSettingItem)
    bpy.utils.register_class(CalledOp)

def unregister():
    bpy.utils.unregister_class(CallerOperator)
    bpy.utils.unregister_class(SceneSettingItem)
    bpy.utils.unregister_class(CalledOp)

if __name__ == "__main__":
    register()

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

Thanks to batFINGER's comment, here is the working code: no need to pass arguments here, when calling operator : if it's stored in Scene, we can access to collection through context:

import bpy

# Assign a collection
class SceneSettingItem(bpy.types.PropertyGroup):
    name = bpy.props.StringProperty(name="Test Prop", default="Unknown")

class CallerOperator(bpy.types.Operator):
    """calls"""
    bl_idname = "object.caller_operator"
    bl_label = "Simple caller Operator"

    def execute(self, context):
        # Assume we have selected objects :
        selected = context.selected_objects

        # Create Collection :
        bpy.types.Scene.my_settings = bpy.props.CollectionProperty(type=SceneSettingItem)
        # clear collection:
        context.scene.my_settings.clear()
        # add in collection:
        for obj in selected:
            my_item = context.scene.my_settings.add()
            my_item.name = obj.name

        # call operator:
        bpy.ops.object.called_op()
        return {'FINISHED'}

class CalledOp(bpy.types.Operator):
    """called"""
    bl_idname = "object.called_op"
    bl_label = "Called Operator"
    #selItems : bpy.props.CollectionProperty(type=SceneSettingItem)

    def execute(self, context):
        #read collection
        print ("collection = ",context.scene.my_settings)

        for obj in context.scene.my_settings:
            print(obj.name)

        return {'FINISHED'}

def register():
    bpy.utils.register_class(CallerOperator)
    bpy.utils.register_class(SceneSettingItem)
    bpy.utils.register_class(CalledOp)

def unregister():
    bpy.utils.unregister_class(CallerOperator)
    bpy.utils.unregister_class(SceneSettingItem)
    bpy.utils.unregister_class(CalledOp)

if __name__ == "__main__":
    register()

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


Python render script different outcome when run in background When running my bpy script from command line with the argument -b (background mode) I get a different size of the image vector I want to render than without the argument. Did somebody encounter the same problem already?  For better explanation here is the code:

scn.render.resolution_percentage = 100
scene.use_nodes = True
tree = scene.node_tree
links = tree.links

# create input render layer node
rl = tree.nodes.new('CompositorNodeRLayers')

# create output node
v = tree.nodes.new('CompositorNodeViewer')
v.use_alpha = False

# Links
links.new(rl.outputs['Z'], v.inputs[0]) # link Z to output
scn.render.image_settings.color_mode = 'BW'
bpy.ops.render.render()

# get viewer pixels
pixels = bpy.data.images['Viewer Node'].pixels

Render settings are 520x424 pixels defined in the blend file.
in the command line I use the following cmd:

blender -b ...\Blender_Animation1.blend --python ...main.py

when I check the variable pixels i get different lengths depending whether I use the b or not. Without b I get  881920 values ( 1 pixel = RGBA -> 520*424*4 = 881920) which is correct. In the other case I get much less. Did somebody have the same problem already and knows what causes this error?

Rendering of viewer nodes and previews in background mode was disabled in 2013 for speed optimization (see here). However, you can easily enable it again by modifying 2 files of the blender sources and compiling blender yourself (as described here).

In the file source/blender/compositor/operations/COM_ViewerOperation.h, line ~58:

bool isOutputOperation(bool /*rendering*/) const { if (G.background) return false; return isActiveViewerOutput();

should be changed to

bool isOutputOperation(bool /*rendering*/) const {return isActiveViewerOutput(); }

and in file source/blender/compositor/operations/COM_PreviewOperation.h, line ~48:

bool isOutputOperation(bool /*rendering*/) const { return !G.background; }

should be changed to

bool isOutputOperation(bool /*rendering*/) const { return true; }

After these changes, the pixels array gets properly updated in background mode.


How to select different objects and name them in blender 2.76b I am new to blender and learning from a few tutorials. But the tutorials are of the older versions. I am having difficulty selecting and naming different objects. If I want to select a particular object, how will I do it?

In Blender, by default, selection is done by right clicking on an object.  (It seems weird but there are some good workflow reasons for this.)  You can change this under File > User Preferances (or Ctrl+Alt+U) > Input tab.

You can change the name of an object at the top of the Object properties tab.


How can I properly make a hand take a pose? I created a very simple hand model and I'm trying to rig it to make a fist out of it. But when I do make that pose, I see a lot of weird deformations on the fingers. I tried to play with weight painting, but I can't get the result I'm looking for.

Here is the hand model:

The rigging I did

The deformation I see on the fingers

Your model will deform better just by adding more resolution. For example you can have 2-3 loops on the joint intersection. After that there’s the option of using shape keys, which works well for hinge joints (one axis of deformation). For multiple axis you need more shape keys, check out my other answer on this topic.

edit:
As a note, you could also reduce some bones in the base hand. For simplicity sake, you can only have one for the 4 fingers and one for the thumb. However, in reality you have some mobility at the smaller finger and ring finger metacarpal bones. Also the thumb has only 2 phalanges and one metacarpal bone.


Compositor Effects in Video Sequence Editor. Adjust global brightness/contrast Is there a way to globally adjust the brightness/contrast or add bloom in the video sequence editor?

Using Blender 2.79, and creating a video sequence from image strips. There are 20 or so strips so using compositor nodes or equivalent would be faster than adding effect strips to each clip.

Trying to use the compositor nodes like in still frames, but the compositor node doesn't seem to be changing the output. With the brightness and contrast settings enabled, the background in the video will be black.

Update

As atomicbezierslinger suggested, rendered the video to frames and used those as the input on the compositor. Works, very easy!

Bloom. White Range bleeds and blends onto other areas

Compositor and Render windows in Blender
The 3D View Composited Rendered image can be input to VSE.

Above image shows the Render Layers allows the user to select another scene.  The Input node in yellow is for a sequence of images. It is not yet connected but it can replace the Render Layers Node as input. 88 seconds of work or less.

The VSE rendered image can be input to Compositor.  Any Rendered image can be Composited in a different Scene.  Similar to GIMP or Photo????
Some Blender Users may need to create an image sequence in intermediate stages.   Next those images are used again in another scene.  This may or may not be acceptable.  The question of one scene using another scene may arise, or these steps can be manual.
Note the Render Layers Node has an entry for a Scene.  Thus one scene can reference another scene.  This answer will not focus on that useful feature of Blender.  That may be a new question about that feature.
[Scene A] may produce a sequence of PNG or other format images on some storage device.  [Scene B] can read those images and produce new image to write to storage device. Device is hard disk, flash drive or other.  [Scene B] might have a text object, which is not rendered, reading [See The compositor]
Click image to see larger image.
Please verify and improve Compositor Nodes

Yellow arrow shows Compositor is enabled


GPU + CPU rendering (2.80) Is there a way to concentrate all the CPU power into one single tile, via settings? And ideally the CPU would be used at %100.

While rendering CPU + GPU, I noticed the CPU slows down the render using the default automatic tiles and threads(12) settings. (I've got 3 GPUs)

Many thanks.

You could choose to use 1 thread, but that is a really bad idea. It will render slower and will not use the CPU to its full potential.

Try to optimize the tile size instead. Try small sizes like 16x16 as well. Don't worry about the GPU - GPU rendering is a lot more optimized for small tile sizes in 2.80.

See what uses the CPU most efficiently and renders fastest. You cannot use multiple CPU cores on one tile efficiently.


How do I use Add a Keyconfig Preset? In the Preference > Keymap
It says Blender v + -
So I press + There's a dialog that asks for a name of the new keyconfig preset.
I type a new name, I call it "Swap MMB"
I make the changes in the shortcuts.
It behaves like I want.
But when I go back to "Blender" in the list, it has also changed to the same modifications I did with "Swap MMB"
Changing from one or the other does not swap the keyconfig. As if they were both the same. If I reset the Blender key config my "swap MMB" also resets. So I must be doing something wrong.
How do I use Add Keyconfig to make my own custom keyconfig and keep Blender's default keyconfig unchanged?

Blender is not a preset it is only what Blender has become.
If you make a custom keyconfig and call it "Swap MMB" and change keyconfig that is what Blender and Blender 2 7 X and others are now.
In order to change everything back to default you have to make a new entry and call it something else. EG "Default" change all of keyconfig back to the original configuration, now all Blender and Blender 2 7 X and others are also.


Metalic textures not rendering I have a problem with eevee render: it shows the metal reflections in the viewport but not in the final render. What is wrong?

Moving the camera away helps, but the metal on the object still has no reflection maybe I should have an background image to reflect something...

This changes not much. I post my shader settings I followed in a tutorial earlier maybe the problem is there.

Yes,I feel nothing to reflect might be your problem.

You can use an HDR to check reflections and lightings. Just a google search would help, or just go to https://hdrihaven.com/ or http://www.hdrlabs.com/sibl/archive.html

You can get some free HDR and just plug the .exr into "world" shader-node.

This would solve issues if some are there with your scene itself.

You can also try checking the screen-space reflections box in the render options. Might help. I would uncheck half-res to hoping that no half-res makes it full-res.


I want to texture parts I have modeled in CorelCAD I have created models of a part that I created in Corel CAD. I have been trying to add texture to the parts but I can't get it to look the way I want it too. The parts are made of wood. Since the part is made of different pieces of wood. I am trying to get the wood grain pattern on the part to go in the right direction. when I unwrap the UVs only a couple of areas look the way I want them too. I have been trying to create faces on my models to separate the areas where the wood grain is going in a different direction but I haven't been successful. I am importing my models as STL files and trying to edit the mesh but nothing seems to work. Can anyone help me?

I included a picture of my part and its mesh
Also my attempt to add a white oak texture.

Your immediate concern

You want to unwrap the model but when you unwrap a model by default it is trying to give you what it thinks is the best two dimensional projection it can for the model you provided.

If you want to have the wood grain aim a certian way you will need to manually rotate the UV "Islands" in the uv editor to match the orientation you want. You may also need to scale or translate the islands so that the grain looks the same size etc.

Selection of Individual UV Islands

By default, the UV editor will only show the UV map for faces that you have selected in edit mode. This can be used to your advantage.

Select the faces that you want to have the wood grain oriented in a particular way in the 3d editor window.

Select the areas you want to modify in the uv editor. To have the effect you want, you will need to select whole faces.

In uv editor window and you can use R to rotate, S for scaling and G to translate the UV islands in the image editor.

You can choose from several "uv selection modes" in the uv editor, but the default is vertex so I will assume you are using that mode.

If you select only faces you want to rotate at once from the 3d view, you can use A in the UV window to select the UV islands for them.

You might also find CTRL + L useful. This shortcut selects every visible "linked" piece of geometry. It works in the 3d view or on the UV editor. So if you select one of the vertices in the uv editor and press that combination of keys, you will select all the linked UV islands.

Final thoughts:

Blender is very useful and fun software but it does have some learning curve to it. It sounds like you might be new to UV editing in blender as well.

In addition to this answer I'd recommend looking for some tutorials on the topic because they might help you in the long term.

Blender Guru (AKA Andrew Price) has a tutorial in some of his begginners series that is pretty useful for understanding some of how to unwrap particular kinds of geometry.

Here is a link: Begginer UV tutorial


Transparent Image As Plane While In Sculpting Mode I want to use images as planes to assist with sculpting. Sometimes images that I have to use are not straight on and having a plane allows me to align the mesh to the angle the image is in.

So far...

1. I've imported the image using the import image as plane add on.

Now I want the image plane to be transparent.

2. I hit 'n' key and change image plane shading from textured to GLSL.

3. I change the viewport shading to texture.

4. Under the materials tab for the image plane, I've changed the transparency.

All it good at this point because the image is now transparent.

The problem is when I...

5. go to sculpt mode...

the image is no longer transparent. How do I keep it transparent in sculpt mode so I can use it as a reference image?

Enabling X-Ray on the Display panel for the plane will keep it transparent in sculpt mode.


How to print a list of enumerated items in Python Let's say I want to create a new bone constraint in a script. Blender then tells me that it wants to know which type of constraint I want to create.

Can I print a list of all possible types? I know I could reverse engineer the names by creating the constraints and reading the types, but I'd like to have a more general solution.

So, is there something like print(dir()) that does the job?

To answer your question, you can print a list like this:

print(bpy.types.Constraint.bl_rna.properties["type"].enum_items.keys())

But in this case I'd suggest to use Blenders documentation.

Note that this is Blender specific, Python doesn't provide a way to list possible valid values for an attribute.


Can't move object along certain axis after declring #frame in transform field I can't move the torso of a character after declaring #frame, then -frame * 0.3 in the y position field of the transform.
I have tried to move the torso with G and to change to y value.
I don't know what to do. Any suggestions?

You have two options. You can just remove the driver and move the object or you can give your object Delta Transform on top of your driver.
To delete the driver right click the y-location field and select Delete Drivers. This way the #frame Driver won't affect your object anymore.
Delta Transform can be found under in Object Properties under Transform and Delta Transform. This way the Driver still affects your object but you can still transform your object.


Add-On Dev: Popup Panel Position Is there any way to control the starting position of a popup panel / window?

I'm not familiar with the number of floating panel types in Blender, but I'm creating mine with an operator class, using bpy.context.window_manager.invoke_props_dialog(self,width=600) in invoke().

The default starting popup location seems to be related to the mouse cursor or activator button location. The problem occurs when the button to open the popup is near the bottom of the screen. The popup opens into the bottom right corner. I don't need to specify the exact location. But if possible, I would like to have it open somewhere near the vertical center of my standard side panel.

Hello from the future,
If we have us some properties on our operator, like so:
from bpy.types import Operator;
from bpy.props import IntProperty;

class MYADDON_OT_my_operator(Operator):

    bl_idname = "myaddon.myoperator";
    bl_label = "Pop!";
    bl_description = "Spawns a pop-up";

    # using annotations for 2.8+
    # change to equal signs on previous versions
    first_mouse_x : IntProperty(default = 0);
    first_mouse_y : IntProperty(default = 0);

    target_mouse_x : IntProperty(default = 0);
    target_mouse_y : IntProperty(default = 0);

    mouse_snap : BoolProperty(default = False);

Then we can save the original position of the mouse during invoke.
    def invoke(self, context, event):

        # assign position of the cursor at the time the operator is called
        self.first_mouse_x = event.mouse_x;
        self.first_mouse_y = event.mouse_y;

        # probably redundant but i can't recall if props actually reset to default
        self.mouse_snap = False;

        # now warp the mouse to some xy coords
        # here i center on the window and adjust y to approx. the height of my popup
        context.window.cursor_warp(context.window.width/2, (context.window.height/2) + 60);

        # now invoke
        wm = context.window_manager;
        return wm.invoke_props_dialog(self, width = 600);

Next thing on the list is resetting the cursor to the original coordinates. I do this on the first run of draw and haven't really noticed any jumpy motion on the cursor.
    def draw(self, context):

        if not self.mouse_snap:
            self.mouse_snap = True;
            context.window.cursor_warp(self.first_mouse_x, self.first_mouse_y);

That gets you back where you started.
But wait, there's more! As a bonus, you can also pass the xy coords to the operator from your panel's draw.
    def draw(self, context):

        layout = self.layout;
        row = layout.row();

        # this gets you a handle to the operator properties
        props = row.operator("myaddon.myoperator");

        # now just assign them values as you would
        props.target_mouse_x = some_x_coord;
        props.target_mouse_y = some_y_coord;

It's a barebones example, but hopefully a good starting point for anyone else that google-wanders in here like I did. ;)


How can I repeat a group of animation phases I am building an animation of a machine where various parts move along paths in turn. So far I have done this without any armatures. I was hoping to string several cycles of operation together, and modify object parameters (using python script) for each machine cycle.

From previous questions, it seems that the NLA editor can't work with groups of actions associated with multiple objects - so maybe the best I can achieve is to write a script to step and repeat the keyframes for all objects? Alternatively, is it possible to render-time transpose my keyframes on the fly at the end of the cycle, or programatically render frames 1..300 twice (with some tweaks) to achieve 1..600?

There are two reasons for wishing to automate the process. Firstly, it would allow me to generate any number of different cycles based on a small number of parameters (my first trial has 5 cycles of 300 frames). Second, as I have already discovered, defects in my base model only become obvious after I made and modified 5 copies of the basic cycle.

(for what its worth, I'm not an artist - just trying to find a good way to demonstrate how the machine works)

Does it need to be programmatic? If not, select one of the objects, select the keyframes (in the graph editor) in frames 1-300:

Hit Shift+D to duplicate the keyframes
Then hit G and 300
Then Enter to confirm the operation

This will duplicate the exact keyframe in 1-300 and move the duplicates to 301-600.

If it is more complicated than that, perhaps you might update your question with more details on exactly what you are attempting to accomplish.


Render Border's related check boxes - How do they work? Render Border,

is a great little function for reducing render time while experimenting, but what does the 'Render Border' check box in the Properties >View panel do - apart from turning off the red border when un-checked? (there is no Manual reference to this)

Also, after setting a Render Border, in the Tool Shelf >Set Render Border panel, there is a 'Camera Only' check box:

I have tried many different combinations of these with renders, and the result is… confusion! Can someone please clarify this for me?

Expanding on sambler and Aldrik's answers,

Enabling the Border setting in Render settings > Dimensions enables border for the rendered image and sets the camera bounds as the Camera Border.

As you can see, in the Viewport render with Border enabled, only the part of the scene visible to the camera is rendered:

With Border disabled, everything is rendered:

Viewport border:

Ctrl+B (or View > Render border) sets region in the 3D view that will be rendered when the Viewport shading is set to Rendered (this can be toggled in 3D view > Properties Panel (N) > Render Border

(Useful for making the part of the scene you want to see converge faster by not rendering other parts)

As mentioned by sambler, the Camera Only setting does not seem to make any difference (bug?)

Rendered Border:

Using Ctrl+B or Shift+B in the Camera view will define a region in the camera that will be rendered while the rest of the camera will not (if Render settings > Border is not already enabled, doing this will enable it)

As you can see, the rendered image only rendered the border selection and left the rest as black (or transparent, if you have your render settings set to RGBA in a format that supports transparency)

The Crop option  crops the black part off automatically:

(Note that disabling the Border setting in Render Settings > Dimensions or in 3D view > Properties > View will not erase the border selections)
Pressing Ctrl+Alt+B will clear all the borders and disable the border setting in Render settings and the Properties panel.


Create a displacement map from high-res terrain to use on low-poly terrain I have a high and low poly version of a terrain. The idea is this

low_poly_terrain + displacement.exr  =  high_poly_terrain

I want an displacement images map that I can apply to the low poly terrain so that at render time the two are indistinguishable.

Alright it took me some time but I figured it out.

The end result will look better if we use plane instead of a low poly version of the terrain.

A. messed up version

B.Replace the low poly version with simple plane (keep it in the same place though)

So, with the plane selected, move the plane below the high poly version.

Select the plane and assign a material to it, the default material will do. Next go to the texture tab and create an image. Change the resolution to something you want. Also enable 32 bit float for precise displacement.

Next up, unwrap the plane (edit mode > top view > unwrap > project from view (bounds)). Make sure in the uv window you select the displacement

Next up, bake settings. Make sure you're using Blender Internal, not Cycles. Set the Bake mode to Displacement. Enable Selected to Active and set the distance to the distance between the plane and the highest point of the high poly mesh ( I just eyeballed it), 0.300 in my case.

Final Result


Shear in Object Mode not working As far as I understood, I can use transformations in Object Mode as a non-destructive way of applying translation, rotation, etc.

I want to do exactly that with a shear transformation, so that I can edit my mesh later on before it was deformed.

However, whenever I try to shear (Object -> Transform -> Shear) my standard 3D cube, I cannot see that the shearing has any effect on the object regardless of the value or axis entered. Translation, rotation, and scaling works fine, however, bending also does not work.

I do not have this problem in Edit Mode, but I prefer to have my object remain straight if I want to go back and make changes to the object.

Is it possible to shear an object in Object Mode?

Shear in object mode is not intended to shear an object mesh but to shear several objects from their locations.

But you can use a 'lattice modifier' in order to shear an object in non destructive way:

Above on left an object sheared in edit mode.

On right, another one with a lattice modifier. The object is not sheared but the lattice is itself sheared in edit mode.

To do it:

Place a lattice at the object location.
Add a lattice modifier to your object and set the lattice as 'object' in the modifier.
Enter edit mode for the lattice.
Shear the lattice.


UV is Mapping to Multiple Meshes Can anybody explain why when I am in Object View, with Viewport Shading color set to "Textured", my UV map is correct for all the objects in my scene..

BUT when I switch over to LookDev Mode it maps the texture for one object over several objects? Attatched are pictures of Object Mode and LookDev as well as the blend file.

Any help would be appreciated, I'm at a loss here.

Blend file

Your bell, archway and other parts are all sharing the same material node tree which means the objects will all share the same pixels in the image texture. Separate them by pressing the '12' next to the material name'Stone arch' to create individual user materials that can be changed, or assign them new material altogether.


How do I increase line width in 3D Viewport? How do I increase the line thickness displayed in the 3D Viewport? The lines are simply too thin to see easily.

I changed my theme to "Back to Black" in the user preferences, and the higher contrast helps a little bit.

I am running 1920x1080 on a 27" monitor if that makes any difference.

Unfortunately there is (still) no setting for the thickness of the lines in the 3D view.

This is for 2.79 and up

One of the things you can do is change the Line Width to Thick.
Now that will make the viewport nice and visible, but also increase the thickness of every line in blender's ui.

The Scale changes the size of the ui elements. The interesting thin is with Line Width on auto, if the increase the Scale above 1.78 it will make the lines in the 3D view thicker, yet not as thick as the Line Width option make it.
This however also has some serious downsides, now blender is at a size that is just too big. You can decrease the size of each panel, but the headers will remain too big.

Line Width, and Scale is found in the Interface tab of the user preferences.


Subdivision Topology : Cut Triangle into Plane I have a simple plane of quads, and I am trying to cut a triangle into the plane (using sub-division).

I can kind of get it, although I end up with triangles, and it feels hacky.

I want the end result to be a plane with a sharp triangle cut into it. Any suggestions, or pointer to resources of how to cut various shapes using quads and sub-d? (I havent had much luck with google).

Example of what I am currently doing:

Triangle in Plane

https://topologyguides.com/ is a cool site that explores all sorts of topology issues.

First of all I'd try to align the edges of your triangle with the grid of the plane.

The rest of it depends on what the rest of your mesh needs.  If you just need a flat plane with a triangle cut out, I'd do something like this and take those extra verts straight out to the edges:

that's all quads except for the two triangles on the left and right sides.  It subdivides relatively well with just a little pinching at the corners:

if you don't want to extend all the way to the edges of the plane you can keep the edges relatively clean but close to the triangle:

:

It still subdivides ok, but a bit more pinching, and is more triangles and fewer quads:

There may be a better way, but this works for me. Definitely check out the link to the Topology Guides site, though, because it's a fantastic resource.


Geometry jitters while animated along path I'm having an issue with a path animation.  I have a root object, with a number of children, animated on the path.  My problem is, the further down the path I go, a jitter develops in the parented geometry.  I have linked a video of the problem.  http://sean.novak.us/vid/help/jittersAlongPath.mp4

Turns out, this IS in fact a floating point precision issue.  Not something to do with the math along the path, itself.  In an effort to keep my vehicle and camera near the world origin, I created a root object, parented my environment and path to it, then animated it's location to try to keep the vehicle near to 0,0,0.  It has helped a LOT!  Here is a video, outlining the solution and result: http://sean.novak.us/vid/help/jitterSolution.mp4


Eyes And Teeth Going Haywire With Rigify Rig And MakeHuman Model hope all is going well for you!

I'm having an issue where the eyes and teeth of a MakeHuman model do not quite work properly with a Rigify rig.

Simply put, I have no idea how to fix this.
If anyone can provide some insight concerning this, I would greatly appreciate it.
Also if anyone needs to poke around in the blend file itself, here is a link.

If any other details are needed, just let me know!

Thanks, and take care. =-)

Select the head bone in Pose Mode, then your mesh with RMB and press Ctrl+Tab. Hit Tab to enter Edit Mode (check the Show Weights in Display panel of the Properties Shelf [N] to see the weights), mark the head vertices (with B or C), then go to Object Data header and assign the 1.000 weight to the head's vertex group.

To solve the issue with eyebrows and eyes select the neck bone in Pose Mode and correct the weight values for each one.


splitting of screen areas and retrieving the active area with python I try to split the VIEW_3D  area of my screen (2/3 - 1/3), and to display in the 1/3
a file with the TEXT_EDITOR.

The problems are:

that the activate area seems not follow the area's iteration
the width of the new area created seems not to have been update. (0 is returned)

here is the code:

bpy.context.area.type = 'VIEW_3D'
orig_width = bpy.context.area.width
print("originale width of View 3D is : " + str(orig_width))
bpy.ops.screen.area_split(direction='VERTICAL', factor=0.3)
final_width = round(bpy.context.area.width * 0.3, 0)
print("Final width of View 3D is : " + str(final_width))
i = 0

for ecran in bpy.context.screen.areas:
    print(ecran.type)
    if ecran.type == 'VIEW_3D':
        print("Space.active = " + str(ecran.spaces.active))
        current_width = bpy.context.area.width
        print(str(current_width) + " - current_width")
        print("i = " + str(i) + " - " + bpy.context.screen.areas[i].type + "Width : " + str(bpy.context.screen.areas[i].width))
        if current_width == final_width:
            print(ecran.spaces[i].type)
            bpy.types.spaces[i] == 'TEXT_EDITOR'
i = i + 1

The script is executing from an addon in the context of 3d_view, called from the spacebar menu. It splits correctly but the Text_Editor is not displayed.

Your sample code is not actually changing any area to a text editor. At the end of your code you are comparing to the string 'TEXT_EDITOR' not assigning. While you go through the areas you won't find a match to final_width as you are setting final_width to 1/3 of the width of the active area after the split, you would need to calculate the width before the split to have a chance of matching it.

When splitting an area we don't actually get a reference to the new area. One solution I can think of is to copy the list of areas, split the current area and then find the area that didn't exist to start with, this leads to the following demo operator to split the view and change the new area to a text editor.

class SplitArea(bpy.types.Operator):
    """Split area to include a text editor"""
    bl_idname = "screen.split_area"
    bl_label = "Split area"

    def execute(self, context):
        start_areas = context.screen.areas[:]
        bpy.ops.screen.area_split(direction='VERTICAL', factor=0.3)
        for area in context.screen.areas:
            if area not in start_areas:
                area.type = 'TEXT_EDITOR'
        return {'FINISHED'}


Would 1 million faces/vertices be too much for Blender? I am working on an interior design which might end up with having 1 millions faces. I already have about 40k faces/vertices so far. While loading Blender in solid mode only takes seconds, it takes about 70s to render the whole scene in Material preview mode, which greatly slow down the efficiency of doing texturing. My strategy is doing the modeling and texturing for each single object in a separate blender project and append it once the object is complete but manipulating the whole scene is still inevitable, plus that I've only done about 1/20 of the whole work, I am just worried that the performance won't be acceptable then. The machine I am using is Microsoft Surface Book 2, below is the specs:
Intel Core i7-8650U CPU 1.90GHz
CPU cores: 4
16GB RAM
Intel® HD Graphics 620 integrated GPU (on Intel® i5-8350U model)
NVIDIA® GeForce® GTX 1060 discrete GPU w/6GB GDDR5 graphics memory
I am wondering if I need to get a better machine considering the fact that I might have 1 million faces/vertices in the end. Do you have any recommendation for the machine based on this requirement (or a better strategy)?

1 000 000 faces shouldn't be a problem.
High facecount by itself won't slow down renders very much, this isn't the 90s.
Viewport is slowed down by high memory - face count, high-res textures and complex shaders
Render is slowed down by high light-bounces, HDRIs, and complex shaders (glass, SSS)
To keep memory low (and viewport fast):

link objects, don't append them when building a scene
use lower Subdivision levels for Viewport
use Simplify in Rendertab to lower texture resolution for viewport


Is there a way to have one material for cycles and the BI Is there any way to make a material work in cycles and the blender internal?
I'm looking for a way to have only one material in the material slot, but a different material for cycles and blender internal.

Without material nodes
You can sort of do this by enabling and disabling material nodes. (note that you cannot use material nodes in your BI material with this approach)
For example:

Create a BI material:

Switch to cycles and enable material nodes:

Create a cycles material:

Switch to BI and disable nodes:

Your original BI material will appear unchanged.
With material nodes:
If you do need material nodes for your BI material, then you will have to create both the cycles material nodes and the BI material nodes in the same node tree:

Note that you can only add nodes for the render engine that is selected (though I think you can add any node regardless if you add them from python), so you will have to switch the selected render engine back and forth.


Random around empy (animation nodes) The following images show what I want to achieve with animation nodes.

So far I came up with this, but I have no idea how to combine them or if I'm on the right track:

Random transform & rotation

Transform and rotation around local axis

If someone can help me with this, I would be very grateful.

You can randomly distribute points in a circle with a generator. Don't forget to slice the last element since it will be the center of the circle.

Add your empty's position to translate your circle points.

Add your cube, scale it accordingly and apply the transform with CTRL + A. Then instance it and use the previous coordinates.

Add a random array of vectors for the rotation. You can tweak the seed in the node.

Add a vector wiggle node for location. You can tweak the seed and the evolution for a nice wiggle effect. You can also use this node for the rotation to achieve the same effect. Add a float input for the amplitude of the translation.

Add a relevant shader to the base cube :

Now make it wiggle !

Result :

EDIT : Actually I didn't answer the question. You can do the actual rotation several ways. Here's how I would do it :

Create a subprogram and rotate the cubes along the Y axis, then around the Z axis so that they face the center of the circle.

Actual result :


Imported .Obj has problem with texture export The problem is that when i have to export it, and later I import it the textures are gone, the model appears black (like in the image) and the game that  I want to export it to does not recognize the textures and they appear missing any solution (?)

It looks like you switched from Cycles render to Blender Internal render at some point (or maybe the other way around). When you import an OBJ, blender will automatically generate and assign materials to the models you imported, but the materials are generated only for whatever render engine you have selected when you import.

It looks like you imported the model with Cycles render enabled, then later switched to Blender Internal. Try just switching your render engine, then trying again, or redo the import/export process, making sure to keep your render engine the same.

I recognized this error because in one of your images, your material looks like some sort of sky texure-like thing, which is what happens when you switch engines and leave your materials the same.


Does anyone know how to successfully pack linked objects (not just textures) into a single .blend file? I have been trying to use SheepIt! render farm for a short animation. Unfortunatly, File -> External Data -> Automatically pack into .blend DOES NOT pack linked objects from other .blend files. SheepIt! gives a warning that those libary links are not in the file to process.

Does anyone know how to successfully pack linked objects (not just textures) into a single .blend file?

I know that this question has been asked by Louie:
How to pack all linked data inside the current .blend file.
Unfortunately he did not get a working soluion answer :-/

To quickly get all the linked data in one .blend file you can use Make Local command.

Select all the objects which are linked (or simply A to select all).
Press L and select All option. This will make all the objects, their data, materials etc. stored locally in this file, so create a full copy (in the same way as Append data, with only difference that you shouldn't search where to append from).

Note that you may want to save these locally stored objects as a new file so only to send it to renderfarm and not ruin linking of your original file.


Automating commands in Blender? Starting with Adobe line of products, actions gave me life-saving automation functionality, is there any similar thing like this packed inside blender? or are there anyone who's developed an addon?   cheers! :)

You can always look at your command history, open a Python Console next to it and copy/paste the commands.

If you want something more GUI-like, you'd have to get into a Python Addon.


Crowd Scene: Generating many characters with random clothing objects I'm working on a small crowd scene and trying to figure out the best way to set it up from a workflow perspective. I have addons or particle systems to place the characters, but I need to generate a bunch of characters to feed into those.

I need to place ~25 characters total. For that, I want to have a few unique bodies, and a few unique pieces of clothing, hair, etc. I will then mix and match to have ~25 unique combinations, even if they share a lot of parts. I'm looking for a way to avoid doing this manually. I also want to keep all the parts instanced, although it's not totally essential (but would be for bigger scenes.)

I'm looking to be able to do something like link/append a character, and each time I do it gives me a random body, shirt, pants, hair, etc from a group. I know it's possible to have a particle system use a random object from a group for each particle, but can it be done for something like this?

Does anyone know the proper way to do this, or something similar? Is this even the correct way to approach this problem?

EDIT: I am looking at making a script for this. I'm looking for the best way to approach it, or to get input from anyone who has made something similar.

If you're great at scripting, one way might be to use the shape keys. If you instance the objects and randomize the shape keys for different body heights and shapes and randomize the texture indexes, that probably should do it. With shape keys you can completely do a seamless remodel, so it might be good to start with... for example long sleeve, long hair- then model all other changes into shape keys.

It can do a final scene check in the strange event that two bodies match by checking first if any two parameters are the same, then continuing the check until it is negative. Switching a parameter if all parameters match two objects.


Blender finger weighting problem I'm trying to rig a character but one of the gloves won't rig properly: instead of following the finer the bone is on it follows the finger that is next to it how do I fix this?

I have the rig here

I didn't exactly understand what bone part is not following what instead of what, but I checked your file and R and L gloves are weighted completely different... if one glove behaves well, you should apply the same weights (eg see How can I mirror weight painting? or Is there any way to copy the weight of one bone over to another(forgot to use x-mirror)?)

Here is the comparison I did (I had to open twice your file in two different blender instances aside)


How to render Alpha background I downloaded a file from blend swap edit it and I tried to render it with alpha channel but whenever I does this happens

It look like it is rendering with alpha channel but it doesn't after when the rendering is completed this happends

You see when the render is completed there is a black background, what should I do.

The problem was caused because of the compositing pipeline what I did was just unchecked the use nodes checkbox and boom, Finally the render I desired.

If uses these render setting for transparent video render

Blender Version: 2.79c

Render Engine: Cycles

Render Format: .mov (quicktime)


What is the easiest way to animate beams of light in blender? I am having trouble doing stuff like this with light. I am trying to make stuff like this.

I can make a white Cylnder and model it into a beam shape, but i have no idea how to animate it. Any ideas or videos that could help me? Ive already tried how to animate abstract waves, but that didn't get me what i wanted.

If you just need a single beam you could use a simple curve object. Make sure to set the spline type to poly if you want all the corners to be sharp and jagged.

Then add a little bevel for thickness (this can be controlled per control point with the radius value), and then add a white emission material.

After rendering, you'll need to add some blur and glare effects in the compositor. Should get you closer to what you are looking for.

Bonus Round

If you want to animate the light beam, you need to add hooks to your curve control points. Go into edit mode on the curve select one control point, then type CTRL H and select Add Hook to New object. You'll see a small empty add to the position of the control point. Do this for all the control points. Then back into Object mode, you can now animate the empties to move the curve.

I found it easier to use Proportional editing mode set to Random with a large influence to move one empty and then have the other ones affected slightly as well. I did this on each frame for 5- frames then duplicated them in the Dope sheet a number of times.


My HDRIs + Shader Previews are dim/desaturated and it's affecting my material output Why does it look like this? This appears to be affecting both Eevee and Cycles in similar ways, although I understand the shader view is Eevee only. My Cycles previews are also very "bright" or desaturated. It is very hard to get any darkness into them. The HDRIs themselves look desaturated in the background.

If you set up this same shader it'll appear darker for you.
When I open a new project it goes back to the fully opaque look and my HDRIs are also fixed. I can obviously give up trying to fix this and just start a new project and import the assets but I prefer to know why this happened so I can fix it.

It looks like your View Transform has been set to Filmic Log. Setting it back to either Filmic or Standard should fix your problem.


Make hair fall without combing? I have an animal with hair like Suzanne's. Is there any way to manipulate the hair particles so they respond to gravity right off the bat?

Yes. You can run a dynamic hair simulation. In the Particle Systems tab in the Properties panel, check Hair dynamics.

Key Alt + A to play. The hair should fall. You can adjust the settings shown above to differ how it falls.

Further Reading

I learned my stuff from here. You can also look into the Blender Reference Manual and YouTube videos like this one.


Blender closes on "loading" complex geometry and entering/leaving local view Hello Everyone

I'm having an issue with a large project, and although I found a workaround, it's not ideal and I'd like to have a better understand of what is happening.

I've checked a lot of blender crash issues but I couldn't find anything related to this specific situation (it doesn't look like a crash, since it just closes).

I'm working on a complex architecture scene with more than 20 apartments, I got the original file from ArchiCad (or another BIM software) exported as an .obj, and I had no problem importing or whatever, I've been working on it for a couple of months now.

What I'm doing is mostly optimize geometry and UVs, then import each part to UE4 for real time rendering and VR. (just to let you know I'm not rendering in blender).

Due to the complexity of what I want to achieve in UE4, I have to work "on all fronts" and tend to keep different things on different layers, let's say:

Layer:

1 - Keep the original models there (4.7M tris)
2 - the original models with intended location and rotation (4.7M tris)
3 and 4 - mix of the models I'm optimizing (maybe 2M tris)
5, 6, 7 - Junk and not so important parts that might still be useful.

I work almost all the time with layer 3 and 4 on, sometimes I go back and forth to layer 2 to get specific details.

Now, what happens? Blender crashes very often in these situations:

1 - opening the project file - it doesn't open, it closes blender
immediately.
2 - leaving the local view - blender closes immediately.
3 - other things like right clicking objects in wireframe mode
(doesn't happen very often), let's keep this one as a side note.

I haven't found a solution but here's what I managed to do to be able to work on the file:

Most of the time I can open the file if I left it in local view, I made every object in every layer invisible and then I could leave local view just fine, and make objects visible again, HOWEVER, it still crashed a couple of times doing that.

I got all the objects visible again while in layer 3 and 4, but then I switched to layer 1 again and blender closed again. Then I tested again and it didn't crash.

My knowledge of what is happening is very limited (I know how to drive a car, I know nothing about mechanics or how to build one). But I'm assuming it is something related with this "loading" and "reloading" of geometry, as if it doesn't take its time to load, it just gives up and closes.

Some final notes:

It's a high end PC with i7-5960X@3.0GHz, 64GB ram, 2xSSD, GTX1080
latest Blender version, does not happen with any other project (much less complex)
Updated Windows 10, updated drivers
It doesn't look like a corrupted blend file, I've had that before, doesn't look the same.
I can't share the file.
The file is 1.1GB

I hope I'm providing useful and accurate information, this started happening a couple of weeks ago, and it's hard to keep track of everything that happens, let me know what other information I may provide.

If possible, I'll try and test it on my home computer and see if I have different results.

Thank you for your time and patience, appreciate your help.

I want to confirm that it was one object in the whole file that caused all this trouble, once I managed to locate it and delete it, the problem doesn't happen anymore.

@Duarte Farrajota Ramos, I tried to get the object to another file, but it will crash when I "paste" it on a new document and I can't append the file, I can't even go to edit mode, but I ended up deleting everything else and keep only that object.

Layer 1 has the original object, layer 2 has it in the "new" location and rotation and layer 3 has the faulty object, which was edited somehow. This geometry is "junk" and it's supposed to be deleted regardless, I don't think I'd bother to edit this geometry, since the original file had a lot of useless geometry for the purposes of real time rendering.

Thank you very much, I narrowed it down due to your input.

Cheers

-John

Blend File Download


Can I do more than ctrl z/ go back very far into my model? I really messed up with subdivisions and this is probably the fifth time restarting my model. I am very new to blender. I tried ctrl z but that could only go back a few times. Is there a way to either go back several times with undo or reload an older version of that file?
If it matters, my issue is that at first I had too many subdivisions, so I used ctrl e to unsubdivide, but it changed my squares to triangles and other shapes that are not sqaures.

Blender saves one (by default) backup version of the file when you save it. You can look in it (it's named whatever.blend1) to see if it has the version you want.

Also, Blender also saves a backup file as you work, every 2 minutes by default. You can use File > Recover Auto Save... to restore this and see if it has the version you want.

If neither of these work, you are probably out of luck this time. There are a few things you can do to keep it from happening again, though:

Increase the Undo Levels in Editing preferences, so you can go back farther. I use 256 myself, but you may want to try less if it makes you run out of memory.
Increase the number of .blendX backup files Blender makes, in File preferences. I use 32, but this may be too many for you.

After changing any settings, remember to press the Save User Settings button! Otherwise, your changes will not be saved.


Using different materials on each instance of an object with a mirror modifier Is it possible to have each instance of an object with a mirror modifier using different material? An example would be a door modeled only on one half, but where each side would be in a different color:

Or is applying the modifier permanently the price to pay in order to be able to do this?

You will have to go around the mirror modifier and create 2 copies of the door each with different material, but with the same mesh they share between each other:

Get rid of the mirror modifier.
For each material slot set it to be linked to Object:

Make an instance of the door with Alt+D. This will duplicate the object, but link the same mesh between them. More on this can be found here:

What is a Duplivert, or a Dupliframe, internally?
Scale one object in the axis you want to -1 to mirror. Arrange them accordingly.
Assign different materials to the material slot(s).


How to render a model with pixel art/sprite textures and have it not be blurry? I've made a model that's PS1-eqse in the vain of games like Mega Man Legends, but whenever I try to render it in Blender, it looks absolutely atrocious.

I've disabled Anti-Aliasing, turned off MipMaps in Blender Preferences, which DID make the pixel textures clearer, but only in viewport.
But it still looks awful.

Anything else I can do to make the render show the pixel textures clearer?

Turning of mipmaps is just a performance setting for the viewport, you need to change the interpolation method for each image texture.

In the image node on the second pull down menu change to Closest


2.8 - has the "slow parent" feature been removed? Has the "slow parent" feature been deprecated in Blender 2.8 ?
It was quite useful :/

Are there any alternatives ?
Thanks !

Looking at https://developer.blender.org/T55026, it does appear that Slow Parent is no longer available and is unlikely to be reinstated.

As an alternative, you could use a Driver to average between the 'desired' location of an object and its 'previous' location. I've done similar in the past before I knew of the existence of the Slow Parent or where I just wanted more control. As an example, see this answer to Moving objects create wind


Animation positions and animate along the path - Animation nodes two questions here.

The first: I placed objects in certain positions and would like to introduce new vector positions that would become starting point for these objects and animate them so their last position will be this one. Here's the screenshot:

And the second one: I got objects placed on the spline using the loop, but i'm having trouble understanding how to animate them along the spline (like with Follow Path constraint).

Guys, thank you in advance.

For the first question:

It seems you need the Object ID Key feature to store the initial transformation info for the objects. Here is how to use the Object ID Key node:

IMHO, the whole nodetree could be optimized like this:

For the second question:

A basic example setup would be:

BTW, there is a nice template called Distribute Instances on Spline, which is a great start to learn how to make things working like this. You can find it in Templates menu on Node Editor's header.


Glossy object is almost invisible when rendered I am designing a logo for a friend, but when I render the object doesn't show up.
At first I assumed that it was a problem with the background World color, since the object is glossy, I thought that all the faces were reflecting the same color evenly - but there aren't even any shadows...

So I tried adding a HDRi image, but the whole scene became beige instead of white.

I tried adding color objects to see if they were reflected by the glossy object, and they were, but everything seems to be absorbed by the World color.

Ideally, right now, I just want to see the object turn, I don't care about the background for the moment.

When dealing with glossy objects, like mirrors, you have to think that instead of lighting the object, you need to take care of whatever is being reflected on it.

So create something interesting that can be reflected on your mirror-like object and make it stand out from the backdrop:


Animation Problem: Baking an Action creates a bad scaling animation I have a character that will be animated and then imported into Unity. My method will involve using Rigify and a separate game rig which will copy the Rigify’s Pose. After animating I will only export the character model and the game Armature but not the Rigify rig. The problem is that whenever it bakes the animation it would badly scale the head. To summarize:
Character Model --skinned to–> game rig --copy transformed constrained to deform bones–> Rigify rig
I’ve experimented baking the actions manually (with visual keying of course) before exporting and it's the exact same problem. The only way I could make the game rig get a proper baked animation is when I remove all parenting relations which is a problem because I need the parenting when I import it in Unity.
I experimented again but this time I baked the animation from a rig where all the bones that has no Parent relations (which was baked accurately) instead of the Rigify rig and now it’s still the same problem as the start.

Here the yellow armature that has proper parenting is where I want the action to be bake but it’s head is strangely stretching. The orange armature is how the baked animation should look like which is the armature that has no parenting whatsoever. The legs and arms are a bit off but it’s not that much of a problem.
blendfile
I've already tried a lot of things. At this point I suspect that this is a limitation of Blender where it can't bake animations properly when constraints and scaling of the parents are involved which is often the case with Rigify.

You need to delete all the scale keyframes of the bone called DEF-spine.006.
Also, you've keyframed the scale of several bones that are its parents (neck bones called DEF-spine.005 and DEF-spine.004), so you either need to disable the DEF-spine.006 Inherit Scale option, or you need to delete the scale keyframes of these other bones.
Also, make sure they are all at a scale of 1 (AltS).


Creating a tapered pattern in shader nodes I created this using shader nodes. now i want to taper the bottom instead of straight lines.
which nodes will help me to achieve that?
Please advise,
Thank you,

Depending on the direction of your UV mapping, you might have to switch X and Y in this kind of set-up, which follows your modulo + color-ramp method as far as possible:

Any other method which makes the Less-Than threshold depend on a  dimension orthogonal to the one whose modulo is taken will do the same.

This tree also makes the period, base, and amplitude of the triangle-wave adjustable.


Can't find "Add" Node Maybe it's elementary but I can't find the 'Add' node in Blender 2.82. Maybe you know where it is.

This node is on converter -> math and then you can enter your operation, in your case add


Swap two curves in the editor graph I am wondering if possible to swap two curves in editor graphs? or to modify a curve to be constant =0 (no motion)?

To switch two points on a graph select them and press S X -1

And to scale to 0 (as pointed out by @gandalf3)  S Y 0


Why don't my objects reflect in the base plane? I'm clearly missing something basic, and no doubt terribly simple. I've seen videos and tutorials on constructing reflective objects, and kind of even understand them (and I'm at least sure I'm exactly duplicating their material settings).
So, I made a large plane mesh, and gave it reflective material settings. Then I built three objects that I placed just over it (red blue and green). The objects are visible, they cast shadows, etc. But the plane does not reflect the objects.
What am I doing wrong? (Also, apologies if there are random strange characters; they echo right but when I go to the next line sometimes a few characters in the previous line change to random things! Gotta reboot I guess, even on Linux.)
This screen capture shows the material the base plane is made of, and the three objects, and the lack of reflections. That orange line is the edge of the base plane, selected, so the material shown is really the material of the base plane.

I was hoping to upload the whole project (it being trivial and hence small), but that doesn't seem to be an option. Blender version is 2.82.7, running on Ubuntu 20.04.1 LTS.

Check the Ray Visibility settings for each of your block objects.  If glossy is unchecked, you won't see the object in reflections.


Animate size of each letter in text with effector I'm fairly new to Blender so this might be a really simple question. I want to animate each letter in a text with an effector (different shapes and patterns) in a similar way to these references:

https://studiodumbar.com/media/pages/work/amsterdam-sinfonietta-identity/1549645332-1586263695/as_case_motionsinfonietta_intro.mp4

https://studiodumbar.com/media/pages/work/amsterdam-sinfonietta-identity/1331194541-1586263695/as_case_andriessen-moore_detail.mp4
The closest I've come to any tutorials is this: https://www.youtube.com/watch?v=LtKmb4E7CuY&ab_channel=BlueFoxCreation but I have no idea how to animate each letter in a text this way.
Would be greatly appreciated if anybody could help me out.

Animation Nodes
Animation Nodes is a blender add-on for visual scripting. See the Docs for more info. As you haven't worked with Animation Nodes before, I'll be a bit more specific i nmy explanations.
This is an all-AN-solution, if you don't care about creating the text object inside AN, you can skip the first 2 Steps and just create it by hand.
Text Input
We have different options to get our text into animation nodes including but not limited to:

Text Block Reader reads a text block in Blender. Best for multiline text.
Text Input if you only have a few words
Random Text thats what I am using here, so I don' have to think about words.

After you have typed in your text, linked a file or created a random string you have the possibility to process the text further. Repeat it, trim it, change case etc. Press shift + a and look through the different text nodes, I think they are easy enough to understand.
I'll go with some uppercase repetition similar to your example.

Creating A Text Object
We need to tell Blender, that we want a text object in the scene. We use an object instancer to create that object and an object output node to fill it with our text.

Separating the Text
Thats probably the most difficult part. Add a Seperate Text Object Node, select the Text Object you just created and click update.

Text Grid
Add a Grid Mesh Generator, that creates an easy to control grid for us. We use the vertex positions (through the Mesh Info Node) of this grid to align our letters with an Object Transforms Output. We won't actually see the mesh in the viewport or the renders.

If we didn't care about the order of our text that would have been it. Unfortunately...

The vertex indices start in the bottom left and go up, we want them to start in the top left and go right. SO we need another step:
Ordering the grid vertices
We rotate the grid by 90deg with a Transform Matrix and a Compose Matrix node and reverse the vertex list with a Reverse List node. Great.

This was basically just the Animation Nodes Setup. There are a lot of different ways with Animation Nodes to achieve the scaling, I'll show only one. But maybe that helps you experiment a bit.
Scaling each Letter
This is one possible Node Setup:

What is happening here?
We use the vertex location to create a random value for each location using a Vector Noise node. As we dont want our letters to scale different in each direction, we are happy with 1D noise. The Vector Noise node outputs negative numbers, so we add 1 to always kepp them positive. you could use a Map Range node so you'd have more controll over min and max values instead. We then compose a vector out of the noise value. The same value for X,Y and Z because again: we want the scaling to be uniform.
To animate the noise I use a Vector Wiggle Node in combination with a Time Info node to change the offset of the Vector Noise.
That's it. If you have any questions, let me know.
(Thats a long answer, but in the end you need 15 nodes. Thats managable imo.)


Is there a way to symmetrize a mesh without messing up the armature underneath? I've been working on a character rig that I am currently in the process of weight painting to get better relationships between the bones and the mesh, but as I go about my business, it's become clear to me that there are parts of the mesh that must not be entirely symmetrical. Most of the mesh is as it responds to the x-mirror, but there are areas that blender doesn't seem to register as being symmetrical, even if it looks symmetrical to my naked eye. No idea what happened.
Ideally, I want to re-symmetrize the mesh again, but the problem comes in where symmetrizing now messes up all of the bones and drivers and things that I already have assigned - specifically, it de-parents half of the bones on one side of the x-axis, and the other side of the x-axis will end up controlling both limbs. Not ideal.
If I try re-parenting the armature back to the mesh in this case, it is destructive as well - it either destroys bone relationships I've already set up, or if I do it with automatic weights in pose mode, there goes all of the weight paint work I've already done as well as me needing to set up my drivers again. (...Unless I'm fundamentally just misunderstanding something about the different types of parenting. I'm still a beginner.)
I'm basically wondering if there's any way to either a) symmetrize a mesh without affecting the armature (or already established weight paint) or b) somehow be able to force weight paint to go in the same-ish places on both sides even if there isn't perfect symmetry (not a big fan of option B out of pickiness and perfectionism though).
It's a little late in the game to be having mesh symmetry problems, I don't know how it always seems my mesh becomes asymmetrical when I keep x mirror on all the time. If I have to restart all of this over again just to symmetrize then I guess it's par for the course, but I'd really like to avoid it if possible. Maybe there's some really obvious answer to it, I'm crossing my fingers. I'm happier to look like a clown than have wasted a few days doing all this work on a doomed mesh. :(

Alright so I figured it out so I figure I'll update just in case anyone ever finds themselves stuck in my situation. Turns out the fix was very obvious and simple after all. :)
The thing that fixes the symmetry in a way that isn't destructive is actually 'mesh > snap to symmetry' rather than using symmetrize. This will preserve not just the armature but all of the weight painting, too. You can either select the entire mesh or just the opposing areas on each side of the mesh that you want symmetrical and you will get this wonderful popup.

I guess prevention is always best but I'm really relieved that it's not the end of the world (and all of my weight painting) if the mesh accidentally loses symmetry.


How can I copy the base pose from hand rig to my hand rig? I rigged my hand (rig 1) but the I don't like the pose so I want to make it like the default pose from blender (rig 2). In pose mode, I selected all bones from the rig 2, copied the pose with ctrl + c (bottom right I got the message: copied pose to buffer). Then I selected all bones from the 1st rig (in pose mode) and I tried to paste the other pose with ctrl + v, but nothing happens. Any idea what I did wrong ?Here is my blend file:

Consider creating a pose library for the source armature. Assuming your destination armature has the same exact structure as the source one (same number of bones, same names) then this will work.
With the source armature selected, go into Pose Mode, then go to the Object Data tab of the Properties Panel. Expand the Pose Library section, and click New.

You now have a pose library, which can store any number of poses for your armature, but has no poses in it initially. So the field you now see will be empty. To the right of that empty field is a button containing a + sign.

Click it and and then choose Add New.

You should now see a pose listed in the previously empty field. It is called "Pose" by default.

The pose of your source armature is now stored as this listed entry. You can test this by changing the pose of your source armature, then going back to this Pose Library UI, making sure the appropriate pose is selected in the list (you must make sure your desired pose is the selected one in the list. It will often be the case that there is more than one pose in the list), and then click the Apply Pose Library Pose button, which contains a Magnifying Glass icon.

This will force the currently selected bones of the currently selected armature to take on the stored pose. It's important to remember that these stored poses can be applied on an individual bone basis, if desired. Only the selected bones will change to the stored pose. No UNselected bones will ever change. This can cause some strange results if one was unaware that some bones were unselected, while still wanting every bone in the armature to be affected by the stored pose. So it's important to know that this is how it works.
Once this pose is stored, you will need to apply it to the destination armature. To do this, you will need to select the destination armature in Object Mode, and then switch to Pose Mode. Select all the bones you want affected by the new pose (in your particular case, all of them). Now, return to the Pose Library section, which should still be open in the Properties Panel. You will notice that there appears to be no pose library anymore. Actually, it still exists, but your destination armature isn't linked to it yet. Your destination armature needs to be linked to the same pose library you already created before that library's poses can be applied to it. To link the pose library, click the weird looking link button immediately to the left of the "New" Button.

You will see the name of your pose library show up in the list (probably only one item displays in the list here, since you only have one pose library).

Click it, and it becomes linked to your armature. You should also now see the actual stored pose show up in the empty field below, as well. Make sure that this pose is selected, then click the Apply Pose Library Pose button (Magnifying Glass). Your pose has now been transferred to the destination armature.
You might ask why we would do things this way when setting all this up is so much more involved than simply using Copy and Paste. For one thing, Copy and Paste often doesn't work in Blender as we might expect. We can easily be led astray by our experience of how these features work in other programs, which can then lead to frustration. For two, by doing this, your poses are always safe, and can be reused repeatedly. It may seem like a lot to deal with to set it up, but a pose library is actually pretty useful once you get the hang of how it works.
Hope this helps.


Displacement Map Not Working I've got a Minecraft cube that I'm trying to apply a displacement map to, but the displacement is just not working.

So each Minecraft texture is 16x16 pixels, so by taking a cube and subdividing (simple) 15 times, I'll get a 16x16 grid of faces and the displacement map should work, but it's giving me weird geometry.

Changing the Midlevel doesn't fix it, just gives different types of broken. Scaling it up in edit mode actually helps it, but even after doing that I could see that the texture was not applying. There were bulges in the wrong places.

Here's my settings:

I changed my extension to clip, but switching between the different types doesn't do anything. I had to disable Interpolation because the texture is so small, otherwise it's all blurry. Stuck and not sure what to do.

And disclaimer, I have already read (Displacement on certain objects not working) and it doesn't help me. If you read it, you'll see that it's node-based, Voronoi texture. I don't have any nodes since this uses a modifier. It doesn't help me nor solve my problem.

To use image as displacement factor in Displace Modifier, Texture Coordinates have to be set to UV and the mesh properly unwrapped.


2D Animated Face, Is posible to drive the x-uv offset on Blender So I wanted for a lot of time to do a model with an animated texture by face for a game and I stumbled with this video:

2D Eyes Maya to UE4

On it, they achieved the thing I'm searching for in Maya, driving the x-uv offset with the bone rotation. In Blender this is achieved by setting a grid with the faces and positioning a target that warps the uv (with a modifier) to select which face to use, thing is that translating that grid to UE4 can be troublesome that's why I want to do it with bone rotation, so I came with this method

I arranged the faces in a circle in the texture and set the uv center in the middle so when I rotate the faces would change like the video, but I want to improve that its hard to arrange, align and edit faces like that, so, I wanna know if it is posible to drive the x-uv offset on Blender like the guys in the video do in Maya, Thanks in advance.

Well I solved it in a weird manner, what I did was place another bone so uv warp target, pointer and controller, and I used a driver to drive the location of the x axis of the pointer bone with the Y rotation of controller bone.


How to get vertex coordinates after modifier in Python in Blender 2.80? I have a mesh with armature modifier. Is there any efficient way to read its vertices coordinates with modifiers accounted in Blender 2.80?

So far the only way I found is to duplicate the object, apply modifier, read vertices and remove duplicated object:

def extract_vertices(my_object):
    # Duplicate object
    for obj in bpy.data.objects: obj.select_set(False)
    my_object.select_set(True)
    bpy.ops.object.duplicate_move()

    # Apply modificators
    duplicated_object = bpy.context.scene.objects[-1]
    bpy.context.view_layer.objects.active = duplicated_object
    duplicated_object.select_set(True)
    bpy.ops.object.modifier_apply(apply_as='DATA', modifier="RIG")

    # Read vertices
    vertices = [v.co for v in duplicated_object.data.vertices]

    # Remove duplicated object
    my_object.select_set(False)
    bpy.ops.object.delete()

    return vertices

It works, but very slow. I need to run this thing thousands of times in the loop, adjusting modifier every iteration.

It seems that Object.to_mesh() described in answer here could be exactly what I need, but it's signature is changed in Blender2.80 and there's no apply_modifiers parameter anymore.

Using bmesh and the dependencies graph, you can get an evaluated bmesh:

import bpy
import bmesh

depsgraph = bpy.context.evaluated_depsgraph_get()

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

bm = bmesh.new()

bm.from_object( obj, depsgraph )

bm.verts.ensure_lookup_table()

print( "----" )
for v in bm.verts:
    print( v.co )

bm.free()

Edit:

obj.to_mesh should work too (have not tested) but if you don't want to create a mesh, this is not needed.


Simple edge loop won't Grid Fill This edge loop (the roof of the car I'm trying to create) consists of 34 vertices on each long side, and 8 vertices on each short side. Together with the 4 corner vertices that makes 88 vertices in total. I'd say the perfect set-up for a Grid Fill ... except that it does not work (see error at top of screen). I checked for double vertices, there are none. I checked if the loop is water tight, by using ctrl+RMB select, and that's all ok. So what could be the problem?

As stated by the Blender manual's section about the Grid fill command:

  Grid Fill uses a pair of connected edge-loops to fill in a grid that
  follows the surrounding geometry.

Despite this, using the vertices indices and the picking order, the operator is capable to guess the user intention even if he defines the whole boundary, but it still needs to guess the right offset's and span's values because you are not providing edgeloops but only some vertices and it has to guess which gruops of them belong to an edgeloop.

See in this sequence how the operator behaves differently on same geometry simply by picking another vertex to complete the selection.


Compositing and motion tracking the object is bright but see through The object will end up transparent but I don't know how to explain it.

This is a compositing issue I have tried using a mix node and aplha over node with different FAC values and get a product worse or the same.

The file google drive

In a properly encoded RGBA buffer, the RGB represents the quantity of emission of a given pixel "window", and the A represents the degree of occlusion of the geometry.

The proper approach here is to simply take your rendered image and apply an Alpha Over your background, at a "full" 1.0 factor.


Boolean Difference with Bevels I'm new to Blender, and have run into an issue with creating a boolean difference on two objects that both have bevels.  As a test, I start with a simple cube and bevel 4 edges.

I then duplicate the object, resize it, and boolean difference the smaller one from inside the larger.

This works as expected, and I then resized the z-dimension to make it shorter.  I duplicated the original cube and placed on the other.

I now want to take the top one and boolean difference it against the bottom cube, so I move it into position as shown:

This is where the problem occurs.  At this point, if I boolean difference the top object, it doesn't work.  It leaves me with the result shown here:

This is probably something simple, but I can't find a reference anywhere on what's going on or how to fix it.  I'm also experiencing the same thing when I try to boolean difference text on an object face.  The issues seem to be the same in both cases.

Boolean usually is an approximation of the result you are expecting. It has some flaws by default and has a hard time dealing with two geometries that perfectly overlap, non-manifold geometry, etc. It also has a hard time dealing with n-gons which often occur on beveled meshes and meshed text-objects.

A good way to start is feeding triangulated geometry into the boolean modifier and leaving a good amount of space in between the meshes you are trying to difference from one another. This way the geometry is unique and cannot be interpreted in multiple ways by the boolean modifier.

I personally look at boolean as the absolute last method to achieve any desired geometry. I only use it if any other solution fails. It does not output clean and predictable geometry and usually needs a considerable amount of clean up.

e.g. you could solve your first shape like this:


How can I change the viewport shading to 'Texture Solid'? Can someone tell me where is texture solid button in 2.77?
I cannot find it anywhere.
I cannot see it in Shading menu.

The shading panel's options are Mode dependent.

Means,Every shading mode has his own option,Texture Solid is one of the Solid Mode option so you have to be in Solid Mode to enable it.


Object transformations not applying when running Blender in batch mode I have a list of translations and rotations from a rigid body calculation that I'd like to apply to an object using the frame_change_pre handler.

Both the translation/rotation text file and the script that defines the handler are stored in my .blend file.  When I open the .blend file in Blender and render the animation, the script works as expected.

My problem is that when I run in batch mode using the command:
/path/to/blender tossTest.blend -b -s 1 -e 8 -a
the transformations aren't applying in the output.

The following listing is the python script, script.py.

import bpy
from mathutils import Matrix
from mathutils import Vector

# Create 'posList' from 'positionDataSmall.txt', which is
# a text file stored inside this .blend file.
posList=[]
text=bpy.data.texts['positionDataSmall.txt']

for i in range(1,15):
    text.current_line_index=i
    line=text.current_line.body
    posList.append([float(v) for v in line.split(',')])

# The function that rotates and translates Suzanne using
# the position list array.
# Called by the handler.
def rotByIndex(n):
    if n<0: n=0
    if n>=len(posList): n=len(posList)-1

    mr=Matrix((posList[n][4:7],
               posList[n][7:10],
               posList[n][10:13])).to_4x4()
    vt=Vector(posList[n][1:4])
    mt=Matrix.Translation(vt)
    m=mt*mr

    obj=bpy.data.objects['Suzanne']
    obj.matrix_local=m

# The handler which gets called
def my_handler(scene):
    bpy.data.objects['Suzanne'].select=True

    rotByIndex(scene.frame_current-1)
    scene=bpy.data.scenes['Scene']
    scene.update()

bpy.app.handlers.frame_change_pre.append(my_handler)

And here's positionDataSmall.txt:

time,X,Y,Z,r11,r12,r13,r21,r22,r23,r31,r32,r33
0,0,0,0,1,0,0,0,1,0,0,0,1
0.1,-0.008852,0.17392,0.582415,0.937926,-0.024107,-0.345997,0.099391,0.974378,0.201766,0.332292,-0.223621,0.916284
0.2,-0.086264,0.395815,1.171942,0.813167,0.008713,-0.581965,0.179952,0.947084,0.2658,0.553515,-0.320867,0.768548
0.3,-0.208956,0.61547,1.709725,0.682634,0.027446,-0.730245,0.263186,0.922954,0.280871,0.681722,-0.383931,0.622778
0.4,-0.359143,0.832437,2.177802,0.559921,0.035089,-0.827802,0.347363,0.897075,0.273121,0.752213,-0.440487,0.490048
0.5,-0.517773,1.04868,2.556567,0.434674,0.045545,-0.899435,0.429578,0.867257,0.251652,0.791527,-0.495778,0.357337
0.6,-0.676588,1.264907,2.837416,0.301292,0.064759,-0.95133,0.506222,0.834588,0.217262,0.808053,-0.547058,0.218583
0.7,-0.835403,1.481143,3.020156,0.162968,0.092379,-0.982297,0.575247,0.799951,0.170788,0.801569,-0.592908,0.077121
0.8,-0.994218,1.697387,3.104786,0.023238,0.127698,-0.991541,0.634886,0.764235,0.113421,0.772239,-0.632158,-0.063431
0.9,-1.153033,1.913641,3.091307,-0.114327,0.16981,-0.978823,0.683614,0.728353,0.046628,0.720813,-0.663804,-0.199482
1,-1.311849,2.129903,2.979719,-0.246211,0.217638,-0.944465,0.720182,0.693225,-0.027883,0.648604,-0.687039,-0.327552
1.1,-1.470664,2.346174,2.770023,-0.369041,0.269958,-0.889343,0.743655,0.659749,-0.108203,0.557458,-0.701271,-0.444365
1.2,-1.629479,2.562454,2.462217,-0.479677,0.32543,-0.814865,0.753434,0.628783,-0.192277,0.449704,-0.706136,-0.546936
1.3,-1.788296,2.778741,2.056303,-0.575288,0.382638,-0.722933,0.749268,0.601116,-0.277952,0.328096,-0.701514,-0.632639
1.4,-1.947117,2.995036,1.552281,-0.653427,0.440118,-0.615897,0.731267,0.577455,-0.363034,0.195743,-0.687524,-0.699282

Some notes and things I've tried:

Register is checked for script.py in the .blend file.
Auto Run Python Scripts is checked and saved in the user preferences.
I've tried placing -y among the command-line arguments
I've tried storing script.py as an external file and loading it using -P script.py
When I print the matrix m in rotByIndex, Blender shows that it's getting and updating the matrix appropriately in batch mode.  So I know rotByIndex is being called on frame changes and that it has access to posList.

Does anybody know why my object isn't updating properly when not in the GUI?

From the API documentation:

By default handlers are freed when loading new files, in some cases you may wan’t the handler stay running across multiple files (when the handler is part of an addon for example).
For this the bpy.app.handlers.persistent decorator needs to be used.

import bpy
from bpy.app.handlers import persistent

@persistent
def load_handler(dummy):
    print("Load Handler:", bpy.data.filepath)

bpy.app.handlers.load_post.append(load_handler)


How To: 1 Bone Moves Entire Arm, While IK Bones Can Bend Arm I am trying to make a very simple character who has two IK bones in his arm (Besides Target and Pole) to move and bend it. At the moment I am to move his arm, bending it "realistically".  However, I am also wanting to be able to move the entire arm without it bending, like a Minecraft character.  How do I do this?  It wold be preferable if I could do this without creating a new armature.  Is that possible?  I am also trying to keep my armature(s) simple, if possible.

I think I found my own answer.
If I keep my target far enough away from the arm bones, the arm will stay stiff.  I could animate it that way, by moving it, say, 1.5 m away from the arm on its local Z axis.  When I want to bend it, I can move it in closer on the local Z axis.
Whether this is an efficient method, I don't know, but I think it will work for me.
I am going to leave this question open for other suggestions at this time.


How to color an object in blender for use in Unity3d? I have no knowledge of Modelling but I have to do this for my game. I used texture paint to color the surface. But when I import the exported fbx into unity, none of that paint is there. All I get is the raw model. How can I paint a model for use in unity?

You can apply your texture image in Unity. Put the image in your Unity assets folder, then you can drag and drop the texture straight onto your model, that's how I've always done it anyway

Also, I think you can export the texture with the model if you load the texture onto your material slot in blender, but I always find the first way simpler


Several different multi user objects to single user What is the most effective workflow for making several (20) different multi-user models each into single user?
My use case is: I have 3 different objects each distributed manually several times through Alt-D (what I would call an instance). I now need to join all the 20 models into one mesh.
To get you all to my level I understand that I can make a unique copy of an object through Shift-D and an instance of an object through Alt-D. And I know I can click the number besides the object name in the Object Data panel to make it single user. I have no idea how to do this as a batch operation.
To be honest I am having a hard time grasping the terminology used to describe blenders instantiation of 3D objects (multiuser, single user, data block). I come from a 3Ds max background where an object instance means that changes made to an object is in effect in all instances of that object.

Through the bar menu i could make all the instances unique objects through: Object/Relations/Make Single User/Object and Data and then afterwards (still with all the objects selected) join them as I would normally through Ctrl-J.