To learn a bit about panels I’ve created a script that measures the distance of selected objects and the 3D cursor (this depends on what is selected).
To be honest I didn’t search if something like this already exists (for 2.5 that is, I know of the 2.4x scripts [1] and [2]).
As already mentioned I did this to learn a bit about the panel API stuff in 2.5.
Usage
This script displays in OBJECT MODE:
The distance of the 3D cursor to the origin of the 3D space (if NOTHING is selected).
The distance of the 3D cursor to the center of an object (if exactly ONE object is selected).
The distance between 2 object centers (if exactly TWO objects are selected).
The surface area of any selected mesh object.
Display in EDIT MODE (Local and Global space supported):
The distance of the 3D cursor to the origin (in Local space it is the object center instead).
The distance of the 3D cursor to a selected vertex.
The distance between 2 selected vertices.
The surface area of any selected face.
It’s very helpful to use one or two “Empty” objects with
“Snap during transform” enabled for fast measurement.
Get units to work with the script (Right now only raw blender units are used, not metric/imperial stuff)
Lamps and other objects are not show with their correct icon … dunno if this is a good idea?
Icon for absolute origin (is there one?)
Measurements in Edit Mode have to be updated manually. Not much I can do here, this is a problem that is in Blender quite some time now.
Download
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
IMPORTANT NOTE! gitorious.org has been discontinued. There is (was?) still a read-only mirror of the former gitorious.org site available - which doesn’t seem to work anymore?
Anyway, the last version is also available in the “Blender Add-ons Contrib” (BAC) Blender code repository:
Link to the script
(Save the “Raw data blob” link there as a file into your .blender/scripts/addons/ directory.
You can then enable the plugin in the User Preferences under Add-Ons.)
Version 0.3.1 of the script is now available
Support for mesh edit mode.
Up to 2 vertices can be selected.
The distances for the various combinations are calculated exactly like in object mode.
Rather then a number input, if this is only for display it could be a label with your own text?
You could abuse grease pencil to draw the lines in the 3D display - python can modify grease pencil points though I didnt test adding new grease pencil data yet.
Yes, that’s how the value got displayed in the very fist version of the script.
Unfortunately one can’t copy a lable text into the clipboard (at least I couldn’t find a way).
So one can measure something, copy the value and use it somewhere else.
(That was one of the reasons why I asked about the FloatProperty stuff on IRC.)
I’ll have a look at the grease pencil stuff. Looks like a good idea.
A non-permanent (i.e. never saved) solution for this would be better in the long run though.
OpenGL drawing (and the temporary FloatProperty for the situation above) would be helpful - but I can manage until then
Thanks for the link, I’ve added this to the original post.
I’ve planned to add various measurements like this to the script, but I’m still working out the details.
Couldn’t agree more, but until somthing like this is integrated into the script may take some time.
Fixed calculation & display of local/global coordinates in edit mode.
The user can select the space via a toggle switch.
Basically this is a bugfix and new feature at the same time
Calculate & display the surface area of mesh objects (local space only right now).
when i change the location fo the cursor i don’t see the update of the dist
how can i see it ?
i mean if i wait about 5 seconds then i see it update in N panel
this is sa little slow!
anything i more i have to do to see it faster ?
Distance
this is the root means square distance between 2 points in space right !
the X Y Z values would be the one in Transform panel
and the dist in 3D is the value you calculated
Suggestion
now one suggestion here can you give the 2 angles in 3D for this distance vector
i mean this would give the whole picture for this distance - vector
by angle i mean like if you where in Spherical coordinates system
one angle around Z and one between vector and floor
vekoon fixed a bug there where a change of 3D cursor position didn’t update the panels.
Fix for 3d view’s properties region notifier: 3D cursor position was not updated
If you can’t get a more recent version yet you can force the update by quickly switching into editmode/object mode and back [TAB]. Or selecting something.
No need for a drawing, I know what you are talking about.
I was thinking about adding angles, but for that I’d need some sort of graphical display (in the 3D view) first.
Look at the original post, the screenshot should be updated with the most recent look of the panels. (try force-reloading the web page of the thread if no “area” stuff is in the image)
This is normal. That’s what “local” means in the context of mesh objects.
The calculated value is the surface area of the un-scaled object.
The “Global” value is on my to-do list.
Global surface area (object mode) is now calculated as well. i.e. scaling is applied.
Support area calculation for face selection in edit mode
(This seems to cause some problems because of the constant exiting/re-entering of editmode :(. Not much I can do there - I think.).