text:
Is there a way to avoid a Smooth modifier interfering with a bump-map?
I have a path that consists of a cube primitive, using four modifiers to get the effect I want (sort of):

Bevel
Array
Smooth
Curve

For the material, the most important part is a bump-map driven by a noise node.

The problem is that the Smooth modifier seems to interfere with the bump-map. I really don't want the Smooth modifier to affect the material at all - its purpose is to get the path to follow the curve more gracefully.
In the image below, I have split the sample path into two sections: the first three slabs have smoothing turned on, and you can see that the path curves gracefully, but also notice the distortion of the material. In the last three slabs, the smoothing is turned off, the slabs are angular but the material is clear.

If you zoom into the image, the distortion on the first three slabs becomes more obvious.
Is there any way to either:

Get the smooth modifier to smooth only the shape of the object; or
Get a similar effect using something other than the Smooth modifier?

I would suggest a different method to get the same results. Here's what's happening with what you have right now:
The bevel modifier is adding a small bevel on each edge of the cube, which adds some extra vertices. The array modifier duplicates this object along a set axes, and then the smooth modifier smooths out all of the geometry.
The smooth modifier doesn't create any new geometry. Instead, the relatively high strength you are using is smoothing the object so much that the originally small bevels are now much larger. Essentially, the vertices created by the bevel modifier are getting pushed towards the center of the cube.
This is all fine, but you're noticing an issue that this method causes.
Materials are applied to the object before certain modifiers. Thus, the texture is applied to the bevel created by the bevel modifier, but then that bevel is stretched (smoothed) by the smooth modifier, and thus you get the stretched texture.
Instead, remove the bevel modifier and the smooth modifier, and use a subdivision surface modifier set to simple. This will add some extra vertices that will allow the curve to bend it smoothly.

Thanks for the idea @Brenticus - see my answer for where I ended up!

Thanks to @Brenticus for the inspiration! I experimented a bit, and rather than using a Subdivision Surface modifier, I ended up actually subdividing the original cube.
I think this is more efficient, because I only needed to subdivide along the length of the slab, whereas with the Subdivision Surface modifier, you don't have that degree of control. Here is an image of the subdivided cube in edit mode.

At first I tried 8 subdivisions, then 4, and finally settled on 6 as a compromise between quality and render time. In any case, the curvature of the path is much better than with the Smoothing modifier, the material is not distorted, and there is no appreciable effect on render time.
The image below shows the first three slabs with the Smoothing modifier, compared to the last three with a subdivided initial slab.

The next image shows a comparison between the Subdivision Surface modifier (first 3 slabs) and actually subdividing the cube (last 3 slabs).

The quality looks about the same, but it did increase the render time by about 10%.
Once again, thanks to Brenticus for heading me in the right direction.

Even better than my suggestion! Glad to hear I could steer you towards a good solution.


text:
How can I prevent Blender from making a dump when crashing
Blender recently caused a severe problem with my operating system (OpenSuse 15.2) when it crashed, leaving a huge data dump, which caused my whole system to freeze or crash thereafter, whenever it was put under any stress - even if Blender was not opened.
It was also extremely difficult to rectify the problem as the system would usually freeze when I tried to open Blender, or if I managed to open it, if I tried close Blender, even without saving. Eventually, I managed to clear the problem by logging in as Root, opening Blender, then saving the .blend file that was open when it crashed.
Is there a setting to prevent Blender from making these huge data dumps when crashing?

If you start blender with blender --help among the options are --disable-crash-handler and --disable-abort-handler would assume the former will do it.

Thanks @batFINGER - I'll check it out.

source: Stack Exchange

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

sort: votes


text:
Node Menu in Lamp Settings linking keyframes of multiple objects
I have a scene that has some lamps that are animated with keyframes they were each created individually and follow separate curves I was trying to save time when i decided to change the size of all 12 lamps at once so I selected them and linked Object Data and adjusted the lamp size i then made the lamps single user.
I've made local, I've made data single user, I've made object animation single user, I've tried everything
The objects are not linked. Changing the emission strength only affects the single selected lamp adding a keyframe to the emission strength however adds keyframes on 6 other lamps and they all snap to that brightness.
Weird thing to me is, i can individually keyframe other settings (such as transform) and it only adds keyframe to selected lamp, but when keyframing the emission strength or color it adds it to all of them, but only adds for the selected when adding keyframe to other settings like lamp size
So only the Node section of the lamp settings seemed to be linked, and nothing else

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


text:
how to create a 3d mosaic out of a 2d image
i have a  mosaic image and i want to turn it into a plan object that is going to have a 3D bumps.the result is going to be printed with a 3d printer .the idea is to extract the parts of the image so i can feel them with my hands
i still didn't try any method and i don't know where to start.

Easily 'extracting' the bumps from the image does not seem like a very realistic possibility here. There are no uniform properties in the image that could define height - the bits have different colors and brightness values. I think this might be a suitable case for the good old-fashioned loads-of-tedious-hard-work workflow. It could be loosely recreated adding arrayed cubes and sculpting to add variation in 3d, or it could be recreated as a 2d image to be used for displacement. There are repeating patterns there, so that makes things a bit easier.

i a little bit in a rush and i don't have time to recreated and sculpted .So is there any method or a software that can help me do it faster. i also heard that i can't use normal maps and textures because it's only in the software the details won't appear when i print it.

have a look at Materialize http://boundingboxsoftware.com/materialize/ it is Windows only but is free and the video tutorials show how you can create bump/height maps from photo textures.

Sadly, the lack of time in your situation does not influence the amount of available solutions to your problem. If you wish the result to have any meaningful amount of accuracy, there is not much that can be done. You could attempt to edit the brightness of the image isolating it by color in some image editing software. For example in Photoshop there is a function Image -> Adjustments -> Black and White where you can try to make the colored tiles brighter than the gaps. It will not be a very precise result. You would have to deal with shadows as well. Look into Frequency Separation techniques.

The only automation you can have is to translate the brightness value of every pixel into a height map, setting it as texture in a displace modifier on a highly subdivided plane. The result is quite random because of the problems Martin Z said. In my example we have 1.500.000 vertices.

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


text:
model is damaged when rendering blender 2.7b
this is the photo of the model in render view

and this the photo of the same model rendered

are you sure that the render option is enabled in the Subsurf modifier of your object?

a .blend file would be much appreciated...

yes i enabled the subsurf modifier

thank you so much for your help


text:
why my baked texture is half black blender 2.9
I have a texture for a shirt and when I render it the image texture is black. The shirt has a sweater on top of it maybe that explains it a little bit. How can I fix this problem?

could you please pack the images and share your file? https://blend-exchange.giantcowfilms.com/

I agree with moonboots, and it looks like AO is way too high


text:
I can't seem to import a model that I downloaded from the internet
I know about User Preferences. I know about enabling the different file formats. What I don't know is why I am not seeing any model in the viewport despite using File-Import-Wavefront(.obj)...

Well there is something in your file given the long list of objects in the Outliner.  All those objects are visible and on the active layer.  My guess is that the scale of what you imported is very very small compared to the viewport scale, and you just need to scale everything up.

Related https://blender.stackexchange.com/questions/32116/when-i-import-files-they-spawn-too-far-away-from-the-origin

Now I can only guess, but if the objects in the outliner are the imported ones, it might help to select one of them in there and then use View >> View Selected from the menu in the 3D editor so your view centers on the object. Might be they're not at all in the center or very small.

It seems to have worked, I think the model was actually really far away from where I thought. Thanks!

If the answer worked for you, accepting it would be great.

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


text:
Black Borders on Reference Images
I'm getting black borders on all the reference images I add and it's making things difficult to work with. Anyone know how I can get rid of them?

This is v.2.80.

I don't know if you can get rid of the line. A solution could be to use your picture as an Image Texture on a plane and use the alpha channel as a factor for transparency.

As an alternative approach, you could use file import and select "import image as planes" instead of drag & drop.

Hello and welcome to the site! Thank you for contributing! I've taken the liberty of editing and adding a screenshot to your answer; if you disagree with my edits please feel free to roll them back and/or make additional edits of your own. Happy StackExchanging <3


text:
How to store and access generated data in a project?
I have written some code to work in conjunction with Animation Nodes to use MIDI files to drive procedural animations. It works wonderfully, but I want to refactor and polish it before I release it. The main thing I wanted to change is to take the original MIDI data and convert it to a format that's preprocessed and more easily navigable since MIDI is a streaming file structure (it can only go forwards, if you want to go backwards you have to start from the beginning).
So to the heart of the question: How can I store and access the generated file in the .blend so my addon can use it without reading external files?

Keyframes
Suggest using your midi file reader to keyframe the animation. I have done this using the very basic pysmf reader to make an action of custom properties for each track. For example in image below "AE" for electric guitar track, and "AB" for muted trumpet track.
For each of the midi notes in the track, if there is an ON event, keyframe that to a custom property, eg middle C on electric guitar "AE" would be assigned custom property AE60.  The smf decoder gives middle C as C4, I get it's midi position 60 by finding its index in midi_notes list below. Your reader may handle this differently.
notes = ['C', 'C#', 'D', 'D#', 'E', 'F', 'F#', 'G', 'G#', 'A', 'A#', 'B']
octaves = range(-1, 10)

midi_notes = ["%s%d" % (n, o) for o in octaves for n in notes]
#pop off the last 4

for i in range(4):
midi_notes.pop()

Rather than using custom properties, ob["AE60"], another method would be to create collection property for the tracks and channels.
The velocity and event time in seconds, converted to frame, of each on / off note event in the track, are keyframed as a (frame, value) pair.  Constant interpolation will make the note stay on until an off event.
To find the value of AE60 in an action named "MidiAction" at frame 44
bpy.data.actions["MidiAction"].fcurves.find('["AE60"]').evaluate(44)

The very much WIP code to produce action above is here


text:
UV Distortion - Correctable?
This question has come up a few times on here and I have checked them for a partial answer to my question; as in WHY it does it. What I need to know is IF there is a solution to it that doesn't involve altering my UV map from a rectangle.
To make better use of texture space I am overlapping faces that will be sharing the same texture, and to make it easier for me to create the texture by keeping the UV's square where possible. I know this will 'pinch' the texture but this is the result I am looking for.
The problem is that distortion across the diagonal of each face. I know why it does it, I need to know if there is a work-around that doesn't involve altering the UV's from a 90 deg rectangle.
The only solution I've found is to subdivide a few times to make the effect less noticable, however this is a less than ideal solution as it increases the tris count. What I am making will go into a game so polys are everything.
Is there a way to achieve the result in the second image without resorting to what I had to do in the second image?
Thanks

There is no other solution than to increase geometry or UV unwrap without distortion. As you don't want to do any of that, there is no solution for you. You can code your own game engine which does UV space mapping differently and then you won't have a problem. This engine will have very poor fps, you might be better just using more texture space.

@Jerryno We don't know which engine he is using. Chances of any single person making a better sampling algorithm than in the existing shader standards are slim. This problem is not caused by imperfect mapping code in the first place.

Diagonal distortion only happens when UV shape doesn't match the model shape, can't you do anything about it? I also recommend checking how the textures look in the target engine environment. Finally, if you need to add some subdivisions it's not the end of the world but you should also consider if it's possible to use the vertices for more expressive geometry.

Thanks for the comments.
Apologies I forgot to note the engine will be Unity.
Yes I can match the UV to the shape of the face(s) I was just hoping to not have to in order to make creating the texture as simple as I could.
I've elected to increase geometry in the end, upon doing a little more research on the target game engine and specifically the game it is intended for.
As the object I am creating is classed as a unique building, IE not one that is automatically and repeatedly spawned within game, I have a lot more leeway with tris count.
Thanks again.


text:
Cycles renders only part of the model
I was making a minecraft rig Timys rig v7 and when I went to render it only this rendered. it renders in blender mode to. but the sword and lighting is ugly as heck

"lighting is ugly as heck " other than specifing what is wrong exactly, note that lighting has to be redone (if you don't like it) prior to rendering. Specify what specs of your computer are, what render did you start (animation or usual)

This is just another square sample problem. Cycles will render all of it, it will just take approximately another 30 minutes.


text:
Is it possible to refresh strips in the VSE
I have been using an external editor to cut between image sequences created with Blender, but decided to move to the VSE for efficiency.
With the externa editor (Kdenlive), when I made changes to an image sequences, it automatically updated it, or, failing that, there was an update command.
However, with the VSE, the only way I could find to update a strip was to delete it, add it again an recrop it.
Is there an easier way?


text:
Anyone know how to make 2D riggs in blender?
I know its possible and ive seen it done but I can't for the life of me find a guide on how to do it.
Im currently using the 2.8 beta I just need a way to switch between body parts like an open hand and closed hand or head turn arounds and how to rig bones to a grease pencil drawing

Use drivers to drive the Render Visibility. That way the position of a bone can influence the Render Visibility (and/or Viewport Vis) of multiple image planes.

I don't really understand what you mean by this

Can you clarify? Are there certain words you don't understand? Is it the context?

Its just ive only been using blender for a few months so I get what you're telling me in to do in context I just don't fully understand how to do it. Like I don't know how to set any of that up. Ive been googleing the terms you used but nothing helpful comes up

Do you know how to "rig"? Do you know how to use the armature with an armature modifier and meshes? Have you learned how to setup up drivers? These are all essential prerequisites, which should be learned beforehand. If you don't know how to use any of these tools, an answer would be a lengthy tutorial, which is not in the scope of [blender.se].se.


text:
How do you get "this" look?
I always see this style of 3D art that really stands out. They kind of look like toys, like the material looks unnatural yet appealing. Ill post some examples, you know it when you see it.

By Dimas NP

(Tried looking everywhere for the artist but I can find the name, sorry!)

by Julien Kaspar
This one is maybe closest to what im talking about.
Ive never really seen a tutorial on how this style is done so I hope someone can help

Perhaps what you like in these pictures is that the materials are somewhere between plastic, modeling clay and skin, which I guess is a mix between glossy and translucency. You could try with this: Mix Diffuse and Glossy nodes, with a Fresnel as factor, and mix this with a Subsurface Scattering which will give the translucency and lightness. For the second picture maybe he used an Image Texture for the skin (blushed cheeks), that he plugged into the Diffuse.

I tried it on something ive been working on and it didn't really come out close to it.
The texture I had on it got washed out and muddy and it doesn't have any AO in the cracks and that like white part in the thick areas
https://i.imgur.com/Edb83Nh.jpg

To me what you show looks rather like plastic, it might even not need Subsurface Scattering but just a mix between Diffuse and Glossy, but maybe someone will find something satisfying

oh it's ok   ;)  but what you show above has nothing to do with what I propose

I would recommend you to join Blender cloud, there is upcoming video tutorial about creating stylized characters from Julien which is great, see it here : https://cloud.blender.org/blog/introducing-rain


text:
Project from view using photoshop
Im trying to follow this tutorial but using 2.8 and I can't seem to figure out how to get it to work.
https://www.youtube.com/watch?v=z0qaB-y8qow
I linked my photoshop via both the folder and the exe in the preferences>image editor
I found the external button but I just ge this error
"operator bpy.ops.paint.image from view poll expected"
Any help?

I'd recommend watching better and more recent tutorials. Check out CGMatter's videos about projection painting.

He has no videos on using photoshop to project from

Unless you need specific functionality from Photoshop, you can do it all directly in Blender.

Yes, I do need something from Photoshop

Just incase anyone else needs this I figured it out, it only works in the stable release in Blender 2.8 and I was using the old version back in July
Link your image editor by going to Preferences > file paths > image editor > click on the EXE of your program
Then to project from the editor go into texture paint > Options > External > Quick edit
Save to apply save the file, make sure you only have one layer it will mess up. Then hit "apply" under external.


text:
Why is my module scaling when I parent bones to it?
I just spent time rigging up this character but as so as I parent the bones the module scales up super big but the bones stay the same size.
I have no idea whats going on.

Most likely you scaled the object and/or the armature in object mode without applying the scale.
Select the object, press Ctrl+A, a dropdown menu should appear. Click on "Scale" (should be the 3rd option in the dropdown).
Do the same with the armature.


text:
Bendy bones acting weird
Im trying to work with bendy bones and what I have is a pre build segment of bone the behaves exactly the way I need it to the only issue is while im trying to rig it up to my character it gets all wanky and messes up
Ill grab the bottom control point in edit mode in order to stretch it to the length of the leg and it will look fine while in edit mode but once I go to object mode it shoots off into all kind of directions.
Anyone know whats going on?

could you share your file (at least the armature)? https://blend-exchange.giantcowfilms.com/

Here you go

It looks like you've changed the Rest Length of your bendy bone, so click on the Reset button to bring it back to its normal value. Also, in the Bone panel, don't forget to give this bone its Start Handle and End Handle bones (well, if you need).


text:
Multiple UV mapping in 2.8 eevee?
How do you texture map with multiple UV's in 2.8? I need at least 2 sets of UV's for the way im texturing but I can't figure out how to do it in the new blender
All the videos if doing this are from years ago and the UI of whats happening on screen doesn't match mine.

You can add UV maps using the '+' button in the ObjectData tab (on right on the image).
Then use it in the node editor, from the 'input' category (on left on the image).

Then you can use them in the node tree as you want.

How to switch UV maps in the UV Editor window:


text:
Anyway to use light information as a mask?
Is there anyway to set up a node mask that sees how much light is hitting an object and adjusts its transparency based on how lit an area is?
Like if I had a textured ball, and wanted the texture to lower its opacity when a lamp shines onto it, but moved the camera around to the dark areas the texture is still visible . Is this possible in Blender?

Sort of.
Create a light. Create an Empty and use the Copy Location constraint with the light as the target.
Use the following node tree as the texture for the object. Be sure to note the Empty selected as the Object in the Texture Coordinate node.

In this case, I'm just mixing between red and blue. Transparency doesn't seem to work, but you could create a second view layer, use this texture with an emission shader and use that as a mask in the compositor.


text:
Hair Particles - Can I recalculate the initial rotation every frame?
So i have an animated ocean, Shrinkwrapped a hexagon grid over it and spawning a buoy on every vertex.

I used hair particles en set the initial rotation to Normal-Tangent which works great. The issue I am having is that I can't get it to have the buoy recalculate the normal on every frame (only set its Initial Rotation) So the buoys don't rotate.
When I go to a later frame en change any setting it recalculates the normal again and it is good, but only for that frame.
Anyone have a fix or know a better way to go about this?
Thanks!

Related https://blender.stackexchange.com/questions/100642/wave-modifier-physics

Sorry guys I already have to solution, I just had to check to regrow option.
Thanks anyway!


text:
Why the mapping/coordinates/size have no effect on displacement modifier texture?
I am coming from 3ds max and spent all night long trying to understand how the texture mapping work specially when use in the displacement modifier.
When i adjust the texture size in mapping only the image change and not the displacement.
I know there is another tab call image mapping where i can change the size of the texture but it is less convenient than the mapping tab where i can scale the texture in the negative.
Here a gif to explain it more precisely :

it looks to me that you are trying to modify the material texture not the modifier texture as they are not the same for blender. I am no blender internal expert though

if you go in material mode or render view you will probably see the changes when you increase the texture size

I can see the texture and change it with mapping when i use the rendered viewport mode but i don't understand why it doesn't work in regular texture view.

if you are still referring to the displacement modifier it is probably because you are in wrong tab. if you are, instead, referring to the Show World Texture texture coordinate, I honestly don't remember what was its purpose.. its been a long time since I used blender internal. One note though.. you may not know that Blender Internal is currently being deprecated from the next major update (2.80).. so unless you have a particular good reason of using it you just better off learning Cycles or EEVEE.

Hi Virgil you are right about blender internal but i was just curious why it didn't work because i came from 3ds max and tiling texture is something that work even with max internal renderer. I found it was strange that the tiling work only on the image and not on the displacement. Thank for your time and explanations.


text:
I can't select a single bone in object mode

I have been trying to attach the hat to the head bone for almost over 3 hours now and i just can't get it to work.
When i look up tutorials on youtube their bones are grey and available to click on a single bone in object mode, when i click on a bone it selects every bone and the bones are as in the picture (They are not selected in the picture). I think that has something with my problem but i have no idea how to solve it.

I think you are looking for the PoseMode.
The ObjectMode selects always the complete Armature.
In the PoseMode you can rotate, manipulate and add contraints to the bones.

Thanks for the answer. It indeed had to with me being in wrong mode. I managed to attach the hat to the headbone in pose mode.

@Jujutsu5: I'm glad you found Karotte's solution useful. If it solved your problem, you are invited to accept (✓) the answer


text:
Drawing mathematical functions using Blender
Is it possible to draw
Scherk's Minimal Surfaces (which is  e^z*cosy=cosx) using Blender?
Any suggestion would be great.

Possible duplicate of Graph in blender a function of two variables,

An answer that might help with this class of equations is https://blender.stackexchange.com/questions/63697/how-can-i-generate-an-object-from-a-mathematical-function

1.Add
2.Math Function
The functions on left side are fully customizable.
Hope this will work, try!


text:
OSL texture(...) image looks whiter
I use OSL texture(...) to perform a texture lookup of an image, succeed, but it always looks whiter than I use the Image Texture Node, Why? What's wrong?

The problem is due to the color correction that is by default applied to the Image Texture (the Color/Non-Color Data option.
A PNG image is stored in sRGB format. This includes a conversion of each color channel to make better use of the available range of 8-bit values for display on screen. The Color/Non-Color Data option of the Image Texture node allows you to convert for this, using the 'RAW' data when set to 'Non-Color Data' or the values converted from sRGB when set to 'Color'.
When you use the 'texture(...)' call in OSL, Cycles returns the unconverted values directly from the image - ie, it is as if you have set the 'Non-Color Data' option in the Image Texture node.
In order to correct for this you need to add some additional code to the OSL shader to include the sRGB to RGB conversion :
shader myshader(
vector Vector = P,
output color Color = color(0,0,0),
output color ColorRGB = color(0,0,0)
)
{
    //Replace this path with the path to your image
    Color = texture("c:/users/rich/Desktop/map.png", Vector[0], 1.0-Vector[1]);

    //Conversion as defined in http://entropymine.com/imageworsener/srgbformula/
    for (int c = 0; c<3; c++)
    {
        if (Color[c] <= 0.0031308)
        {
            ColorRGB[c] = Color[c] / 12.92;
        }
        else
        {
            ColorRGB[c] = pow((Color[c]+0.055)/1.055,2.4);
        }
    }

}

This is using the formula for conversion as defined at http://entropymine.com/imageworsener/srgbformula/. Also, see Wikipedia sRGB for additional background and information regarding sRGB.
The above OSL code should create a node with a Vector input and two Color outputs (Color and ColorRGB). The Color output produces the color data directly from the texture image (ie, it will still be in sRGB - as if you have selected 'Non-Color Data') while the ColorRGB output provides the converted values (as if you had selected 'Color' on the Image Texture node).


text:
How to use pointcloud_write(...) and pointcloud_search(...) ? (Open Shading Language)
I am learning Open Shading Language these days,
but I don't know how to use pointcloud_write(...) and pointcloud_search(...),
what does pointcloud actually mean ?
how to create a pointcloud in blender ?
how to use pointcloud_write(...) and pointcloud_search(...),?

I was quite intrigued by these functions and tried to following the code examples in the OSL language specification but without success. On digging into the Cycles code, however, it becomes clear why this was not working :
int OSLRenderServices::pointcloud_search(OSL::ShaderGlobals *sg, ustring filename, const OSL::Vec3 &center,
                                         float radius, int max_points, bool sort,
                                         size_t *out_indices, float *out_distances, int derivs_offset)
{
    return 0;
}

int OSLRenderServices::pointcloud_get(OSL::ShaderGlobals *sg, ustring filename, size_t *indices, int count,
                                      ustring attr_name, TypeDesc attr_type, void *out_data)
{
    return 0;
}

bool OSLRenderServices::pointcloud_write(OSL::ShaderGlobals *sg,
                                         ustring filename, const OSL::Vec3 &pos,
                                         int nattribs, const ustring *names,
                                         const TypeDesc *types,
                                         const void **data)
{
    return false;
}

The functions merely return 0 or false and perform no action. Therefore, it appears that this functionality has not yet been implemented in the current version of Cycles.
The source can be found in the Blender GIT Cycles repository at https://git.blender.org/gitweb/gitweb.cgi/cycles.git/blob/HEAD:/src/kernel/osl/osl_services.cpp

If it's not sprinkled over too many files, could you make that Cycles code reference into a link?  I've often felt the need to go in and see what's happening, but I'm no good at searching the code efficiently, and I'm not building Blender for myself, (yet)

@RobinBetts Sure - I've updated the answer to include a link to the Blender repo for that file. From there you should be able to navigate the rest of the repository. If you have 'git' installed you can download a full clone of the repository with git clone git://git.blender.org/cycles.git.


text:
Problem with exporting FBX file with multiple materials and UV Maps
I'm trying to export FBX file to Substance Painter with multiple materials and multiple UVs merged together (merged under one name) I have vertex groups for them and materials.
When I'm trying to export selection only this Error pops up : https://i.sstatic.net/hYuXV.jpg

Heres link to blend file: https://mab.to/aXVEW8bPC
Thanks in advance for any anwsers

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

The problem was one of UV maps was screwing it up.
Redid it and it worked.

Could you elaborate a bit on what the issue was and what steps you took to solve it?


text:
Curve nodes have no line showing
Whenever I add a node that constructs a curve, e.g. RGB in cycles, or interpolation in Animation nodes. I can see and add points, but there is no line or curve connecting them, and I cannot find any options to change this.
I've probably broken something, but I can't find what!
Here's an example.

I have seen this issue before, I believe it is a bug in the UI theme, since it only seems to happen with certain bundled themes
After fumbling around with the settings I could not find any way to fix it, or what color to change, so this is more of a workaround than an actual fix.
For the time being just change the current theme in the user preferences, either permanently or temporarily while working with nodes.


text:
Shortcut key/mouse to set specific shape key to 0?
Is there a way to click a shape key and set it to zero? Like Ctrl + Click or something I think I did it by mistake one time, but can't figure out how.
I can't click and drag the number, since I have negative minimum range.
Now I need to click, type [0], and press Enter. It would be great to set it to 0 with one action, either keyboard and/or mouse.
It's the same action as "Reset to default value" which I can reach by right click and click in the menu. Maybe there is a way to bind that?
Thanks!

Hover the value slider with the mouse cursor and press Backspace to reset to zero

Great thanks! This should be an answer?:)


text:
How should I fix this topology issue?
I'm a beginner modeller, and I've been trying to create a revolver from a reference photo. I've been tweaking the topology here and there to make sure that I have no 3 or 5 vertex faces. However, when looking at the model with a subdivision surface modifier I get this weird pinched effect that you can see below
What am I doing wrong and how can I fix this? All answers are appreciated!

http://topologyguides.com

I am not sure what exactly you are hinting at but there is a pole where 6 edges come together which is not optimal.

if U look on Your 2nd picture there is a vertex related problem. As U wrote its important to have quad faces if possible but ALSO vertexes with 4 edges connected and U have 6 of them!
Try to repair the polyflow like on the picture below and everything will be fine ;).

If you are a begginer you should try less complex objects before try to create a revolver.
Look at YouTube for tutorials about booleans, crease, edge split, bevel and other hard surface tools.
To solve the problem you post try to use bevel modifier or add more loops (ctrl+R) near that junction.


text:
Create quads from vertices
I drew these vertices over a shape to copy it. I want to make faces out of these vertices. I am now manually clicking 4 vertices at a time and then fill them by pressing F.
Is there a faster way to do this?

use C to circle-select, then color a group of 4 at a time, so you don't have to click each vertex.

Firstly, as atomic's answer has suggested, placing vertices on a surface to copy it is perhaps not the most economical way  .. look up some sources on retopology in Blender.
However, since we're here,  one quicker way to do what you're doing is:

select all the vertices along a row, in order, from end to end.
hit J to create an edge loop along them
Bridge the edge loops you have. (CtrlE for the edge menu > 'Bridge Edge Loops')

Proportional Edit Saves Time

The image above shows using a sphere as a starting point for mesh.
If its educational for you to draw vertices one by one then so be it.  No one can argue with that. Or can they?
The model does not appear to be an organic model or face model subject to high levels of inspection.   Also I am assuming a bowl shape with a drape is above.  Below a plane with moderate vertex density created in a few seconds with edit mode Subdivide.
If you choose to take a different approach I suggest you use
Proportional Editing.  That term can be searched here at BSE.

The image above shows edit mode proportional edit. The arrow shows the proportional edit button with tool tip.
There are many completed introductory videos on the famous video website that rhymes with noonoob. Video may serve you better. This writing is not a tutorial. You may also want to include shape keys. One could could also used a hemisphere as a starting mesh rather than a plane.  No artistry here. Just a technical suggestion.  Of course there are plenty of other ways to  achieve a similar mesh model.
Once you have practiced a few times with proportional edit you may recreate your model in 8 minutes or less.
Tutorial Link
https://www.youtube.com/watch?v=MrNVVHdKd3E
I suggest seeing many of these videos and especially one on Shrink Wrap or Cloth Simulation.


text:
Change the default spawn size of objects
When I add a cube to my file I would like it to spawn as 20x20cm instead of the default 2x2m.
In the scene tab I can achieve this by changing the unit scale to 0.1 and length to centimeters. When I now add a new cube to the scene it spawns as 20x20cm (see photo).
So everything is perfect I think but if I now save this startup file and exit the file and open a new one and create a cube it spawns as 200cm.
Does anyone know how to fix this so with every new file I open the default spawn size is 20cm?

"it spawns as 20x20cm (see photo)."> You probably added a cube before and changed its size via the Last Operator menu. This setting is kept during the session, but not into the save.

Thank you for explaining this. Would there be any way to achieve what I describe in the question? I work in a very small scale so it is very annoying to have to scale down a cube every time I add one.


text:
What is this tool that's shown here?
In the gif below it shows the mesh being pulled upwards with a circle tool and all the faces/verts form a nice smooth curved surface. How do i do this?

Blender Proportional Edit.
You may search with this term.

.. and before proportional edit, in this gif, Grid Fill.

The shortcut key is: O.


text:
Problem with using multiple textures on a multi uv mapped object (cycles)
I'm trying the texture my character, but I'm having a lot of trouble mapping all of my textures together, I have been researching a lot but I couldnt find anything that could help me!
I have this character here, that I textured by creating uv maps for 5 body parts like head, body, arms and legs, and assigning materials to selected faces.
Like, If I made a UV map for the head, I made a material and assigned the material to the faces the UV map is created from.
And my character looks like that

Problem is, assigning the materials to the faces takes away my freedom to use the same faces again in case I want to texture parts of the body and parts of the legs on a different material (I want to paint around the legs and body to cover up the wierd thing going on if you pay enough attention to it)
So my idea is that instead of assigning materials to the faces, I could instead only assign the textures to their UV MAP.
My UV maps are set up like this:

Now after doing some research, people say its possible to achieve putting a bunch of textures doing it with this setup of nodes:

Unfortunately when I do that, that what happens in result:

Basically what you see here is both the head texture and the arms texture overlapping each other, and when I apply only one texture, lets say, the head, that what happens in exchange:

As the texture goes outside of the assigned UV map.
I tried using attribute instead, using texture coordinate, mapping node, using two materials for separate textures, seaming the head, nothing!
I hope you can help me with this! nothing I could find over the web!

Why create so many UV maps? Why not just one map with one texture for the character?

Because its a complex character, mapping the entire character makes texturing terrible because of resolution, I would have to apply a really really large image so that nothing would be pixelated, also my machine lacks the computing power to paint and draw over such huge canvases.
Making a bunch of UV Maps makes the task easier to work with.

I know I could work with smaller canvases but detail is important to me and I hope you understand my choice to work with different UV maps. I also don't want to split my object into different parts


text:
Questions about the grease pencil
First I was wondering if it was possible to convert the strokes into a curve or 3d mesh while keeping the visual fidelity of the 2d stroke. It would be really cool to make 3d objects that with this look
Also I painted this gamecube using a cube and painting on it so its actually drawn in 3d but you can see through it. Is there a way to keep the lines from being visible from all sides?
https://i.sstatic.net/kt3pC.png

This has interested me I must admit.
I have never really had a use for grease pencil until I saw this post and I took a little look-see in blender 2.79
It seems that if you draw a line with the grease pencil and then select it (under the grease pencil layers section in the right-hand side tab of 3D view), you can click on the convert to geometry dropdown under tools (where you select the grease pencil). The line will stay, but you can then select the line, which is now an object or curve.
And yes, you can hide the line. On the right-hand side tab in 3D view (As used above), there is a checkbox called X-Ray. Uncheck it.
Some Quick Circling to help:

EDIT:
As of Blender 2.8, the method of using grease pencil has changed quite a bit. Firstly, to use grease pencil you must create a grease pencil object in object mode. Change to draw mode and draw your line with the tools. You can change the mode to surface, 3d cursor or origin through the drop-down middle top screen. Then switch to edit mode, and under strokes, there is the option to convert to geometry.
Now in Blender 2.8, there is no more x-ray. It is now called depth ordering. It should be set to 3D space by default, which is like x-ray off, but you can set it to front mode for x-ray on.
Good luck with your project and I hope I helped,
BFB

Do you know where all those options are in 2.8 im looking around and can't see it.

Answer has been updated

Thanks, got it figured out.
It sadly didn't turn out the way I was imagining it. Hopefully one day blender can combine 2D and 3D more seamlessly


text:
Blender 2.8 API - grid_scale?
in v2.79 the following works:
bpy.context.space_data.grid_scale = 0.25
bpy.ops.view3d.snap_selected_to_grid()

but v2.8 doesn't know bpy.context.space_data.grid_scale
What is the equivalent command in v2.8?
many thanks,
 Smooth

In v2.81 I am changing it like this:
import bpy

for area in bpy.context.screen.areas:
    if area.type == 'VIEW_3D':
        area.spaces.active.overlay.grid_scale = 0.25


text:
How to make fog in Blender
I want to create a scene with some fog. I need the fog to get stronger the further form the camera it is. I already have volumetric lights in the scene, but thats not good enough.

The result should look like that (just... not so... strong?)
THANKS IN ADVANCE!!!!!!!!

So lets go on buddy...

...as You could see on the picture above, we have a few steps ahead.
1) Activate MIST in the Render Layers / Passes as could bee seen in the center of the image.
2) Choose the camera and activate MIST in the Camera / Display section. Now You are able to see the yellow line near the camera which shows start and end of the mist.
3) Now select the values for START and DEPTH in the World / Mist Pass. The line of the camera will follow accordingly.
4) Render your image.
5) Finally, open Compositor in Node Editor and build the nodes like me - the important changes are in the RED rectangle. The Node I added is the Add / Color / MIX.
6) Render your image AGAIN.
Hope it helps, buddy - sincerely, Jan

but the myst kills my volumetrics :(


text:
Animating a plane in the graph editor with local transform orientation
I want to animate a plane using the graph editor.
Its rotated on the Z aixs a little, but in the 3d view i can use the local transform orientation to make it go foward even if its rotated.

So I made some keyframes and the plane moved on its y axis as intended.
But when I go to the graph editor I see this

I see its global X and Y position changing but id like to edit the local Y axis...
How can i edit the local positon of an object??
Thanks in advance!!!!!!!!

You cannot manipulate keyframes in local transform, they are stored and displayed in global transform only.
But you can parent the plane to an Empty and orient the plane through it. The plane's global animation is then transformed into local space of the Empty. This might be useful for simple short movements, but non-usable for larger animations. With more complicated movement you could have multiple empties and a dynamic child-of constraint to influence the plane only on sections of the animation. How to setup that is covered here:
How can I build a versatile camera rig which can both orbit around its focus and pan?


text:
disconnect vertices
these vertices became connected so that when the mouth moves these stretch, giving it the fang effect in the below pic. I already tried editing the weights for the bones but that doesn't seem to be the issue. how do i disconnect these vertices at the point they are connected at and maintain the architecture of the lips?

answered my own question, i hit V and they disconnected


text:
why my plate turn to normal map in object mode?

so as i was following a tutorial on blender guru (youtube channel) when i added the normal map to my wood texture , this happen !!!
when i render every thing is okay and it's beautiful but it's annoying me so much when editing and modeling i see the normal map , why is that's happening !?
i tried to replace the images again or tweak the options , but none work , can you help me please !?

As you enabled Texture shading mode, Blender shows you currently selected texture in the Node editor. Enable Solid shading mode and it will show solid grey colors. This affects only viewport

It's happening like that because you have selected the normal map image node in the Node Editor. If you click the object texture node in the node editor, that active node will be displayed in the viewport.
EDIT:

But even when I close the node editor it's still there , and when I click the texture image it appears  in view port so how to deactivate it ?

You should click on the node which contains your image texture.

I did that but instead of my normal map is in the viewport , my wood image texture is in the viewport , I only want to see my plate white and gray object like the cup and the donnate !!

I've updated my answer. If it solves your problem, mark the answer as Accepted.

That's what I did in my gif at last :)


text:
Rendering a specific set of frames in one job
I want to render every 2nd(or even) frame and every 5th frame that end in '5' is it possible to do that in one render job.....not very good at scripting but will take any advice I can get

can unchecking overwrite help, does blender check the directory before or after rendering

Can you please elaborate if you want to render either every second frame or every fifth frame – in which case Jan Matys' answer should help – or whether you're looking for a way to render frames 0, 2, 4, 5, 6, 8, etc. at one go without having to set the ranges and the Frame Step in between?

to clarify I want to render in the first instance every even frame 2,4,6,8.... then I want to render every 5th frame that's ends in 5 so 5,15, 25.... and so forth.....can that be done in a single render job, I think I got the answer to the ends with 5 question though

Related: Is it possible to make a sequence of renders and give the user the option to cancel the process through the UI at any given time? and Render from -100 frame

It's possible loop over a list of the desired frames, set the correct frame and render it within a Python script.
I didn't manage to automatically enumerate frames according to the Blender Output Panel documentation, so I set the filename manually for each frame and restore the original value afterwards.
The following script should render all even frames as well as all frames that end in a five.
import bpy

scene = bpy.context.scene
tmp_filename = scene.render.filepath

all_frames = range(scene.frame_start, scene.frame_end + 1)

for f in [f for f in all_frames if f%2 == 0 or f%10 == 5]:
    scene.frame_set(f)
    scene.render.filepath = '//frame_{:04d}'.format(f)  # frame_0000 etc.
    bpy.ops.render.render(write_still=True)

scene.render.filepath = tmp_filename

You can select the desired frames by list comprehension like above or use Python's filter function.
The “render with script” approach will make Blender unresponsive during the job, but I think the operating system won't shut the process down unless you tell it to do so, i.e. click on the “Blender is not responding” dialog box.

ok thank u very much, this is also helpful though my need to multitask might make the script approach prohibitive, still good to have this option...much appreciated....but I feel manually rendering both sets with the suggestion of Jan for getting the "end with 5 frames" will be best..........again thanks much for the python approach will be useful for times I can fully dedicate the PC to rendering

ok I misunderstood something that was said the script works well in the background thanks much

on the image below the green rectangle shows the settings of Your interest...

FrameStep 2(5) will render every 2nd(5th) image and by setting the StartFrame You will choose the desired stepping - if U want every frame ending with "5" then choose StartFrame=5  and FrameStep=10 so frames 5,15,25,35 etc will be rendered.
Also if U want to render only every 5th frame ending with "5" then choose the starting frame and FrameStep=50. So when You choose starting at 5, then frames 15,25,35 and 45 will be skipped and next one rendered will be 55. Hope this helps buddy.
Sincerely, Jan

this is helpful thanks at least I don't have to waste render time on duplicate renders of 10,20,30 and such, what I am try to do is render a sequence like such "2,4,5,6,8,10,12,14,15,16....." and wanted to know if it could be done in one shot, but at least my duplication problem is solved even if I have to do two render jobs thanks

Ouch, I didnt understand it right as it looks. Still happy its helpful somehow ;).


text:
Using HDR Image makes real world scale architectual model float
I completed a real world scale architectural (units = feet) that was exported to FBX and then imported into blender for rendering purposes. The model looked great and I needed to finally add an HDR image prior to rendering. My issue is the image looks HUGE compared to my 3D model which checking scale by creating a plane object representing the extents of my model and this looks good to the model but to the HDR image 2 things are easily noticed. 1. Trees and buildings in the image even off in the distance are bigger than my model. 2. my model floats above the ground of the image so even positioning the camera you can tell the model is floating and just doesn't look right.
I tried to scale and reposition but this just hoses the appearance of the image.
Is there anyway to correct this and make my model appear on the ground of the image. I got the image from HDR Haven recommended in tutorials I have watched and with architectural models appears it is sitting on the image ground without any adjustment of the image or the model that is sitting at 0,0,0 location.
Other thing I noticed when zooming and panning is model is getting clipped which doesn't happen when image is removed.
TIA!
Cheers!
Rick...

Note that HDR is not the same as HDRi map. There are several problems outlined in the question, objects in the image appear too close and aligning 3d object to the background image while hiding the seam. Clipping of the model while zooming and panning is due to viewport camera clipping which is another question

The HDRI is rendered at infinite distance. When trees appear too large then this is because the panorama was taken at a close distance to the trees. What you could do is either set the background to transparent and composite with one of the backplates provided with the HDRI (this allows some cheating with the scaling during compositing) or chose an HDRI with realistic dimension that depicts a place with enough free space to actually build a house. For example this one.

Thanks for the reply. It's funny that is the one I am actually using and my large model looks dwarfed by the trees surrounding it. I turn it level with a near by "bush" and the bush is wider and taller than my house model. My model measures ~55'x44'x34' tall to roof peek. Again I know scale is correct because I draw a plane representing the property boundaries and model is very proportional in size. I can maybe deal with the trees but the floating in the air detracts from the realism!

@Rick The floating in the air is because HDRIs are just images intended to light the scene. That is why you need backplates for compositing and a shadow catcher for the floor so you can combine the two and make it look as if the house is standing on the ground. You can find tutorials about this topic on YouTube.


text:
Area of bottom polygons using obj.to_mesh post modifier but without applying it
First of all, I'm quite new to python so please bear with me if I'm asking dumb questions. I've seen similar questions answered but still can't get where I want.
Say we have an active object in the scene, which is a polyline, which is extruded in z direction and altered with solidify modifier to give it some thickness (like a wall for example). I'm trying to get the summary area of all the bottom faces of the object as visible in the scene without actually applying the modifier. From what I've read it should be possible via obj.to_mesh, but while I can get the area of all faces with sum(f.calc_area(), I'm missing something (possibly obvious) when it comes to getting just the sum of bottom ones.
Here is my attempt:
import bpy
import bmesh

context = bpy.context
scene = context.scene
obj = bpy.context.active_object

# --- get a mesh from the object ---
apply_modifiers = True
settings = 'PREVIEW'
mesh = obj.to_mesh(scene, apply_modifiers, settings)

bm = bmesh.new()
bm.from_mesh(mesh)

for face in bm.faces:

    face_location = face.calc_center_median()

    z = face_location[2]

    bpy.ops.object.mode_set(mode = 'EDIT')

    if z ==0:

        face.select==True

    bpy.ops.object.mode_set(mode = 'OBJECT')

    area = sum(f.calc_area() for f in bm.faces if f.select)

    print(area)

bm.free()

bpy.data.meshes.remove(mesh)

What I get is value "0" printed out 16 times (for each face in the object I guess as it has 16 faces).
I realise it's probably something trivial I'm missing but maybe someone could please explain it to me?

I guess, you are getting zero because the face.select is not assigned value True, but is being checked for condition True (face.select == True). Also if you are interested only in bottom faces, i.e faces with all vertices having z coordinate value zero, then checking for median z coordinate may not work in all cases. There could be faces with median z at zero but vertices lying on either side of x-y plane.
I can think of the following alternative (I am open to critique and corrections as I am also comparatively new to blender :)
import bpy
import bmesh

bm = bmesh.new()
#bm = bmesh.from_edit_mesh(bpy.context.active_object.data) (without modifier)
bm.from_object(bpy.context.active_object, bpy.context.scene)

#Floats are not always absolute zero, so comparing with a tolerance
total_area = sum(f.calc_area() for f in bm.faces if len([v for v in f.verts if v.co[2] < 0.0001 and v.co[2] > -0.0001]) == len(f.verts))
print('total area:', total_area)

bm.free()

Upvoted. Suggestion: if all(abs(v.co.z) < 0.0001 for v in f.verts)

Use the face normal as test for bottom face.
Note: Between starting this answer, getting sidetracked, and posting another similar answer has been posted using bmesh from object.
CHecking that a local coordinate z is at some level is limiting.
If the mesh is as mentioned simply a wall  can get the bottom faces by testing  if the face normal points down (or close enough (within 4 degrees).
import bpy
import bmesh
from mathutils import Vector
from math import radians

context = bpy.context
scene = context.scene
ob = context.object

bm = bmesh.new()
bm.from_object(ob, scene)
down = Vector((0, 0, -1))
area = sum(f.calc_area() for f in bm.faces
        if f.normal.angle(down) < radians(4))

print(area)
bm.free()

I assume this behaviour is caused by an inconsistent selection state when you only select the face but not the respective vertices and edges. As a result, something like print([f.select for f in bm.faces]) returns a list of False values.
Using the function BMFace.select_set instead of setting BMFace.select will “update the selection state of assosiated geometry”. BMFace.select then will also return True for these faces.
    # snip
    if z == 0:
        face.select_set(True)
    # snip

Apart from that, I guess you should unindent the area calculation so it's outside of the for face in bm.faces loop. And switching between object and edit mode is not necessary here:
import bpy
import bmesh

context = bpy.context
scene = context.scene
obj = bpy.context.active_object

# --- get a mesh from the object ---
apply_modifiers = True
settings = 'PREVIEW'
mesh = obj.to_mesh(scene, apply_modifiers, settings)

bm = bmesh.new()
bm.from_mesh(mesh)

for face in bm.faces:
    face_location = face.calc_center_median()
    z = face_location[2]

    if z == 0:
        face.select_set(True)

area = sum(f.calc_area() for f in bm.faces if f.select)
print(area)

bm.free()
bpy.data.meshes.remove(mesh)


text:
Navigation locked out during operations?
I don't seem to be able to navigate around while trying to do some operations. E.g. when using the E command, I can't mousewheel to zoom. Is there some way of changing that? It's incredibly annoying.
I've been through the key mapping and there doesn't seem to be anything clashing that needs mousewheel as far as I can tell.

I don't think you can, select what you want to extrude then dezoom as needed before hitting E .


text:
Precisely sizing an object?
I'm trying to port some models for a mapping software (Hammer), and 1 meter in Blender is equal to 1 unit in Hammer (Otherwise it's extremely hard to adjust door frames, etc.). Is there a way to resize objects in a precise way so it's approximately x meters on each side and somehow seeing their current size? Thanks in advance!

I also used hammer and blender. And had the same problems first. when you click n to oben the sidebar there is a tab where you can change the size.

Easy peasy.
Just press n while in viewport and a sidebar will open.
Click on item tab in it.
There will be written the scale,rotation and location of the selected object along with dimentions.
By default,the dimentions will show the x,y and z dimentions of the selected object in terms of meter.
Scale the object will the dimentions are of x meters in z


text:
"Object cube is not on s scene layer" error message when baking
I'm doing this tutorial: Blender smoke animation
and when I go to bake before doing lighting and stuff it gives me an error that says "Object cube is not on a scene layer". I did parent some UV spheres to the cube and that probably has something to do with it. Here is a screen shot of my layers and outline editor. I hope I'm showing what the potential issue is in the screen shot. Is there a way I can bake these objects with still having a parent object?
I've tried looking on google and forums, but can't seem to find the answer. Thanks!

Try exiting Local view (Numpad /) and see what scene layer is that cube on

First of, as you can see in the top left corner of your viewport, it says "Local", which means you're in an isolated mode. You probably enabled it accidentally by pressing numpad / or it was on purpose but you didn't though about getting out of it when not necessary anymore.
Anyway, start by pressing numpad / again, that may already be the solution. If not enough, you may now see your 3D view layers :

And most importantly: which one you're in, which one you have the active selection in and which ones contain objects. From that, you will quickly determine if you need to move some object around. To move some objects to another layer, simply select the objects and press M.


text:
Understanding Proper Scaling for 3d Export dimensions
Hey im using the latest version of blender as of march 2018
I made a custom wall plate for a relative to 3d print. I made sure to set units to "Imperial" and "Inches" as i needed a piece that is 1.5" square. here is a picture of my current settings

Now here is my 3d view port

As you can see i have my scale set to 1.5" but the problem happened when i shared the file (a .STL) with my relative and they printed it it came out as 1mm wallplate, so if their is anyway to tell blender or the exported stl to be in inches that would be great! thanks guys

Did you apply the scale and rotation before exporting?

When you exported to .STL, did you check the box next to "Scene Unit"? (Find this on the lower left hand side when you attempt the export).

When a model is 3D printed, it has to be converted to GCode using some other software. Was this software configured correctly to handle inches?
My advice: save yourself the hassle and just work in millimeters and convert from inches.


text:
correct a deformed checker texture?
So, I'm trying to recreate this setup:
But, when I apply the checker texture, I get this:

The texture if really deformed.
How can I correct this?
Thanks

Possible duplicate of Is there a way to uniformly add texture to a complex mesh without using UV mapping?

@DuarteFarrajotaRamos that doesn't really help me..

object coordinates. simple as that.


text:
All UV's go black after bake AO's
when I ambient ocllusion bake my UV image everything goes black. I'm a noob at blender so don't know what to do thanks.

First things first - check the directions of your normals as it looks like they may be inverted.

Reset esterior and interior normals and that did the trick cheers


text:
Trying to make character for UE4 - Need guidance
I have made a knight character, and I want to give him a skeleton to throw him in UE4, though I have a few things making that less than simple. Mostly, I want to be as accurate to an existing skeleton as possible (the default UE4 skeleton) but importing that into Blender has some major issues.
So I've started making my own skeleton as close to the UE4 one as I could, I've got UE4 on my other screen. I don't know about a couple of things. First, there's "twist bones" on the upper arm and upper leg, as well as a "root". I don't know how those should look, or if I even need the twist bones (I know I need the root).
I need to know:
What do I do for the root?
How can I mirror what I've done  to the other side?
Can I do without the twist bones?
Strangely I can't find much if anything for making armatures specifically for UE4, or without using Rigify, so maybe I'm just doing it wrong. I could use some guidance.
Here's the hierarchy I've got so far, it perfectly matches UE4.

And just for fun, here's what I'm trying to get animated.

Help and advice greatly welcome and appreciated.

too broad, and also multiple questions, so not well suited for this site... try to break it down to smaller, focused questions, or try a different website, like blenderartists.org

Found an Answer that actually works just right:
Export The UE4 mannequin.
Remove anything you dont want to use including MESH, IK bones, Twist bones.
Turn on snap and set it to verticies.
Then grab ends of bones that are in the wrong positions. Move them using the axis arrows onto the correct bones.
Save it for next time as it's own file
Next bring in your mesh. Scale appropriately for unreal
In object mode, select the skeleton. Press shift+C so that you scale from origin. Scale it to your mesh.
Turn on the mirror x and move bones as needed.
In object mode, select the mesh and skeleton and press CTRL+P
set them by weight when asked.
Go into weight mode and fix all the crazy stuff it will do for whatever reason.
Export to unreal.
In unreal make sure you dont choose a skeletal mesh during import.
Open the UE4 skeleton. Get to the rigging options and set it to the humanoid rig
On your skeleton do the same thing.
Go find whatever animation you want, right click on it.
Select Animation re target asset, and in the process just choose your skeleton.
Skip all the rigging stuff in blender.
Where i was having problems was the weighting. I didnt realize when I would just parent the unreal skeleton to what was basically an unreal model with some clothes on it that i was choosing some CRAZY weights.
I was able to fix them fast by setting the weight tool to subtract, full power zero fall off and going through each bone and drawing over the whole model that WASNT obviously supposed to be connected.
I did over do it a bit, but the system is kind enough once it was all set up i could have UE open and blender, modify the weight and export. UE will process the changes and instantly show them in the animation window I had open.
(I had a beltbuckle attached to right pinky, left pinky attached to right ball, all sorts of pieces of the shirt attached to random parts of arms, the spine 1 was the whole torso and the rest of the spines connected to random parts of shit/buttons on shirt etc.
Now i am on to fixing the duster so it doesnt go through the characters legs and it's acting all funny around shoulders when character lifts arms...
I dont do anything to the Root. And the pelvis is in the right position/size.
just get it connected to the spine.

When you do export the FBX you need to go to the settings on left, click in the armature section and untick add leaf bones. Otherwise it adds extra ones to the fingers and such.
Inside unreal the skeleton will have 2 roots. There is a file somewhere supposedly that will fix the export of that. But the links I had to it were either dead or only worked on much older Blender versions.
I found you can click on the highest one in the skeleton mesh asset and right lick, disable from LOD 0 and below. It still shows on the list but isnt connected to anything any more and isnt used.
I put my empty rig FBX here: https://drive.google.com/open?id=1lq1SBXGq9485KXKbYENgI-sEMUeUCUGN

Thank you so much for the help, I had my spine "backwards" and some things were off proportionally, having your rig for reference helped. I just threw in a mesh for retarget testing, and although the skeleton looks kinda weird in UE4, it works flawlessly on this at least. I'm so happy to have this now, hopefully I can work up the motivation to go back and do the other character I made. Thanks again.

I'm currently Working on this myself.
If you find a good solution that works well I would appreciate you posting it for us.
As for your questions I can give you what I have found/know so far.
Using this: https://forums.unrealengine.com/development-discussion/animation/100864-tutorial-how-to-make-ue4-mannequin-in-blender
explains how to fix that skeleton. Basically for re-targeting and such you dont need the twist or IK bones. Delete them.
Then you turn on the snap tool (magnet down at the bottom, and button next to it set it to vertices)
Then Press "t" if your tools arent open. Select "Options" and there is a Mirror on x axis option.
Then you'll notice every bone except the finger tips, and ball of foot has one side in the appropriate spot already. You will select the part that is in the WRONG spot (like the top of spine_01) and use the x,y,z arrows to move it. Just just mouse over Spine_02 base and it will highlight. When you have done it for all 3 axis it will be exactly connected to Spine_02
Just watch the clavicles, there is a spine piece there that is REALLY easy to get swapped with one of them because their rotations put them in funny spots....
now from there i have tried:
a. Riggifying, and using the new rig. This seems to always create a poorly matched rig that doesnt actually have any connections to 1/2 the mesh. And wont move in the UE engine
b. just selecting the mesh and skeleton and setting a parent, and selecting by weight when asked.
This gives you none of the mesh moveable in blender But when exported into the engine will be able to select everything correctly when you hit the auto generate rig. Also under the skeleton mesh you can select a bone and move it all just how you would want.
Biggest issue here seems to be the physics asset. I end up with an EXPLOSION of blue circles. That dont scale right, wont let me edit them appropriately and of course would prevent anything from even considering moving right.
This video:
https://youtu.be/jiXwDxCZtOc
covers the blender rig into unreal. But I think some things have changed sense then.
1. my Blender rig doesnt look the same
2. When i hit generate rig it doesnt look the same
3. the script fails to run to remove extra bones
And so on.
Basically I get the same problems in different ways from this tutorial.

I'll get to trying the "fixing skeleton" route again... it's seeming like the best option despite being quite complicated. I did find the video you linked, though I suffered the same issue of getting a different result from the video. The skeleton has additional bones from the video and the auto rig failed for me too, couldn't fix it. I'm just amazed how much issue I'm having and how little help there is, considering how important all of this is for video games. I would expect more resources or help to be out there.

https://youtu.be/i_imzw2PJcg You will see below that I gave an answer. This video is basically A time lapse version of what I did. I show you deleting the UE mesh, removing some of the bones, then how I lined them up. Then I loaded the file I was using to attempt the attachments/rigging, that's exactly how I ended up putting them together and then just modifying the weight. If you need me to show How I got the skeletons rigged or anything let me know...probably on that video comment and i'll make another for you. Hope I was helpful

For anyone following this, don't forget to delete the twist bones! He connects them in the video, which results in 4 bones per leg. I was about to ask how to get a more accurate skeleton, but then I remembered he said to delete those. Now my skeleton looks pretty good.

Would you mind showing me how you did the root bone as well as the pelvis? I just want to make sure my proportions are correct enough, and I don't know how to do the root at all.

Edited answer with some info about it, and a photo. Also gave you a link to my "emptyrig.fbx"


text:
How to be able to Freely Moving Appended Collection around in Blender 2.8
I've created a blind model in form of a Collection in Blender 2.8
Following a tutorial video on youtube.
It's "animated/rigged". Not sure about the term.
In another model/scene/file which is a room scene, I've appended the blind model/Collection. When I tried move the Collection/model, it won't move altogether.

These might help, were done in Vers 2.77a  but should work in 2.8 - https://blender.stackexchange.com/questions/99821/how-can-i-shift-or-move-an-entire-animation-to-a-different-location/99911#99911 - and... - https://blender.stackexchange.com/questions/106609/appended-group-opening-in-original-location/107621#107621

Edgel3D, thank you very much. the second link for your second explanation seems to be the one that might suit my scene. there's no shapekeys nor graph editor.


text:
How to keep Workspaces in Blender 2.80 when opening previous version of blender's files?

i'd like to use the bmps file from previous version of blender, in blender 2.80 as latest version.
but, when it's opened, blender 2.80 lost every interface layout it usually has. especially those new workspaces as tabs on top of the screen.
is there a way to keep blender 2.80's interface layout -especially the workspaces- whenever we open previous version of blender files?

Start new project using General preset

File -> Open .., locate your .blend, but before you open the file, uncheck the Load UI option

Your old .blend should be opened using the General preset UI, so the workspace should be there

thank you very much, Jan.
didn't know nor paid attention to those two options below the open blender file's dialogue.

@irwan I am happy I could help you! :)


text:
Rotating, Moving or Placing Procedural Texture on an Object
I have modelled an object with procedural material.
I wish that the texture could either be rotated, moved or placed anywhere in the x-y-z axis or, the surface of it.
This is how far I've gone with the model.

I've made some nodes for the texture. And, have 2 Musgrave texture nodes for the object.
I would like to fill the empty or plain surface with the same texture. By either rotating it along the z axis, move it along x or y axis. Or, place it anywhere on the surface along either axis.
What kind of nodes should I do to be able to have control over the texture placement on the surface?
Thanks in advance.

Rather than use the Generated output from Texture Coordinates add an Empty to the scene and select it as the Object output. I used this to great affect here https://www.youtube.com/watch?v=cPvYAHc9vCE

@rob. that looks too complicated for me as newb.
perhaps there's an easier or simpler way in nodes to do it?

Here I have Sphere with two textures, one red and one blue.

The Blue texture coordinates are defined by the the Sphere default generated vector input. The Red coordinates are defined by Object. The object is an Empty.

Now when I rotate the Empty you can see the Red texture following the rotation exactly.

I hope that helps.

thanks for the explanation, rob. now i can see what you meant by using empty.


text:
Wire edges and Material don't move when I move the object
I download the last version of Blender and when I transform the cube wire edges and material don't move !
But in Edit Mode it seems there are no problem !
I've make a video capture , you can see here : https://youtu.be/enj35YWyIAI
Do you know this strange problem and is there a solution ?
Thanks.

Does your system meet the requirements for Blender? https://www.blender.org/download/requirements/

Yes but I have only 4Gb of RAM, opengl 4.1, windows 10 and 1Gb for graphic card

Now it seems there are no problem ...

It seems that there are a similary problem with  @Pashby [Elijah Pashby ] (https://blender.stackexchange.com/users/93310/elijah-pashby)    [Selected mesh will not move in Object mode ] (https://blender.stackexchange.com/questions/173982/selected-mesh-will-not-move-in-object-mode)


text:
How can I reference the f-curves of a bone in Python?
I'm trying to automate calibration of mocap data, matching it to rig bone locations.
As part of this project, I need to use Python to scan bone animation f-curves for minimum and maximum values. I know I can reference object f-curves with e.g.:
mt_curve = mt_obj.animation_data.action.fcurves[0]

But I can't find how to reference the f-curves of individual bones.
I found this method to get the index of a bone:
 rig_obj.pose.bones.find("my_bone")

In the console, this code returned 221, so I tried:
bone_curve = rig_obj.animation_data.action.fcurves[221]

... but this gave the error:
IndexError: bpy_prop_collection[index]: index 221 out of range, size 21

So I guess that 'animation_data.action.fcurves' must only refer to the rig object itself - not the bones.
I also tried:
bpy.data.objects["my_rig"].pose.bones["my_bone"].fcurves[1]

... and similar, but get the error:
'PoseBone' object has no attribute 'fcurves'

So can anyone tell me a way to reference a bone's f-curves in the same way as I can reference an object's f-curves?
As always, any hints, ideas or vague suggestions are more than welcome, as is, of course, the actual answer ;-)

An FCurve that animates eg. a bone's Y Location, ie. that targets arma_ob.pose.bones["Bone Name"].location[1], will have
>>> fcurve.data_path
'pose.bones["Bone Name"].location'
>>> fcurve.array_index
1

You can find all FCurve's that affect a bone named bone_name with
path = f'pose.bones["{bpy.utils.escape_identifier(bone_name)}"]'
fcurves = armature.animation_data.action.fcurves
bone_fcurves = [fcu for fcu in fcurves if fcu.data_path.startswith(path)]

Thanks for the answer @scurest. There is a missing ) in the line path = f'pose.bones["{bpy.utils.escape_identifier(bone_name}"]'

BTW, the second section is exactly what I needed so thanks again. I can use that code to reference the various curves; e.g. bone_fucurves[1] for the X location f-curve.

I've corrected that line now.

Thanks. Note that you can't depend on any particular order, so if you want the X Location curve, you have to search for the FCurve with the right data_path and array_index.

Good to know. I was assuming that the index order followed the appearance of the transforms in the GUI - LOCX = 0, LOCY = 1 etc.


text:
How can I use Python to automate setting bones to be driven by empties?
I have about 30 control bones of a rig that I want to animate using mocap tracker empties.
I will be doing this many times for many models and each time, I need to set and calibrate the drivers for the bones. So I would like to automate the process as much as possible.
The empties are all parented to a reference empty and I need to use the local space coordinates in the drivers.
Specifically, I'd like to:

Set coordinates of the location of each bone to be driven by local space coordinates of its related empty.
For a specified frame, find the coordinates of the empty and set its keyed value to 0 on the f-curve

One thing that might help in this process is that the empties are mostly named the same as the bones with an added prefix; e.g. the bone "c_nose_02.x" is driven by the empty "mt.c_nose_02.x".
To make this clearer, this is what I am currently doing manually:

Add drivers to the relevant coordinates of the bone.

In the Drivers Editor, set the var object to the relevant empty,
Choose the matching coordinate and select Local Space
Note the value at the default frame

5. On the f-curve, set a keyframe of that value to 0.

I'm reasonably fluent in Python, but haven't used it much to automate Blender yet.
As always, any advice or pointers would be most appreciated.

Rather than changing the FCurve's key frame, I think it's smarter to change the python expression, like var-0.033.

Thanks @tetii - I didn't mention it in the question but the reason f-curves are necessary is because the movement is not linear. So yes, a simple formula in the expression would zero the bone in default position, but after that I will add max an min coordinates. And I've found that using a combination of formula and f-curve keys makes the process more complicated.

Well I've worked it out, after a lot of research, trial and error...
pb = obj.pose.bones['c_nose_02.x'] #get pose_bone
pb.driver_remove('location') #remove old drivers

#Add drivers to the relevant coordinates of the bone.
driver_locx = pb.driver_add('location', 0)
driver_locz = pb.driver_add('location', 2)

#For some reason, that causes f-curve modifiers to be inserted by default, which need to be removed
modx = driver_locx.modifiers[0]
driver_locx.modifiers.remove(modx)
modz = driver_locz.modifiers[0]
driver_locz.modifiers.remove(modz)

#Set the variables to the relevant empties, choose the matching coordinate and select Local Space
varx = driver_locx.driver.variables.new()
varx.name = "varx"
varx.type = "TRANSFORMS"
tx = varx.targets[0]
tx.id = bpy.data.objects.get('mt.c_nose_02.x')
tx.transform_type = 'LOC_X'
tx.transform_space = 'LOCAL_SPACE'
driver_locx.driver.expression = "varx"

varz = driver_locz.driver.variables.new()
varz.name = "varz"
varz.type = "TRANSFORMS"
tz = varz.targets[0]
tz.id = bpy.data.objects.get('mt.c_nose_02.x')
tz.transform_type = 'LOC_Z'
tz.transform_space = 'LOCAL_SPACE'
driver_locz.driver.expression = "varz"

#Get the value of the default frame (actually had to get it from the empty)
#On the f-curve, set a keyframe of that value to 0.
offset_x = tx.id.location.x
driver_locx.keyframe_points.insert(offset_x, 0.0, keyframe_type='KEYFRAME' )

offset_z = tz.id.location.z
driver_locz.keyframe_points.insert(offset_z, 0.0, keyframe_type='KEYFRAME' )

After testing this code successfully, I set up an array of all bones that I wanted to control with mocap and used that to make a for loop.


text:
removing/applying modifiers in a script seems to work wrong when inside addon
I've asked this question but couldn't get any answer, so I decided I'll post it again, trying to be more specific.
Let’s assume I have an active object in the scene. The object itself is just a couple of vertical faces but it has a solidify modifier, a hook modifier attached to some of its vertices and a boolean modifier (subtracting part of it with another object). It looks like this:
The script is supposed to:
- Make a copy of selected object with its modifiers
- In that copy apply some modifiers and remove others
- Remove most of the object leaving only some edges (namely the lower ones) and extrude them
- Name the modified copy
The script looks like this:
import bpy
import bmesh
from mathutils import Vector

context = bpy.context
ob = context.object

src_verts =[]
bottom_verts =[]
ext_edges =[]

for obj in [o for o in bpy.context.scene.objects if o.type == 'MESH' and o.name == ob.name + ' kondygnacje_podziemne']:
    bpy.data.objects.remove(obj, do_unlink=True)

count_ob = float(len(ob.data.vertices))
center_ob = (1.0 / count_ob) * sum([v.co for v in ob.data.vertices], Vector())

#getting lower vertices of object:
for v in [v for v in ob.data.vertices if v.co[2] < center_ob[2]]:

    src_verts.append(v.index)

#make a copy of object to alter it after applying and removing certain modifiers:
podz = ob.copy()
podz.data = ob.data.copy()
bpy.context.scene.collection.objects.link(podz)
ob.select_set(False)

context.view_layer.objects.active = podz

#before creating bmesh, apply existing hook and solidify modifiers and remove boolean modifiers:
for mod in [m for m in podz.modifiers if m.type == 'HOOK']:
    #print(podz.name)
    bpy.ops.object.modifier_apply( modifier = mod.name )
for mod in [m for m in podz.modifiers if m.type == 'BOOLEAN']:
    bpy.ops.object.modifier_remove( modifier = mod.name )
for mod in [m for m in podz.modifiers if m.type == 'SOLIDIFY']:
    bpy.ops.object.modifier_apply( modifier = mod.name )
#create bmesh from 'podz' after removing/applying modifiers:
bm_podz = bmesh.new()
dg = context.evaluated_depsgraph_get()

bm_podz.from_object(podz, dg)

#make a list of verts to delete
wyk=[]
for v in [v for v in bm_podz.verts if v.index not in src_verts]:

    wyk.append(v)

bmesh.ops.delete(bm_podz, geom = wyk, context = 'VERTS')

# get the remaining edges to extrude:
bm_podz.edges.ensure_lookup_table()
for e in bm_podz.edges:
    ext_edges.append(e)

#extrude edges:

added_e = bmesh.ops.extrude_edge_only(bm_podz, edges = ext_edges)

print(len([e for e in bm_podz.edges if isinstance(e, bmesh.types.BMEdge)]))
extruded = [v for v in added_e['geom'] if isinstance(v, bmesh.types.BMVert)]
# move extruded vertices to desired position:
bmesh.ops.translate(bm_podz, verts=extruded, vec=(0.0, 0.0,-3.0))

#update mesh:
bm_podz.to_mesh(podz.data)

name = ob.name + 'spam'
podz.name = name

bm_podz.free()

del src_verts
del ext_edges
del bottom_verts
del wyk

when it is run from blender text editor it works as intended, creating this (a "belt" along lower edges of object):    however when I use exactly the same script as a function in addon (to simplify here I paste a simple "addon" with just that one function triggered with boolean switch in object properties panel):
import bpy
import bmesh
from mathutils import Vector

def cz_podz(self, context):
    context = bpy.context
    ob = context.object

    src_verts =[]
    bottom_verts =[]
    ext_edges =[]

    for obj in [o for o in bpy.context.scene.objects if o.type == 'MESH' and o.name == ob.name + ' kondygnacje_podziemne']:
        bpy.data.objects.remove(obj, do_unlink=True)

    count_ob = float(len(ob.data.vertices))
    center_ob = (1.0 / count_ob) * sum([v.co for v in ob.data.vertices], Vector())

    #getting lower vertices of object:
    for v in [v for v in ob.data.vertices if v.co[2] < center_ob[2]]:

        src_verts.append(v.index)

    #make a copy of object to alter it after applying and removing certain modifiers:
    podz = ob.copy()
    podz.data = ob.data.copy()
    bpy.context.scene.collection.objects.link(podz)
    ob.select_set(False)

    context.view_layer.objects.active = podz

    #before creating bmesh, apply existing hook and solidify modifiers and remove boolean   modifiers:
    for mod in [m for m in podz.modifiers if m.type == 'HOOK']:
        #print(podz.name)
        bpy.ops.object.modifier_apply( modifier = mod.name )
    for mod in [m for m in podz.modifiers if m.type == 'BOOLEAN']:
        bpy.ops.object.modifier_remove( modifier = mod.name )
    for mod in [m for m in podz.modifiers if m.type == 'SOLIDIFY']:
        bpy.ops.object.modifier_apply( modifier = mod.name )
    #create bmesh from 'podz' after removing/applying modifiers:
    bm_podz = bmesh.new()
    dg = context.evaluated_depsgraph_get()

    bm_podz.from_object(podz, dg)

    #make a list of verts to delete
    wyk=[]
    for v in [v for v in bm_podz.verts if v.index not in src_verts]:

        wyk.append(v)

    bmesh.ops.delete(bm_podz, geom = wyk, context = 'VERTS')

    # get the remaining edges to extrude:
    bm_podz.edges.ensure_lookup_table()
    for e in bm_podz.edges:
        ext_edges.append(e)

    #extrude edges:

    added_e = bmesh.ops.extrude_edge_only(bm_podz, edges = ext_edges)

    print(len([e for e in bm_podz.edges if isinstance(e, bmesh.types.BMEdge)]))
    extruded = [v for v in added_e['geom'] if isinstance(v, bmesh.types.BMVert)]
    # move extruded vertices to desired position:
    bmesh.ops.translate(bm_podz, verts=extruded, vec=(0.0, 0.0,-3.0))

    #update mesh:
    bm_podz.to_mesh(podz.data)

    name = ob.name + 'spam'
    podz.name = name

    bm_podz.free()

    del src_verts
    del ext_edges
    del bottom_verts
    del wyk

bpy.types.Object.myBool4 = bpy.props.BoolProperty(name="boolean_switch", default=False, update=cz_podz)

class ParametryZab_Panel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "Spam"
    bl_idname = "OBJECT_PT_"
    bl_space_type = 'PROPERTIES'
    bl_region_type = 'WINDOW'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout
        scene = context.scene
        obj = context.object

        row = layout.row()
        row.prop(obj, "myBool4", toggle = True)

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

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

if __name__ == "__main__":
    register()

the result is entirely different:
It seems like when the script is run from the "addon", it applies/removes modifiers of the original object, not its copy, while when running standalone from text editor it works ok.    It's possibly something embarrassingly obvious but I have no idea why that happens.
I'd appreciate if someone could explain that.
Thank You.

maybe remove the line context=bpy.context and use the given context. Whats in that context can be controlled somehow, you would need to google though

hmmm, thank you for taking the time to answer. I'll look into that although TBH it's not really clear why would that be a reason considering the context is exactly the same when script is run as a standalone script, and works fine ?

Possible issue: using vert indices from a mesh and compare them with the indices of another one. Also, I don't get why your are applying the modifiers as finally bm_podz.from_object(podz, dg) does it automatically (using dg)? And also, the order you apply the modifiers does not match the ones shown in the picture.

Hi, lemon, thank you for taking a look. As for Indices - i'll investigate but that issue would appear also when the script is run directly from text editor, wouldn't it? I didn't go with bm.from_object method, because I wanted to feed bmesh with a copy having some modifiers applied and some removed. As for the order - frankly I didn't realise that matters but again, shouldn't it work wrong way also in the script itself when it is not embedded in add-on? What happens is - when the script is standalone, the modifiers are applied/removed in podz object (as intended), in "addon" to source object.

Just to clarify - I did use from_object as one can tell, I just didn't use it at the begining, for reasons mentioned above. I guess the order of dealing with modifiers, although important, doesn't matter here, since the first script works as expected. I think the issue is that when the script is in "addon"  it applies/rmoves modifiers in ob.. (the source object) despite  context.view_layer.objects.active = podz. But I don't understand why.

@MatH, could you provide a blend file (should be too long to try to reproduce all that manually for testing).?

@lemon, sure, but unfortunately not right now. Can send it in couple of hours when I'll get back home. How do I provide it? (dropbox link?)

If possible the good way here is to use https://blend-exchange.giantcowfilms.com/

If you print( len(wyk) ) once the list is constituted, it seems that the value is not the same standalone vs addon. So I still think this is the index based calculation that is incorrect: nothing ensure index stability in this kind of operation.

I'll investigate but I guess len(wyk) should be different because the in "addon" the modifiers are applied/removed to the source object instead of podz., despite context.view_layer.objects.active = podz. So len(bm_podz.verts) is different.

I went with indices because vertex coord seemed also unreliable. Might get back to that route but still i think that's not the reason, if it was it should happen also in standalone, right? I feel it must be some sort of asignment of modifiers data to object and copy that behaves differently Anyway, I rally appreciate you took the time to had a look, thx.

Could take a closer look, but the problem is I don't know the aim of all this and the roles for the boolean and hook modifiers (what is expected globally).

I'm working on an addon for preliminary rough analysis of land use in urban planning. I'm actually quite close to first iteration if it :). The script is an extracted part of function creating underground levels of a building (that "belt" you get from standalone script will be solidified and so on). I know the approach in the script and all the modifiers etc. might seem odd but they originate from the logic of the whole addon which is really too complicated to explain:).  Nevertheless, the question is simple - why are those modifiers applied/remvd corretly in standalone and aren't in "addon".

I found the proof that the issue is with applying modifiers to correct object: in "standalone" script if you comment out context.view_layer.objects.active = podz you get the same result as in "addon" version.

ok, you're right, I've changed in order to use a custom data layer (so that things are indices independent) instead of using src_verts and this is the same.

The issue seems to be link to the context which does not allow:
context.view_layer.objects.active = podz

But you can:
override = { "object": podz, "active_object": podz }

for mod in [m for m in podz.modifiers if m.type == 'HOOK']:
    bpy.ops.object.modifier_apply( override, modifier = mod.name )
for mod in [m for m in podz.modifiers if m.type == 'BOOLEAN']:
    bpy.ops.object.modifier_remove( override, modifier = mod.name )
for mod in [m for m in podz.modifiers if m.type == 'SOLIDIFY']:
    bpy.ops.object.modifier_apply( override, modifier = mod.name )

Don't know if that can be considered as a 'general case'...

that did the trick. Didn't know you can do that. Still don't know why the context does not allow context.view_layer.objects.active = podz - I checked and the line does change podz status to active correctly. But still bpy.ops.object.modifier_remove/apply is applied to source object. You think this might be a bug? Anyway, I learned a lot,  thank you very much.

The hint was effectively the original object looses its modifiers. So I conclude context.view_layer.objects.active = podz did not do the job. And context issues "happen sometimes"...

Yes, but it seemed to do the job - I printed out active object after that line and it was the new object. So what fails IMHO is bpy.ops.object.modifier_remove/apply which is somehow not reading context.view_layer.objects.active = podz or indeed the line itself is not changing dependencies in the scene correctly.


text:
Using just Blender to make cloth assets on a model in UE4?
Here's an actual example of a test I'm attempting. I have a small dagger, and I want to add a bit of cloth to the pommel that will flow around while swinging the dagger, or walking around. I have the dagger completely finished in terms of making the mesh, UV unwrapping etc, it's even textured. It does not however have bones. I've been importing it as a static mesh.
From various videos, I am pretty sure I need to have bones and a physics asset, therefore needing a skeletal mesh, I just need confirmation. That would mean needing a skeletal mesh for even something like a fruit stand with a tarp over it or something. I actually imported the dagger as a skeletal mesh and messed with cloth paint, but it didn't have any effect, I'm assuming since it lacks bones or physics asset for directions.
So, do I need to make anything that will have cloth physics a skeletal mesh, and will that allow me to select the different components as long as they're applied to bones? And can I do this by just modeling and rigging in Blender and then using clothpaint in UE4? Thanks.

I'll comment since I've figured this out, in case someone else is as clueless as I was. So, I modeled each part of the object, IE the dagger and the cloth. IN BLENDER, I gave the cloth and the dagger each a material (didn't change any settings). Combine them, export them and texture them, whatever. I didn't add bones or anything.
In UE4, all I did was import it as a skeletal mesh, and opened it up. Having a material on each the dagger and the cloth allowed me to select them separately in UE4 and thus "create cloth from asset" in the engine.
I could apply the Material I made for the combined object to both the cloth and the dagger, and it looked fine. The only purpose the material in Blender served was to allow me to select the cloth separate from the dagger in UE4. https://www.youtube.com/watch?v=MC2UlF3BWhQ&t=0s&index=31&list=WL This video although low quality, is what helped me figure it all out.


text:
Lock leaf particles to specific axis?
My goal is to make a weeping willow tree, so I'm using a particle system for the leaves, which are long strands hanging towards the ground. I want to make it so the rotation in the z axis is random with little to no rotation on the x and y axis, so they always appear to be hanging. How can I achieve this? My settings and results are shown below.

Okay, my original answer was wrong. Try experimenting with Orientation Axis and Randomize Phase

Elaborate a little, like add curve guide to what?

Editing orientation axis was definitely the way to go, though my object itself wasn't oriented to work well with that. I think it would work with any Orientation Axis as long as you mess with the orientation of the object itself.


text:
Blender Bake Normal Map Problem
I've baked(using Cycles) a normal map from a hi-poly (sculpted mesh) to a low-poly mesh which is shrinkwraped to hi-poly. It looked fine, but I needed to add some geometry (loop cuts) to my mesh. After I've done this and baked normal map again, some artifacts appeared in the parts where geometry has been added(you can see artifacts on pic).

See what changed on the UV map and go from there. Perhaps there are now overlapping islands which make baking bake over itself.

But is it possible if I've unwrapped it again after adding new loop cuts?

It's going to be speculation without more info about your UV map and what you did aside from that. Post screenshot of UV map (same as above of these islands as well), post a blend file here https://blend-exchange.giantcowfilms.com/ and [edit] your question with all that info so to make this question clearer.

I have solved this problem by separating individual parts of my mesh.


text:
How to color line set with vertex colors?
I would like to use vertex colors to paint an extruded line set but do not succeed to do it.
In detail, I export a scene in X3D format from paraview. It consist of a panels and lines that are colored according to a VTK field (cf. picture below).

Then when I import this X3D file into Blender, I get these three fields :--

Shape_IndexdedFaceSet     (for ship panels)
Shape_IndexdedFaceSet.001 (for free surface)
Shape_IndexdedLineSet     (for ship lines : tower)

I have no problem to show vertex colors on the FaceSet (using an attribute and material output in cycles rendering mode) but the same does'nt work for the Bevel extruded LineSet (cf. picture below where the lines remain desperately black).

Any idea how to do that ? Is there a hidden option I missed ?

Is the mast imported as a a mesh or a curve.  Related 1 2

I think it's a curve. Where can I check that ?

Select it. Will have a curve for data icon on properties panel. Or go into edit mode (will be a curve menu) or in python console type C.object.type or the tools panel will have tools for curves.

I confirm it is a curve

Could convert to mesh object > convert to > mesh and use method outlined in link above. As for colouring curve in cycles, that's outside my field.

After you've converted it to mesh you can simply paint it like the other mesh objects.

Can you upload a .blend file?

unfortunately I can't provide the .blend file for this project but I will try to reproduce the situation on another geometry I can share whenver I have time