Commit Graph

106 Commits

Author SHA1 Message Date
51bada696f Longer names support for all ID and other object names
This commit extends limit of ID and objects to 64 (it means 63 meaning
characters and 1 for zero-terminator). CustomData layers names are also
extended.
Changed DNA structures and all places where length constants were hardcoded.

All names which are "generating" from ID block should be limited by MAX_ID_NAME-2,
all non-id names now has got own define called MAX_NAME which should be used all
over for non-id names to make further name migration stuff easier.

All name fields in DNA now have comment with constant which corresponds to
hardcoded numeric value which should make it easier to further update this
limits or even switch to non-hardcoded values in DNA.

Special thanks to Campbell who helped figuring out some issues and helped a lot
in finding all cases where hardcoded valued were still used in code.

Both of forwards and backwards compatibility is stored with blender versions newer
than January 5, 2011. Older versions had issue with placing null-terminator to
DNA strings on file load which will lead to some unpredictable behavior or even
crashes.
2012-01-11 08:51:06 +00:00
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
3fdc28b736 add a new object member to store the dsize, since with my recent commit broke forward compatibility. now the new values are copied into 'dscale' and existing ones remain.
this is annoying since now we have dsize and dscale, will look into a way to deprecate struct members next.
2011-12-04 03:35:54 +00:00
27d42c63d9 Camera tracking integration
===========================

Commiting camera tracking integration gsoc project into trunk.

This commit includes:

- Bundled version of libmv library (with some changes against official repo,
  re-sync with libmv repo a bit later)
- New datatype ID called MovieClip which is optimized to work with movie
  clips (both of movie files and image sequences) and doing camera/motion
  tracking operations.
- New editor called Clip Editor which is currently used for motion/tracking
  stuff only, but which can be easily extended to work with masks too.

  This editor supports:
  * Loading movie files/image sequences
  * Build proxies with different size for loaded movie clip, also supports
    building undistorted proxies to increase speed of playback in
    undistorted mode.
  * Manual lens distortion mode calibration using grid and grease pencil
  * Supervised 2D tracking using two different algorithms KLT and SAD.
  * Basic algorithm for feature detection
  * Camera motion solving. scene orientation

- New constraints to "link" scene objects with solved motions from clip:

  * Follow Track (make object follow 2D motion of track with given name
    or parent object to reconstructed 3D position of track)
  * Camera Solver to make camera moving in the same way as reconstructed camera

This commit NOT includes changes from tomato branch:

- New nodes (they'll be commited as separated patch)
- Automatic image offset guessing for image input node and image editor
  (need to do more tests and gather more feedback)
- Code cleanup in libmv-capi. It's not so critical cleanup, just increasing
  readability and understanadability of code. Better to make this chaneg when
  Keir will finish his current patch.

More details about this project can be found on this page:
    http://wiki.blender.org/index.php/User:Nazg-gul/GSoC-2011

Further development of small features would be done in trunk, bigger/experimental
features would first be implemented in tomato branch.
2011-11-07 12:55:18 +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
6912e94d06 replace BLF's blf_utf8_next() with BLI_str_utf8_as_unicode_step(),
also fixed some spelling errors.
2011-10-21 01:33:06 +00:00
274b9c8fb8 whitespace cleanup 2011-09-25 12:31:21 +00:00
3a55da7616 removed old ndof transform code, to be replaced with modern stuff in 2.6 2011-08-07 17:01:44 +00:00
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
b306566a44 fix [#25598] projection surface snap issue
Excuse the thrashing, this is from r35438, reverted r35444 under the _wrong_ impression Martin considered unacceptable.
2011-06-17 13:02:23 +00:00
9f766c71b0 use event->mval rather then subtracting ar->winrct.x / y from event->x / y 2011-05-20 07:40:05 +00:00
5f5cdf9d00 for bug [#27358] Transform bug when transform > 500
mouse coords would with cont. grab would wrap at short.
use mouse coords as int rather then short.

this problem still happens on linux because of XTranslateCoordinates
2011-05-12 16:47:36 +00:00
284a0d3610 pass even mouse coords value as const so its not edited, view3d_get_view_aligned_coordinate() could modify the event->mval. 2011-04-21 17:25:58 +00:00
6a32442855 revert r35438, Martin doesn't like having this option tacked on. 2011-03-10 00:38:23 +00:00
1110c80696 add option requested [#25598] projection surface snap issue
for retopo workflow you don't wan't to project the mesh onto its self, added option not to.
2011-03-09 22:45:34 +00:00
Nathan Letwory
95100afc12 doxygen: blender/editors tagged. 2011-02-27 20:29:51 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
86bbab7de5 remove/comment unused defines. 2011-01-15 16:14:57 +00:00
fa4bbbb249 Maintenance,
- remove some redundant declarations
- changed VertexTangent and Path structs to avoid compiler alignment padding.
2010-12-04 13:00:28 +00:00
ac2e77cac5 [#24827] Crash when auto-keyframing while playing animation
Reported by André Oliveira

Need to pass valid context to autokeying callback function.
2010-11-20 21:43:16 +00:00
43e6ccd57b Move rotOrder to proper transform data structure 2010-11-14 19:19:58 +00:00
7569a25a4f centralize function for calculating pixel size. (no functional changes) 2010-11-05 05:26:34 +00:00
de8e066a1c bugfix [#24505] Python command bpy.ops.transform.rotate(...) does not follow axis=(...) attribute
the axis was being constantly re-initialized from the view.
2010-11-03 04:38:07 +00:00
1424a171a4 bugfix [#21097] Rotating multiple bones with non-local location behaves incorrectly.
- rotation and bone scaling with Durian feature 'Local Location' would fail to correctly translate the bone
because a different matrix is needed for translation and rotation.
2010-10-24 06:16:44 +00:00
03d4121a55 Cancelling rotation on axis/angle object rotation didnt restore the original rotation.
also commented drotAxis/Angle since its not used yet.
2010-10-19 11:15:08 +00:00
8268a4be71 most unused arg warnings corrected.
- removed deprecated bitmap arg from IMB_allocImBuf (plugins will need updating).
- mostly tagged UNUSED() since some of these functions look like they may need to have the arguments used later.
2010-10-16 14:32:17 +00:00
e75f037fac This fixes: [#23672] If frame offset is too high the strip jumps forward
when you try to move it.
2010-09-04 20:55:31 +00:00
9610515b22 keyframe transform, both through dopesheet/action editor and graph editor, works a bit better with handles. handles now follow keyframes properly in frame snap mode, in situations where they would move (but the keyframe would not) in undesirable ways before. also hopefully fixed vector scope crash in image editor. and disabled snapping to seconds (ever); this can be a seperate option, silently switching to second snapping in frame snapping mode is absolutely evil. also, the action editor draws in hundredth of seconds, not seconds, so it didn't even work. Aligorith: I hope this code is ok, if not feel free to rewrite it. 2010-05-06 19:54:43 +00:00
5a805c5fc3 [#21840] When clicking to move a Node it sticks to the mouse
Add hidden property to be able to force confirm on release (drag immediately is a silly name) on or off.

Streamline method for adding common properties to transform operators.
2010-04-02 19:40:51 +00:00
d010dae91b [#21767] Project Vert. on the Surf. of Other Obj. enabled causes crash when trying to Crease some edges
Don't want to project for Crease (and others).
2010-03-28 13:59:33 +00:00
1e9bf0cfdb spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text) 2010-03-22 09:30:00 +00:00
70efb8d322 [#21433] Angular rotation snap issue, final value set is not snapped - SVN 27250 and 2.50A1
Proper fix for this. Moving special mouse input stuff to custom callbacks (this also makes the per transform main functions a bit cleaner).

It also fixes the operator property (value) for shear and warp.
2010-03-09 01:19:32 +00:00
aa67aa9ecc Split numinput from transform (reusable in other operator).
Use in marker move operator.
2010-02-20 20:29:09 +00:00
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
9916e0193c New Transform 3D view recalculate scheme.
Only recalculate changes when absolutely necessary (mouse move triggers a soft recalc that will only happen before the next redraw other events trigger hard recalcs). The problem was that mouse moves are reported as lots of events (with small dx,dy) between each redraw which would trigger often heavy recalculations every time while only the last one was really important (the one before the redraw).

This makes snap project (retopo) much more manageable but induces a very small lag equal to one refresh cycle. Confirming transform does a hard refresh, so the final result is always consistent with mouse position.
2010-02-03 21:01:41 +00:00
c74440f198 Use modal keymap events for transform numinput increment and decrement 2010-01-25 17:48:02 +00:00
52858b7e66 [#20700] Transformation Increments
Patch by Jonathan Smith

When using numerical input, up and down arrow keys increment and decrement the value by the transform increment amount (grid for grab and so on).
2010-01-21 22:20:49 +00:00
0525829735 transform:
Rotation operator now saves axis of rotation (when not using a constraint). Better for operator redo and tweak (would use a Z axis because of matrix init)

Also fix crash in Translation operator redo and tweak (rv3d is not always available).
2010-01-04 20:49:42 +00:00
90e9aee9b8 Sequence Slide transformation (easier to do special sequence code there than in a generic transform)
Also make the transform operator creation a bit more automagic (I always forget either operator registration or modal keymap registration, this is all automatic now).
2009-12-21 17:23:44 +00:00
509c2e9614 Bugfix: [#20403] transform manipulation widgets with normal coordinates
Disable manipulator drawing during transform
2009-12-17 17:50:55 +00:00
a1b8f16958 Bugfix: [#20406] reapeat duplication along axis+view transform orientation
Saving back orientation in operator didn't take into account that constraint orientation can be different than user selected orientation.

Also simplify the switching logic a little.
2009-12-17 17:34:56 +00:00
2c3eb59f0f A few KeyingSet + Transform Tweaks:
Autokeying for transform functions now gets context-info, allowing for bone paths to be recalculated. 

However, the main purpose of this is to allow KeyingSets to eventually have poll functions.
2009-12-14 03:20:17 +00:00
9358af05d0 rename operators TFM_OT_* --> TRANSFORM_OT_* 2009-12-10 10:36:32 +00:00
1962afa2a6 Use custom cursor draw in transform to draw the new arrow cursors (to indicate direction of motion for a particular transformations). This insures that it's drawn under the cursor and not far away when cursor is warped (rubber band still points to event location, this helps visualize too). 2009-12-07 18:10:11 +00:00
e4a97d67b6 Make toggle and hold snap method cohabit nicely.
Shift-Tab toggles the global toolsetting snap settings (both in and out of transform).
Holding down Ctrl inverts the snap setting in transform (turns it on when global snap is off and vice versa).
Ctrl-Shift-Tab to select snap mode (only outside of transform for now).

For old (pre 2.5) behavior, just keep global snap off and use Ctrl.

NOTE: transform modal events for snap have change a bit, saved keymap might not work anymore.
2009-12-03 19:18:00 +00:00
9f251ce301 Additive snap for Transform. Easy snapping between two vertices, in the middle of three faces, ...
A to add the current snapping point to the list
Alt-A to remove the last one

The resulting snapping point is the average of all snap points in the list (and the one under the mouse pointer, if valid).

Snapping between two verts is a matter of moving over the first, pressing A, moving over the other, confirming transform.
2009-12-01 18:26:18 +00:00
edf32a6fb0 Gimbal orientation defaults to Normal instead of Global when bone or object is not using euler orientation (Normal is bone axis for pose and Local axis for object, so this is more useful than defaulting to Global). 2009-11-29 18:20:26 +00:00
ae16f46573 Fix CLICK event for modal operators.
modal operators should return RUNNING_MODAL|PASSTHROUGH for unhandled events to be able to receive clicks correctly (this needs to be fixed for other modal operators).

Maybe it's time to have "handled" flag in event instead.
2009-11-29 16:49:26 +00:00
74715d00cc First changes to implement the 2.5 snapping proposal (discussed back in May and recently on IRC).
http://wiki.blender.org/index.php/User:Theeth/Snapping

The new widget isn't there yet, but the rest works, including:

Increment (gears) is now a snap mode

Ctrl click to toggle snap on or off (in transform and 3d view)
Shift+Ctrl click to select snap mode (3d view only)

Snap status (on/off) is persisted in tool settings, no need to always turn it back on when entering transform.

It's still possible to have something resembling the old system by editing the transform modal keymap to snap on on ctrl press and snap off on key release.
2009-11-26 19:47:55 +00:00
d0c1d182e9 Bug: [#19712] Manipulator widget missing functionality
With help from Patch [#19757] by Michael Jefferies.

-------------

Also, following talks with Matt and Campbell, make pressing Ctrl in transform toggle snap/gears instead of having to hold it down.

Important note: holding it down will no longer work correctly because of key repeats (it will toggle it constantly). It's possible to edit the modal keymap to bring back the old behavior (perhaps it should even be default).
2009-11-12 19:49:26 +00:00