Commit Graph

39188 Commits

Author SHA1 Message Date
Sergey Sharybin
039acbbfef Homography correction for track preview widget
Use homography transformation for pattern displayed in track preview widget.
Sampling of this pattern happens to resolution of preview widget itself,
which implied some bigger changes in how scopes are working:

- Instead of real pattern store search area in BKE_movieclip_update_scopes,
  which is later used for sampling pattern.
- Sampling of pattern happens in ui_draw_but_TRACKPREVIEW from search area
  which allows to sample it to actual resolution of preview widget.
- If size of preview widget is not changing, this sampled pattern wouldn't
  be re-sampled until scopes are tagged to update.

There are some issues with pattern sampling which seems to happen SamplePlanarPatch,
changing linear sampling to nearest removes that unwanted 1px offset.

Left commented saving of sampled image in ui_draw_but_TRACKPREVIEW which should
help figuring the issue out.
2012-06-09 11:14:36 +00:00
Keir Mierle
f9be7fca17 Planar tracker polish.
- Fixes the correlation checking code that was broken in the
  previous commit. The bug was a transpose error.
- Fixes a memory leak of the warp functor, found by Sameer.
- Various cleanups done at Sameer's suggestion.

Thanks to Sameer Agarwal for a code review.
2012-06-09 06:55:21 +00:00
Sergey Sharybin
5728b11ef2 Merging r47612 through r47623 from trunk into soc-2011-tomato 2012-06-08 18:25:01 +00:00
Sergey Sharybin
73a47caa08 Fixed issue with missed reconstruction error in clip editor header
Actually was causes by error in RNA bindings which lead to empty reconstruction
returned for cameraObject.reconstruction.
2012-06-08 18:16:20 +00:00
Keir Mierle
276701502a Make planar tracking much faster.
- This makes planar tracking around 2-3x or more faster than
  before, by rearranging how the sampling is done.
  Previously, the source patch was sampled repeatedly on
  every optimizer iteration; this was done for
  implementation speed, but was wasteful in computation.

- This also contains some additions to Ceres to help
  deailing with mixed numeric / automatic differentation. In
  particular, there is now a "Chain::Rule" operator that
  facilitates calling a function that takes Jet arguments,
  yet does numeric derivatives internally. This is used to
  mix the numeric differentation of the images with the warp
  parameters, passed as jets by Ceres to the warp functor.

  There is also a new "JetOps" object for doing operations
  on types which may or may not be jets, such as scaling
  the derivative part only, or extracting the scalar part
  of a jet.

  The Ceres patches are aimed at upstream.

- A new function for sampling a patch is now part of the
  track_region.h API; this will get used to make the preview
  widget properly show what is getting tracked. Currently
  the preview widget does not handle perspective tracks.

Known issues:

  This patch introduces a bug such that the "Minimum
  Correlation" flag does not work; if it is enabled, tracking
  aborts immediately. The workaround for now is to disable the
  correlation checking, and examine your tracks carefully. A
  fix will get added shortly.
2012-06-08 17:42:17 +00:00
Sergey Sharybin
916524d650 Fixed issue with non-updating frame in clip editor when toggling undistorted render while frame is grayscaled.
Also corrected some typos in movieclip.
2012-06-08 17:16:32 +00:00
Lukas Toenne
6563a05cad Added a default case in switch to avoid paranoid compiler warnings. 2012-06-08 17:02:02 +00:00
Sergey Sharybin
ff792f3249 Selecting track channel in tracking dopesheet would make track active,
just as it happens with curve view.
2012-06-08 16:51:38 +00:00
Sergey Sharybin
04766ab071 Added sorting by average reprojection error to motion tracking dopesheet. 2012-06-08 16:42:24 +00:00
Lukas Toenne
5e1bbde01d Particle Info node for Cycles. This can be used to access particle information in material shaders for dupli objects. For now only the particle Age and individual Lifetime (in frames) are supported, more attributes can be added when needed.
The particle data is stored in a separate texture if any of the dupli objects uses particle info nodes in shaders. To map dupli objects onto particles the store an additional particle_index value, which is different from the simple dupli object index (only visible particles, also works for particle dupli groups mode).

Some simple use cases on the code.blender.org blog:
http://code.blender.org/index.php/2012/05/particle-info-node/
2012-06-08 16:17:57 +00:00
Sergej Reich
82d3d9f2ba Update Bullet to version 2.80 (bullet svn revision 2537)
Remove Jamfiles and other unused files that stuck around during previous updates.

Add patches for local changes to the patches directory.

Update readme.txt, it had outdated infromation.
2012-06-08 16:13:01 +00:00
Sergej Reich
221a787822 Don't show physics properties in game engine conext
Also rename fluid panels to be more consistent with other simulations
2012-06-08 15:24:28 +00:00
Sergey Sharybin
909752a3da Fix #31752: Select All By Layer seems not to work when object belongs to several layers
Added option which changes match policy from exact match and shared layers when
selecting objects by layer.
2012-06-08 15:14:45 +00:00
Campbell Barton
511ee1175a svn merge ^/trunk/blender -r47603:47611 2012-06-08 14:49:07 +00:00
Campbell Barton
5f2409e5ec add listener in action space for mask changes so dopesheet redraws + other minor changes. 2012-06-08 14:46:17 +00:00
Campbell Barton
b33c5168f4 mask animation keys now editable in the dope sheet (duplicate, transform, delete, select- etc). 2012-06-08 14:31:38 +00:00
Antony Riakiotakis
68c365e2f0 Index: source/blender/gpu/intern/gpu_draw.c
===================================================================
--- source/blender/gpu/intern/gpu_draw.c	(revision 47568)
+++ source/blender/gpu/intern/gpu_draw.c	(working copy)
@@ -230,11 +230,12 @@
 	Image *ima, *curima;
 
 	int domipmap, linearmipmap;
+	int texpaint; /* store this so that new images created while texture painting won't be set to mipmapped */
 
 	int alphablend;
 	float anisotropic;
 	MTFace *lasttface;
-} GTS = {0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 1, 0, -1, 1.f, NULL};
+} GTS = {0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 1, 0, 0, -1, 1.f, NULL};
 
 /* Mipmap settings */
 
@@ -256,7 +257,7 @@
 
 static int gpu_get_mipmap(void)
 {
-	return GTS.domipmap;
+	return GTS.domipmap && !GTS.texpaint;
 }
 
 static GLenum gpu_get_mipmap_filter(int mag)
@@ -730,6 +731,8 @@
 	if (!GTS.domipmap)
 		return;
 
+	GTS.texpaint = !mipmap;
+
 	if (mipmap) {
 		for (ima=G.main->image.first; ima; ima=ima->id.next) {
 			if (ima->bindcode) {
2012-06-08 13:06:06 +00:00
Campbell Barton
477d12d1fc fix for bug in point slide using freed memory when auto-keying. 2012-06-08 09:57:23 +00:00
Sergey Sharybin
26f9fe3962 Merging r47581 through r47603 from trunk into soc-2011-tomato 2012-06-08 09:36:17 +00:00
Campbell Barton
4413903370 support for subframe animation evaluation for masks. 2012-06-08 09:35:51 +00:00
Campbell Barton
ae3062b741 fix for own bug - evaluating past the last frame of a mask didnt work at all. 2012-06-08 09:27:40 +00:00
Jeroen Bakker
de7fe937ff * Added OpenCL kernel for bokeh blur
* Uncomment COM_OPENCL_ENABLED from COM_defines.h to test
2012-06-08 09:17:07 +00:00
Sergey Sharybin
9564138847 Another fix for #31743: check for DM's verts number matches passed number of vertices
Now bevelled splines shall work in the same way as meshes.
2012-06-08 09:15:45 +00:00
Sergey Sharybin
e446c6af1f Fix #31748: Blender crashes when typing "al" after opening spacebar menu.
Crash was introduced by own refactoring of poll functions in clip editor.
2012-06-08 08:24:08 +00:00
Sergey Sharybin
87211a49ab Fix #31743: Applying Smooth modifier to a curve crashes Blender
Actually there were two different issues involved here:

- Recently enabled Smooth modifier wasn't actually designed for curves, so
  it in fact requires a bit bigger work to make it working.

  For now added check for object's typy in this modifier and if it's not
  mesh, it wouldn't try to use edges.

  The reason why it worked in 3d viewport is that creating DM from curve while
  displist is still ocntrcuting for would result in empty CDDM and that leads to
  not taking edges into account, only vertexCos passed to modifier would be used.

  This makes it behaving a bit differently from if it was a mesh, but still gives
  quite reasonable result. Would leave actual fix for a guy who enabled smooth
  modifier.

- Another issue is related on ensuring sculpt mask layer after applying modifier.
  This shall happen only for meshes.
2012-06-08 08:17:34 +00:00
Sergey Sharybin
54297c8d13 Clip editor: cleanup up header
One side of change is related on making code easier to follow, due it started
being quite messy because of all in-lined mode/view checks. Now there's a bit
of code duplication, but it's much easier to see what's going on there.

Another side of patch is related on re-arranging elements in header in a way
that follows rule "depending elements are placed after elements they depends on".
This might be a bit against mostly-used-based elements placement, but now it's
much easier to figure out where to add new option. Also it fits better other
blender's areas such as image editor header, i.e.
2012-06-08 07:55:15 +00:00
Sergey Sharybin
fc07b1fce3 Mask editing: remove use_parent property and use check if paren't id is set instead 2012-06-08 07:54:46 +00:00
Campbell Barton
b0c868c3b3 number enums 2012-06-08 06:11:24 +00:00
Campbell Barton
0593651165 code cleanup: assign values to enums in DNA 2012-06-08 06:04:29 +00:00
Campbell Barton
26ca0008ee typo/style edits 2012-06-08 05:53:30 +00:00
Campbell Barton
a6f3e15d6e - remove redundant NULL checks from mallocn's local linked list functions.
- minor changes to warning cleanup.
2012-06-08 05:46:00 +00:00
Campbell Barton
36db2a2cff initial support for editing masks in the sequencer, currently only draw the mask. 2012-06-07 19:24:49 +00:00
Campbell Barton
186f542b79 remove casts to short when allocating new imbufs. 2012-06-07 18:33:36 +00:00
Campbell Barton
bdf9e02346 new sequence strip type for masks. 2012-06-07 18:24:36 +00:00
Bastien Montagne
32530c2827 Quite some warnings... 2012-06-07 18:21:07 +00:00
Sergey Sharybin
1c46e63d4d Tooltips shouldn't have dot at the end of sentence 2012-06-07 18:10:25 +00:00
Sergey Sharybin
9387018122 Merging r47572 through r47580 form trunk into soc-2011-tomato 2012-06-07 18:08:57 +00:00
Sergey Sharybin
fd271f34fe Remove unused ibuf argument from draw_gpencil_2dimage
It was used by sequencer only and it wasn't ported for a while already.
This change allows to save cahce lookup for image and clip editors.
2012-06-07 17:57:49 +00:00
Gaia Clary
49a5141cde [#31739] Collada: New Export selections 'Include Armatures' 2012-06-07 17:55:26 +00:00
Sergey Sharybin
64c45caff9 Remove checks for valid frame from poll function in clip editor space
This results in some buttons not disabled when there's no currently displaying frame,
but this saves lots of cache lookups and threading loks for every frame update.
2012-06-07 16:36:19 +00:00
Sergey Sharybin
8a500eea9a Avoid imbuf loading when getting movie clip size
This prevents high memory usage by non-proxied frames when doing mask parenting.

Description from code:

  Originally was needed to support image sequences with different image dimensions,
  which might be useful for such things as reconstruction of unordered image sequence,
  or painting/rotoscoping of non-equal-sized images, but this ended up in unneeded
  cache lookups and even unwanted non-proxied files loading when doing mask parenting,
  so let's disable this for now and assume image sequence consists of images with equal sizes
2012-06-07 16:15:24 +00:00
Campbell Barton
105b1031dd code cleanup: rename sequencer types to SEQ_TYPE_*** and use enums rather then defines. 2012-06-07 15:49:02 +00:00
Campbell Barton
3916414709 adding mask points now adds in the correct place relative to shape keys (updating other keys for the new points still needs work though) 2012-06-07 15:33:32 +00:00
Campbell Barton
742171f609 fix for crash with recent color commits to draw-object, this case wasnt handled correctly before. 2012-06-07 15:20:51 +00:00
Campbell Barton
2b2d1439dc svn merge ^/trunk/blender -r47566:47571 2012-06-07 14:22:40 +00:00
Campbell Barton
3140cd993d fix for crash with selecting camera bundles. 2012-06-07 14:21:25 +00:00
Joshua Leung
35a274711e Bugfix [#31723] Renderer (internal) ignores keyframes on 'Compositing' checkbox
for animations

Pipeline options such as Use Compositing and Use Sequencer cannot be animated
due to the way that they are implemented now, so adding these to the list of
render properties that we cannot animate.
2012-06-07 10:55:53 +00:00
Sergey Sharybin
4ac1e1b222 Merging r47535 through r47566 from trunk into soc-2011-tomato 2012-06-07 09:32:39 +00:00
Sergey Sharybin
a99b9a5c3d Fix #31725: UV map order is ignored when opening in 2.6+ versions
Issue was caused by do_versions being used pdata as reference for active/render/
stencil/clone layer indices instead of fdata.

Added some utility functions used only by do_versions to be sure this indices
are set from fdata for pre-bmesh files.
2012-06-07 09:11:16 +00:00
Campbell Barton
ed7dbbdfe9 fix for buffer overrun on windows by kjym3 on IRC. 2012-06-07 09:05:51 +00:00