text:
Blender Object keeps moving back to 0,0,0
I am new to blender, and I have just created a island using ANT landscapes, and I have build two boats for this.

Two boats on island
They are in this place when I am in object mode, but when I render it they appear here:

I check the position of where they end up, and it is both where they were imported and 0,0,0. Although, all the other objects I have imported have not changed position. Does anyone know about how to fix this or have experienced this problem?

Have you tried applying the location of the boats? (Ctrl-A)

You have to apply the location of the objects with Ctrl + A, otherwise the location is reset when you render.

This doesn't seem to make sense to me. If he's created the boats, and he's placed them using normal grs operations, then applying the location shouldn't be necessary, AFAIK. Can you explain what's going on? Why does the location get reset when he renders?

@Matt, it could be a multitude of problems. There could be parented objects, there might be a constraint messing it up, they were imported, so the origin might be screwed up. Applying the location will solve the issue of an object's position resetting most of the time.

Yeah, that might make sense. I just feel like it doesn't solve the problem.

I think you've accidentally added a keyframe. You can confirm by moving the boat (with G) and then pressing the right arrow to scroll to a different frame. If the boat snaps back to where it was before you moved it, then it's been keyframed. Applying the location will keep the boat from moving... but it won't solve the problem. If you want to move it again, you'll have to apply the location again, and so on.
If the above reveals a rogue keyframe, open the graph editor and press A to select all, then Delete to delete all the keyframes (assuming you aren't animating anything that you want to keep; otherwise, just delete the keyframes for the boat).
You can delete all the location keyframes for the boat by selecting it and then looking in 3D view > Properties panel (N in the 3D view) > Transform > Location:

If the values are highlighted green, or yellow like in the above screenshot, that means they have a keyframe. (Yellow means there is a keyframe on this frame, green means there is a keyframe on some other frame).
To delete all location keyframes on that object, right click on one of the values and select Clear Keyframes:


text:
How to remove the 'Reload trusted' button when opening blend file
I would like to try out the new SheepIt renderfarm service with a short film I'm making. The problem is, my short film makes use of the Cookie Flex Rig (http://www.blendswap.com/blends/view/61707). Everytime I open the file on my machine, I have to set 'Reload trusted' to see the characters as the rig uses a lot of python code. However, it appears the renderfarm doesn't ignores this and renders without 'Reload trusted' which resulted in weird artifacts.
How would I go about making my blend file open without the 'Reload trusted' popping up? I've tried the f-curve version fix, removing rigify ui python code, and still get the 'Reload trusted'.

It seems sheepit disables python auto execution (The seem to be running blender with the --disable-autoexec flag), so no matter what you do it will be disabled when rendered by sheepit.

Sheepit is a distributed render farm that shares users computers to do the work. If the users allowing the use of their computer have an exclude path that includes the location of sheepit files then that might override the -y cli option. Sounds like it could be a situation of mixed results as far as auto-scripts go. It could be useful to clarify what takes precedence, prefs or cli so I am asking that question

@sambler The CLI takes precedence (just tested it). Sheepit downloads it's own portable version of blender and puts it in /tmp, so local user prefs don't apply. I imagine they are disabling auto exec for security reasons (so users aren't vulnerable to jobs containing malicious python)

Have you tried activating "Auto Run Python Scripts" in the user prefs?

Setting this option, removed the "Reload Trusted" button whilst using add ons for me.

AFAIK this only affects the way your local version of blender handles scripted drivers, I don't think it will help with a render farm.

Thanks Phip, it still doesn't allow SheepIt to render the rig, but I found this useful on my own machine (no more having to press 'Reload trusted' everytime!)

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Switch to vertex, edge, face mode in edit mode via python
Is it possible to switch to vertex mode (and edge, face mode) via python. I know I can toggle between object mode and edit mode in python with
bpy.ops.object.editmode_toggle()

But how can I explicitly say I want to go in vertex mode?

bpy.ops.mesh.select_mode(type="VERT")
bpy.ops.mesh.select_mode(type="EDGE")
bpy.ops.mesh.select_mode(type="FACE")

Look up the operator in the api documentation.

CoDEmanX's solution is much better because the scene doesn't get reloaded. It will be faster and also easier to use of course.

I prefer to not use operators, if they can be avoided. You may use:
bpy.context.tool_settings.mesh_select_mode

Assign a tuple of 3 booleans to set Vertex, Edge, Face selection.
To activate vertex selection mode, use:
bpy.context.tool_settings.mesh_select_mode = (True, False, False)

For edge + face multi-selection mode, use:
bpy.context.tool_settings.mesh_select_mode = (False, True, True)

etc.

When working with the BMesh Module (bmesh), there's also
bm.select_mode

For edge selection, do:
bm.select_mode = {'EDGE'}

For vertex and face selection multi-mode, do:
bm.select_mode = {'VERT', 'EDGE', 'FACE'}

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
How to properly rotate bevel object on a fractured beziercurve
I am trying to place long benches on a lot of edges in a park. I decided to use Curves with a bevel object for that. I placed edges on the places where the benches need to come and converted the mesh to a curve. There I added a bench profile. I placed the origin point of the bench profile to the bottom so I thought that works without problems. Now does the problem occur that the profile is randomly rotated over the curve like you can see on the image below. These images are taken on different positions in my park.

Of course, I did try to search for a similar problem and what I found here is that you need to rotate the profile in edit mode but that does not solve the problem because it keeps the different rotations but then just from another angle. Also is this inaccurate because you never know when it is horizontal.
So what I want is that the broader part of the profile (to sit area) is placed on the top on every part of the curve.
Here my curve (all parts are in one curve), my curve settings and the bench profile:

Can somebody help me with placing the bench profile correctly placed across the entire curve
Thanks in advance

Solved
What I did is create the curve directly from a curve instead of converting a mesh to a curve. I still want to thank everybody who gave suggestions that should work in normal situations.

Related: http://blender.stackexchange.com/questions/16523/keeping-bezier-spiral-curve-handle-tilt-perpendicular-to-a-specific-axis and also: http://blender.stackexchange.com/questions/35771/why-does-a-bezier-curve-twist-when-rotated.

@Carlo Thanks for you answer. I test both "Z-up" and "Tangent" but non of them work. It does not even rotate when I change the setting.

Did you also tried clearing the tilt? Maybe if you could upload a sample of your file, we can have a better look at the issue

@Carlo, I solved the issue, I added an answer where you can find what I did. Still thanks for helping

@Carlo, Here the file for in case you still want to see what could be wrong. Select benche in the first layer. In the second layer I placed a object: benche 2 that is working: https://onedrive.live.com/redir?resid=5E81B0C540A634B5!37323&authkey=!ALjOnuVYgEsjdaM&ithint=file%2cblend

OK, thanks, it always interesting to find "why" certain things happens, so your file is welcome. I think you should have apply the rotation on the curve, that's what is messing all up.

Apply Rotation
Object Transformations are the latest thing that affect your mesh appereance, even after modifiers.

All the curve related options (including the Twisting type) consider the un-rotated mesh, that in your case look like this:

only after that the rigid rotation of the object occours, so the benches will not result having the Twisting type you expected.
Applying the rotation (Crtl+A) will let use the curve's options directly upon the final mesh orientation.

Okay, thanks for the explaination. How can I fix the problem from this sitiuation?

By applying the rotation for the "bench" object. Then I would suggest to also  switch the curve to 2D for a better corner solution of the beveling.

Well, thank you for you time and clear explainations. Have a nice day :)

If your benches are all placed at the same level (absolute height) try converting the spline to a 2D curve.
Also keep your section profile as a 2D curve either way.
If not then enter edit mode in your bench path and try clearing tilt on all vertex by entering edit mode and pressing Alt + T.
If that still doesn't help switch the twisting from Minimum to Z Up.
If some segments have the bench on the "wrong side" you can then select one vertex of that curve spline and press the Switch Direction button in the Tool Shelf.


text:
how add properties to operator modal draw?
UPDATE
Here another example in order to clarify this question, I did a video in order to resume the problem  https://www.youtube.com/watch?v=yShhJOzkJBk:
here the addon working without the BGL CODE.... as you see the properties are working too:

but if I allow the BGL code  many strange things happen:

properties unavailable
the mesh deforms uncontrollably
in some cases blender crash

what I'm doing wrong?
here the full code of this test:
'''
BEGIN GPL LICENSE BLOCK

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

END GPL LICENCE BLOCK
'''

bl_info = {
 "name": "Test bgl + joinmeshr",
 "author": "Diego Quevedo ( http://doshape.com/ )",
 "version": (1, 0),
 "blender": (2, 7 , 3),
 "location": "View3D > EditMode > ToolShelf",
 "description": "Testing bgl",
 "warning": "",
 "wiki_url": "",
 "tracker_url": "",
 "category": "Mesh"}

import bpy
import bmesh
import mathutils
import math
from bpy_extras import view3d_utils
import time
import sys
import bgl
import blf

def draw_callback_px(self, context):

        oa = bpy.context.active_object
        obj = bpy.context.object
        me = obj.data
        bm = bmesh.from_edit_mesh(me)

        for area in bpy.context.screen.areas:
            if area.type == 'VIEW_3D':
                override = bpy.context.copy()
                viewport = area.regions[4]
                v_m = area.spaces[0].region_3d.view_matrix  #orientation matrix

                vertices= [v for v in bm.verts if (v.select == True and v.hide == False)]

                vn1 = vertices[0]

                vn2 = bm.verts.new(vn1.co)

                vn3 = bm.verts.new(vn1.co)

                 #vector conversion from view space to world space

                vn1.select = False
                vn2.select = True
                vn3.select = False
                bm.select_history.active
                values = mathutils.Vector((1,0,0))*v_m

                #the translation is done in global orientation without any constraints
                bpy.ops.transform.translate(value=values)

                #bpy.context.object.location += values   #another way to translate

                vn1.select = False
                vn2.select = False
                vn3.select = True
                bm.select_history.active
                values = mathutils.Vector((0,1,0))*v_m

                bpy.ops.transform.translate(value=values)
                vn3.select=False
                vn1.select = True
                bm.select_history.active
                vn2.select = True
                vn3.select = True

                font_id = 0  # XXX, need to find out how best to get this.

                # draw some text
                #blf.position(font_id, 0, 0, 0)
                #blf.size(font_id, 20, 72)
                #blf.draw(font_id, oa.name)

                # 50% alpha, 2 pixel width line
                bgl.glEnable(bgl.GL_BLEND)
                bgl.glColor4f(1.0, 1.0, 1.0, 0.5)
                bgl.glLineWidth(2)

                bgl.glBegin(bgl.GL_LINE_STRIP)
                bgl.glVertex3f(*vn1.co)
                bgl.glVertex3f(*vn2.co)

                bgl.glBegin(bgl.GL_LINE_STRIP)
                bgl.glVertex3f(*vn1.co)
                bgl.glVertex3f(*vn3.co)
                #bgl.glVertex3f(*ob.matrix_world.translation)
                #bgl.glVertex3f(*context.scene.cursor_location)
                bgl.glEnd()

                # restore opengl defaults
                bgl.glLineWidth(1)
                bgl.glDisable(bgl.GL_BLEND)
                bgl.glColor4f(0.0, 0.0, 0.0, 1.0)

                #SEND TO CUT
                #calcularangulos1(v1, v3, v2,angle)

                listabasuravertices0= [vn2,vn3]
                bmesh.ops.delete(bm, geom= listabasuravertices0, context=1)
        bmesh.update_edit_mesh(me, True)

################################################################################
######  testbgl##########################################
################################################################################

class testbglOperator(bpy.types.Operator):
    "testbgl"
    bl_idname = 'mesh.testbgl'
    bl_label = 'testbgl'
    bl_description  = "test bgl"
    bl_options = {'REGISTER', 'UNDO'}

    chboxjoin0 = bpy.props.BoolProperty(
        name="Join",
        default= True
    )
    chboxVert1 = bpy.props.BoolProperty(
        name="Select",
        default= True
    )

    def main(self, context, chboxjoin0, chboxVert1):

        #almacena caras

        obj = bpy.context.object
        me = obj.data
        bm = bmesh.from_edit_mesh(me)

        v1, v2= [v for v in bm.verts if (v.select == True and v.hide == False)]

        if chboxjoin0:
            bpy.ops.mesh.vert_connect_path()

        if chboxVert1:
            v1.select = True
            v2.select= True
        else:
            v1.select = False
            v2.select= False

        bmesh.update_edit_mesh(me, True)

    @classmethod

    def poll(self, context):
        obj = context.active_object
        return all([obj is not None, obj.type == 'MESH', obj.mode == 'EDIT'])
    '''
    def execute(self, context):

        self.main(context, self.chboxjoin0, self.chboxVert1)

        #bisectoroperator(self)
        return {'FINISHED'}
    '''
    def modal(self, context, event):
        context.area.tag_redraw()

        if event.type in {'RIGHTMOUSE', 'ESC'}:
            bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
            return {'CANCELLED'}

        return {'PASS_THROUGH'}

    def invoke(self, context, event):
        #self.main(context, self.chboxjoin0, self.chboxVert1)

        if context.area.type == 'VIEW_3D':
            # the arguments we pass the the callback
            args = (self, context)
            # Add the region OpenGL drawing callback
            # draw in view space with 'POST_VIEW' and 'PRE_VIEW'

            self._handle = bpy.types.SpaceView3D.draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_VIEW')

            self.mouse_path = []

            context.window_manager.modal_handler_add(self)
            self.main(context, self.chboxjoin0, self.chboxVert1)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "View3D not found, cannot run operator")
            return {'CANCELLED'}

class TestbglOperatorPanel(bpy.types.Panel):
    #bl_category = "Bisector"
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOLS"

    #bl_context = "editmode"
    bl_label = " Test bgl"
    @classmethod
    def poll(cls, context):
        return (context.mode == 'EDIT_MESH')

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

        row = layout.row(align=True)
        row.operator(testbglOperator.bl_idname) #testbgl

def register():
    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()

---------------------------
*I'm making some bgl test, but I have for example this problem:
In this case I have the template operator_modal_draw  and I want to add some int property in order to change the line width... something like:
    width = bpy.props.IntProperty(
        name="line width",
        default=10,
        description="",
        min=2
    )

I did a lot of test but I don't have any good result
do you have some ideas?

it might help to describe the goal of your experiment, as it stands the template for operator modal draw code won't let you interact with the UI anyway so you wouldn't be able to drag a slider if it was added.

@zeffii  thanks for your comment, I update the post with more data.. thanks for any help

i'm still not sure I understand what you are trying to achieve.  Though I think it's not a great idea to be mixing bmesh mesh updates and bgl calls inside the one bgl callback (but I cannot prove with facts yet why I think that's a bad idea).

I encourage you to make a GitHub repository for the test, this will allow you to make branches. Master would have the code without bgl drawing and test branches would have various different approaches. The benefit is that you don't have to keep track of what code to comment / uncomment. The sooner you include branches in your development process the less hectic it will be.

can you please explain what you are trying to do in draw_callback_px, i can read the code, but you need to explain what you think it should be doing. Avoid mixing bmesh operations inside your bgl callback. if you want to define drawing characteristics for your bgl, then create a panel and use scene properties. As it stands I think the question is too broad. and the code far too long to be considered a condensed demo.

To answer your questions, I think it makes more sense in the end to have a panel for the script. Sometimes you have to build up extra scaffolding for a script, even for testing. I don't think it is necessary to draw properties to the operator's own panel, you might even want to hide that from appearing anywhere on the UI.
This is a combination of two templates from the Text Editor templates menu.
To demo this you create a cube, and delete all edges so you have only vertices remaining. Run the code from text editor, then to start drawing you press the Simple modal draw..button which appears in the 3dview N panel at the bottom. If I understand the question (and it is entirely possible that I don't and there's some language barrier), You want to have access to the rest of 3d view UI while drawing, you want to adjust some settings for the bgl.
animated gif of demo
This short snippet lets you adjust the line thickness while the bgl still draws. Below the code I talk about some issues I have with your own code, (and ways to avoid crashing)
import bpy
import bgl
import blf

def draw_callback_px(self, context):

    # 50% alpha, 2 pixel width line
    bgl.glEnable(bgl.GL_BLEND)
    bgl.glColor4f(0.0, 0.0, 0.0, 0.5)
    bgl.glLineWidth(context.scene.BGL_DEMO_PROP_THICKNESS)

    bgl.glBegin(bgl.GL_LINE_STRIP)
    for co in self.mouse_path:
        bgl.glVertex3f(*co)

    bgl.glEnd()

    # restore opengl defaults
    bgl.glLineWidth(1)
    bgl.glDisable(bgl.GL_BLEND)
    bgl.glColor4f(0.0, 0.0, 0.0, 1.0)

class ModalDrawOperator(bpy.types.Operator):

    bl_idname = "view3d.bgl_demo_modal_operator"
    bl_label = "Simple Modal View3D Operator"

    def modal(self, context, event):
        context.area.tag_redraw()

        if event.type in {'MIDDLEMOUSE'}:
            return {'RUNNING_MODAL'}

        if event.type in {'RIGHTMOUSE', 'ESC'}:
            bpy.types.SpaceView3D.draw_handler_remove(self._handle, 'WINDOW')
            return {'CANCELLED'}

        return {'PASS_THROUGH'}

    def invoke(self, context, event):
        if context.area.type == 'VIEW_3D':
            args = (self, context)

            draw_handler_add = bpy.types.SpaceView3D.draw_handler_add
            self._handle = draw_handler_add(draw_callback_px, args, 'WINDOW', 'POST_VIEW')

            self.mouse_path = [v.co for v in context.active_object.data.vertices]

            context.window_manager.modal_handler_add(self)
            return {'RUNNING_MODAL'}
        else:
            self.report({'WARNING'}, "View3D not found, cannot run operator")
            return {'CANCELLED'}

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 = 'VIEW_3D'
    bl_region_type = 'UI'
    # bl_context = "object"

    def draw(self, context):
        layout = self.layout
        col = layout.column()
        col.prop(context.scene, 'BGL_DEMO_PROP_THICKNESS', text='thickness')
        col.operator("view3d.bgl_demo_modal_operator")

def register():
    bpy.types.Scene.BGL_DEMO_PROP_THICKNESS = bpy.props.IntProperty(default=1, max=5)
    bpy.utils.register_class(HelloWorldPanel)
    bpy.utils.register_class(ModalDrawOperator)

def unregister():
    bpy.utils.unregister_class(HelloWorldPanel)
    bpy.utils.unregister_class(ModalDrawOperator)
    del bpy.types.Scene.BGL_DEMO_PROP_THICKNESS

if __name__ == "__main__":
    register()

Things to avoid.

Don't mix bmesh and bpy.ops.mesh while working on the same mesh, that's a recipe for bad code and potential crashes.
if chboxjoin0:
    # bpy.ops.mesh.vert_connect_path()
    bm.edges.new([v1, v2])

BGL is one of the few areas in blender that will cause crashes to desktop, you must deal with all errors/exceptions inside your bgl callback, and return the BGL to a safe default state if there are errors.
don't mix geometry modifications inside your bgl callback
separate bgl parts from bmesh/mesh operations
perform mesh operations first, then draw the results.
switching contexts inside bgl callback, probably not a good idea.
start a lot simpler, maybe even with completely unrelated code just to get a better understanding of the interactions between various parts of your code.

thanks for answer... why this don't work in 3D only in 2d?,  how I should mix geometry modifications  + bgl?   still testing with your sample.

This bgl drawing callback is 3d. see bgl.glVertex3f(*co)  I just reused the mousepath variable to store the list of 3d vectors.  Unfortunatelyi'm not aware of many examples of trivial bgl usage that I can point to, but perhaps this might be interesting: https://gist.github.com/zeffii/9451340 (index viewer uses bgl)

Since clicking while trying to set a value on the UI will cause the operator to stop I suggest altering the property by catching an event like key press or mouse wheel, as an example :
# in modal()
    elif event.type == 'WHEELUPMOUSE':
        self.width += 1
    elif event.type == 'WHEELDOWNMOUSE':
        self.width -= 1

# in draw_callback_px()
    bgl.glLineWidth(self.width)

Now scrolling the mouse wheel will increase/decrease the line width

you can also register a new panel where you can set the variables and launch the operator

thanks for write, but this don't solve the question.... how add properties to operador modal draw?  is possible??

sorry I don't know if it is possible

I update the post with more data and other examples in order to clarify this problem. thanks for any help


text:
OS cursor location in Blender Windows
first,  I mean to Operating System Cursor... NOT TO  blender's 3d cursor
second... this location is different to ct.windll.user32.GetCursorPos(ct.byref(pt)), I think because blender made here own calculation from blender UI...
blender allow me to set the location of this "real" cursor using bpy.context.window.cursor_set, but.. how to get the actual location?
thanks

the location you set with cursor_set  is relative to the blender window (bottom, left is 0,0 )  ;can you use  event.mouse_x  ?

here an example http://www.blender.org/api/blender_python_api_2_57_release/bpy.types.Operator.html#invoke-function
import bpy

class SimpleMouseOperator(bpy.types.Operator):
    """ This operator shows the mouse location,
        this string is used for the tooltip and API docs
    """
    bl_idname = "wm.mouse_position"
    bl_label = "Invoke Mouse Operator"

    x = bpy.props.IntProperty()
    y = bpy.props.IntProperty()

    def execute(self, context):
        # rather then printing, use the report function,
        # this way the messag appiers in the header,
        self.report({'INFO'}, "Mouse coords are %d %d" % (self.x, self.y))
        print((self.x, self.y))
        return {'FINISHED'}

    def invoke(self, context, event):
        self.x = event.mouse_x
        self.y = event.mouse_y
        return self.execute(context)

bpy.utils.register_class(SimpleMouseOperator)

# Test call to the newly defined operator.
# Here we call the operator and invoke it, meaning that the settings are taken
# from the mouse.
bpy.ops.wm.mouse_position('INVOKE_DEFAULT')

# Another test call, this time call execute() directly with pre-defined settings.
bpy.ops.wm.mouse_position('EXEC_DEFAULT', x=20, y=66)


text:
How to efficiently merge geometry and get rid of internal shapes, etc?
I have this object:

Think of what i'm doing as using prefab sections that are arranged to form  shapes. I know how to snap and rotate. I'd like to be able to do a simple 2d Union of coplanar polygons, can anyone show me how. Is there an add-on perhaps?

Please insert a new image with multiple perspectives.  Quad view might be convenient.  Is this a three legged table?  Your image is cropped and flat illuminated so I do not have enough visual cues to understand what I am viewing.  Do all vertices exist in a plane?

@atomicbezierslinger Question edited with pictures.

I'm not sure I understand, do you want to merge polygons that are on the same plane, like this : https://i.sstatic.net/Fp2O0.png ?

Quantity of geometry/vertices.  I would prefer more geometry when the following are true.  Object is primary focus of animation.  Curved surface in extreme closeup.  Animation producing graceful curves or detailed destruction.  Final product is video, not game asset.  Powerful CPU with many (12+) GB ram.    I would prefer less geometry if the points above were not true.  What is your situation?

@zeffii That is exactly what I want to do.

@atomicbezierslinger The problem is not that the extra geometry is slowing down my system. The extra faces cause graphical artifacts and make it difficult to precisely align objects.

@Somatic feel free to edit or roll back my edit to your question if it doesn't reflect the core of your query.

Primary
In case you want manual labor. Use a process that does not create unseen faces.  Discard current model.
Use loop cut and extrude in the process.

Yellow Meshes Left to Right
Start with plane. Edit mode. [Loop cut] in X and Y.  Delete face from Middle.  More loop cuts and delete more faces as vertices. Select all and [Extrude] in Z-axis.  One could claim extra loop cuts were made, thus extra geometry.  Since I am not sure of your artistic goals I might claim the corners in your image have some roundness of bevels to them which would require more vertices.
Final Cyan Mesh.
Select a face on corner.  [Extrude] X-axis.  G Move excluding Z-axis.
Boolean Modifier

Here the cross mesh has two Boolean modifiers.  You see intersect.  My belief is it should read union. Yes troubling.  I seek comments on that issue.

Boolean Modifier applied.  Mesh copied to show in object mode and edit mode.
More Angles

In the image above the source face was selected to prepare a rotation origin.    Cursor to Selection.  Extrude on X-axis. Select only the extruded face.
Pivot point for rotation mode set to 3D Cursor.
Rotate 45 degrees on Z-axis. RZ45 Accept.  Cursor to selection a second time for the extruded face. Rotate. RZ45 Accept.  Perhaps you will need -45 in some cases due to my lack of bookkeeping. Angles are shown on the final product selected face.  The two rotations produced the parallelogram.  Set pivot mode to you standard to avoid confusion.

If you were to [create an orientation] this might help you.  Not shown.
More Miscellaneous
Clearly the circles could be constructed by adding a Mesh Torus.  The original design has a mirror symmetry at 45 degrees, X-axis, Z-axis, if we agree on axis names.  So less work via that symmetry.
In the image above the wireframe is shown but in 3D View, but not in render.

Is it possible to extrude at a precise angle? For example, on the cyan mesh, how could I make the extruded bit be exactly 45 degrees?

@Somatic.  Yes see above edit.

You could try to merge vertices for a cleaner mesh by enabling the following options:

After that select a vertex RMB and move G displaced vertices over another vertex to merge them a circle appears around the target vertex confirm merge by LMB.
You could also add the reference image as a background image (only visible in orthographic mode).
Method 1
Use extrusion modeling. Extrude single edges E, rotate them R scale them S and if required move single vertices.
This is what @atomicbezierslinger describes.
Method 2
Extrude one single vertex E along the contour of the reference image and add faces later F.

The easiest way would be to convert the bitmap into a .svg using e.g. Inkscape. and import the .svg to blender.

This is useful, but it doesn't give me the control I wanted (the object I'm making has rotating bits and other geometry that's not in the image). Converting that path results in a bunch of unneeded vertices and edges, so it doesn't actually solve the problem.
What I'm looking for is not a way to make this particular shape, but a method I can generalize to make any kind of intricate, precise geometry.

@Somatic I see, I added another alternative answer emphasizing my favorite tools, Alt-M is also useful to merge vertices.


text:
Custom icons work when example is run in TextEditor, but fail in my add-on code?
I've been trying to make an addon in Blender 3D, and have basically started out making a custom button that's going to generate a mesh. I want a custom icon for the mesh I'm going to generate, and I can get it to work as a script, but not as an addon. So when I click 'run script' a button shows up with my icon (which is in a folder called 'icons')
I've seen one code template that looks promising for an addon, but I can't get my icon to load when I try it:https://developer.blender.org/diffusion/B/browse/master/release/scripts/templates_py/ui_previews_custom_icon.py
If anyone has any examples of working addon code (like an example addon with a custom button with a custom icon) it would be very helpful.
I've already tried using one solution I found on this site, but it only works as a script, and not as an addon. Here's the code that works as a script:
   #----------------------------------------------------------
# File hello.py
#----------------------------------------------------------
import bpy

#
#    Menu in tools region
#
class ToolsPanel(bpy.types.Panel):
    bl_label = "MyAddon"
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOLS"

    def draw(self, context):
        self.layout.operator("hello.hello", icon_value=custom_icons["custom_icon"].icon_id)
        global custom_icons

#

class OBJECT_OT_HelloButton(bpy.types.Operator):
    bl_idname = "hello.hello"
    bl_label = "Generate MyMesh"
    bl_icon= "custom_icons[custom_icon].icon_id"
    country = bpy.props.StringProperty()

    def execute(self, context):
        if self.country == '':
            print("Hello world!")
        else:
            print("Hello world from %s!" % self.country)
        return{'FINISHED'}

#
#    Registration
#   All panels and operators must be registered with Blender; otherwise
#   they do not show up. The simplest way to register everything in the
#   file is with a call to bpy.utils.register_module(__name__).
#

bpy.utils.register_module(__name__)

import os
import bpy
import bpy.utils.previews

class Panel(bpy.types.Panel):
    """Creates a Panel in the 3D view Tools panel"""
    bl_label = "Custom Icon Preview Panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOLS"

    def draw(self, context):
        global custom_icons

# global variable to store icons in
custom_icons = None

def register():
    global custom_icons
    custom_icons = bpy.utils.previews.new()
    script_path = bpy.context.space_data.text.filepath
    icons_dir = os.path.join(os.path.dirname(script_path), "icons")
    custom_icons.load("custom_icon", os.path.join(icons_dir, "icon.png"), 'IMAGE')
    bpy.utils.register_module(__name__)

def unregister():
    global custom_icons
    bpy.utils.previews.remove(custom_icons)
    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()

also related: http://blender.stackexchange.com/questions/41565/loading-icons-into-custom-addon?lq=1

i've edited the title so it reflects the problem. and that isn't problems with icons, but problems with setting the path to icons in the scenario where the code is part of an addon. perhaps we can include a line in the template to show what that should look like using __file__

in particular this line won't produce the same result when running it as an add-on:
script_path = bpy.context.space_data.text.filepath

because the code isn't located in a text data block inside the .blend any longer, but directly on your file-system/ harddisk

to get the script path as an addon you can do
script_path = os.path.dirname(__file__)

or as a one liner set icons_dir:
icons_dir = os.path.join(os.path.dirname(__file__), "icons")

to complete your script. I reused the template in TextEditor, and some variable names may have changed. (good practice to figure out what's different). There's no need to use global keyword, using a dict for the preview_collections lets you avoid that complication.
bl_info = {
    "name": "FILL ME IN",
    "author": "fauxbar",
    "version": (0, 1),
    "blender": (2, 7, 6),
    "category": "3D View"
}

import os
import bpy

# global variable to store icons in
preview_collections = {}

class ToolsPanel(bpy.types.Panel):
    bl_label = "MyAddon"
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOLS"

    def draw(self, context):
        this_icon = preview_collections["custom_icons"]["custom_icon"].icon_id
        self.layout.operator("hello.hello", icon_value=this_icon)

class OBJECT_OT_HelloButton(bpy.types.Operator):
    bl_idname = "hello.hello"
    bl_label = "Generate MyMesh"
    # the icon is told to appear by layout.operator(...icon_value=this_icon) (above)

    def execute(self, context):
        print("Hello world, from space")
        return{'FINISHED'}

class Panel(bpy.types.Panel):
    """Creates a Panel in the 3D view Tools panel"""
    bl_label = "Custom Icon Preview Panel"
    bl_space_type = "VIEW_3D"
    bl_region_type = "TOOLS"

    def draw(self, context):
        self.layout.row().label('something')

def register():

    import bpy.utils.previews
    pcoll = bpy.utils.previews.new()
    icons_dir = os.path.join(os.path.dirname(__file__), "icons")
    pcoll.load("custom_icon", os.path.join(icons_dir, "icon.png"), 'IMAGE')
    preview_collections["custom_icons"] = pcoll

    bpy.utils.register_module(__name__)

def unregister():

    for pcoll in preview_collections.values():
        bpy.utils.previews.remove(pcoll)
    preview_collections.clear()

    bpy.utils.unregister_module(__name__)

if __name__ == "__main__":
    register()


text:
Smooth Brush is not working properly. It shows a line and smooths that region when I move it
while Sculpting, I am having a problem with the smooth brush. It was working perfectly earlier, but I think I pressed a key and now it creates a line instead of a round circle cursor. And when I drag it now, the cursor stays there and the line scales. I want it back the normal way like when I move it on a surface it smooths the surface.

This red line is formed when I try to drag the smooth brush.

I got it!
I pressed Shift+S in sculpt mode by mistake which made my smooth brush enabled with Stabilize Strokes. I turned it off by pressing Shift+S again and now my smooth brush works fine. You can also disable this feature from the Stroke method menu.

with blender, if you sneeze or twitch you may lose a day's work!  ;)

I think you just need to change the Stroke Method.

It is a line because the Line method is selected.
You can change it to dots or airbrush.
Hope this helps :)

No I have the space method selected and for all other brushes its also space stroke method But all brushes other than smooth work fine.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Exporting armature without adding leaf bones - bone size change
When I export an armature from blender (FBX) the bones at the end of each 'chain' are exported with a minimal length, in blender the length is fine, but in UE/Cascadeur the bones are small. why is that?
Im not adding leaf bones when exporting, I have no need for the extra bones.
Blender armature:

The exported result (same result both in Unreal Engine and Cascadeur)

Both fbx and blend file, with armature only can be downloaded from here: https://easyupload.io/m/8td8jh

Try Importing the model back again to blender to check whether Blender and UE/Cascadeur perceives armatures the same from your .fbx

When reimporting the FBX back to blender, the bones are a bit larger than they are in the blend file. @YunethAlwis

That does sound weird. Could you send me the Armature only to test it out and find out what is wrong with it...

@YunethAlwis i've added linkjs to both fbx and blend in the question post. thanks.

Okay so I checked it, I tried messing around with the fbx exporter, I still get the same results as yours. I think blender's fbx exporter is not consistent. so I think it cannot be fixed. I hope someone else comes up a solution.

With no end bone, FBX doesn't have a way to draw "length" as FBX is joint based. When going from a BONE that is a point and has length.. to a joint system, just a point, you can't have "length" without another child joint just like modeling a polygon line.. you need two verts to have an edge between them
it doesn't change anything about the skinning or the animation.
If the Source rig from a Joint based software has "end" bones or "dummy" bones, Blender doesn't need them EXCEPT if you let FBX auto orient, then it uses the child bone to figure out how to point and orient the Blender bones when FBX import builds the
armature
This can cause issues like root joints that should be world aligned end up pointing at the spine joint and creating an angle or tilt in all the animations
It gets more complicated because, since those "end" joints are for display only in a Joint Based system, they aren't always there, some people leave them off and out of the skinning or only put them in for some parts not others so you can end up with a mix of end/no end bones and so if you say, don't import them, you end up removing joints that SHOULD be there

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
While compositing, RenderLayer doesn't move with time
I tracked a sequence of images and want to add a box to the tracked scene.
All works well, and in the 3D view, if I change the current frame, the box looks aligned to
the movie, which I use as a background.
When compositing, I have a RenderLayer node and the movie node combined using "over alpha". This works, but in the viewer, the rendered cube is at a fixed location (doesn't move with the scene), as it it's pinned to a single frame. The 3D view still works, and as I slide the current time, the cube moves with the movie.
Any suggestions?
Attaching a screenshot where the cube is aligned (next to the mouse) in the 3D view (bottom right), but not in the composite viewer (bottom left).

To make things more clear, here's a comparison of the 3D view (on the right) and the composite result view (on the left). First, on frame 20:

Now on frame 50:

And finally on frame 220:

In the composite output view, the cube is stationary while in the 3D view it's "moving" with the tracked camera.
Here's the blend file: comp_room2.blend

Could you upload your .blend or add more screenshots? As it is now, there are many possible things it could be, so we can't do much more than speculate.

Added a few more screenshots and a link to the Blender file.

You have to re render every frame

So I must be missing something. Isn't the composer responsible for that? Do I need to re-render just my Layer? How do I actually do that?

Greg, your suggestion, of course, works (I was hoping I wouldn't have to do that manual work). Can you put it as an answer so I can mark it as accepted?

You have to rerender each frame in order to update the comp. You can do this by pressing F12 to render the whole scene or clicking the render icon on the layer node to render just that layer.

It would be simple to add the possibility of rerendering when the frame is changed, but in reality most renders take several minutes (sometimes hours, or days) to render and thus accidentally changing the frame would clear the render and you would have to wait for it to finish again.
Of course this option could be disabled by default, but I don't see any serious use coming from this and thus it's not worth the effort to code.

Note: I have a very basic task, with a single render layer, which I rendered completely (all 252 frames). Still, when I went to composite, it didn't "use" that info. I can use F12 to update things. Thanks.

@user1145012 You could load the rendered image sequence/video back into the compositor with an Image or Movie clip node and use that instead of the Render layer node. That way blender will do compositing on the already rendered frames.


text:
Failing to chisel (boolean difference) text on a cube side
I'm trying to create a gravestone with chiseled text on it.
I have a cube (the stone) a text for which I added some depth and bevel, and then converted to a mesh.
I positioned the text so that it's partly "inside" the cube and tried adding a boolean difference modifier on the cube (cube - text), so that the text would be chiseled in the stone.
This gets Blender crazy. Initially nothing worked. I used a decimate modifier on the text to reduce its complexity, and now A few letters are chiseled, the rest are not.
This is how things look when Both the cube (headstone) and the text (now a mesh) are visible (there's another grave base object, but we can ignore it):

The gravestone has the boolean difference modifier, and if I hide the text, this is what I see:

What can I do to make this work? I don't actually need to render this scene, I want to
convert it to an STL file and 3D print it.
More info: As stated in the comments, this is due to the text being non-manifold. Actually, it has 2000+ non-manifold edges!
If I try to remove doubles, it just deletes the entire text. No matter what the double threshold is (tried 1mm, 0.1mm, etc. - I'm working with metric units).
Any suggestions on this?
The file with the issue can be found at: this location
Another file can be found at: this location.
This time, I've used the remesh modifier, but it only worked for one text object (converted to a mesh and remeshed), not the other two. The difference between the one that works, and the others that don't is that for the first one I used Octree depth = 7, and for the other two I used Octree depth = 8 (as 7 wasn't smooth enough).
To test this, just replace the object used in the boolean modifier of the cute from 'RIP' (which works) to either 'iGoogle' or 'years', which don't work.

Most likely it's because the text is non-manifold. Try selecting the text in edit mode and pressing W > Remove doubles.

Also, make sure all you normals are correct(Edit mode > Select Everything(A) > Ctrl - N).

Boolean operations will sometimes fail if one of the objects is super low poly.  You could try sub-dividing the head-stone once or twice.

Hm.. Is it possible you could you upload your .blend?

for this specific requirement I would be using a displacement modifier with a bitmap. It works like a bump map but creates/modifies real geometry.

You might want to try this workflow. Your mesh contains T-Junctions and is as @gandalf3 stated not manifold and self-intersecting.

Try adding a remesh modifier to the text:

Then the boolean modifier will work as expected:

This definitely works. The end result still fails the manifold test in the 3D printing tools, but the result STL can be sliced for 3D printing (tried slic3r).

The solution seems to only work for the word 'RIP' ;-)
Tried another example with 3 text objects, but only one worked. Uploaded the file. Thanks for the great help so far.

The normals are off on the other text objects, but Ctrl+N won't work because for some reason they are still non-manifold..

Correct the normals of your text.
Select the text, enter the Edit Mode, Select Everything A, and press CtrlN, then go back to object mode.

You know how stack exchange works, but yet you used an answer to try to @reply to two other users. You must know the @ ping system does not work in answers, and answer should not be used as comments.

authors: Николай Баранов

authors: Саша Фëдоров


text:
How to turn off what seems to be an auto extrude
I'm new to blender (and in fact modelling in general) and I don't know the controls. I think at one point I must have toggled something wrong and now instead of dragging vertices around right mouse button extrudes from whatever is selected.
In addition selecting a vertex and trying to move it manually with the X/Y/Z transform boxes also extrudes.
Does anyone know what I've done and how to reverse it?

It's hard to say what happens really. normal controls are G for grab (moving vertices/edges/feces) and E for extrusions. right clicking allow you to select but Ctrl+right click does extrusion. Try to check your Ctrl key

Blender has no auto extrude functionality like that. Unless your keys are faulty or sticking, most possible scenario is that you might have duplicate faces/verts and or have proportional editing on. Or since you are new, it might just be proportional editing you are confusing with extrusion. A video/gif if possible would be nice or save the file you are in and upload it to http://pasteall.org/blend and share the link here.

You can also try 'File->Load Factory Settings'

yes it turns out i had many duplicate vertexes. thanks @iKlsR

+1 for sticky keys - Ctrl-Click performs an extrude of selection. Maybe check for sticky keys in system controls.

Also remember you can right click and drag to transform geometry.

I have the same problem. The Extrude button on the tools menu is highlighted as soon as the default cube image appears, and I don't know how to turn it off. I was so frustrated that I trashed the Blender installation, and reinstalled it. The problem occurs with the default cube, so I doubt that duplicate vertices are the problem. Also, I don't see a blue icon in the view menu. Any suggestions?

Blender has no auto extrude functionality like what you describe to my knowledge. Based on your description, the most likely culprits are.

Duplicate vertices, to fix, Tab into Edit mode and perform a Remove Doubles operation from the W specials menu.
Proportional Editing, this is usually indicated by a circle that shows the region being affected, check your view header for a blue icon/toggle this with O. See Why is an object stuck to another?

Or it could be a combination of both of the above.


text:
Zoom to selection in Python gives RuntimeError
I'm new to Blender Python and writing a start-up script that imports mesh from another application to Blender for rendering.
I have a small problem however - imported mesh objects are too large for default Blender view-port, so I wanted to somehow make the script correct this issue.
I tried something with bpy.ops.view3d.view_all() but I can't get it work. I read the execution-context docs, but I always get this error:
RuntimeError: Operator bpy.ops.view3d.view_all.poll() expected a view3d region
Any suggestions?

why not scale the object down instead?

See overriding context

@Vader: meshes are from CAD application so units should be preserved

@iKlsR: I tried the snippet just below you suggested topic, which I guess cycles through windows and if editor type is "3D view" then it overrides the active object. But issuing bpy.ops.view3d.view_all() raises same error, and I guess I have to access this command from some other path.

Word of warning - even if you scale the view, clipping start/end may not be set to a very good range (for any existing cameras in the scene and for the viewports). In this situation you could have an option for the importer to clamp the imported model to fit within a bounding box (OBJ importer for eg optionally scaled down by 10 until it fits within a bounding box, see the Clamp Size option)

Operators need a certain context to run from, so you can override this so it can be run from the text editor or wherever depending on the area you need it executed from:
import bpy

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        for region in area.regions:
            if region.type == 'WINDOW':
                override = {'area': area, 'region': region, 'edit_object': bpy.context.edit_object}
                bpy.ops.view3d.view_all(override)

Read more in the docs and see this related question for more info.

This was taken from an old script I had lying around, not too sure exactly why the edit_object is/was needed on line 7 so might have to lookup that.

It works perfectly even w/o edit_object. Thanks for your answer :)

You can also use view_selected when needed instead of view_all .


text:
Can't modify objects after creation in object mode
I don't know what I pressed, but this happened before.

I can't undo or redo in object mode but it still works in edit mode.
When I move an object to another layer I need to press an "OK" button.
Can't use the lower half of the left toolbar in object mode, it is grayed out.

Here are a couple pictures:

What is causing this strange behavior?

global undo is disabled


text:
Mesh appears purple after join
After I joined together a mirrored joined duplicate into one single mesh, the duplicated mesh becomes purple:

What is going on here? Do I need to be worried about this? When joining the roof with the base of the building, this doesn't happen.

where is the purple ( usually a missing texture ) ?

The whole other half of the roof becomes purple, it's pretty easy to see in the picture.

try  "Recalculate Normals"  "Ctrl+N" in edit mode, (still can't see the purple)

there are related answers to this question, but I can't find the question as being asked this way anywhere: but related: http://blender.stackexchange.com/questions/3606/dark-regions-due-to-smooth-shading

@Chebhou It's... well maybe it's not purple, perhaps it's more like dark grey.

think of it as a solved problem color : )

The difference in face colours is an indicator that the direction of those faces are not uniform.

Enter edit mode and look for the side panel submenu called "Mesh Display"

In the normals subheading, select the face icon. Lines (called normals) will start to emit from each face. I've adjusted the size slider so those lines aren't ridiculously large or small. The thing to note here is that if you don't see the line emitting from some faces, that those faces are flipped.
To make them uniform press cltr+F to get the faces menu and Recalc normals   (Or Directly using Ctrl+N)
This makes the mesh faces point in a uniform way, and the colour difference will go away:

Thank you, I figured out that I had to flip normals myself before your answer appeared. I have still marked it as it's the right answer =)


text:
3D manipulator is in wrong position
my 3D manipulator is always in the wrong position. I have tried everything to make it work, yet nothing has. I have relaunched it, and everything I can think of.

I simply cannot work like this. Please help.

This is happening for one of several reasons, most likely because you moved the mesh while in edit mode changing the origin point (the little orange dot where the widget is).
Looking at the image, your pivot point is most likely already on the default Bounding Box Center and what you want is to have the widget on the object. So to fix, select the object in Object mode and set the object origin back to the object with CtrlAltShiftC and choose Origin to Geometry.

In that screen shot you have the 3D Pivot point set to Active element The placement of the manipulator when only one object is selected, (with the pivot point set to Active element) is the Object Origin.
To fix that just select that object and any other that has the origin in the wrong spot; then hit CtrlShiftAltC and select Origin to Geometry


text:
Hidden layers appear when I hit undo
I have two layers that have a purple circle around the visiblity "eye" icon in the outliner.  Every time I hit undo, these two purple layers re-appear.  How do I mark them as un purple?

Sounds like you somehow added a driver to an object on one of the layers. Simply right click the eye and choose Delete Driver. It is an undoable action so if you undo, it will revert so you might want to save the file and reload it.

@portforwardpodcast Normally just adding a driver shouldn't do anything but it seems like you have something else going on for it to be messing with your scene.


text:
Importing OBJ File to the center with correct orientation
I'm trying to work with blender and having a hard time with this program. I would like to import a obj-file as quoted in the title but have finally only managed to see it at least somewhere on my screen. What steps do I need to take to import obj-files properly?

This ist what I see after import. I have marked the file in the object list:

And this is what I see when I go to View > View selected:

Can this be to small?

If the object is already in the scene, select it. In the 3D viewport, open the transform panel (little cross on the right). You will see the location. Click on X, Y and Z and change their values to 0, this should put the object at the center of the scene.
Here is a picture where you can see which fields you need to change. You can then change the Rotation to give it the desired orientation.

For the orientation, you can also choose it when you import the OBJ file. When you do File -> Import -> Wavefront, you will be given the choice for the forward and up axes of the object :

No matter what I am doing, it doesn't work. My object is somewhere in the nowhere and won't move to the grid.

@Pingponguin Did you check the dimensions of the object? (same place where you can see the location, rotation, scale... when you click the little cross on the right in 3D view). It's possible that it's inside the cube.

@Pingponguin Now that your object is scaled, in the 3D view with your object selected, go to Object->Transform and try Origin to Center of mass ( or maybe Origin to Geometry) and then snap or put location at (0,0,0)

First move the cursor to the center with Shift C, or Shift S > Cursor to Center, or In the 3D view header Object > Snap > Cursor to Center. Then import the obj file. All added objects go to the cursor's location. To rotate the imported object select it with RMB  then press R. To constrain the rotation to only a certain axis press either X Y or Z while you are still rotating.

I have followed your steps but the object is not viewable. But it is listed in the object-list at the right. I guess it is being imported somewhere in the scene but I don't know how to show where and how to get it to the center.

@Pingponguin press N then scroll up to the top of that panel, what are the X Y and Z values for Location? If you press . on the NumPad it will zoom in on the selected object.

I found it. I selected the object in the  list and went to "View" > "View selected". If I'm reading it right the object is at X: 14.660 Y: 87.475 Z 43.964 but I still don't know how to get it to the center.

SHIFT C to move the cursor to the grid center (0,0,0,). Then Select the object in object mode. And finally call: Object -> Snap -> Selection to Cursor. Your object's origin should now be placed in the center of the grid (at 0,0,0)

No matter what I am doing, it doesn't work. My object is somewhere in the nowhere and won't move to the grid.

@Pingponguin have you tried scaling up your imported model? It may be just too small to see.

I think the origin of your object is at 0,0,0 even though the geometry isn't. Try pressing Ctrl Alt Shift C > Geometry to origin with the imported object selected.

I found the object. I set the clamp size to 100 and now I can see it:

Is there anything I have to consider regarding the size?

It does not work to snap the object to the curser or grid. I follow the instractions by Gaia Clary


text:
How come reflections are still visible using 0 bounces?
After creating an animation, I decided to try and optimize my render settings so I could get the final result much faster. (I am using cycles) A lot of people advised me to lower the bounce count, so I did just that. In order to make sure I wasn't losing detail, I decided to run test renders with various bounce counts.
During this testing, I encountered something strange.
Inside my scene, I have a somewhat shiny object with low roughness (Principled BSDF, nothing else). I also have an object with an emission shader. When rendered, you can see the reflection of the emissive object in the shiny one. However, when I set the bounce count to 0, this reflection is still visible, even though it should not be because, well, its a reflection and 0 bounces should mean there are no reflections and the scene would just be shrouded in complete darkness unless the ray hits a light source.
Why is that so?
Unfortunately, I cannot share any images because I have saved them in OpenEXR format.

Light paths inherit the proprety after the first bounce
Short answer is that the bounces number is not referring to the occoured light bounces but only to the "diffuse/glossy/transparency reflection  bounces" as said in the tooltips:

The manual define the light paths as the following:

Reflection and transmission rays can further have these properties:

Diffuse: the ray is generated by a diffuse reflection or transmission
(translucency).
Glossy: the ray is generated by a glossy specular reflection or transmission.

Imagine the following situation (path tracing actually works the other way around, but let's forget that for a moment):
The photon is emitted by light source, notice that at this moment the ray associated with the photon is "neutral", it hasn't hit any surface so it can't be defined as "diffuse" or "glossy", it's just a ray.
Now the photon hits a surface. If the surface is diffusive it generate a Diffuse ray, if it's reflective it generate a Glossy ray. Now, if the Diffuse/Glossy ray is captured from the camera, how times the Diffuse/Glossy ray bounced?
None. It has just been generated. It is visible by the camera, but has bounced none.
The question those numbers are answering can be better phrased as:

How many times are the Diffuse rays allowed to bounce in my scene?

If you picture yourself that the Diffuse rays are the little arrows and not the long one, you'll have an easier time in understanding the values.

Disclaimer: I dunno if it's the whole truth, but it makes sense and I thought it whort sharing my point of view

This is such a good explanation, thanks :).


text:
How do you get xcftools or an alternitave to work in windows?
there is plenty of talk about xcftools for Linux (obviously as its only Linux compatible) but there is no mention of windows or mac. not even an alternative.
its imperative that I can work the GIMP plugin. as I do not have the money to purchase the full version of AE or PS.
I am now using GIMP and Blender as the alternative for Adobe for these, only i've ran into road block after road block. The only one which is physically stopping me from working though is the need for xcftools.
If anyone has overcome this hurdle, your wisdom would be greatly appreciated.

I think you skipped the part where you explain what xcftools features you are looking for in Blender. Blender does have xcf loader add-on, but it does require xcftools.

I'm using Gimp and Blender on Linux and Windows, I never owned PS or any Adobe product. Could you please explain exactly why this is a Blender-related question and also please specify exactly where you hit road blocks.

Possibly look at the workaround listed herewin7 and xcf tools

Is the file in a .tar.gz format by any chance?
If so,I know your answer.
Simply go to a free online file converter,then change it to a .zip format and finally import it into Blender using the "Install File" button on the User Preferences.

.xcf is simply the default save format in Gimp.  You aren't limited to saving images in that format though.  Use Save As... instead.  Pick an image format that's suitable for your needs.  I find .png does well.  It  has lossless-compression, and ability to use an alpha channel.

The issue is, Blender has an import/export plugin for Gimp XCF, but it has a dependency that "xcftools" are installed.  However, this is not a Blender script. An archive can be downloaded, but it contains C source files that need to be compiled if I'm interpreting the contents of that archive.  The available archives are in formats that are more common to Unix/Linux, but it WinRAR seems to do fine with them.


text:
How to bake to vertex colors in blender cycles?
The long way I do this is:

have cycles render selected
setup the materials of a mesh
create it's UV coordinates
create a new image and assign it to the mesh
bake
change from cycles to blender render
if in cycles you were using nodes for materials setup, disable it
setup the material as shadeless
go to the textures of the object and set the baked texture
go to object data->vertex colors and add a new one if there wasn't
go to bake options change bake mode to texture and bake to vertex color and finally bake it

This takes a lot of time to do and the final vertex colors bake will always have some vertex that are colored incorrectly because the UV projection was not perfect. Is there any way to bake in cycles directly to vertex colors?

Honestly I don't think this is what you want. Vertices can only have one solid color assigned tot hem. Vertex colors are usually used as masks, as the color detail is only as fine as the poly count.

Until there is a proper implementation for baking to vertex colors in Blender/Cycles, you can use the following free Add-on: https://gumroad.com/l/zdgxg

This addon enables you to bake passes like diffuse, emission, ambient occlusion etc to vertex colors. This type of workflow can be really useful when working with game assets. By combining this addon with custom shaders in cycles there are endless possibilites for the type of output that you want.

There is a seperate addon to bake images to vertex color.

bake to image
use addon to bake image to vertex color

https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/UV/Bake_Texture_to_Vertex_Colors

Not usable in scenarios like baking AO to vegetation (grass consisting of millions of polygons).

The easiest solution is to use the addon Node Wrangler to help you in this task.

Enable the addon in the User Preferences> Addons> Node Wrangler
In the node editor, you can now directly access your vertex color from the add Menu Shift+A> Input> Vertex Color> Col. The add-on automatically adds an attribute node with the correct Vertex Color name.
Do a Ctrl+Shift+Left Click on the newly added Attribute node. It will add automatically a Viewer node. It is in fact an Emission shader that we will use to bake quickly the vertex color.
Unwrap your model and create an image to bake the color on.
In your material node tree, add an image texture (Shift+A> Texture> Image Texture and put it somewhere in the tree. DO NOT connect it with the tree. Just let it hang somewhere on the canvas like the following image. Choose the newly created image in this image texture.

In the render menu of the Properties editor, go the Bake panel and change Bake Type to Emit.
Hit the Bake button. The render should quite fast as we use the Emit value, you can set your render settings to a low value like 5 samples

In the end, you should get a result with something like this:

I wan to render to vertex colors, not render from vertex colors. I want blender cycles "combined" bake to the vertex colors of the mesh not to a texture.

This is exactly what I was looking for, brilliant, many thanks!

The OP wanted to bake to vertex colors, not from (which is what I am looking for right now as well).

Voted down - this is not baking to vertex color.

Since Blender V2.92 Vertex Color baking is built-in using Cycles.
Notes :

Not Compatible with OptiX, set your device to CUDA instead in Edit > Preferences > System

The object needs to have at least one Vertex Color map, and the colors will be baked to the selected map.

Navigate to the Bake settings under the Render Properties, and set the output target to Vertex Colors instead of Image textures.

Select the Render pass you want to bake to vertex colors.

Click on Bake and wait till the end of the process.

Example. Using a Suzanne with a Voronoi Texture in Render mode :

After baking, in solid mode and Vertex Color display mode :

A pillow or a curtain for example may have many vertices and are difficult to unwrap (sometime impossible to unwrap if too many vertices). This is where baking to vertex colors can give very nice results. What I do in such a case is using a blender internal lighting and baking and then go back to cycles using the "Attribute" node with name "COl" (or other vertex color name created while baking)


text:
How do I find words in Blender online manual?
Looking for a manual that I can search and find words.
A big pdf book.  Or instructions on how to find words within the online manual. Or maybe   I have visited the online manual many times now and used search and found nothing relevant.
Does the online manual for blender have an index someplace.   Can anyone recommend a nice book that has a large searchable pdf file?

I usually just search from a search engine and type "blender manual" before the topic I want to know about. It usually leads me to exactly the manual page I needed.

Or similarly use the site keyword for google site:/www.blender.org/manual/ nla  will give you a list of links containing nla

site:/www.blender.org/manual/ nla is new to me   THX

The bad news: The Blender manual does not have an effective search function - also in parts it has gaps and in parts information can be improved.

The good news: If you can find your way through the menu's it is actually packed with tons of useful information. [or use google as has been suggested]
I still use the manual for refence, but mostly rely on the internet and sites like this. There are some good books out there - for example Packt Blender Books, but the problem for most books is that a new version of Blender has come out by the time they are published.


text:
How to identify mysterious physics force affecting my objects?
I have some connected rigid body objects (a ragdoll). When I let physics do its thing, the ragdoll doesn't just fall - it acts as if some mysterious force hits it.
While investigating what might be the cause for it, I realized there's something (mysterious force) that affects the ragdoll. It's positioned roughly where the ragdoll is. To demonstrage this, if I duplicate the ragdoll and move the duplicate 2m to the side, the duplicate doesn't hit that mysterious force.
Here's how it looks (first 10 frames, slowed down):

For completeness, I also tried just moving everything around, and indeed there seems to be something roughly 2.5 meters above the origin:
YouTube video: Blender 2.9 mystery force affecting ragdoll falling down
Before I rewatch Stranger Things and look for clues there, any suggestion on how to find what's causing this strange behavior? How to identify that invisible force?
FTR, Here's the .blend file in question.
Thanks.
Note: this is a followup to a previous question I asked - at that point, I thought the problem was with the constraints between the objects.

The mysterious invisible force is 12 copies of your ragdoll. They are not in your scene but in your blend file. It looks like these lost objects are still used for collision detection.
To get rid of the copies, select Blender File as Display Mode for the outliner. Look for Objects and expand it. If you select everything in the viewport, then you can easily see in the outliner which objects are used in the viewport. Delete the other unwanted copies.

If you want to see the hidden copies, create a new file, delete everything and use File → Append ... to append the collections RigidBodyContraints and RigidBodyWorld from this file. These collections are used internally by Blender and are connected to the lost objects. This way you can append them easily to your scene.
Revealing the 12 hidden ragdolls

Amazing! I wrote a script to create the ragdoll, and ran it multiple times, but deleted all existing ragdoll objects in the beginning of the script. Can you think of a reason why they weren't "fully deleted"? Thanks.

I just discovered hundred of old objectd which were missing with the physics yet not appearing.
You can also go to Orphan Data as Display Mode for the outliner, there's a purge button that will remove stuff (Hopefully useless ones).


text:
What are some 3rd party rendering engines available for Blender?
What are some 3rd party rendering engines available for Blender? I am using the internal blender render and I keep hearing in tutorials (blenderguru) that it is better to use an external render engine...

Integrated Octane render . Vray Exporter.

You can find a list of free rendering engines here: http://stackoverflow.com/a/15137226/2044940. There should be blender addons for all 5 of them.

A few open source engines which come to mind immediately:

Luxrender
Yafaray
TheBounty, a fork of YafaRay
POV-Ray (exporter)
Aqsis
Jot (exporter)
Mitsuba implement biased and unbiased rendering techniques (Exporter)

Some non-open source engines:

Octane, fast GPU renderer integrated into blender (Commercial)
Vray, production proven render engine. (Commercial)

Also see the answer on the resources post for even more.

authors: Артем Слаква


text:
Selecting Mitsuba Renderer Crashes Blender
I'm trying to render an animation using Mitsuba in Blender on a computer running Ubuntu 14.04. However, every time I try to select Mitsuba as the render engine, Blender instantly crashes. Trying to export a Mitsuba XML also causes a similar behavior. I though that the executable path was the problem, but when I set that path to /usr/bin/mitsuba, it still crashes. How can I fix this issue?

Using this developer build, seems to solve the issue on my machine. More information can be found here. I had the same problem.
Also, the path should be /usr/bin and not /usr/bin/mitsuba

I've been annoyed by this problem for a long time and today I finally know the solution!
When execute blender in terminal and select mitsuba, blender will crash, and you will see blender has just found mitsuba.so and met the problem: Fatal Python error: PyThreadState_Get: no current thread.
It is all because of the version mismatch of python interpreter. The lib mitsuba.so you installed from deb file does't match the python interpreter in your system. So you have to compile the mitsuba source code and get a new mitsuba.so and replace the original one.


text:
Can Project Paint be used with Cycles?
I am having a problem trying to implement texture project paint with Cycles, Blender 2.70.
I go through the process of importing the model (a female head), establishing the seams and unwrapping without an issue; when I try to add the new UV maps I can add them and then I can unwrap on each to get the different views; all that works. The problem starts when I try to assign an image to those UVs, that it does not stay. As I cycle through the UVs I can see that the UVs are different but the image remains the same and i have to change it manually. My UVMain is black; this is the texture I want to project the other textures into.
After applying the black image texture to the model, I select the model, and I go into texture paint; in the Tools tab, I select the Clone Brush; in the Options tab, I make sure that under the Project Paint section Occlude, Cull, and Normal are selected, that UVMain is set as the Stencil and UVSideView is set as Clone From UV Map.
In theory I should be ready to project the texture into my mesh (and into the black image, which is the current texture of the model), but when I paint, nothing happens; I can see that changes have been made to the image for the asterisk, but no changes are apparent. When I change to the Draw brush, everything works and the texture gets painted; but projecting the texture from a photo does not work at all.
It is not only that it does not work, I fail to see how does the image in UV Image editor relates to the UV Layout; if they are not linked at all I cannot see how can I achieve texture projection; when I cycle through the different UV layouts in the Object Data section, all that changes is the UV Layout; and that makes sense, but how do I link it to the texture I am interested in projecting?  am I missing something?

Project Paint is a Blender Render feature that doesn't appear to work when using Cycles. It is also an old way of texture painting.
In Cycles you need to add a material to the object and have an image node that defines what image is to be used to receive the results of texture painting.
Rather than using project paint you should try painting with a texture, I am referring to using a texture with a paint brush while in texture paint mode. The texture can be an image or any other procedural texture available in blender.

Once you have a texture setup, you choose the texture and set the brush mapping to Stencil then the texture will be overlaid in the 3dview. You can move the overlay with the right mouse button and rotate your model as usual, when the texture is in the place you want it to appear you can paint it on your model. The overlay clearly shows where the texture will be placed on your model.

While right clicking easily moves the overlay around, you can also use Ctrl-click to quickly rotate the overlay and Shift-click to scale the overlay to get the texture right where you want it to appear.
This technique works just as well in both Blender Render and Cycles. The overlay feature of texture painting was added in blender 2.67

Thank you for your answer, which resolved the issue and now I know texture projection is obsolete; also, I could just do everything in the internal until I have the texturemap and then apply it in Cycles. The tip of painting with a texture is awesome; I will try that next (trying to get away from BI one-step-at-the-time). But before, I have just one more question: apart from the reference images, can I clone from somewhere in the model in the same way as Photoshop's clone brush? This would facilitate enormously the task. As soon as I resolve this little issue with clone brush, I am ready to tr

Yes blender has a clone brush - the source point for the cloning is the 3dcursor, right click to locate the 3dcursor. At this point using an overlay for a texture interferes with locating the clone source, just disable the texture when cloning as the clone brush doesn't use the texture settings.


text:
Graph in blender
Is it possible to plot a graph in blender from a formula using python, suitable for printing on A4; and if so, could someone point me in the direction of a tutorial?

If you really need to get this flowchart out I would use a dedicated flowchart maker.

Would be good to say if the graph is 2D or 3D

If you mean a mathematical formula, then the add 3d function surface addon sounds like it is exactly what you are looking for.  I believe it is included in blender by default, so all you have to do is enable it under user preferences > addons > add mesh.  Once enabled, there will be an option to add a 3d surface under the add mesh menu (Shift+A).  Then press F6 (or go to the toolbar on the left side of the 3d view) and you can modify the parametric functions in u and v for x, y, and z.  The documentation for this addon can be found here.


text:
Darkend area after Make Edge/Face
When I try to make faces from non manifold edges the edge of the model is darkens.

I see the same affect on Unity 3D when I import .blender files. When I add a material to the model the affect doesnt change and the color of the corners stays darkened. How can I prevent this?


text:
Set color of second selected object
I know I can set the color of the active object (when displayed as wireframe) by setting the Active Object color in Themes/3D View.
However, if you select two objects (right click followed by shift + right-click), the second object is always a sort of orange. I could not find an option in the Themes that seemed to correspond to this "second selected object" color.
Is there a way to set this color?

it is object_selected

To change the color of selected objects in the 3D_view go to : User_Preferences->Theme->3D_view->Selected_object

The two different colours here are because there's an active object and selected object. If you have 1 object selected in your sceen, then that object is also the active object, if you have two..or three..or tens selected, then the last selected object is known as the active object.
Because @Chebhou already gives the UI version of an answer, here a scripted version which can be just as handy:
In the console:
theme = bpy.context.user_preferences.themes[0]
theme.view_3d.object_active = (0.8, 0.8, 0.5)
theme.view_3d.object_selected = (0.8, 0.8, 0.9)


text:
Convert vertex instancing to single mesh
I have created a simple scene. Here are the steps:

Make a plane and subdivide it a few times
Make a cube
Parent cube to the plane
In Object Properties tab of the plane, under Instancing, I selected verts.

All this did was make a copy of the cube appear on every vertice of the plane. Now I need to use a boolean operation to cut away at multiple cubes. However, I cannot do this because the instances are not actual copies that can be manipulated. Can I transform all of them into a mesh?
Note that in the final result, I will also displace the plane thus displacing the cubes. A simple grid created using array modifiers will not work.

To convert instances into objects, go to Object > Apply > Make Instances Real.
You can then join them into a single mesh using Ctrl + J.


text:
Animate mean tilt of all control points

In a curve, each invidivcontrol point has a value called Tilt. Changing the tilt will essentially "twist" the part of the curve. To change the tilt I simply select a control point, and change the tilt value in the N menu. To change the tilt value of multiple control points at once, I just select all and change it in the same way.
The tilt value of an individual control point can be animated. However, when I select all the control points, the tilt value loses its ability to be animated.
Is there a way to animate the tilt value of all control points without doing it one by one?

Don't have time to research it right now, but isn't this what Drivers are used for? Can this value be driven, not all can?

@RonJensen I have tried using drivers but they do not work

The shipped add-on AnimAll allows you to do this.

Alternatives might include giving a subdivided cuboid or array of square rings a Curve modifier along the spiral, and rotating the object around its axis of deformation.


text:
"That Darn Bow" Problem 2
I worked through all the problems on my first Bow, and now have one new one that makes no sense.  No matter how I slice the string (now down to a single cut in its middle) when the bow string pulls back it only sticks to one end of the bow, sometimes its the top and other times when I redo it, it only sticks to the bottom.  I'm really puzzled over this one.  The sting ends are totally inside the bow frame.
http://www.pasteall.org/blend/27020

By moving the cut slightly up from center on the string it keeps the string down on each end of the bow, not sure why, but I cant have the string pulling off center, will figure it out and report back

I guess its as good as working the only thing I did different was to raise my loop cut slightly up from dead center and it seems to pull okay.

To check the weight per vertex, you can take the advantage of Vertex Weights panel on the right-hand N bar:

If you check, you can see the top vertices on the bow sring got non-zero weight on string bone, on the other hand, the string was parented to the bow. But the vertices on the bottom didn't have any weights. That's why it occured.
However, Other problems are still there. Because the key problem here is that the top and bottom vertices of the string need to be assigned to both bones (even with very small weights). What's more, since the bottom got no weight on any bones, they may seem fine, but actually they are not controllable by any bones, too. You'll see what's gonna happen next:

For all your issues (including your last question), the poor weight assignment can be  the source of all "bugs". For such case, I highly recommend that you should not use With Automatic Weights operator when parenting, since it won't always behave smart enough, you need to clean and fix them manually after all. So, painting weights yourself from the very beginning can be the better way.

Your absolutely correct.  And Gandalf had eluded to this on my first post but unfortunately I didn't know enough at the time to realize that weighting could cause this so my hats off to him as well.  I have since learned allot about weighting and how to keep my bow in tack :) Thanks again for your help.

I guess I put this in BETA site which is why:  "put on hold as off-topic by ideasman42♦ yesterday"  Sorry!


text:
How to determine which scene is the new one upon duplication?
Let's say the user has multiple scenes, and some of them may be named Scene.001, etc.
If I do bpy.ops.scene.new(type='FULL_COPY'), how do I know which one is the new one?
Normally I'd expect the new scene to update the context and this to work:
bpy.ops.scene.new(type='FULL_COPY')
copy = bpy.context.scene

It does work if you type it into the console. However, that doesn't appear to be the case if I put this into an addon script (bpy.context.scene seems to update only after the operator is done, which is not useful).
Any ideas how I can determine which scene is the new one? Is this a bug?

context.scene.name is up-to-date if I print it immediately after the call to scene.new(), please post your code.


text:
Adding the "render" operator to a menu (addon)
I tried to add bpy.operator.render.render() to a menu (e.g. invoked via Q key) for quick access, but the rendering operation executed via the menu runs without having the rendering image shown and without showing the rendering progress and without the ability to cancel (escape) the rendering.
If the same operator is placed within a panel the rendering operation works just as expected.
Is there a solution to having the render operation to work as expected within a pop-up menu?


text:
Python, IDPropertyGroup, isinstance
In an exporter script i also want to export "custom properties".
In my script i have the active object:
x = bpy.context.active_object

I can access the custom properties by their keys:
k = x.keys()

Blender / Cycles seems to reserve some own properties in here with the keys:

cycles
_RNA_UI

The values of these seem to be of type IDPropertyGroup, investigation in the python console gives:
>>> type(x['cycles'])
<class 'IDPropertyGroup'>

In my script i want to handle this as a special case and for values of IDPropertyGroup rather use value.to_dict().
So in my script i have:
for k in x.keys():
    val = x[k]
    print("k %s type %s" % (k, type(val)))
    if isinstance(val, bpy.types.IDPropertyGroup):
        val = val.to_dict()

But this gives an error that i don't understand:
    line 194, in execute:
    if isinstance(val, bpy.types.IDPropertyGroup):
AttributeError: 'RNA_Types' object has no attribute 'IDPropertyGroup'

Googling for IDPropertyGroup i get this relationship:
    class bpy.types.IDPropertyGroup(bpy_struct)
I wonder where this error comes from, i would expect this to work.
Thanks for any hints,
Torsten

There is no such thing as bpy.types.IDPropertyGroup in bpy.types, hence this line:
if isinstance(val, bpy.types.IDPropertyGroup):
    ...

fails. Try from bpy.types import IDPropertyGroup you will get an ImportError.
>>> from bpy.types import IDPropertyGroup
Traceback (most recent call last):
  File "<blender_console>", line 1, in <module>
ImportError: cannot import name 'IDPropertyGroup'

This is why that isinstance fails. I agree this is a little bit weird, but this changes the question a little.

Why isn't it there and how would I use isinstance to test complexity of an ID property. Are there alternatives?

Because ID properties are a limited collection of types, it's perhaps no less crazy to check for int, float, str, list.
import bpy

x = bpy.context.active_object

for k in x.keys():
    val = x[k]

    if isinstance(val, (int, float, str, list)):
        print('simple', val)
    else:
        print('complex', val.to_dict())

You could also check if the ID property has an attribute to_dict instead, else it's a basic type.
import bpy

x = bpy.context.active_object

for k in x.keys():
    val = x[k]
    if hasattr(val, 'to_dict'):
        val = val.to_dict()
    print(k, val)

Even use the (always present) class type returned by type(x['cycles'])
import bpy

x = bpy.context.active_object
IDPropertyGroup = type(x['cycles'])  # <--- use this type's return in isinstance

for k in x.keys():
    val = x[k]
    print("k %s type %s" % (k, type(val)))
    if isinstance(val, IDPropertyGroup):
        val = val.to_dict()

    print(k, val)

Thanks for your hints.  The last example (isinstance with IDPropertyGroup) is what i tried (see my code above) and which gave an error.  This part does not seem to work and i don't understand why (i also tried writing just IDPropertyGroup).

it's not the same. read my third example again.

You're right, thanks.  I did not yet try it but it should work.


text:
Particle Tracing
I'm trying to trace a particle system but I haven't had luck.
The options i'I've tried are:

Path: Under the render tab in the particle system.

But it needs a keyed particle system and when I use a keyed system, it doesn't behave the way I want.

bTrace: https://vimeo.com/192873201

But it Works only with a small amount of particles. It takes ~10 min to trace the path of 20  particles and I need at least 100 particles.

AN & SV: In YouTube -> BLENDERSUSHI / ANSV Particle Tracing Revisited

I made the same node setup and it does not work and when I use the .blend that Jimmy Gunawan provides, I get some weird results:

I don't know any more options to get the result. Maybe liquid? other add-on? maybe I made the node setup wrong?
Thanks for your help!

bTrace would ahve been my first option too. Otherwise have you looked into addons like Animation Nodes, or Sverchock? Not sure they do tracing but might be worth a shot investigating

Hello, yes. That was my last option but it has some weird results. I'll try to investigate again.

@Pierre Puentes, if you want help with particle tracing, i suggest supplying an example .blend of a particle system that does the things you want. it's easier for me to then show you have to trace the particles using Sverchok.

Possible duplicate of How to store particle locations in a list?

diggin old thread, but.. the path option doesnt need a keyed particle system, but keyframes, so you need to bake your simulation to cache.
see here https://www.youtube.com/watch?v=fWOAuA6nqJc


text:
How to make a vertex meet an edge exactly?
I want to move the selected vertex along the blue axis until it exactly meets the intersecting edge. How can I make sure it exactly touches the edge without gaps or overlap?

Hold CTRL while moving the vertex and it will snap to the midpoint of the edge (it will also snap to other vertices). Once you get it on the edge, you can switch to the "Normal" coordinate system and slide it back and forth along the edge.

Dynamic Context Menu
Enable Dynamic Context Menu from UserPreferences > Add-ons

then select the two edges that intersect

then hit Spacebar > Snap Cursor > Cursor to Edge Intersection

that moves the 3d cursor to the intersection

then pick the vertex you want to move to that position, then pick Mesh > Snap > Selection to cursor.

then you get this.

Advice
If you need to repeat this kind of operation many times during your session then  get acquainted with the keyboard shortcuts whenever they're listed beside the menu entries.

In Edit Mode:
First press Ctrl+Shift+TAB and select Edge to snap to Edges.
Then press G and Z to move along the blue axis (or use manipulator) and aim the mouse at the part of the edge you want to snap to, press and hold Ctrl to enable snapping and then press LMB or Enter whenever you're satisfied with the position.
This makes the vertex go along the Z axis to align with the edge you hovered over while holding Ctrl in 3D view.


text:
Adding Other types of Custom Properties
I'm starting to use the amazing, yet simple to use Blender Drivers:

I'm looking for a way to add other Types of Custom Properties than the default floats.
For instance: Color, Vector, String, Boolean or Integer.
From what I've seen it seems to rely on Python.

AFAIK you can set up all but boolean by using that type in the property value field.  Eg type in integer 1 and you will notice the slider moves by integers, even if min and max are displayed as reals.
For vector floats, typing in (1.0, 0.0, 0.0, 0.0) gives a list usable for rgba values.
>>> C.scene['prop']
<bpy id property array [4]>

>>> C.object.color = C.scene['prop']

>>> [c for c in C.scene['prop']]
[1.0, 0.0, 0.0, 1.0]

To define them with a script is pretty simple too
import bpy
context = bpy.context
scene = context.scene
scene["someprop"] = False

To get a little more into it, the _RNA_UI is where custom properties keep their data, min, max, default, description
import bpy

context = bpy.context
obj = context.object

rna_ui = obj.get('_RNA_UI')
if rna_ui is None:
    obj['_RNA_UI'] = {}
    rna_ui = obj['_RNA_UI']

obj["prop"] = (1.0, 0.0, 0.0, 1.0)
obj["bool"] = 0

rna_ui["bool"] = {"description":"Bool",
                  "default": True,
                  "min":0,
                  "max":1,
                  "soft_min":0,
                  "soft_max":1}

rna_ui["prop"] = {"description": "Color Prop",
                  "default": (1.0, 0.0, 0.0, 0.0),
                  "min": 0.0,
                  "max": 1.0,
                  "soft_min":0.0,
                  "soft_max":1.0,
                  }

You can add these to your own layout
import bpy
from bpy.props import FloatVectorProperty, BoolProperty

class CarPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Car Details"
    bl_idname = "OBJECT_PT_hello"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    @classmethod
    def poll(cls, context):
        return context.object.get("Capot", False)

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

        car = context.object
        layout.prop(car, '["Capot"]')
        #bools don't show well (1 or 0 integer)
        layout.prop(car, "switch")
        layout.prop(car, '["bool"]')
        col = layout.column()
        col.prop(car, '["prop"]')
        # car color property
        row = layout.row()
        row.prop(car, "car_color")
        # object color rgba
        row = layout.row()
        row.prop(car, "color")

def register():
    # define a registered property (available for all Object types size=4 gives rgba)
    bpy.types.Object.car_color = FloatVectorProperty(subtype='COLOR', size=3)
    bpy.types.Object.switch = BoolProperty()
    bpy.utils.register_class(CarPanel)

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

if __name__ == "__main__":
    register()

Thanks. Really useful to me. I guess I was looking for a way to change the UI based on propierty: Boolean -> Tic Box; Array4 -> Color Picker.

NP, changed a little to show how to make a custom panel for your car.  Any object that has a "Capot" custom prop will make the panel show (poll).  Change to a more suitable prop.  Panel is displayed in the object properties panel, but can be simply moved to 3D UI or Tool panels.  Cool model, and drivers and custom props is a great way to "drive" it.

Thanks batFINGER, its pretty much it except the color value is represented as 4 sliders as opposed to a Color Picker.

To use the colorpicker you need to register a FloatVectorProperty subtype=color http://www.blender.org/api/blender_python_api_current/bpy.props.html?highlight=floatvector#bpy.props.FloatVectorProperty, or use an existing color property (object or material).

@Akelian updated answer with registered props to show how to make a switch and use the color picker, either from the a defined prop, or using the object color.   The registered props using XxxxProperty are available to all objects of that type (via obj.prop) , whereas ID properties are defined on a single object instance (via obj["prop"])

@batFINGER Thanks for this useful answer. How I can set the max value of the bool prop to be 1, currently 0,1 are the only values that does something, but I can still keep incrementing 2,3,4,5...with no effect. How I can just make it 0 or 1?

In general press Add or Edit and whatever you type into the Property Value field will be used as the property type (with some exceptions**)

For Integer ID property:

Float too.

String, type in a word or a couple of words.

The Boolean is really an Integer with two possible states, 0 and 1. You could limit a property by setting Min and Max to 0 and 1. A TickBox would be great for UI, but sadly this isn't available for ID props (not in a convenient way anyway). (Dec 2015)
For Array types (Color, Vector) there's currently not a convenient interface exposed by Custom Properties panel. By this I mean you can make a custom property by setting the value, by typing in (0,0,0) or [0,0,0] or even just 0,0,0

But you won't get a UI element like regular bpy.props

FloatVectorProperty (subtype="COLOR")
BoolProperty.

Id properties : http://wiki.blender.org/index.php/Dev:Source/Data_System/ID_Property


text:
Blender as python module, 'Context' object has no attribute 'object'
I understand that running blender without a GUI does not provide bpy.context for the 3d View. Can anyone help me with a work around. This results in a 'Context' object has no attribute 'object' error.
for scene in bpy.data.scenes:
    for object in scene.objects:
        if bpy.context.mode == 'OBJECT':
            if object.name != 'Lamp':
                if object.name != 'Camera':
                    print("deleting " + object.name)
                    bpy.ops.object.delete(use_global=False)
                    bpy.ops.mesh.primitive_cone_add({'scene': scene, 'active_object': object})
                    print(bpy.context.object)

The script runs fine GUI-less. Use getattr and hasattr or catch and handle the exceptions.

Thanks for the tip. I thought I needed to link the object to the scene and make it active.

@Aldrik it is not so immediately clear so I don't think it should be closed as such. Can you form your comment into an answer? Python related questions are allowed to an extent if kept simple and in relation to Blender somewhat.

Sorry my question was not clear. I am trying to understand blender python interface. How would I make python from terminal run                          import bpy                             bpy.ops.wm.quit_blender()                      without causing RuntimeError: Operator bpy.ops.wm.quit_blender.poll() failed, context is incorrect

Note: the example loops over data its deleting, since it calls bpy.ops.object.delete it could be deleting many objects at once, suggest you use scene.objects.remove(obj) so you have better control, and make a copy of the objects list before looping over it. eg, for ob in scene.objects[:]:   ....

Variables are not always available in the context, typically you can access them directly, in the case of the active object you can access it from
scene.objects.active (most collections that have an active member work this way).

Thank you for providing a response which explains a tib bit of the python blender interface. I wish I could hire you to teach me a good foundation.


text:
How to pin a distinct bone in a rig while animating
Here is my scenario: A character sitting on a chair is resting his elbow on a table while moving his hand which is controlled by inverse kinematics.
How can I stick or pin the elbow to the table while I animate the hand and the chest?

Related: Is it possible to pin distinct Bones of a Model to a Plane while posing?

It all depends on how your rig is made. Here is one tip.
Add an empty to your scene.
Give it a name like ElbowRest-Empty.
Select your Elbow Bone in Pose Mode. Add a constraint "Track To"
Select "ElbowRest-Empty" as target.
Now in object mode, where ever you move your empty, your elbow bone will follow.
You may need to lower the influence of IK to keep the elbow bone pinned where ever you want too.