Commit Graph

99 Commits

Author SHA1 Message Date
f745564e4e GSOC 2013 paint
Yep, at last it's here!

There are a few minor issues remaining but development can go on in
master after discussion at blender institute.

For full list of features see:

http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Painting

Thanks to Sergey and Campbell for the extensive review and to the
countless artists that have given their input and reported issues during
development.
2014-07-21 12:02:05 +02:00
00b29156e0 Defines: replace ELEM3-16 with ELEM(...), that can take varargs 2014-07-20 01:33:40 +10:00
d303556afb Code cleanup: remove file handling headers where they arent needed 2014-05-02 05:37:11 +10:00
409fb4da0c Code cleanup: remove redundant matrix initialization 2014-04-29 18:13:20 +10:00
ae792e930c Fix T39479: Transform mouse constraint fails in some situations.
Some more float precision issue...
2014-04-06 11:11:56 +02:00
fcaa018249 Fix T39347: Pressing backspace during empty number input for translation results in 0.5828 increments
Interesting one, took me hours to understand the issue - a stupid typo checking the wrong value against the wrong flag (present since 2008!).
2014-03-23 10:59:52 +01:00
3bad243cb8 Further tweaking to numinput - enhance 'Reset' behavior.
Ways how it was resetting its values (backspace) was far from satisfaying. Now, e.g. when scaling, it will reset at 1 (or whatever mouse-value it was before entering numinput), instead of some ugly 0.0 value.

Implementation details:
* Values passed to applyNumInput() are stored as default ones (val_org), if it is not EDITED.
* applyNumInput() returns a boolean saying whether it actually set values or not.
* When backspace hits its ultimate step (where it clears all EDITED flags and reset all default values),
  it sets a temp FAKE_EDITED flag that will be used to apply one last time values of numinput
  (so that default values actually get applied!).

There are important things to note here for code using numinput:
* Values passed to applyNumInput() should be valid and are stored as default ones (val_org), if it is not EDITED.
* bool returned by applyNumInput should be used to decide whether to apply numinput-specific post-process to data.
* *Once applyNumInput has been called*, hasNumInput returns a valid value to decide whether to use numinput as drawstr source or not.

Those two steps have to be separated (so do not use a common call to hasNumInput() to do both in the same time!).
2014-03-23 09:29:04 +01:00
af93ebcb50 Code Cleanup: style and redundant casts 2014-01-16 19:15:53 +11:00
47a8b38e53 Fix T37143: Wrong normal dir with individual origins + one vert selected 2013-11-28 19:59:26 +11:00
31a1bcfcd7 fix T37411: Transform mouse constraint could fail in some situations.
Was caused by int rounding when an axis was < 1.0.
2013-11-21 02:21:34 +11:00
Lukas Toenne
7398600090 True grid snapping for nodes: This snaps nodes to the actual background grid instead of using incremental offset (which is not useful for nodes). Increment snapping has been disabled for nodes to avoid
confusion, grid snap is now the default as it seems to be the most wanted and easy to use mode.

Absolute grid snapping happens in a somewhat generic function 'applyGridAbsolute', which could also be used for objects and other transforms later on. It is conceptually similar to the 'project' snapping
option, in that it calculates a delta vector for each element on top of the overall transform, which places each node on the grid.

Node transform now uses the top-left node corner for TransformData->loc. The transform center is still the average of node centers, so that scaling and rotation works nicely.

snapGrid*** functions have been renamed to snapGridIncrement*** to distinguish better between incremental and absolute grid snapping.
2013-11-06 17:46:32 +00:00
5816aa42bf code cleanup: minor transform refactor
redraw flag were mixing up types - int/char/bool, add enum type to use instead.
2013-10-23 06:48:36 +00:00
c3b746fa7e fix [#37179] All transformation normals drawn when proportional edit, individual origins and normal transform orientation are set
thanks to psy-fi for the initial patch.
2013-10-23 05:33:42 +00:00
76a4d91dc4 Fix #36499: proportional edit circle was drawing behind objects in some cases,
now it always draws in front to ensure the circle is visible.
2013-08-21 12:20:31 +00:00
397da50002 style cleanup: switch statements, include break statements within braces & indent.
also indent case's within the switch (we already did both of these almost everywhere)
2013-07-19 15:23:42 +00:00
30c7183874 use 'normal' orientation rather then 'local' with individual origins to use the per-element axis-matrix. 2013-05-01 05:26:10 +00:00
f09efad242 fix for scaling on individual center in mesh editmode when the object has non-unit matrix. (own error when adding support for axismtx in editmode) 2013-04-22 16:46:37 +00:00
ba845f6313 fix for own recent addition of transform indervidual-axis in editmode, not working if the object was rotated. 2013-04-12 02:16:44 +00:00
5eb37f9e5c correction to own recent changes to exitmode using axis-matrix, fallback to old behavior for editmodes where the axis-matrix isnt set (curve, surface, lattice) 2013-04-10 23:05:35 +00:00
0e1891648e fix for own mistake in recent adjustments to transform, local without individual-origin wasn't working. 2013-04-08 08:43:16 +00:00
93ac968db3 code cleanup: include order 2013-04-05 17:56:54 +00:00
ef1af9f9c4 fix [#34802] Individual Transformation Confusing in Edit Mode
Individual transformation now works in editmode mesh faces/edge, armature bones and metaballs.
2013-04-04 09:20:46 +00:00
eefee7a25e replace sprintf -> strcpy where its not needed. 2013-03-12 12:47:57 +00:00
2433404e4b add inline function mul_project_m4_v3_zfac() to get the z-depth value from a vector & mat4x4 2013-03-09 15:39:24 +00:00
abd1748e48 code cleanup: move runtime var zfac out of RegionView3D. rename initgrabz() -> ED_view3d_calc_zfac() and have it return the zfac to use. 2013-03-09 11:40:42 +00:00
9b5edeb881 code cleanup: view3d_clipping_test was making a vector copy for no reason. 2013-03-04 07:15:09 +00:00
04d628a5b5 Another huge bunch of new UI translations (some reported by Leon Cheung, thanks!)... 2013-02-19 15:45:56 +00:00
d8f2672be7 style cleanup 2013-01-15 13:08:51 +00:00
84fb45c2a5 Fix #33266: Transforming with Y axis constraint didn't apply aspect ratio correct
It first needed to constraint numeric input and then apply aspect correction only,
otherwise aspect correction would be applied on a wrong axis.
2012-11-23 09:22:34 +00:00
81eafc49e6 use min_ii/max_ii over MIN2 MAX2 2012-10-24 05:06:40 +00:00
1d5b2ea253 mask transforming when a mesh object was in editmode (but had no UV's), failed 2012-08-03 20:12:49 +00:00
7fba5779ed match function names for clip/image spaces 2012-07-25 16:30:53 +00:00
62a73381a7 use fabsf when using floats. 2012-07-21 15:27:40 +00:00
250cdd5e52 code cleanup: remove commented includes - mostly from 2.4x 2012-07-18 23:07:07 +00:00
8b865c01cd style cleanup: comments 2012-06-30 22:49:33 +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
9beef7442c style cleanup: also some spelling correction. 2012-06-27 05:59:41 +00:00
869efe927c style cleanup 2012-06-10 22:13:17 +00:00
e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
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
79d97ca509 style cleanup - spelling. 2012-03-08 04:12:11 +00:00
46045fbb09 style cleanup - braces & else / if's 2012-03-07 04:53:43 +00:00
31d2ee9bf7 style cleanup, brackets in else/if, some indentation. 2012-03-06 18:40:15 +00:00
f6ae27daef style cleanup - comment spelling + translate some dutch. 2012-03-04 04:35:12 +00:00
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
e10fd04db0 use BLI_strncpy and BLI_snprintf when the size of the string is known.
fix for sequencer unique naming which was missed with string length update.
2012-01-11 12:33:51 +00:00
ad96dacbc5 style edit only - move parenthesis onto second line of function definition (in keeping with most of blenders code)
also split some long lines in own code.
2011-12-17 00:52:36 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
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