Set Dimensions in Edit Mode

I just answered a question on Blender Stack Exchange with a new add-on I built that lets you set the dimensions of selected vertices in Blender. Previously (AFAIK) you could only set the dimensions of an object, not parts of the mesh. This could be a great asset in architectural modeling, and a slightly hidden feature that I threw in there is that when you invoke the operator by clicking the button, the tools dialog will have the dimensions set to what the selected verts are at the moment. So not only can you set the dimension, but you can also check the dimension easily of the selected verts. I hope you guys find it useful…let me know about any improvements to make =)

Here is the BSE answer:

http://blender.stackexchange.com/a/68678/28015

Here is the GitHub link:

https://i.stack.imgur.com/yRJnx.gif

9 Likes

The usefull tool. Thanks

Really useful, it fills a gap in the Blender tools
I wanted this so many times…

Thank you very much,
paolo

Thanks for making this excellent tool :eyebrowlift2:

Is there maybe a solution to add a shortcut to this great tool ?

@Benny You should be able to right click on the operator in the menu, then choose to add a shortcut from there. This works for all operators in Blender, you just might want to search through the “Input” tab of the user preferences to make sure that the key you want to assign to it isn’t already taken (in the context of the 3D view).

Normaly but for some reason this is not working for me , can someone try this ? or do i something wrong ? ( with other operators it works but not with your tool :frowning:

@Benny You’re right…I didn’t try it when I mentioned that to you. I’ll look into what’s causing that and try to fix it or let you know why.

Excellent :eyebrowlift:

@Benny Alright, it should be fixed. Thanks for pointing that out!

Thanks for the New Update add shortcut works fine , :eyebrowlift::p:evilgrin:

hi, a little bit late on the issue but i just downloaded the plug-in, it works well but if i add a shortcut to this it didnt work, any reason why?

@ultradryan Could you elaborate on what you mean by “it didn’t work”? Also, did you get the latest version on GitHub?

This might just be the answer to my prayers! I’ve been dying for something like this having come from Modo.

Here’s how it works in Modo:

What I didn’t show is that you can type in a number in Inches, Milimeters, Centimeters, etc. and it’ll automatically convert it to whatever scale system your using. You can also do math to get whatever number you’re looking for. I think Blender does this too, but I haven’t tried your addon yet. But this looks incredible! Thank you so much!

I would love for this to be in a popup that I can invoke after selecting my verts. If anyone has any tips on adding this through Pie Menu Editor that’d be great, but I’ll keep poking at it.

This is nice, but I wonder if it’s possible to also add to it with a checkbox that would allow you the scale up the entire geometry based on the scale of the selected verts. So if you were scaling an object and you knew the dimensions of one part of it, you would select the verts on that part, dial in the amount and the whole object gets scaled up to correct scale proportions based on that. Perhaps there’s something in blender that already provides this.

@djwaterman If you hit set dimensions, it will by default tell you the dimensions of the selected vertices in the Blender world. Then if you know the dimensions that it should be, you have a factor to scale by and that’s all you need (you could just do a scale operation) e.g.:

Say the add-on says the selected part of the object is 0.5 m x 0.4 m x 0.3 m, and it should have x,y,z dimensions of 3, 5, and 2 meters. Then you would need to scale (using Blender’s built-in scale tool) the entire object by:

x: 3 / 0.5
y: 5 / 0.4
z: 2 / 0.3

to get the desired dimensions.

This is pretty straightforward to include in the add-on obviously, so I might add it this weekend if I have time.

@Zimlorog Yeah, Blender already does most of what you said. As for the pie menu, I think it would have to be in the add-on code. Which pie menu were you wanting this added to?

@Graphics_Dev I don’t have a particular pie menu in mind, I just know that Pie Menu Editor is really powerful. But basically if it could pop up a panel like F6. I think I’ll try a macro that will run Set Dimensions, then run F6. I just want to work full screen 100% of the time if I can.

Really nice man, i wanted to make it myself but thought let me look for one first. Do you mind if i take some of the code?

PS the min=0 for the new_x y z cause one issue though. When it reaches 0, you can enlarge it no more. Better use something like min=0.01 or lower if needed.

PS how can use the scaling from origin instead of from local mid of the object?
Ive transformed a part of the code so i could use it in a panel. Therefor i needed to make regular functions from the class. I see with your version it does take note when pivot is set to 3d cursor. While in my edit it always resizes from the center of the mesh

I believe I’ve got it working!

Simply change line 107:

box.label(“New dimensions:”)

to

box.label(text=“New dimensions:”)

2 Likes