text:
Getting same object orientation with different rotation methods in python
I can rotate an object by assigning rotation_euler values or using the bpy.ops.transform.rotate() operator.
I wrote this code:
import bpy

E1 = bpy.data.objects["E1"]
E2 = bpy.data.objects["E2"]
bpy.data.objects["E1"].rotation_euler = (0, 0, 0)
bpy.data.objects["E1"].rotation_euler = (1, 0.5, 1.5)

E1.rotation_mode = 'ZXY'
E2.rotation_mode = 'ZXY'

bpy.ops.object.select_all(action='DESELECT')
bpy.context.view_layer.objects.active = E2
E2.select_set(True)

#bpy.context.scene.transform_orientation_slots[0].type = '...'

bpy.ops.transform.rotate(value=1.5, orient_axis='Z')
bpy.ops.transform.rotate(value=1, orient_axis='X')
bpy.ops.transform.rotate(value=0.5, orient_axis='Y')

which results in differently oriented objects, no matter which transform_orientation mode I select ('GLOBAL', 'LOCAL', ...).
How can I calculate the values to be used in the operator calls to make E2 coincident with E1?

It looks like you only need to set the constraint axes correctly. The last three lines were modified.
import bpy

E1 = bpy.data.objects["E1"]
E2 = bpy.data.objects["E2"]
bpy.data.objects["E1"].rotation_euler = (0, 0, 0)
bpy.data.objects["E1"].rotation_euler = (1, 0.5, 1.5)

E1.rotation_mode = 'ZXY'
E2.rotation_mode = 'ZXY'

bpy.ops.object.select_all(action='DESELECT')
bpy.context.view_layer.objects.active = E2
E2.select_set(True)

#bpy.context.scene.transform_orientation_slots[0].type = '...'

bpy.ops.transform.rotate(value=1.5, constraint_axis=(False, False, True))
bpy.ops.transform.rotate(value=1, constraint_axis=(True, False, False))
bpy.ops.transform.rotate(value=0.5, constraint_axis=(False, True, False))

The other answer is perfectly valid, but an alternative (and generally better practice for scripting in Blender) is to modify the actual data of the object, rather than trying to recreate the operation you want with bpy.ops. This will bypass any issues that will crop up with context etc, and will generally lead to more predictable results.

import bpy
from bpy import data as D
from bpy import context as C
from mathutils import Euler, Vector, Matrix
import numpy as np

obj = C.object
mesh = obj.data
mw = obj.matrix_world

# get a blank matrix with your rotation applied to it
# Matrix.Rotation takes ->
    # angle of rotation in radians,
    # size of the matrix (4x4) in this case,
    # axis to rotate
rotation_matrix = Matrix.Rotation(np.radians(90), 4, 'X')

# then just multiply objects world matrix by the rotated matrix using @ notation
rotated = mw @ rotation_matrix

# then set the object's world matrix to this new matrix
obj.matrix_world = rotated

# doing it in the objects local space is much the same, except with matrix_local
loc_mat = obj.matrix_local
new_rotation_matrix = Matrix.Rotation(np.radians(90), 4, 'Z')
rotated_local = loc_mat @ new_rotation_matrix

obj.matrix_local = rotated_local

When it comes to scripting, it only really matters what gets the job done, but as a rule, modifying the transform matrix vs using bpy.ops.transform, altering a mesh directly through bmesh vs. hacking something together with bpy.ops.mesh, will generally be a better practice to aim for.
Relevant topic in the bpy docs

I would generally agree, nonetheless I think that relying on consolidated routines, such as the most used Blender standard operators, can be worth it, especially if they perfectly meet your needs.


text:
Poor readability of Spreadsheet Editor leftside statistics panel in Geometry Nodes
This is how the Spreadsheet Editor (Dark theme) shows the statistics of Geometry Nodes:

As you can see the Count column values are barely readable (this is my opinion, at least) and I have to go closer the monitor to read the values due to the very low contrast.
I've tried changing the Preference>Themes configuration options and that's what I was able to get:

I could obtain a pure white for the type legend column which makes it perfectly readable, but, unfortunately, I couldn't get much for the value column, even setting it to pure white (compare it to the type legend column).
Is there any reason for this behavior and is there something I can do to obtain the pure white for that column?
PS
I also tried reversing colors (black text on light background) getting a good contrast, but this configuration messes up other panels (Input/Output sockets in Property panel (N) of Geometry Nodes, for example).

To edit the text color in the Spreadsheet, Edit the Spreadsheet Theme.
Open the Theme Space dropdown and change the Text color:

Edit: I now realize that this isn't the text you asked about. Maybe this answer will be of use to someone. The color of the numbers you asked about don't appear to be editable.

source: Stack Exchange

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

sort: votes


text:
How to hide properties in the "Adjust last operation" of custom operators?
I'm trying to create a custom operator to help me building armatures.
It should change behavior depending on a custom property defined in the operator class.
In addition, the "Adjust last operation" panel should only show the appropriate parameters depending on the selected behavior.
class MY_OT_BuildArmature(bpy.types.Operator):
    bl_idname = "wm.build_armature"
    bl_label = "Build Armature"
    bl_options = {'REGISTER', 'UNDO'}

    # Custom Properties

    # Always used for armature creation
    orientation: EnumProperty(items=orientationTypes, name="Orientation", default="x+")

    # Property to control operator behavior
    use_list: BoolProperty(name="Use list", default=False)

    # Shown and used only when "use_list" is unchecked
    bone_count: IntProperty(name="Bone count", default=1)
    total_length: FloatProperty(name="Total length", default=1.0)

    # Shown and used only when "use_list" is checked
    bone_list: StringProperty(name="Bone list", default="1", options={"ANIMATABLE", "HIDDEN"})

    def execute(self, context):
        options: set = self.__annotations__["bone_list"].keywords["options"]

        if self.use_list:
            if not "HIDDEN" in options:
                options.add("HIDDEN")
            print(f"Use list: ON")
        else:
            if "HIDDEN" in options:
                options.remove("HIDDEN")
            print(f"Use list: OFF")

        # create armature code

        return {'FINISHED'}

Unfortunately, adding/removing "HIDDEN" has no effect on property visibility in the "Adjust last operation" panel.
If the "bone_list" property's "options" attribute is initially defined with "HIDDEN", the property is and stays hidden in the panel, whether or not the "use_list" property is checked.
Same the opposite, initially defining without "HIDDEN" makes "bone_list" always visible.
So, it looks as if "HIDDEN" only works at initialization time, at least managed this way.
Is it possible to change the visibility of properties in the "Adjust last operation" panel and how?

Hello. AFAIK you can't adjust these properties at runtime. They're defined at register time. You can hack your way through modifying them with unregistering / reregistering the property but I wouldn't expect it to work with an operator

What you want to do is use a custom draw method https://docs.blender.org/api/current/bpy.types.Operator.html#custom-drawing

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


text:
Conditional execution mode of UILayout element operator
In an add-on panel I have two buttons that have to call the same operator whose role is to select some mesh faces.
The only difference in execution mode is that in one case the selection is added to the already selected faces, in the other case the previous selection has to be cleared.
I could certainly code two different operators but it doesn't seem like a clean and elegant solution to me, also considering that I could implement other selection logics such as SUBTRACT, INVERT, DIFFERENCE, to the SET and EXTEND modes I mentioned above.
Is there a way to make the operator aware of which button called it or a way to pass the operator a parameter to set the operating mode?
The panel definition contains this code:
        row = box.row()
        row.label(text="Select faces")
        col = row.column()
        col.operator("object.select_faces", text="", icon='SELECT_SET')
        col = row.column()
        col.operator("object.select_faces", text="", icon='SELECT_EXTEND')

The operator should work kind of this:
class myOperator(bpy.types.Operator):
    bl_label = "Select faces by mesh type"
    bl_idname = "object.select_faces"
    bl_options = {"REGISTER", "UNDO"}

    def execute(self, context):
        ...
        if ...op_mode_set...:       # condition to determine the operating mode
            ...clear_selection...   # execute this only if called by SELECT_SET button

        ...perform_requested_selection...     # execute always
        ...

Declare enum property inside operator and set that value for each button like this https://docs.blender.org/api/current/bpy.props.html#operator-example

This is what I was looking for, thank you @JayReigns.


text:
Different orientation of the X, Y, Z orthogonal views in the 3D View editor
I've been grappling for a while with rotations in python and was driven crazy until I realized a strange behavior of the 3D View UI when it comes to the orthogonal views you get to using the "1", "3" and "7" numpad keys.
What I eventually noticed is that X and Z views (keys "3" and "7") show the scene from a point of view oriented from the positive side to negative side of the axis while the Y view (key "1") is oriented from the negative side to the positive.
This implies a weird behavior when rotating objects:
In Y view, when you rotate the object you get SAME ANGLES in the upper left info bar and in the Euler Y field in the Item Toolbar whether or not you force the rotation around the Y axis with the Y key
In X and Z views you get OPPOSITE ANGLES unless you force the global rotation with the X and Z keys.
Does someone know the reasons for this seemingly inconsistent choice?

Blender and 3DS Max use a right-handed Z-up coordinate system. This is historically based on architecture where you have a floor plan which uses a 2D coordinate system with +X pointing to the right and +Y to the top, but when it's lying flat on a table it's not upwards, but pointing away from you to the back of the table. If you now build something up you get the third dimension, in this case +Z pointing upwards.

And if you now imagine you have built something up like a house in the following example, you are looking at the front, the right is to the right of course and the roof is at the top. So if you press Numpad 7 which is called "Top" view, you would expect to see the house from above and look at the roof. +X and +Y are pointing to the right and top because that's how you draw the floor plan (or how you draw a coordinate system in maths). When you press Numpad 1 for "Front" view it makes sense that you look at the house on the front door - but you are then in -Y direction from the house, the house epxands into +Y from the front. +X is of course to the right, and pressing Numpad 3 lets you look at the right side.

This is why the 2D views are aligned the way they are. Now the confusing thing for you is, why is rotating +30° in front view resulting in +30° on the Y axis while the other views are inverted and get you -30° on X or Z axis when you do not specify an axis?
That is because there is a misconception of how the rotation in the viewport works. The rotation in the 3D Viewport without axis locking is aligned to view, not to a global axis. And not only in 2-dimensional orthographic view, but also in perspective view from different angles.
And in the view-aligned rotation, a positive angle is always rotating clockwise, while negative angles are rotating counter-clockwise.

Only when you type a letter to lock the rotation to a certain axis, it is rotated on this and sets the value to positive or negative as given and not according to view. However, since the axis locking is dependent on the Transform Orientation set in the top menu which can be Global, Local Normal etc. or even a custom orientation, it is not guaranteed that the rotation value is corresponding to the one showing on the item's properties afterwards.

Since CAD and 3D software is born as a facility for tasks previously made by hand, I realize that the presentation has been conceived to strictly recall manual drawing.
From the visual point of view that looks as the natural evolution of the tools.
It's when it comes to "numbers" that this visual symmetry seems to imply an asymmetry (different angles resulting from same manual actions).
Anyway, selecting orthogonal views always from negative to positive direction makes numbers to symmetrize, at cost of using CRTL when selecting [Numpad 1].

@Antonio As you say yourself, it seems to imply... because of the misconception that rotating in orthogonal view would rotate the object on the global axis which just happens to be oriented the same way as the view direction. Then it seems contradictory that rotating a positive angle results in a negative angle on that axis. But in any arbitrary view like for example diagonally upwards from behind left side below the object, a positive rotation results in completely different angles on most likely all three axes instead of a single orthogonal axis.

The selection of views is based on obtaining the appropriate axis for grabbing (moving), not for rotating.
In all three views, one axis is oriented upwards and the other is directed towards the right. If you have two views (right/left and front/bottom) with the z-axis pointing upwards, it is not possible to align both views so that the second axis is directed towards the right and the third axis is facing in the same direction. Consequently, if the third axis is consistently set to face the viewer, the second axis will be directed towards the left in one of the views, which can confuse users:

Here you have consistency in rotation, but why X axis pointed left?
Even if you try to switch between left/right-handed, Z-up/Y-up coordinate systems, you will always face this problem
The most common view that you can add is this:

You have  consistency in rotation and grabbing(moving), but Z is pointed right, which is ridiculous

I should have noticed from the start that UI shows, in the center of the View presets, an (X) for [Numpad 3], a (Z) for [Numpad 7] and a !!! (-Y) !!! for [Numpad 1].
I only realized that trying to correctly rotate objects in Python.


text:
rendering problem (CUDA error out of memory)
So I am only posting this because I am perplexed. I have been working on my first animation project so I am not great with blender. But I am proficient enough to get some stuff made. Here is the thing I have never messed with physics. So for my first cartoon I made christmas lights that would dangle. I just kinda layed them in my scene then didn't think about them again. they just because background. I would make a scene. keep the last frame for continuity then start a new file. So my cartoon is made up of a buncha little blender files. well I got like 15 files rendered and I got to my last 5 files and now they won't render. I didn't change anything but now when i deleted the christmas lights I now longer get the error. Why does rendering the christmas lights work for EVERY file but the last few. I haven't added anything new. just moved the character around. Its my first cartoon. its not great but I can link it if that helps to look at the image. I am running windows 7 with 16g of ram and a nvidia gtx 670. not great but its worked ok. its been taking about 4 minutes a render......
Oh and I am using cycles.
anyone have any ideas? or am I being a noob some how?
https://www.youtube.com/watch?v=6daF-xkXwg4
PS the sounds is terrible I am currently doing sound and this is just temp.

That error means that your GPU doesn't have enough VRAM to hold the scene you are rendering.

why was it rendering all of the other scenes with the same stuff in them I guess is more my question. I know about VRAM i just don't know why it would work in one and not the other.

thanks. Kinda figured. I am kinda far into "production" to bake I tried baking and it made one of my objects look way lighter. I know this is probably because of something I am unaware of. So more tutorials to watch. After this little project I am working on I am going to take all the things I learned. Like baking, and samples and render settings. and  do it better. next project I might start messing with compositing. no complex lights for awhile....

thank you for the link to the other question if was helpful. I think checking off of the open shading box might help I might try that

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


text:
How do you embed one object in another?
I'm using Blender 2.76, with Cycles renderer.
I'd like to build a model of a thin opaque plate with glass beads embedded in it, with light shining through the glass. I know how to create the plate, the light, and the glass pieces. What functions should I look into as a way to put the glass in the plate so the hole exactly fits the glass?
Here's an image of the pieces. I duplicated the glass piece and simply moved it to coincide with the opaque plate.

http://blender.stackexchange.com/questions/15687/making-holes-in-a-mesh/15688#15688

Perfect, thanks. I guess this should be marked duplicate or deleted?

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


text:
How to open an image with Krita from within Blender on PopOS?
I am trying to open an image with Krita from within Blender on PopOS.
I know on windows you can apparently just point to the .exe, but what to point to on Linux?
I tried /usr/bin/krita and /usr/share/krita, but without successs.

Whenever I shift-click on the folder icon of an image datablock in Blender, it opens the default Linux image viewer.
When I install the flatpak version of Krita I am even more lost what to put in the Application field in the File Paths section of the User Preferences.
Does anyone know how to get it to work in PopOS (or Ubunutu, I guess)?

In ubuntu it works fine if krita or gimp are install via deb. use the path usr/bin/krita or usr/bin/gimp
They open as if there where blender windows.


text:
I can't close render windows
I don't have much experience with Blender, as I only used it a few times. This time, I managed to do something I didn't want to while rendering something. Basically, I opened a few windows (picture below) and I have no idea how to close them. Pressing 'X' or any other button that's supposed to close them doesn't work. Help would be appreciated, thanks!

Related - http://blender.stackexchange.com/questions/1223/how-to-close-open-a-view-panel. In related question Logic editor window is discussed, in your case these are 3D View windows

@MrZak It works, and thanks on the quick response!


text:
Everything is transparent (Eevee)
So all of a sudden somehow  everything ends up transparent, just like in the attached images. I honestly have no clue why this started happening or how to prevent it, so I'm hoping someone could help?
Viewport: https://i.sstatic.net/PXbYl.jpg
Render: https://i.sstatic.net/RPLtA.jpg

if you have an AMD graphic card it may be because of the last driver

I tried in three different versions of Blender, same result. Dunno what's up

The issue is most likely caused by your graphics card driver, see AMD GPU Material in "material preview mode" and "rendered mode", is entirely gray as background. Only outline is displayed

Please use the tools from this site
to upload images so that they are displayed as part of your question.
See How to upload an image to a post?


text:
Black borders around video output?
Blender: 2.74
Window size: Default.
Output: AVI Raw (tried other alternatives, and it gives the same result)
I'm having these issues with the rendering output of some animations i'm doing.
A few days ago, this wasn't an issue at all. There were not borders or letter boxing look to the output of the video. But now all of a sudden there are. I looked at this persons question called "Full Video not Rendering" and they seemed to be having a similar problem but it's not answered and I tried the comment but it unfortunately didn't work either.
For example
In a single rendered image it looks fine. No borders or anything. But when i render the animation, the output after all the frames have rendered, it looks like this:

And then if I put that file into another editing program (if needed), it ends up like this:

I feel like I may have pressed something but accident while working in Blender maybe causing this. I've seen something about the DispView and DispWin option, that sounded like it would work, but I can't seem to find them in the program.
Any one know how to fix this so its full screen without the black borders?
Thanks!

Nevermind! I figured it out! :)

Figured it out don't worry!
I don't know how or why it worked, but I basically just tested a sample animation a couple of times using the same format above but in different blender files until eventually, (and miraculously) the borders disappeared on their own. It seems my Blender was a bit buggy.
However, I wouldn't recommend this if it doesn't work for an extended period of time, but mine luckily worked after 2 or 3 tries.


text:
Ocean Stretching to the Horizon?
I want to make an ocean stretching to the horizon. Here's what it looks like currently:

Blender file here: ocean-test.blend
IMO this looks more like I'm looking up a wave and less like an ocean stretching to the horizon (which is what I would want). Shouldn't the horizon be a flat line?
Here's an actual photo, how can I make my water look more like this?

No idea if that may need a big amount of geometry, but should take into account earth curvature. What about using a simple deform/bend modifier?

I have problems with this all the time, It's difficult to make a terrain seem endless without killing your computer, especially if your making an animation.  I hope someone will come along who can answer this.

A guy called Dylan Neill has made a tutorial for a large ocean that looks quite good: https://www.youtube.com/watch?v=CwJrb3vjAaA&

Nice work! It looks like a great start! One thing I'm noticing is the clouds. In the photograph, note how they are smaller, almost perspectively going back to the horizon, and not touching the horizon. There's also a color/haze shift where the horizon touches the water. Additionally, the photo above is shot higher up (like from the deck of a cruise liner) whereas your render looks like someone in a dingy. I also agree with everything @mcc's answer below (focal length, etc.).

@mhulse, I'm more worried about the water here, never mind the sky for now. I do agree the sky isn't super :)

Here's one approach which I think is an improvement:

What I did here was, inspired by parts of @moonboots' link to https://www.youtube.com/watch?v=CwJrb3vjAaA& (where they do a much nicer ocean, but one that is also a lot more computation heavy):

Ditch the Ocean Modifier
Create a circle of 4km radius, fill type Triangle Fan
Bump map the water material, input from a Noise node

Blender file here: ocean-test-bumpmap.blend
Bump map can probably be tuned, suggestions welcome. It's basically a Noise bump map with a Fresnel node controlling Glossy vs Diffuse Black.
Posting answer so that people can vote / comment, please do :)

Why did you ditch the ocean modifier? I think it's a really good way to make an ocean without  killing your computer.

Because it generates geometry. And if I want an infinite ocean that would require lots of geometry.

I guess if you're not making an animation that that's a smart thing to do. :)

I think the material could use a little work (not criticizing, just trying to give helpful feedback)  To me, the sky and the ocean look like they don't quite belong together, maybe there's something you can adjust on the ocean material for that? :)

Found this regarding how to bump map somewhat more convincingly: https://blender.stackexchange.com/a/3229/20467 And I think the sky looks out of place because it looks a lot less convincing than the water. But I'll try to keep this conversation about the water and nothing else.

Are you using Fresnel? if you're not, I think this is what could be missing(in my opinion) If you look closely at the reference picture, the ocean is brighter in the center than at the edges due to the effects of fresnel.

I am using Fresnel. Feel free to download the .blend file and poke around for yourself :) The material is actually the same one as in the original question, so any water ugliness is probably due to that the bumps need tuning.

There's a very simple way to solve this. Just set the x:y:z ratio of the waves to be 1:2:1 or 2:1:1. It should look somewhat like the real ocean in shape.

I think the horizon would still look wavy that way. Post a picture of the result and prove me wrong! The .blend file is linked in the question.


text:
How to apply a modifier to the part of an object?
How to apply a modifier (for example "subdivision surface"), only to the part of an object, not to a entire object?

With subdivision surface you cant, some other modifiers can use vertex groups like this http://blender.stackexchange.com/questions/29106/tesselate-a-plane/29109

for subsurf you can use sharp edges


text:
How to add to a floating object, several other objects, so they swam with it?
I made the ocean and floating object, using this tutorial (https://www.youtube.com/watch?v=11F1NRpqrzY).
How to add to a floating object several other objects, so they swam with it? For example, how to add a mast and sail to the hull of the ship, but don't combine all of these objects into a single object?
I wanted to use constraints, and give them a "copy location" and "copy rotation" of the floating object, but I don't know how to apply these constraints to a group of objects. If I apply them individually to each object - they will move in the wrong position, and I have to move them back in edit mode. I have a lot of objects, so this is not an option.
How to solve this problem?
Thanks in advance!

parent them to that object  select the objects then the ship and hit Ctrl+P

@Chebhou Thank you! But why this method does not work with objects that have a cloth modifier? I tried as a test, to Parent them to empty, and sail, the ropes and the flag remained in place when I move or rotate empty.


text:
How can I make particles not rotate after lay on the surface?
I want to make the falling autumn leaves.
I did a system of particles that rotate in flight.
How can I make them not rotate after lay on the surface?

Check your friction setting. Up the friction for the material and the floor the particle gets in contact with.

Could you use the "die on hit" setting, and then turn on render for dead particles...?

You could possibly make the Particles die on contact (by checking the option in the collision tab) and display dead Particles (In Particle Settings)

Please elaborate your answer (add screenshots, explain what those things do, etc.) and I'll upvote :)

Go the collision settings for the surface the leaves are landing on and increase the friction setting as high as possible. If the particles are still rotating upon collision you can increase the particle's friction as well.

Have you tried? I have same issue here and friction setting has no effect.

I have other idea:
Decrease Lifetime to end up particle animation and tick  Died under Particle Render tab.


text:
How to turn curve into mesh?
I created a "path" curve and add geometry using "Bevel object". How to turn this object into a simple mesh?

I found it!
AltC Mesh from Curve/Meta/Surf/Text


text:
How to draw normal map?
How can I draw (not bake) normal map over my model, like a texture in texture paint mode? Render cycles.
Thank you in advance!

I don't think you can draw a normal map directly like that, at least not easily. You could however pain a bump map

Check this, it's possible: https://youtu.be/TMbx5UVjz7Q

@LukeD Thank you! I downloaded the blend file from the creator of this video, but i can't understand how to use it yet...

@DuarteFarrajotaRamos Yes, but I need to have a normal map at the end. However, I think I will try to turn bump texture into a normal map.

@Rumata Check my answer, I think you'll manage to get this working.

It is easier and more intuitive to paint a height-map, then convert it into a normal map:

There is GIMP normalmap plugin, Photoshop plugins like xNormal, apps like CrazyBump and a lot of others. These all can do the conversion. Also, it can be done through Blender Baking.
If you already have a normal map, and you need to add to it, you can combine normal maps with overlay blending operation - generally it is ok enough but note that it is not the correct operation - more on combining normal maps is here: Blending in detail.
You can also paint directly into normal maps:

you can erase with RGB[128,128,255] brush
you can average with ordinary Soften (smooth) brush
you can smudge with Smear brush
you can paint with a special texture brush:

create a brush height texture that you want to paint with
convert to normal map texture

paint with this texture in overlay mode. It will be like sculpting, but on a texture. The brush color must be white, spacing of strokes very low and strength of brush also low

Worth noting that the conversion can be done with baking within blender. You can set the height map as bump map in BI and then bake it to a tangent space normal map, no need for external software.

@Sazerac Yep, very true. Thanks for adding this. I don't paint textures in Blender so that makes Blender baking external software for me and those plugins actually internal, that's why it didn't hit me as solution right away.

Result:

Credits:
First of all this is not my work, it's from riceart41 on BlendSwap (download this file to make all of this to work). You can find more information on YouTube and on BlenderArtists.
Overview:
There is no accurate tutorial from the creator of this method but I've managed to get it to work in a way presented below:

You'll need to create Paint Slot, assign it to Height Map Image in Texture Group and connect Normals to shaders.
Don't forget to set Texture X and Texture Y size in Bump_to_normal group accordingly to created Paint Slot.
That's really all you'll need to do.
I don't know what sorcery is behind this but it is converting Height Map to Normal Map pretty good.

Invaluable information. Thank you very much.


text:
Is there a way to bake an array animation?
I have an object with an array modifier. I animate this array, using empty as “object offset” (like in this tutorial - https://www.youtube.com/watch?v=COCFd_BKqLw ).
Is there a way to bake an array animation (in order to export it to another program later)? I need to save this animation, without the array modifer, which is supported only by Blender.
Thank you in advance!

I have no Idea how could it be done exactly (probably with some python code) but It would be great to know it, so I'm waiting for an answer with you.

@Mzidare Thank you, yes, it would be great and quite usefull!

If i understood your question right watch this

I don't think it's possible to simply "bake" an array animation, unfortunately, to export it to other programs, since it usually creates and deforms a lot of new "virtual" geometry (in a procedural way), and in many possible ways. It doesn't just transform or deform meshes. Not an easy task.

Baking an array animation is like applying the modifier when not animated.  But why apply a modifier? Normally, you don't do it, so why in an animation?

If the software you want to export it to supports alembic (i know for example that fusion does), you can use this fileformat. It was just added to Blender so it only works in the newest Versions. Exporting it in Blender and importing it again works fine and it bakes the animation to mesh cache (In Blender it then uses the mesh cache modifier). This is also how you can export fluid simulations for example.
Just choose File - Export: alembic (.abc) and configure the options (especially the end frame)

That's an amazing trick would never have thought of that one!


text:
Mesh with shape key animation - ok in Blender, wrong in Unity
I have a mesh with shape key animation. I use actions in order to get separate animations after exporting this model to Unity.
Everything looks fine in Blender.
But after export to Unity, when I call an animation, the model becomes very small and turns at the wrong angle.
Maybe I shouldn't apply location, rotation, and scale after I finished creating and animation shape keys... But still - everything looks right in Blender, so is there a way to fix this problem with exporting to Unity?
Thank you very much in advance!

I had this problem too in Unity. I couldn't figure out how to work around it. I had to apply the rotations,scales, and positions BEFORE creating animation/shapekeys.

@TTTTTTa I see, good luck to you in your animations!

To fix the scaling issue, be sure you select your mesh in Object mode and check the scale transform. If it's not set to 1.0, apply your scale by pressing CtrlA and selecting Scale from the drop down menu that appears. If you're using an armature, make sure your mesh and armature have their scales applied before binding them together.
To fix the rotation issue, check that any rotation changes have also been applied, similarly to how you apply scaling changes. If you're exporting with FBX, change your Up and Forward directions in the FBX export screen to the correct directions for your mesh.


text:
Cycles - Normal maps seam when baking HighPoly->LowPoly
Yes, there are already plenty of similar questions here, none has an answer. The normals are inverted on my baked low-poly mesh :

I have this high poly mesh :

and this low poly mesh (the borders don't match exactly because this is a simplified scene, I deleted a lot of stuff) :

The low-poly UVs are decent (again, partial mesh only; seam selected) :

I baked the normals using Cycles, CPU only, both 8bit and floating-point textures. When connecting the normal map to the diffuse color, it gives this :

Ok, why not, that's how tangent space works.
However, when connecting to the diffuse's normal slot, it gives the image above. This one is NOT ok.

It seems that Cycles' baking tool does not use the same tangent basis than the renderer... Does anyone know a fix ?
.blend : http://pasteall.org/blend/index.php?id=43471

Please make sure the title of your question is specific to your problem and not just the general subject.

@RayMairlot Better this way ?

In your last image there is the problem - you are connecting normal map texture directly into the vector slot.
Please connect it through the Normal Map node (Shift+A > Vector > Normal Map):

I googled lots of stuff, but I never thought it would be this part... Feeling stupid. Thanks !


text:
Why does the elbow turn the wrong way?
I'm doing a character for a (very) low poly game. Since I already had a very basic IK rig laying around, I figured I'd adapt its armature to the recently created character.

However, even after setting the modifiers exactly as they are in the original armature, the elbow bends the wrong way (I'll try to fix that horrendous deformation later).

Why does it happen and how can I fix it?

I'm not sure it bends in a bad way, maybe you need to play with bone 009 to correct the orientation of your elbow sometimes? also I'm not sure about your rigging, why an IK on the upper arm and not only on the lower arm? It seems a little bit unorthodox but maybe you have good reasons to do it this way...

With an IK Constraint, you specify a pole target to control the way the bones bend. I expect you created Bone.009 and Bone.010 to be these pole targets.
Set the pole target to the armature and then the choose the bone to use. To control the direction of the rotation, you adjust the PoleAngle. You can then animate the pole target bone to control the bend during animation.

For some reason, clearing the parenting between the mesh and the armature and parenting again solved the problem. When I cleared the parenting, the mesh was rotated 90º, so I rotated it back and redid the parenting. Now it works just as in the original mesh.

it seems to me that you need to a second bone at the elbow that can arrange the correct axis for the elbow to bend on, have a look at beginner rig videos on youtube and they should briefly cover how to set up another bone for these situations.
Hope this helps


text:
My mesh comes apart every time I parent it to my armature
I'm trying to parent my mesh to my armature, but it seems as though as if every time I do so, my mesh loses its faces.
I'm pretty sure that it's being caused by the lack of green bones on my mesh for some reason, and I'm not sure how to fix those.
I've also tried regenerating my rig with and from rigidify, but it just seems to turn out the same. If anyone knows, thank you and have a nice day!

Did you apply scale to your mesh (Ctrl+A>apply scale)?

looks like the split edge modifier problem in a few post earlier. You don't happen to have any modifier applied to your mesh have you?

http://blender.stackexchange.com/questions/47422/why-is-my-model-coming-apart-when-posing-its-armature see this post, if it helps.


text:
Strange Red Box on my screen
I'm a new blender user so i may make mistakes from here and there sometimes, but I have this problem where this weird dotted box is on my interface window and it's starting to annoy me.
I'm not sure how to fix it, and everytime i press shift+z it's like a window for rendering your scene.
So again, i'm not sure how it got there or how to get rid of it. If anyone can tell me how to get rid of it, that would be great. Thanks!

You activated "render border" with CTRLB.
Easily remove it with CTRLALTB.
The red area allows you to render only that rectangle when you are in viewport "rendered" view mode, it helps to quickly check the rendering settings for only a small portion of the scene, in the viewport.


text:
Is there a bpy.data.objects equivalent of bpy.ops.object.modifier_apply?
I'm trying to use Blender without invoking the GUI. How do you invoke the bpy.ops functions without a GUI? Is there a bpy.data.objects equivalent of by.ops.object.modifier_apply for instance?

As far as I know, there's no single low-level command that does this like the bpy.ops.object.modifier_apply operator, but this is possible without operators.
You can do this by using the to_mesh method, which generates a new version of the object's mesh data, if you wish - with modifier's applied.
In this example I'm generating a version of the mesh data with modifier's applied, and assigning it directly back into the source object's data.
This updates the mesh geometry, but doesn't remove the modifier (since we simply generated a copy, and haven't actually applied the modifier yet).
So eventually all we need to do is to remove the modifier using the object.modifiers.remove(modifier) method.
import bpy

obj        = bpy.context.object
myModifier = obj.modifiers['Subsurf']

# Apply modifier to existing object data
obj.data = obj.to_mesh(
    apply_modifiers = True,
    scene           = bpy.context.scene,
    settings        = 'PREVIEW'
)

# Remove modifier from modifier's list
obj.modifiers.remove( myModifier )

Thank you for your help. This work fine if I use Blender with a GUI, but not without. This simple script: `import bpy
bpy.data.images.load("test.jpg")
bpy.data.textures['displaceImage'].image = bpy.data.images['test.jpg']
bpy.ops.export_mesh.stl(filepath="test.stl", use_mesh_modifiers=True )
` works as well with a GUI, but not without. This puzzles me since there is no reference to a context in it.

or use modifiers.clear() to remove all modifiers

Not sure I understood. This didn't work for you? By the way you can use either method (mine or the simple apply_modifier operator) with or without a UI, it's simply a matter of context for using the operator (mainly have the object whose modifiers you want to apply selected and active).

Here is how I'm invoking the scripts: "blender 4x4UVSquare.blend -d -P 'Displace.py'" -> This invocation writes a displaced test.stl object. "blender 4x4UVSquare.blend --background -d -P 'Displace.py'" -> this invocation write a smooth, un-displaced test.stl

Can you add the error messages you get to your original question? And optimally your code or the relevant bits? I'm guessing this is a matter of not having a reference to the right object (if you're using the method specified above), or not having selected the object and made it active if you're using the apply_modifier operator.

Found the problem. Your solution works fine, as does my original script. I've been calling "blender" from outside the blender.app directory. I'm using a Mac. When I run the scripts from the "blender.app/Contents/MacOS" directory, everything works fine. I'll change my calling script to cd to this dir before running blender. Do you know why I need to call blender from the application directory?

Probably your 'Displace.py' file is located in this folder (or some other library you're importing from)? You can get around this by creating a symbolic link to your script from one of blender's system path folders. To find these folders, run blender from the UI, then type in the console: import sys, and then sys.path.


text:
How do you set the "current image" as far as bpy is concerned?
How do you set the current image ( or current anything for that matter ) from a script or command console? I want to use something like
bpy.ops.image.reload()

which apparently works on the current image.

Did either of these answers help you at all?

Yes and No. I am a blender newbie, so Yes, any input from experienced users helps. No because I can't get past this issue of getting an Image Displace modifier to work without a GUI.I have a script that opens a .blend file, changes the image ( thank you for help with this ) , then exports an STL file, supposedly applying modifiers. When running blender from command line the script works in "foreground", won't modify with "--background"

Unlike 3d view where you can only have one active object no matter how many views are open, the image editor is not restricted to that. From a UI standpoint you could have multiple UV/ImageEditor windows open, and then the concept of 'current image' starts to require more context. This is the case even if you had one image window open, or none when running in background mode. Luckily we don't need to worry about current image, or loop through views.
Use the right API calls
instead of calling operators intended to be called by the UI, it's often more convenient to manipulate Image datablocks directly using the methods provided by the Image class. You can use:
import bpy

# make an alias to increase readability.
images = bpy.data.images

# if the image changes on disk, this should get the new pixels
images[image_name].reload()

# the same can be done using .load()
images.load("/home/zeffii/Desktop/some_image.png", check_existing=True)

As explained in your other question
Don't do this if you can avoid it
https://gist.github.com/zeffii/54410dcbff9b6aa4953d
import bpy

images = bpy.data.images

# say I know I have 2 images, and 2 IMAGE_EDITORS open
# currently none of the image editors are showing any image.
loaded_images = images[:]

AREA = 'IMAGE_EDITOR'

for window in bpy.context.window_manager.windows:
    for area in window.screen.areas:

        if not area.type == AREA:
            continue

        for s in area.spaces:
            if s.type == AREA:
                image_to_use = loaded_images.pop()
                # s.image is the property to set for each
                # IMAGE_EDITOR to tell it to display a certain
                # image by reference.
                s.image = image_to_use

There are a few ways to reload an image datablock. You don't need to set it to be the current image.
Accessing the datablock can be done in a few different ways. If you know the name of the image datablock (usually the image name but can be changed), you can target it that way. Or if you know the path to the image on your os, you can loop through the bpy.data.images array and find it that way.
import bpy

#direct access by datablock name
bpy.data.images['image.png'].reload()

#find image datablock by image filepath and reload
for i in bpy.data.images:
    if i.filepath=="/path/to/image.png":
        i.reload()


text:
I can't load an image from a script
I'm trying to use Blender's mesh displacement from a script to create stl's. Once this works, I'll run blender with --background to create the stl files from the command line.
I start Blender with:
blender ~/3D/Models/4x4UVSquare.blend -d -P ./test.py

the script is:
import bpy

bpy.ops.image.open(filepath="junk.jpg", \
    directory="/Users/me/3D/Art Work/", \
    files=[{"name":"junk.jpg", "name":"junk.jpg"}], \
    relative_path=True, show_multiview=False \
)
bpy.data.images["junk.jpg"].reload()
bpy.data.textures['displaceImage'].image = bpy.data.images['junk.jpg']

I put in the ".reload()" hoping it would help. It doesn't.
Blender starts up, loads the .blend file, loads the image and assigns the image to the texture. When the UI comes up and displays the scene, there's no displacement. In the UI Image area under Texture, the filename is correct, but a little message reads "Can't load image".
When I hit the "reload" icon, the image reloads, the displacement appears and all it well.
Why do I have to reload the image at all? Why doesn't image.reload() work in the script?

To load an image from disk doesn't require bpy.ops. You could use:
bpy.data.images.load(filepath, check_existing=False)
# Load a new image into the main database

>>> bpy.data.images.load("/home/zeffii/Desktop/some_image.png")
# bpy.data.images['some_image.png']

# if an image exists by that name already, you could set the name
bpy.data.images['some_image.png.001'].name = 'some_image.png'

# check_exist=True will reuse an existing image with that name
>>> bpy.data.images.load("/home/zeffii/Desktop/some_image.png", check_existing=True)

bpy.ops.* are triggered each time you interact in some way with the UI (buttons, shortcuts..). Often the UI triggers a bpy.ops.whatever with  information about which window the event occurred in - this is important because you could have two UV image editors open, or two TextEditors (just an example). Therefor sometimes just calling the ops isn't enough, and some ops even expect a UI which isn't present in background mode.
All these ops eventually operate on lower level bpy database content. So when possible avoid bpy.ops and look through bpy.data to find a more direct route. The auto-complete function of the bpy console is great for finding methods and attributes.

Thanks for you reply. I was able to load the image using bpy.data.images as you suggested. My goal is to using blender in a script without invoking to GUI. Is there a bpy.data.objects equivalent of bpy.ops.object.modifier_apply? I know there must be scriptable equivalents to apply anything from the GUI since the rendering process has to be able to do it. I'm new to Blender, it's amazing, but information about it very scattered.

Yep. Most things can be done via lower level calls. Don't hesitate to ask new separate questions. That way the answers can be found by others who search the site / google. instead of modifiers_apply I would use obj.data.to_mesh() which returns a mesh with modifiers applied if you want, then you assign the mesh to the old object or new object.. Ask a new question . more space to answer.


text:
Deleting object also deletes associated material
I create an object with a script. I assign it a material. When I delete the object, the material is also deleted.
Is this normal? How to I prevent the material from being deleted?

I think it's something like bpy.data.materials['Material Name'].use_fake_user = True. Use it when you create the material (before you delete the object). This should keep it as an active material even after you delete the object, without it entering the orphaned data stack.

I'm trying this out, thanks! ... It looks like its working!

@S'rCat FYI Blender uses a "Fake User" system where data is automatically put in the trash can if it isn't used by another object or another type of data in the blend file. If you want to retain the data in the file even without anything else using it, you must set it to "Use Fake User"


text:
I did something and now my viewport is view is odd
I did something now viewport solid looks like this:

There is a point somewhere out at infinity projected through the shape and the only 2 faces showing are the ones in the projection. Material preview mode looks normal.
What did I do?

You have enabled a Clipping Region (Shortcut Alt + B - easy to do by mistake). You can clear it by pressing Alt + B again.

That was it, thanks! I've been learning to use the 'bevel' setting, Alt+B instead of Ctrl+B

Yeah, like I said - easy mistake. If you can see from my image though, Ctrl + B in Object Mode will define a render region - make sure you're in Edit Mode if you plan to Bevel.

It's hard to tell from your description, but it's possible that you hid the polygons of your mesh (or your objects) by pressing H. You can un-hide them with Alt+H. This feature exists because as models get more complicated and edits need to be more precise, sometimes hiding an area outright benefits the user. This only effects the workspace, it does not show up in the render.
Unfortunately the H key is very close to the G key on a QWERTY keyboard!
In the event that I'm misinterpreting you and you simply have your camera at a funny angle, you can get back to the default by going into object mode and pressing Shift+C.


text:
Common Strategic Junction Types in Topology / Topologizing?
Is there a common group of junction types a re topology-artist should be aware of?

Explanation of question:
It seems I've been thrust into the world of re-topology now that I am making more use of zbrush.
I noticed there are many times when mesh-density changes should occur either upward or downward depending on detail. I also avoid using tris, which means more puzzling situations: How to scale / decrease density without using tris?
The whole issue boils down to this: Face Junction types.
Perhaps this is a naive assumption or oversimplifiction, but I wonder if there exists a small visual reference of common junction types used in topology. A certain 'holy grail' or reliable catalog of junction types, possibly named, and explained?
As I'm very new to this, I've attached a screenshot of one I commonly use in downscaling or upscaling mesh density, but I'm sure I could be using different approaches / face arrangements.

If it is ok on stackexchange, I'd like to have a quick critique on this region of topology as an added note, since it reflects my model as a whole.

The strategy isn't that simple of just modeling by using 4-sided polys, but using 4-sided polys and keeping them not distorted too much. Take a look at this modeling blog. Related - http://blender.stackexchange.com/questions/18853/when-are-tris-used-effectively, also http://blender.stackexchange.com/questions/28425/curved-mesh-topology


text:
Does cycles DOF use more resources?
In blender's internal renderer DOF was highly faked, complex, and used much resources from the computer.
Cycles DOF does not seem to need anything more than the usual sample setting (and that applies to everything, not just DOF).
I intend to use DOF for quite a few projects, and I was wondering, from a perfectionist perspective, does DOF actually use more resources to render?

The DOF effect itself has a negligible amount of overhead. Even in a very simple test scene I just did (some monkey on a plane) there's only about a 3% difference, and that is an incredibly simple scene with HUGE dof (50cm lens radius. Not 50mm, 50cm). That overhead would normally be overwhelmed by lights, texture lookups, shader calls, etc on a full scene.
But.
Raytraced DOF (and motion blur, for that matter) creates a really insidious kind of noise. It creates a new kind of variance in camera samples. "variance" is where that render noise comes from, it refers to the possible outcomes you can get from launching a ray. For example, a ray might bounce into a light, or it might not. You get sparkly noise when you cast 2 rays and one hits the light, and the other doesn't. By firing a lot more rays the random noise will eventually average out and you get crisp images. There's lot of possible sources of variance, such as which direction a ray will bounce off a glossy surface (reflection noise), whether it will go towards the visible portion of a partially obscured light (soft shadow noise), etc. But normally, you can be assured of one thing: this noise is all in subsamples, like glossy rays or shadow rays. You can be sure that a ray taking off along a particular initial vector from the camera will always either strike a particular object, or miss it.
3D DOF and motion blur break that. They add a random factor to the ray on takeoff that can cause it sometimes hit an object, or sometimes miss it. This averages out to a transparent blur with enough samples. But until then, it's noise, and what might have otherwise been enough samples might not be enough to clear the DOF noise. So you may end up having to increase the sample count beyond what you would've needed otherwise. Additionally, if you are using branched path tracing, you may need to reduce subsample count and increase AA (primary) samples, which results in a less efficient render overall.
That said, 3D DOF has some advantages over post-processed DOF. It correctly handles reflections/refractions, which should blur reflected/refracted objects based on total path length. 2D DOF will rely on the z-buffer and incorrectly blur based on distance from the eye to the mirror/glass. 3D DOF can also correctly handle letting you "see around" out of focus foreground objects, which for 2D blur requires rendering them to a separate layer in order to get the render of the "obscurred" object.
2D DOF also lets you do some weird non-physical tricks like depth of field falling away at different rates in the foreground vs background, plus it can be faster and you can change it after rendering without having to re-render. So it all comes down to the needs of your shot.

This is a great answer and pretty much explains the issue for me. Thank you very much.


text:
Freestyle Line Flickers in Animation - How to Control?
The Problem:
I'm attempting to adapt one of my vector-based characters to a 3d format for animation. This character, being a vector drawing usually, has big clean lines and cell shading.
Notice though that there is line flickering around the armpits and sometimes in the head region.
https://youtu.be/e2QG7gkwFtg

Attempted solutions:
I've attempted to solve this by using Face Smoothness settings, Chaining, and Min 2d (20), but no change on this.

Other examples:
I've looked at some other examples, which are mostly anime, and it seems that the drawings are complex enough where the issue I point out is not noticed (ie, many lines, nobody cares about flickering because its lost in the complexity) but with a character like this perfection is needed.
Any advice or is this an official limitation of Freestyle? I am not against custom scripting (I do python) if someone cares to tell me what angle I might approach this from.

To note, it can happen that the freestyle lines will render far off where it shouldn't be drawing, which is annoying.

I don't have my computer right now, but you could temporarily fix it by lengthening the freestyle line to draw further then it thinks it needs to draw.

I might be a step closer through using the simplification geometry modifier. Rendering a new animation now.

Seems like no one know how to fix the inaccuracies of freestyle.

I had the same problem and my solution was to turn every options in the Freestyle line set panel off except the first 3(silhouette, border contour). These settings have the least flicker problem and remain consistent through the shot.

what generally helps is more render subdivision, but this will dramatically increase line rendering time of course...


text:
How to DROP an object when releasing Child Of constraint?
I noticed due to the parenting system of Blender Child Of constraint does not modify the object's location/rotation in such a way we can copy or interact with it.
So when you drop influence of Child Of constraint, the object snaps back to it's original location as seen before instead of simply being suspended in the location it was guided to by the constraint.
The problem is this: How do I get an object to release it's child into mid-air, so to speak, so that physics can take over cause the object to drop?

I assume you are creating an animation ? In that case, a trick you can use is just to set the position of your object at the exact position it was before, on the frame you drop the influence option to zero. Then, if you run a physics simulation, I think it should work.
Let me know if you have any question !

I'm unclear for sure. Object starts out on floor. ChildOf lifts it to air. I set ChildOf influence to 0, then it sticks to ground. If I have a copyRot/Loc at the upper location, it seems irrelevant since same glitch applies. I've tried various keyframes at various points (up, down) and no good results.

Why don't you set it back to its position by marking it before with the 3D cursor (Shift+S->Cursor to selected) and then, once the influence is set to zero, you put it back there (Shift+S->Selected to cursor) and you add a keyframe ?

How about having its "at rest" point at the place where it's dropped, then have two Copy Location constraints - one with the "bird" (or whatever) and the other to an empty at the point on the ground. At the start the "ground" influence is 1 and bird is zero (locking it to that point on the ground), when it's picked up transition "ground" to zero and "bird" to 1 (locking it to the bird), when it's dropped, transition "bird" to zero and it should return to its point of rest (in the air, where it already is) and then simply enable the physics to allow it to fall. It seems to work but is a bit fiddly getting the locations right for clean transitions.

authors: Гоша Новиков


text:
I try to add a New Texture to one of the scuplt brush but it doesn't work
I'm learning Blender. I use a book where I'm told to add an new texture to Scuptldraw, I select new and the preview of the texture is black and my brush doesn't work anymore. It's the same for any brush of the scuplt mode : I can use the default texture, when I add one I have no file browser opening, it becomes all black and doesn't work anymore.
Help !!!

If the preview of the texture becomes black it means the texture doesn't have any information (no image is assigned to it). And since black color technically is 0 it won't draw because something + 0 won't change anything at all. Did you try to change assigned texture to sculpt brush by adding some image to it ?

You can choose the file to use in your texture in the properties editor, Texture tab:

You can also use any of the built in procedural textures as a brush, choosing them from the drop down there where it says 'Type: Image or Movie'. It is very easy to use them with different mappings in the texture brush settings in the tool bar, like View, Tiled, 3D, Stencil, etc.


text:
Why is "Copy Data Path" path different from the tooltip's path?
Why is it that when I right click on a data field and click "Copy Data Path" and paste, it will paste something like this (example: the "Start Frame" of a VSE strip):
sequence_editor.sequences_all["roomWalls01.001"].frame_start
But the tooltip that can be seen when hovering over the same field shows a longer data path:
bpy.data.scenes["Scene"].sequence_editor.sequences_all["roomWalls01.001"].frame_start

"Copy Data Path" leaves off the first part: bpy.data.scenes["Scene"].
Why does it leave that off? Isn't that part usually necessary when making scripts?
I'm very new to Blender Python scripting but I've tried some scripts and I often end up typing the first part out by hand, which seems like an unnecessary hassle.
I theorize that this has something to do with the fact that many Blender Python scripts start out defining variables like these:
context = bpy.context
scene = context.scene
sequences = scene.sequence_editor.sequences_all
But I don't know how I'm supposed to know what kind of variable like that I will have to define first.
I would just like to know why this is. It seems like it probably makes sense, and I'm just using a bad Python workflow or approach. Any explanations? Thank you.

Related: http://blender.stackexchange.com/q/48157/2843 - there's a video tutorial linked under my answer in the comments which might help you out a bit...

Copy Data Path
From
https://www.blender.org/api/blender_python_api_2_77_release/bpy.types.bpy_struct.html?highlight=id_data#bpy.types.bpy_struct.id_data

Note that when keying data paths which contain nested properties this must be done from the ID subclass, in this case the Armature rather than the bone.

Or in the case you pointed out from the scene rather than the strip.
To explain using the console, I have a vid seq called blackfoot, it tells me its id_data is the scene. (The bit you mentioned as "left out")
>>> C.scene.sequence_editor.sequences_all['blackfoot'].id_data
bpy.data.scenes['Scene']

Ok now look at frame_start property
>>> C.scene.sequence_editor.sequences_all['blackfoot'].frame_start
1

>>> C.scene.sequence_editor.sequences_all['blackfoot'].path_resolve('frame_start')
1

>>> C.scene.sequence_editor.sequences_all['blackfoot'].path_from_id('frame_start')
'sequence_editor.sequences_all["blackfoot"].frame_start'

The last one looks familiar, it's what you get when you copy data_path, ie the path from the ID data.
Using
context = bpy.context
scene = context.scene
sequences = scene.sequence_editor.sequences_all

is just IMO good coding practice making the code much more readable
sequences['blackfoot'].frame_start = 1

than
bpy.data.scenes['Scene'].sequence_editor.sequences_all['blackfoot'].frame_start = 1

NB. I also use context = bpy.context in test files, to make pasting them into operator or panel code later simple as context is passed by def to just about all methods.

Oh Jeeze. A lot of this goes over my head. I probably just had the wrong idea about the "Copy Data Path" command. It seemed like the command could be a shortcut to data in Blender for use in simple Python scripts, like for being able to do quick and simple data = data and similar scripts. But based on your answer it looks like even to use the result of "Copy Data Path" you have to know of lot of commands to query the information necessary to use the result. I guess there are no shortcuts! I will keep looking for newbie-friendly Blender python documentation. Thank you for the answer!


text:
How to create a torus with divided cuts that correspond to the direction of the torus
I have a question about the mesh and geometry of a torus and how to achieve a certain physical effect.

This is what I am talking about. I need to have a divided cut that is perpendicular to the direction of the faces of the torus.
Here is a picture of what I want to acheive:

Notice how the torus-es/curves each have dividing segments that lie inbetween the faces of the torus?
I'd like to achieve this effect, but I am not sure how to. Any help would be appreciated.

I see that you are using a texture to achieve the effect. My suggestion is to you make a texture but with vertical straight lines and in the Mapping panel in blender choose Cordinates: Generated and Projection: Tube. In the 3D viewport it's gonna look weird but in the render it's fine.
If you need more rings just increase the repeat value in Image Mapping.

Can you tell me how to do this in Cycles,please?

The easier way to accomplish this is something like the follow:

while in edit mode, select all edges that have that direction under
select menu, perform a "checker deselect", do select just every
other edges that have that direction
duplicate and seperate those edges to    a new object (Shift+D>Shift+P by selection) you now have a new object    with just those edges
you can choose to apply a wireframe modifier, or convert these Edges to curves and giving depth.


text:
How to rig a shirt with buttons so that the buttons follow the mesh of the shirt
I didn't address this in a while because I was busy with something else, but now it has cycled back into my schedule.
Right now I have a shirt modeled and bones set in place. It's already technically rigged, but the only issue is the buttons.

I'm not entirely sure how to go about connecting them to the shirt's deformations.
I tried to combine them and the shirt into one object, but because of the shirt's modifiers, (Solidify and subsurf, which I don't want to apply yet), the buttons become extremely deformed.
I've tried to match the weight painting intensity where a button is at in correspondence with the shirt, but that doesn't seem to work, maybe it has to do with the specifics of where the button is?

Is there a way to make the buttons follow the shirt's deformations without deforming the mesh vertices of the button?
I know that if I probably apply the modifiers on the shirt and combine it with the buttons, it would be okay, but I'm not okay with doing that just yet with the shirt.

I rigged the shirt by deleting all vertex groups, assigning empty groups to the mesh from the armature, and then assigned automatic groups in the weight paint menu.
Is there a way to do this?

Parent to 3 Vertices.

Parent to 3 Vertices

Original Flat Plane at the Parenting time.  This may not matter.  Image Above.
Note the Parent Setting.  The beformation of lightweight fabric or clothes maybe very different than the moving human body.

Shapley beformation with Shape Keys.  Note the buttons follow location and normal of the three vertices.  Blender determined the three vertices for the Blender User convenience.

The Parent Menu. Parent Plane Child Button. Image above.

Mhh, the post was way better after Ben's edit. Why rolling it back?

You may do it using vertex and object parenting.

Select the vertex where you want to place the button and snap the cursor to it. In Object Mode add an Empty there.

Now select the Empty, then the mesh and enter Edit Mode. Select three vertices around the button and press Ctrl+P-->Make Vertex Parent. Finally parent the button object to an Empty. (Ctrl+P-->Object (Keep Transform)).

Just realized you don't need empties to make it work good. Just parent each button to three vertices (as atomicbezierslinger did in his answer).

If anyone is still looking up how to do this in 2022, like I did today, I should note that when I tried this the first time, it failed.

My parent object is deformed by an armature. However, the child object that was parented to the parent object vertices (tri) would move opposite of the parent object vertices being deformed by said armature.
To fix this:

Select child object and Set Origin To Geometry (Shift Ctrl Alt C).
Parent child object to vertices on parent object.

The order of this is important.

At some point I had applied Location, Rotation and Scale which caused the issue. Easy to miss.
Hope this helps.

Despite reading and watching the previous examples I was quite confused. After playing, and respecting what I could of the previous answers, this is my attempt to simplify.
Consider "button" and "shirt" to be examples of anything you want to have a "button on shirt" relationship.

Make sure origin of button's origin is set to the place where you want the button to connect to the shirt.
Select button
⇧ Shift select shirt
Go to Edit Mode
Select 3 vertices in the area the button should attach to. Try to pick vertices that work together to create a "flat" surface for the button to sit on.
Press Ctrl + P and parent to vertices
Go out of Edit Mode and move the shirt to test connection


text:
Baffling: VSE python-coded video output blank no matter what I do
I have a baffling problem. I am using a blender python script to automatically take rendered images from folders, turn them into image sequences in the video sequence editor, and output them to the same folder the images were in as a video, which usefully requires much less storage space than all the images combined.
This script worked fine, and continues to work good, except for, for some reason, the first 951 frames of my animation(s).

What I mean is, for this specific animation folder set I have screenshotted above, I have roughly 5000 frames, and when most of these are organized and put through the python script in the blender VSE and rendered to a video, they come out good, and contain the images the folders have.
However, any videos that contain the first 951 frames, render as a completely black video.
At first, I thought it might be a permissions thing, where my script isn't able to access those files, and so I checked the properties of one of the frames in that set, and their properties were identical to those of later frames that rendered correctly.
Then I thought it was the folder permissions, but there's nothing wrong there either. They are .PNG files, and they should follow the rest of the files in outputting correctly. But they don't, and I do not know why.
I even ran a python script to explicitly tell me if their permissions were good, and each result came out true. I deleted and recopied those specific frames from the source, no effect. I tried the same frames but from another drive, nothing changed. I even tried to use the script, but on a completely new blender file at default settings, without any potential left over issues from anything I did previously, it still rendered as a completely black video.

And the strangest thing is, when I manually add an image strip containing these same files and render it manually, the result is correct!

These are my output settings:

There is an issue somewhere in the pipeline. If it is just my code, why do other sets of images render fine?

If the problem lies only in the image frames in question, why do they render correctly when done manually without the script?
Why are only the first 951 frames (the first continuous set of integer filenames, the very next image file jumping to 2068.png), affected?

I don't know, but here is my script I've been using and talking about. Please tell me if you can find anything wrong with it, or if there's some built-in mechanism that prevents outputting frames until 951 images has passed...
import os
import bpy

img_dir = r'D:\TTITW\night3 Animation Finals\Empty-Walk (night3) TRIMMED\V_O to V_4'

filesw = [f for f in os.listdir(img_dir) if os.path.isfile(os.path.join(img_dir, f))]

frameend = len(filesw) - 1

i = 0
for f1 in filesw:
    filename, file_ext = os.path.splitext(f1)
    if file_ext == ".avi":
        filesw.pop(i)
    i += 1

filex = []

for f11 in filesw:
    filename, file_ext = os.path.splitext(f11)
    filex.append(filename)

filey = [int(x) for x in filex]

filey.sort()

filez = [str(y) for y in filey]

files = [s + ".png" for s in filez]

filepath = os.path.join(img_dir, str(files[0]))
filesR = files
files.pop(0)

context = bpy.context
scene = context.scene
sed = scene.sequence_editor
sequences = sed.sequences

frame_start = 0
frame_end = 1

image_strip = sequences.new_image("IM Strip", filepath, 1, frame_start)

image_strip.frame_final_end = frame_end

for f in files:
    image_strip.elements.append(f)

bpy.data.scenes["Scene"].render.filepath = img_dir + "\\"

bpy.data.scenes["Scene"].frame_start = 0
bpy.data.scenes["Scene"].frame_end = frameend

bpy.ops.render.render(animation=True, use_viewport=True)

sequences.remove(image_strip)

If I can't find a solution this, I'll need to sit down and do the rendering manually, it's probably manageable, but I'd prefer not to have to do that, since I've got about 54 animation sets, any one with possibly nine folders that have this problem. Also, this is such a confounding problem I've encountered, that it's probably good to understand just what is causing it.
If there's anything in the VSE or Blender that might cause something like this, please let me know. I'm on version 3.1.
Thank you for reading this! Try it yourself if you'd like, but please help if you can!

I found an issue in the script, that may lead to blank frames. Then you sort by converting to int, you lose leading digits, so 0001.png becomes 1.png. Broken links should lead to blank frames.
You may replace sorting by something like this:
import re

def natural_sort(l):
    convert = lambda text: int(text) if text.isdigit() else text.lower()
    alphanum_key = lambda key: [convert(c) for c in re.split('([0-9]+)', key)]
    return sorted(l, key=alphanum_key)

filez = natural_sort(filex)

files = [s + ".png" for s in filez]

That's a good catch!

That is exactly it. I integrated your code into my script, and it produced the video correctly. Thank you so much! I would not have caught that any time soon. I should have probably checked what was being created at each stage of the process.

I don't know if it solves your problem, but perhaps tweaking the strip start, end and duration in your script could help. Then it looks like when you add a strip manually.
# Blender default: timeline starts at 1
frame_start = 1
frame_end = len(files)

image_strip = sequences.new_image("IM Strip", filepath, 1, frame_start)

for f in files:
    image_strip.elements.append(f)

# Setting end frame and frame duration (just to be safe)
image_strip.frame_final_end = frame_end
image_strip.frame_final_duration = frame_end - frame_start + 1

# Make sure Blender is up to date before rendering
sequences.update()

# And render...
```


text:
Image strip rendered to video is missing half of its frames throughout the animation
I've recently realized that the videos I've rendered using the 2.8+ VSE are much more choppy than they should be.
For example, in this animation, there are supposed to be 11 frames total that should play in the animation.

However, when I render the frames in the VSE, the output video only has six frames. The animation still contains the start and end frames, but several throughout the animation are missing.
These animations are very short and are designed to be transitions for my game, so it's important they be smooth. I designed them to be 11 frames running at 30 fps, but the video output is just 6 running at 30 fps, and the result is not smooth enough.
Here is part of my setup.

And here are my video output settings

What's odd is that in the VSE preview, the animation is smooth and has all of its frames, but not when rendered.
Is it because of my video output settings? Does choosing "perceptually lossless" mean the VSE cuts some of the frames? I would think it would just compress each image a certain amount, not get rid of some of them.
Or is it encoding speed or something else?

In my experience PL is THE BEST export setting to use in VSE

Does PL usually cut frames from the final video?

You seriously need to upgrade your Blender version.

@tintwotin What do you mean? I'm using Blender 2.92, that should be current enough.

Should be a bug. This is what I've found:
Blender 2.93, container AVI - file displays wrong
Blender 2.93, container MP4 - file displays correct
Blender 3.1, container AVI - file displays correct, but file generated by 2.93 displays wrong
All other settings match yours
But again it looks like playback issue, file itself looks correct. I think I've reported something related in the past https://developer.blender.org/T86944, so consider updating the Blender as tintwotin suggested.
If the version is important for you - try to use MP4 container with the same codec.

Thank you, it actually worked, my video file output by using v3.1 and .avi displays all the frames! I thought 2.9 would've been current enough, but I was wrong.

2.82 should be good also, it was a bug around 2.92-2.93 versions


text:
After configuring the domain shader I do not see smoke simulation
I'm learning to work with the fire and render it in Cycles. After setting up the domain shader (to make it invisible), I see the mesh-emitter without fire.

What is my mistake and how to fix it?

Did you do a quick test using "Quick Smoke" ... you can follow the instruction here http://blender.stackexchange.com/questions/18599/smoke-domain-object-is-black?rq=1

Switch to CPU rendering, density is not supported on GPU.

@hawkenfox Yes, I originally created this scene using the Quick Smoke

@Jerryno I see ... And it is possible to render the fire and smoke in the Cycles on the GPU?

@MrZak Thank you very much, I'll try this method, is it suitable for rendering on the GPU?

It may be that not everything. You can search for release notes, something like links here- http://blender.stackexchange.com/questions/33253/cycles-will-fire-and-smoke-on-gpu-be-supported-in-2-75.

I think @MrZak nailed it, density should definitely not be capitalized.

In this smoke setup the smoke and fire won't be rendered because:

Attribute node which provides information for shaders has property typed incorrect, it should be density.
There isn't any Attribute with property for flame.

To fix that:

either use Quick Smoke operator from 3DView header > Object > Quick Effects which will setup objects and materials automatically. You can choose what type of smoke sim you'd like to in operator's options in the Last Operator Panel (in the Toolshelf). The materials will be setup appropriately:

Automatic setup may be not desired if there is domain / flow already created (you could link materials though from objects created with Quick Smoke to your main ones). So it's possible to correct spelling of the property manually and add one more Attribute node which will be connected to the node tree via one more Add node.

See related question: Rendering Smoke in Cycles

Thank you very much, it works! It looks like the smoke simulation may be rendered in cycles on the GPU? That's great! I also added some nodes to adjust the smoke and fire (http://postimg.org/image/6c4xn1jkd/), using this tutorial: https://youtu.be/oSiV5gg_lCs Thank you!

@MaximVelichkin Glad it worked for you. As for GPU, I think it's supported in 2.77, though in wiki it's stated otherwise. Unfortunately I can't make any tests.


text:
Apply a volumetric texture tangentially on a torus
I'm trying to adjust a volumetric texture on a torus object.
Some details on this object:

The material is a volume whose density is driven by a texture.
This texture is a procedural one such as marble/musgrave.
This texture is mapped on the object (the torus) with a tube projection.

My problem is that I whish to position and stretch this texture tangentially around the torus and I didn't manage to get this result. I tried many settings and I didn't succeed.
Here are some results I obtained :

And nearly what I would like :

I thought that in a tube projection, the y coordinate was the angle of rotation but I think I didn't undertand how Blender projection system is working.
I also tried to change the projection system to sphere and the mapping coordinates to global but it didn't work

My questions are :

Have you ever succed to apply a texture tangentially (or radially) on any object ?
Do you have some hints/explanations on the blender projection system (especially tube and spheric projection) ?
Do you know other ways to do that ?

I was able to get a radial result:

The key is to use a 'Blend' type texture (instead of marble) as this has the option to do radial mapping:

I use a custom ramp for the black and white bars (set to 'constant' blending), a radial blend and default mapping settings.
One other setting which has to be enabled is 'RGB to intensity':

I use the default volume settings for the material, apart from 'Density' which is 0.

Make exactly what I want ... Great !


text:
Should my character face y-forward?
I've been using Blender for years. Before when I pushed NUM 1 I would be looking at the character's face. CTRL NUM 1 would show me his back. It worked for me, and never mattered in the larger scheme of things.
Question: Have I been doing it wrong? Is Positive Y the direction the character must face?

Guys, this is important if you are a unity user importing blender files. And "Front" could mean "You are facing front", or "you are facing the object's front".

In default Blender object added looks in -Y axis. Preset orthographic front view (Numpad 1) orients view along +Y axis (so you will look along +Y). Hence if adding default object and entering Front view you will see its front.

those shortcuts activate view alignment modes named "front" and "back"

so I can't see why you feel they could be wrong, even if those are just names, and you can choose whatever (even to work not aligned to anything, but of course it helps...)
that said, some symmetry related tool considers the default (sometimes the only possible) symmetry around X axis, so that the object shape is considered mirrored on the +Y and -Y axis
This is clearly the case of "humanoid" features (like a face) so it seems to be considered the best choice, imho.


text:
How to make a crowd of people running using one person in VSE?
Lets suppose I animate a scene 20 or 30 times from the same angle, but with character(s) running in different directions? Such as escaping a doomed city.
Ideally there would be some 20 or 30 takes (one for each person running) from camera angle, and I'd like to impose them on top of each-other so it appears to be a mass exodus from a town.
How is this done in VSE? Is it too much on Blender to do it?

"Is it too much on Blender to do it?" It probably is, for the VSE at least it sounds like an inadequate tool. Maybe the compositor might be able to

wouldn't that be a mass exodus of cloned people...?

If you use filmed people from a locked off camera, the issue will be masking or keying the individuals into the background plate/image. Ideally you would difference key them from their background (where pixels change color from a sample you get a key shape). But this rarely works. Otherwise shoot greenscreen. Also you need to avoid shooting a shared floor as the people may occupy the same position. Much easier to film a low point of view and compress the people in frame.

The VSE doesn't allow you to do keying very easily, see this tutorial I made: https://www.youtube.com/watch?v=1mVm4hwO0EU  but the compositor does. The drawback there is that changing the start frame per person will be a bit of a pain and not very interactive. You don't just slide a strip like in the VSE.


text:
Where is that new retopo feature?
I heard/saw there is a retopo engine in blender now. Is this true? I cannot seem to find it, and the google results I get are either old stuff (I'm already using magnet/snap) or a marketed plugin.
Did I miss something?

Several options available. You can take a look at the Instant Field Aligned Meshes for remeshing (http://igl.ethz.ch/projects/instant-meshes/), Mira and Mifth Tools (http://blenderartists.org/forum/showthread.php?366107-MiraTools) and there is the Iceking Tools.
I have the paid addon that you are referring to, retopoflow, and it is worth it - but if you search online you will find the github page as well anyway since it is GPL if you want to try that, too.


text:
Armature go limp like noodle, how?
I want to have a character lift some really heavy weights then his strenght goes out and he collapses like a house of cards.
I know how to make the weights fall down in a collision, but how do I make the armature / object suddenly fall down like its made out of noodles? Is there a modifier or state for that so I don't have to animate the complex chaos of a limp fall?

You sir, are looking for a ragdoll animation! https://youtu.be/HryXEpIz-cg Good luck!

You can turn the skin into a softbody and make a new armature made out of mesh bones and apply rigid body constraints/joints .
But physics simulations cant effect regular armature bones.
But I think its a good idea, you should pitch that idea on rightclickselect


text:
Cycles, Mitsuba, Lux - Speed by Necessity - The Correct (non-subjective) Answer
I know stackexchange frowns on "suggest this software" questions that can be subjective, but I do believe there is a correct answer (non-subjective) to this question.
I have to render for speed and quality and can (for these particular projects) do without the excessive control that cycles offers.
I've seen Luxrender and this if I am not mistaken is much slower than cycles. Mitsuba might be faster, but I read it has some limitations.
Which of these renderers can give speed and quality even if some sacrifices must be made?

Just pick the one you know better ? the most knowledge you have about it the faster you will be setting up the renderings.
About "which software renders faster ?" I'm not sure there are any real differences, it depends from your hardware and you scene, and what you will be able to do with one you surely can do it with the other ray tracers too.

There is an old adage from the industry:
“Time, Money, Quality; Pick Two”
The gist being that you can only have two points of that triangle, at a cost of the one you do not select.
It has held true long enough to become a trope.

I think this answer, simple though it is, really hits the mark. It doesn't specifically answer the question, but really it does quite well! Thank you very much.

Absolutely true.


text:
Linking movies in VSE but not graphically altering them?
There are many instances where I'd like to pre-process a movie into another file and reference it later, or bring in an existing movie and process that into the final.
In this case, I have a longer movie, and I simply want to process the scenes in their own context and then link them all together after.
So how do I link to movies and NOT have them processed again (I understand any image processing to be destructive in nature).
Perhaps this is my confusion and no destruction happens -- but can someone set me straight on this?

The VSE is non-destructivee for any movie file you link into it. Just make sure that rendering outputs to a unique file name (otherwise it could overwrite an existing file and still be destructive to that particular file).


text:
What's the best way to do clothing in character modelling?
I'm doing a character mesh for animation, simulation, and posing/3d printing, and was trying to figure out the best way to do clothing. Should I model it as part of the character, and worry about making it behave properly in rigging? Or do I model it separately and fit it to the character? It seems like the best way to do it would be to model it on top of the character, and apply a cloth simulator, but I'm not sure if there might be a better way of doing it.

All the ways are valid, but there are advantages/disadvantages to all of them and so it depends which is the best one:
Simulating the cloth on a rigged character:

Blender cloth physics are slow (single-threaded) and do not offer the best settings, so it's best to do the simulations in some other software (Qualoth, Marvelous Designer, etc.) and bring them back into Blender as .mdd files. In Blender there is also a way to transfer a low-resolution simulation to a higher-resolution mesh to save some time: Ways to have one mesh control another?
Such simulation results in accurate wrinkles, accurate cloth fit and deformations. The fabric slides over the character etc. When the animation is fast, there can be artifacts - so the animation has to be sometimes composed with multiple of simulations and some cleanup work. It is time demanding.
The animator has usually poor preview of how the clothing behaves, and he must wait for it ()

Modeling the cloth separately and rigging it:

The cloth can be relatively fast sculpted, and rigged with extra set of bones so the cloth can slide over the character. The animator has full control over the cloth bones (some can be rigged with constrains), which is both advantage and disadvantage, as he has more work with it. The more bones the cloth has, the better deformations can be achieved, but small wrinkles and a look of a simulation is very hard to do even with blend-shapes.

Separately rigged cloth with parts simulated (both upper methods combined).

Probably the best option to leave some artistic control and have the fidelity of simulation. Also most game engines are only simulating parts of clothing.

Rigging the cloth with the character armature:

The worst deformations, as the cloth cannot slide much over the character. There can be some basic wrinkling with corrective shape-keys (and sliding), so the animation doesn't look like a character completely made out of play dough.
This is fastest to setup, but usually usable only on background characters. Also good for fast iterative approach to setup the final animation and then refine the cloth and deformations with shape-keys exactly for that animation and camera angle.

When i model cloths separately and rig them to the same rig as character i have a lot of sliding - the cloths use solidify to thicken then, but the "body" mesh still slips out of the clothing. Just to clarify - In the picture it's not rigged yet.
Any ideas? https://i.sstatic.net/7G9W7.jpg

@StavHavivi I've answered this here: http://blender.stackexchange.com/questions/50456/how-can-i-prevent-the-body-object-slipping-through-the-clothing-object/50463#50463


text:
Using hsv curve in timeline
I'm trying to modify the color of an object depending to the time. I set keyframe with the colors and I see the RGB curves in the timeline :

Is it possible to have HSV curves instead of RGB curves to deal more easily with hue, saturation and value?

you can use the HSV space by adding the Combine_HSV node as input color to you material, then keyframe its values  :
to keyframe a value RMB on the value in the Node Editor  and click Insert Keyframe

F-curves :

example file :

I tried to use shader nodes to set this graph on the material but I can't keyframe colors anymore. Could you be a bit more precise on the sequence to execute ?

You can also press the 'i' key while hovering over various fields and colors to set keyframes.  I just tried this on the Diffuse Material Node Color Preview square,  and the keyframe was correctly set.  I tested the color's animation with cycles viewport rendering and it works fine.


text:
Duplicate objects randomly in a delimited zone
Is there a tool (a module or a easy method) to duplicate an object many times, randomly in delimited zone (the inside of a sphere for example) ?
Rather like the airbrush tool in a raster graphic editor (illustrated below), but instead of drawing dots, it would duplicate a preselected object :

Note : I don't wish to use particles systems to duplicate objects (I need to keep control on positions)

There's the randomize transform operator.. It doesn't support distributions inside arbitrary shapes, but it can be used to spread out objects in a random fashion (and optionally scale and rotate them). To distribute objects inside an arbitrary shape you'll need to use a particle system. You can always convert the particle system to real objects later in order to fine-tune their positions..

I was not aware of this functionality. Converting a particle system to real objects seem to make exactly what I want.

See this question for details on how to setup a particle system for distributing objects inside a shape.
Once you've done that, you can convert a particle system to real objects with ⎈ Ctrl⇧ ShiftA or the convert button in the modifiers panel:

Note that this won't remove the particle system, so remember to delete it if you are done with it.


text:
Selecting a curve by its name with a Python script
Is it possible with a Python script to select the curve of an object with its name ("location x", "location y", "rotation z", ....) instead of its number.
For example, I tweak the Z location of an object with
bpy.data.objects["Pixel X0006 Y0006"].animation_data.action.fcurves[2].keyframe_points[0].interpolation = 'LINEAR'

and I would like to select it by a name rather than with fcurves[2]. It would be more convenient for my scripts.
Is it possible to do that ?

Try printing the name of the curve.  Try to [find] the curve by name.  I will check to see where this function is.  You may be faster than I am.

Yes its possible.
This is an excerpt from an older, non latest version of Blender script.  The relevant part may still work. Note the find function.  You can see the name of the curve in the FCurves Editor Panel.  Note curves may have an index X in the set [0,1,2].
object_bq = bpy.data.objects[name]
test = object_bq.animation_data.action if (None != object_bq.animation_data and (None != object_bq.animation_data.action)) else None;
if (test):
    fc = object_bq.animation_data.action.fcurves.find("Some Curve Name Visible in the FCurves Editor Panel");

fcurves.find
https://docs.blender.org/api/current/bpy.types.ActionFCurves.html?highlight=fcurves%20find#bpy.types.ActionFCurves.find


text:
How to import .ai files to blender
I installed this add-on and tried to import .ai files from illustrator. Unfortunately, the imported 2d vector graphics where all in grey plane object- even though the paths where there.
Any ideas how to fix that?

So, the thing I thought was to save it as .SVG and then import it... I exorted the graphics as .SVG and even though in inkscape the file was loading as it was, in blender it was again the same...
Long story short, I solved it by changing the file from .ai to .svg though this site: http://image.online-convert.com/convert-to-svg
There are many similar sites, just lookup "ai to svg" in Google

You can also save to SVG directly from Adobe Illustrator if you have that app.

I know, but I don't have Illustrator installed; I just had the .ai files.

Be careful by using that kind of service.
Take your time, reading the terms and conditions. Not only that you may be get charged for using the service of online convertion, you probably give away your hard work for comercial use by foreign companies.


text:
Inverse Kinematic Panel disabled from Bone tab
I cannot restrict the rotation of a Bone in Blender... I have done it on the previous project, but now it is disabled and I cannot figure out why..

Any ideas would be much appreciated, thanks.

Stupid me...
As soon as I added an IK (inverse Kinimatics) Constrain from the Bone Constrains tab, it worked....

As a more up to date answer, since the UI has been overhauled:

Make sure you are in pose mode.
Go to bone constraints and select Inverse Kinematics from the drop down menu.


text:
texture mapping in cycles for game model
Hai following is a texture painted map I created for my character. how can I use image texture for each part of my uv, like cloth texture for cloth and leather texture for bag, without using multiple uv maps.

Found the answer my self.
Here is the link to the youtube video: https://www.youtube.com/watch?v=XO9gOeDcgzg
this method will help to consolidate uv's and create one single texture material and it can be used in unity.
hope it helps someone. I asked it my self but no one answered, may be they didn't understand what I meant. anyway....this is what I wanted.....


text:
How to move a Cut Loop and Slide using a measure
Im using centimeters as unit of length and I've created a plane.
Now I want to make a edge loop and place it at 6cm from the left edge of the plane.
I went in Edit Mode, pressed CMD+R placed the Edge Loop at the left edge of the place LEFT CLICK, pressed G entered Y inserted 6 but nothing, the Edge Loop is not moving.
What I'm doing wrong?
Thanks

Add the Edge Loop and place it as you did before. Without deselecting it, press N to bring up the sidebar and select the Item tab. Here, you can view and edit the exact location of the selected loop cut. Just click on the X, Y or Z values.
An easy method to get an exact value from the left edge is to snap the loop cut onto the left edge of the plane (before left-clicking to apply the loop cut). Then, apply the loop cut and add 6cm to the Y value in the sidebar.

Thanks, both methods work great!


text:
How to move a cube on a plane
I'm using blender 2.8 and my simple scenario is: a plane and a cube mesh.
I want to move the cube on the plane without using the G command on the Z axis of the cube mesh, because doing freehand it's not perfect.
What's the best practice using blender tools?
Thanks

if you place your cube on the right Z location, then you can move it with shift Z so that it doesn't move anymore on the Z axis, you can also lock its location on the Z axis on the 3D view N panel, or even give it a Limit Location constraint...

I have used the snap tool, and does what I needed. Thanks @moonboots for your help, I've learned that I can do the same thing in many different ways.

yes of course, snap tool as well  ;)

Helpful tricks to use when moving/scaling/rotating an object: to move on two axes while scaling/moving/rotating press S/G/R then SHFT+(axis you don't want to transform on). This will allow you to move on, say both X+Y axes, but not the Z axis if you press G-SHFT+Z, or only scale on X and Z- S-SHFT+Y.

And if you want to make a lot of movements, you can position view perpendicularly to the surface you want to move on. E.g. Numpad 7 for top orthogonal view to move only on XY plane, without the need to press SHIFT + Z each time.


text:
Model Looks Dirty after Ambient Occlusion Bake
I tried to AO bake my model, but it became very "dirty" with many black dots on it. How can I remove them?

Looks like overlapping geometry, do you have another object that is hidden?

@Denis Nope, all objects are in the screenshot :/

soap and water.

Looks to me like you have overlapping UVs, if not overlapping faces.

@gandalf3: oh yeah, I applied the solidify modifier to the gun by mistake :<

@gandalf3: but how can I remove the applied solidify modifier?

@AlexLing Try remove doubles (W)

@gandalf3: Thanks for reply. I've tried that and it did remove some vertices but the inner faces are still there

@AlexLing Try using a higher tolerance?