Introduces similar functionality to Grab/Move, but with cursor instead of object.
Closed, ArchivedPublic

Description

Project: Blender Extensions
Tracker: Py Scripts Upload
Blender: 2.59
Category: 3D View
Python: 3.1
Script name: Enhanced Set 3D Cursor
Author(s): dairin0d
Status: Closed

Features:
- Drag cursor
- Constrain cursor movement to:
- surface of raycastable objects
- axes of selected coordinate system
- exact axis values in the selected coordinate system
- Make snapshots of surface normal (either face or interpolated)

----------------------------------------------------------------------
Setup:
Put the script in your addons folder.
Activate it in User Preferences / Add-Ons Panel

----------------------------------------------------------------------
Manual:

Drag cursor with Action mouse button.

Holding Alt while pressing the mouse button would snap cursor to the nearest raycastable surface; in that case, surface normal is displayed.

To discard changes in cursor position, press Esc key or Select mouse button.

If view is locked to cursor, after initial repositioning, cursor location would be changed in little increments, thus making view "slide" smoothly with the cursor.

Press Tilde (Accent Grave) key to be able to move cursor without the need to hold Action mouse button. Changes to cursor position would be confirmed on the next Action mouse press.

Press W to make snapshot of raycasted normal. It will be added to scene as new Empty of "SINGLE_ARROW" type.

Press Q to enable/disable coordinate system synchronizing. If disabled, the operator would always start with "GLOBAL" transform orientation selected, and changes in transform orientation would be reverted when operator ends.

Press F to enable/disable normal interpolation. If enabled, resulting normal would be found by barycentric triangle interpolation (non-triangle faces are tesselated). Otherwise, face normal would be used.

Press D to raycast against the "raw" mesh without any modifiers applied. This makes difference only for active mesh in edit mode.

Press K to enable/disable locking view on cursor.

You can enter exact coordinates for any of XYZ axes; they override any constraints and positioning made with mouse. Any valid basic numeric expressions are accepted.
To remove last character in current input axis, press Backspace.
To switch input to the next axis (or previous, if combined with Shift), press Tab or Return/Enter.
To clear current axis input, press Delete.

Press A to switch between absolute and relative coordinates. In relative coordinates the position of cursor at the time of operator initialization would be considered origin (0, 0, 0). For absolute coordinates, the origin would depend on the selected transform orientation.

Press X, Y or Z to constrain cursor movement to a single axis of selected coordinate system. Pressing them with Shift would constrain cursor movement to other two axes. Pressing the same key twice would remove constraints.

To select coordinate system, press one of the following:
V -- View. Absolute origin is at cursor initial position.
G -- Global. Absolute origin is at global center (0, 0, 0).
L -- Local. Absolute origin at active object's origin. If there is no active object, this will coincide with Global.
N -- Normal. Currently same as Local.
I -- Gimbal. Currently same as Local.
M -- Mesh. Same as Local, but takes into account scale/shear.
S -- Surface. Z axis will be aligned with raycasted normal direction, X axis will lie in global XY plane. Absolute origin is the raycasted point.
C -- Custom transform orientation. Pressing this key in succession would cycle through available custom transform orientations. Absolute origin is at cursor initial position.

Details

Type
Patch

Already fixed yet another bug.
By the way, is there a way to edit script description?

Trying to attach the bugfix %)

hi,
If you need to attatch a new file,
Write a comment, then go to attatchments & add your file, then press Save Changes.
this should work.
Thanks for submitting your script
we will look at reviewing it soon.
Also, are you familiar with the cursor tools in contrib?
These may be phased out & quite possibly yours phased in.
have a look if there are any functions that may be useful, remember to credit the author if you reuse some code.
Thanks..

Hi :) Thanks for the advice!
Added snapping to grid / vertices / faces / edges.

I had a glance at seminumerical's cursor control scripts, but I can't say I'm familiar with them. They offer qiute a number of functions... Stored Locations and cursor position history are obviously useful. As for CAD-like cursor snapping utilities, I suppose there should be some sort of discussion what CAD tools Blender users actually want in their day-to-day modeling, and what would be the most user-friendly way to implement them... Maybe some CAD operations are better done not through cursor snapping but as some interactive tools? I had no much experience with CAD modeling, so I can't really tell.

Version 1.0.0, yay!
Also added keymap picture and manual as separate file :-)

Hi,
Just a Reminder for people to Join the Mail List.
If you have not already, please visit this page:
http://lists.blender.org/mailman/listinfo/bf-extensions-cvs
& join the list.

Version 2.0.0.
BTW, joined the mailing list :-)

Bugfix.
Perhaps from now on I'll post all future versions on sourceforge.

Another couple of bugfixes. Uploaded here, as well as to SourceForge:
https://sourceforge.net/p/blender-cursor/code-0/2/tree/trunk/enhanced_3d_cursor.py?format=raw

Hi there!
Glad to see more people showing some love for the poor little 3D-cursor.

Hi, Morgan!
Nice to know you're active again :-) Since my addon ended up having partially similar functionality to the Cursor Control, I guess we need to discuss further directions of development with blenderpython head developers?

I just hit the "report bug" button and he direct me to this page...
I'm not sure if it is the place to report but with recent svn, precisely r43526 and the version of add-on is 2.8.0, the option to drag the cursor is not working...
This add-on is really useful! It saves a lot of time. I'm very thankful by this add-on.
Thank's for everyone involved!

Thanks! I almost forgot someone would use this page... I have fixed the issue some time ago, but it haven't been uploaded to SVN yet. For now, you can get the fix from here: http://sourceforge.net/p/blender-cursor/code-0/15/tree/trunk/space_view3d_enhanced_3d_cursor.py?format=raw (replace with it the blender/2.61/scripts/addons_contrib/space_view3d_enhanced_3d_cursor.py)

BTW, the blenderartists' thread is more frequently updated :) http://blenderartists.org/forum/showthread.php?229754-A-script-to-place-cursor-on-objects-surface-%28and-some-other-functionality%29

Uploaded to contrib SVN! https://svn.blender.org/svnroot/bf-extensions/contrib/py/scripts/addons/space_view3d_enhanced_3d_cursor.py
New blender builds would be likely to contain the fixed addon from now on.

Hey! Thank you! That was really fast!!!
Thank you again for you efforts!!!

Hi,
Due to changes to the api including the merging of bmesh, several addons are outdated.
Please, if you are the author of an addon check your script with blender revision 44256 or newer.
That is builds made After blender 2.62 official release.
I would ask that updates be made to your addon before the Blender 2.63 release.
6-8 weeks away.
This allows time for the api to become more exposed & bmesh to stablize furthur.
If you need help, drop into irc freenode #blenderpython or #blendercoders & feel welcome to ask questions.
At the time of 2.63 release, scripts that are not repaired or in active developement will have their tracker page marked "Closed"
this will not affect your links to the tracker, similar to closing scripts in 2.49b, the page will be still availible & can be re-opened.

Thanks for your understanding & patience during these Exciting Times.
Brendon.

Please respond - anyone experienced such annoying bug:
After switching to another window type eg. from 3D to UV -> abnormal termination and...out.
OR (and thats interesting) after splitting the display horiz. and/or vert. and assigning 3D to the first window and UV to the other - crashes too, ....BUT: only when UV had been assigned first and stays as Upper or Right window, otherwise seems ok.


My desktop: Win7 x64 Premium 8GB RAM, Nvidia GTX260 latest drivers.

Thanks for the bug report, I committed a fix. I just commented out several lines of code, but I'm not sure if it solves the problem completely... Hope it won't create new bugs =) Since I'm doing almost a full rewrite of the addon, anything too complicated to fix might be postponed until the new version is ready.

Seems the add-on is ON-HOLD due to rewrite -am I right(cause does not work) ??


Win 7 x64, Blender r45130 ( a few previous also)

Text is not a valid section.
Text is not a valid section.
search for unknown operator 'VIEW3D_OT_cursor3d_enhanced', 'VIEW3D_OT_cursor3d_e
nhanced'
search for unknown operator 'VIEW3D_OT_cursor3d_enhanced', 'VIEW3D_OT_cursor3d_e
nhanced'
search for unknown operator 'VIEW3D_OT_cursor3d_enhanced', 'VIEW3D_OT_cursor3d_e
nhanced'
search for unknown operator 'VIEW3D_OT_cursor3d_enhanced', 'VIEW3D_OT_cursor3d_e
nhanced'

There were some API changes in recent revisions which finally completely broke current version of add-on. I'm trying to fix it at least enough to have a working addon again, but this may take some time. Thanks for the notification, anyway -- I haven't encountered "search for unknown operator" (yet).

I fixed obvious bugs (tested only some functionality of the addon, in r45133 windows 32bit build); now the addon should at least not break.

Besides the API changes, Blender behavior has changed in more subtle ways. Some lateral functionality of the addon may not work properly (e.g. displayed surface normal); some I had to turn off (e.g. interactive recalculation of coordinate system -- in some places it caused bugs, in others it caused huge processor load).

hi, this addon is in contrib now & a page exsists for it in contrib here:
http://projects.blender.org/tracker/index.php?func=detail&aid=29235
closing this page, please report bugs to the new page

Hi, great addon!
I noticed a bug using v2.9.6 with Blender v2.7.2 (Windows 8) on the Text Editor:
Text selection is not working. As a consequence there is no way to copy some text by selection.

Never mind about the bug, I didn't see the new page. I reinstalled the file from there and everything works fine!

On 2.73 this plugin seems to cause Tooltips to vanish.

I know about this bug, but I won't be able to fix it quickly. It's caused by keymap auto-registration; for now you can try to turn off the keymap auto-registration in the addon preferences.

Здравствуйте. Спасибо за нужный и полезный инструмент. Аддон на Блендер 2.76 работал без проблем. Но не работает в версии 2.77 (Вин. 7). Привязки не действуют, кроме привязки к приращению сетки, но курсор привязывается не к пересечению линий сетки, а между ними. Жду решения.

Strange. It works as usual for me in 2.77. Where/when did you download the addon?
Whether or not the cursor snaps to the grid line intersections depends on the "relative coordinates" option in the "Transform Extra Options" panel (in the Properties Shelf).

Странно. У меня он работает как обычно в 2.77. Где / когда вы скачали аддон?
Привязывается ли курсор к пересечениям линий сетки или нет, зависит от опции "relative coordinates" в панели "Transform Extra Options" (в Полке свойств).

Скачал c

https://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/3D_interaction/Enhanced_3D_Cursor

Скачал 25.12.2015. Аддон работал без проблем в Блендере 2.76 на вин-8 х64, возникли проблемы с драйверами на видеокарту (не из-за аддона ))), после некоторых продолжительных изощренных танцев с ними пришлось перейти на вин-7 х64. Все настроил, работает всё на «ура», но это классная вещь не работает. Пришлось искать альтернативу. Нашёл аддон CursorControl-0.8.0, но ваше детище на много удобней (лично для меня). Если есть какие-нибудь соображения, то делитесь, я проверю у себя. Может я что-то не так делаю, хотя в установке всё предельно просто и настройки не сложные.

В консоли (меню Window -> Toggle System Console) какие-либо ошибки выдаются? Напишите мне приватное сообщение (например, на blenderartists.org).
http://www.blenderartists.org/forum/member.php?103850-dairin0d

Написал на blenderartists.org, проверяйте.