Commit Graph

57167 Commits

Author SHA1 Message Date
Bastien Montagne
58d7153c6c BKE: Add 'mesh remap' code.
This is the (big!) core of mesh transfer data, it defines a set of structures
to represent a mapping of mesh elements (verts, edges, polys of loops) between
two arbitrary meshes, and code to compute such mappings.

No similarity is required between source and destination meshes (though results
when using complete different meshes are rather unlikely to be useful!).

This code is not bound to data transfer, it is defined to be as generic as possible,
and easy to reuse or extend as needs arise.

Several methods of mapping generation are defined for each element type,
we probably will have to adjust that in future (remove useless ones, add
new ones...).

For loops, you can also define islands (for UVs e.g.) so that loops of a same
destination polygon do not 'spread' across several source islands.

Heavily reviewed and enhanced by Campbell, thanks a lot!
2015-01-09 18:35:32 +01:00
Antony Riakiotakis
b99687169d Fix texture sampling with generative modifiers - sample backbuffer
returns indices in mesh face range
2015-01-09 18:06:15 +01:00
Bastien Montagne
1187b98d48 Fix T43174: "Record animation" does not update fcurve handles
`INSERT_FAST` implies you call `calchandles_fcurve()` at the end...
For now, since we do not store edited FCurves nor can we get them easily
(requires RNA...), just update handles of all fcurves, it's much more
performant than removing usage of `INSERT_FAST` anyway.
2015-01-09 15:29:47 +01:00
Campbell Barton
ac619aaf38 BLI_string: BLI_str_ends_with -> BLI_str_endswith
Loosely following Python str convention.
2015-01-09 23:47:17 +11:00
Campbell Barton
73955e2566 Fix for GTest 2015-01-09 23:33:02 +11:00
Antony Riakiotakis
ca9bdf3f28 Fix rotate around selection only working if object is at origin for
texpaint
2015-01-09 13:27:49 +01:00
Bastien Montagne
62cc4bab08 BKE bvhutils: cleanup and refactor to make it more flexible.
You can now use lower-level '_ex' versions of bvh creators to only use part of
the mesh's elements in the BVH, and/or create bvh from non-DM sources.

Needed for transfer data.

Note edges extend version of bvh creator is not added here, not needed so far.
2015-01-09 13:03:55 +01:00
Bastien Montagne
1794186053 BLI_math: add vector's dot_v3v3v3() func, for when you have three points instead of two vectors. 2015-01-09 13:03:55 +01:00
Bastien Montagne
2e72d756c4 BLI_rand: add a function returning a random point whithin given 2D triangle.
Needed by transfer data.
2015-01-09 13:03:55 +01:00
Bastien Montagne
88ee44a9ac BLI: add 'A*' (AStar) shortest path solver algorithm.
Needed for transfer data.
2015-01-09 13:03:55 +01:00
Antony Riakiotakis
2f16098d20 Gooseberry animation request: Paste flipped pose in action
and graph editor.

This was a tricky commit that was not so straightforward to make work.
The information for bones is not easy to come by in the animation curves,
however we do have some string manipulation tricks to make it happen.

Testing in gooseberry worked for the rigs there, commiting to master now
2015-01-09 12:16:58 +01:00
Bastien Montagne
95847f6ac7 Fix T43159: Copying of linked datablocks using relpath leads to invalid paths in new copies.
Propper fix reverting most of rB60e70c0c6014e5, which was only partial specific fix.
This code uses generic `BKE_id_lib_local_paths()` func to handle all possible paths.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D977
2015-01-09 09:53:58 +01:00
Campbell Barton
1b8240f5af Fix T43154: Extrude edges ignored isolated verts
Also cleanup extrude code.

- remove normal calculation.
- remove return values for transform type.
- use enums.

Thanks to Psy-fi for finding the initial fix.
2015-01-09 07:31:05 +11:00
Campbell Barton
db0b8017cb DDS missed newline printing errors. 2015-01-09 04:23:43 +11:00
Antony Riakiotakis
e02af840e1 Fix gtest linking on ubuntu and do minor cleanup.
Generally for build systems, libraries that do not depend on other
libraries, such as system libraries, OpenGL etc always go at the end.

We could even get rid of some duplicate dependency libraries here but
auto duplication by build systems and differences between OSs make this
difficult.

GTest still duplicates all libraries twice to solve some issues which is
weird (maybe libs are not sorted correctly for some reason? needs
investigation)
2015-01-08 17:17:40 +01:00
Bastien Montagne
60e70c0c60 Fix T43159: Copying of linked datablocks using relpath leads to invalid paths in new copies.
Simply have to rebase onto main filepath when copying, if source datablock is lib and path is relative.

Afaict, only affected Image and Text datablocks. MovieClip would also be a candidate, but has
no copy implemented currently.
2015-01-08 14:38:48 +01:00
Campbell Barton
72ca952641 correct permissions 2015-01-08 23:01:15 +11:00
Campbell Barton
37d748cd17 exclude git/arc files from tgz archive 2015-01-08 22:53:23 +11:00
Antony Riakiotakis
def2ef88b0 Fix crash in texture paint sampling when sampling materials without
textures slots
2015-01-08 12:47:19 +01:00
Sergey Sharybin
acce9f0841 Fix for wrong boolean flag check
This fixes obvious overflows when checking bitflags, who knows how much
undiscovered issues exists in the code still..
2015-01-08 14:43:18 +05:00
Campbell Barton
8f0b6a1dd1 Better check that preview seq is cleared on exit 2015-01-08 20:16:22 +11:00
Campbell Barton
4305950fc0 GHash: use reinsert instead of remove/insert 2015-01-08 19:58:01 +11:00
Campbell Barton
9fadacfd0f cleanup: style 2015-01-08 19:57:50 +11:00
Mitchell Stokes
8ebb552a95 Fix T40257: Frustum culling not working properly
Instead of getting fancy this time, we'll just use Mahalin's simpler
fix. This may have slight performance impacts, but it is a lot simpler
than the previous fix and shouldn't cause as many bugs.
2015-01-07 20:41:07 -08:00
Mitchell Stokes
4fac29ca0e Revert "Fix T40257: Frustum culling not working properly"
This reverts commit 315609ec0c1e28eb12bde3e8bbd2a5b03672b1a9.

This fix still causes more issues than it solves.
2015-01-07 20:38:05 -08:00
Antony Riakiotakis
ae18fd5937 Fix invalid memory access in gradient brushes - could cause a crash in
MacOS.

This looks like an oldie and should not influence release, but if we do
make an 'a' build it's safe to include.

Report by Craig Jones, thanks!
2015-01-07 23:01:42 +01:00
Bastien Montagne
ef05bc5dd7 Quite warning about unused func.
(not my day...)
2015-01-07 19:47:31 +01:00
Bastien Montagne
cda149b9c8 Remove 'ensure previews' call from write code.
Sorry about that, should have checked this stuff more, with Internal material
renders are very fast (unoticable), but with Cycles it can take (a lot of) time,
like several minutes or more.

Will probably fall back to a dedicated operator users will have to fire themselves
when they want previews in their files.
2015-01-07 19:38:13 +01:00
Campbell Barton
7c53c3483c PyAPI docs: minor changes to sphinx docs. 2015-01-08 03:55:01 +11:00
Lukas Tönne
19169de9f7 Recalculate particle pathcache stuff for all particles instead of
trying to be smart.

This breaks child interpolation otherwise because sometimes parent
paths are not calculated and give bad clumping results.
2015-01-07 16:16:40 +01:00
Martin Felke
e0e9cd0163 PyAPI: Call to get the pixel x,y in a text block
This allows scripts to request the screen location of any (line, column) pair.
2015-01-08 01:22:11 +11:00
Bastien Montagne
14f2597d7e More tweak to preview commit - do not 'render' non-used IDs either.
Thanks to Campbell for the headup.
2015-01-07 14:10:14 +01:00
Bastien Montagne
5bbb8a0d9d Ugh, forgot to invert that one in previous commit, sorry for the noise... 2015-01-07 12:46:18 +01:00
Bastien Montagne
820b6b3731 Ensure mat/tex/etc. previews are generated/saved in .blend files when enabled in userprefs.
Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D970
2015-01-07 12:31:31 +01:00
Sergey Sharybin
3f05797333 Followup to fe3e000: no need to exit pose mode on operator redo
This is to be backported to the release branch.
2015-01-07 15:38:32 +05:00
Campbell Barton
29d2c71117 Fix for bool flag use 2015-01-07 12:08:55 +11:00
Campbell Barton
848c00f7e7 cleanup: de-duplicate code 2015-01-07 12:08:54 +11:00
Joshua Leung
3bd01c6056 Fix: Segfault in Image Editor when transforming GPencil Strokes 2015-01-07 13:19:49 +13:00
Joshua Leung
45c7af6c9c Fix: Missing updates for UI panels and main region when using Grease Pencil in Image Editor 2015-01-07 13:12:37 +13:00
Joshua Leung
bafabf4eda Fix: Restored "Draw Poly" to D Ctrl RMB, as D Alt LMB was blocked by Alt-D (duplicate) keymap 2015-01-07 12:41:25 +13:00
Thomas Dinges
257d513aa8 Cycles: Allow negative values in Combine XYZ node. 2015-01-06 22:53:15 +01:00
julianeisel
70f3a47d57 Event System Cleanup: Modifier Key Assignment Switch
Was quite messy previously, think this is much more readable and easier to follow.
2015-01-06 20:33:22 +01:00
Sergey Sharybin
c66d7359fd Submodules: Make them pointing to the master branch
Otherwise it gives all sort of weird and wonderful artifacts.
2015-01-07 00:18:18 +05:00
julianeisel
eefb393cfd Fix T40435: Fix event system modifier key handling
This partial reverts rBd800cffaf10cb7, but fixes T40435 (Background label is not
redrawn).

It now isn't possible to use single modifier keys as shortcuts anymore. But this
is something that's not really useful at all, since it breaks more than it allows.
2015-01-06 18:48:36 +01:00
Campbell Barton
8e73b770d4 Remove slurph shape-key feature
This is an old option which wasn't working in over a year without complaint.
2015-01-07 02:06:37 +11:00
Antony Riakiotakis
0527183090 Fix copy-paste of colors to generated color not being correct. '
Change generated color property to gamma space to match the add new
image operator.
2015-01-06 15:48:18 +01:00
Dalai Felinto
d36fb8e34e Logic Bricks *must* be kept in alphabetical order 2015-01-06 12:29:48 -02:00
Howard Trickey
bf168f0600 Fix T43137: vertex bevel percent mode wasn't implemented. 2015-01-06 09:13:38 -05:00
Sergey Sharybin
22c9979b51 Point submodules ot latest release tags 2015-01-06 18:48:04 +05:00
Campbell Barton
e9d6350e7e Sequencer: show extensions when preview enabled 2015-01-06 23:11:20 +11:00