Commit Graph

147 Commits

Author SHA1 Message Date
Campbell Barton 927af4ccc9 mask transform now works in the image space 2012-07-25 19:36:59 +00:00
Campbell Barton 7fba5779ed match function names for clip/image spaces 2012-07-25 16:30:53 +00:00
Campbell Barton 62a73381a7 use fabsf when using floats. 2012-07-21 15:27:40 +00:00
Campbell Barton 250cdd5e52 code cleanup: remove commented includes - mostly from 2.4x 2012-07-18 23:07:07 +00:00
Campbell Barton 9f22750422 style cleanup 2012-07-04 20:47:12 +00:00
Lukas Toenne 83093d6770 Extended modes for snapping in the node editor.
The transform operators in nodes will now use the unselected nodes to generate snapping points. Unlike object snapping, node snapping works for the x/y axes separately and snaps node borders to same borders of unselected nodes. The sensitive area for node borders extends over the whole view2D range, to enable simple alignment of nodes in both x and y direction.

For snap points in the node editor an additional enum value is stored to indicate the type of node border (left/right/top/bottom). This works as a constraint on possible node alignments: only same border types align with each other.
2012-06-29 14:34:46 +00:00
Lukas Toenne 855b6391ea Basic snapping in node transform operator.
Snapping actually was working already, but grid spacing was set to 1.0, which is basically pixel size in the node editor. Increased this to 1x grid step for fine snapping and 5x grid step for rough snapping.

Grid drawing in node editor now draws 2 levels in slightly different shades to indicate the different snapping modes better.

Node editor also supports the general use_snap tool setting to enable automatic snapping during transform. For now only the incremental snapping is supported, in future could be extended to enable alignment between nodes in a number of ways.
2012-06-28 08:47:22 +00:00
Campbell Barton f5f25b81e8 style cleanup:
also fix for building ghost test and fix double free in one of the tests
2012-06-17 09:58:26 +00:00
Campbell Barton 869efe927c style cleanup 2012-06-10 22:13:17 +00:00
Campbell Barton da710b3e14 style cleanup: brace placement/newlines 2012-05-24 16:35:45 +00:00
Campbell Barton 2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
Campbell Barton ed679693c9 style cleanup: whitespace/indentation 2012-05-19 13:55:54 +00:00
Campbell Barton a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
Campbell Barton 343edf2722 style cleanup: function calls & whitespace. 2012-04-29 17:11:40 +00:00
Campbell Barton e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
Campbell Barton b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
Campbell Barton a72076a2da bmesh todo: snap to volume with dupli's works again 2012-04-16 10:09:26 +00:00
Campbell Barton 09f29c0b70 style/name cleanup: have EDBM_* functions match our style guide and also match BM_ function naming conventions 2012-03-27 04:46:52 +00:00
Campbell Barton ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
Martin Poirier 67f1e83508 [#30373] Which part to snap in volume snapping is removed
By Bug reported by Pep Ribal

Also fixed an object mode bug with volume snapping and made it compatible with the edit mode "Snap on self" option
2012-03-10 21:40:35 +00:00
Campbell Barton 46045fbb09 style cleanup - braces & else / if's 2012-03-07 04:53:43 +00:00
Campbell Barton 31d2ee9bf7 style cleanup, brackets in else/if, some indentation. 2012-03-06 18:40:15 +00:00
Campbell Barton a2c182e923 style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide). 2012-03-03 16:31:46 +00:00
Campbell Barton 622ac0dd16 code cleanup:
replace casts: '((Mesh *)ob->data)->edit_btmesh' with 'BMEdit_FromObject(ob)'

also minor style edits.
2012-03-02 12:09:49 +00:00
Campbell Barton ed04c21374 code cleanup: use float vector size in function definitions, and const's where the values are unchanged. 2012-02-28 14:05:00 +00:00
Campbell Barton a368e6771a - remove some unused editmesh functions.
- copy & rename EditMesh stricts for use with scanfill (remove unused members)
2012-02-19 22:17:30 +00:00
Campbell Barton b6dcdb065d code refactor, function renaming for bmesh.
These changes are to make the bmesh api more consistent and easier to learn, grouping similar functions which is convenient for autocomplete.
This uses similar convention to RNA. 

* use face/loop/edge/vert as a prefix for functions.
* use 'elem' as a prefix too for functions that can take any type with a BMHeader.
* changed from camel case to underscore separated (like RNA).
2012-02-12 10:51:45 +00:00
Campbell Barton 8b43813b69 rename BM_ flags for BMHeader->hflag to BM_ELEM_ to be more clear that these flags apply to bmesh elements. 2012-02-12 06:24:12 +00:00
Campbell Barton 705f23064e svn merge ^/trunk/blender -r43294:43338 2012-01-13 01:39:57 +00:00
Campbell Barton f66f33cefc rename RNA_property_is_set() --> RNA_struct_property_is_set() in preperation to add a second version of the function which takes the property rather then its name. 2012-01-11 16:32:12 +00:00
Campbell Barton f63e33303f svn merge ^/trunk/blender -r42871:42882 2011-12-26 21:39:16 +00:00
Martin Poirier 8cc96408df [#29144] Snapping control points: can't choose which one to delete
Reported by Pep Ribal
You can now select which snap point to remove (with Alt-A) by moving the cursor over them.
Display colors are also used to indicate which snap points are active, selected or just there.
2011-12-26 20:23:07 +00:00
Martin Poirier d8ab99c147 [#29611] Crash when scale one vertex with snap.
Reported by Andrey Penyaz
Scale snap defaults to 1 when snapping is impossible (distance to center of transformation is zero).
2011-12-26 19:03:32 +00:00
Campbell Barton 4ced91da47 svn merge ^/trunk/blender -r42778:42839 2011-12-23 08:41:53 +00:00
Campbell Barton 51016c4dea split >120 length lines (mostly if statements) 2011-12-22 00:03:20 +00:00
Campbell Barton 3c8d86e117 svn merge ^/trunk/blender -r41961:41998 2011-11-20 01:14:33 +00:00
Campbell Barton 14ddf19ad2 make it clearer which arguments in transform snap are return values (no functional change) 2011-11-19 00:52:54 +00:00
Campbell Barton c00c0134e0 svn merge -r41847:41899 ^/trunk/blender 2011-11-16 03:10:15 +00:00
Campbell Barton 0c7a25cd0e patch [#28993] wm_window_match_do(): Fix crash on null pointer dereference
from Ola Jeppsson (olajep)

also some cleanup edits
2011-11-15 16:38:48 +00:00
Campbell Barton 15e6d6cd75 svn merge ^/trunk/blender -r41226:41227 . 2011-10-24 12:43:08 +00:00
Campbell Barton 4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Campbell Barton 4a157de23d svn merge ^/trunk/blender -r40587:40643 2011-09-28 07:34:48 +00:00
Campbell Barton 018fa1540e whitespace edits, make formatting for functions consustent at least within the file. 2011-09-28 05:53:40 +00:00
Campbell Barton fddc655aec svn merge -r40140:r40148 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-09-12 04:57:20 +00:00
Campbell Barton 4bd0a2ba2d replace VECCOPY -> copy_v3_v3, added copy_v*_v*_short too for typesafe copying, some parts of the code are copying float -> short normals without scaling. fix coming next. 2011-09-12 04:14:12 +00:00
Campbell Barton 73dde4e26f svn merge -r38718:38804 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-07-29 02:03:53 +00:00
Campbell Barton a5631dba89 only initialize snap from the scene settings for view3d and image spaces since snap in the 3D view was enabling snap in the graph editor and sequencer without a button to disable it in those spaces. 2011-07-28 02:15:58 +00:00
Campbell Barton 3b6cb504b1 minor warning fixes for clang-static-checker 2011-07-27 13:03:56 +00:00
Campbell Barton 46cea37266 fix [#28066] Unchecking 'self project' messes up 'Snap to Vertex'
this option is useful for all non-grid snapping modes (when in editmode) so make available in those cases too.
2011-07-27 07:22:31 +00:00
Campbell Barton ca293c835f correct misc warnings 2011-07-26 13:33:04 +00:00