Commit Graph

49420 Commits

Author SHA1 Message Date
Sergey Sharybin
c62077ce66 Per-track grease pencil data blocks
Added support of tracks to have their own grease pencil datablock.
This is controllable by Clip/Track toggle in Grease Pencil panel
in Clip Editor.

This toggle shows whether grease pencil stroke should go to movie clip's
datablock or to active track. As soon as this toggle is switched to Track,
all further strokes would be added to active track and only strokes which
belongs to active track would be displayed on the screen.

This strokes would be relative to track's position, which means if one
made some strokes to track and started moving it, stokes would be moved
together with track.

Different tracks might share the same grease pencil datablock.

Also hide draw modes which are not supported by space clip.

Initial idea why tracks should have grease pencil datablocks was to
support easy mask creation for tracking. This seemed fastest and
easiest way to achieve mask editing for tracks.

To get mask for specified track there's function BKE_tracking_track_mask_get
which requires MovieTracking structure, track for which mask is creating and
also width and height of current overall frame. it'll return ImBuf with
mask (probably it's more like overkill, because internally it works with
single-channel value buffer and probably that's one should be passing to
libmv).

Probably hacking grease pencil in such way is not ideal solution, but that
part of code might be cleaned up further and it seems to be straightforward
to use grease pencil for such a purpose.

Note: this is commit to tomato branch, not to trunk.
2012-05-14 17:23:37 +00:00
Campbell Barton
389ae71316 when adding new points to mask
- base when adding between 2 points use their handle types.
- when extruding an existing point use its handle type.
2012-05-14 15:59:53 +00:00
Sv. Lockal
1a729d51d0 revert 46626, which crashes blender during startup with fileno
There is a better way to fix this by zlib upgrade, which has its own open function for windows paths
2012-05-14 15:50:35 +00:00
Campbell Barton
255e9ce15a fix for glitch adding markers, when there are 2 splines, and the first spline wasnt active but _was_ selected, Ctrl+Click would use the non-active selected spline.
now use the active spline when available.

also no need to de-select when adding a new vertex inbetween 2 verts in a spline.
2012-05-14 15:24:13 +00:00
Campbell Barton
a32f572f89 svn merge ^/trunk/blender -r46629:46632 2012-05-14 14:55:10 +00:00
Campbell Barton
0167a75a58 previous lasso commit changed Ctrl+Click for adding markers making Ctrl+Click drag not work quite the same.
now Ctrl+Alt+LMB is lasso.
2012-05-14 14:32:05 +00:00
Campbell Barton
060282ea42 svn merge ^/trunk/blender -r46612:46629 2012-05-14 13:55:12 +00:00
Campbell Barton
ff26474a46 was casting to short for int args. 2012-05-14 13:54:00 +00:00
Keir Mierle
e9d520f482 Refactor byte/float RGBA to grayscale conversion in tracking.c
This is the first in a series of tracking.c refactorings to
disentangle functionality that is sprinkled across unrelated
functions.
2012-05-14 13:46:38 +00:00
Sergey Sharybin
a7a79322bf Make blender compilable by gcc-4.7 and strict compilation flags:
- Remove strict flags from files, which are using FFmpeg stuff
  We're still using some symbols which are marked as deprecated.
  Ideally, we shall switch to new API, but it's a bit larger challenge
  because we don't want to break compatibility withotu actual need.
- Replace MAKE_ID with BT_MAKE_ID in bullet library.
  This is needed to prevent re-definition of MAKE_ID in bullet library.
  Seems it's only used to read blender files, so should be quite safe
  change.
2012-05-14 13:31:38 +00:00
Sv. Lockal
e0e97dfca7 Fix for BLI_gzopen to work with utf filenames in windows 2012-05-14 13:28:36 +00:00
Sergey Sharybin
a54f63b32d Changes to naming tracker vs. track vs. marker to match assumptions taken in
http://wiki.blender.org/index.php/User:Nazg-gul/GSoC-2011/Documentation
2012-05-14 12:50:36 +00:00
Campbell Barton
8b687f6c36 code cleanup: add WM_gesture_lasso_path_to_array, move mouse path to array conversion there. 2012-05-14 12:41:56 +00:00
Campbell Barton
be5b447100 lasso select for movie clip markers. 2012-05-14 12:04:00 +00:00
Keir Mierle
4f81bdf73c Start migrating away from pat_min and pat_max for markers
This starts converting markers in the movie clip editor / 2D
tracker from using pat_min and pat_max notation to using the
a more general, 4-corner representation. There is still
considerable porting work to do; in particular:

- The preview widget does not respect the new
  representation
- The corners cannot yet be edited individually.
- The clamping does not do the right thing for general
  corners; e.g. detecting a convex quad.
- The tracking code in Blender does not actually invoke the
  corner tracking version of libmv's tracking API.

Next steps:

- Convert libmv's legacy ESM tracker and brute tracker to
  work under the new TrackRegion() API.
- Make Blender use the new TrackRegion() API; this will
  allow real planar tracking tests.
- Everything else (UI, etc).

This patch is mostly the work of Sergey Sharybin.
2012-05-14 10:47:25 +00:00
Campbell Barton
4f2c83f573 style cleanup: imbuf & icons 2012-05-13 22:05:51 +00:00
Campbell Barton
ee9d9f4737 style cleanup: mask, whitespace edits, also use len_squared_v2 for comparisons. 2012-05-13 21:36:42 +00:00
Campbell Barton
2a3fddf5b3 svn merge: Merging r46558 through r46612, from trunk 2012-05-13 18:16:25 +00:00
Campbell Barton
7444613a9a fix for crash when no mask exists when entering mask transform. 2012-05-13 16:51:17 +00:00
Campbell Barton
b3c1c03ba4 style cleanup: mask files 2012-05-13 16:24:42 +00:00
Campbell Barton
0f43da2234 style cleanup: macro line breaks 2012-05-13 16:05:10 +00:00
Bastien Montagne
800bc74a8f Adds “align” option to snap to verts/edges/faces, for bones in Pose mode.
Have to use a ugly hack, as for pose bones, rotscale transform matrix is not always the same as translate one... :/

Adresses feature request [#30979] snapping: "align rotation with the snapping target" and pose-mode.
2012-05-13 16:01:59 +00:00
Campbell Barton
c8ebfe1d12 code cleanup:
- use bmesh iterator macros in more places
- rename scanfill variables (were using same names as mesh faces/verts which was confusing)
2012-05-13 14:47:53 +00:00
Campbell Barton
f964292630 fix geometry to origin in mesh editmode - was broken since bmesh merge. 2012-05-13 11:14:43 +00:00
Campbell Barton
305d341ec2 code cleanup: use vector math function minmax_v3v3_v3() and other minor vector function edits. 2012-05-13 11:05:52 +00:00
Thomas Dinges
13bbf1cc7b Sequencer / Clip Editor:
* Make it more clear that the Memory Cache Limit is used by the Clip Editor as well.
2012-05-13 09:26:01 +00:00
Thomas Dinges
7735e56058 More work for [#31429] Curve menu polish.
* Curve Extrude and Duplicate from Toolbar also moves the points now, same as for Mesh and in alignment with the menu. 

* Fixed yet another tooltip.
2012-05-13 09:13:47 +00:00
Ove Murberg Henriksen
9331b5e92f Projection onto face added for:
ED_vgroup_copy_by_nearest_face_single()
2012-05-13 08:16:41 +00:00
Ove Murberg Henriksen
55e627d01e Removed sqr_dist_v3v3()
Now using existing: len_squared_v3v3()
2012-05-13 05:57:32 +00:00
Ove Murberg Henriksen
4bee0a42dd Cleanup.
Basis changed/added for:
ED_vgroup_copy_by_nearest_face_single() 
Interpolation is still not working 100%
2012-05-13 05:33:25 +00:00
Ove Murberg Henriksen
4215071ace Complete working function added:
ED_vgroup_copy_by_nearest_vertex_in_face_single()
2012-05-13 03:46:46 +00:00
Campbell Barton
90aa56a12a code cleanup: use static functions for transform operators 2012-05-12 23:18:14 +00:00
Campbell Barton
9004f9f998 add access to bevel weight modal operator (only available in the Shift+E edge menu currently) 2012-05-12 23:07:52 +00:00
Campbell Barton
71461298db patch [#31434] IDMaterials.pop/append() UI update from console
from Dan Eicher (dna)
2012-05-12 22:38:15 +00:00
Campbell Barton
c1570d9f49 code cleanup: missed some min/max use of float[3], also found case of DO_MIN/MAX re-reading same value from array 4 times when it can do once (use minf rather then MIN2, same for maxf) 2012-05-12 22:34:20 +00:00
Campbell Barton
145289ad95 code cleanup: minor improvements to float/vector usage. 2012-05-12 22:13:38 +00:00
Campbell Barton
a1c0834466 previous commit didnt work right, the flag is still needed, wrap access with functions so the NULL check is always done. 2012-05-12 21:38:35 +00:00
Campbell Barton
e7612ffd24 replace GP_PAINTFLAG_STROKEADDED with a NULL check, saves worrying about keeping the flag correct after undo. 2012-05-12 21:29:25 +00:00
Campbell Barton
613f464c51 fix [#31427] Crash when undoing until no point in grease pencil poly mode 2012-05-12 21:23:02 +00:00
Campbell Barton
b224cbe6b6 fix for own bad logic with polygon normal calculation, was reading one past the loop array (reported as bug #31431). 2012-05-12 21:01:26 +00:00
Thomas Dinges
ed12a5d001 3D View:
* Changed Duplicate and Exture Operator fpr Curves/Surfaces to Duplicate/Extrude and Move, like for Mesh objects, for consistency. This is also consistent with Shift+D and E shortcut. 

This fixes [#31429] Curve menu polish.

* Fixed a wrong tooltip for metaball duplication.
2012-05-12 20:50:46 +00:00
Campbell Barton
9892736206 code cleanup: header cleanup and remove some duplicate defines. 2012-05-12 20:39:39 +00:00
Campbell Barton
cffaa42d3a style cleanup: blenkernel 2012-05-12 19:18:02 +00:00
Ove Murberg Henriksen
7adeedfecc ED_vgroup_copy_by_nearest_face_single()
Math for interpolation of weights fixed to be consistent with reality... 
Still there is probably some indexing errors. 
Some vertices that should have blue weight, gets red. (on border faces)
2012-05-12 17:43:56 +00:00
Bastien Montagne
d4258c4ad6 Fix [#31426] Unwrapping, First unwrap unwraps with LSCM, not with Angle Based
When operator method property is not set, the operator uses the one from current scene settings. We must update the operator property accordingly...

Also updated default startup.blend file, to match default AngleBased method (was on Conformal one).
2012-05-12 16:42:50 +00:00
Campbell Barton
85fd56a3a8 code cleanup: some style and use math defines, also small speedup for dynamicpaint, dont call acosf twice. 2012-05-12 16:42:12 +00:00
Campbell Barton
53ee7908d6 style cleanup: whitespace 2012-05-12 16:11:34 +00:00
Campbell Barton
bddc7dfc20 style cleanup: remaining BLI files. 2012-05-12 15:13:06 +00:00
Campbell Barton
2f2b15bbb2 style cleanup: whitespace, bli & makesdna 2012-05-12 15:02:10 +00:00
Campbell Barton
23c0d49a7c optimization for select similar
- use angle_normalized_v3v3() where both vectors are known to be normalized.
- remove needless radian to degrees conversions.
- move checks for customdata layers outside the inner loop (for bevel and crease).
2012-05-12 14:25:14 +00:00