Commit Graph

75472 Commits

Author SHA1 Message Date
Campbell Barton
1140238acf Fix T45976: Crash accessing BMesh customdata
Layers returned from items() and values() could have an invalid index.
2015-09-01 19:59:26 +10:00
Sergey Sharybin
55f87590f0 Depsgraph: Fix compilation error with legacy depsgraph disabled
Reported by Campbell on IRC, partial patch by him as well.
2015-09-01 14:48:08 +05:00
Campbell Barton
74fae33ee5 Fix T45825: Macro redo disable options incorrectly
A non repeatable operator would disable editing options for all operators after it.
2015-09-01 18:43:29 +10:00
Campbell Barton
9304df5182 Fix T45939: Crash w/ BMesh.*.sort() 2015-09-01 16:07:34 +10:00
Campbell Barton
6db978f6d1 BMesh: add asserts for BMesh sort ghash lookups 2015-09-01 15:43:49 +10:00
Campbell Barton
a7b349d03c Cleanup: redundant cast 2015-09-01 15:01:13 +10:00
Campbell Barton
c86a519898 Use qsort_r for BMesh Py API 2015-09-01 13:56:08 +10:00
Bastien Montagne
b3f4bf87b4 Trade-marked BPlayer Fix (c) 2015-08-31 22:03:51 +02:00
Antony Riakiotakis
333feea6e9 Fix T45258, impossible to select brush when removing it from 2d
painting.

Also system added a brush every time it found no paint brush in the
system which is not what we would want.

Solution:
* Brush panel stays visible always, regardless of whether there is a
brush or not.
* We search for first available brush when we find no brush in paint
struct instead of always generating a new one.
* Generating and searching for a brush take a mode argument now. Needed
some refactoring to users of BKE_paint_init as well.
* Did some style cleanups for paint mode enums.

Patch is big but it's mostly argument refactoring.
2015-08-31 22:00:30 +03:00
Campbell Barton
0018483dfa error in last commit 2015-09-01 03:02:14 +10:00
Campbell Barton
705776db1f Fix T45954: Inset w/ interpolated vertex color
Accumulating ubyte color was overflowing.

Thanks to @mont29 for suggested fix.
2015-09-01 02:51:30 +10:00
Campbell Barton
929db33828 Write thumbnail directly
BlendThumbnail matches the on-disk format, so just write directly.
2015-09-01 01:52:27 +10:00
Campbell Barton
5f64b77ca5 Fix T45955: Python's pdb can't show script source 2015-08-31 23:41:13 +10:00
Campbell Barton
a603a3470c Revert fix for T45849 (part 2, tsk!) 2015-08-31 22:47:14 +10:00
Campbell Barton
06b14aa5f9 error in comments 2015-08-31 22:26:05 +10:00
Campbell Barton
6a53e658d3 Alternate fix for T45849: tri-tri intersect error
Project both triangles onto the same plane to simplify calculations.
2015-08-31 22:15:27 +10:00
Campbell Barton
e503e37333 Revert fix for T45849, alternate fix coming up
epsilon check here didn't account for scale, causing T45919
2015-08-31 22:12:19 +10:00
Campbell Barton
96fa58e22c Math Lib: Add closest_to_plane helper functions
- closest_to_plane3 (for float3 planes)
- closest_to_plane*_normalized_v3 (for unit length planes)

Use when the plane is known to be unit length
2015-08-31 20:10:36 +10:00
Campbell Barton
489a5d34b7 Fix T45959: DistanceKey output incorrect 2015-08-31 16:22:16 +10:00
Campbell Barton
d9e71d5e16 Fix uninitialized vars in DistanceKey node 2015-08-31 16:22:06 +10:00
Campbell Barton
d267739be7 Fix incorrect cast 2015-08-31 13:47:32 +10:00
Campbell Barton
d8291ed88a missing NULL pointer check 2015-08-30 20:20:26 +10:00
Bastien Montagne
0952a8e44a Cleanup: set fd->mainlist to NULL at the end of blo_read_file_internal().
This is a local var, do not try to use it later!
2015-08-29 16:47:32 +02:00
Bastien Montagne
95ed5d4437 Add some more missing ID types to TREESTORE_ID_TYPE... 2015-08-29 15:51:11 +02:00
Bastien Montagne
db25b33973 Fix missing 'case idx' line in (debug-only & disabled) valgrind-friendly BKE_main_free() code. 2015-08-29 15:07:09 +02:00
Sergey Sharybin
c749fe4031 Fix T45736: Channel key error: color spaces modes
Was missing conversion back to RGB space.
2015-08-28 18:44:27 +02:00
Sergey Sharybin
36c408d861 Fix remaining parts of T44881, missing update on loading file 2015-08-28 18:29:27 +02:00
Campbell Barton
a068629abe Fix UI font drawing getting width w/o kerning 2015-08-29 02:10:11 +10:00
Sergey Sharybin
a0a7d92cc4 Partial fix of T44881: Fix for missing particles update when changing seed
Was only visible with new dependency graph.

Changing emit_from still doesn't behave fully reliably tho, that needs some
closer investigation.
2015-08-28 17:35:51 +02:00
Campbell Barton
a08d039e59 Fix assigning flag to bool 2015-08-29 01:05:43 +10:00
Sergey Sharybin
b024ccd619 Fix T45929: OpenSubdiv was doing extra object recalc tags 2015-08-28 14:55:21 +02:00
Bastien Montagne
c53b1e2a93 Readfile: Minor optimization in undo/redo case: do not call do_versions_userdef either. 2015-08-28 14:06:01 +02:00
Antony Riakiotakis
bf88428b7e Fix T45930 weights not appearing in editmode when show weights option
was enabled.

Caused by an -unneeded now- fix for opensubdiv. Code caused the vertex
colors to be uninitialized. Thanks to Sergey for confirming that initial
issue is no longer a problem.
2015-08-28 13:40:52 +03:00
Campbell Barton
85edd8fc82 Fix T45933: Can't select scaled camera in camera view 2015-08-28 12:10:21 +10:00
Campbell Barton
6bdf1d6dde Sequence/Scene render fixes
- wasn't checking subframe to see if the scene needed to be re-evaluated.
- unneeded int/float conversion storing original frame.
- moved cleanup block into one place to avoid confusion.
2015-08-28 11:28:01 +10:00
Sergey Sharybin
43a4aaf8e6 Compositor: Reduce number of divisions in EWA filtering 2015-08-27 19:43:33 +02:00
Sergey Sharybin
3ec81b814c Fix T45617: Map UV node produces image artifacts
Basically filtering was happening twice, first time by applying weights of EWA
filter itself and then by applying subpixel offset while reading pixel values.
2015-08-27 18:50:40 +02:00
Campbell Barton
9b3fa880a5 Support subframe evaluation for scene strips
Useful when used with the speed effect.
2015-08-28 01:25:23 +10:00
Bastien Montagne
59b2acc71b Make .blend file thumbnail reading simpler and more coherent, read/store them when reading in background mode.
Primary goal of this commit is to fix an annoying issue - when processing and saving .blend
files in background mode you lose their thumbnails, since it can only be generated with
an OpenGL context.

Solution to that is to read .blend thumbnail while reading .blend file (only done in background
mode currently), and store it in Main struct.

Also, this lead to removing .blend file reading code from thumb_blend (no need to have doublons).
We now have a small interface in regular reading code area, which keeps it reasonbaly light
by only reading/parsing header info, and first few BHead blocks.

This makes code reading .blend thumbnail about 3 to 4 times slower than previous highly specialized
one in blend_thumb.c, but overall thumbnail generation of a big .blend files folder only grows
of about 1%, think we can bare with it.

Finally, since thumbnail is now optionally stored in Main struct, it makes it easy to allow user
to define their own custom one (instead of auto-generated one). RNA API for this was not added though,
accessing that kind of .blend meta-data has to be rethought a bit on a bigger level first.

Reviewers: sergey, campbellbarton

Subscribers: Severin, psy-fi

Differential Revision: https://developer.blender.org/D1469
2015-08-27 16:00:46 +02:00
Campbell Barton
987b3df9c0 Missed version update loading in background mode 2015-08-27 23:12:40 +10:00
Campbell Barton
2112bd892b Fix T45926: Drivers fail in background mode
Scene evaluation was done before text blocks were registered.
2015-08-27 23:12:40 +10:00
Sergey Sharybin
067fe2719a Fix T45702: Editing smoke while viewport render and blender bug
Issue was caused by blender internal accessing data from DNA during rendering.

There's no simple solution to make stuff thread safe, so for now simply restart
rendering on frame update.
2015-08-27 12:10:01 +02:00
Sergey Sharybin
43dab7833a OpenSubdiv: Fix crash toggling edit mode with new depsgraph 2015-08-27 12:01:20 +02:00
Sergey Sharybin
efc6f9438f OpenSubdiv: Tweaks to detecting whether geometry data is needed on GPU with new DEG 2015-08-27 11:47:56 +02:00
Campbell Barton
c5f9255eed Fix T45921: Screw modifier flips vertex normals 2015-08-27 19:29:42 +10:00
Campbell Barton
74c3ebad12 Fix T45920: Loopcut w/ shrinkwrap crash 2015-08-27 17:45:56 +10:00
Campbell Barton
72aadc3597 Use correct size for BVH insertion 2015-08-27 17:45:56 +10:00
Campbell Barton
512f631af6 Fix T43826: Sculpt grab anchored fails
Regression caused by GSOC2013 merge f745564
2015-08-27 15:22:08 +10:00
Campbell Barton
e9a6effa95 DNA/IO: struct ghash lookup didn't set 'lastfind'
Internal inconsistency: lastfind was being checked
on every DNA_struct_find_nr call, but never set.

Gives minor speedup reading files.
2015-08-27 13:29:57 +10:00
Campbell Barton
a32a4059da Fix crash switching to rotate from edge-slide
Caused by own fix for T45458
2015-08-27 11:11:09 +10:00