Commit Graph

490 Commits

Author SHA1 Message Date
db70bfc206 code cleanup: use functions to initialize selection user data structs, use radius-squared for circle select comparisons.
edge_fully_inside_rect() & edge_inside_rect() args were shorts when all callers were passing ints.
2012-10-05 15:44:11 +00:00
5baa587a12 Warning indicators for animators when Auto Keying is enabled during transform
Recently on the bf-funboard list, there have been some requests for clearer
indications for animators that autokeying has been enabled when transforming so
that corrective action can be taken sooner if this wasn't expected. This is
especially important in distributed+collaborative environments where multiple
artists may work on a single shot file: someone working on a shot from
another animator may not be aware that autokeying was enabled, thus accidentally
setting a whole bunch of extra keyframes.

In this current incarnation, we display using red (not hardcoded, but using an
existing theme color) a solid 1px border around the 3D view while transforming
with autokeying enabled. In addition to the border, a blinking indicator (record
icon + "Auto Keying On" text) appear in the top right corner, as inspired by the
traditional recording indicator icons on camcorders.
2012-10-05 13:22:09 +00:00
5770e44f43 replace most uses of ED_view3d_project_float_noclip() with ED_view3d_project_float_global/object 2012-10-05 03:57:56 +00:00
e77004157e make ED_view3d_project_int equivalent to ED_view3d_project_short functions. 2012-10-04 17:52:12 +00:00
da656957c3 fix [#31654] Non-proportional edge slide behaving incorrectly. 2012-10-01 10:43:52 +00:00
b0fb857ef2 fix [#32684] Shrink/Fatten tool has odd behavior 2012-09-28 14:31:07 +00:00
483a6cd6c2 fix for cycles/python script error in normal panel 2012-09-26 19:23:06 +00:00
d2695c62a2 Mask Editor: make Alt+S feather shrink/fatten work better when no feather was
defined yet, previously would just stick to original curve then.
2012-09-21 12:18:14 +00:00
edb78d090c code cleanup:
- make view3d project names more consistent.
- remove apply_project_float() its not needed.
- update comments referencing an old function name.
- move doxygen docs into the C file, prefer they are kept here to avoid getting out of sync with code.
2012-09-20 04:56:24 +00:00
e5d0dcb8d8 Few cleanup in matrix mathutils (make mul_m3_m3m4 and mul_m4_m3m4 consistant with other similar funcs, mainly copy-safe [i.e. you can use the same matrix as operand and result, saves lines in some already over-complicated code!]). 2012-09-16 15:25:28 +00:00
232571c61a code cleanup: replace macro for BLI_rect size/center with inline functions. 2012-09-15 11:48:20 +00:00
05755d307a fix [#31946] Masking doesn't respect pixel ratio 2012-09-13 05:29:38 +00:00
2812dd92cf code cleanup: use BMEdit_FromObject() rather then me->edit_btmesh in more places. 2012-09-10 03:34:43 +00:00
1a7eb3454e style cleanup 2012-09-08 08:59:47 +00:00
0ecbc047e8 code cleanup 2012-09-06 23:41:03 +00:00
56534ecdcb style cleanup: also add debugging print function for derived mesh DM_debug_print_cdlayers() 2012-09-03 02:41:12 +00:00
0b4dfa1fcb Fix #32450: edge slide with multiple loops selected could move some loops
in the wrong direction.
2012-08-31 12:08:04 +00:00
0db80bdb88 Style cleanup - adding some braces around some multi-line statements (used after
if/else if/for)
2012-08-30 13:18:33 +00:00
93d89ec768 correct assert for customdata overlap, also quiet uninitialized warning in transform. 2012-08-24 08:17:53 +00:00
1939baa47d style cleanup 2012-08-22 16:44:32 +00:00
77f47799dd code cleanup: use BLI_RCT_SIZE macro 2012-08-20 23:06:17 +00:00
5e0f254afa utility functions for getting/setting rectangles for operators. 2012-08-08 20:38:55 +00:00
731c6ebec4 Patch [#32246] (Bugfix): UV editor -> "Proportional edit" together with "constrain to bounds" does not work.
Patch reviewed by Campbell Barton. Thanks!
2012-08-06 13:40:29 +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
c41e1e434a code cleanup: replace MIN2/MAX2 with minf/maxf 2012-07-29 16:59:51 +00:00
61469d2e3e code cleanup: remove unneeded 'struct' qualifiers 2012-07-26 22:47:05 +00:00
ff078d309e change clip utility function arguments to take space data and region rather then the context.
this allows a fix to be applied that corrects the helper line in the image view when transforming a mask.
2012-07-26 22:41:40 +00:00
ee572a9642 code cleanup: minor edits for mask/transform 2012-07-26 21:22:42 +00:00
6b7d013d8d Fix #32123: Blender crashes when zoomed in and rotating around 3d cursor
Fix deadlock in drawArc caused by precision error. Helper widget could
look wrong, that's because of not enough precision of floats used by
Blender.

This is known issue of Blender and wouldn't consider a bug.
2012-07-26 09:29:37 +00:00
927af4ccc9 mask transform now works in the image space 2012-07-25 19:36:59 +00:00
7fba5779ed match function names for clip/image spaces 2012-07-25 16:30:53 +00:00
f83ea3fa85 fix some crashes with mask/image transfor, a few more areas working now. 2012-07-25 16:03:08 +00:00
c8db1e832d minor edits for bmesh api 2012-07-20 09:49:54 +00:00
250cdd5e52 code cleanup: remove commented includes - mostly from 2.4x 2012-07-18 23:07:07 +00:00
db14b97be6 mask transform aspect correction wasn't working properly, also fix for own recent commit which made cyclic report not show 2012-07-18 20:32:31 +00:00
45738ef8dc Add Skin modifier's radius values to Transform panel (in 3D views). 2012-07-18 14:30:31 +00:00
e1449e3626 Fix [#32068] Edge slide not working in certain circumstance from Front / Side views
Only visible edges are used to create the "sliding vector". The test used to detect whether edges were visible or not was working for solid shading, but useless in wire draw mode (as all edges are visible in this mode!)...
2012-07-18 12:23:18 +00:00
01c3db149c Fix [#32086] Missing bevel "hold shift" for better accuracy.
This commit adds "shift" and numtype to both Bevel and Inset mesh operators.

It also gets rid of the magicnumber used in NumInput to str operation (currently, 20 chars per element, now defined as NUM_STR_REP_LEN in ED_numinput.h).
2012-07-14 14:03:36 +00:00
126024e537 Fix #31584: Fractional step in value input for Skin Modifier (Event/input problem)
Issue was caused by the code which checked whether snapping should be enabled
on transform init taking into account keymap and special keys state. It was
used for Ctrl-Click on manipulator only.

Check for Ctrl state gave wring result with skin modifier. It was solved
by additional check for which mode transformation is initializing for --
currently manipulator is available for translation/roation/resize only
which doesn't give any keymap issues.
2012-07-12 14:41:52 +00:00
Lukas Toenne
21f81ee279 Fix for center calculation in node transforms. This now uses the actual barycenter of node rect centers. 2012-07-10 13:50:51 +00:00
3a0593cc3d code cleanup: dont use function calls like dot_v3v3, pow and sqrt within macros which results in calling the function multiple times needlessly.
also added some comments.
2012-07-06 22:48:28 +00:00
9f22750422 style cleanup 2012-07-04 20:47:12 +00:00
8b865c01cd style cleanup: comments 2012-06-30 22:49:33 +00:00
35d8424273 code cleanup: rename some members of bmesh operators, 'slots' is a C++ keyword which confuses some IDE's.
also added missing BMO_op_vinitf args to comments.
2012-06-30 09:55:04 +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
6b8986af43 revert part of 48340, it causes uvs across islands to stitch in a different way (?) than before 2012-06-28 15:09:24 +00:00
1ba5db129b recent fix for #31581 could crash when doing edge slide on a mesh with no UV's. 2012-06-28 14:18:04 +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
ae2f3a4e5e Fix for #31581, UVs shrink on edge slide.
Issue is that all loops of a face adjacent to the sliding verts were 
getting project-corrected. Introduced a test to only project the
affected loops. 

The projection code introduces a small offset to the boundaries so that
any boundary tests can work as expected, but this leads to shrinking of
the barycentric coordinates of the projection, causing a shrink of the
uvs in turn. This even affects the uvs that -should- be affected though
the unfixed behavior works strangely in a correctish way (my guess is
because the projection uses the same face as the opposite sliding loop).

I fixed the behaviour by taking the mean value of the uvs. This won't
support seams but current code doesn't either. Also, all CustomData to
exhibit this unfixed behaviour. I only fixed the uv case, other data
(Vcolors, etc) will have discontinuities when edge sliding. I expect
that the CorrectUV code I am working on may address some of these
issues.

Also, added NULL checks for utility function (was intended for this bug
but wasn't needed after all)
2012-06-27 17:08:12 +00:00
4b955a60ed Cleanup up space clip API:
- Remove clip/mask specific size/aspect getters, they shall just
  use the same size/aspect ratio.
- Made size getter (and some other public functions) accept context
  instead of SpaceClip. Currently only SpaceClip is being get from
  this context, but later it'll be helpful when adding support of
  editing mask without opening clip in clip editor (in this case
  using render resolution for mask would be ideal, but this
  requires knowing scene in size getter).
- Rearrange some functions in clip_editor.c for easier navigation
  in the file.
2012-06-20 10:28:51 +00:00