text:
Clothes weight paint / skinning
I have a model with a jacket on it as separated object. I don't know how to attach/weight-paint jacket to make it deform without intersections with model and itself.
Some parts of jacket, the edge areas, are double layerd to mimic it's not flat. That makes the job even more difficult because while deforming the jacket upper layers intersect with bottom ones.
In addition there is also a belt which is also an separated object.
How not to get lost in all relations between vertices and weights assigned to them from different bones? When I set up weights for one pose they are not matching for another. I can paint this way to endlessness.
I can't manage with those under layers of jacket also. I can't paint them while they are covered. I know I can use face masking mode while weight painting but if I mask upper layers I can't see if they are still intersecting those bottom.
There is also problem with subsurf modifier. When it's on I see the model the way it will look finally but then everything slows down so it's hard to work. On the other hand with disabled subsurf modifier the mesh looks and behave different way so I can't repair all those intersection issues.
Maybe there is some technique or good tutorial that provides inf. how to weight-paint/skin the mesh properly? I attaching screen shots to ilustrate the issue.

There is no magic solution for that, you will have to pose the skeleton to the maximum angles you would expect in the animation and weight paint the intersecting parts on the bones that have most influence on those parts.

Ok. I don't expect magic :) But how not to get lost in all relations between vertices and weights assigned to them from different bones. When I set up  weights for one pose they are not matching for another. I can paint this way to endlessness. I can't manage with those under layers of jacket also. I can't paint them while they are covered.

I know I can use face masking mode while weight painting but if I mask upper layers I can't see if they are still intersecting those bottom. There is also problem with subsurf modifier. When it's on I see the model the way it will look finally but then everything slows down so it's hard to work with weights. On the other hand with disabled subsurf modifier the mesh looks and behave different way so I can't repair all those intersection issues.

Use the data transfer modifier.
1- Select the cloth
2- Shift select the rig
3- Ctrl-P to ''Set parent with empty groups''
4- Select the cloth Alone
5- Add the ''Data transfer'' modifier (anywhere in the stack) then within the modifier:
6- Source object - Select your Rigged mesh (body)
7- ''Check'' Vertex Data (first in the list below Source object)
8- Select (highlight) Vertex Group(s)
9- Click Apply
10- Forget about most of your nightmares and forget about destructive solutions.
You may have to do some additional  Weight paintings  or Shape keys with drivers for the clothes to react the way you want with some flexion but at least, the clothes won't get through your base character as you move your rig with this method.

There's a few solutions you can try out:

Delete the mesh that's underneath the jacket.  Yes, it seems weird to do, but unless the character is taking off the jacket in a scene, you won't have to worry what's underneath.
You could try making deform bones to 'tweak' the body mesh, and parent that to the spine bone (obviously normalizing this after). Or make a deform bone, then the animation bone to control it, whatever your convention is).
If you really want to have your entire character in one file, you could select the torso mesh and make it a separate object, and just add the same armature modifier.  Then make a setting in your rig UI to drive the visibility of that torso mesh, depending on your scene.

Maybe you can try this:

Delete the inside of the garment.
Transfer weights from the body to the garment.
Add solidify modifier to garment after weighting is done.
Modify and correct garment uvs.
Apply solidify modifier to garment if needed after uvs and weighting are done.

I hope this helps. Good luck with your project!

authors: Евгений Ратников


text:
Displaying vertex indices in Blender 2.8 using debug mode
I'm trying to enable debug mode in blender 2.8 in order to see vertex indices in edit mode and from the instructions I'm following I'm supposed to execute bpy.app.debug = True but I still cannot see the indices. How do I do this in blender 2.8?

You need to enable Developer Extras in the Interface settings, then you can enable vertex indices in the Viewport Overlays panel from the 3D viewport. You don't need to set the bpy.app.debug flag. Also, make sure to be in the Edit Mode. Object Mode will not show any vertex-related options.

For Blender <4.2.0 the option is under the Show Overlays menu:

For Blender >=4.2.0: the option has been moved to a separate Mesh Edit Mode menu:

This developer tab isn't visible on my viewport overlay window... how can I make it appear?

It works now, thanks!

Overlays are a new feature of 2.8
Setting vertex indices overlay via script
Test script. Sets on for all 3d views in screen.
import bpy

context = bpy.context
for a in context.screen.areas:
    if a.type == 'VIEW_3D':
        overlay = a.spaces.active.overlay
        overlay.show_extra_indices = True

Setting debug is only necessary for versions prior to 2.8

source: Stack Exchange

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

sort: votes


text:
How do l disable this gradient color effect on my UV texture?
I apologize for my noobidity, but how can I disable this gradient thing? I need accurate, solid colors. Thank you in advance.

l'm assuming this has to do with the interpolation (filtering mode) of the image texture. You can probably find this in an Image Texture node in the Shader node editor. Set "lnterpolation" to Closest.

Thank you, just what was needed! I was using UV Map node for some reason, so there was no option to change interpolation, but changing it to Image Texture node helped.

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


text:
Color is bleeding if AA is enabled
Internal Render.
There is Z-transparency material assigned to objects, which are very close to each other. Some artefacts occur if AntiAliasing is on.
If I turn off Z-transparency, or move objects a bit further, then AA works fine. But I need all options from this setup.

If you want to share files with the BlenderSE community, please use exclusively http://blend-exchange.giantcowfilms.com/ for that. Thanks.

@metaphor_set I don't think that the usage of that link is mandatory! Although is reccomended, because it gives permanent storage...

@m.ardito - we don't know if blend-exchange will be permanent, although I deeply hope so. GiantCowFilms created this service not without a reason. There are three additional points to yours in favor of blend-exchange. 1. It's trustworthy because it's created and maintained by s.o. of our own community who has a good reputation. 2. It's easy to use, doesn't require additional accounts and it integrates flawlessly into BlenderSE. 3. You can only upload .blend files.

@metaphor_set yes, you're right, it's a generous effort, it's defined "A long term .blend storage solution for blender.stackexchange", and it works very well, but I don't think we should ask people to use it "exclusively"...

@m.ardito - you might want to read David's answer here: http://meta.blender.stackexchange.com/questions/2171/what-to-do-with-questions-based-on-links-once-the-links-have-expired . I totally agree with him, 120%.

@m.ardito If i'm not mistaken, Blend-Exchange currently has a 30mb storage limit, which can be a problem when you need to pack fluid data or textures.

@John Silveous: of course, it's free but it has limitations, that's also why I said it should not be mandatory but, within its limits, preferrable...  for large amounts of data other methods can be useful, but most times a small file is enough to show a problem.

You could try to use raytraced transparency, instead of Z-transparency:

does it get better?

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


text:
Why settings for IK-Constraint are different for mirrored bones?
Please, explain me what is going on here. IK for arms is good, but legs give me headache.
You can switch between Rest and Pose modes to see the problem appears. Changing Pole Angle to 180 deg for Leg.R solves the issue, but hey why Arms work without this tweaking and Legs are not?

One big influence on this issue is bone roll. You can check the roll of a bone by selecting it in edit mode, pressing "N" to open the shelf and looking under "Transform."

If your pole target bones (knee bones) don't have the same roll as your leg bones, it can get wonky. You can reset the roll of your bones by selecting them and pressing CTRL+N . Recalculating along the global Z axis can work well in this case.

Recalculated bone roll is 0.01 and IK for Legs is still strange.
http://pasteall.org/pic/index.php?id=111103

To solve this problem follow the below steps:

Switch to Pose Mode
Select all bones with A
Hit the Space Bar
Write Select Pose as Rest Pose as shown below

I want my legs to be on the same level both in Pose and Rest modes. So if I apply uncorrect pose as rest it will not help me at all.

applying pose as rest pose will make the legs to be on the same level in Pose and rest modes.

Here is what I'm talking about http://pasteall.org/pic/index.php?id=111109
All was done accordingly with your algorithm. Maybe you can provide proper Blend?

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


text:
Internal Render with colored shadow pass
Is this normal to have colored shadow pass if I have Z-transparent material with disabled receiving of shadows? I thought it should be just white in this case.

All you have to do is, in the scene node editor, set it up like this.

Feed Shadow pass into a ChromaKey with key color to white.
Use the ChromaKey's matte as factor for alpha over.
Use Shadow pass as first color slot of alpha over and white for the other.

Recently found something usefull. I don't know how does it work exactly, but anyway:

Make second material, which will be replicating first Transparent material in all aspects except for transparency (!).
Then enable nodes and plug Transparent material to the Output.
Finally add another Material node (Input-> add Material node). And choose there your second material (one without transparency), but don't plug it anywhere, just click it with RMB to set as active in node system.

P.S. It is not the best solution and I guess, it can corrupt other passes with more complex materials.
Blend file with this setup is attached here:


text:
How to properly map tiled texture with non-uniform scale?
Blender Internal here. Texture is scaled to maintain circle as circle. And has offset to put it (circle) in the center.
With Generated (cube) mapping it is almost good, except one moment where tiles do not follow each other in one direction.

With UV map I can rotate those parts to match direction, but everything else is messed.

I've tried to use min/max Crop settings with no luck (by the way, does Crop actually scale rather than crop?)

I don't think it's possible; either texture should be square or cube should be parallelepiped (and even then 2 sides will loose proportions). Crop settings won't help here - they crop, not change ratio of the texture.

I don't know what you're using for the original texture image but I've had similar problems and have simply taken each individual face in the UV editor and positioned and scaled until it looked right.  In cases where the "repeat" comes into view, I've gone back to the image file and increased it's canvas size, saved that as another image and used it on the errant surface(s).

Edgel3D, problem is that I have many cubes with videoclip textures, and their ratio is 16:9, so it is a bit of work.


text:
How to apply the same texture to multiple faces?
If I have a mesh with multiple faces like that, with different shapes as follows:

How can I apply a texture to every single face like the one below and hide the fact that is a texture repeated for many times (i.e. between faces there is a method to smooth the transition between two equal texture)?

I'm very sorry if my question may be confusing but I can't explain it better. I hope someone can help me

The trick is not so much on how you apply the texture to the faces, but on the texture it self.
What you need is a "seamless" or "tileable texture", and how to make one is not really a question about blender itself, but more a question of image editing or photo editing.
First you must correctly unwrap your mesh, see here how to. You may want to get rid of that NGon on the top too.
Then either search the internet for "Seamless Rock Texture" or  "Tileable rock texture" or create one yourself using some tutorial like these https://www.google.com/search?tbm=vid&q=gimp%20seamless%20texture
Edit
You can't really do heavy texture editing inside Blender, there are some basic tools like painting or material based effects, but for for heavy work you are always advised to use a image editor.
Anyway, upon closer inspection it does seem like your texture is already seamless and tileable, I had not noticed before, so you don't need to do any editing for now. All you have to do is correctly unwrap your mesh as described in the link above.
Still have in mind that your texture is not very big and will still have noticeable patterns when repeated over an extensive surface. That can only be fixed with a better texture.
How will you be rendering the image, Cycles?
You may also reduce or mitigate the repeating effect with some UV distortion using nodes, but don't expect miracles, You could use some of the procedural textures like Musgrave or Noise, or whichever suits you best to distort the UV coordinates and create a disturbance in the texture. Here is an example of how this could be done.

Edit 2
If you want to export this for another game engine don't bother with Cycles for now. Switch to Blender Internal render using the menu on the header of the window.

First step open your image in the image editor
Then unwrap your mesh over it
Add a new material to your mesh in the properties window
In the texture tab of the properties window add a new texture to your material
Choose image texture type and add your image from the dropdown

I can't do it directly on blender? No way? I must to pass through another program like gimp?

Had not noticed your texture was already seamless, updated my answer with more details

I will be very honest with you: these are my first steps in the world of texturing and i'm trying to understand a path to create a cave (in order to import it on an engine; as you can imagine my focus here is to optimize and simplify as much as i can the vertex structure of my cave and at the same time save the quality of the result. I'm trying to find the best balance) Do you think the cycles could be the best way using still this texture with the target i have already told you?

In that case never mind Cycles, that would only work well for an "offline render" or with texture baking. In any case your case your workflow seems to be correct, only thing is, it's better to model your whole cave first and then unwrap at the end, or you will have to keep remaking and adjusting to and fix your UVs frequently which can be a bummer.

Keep in mind the OP might also be asking about "smooth" versus "flat" shaded.

Yes I agree with you! If it's not a problem i will ask you the last thing. Suppose that the image (the first one i have uploaded, the "cave" in edit mode) is my final mesh, the one where i want to apply my rock texture 1024x1024 and then import in my engine. Let's skip "where use mark seams" . . . How can i achieve my goal? How can i realize what you did with the ball in the image? I can't still understand the worflow. If you think that these steps are too long to write and edit in the answer, a link will be enought

You need to unwrap your mesh, create a new material and then add your texture to the material using the UV coordinates you created, updated the answer above, check it out. you may want to watch some tutorials on UV unwrapping https://www.google.com/search?tbm=vid&q=blender%20uv%20unwrapping

There is good advice here, I guess I would only want to ask, why do you want to apply the entire image to every single face?  Generally it will be much more satisfactory to have the image extending over multiple faces before it repeats.  That way, depending on scale, camera angle, etc., the repetitions will be considerably less noticeable.  Also applying the entire texture to single faces will mean that the detail in the texture will be very difficult to see, again depending on camera perspective.

Select the ball and press U a Menu will come up and press Smart UV Project, than put the texture as you wish


text:
How to export a Plain with 2 image textures on each side as a glb file
Hey there a blender noob here! I have a model of a box I made for a project. The object is a simple cube and using a mixture and geometry node I have applied 2 different image textures on each side of every single face (Each face has a different image texture on the front and back) .
The problem comes when I try to export the box as a glb file. The file always comes out with only one of the image textures applied. How can I fix that.
Cheers!


text:
How to join segments of a low-poly character into one mesh without losing rigging?
Apologies for my lack of correct vocab, I'm very new to Blender so I don't have the correct words for things just yet.
I have been in the process of making a version of a low-poly character for some time now (adding an extra hip part to them to allow me to use them in Unity) and I have managed to do everything I need to do so far. But, to get something into Unity I have to export my character as one model instead of as the segments I currently have my character split into (this is also to be able to combine all of the materials that my model has into one, as Unity requires that I do so).
I first tried joining all of the segments into one mesh (Ctrl + J) but that meant that the armature was no longer able to control the segments, which isn't what I want.

Before joining, I'm able to pose the model however much I want.

After joining, the bones won't move the segments anymore.

What I want to be able to do is to join all of the segments into one model, whilst also being able to control the seperate parts as I would be able to do before joining.
For reference, the method I used to parent the bones to the segments is explained here (specifically the add-on 'Parent to nearest bone')
https://www.youtube.com/watch?v=DDeB4tDVCGY (5:43)
Help would be much appreciated as searching around didn't tell me what I needed to know and since I have little experience with Blender, I wasn't able to understand any answers that I did manage to find on this topic.
Thank you!

Hello, what do you mean by "whilst also being able to control the seperate parts", what kind of control do you want exactly?

Hiya, apologies for the confusion! By control I was talking about bones controlling the segments like they would before joining the model like the first image.

You need to join the two armatures as well, if there are 2 armatures, make sure that the bones don't have the same name, or please share the file

I can have a look at how to join armatures when I get the chance, thanks :) How would I go about sharing the file on here? Assuming you want the .blend of course

Use https://blend-exchange.com/ (read the instructions), if the file is too heavy use another platform like workupload

I'll take a look at joining the two armatures later today but here's the file

You have parented all the limbs with a simple parentage mode, not the Armature Deform mode, it means that for the moment each piece is parented to each bone with a classical child/parent parentage, no Armature modifier has been created for the pieces, no vertex group has been assigned to them. If you're glad with the current rigging, you can keep it as it is.
If for some reason you need to join all the pieces together, what you can do is join the pieces with a CtrlJ then parent to the armature with the Armature Deform / With Empty Groups option. This option gives an Armature modifier to the object, it also creates a series of vertex groups that have the same names as the bones, but no vertex of the mesh is assigned to any of these vertex groups for the moment, you're going to do it manually. If you parented with the Armature Deform / With Automatic Weights it would automatically assign the vertices to the vertex groups, which is OK for a flexible rigging, which is probably not what you want to do right now, it looks like you want each bone to influence each part, and not bend any other part.
Once parented with the Armature Deform / With Empty Groups option, select each part and assign it to the correct vertex group (the one that has the same name as the bone that is supposed to move it):


text:
How to make a scalene triangle, ie: rocket fins
So, I want to make a scalene triangle (3 sides all have different dimensions, and it has to have a thickness) to "weld" to a rocket body I've created. I've done the make a circle with three points thing, but it doesn't work for thinness or varied dimensions on the long axis. Least for me. Tried the join two cubes method, but then I'm left with a thick edge I can't control. Attempted to cut out triangles out of a square...No luck so far. Essentially my goal is to make four triangles, 135mm (the straight edge) X 21mm X 137mm, and have it be 2mm thick. Rocket fins. Then join them to the rocket body (cylinder) at 90 degree intervals. To print and hang off my RC A-10 and shoot off with an A series Estes rocket.

There are dozens of ways to get a triangle with the dimensions you need... I would highly recommend you do some basic modelling tutorials about things like box modeling, polygonal modeling... also for joining them around the rocket body there are different methods.

Is this a right-angled triangle? Is the body of your rocket cylindrical?

You can do it this way if you have the shipped with Blender addon Add Mesh: Extra Objects activated.
Add a single vertex. Make sure that vertex mode is selected after the vertex is added:

Extrude the vertex 135mm on Y axis and extrude the original vertex 21mm on the X axis. Have Vertex Snapping and Auto Merge Vertices turned on:

Extrude the vertex at 21mm to the upper vertex to complete the triangle:

Press F to fill the triangle. Also check face orientation:

You can either select the face and extrude it upward 2mm or, in Object mode add a Solidify modifier. Set the 2mm thickness and you might want to set the offset to 1.0 to have the object origin on the bottom of the corner before applying the modifier:

This is what you get:

Or without the need of snapping or extra objects: take the default cube in Edit Mode, select all with A, M to merge at center. Extude in Y direction and in X direction like you did, then A to select all and then F. Triangle completed.

@GordonBrinkmann Thanks! I always manage to find the more convoluted way. If you want to post your better solution as an answer, I'll delete mine.

No, not really. I actually think there are so many ways to get a triangle with certain dimensions and then to place it four times around the rocket body afterwards that this is rather a question to be closed for drawing opinion-based answers since there is not a single correct answer. And honestly, if someone had done just a few beginner tutorials on basic modeling I cannot believe that the OP has tried different methods and did not get any result.

You can also use Geometry Nodes

You can make various shapes by changing these values also and it's 3D printable.


text:
UV overlays disappear in edit mode and only shows metadata option
I just started working at a new company with a new laptop and I downloaded the automatic Blender version, 3.6. I made a 3D-model and usually when I unwrap, I can easily open and use the display stretch option to see how much stretching is happening on the UV. However, if I select an object and start unwrapping, the overlay options are gone as well as the overlay button. If I don't select any models, the overlay option appears but only shows the metadata option. Does anyone know if a setting is wrong or if this is an issue with this blender version and what should I do?

Hi. In the bottom image in your question, to the left of the View menu button there is an icon with a dropdown. Is this from a third party addon and could it be causing the problem? Either deactivate the addon and close and reopen Blender and try unwrapping, or try unwrapping this after using File->Defaults->Load Factory Settings and see what happens. I don't have any problems with missing items when unwrapping in Blender 3.6.9 using Windows 10. Also, I don't understand what you mean by the "automatic" Blender version. Do you mean the version with an installer? What OS are you using?


text:
Mesh unwraps in undesired way (seams are not obeyed)
I have bird model with symmetric wings on its left and right side. Wings are cutted by the seams from the rest of the body. One wing unwraps correctly, following the seam but second doens't. No matter if there is a seam or not the wing always unwraps as if there was some seam. Even with my symmetric seam it unwraps like there was some extra seam near to my.
I attached the screenshot of unwraped model with selected undesired edge cut.
Here is link to blend file:
https://www.wetransfer.com/downloads/db48ae49a47dd31103bb5bdd1c233aaa20160405141634/d98e72b1b5847bc4dde682751860aaba20160405141634/a98a07

Could be that some geometry is disconnected. See if selecting all and doing a Remove Doubles operation helps. It would help if you could post the blend.

I removed doubles but it didn't help. Link to blend file above the screenshot.

Your mesh has some problems.  You have not joined the wing to the body correctly which has left unconnected edges and interior faces. This is the cause of the extra UV islands.
You can see the problem area by clicking Select -> Select All By Trait -> Non-manifold.  You should remove the interior faces and connect the wing to body for the mesh to unwrap properly.
You also have several nasty poles that may affect the way the mesh deforms once rigged.  If you are intending to fix these, it might be worth altering the topology before you UV the mesh.

Indeed there were interior faces. I didn't notice them. Thank You!

What you mean by "You also have several nasty poles that may affect the way the mesh deforms once rigged." Can you explain to me of what poles are you thinking and how can they affect the mesh?

You may want to look at the neck and tail area where you have poles on curved surfaces. They may affect the deformation of these areas by introducing pinching and uneven subdivision.

I'm beginner. I'm doing my best regarding to topology. I think I don't understand you enough to fix it. I can't see the problem.


text:
Cycles Render reduces workspace by strange cube
When I render an image it gets cropped by some kind of cube, making all objects outside invisible. The top view is what I want, the bottom what I get

Do you have any ideas about the reason or the solution?
There is no such cube in my project.
EDIT: Moving everything around (by pressing A and G) changes position of project inside this "room", but does not solve the problem due to animations that would need to be moved separately keyframe by keyframe.

It seems like there is some hidden object in your scene that is not visible in the viewport but still appears in your render.
With the mouse cursor over the 3D view, press Alt + H to unhide all objects in the current scene

That was it, I thought they are not included in render

Blender uses separate settings for visibility and renderability, it is generally very useful, but can sometimes have these strange side effects.


text:
Is it possible to use four corners of a single marker for a plane track?
When tracking smooth and round objects, it can be quite difficult or even impossible to place markers to any specific features. On the other hand, it is often quite easy to track the object as a whole with one marker set to Affine or Perspective motion.
Unfortunately, even if such a large marker succeeds to perfectly track the whole object, it cannot be used to create a Plane Track. Plane tracking always needs four markers. Is there a way how to get around this limitation?

Edit: The inspiration here was a videoclip where people have sunglasses filled with funky textures:

Placing several trackers on each of the sunglasses, perhaps on their edges, would be quite unreliable. However, it is easy to track glasses with a single marker like this (movie screenshot):

I am looking for a way how to use the precise orientation of an object tracked this way.

Using Python, we can just create a new track for each of the corners, which in turn allows to create a classical Plane Track.
  tracking = D.movieclips['clip.avi'].tracking
  begin, end = C.scene.frame_start, C.scene.frame_end
  corners = [tracking.tracks.new(frame=begin) for i in range(4)]
  track = tracking.tracks['Track']
  for frame in range(begin, end+1):
     track_marker = track.markers.find_frame(frame)
     for i, corner in enumerate(corners):
        corner.markers.insert_frame(frame)
        corner_marker = corner.markers.find_frame(frame)
        corner_marker.co = track_marker.pattern_corners[i]
        corner_marker.co += track_marker.co

However, this is quite clumsy a solution.


text:
how to manipulate objects using Seed button in real time
I cut a mesh into some random (N number) shapes. I also used random.seed(). So every time I run the code, I get new set of patterns.
Now, I want to do it with "UI Panel" with some variables as input buttons (such as MyInt, MyFloat, dropdown list, etc; don't know, if they are correct), so that I can change them accordingly and get their results in real time.
Small example: If I change the seed value and run the code, I get another pattern. So this pattern changing should be get done with seed button in 'UI Panel' in real time.
If my question is not clear, I will be eager to modify it and make it more understandable.

This Gif image shows a "Plane" divided into 4 new Planes as specified by:
percent_list = [40, 40,10,10]

I also highlighted:
random.seed(3)

So, if I have a Panel like in Gif which I have edited in Ms-Paint. Whenever I change
bpy.props.IntProperty(name="seed")

value, it should change the random.seed() and eventually change my Plane object in the scene.
I hope my question is now clear. or?

Do you need to know how to make the panel, or how to make the properties, or both?

Both, if you can show me in easier way.

After thinking about it, I still don't get what you're trying to do, like why do you need to make properties if you're trying to adjust properties that already exist?

I have added a gif file for more understanding. Since I have a big code, I am uploading just a snap of it, so that a general idea can be cleared.

Ok, re-answered.

You will need to define some properties, and then make a panel to display it them. I've cut and pasted from the templates in Blender's Text Editor(look here for many more examples).
First make an update function that will run every the properties change:
def update_function(self, context):
    myfloat = context.scene.myfloat
    myint = context.scene.myint
    for ob in context.scene.objects:
        #your code would go here
        print((myfloat, myint))

Then define some properties with your function as the update. More information on properties here.
bpy.types.Scene.myfloat = bpy.props.FloatProperty(name="My Float", update=update_function)
bpy.types.Scene.myint = bpy.props.IntProperty(name="My Int", update=update_function)

Then the panel:
class MyPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "My Panel"
    bl_idname = "OBJECT_PT_mypanel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout
        obj = context.object
        row = layout.row()
        row.prop(context.scene, "myfloat")
        row.prop(context.scene, "myint")

Now we put it all together and register the panel and properties:
import bpy

def update_function(self, context):
    myfloat = context.scene.myfloat
    myint = context.scene.myint
    for ob in context.scene.objects:
        #your code would go here
        print((myfloat, myint))

class MyPanel(bpy.types.Panel):
    """Creates a Panel in the Object properties window"""
    bl_label = "My Panel"
    bl_idname = "OBJECT_PT_mypanel"
    bl_space_type = 'VIEW_3D'
    bl_region_type = 'UI'
    bl_context = "object"

    def draw(self, context):
        layout = self.layout
        obj = context.object
        row = layout.row()
        row.prop(context.scene, "myfloat")
        row.prop(context.scene, "myint")

def register():
    bpy.utils.register_module(__name__) #registers all the classes
    bpy.types.Scene.myfloat = bpy.props.FloatProperty(name="My Float", update=update_function)
    bpy.types.Scene.myint = bpy.props.IntProperty(name="My Int", update=update_function)

def unregister():
    bpy.utils.unregister_module(__name__)
    del bpy.types.Scene.myfloat
    del bpy.types.Scene.myint

if __name__ == "__main__":
    register()

But, how can I manipulate it. for example if I save 'myint' property as 'y' and use it in bpy.ops.transform.translate(value=(0,y,0)). And then when I change the IntProperty in the Panel, I am getting error.

What is the error?  That operator is expecting a tuple of floats, not an integer.

yes it is expecting a tuple. But how can I manipulate any object in the scene (transform.translate: for example). Without hitting the Operator. For example: when I change 'myint' property in 'UI' how it directly update the position of object in the scene. I am trying to control objects in the scene with these properties. But I do not know how.

This wasn't stated in your question. You didn't post any code, so I couldn't know what you were doing with the properties. Give me a while and I will update my answer.


text:
How to control Play/stop video texture in Blend4web?
I want to control play/stop behavior of a video texture applied over a 'Plane' mesh.
I searched for it on the Blend4web forum but unfortunately did not find any easy solution. However, there are some solutions, which directs towards some projects, but these projects use a lot of javascript code and are non-understandable to me.
By default, we can apply a video texture to a mesh and it will loop infinitely. We cannot stop/pause or replay it.
Does anyone has idea how to do it?

You should probably be asking this over at the Blend4Web Forum. It also sounds like you already know the answer to your question: Do it with Javascript coding!

No, I don't. I am newbie. Anyway, I am trying to find the solution anyway.


text:
How to assign a random color to objects and make them parent to specific objects using Python?
I have two objects lists in the scene:
Lipid_names = ['DGDG','DGTS','MGDG','PE','PI','SQDG','PG']
Lipid_regions = ['Lipid_DGDG','Lipid_DGTS','Lipid_MGDG','Lipid_PE','Lipid_PI','Lipid_SQDG','Lipid_PG']

The objects in the list Lipid_names should be set as child to objects in the list Lipid_regions.
So, DGDG should be set as child of Lipid_DGDG,
    DGTS should be set as child of Lipid_DGTS, and so on.
AND I also want to change the color of these objects:
Now, when I run the code, it does not make parent-relation to all objects but only first one. The code seems okay to me as I am not an expert programmer.
For reference, I uploaded the .blend file with all data inside it.
https://www.dropbox.com/s/n52kay7jx1u13hc/Lipid_packing.blend?dl=0
import bpy
import random
from random import uniform
scene = bpy.context.scene

for selected_obj in scene.objects:
    selected_obj.select = False

Lipid_names = ['DGDG','DGTS','MGDG','PE','PI','SQDG','PG']
Lipid_regions = ['Lipid_DGDG','Lipid_DGTS','Lipid_MGDG','Lipid_PE','Lipid_PI','Lipid_SQDG','Lipid_PG']

# All regions over the lipids will be spread
regions = [i for i in scene.objects if i.name.startswith('Lipid_')]

# All lipids
lipids = [i for i in scene.objects if i.name in Lipid_names]
lpds = [print(i.name) for i in scene.objects if i.name in Lipid_names]

for Lipid in lipids:
    val = lambda: random.random()
    # set Location of the object to origin
    Lipid.location[0] = 0
    Lipid.location[1] = 0
    Lipid.location[2] = 0
    # set the rotation of object
    Lipid.rotation_euler[0] = 1.5708
    Lipid.rotation_euler[1] = -1.5708
    Lipid.rotation_euler[2] = 0.7853
    # set material
    Lipid.active_material.diffuse_color = (0, val(), 0)
    Lipid.active_material.use_transparency = False
    Lipid.parent = None

#print (lis[0].name)
for iter in range(len(lipids)):
    print(iter)
    for lipid in lipids:
        index = 0
        if regions[index].name == 'Lipid_' + lipid.name:
            lipid.parent = bpy.data.objects[regions[index].name]
        index += 1

What is your question exactly?

Try using random.randint(0,255) for the val.

+Sybren I edited my question. I hope it is more understandable now.

I tried random.randint(0,255) as well, but this code change the color for only 1 object. The other objects have same colors.

you can change the color with a simple random in r - g -b
and in order to assign each lipid_name as child of lipid_region you should use some loop... check this after run the script:

import bpy
import random

scene = bpy.context.scene

for selected_obj in scene.objects:
    selected_obj.select = False

Lipid_names = ['DGDG','DGTS','MGDG','PE','PI','SQDG','PG']
Lipid_regions = ['Lipid_DGDG','Lipid_DGTS','Lipid_MGDG','Lipid_PE','Lipid_PI','Lipid_SQDG','Lipid_PG']

for object in bpy.context.scene.objects:
    if object.name in Lipid_names:
        #color
        r, g, b = [random.random() for i in range(3)]
        object.active_material.diffuse_color = (r, g, b)

        #parent assign
        lipid_index = Lipid_names.index(object.name)
        parent_name = Lipid_regions[lipid_index]
        object.parent = bpy.data.objects[parent_name]


text:
Rigify doesn't let me move my pg
I have just used rigify. I follow the tutorial pretty well but i can't move it now. Can't understad why . . . the weight paint is set, control are placed but when i move one of them the mesh doesnt move. The only one that works is the cube in the center of the body.

Here the file

Just disable the "Manipulate Center Points" with the icon or by pressing Alt, (comma).


text:
How to create an engine glow effect for spaceships in cycles?
I want to create some kind of lighting effect for the engines but I quite new to lighting in general. To be honest, I'm used to sticking a single point lamp in.
From the tutorials I've seen, none of them are for cycles and focus on lighting a whole object anyway, not particular faces of it.
The engines I want to add the effect to are the 3 on each wing and the 2 in the middle.
I tried following this (How to create a fire/light effect in a spaceship engine) previously but none of it is making too much sense.
The first method shown was using volumetric materials. I've never heard of that before while working in Blender but I thought I myswell try it still but the whole method itself was just too complicated. I just didn't understand half of what it said.
With the composition method, I used the same nodes (with same values) as in https://i.sstatic.net/tzaT8.jpg yet I didn't notice any change in my render whatsoever. I guess those effects were supposed to effect the picture as a whole? I don't have any experience with either nodes or composition previously before this.

Indeed there are, it's kind of hard to help without a reference image of what you want to achieve. Depending on what you want to do Cycles may even be overkill if all you want is to add some self illumination. Doy you want to actually light your scene up or just add some engine glow inside the exhausts/nozzles?

@cegaton I tried following that a few days ago but couldn't make sense of that.

@Duarte Farrajota Ramos yeah some kind of engine glow.

@TitanJedi It might help if you could edit your question and highlight what parts of the linked answer didn't work for you. That way we can try to clarify

@TitanJedi  If you don't understand an answer you should post a comment asking for more/better explanation instead of asking the same question separately.  This is just about an exact duplicate of that question.

@PGmath I'm sorry, I thought that the asker of the question was pretty much the only person who could comment asking for such because it was their question in the first place. I thought that since that answer solved it for the person, that the question was basically over with and an outsider, such as myself, shouldn't comment.

@TitanJedi  No worries!  BSE is meant to be a resource for anybody and everybody who happens to stumble across it.  If a given post only helps one person it doesn't really belong here.  So definitely always feel free to comment anywhere you think something needs more/better explanation.

@PGmath ok thank you though it says I need 50 reputation to comment on that question

Since I can't comment on that question, would you be able to clarify it here or maybe in chat?

There could be several ways to do this.
If you don't want to gent into full rendering just switch to Blender Internal rendering and create either a shadeless material or an emitting material and assign it to parts of your mesh. It wot actually emit light that can cast shadows on other objects but it will quickly simulate the effect.

You could also add some sort of "geometry plumes" if you want actual jet plumes coming out.

If you plan on using cycles or do real rendering add self illumination to the geometry to really light up the scene
Any further effects could be achieved through compositing or post production easily and non destructively

I can't figure out how to increase a material's emission in cycles. The option itself isn't there http://imgur.com/a/6eoL0 I also tried following along with your composition method yet am completely lost. Like, the first node you used is an image node, where I'm trying to change specific faces I guess of an object.

Cycles materials are "Shader Based", you must have a correct shader for the desired effect, in this case an emission shader, added an image to the original answer.

Compositing is a post production procedure, that means it is done after your 3D scene is ready and rendered into an image. It can be done "live" directly on a render result or using and an external image like I did in the linked example. Live has the advantage that it is dynamically applied on top of all your renders automatically saving time and needless manual work, but can be a pain if for some reason you dont want to re-render or need an uncomposited image. Compositing over an external image is a more modular workflow less prone to loosing work at the expense of a few extra steps.

@TitanJedi your screengrab shows a material that is "diffuse" you need to change that to "emission" for it to emit light!

So does that mean that composition shouldn't be used when you're making an animation since it's not just 1 render?

No, composition is particularly useful especially when making an animation, you can use image sequences or video files when compositing instead, and it becomes extremely helpful because it allows batch tweaking lots of files at once, edit them in a non-destructive manner possibly saving a lot of re-rendering time


text:
Can't seem to be able to dissolve edges?
Hey so I'm relatively new to Blender. I've been following a tutorial to create a catapult but I can't seem to dissolve the edges on a certain part of a wheel. I've done this a number of times before and had no problem with it but now it just doesn't happen.

Any help would be appreciated, thanks :D

Hello, maybe show what part you're talking about and share your file? https://blend-exchange.giantcowfilms.com/

Thanks for the URL, I was looking for an upload button but couldn't find one. It's the two loops highlighted in the picture on the inside of the wheel.

You can see it from the screenshot: multiple edge loops at the same position. Remove extra vertices with: Ctrl V > (Merge) By Distance.

I tried removing the vertices doing that but I got a dialog box pop up saying removed 0 vertices.

Did you select everything first?

I hadn't. Thanks so much for the information, that fixed it!


text:
Sliding an edge loop in an imported image distorts the image (blender 2.81)
Using the loop cut in older versions, we could make a loop cut and slide it in one action before committing. Now one has to set the loop cut, then with edge slide, move the edge.
This doesn't work when one uses an 'import image as plane', since when you move the edge it distorts the image on the plane. The old way allowed one to make the loop cut and move it in one action before setting it- thus no distortion.
Is there another way to do loop cut-slide in 2.81 on images that I haven't seen yet?

You need to enable Correct UVs option, when creating the loopcut.
It is located in the pop-up menu.
Once enabled, it stays that way.
This works for Loopcuts, Edge slides and other tools.

By the way - you can still slide Loop cuts before committing.
No need to use Edge slide tool.

This was the same in 2.7x.

Thanks for the info, I'll edit my answer :)

In the tool menu for Loop Cut and Slide (after making a loop cut once), check 'Correct UVs' and it should work as you expected.


text:
How to create iridescent glossy tile material?
I’ve got a tile material that I would love to recreate in Blender,

but my efforts have not been fruitful so far. As you can see in the picture, the tiles look like they're a solid color, except when light reflects off them at an angle. It's kind of like iridescence, although I'm not sure if it's actually iridescence.
Anyway, I've tried a few setups to recreate this. I tried applying a tile image texture and a kind of iridescent looking texture as a glossy texture in a mix shader, I tried this setup

from here which gave this result:

(click on the image to enlarge)
I also tried this setup, that I thought of myself,:

(Click on the image to enlarge)
which gave me this result:

(Click on the image to enlarge)
So, basically, I don't really know how to do this. Anyone have any advice or tips they could share? Thanks!
(https://www.reddit.com/r/blender/comments/4f8tb6/how_would_you_create_this_material_in_blender/) to see my results.
So, basically, I don't really know how to do this. If anyone has any idea, I would really appreciate the help, especially if you could explain it in a way that a blender beginner would understand. Thanks!
edit: basically I think the effect wouldn’t even have to be true iridescence. If somehow you could show an iridescent looking texture where light is reflected, that would solve this particular case. For instance, this could be the regular tile texture and this could be the iridescent texture.

see if this helps you

@RickRiggs: That's exactly what Flobin already posted in his Reddit post and cegaton inlined nicely into the OP.

I was able to achieve something heading toward what you were describing anyway. I'm sure that there can be a lot of polish applied to this answer, especially on the cycle material nodes, but I believe that this will suffice to show the initial intent.
Here's the cycles material:

Here's the demo of the setup:

The geometry is two parts:

The first part is the tile itself, set to a basic glass material.
Inside the tile is a highly subdivided plane with two copies of a displacement modifier, to break up the normal directions within the tile.

The cycles material does the rest of the heavy lifting.
Here's the blend for your reference:

I used the second iridescence node setup suggested in the blender stack exchange link you linked to in your answer. With it, I created this:

I believe it to be the best way of doing things. If you choose to use this node setup, make sure the tiles are not perfectly flat and that you have smooth shading on. If you do not adhere to these two essential measures, there's a good chance the iridescence will fail.


text:
Bendy bone ends don't follow rig, also 'stretch to' issues
So I have a little bunny that I need to animate for a school final, although when I connect the bendy bones together the ends which I would use to control the bones don't follow the root bone
Also when using the 'stretch to' constraint to allow the flexibility of the bones, by themselves it works fine, but when I joined them to the rest of the armature they squish up against the main bone

Screenshot showing squish issues

End points stay in place while rest moves sporadically
Any help would be immensly appreciated  >.<

please, don't paste, as suggested, on pasteall! use http://blend-exchange.giantcowfilms.com/ and then add the provided link in the question

Thanks, I would include the link in the question but I can't post any more links, so here it is

https://puu.sh/xCBk5/9233278e56.blend

then post the link BSE here, I'll add it to the question...

I attempted to upload but the max size is 30 mb and my file is 80mb, so I used puush. Is there any way to upload larger file sizes?

Ok well i think i see what goes wrong, its the automatic weight ctrl p that goes wrong, essentially each part of the bear is a disconnected mesh.
If you want it to behave like that, when arms and legs are connected as a real bear (where those can be loose parts, connected by a single pont) then with automatic-weight paint you have to select the individual mesh and then the individual bone and do weight paint. (but first split your mesh by those lose moving parts).
Another bear way, would be as if those parts did not have a single joint point but are sticked with needle and rope, around another body part, and so its more like 1 volumes object (a single part stuffed bear), instead of amultiple loose objects (a multiple stuffed parts bear). In that case your mesh has to be like that too. This is the most easy form to rig, since that wont require to do automatic weight paint to each single bone but all bones can be automated-weightpaint all-together. As one single operation.
Currently the automatic weight paint sees an object that exist out of multiple objects whose mesh is not like the seccond bear (one volumes object) and it gets confused from a multiple volumes object.

i actually had wondered for a while if multiple parts based objects (like multi stuffed bears) where possible so far i never rigged them. But thanks to your question i see that it works but it requires more additional handling since then you have to select the individual bone that belongs to it.

I think i prefer the single mesh rigs though, easier todo

Thank you! now the rig works like the way it did when it was all separate. You were right with the weight painting I hadn't set it up correctly, now the mesh moves as one unit when moving the root bone and stretches and bends with the arms and legs. The strange movement was from multiple bones having small influences on the same bit of mesh, but for this character that wasn't necessary. I also had to parent the end bones to the root to keep it from staying in place. Thanks for the reply! ^.^

Did you eventually go for the "single stuffed mesh" or for multiple stuffed meshes, ea combined objects that form 1 bear ?

Sorry for late reply, Yeah I chose to combine it all together, it would make it easier to select the mesh as a whole while animating

You might add your blend file to see whats wrong: http://pasteall.org/blend/
I assume that you didnt apply scale to the model before doing automic weights (that could explain the weird lower picture). Make sure you parent the bones correctly. If you find it difficult to make a skeleton start with rigify and remove the bones you dont need, then in the end turn some of the bones in bendy bones.

I attempted to upload through giant cow films but it wouldn't let me since the max upload size is 30mb and my file is 80mb. The file is available through puush


text:
compositng: when I use an alpha over node only one layer shows up
I have a render in cycles that I want to use as a still shot but I'm having trouble with compositing layers. I have three separate layers all showing different objects, but when I use an alpha over node only one layer shows up
in-case this is a simple problem I'll keep this post short, but if anyone need's SS then I can provide them
thanks
Link to Blend File: http://puu.sh/pvqXT/3fe1d73a82.zip

Are you sure you turned on the 'Transparent' checkbox on 'Film' section on 'Render' property button? Otherwise the layers won't be rendered with transparent background.

sorry I was afk for a while, link to the blend file is now available, any help would be immensely appreciated

Your image renders properly when you select "Transparent' within the Cycles 'Film' section.... In the Blender file available for download, it is unchecked...
When checked, this is the result I get... and nice sparks!

Sorry... was not sure if it was in or out....  Is this as you intended? See Gears6 blend file... if this is correct, the issue was in the node tree.... but, if not, I misunderstood. :)

unfortunately that doesn't solve my issue , since at the end of the cord there was a globe being lit. I tried ticking transparent as well but it doesn't show the light bulb. You'll find it in one of the render layers along with the compositor nodes to make it glow

Hope you saw my new file.... does that address it?

Sorry I didn't have the chance to check it out until now. It works perfectly thank you so much :D


text:
Hair behaves strangely when baking
So I have a character with hair that uses hair dynamics and while baking a scene where she gets up from laying down the hair sticks to the surface and also hangs in midair
Blend File:
https://puu.sh/xRqfu/fa187b5936.blend
Hair before baking

Hair getting stuck to floor before flinging upwards

Position the hair gets stuck in when character has finished moving and the hair is still

Hair settings:

The render deadline is next week so any help would be extremely appreciated >.<


text:
Displacement on object stops it from using emission to light scene
CHECK EDIT
So I've finished work on one of my scenes for my year 12 animation, I wanted to use displacement on the hole that my character is falling down, but when I use it black sections appear everywhere.
With Displacement:

Without Displacement:

Does anyone have any idea what is causing this? They don't appear in view port rendering
Thanks,
EDIT:
Woops I worked out what the issue was just after posting this my particles system mesh was showing through the compositing >.>. Although now my issue has changed, now the Hole doesn't have any emission when I use the displacement.
Here's after displacement:

Any Ideas?
I'm using the displacement modifier with a noise texture to create the distortions in the tunnel. The coordinates of the texture is controlled by an empty so I can animate it warping and shifting. The node setup for the material is extensive but is mainly comprised of mixing generated textures:
Full Setup:

This is the important part though, the emission at the end which for some reason isn't showing through. I however doubt that it is the materials fault since the scene is lit properly from view port rendering.

Modifiers:

So I've managed to narrow it down to the animating of the displacement as the cause of no emission. When I have the empty moving to animate the displacement it no longer emits light and I have no idea why :C

Info has been added

If you suspect that the animating of the displacement is stopping the emission you should try replicating it in a much simpler example. Either you’ll see the same behaviour (in which case it will be easier for someone to pick this up and try and help) or it will work correctly - in which case that wasn’t cause and there’s something different in your ‘broken’ situation.


text:
My config trying to find color management, how can I make it gone?
This is my config from last workplace. My technical director write something into it and now blender trying to find color management. I don't want blender to write this titles. Raw/new blender don't write it. But I need my config. How can I make it?
+ I don't need Aces at all. I need standart srgb. I just want blender not try to find Aces on startup

It looks like your technical director has decided to use ACES with Blender for some really unfortunate reasons. You’ll need the ACES configuration your team is using.

I don't need Aces, I'm working home now in srgb. I need blender not searching ACES

Then mark the other question as the correct solution. In your Blender folder, you will see release/datafiles/colormanagement. Replace it with the default from Blender or another of your choosing.

Look for the color management folder within the previous install folder (C:\Program FIles\Blender Foundation\Blender XXX\datafiles) and copy it to the new install.


text:
Dimensions panel: how to proportionaly get all 3 dimensions entering just one
Is there a way to proportionaly scale an object entering a specific value in only one of the 3 dimensions? Basically I need to "link" the 3 values inside "Dimensions" so if I enter a specific value in 1 the others are automatically calculated.
Exemple: I have an object with these dimesions

I want to enter 2,5m as Y value and to automatically obtain the proportional X and Z value.
How can I do that? It's a very basic function but I can't find it.

I discovered that what I'm looking for is exactly the "Link Scale" function which was present in Transform Panel until version 2:48

I think is insane to remove a function like this. It's unbelievable ...
So.. I really thank those who are suggesting more engineering procedures but I'm looking for something easier as "Scale Link" was.
Really..  there must be a way, an addon or maybe a secret shortcut to simply link the three dimensions in the Transform Panel

Why dont you use S button to scale?

Because it's not what I need. I need to manualy insert 1 value and automatically get the other... What value do you enter after S button to obtain Y= 2,5 ................?

The best solution I've found is the Link Scale script in this forum page: https://blenderartists.org/forum/showthread.php?330451-Link-Scale-script-Please-help-me-with-my-code

Even though the other answer explained the (simple) math, nobody mentioned that you can simply input the two numbers during the scale operation.

Hover over the Dimension property you want change. Press ⎈ CtrlC to copy the current value to clipboard.
In the 3D view press S to enter the scale operation. Now type the number you want to scale the dimension to, then type / (division) and then press ⎈ CtrlV to paste the copied value. LMB confirm click or press enter.

The current scale input is display in the menu bar.
I demonstrate this by scaling the X and Y dimension to 2.

Remember to enter number with a fullstop not a comma.
Don't: 5.000,5
Do:    5000.5

I think your suggestion is helpful but uncomfortable almost as much as that of WKG. In addition, after I press S, if I need for example to enter 5/3 - Blender writes the "/" before the "5" and I get a nonsense [1/(5|)]. If I add the "3" it write [1/(53|)]. The correct one wold be [5/3|] but i impossible to write...
All this makes me even more tired of Blender ..
I also discovered that after 2:49 version Blender has removed the "Link Scale" function from Transform Panel that is exactly what I need. It's unbelievable...

WKG suggests me to enter = after / and now I'm able to use your method. Thanks to you and thanks to WKG. This is not the solution I was looking for but at least it works. I hope this feature will return in the Blender because it is ridiculous to have it removed.
At least I hope someone will create an addon for it.

It's where still the Scale operation should be used. The question is how to obtain right factor for scaling.
The brute force method is to calculate how many times is 2.5 less than 3.356:
3.356 / 2.5 = 1.342
So you want the object to become 1.342 times smaller.
Press S for Scale operation. But if entering 1.342 right now, it will scale 1.342 times bigger, not smaller.
So the only step is to invert this. In order to avoid any 3-rd party calculations, after pressing S enter "=" sign (no quotes) which will make Blender to treat further text as formula and then 1 / 1.342. The final formula:
Press S, then = 1 / 1.342.
This method is brute force at least because final Y dimension would be 2.501 (with mentioned values). This should have to do with floating point precision.

Are you telling me that I need do separately use a calculator to manually obtain a right scale factor when I simply need to enter a dimension value and change the others 2 proportionaly to that? ...... I'm shocked. I rellay do not want to seem ungrateful or unkind, I swear, but sorry it can not be true. Blender can not have a similar lack.

@frenksisco Blender doesn't have lack here (depends on what to understand under a lack though). Answer by Leander alredy pointed out a way to skip any calculations by just copy/paste. But you aren't limited to that - you can setup a driver for Measurement panel to make values change when one is changed. Besides the time for actual setup and for maybe learning drivers, it will be absolutely unefficient to solve it in this way, creating self-changing setup for only one time of changing instead of using simple math.

I'm sorry, this is a great software, maybe the most advanced free opensources software ever. But telling me to write a script, or to use the driver panel, or to use copy, paste and calculations to obtain a basic operation like this ... Is a lack. Yes a great lack.
In this case, any procedure more complicated than simply turning on a "link dimensions" function and enter one single value is a lack.
Moreover, as I said to Leander, although so far it seems the easiest way, I can not make his method work.

@frenksisco if you tried to follow instructions from my answer in Blender you would be able to do ones by Leander - before entering 5/3 enter = sign so it becomes = 5 / 3. Consider absence of poossibility to comfortably enter one value and automatically change others as a lack or whatever you like. It looks like entering absolute values is related. If you are sure it could be that useful provide a feature request or write addon yourself.

Your clarification to Leander method works. Thank you!
I repeat it is not the solution I was looking for but at least it works.
I think it's funny to request as a new feature an old one.. But yes I think this is the time. Where can I make a request for a Blender feature? Is there an official place?

@frenksisco http://blender.stackexchange.com/questions/1190/best-place-to-put-feature-requests

I understand frenksisco's frustration, and after 5 years there is still no ideal solution...
Thanks to the add-on Proportional Dimensions To New Size, the problem of proportional scaling (with mm or inch) of one object has been solved.
Now, problem is when we want to resize multiple selected objects to an exact dimension (mm, inch) without having to merge them.
So far I have found that with the help of “Proportional Dimensions To New Size” add-on I can achieve that simple task with a lot of extra work…
For example, we have two objects that we want to enlarge proportionally by setting the desired height.

select the objects that we want to enlarge proportionally
OBJECT > SNAP > CURSOR TO SELECTED
OBJECT > SET ORIGIN > ORIGIN TO 3D CURSOR
OBJECT > DUPLICATE OBJECTS
move the duplicated objects aside
merge duplicated objects, OBJECT > JOIN
we select the original objects and the duplicated object, for the active object we mark the duplicated
in field Z at “Proportional Dimensions” panel type the desired height

We got our two objects proportionally enlarged to the desired height, we can now delete the duplicated.

Does anyone know of an easier way?

Denis was on the right track, but you may need a little more information.  Let's say you want to scale Y by 2.5.  If you want the other dimensions to scale proportionately, then they should also be scaled by 2.5.  So, with the object selected in Object mode, just press [S] [2] [.] [5] [Enter].  That's it!

No, I'm sorry. I think both of you have not understood.
I do not want to scale Y "by" 2.5 factor...... I want Y to become 2.5m, not times, I want to set a specif dimension in Y - dimensions - not scale factor! - And to automatically and proportionaly obtain the other dimensions ... I really do not now how to better explain the thing .... I can guarantee that in all other 3D modelling software is a very basic feature

I changed the question title to make it less confusing


text:
How to automatically rotate an object on its local z axis to make one of its edges parallel to that of another object
I made a video to better explain what I ask in the title. When I say "parallel to this edge" perhaps it would be more correct to say "parallel to the projection of this edge to the floor"I hope someone can help me

Have you considered a driver?

Via a script.

Getting the angle is relatively simple here. The 3d vector v projected onto Z = 0 plane is simply v.xy ie its x and y coordinates.  The signed angle between two 2d vectors is
v1.angle_signed(v2)

Related Face edges angle - python re projecting into any plane, eg the face normal of target plane.
Once we have this angle can rotate the target mesh by it about its Z axis.
Example script.
Here is an example script with both objects in edit mode. The last selected edge also makes the object the target object to be rotated.  Note, this relies on the two objects NOT sharing a mesh.  (If they did there would be no way to select a different edge in each while both in edit mode)
import bpy
import bmesh
from mathutils import Matrix
from itertools import product
context = bpy.context

ob = context.object
bm = bmesh.from_edit_mesh(ob.data).copy()
bm.transform(ob.matrix_world)
e0 = bm.select_history.active
mw0 = ob.matrix_world
# find closest verts
for o  in context.selected_objects:
    if o is ob or o.type != 'MESH':
        continue
    bm1 = bmesh.from_edit_mesh(o.data).copy()
    bm1.transform(o.matrix_world)
    e1 = bm1.select_history.active
    # find the two closest verts
    v0, v1 = sorted(
            product(e0.verts, e1.verts),
            key= lambda e: (e[1].co - e[0].co).length
            ).pop()
    angle = (e0.other_vert(v0).co - v0.co).xy.angle_signed((v1.co - e1.other_vert(v1).co).xy)
    print(angle)
    # rotate angle about ob origin
    R = (
        Matrix.Translation(mw0.translation) @
        Matrix.Rotation(-angle, 4, 'Z') @
        Matrix.Translation(-mw0.translation)
    )
    ob.matrix_world = R @ mw0

First of all thanks for the help. Unfortunately, however, I was unable to understand much. Both because I'm not very good with English and because I've never used scripts. Basically I did not understand what are the steps to do and under what conditions to do them. Should I first select the two edges in edit mode and then paste your script in the script workspace? Do I need to do something with "v1.angle_signed (v2)" first? Where should I write this? In what condition? Edit mode? Do I have to select the edges? Sorry...

I'm still blundering around in the dark.......


text:
How to align multiple edges to another by moving only their upper vertices
I have a rather complicated case ... at least for me.
As you can see here

I have multiple edges with lower vertex placed on the XY plane. Upper vertices all have different positions and height so all edges have different orientation. I need to align the orientation of all edges to the white one - the active one - without changing the height of their upper vertices and the position of their lower vertices.
The only idea I have is to use the trick to make a vertex coplanar with another of a face. In my case I could use the active edge - the orientation reference - as axis of rotation and the lower vertex of each edge as snap vertex to rotate and align the upper one .... But I have to do it 26 times .......
Since I have a case where I have to do the same thing on more than 50 edges ... does anyone have a simpler idea? Thanks

try positioning the 3D cursor to the upper vertex of the white one and then set the transform to 3d cursor.
Then select all the other upper vertex other than white one and scale them to 0 in respective axis (x or y).
repeating the process to bottom vertices will complete it!

@Nand27 that does not preserve the vertex height.

I would use a script to get the ratios of X and Y to Z on the white edge, and then use those ratios to calculate the new positions of the other vertices.


text:
Object won't drop after keyframing animate physics
I have an animation with many objects falling to the ground and then bouncing and rolling around normally as dictated by physics. For the objects that fall starting at frame 1, everything works perfectly. However, when I try to keyframe an object to fall starting at frame 150, it either hangs in the air or falls within a single frame. When I remove the keyframes, the object jumps from its place above the surface (frame 1-2) to another location (frame 3), then falls at a more realistic rate until it goes through the surface and bounces there. In all scenarios, the rigid body type is Active. The object is a grouped object. More details about the object here.
Scenario 1 - Hanging in the Air
Based on this thread.
Rigid body is active. I have set location and dynamic keyframes at 149 (dynamic off) and 150 (dynamic on). Object hangs in air after frame 150 and does not fall.

Scenario 2 - Drops Through Floor in One Frame
Based on Blender Manual Rigid Body Tips. At frame 149 (animate enabled) the object hangs in the air, until frame 155 when it switches to animate disabled and abruptly goes through the floor in a single frame.

Scenario 3 - Rigidbody with No Keyframes
There might be keyframes, but I have tried to find them and can't. From frame 1-2, the object is hanging in the air.

Frame 3, the object instantly rotates 90 degrees and is translated to a different location.

The object then falls at a normal rate, going through the ground surface at frame 60 where it bounces a little.

This seems like a relatively simple thing to do. What am I missing here?

In case you've missed it, in the "Scene" properties at right and down in it's "Rigid Body Cache" tab are the Start & End sliders that determine over what frame-range the physics will cache.  Check if that covers the frames numbers you're using for the physics stuff.

It covers 1 to 250, with both start and end sliders greyed out. The frames run from 149 to 150 - 149 is the last frame the object hangs in the air, 150 is when it drops. Am I doing something fundamentally wrong here?

I have to admit, I've struck the same problem when wishing to exit animation and switch to physics.  The sliders are greyed out possibly because physics aren't being used at that particular frame.  There are sliders and tweaks that can make quite a difference to it's behavior and I have to confess to the need to experiment with all before I get it right sometimes.  When I cannot I revert to using keyframes and adjust their F curves in some instances.  It takes practice though but at least it's predictable.  Like many, I have a lot to learn in this and many other areas.

To add to the above - I did fix one perplexing display of curious physics by saving the project, exiting Blender, deleting cache files and anything in the Blender's 'temp' folder, and reloading the project.

I've gone into Users/username/AppData/Roaming/Blender Foundation/2.79, but there is no cache folder. I've also tried clearing the cache through hitting Free Bake All in Scene>Rigid Body World, but that had no effect. Removing Rigid Body World has made it so there are no physics at all in any of the objects, even though the keyframes haven't changed.

I'm still using vers 2.77a and cache folders are often deposited in the current project folder. (where the blend file sits)  Couldn't tell you where Vers 2,79 might be putting them but check your project folders.

Try this out - do the physics stuff at frame 1 for the objects that are to start falling at frame 149.   Make sure to tick and keyframe the dynamic and Animation boxes at frame 1.  Try it out.
Once ok, go into the Dopesheet and drag the physics keyframes across to frame 149.  Also untick and keyframe the Animation box at frame 149.  This worked ok in my version and with luck, will work in yours.

See above. also SOLVED I needed to click Hidden Objects in Windows File Explorer to see the cache.

Beauty! :) .....

By solved I meant that I could see the cache, but the main problem of not being able to keyframe remains.

Have you tried my suggestion 4 comments above?  Moving keyframes from 1 to 149?

I have, however, the object goes from its hanging position to the ground in a single frame and I am unable to keyframe realistic physics before moving. Moving the frames does not make the object fall realistically, but continues the single-frame drop. More details on the object here.

I've all but abandoned the physics engine in cases similar to yours, preferring instead, to make up some basic physics 'Master' keyframe sequences (animations) that emulate the physics engine.  These are predictable, can be imported into future projects, can be edited and varied, and don't change their behavior at a later date.  If you want to pursue that method I can place it as an answer here, along with the Blend file.

Please do! I would love to know an alternative.

Emulating bounce physics -
.--.
Producing the basic bounce -
Set the timeline cursor to frame 1.
Set the 3D window to Ortho view mode.
Add a ground plane and keyframe it's Z axis location.  Padlock it's location strip in the Dopesheet so it can't be moved.  Give it rigid body properties (physics) and untick the "Dynamic" box, give it's "Bounce" a value of 1.0 .
Set up a ball (sphere) at some height above the ground plane.  This will be using Blender's physics engine to give us a sequence of bounces with which to emulate with a 2nd ball.  Give it physics and tick it's "Dynamic" box so it will fall and hit the plane. Set it's bounce slider to around 0.6 or whatever suits.
Run the animation to check the physics ball falls and bounces off the ground plane.
Set the maximum animation frame to some time after the last bounce.
Take the timeline cursor back to frame 1 and add another ball, take it to the same starting height as the 1st.
Keyframe it's location slots at right.  This will be our keyframed version.
What is required now is at the frame where the physics ball hits the ground, drag the 2nd ball down to the ground also and keyframe it's location.
Do the same at the frame where the physics ball rises to it's maximum bounce height.  Take the 2nd ball up to that height and keyframe it again.
Repeat the process throughout the bounces.  When played, the 2nd ball won't be falling and rising anything like the physics model, but it should arrive at the ground and maximum bounce heights at the same frame as the 1st ball.
Select the 2nd ball and go to the Graph editor, padlock out all strips that are not the 2nd ball's Z axis location graph.
Make a 3D viewing window, say at top right so you can see what you're doing when you start shaping the curves.
At extreme left select the Z axis strip so it's highlited, then move the arrow back into the editing window.
The z axis' blue curve should be quite prominent.  Press the Home key to center it all.
The bouncing characteristics are determined by the shape of the curves and can if required, be varied to suit any particular scenario.
As we are going for a natural bounce here, emulating the physics ball's bounce is simply a matter of using each keyframe's handles to reshape the curves so the 2nd ball more or less echoes the 1st ball's movements.
At the ground collision frame, a sharp Vee shaped curve is required and one that places the 2nd ball at the ground level, not above or below.  It has to descend and not slow down as it approaches the ground, rather be ripped back upwards rapidly on contact.
At the top of the bounce, it's the opposite situation.  Our ball must slow down and pause slightly before falling again.  This is more easily achieved by stretching the top keyframe's handles out to about a third the distance to the previous and next keyframes at each side, give or take.  Keep the handles reasonably horizontal.
The falling side probably needs a little more handle length than the rising side.
Curves that look like steep hills seem to work best.

Once you get it looking right,  you'll have a set of reliable bounce curves that can be used as 'Masters' for other projects.
-=================-
Importing 'Master Bounce Keyframes -
Simply append the keyframed Blendfile, go to the appended scene,  (top scene menu) and select the 2nd ball, press CTL-C to copy it, animation and all, into the copy buffer.
Go back to the parent scene, get into the layer that's to take the bouncing ball and press CTL-V to copy it.
The ball will retain it's animation keyframes, along with it's other attributes.  It will also appear in the Dope sheet.
Assuming the object that's to take these keyframes has no animation at all, select it's layer, then the object itself.  Take the timeline cursor back to frame 0 (zero) and keyframe te object's location & rotation.
This will give it an appearance in the Dopesheet.
Go to the Dope sheet and padlock out all keyframe strips that don't belong to the new (unbounced) object.
We don't want to mess up anything that's not to be changed.
Press A in the title strips at left so no strips are highlited.
Select only your project's object, (not yet bounced) so it's header at left is all that's highlited.  Select it's Z axis only and padlock out it's X/Y axis' and all rotation strips..
Place the mouse cursor in the Dope sheet's main window and press A until no keyframes are highlited.
Box select the imported (bouncing) ball's Z axis keyframes.  Press CTL-C.
Set the timeline cursor to frame 1 and the mouse cursor into the new object's strip. (This shouldn't be necessary but you can do it anyway - a bit like blowing on the dice before they're rolled)
Press CTL-V and the copied keyframes should appear along the new object's Z axis strip and importantly - beginning at frame 1.
Run the animation and the new object should take on an identical bounce as the imported ball's.
The new object's curves can be varied to suit and once happy, the imported one can be deleted.
So too  the appended scene.
-===================-
In the new project's Dopesheet, keyframes can be offset and varied to avoid 'mirrored' animation.
Curve handles in the Graph Editor can also be adjusted, again to avoid mirroring other objects that may be using the same imported keyframes.

Thanks for this! Tested out on a blank scene and it seems like a good approach. However, I can't get the basic physics to work on the object in my real scene. The surface and test sphere meshes also move out of place after frame 1 (and then perform expected physics). Will try to figure this out before trying out your example in the scene.

Can't say I'm clear on what you're doing but when I employ this method, you either use physics on an object, or keyframes.  Mixing both can be unpredictable.  When removing physics, remnants can still be left in the Dope sheet.  They have to be deleted along with any existing animation.  i.e. start over, or even safer, use a brand new object/model imported/appended.  Physics once applied, do tend to cling to objects even when removed.   If the ground plane (surface?) is moving, try clearing it's animation in the outliner.


text:
Cable spirals in then coil compresses animation
Im working on a cable animation where I need a cable to spiral up a coil, then have the coils compress down. Like the coils laying down on one another.  I can get the cable to come in and go up the coil and I can select the coil path and compress it to do what I want but im not sure how to get that to animate. Any help would be appreciated as I am very new to blender. Thanks

Cable goes up the stretched coil

Then need cables to compress and do this.

It looks like you're already using a curve modifier on a mesh to do this, which is convenient.  You can use hooks:

In edit mode on your curve, you can select a control and its handles then ctrl-h -> hook to new object.  This create a new empty and a new hook modifier that links the selected control and handles to the empty, which can then be animated.
Repeat for every control in your curve:

Now make a new empty at the base of your curve and parent all these new empties to it.  Do not parent the mesh object or the curve to it.  Just the empties.
By scaling this parent empty-- something that is keyframable-- you can move the positions of all of the curves, by moving the positions (and scale) of the child empties.  Here, I am scaling that parent in only its Z axis:

Without affecting the radius of the curve.
To slide the mesh object along the curve, regardless of whether the curve is compressed or not, move the mesh object in its deform axis (from the curve modifier; default is X axis).  In object mode.

You now have controls to compress the coil, from the scale of the hooks' parent, and to slide along the curve, from the translation of the mesh object.  You can keyframe scale or location as appropriate on either of these objects.
Edit: after thinking for a second, you don't need individual hooks for this-- you can hook all controls and handles to the empty at the base of the curve.  (I just tend to use curves for other purposes, with fewer controls, but they all need to be hooked.)

This hook method worked perfectly! thanks for the help!

@RyanB This site is not a regular forum, please don't reply "Thanks" as an answer or comment, instead upvote the post that helped you. If you feel it completely solved your issue consider marking it as accepted.

Not sure if the coil is supposed to move up? If it's not the case, ignore the first steps and only use shapekeys.
Create your spiral, in the Data panel > Geometry > Bevel > give it Depth, enable Fill Caps, at frame 0 keyframe the Factor Start at 0 and Factor End at 0.5 for example:

At frame B keyframe the Factor Start at 0.5 and Factor End at 1:

Create 2 shapekeys, select the second shapekey, squeeze the curve on Z, and at frame C keyframe the Value of second shapekey at 0:

At frame D keyframe the Value of second shapekey at 1:

Result:


text:
Decimals in Geometry Nodes

Hi everyone, I need some help, look, I've been looking for how I can display two decimal places or maybe three in the node information to keep the information on the screen and not have to always open it to remember the number, in the configuration I put 70.52º but the node only shows the first decimal 70.5º, thanks!

I don't think it's possible, according to a 2022 post on blenderartist.


text:
What does this icon mean in blender outliner?

I imported a file from a different program, and am wondering what this icon means. I don't think its a collection or anything cause when I hit off, it just removes the dotted lines between the mass amount of objects I imported. Anyone know?

This is an empty object, and dot lines indicate parent-child relationships between objects.
If this empty object is the parent of other objects, those objects will inherit the transformations of this empty object.
Usually, empty object is retained to facilitate the overall movement of other objects.


text:
How can I separate an extrusion from the object and give it separate material?
I'm really new to Blender and learning some basics. I have a very limited knowledge about modifiers and nodes. So is there any way to separate an extrusion from the main object and give it new color material? I already tried the ctrl+P multiple times and it didn't work.
There's this simple building I'm working on. I used extrude to make a door frame for it. But when I want to give the door frame a different color, the whole building changes the color. I used separation or material by selecting and using control P, but still no results.
The funny part is that I made window frames from the very same object and separated it. It works just fine. but the door! I've been searching it for a while and all the answers were like using the ctrl+P or using nodes and modifiers which is really new and confusing for me.
I left some screen shot for better understanding. <3 sorry if the question is repetitive and dumb XD

I suggest you watch a few videos on using materials in Blender. This section in the Blender manual should get you started and shows that you don't need to separate parts or use modifiers or nodes to achieve waht you want.

CtrlP is to parent an object to another, I doubt this is what you want here? If you want to separate some faces from a mesh to make a new object you need to select them (press L to easily select a separate mesh within the same object) and press P. That said, if you want to give another material to some faces, you don't need to create a new object, just select the faces, create a new material in the Material panel and click on Assign:

omg thank you. yes I already knew this one and simply forgot it. Thanks it worked.


text:
is there a way to render things in front / over other? im trying to remake this character material

Im trying to make the material of this character in blender, i discovered that he's not transparent but has a complex material in the head that make the blob with the eyes appear in front of the material of the head making this fake transparent look. this is a character from fortnite called rippley. In unreal engine he doesn't have a alpha material but an opaque one. is there anyone who can help me with this?
https://www.youtube.com/watch?v=i0SDF5b0Cxc heres a video of how is in the game

this is how the model looks in blender link

it turns around 360° in your video and it looks like he has a transparent helmet, then the green ball as head

he isn't in reality that's the fact, it has an effect that makes the green ball head over the helmet

https://fortnite.gg/cosmetics?id=378 here's another video for demonstration

Have you checked whether the "head ball" and the eyes are inside the character model? Are they individual objects or mesh parts? -- Do you want to animate it? EEVEE or Cycles?

Are you after the effect or an imitation of the shader Unreal uses? If the latter, it might be worthwhile to point out how you know the material is opaque, and provide some additional information about it. By the way, glass shaders in Blender are also opaque.

Recreating this effect in Blender is no simple task without having a better understanding of how the shader is working within the game engine and what render passes or texture maps are involved in the translucent jelly look and the location of the eyes seems to be based on it's orientation to the camera.

the "head ball" is inside the mesh, in unreal engine it works that the "head ball" gets rendered in front of the outside mesh like the "in front" option in the viewport shading option

blunder i would like to use eevee with this since it's a cartoony character and i have more experience with it

if someone can contact me on discord so i can share better model, screenshot my id is durrrmoth


text:
How to split a Mesh with random_selection
I want to split a mesh with random_selection.
My question is: How do I make sure that the "random_selection", selects the faces in a mesh to exact no. as specified by percentage. for example: A 10*10 Mesh contains 100 faces, so 50% of random selection should select exactly 50 faces, but in reality it selects sometime 48, 51, and so on.
here is my noob Code:
import bpy
import bmesh

myob = bpy.ops.mesh
m = bpy.context.object
me = m.data

bpy.ops.mesh.select_all(action='TOGGLE')
bm = bmesh.from_edit_mesh(m.data)
face = bm.faces
myob.select_random(percent=50.0)
if len(bm.faces.select) == 100*50/100:
    bpy.ops.mesh.split
else:
    Pass

I am newbei in Python scripting and blender APIs does not helping me in understanding it clearly on 'How to get access the face information in a mesh'
len(bm.faces) # Will tell the total faces in a mesh
bm.faces[i].select = true # Will select one face at a time

but, how do I know, How much faces are exactly been selected. Any suggestion:
Here is some code I tried:
for i in range(100):
    if bm.faces[i].select:
        fac.append(bm.faces[i])
        count += 1
if len(fac) < 50:
    for i in range(50):
        if bm.faces[i].select == False:
            bm.faces[i].select = True
            fac.append(bm.faces[i])
        continue
    bmesh.update_edit_mesh(m.data, True)
elif len(fac) > 50:
    print (count - 50, "are extra faces." )
    for j in range(100):
        if bm.faces[j].select == True:
            bm.faces[j].select = False
            if bm.faces[j] in fac:
                del fac[j] #problem here
        continue
    bmesh.update_edit_mesh(m.data, True)
else:
    print ("Exactly 50 faces are selected")

I somehow manage to select missing faces to make them 50 faces, but how do I deselect and remove them from list of selected faces.

Is this different from your other 'splitting' question?

If I get the answer of this question then this will help me solving my previous question. I thought to just break down my questions into small parts, so that I can easily get the response from genies.

Yes, random value will give expected value and not the exact. That's why I thought to iterate as long as it will select exactly 50 faces.  I want to select exact portion specified by a percent and split it to make new mesh. I am also open to any other alternative other than random. The newly created meshes should not contain a chunk of consecutive  faces.

A couple of things, can the mesh simply be created rather than using an existing mesh.  To make sure you don't get large islands split down into smaller chunks, eg a 10 by 10 can be split into 25  lots of 2x2 meshes each with 2 randomly selected faces (for 50%)

Yes, to create a mesh with any method is acceptable. What I want to achieve is to split the mesh. I am trying to create a pattern of different objects that will be face duplicated on these split meshes. The pattern should be completed mixed in N by N mesh.

import bpy
import bmesh
myob = bpy.ops.mesh
m = bpy.context.object # objects in the context
me = m.data
bpy.ops.mesh.select_all(action='TOGGLE') #unselect all

bm = bmesh.from_edit_mesh(m.data) # bmesh represention of context data
face = bm.faces     #face coordinates and their indices

def selection(p):
    count = 0
    fac = [] # selected faces are stored in a list
    total = 0
    myob.select_random(percent=p) # random selection
    bmesh.update_edit_mesh(m.data, True) #update to see selection in viewport

 #make sure to iterate each face in a mesh

    for i in range(len(bm.faces)):
        if bm.faces[i].select:
        fac.append(bm.faces[i])
        count += 1
    total += 1
    #print ("total faces in the object are: ",total)

    percent = round(total * p / 100)

    if count < percent:
    #print (50 - count, "faces are missing.")
        diff  = int(percent - count)
        cont = 0
        ind = 0

        while (cont < diff):
            if bm.faces[ind].select == False:
                bm.faces[ind].select = True
                #fac.append(bm.faces[i])
                cont += 1
            else:
                ind += 1
        bmesh.update_edit_mesh(m.data, True)
        print ("%s"%p, "percent of faces, in total",percent, "are selected")

     elif count > percent:
         #print (count - 50, "are extra faces." )
         diff = int(count - percent) #example 5, the next loop should remove these 5 selections from the mesh
         cont = 0
         ind = 0

         while (cont < diff):
             if bm.faces[ind].select == True:
                 bm.faces[ind].select = False
                 cont += 1
             else:
                 ind += 1
         bmesh.update_edit_mesh(m.data, True)
         print ("%s"%p, "percent of faces, in total",percent, "are selected")
     else:
         print ("%s"%p, "percent of faces, in total",percent, "are selected")

 selection(40)

This chunk of code will select exact faces as specified by the percentage.

Here is another take, that randomly selects from all faces using randint(0, len(faces)) pops the selected face from faces list and adds to selected until the desired length is achieved.
import bpy
from random import randint

context = bpy.context
obj = context.edit_object
mesh = obj.data
# check that percent is between 0 and 100.
percent = 40
# test code to run in edit mode
import bmesh
bm = bmesh.from_edit_mesh(mesh)
# deselect all
for f in bm.faces:
    f.select = False
# amount that need to be selected (to nearest int)
select_count = int(percent * len(bm.faces) / 100)
# unselected
faces = [f for f in bm.faces] # could use f.index
# selected
selected = []

while len(selected) < select_count:
    # choose randomly from faces
    i = randint(0, len(faces) - 1)

    # pop and select
    f = faces.pop(i)
    f.select = True
    selected.append(f) # or use f.index
bmesh.update_edit_mesh(mesh)

print("Selected %d of %d" % (len(selected), len(bm.faces)))

You might try str.format() instead of the old formatting at the end... http://stackoverflow.com/a/13452357/6655092

Your code is just half of the length of my version. I do not understand, why did you use Swap. If I omit swap line and insert 'i' in f = faces.pop(i). This will do still the same.

Yes you're right... forgot about indexing pop instead of swap n pop, will edit accordingly,

authors: Валентин Иванков


text:
How to create many properties at the same time using list/arrays
I want to create some integer properties using loops just to save time and lines of code. So basically, the new properties should be something like this:
bpy.types.Scene.prop1
bpy.types.Scene.prop2
bpy.types.Scene.prop3
....
....
bpy.types.Scene.prop10

Here is my approach. First, I created a list of desired variables, "prop1...prop10".
prop_name = ["prop%d"%(i+1) for i in range(10)]

Then I use a for loop to create these properties.
for i, name in enumerate(prop_name):
    bpy.types.Scene.name = bpy.props.IntProperty(name="prop %d"%(i+1))

With this, I expect 10 properties. Now I have 2 issue:
The name that should be shown inside the properties is not changing with respect to their index values.
2nd Issue: I'm not actually able to put them in my Panel. So, I guess, there are no properties created with this method.
(<built-in function Intproperty>, {'name':'prop10','attr':'name'})
(<built-in function Intproperty>, {'name':'prop10','attr':'name'})
(<built-in function Intproperty>, {'name':'prop10','attr':'name'})
(<built-in function Intproperty>, {'name':'prop10','attr':'name'})

How can I change this name with index value, or let me know if there is an another way to create multiple properties.

Use the python built in method setattr

The function assigns the value to the attribute, provided the object allows it. For example, setattr(x, 'foobar', 123) is equivalent to x.foobar = 123.

import bpy
from bpy.props import IntProperty
from bpy.types import Scene

prop_name = ["prop%d" % (i+1) for i in range(10)]

for i, name in enumerate(prop_name):
    setattr(Scene, name, IntProperty(name="prop %d" % (i+1)))

On your code, you are setting the name property of Scene class ten times to an IntProperty.
for i, name in enumerate(prop_name):
    bpy.types.Scene.name = bpy.props.IntProperty(name="prop %d"%(i+1))

is equivalent to
bpy.types.Scene.name = IntProperty(name="prop 1")
bpy.types.Scene.name = IntProperty(name="prop 2")
...
bpy.types.Scene.name = IntProperty(name="prop 10")

This is a double whammy, as Scene already has a StringProperty name.  (eg bpy.data.scenes["NAME"] has "NAME" for a name)  The ID class is a base class for all blender objects in the subclass list. Another clue this is BAD is the blank scene name in UI after running question code.  Click on scene name and it will most likely crash blender.

That works for me but then I stuck again at some time. How do I make the following shorten: bcs = bpy.context.scene and the a variable called props contain all these class objects in a list [bcs.prop1, bcs.prop2, bcs.prop3, bcs.prop4, bcs.prop5, bcs.prop6, bcs.prop7, bcs.prop8, bcs.prop9, bcs.prop10]

https://docs.python.org/3/library/functions.html#getattr

It seems to be a bit complicated to understand this method when one need to use it other way around. Now I understand how to create properties and register it. But now how do I un-register these properties, like del bpy.types.Scene.prop1 in a loop.

Perhaps you could edit your question, or ask a new question, with all these new requests.  AFAIC my answer covers the Q.    Surely after seeing setattr in use , getattr, eg ( [getattr(obj, p) for p in props] ) is not too complicated?


text:
Deform a mesh object in a random manner in Blender using Python

I want to convert simple plane (left) into randomly deform plane (right) using python scripting. The intented deformation should be in x,y dimension. Anybody has idea, I am newbei in blender-python.
myobj = bpy.context.active_object
bpy.ops.object.mode_set(mode='EDIT')
selected_vertices = [i.co for i in myobj.data.vertices if i.select]

for i in selected_vertices:
    bpy.ops.transform.translate(value = i*random.uniform(-1,1), constraint_axis=(True, True, False), constraint_orientation='GLOBAL', mirror=False, proportional='DISABLED', proportional_edit_falloff='SMOOTH', proportional_size=1, release_confirm=True)

This is a very board question. Keep in mind that this is not a forum. We need specific, clear questions if we are to give useful answers. We can't teach you Python, or Blender. But we can help! Please describe what you've tried, what hasn't worked, and exactly what's going wrong.

Oops.... "board" = "broad"

Using bmesh on an edit mesh (run in edit mode)
import bpy
import bmesh
from mathutils import Vector
from random import uniform
context = bpy.context
obj = context.edit_object
mesh = obj.data
delta = 0.2
# get a bmesh
bm = bmesh.from_edit_mesh(mesh)
for v in bm.verts:
    if not v.select:
        continue
    v.co.xy += Vector([uniform(-delta, delta) for axis in "xy"])
#update.
bmesh.update_edit_mesh(mesh)

bpy.ops.transform.translate will translate all selected vertices.  Using it in the loop as you had it, if all verts are selected would move all verts a random amount for each vert. (or nowhere for any vert with a 0 coordinate) You would need to copy the selection, deselect all, select them individually transform the single vert, deselect etc.  Also remember scalar vector multiplication needs to be scalar * vector.