A script to place cursor on objects' surface (and some other functionality)

Oops! That’s a big omission on my part, thanks for pointing it out. I’ve updated the wiki page and the SVN version.
BTW, when I experiment with something, I put it on my personal repository first (https://github.com/dairin0d). I forgot that the 2.9.2 version never actually got out of the “release candidate” state.

Thanks dairin, 2.9.2 works like a charm! :slight_smile:

What’s the matter with the hiding feature for 3d cursor? Why does it cause constant redraws?

can you extend your addon functionality with this?
http://www.pasteall.org/51734

nikitron, there are at least several problems with that.

  1. What, in human words, the code you provided is actually supposed to do? I’m not quite sure what is the intent/purpose behind it.
  2. Whatever you are trying to achieve with this script, seems to be more about setting the origin of objects, rather than actually manipulating 3D cursor. And 3D cursor manipulation is sorta what my addon is all about.
  3. Why do you even need such functionality in my addon? Your use-case seems to be rather specific (maybe only you will ever need it), so probably you’re better off writing your own mini-addon, or even using your script as-is.
  4. I don’t have enough spare time lately even to get up to speed with changes in Blender 2.7+ Python API, so adding new functionality is likely out of question until I’m certain that my addons work well in the latest version of Blender.

Thanks for Authors for Enhance 3D Cursor addon! I have a question about snapping to grid, when Grid floor in Display tab is set other than Scale:1, Subdivision:10 snapping misses grid. Maybe is possible to add option to snap to currently adjusted grid. Thanks.

Maybe Author of Enhance 3D Cursor will be interested to add new feature (or create new addon) for manage XYZ guidelines, show ruler…

Attachments



hello, when I have my object origin at 0x0x0 and my 3D cursor is currently at position e.g. 1x1x1, and when I run option Object->Transform->Origin to 3D cursor, origin of my object is going to position 1x1x1 (OK!) but cursor is also going to position 2.0867x1.0000x1.0300 (not OK) instead stay at 1x1x1, why?

PiotrPL, thanks, seems like I did overlook the Grid Scale. I’ve modified the script to use this parameter (latest version can be downloaded from my github repository). As for guidelines – such a thing is indeed better as a different addon. Maybe there are some CAD addons that implement this feature? One way or another, I doubt that I’ll be able to do any serious addon development any time soon.
Concerning the 0x0x0 -> 1x1x1 situation, I suspect that you have “cursor sticking” option enabled. When it’s on (which is the default setting), the cursor will “stick” to the last object it was snapped to, i.e. it would move/rotate with the object. The button to toggle it on/off is located in the “3D Cursor Tools” panel (in 3D View -> Properties shelf) and has a picture of a magnet. This is a per-.blend setting, so if you want it off by default in new .blends, you’ll have to modify Blender’s startup file.

thanks for reply. About “cursor sticking” yes, you are right. About 2.9.4 version, thanks for share. I am afraid when Grid floor other than Scale:1, Subdivision:10 addon still not snapping to grid. Also if I start moving cursor not from e.g. 0x0 grid point, it not snap to nearest grid intersection… Your addon is necessary, I am thinking about something like snapping to grid in Inkscape, Corel.

The addon tries to behave the same way as Blender does when using the Transform (Grab/Rotate/Scale) operator. Blender snaps the offset instead of the absolute position, so my addon does the same by default. However, you can switch off the “Relative coordinates” option (located in the “Transform extra options” panel in the Properties shelf), which would let you snap cursor to a “global” grid (BTW, “Relative coordinates” can be toggled on/off during the cursor-dragging via the A key). I suggest you to read the documentation, maybe there are other features you’ll find useful.
Also, you can always snap objects and cursor to the grid using the 3D View’s Object->Snap menu.
As for Subdivision – this parameter affects only how Blender displays the grid, not the snapping behavior.

dairin0d thank you, I have reinstalled my Blender, and add your addon again. Works excellent, thanks.

Hello again, there is in “Use comma separator” in Transform Extra Options tab. I can not find info about this feature.

I’ve updated the wiki page. Sorry for the confusion :slight_smile:

Just want to say: Awesome script! Will make my colleague (architect) here in the office, who is about to switch from 3dsMax to Blender, VERY happy. :slight_smile:
Great work!

Hi dairin0b,

Your add-on is always excellent but there are a problem with the other add-ons because your addon blocks the use of the F8 button “reload the scripts” with this message:
“Report error:
Can’t reload with running modal operators”

-> Enhanced Cursor add-on r2.94

on Bi-quad Q9600 2.66Ghz Windows Vista SSE2 Blender 2.71.6 hash:a7f87cf
GraphicCard Nvidia GT630 OpenGL Cuda Core 4 Go

sebastian_k, Spirou4D, I’m glad you find it useful :slight_smile:

Spirou4D, I’ve added a condition to stop the modal operator when ‘script.reload’ key (usually F8) is pressed (see the 2.9.5 version). However, this trick works only in the main window (you’d still get the error in the UserPreferences window, for example).

Hi dairin0d,

Thanks but I have had the error in 3D view, pressing F8.
I have installed your new release and not problem now: Great Thanks for your so speed answer.
Congrats
Spirou4D

Hi, dairin0d
Thank you for awesome addon, it is really useful thing to have!
Sorry, I’m noob in Blender
I navigate in 3d viewport with RMB, select with LMB and I was going to place 3D cursor with MMB.
But it seems that it is impossible using “3D enhanced cursor”
When addon is turned on MMB stops working and check from checkbox “Set 3D cursor”(User Pref/Input) constantly disappears (In Blender 2.7 Win64)
In Debian Wheezy (Blender 2.7) behaviour of Input tab is even stranger - checkboxes become unclickable.
I wonder, if there is a way to have the possibility to MMB set 3D Cursor and to use your addon simultaneously?
Thanks a lot
Best wishes
P.S. Sorry for bad English

When installing this addon, the Blender’s own tooltips are not showing up anymore until i uninstall the addon. Any idea if this is a bug, or should I change a setting ?

This is a bug (another user has reported it before), but currently I have no idea what causes it. :frowning: On my computer the tooltips are showing, so I don’t even know how to reproduce the bug. Which version of Blender do you use? What addons do you have enabled? Did you set up some custom shortcuts?