How to select objects without UV maps I am using Blender 2.80. I exported selected meshes to Substance Painter and got a warning that some objects has no UV maps.
Is there any quick way to see what objects have missing UV maps?

I don't think there is a build in way, but you can run this script to select meshes with no UN layers:

import bpy

for obj in (o for o in bpy.data.objects if o.type == 'MESH'):
    obj.select_set( len(obj.data.uv_layers) == 0 )


Stacking multiple Alpha Planes I have a simple scene where I have simple planes and textures using the alpha channel of the PNG as transparency.

The way I created the files makes the Alpha channel 000 black and 255 pure white. Here is one texture if you want to examine it.

When I prepare a scene using cycles, it works fine.

I can add more planes this way.

But when I add a third one, the intersection of the planes begin to form a shadow.

Stacking 4 planes make the shadow obvious. It is rendered on the spot where the images are combined.

Here is the blend file without textures.

What settings can I change? I changed bounce samples... but this is not about bouncing...

Any tips?

Currently you have a maximum of 4 transparency bounces:

So after 4 transparent surfaces overlap you will get errors.

You need to increase the number of transparency bounces so that there are as many as transparent surfaces a ray has to go throuugh:


How to save multiple baked textures? I am making different sets of baked textures for multiple objects and it takes a very long time to save them one by one for each set. Is there a way to save all baked textures in batch process?

Switch to Texture Paint mode and use the Save All Images button.  It will save any images that have been altered so long as they have already been previously saved.

Normally, I make sure everything is savable by preparing the textures in the folder on the hard-drive and then drag and drop them into the materials. This is quick and Blender will have a location to save them to when you use the image save button.


Where is this material viewport in Blender 2.8 Beta? Sorry, i'm just a noob in 3d program, so i don't really know what to call this thing.

But do you happen to know how to display this kind of material in Blender 2.8 Beta viewport?

Too bad that you cropped your image so tight... The shading options you are looking for are to the right of the image you posted.
Move the cursor over to the right of the screen and click to make the options active.


Faces won't appear regardless of it being in wireframe or solid So as you can see the faces are there, but the object is not in wireframe. It is in solid. How do I make it so the faces appear? I have tried alt+H and pressing z too many times to count.

In the Properties > Object menu > Display > Maximum Draw Type, switch from Wire to Solid


Want to run two scripts when I change to edit mode Im not good at python script, but I want to run two actitons when I change to edit mode. or I want to know register any Hoykey for run this scripts?

import bpy
bpy.ops.object.editmode_toggle()
bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='FACE')

This is to switch to Face Selection mode at the same time as you change to the edit mode (as in Maya). I don't know how to do this.

Not sure if this is what you are looking for (and maybe there is a way to do this without scripting).

This add-on will let you activate edit mode (with face select) by pressing ctrl + shift + Q in 3d viewport (see comment in code to change hotkey).

I have modified the Operator Simple template (Text Editor, Templates->Python):

import bpy

bl_info = {
    "name": "Set Edit Mode",
    "description": "Set edit mode with face selection",
    "category": "Object",
    "blender": (2, 80, 0),
}

def main(context):
    bpy.ops.object.mode_set(mode='EDIT')
    bpy.ops.mesh.select_mode(use_extend=False, use_expand=False, type='FACE')

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

    @classmethod
    def poll(cls, context):
        o = context.active_object
        return o is not None  and o.type == 'MESH' and \
            context.mode != 'EDIT_MESH'

    def execute(self, context):
        main(context)
        return {'FINISHED'}

keymap = None

def register():
    bpy.utils.register_class(SimpleOperator)
    c = bpy.context.window_manager.keyconfigs.addon
    if(c):
        m = c.keymaps.new(name='3D View', space_type='VIEW_3D')
        # Hotkey - ctrl + shift + Q
        i = m.keymap_items.new("object.simple_operator", 'Q', 'PRESS', \
            shift = True, ctrl = True)
        keymap = (m, i)

def unregister():
    if(keymap != None):
        keymap[0].keymap_items.remove(keymap[1])

    bpy.utils.unregister_class(SimpleOperator)

if __name__ == "__main__":
    register()


How do I keep two softbodies in the same position? I have two softbody cubes, one is smaller than the other. They are both aflling at the same speed, but the problem is that when the bigger cube lands, the smaller cube goes all the way down. Is there a way to keep both cubes' position the same?

I want them to be in the same position.
blend file

Two options:

Assign all verts in BigCube to a vertex group.  Give SmallCube a copy location constraint, targeting BigCube and referencing this vertex group.  Give SmallCube a healthy Goal value (or group).

Join BigCube and SmallCube into a single object.  Create edges (only) between BigCube and SmallCube to create forces between the two.  These will act as any other soft body edges, seeking to maintain their length (and possibly, with positive soft body bending values, lengths to neighbor verts), causing SmallCube to prefer to float inside of BigCube rather than fall completely to the ground.


Is there any driver expression for elif statement? Is there any way to add if elif and else in drivers?

Given the way we do if and else, here are two examples out of few other things i tried to get the statement right but unable to do so:

var-3.5 if (var<0) var+3.5 elif (var>0) else 1

var-3.5 if (var<0) elif var+3.5 (var>0) else 1

And also if there's any other way to add multiple if/else similarly?

Nest the ternary conditional operator

(var + 3.5) if var > 0 else (var - 3.5) if var < 0 else 1

or for more detailed scripts

import bpy

def x(var):
    if var > 0:
        return var + 3.5
    elif var < 0:
         return var - 3.5
    else:
         return 1

bpy.app.driver_namespace["x"] = x

And then use x(var) as your driver expression.


Blender 2.8 select and drag with a single click in previous blender releases I used to left mouse selection and with a single click I can select and move a component (vertex, face, object etc.). Now seems this option does not work anymore in blender 2'8, only if I chose right mouse button selection.
This is a video that shows the problem
https://www.youtube.com/watch?v=tbzK4-MvWaQ

Using Left click selection you can do this only with a basic selection tool:


Plane to circle get "pinched" corners I'm trying to figure out a way to make the ellipse shape even, right now the inner elliptical shape is even all the way around except in the corners where the shape get skinnier. is there a way to make all faces of that inner shape even?
here's images of my problem

I personally don't see any other solution than delete the inner ellipse and re-extrude inwards, bevel, etc.
If you want to redo this kind of shape from scratch, here are several ways to do it, the less destructive would be with a curve, but if you begin with a mesh you can now custom the profile:

Create your ellipse object, select the top edge:

Bevel it with CtrlB, give it enough segments:

Enable the Custom option and draw your profile:

A similar custom profile has also been implemented for the curves, go in the Properties panel > Object Data > Geometry > Bevel and click on Profile:

You will have much more control on the bevel shape if you use the Object option though:

Or of course you can use a mesh as a profile along a curve with the Array and Curve modifiers:


VSE: how to duplicate an existing mask? So I'm in a scenario where I made a mask, but I need another version of the same mask only inverted. Basic question: How do I duplicate the existing mask so I have different mask profiles of the same thing (from there I can set one as inverted easy enough)?

Its easy enough to make a 2nd mask, and then copy and pasting the old mask into it and inverting then saving. But that's assuming its a static mask with no keyframes/movement. Say I have a ton of keyframes, then I'd have to go back and forth and copy and paste the different movements and insert keyframes etc....really really time consuming, its redoing the entire original mask almost. I tried using dope sheet (mask) but when I copy and paste the original and its keyframes it always says you cant do that for masks or something.

Assuming there is no feature of this kind available: Is there a way to take the strip the mask is applied to and invert the mask just for the one strip it resides on? Like I need an inverted version to apply to a single strip, but I need the not inverted version applied to many other strips.

In the image editor you can click the little number button (probably says "2" on it) next to the mask to create a copy.


Fastest way to snap two faces together by aligning their centers in non-standard orientations? In the attached example, I moved the origins of the two shapes to the center of the desired faces.

The objective is to snap the cube's face (where the origin is moved to) to the slanted face. Basically snap origin to origin by aligning the cube to the orientation of slanted face.

Arbitrary orientation

When you have the two objects with the origins in the same location, activate snap vertex option, select the object that needs to rotate and press R, searching for a vertex of the angled face.

If the rotation is not aligned with a view, use custom orientations, and press R followed by the choosen axis twice (i.e. R,X,X will rotate around X local axis).


Bone constraint mask or bone constraint per action? I have a standard arm rig with a weapon and a few actions animated. In one of them I've put "Child of" constraint (hand -> magazine) and the other doesn't need it but it seems that I cannot deactivate constraints per action. The problem is it interferes each other when I use it in one, and don't need it in the other.

Is there a way to activate constrains per individual action?

Constraints have an influence property that can turn it on/off - an influence of 0.0 means the constraint has no effect while at 1.0 it is fully applied.

You can animate the influence for each action, if you keyframe the influence on the first frame, it will remain that way for the entire action. Each action can have a different value keyed.

With the mouse over the influence, press I to add a keyframe, you can also  RMB on the value and choose Insert Keyframe.

You can also keyframe the influence throughout an action, for example turn it on to pick up the magazine and turn it off to drop it.


How to close an area? With a UI layout like this:

How do I close the bottom area?

These are the context menus of the header, the split, the editor type selector and the type selector itself:

There's an item that allows me to maximize the area, but there is nothing to close it.

Ok, I found one weird way:

I can split the bottom area vertically as well and then align the split borders of the top and bottom area pairs:

This alignment is easily possible because the split borders snap to a grid.

As soon as they are aligned, the context menu of the border between any top and bottom area gets a new item "Join areas":

After joining the left pair and the right pair, the bottom area is then gone.


Geometry Nodes - How to assign vertex group in geometry nodes? I added a plane.

Instanced objects on it.

Assigned vertex group on it.

(I'm stuck at this step) How do I make it look exactly like this by using Geometry Nodes?

If I’m interpreting your question correctly, and you just want to restrict the set of points where instances are created using a vertex group, you can use the Point Separate node:

In this example, my vertex group is named “no cubes”.
If you want the inverse, i.e. you want the cubes to only be instanced at the vertices contained in the vertex group, then you can use the Geometry 2 output of the Point Separate node, instead.


Move armature and object I have created a hand model with an armature inside it so I can pose the fingers. I now wish to copy it so I have a pair of hands that I can describe gestures with. However, I am unsure how to move the hands to a different position, (not by using the finger posing armature).
Please can you give me some advice so I can pose the second hand and rotate them?

I believe what you are looking to do is duplicate your armature, invert it (to create the "other" hand) and have it available with the same bone structure. If so, select the parent bone in object mode:

Press Shift D to duplicate it. I pressed Shift D + x to move the second hand along the X axis only:

You now have the second hand, although although the 'thumb' may be pointing outward. If your armature was like mine, you now have two armatures: Armature and Armature.001; all of the bone names will be unchanged.

Now, still in Object mode, scale the armature by pressing S (to scale), X to scale only along the X axis (in this instance, that is what is needed for my armature), and then -1. This will invert the armature along the X axis:

Now you have the same two hands, but with the thumbs both facing inward.  Scaling with a negative 1 scaling factor is a good way to create inverse versions of meshes and armatures.

Hope this is what you needed.


How can I get the materials used in an array's caps to be properly assigned? After building an object for an array, and its start and end caps, I added materials to the objects. The caps appear with the materials in the wrong place. The objects themselves have the materials where they should be, but when they appear as part of the array, they are in the wrong place.

Deleting the material assignments and the array modifier and redoing them all hasn't helped. I don't think there are any normal issues. The objects that are the caps display properly, it's only when displayed as part of the array that they are wrong.

As this seems like an odd thing, I've included the file.

I took a look at your blend.

It seems that the order of materials matters when using the start/end caps in an array modifier (maybe because of material ID's!?). Not sure why it works this way or if its a bug.

Notice on my RGB pic of materials the colors match the slot number on all objects.

However in yours, the metal brush and mirror are swapped. I guess this "swap" does not carry over in the caps of the array modifier.

So just make sure all the objects have the same material on the same slot number.


Two Objects - One Material Scale I've seen multiple (similar) versions of this question all over the internet, with no solid answer.

I have two objects - both are different sizes.

I unwrap and apply the same material to each.

The material's scaling is different on both objects - nothing out of the ordinary..

I squint my eyes and poke my tongue out the corner of my mouth while I try to match the scale of the first object's material to the second object's perfectly.

But why go through all the trouble?

Why can't I just apply the material to any object I want and adjust the material's scale universally to all objects with the same material using the "Mapping" Node?

Sure I could use "Object" in the "Texture Coordinate" node and adjust scale in the "Mapping" node.

But then my material just gets smeared down the object's vertical edges.

Any experts have a solution?

Cheers.

Why can't I just apply the material to any object I want and adjust
the material's scale universally to all objects with the same material
using the "Mapping" Node?

Because the UV maps of the objects can be anything. They can differ in size even on different parts of one object.
Unwrap UVs at the same time
In order to have uniform scale of UVs you can select multiple objects, go into edit mode(2.80 now supports editing multiple objects at once - that's new), select all and unwrap them all at once. If the scale of the objects is applied for all of them, you will get UV islands that will match in scale for all objects as much as it's possible.


I can't scrub the Movie set as image texture in cycles I want to do Rotoscoping, in the way you do for animation where real life footage is use to inspire the animation of a character.

I almost got it working according to these instructions: Movie set as image texture not playing in cycles?

Except I have to hit in Mapping the Texture button to view a changes of the video texture, that kinda takes care of the problem except I can't scrub the animation which makes it difficult to animate this way.

Maybe it's the MP4 maybe it's the 2.79 version that is buggy I need help trying to figure out why it is not working for me.

Do you need the textured plane to rotoscope from? The background image works fine if you change the input button from "Image" to "Movie Clip", and deselect "Camera Clip". The movie (that I used - yours wasn't attached) worked fine for both scrubbing and playing. The plane would update OK after I stopped playing the video and would snap to match the background image. Oddly, if the properties panel in the node editor was hidden, or if another node was selected (other than the texture node), the texture stopped updating on the plane. This looks like a bug to me that you might like to report (from the menu choose Help --> report a bug). Good luck.


how to get in python real position of object that follows a NurbsPath? I have an object following a NurbsPath (path is the parent of the tracker object)  and I am trying to print its position in each frame. but the "location" attribute always print the same value, doesn't matter in which position over the path the object is.
I guess I am querying the wrong property.. this is the code I am using:

import bpy

sce = bpy.data.scenes[0]

obj = bpy.data.objects["tracker0"]
print(obj.location[0])

for i in range(0, 20):
    sce.frame_current = i
    print(obj.location)

To get the global position of an object in blender use

obj.matrix_world.to_translation()

To change the frame use

scene.frame_set(frame)

...

import bpy

sce = bpy.context.scene

obj = bpy.data.objects["tracker0"]

for i in range(0, 20):
    sce.frame_set(i)
    print(obj.matrix_world.to_translation())


How do I straighten UV maps? How can I straighten ALL the vertical UV lines at once? Is there a hot keyshort cut? Or if I have to do them one by one .. is there at shortcut for that? Thank you!

The UVSquares addon is designed to do this easily. Select the uv's you want to straighten out and click a button.


How can I solidify without ruining spiked edges? I'm trying to poly model a helmet and I have some extruded spiked edges but when I try the Solidify modifier, my spikes get horribly messed up. Is there any way I can exclude them from being solidified? I've tried to hide them with H but since the modifier applies outside of edit it didnt do anything.
Here is the helmet without being Solidified:

Here it is when Solidified:

I tried checking only rim but that doesnt accomplish what I'm after, which is making the helmet somewhat solid to be printable. I'm not yet familiar with all the tools available so I dont know where to go from here. If I can have a solid interior without the spike distortion it would be perfect.

I would Solidify the outer side, and adjust the spike manually.

Use the Solidify Modifier.
Set Offset to 1 and adjust Thickness to your liking.

You can adjust Inner/Outer Crease, if you're also using the Subdivision modifier.
The Subdivision modifier should be AFTER the Solidify Modifier.

Hit the Apply button to apply the Solidify Modifier.

Go to Edit mode
Select the new vertices and scale it down to make it pointy using the Scale Tool.
Shortcut: S


Result Based Texture Mapping I'm try to rig up several small moving objects, so that at the end of the video they align to form an image. Similar to this video: https://www.youtube.com/watch?v=IcG3Jc6Vw04.

See how all the cubes are jumbled, but align after the ball hits? I would like to achieve a similar effect, without having to map an image to each cube face. I'm guessing it has something to do with UV Mapping, but not sure how to do it.

Please ask if you need any clarification.
Thanks in advance! :)

Make sure all the objects have a UV map (it doesn't have to be a useful one).

If you have a large number of objects which don't a UV map, unwrap one of them (any projection will do) and then select them all (with the unwrapped one active) and press CtrlL > Transfer UV maps. Even if the objects don't have the same vertex order, this will be fine as the UV map is overwritten later.
Simulate/animate the objects and go to the last frame.
Select all the objects, add a UV project modifier and set the camera as the projection object, select the UV map, and press CtrlL> Modifiers:

This will project the UVs from the camera unto the objects. If you move the camera in textured view you can see this in real time.
Still on the last frame with all the objects selected, press AltC > Convert to mesh to apply all the modifiers (and make the UV maps stay in the state they are in).

Result (click on it for html5 version):


copy and connect a part of an object I have a stick with a protrusion on it:

and I want to copy the protrusion. I tryed to duplicate it and move along the stick, but in this case I get some problems: when I render it with freestyle I may get some unneeded lines and not get some lines i want to get:

and if I move the duplicate from the stick, it just disconnects without modification of the stick.

So, how can I connect the second protrusion to the stick or what is the correct way of coping such protrusions?

Work on model's topology

Freestyle takes also in account the topological features of each edge to determine whether or not it belongs to one of the Line set category (and so if it should be drawn).

You must ensure to provide to the software a model that could be interpreded the way you want.

Starting from a similar situation:

There are several different ways you can follow to model a similar object. In this case, for example, I choose to make room for the duplicating geometry by deleting the faces, duplicating the geometry and snapping it to the holeìs border.

Now the geometry is in-place, but is not connected. Remove doubles operator is capable of joining the vertices (so relateded edges too) withing a given threshold.

Results:

Another possible solution for this specific situation could be to leave intact the stick and just overlay a disconnected copy of the geometry.

You must avoid overlapping faces (overlapping edges shouldn't represent a big issue in this case) so you should duplicate only the selection shown in the images beleow:

Note: all "default" Frestyle line set style settings had been used in this demonstration apart from the Crease angle that hase been increased to 150°.


Hide Panel With Python I have a class that extends bpy.types.Panel. When a combination of items are chosen in another panel, I want this panel to appear, but not otherwise. Right now the panel will always show after being registered. I browsed through the documentation and found nothing useful. What function can I call or flag can I set to show and hide a panel, say, on clicking a button?

Poll the panel
Given this from the question

When a combination of items are chosen in another panel, I want this
panel to appear, but not otherwise. Right now the panel will always
show after being registered. I browsed through the documentation and
found nothing useful. What function can I call or flag can I set to
show and hide a panel,

to not show a panel at all have it not poll.
Every panel class has a poll class method. Being a class method it is available without an instance of the class being created.
if the poll method return value is non None or boolean True then the panel shows.  In the example below panel shows if the context scene name starts with "Scene"
If the panel polls it instances the panel and in doing so calls the draw methods (draw_header, and draw if expanded)
The draw method below draws the scene name property iff it is exactly "Scene" Remember it must poll.  Only modifiying the poll will show name prop if the scene name is "Bob" for example.
A conditional in the draw method wont stop the panel from being drawn, just the content within. The poll method is the way to stop the panel from being drawn at all.
Have added an __init__ method that prints "init", the poll method prints "poll" and the draw method "draw"
import bpy

class HelloWorldPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Hello World Panel"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"
    def __init__(self):
        print("init")

    @classmethod
    def poll(self, context):
        print("poll")
        scene = context.scene
        return scene.name.startswith("Scene")

    def draw(self, context):
        print("draw")
        layout = self.layout

        scene = context.scene
        if scene.name == "Scene":
            # it's the scene named "Scene" woohoo
            col = layout.column()
            col.prop(scene, "name")

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

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

if __name__ == "__main__":
    register()

Have produced this answer because the idea that the draw method is called often is in fact not strictly the case, it is called only once per instance of the panel. The panel is instanced a lot... if it polls.
Running above when a scene name polls will print to console
poll # check if panel polls
init # it polls init the panel
draw # draw the content ....
poll
init
draw
poll
init
draw

or if it doesn't poll
poll
poll
poll
...

indicating that if the there is activity to redraw the area the panel resides, it checks if it polls, if it does it instances the panel and draws.
Can see here that rather than having conditionals in the draw, could set a particular  self.draw = self.draw_bob method when initializing the class.
Use a combination of both.
Given the OP's accepted answer, will speculate the panel resides in the file browser and is designed to show when a certain operator is being run. Changing code above such that panel resides in filebrowser tool props
bl_idname = "OBJECT_PT_hello"
bl_space_type = 'FILE_BROWSER'
bl_region_type = 'TOOL_PROPS'

to poll only when export scene obj (for example) is being run.
>>> bpy.ops.export_scene.obj.idname()
'EXPORT_SCENE_OT_obj'

a new poll method to reflect this
@classmethod
def poll(cls, context):
    op = context.active_operator
    return op and op.bl_idname == "EXPORT_SCENE_OT_obj"

Will ensure the panel only instances when that particular operator is active.
Using this poll can rest assured in the draw code of the panel   context.active_operator both exists and is the one of interest.
Use conditionals in draw code based on the operators props, or what is more often the case these days use subpanels that poll based on a condition, within the condition of their parent panel.
Will notice more and more import export operators are beginning to use this method.
Why?  to simply have an always polling panel (the default) and something like
   op = context.active_operator
   if op.prop:
        pass

in draw code will throw an error constantly chattering messages  into console like an endless stream of garbage when the operator doesn't exist or  doesn't have a property prop whenever the tool props panel of filebrowser is active for some other operator we are not interested in.


Playtime issue with animations My goal is to have the animation I have set up play which is triggered by a collision with the players body to a sensor, in which the body gets deleted, the camera and gun switch parents to a helicopter, and then play their 1300 frame actions.

When I do this, the gun and camera return to the origin yet still play their respective actions alongside some relative changes due to distance from parent. I do not understand how to fix this and make the animation look as it does in the preview/timeline view.

I have attached the file from my game with all the relevant information, if you can get this animation to play correctly and identify the problem I would greatly appreciate it, been stuck on this for a while now.

https://www.dropbox.com/s/xskpc8arpj37roy/fixcut.blend?dl=0

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


how to insert keyframe for pose I need to insert keyframe for the pose I have made in posemode. How can I do that? when I hit i it writes some error (keying set failed to set any keyframes or something like that)

Have you tried to select what type of keyframe you want to add? It is at the bottom just after the type of sync that you would like to keep while playing your animation.
Or if you would not want to set a specific type of keyframe, please click on the red button on the left of type of keyframe.


How do I get the filepath when I import a file? I am trying to create an import script, I just need to get the filepath as a string to execute the rest of my functions. How can I do that?

Below is the visual example of what I want to get.

This general implementation for file based actions is to use in-built mix-in classes, bpy.types.Operator, bpy_extras.io_utils.ImportHelper.
ImportHelper & ExportHelper are wrappers for FileSelector.

import bpy
from bpy_extras.io_utils import ImportHelper, ExportHelper

class NifImportOperator(bpy.types.Operator, ImportHelper):
    """Operator for loading a nif file."""

    #: Name of function for calling the nif export operator.
    bl_idname = "import_scene.nif"

    #: How the nif import operator is labelled in the user interface.
    bl_label = "Import NIF"

    def execute(self, context):
        path = "Importing " + self.properties.filepath
        self.report({'INFO'}, path)
        return{'FINISHED'}

Once your class is registered(see below)), it can be invoked via console.

bpy.ops.<bl_idname>('INVOKE_DEFAULT')

bpy.ops.import_scene.nif('INVOKE_DEFAULT')

The addition of the ImportHelper/ExportHelper, a new attribute is defined in the self.properties of the operator (filepath).

In the above, because we did not set that attribute, you will get the FileSelector.
The filepath attribute will be set to the value of the url bar.
Alternative method of invocation via search bar or menu, will produce the same default invocation.

ImportHelper also allows you to pass in an explicit argument "filepath" into the operator.

bpy.ops.<bl_idname>(filepath="")

bpy.ops.import_scene.nif(filepath="C:\\mypath")

This will skip, the FileSelector.
In either scenario, the execute() method defined in your class is then called.
The filepath is now accessible via
    self.properties.filepath

With this now accessible, you can do whatever you want with it, my sample below just reports it to the info bar.

Full Sample

import bpy
from bpy_extras.io_utils import ImportHelper, ExportHelper

class NifImportOperator(bpy.types.Operator, ImportHelper):
    """Operator for loading a nif file."""

    #: Name of function for calling the nif export operator.
    bl_idname = "import_scene.nif"

    #: How the nif import operator is labelled in the user interface.
    bl_label = "Import NIF"

    def execute(self, context):
        path = "Importing " + self.properties.filepath
        self.report({'INFO'}, path)
        return{'FINISHED'}

def menu_func_import(self, context):
    self.layout.operator(
        NifImportOperator.bl_idname, text="NetImmerse/Gamebryo (.nif)")

def register():
    bpy.utils.register_module(__name__)
    bpy.types.INFO_MT_file_import.append(menu_func_import)

def unregister():
    bpy.utils.unregister_module(__name__)
    bpy.types.INFO_MT_file_import.remove(menu_func_import)

if __name__ == "__main__":
    register()


Why can't I parent objects in my .blend? Here's a weird one - I can't seem to create a parent child relationship in my current Blender project.

For example, I want to make 'Cube' a child of the 'ModuleParent' empty. If you take a look at this linked .blend, can you create that relationship?

If so, how? (Have tried ctrl-p, have tried dragging and dropping in Outliner (with shift and ctrl), nowt seems to work)

Thanks in advance for your help.

--Rev

Set outliner display mode to Scene

I wonder if this is the outliner display mode being viewlayer rather than scene as default. Was a source of confusion for me the other day as  parent relationship works, but in viewlayer display doesn't show as hierarchy like we are used to in 2.79 and prior.

In your file cube is a child of another cube that is a child of the empty. Can drag around in outliner after setting display mode to scene and parenting works as in previous versions with drag and drop.


3D-print friendly joints I am trying to split a figure, so it will fit in my 3D-printer.
For the pieces to fit together after the slice, I plan to make a ball joint or a trapeze joint, and glue them together, just like this:

For this to work the best, I don't plan to bisect the model in a straight line, but use the knife it to fit certain lines on the figure, and so the figure itself hides the cut.
What I can do is (and also shown in the gif below):

Make the knife-tool selection K
Hide it H
Select a vertex, and all it is connect to ⌃ Ctrl + L
Unhide the previous selection ⌥ Alt + H

The issue is, when I make a "weird" cut, I have a hard time doing the following:

I need to select the edge of each of the pieces, which can be very time consuming. I need to find the ring loop (I think it's called?)
I need to make a surface when I finally get the ring, and it needs to be the same surface on each piece
I need to make the ball/trapese joint (I assume this is just a boolean modification with some extra space for the 'female'-pin.

How do I make a cut through a figure and make them overlap correctly so I can join them again after print?

OK, this is going to be a long one...
When you first create the "weird" cut, add the vertices to a vertex group, CTRL-G is the shortcut. With the vertices selected hit V to "rip" the edges creating 2 separate bodies, best to have Auto Merge off, RIGHT CLICK to end to tool without moving the verts. Quick tip, no need to select a vertex first then CTRL-L to select linked, just hover your mouse over the vertex you want and hit L Once you have one of the bodies selected, move them to a new object P. The new object and the original with both have the same vertex group so you can select in Edit Mode making the edge loop selection a breeze!

I've put my object at a weird angle so the following makes more sense.
The next step, to make the same face on each part is the trick!
Back in Object Mode, hide one of the objects for now.
First, edit the visible object and select the edge loop as described above ;) then hit F, it will look terrible but we'll fix that in the next step.

With that terrible face selected place the 3D Cursor at it, SHIFT-S To Selected CTRL-I to invert selection and H to hide it. Now back to Object Mode.
Square your view up as best you can to that terrible face you just created, doesn't have to be perfect, just good enough. Add a plane, align to view, edit plane, scale it to be bigger than the face and subdivide it, the more you sub the better the face will end up. Select all and X Only Faces so you are left with a grid of edges.

Object mode again.
Move the plane so that it is not intersecting the object but is still bigger when viewed normal to it and your face. Making the Transform Orientation Normal will help here.

Now the cool part!
Select the plane SHIFT-7 or SHIFT-CTRL-7 to view normal to the plane with the plane in front of the object.
Select the plane FIRST then select the object, enter edit mode. Make sure you still have all but the terrible face still hidden in the object. From the menu select Mesh->Knife Project If done correctly, this will project the edges of the plane onto the object and slice up that terrible face, there will be plenty of N-Gons but as this is for 3D printing it wont matter.

Now the matter of making the same face on the other part... Easy! (I won't give you key strokes here... you get the point!)
Edit the object your just made the "cool" faces for, use the vertex group again to select the vertices we need, then from the menu choose Select->Select Loops->Select Loop Inner-Region (you may need to invert that selection then select the group again) Duplicate the faces, move them to a new object.
Back in Object Mode join the new faces object with your original object that we hid at the start. Edit it...

Now select the linked verts of those added faces.
Choose a vertex that "stands out/easy to find on both bodies", make sure that is the active vertex.

Now with Snap to -> VertexSnap with -> Active selected move the selected vertexes to the correct spot, select all, merge by distance...
The alignment features should be a simple matter using booleans.
You're done!!
You should now have 2 separated objects with exactly the same faces that are readily 3D printable.
(I REALLY hope this answered your question!!)


How to get the total number of vertice, edge and face in camera view with Python? I know how to get these information in the whole scene with Python, but now I want to get them only in camera view.
Or can blender export any documents including these information ?

Following your question in the comments below your question, I give here a partial answer and some guidelines (but the complete code is too long to do for me).

So just some code snippets:

CameraSetting class: allow to calculate the projection of a vertex in the camera/view given a mesh object. This code does the same as bpy_extras.object_utils.world_to_camera_view(scene, cam, co) but it calculates many things once instead of doing it for each 'co'. See here.

CountForObject function: provide a simple calculation of the vertices included in the view of a camera.

Note also that you can optimize the calculation by checking the bounding box of the objects before calculating all their vertices projections.

Hope it can help (the code contains additional comments):

import bpy
import time
from mathutils import Vector
from operator import itemgetter

#Used to store information related to a camera setting for a given object
class CameraSetting:
    def __init__( self, scene, camera, obj ):
        self.camera = camera
        #Z axis of the camera translate in world (Z axis is opposite to view)
        self.zInWorld = Vector( (0, 0, 1) )
        self.zInWorld.rotate( self.camera.matrix_world.to_euler() )
        #Camera parameters
        #Matrix to convert from object coordinate to camera coordinates
        self.toCameraMatrix = camera.matrix_world.inverted() * obj.matrix_world
        #The frame is composed of the coordinates in the camera view
        frame = [v / v.z for v in camera.data.view_frame(scene=scene)]
        #Get the X, Y corners
        self.minX = min( v.x for v in frame )
        self.maxX = max( v.x for v in frame )
        self.minY = min( v.y for v in frame )
        self.maxY = max( v.y for v in frame )
        #Precalculations to avoid to repeat them when applied to the model
        self.deltaX = self.maxX - self.minX
        self.deltaY = self.maxY - self.minY
        self.offsetX = self.minX / self.deltaX
        self.offsetY = self.minY / self.deltaY

    #Calculate projected coordinateds from the object coordinates
    def CalcProjected( self, objCo ):
        #Object coordinate in camera view
        camCo = self.toCameraMatrix * objCo
        #Z is "inverted" as camera view is pointing to -Z of the camera
        z = -camCo.z
        try:
            #Translates x and y to projected coordinates
            x = (camCo.x / (self.deltaX * z)) - self.offsetX
            y = (camCo.y / (self.deltaY * z)) - self.offsetY
            return x, y, z
        except:
            #In case Z is zero
            return 0.5, 0.5, 0

def CountForObject( scene, obj, cam ):
    matrix_world = obj.matrix_world
    rotation_world = matrix_world.to_euler()

    vertices = obj.data.vertices
    camSetting = CameraSetting( scene, cam, obj )

    vertexCount = 0
    #Go through all polygons
    for v in obj.data.vertices:
        x, y, z = camSetting.CalcProjected( v.co )

        if 0 <= x <= 1 and 0 <= y <= 1 and z >= 0:
            vertexCount += 1

        #z can be tested to see if its correspond to the camera clipping (cam.data.clip_start/cam.data.clip_end)
        #This calculation allows to check x and y
        #x and y are between 0 and 1 if in the camera field (because CalcProjected do so)
        #From that you can consider that all edges and faces which have a good vertex are in field too
        #But for the remaining edges you'll need to check if the corresponding vertices projection intersects the (0,0) to (1,1) square
        #Then consider the polygons that correspond to these edges to count them two

    print( vertexCount )

scene = bpy.context.scene
obj = bpy.data.objects['Cube']
cam = bpy.data.objects['Camera']

CountForObject( scene, obj, cam )


DXF file not to scale in Blender When I open the DXF file in LibreCAD, then it shows the correct size of an object, but when I import that file in Blender, then the size of that object becomes very large.

Your DXF file is using 1 unit == 1 inch, so the marked length is $11\cdot 12 + 11.2780 = 143.278"$ long. Blender's internal unit is 1 meter long, so the DXF imports as 143.278 meters, and $ \frac{143.278}{0.3048} \approx 470'$ which is what's being displayed.
You could fix this by entering 0.0254 in the "Unit Scale Box." That will give you correct readings, but will still be insanely huge.
You could fix this by scaling the DXF by 0.0254 manually after you import it, or you could enter 0.0254 in the unit scale box of the DXF importer


Light problem with shade smooth Hello there fellow blender people!
I am new to blender and I have this problem with light... When I shine light on a "shade smooth" wall trim, it does this weird thing. I don't know how to fix it. Can someone please help?

Ok, So I found a solution, Normals > Autosmooth > ON
the problem is now non-existent...


How can I control where smoke and fire are emitted from? How can I control which part of the object the fire/smoke is emitted from so instead of it coming from the corners it is emitted from the top side like a normal log on fire.

Also I can't see the faces of the object even though I am out of edit and wire frame mode can someone please explain that as well.

You can assign the smoke and fire to come out of just a vertex group.

Select the vertices you want the fire and smoke to come out of, and create a vertex group and assign the vertices to it:

Then go to Smoke Flow advanced and use the vertex group to determine where the fire and smoke will come out of.

Note: Every time you make any changes to the smoke/fire simulation you need to press Alt+A to update the simulation cache.

To set up the materials and actually render your smoke in cycles watch

https://www.youtube.com/watch?v=oSiV5gg_lCs


Getting errors when trying to use the online material library add on The title pretty much says it all

The online material library was originally written to work with older versions of blender, for more recent blender versions the addon has been broken since the python api relating to nodes and groups changed. As the author has had more important things to do it has been neglected for a while, but I understand he plans to get back to it soon.

I have submitted an update that is waiting to get approved and merged into the official contrib repository, until then you could use my patched version. While I did make a change to get group exporting working, there seems to have been another change that broke group exports so only materials without groups are working at present. I don't think any of the available library materials have groups so it would only affect materials you export.

You can download this one file that was changed and use it to replace the addons_contrib/online_mat_lib/__init__.py that you have now. Another option is to download my entire contrib repo (about 20MB) which also has other addons included and copy the online_mat_lib folder (or all of it) into the addons_contrib folder.


Can A Deleted Material From A Fractured Object Be Re-applied? I am creating an animated fractured object. Initally, when I created the fracture, it included a second material for the inside of the mesh (shown in black). Unfortunately, I deleted the 2nd material. Is there anyway to add the second material back onto all the objects without applying it one-by-one?

Select one piece and add your second material again.
Then select all of the other parts and select that one part with the second material as the active object (select it as last object). Then press Ctrl+L and click on materials!


How to texture a complex mesh/multiple meshes? I am a beginner in Blender. I have created a handgun after a reference, and I believe I have made a few mistakes. When it came to dents, I used "loop cut" to manually show them, but I do not believe I will be able to do this in the future (too many polygons and loop cuts for every single dent or additive). I also did this for holes.

There are several objects/meshes that are separate. I am completely lost when it comes to texturing the gun after the reference image. Should I join all of the meshes/objects into one object and then texture? If so, how would I go about texturing every single aspect that I need present. I apologise if this seems complicated or confusing, I am a true beginner. (I have watched a few tutorials)

There are a number of ways to approach this problem. To begin with, you can choose to use materials for everything (totally viable), to use textures for everything (also totally viable), but I think the best option is to use a mixture of both.

Often, the best approach is to use materials for anything that can all be the same, and use textures for anything that needs to be placed carefully (like a label or logo).

In your case, I'd recommend that you join all the parts that will be the same material into the same object (like all the individual components that make up the slide, for example). All of those meshes don't have to necessarily be connected to each other, they'll just be in the same object. Then you can give the object one material that looks like anodized steel (or whatever). I suspect you'll have an object for the slide, another for the grip and lower receiver, another for the magazine butt, another for the magazine itself, another for the extractor, another for each of the controls (safe selector, magazine release, slide lock/release), and a few others. Note that meshes can be in the same object even if they're not close to each other. For example, the magazine release and the safety might be in the same object, if they're supposed to be the same material. That way you can set up the material for both at the same time.

Once you've done that, determine if there are any parts that should be textures. If you're going to be adding the manufacturer's mark, that's probably a good candidate. You also might find it easier to make the nerling on the grip as a normal map than try to model it.

Those are some basic ideas that will get you a little closer, but beyond that we're getting into making a tutorial, which is outside the scope of this website ;-) I wish you the best of luck, and do remember to check back here when you have specific, answerable questions. Happy Blending!


Proportional Editing is not working, object is moving Have a question about Proportional editing. When I choose the vertice, then press O, and press G - as result my object is moving completely unstead of editing. Please advise what can be wrong?

Lower the proportional editing influence using the mouse wheel.


How to chang matcaps light direction in blender 2.8 Hey everyone so with new matcaps in blender we are getting really cools shapes! I wanted to know if I can change matcaps light direction in an easy way! because I would like to use toon maptcap as a starting point for painting! the only problem I've got is I can't react it to light direction! I know I can make toon shaders and free style which is also awesome! but toon matcap is also awesome at the same time and it's only one click! I was wondering if there is a way to make matcaps to react to lights or changing it's light direction in Blender!
Tnx.

A matcap will never respond to lighting -  it's a 'fake' ... a self-lit reflection map of an spherical environment that isn't there. In fact, in effect, it's a 'reflection' of half a sphere (infinitely large), directly behind the camera. So if you shade a sphere with a matcap, it will always look exactly like the matcap texture, wherever you look at it from.

In Blender 2.8, you could render the matcap texture you like on a sphere, and in any image-editing application, rotate the texture in 2D. Then, as shown in this video, put the edited image in a 'matcap' folder on the right path. Using it would  have the effect of spinning the 'light source' in the plane of the screen, but would never allow you to bring the 'light' further to the front or back of the 'lit' object.

Perhaps a more fruitful approach would be to create your own matcap - using this kind of setup:

..which is lifted directly from Cédric Lepiller's video on how to create matcaps.. it's not too hard.. no baking, just rendering a sphere. Then at least, you could adjust the 2D rotation in the mapping node, and not have to go to an outside application to do that.

However. Having said all this, it would be much better to create your own toon shader tree. (Another question.) Then you could arrange your own lights, and do all sorts of useful things for painting like adjusting the tonal ranges covered by the bands of shade on the surface of your model.


Merging vertices in Blender - 3DS Max style I'm having a problem here and I hope someone could help me find an answer to it. So, as the title suggests, I'm coming from 3DS Max, relatively new to Blender.
When I finish creating a mesh inside another 3D software, I bring it to Blender for further editing. One of the main things I do is to merge separate parts into one. So, naturally, I use the merge by distance option. And here lies the problem. By giving the exact same distance here and in the weld option in 3DS Max I get different results and sadly - Max handles this better. I'm not really sure how merging vertices by the same distance can give different results but apparently, it does. So my question is: Does anybody know why this happens? If so, can you tell me how to get the same result in Blender?
To further explain the difference: When having a dense geometry and trying to weld-by-distance 2 separate objects, in Max they weld vertex to vertex from one object to the other. In Blender however, if the distance between 2 vertices of the same object is lower than that of the vertex corresponding to it from the other object, it merges them instead. So, in a way, Blender does it as you'd think it should - it merges the 2 vertices that are closer to one another. But in reality, when merging, it would be great if I could somehow "tell" Blender to consider objects when merging and ONLY merge vertices of different objects.
So, to sum it up:
I'd like this:

to be merged like this:

instead of this:

And, while in this simple case the method with scale to middle + auto weld would work, in the case of a more complex geometry, like a Jacket's sleeves for example, this wouldn't work.
If there's no way to do this, I think it should be possible for a script to be created that only merges vertices IF they are not directly connected or if they're not part of the same object (or in Blender's understanding if they're not linked). Also could work by checking if the UV's are connected somehow and only merge vertices of parts that don't have connected UV.
P.S:
I tried the suggestion with the bridge and it doesn't work the way I want it to.. So, as with the Jacket case mentioned above, I'm showing now an example with the bottom elastic of a hoodie.
This is how it looks before bridging:

And this is how it looks after that:

I tried all connect loops variations and nothing does the job. This is a simple example with just the elastics, but you can imagine what happens with the whole hoodie. So in order for this bridge method to work, I need to bridge loop by loop and that would take forever for something that takes a second in 3DS Max.

Select vertexes - Edge Ctrl+E ⇾ Bridge Edge Loops (Also available in context menu in edge select mode). Then press F9 to adjust last operation, select Merge.


Emission plane is casting a shadows in cycles My emission objects (which are flat planes) are casting shadows parallel to their faces. Rotating the planes causes the shadow line to move but not to diffuse.

Blender screenshot:

Render with shadows:

Under Cycles Settings I have tried turing off shadows for both the emission objects and the ground, but the shadow is still there. What do I have to do to fix the issue?

They are not casting shadows, they only emit light from the faces, not form the edges. You can try to extrude the faces, but even so, the faces on the edges won't emit enough light to match the one coming from the front and back faces.


Is there a way to quickly switch Themes? I have my normal modelling theme:

And then I change to a 3D no-gradient white background with grid scale = 0 and no relationship lines in perspective mode:

I then use this to take screenshots of the object for further processing in Paint.

Is there a way to quickly store and switch between these two Theme layouts? I find this a bit quicker than adding a camera, white background and rendering.

You can use Only Rendered and Wold Background to achieve the same result.


How can I append a group after having it linked earlier? I linked a group in from another file, it was a character with armature. After linking it I realize that I don't have control over the armature so I deleted it and decided that I want to append it in instead. But it just won't appear after appending. I tried other groups, in different files, it appears that this is persistent. I can't append any group as long as I have: 1. linked it 2. then delete it.

How can I solve this problem?

So here is a very simple solution of how to append a group after having previously linked it in or how to simply get rid of an unwanted group instance:

In the Outliner, switch to "Blender File", and open up "Libraries".

Right click the library referencing the linked group, and press "Delete".

You will now be able to immediately append the group as normal, no saving or re-opening required!


how would i go about opening the save as menu using python? I'm trying to create an add-on that executes a few steps before opening the save as menu.
I am the point where I can execute the options and save the file, but I would like to open the save as menu, instead of directly saving over an already existing file.

import bpy

bpy.ops.object.transform_apply(location=False, rotation=True, scale=False,
properties=False)

bpy.ops.transform.rotate(value=1.5708, orient_axis='X',
orient_type='GLOBAL', constraint_axis=(True, False, False), mirror=True,
use_proportional_edit=False, proportional_edit_falloff='SMOOTH',
proportional_size=1, use_proportional_connected=False,
use_proportional_projected=False)

bpy.ops.object.transform_apply(location=False, rotation=True, scale=False,
properties=False)

bpy.ops.transform.rotate(value=-1.5708, orient_axis='X',
orient_type='GLOBAL', constraint_axis=(True, False, False), mirror=True,
use_proportional_edit=False, proportional_edit_falloff='SMOOTH',
proportional_size=1, use_proportional_connected=False,
use_proportional_projected=False)

bpy.context.area.type = 'VIEW_3D'
bpy.ops.wm.save_as_mainfile()
bpy.context.area.type = 'TEXT_EDITOR'

This is what I currently have, is there any way to instead of saving directly to the save_as_mainfile() , open the save as menu?

In order to open the file browser you need the operator's invoke() function to be called. This can be accomplish by setting the execution context. Pass the argument 'INVOKE_DEFAULT' into the function call and the file browser will open.

bpy.ops.wm.save_as_mainfile('INVOKE_DEFAULT')

The manual explains the execution context in the following way:

  Execution Context

  When calling an operator you may want to pass the execution context.

  This determines the context that is given for the operator to run in, and whether invoke() is called or only execute().

  ‘EXEC_DEFAULT’ is used by default, running only the execute() method, but you may want the operator to take user interaction with ‘INVOKE_DEFAULT’ which will also call invoke() if existing.

  [...]


Extrude curved surfaced by a constant distance I'm trying to extrude an area inwards, so that the new boundary is a constant distance from the old boundary.  Essentially, the piece now has exactly the same size and shape as the hole that I have, but I want there to be a constant gap between my piece and the hole.

I've looked at this answer, but it doesn't give me what I want.

Here is the original object:

This is a sketch of what I want:

Here's what I have tried:

Extrude region:

Extrude region (vertex normals):

Extrude individual:

How can I get what I want?

Here is my file.

Thanks!

EDIT: Here is what happens if I use the solidify modifier:

It sort of works, but the distance between the new wall and the old one isn't uniform.  This is how it looks like (the distances highlighted in red should be uniform, but they aren't):

See Properties (N) > Transform > Scale XYZ is not 1 in all axis.
Since Modifier transformation is applied first on Object Data and Object Transformation after means Solidifier extrudes thickness and Object Transform squeeze that result.

To solve your issue Apply Scale Transformation (Ctrl+A)

What Object Transform is see this answer or check Manual.


How do you create a Math Formula for a Model Object? In Carrara 4.0 Pro, I am able to create various modeling objects using math.  The UI comes with 4 sliders (p1, p2, p3, p4), with values varying from -1 to +1 or -pi to +pi, and a text area for the logic loops that describe the formula, similar to the following:

r2=20*p1;
r1=10*p2;
t=2*PI*u;
p=PI*(v-0.5);
x=r1*cos(t)*cos(p);
y=r1*sin(t)*cos(p);
z=r1*sin(p);
x=x+r2*cos(t);
y=y+r2*sin(t);

So something like this would be nice to have, in Blender, as well.

There's a Mesh Function add-on:

generates a UI for making parametric surfaces:

Blender 2.79-

Or use Sverchok's scripted node. This may be more complicated at first but allows a lot of customization.

import math
from math import pi as PI
from math import cos, sin

def sv_main(p1=0.3, p2=0.7, vdivs=20, points=200):
    verts_out = []

    in_sockets = [
        ['s', 'p1', p1],
        ['s', 'p2', p2],
        ['s', 'vdivs', vdivs],
        ['s', 'points', points]
    ]

    r2=20*p1
    r1=10*p2
    theta = 1/points
    vtheta = 1/vdivs

    for v in range(vdivs):
        v_points = []
        for i in range(points):
            t = 2 * PI * (theta * i)
            p = PI * ((vtheta*v) - 0.5)
            x = r1 * cos(t) * cos(p)
            y = r1 * sin(t) * cos(p)
            z = r1 * sin(p)
            x = x + r2 * cos(t)
            y = y + r2 * sin(t)
            v_points.append([x,y,z])

        verts_out.append(v_points)

    out_sockets = [
        ['v', 'verts', [verts_out]]
    ]

    return in_sockets, out_sockets

Because the script makes a nested list of each V ring of verts, the UV Connection node can make the appropriate "UV edge-surf".

For help with Sverchok in general see the documentation.
For help with Scripted Node specifically first have a look at the dedicated document about it

Blender 2.8+

for Blender 2.8 and Sverchok you will use ScriptedNode Lite, and it requires a small modification to the above script. I think you'll agree it's less verbose.

"""
in p1 s d=0.3 n=2
in p2 s d=0.7 n=2
in vdivs s d=20 n=2
in points s d=200 n=2
out verts_out v
"""

import math
from math import pi as PI
from math import cos, sin

r2 = 20 * p1
r1 = 10 * p2
theta = 1/points
vtheta = 1/vdivs

for v in range(vdivs):
    v_points = []
    for i in range(points):
        t = 2 * PI * (theta * i)
        p = PI * ((vtheta*v) - 0.5)
        x = r1 * cos(t) * cos(p)
        y = r1 * sin(t) * cos(p)
        z = r1 * sin(p)
        x = x + r2 * cos(t)
        y = y + r2 * sin(t)
        v_points.append([x,y,z])

    verts_out.append(v_points)


Blender 2.90.1 Keying Node doesn't seem to work. Am I missing a switch somewhere, or does keying need to be added to the clip like a mask? The Keying Node doesn't seem to work. Am I overlooking a switch somewhere, or does keying need to be "added" to the clip, as masking does, in order for it to render? Here is my compositor node set up.

It is set up according to various tutorials that I found, but nothing doing. Thanks.
here is the blend file:

I FINALLY got to the bottom of it. There was a video loaded in the sequencer that was rendering INSTEAD of what was set up in the compositor. Once I deleted the clip from the sequencer, all was good. Hope this helps!


How to add a background behind a video? how can you add a background image with a video in Blender?
 I would like to use a video from the screen of my phone (the size is in "portrait" mode), and add a background to fill the rest of the screen, so that it can fit the size in youtube.
Thanks

Edit: here is a good video that explains how to proceed (videos 11 and 12) : https://www.youtube.com/watch?v=x_dy4yMSJSw&list=PLjyuVPBuorqIhlqZtoIvnAVQ3x18sNev4&index=12

All you need is to add some strip at the bottom of the sequencer.

To add a solid color add a Effect Strip->Color and place it under your video strip.


Difference between VSE Add Blend Type and Compositor Mix Node Set to Add I'm doing another lightsaber movie and I just realized something that makes me pretty sad.
My workflow is such that I edit, then export reference footage, animate the lightsabers, and then render out the lightsabers and clashes by themselves that way I do not lose more quality in the original footage and I have more flexibility. However, I realized that the images I'm seeing in the compositor aren't quite the same as what comes out of the VSE when I set the clip to the Add blend mode:
Here is my node setup:

This makes it so I can see how it should look with the footage and render out the lightsaber layer before it's added to the footage:
So then I take the rendered out lightsaber layer and add it back in the VSE:
But much to my dismay, rendering out stills from the compositor and VSE look very different (I personally prefer the compositor's look).
With the Compositor:

With the VSE:

To see the difference easier, right click to view in a new tab and then tab between the two (I didn't want to loose any more image quality by using a .gif).
So what is the difference between these two addition functions and how can I make it so the VSE add blend mode has the same result as the compositor? Clamping the add nodes and turning off the adjustment layer does not influence this effect.
Thanks!
UPDATE: Rendering to .exr surprisingly does not fix the issue. Further testing also shows that the issue is most likely in the adding method.

Most likely the difference is not how blender does the add operation, but the fact that you are dealing with two very different kinds of images.

  "I personally prefer the compositor's look"

In the compositor you have the original rendered layers, 32bit float linear, scene referred information.

If you compress that into a video format then you've transformed your images into something quite different: 8 bit display referred images that have been converted using the view transform (set in the color management section), and on top of that they have been compressed using some codec that basically trows away a lot of information in order to have smaller files and creates a new set of problems...

What is the solution then?

  "I do not want to loose more quality in the original footage"

You don't want to loose quality on the VFX created in blender either! like the quantization and saturation errors you show on the last image.

So instead of rendering to a video format, save your elements to OpenEXR files. You will preserve all of the information from your original render and it will give you even more flexibility for your final compositing.

Also, since you are dealing with emissive elements with no opacity, you need a format that can do proper associated alpha. EXR will allow you to use proper transparency for the emissions and glows.


Form a circular Mesh out of an object Complete beginner here just three days experience.

I am creating a bottle water, picture below. and I want to achieve two things.

I want to have a circular mesh in the shape of the circle beside the bottle to cut all the 3 bottom swimming lines like as if it is part of the bottle on both sides.
I also have a vector logo which will go into the circle all meshed together with the bottle.

Like I said I am a complete beginner, and I will be glad if someone can point a very easy and straightforward tutorial to achieve this.

Thanks

Edit

Look at this plastic.

I want to achieve the annotated bump on the plastic below where the annotation is using the circular shape beside the plastic or any means possible.

Guide will be appreciated

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

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

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

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

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

Dissolving unwanted vertices
Merging vertices
Adjust cut position

Dissolving vertices:

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

Mergin vertices:

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

Adjust cut position:

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

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

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

Last steps, filling the hole:

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

Link to the blend file


Bevel won't go above certain size Sorry if I've overlooked something simple but this is driving me crazy. I'm just trying to apply a bevel modifier - but there's a limit to how large I can make it.

Please see the image to see what I mean, paying particular attention to the width value of the modifier.

Disable the clamp overlap option. Clamp overlap prevents the bevelled edges from overlapping each other (typically an indication that you don't want to exceed that bevel width).

If you're dealing with bad artifacts after exceeding the clamp overlap limit, this is most likely due to bevelling of a very acute angle. Try using the weight or vertex group limit methods to only bevel other edges in that case.


how to avoid straight lines in normal maps i've been having some trouble with baking normals.
I make a hi poly mesh and retopo it. Since i need to uv unwrap, i just mark some seams into the low poly model.
The problem is i get some odd straight lines into the normal map in the exact places i marked the seams in.
I've been trying to search for a solution but it keeps happening and adds some strange shadings.

Did you use a margin when baking and did you leave enough space between the UV-Islands? Blender is approximating the map at the seams and if your image doesn't reach all around the UV-maps (e.g. your UV-coordinates are right at the edge of the UV-grid) Blender has problems approximating this edge smoothly.


Reflective Glass shader, like those in our window I want my glass in Blender to be reflective and also transparent, like most glasses of the windows (not MS Windows).

They reflect light to the lighter side. For example, during the day, it behaves like mirror in the outside and the inside of the building isn't seen from the outside. But during the night, the inside is ligher, so it behaves like mirror in the inside, and we can see inside the building while looking from the outside.

How to achieve this effect in Blender? (The day/night example was just for explaining it, so please suggest shaders and materials, not different materials for each time! I want a single material and a single window glass)

Thanks

The standard Glass shader gives you exactly that.
Or if you prefer Principled BSDF like me:

Set Transmission to 1
Use Roughness and Transmission roughness to control the glass type
Add thickness to your glass for realistic results

Suzanne on one side, and a black material on the other to make a mirror

To make this work in Eevee

enable Refraction in the Render tab
enable Screen Space Refraction in your material settings


.exr file quality options for seperate renders? When rendering out a scene where all render passes cannot be placed into one .exr file, what is the best alternative for additional passes to be at the same quality level as an .exr?

For example:
If you are rendering a scene and can render diffuse, ... etc (all the usual passes) in one .exr file but later learn you need an additional pass or two which would be added to the same composition as the .exr file, what file type would use? Would another .exr be the most efficient choice to keep the same quality even if it only has one or two additional passes for example?

Yes, another EXR would be the best option. Any other file type will have a hard time matching the quality and compression method. And it's not as if the EXR will be "bloated" with lots of passes without data. It just won't store data that you don't give it.

It'd also be more convenient to use the same types for the same things. If you're going to be pulling in passes for compositing, it makes sense to use the same type of file for that same process, even though it might contain different passes.


How do I get a cable to realistically follow the back of my security camera when it moves? I want this cable to stay attached to the post and the security camera while the camera rotates. I would like to prevent unrealistic stretching. I've tried using hooks with vertex groups but the end caps just stretch and the cable doesn't move. I'm not sure if I need cloth physics or soft body physics or something else.

A way to do it is to use a curve for the cable.
You can hook the curve handle linked to the camera to an empty. Then parent this empty to another one driving the camera rotation.


Specific vertices shoot off in random directions when bevelling I am currently trying to create a basic wheel-like shape to test out blender and work out some of the key shortcuts on Mac.

I am encountering an issue when I try to bevel specific edge loops, please see the pictures:

I fully anticipate that I have some sort of geometrical inconsistency - I have tried some options from mesh>cleanup on the whole mesh object as detailed in this answer like 'merge by distance' or 'split non-planar faces' (I don't really actually know what that does but I hoped it might make any doubles more obvious).

The issues pictured only occur on these edges, others around it are fine

This turned out to be an easy fix, somewhere along this line my 'surface normals' got all messed up, and Blender's vertices follow their respective surface normals when transforming like in the bevel tool.

To resolve this problem (unless you have custom surface normals and resetting isn't an option) is to simply select the area which is not behaving as expected (in this case the edge loops and recalculate normals. For Mac the shortcut for this is shift + N.

See more about it here


Why does this happen when using subdivision modifier? As you can see on the picture the mesh is pinched on the right side, I cannot understand why, can anybody help?

This can have multiple reasons, mean crease has this effect but it's not purple on the edge so I exclude it. "doubles" is another possibility, the most likely one. Doubles is what we blenderers refer to when multiple vertices or points are on the same location.
This can be caused by loop cuts that you have placed on other places and not noticed how it went around there too or when you extruded, but then rigth clicked it and forgot about it.

Luckily there is an easy fix for that.

It seems like you are using blender 2.8. I am not sure how your settings are but if you press space bar you can search for "merge by distance" in older blender versions this was known as "remove doubles". It will, what the name suggests, merge vertecies by their distance to each other. But if you do so make sure you don't accedentally get unwanted triangles, which can happen when it was a loop cut that went around the without you noticing.


Why can I see the camera gizmo in the 3D View but not the actual camera itself? I am new to Blender. The camera widget in my viewport only displays as a dot and yellow rectangle, while in the tutorials it has a pyramid shaped bounding box and arrow indicating which way is up. How do I correct this?

What you are seeing is the camera's gizmo, which only shows up when selecting the camera object.

To see the camera wire shape, enable Extras under Objects in the 3D Views Overlay options.

Make sure, camera visibility is on.


Metal material with glass and gloss node? I was downloading some random blender files for a project and I came across this strange piece. http://oscar.iitb.ac.in/enlargedimage.do?fileid=PH_Con01&filename=Connecting%20Wire&subject=Physics&cycles=cycles

For some reason the metal shader is this:

This is what the render looks like:

Is there any reason to have a semitransparent metal?If not,
what should I replace it with?

Glossy shader alone doesn't indicate metal - it indicates reflection. So it is very common in shader node groups because every material is reflective one way or another (except of some vantablack, emissive materials, etc.)

However the shader you presented is not physically correct - thus it is an example how not to construct shaders.

You don't want to mix in glossy node through mix-node with constant mixing factor - you need to mix in glossy through fresnel:

How do I create a reflective white material?

When you have a rough surface you need a specially constructed Fresnel node that accounts for the roughness (image borrowed from blenderguru but original credit goes to cynicatpro):

So if you add a glossy node correctly to any material (shader), you are just adding another layer of reflection - basically you are adding a clear coat - you are layering.

On some materials this makes little to no sense - like on glass. It makes a look of heavier glass - this can be achieved with IOR better.

If you need a metal shader, you are good to go with one glossy shader. Metals don't have any diffuse component:

This is as complicated as you will probably ever need. It has a metal rim color control and metal IOR control which you can unplug and remove for simplicity.


Scaling UV shells when stitching I have 2 UV Shells. (UV Shell A) and (UV Shell B)... (UV Shell B) is 200% the scale of (UV Shell A).

If I stitch them together they both retain their original size, but the edge where they are stitched is scaled to a size midway between the 2.

I there a way that when I select an edge on (UV Shell A) and try to stitch it to (UV Shell B) , but have (UV Shell B) scale to the size of (UV Shell A) so that there is no distortion in the UV Map?   I know other 3d apps have this option or do it by default... is there a way to achiever this in Blender without having to manually go in and scale the UV shells?

Note:..  (UV Shell A) has to remain where it is as it's already in the correct place, so I can't just map them again.

You can do it using Live Unwrap and pinning vertices of the islands.

First select one UV island and hit V button to pin all the vertices, then select and pin one vertex in the center of the second island.

Then remove UV seam in the place where the islands should connect.

Change the mode to Live Unwrap.

And grab the center pinned vertex of the island and move it until you have a desired result.


How can I dynamically generate operator classes? I am trying to generate dynamically operator classes.

The code below is based on the code at the end of this link

cls.CustomOp = []
for i in ['a', 'b']:
    idname = "object.operator_" + i

    def func(self, context):
        print("Hello World", self.bl_idname)
        return {'FINISHED'}

    opclass = type("DynOp" + i,
                   (bpy.types.Operator, ),
                   {"bl_idname": idname, "bl_label": "Test", "execute": func},
                   )
    bpy.utils.register_class(opclass)
    cls.CustomOp = cls.CustomOp + [opclass]

I have tried the code above in poll and draw contexts, but always the same :

  "RuntimeError: register_class(...): can't run in readonly state 'DynOpa'".

What does readonly context mean?
How to do it (and from where) in a non-readonly context?

As you found, you can't register operators during some actions such as drawing or polling. We can define custom operators within an addons register() or within an operators execute() method, you can also manually run your script from blender's text editor without any issue.

For brevity I'll replace your for loop with a function called create_custom_operator()

def create_custom_operator(i):
    idname = "object.operator_" + i
    .... # rest as above

You can then use it in an addons register() -

def register():
    for n in ['a','b','c']:
        create_custom_operator(n)

Or you could use it in an operator's execute(). Note that I use a file list to define the operators here, we can do this in an operator's execute but not while registering an addon as we can't access the filesystem during addon registration.

class MakeCustomOperators(bpy.types.Operator):
    """Create custom operators"""
    bl_idname = 'object.add_custom_ops'
    bl_label = 'Add operators'
    bl_description ='Dynamically create multiple operators'

    def execute(self, context):
        for f in os.listdir('/path/to/data'):
            create_custom_operator(f)
        return {'FINISHED'}

I have given a more complete example in answer to the question that inspired this question.


Cannot find draw mode I want to draw some straight lines on a mesh plane, between specific coordinates, which from what I've read seems like a job for the Line tool in Draw mode. The Blender manual says "Draw Mode is selected with the Mode menu in the 3D Viewport header", but the Mode menu in the 3D Viewport header doesn't have a "Draw Mode" entry, just "Object Mode", "Edit Mode", "Sculpt Mode", "Vertex Paint", "Weight Paint" and "Texture Paint". Has the mode moved, or is there something else I need to do first?

In order to enter the Draw Mode you need to add a Grease Pencil Object (Shift + A) once you do that press Ctrl + Tab and you will see Draw Mode


Paint not showing up in Cycles? Today I imported an .OBJ (Along with .MTL) and selected Material and/or texture (As I tried multiple times) and used texture paint - Nothing was showing up at all, just the original color of the terrain when I imported the OBJ, even in the rendered mode. How do I fix this?

I also would like to know, can I use a material and a texture on an object at the same time? Because I'd like to create a glossy look to the water while painting it with a better blue color.

The link for the .blend file is down below. It just imports with a green color, the color of the grass.

Here it is:

This is an anser to your second question.

Yes, you can have textures and materials at the same time. In fact, you can't have textures without materials.

In cycles, you add an image texture node (found in texture, image), and then you select the path to your image, and simply connect that into the color input of the shader you want to color (or node that you want to input a texture to)


Screw Modifier Destroying Normal in Blender For some reason whenever I use a screw modifier my normals are being destroyed.
The below image is before applying screw modifier

Now after adding screw modifier, it looks like this

I have made sure all the transforms have been applied. Is there a way to correct this quickly?

For anyone who might have the same problem. The screw modifier doesn't work well with faces. So have only edges or vertices when adding screw modifier

Here is a workaround for that problem if you really want to use the screw modifier with faces.

step1: select your object
step2: Add screw modifier
step3: add solidify modifier
step4: play around with offset and clamp in the solidify modifier
until you get normal in the right direction.


Can only move object origin in object mode, cant move the mesh I can only move the origin point of the mesh that I selected in object mode, but not the whole mesh
Did I set anything up by accident?

You have likely enabled the Transform Affect Only option for Origins by accident. This can be disabled in the Options dropdown located in the header of the 3D View. Alternatively you can find the same option in the sidebar (N) under the Tool tab in the Options panel as Jachym Michal noted.


How to adjust the edge sharpness for the subdivision surface (in edit mode)? After you add subdivision and back to edit mode. you can see there is big distance between subdivision surface and framework surface. How can I adjust the framework scale to make it close to the subdivision surface?

Use Edge Crease (⇧ Shift+E)

Quote from the blender manual

  This edge property, a value between (0.0 to 1.0), is used by the Subdivision Surface Modifier to control the sharpness of the edges in the subdivided mesh. This operator enters an interactive mode (a bit like transform tools), where by moving the mouse (or typing a value with the keyboard) you can set the (average) crease value of selected edges. A negative value will subtract from the actual crease value, if present. To clear the crease edge property, enter a value of -1.


Blender 2.76b wont install. Error Message pops up I've been trying to install the latest build of blender on my PC but every time I try I get this error message

Does anyone know why this is happening and how I can fix it?  Thanks!

I also had this problem using chrome, trying all the available packages, downloading to various places including desktop, and running after saving.

I switched to Windows 10 Microsoft Edge browser and was unable to download the installer.  However I was able to download the zip file correctly and run blender from there.

Moral of story, keep trying different things until something works....


import objects from the last frame of a rigid body simulation? Can I have 2 blend files, one with a rigid body of a bunch of objects falling into a bowl, bake that simulation, and in the second blend file import the bowl and objects from the first file with their locations from the last frame of the rigid body simulation?  In the second file I'm going to have a fluid simulation pour a liquid into the bowl, over the objects.

If I export it to OBJ then import into a new file, that works. Before I posted my question I had tried exporting to Alembic because I thought it was better but it didn’t do what I wanted. I guess I needed the not-better and simpler OBJ format.


Making ocean loop hexagonally I am creating objects for a game which consists of hexagonal tiles. I successfully created looping animation for ocean, but failed to make it loop spatially, due to my tile being hexagon, and not a rectangle. As a result, my water objects don't fit together nicely:

Is this "hexagonal looping" possible in blender?

blend file

So here is a hexagon grid converted to a staggered rectangular grid with indication of the direction how the rectangles need to "line up":

The rectangles are seamless from top to bottom exactly how you expect. But the left-right 'seamlessness' needs to be rotated +30°(or -30°) because of the staggering.

When you have the rectangle seamless, you create the hexagon from it by cutting and re-arranging the corners like this:

Now you know how to seamlessly tile hexagons. With a bit of skill you don't need to go through the rectangle phase at all, just create tiling with one tiling axis rotated 30°. That's the trick.


What is the Python script to create nodes? Is there a way to convert nodes (or nodes group) into Python script automatically?

If not what is the python script to:

create a node and set his position
attach a node to another and choose the input and output (and found the name of the input/output script)
create a group
choose if we want to create the node in the compositor or for a cycles shader
mute a node

Here is a repo that does exactly what you want. It has a ready-to-run python script that can be run from the command line in the background without opening the blender GUI. It creates a water material on a surface mesh for a convecting bubble - this is done with 2 different shaders and mixing them using a mixer shader. The script loops through the different files and renders the images as jpeg. The images are also there in the repo. Just clone the repo and run the command given in the README file in the terminal. This scripting was done with Blender v2.78.

https://github.com/nataraj2/BlenderScripting


How to make lines visible on rendering So I want to make a wall similar to this one.I want to have squares on the walls with small lines between them that have a bit of depth(hence why I am not using UV-Mapping) and that actually show up in the render.How can I make these lines?

You could use 3 ways:

model this geometry as contents of one mesh (i.e. subdividing or inset and bevel etc);
create it as it's created in real world - tiles as one object, cement as another.
or just find image of tiles somewhere and apply it as a texture (while it would mean completely another way of adding details, you'll still be able to bake a normal map from that image in order to create a vision of details).

First way is faster, while the second one is better, more flexible and correct.

Since first way was already described, I add details only about second. This technique is described in tutorial Creating a Grungy Brick Wall in Blender.

Model tiles as separate objects (so Array modifier fits perfectly). Leave gaps between them which will be closed afterwards.

Add another object, make it very thin, a bit thiner than tiles and a bit shorter than they are. Add some geometry only to avoid Multiresolution modifier turning object into a ball.
Subdivide added mesh enough to sculpt in the gaps between tiles. Sculpt with both objects visible in order to see how much of effect should be added (i.e. in the beginning of the sculpting you won't really see the object you sculpt on except for the gaps. Keep in mind that cement shouldn't be visible very much and it shouldn't cover tiles with itself).

You could create one more mesh (e.g by duplicating the mesh which represents the cement and deleting Multires from it), bake these 2 meshes into the third one in order to get normal map which you can apply to the third object. See How do I bake a texture using Cycles bake about baking in Cycles. See Baking Normal maps in Cycles for more info about baking normal maps.

This is not needed in order to render scene. This will be needed to lower amount of time to render result and computer resources involved for it to work.
Setup lighting which is desired. Create adjacent materials for objects which represent cement and tiles and render.

Possible result of tiles:

Advantages of this way:

You can model tiles in any way you'd like to; it's lot simpler to bevel cubes when they are separate objects and you don't need to track topology of the whole model, at the same time modeling it to get mesh looking as desired. After modeling you're left only to spread it over the scene with Array modifier.
It's a lot easier to setup materials (no vertex colors, at least for this task; this doesn't mean you won't need to fake dirt).
It's easier to fake inaccuracies of cement surface (which isn't flat).


How can I fit Clothes to a Body? I want to fit these clothes onto the base mesh (mesh has no rig). How do I do that without breaking the mesh entirely?

I don't know if there's an easy way to do it, I would do it manually, but you could try to do it with a Mesh Deform modifier (I tried with an armature then apply it but it was not as good):

Create a low-poly cage around the object you want to deform. In the Properties panel > Object > Display > Maximum Draw Type, choose Wire to make it transparent.

Give the high-poly a Mesh Deform modifier with the low-poly as Object, click on the Bind button.

Deform the low-poly cage.

When you're glad, select the high-poly and click on the Apply button.
Make some corrections in Edit mode with the Proportional Editing mode enabled.


Render layer confusion I'm trying to composite a shockwave effect with the blender render engine.
My scene is currently set up with two render layers:

Layer one: Text, two lamps and a camera.
Layer two: shockwave.

I have two issues currently, however I think the first issue may be beyond the scope of this question, I'm not entirely sure if it's something to do with the layer comp.

Issue One: The shockwave colouring seems not to be working from certain frames. Even though nothing is keyframed, everything seems to desaturate from frame 40 to about frame 100.

Issue Two: The final render is rendering the shockwave layer in front of the text when the object is behind the text. If I switch the alpha mix over node's inputs none of the actual shockwave renders, only the text layer.

Download the Blend

Ok, there are a number of issues with your file:

Select Layers 1 and 2 in the viewport to have both layers render.

In the Render>Shading panel you should select Transparent instead of Sky for the Alpha setting. This will allow your Text layer to render with an alpha channel instead of black.

Secondly, your Hue/Sat compositing node affecting the Shockwave layer IS keyframed on the Value field. Try muting it to see the difference.

Reverse the inputs on your Alpha Over node to put the shockwave behind.

The shockwave image is very light when viewing in Color+Alpha mode in the UV/Image Editor. If you switch to Color only you can see a stronger effect. Alternatively, you could composite a black background behind everything to see it better.


Blender weight paint, brush doesn't work properly on the mesh it barely affects the object I got a problem of weight paint.
As you can see, brush doesn't work properly on the mesh.
https://www.youtube.com/watch?v=AStk0BR3cp0&feature=youtu.be
I tried removing and reinstalling blender, or using other version of blender, but still the brush barely affects an object.
How can I solve this problem?

I tried to duplicate your video to no similar results, but It looks like is had to do with some setting you must have changed. On the left hand side check the dropdown menu for stroke and curve and check those settings, Stroke should be on space, and curve should look like its going top left to bottom right in a slope. If that doesnt work check the options tab on the left and make sure restrict is not checked on and neither is the x mirror or topology mirror.

If all else fails, under the file tab all the way up top just select "load factory settings" and that should resolve your issue. And if that fails then maybe it was a bug in the version you're using which is very old, you should update to the latest stable build which is 2.79


Does render samples matter when using imported images in Compositor? I rendered out an .EXR image sequence (300 frames) at 2000 samples. I opened up a brand new blend file and imported the images to add a "glare" effect in compositor. When I re render out these images (with the glare effect) does the render samples affect the output? Better yet, What in the render tab effects the image sequence with any added effects?

Samplings do not count in the Compositing process.

If you don't have any RenderLayer Node in the NodeTree, the 3D scene won't even be rendered, but the nodeTree will so, it doesn't count. You can have strange artifacts in glare if the Quality of the node is set to low.


fluids simulation : do not fill domain? I'm trying to generate a realistic rain using fluid simulation (I need realistic droplets).

I was wondering if it is possible to "emit" fluid from my inflow objects without having it filling its domain; like you can kill particles when it touch a surface.

I know I could make a bigger domain but this costs a lot in performance.
My idea is that if I could ignore the "filling", the performance could be better and the cache would be lighter.

Possible ?

I just found out that this is what outflows are for.


Blender not accepting CSV file CSV File Not Supported Error dealt with the error:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xef in position 23:
invalid continuation byte

Now there is a different problem. The code is:

import bpy
import csv
import sys

file = open('test.csv', 'rU', 'ignore')
reader = csv.reader(file)

The error message is:

TypeError: an integer is required (got type str)
Error: File format is not supported in file '/PI-SAT/proj001/test.csv'

I have verified that test.csv is a valid .csv file by running a different script:

import csv

path = "test.csv"
file = open(path,'rU')
reader = csv.reader(file)

header = next(reader) # 1st line is header
#data = [row for row in reader] # Read remaining data
print(header)

data = []
for row in reader:
name0 = row[0]
name1 = row[0]
vid_file = 'test-videos/' + row[5] + '.m4v'
cli_line = name0 + '", "' + name1 + '", "' + vid_file
print(cli_line)

This runs exactly as expected as a stand alone Python script.

What is causing the error when I attempt to run the code as a Python script in Blender?

In the first example, you tell the open function to ignore errors with open(..., 'ignore') . If a file is not found, it will have the behavior that you mentioned:

TypeError: an integer is required (got type str)

Also, the U mode is deprecated, so you probably shouldn't be using it.

A reasonable possibility is that where you are running it in Blender, the current working directory is different than what you think it is. Try printing out the result of os.getcwd() and os.listdir() like so:

import os

print(os.getcwd())   # current directory
print(os.listdir())  # files in current directory